=============================================================================== 0010e188 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10e188: 55 push %ebp 10e189: 89 e5 mov %esp,%ebp 10e18b: 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; 10e18e: 8b 50 10 mov 0x10(%eax),%edx 10e191: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10e194: 8b 08 mov (%eax),%ecx 10e196: 8b 49 4c mov 0x4c(%ecx),%ecx 10e199: 49 dec %ecx 10e19a: 83 f9 06 cmp $0x6,%ecx 10e19d: 77 2d ja 10e1cc <== NEVER TAKEN 10e19f: ff 24 8d 7c 04 12 00 jmp *0x12047c(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10e1a6: 8b 52 0c mov 0xc(%edx),%edx 10e1a9: eb 15 jmp 10e1c0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10e1ab: c7 40 08 ac 05 12 00 movl $0x1205ac,0x8(%eax) break; 10e1b2: eb 18 jmp 10e1cc case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10e1b4: c7 40 08 1c 06 12 00 movl $0x12061c,0x8(%eax) break; 10e1bb: eb 0f jmp 10e1cc case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10e1bd: 8b 52 08 mov 0x8(%edx),%edx 10e1c0: 89 50 08 mov %edx,0x8(%eax) break; 10e1c3: eb 07 jmp 10e1cc case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10e1c5: c7 40 08 f4 04 12 00 movl $0x1204f4,0x8(%eax) break; } return 0; } 10e1cc: 31 c0 xor %eax,%eax 10e1ce: c9 leave 10e1cf: c3 ret =============================================================================== 0010dfe4 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10dfe4: 55 push %ebp 10dfe5: 89 e5 mov %esp,%ebp 10dfe7: 53 push %ebx 10dfe8: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10dfeb: 6a 64 push $0x64 10dfed: 6a 01 push $0x1 10dfef: e8 c8 94 ff ff call 1074bc 10dff4: 89 c3 mov %eax,%ebx if ( !node ) 10dff6: 83 c4 10 add $0x10,%esp 10dff9: 85 c0 test %eax,%eax 10dffb: 74 4f je 10e04c <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10dffd: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10e003: 8b 45 08 mov 0x8(%ebp),%eax 10e006: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10e009: 51 push %ecx 10e00a: 6a 20 push $0x20 10e00c: ff 75 0c pushl 0xc(%ebp) 10e00f: 8d 43 0c lea 0xc(%ebx),%eax 10e012: 50 push %eax 10e013: e8 20 57 00 00 call 113738 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10e018: 8b 45 10 mov 0x10(%ebp),%eax 10e01b: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 10e01e: e8 dd 0d 00 00 call 10ee00 10e023: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 10e027: e8 c4 0d 00 00 call 10edf0 10e02c: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10e030: 58 pop %eax 10e031: 5a pop %edx 10e032: 6a 00 push $0x0 10e034: 8d 45 f0 lea -0x10(%ebp),%eax 10e037: 50 push %eax 10e038: e8 d7 96 ff ff call 107714 node->stat_atime = (time_t) tv.tv_sec; 10e03d: 8b 45 f0 mov -0x10(%ebp),%eax 10e040: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10e043: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10e046: 89 43 48 mov %eax,0x48(%ebx) return node; 10e049: 83 c4 10 add $0x10,%esp } 10e04c: 89 d8 mov %ebx,%eax 10e04e: 8b 5d fc mov -0x4(%ebp),%ebx 10e051: c9 leave 10e052: c3 ret =============================================================================== 0010df88 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10df88: 55 push %ebp 10df89: 89 e5 mov %esp,%ebp 10df8b: 57 push %edi 10df8c: 56 push %esi 10df8d: 53 push %ebx 10df8e: 83 ec 1c sub $0x1c,%esp 10df91: 8b 7d 0c mov 0xc(%ebp),%edi 10df94: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 10df97: 8b 45 08 mov 0x8(%ebp),%eax 10df9a: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10df9c: e8 5f 0e 00 00 call 10ee00 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10dfa1: 66 85 c0 test %ax,%ax 10dfa4: 74 16 je 10dfbc <== ALWAYS TAKEN 10dfa6: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 10dfaa: 74 10 je 10dfbc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 10dfac: e8 6f 4a 00 00 call 112a20 <__errno> <== NOT EXECUTED 10dfb1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10dfb7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10dfba: eb 20 jmp 10dfdc <== NOT EXECUTED #endif jnode->st_uid = owner; 10dfbc: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10dfc0: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10dfc4: 50 push %eax 10dfc5: 50 push %eax 10dfc6: 6a 00 push $0x0 10dfc8: 8d 45 e0 lea -0x20(%ebp),%eax 10dfcb: 50 push %eax 10dfcc: e8 43 97 ff ff call 107714 10dfd1: 8b 45 e0 mov -0x20(%ebp),%eax 10dfd4: 89 43 48 mov %eax,0x48(%ebx) 10dfd7: 31 c0 xor %eax,%eax return 0; 10dfd9: 83 c4 10 add $0x10,%esp } 10dfdc: 8d 65 f4 lea -0xc(%ebp),%esp 10dfdf: 5b pop %ebx 10dfe0: 5e pop %esi 10dfe1: 5f pop %edi 10dfe2: c9 leave 10dfe3: c3 ret =============================================================================== 0010e086 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10e086: 55 push %ebp 10e087: 89 e5 mov %esp,%ebp 10e089: 57 push %edi 10e08a: 56 push %esi 10e08b: 53 push %ebx 10e08c: 83 ec 1c sub $0x1c,%esp 10e08f: 8b 75 08 mov 0x8(%ebp),%esi 10e092: 8b 7d 0c mov 0xc(%ebp),%edi 10e095: 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 ) 10e098: 31 c0 xor %eax,%eax 10e09a: 85 f6 test %esi,%esi 10e09c: 0f 84 dc 00 00 00 je 10e17e <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10e0a2: 50 push %eax 10e0a3: a1 54 3f 12 00 mov 0x123f54,%eax 10e0a8: 8b 40 2c mov 0x2c(%eax),%eax 10e0ab: f7 d0 not %eax 10e0ad: 23 45 14 and 0x14(%ebp),%eax 10e0b0: 50 push %eax 10e0b1: ff 75 10 pushl 0x10(%ebp) 10e0b4: 57 push %edi 10e0b5: e8 2a ff ff ff call 10dfe4 if ( !node ) 10e0ba: 83 c4 10 add $0x10,%esp 10e0bd: 85 c0 test %eax,%eax 10e0bf: 0f 84 b9 00 00 00 je 10e17e <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10e0c5: 4f dec %edi 10e0c6: 83 ff 06 cmp $0x6,%edi 10e0c9: 77 73 ja 10e13e <== NEVER TAKEN 10e0cb: ff 24 bd 4c 04 12 00 jmp *0x12044c(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e0d2: 8d 50 54 lea 0x54(%eax),%edx 10e0d5: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10e0d8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10e0df: 8d 50 50 lea 0x50(%eax),%edx 10e0e2: 89 50 58 mov %edx,0x58(%eax) 10e0e5: eb 6d jmp 10e154 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; 10e0e7: 8b 13 mov (%ebx),%edx 10e0e9: 89 50 50 mov %edx,0x50(%eax) break; 10e0ec: eb 66 jmp 10e154 case IMFS_DEVICE: node->info.device.major = info->device.major; 10e0ee: 8b 13 mov (%ebx),%edx 10e0f0: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10e0f3: 8b 53 04 mov 0x4(%ebx),%edx 10e0f6: 89 50 54 mov %edx,0x54(%eax) break; 10e0f9: eb 59 jmp 10e154 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10e0fb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10e102: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10e109: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10e110: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10e117: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10e11e: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10e125: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10e12c: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10e133: eb 1f jmp 10e154 case IMFS_FIFO: node->info.fifo.pipe = NULL; 10e135: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10e13c: eb 16 jmp 10e154 default: assert(0); 10e13e: 68 04 f8 11 00 push $0x11f804 <== NOT EXECUTED 10e143: 68 68 04 12 00 push $0x120468 <== NOT EXECUTED 10e148: 6a 5c push $0x5c <== NOT EXECUTED 10e14a: 68 fc 03 12 00 push $0x1203fc <== NOT EXECUTED 10e14f: e8 4c 92 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10e154: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10e156: 8b 4e 10 mov 0x10(%esi),%ecx 10e159: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10e15c: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10e15f: 8b 4b 04 mov 0x4(%ebx),%ecx 10e162: 41 inc %ecx 10e163: 89 4b 04 mov %ecx,0x4(%ebx) 10e166: 89 48 38 mov %ecx,0x38(%eax) 10e169: 53 push %ebx 10e16a: 53 push %ebx 10e16b: 50 push %eax 10e16c: 83 c2 50 add $0x50,%edx 10e16f: 52 push %edx 10e170: 89 45 e4 mov %eax,-0x1c(%ebp) 10e173: e8 d0 cc ff ff call 10ae48 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10e178: 83 c4 10 add $0x10,%esp 10e17b: 8b 45 e4 mov -0x1c(%ebp),%eax } 10e17e: 8d 65 f4 lea -0xc(%ebp),%esp 10e181: 5b pop %ebx 10e182: 5e pop %esi 10e183: 5f pop %edi 10e184: c9 leave 10e185: c3 ret =============================================================================== 0010e053 : IMFS_jnode_t *IMFS_create_root_node(void) { 10e053: 55 push %ebp 10e054: 89 e5 mov %esp,%ebp 10e056: 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) ); 10e059: 68 ed 41 00 00 push $0x41ed 10e05e: 68 b5 00 12 00 push $0x1200b5 10e063: 6a 01 push $0x1 10e065: e8 7a ff ff ff call 10dfe4 if ( !node ) 10e06a: 83 c4 10 add $0x10,%esp 10e06d: 85 c0 test %eax,%eax 10e06f: 74 13 je 10e084 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e071: 8d 50 54 lea 0x54(%eax),%edx 10e074: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10e077: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10e07e: 8d 50 50 lea 0x50(%eax),%edx 10e081: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10e084: c9 leave 10e085: c3 ret =============================================================================== 00108e8b : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 108e8b: 55 push %ebp 108e8c: 89 e5 mov %esp,%ebp 108e8e: 57 push %edi 108e8f: 56 push %esi 108e90: 53 push %ebx 108e91: 83 ec 1c sub $0x1c,%esp 108e94: 8b 45 08 mov 0x8(%ebp),%eax 108e97: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 108e9a: 85 c0 test %eax,%eax 108e9c: 75 11 jne 108eaf <== ALWAYS TAKEN 108e9e: 68 5a 50 12 00 push $0x12505a <== NOT EXECUTED 108ea3: 68 44 51 12 00 push $0x125144 <== NOT EXECUTED 108ea8: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 108ead: eb 13 jmp 108ec2 <== NOT EXECUTED assert( level >= 0 ); 108eaf: 85 f6 test %esi,%esi 108eb1: 79 19 jns 108ecc <== ALWAYS TAKEN 108eb3: 68 68 50 12 00 push $0x125068 <== NOT EXECUTED 108eb8: 68 44 51 12 00 push $0x125144 <== NOT EXECUTED 108ebd: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108ec2: 68 aa 4f 12 00 push $0x124faa <== NOT EXECUTED 108ec7: e8 24 07 00 00 call 1095f0 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 108ecc: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108ed0: 74 11 je 108ee3 <== ALWAYS TAKEN 108ed2: 68 73 50 12 00 push $0x125073 <== NOT EXECUTED 108ed7: 68 44 51 12 00 push $0x125144 <== NOT EXECUTED 108edc: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108ee1: eb df jmp 108ec2 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ee3: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108ee6: 83 c0 54 add $0x54,%eax 108ee9: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 108eec: 8d 46 01 lea 0x1(%esi),%eax 108eef: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ef2: eb 40 jmp 108f34 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108ef4: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108ef6: 51 push %ecx 108ef7: 51 push %ecx 108ef8: a1 00 a3 12 00 mov 0x12a300,%eax 108efd: ff 70 08 pushl 0x8(%eax) 108f00: 68 99 50 12 00 push $0x125099 108f05: e8 5a d3 00 00 call 116264 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 108f0a: 47 inc %edi 108f0b: 83 c4 10 add $0x10,%esp 108f0e: 39 f7 cmp %esi,%edi 108f10: 7e e4 jle 108ef6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108f12: 83 ec 0c sub $0xc,%esp 108f15: 53 push %ebx 108f16: e8 53 fe ff ff call 108d6e if ( the_jnode->type == IMFS_DIRECTORY ) 108f1b: 83 c4 10 add $0x10,%esp 108f1e: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108f22: 75 0e jne 108f32 IMFS_dump_directory( the_jnode, level + 1 ); 108f24: 52 push %edx 108f25: 52 push %edx 108f26: ff 75 e0 pushl -0x20(%ebp) 108f29: 53 push %ebx 108f2a: e8 5c ff ff ff call 108e8b 108f2f: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108f32: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108f34: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108f37: 75 bb jne 108ef4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108f39: 8d 65 f4 lea -0xc(%ebp),%esp 108f3c: 5b pop %ebx 108f3d: 5e pop %esi 108f3e: 5f pop %edi 108f3f: c9 leave 108f40: c3 ret =============================================================================== 0010e31f : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10e31f: 55 push %ebp 10e320: 89 e5 mov %esp,%ebp 10e322: 57 push %edi 10e323: 56 push %esi 10e324: 53 push %ebx 10e325: 83 ec 5c sub $0x5c,%esp 10e328: 8b 5d 14 mov 0x14(%ebp),%ebx char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 10e32b: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10e332: 74 19 je 10e34d <== ALWAYS TAKEN assert( 0 ); 10e334: 68 04 f8 11 00 push $0x11f804 <== NOT EXECUTED 10e339: 68 98 04 12 00 push $0x120498 <== NOT EXECUTED 10e33e: 68 f6 01 00 00 push $0x1f6 <== NOT EXECUTED 10e343: 68 a7 04 12 00 push $0x1204a7 <== NOT EXECUTED 10e348: e8 53 90 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e34d: 8b 3b mov (%ebx),%edi 10e34f: be 01 00 00 00 mov $0x1,%esi 10e354: 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) ) { 10e35b: e9 20 01 00 00 jmp 10e480 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10e360: 8d 45 e4 lea -0x1c(%ebp),%eax 10e363: 50 push %eax 10e364: 8d 4d af lea -0x51(%ebp),%ecx 10e367: 51 push %ecx 10e368: ff 75 0c pushl 0xc(%ebp) 10e36b: 8b 45 08 mov 0x8(%ebp),%eax 10e36e: 03 45 a4 add -0x5c(%ebp),%eax 10e371: 50 push %eax 10e372: e8 41 07 00 00 call 10eab8 10e377: 89 c6 mov %eax,%esi pathnamelen -= len; 10e379: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10e37c: 83 c4 10 add $0x10,%esp 10e37f: 83 3b 00 cmpl $0x0,(%ebx) 10e382: 0f 84 d4 00 00 00 je 10e45c <== 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 ) 10e388: 85 c0 test %eax,%eax 10e38a: 74 21 je 10e3ad if ( node->type == IMFS_DIRECTORY ) 10e38c: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e390: 75 1b jne 10e3ad if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e392: 57 push %edi 10e393: 57 push %edi 10e394: 6a 01 push $0x1 10e396: 53 push %ebx 10e397: 89 55 a0 mov %edx,-0x60(%ebp) 10e39a: e8 31 fe ff ff call 10e1d0 10e39f: 83 c4 10 add $0x10,%esp 10e3a2: 85 c0 test %eax,%eax 10e3a4: 8b 55 a0 mov -0x60(%ebp),%edx 10e3a7: 0f 84 44 01 00 00 je 10e4f1 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10e3ad: 29 55 0c sub %edx,0xc(%ebp) i += len; 10e3b0: 01 55 a4 add %edx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e3b3: 8b 3b mov (%ebx),%edi switch( type ) { 10e3b5: 83 fe 03 cmp $0x3,%esi 10e3b8: 74 34 je 10e3ee 10e3ba: 83 fe 04 cmp $0x4,%esi 10e3bd: 0f 84 b0 00 00 00 je 10e473 10e3c3: 83 fe 02 cmp $0x2,%esi 10e3c6: 0f 85 b4 00 00 00 jne 10e480 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e3cc: a1 54 3f 12 00 mov 0x123f54,%eax 10e3d1: 3b 78 18 cmp 0x18(%eax),%edi 10e3d4: 74 8a je 10e360 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10e3d6: 8b 73 10 mov 0x10(%ebx),%esi /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10e3d9: 3b 7e 1c cmp 0x1c(%esi),%edi 10e3dc: 75 0b jne 10e3e9 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10e3de: 8d 7d d0 lea -0x30(%ebp),%edi 10e3e1: 83 c6 08 add $0x8,%esi 10e3e4: e9 b7 00 00 00 jmp 10e4a0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10e3e9: 8b 7f 08 mov 0x8(%edi),%edi 10e3ec: eb 6a jmp 10e458 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e3ee: 8b 47 4c mov 0x4c(%edi),%eax 10e3f1: 83 f8 03 cmp $0x3,%eax 10e3f4: 75 15 jne 10e40b IMFS_evaluate_hard_link( pathloc, 0 ); 10e3f6: 51 push %ecx 10e3f7: 51 push %ecx 10e3f8: 6a 00 push $0x0 10e3fa: 53 push %ebx 10e3fb: e8 36 fe ff ff call 10e236 node = pathloc->node_access; 10e400: 8b 3b mov (%ebx),%edi if ( !node ) 10e402: 83 c4 10 add $0x10,%esp 10e405: 85 ff test %edi,%edi 10e407: 75 21 jne 10e42a <== ALWAYS TAKEN 10e409: eb 25 jmp 10e430 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10e40b: 83 f8 04 cmp $0x4,%eax 10e40e: 75 1a jne 10e42a result = IMFS_evaluate_sym_link( pathloc, 0 ); 10e410: 52 push %edx 10e411: 52 push %edx 10e412: 6a 00 push $0x0 10e414: 53 push %ebx 10e415: e8 72 fe ff ff call 10e28c 10e41a: 89 c6 mov %eax,%esi node = pathloc->node_access; 10e41c: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10e41e: 83 c4 10 add $0x10,%esp 10e421: 83 f8 ff cmp $0xffffffff,%eax 10e424: 0f 84 d5 00 00 00 je 10e4ff <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e42a: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e42e: 74 10 je 10e440 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e430: e8 eb 45 00 00 call 112a20 <__errno> 10e435: c7 00 14 00 00 00 movl $0x14,(%eax) 10e43b: e9 bc 00 00 00 jmp 10e4fc /* * 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 ) { 10e440: 8b 77 5c mov 0x5c(%edi),%esi 10e443: 85 f6 test %esi,%esi 10e445: 75 53 jne 10e49a /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e447: 50 push %eax 10e448: 50 push %eax 10e449: 8d 45 af lea -0x51(%ebp),%eax 10e44c: 50 push %eax 10e44d: 57 push %edi 10e44e: e8 d9 05 00 00 call 10ea2c 10e453: 89 c7 mov %eax,%edi if ( !node ) 10e455: 83 c4 10 add $0x10,%esp 10e458: 85 ff test %edi,%edi 10e45a: 75 10 jne 10e46c rtems_set_errno_and_return_minus_one( ENOENT ); 10e45c: e8 bf 45 00 00 call 112a20 <__errno> 10e461: c7 00 02 00 00 00 movl $0x2,(%eax) 10e467: e9 90 00 00 00 jmp 10e4fc /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10e46c: 89 3b mov %edi,(%ebx) 10e46e: e9 ed fe ff ff jmp 10e360 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e473: e8 a8 45 00 00 call 112a20 <__errno> 10e478: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e47e: eb 7c jmp 10e4fc /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e480: 83 fe 04 cmp $0x4,%esi 10e483: 74 08 je 10e48d <== NEVER TAKEN 10e485: 85 f6 test %esi,%esi 10e487: 0f 85 d3 fe ff ff jne 10e360 * 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 ) { 10e48d: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e491: 75 41 jne 10e4d4 if ( node->info.directory.mt_fs != NULL ) { 10e493: 8b 77 5c mov 0x5c(%edi),%esi 10e496: 85 f6 test %esi,%esi 10e498: 74 3a je 10e4d4 newloc = node->info.directory.mt_fs->mt_fs_root; 10e49a: 8d 7d d0 lea -0x30(%ebp),%edi 10e49d: 83 c6 1c add $0x1c,%esi 10e4a0: b9 05 00 00 00 mov $0x5,%ecx 10e4a5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10e4a7: 8d 75 d0 lea -0x30(%ebp),%esi 10e4aa: b1 05 mov $0x5,%cl 10e4ac: 89 df mov %ebx,%edi 10e4ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10e4b0: 8b 45 e4 mov -0x1c(%ebp),%eax 10e4b3: 8b 53 0c mov 0xc(%ebx),%edx 10e4b6: 53 push %ebx 10e4b7: ff 75 10 pushl 0x10(%ebp) 10e4ba: 8b 4d 0c mov 0xc(%ebp),%ecx 10e4bd: 01 c1 add %eax,%ecx 10e4bf: 51 push %ecx 10e4c0: 8b 4d a4 mov -0x5c(%ebp),%ecx 10e4c3: 29 c1 sub %eax,%ecx 10e4c5: 8b 45 08 mov 0x8(%ebp),%eax 10e4c8: 01 c8 add %ecx,%eax 10e4ca: 50 push %eax 10e4cb: ff 12 call *(%edx) 10e4cd: 89 c6 mov %eax,%esi 10e4cf: 83 c4 10 add $0x10,%esp 10e4d2: eb 2b jmp 10e4ff flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10e4d4: 83 ec 0c sub $0xc,%esp 10e4d7: 53 push %ebx 10e4d8: e8 ab fc ff ff call 10e188 10e4dd: 89 c6 mov %eax,%esi 10e4df: 59 pop %ecx 10e4e0: 5f pop %edi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10e4e1: ff 75 10 pushl 0x10(%ebp) 10e4e4: 53 push %ebx 10e4e5: e8 e6 fc ff ff call 10e1d0 10e4ea: 83 c4 10 add $0x10,%esp 10e4ed: 85 c0 test %eax,%eax 10e4ef: 75 0e jne 10e4ff rtems_set_errno_and_return_minus_one( EACCES ); 10e4f1: e8 2a 45 00 00 call 112a20 <__errno> 10e4f6: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e4fc: 83 ce ff or $0xffffffff,%esi return result; } 10e4ff: 89 f0 mov %esi,%eax 10e501: 8d 65 f4 lea -0xc(%ebp),%esp 10e504: 5b pop %ebx 10e505: 5e pop %esi 10e506: 5f pop %edi 10e507: c9 leave 10e508: c3 ret =============================================================================== 0010e58c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10e58c: 55 push %ebp 10e58d: 89 e5 mov %esp,%ebp 10e58f: 57 push %edi 10e590: 56 push %esi 10e591: 53 push %ebx 10e592: 83 ec 5c sub $0x5c,%esp 10e595: 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; 10e598: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10e59a: 31 c0 xor %eax,%eax 10e59c: 83 c9 ff or $0xffffffff,%ecx 10e59f: 8b 7d 08 mov 0x8(%ebp),%edi 10e5a2: f2 ae repnz scas %es:(%edi),%al 10e5a4: f7 d1 not %ecx 10e5a6: 49 dec %ecx 10e5a7: 89 4d a0 mov %ecx,-0x60(%ebp) 10e5aa: 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 ); 10e5b1: 8d 7d af lea -0x51(%ebp),%edi 10e5b4: 89 d6 mov %edx,%esi 10e5b6: 8d 45 e4 lea -0x1c(%ebp),%eax 10e5b9: 50 push %eax 10e5ba: 57 push %edi 10e5bb: ff 75 a0 pushl -0x60(%ebp) 10e5be: 8b 45 08 mov 0x8(%ebp),%eax 10e5c1: 03 45 a4 add -0x5c(%ebp),%eax 10e5c4: 50 push %eax 10e5c5: e8 ee 04 00 00 call 10eab8 10e5ca: 89 c2 mov %eax,%edx pathlen -= len; 10e5cc: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e5cf: 29 4d a0 sub %ecx,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10e5d2: 83 c4 10 add $0x10,%esp 10e5d5: 83 3e 00 cmpl $0x0,(%esi) 10e5d8: 0f 84 79 01 00 00 je 10e757 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e5de: 85 c0 test %eax,%eax 10e5e0: 74 36 je 10e618 if ( node->type == IMFS_DIRECTORY ) 10e5e2: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e5e6: 75 30 jne 10e618 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e5e8: 53 push %ebx 10e5e9: 53 push %ebx 10e5ea: 6a 01 push $0x1 10e5ec: 56 push %esi 10e5ed: 89 45 9c mov %eax,-0x64(%ebp) 10e5f0: 89 4d 98 mov %ecx,-0x68(%ebp) 10e5f3: e8 d8 fb ff ff call 10e1d0 10e5f8: 83 c4 10 add $0x10,%esp 10e5fb: 85 c0 test %eax,%eax 10e5fd: 8b 55 9c mov -0x64(%ebp),%edx 10e600: 8b 4d 98 mov -0x68(%ebp),%ecx 10e603: 75 13 jne 10e618 rtems_set_errno_and_return_minus_one( EACCES ); 10e605: e8 16 44 00 00 call 112a20 <__errno> 10e60a: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e610: 83 cb ff or $0xffffffff,%ebx 10e613: e9 99 01 00 00 jmp 10e7b1 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10e618: 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; 10e61b: 8b 1e mov (%esi),%ebx switch( type ) { 10e61d: 83 fa 02 cmp $0x2,%edx 10e620: 74 1f je 10e641 10e622: 77 0a ja 10e62e 10e624: 85 d2 test %edx,%edx 10e626: 0f 84 d9 00 00 00 je 10e705 10e62c: eb 88 jmp 10e5b6 10e62e: 83 fa 03 cmp $0x3,%edx 10e631: 74 40 je 10e673 10e633: 83 fa 04 cmp $0x4,%edx 10e636: 0f 85 7a ff ff ff jne 10e5b6 <== NEVER TAKEN 10e63c: e9 d4 00 00 00 jmp 10e715 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e641: a1 54 3f 12 00 mov 0x123f54,%eax 10e646: 3b 58 18 cmp 0x18(%eax),%ebx 10e649: 0f 84 67 ff ff ff je 10e5b6 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10e64f: 8b 46 10 mov 0x10(%esi),%eax 10e652: 3b 58 1c cmp 0x1c(%eax),%ebx 10e655: 75 0c jne 10e663 10e657: 89 f2 mov %esi,%edx 10e659: 89 c6 mov %eax,%esi if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10e65b: 8d 7d d0 lea -0x30(%ebp),%edi 10e65e: 83 c6 08 add $0x8,%esi 10e661: eb 5a jmp 10e6bd *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10e663: 8b 5b 08 mov 0x8(%ebx),%ebx 10e666: 85 db test %ebx,%ebx 10e668: 0f 85 90 00 00 00 jne 10e6fe 10e66e: e9 e4 00 00 00 jmp 10e757 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10e673: 8b 43 4c mov 0x4c(%ebx),%eax 10e676: 83 f8 03 cmp $0x3,%eax 10e679: 74 05 je 10e680 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10e67b: 83 f8 04 cmp $0x4,%eax 10e67e: 75 16 jne 10e696 result = IMFS_evaluate_link( pathloc, 0 ); 10e680: 50 push %eax 10e681: 50 push %eax 10e682: 6a 00 push $0x0 10e684: 56 push %esi 10e685: e8 7f fe ff ff call 10e509 if ( result == -1 ) 10e68a: 83 c4 10 add $0x10,%esp 10e68d: 83 f8 ff cmp $0xffffffff,%eax 10e690: 0f 84 19 01 00 00 je 10e7af <== NEVER TAKEN return -1; } node = pathloc->node_access; 10e696: 8b 06 mov (%esi),%eax if ( !node ) 10e698: 85 c0 test %eax,%eax 10e69a: 0f 84 e9 00 00 00 je 10e789 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e6a0: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e6a4: 0f 85 df 00 00 00 jne 10e789 /* * 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 ) { 10e6aa: 8b 50 5c mov 0x5c(%eax),%edx 10e6ad: 85 d2 test %edx,%edx 10e6af: 74 3b je 10e6ec 10e6b1: 89 f0 mov %esi,%eax 10e6b3: 89 d6 mov %edx,%esi 10e6b5: 89 c2 mov %eax,%edx newloc = node->info.directory.mt_fs->mt_fs_root; 10e6b7: 8d 7d d0 lea -0x30(%ebp),%edi 10e6ba: 83 c6 1c add $0x1c,%esi 10e6bd: b9 05 00 00 00 mov $0x5,%ecx 10e6c2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10e6c4: 8d 75 d0 lea -0x30(%ebp),%esi 10e6c7: b1 05 mov $0x5,%cl 10e6c9: 89 d7 mov %edx,%edi 10e6cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10e6cd: 56 push %esi 10e6ce: 8b 42 0c mov 0xc(%edx),%eax 10e6d1: ff 75 10 pushl 0x10(%ebp) 10e6d4: 52 push %edx 10e6d5: 8b 55 a4 mov -0x5c(%ebp),%edx 10e6d8: 2b 55 e4 sub -0x1c(%ebp),%edx 10e6db: 03 55 08 add 0x8(%ebp),%edx 10e6de: 52 push %edx 10e6df: ff 50 04 call *0x4(%eax) 10e6e2: 89 c3 mov %eax,%ebx 10e6e4: 83 c4 10 add $0x10,%esp 10e6e7: e9 c5 00 00 00 jmp 10e7b1 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e6ec: 53 push %ebx 10e6ed: 53 push %ebx 10e6ee: 57 push %edi 10e6ef: 50 push %eax 10e6f0: e8 37 03 00 00 call 10ea2c 10e6f5: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10e6f7: 83 c4 10 add $0x10,%esp 10e6fa: 85 c0 test %eax,%eax 10e6fc: 74 27 je 10e725 done = true; else pathloc->node_access = node; 10e6fe: 89 1e mov %ebx,(%esi) 10e700: e9 b1 fe ff ff jmp 10e5b6 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10e705: e8 16 43 00 00 call 112a20 <__errno> 10e70a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e710: e9 fb fe ff ff jmp 10e610 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e715: e8 06 43 00 00 call 112a20 <__errno> 10e71a: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e720: e9 eb fe ff ff jmp 10e610 10e725: 89 f2 mov %esi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10e727: 8b 45 a4 mov -0x5c(%ebp),%eax 10e72a: 2b 45 e4 sub -0x1c(%ebp),%eax 10e72d: 03 45 08 add 0x8(%ebp),%eax 10e730: 8b 4d 10 mov 0x10(%ebp),%ecx 10e733: 89 01 mov %eax,(%ecx) 10e735: 8b 5d 08 mov 0x8(%ebp),%ebx 10e738: 03 5d a4 add -0x5c(%ebp),%ebx /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10e73b: eb 2a jmp 10e767 if ( !IMFS_is_separator( path[ i ] ) ) 10e73d: 83 ec 0c sub $0xc,%esp 10e740: 0f be c0 movsbl %al,%eax 10e743: 50 push %eax 10e744: 89 55 9c mov %edx,-0x64(%ebp) 10e747: e8 98 9c ff ff call 1083e4 10e74c: 43 inc %ebx 10e74d: 83 c4 10 add $0x10,%esp 10e750: 85 c0 test %eax,%eax 10e752: 8b 55 9c mov -0x64(%ebp),%edx 10e755: 75 10 jne 10e767 rtems_set_errno_and_return_minus_one( ENOENT ); 10e757: e8 c4 42 00 00 call 112a20 <__errno> 10e75c: c7 00 02 00 00 00 movl $0x2,(%eax) 10e762: e9 a9 fe ff ff jmp 10e610 /* * 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++) { 10e767: 8a 03 mov (%ebx),%al 10e769: 84 c0 test %al,%al 10e76b: 75 d0 jne 10e73d /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10e76d: 83 ec 0c sub $0xc,%esp 10e770: 52 push %edx 10e771: 89 55 9c mov %edx,-0x64(%ebp) 10e774: e8 0f fa ff ff call 10e188 10e779: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10e77b: 8b 55 9c mov -0x64(%ebp),%edx 10e77e: 8b 02 mov (%edx),%eax 10e780: 83 c4 10 add $0x10,%esp 10e783: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e787: 74 10 je 10e799 <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e789: e8 92 42 00 00 call 112a20 <__errno> 10e78e: c7 00 14 00 00 00 movl $0x14,(%eax) 10e794: e9 77 fe ff ff jmp 10e610 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10e799: 51 push %ecx 10e79a: 51 push %ecx 10e79b: 6a 03 push $0x3 10e79d: 52 push %edx 10e79e: e8 2d fa ff ff call 10e1d0 10e7a3: 83 c4 10 add $0x10,%esp 10e7a6: 85 c0 test %eax,%eax 10e7a8: 75 07 jne 10e7b1 10e7aa: e9 56 fe ff ff jmp 10e605 10e7af: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e7b1: 89 d8 mov %ebx,%eax 10e7b3: 8d 65 f4 lea -0xc(%ebp),%esp 10e7b6: 5b pop %ebx 10e7b7: 5e pop %esi 10e7b8: 5f pop %edi 10e7b9: c9 leave 10e7ba: c3 ret =============================================================================== 0010e236 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e236: 55 push %ebp 10e237: 89 e5 mov %esp,%ebp 10e239: 53 push %ebx 10e23a: 83 ec 04 sub $0x4,%esp 10e23d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10e240: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10e242: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10e246: 74 0d je 10e255 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e248: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e24b: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e250: e8 4f c9 ff ff call 10aba4 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10e255: 8b 40 50 mov 0x50(%eax),%eax 10e258: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10e25a: 83 ec 0c sub $0xc,%esp 10e25d: 53 push %ebx 10e25e: e8 25 ff ff ff call 10e188 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e263: 58 pop %eax 10e264: 5a pop %edx 10e265: ff 75 0c pushl 0xc(%ebp) 10e268: 53 push %ebx 10e269: e8 62 ff ff ff call 10e1d0 10e26e: 89 c2 mov %eax,%edx 10e270: 83 c4 10 add $0x10,%esp 10e273: 31 c0 xor %eax,%eax 10e275: 85 d2 test %edx,%edx 10e277: 75 0e jne 10e287 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e279: e8 a2 47 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e27e: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e284: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10e287: 8b 5d fc mov -0x4(%ebp),%ebx 10e28a: c9 leave 10e28b: c3 ret =============================================================================== 0010e1d0 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10e1d0: 55 push %ebp 10e1d1: 89 e5 mov %esp,%ebp 10e1d3: 57 push %edi 10e1d4: 56 push %esi 10e1d5: 53 push %ebx 10e1d6: 83 ec 0c sub $0xc,%esp 10e1d9: 8b 5d 0c mov 0xc(%ebp),%ebx uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10e1dc: f7 c3 f8 ff ff ff test $0xfffffff8,%ebx 10e1e2: 74 10 je 10e1f4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10e1e4: e8 37 48 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e1e9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10e1ef: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e1f2: eb 3a jmp 10e22e <== NOT EXECUTED jnode = node->node_access; 10e1f4: 8b 45 08 mov 0x8(%ebp),%eax 10e1f7: 8b 30 mov (%eax),%esi #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10e1f9: e8 02 0c 00 00 call 10ee00 10e1fe: 89 c7 mov %eax,%edi st_gid = getegid(); 10e200: e8 eb 0b 00 00 call 10edf0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10e205: 66 3b 7e 3c cmp 0x3c(%esi),%di 10e209: 75 07 jne 10e212 flags_to_test <<= 6; 10e20b: 89 da mov %ebx,%edx 10e20d: c1 e2 06 shl $0x6,%edx 10e210: eb 0f jmp 10e221 else if ( st_gid == jnode->st_gid ) 10e212: 89 da mov %ebx,%edx 10e214: 66 3b 46 3e cmp 0x3e(%esi),%ax 10e218: 75 07 jne 10e221 <== NEVER TAKEN flags_to_test <<= 3; 10e21a: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10e221: 8b 46 30 mov 0x30(%esi),%eax 10e224: 21 d0 and %edx,%eax 10e226: 39 d0 cmp %edx,%eax 10e228: 0f 94 c0 sete %al 10e22b: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10e22e: 83 c4 0c add $0xc,%esp 10e231: 5b pop %ebx 10e232: 5e pop %esi 10e233: 5f pop %edi 10e234: c9 leave 10e235: c3 ret =============================================================================== 0010e28c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e28c: 55 push %ebp 10e28d: 89 e5 mov %esp,%ebp 10e28f: 57 push %edi 10e290: 56 push %esi 10e291: 53 push %ebx 10e292: 83 ec 1c sub $0x1c,%esp 10e295: 8b 5d 08 mov 0x8(%ebp),%ebx 10e298: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10e29b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10e29d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10e2a1: 74 0a je 10e2ad <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e2a3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e2a6: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e2ab: eb 0f jmp 10e2bc <== NOT EXECUTED if ( !jnode->Parent ) 10e2ad: 8b 47 08 mov 0x8(%edi),%eax 10e2b0: 85 c0 test %eax,%eax 10e2b2: 75 0d jne 10e2c1 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10e2b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e2b7: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10e2bc: e8 e3 c8 ff ff call 10aba4 <== 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; 10e2c1: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10e2c3: 52 push %edx 10e2c4: 53 push %ebx 10e2c5: 8d 45 e4 lea -0x1c(%ebp),%eax 10e2c8: 50 push %eax 10e2c9: ff 77 50 pushl 0x50(%edi) 10e2cc: e8 9b 0f 00 00 call 10f26c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10e2d1: 8b 57 50 mov 0x50(%edi),%edx 10e2d4: 03 55 e4 add -0x1c(%ebp),%edx 10e2d7: 31 c0 xor %eax,%eax 10e2d9: 83 c9 ff or $0xffffffff,%ecx 10e2dc: 89 d7 mov %edx,%edi 10e2de: f2 ae repnz scas %es:(%edi),%al 10e2e0: f7 d1 not %ecx 10e2e2: 49 dec %ecx 10e2e3: 53 push %ebx 10e2e4: 56 push %esi 10e2e5: 51 push %ecx 10e2e6: 52 push %edx 10e2e7: e8 33 00 00 00 call 10e31f 10e2ec: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10e2ee: 83 c4 14 add $0x14,%esp 10e2f1: 53 push %ebx 10e2f2: e8 91 fe ff ff call 10e188 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e2f7: 59 pop %ecx 10e2f8: 58 pop %eax 10e2f9: 56 push %esi 10e2fa: 53 push %ebx 10e2fb: e8 d0 fe ff ff call 10e1d0 10e300: 83 c4 10 add $0x10,%esp 10e303: 85 c0 test %eax,%eax 10e305: 75 0e jne 10e315 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e307: e8 14 47 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e30c: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e312: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED return result; } 10e315: 89 f8 mov %edi,%eax 10e317: 8d 65 f4 lea -0xc(%ebp),%esp 10e31a: 5b pop %ebx 10e31b: 5e pop %esi 10e31c: 5f pop %edi 10e31d: c9 leave 10e31e: c3 ret =============================================================================== 00111bdc : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 111bdc: 55 push %ebp 111bdd: 89 e5 mov %esp,%ebp 111bdf: 53 push %ebx 111be0: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 111be3: 8b 45 08 mov 0x8(%ebp),%eax 111be6: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 111be8: e8 13 d2 ff ff call 10ee00 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 111bed: 66 85 c0 test %ax,%ax 111bf0: 74 16 je 111c08 <== ALWAYS TAKEN 111bf2: 66 3b 43 3c cmp 0x3c(%ebx),%ax <== NOT EXECUTED 111bf6: 74 10 je 111c08 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 111bf8: e8 23 0e 00 00 call 112a20 <__errno> <== NOT EXECUTED 111bfd: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 111c03: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111c06: eb 2e jmp 111c36 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 111c08: 8b 45 0c mov 0xc(%ebp),%eax 111c0b: 25 ff 0f 00 00 and $0xfff,%eax 111c10: 8b 53 30 mov 0x30(%ebx),%edx 111c13: 81 e2 00 f0 ff ff and $0xfffff000,%edx 111c19: 09 d0 or %edx,%eax 111c1b: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 111c1e: 50 push %eax 111c1f: 50 push %eax 111c20: 6a 00 push $0x0 111c22: 8d 45 f0 lea -0x10(%ebp),%eax 111c25: 50 push %eax 111c26: e8 e9 5a ff ff call 107714 111c2b: 8b 45 f0 mov -0x10(%ebp),%eax 111c2e: 89 43 48 mov %eax,0x48(%ebx) 111c31: 31 c0 xor %eax,%eax return 0; 111c33: 83 c4 10 add $0x10,%esp } 111c36: 8b 5d fc mov -0x4(%ebp),%ebx 111c39: c9 leave 111c3a: c3 ret =============================================================================== 0010e905 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10e905: 55 push %ebp <== NOT EXECUTED 10e906: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e908: 57 push %edi <== NOT EXECUTED 10e909: 56 push %esi <== NOT EXECUTED 10e90a: 53 push %ebx <== NOT EXECUTED 10e90b: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10e90e: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e911: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10e914: 57 push %edi <== NOT EXECUTED 10e915: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10e918: 50 push %eax <== NOT EXECUTED 10e919: e8 25 f2 ff ff call 10db43 <== NOT EXECUTED 10e91e: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10e920: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e923: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e926: 75 2c jne 10e954 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10e928: 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) 10e92f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e932: 56 push %esi <== NOT EXECUTED 10e933: e8 2a 05 00 00 call 10ee62 <== NOT EXECUTED 10e938: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e93b: 85 c0 test %eax,%eax <== NOT EXECUTED 10e93d: 75 23 jne 10e962 <== NOT EXECUTED 10e93f: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10e944: 75 1c jne 10e962 <== NOT EXECUTED free(jnode); 10e946: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e949: 56 push %esi <== NOT EXECUTED 10e94a: e8 4d 8d ff ff call 10769c <== NOT EXECUTED 10e94f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e952: eb 0e jmp 10e962 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e954: 7d 0c jge 10e962 <== NOT EXECUTED 10e956: e8 c5 40 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e95b: f7 db neg %ebx <== NOT EXECUTED 10e95d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e95f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e962: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e964: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e967: 5b pop %ebx <== NOT EXECUTED 10e968: 5e pop %esi <== NOT EXECUTED 10e969: 5f pop %edi <== NOT EXECUTED 10e96a: c9 leave <== NOT EXECUTED 10e96b: c3 ret <== NOT EXECUTED =============================================================================== 0010e7f8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10e7f8: 55 push %ebp <== NOT EXECUTED 10e7f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e7fb: 53 push %ebx <== NOT EXECUTED 10e7fc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10e7ff: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10e802: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10e805: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10e808: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10e80e: 75 1c jne 10e82c <== NOT EXECUTED if (buffer == NULL) 10e810: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10e815: 85 d2 test %edx,%edx <== NOT EXECUTED 10e817: 74 2a je 10e843 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10e819: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10e81c: 74 06 je 10e824 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10e81e: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10e822: eb 04 jmp 10e828 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10e824: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10e828: 31 db xor %ebx,%ebx <== NOT EXECUTED 10e82a: eb 23 jmp 10e84f <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10e82c: 50 push %eax <== NOT EXECUTED 10e82d: 52 push %edx <== NOT EXECUTED 10e82e: 51 push %ecx <== NOT EXECUTED 10e82f: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e832: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e835: e8 6d ef ff ff call 10d7a7 <== NOT EXECUTED 10e83a: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e83c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e83f: 85 c0 test %eax,%eax <== NOT EXECUTED 10e841: 79 0c jns 10e84f <== NOT EXECUTED 10e843: e8 d8 41 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e848: f7 db neg %ebx <== NOT EXECUTED 10e84a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e84c: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e84f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e851: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e854: c9 leave <== NOT EXECUTED 10e855: c3 ret <== NOT EXECUTED =============================================================================== 0010e7bc : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10e7bc: 55 push %ebp <== NOT EXECUTED 10e7bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e7bf: 53 push %ebx <== NOT EXECUTED 10e7c0: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e7c3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10e7c6: 50 push %eax <== NOT EXECUTED 10e7c7: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10e7ca: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e7cd: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e7d0: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e7d3: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e7d6: e8 75 ef ff ff call 10d750 <== NOT EXECUTED 10e7db: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10e7dd: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e7de: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10e7e1: 85 d2 test %edx,%edx <== NOT EXECUTED 10e7e3: 79 0e jns 10e7f3 <== NOT EXECUTED 10e7e5: e8 36 42 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e7ea: f7 db neg %ebx <== NOT EXECUTED 10e7ec: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e7ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e7f1: 89 c2 mov %eax,%edx <== NOT EXECUTED } 10e7f3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e7f6: c9 leave <== NOT EXECUTED 10e7f7: c3 ret <== NOT EXECUTED =============================================================================== 0010e96c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10e96c: 55 push %ebp 10e96d: 89 e5 mov %esp,%ebp 10e96f: 53 push %ebx 10e970: 83 ec 0c sub $0xc,%esp 10e973: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10e976: 50 push %eax 10e977: 8b 40 38 mov 0x38(%eax),%eax 10e97a: 83 c0 50 add $0x50,%eax 10e97d: 50 push %eax 10e97e: e8 90 f2 ff ff call 10dc13 10e983: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10e985: 83 c4 10 add $0x10,%esp 10e988: 85 c0 test %eax,%eax 10e98a: 79 0c jns 10e998 <== NEVER TAKEN 10e98c: e8 8f 40 00 00 call 112a20 <__errno> 10e991: f7 db neg %ebx 10e993: 89 18 mov %ebx,(%eax) 10e995: 83 cb ff or $0xffffffff,%ebx } 10e998: 89 d8 mov %ebx,%eax 10e99a: 8b 5d fc mov -0x4(%ebp),%ebx 10e99d: c9 leave 10e99e: c3 ret =============================================================================== 0010e8af : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10e8af: 55 push %ebp <== NOT EXECUTED 10e8b0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e8b2: 56 push %esi <== NOT EXECUTED 10e8b3: 53 push %ebx <== NOT EXECUTED 10e8b4: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e8b7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e8ba: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10e8bd: 50 push %eax <== NOT EXECUTED 10e8be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e8c1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e8c4: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e8c7: e8 31 ef ff ff call 10d7fd <== NOT EXECUTED 10e8cc: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10e8ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e8d1: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e8d4: 7e 18 jle 10e8ee <== NOT EXECUTED IMFS_update_atime(jnode); 10e8d6: 52 push %edx <== NOT EXECUTED 10e8d7: 52 push %edx <== NOT EXECUTED 10e8d8: 6a 00 push $0x0 <== NOT EXECUTED 10e8da: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e8dd: 50 push %eax <== NOT EXECUTED 10e8de: e8 31 8e ff ff call 107714 <== NOT EXECUTED 10e8e3: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e8e6: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10e8e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e8ec: eb 0e jmp 10e8fc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e8ee: 74 0c je 10e8fc <== NOT EXECUTED 10e8f0: e8 2b 41 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e8f5: f7 db neg %ebx <== NOT EXECUTED 10e8f7: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e8f9: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e8fc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e8fe: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e901: 5b pop %ebx <== NOT EXECUTED 10e902: 5e pop %esi <== NOT EXECUTED 10e903: c9 leave <== NOT EXECUTED 10e904: c3 ret <== NOT EXECUTED =============================================================================== 0010e856 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10e856: 55 push %ebp <== NOT EXECUTED 10e857: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e859: 56 push %esi <== NOT EXECUTED 10e85a: 53 push %ebx <== NOT EXECUTED 10e85b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e85e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e861: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10e864: 50 push %eax <== NOT EXECUTED 10e865: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e868: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e86b: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e86e: e8 ec f0 ff ff call 10d95f <== NOT EXECUTED 10e873: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10e875: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e878: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e87b: 7e 1b jle 10e898 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10e87d: 50 push %eax <== NOT EXECUTED 10e87e: 50 push %eax <== NOT EXECUTED 10e87f: 6a 00 push $0x0 <== NOT EXECUTED 10e881: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e884: 50 push %eax <== NOT EXECUTED 10e885: e8 8a 8e ff ff call 107714 <== NOT EXECUTED 10e88a: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e88d: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10e890: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10e893: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e896: eb 0e jmp 10e8a6 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e898: 74 0c je 10e8a6 <== NOT EXECUTED 10e89a: e8 81 41 00 00 call 112a20 <__errno> <== NOT EXECUTED 10e89f: f7 db neg %ebx <== NOT EXECUTED 10e8a1: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e8a3: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e8a6: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e8a8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e8ab: 5b pop %ebx <== NOT EXECUTED 10e8ac: 5e pop %esi <== NOT EXECUTED 10e8ad: c9 leave <== NOT EXECUTED 10e8ae: c3 ret <== NOT EXECUTED =============================================================================== 0010ea2c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10ea2c: 55 push %ebp 10ea2d: 89 e5 mov %esp,%ebp 10ea2f: 57 push %edi 10ea30: 56 push %esi 10ea31: 53 push %ebx 10ea32: 83 ec 0c sub $0xc,%esp 10ea35: 8b 5d 08 mov 0x8(%ebp),%ebx 10ea38: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10ea3b: 85 db test %ebx,%ebx 10ea3d: 75 16 jne 10ea55 <== ALWAYS TAKEN 10ea3f: 68 2c 05 12 00 push $0x12052c <== NOT EXECUTED 10ea44: 68 90 05 12 00 push $0x120590 <== NOT EXECUTED 10ea49: 6a 2a push $0x2a <== NOT EXECUTED 10ea4b: 68 36 05 12 00 push $0x120536 <== NOT EXECUTED 10ea50: e8 4b 89 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( !name ) 10ea55: 85 ff test %edi,%edi 10ea57: 74 52 je 10eaab <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10ea59: 56 push %esi 10ea5a: 56 push %esi 10ea5b: 68 88 05 12 00 push $0x120588 10ea60: 57 push %edi 10ea61: e8 d6 4a 00 00 call 11353c 10ea66: 83 c4 10 add $0x10,%esp 10ea69: 85 c0 test %eax,%eax 10ea6b: 74 40 je 10eaad <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10ea6d: 51 push %ecx 10ea6e: 51 push %ecx 10ea6f: 68 8a 05 12 00 push $0x12058a 10ea74: 57 push %edi 10ea75: e8 c2 4a 00 00 call 11353c 10ea7a: 83 c4 10 add $0x10,%esp 10ea7d: 85 c0 test %eax,%eax 10ea7f: 75 05 jne 10ea86 <== ALWAYS TAKEN return directory->Parent; 10ea81: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10ea84: eb 27 jmp 10eaad <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10ea86: 8b 73 50 mov 0x50(%ebx),%esi 10ea89: 83 c3 54 add $0x54,%ebx 10ea8c: eb 19 jmp 10eaa7 !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 ) ) 10ea8e: 8d 46 0c lea 0xc(%esi),%eax 10ea91: 52 push %edx 10ea92: 52 push %edx 10ea93: 50 push %eax 10ea94: 57 push %edi 10ea95: e8 a2 4a 00 00 call 11353c 10ea9a: 83 c4 10 add $0x10,%esp 10ea9d: 85 c0 test %eax,%eax 10ea9f: 75 04 jne 10eaa5 10eaa1: 89 f3 mov %esi,%ebx 10eaa3: eb 08 jmp 10eaad 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 ) { 10eaa5: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10eaa7: 39 de cmp %ebx,%esi 10eaa9: 75 e3 jne 10ea8e 10eaab: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10eaad: 89 d8 mov %ebx,%eax 10eaaf: 8d 65 f4 lea -0xc(%ebp),%esp 10eab2: 5b pop %ebx 10eab3: 5e pop %esi 10eab4: 5f pop %edi 10eab5: c9 leave 10eab6: c3 ret =============================================================================== 0010e9a8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10e9a8: 55 push %ebp 10e9a9: 89 e5 mov %esp,%ebp 10e9ab: 57 push %edi 10e9ac: 56 push %esi 10e9ad: 53 push %ebx 10e9ae: 83 ec 2c sub $0x2c,%esp 10e9b1: 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; 10e9b4: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10e9b7: 8d 7d d4 lea -0x2c(%ebp),%edi 10e9ba: 8d 70 1c lea 0x1c(%eax),%esi 10e9bd: b9 05 00 00 00 mov $0x5,%ecx 10e9c2: 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; 10e9c4: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 10e9cb: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 10e9ce: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 10e9d1: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10e9d4: 83 ec 0c sub $0xc,%esp 10e9d7: 56 push %esi 10e9d8: e8 ab f7 ff ff call 10e188 if ( jnode->type != IMFS_DIRECTORY ) { 10e9dd: 83 c4 10 add $0x10,%esp 10e9e0: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e9e4: 75 08 jne 10e9ee */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e9e6: 8d 43 54 lea 0x54(%ebx),%eax 10e9e9: 39 43 50 cmp %eax,0x50(%ebx) 10e9ec: 75 13 jne 10ea01 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10e9ee: 50 push %eax 10e9ef: 50 push %eax 10e9f0: 56 push %esi 10e9f1: 6a 00 push $0x0 10e9f3: e8 98 87 ff ff call 107190 if (result != 0) 10e9f8: 83 c4 10 add $0x10,%esp 10e9fb: 85 c0 test %eax,%eax 10e9fd: 75 1d jne 10ea1c <== NEVER TAKEN 10e9ff: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 10ea01: 85 db test %ebx,%ebx 10ea03: 74 1c je 10ea21 if ( jnode->type == IMFS_DIRECTORY ) { 10ea05: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10ea09: 75 c3 jne 10e9ce <== NEVER TAKEN 10ea0b: 8d 43 54 lea 0x54(%ebx),%eax 10ea0e: 39 43 50 cmp %eax,0x50(%ebx) 10ea11: 74 bb je 10e9ce if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 10ea13: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10ea16: 85 db test %ebx,%ebx 10ea18: 75 b4 jne 10e9ce <== ALWAYS TAKEN 10ea1a: eb 05 jmp 10ea21 <== NOT EXECUTED 10ea1c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ea1f: eb 02 jmp 10ea23 <== NOT EXECUTED 10ea21: 31 c0 xor %eax,%eax return 0; } 10ea23: 8d 65 f4 lea -0xc(%ebp),%esp 10ea26: 5b pop %ebx 10ea27: 5e pop %esi 10ea28: 5f pop %edi 10ea29: c9 leave 10ea2a: c3 ret =============================================================================== 0010eab8 : const char *path, int pathlen, char *token, int *token_len ) { 10eab8: 55 push %ebp 10eab9: 89 e5 mov %esp,%ebp 10eabb: 57 push %edi 10eabc: 56 push %esi 10eabd: 53 push %ebx 10eabe: 83 ec 1c sub $0x1c,%esp 10eac1: 8b 7d 08 mov 0x8(%ebp),%edi 10eac4: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10eac7: 8a 17 mov (%edi),%dl 10eac9: 31 db xor %ebx,%ebx while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10eacb: eb 16 jmp 10eae3 token[i] = c; 10eacd: 88 14 1e mov %dl,(%esi,%ebx,1) if ( i == IMFS_NAME_MAX ) 10ead0: 83 fb 20 cmp $0x20,%ebx 10ead3: 75 0a jne 10eadf 10ead5: bf 04 00 00 00 mov $0x4,%edi 10eada: e9 8c 00 00 00 jmp 10eb6b return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10eadf: 43 inc %ebx 10eae0: 8a 14 1f mov (%edi,%ebx,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10eae3: 83 ec 0c sub $0xc,%esp 10eae6: 0f be c2 movsbl %dl,%eax 10eae9: 50 push %eax 10eaea: 88 55 e4 mov %dl,-0x1c(%ebp) 10eaed: e8 f2 98 ff ff call 1083e4 10eaf2: 83 c4 10 add $0x10,%esp 10eaf5: 85 c0 test %eax,%eax 10eaf7: 8a 55 e4 mov -0x1c(%ebp),%dl 10eafa: 75 05 jne 10eb01 10eafc: 3b 5d 0c cmp 0xc(%ebp),%ebx 10eaff: 7c cc jl 10eacd /* * Copy a seperator into token. */ if ( i == 0 ) { 10eb01: 85 db test %ebx,%ebx 10eb03: 75 19 jne 10eb1e token[i] = c; 10eb05: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10eb07: 84 d2 test %dl,%dl 10eb09: 74 0f je 10eb1a 10eb0b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10eb0f: 74 09 je 10eb1a 10eb11: bf 01 00 00 00 mov $0x1,%edi 10eb16: b3 01 mov $0x1,%bl 10eb18: eb 14 jmp 10eb2e 10eb1a: 31 ff xor %edi,%edi 10eb1c: eb 10 jmp 10eb2e i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10eb1e: bf 03 00 00 00 mov $0x3,%edi 10eb23: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1) 10eb28: 74 04 je 10eb2e <== NEVER TAKEN token[i] = '\0'; 10eb2a: c6 04 1e 00 movb $0x0,(%esi,%ebx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10eb2e: 8b 45 14 mov 0x14(%ebp),%eax 10eb31: 89 18 mov %ebx,(%eax) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10eb33: 83 ff 03 cmp $0x3,%edi 10eb36: 75 33 jne 10eb6b if ( strcmp( token, "..") == 0 ) 10eb38: 52 push %edx 10eb39: 52 push %edx 10eb3a: 68 a7 05 12 00 push $0x1205a7 10eb3f: 56 push %esi 10eb40: e8 f7 49 00 00 call 11353c 10eb45: 83 c4 10 add $0x10,%esp 10eb48: 85 c0 test %eax,%eax 10eb4a: 75 06 jne 10eb52 10eb4c: 66 bf 02 00 mov $0x2,%di 10eb50: eb 19 jmp 10eb6b type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10eb52: 50 push %eax 10eb53: 50 push %eax 10eb54: 68 a8 05 12 00 push $0x1205a8 10eb59: 56 push %esi 10eb5a: e8 dd 49 00 00 call 11353c 10eb5f: 83 c4 10 add $0x10,%esp 10eb62: 85 c0 test %eax,%eax 10eb64: 75 05 jne 10eb6b 10eb66: bf 01 00 00 00 mov $0x1,%edi type = IMFS_CURRENT_DIR; } return type; } 10eb6b: 89 f8 mov %edi,%eax 10eb6d: 8d 65 f4 lea -0xc(%ebp),%esp 10eb70: 5b pop %ebx 10eb71: 5e pop %esi 10eb72: 5f pop %edi 10eb73: c9 leave 10eb74: c3 ret =============================================================================== 00106e10 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 106e10: 55 push %ebp 106e11: 89 e5 mov %esp,%ebp 106e13: 57 push %edi 106e14: 56 push %esi 106e15: 53 push %ebx 106e16: 83 ec 0c sub $0xc,%esp 106e19: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 106e1c: 8b 0d 48 21 12 00 mov 0x122148,%ecx 106e22: 31 d2 xor %edx,%edx 106e24: b8 10 00 00 00 mov $0x10,%eax int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106e29: 39 c8 cmp %ecx,%eax 106e2b: 74 0d je 106e3a 106e2d: d1 e0 shl %eax 106e2f: 42 inc %edx 106e30: 83 fa 06 cmp $0x6,%edx 106e33: 75 f4 jne 106e29 <== ALWAYS TAKEN 106e35: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 106e3a: a3 a8 5d 12 00 mov %eax,0x125da8 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 106e3f: e8 0f 72 00 00 call 10e053 106e44: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106e47: 8b 45 14 mov 0x14(%ebp),%eax 106e4a: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106e4d: 8b 45 0c mov 0xc(%ebp),%eax 106e50: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106e53: 8d 7b 38 lea 0x38(%ebx),%edi 106e56: be cc 03 12 00 mov $0x1203cc,%esi 106e5b: b9 0c 00 00 00 mov $0xc,%ecx 106e60: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106e62: 50 push %eax 106e63: 50 push %eax 106e64: 6a 10 push $0x10 106e66: 6a 01 push $0x1 106e68: e8 4f 06 00 00 call 1074bc if ( !fs_info ) { 106e6d: 83 c4 10 add $0x10,%esp 106e70: 85 c0 test %eax,%eax 106e72: 75 1e jne 106e92 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 106e74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e77: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 106e7a: e8 1d 08 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106e7f: e8 9c bb 00 00 call 112a20 <__errno> <== NOT EXECUTED 106e84: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e90: eb 36 jmp 106ec8 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 106e92: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106e95: 8b 15 ac 5d 12 00 mov 0x125dac,%edx 106e9b: 89 10 mov %edx,(%eax) 106e9d: 42 inc %edx 106e9e: 89 15 ac 5d 12 00 mov %edx,0x125dac fs_info->ino_count = 1; 106ea4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106eab: 8b 55 10 mov 0x10(%ebp),%edx 106eae: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106eb1: 8b 55 14 mov 0x14(%ebp),%edx 106eb4: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106eb7: 8b 43 1c mov 0x1c(%ebx),%eax 106eba: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 106ec1: e8 94 68 00 00 call 10d75a 106ec6: 31 c0 xor %eax,%eax return 0; } 106ec8: 8d 65 f4 lea -0xc(%ebp),%esp 106ecb: 5b pop %ebx 106ecc: 5e pop %esi 106ecd: 5f pop %edi 106ece: c9 leave 106ecf: c3 ret =============================================================================== 00106ed0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106ed0: 55 push %ebp 106ed1: 89 e5 mov %esp,%ebp 106ed3: 57 push %edi 106ed4: 53 push %ebx 106ed5: 83 ec 50 sub $0x50,%esp 106ed8: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 106edb: 8b 45 08 mov 0x8(%ebp),%eax 106ede: 8b 00 mov (%eax),%eax 106ee0: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106ee3: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106ee8: 76 0d jbe 106ef7 rtems_set_errno_and_return_minus_one( EMLINK ); 106eea: e8 31 bb 00 00 call 112a20 <__errno> 106eef: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106ef5: eb 43 jmp 106f3a /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 106ef7: 31 c0 xor %eax,%eax 106ef9: 83 c9 ff or $0xffffffff,%ecx 106efc: 89 d7 mov %edx,%edi 106efe: f2 ae repnz scas %es:(%edi),%al 106f00: f7 d1 not %ecx 106f02: 49 dec %ecx 106f03: 8d 45 f4 lea -0xc(%ebp),%eax 106f06: 50 push %eax 106f07: 8d 5d b7 lea -0x49(%ebp),%ebx 106f0a: 53 push %ebx 106f0b: 51 push %ecx 106f0c: 52 push %edx 106f0d: e8 a6 7b 00 00 call 10eab8 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 106f12: 8d 45 d8 lea -0x28(%ebp),%eax 106f15: 89 04 24 mov %eax,(%esp) 106f18: 68 ff a1 00 00 push $0xa1ff 106f1d: 53 push %ebx 106f1e: 6a 03 push $0x3 106f20: ff 75 0c pushl 0xc(%ebp) 106f23: e8 5e 71 00 00 call 10e086 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106f28: 83 c4 20 add $0x20,%esp 106f2b: 85 c0 test %eax,%eax 106f2d: 75 10 jne 106f3f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106f2f: e8 ec ba 00 00 call 112a20 <__errno> <== NOT EXECUTED 106f34: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106f3a: 83 c8 ff or $0xffffffff,%eax 106f3d: eb 22 jmp 106f61 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 106f3f: 8b 45 d8 mov -0x28(%ebp),%eax 106f42: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106f46: 50 push %eax 106f47: 50 push %eax 106f48: 6a 00 push $0x0 106f4a: 8d 45 ec lea -0x14(%ebp),%eax 106f4d: 50 push %eax 106f4e: e8 c1 07 00 00 call 107714 106f53: 8b 55 ec mov -0x14(%ebp),%edx 106f56: 8b 45 d8 mov -0x28(%ebp),%eax 106f59: 89 50 48 mov %edx,0x48(%eax) 106f5c: 31 c0 xor %eax,%eax return 0; 106f5e: 83 c4 10 add $0x10,%esp } 106f61: 8d 65 f8 lea -0x8(%ebp),%esp 106f64: 5b pop %ebx 106f65: 5f pop %edi 106f66: c9 leave 106f67: c3 ret =============================================================================== 00110e60 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 110e60: 55 push %ebp 110e61: 89 e5 mov %esp,%ebp 110e63: 53 push %ebx 110e64: 83 ec 04 sub $0x4,%esp 110e67: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 110e6a: 85 c0 test %eax,%eax 110e6c: 75 11 jne 110e7f <== ALWAYS TAKEN 110e6e: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 110e73: 68 a0 0a 12 00 push $0x120aa0 <== NOT EXECUTED 110e78: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 110e7d: eb 15 jmp 110e94 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110e7f: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 110e83: 74 19 je 110e9e <== ALWAYS TAKEN 110e85: 68 4c 09 12 00 push $0x12094c <== NOT EXECUTED 110e8a: 68 a0 0a 12 00 push $0x120aa0 <== NOT EXECUTED 110e8f: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 110e94: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110e99: e8 02 65 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 110e9e: 52 push %edx 110e9f: 6a 01 push $0x1 110ea1: ff 75 0c pushl 0xc(%ebp) 110ea4: 50 push %eax 110ea5: e8 90 fb ff ff call 110a3a 110eaa: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 110eac: 83 c4 10 add $0x10,%esp 110eaf: 31 c0 xor %eax,%eax 110eb1: 83 3b 00 cmpl $0x0,(%ebx) 110eb4: 75 14 jne 110eca #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 110eb6: e8 5d fb ff ff call 110a18 110ebb: 89 c2 mov %eax,%edx if ( !memory ) 110ebd: b8 01 00 00 00 mov $0x1,%eax 110ec2: 85 d2 test %edx,%edx 110ec4: 74 04 je 110eca <== NEVER TAKEN return 1; *block_entry_ptr = memory; 110ec6: 89 13 mov %edx,(%ebx) 110ec8: 30 c0 xor %al,%al return 0; } 110eca: 8b 5d fc mov -0x4(%ebp),%ebx 110ecd: c9 leave 110ece: c3 ret =============================================================================== 00110ecf : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 110ecf: 55 push %ebp 110ed0: 89 e5 mov %esp,%ebp 110ed2: 57 push %edi 110ed3: 56 push %esi 110ed4: 53 push %ebx 110ed5: 83 ec 2c sub $0x2c,%esp 110ed8: 8b 5d 08 mov 0x8(%ebp),%ebx 110edb: 8b 75 0c mov 0xc(%ebp),%esi 110ede: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 110ee1: 85 db test %ebx,%ebx 110ee3: 75 11 jne 110ef6 <== ALWAYS TAKEN 110ee5: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 110eea: 68 b8 0a 12 00 push $0x120ab8 <== NOT EXECUTED 110eef: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 110ef4: eb 15 jmp 110f0b <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110ef6: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110efa: 74 19 je 110f15 <== ALWAYS TAKEN 110efc: 68 4c 09 12 00 push $0x12094c <== NOT EXECUTED 110f01: 68 b8 0a 12 00 push $0x120ab8 <== NOT EXECUTED 110f06: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 110f0b: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110f10: e8 8b 64 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 110f15: a1 a8 5d 12 00 mov 0x125da8,%eax 110f1a: 89 c1 mov %eax,%ecx 110f1c: c1 e9 02 shr $0x2,%ecx 110f1f: 8d 51 01 lea 0x1(%ecx),%edx 110f22: 0f af d1 imul %ecx,%edx 110f25: 42 inc %edx 110f26: 0f af d1 imul %ecx,%edx 110f29: 4a dec %edx 110f2a: 0f af d0 imul %eax,%edx 110f2d: 83 ff 00 cmp $0x0,%edi 110f30: 7c 16 jl 110f48 <== NEVER TAKEN 110f32: 7f 04 jg 110f38 <== NEVER TAKEN 110f34: 39 d6 cmp %edx,%esi 110f36: 72 10 jb 110f48 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 110f38: e8 e3 1a 00 00 call 112a20 <__errno> <== NOT EXECUTED 110f3d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110f43: e9 92 00 00 00 jmp 110fda <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 110f48: 8b 53 50 mov 0x50(%ebx),%edx 110f4b: 8b 4b 54 mov 0x54(%ebx),%ecx 110f4e: 89 55 e0 mov %edx,-0x20(%ebp) 110f51: 89 4d e4 mov %ecx,-0x1c(%ebp) 110f54: 39 cf cmp %ecx,%edi 110f56: 7f 0e jg 110f66 <== NEVER TAKEN 110f58: 0f 8c 8d 00 00 00 jl 110feb <== NEVER TAKEN 110f5e: 39 d6 cmp %edx,%esi 110f60: 0f 86 85 00 00 00 jbe 110feb /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 110f66: 89 45 d8 mov %eax,-0x28(%ebp) 110f69: 89 c1 mov %eax,%ecx 110f6b: c1 f9 1f sar $0x1f,%ecx 110f6e: 89 4d dc mov %ecx,-0x24(%ebp) 110f71: ff 75 dc pushl -0x24(%ebp) 110f74: ff 75 d8 pushl -0x28(%ebp) 110f77: 57 push %edi 110f78: 56 push %esi 110f79: e8 3e cb 00 00 call 11dabc <__divdi3> 110f7e: 83 c4 10 add $0x10,%esp 110f81: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 110f84: ff 75 dc pushl -0x24(%ebp) 110f87: ff 75 d8 pushl -0x28(%ebp) 110f8a: ff 75 e4 pushl -0x1c(%ebp) 110f8d: ff 75 e0 pushl -0x20(%ebp) 110f90: e8 27 cb 00 00 call 11dabc <__divdi3> 110f95: 83 c4 10 add $0x10,%esp 110f98: 89 45 e0 mov %eax,-0x20(%ebp) 110f9b: 89 c2 mov %eax,%edx /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110f9d: eb 41 jmp 110fe0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 110f9f: 50 push %eax 110fa0: 50 push %eax 110fa1: 52 push %edx 110fa2: 53 push %ebx 110fa3: 89 55 d0 mov %edx,-0x30(%ebp) 110fa6: e8 b5 fe ff ff call 110e60 110fab: 83 c4 10 add $0x10,%esp 110fae: 85 c0 test %eax,%eax 110fb0: 8b 55 d0 mov -0x30(%ebp),%edx 110fb3: 74 2a je 110fdf <== ALWAYS TAKEN 110fb5: eb 13 jmp 110fca <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 110fb7: 51 push %ecx <== NOT EXECUTED 110fb8: 51 push %ecx <== NOT EXECUTED 110fb9: 52 push %edx <== NOT EXECUTED 110fba: 53 push %ebx <== NOT EXECUTED 110fbb: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 110fbe: e8 5c fc ff ff call 110c1f <== 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-- ) { 110fc3: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 110fc6: 4a dec %edx <== NOT EXECUTED 110fc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110fca: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 110fcd: 73 e8 jae 110fb7 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 110fcf: e8 4c 1a 00 00 call 112a20 <__errno> <== NOT EXECUTED 110fd4: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 110fda: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110fdd: eb 0e jmp 110fed <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110fdf: 42 inc %edx 110fe0: 3b 55 d4 cmp -0x2c(%ebp),%edx 110fe3: 76 ba jbe 110f9f /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 110fe5: 89 73 50 mov %esi,0x50(%ebx) 110fe8: 89 7b 54 mov %edi,0x54(%ebx) 110feb: 31 c0 xor %eax,%eax return 0; } 110fed: 8d 65 f4 lea -0xc(%ebp),%esp 110ff0: 5b pop %ebx 110ff1: 5e pop %esi 110ff2: 5f pop %edi 110ff3: c9 leave 110ff4: c3 ret =============================================================================== 00110a3a : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 110a3a: 55 push %ebp 110a3b: 89 e5 mov %esp,%ebp 110a3d: 57 push %edi 110a3e: 56 push %esi 110a3f: 53 push %ebx 110a40: 83 ec 1c sub $0x1c,%esp 110a43: 8b 5d 08 mov 0x8(%ebp),%ebx 110a46: 8b 7d 0c mov 0xc(%ebp),%edi 110a49: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 110a4c: 85 db test %ebx,%ebx 110a4e: 75 11 jne 110a61 <== ALWAYS TAKEN 110a50: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 110a55: 68 08 0a 12 00 push $0x120a08 <== NOT EXECUTED 110a5a: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 110a5f: eb 15 jmp 110a76 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 110a61: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110a65: 74 19 je 110a80 <== ALWAYS TAKEN 110a67: 68 4c 09 12 00 push $0x12094c <== NOT EXECUTED 110a6c: 68 08 0a 12 00 push $0x120a08 <== NOT EXECUTED 110a71: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 110a76: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110a7b: e8 20 69 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 110a80: 8b 0d a8 5d 12 00 mov 0x125da8,%ecx 110a86: c1 e9 02 shr $0x2,%ecx 110a89: 8d 41 ff lea -0x1(%ecx),%eax 110a8c: 39 c7 cmp %eax,%edi 110a8e: 77 32 ja 110ac2 <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 110a90: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 110a93: 85 f6 test %esi,%esi 110a95: 74 23 je 110aba if ( !p ) { 110a97: 85 d2 test %edx,%edx 110a99: 75 10 jne 110aab p = memfile_alloc_block(); 110a9b: e8 78 ff ff ff call 110a18 if ( !p ) 110aa0: 85 c0 test %eax,%eax 110aa2: 0f 84 03 01 00 00 je 110bab <== NEVER TAKEN return 0; info->indirect = p; 110aa8: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 110aab: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 110ab2: 03 43 58 add 0x58(%ebx),%eax 110ab5: e9 f3 00 00 00 jmp 110bad } if ( !p ) return 0; return &info->indirect[ my_block ]; 110aba: 8d 04 ba lea (%edx,%edi,4),%eax 110abd: e9 e5 00 00 00 jmp 110ba7 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 110ac2: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 110ac5: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 110ac8: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 110acb: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110acd: 77 58 ja 110b27 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 110acf: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110ad1: 89 f8 mov %edi,%eax <== NOT EXECUTED 110ad3: 31 d2 xor %edx,%edx <== NOT EXECUTED 110ad5: f7 f1 div %ecx <== NOT EXECUTED 110ad7: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 110ada: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 110adc: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110adf: 85 f6 test %esi,%esi <== NOT EXECUTED 110ae1: 74 37 je 110b1a <== NOT EXECUTED if ( !p ) { 110ae3: 85 c0 test %eax,%eax <== NOT EXECUTED 110ae5: 75 10 jne 110af7 <== NOT EXECUTED p = memfile_alloc_block(); 110ae7: e8 2c ff ff ff call 110a18 <== NOT EXECUTED if ( !p ) 110aec: 85 c0 test %eax,%eax <== NOT EXECUTED 110aee: 0f 84 b7 00 00 00 je 110bab <== NOT EXECUTED return 0; info->doubly_indirect = p; 110af4: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 110af7: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 110afa: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 110afc: 85 c0 test %eax,%eax <== NOT EXECUTED 110afe: 75 0f jne 110b0f <== NOT EXECUTED p1 = memfile_alloc_block(); 110b00: e8 13 ff ff ff call 110a18 <== NOT EXECUTED if ( !p1 ) 110b05: 85 c0 test %eax,%eax <== NOT EXECUTED 110b07: 0f 84 9e 00 00 00 je 110bab <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 110b0d: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 110b0f: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 110b12: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 110b15: e9 93 00 00 00 jmp 110bad <== NOT EXECUTED } if ( !p ) 110b1a: 85 c0 test %eax,%eax <== NOT EXECUTED 110b1c: 0f 84 89 00 00 00 je 110bab <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 110b22: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED 110b25: eb 7a jmp 110ba1 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 110b27: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 110b2a: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 110b2d: 4a dec %edx <== NOT EXECUTED 110b2e: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110b30: 77 79 ja 110bab <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 110b32: 29 c7 sub %eax,%edi <== NOT EXECUTED 110b34: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110b36: 31 d2 xor %edx,%edx <== NOT EXECUTED 110b38: f7 f1 div %ecx <== NOT EXECUTED 110b3a: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 110b3d: 31 d2 xor %edx,%edx <== NOT EXECUTED 110b3f: f7 f1 div %ecx <== NOT EXECUTED 110b41: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 110b44: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 110b46: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110b49: 85 f6 test %esi,%esi <== NOT EXECUTED 110b4b: 74 43 je 110b90 <== NOT EXECUTED if ( !p ) { 110b4d: 85 c0 test %eax,%eax <== NOT EXECUTED 110b4f: 75 0c jne 110b5d <== NOT EXECUTED p = memfile_alloc_block(); 110b51: e8 c2 fe ff ff call 110a18 <== NOT EXECUTED if ( !p ) 110b56: 85 c0 test %eax,%eax <== NOT EXECUTED 110b58: 74 51 je 110bab <== NOT EXECUTED return 0; info->triply_indirect = p; 110b5a: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 110b5d: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 110b60: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 110b62: 85 c0 test %eax,%eax <== NOT EXECUTED 110b64: 75 0b jne 110b71 <== NOT EXECUTED p1 = memfile_alloc_block(); 110b66: e8 ad fe ff ff call 110a18 <== NOT EXECUTED if ( !p1 ) 110b6b: 85 c0 test %eax,%eax <== NOT EXECUTED 110b6d: 74 3c je 110bab <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 110b6f: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 110b71: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110b74: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 110b77: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 110b79: 85 c0 test %eax,%eax <== NOT EXECUTED 110b7b: 75 0b jne 110b88 <== NOT EXECUTED p2 = memfile_alloc_block(); 110b7d: e8 96 fe ff ff call 110a18 <== NOT EXECUTED if ( !p2 ) 110b82: 85 c0 test %eax,%eax <== NOT EXECUTED 110b84: 74 25 je 110bab <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 110b86: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 110b88: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 110b8b: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 110b8e: eb 1d jmp 110bad <== NOT EXECUTED } if ( !p ) 110b90: 85 c0 test %eax,%eax <== NOT EXECUTED 110b92: 74 17 je 110bab <== 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 ]; 110b94: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p1 ) 110b97: 85 c0 test %eax,%eax <== NOT EXECUTED 110b99: 74 10 je 110bab <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 110b9b: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110b9e: 8b 14 88 mov (%eax,%ecx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 110ba1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 110ba4: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 110ba7: 85 d2 test %edx,%edx 110ba9: 75 02 jne 110bad <== ALWAYS TAKEN return 0; return (block_p *)&p2[ singly ]; 110bab: 31 c0 xor %eax,%eax /* * This means the requested block number is out of range. */ return 0; } 110bad: 8d 65 f4 lea -0xc(%ebp),%esp 110bb0: 5b pop %ebx 110bb1: 5e pop %esi 110bb2: 5f pop %edi 110bb3: c9 leave 110bb4: c3 ret =============================================================================== 00111366 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 111366: 55 push %ebp 111367: 89 e5 mov %esp,%ebp 111369: 57 push %edi 11136a: 56 push %esi 11136b: 53 push %ebx 11136c: 83 ec 3c sub $0x3c,%esp 11136f: 8b 75 0c mov 0xc(%ebp),%esi 111372: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 111375: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 111379: 75 11 jne 11138c <== ALWAYS TAKEN 11137b: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 111380: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 111385: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 11138a: eb 1d jmp 1113a9 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 11138c: 8b 55 08 mov 0x8(%ebp),%edx 11138f: 8b 42 4c mov 0x4c(%edx),%eax 111392: 8d 48 fb lea -0x5(%eax),%ecx 111395: 83 f9 01 cmp $0x1,%ecx 111398: 76 19 jbe 1113b3 <== ALWAYS TAKEN 11139a: 68 b6 09 12 00 push $0x1209b6 <== NOT EXECUTED 11139f: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 1113a4: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1113a9: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 1113ae: e8 ed 5f ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1113b3: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1113b7: 75 11 jne 1113ca <== ALWAYS TAKEN 1113b9: 68 01 0a 12 00 push $0x120a01 <== NOT EXECUTED 1113be: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 1113c3: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1113c8: eb df jmp 1113a9 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 1113ca: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 1113ce: 75 13 jne 1113e3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1113d0: e8 4b 16 00 00 call 112a20 <__errno> <== NOT EXECUTED 1113d5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1113db: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 1113de: e9 d0 01 00 00 jmp 1115b3 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 1113e3: 83 f8 06 cmp $0x6,%eax 1113e6: 75 64 jne 11144c <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 1113e8: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1113eb: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED 1113ee: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1113f1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1113f4: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED 1113f7: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED 1113fa: 89 c8 mov %ecx,%eax <== NOT EXECUTED 1113fc: 89 da mov %ebx,%edx <== NOT EXECUTED 1113fe: 29 f0 sub %esi,%eax <== NOT EXECUTED 111400: 19 fa sbb %edi,%edx <== NOT EXECUTED 111402: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111405: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 111408: 31 c0 xor %eax,%eax <== NOT EXECUTED 11140a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 11140c: 7f 0f jg 11141d <== NOT EXECUTED 11140e: 7c 08 jl 111418 <== NOT EXECUTED 111410: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 111413: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED 111416: 77 05 ja 11141d <== NOT EXECUTED 111418: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 11141b: eb 04 jmp 111421 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 11141d: 89 ca mov %ecx,%edx <== NOT EXECUTED 11141f: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 111421: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED 111424: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 111427: 89 d1 mov %edx,%ecx <== NOT EXECUTED 111429: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 11142b: 51 push %ecx <== NOT EXECUTED 11142c: 51 push %ecx <== NOT EXECUTED 11142d: 6a 00 push $0x0 <== NOT EXECUTED 11142f: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 111432: 50 push %eax <== NOT EXECUTED 111433: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 111436: e8 d9 62 ff ff call 107714 <== NOT EXECUTED 11143b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 11143e: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 111441: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED return my_length; 111444: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 111447: e9 64 01 00 00 jmp 1115b0 <== 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; 11144c: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 11144e: 8b 55 08 mov 0x8(%ebp),%edx 111451: 8b 5a 50 mov 0x50(%edx),%ebx 111454: 8b 4d 18 mov 0x18(%ebp),%ecx 111457: 01 f1 add %esi,%ecx 111459: 89 4d d0 mov %ecx,-0x30(%ebp) 11145c: 31 c9 xor %ecx,%ecx 11145e: 3b 4a 54 cmp 0x54(%edx),%ecx 111461: 7f 0f jg 111472 <== NEVER TAKEN 111463: 7c 05 jl 11146a <== NEVER TAKEN 111465: 39 5d d0 cmp %ebx,-0x30(%ebp) 111468: 77 08 ja 111472 <== ALWAYS TAKEN 11146a: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 11146d: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 111470: eb 05 jmp 111477 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 111472: 29 c3 sub %eax,%ebx 111474: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 111477: 8b 15 a8 5d 12 00 mov 0x125da8,%edx 11147d: 89 55 c4 mov %edx,-0x3c(%ebp) 111480: 89 d0 mov %edx,%eax 111482: 99 cltd 111483: 89 d3 mov %edx,%ebx 111485: 52 push %edx 111486: 50 push %eax 111487: 57 push %edi 111488: 56 push %esi 111489: 89 45 c0 mov %eax,-0x40(%ebp) 11148c: e8 7b c7 00 00 call 11dc0c <__moddi3> 111491: 83 c4 10 add $0x10,%esp 111494: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111497: 8b 4d c0 mov -0x40(%ebp),%ecx 11149a: 53 push %ebx 11149b: 51 push %ecx 11149c: 57 push %edi 11149d: 56 push %esi 11149e: e8 19 c6 00 00 call 11dabc <__divdi3> 1114a3: 83 c4 10 add $0x10,%esp 1114a6: 89 c3 mov %eax,%ebx if ( start_offset ) { 1114a8: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 1114ac: 75 0f jne 1114bd 1114ae: 8b 55 14 mov 0x14(%ebp),%edx 1114b1: 89 55 c8 mov %edx,-0x38(%ebp) 1114b4: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 1114bb: eb 4c jmp 111509 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 ); 1114bd: 50 push %eax 1114be: 6a 00 push $0x0 1114c0: 53 push %ebx 1114c1: ff 75 08 pushl 0x8(%ebp) 1114c4: e8 71 f5 ff ff call 110a3a assert( block_ptr ); 1114c9: 83 c4 10 add $0x10,%esp 1114cc: 85 c0 test %eax,%eax 1114ce: 75 14 jne 1114e4 <== ALWAYS TAKEN 1114d0: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 1114d5: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 1114da: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 1114df: e9 c5 fe ff ff jmp 1113a9 <== 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; 1114e4: 8b 4d c4 mov -0x3c(%ebp),%ecx 1114e7: 2b 4d c8 sub -0x38(%ebp),%ecx 1114ea: 8b 55 d0 mov -0x30(%ebp),%edx 1114ed: 39 ca cmp %ecx,%edx 1114ef: 76 02 jbe 1114f3 1114f1: 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 ); 1114f3: 8b 75 c8 mov -0x38(%ebp),%esi 1114f6: 03 30 add (%eax),%esi dest += to_copy; 1114f8: 8b 7d 14 mov 0x14(%ebp),%edi 1114fb: 89 d1 mov %edx,%ecx 1114fd: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1114ff: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111502: 43 inc %ebx my_length -= to_copy; 111503: 29 55 d0 sub %edx,-0x30(%ebp) 111506: 89 55 cc mov %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 111509: 8b 15 a8 5d 12 00 mov 0x125da8,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11150f: eb 40 jmp 111551 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111511: 57 push %edi 111512: 6a 00 push $0x0 111514: 53 push %ebx 111515: ff 75 08 pushl 0x8(%ebp) 111518: 89 55 c0 mov %edx,-0x40(%ebp) 11151b: e8 1a f5 ff ff call 110a3a assert( block_ptr ); 111520: 83 c4 10 add $0x10,%esp 111523: 85 c0 test %eax,%eax 111525: 8b 55 c0 mov -0x40(%ebp),%edx 111528: 75 14 jne 11153e <== ALWAYS TAKEN 11152a: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 11152f: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 111534: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 111539: e9 6b fe ff ff jmp 1113a9 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 11153e: 8b 30 mov (%eax),%esi 111540: 8b 7d c8 mov -0x38(%ebp),%edi 111543: 89 d1 mov %edx,%ecx 111545: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 111547: 89 7d c8 mov %edi,-0x38(%ebp) block++; 11154a: 43 inc %ebx my_length -= to_copy; 11154b: 29 55 d0 sub %edx,-0x30(%ebp) copied += to_copy; 11154e: 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 ) { 111551: 8b 45 d0 mov -0x30(%ebp),%eax 111554: 3b 05 a8 5d 12 00 cmp 0x125da8,%eax 11155a: 73 b5 jae 111511 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 11155c: 85 c0 test %eax,%eax 11155e: 74 37 je 111597 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111560: 56 push %esi 111561: 6a 00 push $0x0 111563: 53 push %ebx 111564: ff 75 08 pushl 0x8(%ebp) 111567: e8 ce f4 ff ff call 110a3a assert( block_ptr ); 11156c: 83 c4 10 add $0x10,%esp 11156f: 85 c0 test %eax,%eax 111571: 75 14 jne 111587 <== ALWAYS TAKEN 111573: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 111578: 68 3c 0a 12 00 push $0x120a3c <== NOT EXECUTED 11157d: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 111582: e9 22 fe ff ff jmp 1113a9 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 111587: 8b 30 mov (%eax),%esi 111589: 8b 7d c8 mov -0x38(%ebp),%edi 11158c: 8b 4d d0 mov -0x30(%ebp),%ecx 11158f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 111591: 8b 55 d0 mov -0x30(%ebp),%edx 111594: 01 55 cc add %edx,-0x34(%ebp) } IMFS_update_atime( the_jnode ); 111597: 53 push %ebx 111598: 53 push %ebx 111599: 6a 00 push $0x0 11159b: 8d 45 e0 lea -0x20(%ebp),%eax 11159e: 50 push %eax 11159f: e8 70 61 ff ff call 107714 1115a4: 8b 45 e0 mov -0x20(%ebp),%eax 1115a7: 8b 4d 08 mov 0x8(%ebp),%ecx 1115aa: 89 41 40 mov %eax,0x40(%ecx) return copied; 1115ad: 8b 55 cc mov -0x34(%ebp),%edx 1115b0: 83 c4 10 add $0x10,%esp } 1115b3: 89 d0 mov %edx,%eax 1115b5: 8d 65 f4 lea -0xc(%ebp),%esp 1115b8: 5b pop %ebx 1115b9: 5e pop %esi 1115ba: 5f pop %edi 1115bb: c9 leave 1115bc: c3 ret =============================================================================== 00110c6a : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 110c6a: 55 push %ebp 110c6b: 89 e5 mov %esp,%ebp 110c6d: 57 push %edi 110c6e: 56 push %esi 110c6f: 53 push %ebx 110c70: 83 ec 1c sub $0x1c,%esp 110c73: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 110c76: 85 db test %ebx,%ebx 110c78: 75 11 jne 110c8b <== ALWAYS TAKEN 110c7a: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 110c7f: 68 50 0a 12 00 push $0x120a50 <== NOT EXECUTED 110c84: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 110c89: eb 15 jmp 110ca0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110c8b: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110c8f: 74 19 je 110caa <== ALWAYS TAKEN 110c91: 68 4c 09 12 00 push $0x12094c <== NOT EXECUTED 110c96: 68 50 0a 12 00 push $0x120a50 <== NOT EXECUTED 110c9b: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 110ca0: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110ca5: e8 f6 66 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 110caa: 8b 35 a8 5d 12 00 mov 0x125da8,%esi 110cb0: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110cb3: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 110cb7: 74 0f je 110cc8 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 110cb9: 57 push %edi 110cba: 57 push %edi 110cbb: 56 push %esi 110cbc: 8d 43 58 lea 0x58(%ebx),%eax 110cbf: 50 push %eax 110cc0: e8 f0 fe ff ff call 110bb5 110cc5: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110cc8: 31 ff xor %edi,%edi 110cca: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 110cce: 75 21 jne 110cf1 <== NEVER TAKEN 110cd0: eb 3a jmp 110d0c } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 110cd2: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 110cd5: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 110cdc: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 110ce0: 74 0e je 110cf0 <== NOT EXECUTED memfile_free_blocks_in_table( 110ce2: 51 push %ecx <== NOT EXECUTED 110ce3: 51 push %ecx <== NOT EXECUTED 110ce4: 56 push %esi <== NOT EXECUTED 110ce5: 01 d0 add %edx,%eax <== NOT EXECUTED 110ce7: 50 push %eax <== NOT EXECUTED 110ce8: e8 c8 fe ff ff call 110bb5 <== NOT EXECUTED 110ced: 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 ); 110cfd: 57 push %edi <== NOT EXECUTED 110cfe: 57 push %edi <== NOT EXECUTED 110cff: 56 push %esi <== NOT EXECUTED 110d00: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 110d03: 50 push %eax <== NOT EXECUTED 110d04: e8 ac fe ff ff call 110bb5 <== NOT EXECUTED 110d09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110d0c: 31 ff xor %edi,%edi 110d0e: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 110d12: 75 5b jne 110d6f <== NEVER TAKEN 110d14: eb 74 jmp 110d8a 110d16: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 110d1d: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 110d20: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 110d23: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 110d26: 85 c0 test %eax,%eax <== NOT EXECUTED 110d28: 74 51 je 110d7b <== NOT EXECUTED 110d2a: 31 d2 xor %edx,%edx <== NOT EXECUTED 110d2c: eb 21 jmp 110d4f <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 110d33: 51 push %ecx <== NOT EXECUTED 110d34: 51 push %ecx <== NOT EXECUTED 110d35: 56 push %esi <== NOT EXECUTED 110d36: 50 push %eax <== NOT EXECUTED 110d37: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 110d3a: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 110d3d: e8 73 fe ff ff call 110bb5 <== NOT EXECUTED 110d42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d45: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 110d48: 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( 110d5c: 52 push %edx <== NOT EXECUTED 110d5d: 52 push %edx <== NOT EXECUTED 110d5e: 56 push %esi <== NOT EXECUTED 110d5f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 110d62: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 110d65: 50 push %eax <== NOT EXECUTED 110d66: e8 4a fe ff ff call 110bb5 <== 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( 110d7b: 50 push %eax <== NOT EXECUTED 110d7c: 50 push %eax <== NOT EXECUTED 110d7d: 56 push %esi <== NOT EXECUTED 110d7e: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 110d81: 53 push %ebx <== NOT EXECUTED 110d82: e8 2e fe ff ff call 110bb5 <== NOT EXECUTED 110d87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 110d8a: 31 c0 xor %eax,%eax 110d8c: 8d 65 f4 lea -0xc(%ebp),%esp 110d8f: 5b pop %ebx 110d90: 5e pop %esi 110d91: 5f pop %edi 110d92: c9 leave 110d93: c3 ret =============================================================================== 00110c1f : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 110c1f: 55 push %ebp <== NOT EXECUTED 110c20: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110c22: 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 ); 110c25: 6a 00 push $0x0 <== NOT EXECUTED 110c27: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110c2a: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110c2d: e8 08 fe ff ff call 110a3a <== NOT EXECUTED assert( block_ptr ); 110c32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110c35: 85 c0 test %eax,%eax <== NOT EXECUTED 110c37: 75 19 jne 110c52 <== NOT EXECUTED 110c39: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 110c3e: 68 84 0a 12 00 push $0x120a84 <== NOT EXECUTED 110c43: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 110c48: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110c4d: e8 4e 67 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 110c52: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 110c54: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 110c5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110c5d: 52 push %edx <== NOT EXECUTED 110c5e: e8 9c fd ff ff call 1109ff <== NOT EXECUTED } return 1; } 110c63: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110c68: c9 leave <== NOT EXECUTED 110c69: c3 ret <== NOT EXECUTED =============================================================================== 001110b2 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 1110b2: 55 push %ebp 1110b3: 89 e5 mov %esp,%ebp 1110b5: 57 push %edi 1110b6: 56 push %esi 1110b7: 53 push %ebx 1110b8: 83 ec 3c sub $0x3c,%esp 1110bb: 8b 75 0c mov 0xc(%ebp),%esi 1110be: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 1110c1: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1110c5: 75 11 jne 1110d8 <== ALWAYS TAKEN 1110c7: 68 f8 08 12 00 push $0x1208f8 <== NOT EXECUTED 1110cc: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 1110d1: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 1110d6: eb 18 jmp 1110f0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1110d8: 8b 45 08 mov 0x8(%ebp),%eax 1110db: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 1110df: 74 19 je 1110fa <== ALWAYS TAKEN 1110e1: 68 4c 09 12 00 push $0x12094c <== NOT EXECUTED 1110e6: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 1110eb: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 1110f0: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 1110f5: e8 a6 62 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 1110fa: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1110fe: 75 11 jne 111111 <== ALWAYS TAKEN 111100: 68 86 09 12 00 push $0x120986 <== NOT EXECUTED 111105: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 11110a: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 11110f: eb df jmp 1110f0 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 111111: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 111115: 75 0d jne 111124 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111117: e8 04 19 00 00 call 112a20 <__errno> <== NOT EXECUTED 11111c: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111122: eb 33 jmp 111157 <== 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 ) { 111124: 8b 45 18 mov 0x18(%ebp),%eax 111127: 01 f0 add %esi,%eax 111129: 31 d2 xor %edx,%edx 11112b: 8b 4d 08 mov 0x8(%ebp),%ecx 11112e: 3b 51 54 cmp 0x54(%ecx),%edx 111131: 7c 2c jl 11115f <== NEVER TAKEN 111133: 7f 05 jg 11113a <== NEVER TAKEN 111135: 3b 41 50 cmp 0x50(%ecx),%eax 111138: 76 25 jbe 11115f <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 11113a: 51 push %ecx 11113b: 52 push %edx 11113c: 50 push %eax 11113d: ff 75 08 pushl 0x8(%ebp) 111140: e8 8a fd ff ff call 110ecf if ( status ) 111145: 83 c4 10 add $0x10,%esp 111148: 85 c0 test %eax,%eax 11114a: 74 13 je 11115f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 11114c: e8 cf 18 00 00 call 112a20 <__errno> <== NOT EXECUTED 111151: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 111157: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 11115a: e9 3b 01 00 00 jmp 11129a <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11115f: a1 a8 5d 12 00 mov 0x125da8,%eax 111164: 89 45 c8 mov %eax,-0x38(%ebp) 111167: 99 cltd 111168: 89 d3 mov %edx,%ebx 11116a: 52 push %edx 11116b: 50 push %eax 11116c: 57 push %edi 11116d: 56 push %esi 11116e: 89 45 c4 mov %eax,-0x3c(%ebp) 111171: e8 96 ca 00 00 call 11dc0c <__moddi3> 111176: 83 c4 10 add $0x10,%esp 111179: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11117c: 8b 4d c4 mov -0x3c(%ebp),%ecx 11117f: 53 push %ebx 111180: 51 push %ecx 111181: 57 push %edi 111182: 56 push %esi 111183: e8 34 c9 00 00 call 11dabc <__divdi3> 111188: 83 c4 10 add $0x10,%esp 11118b: 89 45 d0 mov %eax,-0x30(%ebp) if ( start_offset ) { 11118e: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 111192: 75 0d jne 1111a1 111194: 8b 75 14 mov 0x14(%ebp),%esi 111197: 8b 55 18 mov 0x18(%ebp),%edx 11119a: 89 55 d4 mov %edx,-0x2c(%ebp) 11119d: 31 db xor %ebx,%ebx 11119f: eb 52 jmp 1111f3 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 ); 1111a1: 50 push %eax 1111a2: 6a 00 push $0x0 1111a4: ff 75 d0 pushl -0x30(%ebp) 1111a7: ff 75 08 pushl 0x8(%ebp) 1111aa: e8 8b f8 ff ff call 110a3a assert( block_ptr ); 1111af: 83 c4 10 add $0x10,%esp 1111b2: 85 c0 test %eax,%eax 1111b4: 75 14 jne 1111ca <== ALWAYS TAKEN 1111b6: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 1111bb: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 1111c0: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 1111c5: e9 26 ff ff ff jmp 1110f0 <== 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; 1111ca: 8b 55 c8 mov -0x38(%ebp),%edx 1111cd: 2b 55 cc sub -0x34(%ebp),%edx 1111d0: 3b 55 18 cmp 0x18(%ebp),%edx 1111d3: 76 03 jbe 1111d8 <== NEVER TAKEN 1111d5: 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 ); 1111d8: 8b 00 mov (%eax),%eax 1111da: 03 45 cc add -0x34(%ebp),%eax src += to_copy; 1111dd: 89 c7 mov %eax,%edi 1111df: 8b 75 14 mov 0x14(%ebp),%esi 1111e2: 89 d1 mov %edx,%ecx 1111e4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1111e6: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 1111e9: 8b 4d 18 mov 0x18(%ebp),%ecx 1111ec: 29 d1 sub %edx,%ecx 1111ee: 89 4d d4 mov %ecx,-0x2c(%ebp) copied += to_copy; 1111f1: 89 d3 mov %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1111f3: 8b 15 a8 5d 12 00 mov 0x125da8,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1111f9: eb 3f jmp 11123a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1111fb: 57 push %edi 1111fc: 6a 00 push $0x0 1111fe: ff 75 d0 pushl -0x30(%ebp) 111201: ff 75 08 pushl 0x8(%ebp) 111204: 89 55 c4 mov %edx,-0x3c(%ebp) 111207: e8 2e f8 ff ff call 110a3a assert( block_ptr ); 11120c: 83 c4 10 add $0x10,%esp 11120f: 85 c0 test %eax,%eax 111211: 8b 55 c4 mov -0x3c(%ebp),%edx 111214: 75 14 jne 11122a <== ALWAYS TAKEN 111216: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 11121b: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 111220: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 111225: e9 c6 fe ff ff jmp 1110f0 <== 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 ); 11122a: 8b 00 mov (%eax),%eax src += to_copy; 11122c: 89 c7 mov %eax,%edi 11122e: 89 d1 mov %edx,%ecx 111230: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111232: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 111235: 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( 111238: 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 ) { 11123a: 8b 45 d4 mov -0x2c(%ebp),%eax 11123d: 3b 05 a8 5d 12 00 cmp 0x125da8,%eax 111243: 73 b6 jae 1111fb */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 111245: 85 c0 test %eax,%eax 111247: 74 35 je 11127e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111249: 51 push %ecx 11124a: 6a 00 push $0x0 11124c: ff 75 d0 pushl -0x30(%ebp) 11124f: ff 75 08 pushl 0x8(%ebp) 111252: e8 e3 f7 ff ff call 110a3a assert( block_ptr ); 111257: 83 c4 10 add $0x10,%esp 11125a: 85 c0 test %eax,%eax 11125c: 75 14 jne 111272 <== ALWAYS TAKEN 11125e: 68 7c 09 12 00 push $0x12097c <== NOT EXECUTED 111263: 68 28 0a 12 00 push $0x120a28 <== NOT EXECUTED 111268: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 11126d: e9 7e fe ff ff jmp 1110f0 <== 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 ); 111272: 8b 00 mov (%eax),%eax 111274: 89 c7 mov %eax,%edi 111276: 8b 4d d4 mov -0x2c(%ebp),%ecx 111279: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 11127b: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 11127e: 52 push %edx 11127f: 52 push %edx 111280: 6a 00 push $0x0 111282: 8d 45 e0 lea -0x20(%ebp),%eax 111285: 50 push %eax 111286: e8 89 64 ff ff call 107714 11128b: 8b 45 e0 mov -0x20(%ebp),%eax 11128e: 8b 55 08 mov 0x8(%ebp),%edx 111291: 89 42 44 mov %eax,0x44(%edx) 111294: 89 42 48 mov %eax,0x48(%edx) return copied; 111297: 83 c4 10 add $0x10,%esp } 11129a: 89 d8 mov %ebx,%eax 11129c: 8d 65 f4 lea -0xc(%ebp),%esp 11129f: 5b pop %ebx 1112a0: 5e pop %esi 1112a1: 5f pop %edi 1112a2: c9 leave 1112a3: c3 ret =============================================================================== 00106f68 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106f68: 55 push %ebp 106f69: 89 e5 mov %esp,%ebp 106f6b: 57 push %edi 106f6c: 56 push %esi 106f6d: 53 push %ebx 106f6e: 83 ec 4c sub $0x4c,%esp 106f71: 8b 55 08 mov 0x8(%ebp),%edx 106f74: 8b 5d 10 mov 0x10(%ebp),%ebx 106f77: 8b 75 14 mov 0x14(%ebp),%esi IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 106f7a: 31 c0 xor %eax,%eax 106f7c: 83 c9 ff or $0xffffffff,%ecx 106f7f: 89 d7 mov %edx,%edi 106f81: f2 ae repnz scas %es:(%edi),%al 106f83: f7 d1 not %ecx 106f85: 49 dec %ecx 106f86: 8d 45 e4 lea -0x1c(%ebp),%eax 106f89: 50 push %eax 106f8a: 8d 45 af lea -0x51(%ebp),%eax 106f8d: 50 push %eax 106f8e: 51 push %ecx 106f8f: 52 push %edx 106f90: e8 23 7b 00 00 call 10eab8 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106f95: 8b 45 0c mov 0xc(%ebp),%eax 106f98: 25 00 f0 00 00 and $0xf000,%eax 106f9d: 83 c4 10 add $0x10,%esp 106fa0: 3d 00 40 00 00 cmp $0x4000,%eax 106fa5: 74 40 je 106fe7 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106fa7: ba 05 00 00 00 mov $0x5,%edx 106fac: 3d 00 80 00 00 cmp $0x8000,%eax 106fb1: 74 39 je 106fec type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106fb3: 3d 00 20 00 00 cmp $0x2000,%eax 106fb8: 74 07 je 106fc1 106fba: 3d 00 60 00 00 cmp $0x6000,%eax 106fbf: 75 0d jne 106fce type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 106fc1: 89 5d d0 mov %ebx,-0x30(%ebp) 106fc4: 89 75 d4 mov %esi,-0x2c(%ebp) 106fc7: ba 02 00 00 00 mov $0x2,%edx 106fcc: eb 1e jmp 106fec } else if (S_ISFIFO(mode)) 106fce: ba 07 00 00 00 mov $0x7,%edx 106fd3: 3d 00 10 00 00 cmp $0x1000,%eax 106fd8: 74 12 je 106fec <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 106fda: e8 41 ba 00 00 call 112a20 <__errno> <== NOT EXECUTED 106fdf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106fe5: eb 32 jmp 107019 <== NOT EXECUTED 106fe7: ba 01 00 00 00 mov $0x1,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 106fec: 83 ec 0c sub $0xc,%esp 106fef: 8d 45 d0 lea -0x30(%ebp),%eax 106ff2: 50 push %eax 106ff3: ff 75 0c pushl 0xc(%ebp) 106ff6: 8d 45 af lea -0x51(%ebp),%eax 106ff9: 50 push %eax 106ffa: 52 push %edx 106ffb: ff 75 18 pushl 0x18(%ebp) 106ffe: e8 83 70 00 00 call 10e086 107003: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 107005: 83 c4 20 add $0x20,%esp 107008: 31 c0 xor %eax,%eax 10700a: 85 d2 test %edx,%edx 10700c: 75 0e jne 10701c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10700e: e8 0d ba 00 00 call 112a20 <__errno> <== NOT EXECUTED 107013: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107019: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10701c: 8d 65 f4 lea -0xc(%ebp),%esp 10701f: 5b pop %ebx 107020: 5e pop %esi 107021: 5f pop %edi 107022: c9 leave 107023: c3 ret =============================================================================== 00107024 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107024: 55 push %ebp 107025: 89 e5 mov %esp,%ebp 107027: 83 ec 08 sub $0x8,%esp 10702a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10702d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107030: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107034: 74 10 je 107046 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107036: e8 e5 b9 00 00 call 112a20 <__errno> <== NOT EXECUTED 10703b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107041: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107044: eb 05 jmp 10704b <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107046: 89 50 5c mov %edx,0x5c(%eax) 107049: 31 c0 xor %eax,%eax return 0; } 10704b: c9 leave 10704c: c3 ret =============================================================================== 00108d6e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108d6e: 55 push %ebp 108d6f: 89 e5 mov %esp,%ebp 108d71: 53 push %ebx 108d72: 83 ec 04 sub $0x4,%esp 108d75: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 108d78: 85 db test %ebx,%ebx 108d7a: 75 11 jne 108d8d <== ALWAYS TAKEN 108d7c: 68 a0 4f 12 00 push $0x124fa0 <== NOT EXECUTED 108d81: 68 58 51 12 00 push $0x125158 <== NOT EXECUTED 108d86: 6a 38 push $0x38 <== NOT EXECUTED 108d88: e9 98 00 00 00 jmp 108e25 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 108d8d: 50 push %eax 108d8e: 50 push %eax 108d8f: a1 00 a3 12 00 mov 0x12a300,%eax 108d94: ff 70 08 pushl 0x8(%eax) 108d97: 8d 43 0c lea 0xc(%ebx),%eax 108d9a: 50 push %eax 108d9b: e8 c4 d4 00 00 call 116264 switch( the_jnode->type ) { 108da0: 8b 43 4c mov 0x4c(%ebx),%eax 108da3: 83 c4 10 add $0x10,%esp 108da6: 8d 50 ff lea -0x1(%eax),%edx 108da9: 83 fa 06 cmp $0x6,%edx 108dac: 0f 87 b7 00 00 00 ja 108e69 <== NEVER TAKEN 108db2: a1 00 a3 12 00 mov 0x12a300,%eax 108db7: ff 24 95 28 51 12 00 jmp *0x125128(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 108dbe: 53 push %ebx 108dbf: 53 push %ebx 108dc0: ff 70 08 pushl 0x8(%eax) 108dc3: 6a 2f push $0x2f 108dc5: e8 ae d3 00 00 call 116178 108dca: eb 2b jmp 108df7 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108dcc: ff 73 54 pushl 0x54(%ebx) 108dcf: ff 73 50 pushl 0x50(%ebx) 108dd2: 68 f7 4f 12 00 push $0x124ff7 108dd7: eb 16 jmp 108def the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108dd9: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 108ddc: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 108ddf: 68 0a 50 12 00 push $0x12500a <== NOT EXECUTED 108de4: eb 09 jmp 108def <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108de6: 51 push %ecx 108de7: ff 73 50 pushl 0x50(%ebx) 108dea: 68 19 50 12 00 push $0x125019 108def: ff 70 08 pushl 0x8(%eax) 108df2: e8 45 d3 00 00 call 11613c (uint32_t)the_jnode->info.file.size ); #endif break; 108df7: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dfa: c7 45 08 6d 53 12 00 movl $0x12536d,0x8(%ebp) } 108e01: 8b 5d fc mov -0x4(%ebp),%ebx 108e04: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108e05: e9 96 ec 00 00 jmp 117aa0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 108e0a: 52 push %edx <== NOT EXECUTED 108e0b: 52 push %edx <== NOT EXECUTED 108e0c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e0f: 68 25 50 12 00 push $0x125025 <== NOT EXECUTED 108e14: e8 4b d4 00 00 call 116264 <== NOT EXECUTED assert(0); 108e19: 68 f0 47 12 00 push $0x1247f0 <== NOT EXECUTED 108e1e: 68 58 51 12 00 push $0x125158 <== NOT EXECUTED 108e23: 6a 5d push $0x5d <== NOT EXECUTED 108e25: 68 aa 4f 12 00 push $0x124faa <== NOT EXECUTED 108e2a: e8 c1 07 00 00 call 1095f0 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108e2f: 53 push %ebx <== NOT EXECUTED 108e30: 53 push %ebx <== NOT EXECUTED 108e31: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e34: 68 25 50 12 00 push $0x125025 <== NOT EXECUTED 108e39: e8 26 d4 00 00 call 116264 <== NOT EXECUTED assert(0); 108e3e: 68 f0 47 12 00 push $0x1247f0 <== NOT EXECUTED 108e43: 68 58 51 12 00 push $0x125158 <== NOT EXECUTED 108e48: 6a 62 push $0x62 <== NOT EXECUTED 108e4a: eb d9 jmp 108e25 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108e4c: 51 push %ecx <== NOT EXECUTED 108e4d: 51 push %ecx <== NOT EXECUTED 108e4e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e51: 68 39 50 12 00 push $0x125039 <== NOT EXECUTED 108e56: e8 09 d4 00 00 call 116264 <== NOT EXECUTED assert(0); 108e5b: 68 f0 47 12 00 push $0x1247f0 <== NOT EXECUTED 108e60: 68 58 51 12 00 push $0x125158 <== NOT EXECUTED 108e65: 6a 67 push $0x67 <== NOT EXECUTED 108e67: eb bc jmp 108e25 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108e69: 52 push %edx <== NOT EXECUTED 108e6a: 50 push %eax <== NOT EXECUTED 108e6b: 68 4c 50 12 00 push $0x12504c <== NOT EXECUTED 108e70: a1 00 a3 12 00 mov 0x12a300,%eax <== NOT EXECUTED 108e75: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e78: e8 bf d2 00 00 call 11613c <== NOT EXECUTED assert(0); 108e7d: 68 f0 47 12 00 push $0x1247f0 <== NOT EXECUTED 108e82: 68 58 51 12 00 push $0x125158 <== NOT EXECUTED 108e87: 6a 6c push $0x6c <== NOT EXECUTED 108e89: eb 9a jmp 108e25 <== NOT EXECUTED =============================================================================== 00107060 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107060: 55 push %ebp 107061: 89 e5 mov %esp,%ebp 107063: 56 push %esi 107064: 53 push %ebx 107065: 8b 75 0c mov 0xc(%ebp),%esi 107068: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 10706b: 8b 45 08 mov 0x8(%ebp),%eax 10706e: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107070: 31 c0 xor %eax,%eax 107072: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107076: 74 14 je 10708c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107078: e8 a3 b9 00 00 call 112a20 <__errno> <== NOT EXECUTED 10707d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107083: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107086: eb 12 jmp 10709a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107088: 88 0c 06 mov %cl,(%esi,%eax,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 10708b: 40 inc %eax 10708c: 39 d8 cmp %ebx,%eax 10708e: 73 0a jae 10709a 107090: 8b 4a 50 mov 0x50(%edx),%ecx 107093: 8a 0c 01 mov (%ecx,%eax,1),%cl 107096: 84 c9 test %cl,%cl 107098: 75 ee jne 107088 buf[i] = node->info.sym_link.name[i]; return i; } 10709a: 5b pop %ebx 10709b: 5e pop %esi 10709c: c9 leave 10709d: c3 ret =============================================================================== 001070a0 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1070a0: 55 push %ebp 1070a1: 89 e5 mov %esp,%ebp 1070a3: 53 push %ebx 1070a4: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1070a7: 8b 45 0c mov 0xc(%ebp),%eax 1070aa: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1070ac: 6a 20 push $0x20 1070ae: ff 75 14 pushl 0x14(%ebp) 1070b1: 8d 43 0c lea 0xc(%ebx),%eax 1070b4: 50 push %eax 1070b5: e8 7e c6 00 00 call 113738 if ( the_jnode->Parent != NULL ) 1070ba: 83 c4 10 add $0x10,%esp 1070bd: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1070c1: 74 0c je 1070cf <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1070c3: 83 ec 0c sub $0xc,%esp 1070c6: 53 push %ebx 1070c7: e8 a0 3d 00 00 call 10ae6c <_Chain_Extract> 1070cc: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1070cf: 8b 45 10 mov 0x10(%ebp),%eax 1070d2: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 1070d4: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1070d7: 51 push %ecx 1070d8: 51 push %ecx 1070d9: 53 push %ebx 1070da: 83 c0 50 add $0x50,%eax 1070dd: 50 push %eax 1070de: e8 65 3d 00 00 call 10ae48 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1070e3: 58 pop %eax 1070e4: 5a pop %edx 1070e5: 6a 00 push $0x0 1070e7: 8d 45 f0 lea -0x10(%ebp),%eax 1070ea: 50 push %eax 1070eb: e8 24 06 00 00 call 107714 1070f0: 8b 45 f0 mov -0x10(%ebp),%eax 1070f3: 89 43 48 mov %eax,0x48(%ebx) return 0; } 1070f6: 31 c0 xor %eax,%eax 1070f8: 8b 5d fc mov -0x4(%ebp),%ebx 1070fb: c9 leave 1070fc: c3 ret =============================================================================== 0010eb78 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10eb78: 55 push %ebp 10eb79: 89 e5 mov %esp,%ebp 10eb7b: 56 push %esi 10eb7c: 53 push %ebx 10eb7d: 83 ec 10 sub $0x10,%esp 10eb80: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10eb83: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10eb85: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10eb89: 74 13 je 10eb9e <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10eb8b: 83 ec 0c sub $0xc,%esp 10eb8e: 53 push %ebx 10eb8f: e8 d8 c2 ff ff call 10ae6c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10eb94: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10eb9b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10eb9e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10eba2: 50 push %eax 10eba3: 50 push %eax 10eba4: 6a 00 push $0x0 10eba6: 8d 45 f0 lea -0x10(%ebp),%eax 10eba9: 50 push %eax 10ebaa: e8 65 8b ff ff call 107714 10ebaf: 8b 45 f0 mov -0x10(%ebp),%eax 10ebb2: 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) ) { 10ebb5: 89 1c 24 mov %ebx,(%esp) 10ebb8: e8 a5 02 00 00 call 10ee62 10ebbd: 83 c4 10 add $0x10,%esp 10ebc0: 85 c0 test %eax,%eax 10ebc2: 75 3f jne 10ec03 <== NEVER TAKEN 10ebc4: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10ebc9: 75 38 jne 10ec03 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10ebcb: a1 54 3f 12 00 mov 0x123f54,%eax 10ebd0: 8b 50 04 mov 0x4(%eax),%edx 10ebd3: 3b 16 cmp (%esi),%edx 10ebd5: 75 07 jne 10ebde <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 10ebd7: 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 ) { 10ebde: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10ebe2: 75 13 jne 10ebf7 if ( the_jnode->info.sym_link.name ) 10ebe4: 8b 43 50 mov 0x50(%ebx),%eax 10ebe7: 85 c0 test %eax,%eax 10ebe9: 74 0c je 10ebf7 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 10ebeb: 83 ec 0c sub $0xc,%esp 10ebee: 50 push %eax 10ebef: e8 a8 8a ff ff call 10769c 10ebf4: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10ebf7: 83 ec 0c sub $0xc,%esp 10ebfa: 53 push %ebx 10ebfb: e8 9c 8a ff ff call 10769c 10ec00: 83 c4 10 add $0x10,%esp } return 0; } 10ec03: 31 c0 xor %eax,%eax 10ec05: 8d 65 f8 lea -0x8(%ebp),%esp 10ec08: 5b pop %ebx 10ec09: 5e pop %esi 10ec0a: c9 leave 10ec0b: c3 ret =============================================================================== 0010ec0c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10ec0c: 55 push %ebp 10ec0d: 89 e5 mov %esp,%ebp 10ec0f: 56 push %esi 10ec10: 53 push %ebx 10ec11: 8b 4d 08 mov 0x8(%ebp),%ecx 10ec14: 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; 10ec17: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10ec19: 8b 5a 4c mov 0x4c(%edx),%ebx 10ec1c: 83 eb 02 sub $0x2,%ebx 10ec1f: 83 fb 05 cmp $0x5,%ebx 10ec22: 77 33 ja 10ec57 <== NEVER TAKEN 10ec24: ff 24 9d 8c 06 12 00 jmp *0x12068c(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10ec2b: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10ec2e: 8b 72 50 mov 0x50(%edx),%esi 10ec31: 89 70 18 mov %esi,0x18(%eax) 10ec34: 89 58 1c mov %ebx,0x1c(%eax) break; 10ec37: eb 2e jmp 10ec67 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10ec39: 8b 5a 50 mov 0x50(%edx),%ebx 10ec3c: 8b 72 54 mov 0x54(%edx),%esi 10ec3f: 89 58 20 mov %ebx,0x20(%eax) 10ec42: 89 70 24 mov %esi,0x24(%eax) break; 10ec45: eb 20 jmp 10ec67 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10ec47: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10ec4e: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED break; 10ec55: eb 10 jmp 10ec67 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ec57: e8 c4 3d 00 00 call 112a20 <__errno> <== NOT EXECUTED 10ec5c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ec62: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ec65: eb 47 jmp 10ecae <== 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 ); 10ec67: 8b 49 10 mov 0x10(%ecx),%ecx 10ec6a: 8b 49 34 mov 0x34(%ecx),%ecx 10ec6d: 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 = 10ec6f: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10ec75: 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; 10ec78: 8b 4a 30 mov 0x30(%edx),%ecx 10ec7b: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10ec7e: 8b 4a 34 mov 0x34(%edx),%ecx 10ec81: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10ec85: 8b 4a 38 mov 0x38(%edx),%ecx 10ec88: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10ec8b: 8b 4a 3c mov 0x3c(%edx),%ecx 10ec8e: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10ec92: 66 8b 4a 3e mov 0x3e(%edx),%cx 10ec96: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10ec9a: 8b 4a 40 mov 0x40(%edx),%ecx 10ec9d: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10eca0: 8b 4a 44 mov 0x44(%edx),%ecx 10eca3: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10eca6: 8b 52 48 mov 0x48(%edx),%edx 10eca9: 89 50 38 mov %edx,0x38(%eax) 10ecac: 31 c0 xor %eax,%eax return 0; } 10ecae: 5b pop %ebx 10ecaf: 5e pop %esi 10ecb0: c9 leave 10ecb1: c3 ret =============================================================================== 00107100 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107100: 55 push %ebp 107101: 89 e5 mov %esp,%ebp 107103: 57 push %edi 107104: 53 push %ebx 107105: 83 ec 40 sub $0x40,%esp 107108: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 10710b: 31 c0 xor %eax,%eax 10710d: 83 c9 ff or $0xffffffff,%ecx 107110: 89 d7 mov %edx,%edi 107112: f2 ae repnz scas %es:(%edi),%al 107114: f7 d1 not %ecx 107116: 49 dec %ecx 107117: 8d 45 f4 lea -0xc(%ebp),%eax 10711a: 50 push %eax 10711b: 8d 5d bf lea -0x41(%ebp),%ebx 10711e: 53 push %ebx 10711f: 51 push %ecx 107120: 52 push %edx 107121: e8 92 79 00 00 call 10eab8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107126: 58 pop %eax 107127: ff 75 0c pushl 0xc(%ebp) 10712a: e8 b5 c4 00 00 call 1135e4 10712f: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107132: 83 c4 10 add $0x10,%esp 107135: 85 c0 test %eax,%eax 107137: 75 10 jne 107149 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107139: e8 e2 b8 00 00 call 112a20 <__errno> <== NOT EXECUTED 10713e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107144: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107147: eb 3e jmp 107187 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107149: 83 ec 0c sub $0xc,%esp 10714c: 8d 45 e0 lea -0x20(%ebp),%eax 10714f: 50 push %eax 107150: 68 ff a1 00 00 push $0xa1ff 107155: 53 push %ebx 107156: 6a 04 push $0x4 107158: ff 75 08 pushl 0x8(%ebp) 10715b: e8 26 6f 00 00 call 10e086 107160: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107162: 83 c4 20 add $0x20,%esp 107165: 31 c0 xor %eax,%eax 107167: 85 d2 test %edx,%edx 107169: 75 1c jne 107187 <== ALWAYS TAKEN free(info.sym_link.name); 10716b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10716e: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107171: e8 26 05 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107176: e8 a5 b8 00 00 call 112a20 <__errno> <== NOT EXECUTED 10717b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107181: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107184: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107187: 8d 65 f8 lea -0x8(%ebp),%esp 10718a: 5b pop %ebx 10718b: 5f pop %edi 10718c: c9 leave 10718d: c3 ret =============================================================================== 00107190 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107190: 55 push %ebp 107191: 89 e5 mov %esp,%ebp 107193: 57 push %edi 107194: 56 push %esi 107195: 53 push %ebx 107196: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107199: 8b 45 0c mov 0xc(%ebp),%eax 10719c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 10719e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 1071a2: 75 7a jne 10721e if ( !node->info.hard_link.link_node ) 1071a4: 8b 43 50 mov 0x50(%ebx),%eax 1071a7: 85 c0 test %eax,%eax 1071a9: 75 10 jne 1071bb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1071ab: e8 70 b8 00 00 call 112a20 <__errno> <== NOT EXECUTED 1071b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1071b6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1071b9: eb 75 jmp 107230 <== NOT EXECUTED the_link = *loc; 1071bb: 8d 7d cc lea -0x34(%ebp),%edi 1071be: b9 05 00 00 00 mov $0x5,%ecx 1071c3: 8b 75 0c mov 0xc(%ebp),%esi 1071c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 1071c8: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 1071cb: 83 ec 0c sub $0xc,%esp 1071ce: 8d 75 cc lea -0x34(%ebp),%esi 1071d1: 56 push %esi 1071d2: e8 b1 6f 00 00 call 10e188 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 1071d7: 8b 43 50 mov 0x50(%ebx),%eax 1071da: 8b 50 34 mov 0x34(%eax),%edx 1071dd: 83 c4 10 add $0x10,%esp 1071e0: 66 83 fa 01 cmp $0x1,%dx 1071e4: 75 1a jne 107200 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1071e6: 51 push %ecx 1071e7: 51 push %ecx 1071e8: 56 push %esi 1071e9: ff 75 08 pushl 0x8(%ebp) 1071ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1071ef: ff 50 34 call *0x34(%eax) 1071f2: 89 c2 mov %eax,%edx if ( result != 0 ) 1071f4: 83 c4 10 add $0x10,%esp 1071f7: 83 c8 ff or $0xffffffff,%eax 1071fa: 85 d2 test %edx,%edx 1071fc: 74 20 je 10721e 1071fe: eb 30 jmp 107230 return -1; } else { node->info.hard_link.link_node->st_nlink --; 107200: 4a dec %edx 107201: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107205: 52 push %edx 107206: 52 push %edx 107207: 6a 00 push $0x0 107209: 8d 45 e0 lea -0x20(%ebp),%eax 10720c: 50 push %eax 10720d: e8 02 05 00 00 call 107714 107212: 8b 43 50 mov 0x50(%ebx),%eax 107215: 8b 55 e0 mov -0x20(%ebp),%edx 107218: 89 50 48 mov %edx,0x48(%eax) 10721b: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 10721e: 50 push %eax 10721f: 50 push %eax 107220: 8b 55 0c mov 0xc(%ebp),%edx 107223: 8b 42 08 mov 0x8(%edx),%eax 107226: 52 push %edx 107227: ff 75 08 pushl 0x8(%ebp) 10722a: ff 50 34 call *0x34(%eax) return result; 10722d: 83 c4 10 add $0x10,%esp } 107230: 8d 65 f4 lea -0xc(%ebp),%esp 107233: 5b pop %ebx 107234: 5e pop %esi 107235: 5f pop %edi 107236: c9 leave 107237: c3 ret =============================================================================== 00107238 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107238: 55 push %ebp 107239: 89 e5 mov %esp,%ebp 10723b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10723e: 8b 45 08 mov 0x8(%ebp),%eax 107241: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107244: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107248: 74 0d je 107257 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10724a: e8 d1 b7 00 00 call 112a20 <__errno> <== NOT EXECUTED 10724f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107255: eb 11 jmp 107268 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107257: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10725b: 75 10 jne 10726d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10725d: e8 be b7 00 00 call 112a20 <__errno> <== NOT EXECUTED 107262: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107268: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10726b: eb 09 jmp 107276 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 10726d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107274: 31 c0 xor %eax,%eax return 0; } 107276: c9 leave 107277: c3 ret =============================================================================== 00107894 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 107894: 55 push %ebp 107895: 89 e5 mov %esp,%ebp 107897: 57 push %edi 107898: 56 push %esi 107899: 53 push %ebx 10789a: 83 ec 0c sub $0xc,%esp 10789d: 8b 5d 08 mov 0x8(%ebp),%ebx 1078a0: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1078a3: a1 30 45 12 00 mov 0x124530,%eax 1078a8: 85 c0 test %eax,%eax 1078aa: 74 02 je 1078ae <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 1078ac: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1078ae: e8 7c ff ff ff call 10782f /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1078b3: a1 34 45 12 00 mov 0x124534,%eax 1078b8: 85 c0 test %eax,%eax 1078ba: 74 12 je 1078ce <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1078bc: 52 push %edx <== NOT EXECUTED 1078bd: 52 push %edx <== NOT EXECUTED 1078be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1078c1: 53 push %ebx <== NOT EXECUTED 1078c2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1078c4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1078c7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1078c9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1078cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1078ce: 80 3d 2d 45 12 00 00 cmpb $0x0,0x12452d 1078d5: 75 11 jne 1078e8 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1078d7: 80 3d 20 22 12 00 00 cmpb $0x0,0x122220 1078de: 74 08 je 1078e8 ) { memset( heap_begin, 0, heap_size ); 1078e0: 31 c0 xor %eax,%eax 1078e2: 89 df mov %ebx,%edi 1078e4: 89 f1 mov %esi,%ecx 1078e6: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1078e8: 80 3d 2d 45 12 00 00 cmpb $0x0,0x12452d 1078ef: 75 20 jne 107911 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1078f1: 6a 04 push $0x4 1078f3: 56 push %esi 1078f4: 53 push %ebx 1078f5: ff 35 50 21 12 00 pushl 0x122150 1078fb: e8 90 3a 00 00 call 10b390 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 107900: 83 c4 10 add $0x10,%esp 107903: 85 c0 test %eax,%eax 107905: 75 0a jne 107911 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 107907: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10790a: 6a 1a push $0x1a <== NOT EXECUTED 10790c: e8 93 32 00 00 call 10aba4 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107911: 8b 1d d0 60 12 00 mov 0x1260d0,%ebx 107917: 83 ec 0c sub $0xc,%esp 10791a: ff 35 50 21 12 00 pushl 0x122150 107920: e8 03 45 00 00 call 10be28 <_Protected_heap_Get_size> 107925: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107928: 89 1d d0 60 12 00 mov %ebx,0x1260d0 10792e: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 107931: 8d 65 f4 lea -0xc(%ebp),%esp 107934: 5b pop %ebx 107935: 5e pop %esi 107936: 5f pop %edi 107937: c9 leave 107938: c3 ret =============================================================================== 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 b0 5d 12 00 mov 0x125db0,%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 dc 60 12 00 00 cmpl $0x0,0x1260dc <== NOT EXECUTED 106e3e: 0f 84 d8 00 00 00 je 106f1c <== NOT EXECUTED 106e44: be d8 60 12 00 mov $0x1260d8,%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 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 106e5a: 8b 8b d8 00 00 00 mov 0xd8(%ebx),%ecx <== NOT EXECUTED 106e60: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 106e63: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 106e66: 83 c2 10 add $0x10,%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 106e69: 8b 06 mov (%esi),%eax <== NOT EXECUTED 106e6b: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED 106e6e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 106e71: 50 push %eax <== NOT EXECUTED 106e72: 52 push %edx <== NOT EXECUTED 106e73: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 106e76: e8 6c ff ff ff call 106de7 <== NOT EXECUTED if ( high_water_mark ) 106e7b: 59 pop %ecx <== NOT EXECUTED 106e7c: 5f pop %edi <== NOT EXECUTED 106e7d: 31 ff xor %edi,%edi <== NOT EXECUTED 106e7f: 85 c0 test %eax,%eax <== NOT EXECUTED 106e81: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 106e84: 74 08 je 106e8e <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 106e86: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 106e89: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED 106e8c: 29 c7 sub %eax,%edi <== NOT EXECUTED else used = 0; if ( the_thread ) { 106e8e: 85 db test %ebx,%ebx <== NOT EXECUTED 106e90: 74 26 je 106eb8 <== NOT EXECUTED (*print_handler)( 106e92: 52 push %edx <== NOT EXECUTED 106e93: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 106e96: 50 push %eax <== NOT EXECUTED 106e97: 6a 05 push $0x5 <== NOT EXECUTED 106e99: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106e9c: e8 e7 38 00 00 call 10a788 <== NOT EXECUTED 106ea1: 50 push %eax <== NOT EXECUTED 106ea2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ea5: 68 f2 03 12 00 push $0x1203f2 <== NOT EXECUTED 106eaa: ff 35 ac 5d 12 00 pushl 0x125dac <== 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 ff 03 12 00 push $0x1203ff <== NOT EXECUTED 106ec0: ff 35 ac 5d 12 00 pushl 0x125dac <== 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 0d 04 12 00 push $0x12040d <== NOT EXECUTED 106ee4: ff 35 ac 5d 12 00 pushl 0x125dac <== NOT EXECUTED 106eea: ff 15 b0 5d 12 00 call *0x125db0 <== 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 a8 5d 12 00 00 cmpl $0x0,0x125da8 <== NOT EXECUTED 106efa: a1 b0 5d 12 00 mov 0x125db0,%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 2b 04 12 00 push $0x12042b <== 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 38 04 12 00 push $0x120438 <== NOT EXECUTED 106f11: ff 35 ac 5d 12 00 pushl 0x125dac <== 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 a8 5d 12 00 00 cmpl $0x0,0x125da8 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 70 05 12 00 mov 0x120570(,%edx,4),%edx 10713c: 89 14 85 c8 60 12 00 mov %edx,0x1260c8(,%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 40 62 12 00 mov 0x126240,%edx 10714f: 85 d2 test %edx,%edx 107151: 74 1e je 107171 <== NEVER TAKEN 107153: 8b 0d 00 62 12 00 mov 0x126200,%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 dc 60 12 00 mov %edx,0x1260dc Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107163: 29 d1 sub %edx,%ecx 107165: 89 0d d8 60 12 00 mov %ecx,0x1260d8 (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 a8 5d 12 00 01 movl $0x1,0x125da8 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 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 106fb0: 68 9f 04 12 00 push $0x12049f <== NOT EXECUTED 106fb5: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 106fb8: e8 6f 17 00 00 call 10872c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 106fbd: 5a pop %edx <== NOT EXECUTED 106fbe: 59 pop %ecx <== NOT EXECUTED 106fbf: 53 push %ebx <== NOT EXECUTED 106fc0: 68 af 04 12 00 push $0x1204af <== NOT EXECUTED 106fc5: e8 62 17 00 00 call 10872c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 106fca: 59 pop %ecx <== NOT EXECUTED 106fcb: 58 pop %eax <== NOT EXECUTED 106fcc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106fcf: 68 cc 04 12 00 push $0x1204cc <== NOT EXECUTED 106fd4: e8 53 17 00 00 call 10872c <== NOT EXECUTED printk( 106fd9: 58 pop %eax <== NOT EXECUTED 106fda: 5a pop %edx <== NOT EXECUTED 106fdb: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 106fde: 68 de 04 12 00 push $0x1204de <== NOT EXECUTED 106fe3: e8 44 17 00 00 call 10872c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 106fe8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 106feb: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 106fee: 50 push %eax <== NOT EXECUTED 106fef: 6a 20 push $0x20 <== NOT EXECUTED 106ff1: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106ff4: e8 8f 37 00 00 call 10a788 <== NOT EXECUTED 106ff9: 5a pop %edx <== NOT EXECUTED 106ffa: 59 pop %ecx <== NOT EXECUTED 106ffb: 50 push %eax <== NOT EXECUTED 106ffc: 68 f2 04 12 00 push $0x1204f2 <== NOT EXECUTED 107001: e8 26 17 00 00 call 10872c <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107006: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10700c: 8b 83 c4 00 00 00 mov 0xc4(%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 08 05 12 00 push $0x120508 <== NOT EXECUTED 10701d: e8 0a 17 00 00 call 10872c <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 107022: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107025: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107028: 84 d2 test %dl,%dl <== NOT EXECUTED 10702a: 75 17 jne 107043 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10702c: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10702f: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107032: 56 push %esi <== NOT EXECUTED 107033: 50 push %eax <== NOT EXECUTED 107034: 6a 10 push $0x10 <== NOT EXECUTED 107036: 68 39 05 12 00 push $0x120539 <== NOT EXECUTED 10703b: e8 ec 16 00 00 call 10872c <== NOT EXECUTED 107040: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107043: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107046: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10704b: e8 ec 3e 00 00 call 10af3c <== NOT EXECUTED =============================================================================== 0010cea0 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10cea0: 55 push %ebp 10cea1: 89 e5 mov %esp,%ebp 10cea3: 57 push %edi 10cea4: 56 push %esi 10cea5: 53 push %ebx 10cea6: 83 ec 1c sub $0x1c,%esp 10cea9: 8b 5d 08 mov 0x8(%ebp),%ebx 10ceac: 8b 4d 0c mov 0xc(%ebp),%ecx 10ceaf: 8b 45 14 mov 0x14(%ebp),%eax 10ceb2: 89 45 e4 mov %eax,-0x1c(%ebp) 10ceb5: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10ceb8: 8b 35 5c 94 12 00 mov 0x12945c,%esi * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10cebe: 9c pushf 10cebf: fa cli 10cec0: 5f pop %edi switch ( the_rwlock->current_state ) { 10cec1: 8b 43 44 mov 0x44(%ebx),%eax 10cec4: 85 c0 test %eax,%eax 10cec6: 74 05 je 10cecd <_CORE_RWLock_Obtain_for_reading+0x2d> 10cec8: 48 dec %eax 10cec9: 75 3a jne 10cf05 <_CORE_RWLock_Obtain_for_reading+0x65> 10cecb: eb 0e jmp 10cedb <_CORE_RWLock_Obtain_for_reading+0x3b> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10cecd: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10ced4: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10ced7: 57 push %edi 10ced8: 9d popf 10ced9: eb 21 jmp 10cefc <_CORE_RWLock_Obtain_for_reading+0x5c> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10cedb: 83 ec 0c sub $0xc,%esp 10cede: 53 push %ebx 10cedf: 88 55 dc mov %dl,-0x24(%ebp) 10cee2: 89 4d e0 mov %ecx,-0x20(%ebp) 10cee5: e8 8a 1a 00 00 call 10e974 <_Thread_queue_First> if ( !waiter ) { 10ceea: 83 c4 10 add $0x10,%esp 10ceed: 85 c0 test %eax,%eax 10ceef: 8a 55 dc mov -0x24(%ebp),%dl 10cef2: 8b 4d e0 mov -0x20(%ebp),%ecx 10cef5: 75 0e jne 10cf05 <_CORE_RWLock_Obtain_for_reading+0x65><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10cef7: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10cefa: 57 push %edi 10cefb: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cefc: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10cf03: eb 48 jmp 10cf4d <_CORE_RWLock_Obtain_for_reading+0xad> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10cf05: 84 d2 test %dl,%dl 10cf07: 75 0b jne 10cf14 <_CORE_RWLock_Obtain_for_reading+0x74> _ISR_Enable( level ); 10cf09: 57 push %edi 10cf0a: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cf0b: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) 10cf12: eb 39 jmp 10cf4d <_CORE_RWLock_Obtain_for_reading+0xad> 10cf14: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10cf1b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10cf1e: 89 4e 20 mov %ecx,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10cf21: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10cf28: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10cf2f: 57 push %edi 10cf30: 9d popf _Thread_queue_Enqueue_with_handler( 10cf31: c7 45 10 7c d0 10 00 movl $0x10d07c,0x10(%ebp) 10cf38: 8b 45 e4 mov -0x1c(%ebp),%eax 10cf3b: 89 45 0c mov %eax,0xc(%ebp) 10cf3e: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf41: 8d 65 f4 lea -0xc(%ebp),%esp 10cf44: 5b pop %ebx 10cf45: 5e pop %esi 10cf46: 5f pop %edi 10cf47: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10cf48: e9 4f 17 00 00 jmp 10e69c <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10cf4d: 8d 65 f4 lea -0xc(%ebp),%esp 10cf50: 5b pop %ebx 10cf51: 5e pop %esi 10cf52: 5f pop %edi 10cf53: c9 leave 10cf54: c3 ret =============================================================================== 0010cfdc <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10cfdc: 55 push %ebp 10cfdd: 89 e5 mov %esp,%ebp 10cfdf: 53 push %ebx 10cfe0: 83 ec 04 sub $0x4,%esp 10cfe3: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10cfe6: 8b 15 5c 94 12 00 mov 0x12945c,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10cfec: 9c pushf 10cfed: fa cli 10cfee: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10cfef: 8b 4b 44 mov 0x44(%ebx),%ecx 10cff2: 85 c9 test %ecx,%ecx 10cff4: 75 0b jne 10d001 <_CORE_RWLock_Release+0x25><== NEVER TAKEN _ISR_Enable( level ); 10cff6: 50 push %eax 10cff7: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10cff8: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10cfff: eb 72 jmp 10d073 <_CORE_RWLock_Release+0x97> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10d001: 49 dec %ecx 10d002: 75 0f jne 10d013 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10d004: 8b 4b 48 mov 0x48(%ebx),%ecx 10d007: 49 dec %ecx 10d008: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10d00b: 85 c9 test %ecx,%ecx 10d00d: 74 04 je 10d013 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10d00f: 50 push %eax 10d010: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10d011: eb 60 jmp 10d073 <_CORE_RWLock_Release+0x97> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10d013: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10d01a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10d021: 50 push %eax 10d022: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10d023: 83 ec 0c sub $0xc,%esp 10d026: 53 push %ebx 10d027: e8 6c 15 00 00 call 10e598 <_Thread_queue_Dequeue> if ( next ) { 10d02c: 83 c4 10 add $0x10,%esp 10d02f: 85 c0 test %eax,%eax 10d031: 74 40 je 10d073 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10d033: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d037: 75 09 jne 10d042 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10d039: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10d040: eb 31 jmp 10d073 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10d042: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10d045: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10d04c: 83 ec 0c sub $0xc,%esp 10d04f: 53 push %ebx 10d050: e8 1f 19 00 00 call 10e974 <_Thread_queue_First> if ( !next || 10d055: 83 c4 10 add $0x10,%esp 10d058: 85 c0 test %eax,%eax 10d05a: 74 17 je 10d073 <_CORE_RWLock_Release+0x97> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10d05c: 83 78 30 01 cmpl $0x1,0x30(%eax) 10d060: 74 11 je 10d073 <_CORE_RWLock_Release+0x97><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10d062: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10d065: 52 push %edx 10d066: 52 push %edx 10d067: 50 push %eax 10d068: 53 push %ebx 10d069: e8 f6 17 00 00 call 10e864 <_Thread_queue_Extract> } 10d06e: 83 c4 10 add $0x10,%esp 10d071: eb d9 jmp 10d04c <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10d073: 31 c0 xor %eax,%eax 10d075: 8b 5d fc mov -0x4(%ebp),%ebx 10d078: c9 leave 10d079: c3 ret =============================================================================== 0010d07c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10d07c: 55 push %ebp 10d07d: 89 e5 mov %esp,%ebp 10d07f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d082: 8d 45 f4 lea -0xc(%ebp),%eax 10d085: 50 push %eax 10d086: ff 75 08 pushl 0x8(%ebp) 10d089: e8 7a 11 00 00 call 10e208 <_Thread_Get> switch ( location ) { 10d08e: 83 c4 10 add $0x10,%esp 10d091: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d095: 75 17 jne 10d0ae <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10d097: 83 ec 0c sub $0xc,%esp 10d09a: 50 push %eax 10d09b: e8 94 19 00 00 call 10ea34 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d0a0: a1 a0 93 12 00 mov 0x1293a0,%eax 10d0a5: 48 dec %eax 10d0a6: a3 a0 93 12 00 mov %eax,0x1293a0 10d0ab: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d0ae: c9 leave 10d0af: c3 ret =============================================================================== 00117ab0 <_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 ) { 117ab0: 55 push %ebp 117ab1: 89 e5 mov %esp,%ebp 117ab3: 57 push %edi 117ab4: 56 push %esi 117ab5: 53 push %ebx 117ab6: 83 ec 1c sub $0x1c,%esp 117ab9: 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 ) { 117abc: b8 01 00 00 00 mov $0x1,%eax 117ac1: 8b 55 10 mov 0x10(%ebp),%edx 117ac4: 3b 53 4c cmp 0x4c(%ebx),%edx 117ac7: 77 4c ja 117b15 <_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))) { 117ac9: 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 ) { 117ad0: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117ad4: 74 23 je 117af9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117ad6: 8b 45 1c mov 0x1c(%ebp),%eax 117ad9: c7 00 00 00 00 00 movl $0x0,(%eax) 117adf: eb 32 jmp 117b13 <_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; 117ae1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117ae4: 8b 42 2c mov 0x2c(%edx),%eax 117ae7: 89 c7 mov %eax,%edi 117ae9: 8b 75 0c mov 0xc(%ebp),%esi 117aec: 8b 4d 10 mov 0x10(%ebp),%ecx 117aef: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117af1: 8b 42 28 mov 0x28(%edx),%eax 117af4: 8b 55 10 mov 0x10(%ebp),%edx 117af7: 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))) { 117af9: 83 ec 0c sub $0xc,%esp 117afc: 53 push %ebx 117afd: e8 c2 21 00 00 call 119cc4 <_Thread_queue_Dequeue> 117b02: 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 = 117b04: 83 c4 10 add $0x10,%esp 117b07: 85 c0 test %eax,%eax 117b09: 75 d6 jne 117ae1 <_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; 117b0b: 8b 55 e4 mov -0x1c(%ebp),%edx 117b0e: 8b 45 1c mov 0x1c(%ebp),%eax 117b11: 89 10 mov %edx,(%eax) 117b13: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117b15: 8d 65 f4 lea -0xc(%ebp),%esp 117b18: 5b pop %ebx 117b19: 5e pop %esi 117b1a: 5f pop %edi 117b1b: c9 leave 117b1c: c3 ret =============================================================================== 00112920 <_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 ) { 112920: 55 push %ebp 112921: 89 e5 mov %esp,%ebp 112923: 57 push %edi 112924: 56 push %esi 112925: 53 push %ebx 112926: 83 ec 0c sub $0xc,%esp 112929: 8b 5d 08 mov 0x8(%ebp),%ebx 11292c: 8b 75 10 mov 0x10(%ebp),%esi 11292f: 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; 112932: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112935: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 11293c: 89 53 4c mov %edx,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 11293f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 112946: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 11294d: 89 d0 mov %edx,%eax 11294f: f6 c2 03 test $0x3,%dl 112952: 74 0a je 11295e <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 112954: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 112957: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 11295a: 39 d0 cmp %edx,%eax 11295c: 72 5f jb 1129bd <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 11295e: 8d 78 14 lea 0x14(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 112961: 89 fa mov %edi,%edx 112963: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112966: 39 c2 cmp %eax,%edx 112968: 72 53 jb 1129bd <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11296a: 83 ec 0c sub $0xc,%esp 11296d: 52 push %edx 11296e: e8 91 26 00 00 call 115004 <_Workspace_Allocate> 112973: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112976: 83 c4 10 add $0x10,%esp 112979: 85 c0 test %eax,%eax 11297b: 74 40 je 1129bd <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11297d: 57 push %edi 11297e: 56 push %esi 11297f: 50 push %eax 112980: 8d 43 68 lea 0x68(%ebx),%eax 112983: 50 push %eax 112984: e8 eb 52 00 00 call 117c74 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 112989: 8d 43 54 lea 0x54(%ebx),%eax 11298c: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 11298f: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 112996: 8d 43 50 lea 0x50(%ebx),%eax 112999: 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( 11299c: 6a 06 push $0x6 11299e: 68 80 00 00 00 push $0x80 1129a3: 8b 45 0c mov 0xc(%ebp),%eax 1129a6: 83 38 01 cmpl $0x1,(%eax) 1129a9: 0f 94 c0 sete %al 1129ac: 0f b6 c0 movzbl %al,%eax 1129af: 50 push %eax 1129b0: 53 push %ebx 1129b1: e8 26 1d 00 00 call 1146dc <_Thread_queue_Initialize> 1129b6: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1129b8: 83 c4 20 add $0x20,%esp 1129bb: eb 02 jmp 1129bf <_CORE_message_queue_Initialize+0x9f> 1129bd: 31 c0 xor %eax,%eax } 1129bf: 8d 65 f4 lea -0xc(%ebp),%esp 1129c2: 5b pop %ebx 1129c3: 5e pop %esi 1129c4: 5f pop %edi 1129c5: c9 leave 1129c6: c3 ret =============================================================================== 001129c8 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1129c8: 55 push %ebp 1129c9: 89 e5 mov %esp,%ebp 1129cb: 57 push %edi 1129cc: 56 push %esi 1129cd: 53 push %ebx 1129ce: 83 ec 2c sub $0x2c,%esp 1129d1: 8b 55 08 mov 0x8(%ebp),%edx 1129d4: 8b 45 0c mov 0xc(%ebp),%eax 1129d7: 89 45 dc mov %eax,-0x24(%ebp) 1129da: 8b 5d 10 mov 0x10(%ebp),%ebx 1129dd: 89 5d e0 mov %ebx,-0x20(%ebp) 1129e0: 8b 4d 14 mov 0x14(%ebp),%ecx 1129e3: 8b 75 1c mov 0x1c(%ebp),%esi 1129e6: 89 75 d4 mov %esi,-0x2c(%ebp) 1129e9: 8a 45 18 mov 0x18(%ebp),%al 1129ec: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1129ef: a1 34 e4 12 00 mov 0x12e434,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1129f4: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 1129fb: 9c pushf 1129fc: fa cli 1129fd: 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)); 112a00: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112a03: 8d 72 54 lea 0x54(%edx),%esi 112a06: 39 f3 cmp %esi,%ebx 112a08: 0f 84 8a 00 00 00 je 112a98 <_CORE_message_queue_Seize+0xd0> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112a0e: 8b 33 mov (%ebx),%esi the_chain->first = new_first; 112a10: 89 72 50 mov %esi,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 112a13: 8d 7a 50 lea 0x50(%edx),%edi 112a16: 89 7e 04 mov %edi,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 112a19: 85 db test %ebx,%ebx 112a1b: 74 7b je 112a98 <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 112a1d: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 112a20: ff 75 e4 pushl -0x1c(%ebp) 112a23: 9d popf *size_p = the_message->Contents.size; 112a24: 8b 43 0c mov 0xc(%ebx),%eax 112a27: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 112a29: 8b 73 08 mov 0x8(%ebx),%esi 112a2c: a1 34 e4 12 00 mov 0x12e434,%eax 112a31: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112a34: 8d 73 10 lea 0x10(%ebx),%esi 112a37: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112a3a: 8b 09 mov (%ecx),%ecx 112a3c: 8b 7d e0 mov -0x20(%ebp),%edi 112a3f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 112a41: 83 ec 0c sub $0xc,%esp 112a44: 52 push %edx 112a45: 89 55 d0 mov %edx,-0x30(%ebp) 112a48: e8 73 19 00 00 call 1143c0 <_Thread_queue_Dequeue> if ( !the_thread ) { 112a4d: 83 c4 10 add $0x10,%esp 112a50: 85 c0 test %eax,%eax 112a52: 8b 55 d0 mov -0x30(%ebp),%edx 112a55: 75 15 jne 112a6c <_CORE_message_queue_Seize+0xa4> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 112a57: 89 5d 0c mov %ebx,0xc(%ebp) 112a5a: 83 c2 68 add $0x68,%edx 112a5d: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112a60: 8d 65 f4 lea -0xc(%ebp),%esp 112a63: 5b pop %ebx 112a64: 5e pop %esi 112a65: 5f pop %edi 112a66: c9 leave 112a67: e9 34 fe ff ff jmp 1128a0 <_Chain_Append> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112a6c: 8b 48 24 mov 0x24(%eax),%ecx 112a6f: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 112a72: 8b 48 30 mov 0x30(%eax),%ecx 112a75: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112a78: 8b 70 2c mov 0x2c(%eax),%esi 112a7b: 8b 7d e4 mov -0x1c(%ebp),%edi 112a7e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112a80: 8b 43 08 mov 0x8(%ebx),%eax 112a83: 89 45 10 mov %eax,0x10(%ebp) 112a86: 89 5d 0c mov %ebx,0xc(%ebp) 112a89: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112a8c: 8d 65 f4 lea -0xc(%ebp),%esp 112a8f: 5b pop %ebx 112a90: 5e pop %esi 112a91: 5f pop %edi 112a92: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 112a93: e9 fc 52 00 00 jmp 117d94 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 112a98: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 112a9c: 75 13 jne 112ab1 <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 112a9e: ff 75 e4 pushl -0x1c(%ebp) 112aa1: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112aa2: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112aa9: 8d 65 f4 lea -0xc(%ebp),%esp 112aac: 5b pop %ebx 112aad: 5e pop %esi 112aae: 5f pop %edi 112aaf: c9 leave 112ab0: 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; 112ab1: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 112ab8: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 112abb: 8b 5d dc mov -0x24(%ebp),%ebx 112abe: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 112ac1: 8b 75 e0 mov -0x20(%ebp),%esi 112ac4: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 112ac7: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112aca: ff 75 e4 pushl -0x1c(%ebp) 112acd: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112ace: c7 45 10 80 47 11 00 movl $0x114780,0x10(%ebp) 112ad5: 8b 45 d4 mov -0x2c(%ebp),%eax 112ad8: 89 45 0c mov %eax,0xc(%ebp) 112adb: 89 55 08 mov %edx,0x8(%ebp) } 112ade: 8d 65 f4 lea -0xc(%ebp),%esp 112ae1: 5b pop %ebx 112ae2: 5e pop %esi 112ae3: 5f pop %edi 112ae4: 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 ); 112ae5: e9 da 19 00 00 jmp 1144c4 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010b095 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b095: 55 push %ebp 10b096: 89 e5 mov %esp,%ebp 10b098: 53 push %ebx 10b099: 83 ec 14 sub $0x14,%esp 10b09c: 8b 5d 08 mov 0x8(%ebp),%ebx 10b09f: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b0a2: a1 08 62 12 00 mov 0x126208,%eax 10b0a7: 85 c0 test %eax,%eax 10b0a9: 74 19 je 10b0c4 <_CORE_mutex_Seize+0x2f> 10b0ab: 84 d2 test %dl,%dl 10b0ad: 74 15 je 10b0c4 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10b0af: 83 3d a0 63 12 00 01 cmpl $0x1,0x1263a0 10b0b6: 76 0c jbe 10b0c4 <_CORE_mutex_Seize+0x2f> 10b0b8: 53 push %ebx 10b0b9: 6a 13 push $0x13 10b0bb: 6a 00 push $0x0 10b0bd: 6a 00 push $0x0 10b0bf: e8 bc 05 00 00 call 10b680 <_Internal_error_Occurred> 10b0c4: 51 push %ecx 10b0c5: 51 push %ecx 10b0c6: 8d 45 18 lea 0x18(%ebp),%eax 10b0c9: 50 push %eax 10b0ca: 53 push %ebx 10b0cb: 88 55 f4 mov %dl,-0xc(%ebp) 10b0ce: e8 55 50 00 00 call 110128 <_CORE_mutex_Seize_interrupt_trylock> 10b0d3: 83 c4 10 add $0x10,%esp 10b0d6: 85 c0 test %eax,%eax 10b0d8: 8a 55 f4 mov -0xc(%ebp),%dl 10b0db: 74 48 je 10b125 <_CORE_mutex_Seize+0x90> 10b0dd: 84 d2 test %dl,%dl 10b0df: 75 12 jne 10b0f3 <_CORE_mutex_Seize+0x5e> 10b0e1: ff 75 18 pushl 0x18(%ebp) 10b0e4: 9d popf 10b0e5: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0ea: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b0f1: eb 32 jmp 10b125 <_CORE_mutex_Seize+0x90> 10b0f3: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b0fa: a1 c4 62 12 00 mov 0x1262c4,%eax 10b0ff: 89 58 44 mov %ebx,0x44(%eax) 10b102: 8b 55 0c mov 0xc(%ebp),%edx 10b105: 89 50 20 mov %edx,0x20(%eax) 10b108: a1 08 62 12 00 mov 0x126208,%eax 10b10d: 40 inc %eax 10b10e: a3 08 62 12 00 mov %eax,0x126208 10b113: ff 75 18 pushl 0x18(%ebp) 10b116: 9d popf 10b117: 50 push %eax 10b118: 50 push %eax 10b119: ff 75 14 pushl 0x14(%ebp) 10b11c: 53 push %ebx 10b11d: e8 26 ff ff ff call 10b048 <_CORE_mutex_Seize_interrupt_blocking> 10b122: 83 c4 10 add $0x10,%esp } 10b125: 8b 5d fc mov -0x4(%ebp),%ebx 10b128: c9 leave 10b129: c3 ret =============================================================================== 0010b258 <_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 ) { 10b258: 55 push %ebp 10b259: 89 e5 mov %esp,%ebp 10b25b: 53 push %ebx 10b25c: 83 ec 10 sub $0x10,%esp 10b25f: 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)) ) { 10b262: 53 push %ebx 10b263: e8 68 14 00 00 call 10c6d0 <_Thread_queue_Dequeue> 10b268: 89 c2 mov %eax,%edx 10b26a: 83 c4 10 add $0x10,%esp 10b26d: 31 c0 xor %eax,%eax 10b26f: 85 d2 test %edx,%edx 10b271: 75 15 jne 10b288 <_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 ); 10b273: 9c pushf 10b274: fa cli 10b275: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b276: 8b 53 48 mov 0x48(%ebx),%edx 10b279: b0 04 mov $0x4,%al 10b27b: 3b 53 40 cmp 0x40(%ebx),%edx 10b27e: 73 06 jae 10b286 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b280: 42 inc %edx 10b281: 89 53 48 mov %edx,0x48(%ebx) 10b284: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b286: 51 push %ecx 10b287: 9d popf } return status; } 10b288: 8b 5d fc mov -0x4(%ebp),%ebx 10b28b: c9 leave 10b28c: c3 ret =============================================================================== 0010a070 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a070: 55 push %ebp 10a071: 89 e5 mov %esp,%ebp 10a073: 57 push %edi 10a074: 56 push %esi 10a075: 53 push %ebx 10a076: 83 ec 1c sub $0x1c,%esp 10a079: 8b 45 08 mov 0x8(%ebp),%eax 10a07c: 8b 75 0c mov 0xc(%ebp),%esi 10a07f: 8b 55 10 mov 0x10(%ebp),%edx 10a082: 89 55 dc mov %edx,-0x24(%ebp) 10a085: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a088: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a095: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi _ISR_Disable( level ); 10a09b: 9c pushf 10a09c: fa cli 10a09d: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0a0: 8b 17 mov (%edi),%edx 10a0a2: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0a5: 21 c2 and %eax,%edx 10a0a7: 74 1b je 10a0c4 <_Event_Seize+0x54> 10a0a9: 39 c2 cmp %eax,%edx 10a0ab: 74 08 je 10a0b5 <_Event_Seize+0x45> 10a0ad: f7 c6 02 00 00 00 test $0x2,%esi 10a0b3: 74 0f je 10a0c4 <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0b5: 89 d0 mov %edx,%eax 10a0b7: f7 d0 not %eax 10a0b9: 23 45 e0 and -0x20(%ebp),%eax 10a0bc: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0be: ff 75 e4 pushl -0x1c(%ebp) 10a0c1: 9d popf 10a0c2: eb 13 jmp 10a0d7 <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0c4: f7 c6 01 00 00 00 test $0x1,%esi 10a0ca: 74 12 je 10a0de <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0cc: ff 75 e4 pushl -0x1c(%ebp) 10a0cf: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0d0: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0d7: 89 11 mov %edx,(%ecx) return; 10a0d9: e9 91 00 00 00 jmp 10a16f <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10a0de: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0e1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0e4: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0e7: c7 05 48 6b 12 00 01 movl $0x1,0x126b48 10a0ee: 00 00 00 _ISR_Enable( level ); 10a0f1: ff 75 e4 pushl -0x1c(%ebp) 10a0f4: 9d popf if ( ticks ) { 10a0f5: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a0f9: 74 34 je 10a12f <_Event_Seize+0xbf> _Watchdog_Initialize( 10a0fb: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a0fe: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a105: c7 43 64 ac a2 10 00 movl $0x10a2ac,0x64(%ebx) the_watchdog->id = id; 10a10c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a10f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a116: 8b 45 dc mov -0x24(%ebp),%eax 10a119: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a11c: 52 push %edx 10a11d: 52 push %edx 10a11e: 8d 43 48 lea 0x48(%ebx),%eax 10a121: 50 push %eax 10a122: 68 e4 62 12 00 push $0x1262e4 10a127: e8 d4 2f 00 00 call 10d100 <_Watchdog_Insert> 10a12c: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a12f: 50 push %eax 10a130: 50 push %eax 10a131: 68 00 01 00 00 push $0x100 10a136: 53 push %ebx 10a137: e8 f0 29 00 00 call 10cb2c <_Thread_Set_state> _ISR_Disable( level ); 10a13c: 9c pushf 10a13d: fa cli 10a13e: 5a pop %edx sync_state = _Event_Sync_state; 10a13f: a1 48 6b 12 00 mov 0x126b48,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a144: c7 05 48 6b 12 00 00 movl $0x0,0x126b48 10a14b: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a14e: 83 c4 10 add $0x10,%esp 10a151: 83 f8 01 cmp $0x1,%eax 10a154: 75 04 jne 10a15a <_Event_Seize+0xea> _ISR_Enable( level ); 10a156: 52 push %edx 10a157: 9d popf 10a158: eb 15 jmp 10a16f <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a15a: 89 55 10 mov %edx,0x10(%ebp) 10a15d: 89 5d 0c mov %ebx,0xc(%ebp) 10a160: 89 45 08 mov %eax,0x8(%ebp) } 10a163: 8d 65 f4 lea -0xc(%ebp),%esp 10a166: 5b pop %ebx 10a167: 5e pop %esi 10a168: 5f pop %edi 10a169: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a16a: e9 c5 1c 00 00 jmp 10be34 <_Thread_blocking_operation_Cancel> } 10a16f: 8d 65 f4 lea -0xc(%ebp),%esp 10a172: 5b pop %ebx 10a173: 5e pop %esi 10a174: 5f pop %edi 10a175: c9 leave 10a176: c3 ret =============================================================================== 0010a1c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1c4: 55 push %ebp 10a1c5: 89 e5 mov %esp,%ebp 10a1c7: 57 push %edi 10a1c8: 56 push %esi 10a1c9: 53 push %ebx 10a1ca: 83 ec 2c sub $0x2c,%esp 10a1cd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10a1d0: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1d6: 8b 43 30 mov 0x30(%ebx),%eax 10a1d9: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1dc: 9c pushf 10a1dd: fa cli 10a1de: 58 pop %eax pending_events = api->pending_events; 10a1df: 8b 17 mov (%edi),%edx 10a1e1: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1e4: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10a1e7: 21 f2 and %esi,%edx 10a1e9: 75 07 jne 10a1f2 <_Event_Surrender+0x2e> _ISR_Enable( level ); 10a1eb: 50 push %eax 10a1ec: 9d popf return; 10a1ed: e9 b0 00 00 00 jmp 10a2a2 <_Event_Surrender+0xde> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a1f2: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10a1f8: 85 c9 test %ecx,%ecx 10a1fa: 74 49 je 10a245 <_Event_Surrender+0x81> 10a1fc: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 10a202: 75 41 jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a204: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a20a: 83 f9 02 cmp $0x2,%ecx 10a20d: 74 09 je 10a218 <_Event_Surrender+0x54> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a20f: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10a215: 49 dec %ecx 10a216: 75 2d jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a218: 39 f2 cmp %esi,%edx 10a21a: 74 06 je 10a222 <_Event_Surrender+0x5e> 10a21c: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a220: 74 1f je 10a241 <_Event_Surrender+0x7d> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a222: 89 d6 mov %edx,%esi 10a224: f7 d6 not %esi 10a226: 23 75 d4 and -0x2c(%ebp),%esi 10a229: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a22b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a232: 8b 4b 28 mov 0x28(%ebx),%ecx 10a235: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a237: c7 05 48 6b 12 00 03 movl $0x3,0x126b48 10a23e: 00 00 00 } _ISR_Enable( level ); 10a241: 50 push %eax 10a242: 9d popf return; 10a243: eb 5d jmp 10a2a2 <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a245: f6 43 11 01 testb $0x1,0x11(%ebx) 10a249: 74 55 je 10a2a0 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a24b: 39 f2 cmp %esi,%edx 10a24d: 74 06 je 10a255 <_Event_Surrender+0x91> 10a24f: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a253: 74 4b je 10a2a0 <_Event_Surrender+0xdc> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a255: 89 d6 mov %edx,%esi 10a257: f7 d6 not %esi 10a259: 23 75 d4 and -0x2c(%ebp),%esi 10a25c: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a25e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a265: 8b 4b 28 mov 0x28(%ebx),%ecx 10a268: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a26a: 50 push %eax 10a26b: 9d popf 10a26c: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a26d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a271: 74 06 je 10a279 <_Event_Surrender+0xb5> _ISR_Enable( level ); 10a273: 50 push %eax 10a274: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a275: 51 push %ecx 10a276: 51 push %ecx 10a277: eb 17 jmp 10a290 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a279: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a280: 50 push %eax 10a281: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a282: 83 ec 0c sub $0xc,%esp 10a285: 8d 43 48 lea 0x48(%ebx),%eax 10a288: 50 push %eax 10a289: e8 8a 2f 00 00 call 10d218 <_Watchdog_Remove> 10a28e: 58 pop %eax 10a28f: 5a pop %edx 10a290: 68 f8 ff 03 10 push $0x1003fff8 10a295: 53 push %ebx 10a296: e8 05 1d 00 00 call 10bfa0 <_Thread_Clear_state> 10a29b: 83 c4 10 add $0x10,%esp 10a29e: eb 02 jmp 10a2a2 <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2a0: 50 push %eax 10a2a1: 9d popf } 10a2a2: 8d 65 f4 lea -0xc(%ebp),%esp 10a2a5: 5b pop %ebx 10a2a6: 5e pop %esi 10a2a7: 5f pop %edi 10a2a8: c9 leave 10a2a9: c3 ret =============================================================================== 0010a2ac <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2ac: 55 push %ebp 10a2ad: 89 e5 mov %esp,%ebp 10a2af: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2b2: 8d 45 f4 lea -0xc(%ebp),%eax 10a2b5: 50 push %eax 10a2b6: ff 75 08 pushl 0x8(%ebp) 10a2b9: e8 82 20 00 00 call 10c340 <_Thread_Get> switch ( location ) { 10a2be: 83 c4 10 add $0x10,%esp 10a2c1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2c5: 75 49 jne 10a310 <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10a2c7: 9c pushf 10a2c8: fa cli 10a2c9: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2ca: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2d1: 3b 05 c4 62 12 00 cmp 0x1262c4,%eax 10a2d7: 75 13 jne 10a2ec <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2d9: 8b 0d 48 6b 12 00 mov 0x126b48,%ecx 10a2df: 49 dec %ecx 10a2e0: 75 0a jne 10a2ec <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2e2: c7 05 48 6b 12 00 02 movl $0x2,0x126b48 10a2e9: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a2ec: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a2f3: 52 push %edx 10a2f4: 9d popf 10a2f5: 52 push %edx 10a2f6: 52 push %edx 10a2f7: 68 f8 ff 03 10 push $0x1003fff8 10a2fc: 50 push %eax 10a2fd: e8 9e 1c 00 00 call 10bfa0 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a302: a1 08 62 12 00 mov 0x126208,%eax 10a307: 48 dec %eax 10a308: a3 08 62 12 00 mov %eax,0x126208 10a30d: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a310: c9 leave 10a311: c3 ret =============================================================================== 00110264 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110264: 55 push %ebp 110265: 89 e5 mov %esp,%ebp 110267: 57 push %edi 110268: 56 push %esi 110269: 53 push %ebx 11026a: 83 ec 2c sub $0x2c,%esp 11026d: 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; 110270: 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; 110273: 8b 46 10 mov 0x10(%esi),%eax 110276: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110279: 8b 45 0c mov 0xc(%ebp),%eax 11027c: 83 c0 04 add $0x4,%eax 11027f: 89 45 cc mov %eax,-0x34(%ebp) 110282: 0f 82 2f 01 00 00 jb 1103b7 <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110288: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 11028c: 74 18 je 1102a6 <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 11028e: 8b 45 0c mov 0xc(%ebp),%eax 110291: 39 45 14 cmp %eax,0x14(%ebp) 110294: 0f 82 1d 01 00 00 jb 1103b7 <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 11029a: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11029e: 75 06 jne 1102a6 <_Heap_Allocate_aligned_with_boundary+0x42> 1102a0: 8b 45 e0 mov -0x20(%ebp),%eax 1102a3: 89 45 10 mov %eax,0x10(%ebp) 1102a6: 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; 1102ad: 8b 45 e0 mov -0x20(%ebp),%eax 1102b0: 83 c0 07 add $0x7,%eax 1102b3: 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; 1102b6: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 1102bd: 8b 45 0c mov 0xc(%ebp),%eax 1102c0: 29 45 d8 sub %eax,-0x28(%ebp) 1102c3: 89 f7 mov %esi,%edi 1102c5: e9 ba 00 00 00 jmp 110384 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 1102ca: 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 ) { 1102cd: 8b 59 04 mov 0x4(%ecx),%ebx 1102d0: 3b 5d cc cmp -0x34(%ebp),%ebx 1102d3: 0f 86 a8 00 00 00 jbe 110381 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 1102d9: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1102dd: 8d 41 08 lea 0x8(%ecx),%eax 1102e0: 89 45 dc mov %eax,-0x24(%ebp) 1102e3: 75 07 jne 1102ec <_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; 1102e5: 89 c3 mov %eax,%ebx 1102e7: e9 91 00 00 00 jmp 11037d <_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; 1102ec: 8b 47 14 mov 0x14(%edi),%eax 1102ef: 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; 1102f2: 83 e3 fe and $0xfffffffe,%ebx 1102f5: 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; 1102f8: 8b 75 c8 mov -0x38(%ebp),%esi 1102fb: 29 c6 sub %eax,%esi 1102fd: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1102ff: 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); 110302: 89 d8 mov %ebx,%eax 110304: 31 d2 xor %edx,%edx 110306: f7 75 10 divl 0x10(%ebp) 110309: 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 ) { 11030b: 39 f3 cmp %esi,%ebx 11030d: 76 0b jbe 11031a <_Heap_Allocate_aligned_with_boundary+0xb6> 11030f: 89 f0 mov %esi,%eax 110311: 31 d2 xor %edx,%edx 110313: f7 75 10 divl 0x10(%ebp) 110316: 89 f3 mov %esi,%ebx 110318: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11031a: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 11031e: 74 3f je 11035f <_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; 110320: 8b 45 0c mov 0xc(%ebp),%eax 110323: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110326: 8b 45 dc mov -0x24(%ebp),%eax 110329: 03 45 0c add 0xc(%ebp),%eax 11032c: 89 45 d0 mov %eax,-0x30(%ebp) 11032f: eb 19 jmp 11034a <_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 ) { 110331: 3b 55 d0 cmp -0x30(%ebp),%edx 110334: 72 4b jb 110381 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 110336: 89 d3 mov %edx,%ebx 110338: 2b 5d 0c sub 0xc(%ebp),%ebx 11033b: 89 d8 mov %ebx,%eax 11033d: 31 d2 xor %edx,%edx 11033f: f7 75 10 divl 0x10(%ebp) 110342: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110344: 8b 45 0c mov 0xc(%ebp),%eax 110347: 8d 34 03 lea (%ebx,%eax,1),%esi 11034a: 89 f0 mov %esi,%eax 11034c: 31 d2 xor %edx,%edx 11034e: f7 75 14 divl 0x14(%ebp) 110351: 89 f0 mov %esi,%eax 110353: 29 d0 sub %edx,%eax 110355: 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 ) { 110357: 39 f0 cmp %esi,%eax 110359: 73 04 jae 11035f <_Heap_Allocate_aligned_with_boundary+0xfb> 11035b: 39 c3 cmp %eax,%ebx 11035d: 72 d2 jb 110331 <_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 ) { 11035f: 3b 5d dc cmp -0x24(%ebp),%ebx 110362: 72 1d jb 110381 <_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; 110364: be f8 ff ff ff mov $0xfffffff8,%esi 110369: 29 ce sub %ecx,%esi 11036b: 01 de add %ebx,%esi 11036d: 89 d8 mov %ebx,%eax 11036f: 31 d2 xor %edx,%edx 110371: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 110374: 29 d6 sub %edx,%esi 110376: 74 05 je 11037d <_Heap_Allocate_aligned_with_boundary+0x119> 110378: 3b 75 d4 cmp -0x2c(%ebp),%esi 11037b: 72 04 jb 110381 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 11037d: 85 db test %ebx,%ebx 11037f: 75 11 jne 110392 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 110381: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110384: 39 f9 cmp %edi,%ecx 110386: 0f 85 3e ff ff ff jne 1102ca <_Heap_Allocate_aligned_with_boundary+0x66> 11038c: 89 fe mov %edi,%esi 11038e: 31 db xor %ebx,%ebx 110390: eb 16 jmp 1103a8 <_Heap_Allocate_aligned_with_boundary+0x144> 110392: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110394: 8b 45 e4 mov -0x1c(%ebp),%eax 110397: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 11039a: ff 75 0c pushl 0xc(%ebp) 11039d: 53 push %ebx 11039e: 51 push %ecx 11039f: 57 push %edi 1103a0: e8 ff b1 ff ff call 10b5a4 <_Heap_Block_allocate> 1103a5: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 1103a8: 8b 45 e4 mov -0x1c(%ebp),%eax 1103ab: 39 46 44 cmp %eax,0x44(%esi) 1103ae: 73 03 jae 1103b3 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 1103b0: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 1103b3: 89 d8 mov %ebx,%eax 1103b5: eb 02 jmp 1103b9 <_Heap_Allocate_aligned_with_boundary+0x155> 1103b7: 31 c0 xor %eax,%eax } 1103b9: 8d 65 f4 lea -0xc(%ebp),%esp 1103bc: 5b pop %ebx 1103bd: 5e pop %esi 1103be: 5f pop %edi 1103bf: c9 leave 1103c0: c3 ret =============================================================================== 001136ac <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 1136ac: 55 push %ebp 1136ad: 89 e5 mov %esp,%ebp 1136af: 56 push %esi 1136b0: 53 push %ebx 1136b1: 8b 4d 08 mov 0x8(%ebp),%ecx 1136b4: 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; 1136b7: 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; 1136ba: 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 ) { 1136bd: 39 f2 cmp %esi,%edx 1136bf: 73 0a jae 1136cb <_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; 1136c1: b8 01 00 00 00 mov $0x1,%eax 1136c6: 3b 51 18 cmp 0x18(%ecx),%edx 1136c9: 73 5f jae 11372a <_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 ) { 1136cb: b8 02 00 00 00 mov $0x2,%eax 1136d0: 39 f2 cmp %esi,%edx 1136d2: 75 56 jne 11372a <_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; 1136d4: 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; 1136d7: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 1136da: 29 da sub %ebx,%edx 1136dc: 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); 1136df: 89 f0 mov %esi,%eax 1136e1: 31 d2 xor %edx,%edx 1136e3: f7 71 10 divl 0x10(%ecx) 1136e6: 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; 1136e8: 8b 45 14 mov 0x14(%ebp),%eax 1136eb: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1136ed: 31 c0 xor %eax,%eax 1136ef: 3b 71 14 cmp 0x14(%ecx),%esi 1136f2: 72 36 jb 11372a <_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); 1136f4: 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; 1136f7: 8b 43 04 mov 0x4(%ebx),%eax 1136fa: 83 e0 01 and $0x1,%eax 1136fd: 09 f0 or %esi,%eax 1136ff: 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 = 113702: 8b 41 20 mov 0x20(%ecx),%eax 113705: 29 d0 sub %edx,%eax 113707: 83 c8 01 or $0x1,%eax 11370a: 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; 11370d: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 113710: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 113713: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 113716: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 113719: 50 push %eax 11371a: 50 push %eax 11371b: 83 c3 08 add $0x8,%ebx 11371e: 53 push %ebx 11371f: 51 push %ecx 113720: e8 6f a8 ff ff call 10df94 <_Heap_Free> 113725: 31 c0 xor %eax,%eax 113727: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 11372a: 8d 65 f8 lea -0x8(%ebp),%esp 11372d: 5b pop %ebx 11372e: 5e pop %esi 11372f: c9 leave 113730: c3 ret =============================================================================== 001103c4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 1103c4: 55 push %ebp 1103c5: 89 e5 mov %esp,%ebp 1103c7: 57 push %edi 1103c8: 56 push %esi 1103c9: 53 push %ebx 1103ca: 83 ec 14 sub $0x14,%esp 1103cd: 8b 4d 08 mov 0x8(%ebp),%ecx 1103d0: 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 ) 1103d3: 8d 58 f8 lea -0x8(%eax),%ebx 1103d6: 31 d2 xor %edx,%edx 1103d8: f7 71 10 divl 0x10(%ecx) 1103db: 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; 1103dd: 8b 41 20 mov 0x20(%ecx),%eax 1103e0: 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 1103e3: 31 c0 xor %eax,%eax 1103e5: 3b 5d f0 cmp -0x10(%ebp),%ebx 1103e8: 72 08 jb 1103f2 <_Heap_Free+0x2e> 1103ea: 31 c0 xor %eax,%eax 1103ec: 39 59 24 cmp %ebx,0x24(%ecx) 1103ef: 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 ) ) { 1103f2: 85 c0 test %eax,%eax 1103f4: 0f 84 2d 01 00 00 je 110527 <_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; 1103fa: 8b 7b 04 mov 0x4(%ebx),%edi 1103fd: 89 fa mov %edi,%edx 1103ff: 83 e2 fe and $0xfffffffe,%edx 110402: 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); 110405: 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 110408: 31 f6 xor %esi,%esi 11040a: 3b 45 f0 cmp -0x10(%ebp),%eax 11040d: 72 0e jb 11041d <_Heap_Free+0x59> <== NEVER TAKEN 11040f: 39 41 24 cmp %eax,0x24(%ecx) 110412: 0f 93 c2 setae %dl 110415: 89 d6 mov %edx,%esi 110417: 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 ) ) { 11041d: 85 f6 test %esi,%esi 11041f: 0f 84 02 01 00 00 je 110527 <_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; 110425: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 110428: f7 c6 01 00 00 00 test $0x1,%esi 11042e: 0f 84 f3 00 00 00 je 110527 <_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; 110434: 83 e6 fe and $0xfffffffe,%esi 110437: 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 )); 11043a: 8b 51 24 mov 0x24(%ecx),%edx 11043d: 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 110440: 31 f6 xor %esi,%esi 110442: 39 d0 cmp %edx,%eax 110444: 74 0d je 110453 <_Heap_Free+0x8f> 110446: 8b 55 e8 mov -0x18(%ebp),%edx 110449: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 11044d: 83 e6 01 and $0x1,%esi 110450: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 110453: 83 e7 01 and $0x1,%edi 110456: 75 64 jne 1104bc <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 110458: 8b 13 mov (%ebx),%edx 11045a: 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); 11045d: 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 11045f: 31 ff xor %edi,%edi 110461: 3b 5d f0 cmp -0x10(%ebp),%ebx 110464: 72 0e jb 110474 <_Heap_Free+0xb0> <== NEVER TAKEN 110466: 39 5d e4 cmp %ebx,-0x1c(%ebp) 110469: 0f 93 c2 setae %dl 11046c: 89 d7 mov %edx,%edi 11046e: 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 ) ) { 110474: 85 ff test %edi,%edi 110476: 0f 84 ab 00 00 00 je 110527 <_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) ) { 11047c: f6 43 04 01 testb $0x1,0x4(%ebx) 110480: 0f 84 a1 00 00 00 je 110527 <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110486: 89 f2 mov %esi,%edx 110488: 84 d2 test %dl,%dl 11048a: 74 1a je 1104a6 <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 11048c: 8b 75 e0 mov -0x20(%ebp),%esi 11048f: 03 75 e8 add -0x18(%ebp),%esi 110492: 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; 110495: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 110498: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 11049b: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 11049e: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 1104a1: ff 49 38 decl 0x38(%ecx) 1104a4: eb 34 jmp 1104da <_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; 1104a6: 8b 75 e0 mov -0x20(%ebp),%esi 1104a9: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1104ac: 89 f7 mov %esi,%edi 1104ae: 83 cf 01 or $0x1,%edi 1104b1: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1104b4: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 1104b8: 89 30 mov %esi,(%eax) 1104ba: eb 5b jmp 110517 <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 1104bc: 89 f2 mov %esi,%edx 1104be: 84 d2 test %dl,%dl 1104c0: 74 25 je 1104e7 <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 1104c2: 8b 75 e8 mov -0x18(%ebp),%esi 1104c5: 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; 1104c8: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 1104cb: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 1104ce: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 1104d1: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 1104d4: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 1104d7: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1104da: 89 f0 mov %esi,%eax 1104dc: 83 c8 01 or $0x1,%eax 1104df: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1104e2: 89 34 33 mov %esi,(%ebx,%esi,1) 1104e5: eb 30 jmp 110517 <_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; 1104e7: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 1104ea: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 1104ed: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 1104f0: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 1104f3: 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; 1104f6: 8b 75 e0 mov -0x20(%ebp),%esi 1104f9: 83 ce 01 or $0x1,%esi 1104fc: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1104ff: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 110503: 8b 55 e0 mov -0x20(%ebp),%edx 110506: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 110508: 8b 41 38 mov 0x38(%ecx),%eax 11050b: 40 inc %eax 11050c: 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; 11050f: 39 41 3c cmp %eax,0x3c(%ecx) 110512: 73 03 jae 110517 <_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; 110514: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 110517: ff 49 40 decl 0x40(%ecx) ++stats->frees; 11051a: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 11051d: 8b 45 e0 mov -0x20(%ebp),%eax 110520: 01 41 30 add %eax,0x30(%ecx) 110523: b0 01 mov $0x1,%al return( true ); 110525: eb 02 jmp 110529 <_Heap_Free+0x165> 110527: 31 c0 xor %eax,%eax } 110529: 83 c4 14 add $0x14,%esp 11052c: 5b pop %ebx 11052d: 5e pop %esi 11052e: 5f pop %edi 11052f: c9 leave 110530: c3 ret =============================================================================== 0011e5f4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e5f4: 55 push %ebp 11e5f5: 89 e5 mov %esp,%ebp 11e5f7: 56 push %esi 11e5f8: 53 push %ebx 11e5f9: 8b 5d 08 mov 0x8(%ebp),%ebx 11e5fc: 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 ) 11e5ff: 8d 4e f8 lea -0x8(%esi),%ecx 11e602: 89 f0 mov %esi,%eax 11e604: 31 d2 xor %edx,%edx 11e606: f7 73 10 divl 0x10(%ebx) 11e609: 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; 11e60b: 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 11e60e: 31 c0 xor %eax,%eax 11e610: 39 d1 cmp %edx,%ecx 11e612: 72 08 jb 11e61c <_Heap_Size_of_alloc_area+0x28> 11e614: 31 c0 xor %eax,%eax 11e616: 39 4b 24 cmp %ecx,0x24(%ebx) 11e619: 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 ) ) { 11e61c: 85 c0 test %eax,%eax 11e61e: 74 2e je 11e64e <_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); 11e620: 8b 41 04 mov 0x4(%ecx),%eax 11e623: 83 e0 fe and $0xfffffffe,%eax 11e626: 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 11e628: 31 c0 xor %eax,%eax 11e62a: 39 d1 cmp %edx,%ecx 11e62c: 72 08 jb 11e636 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11e62e: 31 c0 xor %eax,%eax 11e630: 39 4b 24 cmp %ecx,0x24(%ebx) 11e633: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11e636: 85 c0 test %eax,%eax 11e638: 74 14 je 11e64e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11e63a: f6 41 04 01 testb $0x1,0x4(%ecx) 11e63e: 74 0e je 11e64e <_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; 11e640: 29 f1 sub %esi,%ecx 11e642: 8d 51 04 lea 0x4(%ecx),%edx 11e645: 8b 45 10 mov 0x10(%ebp),%eax 11e648: 89 10 mov %edx,(%eax) 11e64a: b0 01 mov $0x1,%al return true; 11e64c: eb 02 jmp 11e650 <_Heap_Size_of_alloc_area+0x5c> 11e64e: 31 c0 xor %eax,%eax } 11e650: 5b pop %ebx 11e651: 5e pop %esi 11e652: c9 leave 11e653: c3 ret =============================================================================== 0010c091 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10c091: 55 push %ebp 10c092: 89 e5 mov %esp,%ebp 10c094: 57 push %edi 10c095: 56 push %esi 10c096: 53 push %ebx 10c097: 83 ec 4c sub $0x4c,%esp 10c09a: 8b 7d 08 mov 0x8(%ebp),%edi 10c09d: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10c0a0: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10c0a3: 8b 47 14 mov 0x14(%edi),%eax 10c0a6: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10c0a9: 8b 57 24 mov 0x24(%edi),%edx 10c0ac: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10c0af: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c0b2: c7 45 e4 a3 c3 10 00 movl $0x10c3a3,-0x1c(%ebp) 10c0b9: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c0bd: 75 07 jne 10c0c6 <_Heap_Walk+0x35> 10c0bf: c7 45 e4 8c c0 10 00 movl $0x10c08c,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c0c6: 83 3d 28 84 12 00 03 cmpl $0x3,0x128428 10c0cd: 0f 85 c6 02 00 00 jne 10c399 <_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)( 10c0d3: 50 push %eax 10c0d4: ff 77 0c pushl 0xc(%edi) 10c0d7: ff 77 08 pushl 0x8(%edi) 10c0da: ff 75 d0 pushl -0x30(%ebp) 10c0dd: 53 push %ebx 10c0de: ff 77 1c pushl 0x1c(%edi) 10c0e1: ff 77 18 pushl 0x18(%edi) 10c0e4: ff 75 dc pushl -0x24(%ebp) 10c0e7: 51 push %ecx 10c0e8: 68 20 11 12 00 push $0x121120 10c0ed: 6a 00 push $0x0 10c0ef: 56 push %esi 10c0f0: 89 4d bc mov %ecx,-0x44(%ebp) 10c0f3: 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 ) { 10c0f6: 83 c4 30 add $0x30,%esp 10c0f9: 8b 4d bc mov -0x44(%ebp),%ecx 10c0fc: 85 c9 test %ecx,%ecx 10c0fe: 75 0b jne 10c10b <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c100: 53 push %ebx 10c101: 68 b1 11 12 00 push $0x1211b1 10c106: e9 5b 02 00 00 jmp 10c366 <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c10b: f6 c1 03 test $0x3,%cl 10c10e: 74 0b je 10c11b <_Heap_Walk+0x8a> (*printer)( 10c110: 51 push %ecx 10c111: 68 c4 11 12 00 push $0x1211c4 10c116: e9 4b 02 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c11b: 8b 45 dc mov -0x24(%ebp),%eax 10c11e: 31 d2 xor %edx,%edx 10c120: f7 f1 div %ecx 10c122: 85 d2 test %edx,%edx 10c124: 74 0d je 10c133 <_Heap_Walk+0xa2> (*printer)( 10c126: ff 75 dc pushl -0x24(%ebp) 10c129: 68 e2 11 12 00 push $0x1211e2 10c12e: e9 33 02 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( 10c133: 8d 43 08 lea 0x8(%ebx),%eax 10c136: 31 d2 xor %edx,%edx 10c138: f7 f1 div %ecx 10c13a: 85 d2 test %edx,%edx 10c13c: 74 0b je 10c149 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c13e: 53 push %ebx 10c13f: 68 06 12 12 00 push $0x121206 10c144: e9 1d 02 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c149: f6 43 04 01 testb $0x1,0x4(%ebx) 10c14d: 75 0b jne 10c15a <_Heap_Walk+0xc9> (*printer)( 10c14f: 51 push %ecx 10c150: 68 37 12 12 00 push $0x121237 10c155: e9 0c 02 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c15a: 8b 03 mov (%ebx),%eax 10c15c: 89 45 d4 mov %eax,-0x2c(%ebp) 10c15f: 39 c8 cmp %ecx,%eax 10c161: 74 0f je 10c172 <_Heap_Walk+0xe1> (*printer)( 10c163: 83 ec 0c sub $0xc,%esp 10c166: 51 push %ecx 10c167: 50 push %eax 10c168: 68 65 12 12 00 push $0x121265 10c16d: e9 3d 01 00 00 jmp 10c2af <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c172: 8b 55 d0 mov -0x30(%ebp),%edx 10c175: 8b 42 04 mov 0x4(%edx),%eax 10c178: 83 e0 fe and $0xfffffffe,%eax 10c17b: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c180: 75 0b jne 10c18d <_Heap_Walk+0xfc> (*printer)( 10c182: 52 push %edx 10c183: 68 90 12 12 00 push $0x121290 10c188: e9 d9 01 00 00 jmp 10c366 <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c18d: 8b 4f 10 mov 0x10(%edi),%ecx 10c190: 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; 10c193: 8b 4f 08 mov 0x8(%edi),%ecx 10c196: 89 7d e0 mov %edi,-0x20(%ebp) 10c199: eb 6a jmp 10c205 <_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 10c19b: 31 c0 xor %eax,%eax 10c19d: 39 4f 20 cmp %ecx,0x20(%edi) 10c1a0: 77 08 ja 10c1aa <_Heap_Walk+0x119> 10c1a2: 31 c0 xor %eax,%eax 10c1a4: 39 4f 24 cmp %ecx,0x24(%edi) 10c1a7: 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 ) ) { 10c1aa: 85 c0 test %eax,%eax 10c1ac: 75 0b jne 10c1b9 <_Heap_Walk+0x128> (*printer)( 10c1ae: 51 push %ecx 10c1af: 68 a5 12 12 00 push $0x1212a5 10c1b4: e9 ad 01 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( 10c1b9: 8d 41 08 lea 0x8(%ecx),%eax 10c1bc: 31 d2 xor %edx,%edx 10c1be: f7 75 d8 divl -0x28(%ebp) 10c1c1: 85 d2 test %edx,%edx 10c1c3: 74 0b je 10c1d0 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c1c5: 51 push %ecx 10c1c6: 68 c5 12 12 00 push $0x1212c5 10c1cb: e9 96 01 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c1d0: 8b 41 04 mov 0x4(%ecx),%eax 10c1d3: 83 e0 fe and $0xfffffffe,%eax 10c1d6: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c1db: 74 0b je 10c1e8 <_Heap_Walk+0x157> (*printer)( 10c1dd: 51 push %ecx 10c1de: 68 f5 12 12 00 push $0x1212f5 10c1e3: e9 7e 01 00 00 jmp 10c366 <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c1e8: 8b 41 0c mov 0xc(%ecx),%eax 10c1eb: 3b 45 e0 cmp -0x20(%ebp),%eax 10c1ee: 74 0f je 10c1ff <_Heap_Walk+0x16e> (*printer)( 10c1f0: 83 ec 0c sub $0xc,%esp 10c1f3: 50 push %eax 10c1f4: 51 push %ecx 10c1f5: 68 11 13 12 00 push $0x121311 10c1fa: e9 b0 00 00 00 jmp 10c2af <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c1ff: 89 4d e0 mov %ecx,-0x20(%ebp) 10c202: 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 ) { 10c205: 39 f9 cmp %edi,%ecx 10c207: 75 92 jne 10c19b <_Heap_Walk+0x10a> 10c209: 89 75 e0 mov %esi,-0x20(%ebp) 10c20c: e9 7f 01 00 00 jmp 10c390 <_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; 10c211: 8b 43 04 mov 0x4(%ebx),%eax 10c214: 89 c1 mov %eax,%ecx 10c216: 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); 10c219: 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 ) { 10c21c: a8 01 test $0x1,%al 10c21e: 74 0c je 10c22c <_Heap_Walk+0x19b> (*printer)( 10c220: 83 ec 0c sub $0xc,%esp 10c223: 51 push %ecx 10c224: 53 push %ebx 10c225: 68 43 13 12 00 push $0x121343 10c22a: eb 0b jmp 10c237 <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c22c: 50 push %eax 10c22d: 50 push %eax 10c22e: ff 33 pushl (%ebx) 10c230: 51 push %ecx 10c231: 53 push %ebx 10c232: 68 5a 13 12 00 push $0x12135a 10c237: 6a 00 push $0x0 10c239: ff 75 e0 pushl -0x20(%ebp) 10c23c: 89 4d bc mov %ecx,-0x44(%ebp) 10c23f: ff 55 e4 call *-0x1c(%ebp) 10c242: 83 c4 20 add $0x20,%esp 10c245: 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 10c248: 31 c0 xor %eax,%eax 10c24a: 39 77 20 cmp %esi,0x20(%edi) 10c24d: 77 08 ja 10c257 <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c24f: 31 c0 xor %eax,%eax 10c251: 39 77 24 cmp %esi,0x24(%edi) 10c254: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c257: 85 c0 test %eax,%eax 10c259: 75 11 jne 10c26c <_Heap_Walk+0x1db> 10c25b: 89 f1 mov %esi,%ecx 10c25d: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c260: 83 ec 0c sub $0xc,%esp 10c263: 51 push %ecx 10c264: 53 push %ebx 10c265: 68 7f 13 12 00 push $0x12137f 10c26a: eb 43 jmp 10c2af <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c26c: 89 c8 mov %ecx,%eax 10c26e: 31 d2 xor %edx,%edx 10c270: f7 75 d4 divl -0x2c(%ebp) 10c273: 85 d2 test %edx,%edx 10c275: 74 0f je 10c286 <_Heap_Walk+0x1f5> 10c277: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c27a: 83 ec 0c sub $0xc,%esp 10c27d: 51 push %ecx 10c27e: 53 push %ebx 10c27f: 68 ac 13 12 00 push $0x1213ac 10c284: eb 29 jmp 10c2af <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c286: 3b 4d dc cmp -0x24(%ebp),%ecx 10c289: 73 11 jae 10c29c <_Heap_Walk+0x20b> 10c28b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c28e: 57 push %edi 10c28f: 57 push %edi 10c290: ff 75 dc pushl -0x24(%ebp) 10c293: 51 push %ecx 10c294: 53 push %ebx 10c295: 68 da 13 12 00 push $0x1213da 10c29a: eb 13 jmp 10c2af <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c29c: 39 de cmp %ebx,%esi 10c29e: 77 1f ja 10c2bf <_Heap_Walk+0x22e> 10c2a0: 89 f1 mov %esi,%ecx 10c2a2: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c2a5: 83 ec 0c sub $0xc,%esp 10c2a8: 51 push %ecx 10c2a9: 53 push %ebx 10c2aa: 68 05 14 12 00 push $0x121405 10c2af: 6a 01 push $0x1 10c2b1: 56 push %esi 10c2b2: ff 55 e4 call *-0x1c(%ebp) 10c2b5: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c2b7: 83 c4 20 add $0x20,%esp 10c2ba: e9 dc 00 00 00 jmp 10c39b <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c2bf: f6 46 04 01 testb $0x1,0x4(%esi) 10c2c3: 0f 85 c5 00 00 00 jne 10c38e <_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; 10c2c9: 8b 47 08 mov 0x8(%edi),%eax 10c2cc: 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; 10c2cf: 8b 53 04 mov 0x4(%ebx),%edx 10c2d2: 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; 10c2d5: 83 e2 fe and $0xfffffffe,%edx 10c2d8: 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); 10c2db: 01 da add %ebx,%edx 10c2dd: 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)( 10c2e0: 8b 4b 08 mov 0x8(%ebx),%ecx 10c2e3: 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; 10c2e6: ba 39 14 12 00 mov $0x121439,%edx 10c2eb: 3b 4f 0c cmp 0xc(%edi),%ecx 10c2ee: 74 0e je 10c2fe <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c2f0: ba 43 14 12 00 mov $0x121443,%edx 10c2f5: 39 f9 cmp %edi,%ecx 10c2f7: 74 05 je 10c2fe <_Heap_Walk+0x26d> 10c2f9: ba 6d 10 12 00 mov $0x12106d,%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)( 10c2fe: 8b 43 0c mov 0xc(%ebx),%eax 10c301: 89 45 d8 mov %eax,-0x28(%ebp) 10c304: b8 4d 14 12 00 mov $0x12144d,%eax 10c309: 8b 4d c0 mov -0x40(%ebp),%ecx 10c30c: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c30f: 74 0f je 10c320 <_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)" : ""), 10c311: b8 58 14 12 00 mov $0x121458,%eax 10c316: 39 7d d8 cmp %edi,-0x28(%ebp) 10c319: 74 05 je 10c320 <_Heap_Walk+0x28f> 10c31b: b8 6d 10 12 00 mov $0x12106d,%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)( 10c320: 52 push %edx 10c321: ff 75 b4 pushl -0x4c(%ebp) 10c324: 50 push %eax 10c325: ff 75 d8 pushl -0x28(%ebp) 10c328: 53 push %ebx 10c329: 68 62 14 12 00 push $0x121462 10c32e: 6a 00 push $0x0 10c330: ff 75 e0 pushl -0x20(%ebp) 10c333: 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 ) { 10c336: 8b 55 c8 mov -0x38(%ebp),%edx 10c339: 8b 02 mov (%edx),%eax 10c33b: 83 c4 20 add $0x20,%esp 10c33e: 39 45 cc cmp %eax,-0x34(%ebp) 10c341: 74 14 je 10c357 <_Heap_Walk+0x2c6> 10c343: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c346: 51 push %ecx 10c347: 52 push %edx 10c348: 50 push %eax 10c349: ff 75 cc pushl -0x34(%ebp) 10c34c: 53 push %ebx 10c34d: 68 8e 14 12 00 push $0x12148e 10c352: e9 58 ff ff ff jmp 10c2af <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c357: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c35b: 75 16 jne 10c373 <_Heap_Walk+0x2e2> 10c35d: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c360: 53 push %ebx 10c361: 68 c7 14 12 00 push $0x1214c7 10c366: 6a 01 push $0x1 10c368: 56 push %esi 10c369: ff 55 e4 call *-0x1c(%ebp) 10c36c: 31 c0 xor %eax,%eax 10c36e: 83 c4 10 add $0x10,%esp 10c371: eb 28 jmp 10c39b <_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; 10c373: 8b 47 08 mov 0x8(%edi),%eax 10c376: eb 07 jmp 10c37f <_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 ) { 10c378: 39 d8 cmp %ebx,%eax 10c37a: 74 12 je 10c38e <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c37c: 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 ) { 10c37f: 39 f8 cmp %edi,%eax 10c381: 75 f5 jne 10c378 <_Heap_Walk+0x2e7> 10c383: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c386: 53 push %ebx 10c387: 68 f6 14 12 00 push $0x1214f6 10c38c: eb d8 jmp 10c366 <_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 ) { 10c38e: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c390: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c393: 0f 85 78 fe ff ff jne 10c211 <_Heap_Walk+0x180> 10c399: b0 01 mov $0x1,%al block = next_block; } return true; } 10c39b: 8d 65 f4 lea -0xc(%ebp),%esp 10c39e: 5b pop %ebx 10c39f: 5e pop %esi 10c3a0: 5f pop %edi 10c3a1: c9 leave 10c3a2: c3 ret =============================================================================== 0010b680 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b680: 55 push %ebp 10b681: 89 e5 mov %esp,%ebp 10b683: 53 push %ebx 10b684: 83 ec 08 sub $0x8,%esp 10b687: 8b 45 08 mov 0x8(%ebp),%eax 10b68a: 8b 55 0c mov 0xc(%ebp),%edx 10b68d: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b690: a3 ac 62 12 00 mov %eax,0x1262ac _Internal_errors_What_happened.is_internal = is_internal; 10b695: 88 15 b0 62 12 00 mov %dl,0x1262b0 _Internal_errors_What_happened.the_error = the_error; 10b69b: 89 1d b4 62 12 00 mov %ebx,0x1262b4 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b6a1: 53 push %ebx 10b6a2: 0f b6 d2 movzbl %dl,%edx 10b6a5: 52 push %edx 10b6a6: 50 push %eax 10b6a7: e8 37 19 00 00 call 10cfe3 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b6ac: c7 05 a0 63 12 00 05 movl $0x5,0x1263a0 <== NOT EXECUTED 10b6b3: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b6b6: fa cli <== NOT EXECUTED 10b6b7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b6b9: f4 hlt <== NOT EXECUTED 10b6ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b6bd: eb fe jmp 10b6bd <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b718 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b718: 55 push %ebp 10b719: 89 e5 mov %esp,%ebp 10b71b: 56 push %esi 10b71c: 53 push %ebx 10b71d: 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 ) 10b720: 31 c9 xor %ecx,%ecx 10b722: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b726: 74 53 je 10b77b <_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 ); 10b728: 8d 73 20 lea 0x20(%ebx),%esi 10b72b: 83 ec 0c sub $0xc,%esp 10b72e: 56 push %esi 10b72f: e8 50 f7 ff ff call 10ae84 <_Chain_Get> 10b734: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b736: 83 c4 10 add $0x10,%esp 10b739: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b73d: 74 3c je 10b77b <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b73f: 85 c0 test %eax,%eax 10b741: 75 1a jne 10b75d <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b743: 83 ec 0c sub $0xc,%esp 10b746: 53 push %ebx 10b747: e8 60 00 00 00 call 10b7ac <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b74c: 89 34 24 mov %esi,(%esp) 10b74f: e8 30 f7 ff ff call 10ae84 <_Chain_Get> 10b754: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b756: 83 c4 10 add $0x10,%esp 10b759: 85 c0 test %eax,%eax 10b75b: 74 1e je 10b77b <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b75d: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b761: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b765: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b767: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b76b: 31 d2 xor %edx,%edx 10b76d: f7 f6 div %esi 10b76f: c1 e0 02 shl $0x2,%eax 10b772: 03 43 30 add 0x30(%ebx),%eax 10b775: ff 08 decl (%eax) information->inactive--; 10b777: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b77b: 89 c8 mov %ecx,%eax 10b77d: 8d 65 f8 lea -0x8(%ebp),%esp 10b780: 5b pop %ebx 10b781: 5e pop %esi 10b782: c9 leave 10b783: c3 ret =============================================================================== 0010b7ac <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b7ac: 55 push %ebp 10b7ad: 89 e5 mov %esp,%ebp 10b7af: 57 push %edi 10b7b0: 56 push %esi 10b7b1: 53 push %ebx 10b7b2: 83 ec 4c sub $0x4c,%esp 10b7b5: 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 ); 10b7b8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b7bc: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b7bf: 8b 4b 34 mov 0x34(%ebx),%ecx 10b7c2: 85 c9 test %ecx,%ecx 10b7c4: 75 0e jne 10b7d4 <_Objects_Extend_information+0x28> 10b7c6: 89 45 d4 mov %eax,-0x2c(%ebp) 10b7c9: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7d0: 31 d2 xor %edx,%edx 10b7d2: eb 31 jmp 10b805 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b7d4: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b7d8: 8b 43 10 mov 0x10(%ebx),%eax 10b7db: 31 d2 xor %edx,%edx 10b7dd: 66 f7 f6 div %si 10b7e0: 0f b7 d0 movzwl %ax,%edx 10b7e3: 8b 7d c8 mov -0x38(%ebp),%edi 10b7e6: 89 7d d4 mov %edi,-0x2c(%ebp) 10b7e9: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b7f0: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b7f2: eb 0a jmp 10b7fe <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b7f4: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b7f8: 74 08 je 10b802 <_Objects_Extend_information+0x56> 10b7fa: 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++ ) { 10b7fd: 40 inc %eax 10b7fe: 39 d0 cmp %edx,%eax 10b800: 72 f2 jb 10b7f4 <_Objects_Extend_information+0x48> 10b802: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b805: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b809: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b80d: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b810: 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 ) { 10b813: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b819: 0f 87 db 01 00 00 ja 10b9fa <_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; 10b81f: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b823: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b827: 74 1e je 10b847 <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b829: 83 ec 0c sub $0xc,%esp 10b82c: 50 push %eax 10b82d: 89 55 b4 mov %edx,-0x4c(%ebp) 10b830: e8 df 1a 00 00 call 10d314 <_Workspace_Allocate> 10b835: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b838: 83 c4 10 add $0x10,%esp 10b83b: 85 c0 test %eax,%eax 10b83d: 8b 55 b4 mov -0x4c(%ebp),%edx 10b840: 75 1a jne 10b85c <_Objects_Extend_information+0xb0> 10b842: e9 b3 01 00 00 jmp 10b9fa <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b847: 83 ec 0c sub $0xc,%esp 10b84a: 50 push %eax 10b84b: 89 55 b4 mov %edx,-0x4c(%ebp) 10b84e: e8 95 1a 00 00 call 10d2e8 <_Workspace_Allocate_or_fatal_error> 10b853: 89 45 bc mov %eax,-0x44(%ebp) 10b856: 83 c4 10 add $0x10,%esp 10b859: 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 ) { 10b85c: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b860: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b863: 0f 82 14 01 00 00 jb 10b97d <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b869: 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 ); 10b86c: 83 ec 0c sub $0xc,%esp 10b86f: 8b 4d b8 mov -0x48(%ebp),%ecx 10b872: 03 4d c8 add -0x38(%ebp),%ecx 10b875: 8d 04 76 lea (%esi,%esi,2),%eax 10b878: 8d 04 01 lea (%ecx,%eax,1),%eax 10b87b: c1 e0 02 shl $0x2,%eax 10b87e: 50 push %eax 10b87f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b882: e8 8d 1a 00 00 call 10d314 <_Workspace_Allocate> if ( !object_blocks ) { 10b887: 83 c4 10 add $0x10,%esp 10b88a: 85 c0 test %eax,%eax 10b88c: 8b 55 b4 mov -0x4c(%ebp),%edx 10b88f: 75 13 jne 10b8a4 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b891: 83 ec 0c sub $0xc,%esp 10b894: ff 75 bc pushl -0x44(%ebp) 10b897: e8 91 1a 00 00 call 10d32d <_Workspace_Free> return; 10b89c: 83 c4 10 add $0x10,%esp 10b89f: e9 56 01 00 00 jmp 10b9fa <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b8a4: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b8a7: 89 4d c0 mov %ecx,-0x40(%ebp) 10b8aa: 8d 34 f0 lea (%eax,%esi,8),%esi 10b8ad: 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 ) { 10b8b0: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b8b4: 31 c9 xor %ecx,%ecx 10b8b6: 3b 75 c8 cmp -0x38(%ebp),%esi 10b8b9: 76 3e jbe 10b8f9 <_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, 10b8bb: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b8c2: 89 75 d0 mov %esi,-0x30(%ebp) 10b8c5: 8b 73 34 mov 0x34(%ebx),%esi 10b8c8: 89 c7 mov %eax,%edi 10b8ca: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8cd: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b8cf: 8b 73 30 mov 0x30(%ebx),%esi 10b8d2: 8b 7d c0 mov -0x40(%ebp),%edi 10b8d5: 8b 4d d0 mov -0x30(%ebp),%ecx 10b8d8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b8da: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b8de: 03 4d c8 add -0x38(%ebp),%ecx 10b8e1: c1 e1 02 shl $0x2,%ecx 10b8e4: 8b 73 1c mov 0x1c(%ebx),%esi 10b8e7: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8ea: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b8ec: eb 10 jmp 10b8fe <_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; 10b8ee: 8b 7d c4 mov -0x3c(%ebp),%edi 10b8f1: 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++ ) { 10b8f8: 41 inc %ecx 10b8f9: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b8fc: 72 f0 jb 10b8ee <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b8fe: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b905: 8b 4d c0 mov -0x40(%ebp),%ecx 10b908: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b90f: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b913: 8b 75 d4 mov -0x2c(%ebp),%esi 10b916: 01 d6 add %edx,%esi 10b918: 8b 7d d4 mov -0x2c(%ebp),%edi 10b91b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b91e: 8d 0c ba lea (%edx,%edi,4),%ecx 10b921: 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 ; 10b923: eb 0a jmp 10b92f <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b925: 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++ ) { 10b92b: 42 inc %edx 10b92c: 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 ; 10b92f: 39 f2 cmp %esi,%edx 10b931: 72 f2 jb 10b925 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b933: 9c pushf 10b934: fa cli 10b935: 5e pop %esi old_tables = information->object_blocks; 10b936: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b939: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b93c: 8b 4d c0 mov -0x40(%ebp),%ecx 10b93f: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b942: 8b 7d c4 mov -0x3c(%ebp),%edi 10b945: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b948: 8b 45 b8 mov -0x48(%ebp),%eax 10b94b: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b94f: 8b 03 mov (%ebx),%eax 10b951: c1 e0 18 shl $0x18,%eax 10b954: 0d 00 00 01 00 or $0x10000,%eax 10b959: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b95d: c1 e1 1b shl $0x1b,%ecx 10b960: 09 c8 or %ecx,%eax 10b962: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b966: 09 c8 or %ecx,%eax 10b968: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b96b: 56 push %esi 10b96c: 9d popf if ( old_tables ) 10b96d: 85 d2 test %edx,%edx 10b96f: 74 0c je 10b97d <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b971: 83 ec 0c sub $0xc,%esp 10b974: 52 push %edx 10b975: e8 b3 19 00 00 call 10d32d <_Workspace_Free> 10b97a: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b97d: 8b 55 cc mov -0x34(%ebp),%edx 10b980: c1 e2 02 shl $0x2,%edx 10b983: 89 55 d0 mov %edx,-0x30(%ebp) 10b986: 8b 43 34 mov 0x34(%ebx),%eax 10b989: 8b 75 bc mov -0x44(%ebp),%esi 10b98c: 8b 4d cc mov -0x34(%ebp),%ecx 10b98f: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b992: ff 73 18 pushl 0x18(%ebx) 10b995: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b999: 52 push %edx 10b99a: ff 34 88 pushl (%eax,%ecx,4) 10b99d: 8d 45 dc lea -0x24(%ebp),%eax 10b9a0: 50 push %eax 10b9a1: 89 45 b4 mov %eax,-0x4c(%ebp) 10b9a4: e8 c7 45 00 00 call 10ff70 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b9a9: 8d 7b 20 lea 0x20(%ebx),%edi 10b9ac: 8b 75 d4 mov -0x2c(%ebp),%esi 10b9af: eb 23 jmp 10b9d4 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b9b1: 8b 13 mov (%ebx),%edx 10b9b3: c1 e2 18 shl $0x18,%edx 10b9b6: 81 ca 00 00 01 00 or $0x10000,%edx 10b9bc: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b9c0: c1 e1 1b shl $0x1b,%ecx 10b9c3: 09 ca or %ecx,%edx 10b9c5: 09 f2 or %esi,%edx 10b9c7: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b9ca: 52 push %edx 10b9cb: 52 push %edx 10b9cc: 50 push %eax 10b9cd: 57 push %edi 10b9ce: e8 75 f4 ff ff call 10ae48 <_Chain_Append> index++; 10b9d3: 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 ) { 10b9d4: 8d 45 dc lea -0x24(%ebp),%eax 10b9d7: 89 04 24 mov %eax,(%esp) 10b9da: e8 a5 f4 ff ff call 10ae84 <_Chain_Get> 10b9df: 83 c4 10 add $0x10,%esp 10b9e2: 85 c0 test %eax,%eax 10b9e4: 75 cb jne 10b9b1 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b9e6: 8b 43 30 mov 0x30(%ebx),%eax 10b9e9: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b9ed: 8b 4d d0 mov -0x30(%ebp),%ecx 10b9f0: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b9f3: 8b 43 14 mov 0x14(%ebx),%eax 10b9f6: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b9fa: 8d 65 f4 lea -0xc(%ebp),%esp 10b9fd: 5b pop %ebx 10b9fe: 5e pop %esi 10b9ff: 5f pop %edi 10ba00: c9 leave 10ba01: c3 ret =============================================================================== 0010ba94 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10ba94: 55 push %ebp 10ba95: 89 e5 mov %esp,%ebp 10ba97: 56 push %esi 10ba98: 53 push %ebx 10ba99: 8b 75 08 mov 0x8(%ebp),%esi 10ba9c: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10ba9f: 85 db test %ebx,%ebx 10baa1: 74 2d je 10bad0 <_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 ); 10baa3: 83 ec 0c sub $0xc,%esp 10baa6: 56 push %esi 10baa7: e8 88 4a 00 00 call 110534 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10baac: 83 c4 10 add $0x10,%esp 10baaf: 85 c0 test %eax,%eax 10bab1: 74 1d je 10bad0 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10bab3: 39 c3 cmp %eax,%ebx 10bab5: 77 19 ja 10bad0 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10bab7: 8b 04 b5 dc 61 12 00 mov 0x1261dc(,%esi,4),%eax 10babe: 85 c0 test %eax,%eax 10bac0: 74 0e je 10bad0 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10bac2: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10bac5: 85 c0 test %eax,%eax 10bac7: 74 09 je 10bad2 <_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 ) 10bac9: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10bace: 75 02 jne 10bad2 <_Objects_Get_information+0x3e> 10bad0: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10bad2: 8d 65 f8 lea -0x8(%ebp),%esp 10bad5: 5b pop %ebx 10bad6: 5e pop %esi 10bad7: c9 leave 10bad8: c3 ret =============================================================================== 00119044 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 119044: 55 push %ebp 119045: 89 e5 mov %esp,%ebp 119047: 53 push %ebx 119048: 8b 55 08 mov 0x8(%ebp),%edx 11904b: 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; 11904e: b8 01 00 00 00 mov $0x1,%eax 119053: 2b 42 08 sub 0x8(%edx),%eax 119056: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 119059: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 11905d: 39 c3 cmp %eax,%ebx 11905f: 72 12 jb 119073 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 119061: 8b 52 1c mov 0x1c(%edx),%edx 119064: 8b 04 82 mov (%edx,%eax,4),%eax 119067: 85 c0 test %eax,%eax 119069: 74 08 je 119073 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 11906b: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 119071: eb 08 jmp 11907b <_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; 119073: c7 01 01 00 00 00 movl $0x1,(%ecx) 119079: 31 c0 xor %eax,%eax return NULL; } 11907b: 5b pop %ebx 11907c: c9 leave 11907d: c3 ret =============================================================================== 0010cc80 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10cc80: 55 push %ebp 10cc81: 89 e5 mov %esp,%ebp 10cc83: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cc86: 8b 45 08 mov 0x8(%ebp),%eax 10cc89: 85 c0 test %eax,%eax 10cc8b: 75 08 jne 10cc95 <_Objects_Id_to_name+0x15> 10cc8d: a1 10 83 12 00 mov 0x128310,%eax 10cc92: 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); 10cc95: 89 c2 mov %eax,%edx 10cc97: c1 ea 18 shr $0x18,%edx 10cc9a: 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 ) 10cc9d: 8d 4a ff lea -0x1(%edx),%ecx 10cca0: 83 f9 03 cmp $0x3,%ecx 10cca3: 77 38 ja 10ccdd <_Objects_Id_to_name+0x5d> 10cca5: eb 3d jmp 10cce4 <_Objects_Id_to_name+0x64> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10cca7: 89 c1 mov %eax,%ecx 10cca9: c1 e9 1b shr $0x1b,%ecx 10ccac: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10ccaf: 85 d2 test %edx,%edx 10ccb1: 74 2a je 10ccdd <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10ccb3: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10ccb7: 75 24 jne 10ccdd <_Objects_Id_to_name+0x5d><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10ccb9: 51 push %ecx 10ccba: 8d 4d f4 lea -0xc(%ebp),%ecx 10ccbd: 51 push %ecx 10ccbe: 50 push %eax 10ccbf: 52 push %edx 10ccc0: e8 63 ff ff ff call 10cc28 <_Objects_Get> if ( !the_object ) 10ccc5: 83 c4 10 add $0x10,%esp 10ccc8: 85 c0 test %eax,%eax 10ccca: 74 11 je 10ccdd <_Objects_Id_to_name+0x5d> return OBJECTS_INVALID_ID; *name = the_object->name; 10cccc: 8b 50 0c mov 0xc(%eax),%edx 10cccf: 8b 45 0c mov 0xc(%ebp),%eax 10ccd2: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10ccd4: e8 b4 07 00 00 call 10d48d <_Thread_Enable_dispatch> 10ccd9: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10ccdb: eb 05 jmp 10cce2 <_Objects_Id_to_name+0x62> 10ccdd: b8 03 00 00 00 mov $0x3,%eax } 10cce2: c9 leave 10cce3: 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 ] ) 10cce4: 8b 14 95 28 82 12 00 mov 0x128228(,%edx,4),%edx 10cceb: 85 d2 test %edx,%edx 10cced: 75 b8 jne 10cca7 <_Objects_Id_to_name+0x27> 10ccef: eb ec jmp 10ccdd <_Objects_Id_to_name+0x5d> =============================================================================== 0010c304 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10c304: 55 push %ebp 10c305: 89 e5 mov %esp,%ebp 10c307: 57 push %edi 10c308: 56 push %esi 10c309: 53 push %ebx 10c30a: 83 ec 34 sub $0x34,%esp 10c30d: 8b 55 08 mov 0x8(%ebp),%edx 10c310: 8b 7d 0c mov 0xc(%ebp),%edi 10c313: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10c316: 0f b7 42 3a movzwl 0x3a(%edx),%eax 10c31a: 50 push %eax 10c31b: 53 push %ebx 10c31c: 89 55 d4 mov %edx,-0x2c(%ebp) 10c31f: e8 90 82 00 00 call 1145b4 10c324: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10c326: 83 c4 10 add $0x10,%esp 10c329: 8b 55 d4 mov -0x2c(%ebp),%edx 10c32c: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10c330: 74 54 je 10c386 <_Objects_Set_name+0x82> char *d; d = _Workspace_Allocate( length + 1 ); 10c332: 83 ec 0c sub $0xc,%esp 10c335: 8d 40 01 lea 0x1(%eax),%eax 10c338: 50 push %eax 10c339: e8 a2 16 00 00 call 10d9e0 <_Workspace_Allocate> 10c33e: 89 c2 mov %eax,%edx if ( !d ) 10c340: 83 c4 10 add $0x10,%esp 10c343: 31 c0 xor %eax,%eax 10c345: 85 d2 test %edx,%edx 10c347: 74 79 je 10c3c2 <_Objects_Set_name+0xbe><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10c349: 8b 47 0c mov 0xc(%edi),%eax 10c34c: 85 c0 test %eax,%eax 10c34e: 74 19 je 10c369 <_Objects_Set_name+0x65> _Workspace_Free( (void *)the_object->name.name_p ); 10c350: 83 ec 0c sub $0xc,%esp 10c353: 50 push %eax 10c354: 89 55 d4 mov %edx,-0x2c(%ebp) 10c357: e8 9d 16 00 00 call 10d9f9 <_Workspace_Free> the_object->name.name_p = NULL; 10c35c: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) 10c363: 83 c4 10 add $0x10,%esp 10c366: 8b 55 d4 mov -0x2c(%ebp),%edx } strncpy( d, name, length ); 10c369: 50 push %eax 10c36a: 56 push %esi 10c36b: 53 push %ebx 10c36c: 52 push %edx 10c36d: 89 55 d4 mov %edx,-0x2c(%ebp) 10c370: e8 c3 81 00 00 call 114538 d[length] = '\0'; 10c375: 8b 55 d4 mov -0x2c(%ebp),%edx 10c378: c6 04 32 00 movb $0x0,(%edx,%esi,1) the_object->name.name_p = d; 10c37c: 89 57 0c mov %edx,0xc(%edi) 10c37f: b0 01 mov $0x1,%al 10c381: 83 c4 10 add $0x10,%esp 10c384: eb 3c jmp 10c3c2 <_Objects_Set_name+0xbe> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c386: 8a 03 mov (%ebx),%al 10c388: 88 45 d8 mov %al,-0x28(%ebp) 10c38b: 83 fe 01 cmp $0x1,%esi 10c38e: 76 3a jbe 10c3ca <_Objects_Set_name+0xc6> 10c390: 0f be 53 01 movsbl 0x1(%ebx),%edx 10c394: c1 e2 10 shl $0x10,%edx 10c397: 83 fe 02 cmp $0x2,%esi 10c39a: 76 33 jbe 10c3cf <_Objects_Set_name+0xcb> 10c39c: 0f be 43 02 movsbl 0x2(%ebx),%eax 10c3a0: c1 e0 08 shl $0x8,%eax 10c3a3: b9 20 00 00 00 mov $0x20,%ecx 10c3a8: 83 fe 03 cmp $0x3,%esi 10c3ab: 76 04 jbe 10c3b1 <_Objects_Set_name+0xad> 10c3ad: 0f be 4b 03 movsbl 0x3(%ebx),%ecx 10c3b1: 8a 5d d8 mov -0x28(%ebp),%bl 10c3b4: c1 e3 18 shl $0x18,%ebx 10c3b7: 09 d3 or %edx,%ebx 10c3b9: 09 c3 or %eax,%ebx 10c3bb: 09 cb or %ecx,%ebx 10c3bd: 89 5f 0c mov %ebx,0xc(%edi) 10c3c0: b0 01 mov $0x1,%al ); } return true; } 10c3c2: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c5: 5b pop %ebx 10c3c6: 5e pop %esi 10c3c7: 5f pop %edi 10c3c8: c9 leave 10c3c9: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10c3ca: ba 00 00 20 00 mov $0x200000,%edx 10c3cf: b8 00 20 00 00 mov $0x2000,%eax 10c3d4: b9 20 00 00 00 mov $0x20,%ecx 10c3d9: eb d6 jmp 10c3b1 <_Objects_Set_name+0xad> =============================================================================== 0010b20c <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10b20c: 55 push %ebp 10b20d: 89 e5 mov %esp,%ebp 10b20f: 57 push %edi 10b210: 56 push %esi 10b211: 53 push %ebx 10b212: 83 ec 34 sub $0x34,%esp 10b215: 8b 7d 08 mov 0x8(%ebp),%edi 10b218: 8b 75 0c mov 0xc(%ebp),%esi 10b21b: 8a 45 14 mov 0x14(%ebp),%al 10b21e: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10b221: 8d 5d e4 lea -0x1c(%ebp),%ebx 10b224: 53 push %ebx 10b225: 56 push %esi 10b226: e8 82 01 00 00 call 10b3ad <_POSIX_Mutex_Get> 10b22b: 83 c4 10 add $0x10,%esp 10b22e: 85 c0 test %eax,%eax 10b230: 0f 84 ae 00 00 00 je 10b2e4 <_POSIX_Condition_variables_Wait_support+0xd8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b236: a1 08 82 12 00 mov 0x128208,%eax 10b23b: 48 dec %eax 10b23c: a3 08 82 12 00 mov %eax,0x128208 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10b241: 52 push %edx 10b242: 52 push %edx 10b243: 53 push %ebx 10b244: 57 push %edi 10b245: e8 16 fe ff ff call 10b060 <_POSIX_Condition_variables_Get> 10b24a: 89 c3 mov %eax,%ebx switch ( location ) { 10b24c: 83 c4 10 add $0x10,%esp 10b24f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b253: 0f 85 8b 00 00 00 jne 10b2e4 <_POSIX_Condition_variables_Wait_support+0xd8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10b259: 8b 40 14 mov 0x14(%eax),%eax 10b25c: 85 c0 test %eax,%eax 10b25e: 74 0b je 10b26b <_POSIX_Condition_variables_Wait_support+0x5f> 10b260: 3b 06 cmp (%esi),%eax 10b262: 74 07 je 10b26b <_POSIX_Condition_variables_Wait_support+0x5f> _Thread_Enable_dispatch(); 10b264: e8 3c 2d 00 00 call 10dfa5 <_Thread_Enable_dispatch> 10b269: eb 79 jmp 10b2e4 <_POSIX_Condition_variables_Wait_support+0xd8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10b26b: 83 ec 0c sub $0xc,%esp 10b26e: 56 push %esi 10b26f: e8 20 03 00 00 call 10b594 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10b274: 83 c4 10 add $0x10,%esp 10b277: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10b27b: 75 4d jne 10b2ca <_POSIX_Condition_variables_Wait_support+0xbe> the_cond->Mutex = *mutex; 10b27d: 8b 06 mov (%esi),%eax 10b27f: 89 43 14 mov %eax,0x14(%ebx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b282: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10b289: a1 c4 82 12 00 mov 0x1282c4,%eax 10b28e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10b295: 83 c3 18 add $0x18,%ebx 10b298: 89 58 44 mov %ebx,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10b29b: 8b 17 mov (%edi),%edx 10b29d: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10b2a0: 50 push %eax 10b2a1: 68 60 e7 10 00 push $0x10e760 10b2a6: ff 75 10 pushl 0x10(%ebp) 10b2a9: 53 push %ebx 10b2aa: e8 ad 31 00 00 call 10e45c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b2af: e8 f1 2c 00 00 call 10dfa5 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10b2b4: a1 c4 82 12 00 mov 0x1282c4,%eax 10b2b9: 8b 58 34 mov 0x34(%eax),%ebx if ( status && status != ETIMEDOUT ) 10b2bc: 83 c4 10 add $0x10,%esp 10b2bf: 83 fb 74 cmp $0x74,%ebx 10b2c2: 74 10 je 10b2d4 <_POSIX_Condition_variables_Wait_support+0xc8> 10b2c4: 85 db test %ebx,%ebx 10b2c6: 74 0c je 10b2d4 <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN 10b2c8: eb 1f jmp 10b2e9 <_POSIX_Condition_variables_Wait_support+0xdd><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 10b2ca: e8 d6 2c 00 00 call 10dfa5 <_Thread_Enable_dispatch> 10b2cf: bb 74 00 00 00 mov $0x74,%ebx /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10b2d4: 83 ec 0c sub $0xc,%esp 10b2d7: 56 push %esi 10b2d8: e8 37 02 00 00 call 10b514 if ( mutex_status ) 10b2dd: 83 c4 10 add $0x10,%esp 10b2e0: 85 c0 test %eax,%eax 10b2e2: 74 05 je 10b2e9 <_POSIX_Condition_variables_Wait_support+0xdd> 10b2e4: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return EINVAL; } 10b2e9: 89 d8 mov %ebx,%eax 10b2eb: 8d 65 f4 lea -0xc(%ebp),%esp 10b2ee: 5b pop %ebx 10b2ef: 5e pop %esi 10b2f0: 5f pop %edi 10b2f1: c9 leave 10b2f2: c3 ret =============================================================================== 0010e708 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10e708: 55 push %ebp 10e709: 89 e5 mov %esp,%ebp 10e70b: 57 push %edi 10e70c: 56 push %esi 10e70d: 53 push %ebx 10e70e: 83 ec 30 sub $0x30,%esp 10e711: 8b 75 08 mov 0x8(%ebp),%esi 10e714: 8b 5d 14 mov 0x14(%ebp),%ebx 10e717: 8a 55 18 mov 0x18(%ebp),%dl RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10e71a: 8d 45 e4 lea -0x1c(%ebp),%eax 10e71d: 50 push %eax 10e71e: 56 push %esi 10e71f: 68 3c f1 12 00 push $0x12f13c 10e724: 88 55 d4 mov %dl,-0x2c(%ebp) 10e727: e8 9c 2a 00 00 call 1111c8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10e72c: 83 c4 10 add $0x10,%esp 10e72f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e733: 8a 55 d4 mov -0x2c(%ebp),%dl 10e736: 0f 85 af 00 00 00 jne 10e7eb <_POSIX_Message_queue_Receive_support+0xe3> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10e73c: 8b 78 14 mov 0x14(%eax),%edi 10e73f: 89 f9 mov %edi,%ecx 10e741: 83 e1 03 and $0x3,%ecx 10e744: 49 dec %ecx 10e745: 75 0a jne 10e751 <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10e747: e8 b5 32 00 00 call 111a01 <_Thread_Enable_dispatch> 10e74c: e9 9a 00 00 00 jmp 10e7eb <_POSIX_Message_queue_Receive_support+0xe3> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e751: 8b 48 10 mov 0x10(%eax),%ecx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10e754: 8b 45 10 mov 0x10(%ebp),%eax 10e757: 3b 41 68 cmp 0x68(%ecx),%eax 10e75a: 73 15 jae 10e771 <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10e75c: e8 a0 32 00 00 call 111a01 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10e761: e8 32 9b 00 00 call 118298 <__errno> 10e766: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10e76c: e9 85 00 00 00 jmp 10e7f6 <_POSIX_Message_queue_Receive_support+0xee> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e771: 31 c0 xor %eax,%eax 10e773: 84 d2 test %dl,%dl 10e775: 74 0b je 10e782 <_POSIX_Message_queue_Receive_support+0x7a><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e777: 89 f8 mov %edi,%eax 10e779: c1 e8 0e shr $0xe,%eax 10e77c: 83 f0 01 xor $0x1,%eax 10e77f: 83 e0 01 and $0x1,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10e782: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10e789: 52 push %edx 10e78a: 52 push %edx 10e78b: ff 75 1c pushl 0x1c(%ebp) 10e78e: 0f b6 c0 movzbl %al,%eax 10e791: 50 push %eax 10e792: 8d 45 e0 lea -0x20(%ebp),%eax 10e795: 50 push %eax 10e796: ff 75 0c pushl 0xc(%ebp) 10e799: 56 push %esi 10e79a: 83 c1 1c add $0x1c,%ecx 10e79d: 51 push %ecx 10e79e: e8 59 1c 00 00 call 1103fc <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10e7a3: 83 c4 20 add $0x20,%esp 10e7a6: e8 56 32 00 00 call 111a01 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10e7ab: a1 04 ed 12 00 mov 0x12ed04,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10e7b0: 8b 50 24 mov 0x24(%eax),%edx 10e7b3: c1 fa 1f sar $0x1f,%edx 10e7b6: 8b 48 24 mov 0x24(%eax),%ecx 10e7b9: 31 d1 xor %edx,%ecx 10e7bb: 89 0b mov %ecx,(%ebx) 10e7bd: 29 13 sub %edx,(%ebx) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10e7bf: 83 78 34 00 cmpl $0x0,0x34(%eax) 10e7c3: 75 05 jne 10e7ca <_POSIX_Message_queue_Receive_support+0xc2> return length_out; 10e7c5: 8b 45 e0 mov -0x20(%ebp),%eax 10e7c8: eb 2f jmp 10e7f9 <_POSIX_Message_queue_Receive_support+0xf1> rtems_set_errno_and_return_minus_one( 10e7ca: e8 c9 9a 00 00 call 118298 <__errno> 10e7cf: 89 c3 mov %eax,%ebx 10e7d1: 83 ec 0c sub $0xc,%esp 10e7d4: a1 04 ed 12 00 mov 0x12ed04,%eax 10e7d9: ff 70 34 pushl 0x34(%eax) 10e7dc: e8 ff 01 00 00 call 10e9e0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10e7e1: 89 03 mov %eax,(%ebx) 10e7e3: 83 c8 ff or $0xffffffff,%eax 10e7e6: 83 c4 10 add $0x10,%esp 10e7e9: eb 0e jmp 10e7f9 <_POSIX_Message_queue_Receive_support+0xf1> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e7eb: e8 a8 9a 00 00 call 118298 <__errno> 10e7f0: c7 00 09 00 00 00 movl $0x9,(%eax) 10e7f6: 83 c8 ff or $0xffffffff,%eax } 10e7f9: 8d 65 f4 lea -0xc(%ebp),%esp 10e7fc: 5b pop %ebx 10e7fd: 5e pop %esi 10e7fe: 5f pop %edi 10e7ff: c9 leave 10e800: c3 ret =============================================================================== 0010f664 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10f664: 55 push %ebp 10f665: 89 e5 mov %esp,%ebp 10f667: 83 ec 08 sub $0x8,%esp 10f66a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f66d: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10f673: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10f67a: 75 2c jne 10f6a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10f67c: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 10f683: 75 23 jne 10f6a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelation_requested ) { 10f685: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10f68c: 74 1a je 10f6a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10f68e: a1 00 72 12 00 mov 0x127200,%eax 10f693: 48 dec %eax 10f694: a3 00 72 12 00 mov %eax,0x127200 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10f699: 50 push %eax 10f69a: 50 push %eax 10f69b: 6a ff push $0xffffffff 10f69d: 52 push %edx 10f69e: e8 e9 05 00 00 call 10fc8c <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10f6a3: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 10f6a6: c9 leave 10f6a7: c3 ret 10f6a8: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 10f6a9: e9 1b d0 ff ff jmp 10c6c9 <_Thread_Enable_dispatch> =============================================================================== 0011066c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 11066c: 55 push %ebp 11066d: 89 e5 mov %esp,%ebp 11066f: 57 push %edi 110670: 56 push %esi 110671: 53 push %ebx 110672: 83 ec 18 sub $0x18,%esp 110675: 8b 7d 08 mov 0x8(%ebp),%edi 110678: 8b 5d 0c mov 0xc(%ebp),%ebx 11067b: 8b 75 10 mov 0x10(%ebp),%esi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 11067e: ff 33 pushl (%ebx) 110680: e8 c7 ff ff ff call 11064c <_POSIX_Priority_Is_valid> 110685: 83 c4 10 add $0x10,%esp 110688: 84 c0 test %al,%al 11068a: 0f 84 97 00 00 00 je 110727 <_POSIX_Thread_Translate_sched_param+0xbb><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 110690: c7 06 00 00 00 00 movl $0x0,(%esi) *budget_callout = NULL; 110696: 8b 45 14 mov 0x14(%ebp),%eax 110699: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 11069f: 85 ff test %edi,%edi 1106a1: 75 08 jne 1106ab <_POSIX_Thread_Translate_sched_param+0x3f> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1106a3: c7 06 01 00 00 00 movl $0x1,(%esi) 1106a9: eb 18 jmp 1106c3 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_FIFO ) { 1106ab: 83 ff 01 cmp $0x1,%edi 1106ae: 75 08 jne 1106b8 <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1106b0: c7 06 00 00 00 00 movl $0x0,(%esi) 1106b6: eb 0b jmp 1106c3 <_POSIX_Thread_Translate_sched_param+0x57> return 0; } if ( policy == SCHED_RR ) { 1106b8: 83 ff 02 cmp $0x2,%edi 1106bb: 75 0a jne 1106c7 <_POSIX_Thread_Translate_sched_param+0x5b> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1106bd: c7 06 02 00 00 00 movl $0x2,(%esi) 1106c3: 31 c0 xor %eax,%eax return 0; 1106c5: eb 65 jmp 11072c <_POSIX_Thread_Translate_sched_param+0xc0> } if ( policy == SCHED_SPORADIC ) { 1106c7: 83 ff 04 cmp $0x4,%edi 1106ca: 75 5b jne 110727 <_POSIX_Thread_Translate_sched_param+0xbb> if ( (param->sched_ss_repl_period.tv_sec == 0) && 1106cc: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1106d0: 75 06 jne 1106d8 <_POSIX_Thread_Translate_sched_param+0x6c> (param->sched_ss_repl_period.tv_nsec == 0) ) 1106d2: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 1106d6: 74 4f je 110727 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 1106d8: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 1106dc: 75 06 jne 1106e4 <_POSIX_Thread_Translate_sched_param+0x78> (param->sched_ss_init_budget.tv_nsec == 0) ) 1106de: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 1106e2: 74 43 je 110727 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 1106e4: 83 ec 0c sub $0xc,%esp 1106e7: 8d 43 08 lea 0x8(%ebx),%eax 1106ea: 50 push %eax 1106eb: e8 18 d7 ff ff call 10de08 <_Timespec_To_ticks> 1106f0: 89 c7 mov %eax,%edi 1106f2: 8d 43 10 lea 0x10(%ebx),%eax 1106f5: 89 04 24 mov %eax,(%esp) 1106f8: e8 0b d7 ff ff call 10de08 <_Timespec_To_ticks> 1106fd: 83 c4 10 add $0x10,%esp 110700: 39 c7 cmp %eax,%edi 110702: 72 23 jb 110727 <_POSIX_Thread_Translate_sched_param+0xbb> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 110704: 83 ec 0c sub $0xc,%esp 110707: ff 73 04 pushl 0x4(%ebx) 11070a: e8 3d ff ff ff call 11064c <_POSIX_Priority_Is_valid> 11070f: 83 c4 10 add $0x10,%esp 110712: 84 c0 test %al,%al 110714: 74 11 je 110727 <_POSIX_Thread_Translate_sched_param+0xbb> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 110716: c7 06 03 00 00 00 movl $0x3,(%esi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 11071c: 8b 45 14 mov 0x14(%ebp),%eax 11071f: c7 00 0b ac 10 00 movl $0x10ac0b,(%eax) 110725: eb 9c jmp 1106c3 <_POSIX_Thread_Translate_sched_param+0x57> return 0; 110727: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 11072c: 8d 65 f4 lea -0xc(%ebp),%esp 11072f: 5b pop %ebx 110730: 5e pop %esi 110731: 5f pop %edi 110732: c9 leave 110733: c3 ret =============================================================================== 0010a948 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a948: 55 push %ebp 10a949: 89 e5 mov %esp,%ebp 10a94b: 57 push %edi 10a94c: 56 push %esi 10a94d: 53 push %ebx 10a94e: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10a951: 8b 3d 10 32 12 00 mov 0x123210,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a957: 8b 15 0c 32 12 00 mov 0x12320c,%edx if ( !user_threads || maximum == 0 ) 10a95d: 85 d2 test %edx,%edx 10a95f: 74 54 je 10a9b5 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a961: 85 ff test %edi,%edi 10a963: 74 50 je 10a9b5 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a965: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a967: 8d 75 a8 lea -0x58(%ebp),%esi 10a96a: 83 ec 0c sub $0xc,%esp 10a96d: 56 push %esi 10a96e: 89 55 a4 mov %edx,-0x5c(%ebp) 10a971: e8 be 5d 00 00 call 110734 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a976: 5a pop %edx 10a977: 59 pop %ecx 10a978: 6a 02 push $0x2 10a97a: 56 push %esi 10a97b: e8 dc 5d 00 00 call 11075c (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a980: 59 pop %ecx 10a981: 58 pop %eax 10a982: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a986: 56 push %esi 10a987: e8 00 5e 00 00 call 11078c status = pthread_create( 10a98c: 6a 00 push $0x0 10a98e: ff 34 df pushl (%edi,%ebx,8) 10a991: 56 push %esi 10a992: 8d 45 e4 lea -0x1c(%ebp),%eax 10a995: 50 push %eax 10a996: e8 e9 fc ff ff call 10a684 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a99b: 83 c4 20 add $0x20,%esp 10a99e: 85 c0 test %eax,%eax 10a9a0: 8b 55 a4 mov -0x5c(%ebp),%edx 10a9a3: 74 0b je 10a9b0 <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a9a5: 52 push %edx 10a9a6: 50 push %eax 10a9a7: 6a 01 push $0x1 10a9a9: 6a 02 push $0x2 10a9ab: e8 b4 1b 00 00 call 10c564 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a9b0: 43 inc %ebx 10a9b1: 39 d3 cmp %edx,%ebx 10a9b3: 72 b5 jb 10a96a <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a9b5: 8d 65 f4 lea -0xc(%ebp),%esp 10a9b8: 5b pop %ebx 10a9b9: 5e pop %esi 10a9ba: 5f pop %edi 10a9bb: c9 leave 10a9bc: c3 ret =============================================================================== 0010f85f <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10f85f: 55 push %ebp 10f860: 89 e5 mov %esp,%ebp 10f862: 56 push %esi 10f863: 53 push %ebx 10f864: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f867: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 10f86d: 83 ec 0c sub $0xc,%esp 10f870: 8d 86 94 00 00 00 lea 0x94(%esi),%eax 10f876: 50 push %eax 10f877: e8 00 11 00 00 call 11097c <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10f87c: 89 43 78 mov %eax,0x78(%ebx) 10f87f: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 10f886: 2b 86 84 00 00 00 sub 0x84(%esi),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 10f88c: 89 43 18 mov %eax,0x18(%ebx) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10f88f: 83 c4 10 add $0x10,%esp 10f892: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10f896: 75 12 jne 10f8aa <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10f898: 39 43 14 cmp %eax,0x14(%ebx) 10f89b: 76 0d jbe 10f8aa <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10f89d: 52 push %edx 10f89e: 6a 01 push $0x1 10f8a0: 50 push %eax 10f8a1: 53 push %ebx 10f8a2: e8 d9 c5 ff ff call 10be80 <_Thread_Change_priority> 10f8a7: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 10f8aa: 83 ec 0c sub $0xc,%esp 10f8ad: 8d 86 8c 00 00 00 lea 0x8c(%esi),%eax 10f8b3: 50 push %eax 10f8b4: e8 c3 10 00 00 call 11097c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10f8b9: 89 86 b0 00 00 00 mov %eax,0xb0(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10f8bf: 83 c4 10 add $0x10,%esp 10f8c2: 81 c6 a4 00 00 00 add $0xa4,%esi 10f8c8: 89 75 0c mov %esi,0xc(%ebp) 10f8cb: c7 45 08 e4 62 12 00 movl $0x1262e4,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 10f8d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f8d5: 5b pop %ebx 10f8d6: 5e pop %esi 10f8d7: c9 leave 10f8d8: e9 23 d8 ff ff jmp 10d100 <_Watchdog_Insert> =============================================================================== 0010f81f <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10f81f: 55 push %ebp 10f820: 89 e5 mov %esp,%ebp 10f822: 83 ec 08 sub $0x8,%esp 10f825: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f828: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 10f82e: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10f835: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10f83c: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 10f842: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10f845: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10f849: 75 12 jne 10f85d <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10f84b: 39 50 14 cmp %edx,0x14(%eax) 10f84e: 73 0d jae 10f85d <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10f850: 51 push %ecx 10f851: 6a 01 push $0x1 10f853: 52 push %edx 10f854: 50 push %eax 10f855: e8 26 c6 ff ff call 10be80 <_Thread_Change_priority> 10f85a: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10f85d: c9 leave 10f85e: c3 ret =============================================================================== 0010a6f4 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10a6f4: 55 push %ebp 10a6f5: 89 e5 mov %esp,%ebp 10a6f7: 53 push %ebx 10a6f8: 83 ec 04 sub $0x4,%esp 10a6fb: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a6fe: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a701: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a705: 75 06 jne 10a70d <_POSIX_Timer_TSR+0x19> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10a707: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a70b: 74 34 je 10a741 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( 10a70d: 83 ec 0c sub $0xc,%esp 10a710: 53 push %ebx 10a711: 68 f4 a6 10 00 push $0x10a6f4 10a716: ff 73 08 pushl 0x8(%ebx) 10a719: ff 73 64 pushl 0x64(%ebx) 10a71c: 8d 43 10 lea 0x10(%ebx),%eax 10a71f: 50 push %eax 10a720: e8 b7 5c 00 00 call 1103dc <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a725: 83 c4 20 add $0x20,%esp 10a728: 84 c0 test %al,%al 10a72a: 74 30 je 10a75c <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a72c: 83 ec 0c sub $0xc,%esp 10a72f: 8d 43 6c lea 0x6c(%ebx),%eax 10a732: 50 push %eax 10a733: e8 4c 14 00 00 call 10bb84 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a738: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a73c: 83 c4 10 add $0x10,%esp 10a73f: eb 04 jmp 10a745 <_POSIX_Timer_TSR+0x51> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a741: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 10a745: 50 push %eax 10a746: 50 push %eax 10a747: ff 73 44 pushl 0x44(%ebx) 10a74a: ff 73 38 pushl 0x38(%ebx) 10a74d: e8 5a 58 00 00 call 10ffac } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a752: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a759: 83 c4 10 add $0x10,%esp } 10a75c: 8b 5d fc mov -0x4(%ebp),%ebx 10a75f: c9 leave 10a760: c3 ret =============================================================================== 001121f4 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 1121f4: 55 push %ebp 1121f5: 89 e5 mov %esp,%ebp 1121f7: 57 push %edi 1121f8: 56 push %esi 1121f9: 53 push %ebx 1121fa: 83 ec 38 sub $0x38,%esp 1121fd: 8b 5d 08 mov 0x8(%ebp),%ebx 112200: 8b 75 0c mov 0xc(%ebp),%esi siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112203: 6a 01 push $0x1 112205: 0f b6 45 10 movzbl 0x10(%ebp),%eax 112209: 50 push %eax 11220a: 8d 7d dc lea -0x24(%ebp),%edi 11220d: 57 push %edi 11220e: 56 push %esi 11220f: 53 push %ebx 112210: e8 5b 00 00 00 call 112270 <_POSIX_signals_Clear_signals> 112215: 83 c4 20 add $0x20,%esp 112218: 84 c0 test %al,%al 11221a: 74 48 je 112264 <_POSIX_signals_Check_signal+0x70> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 11221c: 6b d6 0c imul $0xc,%esi,%edx 11221f: 8b 82 70 67 12 00 mov 0x126770(%edx),%eax 112225: 83 f8 01 cmp $0x1,%eax 112228: 74 3a je 112264 <_POSIX_signals_Check_signal+0x70><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 11222a: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 112230: 89 4d d4 mov %ecx,-0x2c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112233: 0b 8a 6c 67 12 00 or 0x12676c(%edx),%ecx 112239: 89 8b cc 00 00 00 mov %ecx,0xcc(%ebx) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11223f: 83 ba 68 67 12 00 02 cmpl $0x2,0x126768(%edx) 112246: 75 06 jne 11224e <_POSIX_signals_Check_signal+0x5a> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112248: 52 push %edx 112249: 6a 00 push $0x0 11224b: 57 push %edi 11224c: eb 03 jmp 112251 <_POSIX_signals_Check_signal+0x5d> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 11224e: 83 ec 0c sub $0xc,%esp 112251: 56 push %esi 112252: ff d0 call *%eax 112254: 83 c4 10 add $0x10,%esp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 112257: 8b 45 d4 mov -0x2c(%ebp),%eax 11225a: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 112260: b0 01 mov $0x1,%al return true; 112262: eb 02 jmp 112266 <_POSIX_signals_Check_signal+0x72> 112264: 31 c0 xor %eax,%eax } 112266: 8d 65 f4 lea -0xc(%ebp),%esp 112269: 5b pop %ebx 11226a: 5e pop %esi 11226b: 5f pop %edi 11226c: c9 leave 11226d: c3 ret =============================================================================== 00112978 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 112978: 55 push %ebp 112979: 89 e5 mov %esp,%ebp 11297b: 53 push %ebx 11297c: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11297f: 9c pushf 112980: fa cli 112981: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 112982: 6b c1 0c imul $0xc,%ecx,%eax 112985: 83 b8 68 67 12 00 02 cmpl $0x2,0x126768(%eax) 11298c: 75 0e jne 11299c <_POSIX_signals_Clear_process_signals+0x24> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11298e: 8d 98 64 69 12 00 lea 0x126964(%eax),%ebx 112994: 39 98 60 69 12 00 cmp %ebx,0x126960(%eax) 11299a: 75 1d jne 1129b9 <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 11299c: 49 dec %ecx 11299d: b8 fe ff ff ff mov $0xfffffffe,%eax 1129a2: d3 c0 rol %cl,%eax 1129a4: 23 05 5c 69 12 00 and 0x12695c,%eax 1129aa: a3 5c 69 12 00 mov %eax,0x12695c if ( !_POSIX_signals_Pending ) 1129af: 85 c0 test %eax,%eax 1129b1: 75 06 jne 1129b9 <_POSIX_signals_Clear_process_signals+0x41><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 1129b3: ff 0d a8 62 12 00 decl 0x1262a8 } _ISR_Enable( level ); 1129b9: 52 push %edx 1129ba: 9d popf } 1129bb: 5b pop %ebx 1129bc: c9 leave 1129bd: c3 ret =============================================================================== 0010afcc <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10afcc: 55 push %ebp 10afcd: 89 e5 mov %esp,%ebp 10afcf: 56 push %esi 10afd0: 53 push %ebx 10afd1: 8b 55 08 mov 0x8(%ebp),%edx 10afd4: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10afd9: bb 01 00 00 00 mov $0x1,%ebx 10afde: 8d 48 ff lea -0x1(%eax),%ecx 10afe1: 89 de mov %ebx,%esi 10afe3: d3 e6 shl %cl,%esi 10afe5: 85 d6 test %edx,%esi 10afe7: 75 1e jne 10b007 <_POSIX_signals_Get_highest+0x3b><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10afe9: 40 inc %eax 10afea: 83 f8 20 cmp $0x20,%eax 10afed: 75 ef jne 10afde <_POSIX_signals_Get_highest+0x12> 10afef: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10aff1: bb 01 00 00 00 mov $0x1,%ebx 10aff6: 8d 48 ff lea -0x1(%eax),%ecx 10aff9: 89 de mov %ebx,%esi 10affb: d3 e6 shl %cl,%esi 10affd: 85 d6 test %edx,%esi 10afff: 75 06 jne 10b007 <_POSIX_signals_Get_highest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10b001: 40 inc %eax 10b002: 83 f8 1b cmp $0x1b,%eax 10b005: 75 ef jne 10aff6 <_POSIX_signals_Get_highest+0x2a><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10b007: 5b pop %ebx 10b008: 5e pop %esi 10b009: c9 leave 10b00a: c3 ret =============================================================================== 0010f519 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10f519: 55 push %ebp 10f51a: 89 e5 mov %esp,%ebp 10f51c: 56 push %esi 10f51d: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10f51e: 8b 45 08 mov 0x8(%ebp),%eax 10f521: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx /* * api may be NULL in case of a thread close in progress */ if ( !api ) 10f527: 85 db test %ebx,%ebx 10f529: 74 6a je 10f595 <_POSIX_signals_Post_switch_extension+0x7c><== NEVER TAKEN * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 10f52b: 9c pushf 10f52c: fa cli 10f52d: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10f52e: 8b 15 5c 69 12 00 mov 0x12695c,%edx 10f534: 0b 93 d0 00 00 00 or 0xd0(%ebx),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 10f53a: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10f540: f7 d0 not %eax 10f542: 85 c2 test %eax,%edx 10f544: 75 04 jne 10f54a <_POSIX_signals_Post_switch_extension+0x31> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10f546: 51 push %ecx 10f547: 9d popf 10f548: eb 4b jmp 10f595 <_POSIX_signals_Post_switch_extension+0x7c> break; } _ISR_Enable( level ); 10f54a: 51 push %ecx 10f54b: 9d popf 10f54c: be 1b 00 00 00 mov $0x1b,%esi for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10f551: 52 push %edx 10f552: 6a 00 push $0x0 10f554: 56 push %esi 10f555: 53 push %ebx 10f556: e8 99 2c 00 00 call 1121f4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f55b: 83 c4 0c add $0xc,%esp 10f55e: 6a 01 push $0x1 10f560: 56 push %esi 10f561: 53 push %ebx 10f562: e8 8d 2c 00 00 call 1121f4 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10f567: 46 inc %esi 10f568: 83 c4 10 add $0x10,%esp 10f56b: 83 fe 20 cmp $0x20,%esi 10f56e: 75 e1 jne 10f551 <_POSIX_signals_Post_switch_extension+0x38> 10f570: 66 be 01 00 mov $0x1,%si _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10f574: 50 push %eax 10f575: 6a 00 push $0x0 10f577: 56 push %esi 10f578: 53 push %ebx 10f579: e8 76 2c 00 00 call 1121f4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10f57e: 83 c4 0c add $0xc,%esp 10f581: 6a 01 push $0x1 10f583: 56 push %esi 10f584: 53 push %ebx 10f585: e8 6a 2c 00 00 call 1121f4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10f58a: 46 inc %esi 10f58b: 83 c4 10 add $0x10,%esp 10f58e: 83 fe 1b cmp $0x1b,%esi 10f591: 75 e1 jne 10f574 <_POSIX_signals_Post_switch_extension+0x5b> 10f593: eb 96 jmp 10f52b <_POSIX_signals_Post_switch_extension+0x12> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 10f595: 8d 65 f8 lea -0x8(%ebp),%esp 10f598: 5b pop %ebx 10f599: 5e pop %esi 10f59a: c9 leave 10f59b: c3 ret =============================================================================== 00112380 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 112380: 55 push %ebp 112381: 89 e5 mov %esp,%ebp 112383: 57 push %edi 112384: 56 push %esi 112385: 53 push %ebx 112386: 83 ec 0c sub $0xc,%esp 112389: 8b 5d 08 mov 0x8(%ebp),%ebx 11238c: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11238f: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 112395: 8d 4a ff lea -0x1(%edx),%ecx 112398: b8 01 00 00 00 mov $0x1,%eax 11239d: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11239f: 8b 4b 10 mov 0x10(%ebx),%ecx 1123a2: 89 cf mov %ecx,%edi 1123a4: 81 e7 00 80 00 10 and $0x10008000,%edi 1123aa: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1123b0: 75 50 jne 112402 <_POSIX_signals_Unblock_thread+0x82> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 1123b2: 85 43 30 test %eax,0x30(%ebx) 1123b5: 75 10 jne 1123c7 <_POSIX_signals_Unblock_thread+0x47> 1123b7: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 1123bd: f7 d1 not %ecx 1123bf: 85 c8 test %ecx,%eax 1123c1: 0f 84 a4 00 00 00 je 11246b <_POSIX_signals_Unblock_thread+0xeb> the_thread->Wait.return_code = EINTR; 1123c7: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 1123ce: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 1123d1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1123d5: 75 12 jne 1123e9 <_POSIX_signals_Unblock_thread+0x69> the_info->si_signo = signo; 1123d7: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 1123d9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 1123e0: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 1123e7: eb 0c jmp 1123f5 <_POSIX_signals_Unblock_thread+0x75> } else { *the_info = *info; 1123e9: b9 03 00 00 00 mov $0x3,%ecx 1123ee: 89 c7 mov %eax,%edi 1123f0: 8b 75 10 mov 0x10(%ebp),%esi 1123f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 1123f5: 83 ec 0c sub $0xc,%esp 1123f8: 53 push %ebx 1123f9: e8 9e a5 ff ff call 10c99c <_Thread_queue_Extract_with_proxy> 1123fe: b0 01 mov $0x1,%al 112400: eb 48 jmp 11244a <_POSIX_signals_Unblock_thread+0xca> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 112402: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 112408: f7 d2 not %edx 11240a: 85 d0 test %edx,%eax 11240c: 74 5d je 11246b <_POSIX_signals_Unblock_thread+0xeb> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 11240e: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 112412: f7 c1 00 00 00 10 test $0x10000000,%ecx 112418: 74 35 je 11244f <_POSIX_signals_Unblock_thread+0xcf> the_thread->Wait.return_code = EINTR; 11241a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 112421: 80 e1 08 and $0x8,%cl 112424: 74 45 je 11246b <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112426: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11242a: 75 0f jne 11243b <_POSIX_signals_Unblock_thread+0xbb><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 11242c: 83 ec 0c sub $0xc,%esp 11242f: 8d 43 48 lea 0x48(%ebx),%eax 112432: 50 push %eax 112433: e8 e0 ad ff ff call 10d218 <_Watchdog_Remove> 112438: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11243b: 50 push %eax 11243c: 50 push %eax 11243d: 68 f8 ff 03 10 push $0x1003fff8 112442: 53 push %ebx 112443: e8 58 9b ff ff call 10bfa0 <_Thread_Clear_state> 112448: 31 c0 xor %eax,%eax 11244a: 83 c4 10 add $0x10,%esp 11244d: eb 1e jmp 11246d <_POSIX_signals_Unblock_thread+0xed> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11244f: 85 c9 test %ecx,%ecx 112451: 75 18 jne 11246b <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 112453: a1 a0 62 12 00 mov 0x1262a0,%eax 112458: 85 c0 test %eax,%eax 11245a: 74 0f je 11246b <_POSIX_signals_Unblock_thread+0xeb> 11245c: 3b 1d c4 62 12 00 cmp 0x1262c4,%ebx 112462: 75 07 jne 11246b <_POSIX_signals_Unblock_thread+0xeb><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 112464: c6 05 58 63 12 00 01 movb $0x1,0x126358 11246b: 31 c0 xor %eax,%eax } } return false; } 11246d: 8d 65 f4 lea -0xc(%ebp),%esp 112470: 5b pop %ebx 112471: 5e pop %esi 112472: 5f pop %edi 112473: c9 leave 112474: c3 ret =============================================================================== 0010fd32 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10fd32: 55 push %ebp 10fd33: 89 e5 mov %esp,%ebp 10fd35: 57 push %edi 10fd36: 56 push %esi 10fd37: 53 push %ebx 10fd38: 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 ]; 10fd3b: 8b 45 08 mov 0x8(%ebp),%eax 10fd3e: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 10fd44: 85 db test %ebx,%ebx 10fd46: 74 45 je 10fd8d <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10fd48: 9c pushf 10fd49: fa cli 10fd4a: 58 pop %eax signal_set = asr->signals_posted; 10fd4b: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10fd4e: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10fd55: 50 push %eax 10fd56: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10fd57: 85 ff test %edi,%edi 10fd59: 74 32 je 10fd8d <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10fd5b: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fd5e: 50 push %eax 10fd5f: 8d 75 e4 lea -0x1c(%ebp),%esi 10fd62: 56 push %esi 10fd63: 68 ff ff 00 00 push $0xffff 10fd68: ff 73 10 pushl 0x10(%ebx) 10fd6b: e8 54 28 00 00 call 1125c4 (*asr->handler)( signal_set ); 10fd70: 89 3c 24 mov %edi,(%esp) 10fd73: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10fd76: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fd79: 83 c4 0c add $0xc,%esp 10fd7c: 56 push %esi 10fd7d: 68 ff ff 00 00 push $0xffff 10fd82: ff 75 e4 pushl -0x1c(%ebp) 10fd85: e8 3a 28 00 00 call 1125c4 10fd8a: 83 c4 10 add $0x10,%esp } 10fd8d: 8d 65 f4 lea -0xc(%ebp),%esp 10fd90: 5b pop %ebx 10fd91: 5e pop %esi 10fd92: 5f pop %edi 10fd93: c9 leave 10fd94: c3 ret =============================================================================== 0010b7e0 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b7e0: 55 push %ebp 10b7e1: 89 e5 mov %esp,%ebp 10b7e3: 53 push %ebx 10b7e4: 83 ec 18 sub $0x18,%esp 10b7e7: 8d 45 f4 lea -0xc(%ebp),%eax 10b7ea: 50 push %eax 10b7eb: ff 75 08 pushl 0x8(%ebp) 10b7ee: 68 14 92 12 00 push $0x129214 10b7f3: e8 78 1a 00 00 call 10d270 <_Objects_Get> 10b7f8: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b7fa: 83 c4 10 add $0x10,%esp 10b7fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b801: 75 64 jne 10b867 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b803: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b806: f6 40 11 40 testb $0x40,0x11(%eax) 10b80a: 74 18 je 10b824 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 10b80c: 8b 50 20 mov 0x20(%eax),%edx 10b80f: 3b 53 08 cmp 0x8(%ebx),%edx 10b812: 75 10 jne 10b824 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b814: 52 push %edx 10b815: 52 push %edx 10b816: 68 f8 ff 03 10 push $0x1003fff8 10b81b: 50 push %eax 10b81c: e8 c3 1e 00 00 call 10d6e4 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b821: 59 pop %ecx 10b822: eb 10 jmp 10b834 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b824: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b828: 75 2b jne 10b855 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b82a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b831: 83 ec 0c sub $0xc,%esp 10b834: 53 push %ebx 10b835: e8 56 fa ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b83a: 8b 43 3c mov 0x3c(%ebx),%eax 10b83d: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b840: 58 pop %eax 10b841: 5a pop %edx 10b842: 83 c3 10 add $0x10,%ebx 10b845: 53 push %ebx 10b846: 68 e8 93 12 00 push $0x1293e8 10b84b: e8 b8 31 00 00 call 10ea08 <_Watchdog_Insert> 10b850: 83 c4 10 add $0x10,%esp 10b853: eb 07 jmp 10b85c <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b855: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b85c: a1 0c 93 12 00 mov 0x12930c,%eax 10b861: 48 dec %eax 10b862: a3 0c 93 12 00 mov %eax,0x12930c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b867: 8b 5d fc mov -0x4(%ebp),%ebx 10b86a: c9 leave 10b86b: c3 ret =============================================================================== 0010b108 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b108: 55 push %ebp 10b109: 89 e5 mov %esp,%ebp 10b10b: 53 push %ebx 10b10c: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10b10f: 8b 1d 44 5b 12 00 mov 0x125b44,%ebx if ((!the_tod) || 10b115: 85 c9 test %ecx,%ecx 10b117: 74 59 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b119: b8 40 42 0f 00 mov $0xf4240,%eax 10b11e: 31 d2 xor %edx,%edx 10b120: f7 f3 div %ebx 10b122: 39 41 18 cmp %eax,0x18(%ecx) 10b125: 73 4b jae 10b172 <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b127: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b12b: 77 45 ja 10b172 <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b12d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b131: 77 3f ja 10b172 <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b133: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b137: 77 39 ja 10b172 <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b139: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b13c: 85 c0 test %eax,%eax 10b13e: 74 32 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN 10b140: 83 f8 0c cmp $0xc,%eax 10b143: 77 2d ja 10b172 <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10b145: 8b 19 mov (%ecx),%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b147: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b14d: 76 23 jbe 10b172 <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10b14f: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b152: 85 d2 test %edx,%edx 10b154: 74 1c je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b156: 80 e3 03 and $0x3,%bl 10b159: 75 09 jne 10b164 <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b15b: 8b 04 85 08 2a 12 00 mov 0x122a08(,%eax,4),%eax 10b162: eb 07 jmp 10b16b <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b164: 8b 04 85 d4 29 12 00 mov 0x1229d4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b16b: 39 c2 cmp %eax,%edx 10b16d: 0f 96 c0 setbe %al 10b170: eb 02 jmp 10b174 <_TOD_Validate+0x6c> 10b172: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b174: 5b pop %ebx 10b175: c9 leave 10b176: c3 ret =============================================================================== 0010be80 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 57 push %edi 10be84: 56 push %esi 10be85: 53 push %ebx 10be86: 83 ec 28 sub $0x28,%esp 10be89: 8b 5d 08 mov 0x8(%ebp),%ebx 10be8c: 8b 7d 0c mov 0xc(%ebp),%edi 10be8f: 8a 45 10 mov 0x10(%ebp),%al 10be92: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10be95: 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 ); 10be98: 53 push %ebx 10be99: e8 5e 0d 00 00 call 10cbfc <_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 ) 10be9e: 83 c4 10 add $0x10,%esp 10bea1: 39 7b 14 cmp %edi,0x14(%ebx) 10bea4: 74 0c je 10beb2 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bea6: 50 push %eax 10bea7: 50 push %eax 10bea8: 57 push %edi 10bea9: 53 push %ebx 10beaa: e8 15 0c 00 00 call 10cac4 <_Thread_Set_priority> 10beaf: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10beb2: 9c pushf 10beb3: fa cli 10beb4: 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; 10beb5: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10beb8: 83 f8 04 cmp $0x4,%eax 10bebb: 74 2f je 10beec <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bebd: 83 e6 04 and $0x4,%esi 10bec0: 75 08 jne 10beca <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bec2: 89 c2 mov %eax,%edx 10bec4: 83 e2 fb and $0xfffffffb,%edx 10bec7: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10beca: 51 push %ecx 10becb: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10becc: a9 e0 be 03 00 test $0x3bee0,%eax 10bed1: 0f 84 c0 00 00 00 je 10bf97 <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10bed7: 89 5d 0c mov %ebx,0xc(%ebp) 10beda: 8b 43 44 mov 0x44(%ebx),%eax 10bedd: 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 ); } 10bee0: 8d 65 f4 lea -0xc(%ebp),%esp 10bee3: 5b pop %ebx 10bee4: 5e pop %esi 10bee5: 5f pop %edi 10bee6: 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 ); 10bee7: e9 50 0b 00 00 jmp 10ca3c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10beec: 83 e6 04 and $0x4,%esi 10beef: 75 53 jne 10bf44 <_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 ); 10bef1: 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; 10bef8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10befe: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10bf05: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bf08: 66 a1 b8 62 12 00 mov 0x1262b8,%ax 10bf0e: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10bf14: 66 a3 b8 62 12 00 mov %ax,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10bf1a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10bf1e: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10bf24: 74 0e je 10bf34 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10bf26: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10bf29: 8b 10 mov (%eax),%edx after_node->next = the_node; 10bf2b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10bf2d: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10bf2f: 89 5a 04 mov %ebx,0x4(%edx) 10bf32: eb 10 jmp 10bf44 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10bf34: 8d 50 04 lea 0x4(%eax),%edx 10bf37: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10bf39: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10bf3c: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10bf3f: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10bf41: 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 ); 10bf44: 51 push %ecx 10bf45: 9d popf 10bf46: 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 ); 10bf47: 66 8b 1d b8 62 12 00 mov 0x1262b8,%bx 10bf4e: 31 c0 xor %eax,%eax 10bf50: 89 c2 mov %eax,%edx 10bf52: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10bf56: 0f b7 d2 movzwl %dx,%edx 10bf59: 66 8b 9c 12 30 63 12 mov 0x126330(%edx,%edx,1),%bx 10bf60: 00 10bf61: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10bf65: c1 e2 04 shl $0x4,%edx 10bf68: 0f b7 c0 movzwl %ax,%eax 10bf6b: 01 c2 add %eax,%edx 10bf6d: 6b d2 0c imul $0xc,%edx,%edx 10bf70: 8b 1d d0 61 12 00 mov 0x1261d0,%ebx 10bf76: 8b 14 1a mov (%edx,%ebx,1),%edx 10bf79: 89 15 94 62 12 00 mov %edx,0x126294 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bf7f: a1 c4 62 12 00 mov 0x1262c4,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10bf84: 39 d0 cmp %edx,%eax 10bf86: 74 0d je 10bf95 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10bf88: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf8c: 74 07 je 10bf95 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10bf8e: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10bf95: 51 push %ecx 10bf96: 9d popf } 10bf97: 8d 65 f4 lea -0xc(%ebp),%esp 10bf9a: 5b pop %ebx 10bf9b: 5e pop %esi 10bf9c: 5f pop %edi 10bf9d: c9 leave 10bf9e: c3 ret =============================================================================== 0010bfa0 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bfa0: 55 push %ebp 10bfa1: 89 e5 mov %esp,%ebp 10bfa3: 53 push %ebx 10bfa4: 8b 45 08 mov 0x8(%ebp),%eax 10bfa7: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bfaa: 9c pushf 10bfab: fa cli 10bfac: 59 pop %ecx current_state = the_thread->current_state; 10bfad: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bfb0: 85 da test %ebx,%edx 10bfb2: 74 71 je 10c025 <_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); 10bfb4: f7 d2 not %edx 10bfb6: 21 da and %ebx,%edx current_state = 10bfb8: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10bfbb: 85 d2 test %edx,%edx 10bfbd: 75 66 jne 10c025 <_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; 10bfbf: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bfc5: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bfcc: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bfcf: 66 8b 15 b8 62 12 00 mov 0x1262b8,%dx 10bfd6: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bfdc: 66 89 15 b8 62 12 00 mov %dx,0x1262b8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bfe3: 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); 10bfe9: 8d 5a 04 lea 0x4(%edx),%ebx 10bfec: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bfee: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bff1: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bff4: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bff6: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bff9: 51 push %ecx 10bffa: 9d popf 10bffb: 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 ) { 10bffc: 8b 50 14 mov 0x14(%eax),%edx 10bfff: 8b 1d 94 62 12 00 mov 0x126294,%ebx 10c005: 3b 53 14 cmp 0x14(%ebx),%edx 10c008: 73 1b jae 10c025 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10c00a: a3 94 62 12 00 mov %eax,0x126294 if ( _Thread_Executing->is_preemptible || 10c00f: a1 c4 62 12 00 mov 0x1262c4,%eax 10c014: 80 78 75 00 cmpb $0x0,0x75(%eax) 10c018: 75 04 jne 10c01e <_Thread_Clear_state+0x7e> 10c01a: 85 d2 test %edx,%edx 10c01c: 75 07 jne 10c025 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10c01e: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 } } } _ISR_Enable( level ); 10c025: 51 push %ecx 10c026: 9d popf } 10c027: 5b pop %ebx 10c028: c9 leave 10c029: c3 ret =============================================================================== 0010c1a0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c1a0: 55 push %ebp 10c1a1: 89 e5 mov %esp,%ebp 10c1a3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c1a6: 8d 45 f4 lea -0xc(%ebp),%eax 10c1a9: 50 push %eax 10c1aa: ff 75 08 pushl 0x8(%ebp) 10c1ad: e8 8e 01 00 00 call 10c340 <_Thread_Get> switch ( location ) { 10c1b2: 83 c4 10 add $0x10,%esp 10c1b5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c1b9: 75 1b jne 10c1d6 <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c1bb: 52 push %edx 10c1bc: 52 push %edx 10c1bd: 68 18 00 00 10 push $0x10000018 10c1c2: 50 push %eax 10c1c3: e8 d8 fd ff ff call 10bfa0 <_Thread_Clear_state> 10c1c8: a1 08 62 12 00 mov 0x126208,%eax 10c1cd: 48 dec %eax 10c1ce: a3 08 62 12 00 mov %eax,0x126208 10c1d3: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c1d6: c9 leave 10c1d7: c3 ret =============================================================================== 0010c1d8 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c1d8: 55 push %ebp 10c1d9: 89 e5 mov %esp,%ebp 10c1db: 57 push %edi 10c1dc: 56 push %esi 10c1dd: 53 push %ebx 10c1de: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c1e1: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c1e7: 9c pushf 10c1e8: fa cli 10c1e9: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c1ea: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c1ed: e9 f1 00 00 00 jmp 10c2e3 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c1f2: 8b 35 94 62 12 00 mov 0x126294,%esi _Thread_Dispatch_disable_level = 1; 10c1f8: c7 05 08 62 12 00 01 movl $0x1,0x126208 10c1ff: 00 00 00 _Context_Switch_necessary = false; 10c202: c6 05 d4 62 12 00 00 movb $0x0,0x1262d4 _Thread_Executing = heir; 10c209: 89 35 c4 62 12 00 mov %esi,0x1262c4 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 10c20f: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c213: 75 09 jne 10c21e <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c215: 8b 15 d4 61 12 00 mov 0x1261d4,%edx 10c21b: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c21e: 50 push %eax 10c21f: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c220: 83 ec 0c sub $0xc,%esp 10c223: 8d 45 e0 lea -0x20(%ebp),%eax 10c226: 50 push %eax 10c227: e8 dc 3f 00 00 call 110208 <_TOD_Get_uptime> _Timestamp_Subtract( 10c22c: 83 c4 0c add $0xc,%esp 10c22f: 57 push %edi 10c230: 8d 45 e0 lea -0x20(%ebp),%eax 10c233: 50 push %eax 10c234: 68 cc 62 12 00 push $0x1262cc 10c239: e8 5e 0c 00 00 call 10ce9c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c23e: 58 pop %eax 10c23f: 5a pop %edx 10c240: 57 push %edi 10c241: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c247: 50 push %eax 10c248: e8 1f 0c 00 00 call 10ce6c <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c24d: 8b 45 e0 mov -0x20(%ebp),%eax 10c250: 8b 55 e4 mov -0x1c(%ebp),%edx 10c253: a3 cc 62 12 00 mov %eax,0x1262cc 10c258: 89 15 d0 62 12 00 mov %edx,0x1262d0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c25e: a1 90 62 12 00 mov 0x126290,%eax 10c263: 83 c4 10 add $0x10,%esp 10c266: 85 c0 test %eax,%eax 10c268: 74 10 je 10c27a <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c26a: 8b 10 mov (%eax),%edx 10c26c: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c272: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c278: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c27a: 51 push %ecx 10c27b: 51 push %ecx 10c27c: 56 push %esi 10c27d: 53 push %ebx 10c27e: e8 49 0e 00 00 call 10d0cc <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c283: 58 pop %eax 10c284: 5a pop %edx 10c285: 81 c6 d4 00 00 00 add $0xd4,%esi 10c28b: 56 push %esi 10c28c: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10c292: 50 push %eax 10c293: e8 f8 10 00 00 call 10d390 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c298: 83 c4 10 add $0x10,%esp 10c29b: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10c2a2: 74 36 je 10c2da <_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 ); 10c2a4: a1 8c 62 12 00 mov 0x12628c,%eax 10c2a9: 39 c3 cmp %eax,%ebx 10c2ab: 74 2d je 10c2da <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c2ad: 85 c0 test %eax,%eax 10c2af: 74 11 je 10c2c2 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c2b1: 83 ec 0c sub $0xc,%esp 10c2b4: 05 ec 00 00 00 add $0xec,%eax 10c2b9: 50 push %eax 10c2ba: e8 05 11 00 00 call 10d3c4 <_CPU_Context_save_fp> 10c2bf: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c2c2: 83 ec 0c sub $0xc,%esp 10c2c5: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10c2cb: 50 push %eax 10c2cc: e8 fd 10 00 00 call 10d3ce <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c2d1: 89 1d 8c 62 12 00 mov %ebx,0x12628c 10c2d7: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c2da: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx _ISR_Disable( level ); 10c2e0: 9c pushf 10c2e1: fa cli 10c2e2: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c2e3: 8a 15 d4 62 12 00 mov 0x1262d4,%dl 10c2e9: 84 d2 test %dl,%dl 10c2eb: 0f 85 01 ff ff ff jne 10c1f2 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c2f1: c7 05 08 62 12 00 00 movl $0x0,0x126208 10c2f8: 00 00 00 _ISR_Enable( level ); 10c2fb: 50 push %eax 10c2fc: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c2fd: 83 3d a8 62 12 00 00 cmpl $0x0,0x1262a8 10c304: 75 06 jne 10c30c <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 10c306: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c30a: 74 09 je 10c315 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c30c: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c310: e8 1e ea ff ff call 10ad33 <_API_extensions_Run_postswitch> } } 10c315: 8d 65 f4 lea -0xc(%ebp),%esp 10c318: 5b pop %ebx 10c319: 5e pop %esi 10c31a: 5f pop %edi 10c31b: c9 leave 10c31c: c3 ret =============================================================================== 001127e0 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 1127e0: 55 push %ebp 1127e1: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 1127e3: a1 c4 62 12 00 mov 0x1262c4,%eax if ( !_States_Is_ready( executing->current_state ) || 1127e8: 83 78 10 00 cmpl $0x0,0x10(%eax) 1127ec: 75 0e jne 1127fc <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 1127ee: 3b 05 94 62 12 00 cmp 0x126294,%eax 1127f4: 74 11 je 112807 <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1127f6: 80 78 75 00 cmpb $0x0,0x75(%eax) 1127fa: 74 0b je 112807 <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 1127fc: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 112803: b0 01 mov $0x1,%al return true; 112805: eb 02 jmp 112809 <_Thread_Evaluate_mode+0x29> 112807: 31 c0 xor %eax,%eax } return false; } 112809: c9 leave 11280a: c3 ret =============================================================================== 0011280c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 11280c: 55 push %ebp 11280d: 89 e5 mov %esp,%ebp 11280f: 53 push %ebx 112810: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112813: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112819: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 11281f: 85 c0 test %eax,%eax 112821: 74 03 je 112826 <_Thread_Handler+0x1a> 112823: fa cli 112824: eb 01 jmp 112827 <_Thread_Handler+0x1b> 112826: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112827: a0 c4 5e 12 00 mov 0x125ec4,%al 11282c: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 11282f: c6 05 c4 5e 12 00 01 movb $0x1,0x125ec4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112836: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 11283d: 74 24 je 112863 <_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 ); 11283f: a1 8c 62 12 00 mov 0x12628c,%eax 112844: 39 c3 cmp %eax,%ebx 112846: 74 1b je 112863 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112848: 85 c0 test %eax,%eax 11284a: 74 11 je 11285d <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11284c: 83 ec 0c sub $0xc,%esp 11284f: 05 ec 00 00 00 add $0xec,%eax 112854: 50 push %eax 112855: e8 6a ab ff ff call 10d3c4 <_CPU_Context_save_fp> 11285a: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11285d: 89 1d 8c 62 12 00 mov %ebx,0x12628c /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 112863: 83 ec 0c sub $0xc,%esp 112866: 53 push %ebx 112867: e8 14 a7 ff ff call 10cf80 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11286c: e8 ac 9a ff ff call 10c31d <_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) */ { 112871: 83 c4 10 add $0x10,%esp 112874: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112878: 75 05 jne 11287f <_Thread_Handler+0x73> INIT_NAME (); 11287a: e8 e1 bf 00 00 call 11e860 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11287f: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112885: 85 c0 test %eax,%eax 112887: 75 0b jne 112894 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112889: 83 ec 0c sub $0xc,%esp 11288c: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112892: eb 0c jmp 1128a0 <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 112894: 48 dec %eax 112895: 75 15 jne 1128ac <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 112897: 83 ec 0c sub $0xc,%esp 11289a: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 1128a0: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 1128a6: 89 43 28 mov %eax,0x28(%ebx) 1128a9: 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 ); 1128ac: 83 ec 0c sub $0xc,%esp 1128af: 53 push %ebx 1128b0: e8 fc a6 ff ff call 10cfb1 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1128b5: 83 c4 0c add $0xc,%esp 1128b8: 6a 06 push $0x6 1128ba: 6a 01 push $0x1 1128bc: 6a 00 push $0x0 1128be: e8 bd 8d ff ff call 10b680 <_Internal_error_Occurred> =============================================================================== 0010c3b4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c3b4: 55 push %ebp 10c3b5: 89 e5 mov %esp,%ebp 10c3b7: 57 push %edi 10c3b8: 56 push %esi 10c3b9: 53 push %ebx 10c3ba: 83 ec 1c sub $0x1c,%esp 10c3bd: 8b 5d 0c mov 0xc(%ebp),%ebx 10c3c0: 8b 4d 10 mov 0x10(%ebp),%ecx 10c3c3: 8b 75 14 mov 0x14(%ebp),%esi 10c3c6: 8a 55 18 mov 0x18(%ebp),%dl 10c3c9: 8a 45 20 mov 0x20(%ebp),%al 10c3cc: 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; 10c3cf: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c3d6: 00 00 00 10c3d9: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c3e0: 00 00 00 10c3e3: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10c3ea: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c3ed: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c3f4: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10c3f7: 85 c9 test %ecx,%ecx 10c3f9: 75 30 jne 10c42b <_Thread_Initialize+0x77> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c3fb: 51 push %ecx 10c3fc: 51 push %ecx 10c3fd: 56 push %esi 10c3fe: 53 push %ebx 10c3ff: 88 55 e0 mov %dl,-0x20(%ebp) 10c402: e8 69 08 00 00 call 10cc70 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c407: 83 c4 10 add $0x10,%esp 10c40a: 39 f0 cmp %esi,%eax 10c40c: 8a 55 e0 mov -0x20(%ebp),%dl 10c40f: 72 04 jb 10c415 <_Thread_Initialize+0x61> 10c411: 85 c0 test %eax,%eax 10c413: 75 07 jne 10c41c <_Thread_Initialize+0x68><== ALWAYS TAKEN 10c415: 31 c0 xor %eax,%eax 10c417: e9 d9 01 00 00 jmp 10c5f5 <_Thread_Initialize+0x241> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10c41c: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10c422: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10c429: eb 09 jmp 10c434 <_Thread_Initialize+0x80> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10c42b: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10c432: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c434: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10c43a: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10c440: 31 ff xor %edi,%edi 10c442: 84 d2 test %dl,%dl 10c444: 74 19 je 10c45f <_Thread_Initialize+0xab> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c446: 83 ec 0c sub $0xc,%esp 10c449: 6a 6c push $0x6c 10c44b: e8 c4 0e 00 00 call 10d314 <_Workspace_Allocate> 10c450: 89 c7 mov %eax,%edi if ( !fp_area ) 10c452: 83 c4 10 add $0x10,%esp 10c455: 31 f6 xor %esi,%esi 10c457: 85 c0 test %eax,%eax 10c459: 0f 84 10 01 00 00 je 10c56f <_Thread_Initialize+0x1bb> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c45f: 89 bb ec 00 00 00 mov %edi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10c465: 89 bb cc 00 00 00 mov %edi,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c46b: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c472: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c479: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c480: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c487: a1 a4 62 12 00 mov 0x1262a4,%eax 10c48c: 31 f6 xor %esi,%esi 10c48e: 85 c0 test %eax,%eax 10c490: 74 1d je 10c4af <_Thread_Initialize+0xfb> extensions_area = _Workspace_Allocate( 10c492: 83 ec 0c sub $0xc,%esp 10c495: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c49c: 50 push %eax 10c49d: e8 72 0e 00 00 call 10d314 <_Workspace_Allocate> 10c4a2: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c4a4: 83 c4 10 add $0x10,%esp 10c4a7: 85 c0 test %eax,%eax 10c4a9: 0f 84 c0 00 00 00 je 10c56f <_Thread_Initialize+0x1bb> goto failed; } the_thread->extensions = (void **) extensions_area; 10c4af: 89 b3 00 01 00 00 mov %esi,0x100(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c4b5: 85 f6 test %esi,%esi 10c4b7: 74 1c je 10c4d5 <_Thread_Initialize+0x121> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c4b9: 8b 0d a4 62 12 00 mov 0x1262a4,%ecx 10c4bf: 31 c0 xor %eax,%eax 10c4c1: eb 0e jmp 10c4d1 <_Thread_Initialize+0x11d> the_thread->extensions[i] = NULL; 10c4c3: 8b 93 00 01 00 00 mov 0x100(%ebx),%edx 10c4c9: 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++ ) 10c4d0: 40 inc %eax 10c4d1: 39 c8 cmp %ecx,%eax 10c4d3: 76 ee jbe 10c4c3 <_Thread_Initialize+0x10f> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c4d5: 8a 45 e7 mov -0x19(%ebp),%al 10c4d8: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c4de: 8b 45 24 mov 0x24(%ebp),%eax 10c4e1: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c4e7: 8b 45 28 mov 0x28(%ebp),%eax 10c4ea: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10c4f0: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10c4f4: 75 08 jne 10c4fe <_Thread_Initialize+0x14a> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c4f6: a1 d4 61 12 00 mov 0x1261d4,%eax 10c4fb: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c4fe: 8b 45 2c mov 0x2c(%ebp),%eax 10c501: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c507: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c50e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c515: 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; 10c51c: 8b 45 1c mov 0x1c(%ebp),%eax 10c51f: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c522: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c528: 52 push %edx 10c529: 52 push %edx 10c52a: 50 push %eax 10c52b: 53 push %ebx 10c52c: e8 93 05 00 00 call 10cac4 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c531: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c538: 00 00 00 10c53b: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c542: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c545: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c549: 8b 45 08 mov 0x8(%ebp),%eax 10c54c: 8b 40 1c mov 0x1c(%eax),%eax 10c54f: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c552: 8b 45 30 mov 0x30(%ebp),%eax 10c555: 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 ); 10c558: 89 1c 24 mov %ebx,(%esp) 10c55b: e8 c0 0a 00 00 call 10d020 <_User_extensions_Thread_create> 10c560: 88 c2 mov %al,%dl if ( extension_status ) 10c562: 83 c4 10 add $0x10,%esp 10c565: b0 01 mov $0x1,%al 10c567: 84 d2 test %dl,%dl 10c569: 0f 85 86 00 00 00 jne 10c5f5 <_Thread_Initialize+0x241> return true; failed: if ( the_thread->libc_reent ) 10c56f: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c575: 85 c0 test %eax,%eax 10c577: 74 0c je 10c585 <_Thread_Initialize+0x1d1> _Workspace_Free( the_thread->libc_reent ); 10c579: 83 ec 0c sub $0xc,%esp 10c57c: 50 push %eax 10c57d: e8 ab 0d 00 00 call 10d32d <_Workspace_Free> 10c582: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c585: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c58b: 85 c0 test %eax,%eax 10c58d: 74 0c je 10c59b <_Thread_Initialize+0x1e7> _Workspace_Free( the_thread->API_Extensions[i] ); 10c58f: 83 ec 0c sub $0xc,%esp 10c592: 50 push %eax 10c593: e8 95 0d 00 00 call 10d32d <_Workspace_Free> 10c598: 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] ) 10c59b: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c5a1: 85 c0 test %eax,%eax 10c5a3: 74 0c je 10c5b1 <_Thread_Initialize+0x1fd> _Workspace_Free( the_thread->API_Extensions[i] ); 10c5a5: 83 ec 0c sub $0xc,%esp 10c5a8: 50 push %eax 10c5a9: e8 7f 0d 00 00 call 10d32d <_Workspace_Free> 10c5ae: 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] ) 10c5b1: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10c5b7: 85 c0 test %eax,%eax 10c5b9: 74 0c je 10c5c7 <_Thread_Initialize+0x213><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c5bb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c5be: 50 push %eax <== NOT EXECUTED 10c5bf: e8 69 0d 00 00 call 10d32d <_Workspace_Free> <== NOT EXECUTED 10c5c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c5c7: 85 f6 test %esi,%esi 10c5c9: 74 0c je 10c5d7 <_Thread_Initialize+0x223> (void) _Workspace_Free( extensions_area ); 10c5cb: 83 ec 0c sub $0xc,%esp 10c5ce: 56 push %esi 10c5cf: e8 59 0d 00 00 call 10d32d <_Workspace_Free> 10c5d4: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c5d7: 85 ff test %edi,%edi 10c5d9: 74 0c je 10c5e7 <_Thread_Initialize+0x233> (void) _Workspace_Free( fp_area ); 10c5db: 83 ec 0c sub $0xc,%esp 10c5de: 57 push %edi 10c5df: e8 49 0d 00 00 call 10d32d <_Workspace_Free> 10c5e4: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c5e7: 83 ec 0c sub $0xc,%esp 10c5ea: 53 push %ebx 10c5eb: e8 d0 06 00 00 call 10ccc0 <_Thread_Stack_Free> 10c5f0: 31 c0 xor %eax,%eax return false; 10c5f2: 83 c4 10 add $0x10,%esp } 10c5f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c5f8: 5b pop %ebx 10c5f9: 5e pop %esi 10c5fa: 5f pop %edi 10c5fb: c9 leave 10c5fc: c3 ret =============================================================================== 0010f8d4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f8d4: 55 push %ebp 10f8d5: 89 e5 mov %esp,%ebp 10f8d7: 53 push %ebx 10f8d8: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f8db: 9c pushf 10f8dc: fa cli 10f8dd: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f8de: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f8e1: f6 c2 02 test $0x2,%dl 10f8e4: 74 70 je 10f956 <_Thread_Resume+0x82> <== NEVER TAKEN 10f8e6: 83 e2 fd and $0xfffffffd,%edx current_state = 10f8e9: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f8ec: 85 d2 test %edx,%edx 10f8ee: 75 66 jne 10f956 <_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; 10f8f0: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f8f6: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f8fd: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f900: 66 8b 15 88 93 12 00 mov 0x129388,%dx 10f907: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f90d: 66 89 15 88 93 12 00 mov %dx,0x129388 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f914: 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); 10f91a: 8d 5a 04 lea 0x4(%edx),%ebx 10f91d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f91f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f922: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f925: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f927: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f92a: 51 push %ecx 10f92b: 9d popf 10f92c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f92d: 8b 50 14 mov 0x14(%eax),%edx 10f930: 8b 1d 64 93 12 00 mov 0x129364,%ebx 10f936: 3b 53 14 cmp 0x14(%ebx),%edx 10f939: 73 1b jae 10f956 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f93b: a3 64 93 12 00 mov %eax,0x129364 if ( _Thread_Executing->is_preemptible || 10f940: a1 94 93 12 00 mov 0x129394,%eax 10f945: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f949: 75 04 jne 10f94f <_Thread_Resume+0x7b> 10f94b: 85 d2 test %edx,%edx 10f94d: 75 07 jne 10f956 <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f94f: c6 05 a4 93 12 00 01 movb $0x1,0x1293a4 } } } _ISR_Enable( level ); 10f956: 51 push %ecx 10f957: 9d popf } 10f958: 5b pop %ebx 10f959: c9 leave 10f95a: c3 ret =============================================================================== 0010cda8 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10cda8: 55 push %ebp 10cda9: 89 e5 mov %esp,%ebp 10cdab: 53 push %ebx 10cdac: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10cdaf: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10cdb5: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10cdb9: 74 4c je 10ce07 <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10cdbb: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cdbf: 75 46 jne 10ce07 <_Thread_Tickle_timeslice+0x5f> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10cdc1: 8b 43 7c mov 0x7c(%ebx),%eax 10cdc4: 83 f8 01 cmp $0x1,%eax 10cdc7: 72 3e jb 10ce07 <_Thread_Tickle_timeslice+0x5f> 10cdc9: 83 f8 02 cmp $0x2,%eax 10cdcc: 76 07 jbe 10cdd5 <_Thread_Tickle_timeslice+0x2d> 10cdce: 83 f8 03 cmp $0x3,%eax 10cdd1: 75 34 jne 10ce07 <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN 10cdd3: eb 1a jmp 10cdef <_Thread_Tickle_timeslice+0x47> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10cdd5: 8b 43 78 mov 0x78(%ebx),%eax 10cdd8: 48 dec %eax 10cdd9: 89 43 78 mov %eax,0x78(%ebx) 10cddc: 85 c0 test %eax,%eax 10cdde: 7f 27 jg 10ce07 <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10cde0: e8 6f 3a 00 00 call 110854 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cde5: a1 d4 61 12 00 mov 0x1261d4,%eax 10cdea: 89 43 78 mov %eax,0x78(%ebx) 10cded: eb 18 jmp 10ce07 <_Thread_Tickle_timeslice+0x5f> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10cdef: 8b 43 78 mov 0x78(%ebx),%eax 10cdf2: 48 dec %eax 10cdf3: 89 43 78 mov %eax,0x78(%ebx) 10cdf6: 85 c0 test %eax,%eax 10cdf8: 75 0d jne 10ce07 <_Thread_Tickle_timeslice+0x5f> (*executing->budget_callout)( executing ); 10cdfa: 83 ec 0c sub $0xc,%esp 10cdfd: 53 push %ebx 10cdfe: ff 93 80 00 00 00 call *0x80(%ebx) 10ce04: 83 c4 10 add $0x10,%esp break; #endif } } 10ce07: 8b 5d fc mov -0x4(%ebp),%ebx 10ce0a: c9 leave 10ce0b: c3 ret =============================================================================== 0010ce0c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10ce0c: 55 push %ebp 10ce0d: 89 e5 mov %esp,%ebp 10ce0f: 56 push %esi 10ce10: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ce11: a1 c4 62 12 00 mov 0x1262c4,%eax ready = executing->ready; 10ce16: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ce1c: 9c pushf 10ce1d: fa cli 10ce1e: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10ce1f: 8b 1a mov (%edx),%ebx 10ce21: 3b 5a 08 cmp 0x8(%edx),%ebx 10ce24: 74 2e je 10ce54 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ce26: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ce28: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ce2b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ce2e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ce30: 8d 5a 04 lea 0x4(%edx),%ebx 10ce33: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ce35: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ce38: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ce3b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ce3d: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ce40: 51 push %ecx 10ce41: 9d popf 10ce42: fa cli if ( _Thread_Is_heir( executing ) ) 10ce43: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce49: 75 11 jne 10ce5c <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ce4b: 8b 02 mov (%edx),%eax 10ce4d: a3 94 62 12 00 mov %eax,0x126294 10ce52: eb 08 jmp 10ce5c <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10ce54: 3b 05 94 62 12 00 cmp 0x126294,%eax 10ce5a: 74 07 je 10ce63 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10ce5c: c6 05 d4 62 12 00 01 movb $0x1,0x1262d4 _ISR_Enable( level ); 10ce63: 51 push %ecx 10ce64: 9d popf } 10ce65: 5b pop %ebx 10ce66: 5e pop %esi 10ce67: c9 leave 10ce68: c3 ret =============================================================================== 0010c860 <_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 ) { 10c860: 55 push %ebp 10c861: 89 e5 mov %esp,%ebp 10c863: 57 push %edi 10c864: 56 push %esi 10c865: 53 push %ebx 10c866: 83 ec 10 sub $0x10,%esp 10c869: 8b 4d 08 mov 0x8(%ebp),%ecx 10c86c: 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); 10c86f: 8d 50 3c lea 0x3c(%eax),%edx 10c872: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c875: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c87c: 8d 50 38 lea 0x38(%eax),%edx 10c87f: 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; 10c882: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c885: 89 de mov %ebx,%esi 10c887: c1 ee 06 shr $0x6,%esi 10c88a: 6b f6 0c imul $0xc,%esi,%esi 10c88d: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c890: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c893: f6 c3 20 test $0x20,%bl 10c896: 75 70 jne 10c908 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c898: 8d 56 04 lea 0x4(%esi),%edx 10c89b: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c89e: 9c pushf 10c89f: fa cli 10c8a0: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c8a3: 8b 16 mov (%esi),%edx 10c8a5: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c8ac: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c8af: eb 1f jmp 10c8d0 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c8b1: 8b 72 14 mov 0x14(%edx),%esi 10c8b4: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c8b7: 39 f3 cmp %esi,%ebx 10c8b9: 76 1a jbe 10c8d5 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c8bb: ff 75 f0 pushl -0x10(%ebp) 10c8be: 9d popf 10c8bf: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c8c0: 85 7a 10 test %edi,0x10(%edx) 10c8c3: 75 09 jne 10c8ce <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c8c5: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c8c8: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c8cb: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c8cc: eb d0 jmp 10c89e <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c8ce: 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 ) ) { 10c8d0: 3b 55 e8 cmp -0x18(%ebp),%edx 10c8d3: 75 dc jne 10c8b1 <_Thread_queue_Enqueue_priority+0x51> 10c8d5: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c8d8: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c8dc: 0f 85 a9 00 00 00 jne 10c98b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c8e2: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c8e9: 3b 5d ec cmp -0x14(%ebp),%ebx 10c8ec: 0f 84 82 00 00 00 je 10c974 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c8f2: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c8f5: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c8f7: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c8fa: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c8fc: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c8ff: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c902: ff 75 f0 pushl -0x10(%ebp) 10c905: 9d popf 10c906: eb 65 jmp 10c96d <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c908: 0f b6 15 f4 21 12 00 movzbl 0x1221f4,%edx 10c90f: 42 inc %edx 10c910: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c913: 9c pushf 10c914: fa cli 10c915: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c918: 8b 56 08 mov 0x8(%esi),%edx 10c91b: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c91e: eb 20 jmp 10c940 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c920: 8b 72 14 mov 0x14(%edx),%esi 10c923: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c926: 39 f3 cmp %esi,%ebx 10c928: 73 1b jae 10c945 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c92a: ff 75 f0 pushl -0x10(%ebp) 10c92d: 9d popf 10c92e: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c92f: 85 7a 10 test %edi,0x10(%edx) 10c932: 75 09 jne 10c93d <_Thread_queue_Enqueue_priority+0xdd> 10c934: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c937: ff 75 f0 pushl -0x10(%ebp) 10c93a: 9d popf goto restart_reverse_search; 10c93b: eb cb jmp 10c908 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c93d: 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 ) ) { 10c940: 3b 55 e8 cmp -0x18(%ebp),%edx 10c943: 75 db jne 10c920 <_Thread_queue_Enqueue_priority+0xc0> 10c945: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c948: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c94c: 75 3d jne 10c98b <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c94e: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c955: 3b 5d ec cmp -0x14(%ebp),%ebx 10c958: 74 1a je 10c974 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c95a: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c95c: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c95e: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c961: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c963: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c966: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c969: ff 75 f0 pushl -0x10(%ebp) 10c96c: 9d popf 10c96d: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c972: eb 1f jmp 10c993 <_Thread_queue_Enqueue_priority+0x133> 10c974: 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; 10c977: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c97a: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c97c: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c97f: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c981: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c984: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c987: 56 push %esi 10c988: 9d popf 10c989: eb e2 jmp 10c96d <_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; 10c98b: 8b 45 10 mov 0x10(%ebp),%eax 10c98e: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c990: 8b 41 30 mov 0x30(%ecx),%eax } 10c993: 83 c4 10 add $0x10,%esp 10c996: 5b pop %ebx 10c997: 5e pop %esi 10c998: 5f pop %edi 10c999: c9 leave 10c99a: c3 ret =============================================================================== 00110768 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 110768: 55 push %ebp 110769: 89 e5 mov %esp,%ebp 11076b: 83 ec 08 sub $0x8,%esp 11076e: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 110771: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 110774: 8b 4a 30 mov 0x30(%edx),%ecx 110777: 85 c9 test %ecx,%ecx 110779: 74 1c je 110797 <_Thread_queue_Process_timeout+0x2f> 11077b: 3b 05 c4 62 12 00 cmp 0x1262c4,%eax 110781: 75 14 jne 110797 <_Thread_queue_Process_timeout+0x2f><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 110783: 83 f9 03 cmp $0x3,%ecx 110786: 74 23 je 1107ab <_Thread_queue_Process_timeout+0x43> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110788: 8b 4a 3c mov 0x3c(%edx),%ecx 11078b: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11078e: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 110795: eb 14 jmp 1107ab <_Thread_queue_Process_timeout+0x43> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110797: 8b 52 3c mov 0x3c(%edx),%edx 11079a: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 11079d: 52 push %edx 11079e: 52 push %edx 11079f: 50 push %eax 1107a0: ff 70 44 pushl 0x44(%eax) 1107a3: e8 d8 fe ff ff call 110680 <_Thread_queue_Extract> 1107a8: 83 c4 10 add $0x10,%esp } } 1107ab: c9 leave 1107ac: c3 ret =============================================================================== 0010ca3c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10ca3c: 55 push %ebp 10ca3d: 89 e5 mov %esp,%ebp 10ca3f: 57 push %edi 10ca40: 56 push %esi 10ca41: 53 push %ebx 10ca42: 83 ec 1c sub $0x1c,%esp 10ca45: 8b 75 08 mov 0x8(%ebp),%esi 10ca48: 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 ) 10ca4b: 85 f6 test %esi,%esi 10ca4d: 74 36 je 10ca85 <_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 ) { 10ca4f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10ca53: 75 30 jne 10ca85 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10ca55: 9c pushf 10ca56: fa cli 10ca57: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10ca58: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10ca5f: 74 22 je 10ca83 <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10ca61: 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 ); 10ca68: 50 push %eax 10ca69: 6a 01 push $0x1 10ca6b: 57 push %edi 10ca6c: 56 push %esi 10ca6d: e8 3e 3c 00 00 call 1106b0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10ca72: 83 c4 0c add $0xc,%esp 10ca75: 8d 45 e4 lea -0x1c(%ebp),%eax 10ca78: 50 push %eax 10ca79: 57 push %edi 10ca7a: 56 push %esi 10ca7b: e8 e0 fd ff ff call 10c860 <_Thread_queue_Enqueue_priority> 10ca80: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10ca83: 53 push %ebx 10ca84: 9d popf } } 10ca85: 8d 65 f4 lea -0xc(%ebp),%esp 10ca88: 5b pop %ebx 10ca89: 5e pop %esi 10ca8a: 5f pop %edi 10ca8b: c9 leave 10ca8c: c3 ret =============================================================================== 0010ca90 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ca90: 55 push %ebp 10ca91: 89 e5 mov %esp,%ebp 10ca93: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ca96: 8d 45 f4 lea -0xc(%ebp),%eax 10ca99: 50 push %eax 10ca9a: ff 75 08 pushl 0x8(%ebp) 10ca9d: e8 9e f8 ff ff call 10c340 <_Thread_Get> switch ( location ) { 10caa2: 83 c4 10 add $0x10,%esp 10caa5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10caa9: 75 17 jne 10cac2 <_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 ); 10caab: 83 ec 0c sub $0xc,%esp 10caae: 50 push %eax 10caaf: e8 b4 3c 00 00 call 110768 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10cab4: a1 08 62 12 00 mov 0x126208,%eax 10cab9: 48 dec %eax 10caba: a3 08 62 12 00 mov %eax,0x126208 10cabf: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10cac2: c9 leave 10cac3: c3 ret =============================================================================== 00117248 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 117248: 55 push %ebp 117249: 89 e5 mov %esp,%ebp 11724b: 57 push %edi 11724c: 56 push %esi 11724d: 53 push %ebx 11724e: 83 ec 4c sub $0x4c,%esp 117251: 8b 5d 08 mov 0x8(%ebp),%ebx 117254: 8d 45 dc lea -0x24(%ebp),%eax 117257: 8d 55 e0 lea -0x20(%ebp),%edx 11725a: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11725d: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117260: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 117267: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11726a: 8d 75 d0 lea -0x30(%ebp),%esi 11726d: 8d 55 d4 lea -0x2c(%ebp),%edx 117270: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117273: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 117276: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11727d: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117280: 8d 53 30 lea 0x30(%ebx),%edx 117283: 89 55 c0 mov %edx,-0x40(%ebp) /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117286: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 117289: 8d 4b 08 lea 0x8(%ebx),%ecx 11728c: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11728f: 8d 53 40 lea 0x40(%ebx),%edx 117292: 89 55 bc mov %edx,-0x44(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 117295: 8d 4d dc lea -0x24(%ebp),%ecx 117298: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11729b: a1 28 f7 13 00 mov 0x13f728,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1172a0: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1172a3: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1172a6: 51 push %ecx 1172a7: 8d 4d d0 lea -0x30(%ebp),%ecx 1172aa: 51 push %ecx 1172ab: 29 d0 sub %edx,%eax 1172ad: 50 push %eax 1172ae: ff 75 c0 pushl -0x40(%ebp) 1172b1: e8 06 37 00 00 call 11a9bc <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1172b6: a1 6c f6 13 00 mov 0x13f66c,%eax 1172bb: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1172be: 8b 43 74 mov 0x74(%ebx),%eax /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 1172c1: 83 c4 10 add $0x10,%esp 1172c4: 39 45 c4 cmp %eax,-0x3c(%ebp) 1172c7: 76 13 jbe 1172dc <_Timer_server_Body+0x94> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1172c9: 52 push %edx 1172ca: 8d 55 d0 lea -0x30(%ebp),%edx 1172cd: 52 push %edx 1172ce: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172d1: 29 c1 sub %eax,%ecx 1172d3: 51 push %ecx 1172d4: 57 push %edi 1172d5: e8 e2 36 00 00 call 11a9bc <_Watchdog_Adjust_to_chain> 1172da: eb 0f jmp 1172eb <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172dc: 73 10 jae 1172ee <_Timer_server_Body+0xa6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1172de: 51 push %ecx 1172df: 2b 45 c4 sub -0x3c(%ebp),%eax 1172e2: 50 push %eax 1172e3: 6a 01 push $0x1 1172e5: 57 push %edi 1172e6: e8 65 36 00 00 call 11a950 <_Watchdog_Adjust> 1172eb: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172ee: 8b 45 c4 mov -0x3c(%ebp),%eax 1172f1: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172f4: 8b 43 78 mov 0x78(%ebx),%eax 1172f7: 83 ec 0c sub $0xc,%esp 1172fa: 50 push %eax 1172fb: e8 54 07 00 00 call 117a54 <_Chain_Get> if ( timer == NULL ) { 117300: 83 c4 10 add $0x10,%esp 117303: 85 c0 test %eax,%eax 117305: 74 29 je 117330 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 117307: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11730a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 11730d: 75 0b jne 11731a <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11730f: 52 push %edx <== NOT EXECUTED 117310: 52 push %edx <== NOT EXECUTED 117311: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117314: 50 push %eax <== NOT EXECUTED 117315: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 117318: eb 0c jmp 117326 <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11731a: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 11731d: 75 d5 jne 1172f4 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11731f: 51 push %ecx <== NOT EXECUTED 117320: 51 push %ecx <== NOT EXECUTED 117321: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117324: 50 push %eax <== NOT EXECUTED 117325: 57 push %edi <== NOT EXECUTED 117326: e8 19 37 00 00 call 11aa44 <_Watchdog_Insert> <== NOT EXECUTED 11732b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11732e: eb c4 jmp 1172f4 <_Timer_server_Body+0xac><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 117330: 9c pushf 117331: fa cli 117332: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117333: 8b 55 b4 mov -0x4c(%ebp),%edx 117336: 39 55 dc cmp %edx,-0x24(%ebp) 117339: 75 13 jne 11734e <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11733b: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117342: 50 push %eax 117343: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 117344: 8b 4d b0 mov -0x50(%ebp),%ecx 117347: 39 4d d0 cmp %ecx,-0x30(%ebp) 11734a: 75 09 jne 117355 <_Timer_server_Body+0x10d> 11734c: eb 3e jmp 11738c <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 11734e: 50 push %eax <== NOT EXECUTED 11734f: 9d popf <== NOT EXECUTED 117350: e9 46 ff ff ff jmp 11729b <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 117355: 9c pushf 117356: fa cli 117357: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117358: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11735b: 3b 45 b0 cmp -0x50(%ebp),%eax 11735e: 74 25 je 117385 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117360: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117362: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117365: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 117368: 85 c0 test %eax,%eax 11736a: 74 19 je 117385 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 11736c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117373: 52 push %edx 117374: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 117375: 52 push %edx 117376: 52 push %edx 117377: ff 70 24 pushl 0x24(%eax) 11737a: ff 70 20 pushl 0x20(%eax) 11737d: ff 50 1c call *0x1c(%eax) } 117380: 83 c4 10 add $0x10,%esp 117383: eb d0 jmp 117355 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117385: 52 push %edx 117386: 9d popf 117387: e9 09 ff ff ff jmp 117295 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11738c: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117390: a1 dc f5 13 00 mov 0x13f5dc,%eax 117395: 40 inc %eax 117396: a3 dc f5 13 00 mov %eax,0x13f5dc /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11739b: 50 push %eax 11739c: 50 push %eax 11739d: 6a 08 push $0x8 11739f: ff 33 pushl (%ebx) 1173a1: e8 86 2e 00 00 call 11a22c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1173a6: 89 d8 mov %ebx,%eax 1173a8: e8 0f fe ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1173ad: 89 d8 mov %ebx,%eax 1173af: e8 4e fe ff ff call 117202 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1173b4: e8 2c 25 00 00 call 1198e5 <_Thread_Enable_dispatch> ts->active = true; 1173b9: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1173bd: 59 pop %ecx 1173be: ff 75 b8 pushl -0x48(%ebp) 1173c1: e8 96 37 00 00 call 11ab5c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1173c6: 5a pop %edx 1173c7: ff 75 bc pushl -0x44(%ebp) 1173ca: e8 8d 37 00 00 call 11ab5c <_Watchdog_Remove> 1173cf: 83 c4 10 add $0x10,%esp 1173d2: e9 be fe ff ff jmp 117295 <_Timer_server_Body+0x4d> =============================================================================== 001173d7 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173d7: 55 push %ebp 1173d8: 89 e5 mov %esp,%ebp 1173da: 57 push %edi 1173db: 56 push %esi 1173dc: 53 push %ebx 1173dd: 83 ec 2c sub $0x2c,%esp 1173e0: 8b 5d 08 mov 0x8(%ebp),%ebx 1173e3: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173e6: 8b 53 78 mov 0x78(%ebx),%edx 1173e9: 85 d2 test %edx,%edx 1173eb: 0f 85 e6 00 00 00 jne 1174d7 <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173f1: 8b 15 dc f5 13 00 mov 0x13f5dc,%edx 1173f7: 42 inc %edx 1173f8: 89 15 dc f5 13 00 mov %edx,0x13f5dc * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173fe: 8b 50 38 mov 0x38(%eax),%edx 117401: 83 fa 01 cmp $0x1,%edx 117404: 75 5a jne 117460 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117406: 9c pushf 117407: fa cli 117408: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 11740b: 8b 0d 28 f7 13 00 mov 0x13f728,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 117411: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117414: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 117417: 8d 7b 34 lea 0x34(%ebx),%edi 11741a: 39 fa cmp %edi,%edx 11741c: 74 19 je 117437 <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 11741e: 89 cf mov %ecx,%edi 117420: 29 f7 sub %esi,%edi 117422: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 117425: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 117428: 31 f6 xor %esi,%esi 11742a: 3b 7d e4 cmp -0x1c(%ebp),%edi 11742d: 76 05 jbe 117434 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 11742f: 89 fe mov %edi,%esi 117431: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117434: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 117437: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11743a: ff 75 e0 pushl -0x20(%ebp) 11743d: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11743e: 57 push %edi 11743f: 57 push %edi 117440: 83 c0 10 add $0x10,%eax 117443: 50 push %eax 117444: 8d 43 30 lea 0x30(%ebx),%eax 117447: 50 push %eax 117448: e8 f7 35 00 00 call 11aa44 <_Watchdog_Insert> if ( !ts->active ) { 11744d: 8a 43 7c mov 0x7c(%ebx),%al 117450: 83 c4 10 add $0x10,%esp 117453: 84 c0 test %al,%al 117455: 75 74 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 117457: 89 d8 mov %ebx,%eax 117459: e8 5e fd ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> 11745e: eb 6b jmp 1174cb <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117460: 83 fa 03 cmp $0x3,%edx 117463: 75 66 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117465: 9c pushf 117466: fa cli 117467: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11746a: 8b 0d 6c f6 13 00 mov 0x13f66c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117470: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117473: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 117476: 8d 7b 6c lea 0x6c(%ebx),%edi 117479: 39 fe cmp %edi,%esi 11747b: 74 27 je 1174a4 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 11747d: 8b 7e 10 mov 0x10(%esi),%edi 117480: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117483: 39 d1 cmp %edx,%ecx 117485: 76 15 jbe 11749c <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 117487: 89 cf mov %ecx,%edi 117489: 29 d7 sub %edx,%edi 11748b: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 11748e: 31 d2 xor %edx,%edx 117490: 39 7d d4 cmp %edi,-0x2c(%ebp) 117493: 76 0c jbe 1174a1 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117495: 8b 55 d4 mov -0x2c(%ebp),%edx 117498: 29 fa sub %edi,%edx 11749a: eb 05 jmp 1174a1 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11749c: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 11749f: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1174a1: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1174a4: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1174a7: ff 75 e0 pushl -0x20(%ebp) 1174aa: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1174ab: 56 push %esi 1174ac: 56 push %esi 1174ad: 83 c0 10 add $0x10,%eax 1174b0: 50 push %eax 1174b1: 8d 43 68 lea 0x68(%ebx),%eax 1174b4: 50 push %eax 1174b5: e8 8a 35 00 00 call 11aa44 <_Watchdog_Insert> if ( !ts->active ) { 1174ba: 8a 43 7c mov 0x7c(%ebx),%al 1174bd: 83 c4 10 add $0x10,%esp 1174c0: 84 c0 test %al,%al 1174c2: 75 07 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1174c4: 89 d8 mov %ebx,%eax 1174c6: e8 37 fd ff ff call 117202 <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 1174cb: 8d 65 f4 lea -0xc(%ebp),%esp 1174ce: 5b pop %ebx 1174cf: 5e pop %esi 1174d0: 5f pop %edi 1174d1: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174d2: e9 0e 24 00 00 jmp 1198e5 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174d7: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174da: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174dd: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174e3: 5b pop %ebx <== NOT EXECUTED 1174e4: 5e pop %esi <== NOT EXECUTED 1174e5: 5f pop %edi <== NOT EXECUTED 1174e6: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174e7: e9 2c 05 00 00 jmp 117a18 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010e90c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e90c: 55 push %ebp 10e90d: 89 e5 mov %esp,%ebp 10e90f: 57 push %edi 10e910: 56 push %esi 10e911: 53 push %ebx 10e912: 83 ec 1c sub $0x1c,%esp 10e915: 8b 75 08 mov 0x8(%ebp),%esi 10e918: 8b 7d 0c mov 0xc(%ebp),%edi 10e91b: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e91e: 9c pushf 10e91f: fa cli 10e920: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e921: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e923: 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 ) ) { 10e926: 39 ca cmp %ecx,%edx 10e928: 74 44 je 10e96e <_Watchdog_Adjust+0x62> switch ( direction ) { 10e92a: 85 ff test %edi,%edi 10e92c: 74 3c je 10e96a <_Watchdog_Adjust+0x5e> 10e92e: 4f dec %edi 10e92f: 75 3d jne 10e96e <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e931: 01 5a 10 add %ebx,0x10(%edx) break; 10e934: eb 38 jmp 10e96e <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e936: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e938: 8b 7a 10 mov 0x10(%edx),%edi 10e93b: 39 fb cmp %edi,%ebx 10e93d: 73 07 jae 10e946 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e93f: 29 df sub %ebx,%edi 10e941: 89 7a 10 mov %edi,0x10(%edx) break; 10e944: eb 28 jmp 10e96e <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e946: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e94d: 50 push %eax 10e94e: 9d popf _Watchdog_Tickle( header ); 10e94f: 83 ec 0c sub $0xc,%esp 10e952: 56 push %esi 10e953: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e956: e8 9d 01 00 00 call 10eaf8 <_Watchdog_Tickle> _ISR_Disable( level ); 10e95b: 9c pushf 10e95c: fa cli 10e95d: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e95e: 83 c4 10 add $0x10,%esp 10e961: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e964: 39 0e cmp %ecx,(%esi) 10e966: 74 06 je 10e96e <_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; 10e968: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e96a: 85 db test %ebx,%ebx 10e96c: 75 c8 jne 10e936 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e96e: 50 push %eax 10e96f: 9d popf } 10e970: 8d 65 f4 lea -0xc(%ebp),%esp 10e973: 5b pop %ebx 10e974: 5e pop %esi 10e975: 5f pop %edi 10e976: c9 leave 10e977: c3 ret =============================================================================== 0010d218 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d218: 55 push %ebp 10d219: 89 e5 mov %esp,%ebp 10d21b: 56 push %esi 10d21c: 53 push %ebx 10d21d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d220: 9c pushf 10d221: fa cli 10d222: 5e pop %esi previous_state = the_watchdog->state; 10d223: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d226: 83 f8 01 cmp $0x1,%eax 10d229: 74 09 je 10d234 <_Watchdog_Remove+0x1c> 10d22b: 72 44 jb 10d271 <_Watchdog_Remove+0x59> 10d22d: 83 f8 03 cmp $0x3,%eax 10d230: 77 3f ja 10d271 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d232: eb 09 jmp 10d23d <_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; 10d234: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d23b: eb 34 jmp 10d271 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d23d: 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 ); 10d244: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d246: 83 39 00 cmpl $0x0,(%ecx) 10d249: 74 06 je 10d251 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d24b: 8b 5a 10 mov 0x10(%edx),%ebx 10d24e: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d251: 8b 0d 50 63 12 00 mov 0x126350,%ecx 10d257: 85 c9 test %ecx,%ecx 10d259: 74 0c je 10d267 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d25b: 8b 0d a0 62 12 00 mov 0x1262a0,%ecx 10d261: 89 0d c0 62 12 00 mov %ecx,0x1262c0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d267: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d269: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d26c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d26f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d271: 8b 0d 54 63 12 00 mov 0x126354,%ecx 10d277: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d27a: 56 push %esi 10d27b: 9d popf return( previous_state ); } 10d27c: 5b pop %ebx 10d27d: 5e pop %esi 10d27e: c9 leave 10d27f: c3 ret =============================================================================== 0010e460 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e460: 55 push %ebp 10e461: 89 e5 mov %esp,%ebp 10e463: 57 push %edi 10e464: 56 push %esi 10e465: 53 push %ebx 10e466: 83 ec 20 sub $0x20,%esp 10e469: 8b 7d 08 mov 0x8(%ebp),%edi 10e46c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e46f: 9c pushf 10e470: fa cli 10e471: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e474: 56 push %esi 10e475: 57 push %edi 10e476: 68 48 25 12 00 push $0x122548 10e47b: e8 18 aa ff ff call 108e98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e480: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e482: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e485: 83 c4 10 add $0x10,%esp 10e488: 39 f3 cmp %esi,%ebx 10e48a: 74 1d je 10e4a9 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e48c: 52 push %edx 10e48d: 52 push %edx 10e48e: 53 push %ebx 10e48f: 6a 00 push $0x0 10e491: e8 32 00 00 00 call 10e4c8 <_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 ) 10e496: 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 ; 10e498: 83 c4 10 add $0x10,%esp 10e49b: 39 f3 cmp %esi,%ebx 10e49d: 75 ed jne 10e48c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e49f: 50 push %eax 10e4a0: 50 push %eax 10e4a1: 57 push %edi 10e4a2: 68 5f 25 12 00 push $0x12255f 10e4a7: eb 08 jmp 10e4b1 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e4a9: 83 ec 0c sub $0xc,%esp 10e4ac: 68 6e 25 12 00 push $0x12256e 10e4b1: e8 e2 a9 ff ff call 108e98 10e4b6: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e4b9: ff 75 e4 pushl -0x1c(%ebp) 10e4bc: 9d popf } 10e4bd: 8d 65 f4 lea -0xc(%ebp),%esp 10e4c0: 5b pop %ebx 10e4c1: 5e pop %esi 10e4c2: 5f pop %edi 10e4c3: c9 leave 10e4c4: c3 ret =============================================================================== 0010d280 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10d280: 55 push %ebp 10d281: 89 e5 mov %esp,%ebp 10d283: 57 push %edi 10d284: 56 push %esi 10d285: 53 push %ebx 10d286: 83 ec 1c sub $0x1c,%esp 10d289: 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 ); 10d28c: 9c pushf 10d28d: fa cli 10d28e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10d28f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d291: 8d 47 04 lea 0x4(%edi),%eax 10d294: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10d297: 39 c3 cmp %eax,%ebx 10d299: 74 40 je 10d2db <_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) { 10d29b: 8b 43 10 mov 0x10(%ebx),%eax 10d29e: 85 c0 test %eax,%eax 10d2a0: 74 08 je 10d2aa <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10d2a2: 48 dec %eax 10d2a3: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10d2a6: 85 c0 test %eax,%eax 10d2a8: 75 31 jne 10d2db <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10d2aa: 83 ec 0c sub $0xc,%esp 10d2ad: 53 push %ebx 10d2ae: e8 65 ff ff ff call 10d218 <_Watchdog_Remove> _ISR_Enable( level ); 10d2b3: 56 push %esi 10d2b4: 9d popf switch( watchdog_state ) { 10d2b5: 83 c4 10 add $0x10,%esp 10d2b8: 83 f8 02 cmp $0x2,%eax 10d2bb: 75 0e jne 10d2cb <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10d2bd: 50 push %eax 10d2be: 50 push %eax 10d2bf: ff 73 24 pushl 0x24(%ebx) 10d2c2: ff 73 20 pushl 0x20(%ebx) 10d2c5: ff 53 1c call *0x1c(%ebx) 10d2c8: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10d2cb: 9c pushf 10d2cc: fa cli 10d2cd: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10d2ce: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10d2d0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d2d3: 74 06 je 10d2db <_Watchdog_Tickle+0x5b> 10d2d5: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10d2d9: eb cd jmp 10d2a8 <_Watchdog_Tickle+0x28> leave: _ISR_Enable(level); 10d2db: 56 push %esi 10d2dc: 9d popf } 10d2dd: 8d 65 f4 lea -0xc(%ebp),%esp 10d2e0: 5b pop %ebx 10d2e1: 5e pop %esi 10d2e2: 5f pop %edi 10d2e3: c9 leave 10d2e4: c3 ret =============================================================================== 0011e1ec <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11e1ec: 55 push %ebp 11e1ed: 89 e5 mov %esp,%ebp 11e1ef: 83 ec 08 sub $0x8,%esp 11e1f2: e8 76 06 00 00 call 11e86d <_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(); 11e1f7: e8 8c ff ff ff call 11e188 rtems_shutdown_executive(status); 11e1fc: 83 ec 0c sub $0xc,%esp 11e1ff: ff 75 08 pushl 0x8(%ebp) 11e202: e8 e9 00 00 00 call 11e2f0 11e207: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11e20a: eb fe jmp 11e20a <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0010803a <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 10803a: 55 push %ebp <== NOT EXECUTED 10803b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10803d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108040: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108043: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 108046: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 108049: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 10804c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10804f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 108052: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 108053: e9 98 fe ff ff jmp 107ef0 <== NOT EXECUTED =============================================================================== 0010ee1a <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 10ee1a: 55 push %ebp <== NOT EXECUTED 10ee1b: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 10ee1d: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10ee22: c9 leave <== NOT EXECUTED 10ee23: c3 ret <== NOT EXECUTED =============================================================================== 00107763 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 107763: 55 push %ebp <== NOT EXECUTED 107764: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107766: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 107769: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10776a: e9 a5 ff ff ff jmp 107714 <== NOT EXECUTED =============================================================================== 001088bf <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 1088bf: 55 push %ebp <== NOT EXECUTED 1088c0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088c2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1088c5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 1088c8: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1088cb: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1088ce: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1088d1: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 1088d2: e9 61 fe ff ff jmp 108738 <== NOT EXECUTED =============================================================================== 0011e2b8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11e2b8: 55 push %ebp <== NOT EXECUTED 11e2b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11e2bb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11e2be: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11e2c1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11e2c4: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11e2c7: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11e2ca: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11e2cb: e9 48 00 00 00 jmp 11e318 <== NOT EXECUTED =============================================================================== 0010ad48 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10ad48: 55 push %ebp 10ad49: 89 e5 mov %esp,%ebp 10ad4b: 57 push %edi 10ad4c: 56 push %esi 10ad4d: 53 push %ebx 10ad4e: 83 ec 78 sub $0x78,%esp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10ad51: ff 75 0c pushl 0xc(%ebp) 10ad54: e8 93 eb ff ff call 1098ec 10ad59: 89 45 94 mov %eax,-0x6c(%ebp) if ( old_parent_pathlen == 0 ) 10ad5c: 83 c4 10 add $0x10,%esp 10ad5f: 85 c0 test %eax,%eax 10ad61: 8d 45 b8 lea -0x48(%ebp),%eax 10ad64: 75 15 jne 10ad7b <_rename_r+0x33> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10ad66: 52 push %edx 10ad67: 50 push %eax 10ad68: 8d 45 e4 lea -0x1c(%ebp),%eax 10ad6b: 50 push %eax 10ad6c: ff 75 0c pushl 0xc(%ebp) 10ad6f: e8 0c 05 00 00 call 10b280 10ad74: 31 db xor %ebx,%ebx 10ad76: 83 c4 10 add $0x10,%esp 10ad79: eb 20 jmp 10ad9b <_rename_r+0x53> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 10ad7b: 83 ec 0c sub $0xc,%esp 10ad7e: 6a 00 push $0x0 10ad80: 50 push %eax 10ad81: 6a 02 push $0x2 10ad83: ff 75 94 pushl -0x6c(%ebp) 10ad86: ff 75 0c pushl 0xc(%ebp) 10ad89: e8 5b ec ff ff call 1099e9 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10ad8e: 83 c4 20 add $0x20,%esp 10ad91: 85 c0 test %eax,%eax 10ad93: 0f 85 3d 02 00 00 jne 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ad99: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10ad9b: 8d 7d cc lea -0x34(%ebp),%edi 10ad9e: 8d 75 b8 lea -0x48(%ebp),%esi 10ada1: b9 05 00 00 00 mov $0x5,%ecx 10ada6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10ada8: 8b 75 0c mov 0xc(%ebp),%esi 10adab: 03 75 94 add -0x6c(%ebp),%esi 10adae: 89 75 e0 mov %esi,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10adb1: 83 c9 ff or $0xffffffff,%ecx 10adb4: 89 f7 mov %esi,%edi 10adb6: 31 c0 xor %eax,%eax 10adb8: f2 ae repnz scas %es:(%edi),%al 10adba: f7 d1 not %ecx 10adbc: 49 dec %ecx 10adbd: 57 push %edi 10adbe: 57 push %edi 10adbf: 51 push %ecx 10adc0: 56 push %esi 10adc1: e8 ea ea ff ff call 1098b0 10adc6: 01 c6 add %eax,%esi 10adc8: 89 75 e0 mov %esi,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10adcb: 83 c9 ff or $0xffffffff,%ecx 10adce: 89 f7 mov %esi,%edi 10add0: 31 c0 xor %eax,%eax 10add2: f2 ae repnz scas %es:(%edi),%al 10add4: f7 d1 not %ecx 10add6: 49 dec %ecx 10add7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10adde: 8d 7d cc lea -0x34(%ebp),%edi 10ade1: 57 push %edi 10ade2: 6a 00 push $0x0 10ade4: 51 push %ecx 10ade5: 56 push %esi 10ade6: e8 44 eb ff ff call 10992f 0, &old_loc, false ); if ( result != 0 ) { 10adeb: 83 c4 20 add $0x20,%esp 10adee: 85 c0 test %eax,%eax 10adf0: 74 29 je 10ae1b <_rename_r+0xd3> if ( free_old_parentloc ) 10adf2: 84 db test %bl,%bl 10adf4: 0f 84 dc 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10adfa: 8b 45 c4 mov -0x3c(%ebp),%eax 10adfd: 85 c0 test %eax,%eax 10adff: 0f 84 d1 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae05: 8b 40 1c mov 0x1c(%eax),%eax 10ae08: 85 c0 test %eax,%eax 10ae0a: 0f 84 c6 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae10: 83 ec 0c sub $0xc,%esp 10ae13: 8d 55 b8 lea -0x48(%ebp),%edx 10ae16: e9 89 00 00 00 jmp 10aea4 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10ae1b: 51 push %ecx 10ae1c: 8d 75 a4 lea -0x5c(%ebp),%esi 10ae1f: 56 push %esi 10ae20: 8d 45 e4 lea -0x1c(%ebp),%eax 10ae23: 50 push %eax 10ae24: ff 75 10 pushl 0x10(%ebp) 10ae27: e8 54 04 00 00 call 10b280 if ( !new_parent_loc.ops->evalformake_h ) { 10ae2c: 8b 45 b0 mov -0x50(%ebp),%eax 10ae2f: 8b 40 04 mov 0x4(%eax),%eax 10ae32: 83 c4 10 add $0x10,%esp 10ae35: 85 c0 test %eax,%eax 10ae37: 0f 84 f3 00 00 00 je 10af30 <_rename_r+0x1e8> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10ae3d: 52 push %edx 10ae3e: 8d 55 e0 lea -0x20(%ebp),%edx 10ae41: 52 push %edx 10ae42: 56 push %esi 10ae43: 8b 55 10 mov 0x10(%ebp),%edx 10ae46: 03 55 e4 add -0x1c(%ebp),%edx 10ae49: 52 push %edx 10ae4a: ff d0 call *%eax if ( result != 0 ) { 10ae4c: 83 c4 10 add $0x10,%esp 10ae4f: 85 c0 test %eax,%eax 10ae51: 74 5f je 10aeb2 <_rename_r+0x16a> rtems_filesystem_freenode( &new_parent_loc ); 10ae53: 8b 45 b0 mov -0x50(%ebp),%eax 10ae56: 85 c0 test %eax,%eax 10ae58: 74 10 je 10ae6a <_rename_r+0x122> <== NEVER TAKEN 10ae5a: 8b 40 1c mov 0x1c(%eax),%eax 10ae5d: 85 c0 test %eax,%eax 10ae5f: 74 09 je 10ae6a <_rename_r+0x122> <== NEVER TAKEN 10ae61: 83 ec 0c sub $0xc,%esp 10ae64: 56 push %esi 10ae65: ff d0 call *%eax 10ae67: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10ae6a: 84 db test %bl,%bl 10ae6c: 74 1a je 10ae88 <_rename_r+0x140> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10ae6e: 8b 45 c4 mov -0x3c(%ebp),%eax 10ae71: 85 c0 test %eax,%eax 10ae73: 74 13 je 10ae88 <_rename_r+0x140> <== NEVER TAKEN 10ae75: 8b 40 1c mov 0x1c(%eax),%eax 10ae78: 85 c0 test %eax,%eax 10ae7a: 74 0c je 10ae88 <_rename_r+0x140> <== NEVER TAKEN 10ae7c: 83 ec 0c sub $0xc,%esp 10ae7f: 8d 55 b8 lea -0x48(%ebp),%edx 10ae82: 52 push %edx 10ae83: ff d0 call *%eax 10ae85: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10ae88: 8b 45 d8 mov -0x28(%ebp),%eax 10ae8b: 85 c0 test %eax,%eax 10ae8d: 0f 84 43 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae93: 8b 40 1c mov 0x1c(%eax),%eax 10ae96: 85 c0 test %eax,%eax 10ae98: 0f 84 38 01 00 00 je 10afd6 <_rename_r+0x28e> <== NEVER TAKEN 10ae9e: 83 ec 0c sub $0xc,%esp 10aea1: 8d 55 cc lea -0x34(%ebp),%edx 10aea4: 52 push %edx 10aea5: ff d0 call *%eax 10aea7: 83 cf ff or $0xffffffff,%edi 10aeaa: 83 c4 10 add $0x10,%esp 10aead: e9 27 01 00 00 jmp 10afd9 <_rename_r+0x291> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 10aeb2: 8b 45 c8 mov -0x38(%ebp),%eax 10aeb5: 3b 45 b4 cmp -0x4c(%ebp),%eax 10aeb8: 8b 45 b0 mov -0x50(%ebp),%eax 10aebb: 74 5c je 10af19 <_rename_r+0x1d1> rtems_filesystem_freenode( &new_parent_loc ); 10aebd: 85 c0 test %eax,%eax 10aebf: 74 10 je 10aed1 <_rename_r+0x189> <== NEVER TAKEN 10aec1: 8b 40 1c mov 0x1c(%eax),%eax 10aec4: 85 c0 test %eax,%eax 10aec6: 74 09 je 10aed1 <_rename_r+0x189> <== NEVER TAKEN 10aec8: 83 ec 0c sub $0xc,%esp 10aecb: 56 push %esi 10aecc: ff d0 call *%eax 10aece: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10aed1: 84 db test %bl,%bl 10aed3: 74 1a je 10aeef <_rename_r+0x1a7> rtems_filesystem_freenode( &old_parent_loc ); 10aed5: 8b 45 c4 mov -0x3c(%ebp),%eax 10aed8: 85 c0 test %eax,%eax 10aeda: 74 13 je 10aeef <_rename_r+0x1a7> <== NEVER TAKEN 10aedc: 8b 40 1c mov 0x1c(%eax),%eax 10aedf: 85 c0 test %eax,%eax 10aee1: 74 0c je 10aeef <_rename_r+0x1a7> <== NEVER TAKEN 10aee3: 83 ec 0c sub $0xc,%esp 10aee6: 8d 55 b8 lea -0x48(%ebp),%edx 10aee9: 52 push %edx 10aeea: ff d0 call *%eax 10aeec: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10aeef: 8b 45 d8 mov -0x28(%ebp),%eax 10aef2: 85 c0 test %eax,%eax 10aef4: 74 13 je 10af09 <_rename_r+0x1c1> <== NEVER TAKEN 10aef6: 8b 40 1c mov 0x1c(%eax),%eax 10aef9: 85 c0 test %eax,%eax 10aefb: 74 0c je 10af09 <_rename_r+0x1c1> <== NEVER TAKEN 10aefd: 83 ec 0c sub $0xc,%esp 10af00: 8d 55 cc lea -0x34(%ebp),%edx 10af03: 52 push %edx 10af04: ff d0 call *%eax 10af06: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10af09: e8 2e a9 00 00 call 11583c <__errno> 10af0e: c7 00 12 00 00 00 movl $0x12,(%eax) 10af14: e9 bd 00 00 00 jmp 10afd6 <_rename_r+0x28e> } if ( !new_parent_loc.ops->rename_h ) { 10af19: 8b 50 40 mov 0x40(%eax),%edx 10af1c: 85 d2 test %edx,%edx 10af1e: 75 55 jne 10af75 <_rename_r+0x22d> rtems_filesystem_freenode( &new_parent_loc ); 10af20: 8b 40 1c mov 0x1c(%eax),%eax 10af23: 85 c0 test %eax,%eax 10af25: 74 09 je 10af30 <_rename_r+0x1e8> <== NEVER TAKEN 10af27: 83 ec 0c sub $0xc,%esp 10af2a: 56 push %esi 10af2b: ff d0 call *%eax 10af2d: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10af30: 84 db test %bl,%bl 10af32: 74 1a je 10af4e <_rename_r+0x206> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10af34: 8b 45 c4 mov -0x3c(%ebp),%eax 10af37: 85 c0 test %eax,%eax 10af39: 74 13 je 10af4e <_rename_r+0x206> <== NEVER TAKEN 10af3b: 8b 40 1c mov 0x1c(%eax),%eax 10af3e: 85 c0 test %eax,%eax 10af40: 74 0c je 10af4e <_rename_r+0x206> <== NEVER TAKEN 10af42: 83 ec 0c sub $0xc,%esp 10af45: 8d 55 b8 lea -0x48(%ebp),%edx 10af48: 52 push %edx 10af49: ff d0 call *%eax 10af4b: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10af4e: 8b 45 d8 mov -0x28(%ebp),%eax 10af51: 85 c0 test %eax,%eax 10af53: 74 13 je 10af68 <_rename_r+0x220> <== NEVER TAKEN 10af55: 8b 40 1c mov 0x1c(%eax),%eax 10af58: 85 c0 test %eax,%eax 10af5a: 74 0c je 10af68 <_rename_r+0x220> <== NEVER TAKEN 10af5c: 83 ec 0c sub $0xc,%esp 10af5f: 8d 55 cc lea -0x34(%ebp),%edx 10af62: 52 push %edx 10af63: ff d0 call *%eax 10af65: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 10af68: e8 cf a8 00 00 call 11583c <__errno> 10af6d: c7 00 86 00 00 00 movl $0x86,(%eax) 10af73: eb 61 jmp 10afd6 <_rename_r+0x28e> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10af75: ff 75 e0 pushl -0x20(%ebp) 10af78: 56 push %esi 10af79: 57 push %edi 10af7a: 8d 45 b8 lea -0x48(%ebp),%eax 10af7d: 50 push %eax 10af7e: ff d2 call *%edx 10af80: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 10af82: 8b 45 b0 mov -0x50(%ebp),%eax 10af85: 83 c4 10 add $0x10,%esp 10af88: 85 c0 test %eax,%eax 10af8a: 74 10 je 10af9c <_rename_r+0x254> <== NEVER TAKEN 10af8c: 8b 40 1c mov 0x1c(%eax),%eax 10af8f: 85 c0 test %eax,%eax 10af91: 74 09 je 10af9c <_rename_r+0x254> <== NEVER TAKEN 10af93: 83 ec 0c sub $0xc,%esp 10af96: 56 push %esi 10af97: ff d0 call *%eax 10af99: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10af9c: 84 db test %bl,%bl 10af9e: 74 1a je 10afba <_rename_r+0x272> rtems_filesystem_freenode( &old_parent_loc ); 10afa0: 8b 45 c4 mov -0x3c(%ebp),%eax 10afa3: 85 c0 test %eax,%eax 10afa5: 74 13 je 10afba <_rename_r+0x272> <== NEVER TAKEN 10afa7: 8b 40 1c mov 0x1c(%eax),%eax 10afaa: 85 c0 test %eax,%eax 10afac: 74 0c je 10afba <_rename_r+0x272> <== NEVER TAKEN 10afae: 83 ec 0c sub $0xc,%esp 10afb1: 8d 55 b8 lea -0x48(%ebp),%edx 10afb4: 52 push %edx 10afb5: ff d0 call *%eax 10afb7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10afba: 8b 45 d8 mov -0x28(%ebp),%eax 10afbd: 85 c0 test %eax,%eax 10afbf: 74 18 je 10afd9 <_rename_r+0x291> <== NEVER TAKEN 10afc1: 8b 40 1c mov 0x1c(%eax),%eax 10afc4: 85 c0 test %eax,%eax 10afc6: 74 11 je 10afd9 <_rename_r+0x291> <== NEVER TAKEN 10afc8: 83 ec 0c sub $0xc,%esp 10afcb: 8d 55 cc lea -0x34(%ebp),%edx 10afce: 52 push %edx 10afcf: ff d0 call *%eax 10afd1: e9 d4 fe ff ff jmp 10aeaa <_rename_r+0x162> 10afd6: 83 cf ff or $0xffffffff,%edi return result; } 10afd9: 89 f8 mov %edi,%eax 10afdb: 8d 65 f4 lea -0xc(%ebp),%esp 10afde: 5b pop %ebx 10afdf: 5e pop %esi 10afe0: 5f pop %edi 10afe1: c9 leave 10afe2: c3 ret =============================================================================== 00109356 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 109356: 55 push %ebp <== NOT EXECUTED 109357: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109359: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10935c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10935f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 109362: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 109365: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109368: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 109369: e9 3a ff ff ff jmp 1092a8 <== NOT EXECUTED =============================================================================== 00111ed7 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 111ed7: 55 push %ebp <== NOT EXECUTED 111ed8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 111eda: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 111edd: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 111ee0: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 111ee3: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 111ee4: e9 27 fe ff ff jmp 111d10 <== NOT EXECUTED =============================================================================== 0010a490 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10a490: 55 push %ebp 10a491: 89 e5 mov %esp,%ebp 10a493: 56 push %esi 10a494: 53 push %ebx 10a495: 83 ec 10 sub $0x10,%esp 10a498: 8b 5d 08 mov 0x8(%ebp),%ebx 10a49b: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10a49e: 85 db test %ebx,%ebx 10a4a0: 74 09 je 10a4ab rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10a4a2: 81 7b 04 3f 42 0f 00 cmpl $0xf423f,0x4(%ebx) 10a4a9: 76 13 jbe 10a4be rtems_set_errno_and_return_minus_one( EINVAL ); 10a4ab: e8 14 8e 00 00 call 1132c4 <__errno> 10a4b0: c7 00 16 00 00 00 movl $0x16,(%eax) 10a4b6: 83 c8 ff or $0xffffffff,%eax 10a4b9: e9 9a 00 00 00 jmp 10a558 if ( olddelta ) { 10a4be: 85 f6 test %esi,%esi 10a4c0: 74 0d je 10a4cf olddelta->tv_sec = 0; 10a4c2: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10a4c8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10a4cf: 69 03 40 42 0f 00 imul $0xf4240,(%ebx),%eax adjustment += delta->tv_usec; 10a4d5: 03 43 04 add 0x4(%ebx),%eax /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10a4d8: 3b 05 04 32 12 00 cmp 0x123204,%eax 10a4de: 72 76 jb 10a556 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a4e0: a1 30 73 12 00 mov 0x127330,%eax 10a4e5: 40 inc %eax 10a4e6: a3 30 73 12 00 mov %eax,0x127330 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10a4eb: 83 ec 0c sub $0xc,%esp 10a4ee: 8d 45 f0 lea -0x10(%ebp),%eax 10a4f1: 50 push %eax 10a4f2: e8 f5 14 00 00 call 10b9ec <_TOD_Get> ts.tv_sec += delta->tv_sec; 10a4f7: 8b 03 mov (%ebx),%eax 10a4f9: 01 45 f0 add %eax,-0x10(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10a4fc: 69 43 04 e8 03 00 00 imul $0x3e8,0x4(%ebx),%eax 10a503: 8b 4d f0 mov -0x10(%ebp),%ecx 10a506: 03 45 f4 add -0xc(%ebp),%eax /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10a509: 83 c4 10 add $0x10,%esp 10a50c: eb 05 jmp 10a513 10a50e: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax 10a513: 89 ca mov %ecx,%edx 10a515: 41 inc %ecx 10a516: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10a51b: 77 f1 ja 10a50e 10a51d: eb 05 jmp 10a524 10a51f: 05 00 ca 9a 3b add $0x3b9aca00,%eax 10a524: 89 d1 mov %edx,%ecx 10a526: 4a dec %edx ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10a527: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10a52c: 76 f1 jbe 10a51f 10a52e: 89 45 f4 mov %eax,-0xc(%ebp) 10a531: 89 4d f0 mov %ecx,-0x10(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10a534: 83 ec 0c sub $0xc,%esp 10a537: 8d 45 f0 lea -0x10(%ebp),%eax 10a53a: 50 push %eax 10a53b: e8 3c 15 00 00 call 10ba7c <_TOD_Set> _Thread_Enable_dispatch(); 10a540: e8 90 25 00 00 call 10cad5 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10a545: 83 c4 10 add $0x10,%esp 10a548: 85 f6 test %esi,%esi 10a54a: 74 0a je 10a556 <== NEVER TAKEN *olddelta = *delta; 10a54c: 8b 03 mov (%ebx),%eax 10a54e: 8b 53 04 mov 0x4(%ebx),%edx 10a551: 89 06 mov %eax,(%esi) 10a553: 89 56 04 mov %edx,0x4(%esi) 10a556: 31 c0 xor %eax,%eax return 0; } 10a558: 8d 65 f8 lea -0x8(%ebp),%esp 10a55b: 5b pop %ebx 10a55c: 5e pop %esi 10a55d: c9 leave 10a55e: c3 ret =============================================================================== 001074bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1074bc: 55 push %ebp 1074bd: 89 e5 mov %esp,%ebp 1074bf: 57 push %edi 1074c0: 53 push %ebx 1074c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1074c4: ff 05 e4 60 12 00 incl 0x1260e4 length = nelem * elsize; 1074ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1074ce: 83 ec 0c sub $0xc,%esp 1074d1: 53 push %ebx 1074d2: e8 65 04 00 00 call 10793c 1074d7: 89 c2 mov %eax,%edx if ( cptr ) 1074d9: 83 c4 10 add $0x10,%esp 1074dc: 85 c0 test %eax,%eax 1074de: 74 08 je 1074e8 <== NEVER TAKEN memset( cptr, '\0', length ); 1074e0: 31 c0 xor %eax,%eax 1074e2: 89 d7 mov %edx,%edi 1074e4: 89 d9 mov %ebx,%ecx 1074e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1074e8: ff 0d d4 60 12 00 decl 0x1260d4 return cptr; } 1074ee: 89 d0 mov %edx,%eax 1074f0: 8d 65 f8 lea -0x8(%ebp),%esp 1074f3: 5b pop %ebx 1074f4: 5f pop %edi 1074f5: c9 leave 1074f6: c3 ret =============================================================================== 0010f70c : #include int chdir( const char *pathname ) { 10f70c: 55 push %ebp 10f70d: 89 e5 mov %esp,%ebp 10f70f: 57 push %edi 10f710: 56 push %esi 10f711: 83 ec 20 sub $0x20,%esp 10f714: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 10f717: 85 d2 test %edx,%edx 10f719: 75 0d jne 10f728 rtems_set_errno_and_return_minus_one( EFAULT ); 10f71b: e8 bc 3a 00 00 call 1131dc <__errno> 10f720: c7 00 0e 00 00 00 movl $0xe,(%eax) 10f726: eb 53 jmp 10f77b /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 10f728: 31 c0 xor %eax,%eax 10f72a: 83 c9 ff or $0xffffffff,%ecx 10f72d: 89 d7 mov %edx,%edi 10f72f: f2 ae repnz scas %es:(%edi),%al 10f731: f7 d1 not %ecx 10f733: 49 dec %ecx 10f734: 83 ec 0c sub $0xc,%esp 10f737: 6a 01 push $0x1 10f739: 8d 75 e4 lea -0x1c(%ebp),%esi 10f73c: 56 push %esi 10f73d: 6a 01 push $0x1 10f73f: 51 push %ecx 10f740: 52 push %edx 10f741: e8 27 82 ff ff call 10796d 10f746: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 10f748: 83 c4 20 add $0x20,%esp 10f74b: 83 c8 ff or $0xffffffff,%eax 10f74e: 85 d2 test %edx,%edx 10f750: 0f 85 8f 00 00 00 jne 10f7e5 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 10f756: 8b 55 f0 mov -0x10(%ebp),%edx 10f759: 8b 42 10 mov 0x10(%edx),%eax 10f75c: 85 c0 test %eax,%eax 10f75e: 75 20 jne 10f780 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10f760: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10f763: 85 c0 test %eax,%eax <== NOT EXECUTED 10f765: 74 09 je 10f770 <== NOT EXECUTED 10f767: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f76a: 56 push %esi <== NOT EXECUTED 10f76b: ff d0 call *%eax <== NOT EXECUTED 10f76d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f770: e8 67 3a 00 00 call 1131dc <__errno> <== NOT EXECUTED 10f775: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f77b: 83 c8 ff or $0xffffffff,%eax 10f77e: eb 65 jmp 10f7e5 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10f780: 83 ec 0c sub $0xc,%esp 10f783: 56 push %esi 10f784: ff d0 call *%eax 10f786: 83 c4 10 add $0x10,%esp 10f789: 48 dec %eax 10f78a: 74 24 je 10f7b0 rtems_filesystem_freenode( &loc ); 10f78c: 8b 45 f0 mov -0x10(%ebp),%eax 10f78f: 85 c0 test %eax,%eax 10f791: 74 10 je 10f7a3 <== NEVER TAKEN 10f793: 8b 40 1c mov 0x1c(%eax),%eax 10f796: 85 c0 test %eax,%eax 10f798: 74 09 je 10f7a3 <== NEVER TAKEN 10f79a: 83 ec 0c sub $0xc,%esp 10f79d: 56 push %esi 10f79e: ff d0 call *%eax 10f7a0: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f7a3: e8 34 3a 00 00 call 1131dc <__errno> 10f7a8: c7 00 14 00 00 00 movl $0x14,(%eax) 10f7ae: eb cb jmp 10f77b } rtems_filesystem_freenode( &rtems_filesystem_current ); 10f7b0: 8b 15 40 3f 12 00 mov 0x123f40,%edx 10f7b6: 8b 42 10 mov 0x10(%edx),%eax 10f7b9: 85 c0 test %eax,%eax 10f7bb: 74 13 je 10f7d0 <== NEVER TAKEN 10f7bd: 8b 40 1c mov 0x1c(%eax),%eax 10f7c0: 85 c0 test %eax,%eax 10f7c2: 74 0c je 10f7d0 <== NEVER TAKEN 10f7c4: 83 ec 0c sub $0xc,%esp 10f7c7: 83 c2 04 add $0x4,%edx 10f7ca: 52 push %edx 10f7cb: ff d0 call *%eax 10f7cd: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 10f7d0: 8b 3d 40 3f 12 00 mov 0x123f40,%edi 10f7d6: 83 c7 04 add $0x4,%edi 10f7d9: 8d 75 e4 lea -0x1c(%ebp),%esi 10f7dc: b9 05 00 00 00 mov $0x5,%ecx 10f7e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10f7e3: 31 c0 xor %eax,%eax return 0; } 10f7e5: 8d 65 f8 lea -0x8(%ebp),%esp 10f7e8: 5e pop %esi 10f7e9: 5f pop %edi 10f7ea: c9 leave 10f7eb: c3 ret =============================================================================== 00108df4 : int chmod( const char *path, mode_t mode ) { 108df4: 55 push %ebp 108df5: 89 e5 mov %esp,%ebp 108df7: 57 push %edi 108df8: 56 push %esi 108df9: 53 push %ebx 108dfa: 83 ec 38 sub $0x38,%esp 108dfd: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 108e00: 31 c0 xor %eax,%eax 108e02: 83 c9 ff or $0xffffffff,%ecx 108e05: 89 d7 mov %edx,%edi 108e07: f2 ae repnz scas %es:(%edi),%al 108e09: f7 d1 not %ecx 108e0b: 49 dec %ecx 108e0c: 6a 01 push $0x1 108e0e: 8d 5d d4 lea -0x2c(%ebp),%ebx 108e11: 53 push %ebx 108e12: 6a 00 push $0x0 108e14: 51 push %ecx 108e15: 52 push %edx 108e16: e8 66 02 00 00 call 109081 if ( status != 0 ) 108e1b: 83 c4 20 add $0x20,%esp 108e1e: 83 ce ff or $0xffffffff,%esi 108e21: 85 c0 test %eax,%eax 108e23: 75 7d jne 108ea2 return -1; if ( !loc.handlers ){ 108e25: 8b 45 dc mov -0x24(%ebp),%eax 108e28: 85 c0 test %eax,%eax 108e2a: 75 24 jne 108e50 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e2c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e2f: 85 c0 test %eax,%eax <== NOT EXECUTED 108e31: 74 10 je 108e43 <== NOT EXECUTED 108e33: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e36: 85 c0 test %eax,%eax <== NOT EXECUTED 108e38: 74 09 je 108e43 <== NOT EXECUTED 108e3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e3d: 53 push %ebx <== NOT EXECUTED 108e3e: ff d0 call *%eax <== NOT EXECUTED 108e40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 108e43: e8 78 c0 00 00 call 114ec0 <__errno> <== NOT EXECUTED 108e48: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 108e4e: eb 29 jmp 108e79 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 108e50: 8b 40 1c mov 0x1c(%eax),%eax 108e53: 85 c0 test %eax,%eax 108e55: 75 27 jne 108e7e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108e57: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108e5a: 85 c0 test %eax,%eax <== NOT EXECUTED 108e5c: 74 10 je 108e6e <== NOT EXECUTED 108e5e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108e61: 85 c0 test %eax,%eax <== NOT EXECUTED 108e63: 74 09 je 108e6e <== NOT EXECUTED 108e65: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e68: 53 push %ebx <== NOT EXECUTED 108e69: ff d0 call *%eax <== NOT EXECUTED 108e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108e6e: e8 4d c0 00 00 call 114ec0 <__errno> <== NOT EXECUTED 108e73: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108e79: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 108e7c: eb 24 jmp 108ea2 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 108e7e: 52 push %edx 108e7f: 52 push %edx 108e80: ff 75 0c pushl 0xc(%ebp) 108e83: 53 push %ebx 108e84: ff d0 call *%eax 108e86: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 108e88: 8b 45 e0 mov -0x20(%ebp),%eax 108e8b: 83 c4 10 add $0x10,%esp 108e8e: 85 c0 test %eax,%eax 108e90: 74 10 je 108ea2 <== NEVER TAKEN 108e92: 8b 40 1c mov 0x1c(%eax),%eax 108e95: 85 c0 test %eax,%eax 108e97: 74 09 je 108ea2 <== NEVER TAKEN 108e99: 83 ec 0c sub $0xc,%esp 108e9c: 53 push %ebx 108e9d: ff d0 call *%eax 108e9f: 83 c4 10 add $0x10,%esp return result; } 108ea2: 89 f0 mov %esi,%eax 108ea4: 8d 65 f4 lea -0xc(%ebp),%esp 108ea7: 5b pop %ebx 108ea8: 5e pop %esi 108ea9: 5f pop %edi 108eaa: c9 leave 108eab: c3 ret =============================================================================== 00108eac : int chown( const char *path, uid_t owner, gid_t group ) { 108eac: 55 push %ebp 108ead: 89 e5 mov %esp,%ebp 108eaf: 57 push %edi 108eb0: 56 push %esi 108eb1: 53 push %ebx 108eb2: 83 ec 48 sub $0x48,%esp 108eb5: 8b 55 08 mov 0x8(%ebp),%edx 108eb8: 8b 75 0c mov 0xc(%ebp),%esi 108ebb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 108ebe: 31 c0 xor %eax,%eax 108ec0: 83 c9 ff or $0xffffffff,%ecx 108ec3: 89 d7 mov %edx,%edi 108ec5: f2 ae repnz scas %es:(%edi),%al 108ec7: f7 d1 not %ecx 108ec9: 49 dec %ecx 108eca: 6a 01 push $0x1 108ecc: 8d 7d d4 lea -0x2c(%ebp),%edi 108ecf: 57 push %edi 108ed0: 6a 00 push $0x0 108ed2: 51 push %ecx 108ed3: 52 push %edx 108ed4: e8 a8 01 00 00 call 109081 108ed9: 83 c4 20 add $0x20,%esp 108edc: 83 ca ff or $0xffffffff,%edx 108edf: 85 c0 test %eax,%eax 108ee1: 75 58 jne 108f3b return -1; if ( !loc.ops->chown_h ) { 108ee3: 8b 55 e0 mov -0x20(%ebp),%edx 108ee6: 8b 42 18 mov 0x18(%edx),%eax 108ee9: 85 c0 test %eax,%eax 108eeb: 75 20 jne 108f0d <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 108eed: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 108ef0: 85 c0 test %eax,%eax <== NOT EXECUTED 108ef2: 74 09 je 108efd <== NOT EXECUTED 108ef4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108ef7: 57 push %edi <== NOT EXECUTED 108ef8: ff d0 call *%eax <== NOT EXECUTED 108efa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108efd: e8 be bf 00 00 call 114ec0 <__errno> <== NOT EXECUTED 108f02: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108f08: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 108f0b: eb 2e jmp 108f3b <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 108f0d: 52 push %edx 108f0e: 0f b7 db movzwl %bx,%ebx 108f11: 53 push %ebx 108f12: 0f b7 f6 movzwl %si,%esi 108f15: 56 push %esi 108f16: 57 push %edi 108f17: ff d0 call *%eax 108f19: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 108f1b: 8b 45 e0 mov -0x20(%ebp),%eax 108f1e: 83 c4 10 add $0x10,%esp 108f21: 85 c0 test %eax,%eax 108f23: 74 16 je 108f3b <== NEVER TAKEN 108f25: 8b 40 1c mov 0x1c(%eax),%eax 108f28: 85 c0 test %eax,%eax 108f2a: 74 0f je 108f3b <== NEVER TAKEN 108f2c: 83 ec 0c sub $0xc,%esp 108f2f: 57 push %edi 108f30: 89 55 c4 mov %edx,-0x3c(%ebp) 108f33: ff d0 call *%eax 108f35: 83 c4 10 add $0x10,%esp 108f38: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 108f3b: 89 d0 mov %edx,%eax 108f3d: 8d 65 f4 lea -0xc(%ebp),%esp 108f40: 5b pop %ebx 108f41: 5e pop %esi 108f42: 5f pop %edi 108f43: c9 leave 108f44: c3 ret =============================================================================== 001076f8 : #include int chroot( const char *pathname ) { 1076f8: 55 push %ebp 1076f9: 89 e5 mov %esp,%ebp 1076fb: 57 push %edi 1076fc: 56 push %esi 1076fd: 83 ec 20 sub $0x20,%esp int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 107700: 81 3d 40 3f 12 00 e8 cmpl $0x1260e8,0x123f40 107707: 60 12 00 10770a: 75 1e jne 10772a <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 10770c: e8 af 12 00 00 call 1089c0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 107711: 81 3d 40 3f 12 00 e8 cmpl $0x1260e8,0x123f40 107718: 60 12 00 10771b: 75 0d jne 10772a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10771d: e8 ba ba 00 00 call 1131dc <__errno> <== NOT EXECUTED 107722: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107728: eb 22 jmp 10774c <== NOT EXECUTED } result = chdir(pathname); 10772a: 83 ec 0c sub $0xc,%esp 10772d: ff 75 08 pushl 0x8(%ebp) 107730: e8 d7 7f 00 00 call 10f70c if (result) { 107735: 83 c4 10 add $0x10,%esp 107738: 85 c0 test %eax,%eax 10773a: 74 15 je 107751 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 10773c: e8 9b ba 00 00 call 1131dc <__errno> <== NOT EXECUTED 107741: 89 c6 mov %eax,%esi <== NOT EXECUTED 107743: e8 94 ba 00 00 call 1131dc <__errno> <== NOT EXECUTED 107748: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10774a: 89 06 mov %eax,(%esi) <== NOT EXECUTED 10774c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10774f: eb 53 jmp 1077a4 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 107751: 83 ec 0c sub $0xc,%esp 107754: 6a 00 push $0x0 107756: 8d 45 e4 lea -0x1c(%ebp),%eax 107759: 50 push %eax 10775a: 6a 00 push $0x0 10775c: 6a 01 push $0x1 10775e: 68 b8 0d 12 00 push $0x120db8 107763: e8 05 02 00 00 call 10796d 107768: 83 c4 20 add $0x20,%esp 10776b: 85 c0 test %eax,%eax 10776d: 75 cd jne 10773c <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 10776f: 8b 15 40 3f 12 00 mov 0x123f40,%edx 107775: 8b 42 24 mov 0x24(%edx),%eax 107778: 85 c0 test %eax,%eax 10777a: 74 13 je 10778f <== NEVER TAKEN 10777c: 8b 40 1c mov 0x1c(%eax),%eax 10777f: 85 c0 test %eax,%eax 107781: 74 0c je 10778f <== NEVER TAKEN 107783: 83 ec 0c sub $0xc,%esp 107786: 83 c2 18 add $0x18,%edx 107789: 52 push %edx 10778a: ff d0 call *%eax 10778c: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 10778f: 8b 3d 40 3f 12 00 mov 0x123f40,%edi 107795: 83 c7 18 add $0x18,%edi 107798: 8d 75 e4 lea -0x1c(%ebp),%esi 10779b: b9 05 00 00 00 mov $0x5,%ecx 1077a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1077a2: 31 c0 xor %eax,%eax return 0; } 1077a4: 8d 65 f8 lea -0x8(%ebp),%esp 1077a7: 5e pop %esi 1077a8: 5f pop %edi 1077a9: c9 leave 1077aa: c3 ret =============================================================================== 0010a410 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10a410: 55 push %ebp 10a411: 89 e5 mov %esp,%ebp 10a413: 83 ec 08 sub $0x8,%esp 10a416: 8b 45 08 mov 0x8(%ebp),%eax 10a419: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10a41c: 85 d2 test %edx,%edx 10a41e: 74 3c je 10a45c rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10a420: 83 f8 01 cmp $0x1,%eax 10a423: 75 0b jne 10a430 _TOD_Get(tp); 10a425: 83 ec 0c sub $0xc,%esp 10a428: 52 push %edx 10a429: e8 9e 1b 00 00 call 10bfcc <_TOD_Get> 10a42e: eb 13 jmp 10a443 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10a430: 83 f8 04 cmp $0x4,%eax 10a433: 74 05 je 10a43a <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10a435: 83 f8 02 cmp $0x2,%eax 10a438: 75 10 jne 10a44a _TOD_Get_uptime_as_timespec( tp ); 10a43a: 83 ec 0c sub $0xc,%esp 10a43d: 52 push %edx 10a43e: e8 e5 1b 00 00 call 10c028 <_TOD_Get_uptime_as_timespec> 10a443: 31 c0 xor %eax,%eax return 0; 10a445: 83 c4 10 add $0x10,%esp 10a448: eb 20 jmp 10a46a } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10a44a: 83 f8 03 cmp $0x3,%eax 10a44d: 75 0d jne 10a45c rtems_set_errno_and_return_minus_one( ENOSYS ); 10a44f: e8 90 92 00 00 call 1136e4 <__errno> 10a454: c7 00 58 00 00 00 movl $0x58,(%eax) 10a45a: eb 0b jmp 10a467 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10a45c: e8 83 92 00 00 call 1136e4 <__errno> 10a461: c7 00 16 00 00 00 movl $0x16,(%eax) 10a467: 83 c8 ff or $0xffffffff,%eax return 0; } 10a46a: c9 leave 10a46b: c3 ret =============================================================================== 0010a46c : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10a46c: 55 push %ebp 10a46d: 89 e5 mov %esp,%ebp 10a46f: 83 ec 08 sub $0x8,%esp 10a472: 8b 45 08 mov 0x8(%ebp),%eax 10a475: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10a478: 85 d2 test %edx,%edx 10a47a: 74 44 je 10a4c0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10a47c: 83 f8 01 cmp $0x1,%eax 10a47f: 75 28 jne 10a4a9 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 10a481: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10a487: 76 37 jbe 10a4c0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a489: a1 48 82 12 00 mov 0x128248,%eax 10a48e: 40 inc %eax 10a48f: a3 48 82 12 00 mov %eax,0x128248 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10a494: 83 ec 0c sub $0xc,%esp 10a497: 52 push %edx 10a498: e8 e3 1b 00 00 call 10c080 <_TOD_Set> _Thread_Enable_dispatch(); 10a49d: e8 37 2c 00 00 call 10d0d9 <_Thread_Enable_dispatch> 10a4a2: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10a4a4: 83 c4 10 add $0x10,%esp 10a4a7: eb 25 jmp 10a4ce _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10a4a9: 83 f8 02 cmp $0x2,%eax 10a4ac: 74 05 je 10a4b3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10a4ae: 83 f8 03 cmp $0x3,%eax 10a4b1: 75 0d jne 10a4c0 rtems_set_errno_and_return_minus_one( ENOSYS ); 10a4b3: e8 2c 92 00 00 call 1136e4 <__errno> 10a4b8: c7 00 58 00 00 00 movl $0x58,(%eax) 10a4be: eb 0b jmp 10a4cb #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10a4c0: e8 1f 92 00 00 call 1136e4 <__errno> 10a4c5: c7 00 16 00 00 00 movl $0x16,(%eax) 10a4cb: 83 c8 ff or $0xffffffff,%eax return 0; } 10a4ce: c9 leave 10a4cf: c3 ret =============================================================================== 0010ecb4 : #include int close( int fd ) { 10ecb4: 55 push %ebp 10ecb5: 89 e5 mov %esp,%ebp 10ecb7: 56 push %esi 10ecb8: 53 push %ebx 10ecb9: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10ecbc: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 10ecc2: 73 0f jae 10ecd3 iop = rtems_libio_iop(fd); 10ecc4: c1 e3 06 shl $0x6,%ebx 10ecc7: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 10eccd: f6 43 15 01 testb $0x1,0x15(%ebx) 10ecd1: 75 10 jne 10ece3 10ecd3: e8 48 3d 00 00 call 112a20 <__errno> 10ecd8: c7 00 09 00 00 00 movl $0x9,(%eax) 10ecde: 83 c8 ff or $0xffffffff,%eax 10ece1: eb 3f jmp 10ed22 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10ece3: 8b 43 3c mov 0x3c(%ebx),%eax 10ece6: 8b 40 04 mov 0x4(%eax),%eax 10ece9: 31 f6 xor %esi,%esi 10eceb: 85 c0 test %eax,%eax 10eced: 74 0b je 10ecfa <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 10ecef: 83 ec 0c sub $0xc,%esp 10ecf2: 53 push %ebx 10ecf3: ff d0 call *%eax 10ecf5: 89 c6 mov %eax,%esi 10ecf7: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10ecfa: 8b 43 24 mov 0x24(%ebx),%eax 10ecfd: 85 c0 test %eax,%eax 10ecff: 74 13 je 10ed14 <== NEVER TAKEN 10ed01: 8b 40 1c mov 0x1c(%eax),%eax 10ed04: 85 c0 test %eax,%eax 10ed06: 74 0c je 10ed14 10ed08: 83 ec 0c sub $0xc,%esp 10ed0b: 8d 53 18 lea 0x18(%ebx),%edx 10ed0e: 52 push %edx 10ed0f: ff d0 call *%eax 10ed11: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10ed14: 83 ec 0c sub $0xc,%esp 10ed17: 53 push %ebx 10ed18: e8 fd 01 00 00 call 10ef1a return rc; 10ed1d: 89 f0 mov %esi,%eax 10ed1f: 83 c4 10 add $0x10,%esp } 10ed22: 8d 65 f8 lea -0x8(%ebp),%esp 10ed25: 5b pop %ebx 10ed26: 5e pop %esi 10ed27: c9 leave 10ed28: c3 ret =============================================================================== 0010d480 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d480: 55 push %ebp 10d481: 89 e5 mov %esp,%ebp 10d483: 83 ec 1c sub $0x1c,%esp 10d486: 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; 10d489: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d48c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d48f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d496: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d49d: 8d 55 ec lea -0x14(%ebp),%edx 10d4a0: 52 push %edx 10d4a1: ff 70 0c pushl 0xc(%eax) 10d4a4: ff 70 08 pushl 0x8(%eax) 10d4a7: e8 88 11 00 00 call 10e634 10d4ac: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d4ae: 83 c4 10 add $0x10,%esp 10d4b1: 31 c0 xor %eax,%eax 10d4b3: 85 d2 test %edx,%edx 10d4b5: 74 0c je 10d4c3 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10d4b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d4ba: 52 push %edx <== NOT EXECUTED 10d4bb: e8 c0 00 00 00 call 10d580 <== NOT EXECUTED 10d4c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d4c3: c9 leave 10d4c4: c3 ret =============================================================================== 0010d4d7 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d4d7: 55 push %ebp 10d4d8: 89 e5 mov %esp,%ebp 10d4da: 57 push %edi 10d4db: 56 push %esi 10d4dc: 53 push %ebx 10d4dd: 83 ec 1c sub $0x1c,%esp 10d4e0: 8b 4d 0c mov 0xc(%ebp),%ecx 10d4e3: 8b 5d 14 mov 0x14(%ebp),%ebx int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10d4e6: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10d4ed: 74 0d je 10d4fc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d4ef: e8 e0 21 00 00 call 10f6d4 <__errno> <== NOT EXECUTED 10d4f4: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10d4fa: eb 77 jmp 10d573 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10d4fc: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d4fe: 85 f6 test %esi,%esi 10d500: 74 04 je 10d506 <== NEVER TAKEN 10d502: 31 ff xor %edi,%edi 10d504: eb 5a jmp 10d560 rtems_set_errno_and_return_minus_one( EFAULT ); 10d506: e8 c9 21 00 00 call 10f6d4 <__errno> <== NOT EXECUTED 10d50b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d511: eb 60 jmp 10d573 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d513: 8b 16 mov (%esi),%edx 10d515: 85 d2 test %edx,%edx 10d517: 74 43 je 10d55c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d519: 50 push %eax 10d51a: 51 push %ecx 10d51b: 52 push %edx 10d51c: ff 75 08 pushl 0x8(%ebp) 10d51f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d522: 89 4d e0 mov %ecx,-0x20(%ebp) 10d525: e8 b2 2d 00 00 call 1102dc 10d52a: 83 c4 10 add $0x10,%esp 10d52d: 85 c0 test %eax,%eax 10d52f: 8b 55 e4 mov -0x1c(%ebp),%edx 10d532: 8b 4d e0 mov -0x20(%ebp),%ecx 10d535: 75 25 jne 10d55c <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d537: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d53b: 75 1f jne 10d55c <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d53d: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d53f: c7 43 08 68 ff 11 00 movl $0x11ff68,0x8(%ebx) pathloc->ops = &devFS_ops; 10d546: c7 43 0c 20 ff 11 00 movl $0x11ff20,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d54d: a1 c0 ff 11 00 mov 0x11ffc0,%eax 10d552: 8b 40 28 mov 0x28(%eax),%eax 10d555: 89 43 10 mov %eax,0x10(%ebx) 10d558: 31 c0 xor %eax,%eax return 0; 10d55a: eb 1a jmp 10d576 /* 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++) { 10d55c: 47 inc %edi 10d55d: 83 c6 14 add $0x14,%esi 10d560: 3b 3d 48 e1 11 00 cmp 0x11e148,%edi 10d566: 72 ab jb 10d513 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d568: e8 67 21 00 00 call 10f6d4 <__errno> 10d56d: c7 00 02 00 00 00 movl $0x2,(%eax) 10d573: 83 c8 ff or $0xffffffff,%eax } 10d576: 8d 65 f4 lea -0xc(%ebp),%esp 10d579: 5b pop %ebx 10d57a: 5e pop %esi 10d57b: 5f pop %edi 10d57c: c9 leave 10d57d: c3 ret =============================================================================== 00106d70 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 106d70: 55 push %ebp 106d71: 89 e5 mov %esp,%ebp 106d73: 57 push %edi 106d74: 53 push %ebx 106d75: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 106d78: 83 ec 0c sub $0xc,%esp 106d7b: 6b 05 48 e1 11 00 14 imul $0x14,0x11e148,%eax 106d82: 50 push %eax 106d83: e8 b4 62 00 00 call 10d03c <_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 3e 89 00 00 call 10f6d4 <__errno> <== NOT EXECUTED 106d96: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106d9c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106d9f: eb 20 jmp 106dc1 <== NOT EXECUTED memset( 106da1: 6b 0d 48 e1 11 00 14 imul $0x14,0x11e148,%ecx 106da8: 31 c0 xor %eax,%eax 106daa: 89 d7 mov %edx,%edi 106dac: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 106dae: c7 43 24 68 ff 11 00 movl $0x11ff68,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106db5: c7 43 28 20 ff 11 00 movl $0x11ff20,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 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 96 39 00 00 call 10a894 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 72 66 00 00 call 10d580 <== 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 c2 88 00 00 call 10f6d4 <__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 9d 88 00 00 call 10f6d4 <__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 5c 93 00 00 call 1101b4 <== 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 6a 88 00 00 call 10f6d4 <__errno> <== NOT EXECUTED 106e6a: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106e70: eb cb jmp 106e3d <== NOT EXECUTED 106e72: 89 de mov %ebx,%esi /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 106e74: 43 inc %ebx 106e75: 83 c2 14 add $0x14,%edx 106e78: 3b 1d 48 e1 11 00 cmp 0x11e148,%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 4a 88 00 00 call 10f6d4 <__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 2a 3a 00 00 call 10a96c 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 2a 66 00 00 call 10d580 <== 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 fc 39 00 00 call 10a99c <== 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 d0 65 00 00 call 10d580 <== 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 fc 86 00 00 call 10f6d4 <__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 8c 39 00 00 call 10a9cc 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 30 65 00 00 call 10d580 <== 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 =============================================================================== 00111840 : */ int device_close( rtems_libio_t *iop ) { 111840: 55 push %ebp 111841: 89 e5 mov %esp,%ebp 111843: 83 ec 1c sub $0x1c,%esp 111846: 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; 111849: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 11184c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 11184f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 111856: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 11185d: 8d 55 ec lea -0x14(%ebp),%edx 111860: 52 push %edx 111861: ff 70 54 pushl 0x54(%eax) 111864: ff 70 50 pushl 0x50(%eax) 111867: e8 70 0e 00 00 call 1126dc 11186c: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 11186e: 83 c4 10 add $0x10,%esp 111871: 31 c0 xor %eax,%eax 111873: 85 d2 test %edx,%edx 111875: 74 0c je 111883 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 111877: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11187a: 52 push %edx <== NOT EXECUTED 11187b: e8 a8 10 00 00 call 112928 <== NOT EXECUTED 111880: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 111883: c9 leave 111884: c3 ret =============================================================================== 0011173a : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 11173a: 55 push %ebp 11173b: 89 e5 mov %esp,%ebp 11173d: 83 ec 1c sub $0x1c,%esp 111740: 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; 111743: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 111746: 8b 55 0c mov 0xc(%ebp),%edx 111749: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 11174c: 8b 55 10 mov 0x10(%ebp),%edx 11174f: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 111752: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 111755: 8d 55 e8 lea -0x18(%ebp),%edx 111758: 52 push %edx 111759: ff 70 54 pushl 0x54(%eax) 11175c: ff 70 50 pushl 0x50(%eax) 11175f: e8 a8 0f 00 00 call 11270c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111764: 83 c4 10 add $0x10,%esp 111767: 85 c0 test %eax,%eax 111769: 74 0e je 111779 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 11176b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11176e: 50 push %eax <== NOT EXECUTED 11176f: e8 b4 11 00 00 call 112928 <== NOT EXECUTED 111774: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111777: eb 03 jmp 11177c <== NOT EXECUTED return args.ioctl_return; 111779: 8b 45 f4 mov -0xc(%ebp),%eax } 11177c: c9 leave 11177d: c3 ret =============================================================================== 00111885 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111885: 55 push %ebp 111886: 89 e5 mov %esp,%ebp 111888: 83 ec 1c sub $0x1c,%esp 11188b: 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; 11188e: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 111891: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 111894: 8b 40 14 mov 0x14(%eax),%eax 111897: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 11189a: 8b 45 14 mov 0x14(%ebp),%eax 11189d: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 1118a0: 8d 45 ec lea -0x14(%ebp),%eax 1118a3: 50 push %eax 1118a4: ff 72 54 pushl 0x54(%edx) 1118a7: ff 72 50 pushl 0x50(%edx) 1118aa: e8 8d 0e 00 00 call 11273c 1118af: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1118b1: 83 c4 10 add $0x10,%esp 1118b4: 31 c0 xor %eax,%eax 1118b6: 85 d2 test %edx,%edx 1118b8: 74 0c je 1118c6 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 1118ba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1118bd: 52 push %edx <== NOT EXECUTED 1118be: e8 65 10 00 00 call 112928 <== NOT EXECUTED 1118c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 1118c6: c9 leave 1118c7: c3 ret =============================================================================== 001117df : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1117df: 55 push %ebp <== NOT EXECUTED 1117e0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1117e2: 53 push %ebx <== NOT EXECUTED 1117e3: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 1117e6: 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; 1117e9: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 1117ec: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 1117ef: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 1117f2: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 1117f5: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1117f8: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 1117fb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1117fe: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 111801: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 111804: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 111807: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 11180a: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 11180d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 111814: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 111817: 50 push %eax <== NOT EXECUTED 111818: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 11181b: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 11181e: e8 49 0f 00 00 call 11276c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111823: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111826: 85 c0 test %eax,%eax <== NOT EXECUTED 111828: 74 0e je 111838 <== NOT EXECUTED return rtems_deviceio_errno(status); 11182a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11182d: 50 push %eax <== NOT EXECUTED 11182e: e8 f5 10 00 00 call 112928 <== NOT EXECUTED 111833: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111836: eb 03 jmp 11183b <== NOT EXECUTED return (ssize_t) args.bytes_moved; 111838: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 11183b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11183e: c9 leave <== NOT EXECUTED 11183f: c3 ret <== NOT EXECUTED =============================================================================== 0011177e : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 11177e: 55 push %ebp 11177f: 89 e5 mov %esp,%ebp 111781: 53 push %ebx 111782: 83 ec 28 sub $0x28,%esp 111785: 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; 111788: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 11178b: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 11178e: 8b 48 0c mov 0xc(%eax),%ecx 111791: 8b 58 10 mov 0x10(%eax),%ebx 111794: 89 4d e0 mov %ecx,-0x20(%ebp) 111797: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 11179a: 8b 4d 0c mov 0xc(%ebp),%ecx 11179d: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 1117a0: 8b 4d 10 mov 0x10(%ebp),%ecx 1117a3: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 1117a6: 8b 40 14 mov 0x14(%eax),%eax 1117a9: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 1117ac: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 1117b3: 8d 45 dc lea -0x24(%ebp),%eax 1117b6: 50 push %eax 1117b7: ff 72 54 pushl 0x54(%edx) 1117ba: ff 72 50 pushl 0x50(%edx) 1117bd: e8 da 0f 00 00 call 11279c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1117c2: 83 c4 10 add $0x10,%esp 1117c5: 85 c0 test %eax,%eax 1117c7: 74 0e je 1117d7 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 1117c9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1117cc: 50 push %eax <== NOT EXECUTED 1117cd: e8 56 11 00 00 call 112928 <== NOT EXECUTED 1117d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1117d5: eb 03 jmp 1117da <== NOT EXECUTED return (ssize_t) args.bytes_moved; 1117d7: 8b 45 f4 mov -0xc(%ebp),%eax } 1117da: 8b 5d fc mov -0x4(%ebp),%ebx 1117dd: c9 leave 1117de: c3 ret =============================================================================== 0010903a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10903a: 55 push %ebp 10903b: 89 e5 mov %esp,%ebp 10903d: 53 push %ebx 10903e: 83 ec 04 sub $0x4,%esp 109041: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 109043: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 10904a: 74 46 je 109092 rtems_interrupt_disable (level); 10904c: 9c pushf 10904d: fa cli 10904e: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10904f: eb 2f jmp 109080 tty->rawOutBufState = rob_wait; 109051: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109058: 00 00 00 rtems_interrupt_enable (level); 10905b: 50 push %eax 10905c: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10905d: 50 push %eax 10905e: 6a 00 push $0x0 109060: 6a 00 push $0x0 109062: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109068: e8 77 15 00 00 call 10a5e4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10906d: 83 c4 10 add $0x10,%esp 109070: 85 c0 test %eax,%eax 109072: 74 09 je 10907d <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 109074: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109077: 50 push %eax <== NOT EXECUTED 109078: e8 27 1b 00 00 call 10aba4 <== NOT EXECUTED rtems_interrupt_disable (level); 10907d: 9c pushf 10907e: fa cli 10907f: 58 pop %eax rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109080: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109086: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10908c: 39 d1 cmp %edx,%ecx 10908e: 75 c1 jne 109051 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 109090: 50 push %eax 109091: 9d popf } } 109092: 8b 5d fc mov -0x4(%ebp),%ebx 109095: c9 leave 109096: c3 ret =============================================================================== 00107cf0 : int dup2( int fildes, int fildes2 ) { 107cf0: 55 push %ebp 107cf1: 89 e5 mov %esp,%ebp 107cf3: 57 push %edi 107cf4: 56 push %esi 107cf5: 53 push %ebx 107cf6: 83 ec 64 sub $0x64,%esp 107cf9: 8b 5d 08 mov 0x8(%ebp),%ebx 107cfc: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107cff: 8d 7d a0 lea -0x60(%ebp),%edi 107d02: 57 push %edi 107d03: 53 push %ebx 107d04: e8 bf 04 00 00 call 1081c8 if ( status == -1 ) 107d09: 83 c4 10 add $0x10,%esp 107d0c: 40 inc %eax 107d0d: 74 1e je 107d2d <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107d0f: 52 push %edx 107d10: 52 push %edx 107d11: 57 push %edi 107d12: 56 push %esi 107d13: e8 b0 04 00 00 call 1081c8 if ( status == -1 ) 107d18: 83 c4 10 add $0x10,%esp 107d1b: 40 inc %eax 107d1c: 74 0f je 107d2d <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107d1e: 50 push %eax <== NOT EXECUTED 107d1f: 56 push %esi <== NOT EXECUTED 107d20: 6a 00 push $0x0 <== NOT EXECUTED 107d22: 53 push %ebx <== NOT EXECUTED 107d23: e8 c8 01 00 00 call 107ef0 <== NOT EXECUTED 107d28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d2b: eb 03 jmp 107d30 <== NOT EXECUTED 107d2d: 83 c8 ff or $0xffffffff,%eax } 107d30: 8d 65 f4 lea -0xc(%ebp),%esp 107d33: 5b pop %ebx 107d34: 5e pop %esi 107d35: 5f pop %edi 107d36: c9 leave 107d37: c3 ret =============================================================================== 00108c57 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108c57: 55 push %ebp <== NOT EXECUTED 108c58: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c5a: 53 push %ebx <== NOT EXECUTED 108c5b: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108c5e: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 108c62: 74 3e je 108ca2 <== NOT EXECUTED 108c64: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 108c67: 8b 1d 20 40 12 00 mov 0x124020,%ebx <== NOT EXECUTED 108c6d: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 108c72: 74 2e je 108ca2 <== NOT EXECUTED 108c74: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108c76: 74 2a je 108ca2 <== NOT EXECUTED 108c78: 3c 0a cmp $0xa,%al <== NOT EXECUTED 108c7a: 74 26 je 108ca2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 108c7c: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 108c80: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 108c83: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 108c86: 50 push %eax <== NOT EXECUTED 108c87: 52 push %edx <== NOT EXECUTED 108c88: 6a 02 push $0x2 <== NOT EXECUTED 108c8a: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 108c8d: 50 push %eax <== NOT EXECUTED 108c8e: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108c91: e8 83 fd ff ff call 108a19 <== NOT EXECUTED tty->column += 2; 108c96: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108c99: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108c9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108ca0: eb 08 jmp 108caa <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 108ca2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108ca5: e8 8f fe ff ff call 108b39 <== NOT EXECUTED } } 108caa: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108cad: c9 leave <== NOT EXECUTED 108cae: c3 ret <== NOT EXECUTED =============================================================================== 00107834 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 107834: 55 push %ebp <== NOT EXECUTED 107835: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107837: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 10783a: a1 9c 6e 12 00 mov 0x126e9c,%eax <== NOT EXECUTED 10783f: 85 c0 test %eax,%eax <== NOT EXECUTED 107841: 74 0c je 10784f <== NOT EXECUTED fclose(group_fp); 107843: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107846: 50 push %eax <== NOT EXECUTED 107847: e8 f0 bb 00 00 call 11343c <== NOT EXECUTED 10784c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10784f: c9 leave <== NOT EXECUTED 107850: c3 ret <== NOT EXECUTED =============================================================================== 00107851 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 107851: 55 push %ebp <== NOT EXECUTED 107852: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107854: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 107857: a1 b4 6d 12 00 mov 0x126db4,%eax <== NOT EXECUTED 10785c: 85 c0 test %eax,%eax <== NOT EXECUTED 10785e: 74 0c je 10786c <== NOT EXECUTED fclose(passwd_fp); 107860: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107863: 50 push %eax <== NOT EXECUTED 107864: e8 d3 bb 00 00 call 11343c <== NOT EXECUTED 107869: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10786c: c9 leave <== NOT EXECUTED 10786d: c3 ret <== NOT EXECUTED =============================================================================== 00108caf : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 108caf: 55 push %ebp <== NOT EXECUTED 108cb0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108cb2: 57 push %edi <== NOT EXECUTED 108cb3: 56 push %esi <== NOT EXECUTED 108cb4: 53 push %ebx <== NOT EXECUTED 108cb5: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 108cb8: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108cba: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 108cbd: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 108cc1: 0f 84 59 01 00 00 je 108e20 <== NOT EXECUTED return; if (lineFlag) { 108cc7: 85 d2 test %edx,%edx <== NOT EXECUTED 108cc9: 0f 84 46 01 00 00 je 108e15 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 108ccf: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 108cd2: a8 08 test $0x8,%al <== NOT EXECUTED 108cd4: 75 0c jne 108ce2 <== NOT EXECUTED tty->ccount = 0; 108cd6: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108cdd: e9 3e 01 00 00 jmp 108e20 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 108ce2: a8 10 test $0x10,%al <== NOT EXECUTED 108ce4: 0f 85 2b 01 00 00 jne 108e15 <== NOT EXECUTED tty->ccount = 0; 108cea: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108cf1: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 108cf5: 89 da mov %ebx,%edx <== NOT EXECUTED 108cf7: e8 5b ff ff ff call 108c57 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108cfc: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d00: 0f 84 1a 01 00 00 je 108e20 <== NOT EXECUTED echo ('\n', tty); 108d06: 89 da mov %ebx,%edx <== NOT EXECUTED 108d08: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d0d: eb 30 jmp 108d3f <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108d0f: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108d12: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 108d15: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108d18: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108d1c: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108d1f: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 108d25: 0f 84 e4 00 00 00 je 108e0f <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108d2b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108d2f: 75 1a jne 108d4b <== NOT EXECUTED 108d31: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 108d37: 75 12 jne 108d4b <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108d39: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108d3d: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108d3f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d42: 5b pop %ebx <== NOT EXECUTED 108d43: 5e pop %esi <== NOT EXECUTED 108d44: 5f pop %edi <== NOT EXECUTED 108d45: c9 leave <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 108d46: e9 0c ff ff ff jmp 108c57 <== NOT EXECUTED } else if (c == '\t') { 108d4b: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108d4e: 8b 0d 20 40 12 00 mov 0x124020,%ecx <== NOT EXECUTED 108d54: 75 5d jne 108db3 <== NOT EXECUTED int col = tty->read_start_column; 108d56: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108d59: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108d5e: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108d64: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 108d67: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d69: eb 27 jmp 108d92 <== NOT EXECUTED c = tty->cbuf[i++]; 108d6b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 108d6e: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 108d72: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108d74: 75 05 jne 108d7b <== NOT EXECUTED col = (col | 7) + 1; 108d76: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 108d79: eb 15 jmp 108d90 <== NOT EXECUTED } else if (iscntrl (c)) { 108d7b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108d7e: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 108d83: 74 0b je 108d90 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 108d85: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 108d89: 74 06 je 108d91 <== NOT EXECUTED col += 2; 108d8b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108d8e: eb 01 jmp 108d91 <== NOT EXECUTED } else { col++; 108d90: 46 inc %esi <== NOT EXECUTED 108d91: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d92: 39 fa cmp %edi,%edx <== NOT EXECUTED 108d94: 75 d5 jne 108d6b <== NOT EXECUTED 108d96: eb 14 jmp 108dac <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108d98: 57 push %edi <== NOT EXECUTED 108d99: 53 push %ebx <== NOT EXECUTED 108d9a: 6a 01 push $0x1 <== NOT EXECUTED 108d9c: 68 b4 00 12 00 push $0x1200b4 <== NOT EXECUTED 108da1: e8 73 fc ff ff call 108a19 <== NOT EXECUTED tty->column--; 108da6: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 108da9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 108dac: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 108daf: 7f e7 jg 108d98 <== NOT EXECUTED 108db1: eb 5c jmp 108e0f <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108db3: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 108db6: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 108dbb: 74 24 je 108de1 <== NOT EXECUTED 108dbd: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108dc3: 74 1c je 108de1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108dc5: 51 push %ecx <== NOT EXECUTED 108dc6: 53 push %ebx <== NOT EXECUTED 108dc7: 6a 03 push $0x3 <== NOT EXECUTED 108dc9: 68 b2 00 12 00 push $0x1200b2 <== NOT EXECUTED 108dce: e8 46 fc ff ff call 108a19 <== NOT EXECUTED if (tty->column) 108dd3: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108dd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108dd9: 85 c0 test %eax,%eax <== NOT EXECUTED 108ddb: 74 04 je 108de1 <== NOT EXECUTED tty->column--; 108ddd: 48 dec %eax <== NOT EXECUTED 108dde: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108de1: a1 20 40 12 00 mov 0x124020,%eax <== NOT EXECUTED 108de6: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 108deb: 74 06 je 108df3 <== NOT EXECUTED 108ded: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108df1: 74 1c je 108e0f <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108df3: 52 push %edx <== NOT EXECUTED 108df4: 53 push %ebx <== NOT EXECUTED 108df5: 6a 03 push $0x3 <== NOT EXECUTED 108df7: 68 b2 00 12 00 push $0x1200b2 <== NOT EXECUTED 108dfc: e8 18 fc ff ff call 108a19 <== NOT EXECUTED if (tty->column) 108e01: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108e04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e07: 85 c0 test %eax,%eax <== NOT EXECUTED 108e09: 74 04 je 108e0f <== NOT EXECUTED tty->column--; 108e0b: 48 dec %eax <== NOT EXECUTED 108e0c: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108e0f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108e13: 74 0b je 108e20 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 108e15: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108e18: 85 c0 test %eax,%eax <== NOT EXECUTED 108e1a: 0f 85 ef fe ff ff jne 108d0f <== NOT EXECUTED } } if (!lineFlag) break; } } 108e20: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108e23: 5b pop %ebx <== NOT EXECUTED 108e24: 5e pop %esi <== NOT EXECUTED 108e25: 5f pop %edi <== NOT EXECUTED 108e26: c9 leave <== NOT EXECUTED 108e27: c3 ret <== NOT EXECUTED =============================================================================== 00107ef0 : int fcntl( int fd, int cmd, ... ) { 107ef0: 55 push %ebp 107ef1: 89 e5 mov %esp,%ebp 107ef3: 57 push %edi 107ef4: 56 push %esi 107ef5: 53 push %ebx 107ef6: 83 ec 0c sub $0xc,%esp 107ef9: 8b 5d 08 mov 0x8(%ebp),%ebx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 107efc: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 107eff: 8b 0d a4 42 12 00 mov 0x1242a4,%ecx 107f05: 39 cb cmp %ecx,%ebx 107f07: 73 16 jae 107f1f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 107f09: a1 18 82 12 00 mov 0x128218,%eax 107f0e: c1 e3 06 shl $0x6,%ebx 107f11: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 107f14: 8b 73 14 mov 0x14(%ebx),%esi 107f17: f7 c6 00 01 00 00 test $0x100,%esi 107f1d: 75 10 jne 107f2f <== ALWAYS TAKEN 107f1f: e8 a8 b9 00 00 call 1138cc <__errno> <== NOT EXECUTED 107f24: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 107f2a: e9 fe 00 00 00 jmp 10802d <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 107f2f: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 107f33: 0f 87 c1 00 00 00 ja 107ffa 107f39: 8b 7d 0c mov 0xc(%ebp),%edi 107f3c: ff 24 bd d8 19 12 00 jmp *0x1219d8(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 107f43: 8b 32 mov (%edx),%esi if ( fd2 ) 107f45: 85 f6 test %esi,%esi 107f47: 74 10 je 107f59 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 107f49: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f4b: 39 ce cmp %ecx,%esi <== NOT EXECUTED 107f4d: 73 1c jae 107f6b <== NOT EXECUTED 107f4f: 89 f2 mov %esi,%edx <== NOT EXECUTED 107f51: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 107f54: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107f57: eb 12 jmp 107f6b <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 107f59: e8 b5 05 00 00 call 108513 107f5e: 89 c2 mov %eax,%edx if ( diop == 0 ) { 107f60: 83 ce ff or $0xffffffff,%esi 107f63: 85 c0 test %eax,%eax 107f65: 0f 84 c5 00 00 00 je 108030 <== NEVER TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 107f6b: 8b 43 3c mov 0x3c(%ebx),%eax 107f6e: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 107f71: 8b 43 38 mov 0x38(%ebx),%eax 107f74: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 107f77: 8b 43 14 mov 0x14(%ebx),%eax 107f7a: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 107f7d: 8d 7a 18 lea 0x18(%edx),%edi 107f80: 8d 73 18 lea 0x18(%ebx),%esi 107f83: b9 05 00 00 00 mov $0x5,%ecx 107f88: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 107f8a: 89 d6 mov %edx,%esi 107f8c: 2b 35 18 82 12 00 sub 0x128218,%esi 107f92: c1 fe 06 sar $0x6,%esi 107f95: eb 70 jmp 108007 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 107f97: c1 ee 0b shr $0xb,%esi 107f9a: 83 e6 01 and $0x1,%esi 107f9d: eb 6c jmp 10800b * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 107f9f: 83 3a 00 cmpl $0x0,(%edx) 107fa2: 74 08 je 107fac <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 107fa4: 81 ce 00 08 00 00 or $0x800,%esi 107faa: eb 06 jmp 107fb2 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 107fac: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 107fb2: 89 73 14 mov %esi,0x14(%ebx) 107fb5: 31 f6 xor %esi,%esi 107fb7: eb 52 jmp 10800b break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 107fb9: 83 ec 0c sub $0xc,%esp 107fbc: 56 push %esi 107fbd: e8 06 04 00 00 call 1083c8 107fc2: 89 c6 mov %eax,%esi 107fc4: 83 c4 10 add $0x10,%esp 107fc7: eb 3e jmp 108007 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 107fc9: 83 ec 0c sub $0xc,%esp 107fcc: ff 32 pushl (%edx) 107fce: e8 cb 05 00 00 call 10859e /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 107fd3: 25 01 02 00 00 and $0x201,%eax 107fd8: 8b 53 14 mov 0x14(%ebx),%edx 107fdb: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 107fe1: 09 d0 or %edx,%eax 107fe3: 89 43 14 mov %eax,0x14(%ebx) 107fe6: 31 f6 xor %esi,%esi 107fe8: 83 c4 10 add $0x10,%esp 107feb: eb 1e jmp 10800b errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 107fed: e8 da b8 00 00 call 1138cc <__errno> 107ff2: c7 00 86 00 00 00 movl $0x86,(%eax) 107ff8: eb 33 jmp 10802d ret = -1; break; default: errno = EINVAL; 107ffa: e8 cd b8 00 00 call 1138cc <__errno> 107fff: c7 00 16 00 00 00 movl $0x16,(%eax) 108005: eb 26 jmp 10802d /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 108007: 85 f6 test %esi,%esi 108009: 78 25 js 108030 <== NEVER TAKEN if (iop->handlers->fcntl_h) { 10800b: 8b 43 3c mov 0x3c(%ebx),%eax 10800e: 8b 40 30 mov 0x30(%eax),%eax 108011: 85 c0 test %eax,%eax 108013: 74 1b je 108030 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 108015: 52 push %edx 108016: 52 push %edx 108017: 53 push %ebx 108018: ff 75 0c pushl 0xc(%ebp) 10801b: ff d0 call *%eax 10801d: 89 c3 mov %eax,%ebx if (err) { 10801f: 83 c4 10 add $0x10,%esp 108022: 85 c0 test %eax,%eax 108024: 74 0a je 108030 <== ALWAYS TAKEN errno = err; 108026: e8 a1 b8 00 00 call 1138cc <__errno> <== NOT EXECUTED 10802b: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10802d: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 108030: 89 f0 mov %esi,%eax 108032: 8d 65 f4 lea -0xc(%ebp),%esp 108035: 5b pop %ebx 108036: 5e pop %esi 108037: 5f pop %edi 108038: c9 leave 108039: c3 ret =============================================================================== 00108058 : #include int fdatasync( int fd ) { 108058: 55 push %ebp 108059: 89 e5 mov %esp,%ebp 10805b: 83 ec 08 sub $0x8,%esp 10805e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108061: 3b 05 a4 42 12 00 cmp 0x1242a4,%eax 108067: 73 11 jae 10807a iop = rtems_libio_iop( fd ); 108069: c1 e0 06 shl $0x6,%eax 10806c: 03 05 18 82 12 00 add 0x128218,%eax rtems_libio_check_is_open(iop); 108072: 8b 50 14 mov 0x14(%eax),%edx 108075: f6 c6 01 test $0x1,%dh 108078: 75 0d jne 108087 <== ALWAYS TAKEN 10807a: e8 4d b8 00 00 call 1138cc <__errno> 10807f: c7 00 09 00 00 00 movl $0x9,(%eax) 108085: eb 2f jmp 1080b6 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108087: 80 e2 04 and $0x4,%dl 10808a: 75 0d jne 108099 10808c: e8 3b b8 00 00 call 1138cc <__errno> 108091: c7 00 16 00 00 00 movl $0x16,(%eax) 108097: eb 1d jmp 1080b6 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 108099: 8b 50 3c mov 0x3c(%eax),%edx 10809c: 8b 52 2c mov 0x2c(%edx),%edx 10809f: 85 d2 test %edx,%edx 1080a1: 75 0d jne 1080b0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1080a3: e8 24 b8 00 00 call 1138cc <__errno> 1080a8: c7 00 86 00 00 00 movl $0x86,(%eax) 1080ae: eb 06 jmp 1080b6 return (*iop->handlers->fdatasync_h)( iop ); 1080b0: 89 45 08 mov %eax,0x8(%ebp) } 1080b3: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 1080b4: ff e2 jmp *%edx } 1080b6: 83 c8 ff or $0xffffffff,%eax 1080b9: c9 leave 1080ba: c3 ret =============================================================================== 0010dc13 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10dc13: 55 push %ebp 10dc14: 89 e5 mov %esp,%ebp 10dc16: 57 push %edi 10dc17: 56 push %esi 10dc18: 53 push %ebx 10dc19: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10dc1c: 6a 00 push $0x0 10dc1e: 6a 00 push $0x0 10dc20: ff 35 b8 5e 12 00 pushl 0x125eb8 10dc26: e8 b9 c9 ff ff call 10a5e4 10dc2b: 89 c2 mov %eax,%edx 10dc2d: 83 c4 10 add $0x10,%esp 10dc30: be fc ff ff ff mov $0xfffffffc,%esi 10dc35: 85 c0 test %eax,%eax 10dc37: 0f 85 3e 03 00 00 jne 10df7b RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10dc3d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dc40: 8b 18 mov (%eax),%ebx <== NOT EXECUTED if (pipe == NULL) { 10dc42: 85 db test %ebx,%ebx <== NOT EXECUTED 10dc44: 0f 85 50 01 00 00 jne 10dd9a <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10dc4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc4d: 6a 34 push $0x34 <== NOT EXECUTED 10dc4f: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10dc52: e8 e5 9c ff ff call 10793c <== NOT EXECUTED 10dc57: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10dc59: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10dc5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc5e: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc60: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10dc63: 0f 84 2a 01 00 00 je 10dd93 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10dc69: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10dc6e: 89 c7 mov %eax,%edi <== NOT EXECUTED 10dc70: 89 d0 mov %edx,%eax <== NOT EXECUTED 10dc72: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10dc74: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10dc7b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc7e: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10dc83: e8 b4 9c ff ff call 10793c <== NOT EXECUTED 10dc88: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10dc8a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc8d: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc8f: 0f 84 f2 00 00 00 je 10dd87 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10dc95: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10dc98: 50 push %eax <== NOT EXECUTED 10dc99: 6a 00 push $0x0 <== NOT EXECUTED 10dc9b: 6a 00 push $0x0 <== NOT EXECUTED 10dc9d: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dca4: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10dca9: 50 push %eax <== NOT EXECUTED 10dcaa: e8 a9 1c 00 00 call 10f958 <== NOT EXECUTED 10dcaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dcb2: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcb4: 0f 85 c0 00 00 00 jne 10dd7a <== 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( 10dcba: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10dcbd: 50 push %eax <== NOT EXECUTED 10dcbe: 6a 00 push $0x0 <== NOT EXECUTED 10dcc0: 6a 00 push $0x0 <== NOT EXECUTED 10dcc2: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dcc9: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10dcce: 50 push %eax <== NOT EXECUTED 10dccf: e8 84 1c 00 00 call 10f958 <== NOT EXECUTED 10dcd4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dcd7: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcd9: 0f 85 8d 00 00 00 jne 10dd6c <== 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( 10dcdf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dce2: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10dce5: 50 push %eax <== NOT EXECUTED 10dce6: 6a 00 push $0x0 <== NOT EXECUTED 10dce8: 6a 10 push $0x10 <== NOT EXECUTED 10dcea: 6a 01 push $0x1 <== NOT EXECUTED 10dcec: 0f be 05 78 3f 12 00 movsbl 0x123f78,%eax <== NOT EXECUTED 10dcf3: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10dcf8: 50 push %eax <== NOT EXECUTED 10dcf9: e8 ba c6 ff ff call 10a3b8 <== NOT EXECUTED 10dcfe: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10dd01: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd03: 75 59 jne 10dd5e <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10dd05: 52 push %edx <== NOT EXECUTED 10dd06: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10dd09: 56 push %esi <== NOT EXECUTED 10dd0a: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dd0d: 68 08 6b 12 00 push $0x126b08 <== NOT EXECUTED 10dd12: e8 15 de ff ff call 10bb2c <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 10dd17: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10dd1e: e8 fa e5 ff ff call 10c31d <_Thread_Enable_dispatch><== NOT EXECUTED 10dd23: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10dd26: 56 push %esi <== NOT EXECUTED 10dd27: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd2a: 68 08 6b 12 00 push $0x126b08 <== NOT EXECUTED 10dd2f: e8 f8 dd ff ff call 10bb2c <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 10dd34: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10dd3b: e8 dd e5 ff ff call 10c31d <_Thread_Enable_dispatch><== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10dd40: a0 78 3f 12 00 mov 0x123f78,%al <== NOT EXECUTED 10dd45: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dd48: 88 15 78 3f 12 00 mov %dl,0x123f78 <== NOT EXECUTED 10dd4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd51: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10dd53: 75 45 jne 10dd9a <== NOT EXECUTED c = 'a'; 10dd55: c6 05 78 3f 12 00 61 movb $0x61,0x123f78 <== NOT EXECUTED 10dd5c: eb 3c jmp 10dd9a <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10dd5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd61: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd64: e8 a7 1c 00 00 call 10fa10 <== NOT EXECUTED 10dd69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10dd6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd6f: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 10dd72: e8 99 1c 00 00 call 10fa10 <== NOT EXECUTED 10dd77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10dd7a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd7d: ff 36 pushl (%esi) <== NOT EXECUTED 10dd7f: e8 18 99 ff ff call 10769c <== NOT EXECUTED 10dd84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10dd87: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd8a: 56 push %esi <== NOT EXECUTED 10dd8b: e8 0c 99 ff ff call 10769c <== NOT EXECUTED 10dd90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd93: be f4 ff ff ff mov $0xfffffff4,%esi <== NOT EXECUTED 10dd98: eb 34 jmp 10ddce <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10dd9a: 50 push %eax <== NOT EXECUTED 10dd9b: 6a 00 push $0x0 <== NOT EXECUTED 10dd9d: 6a 00 push $0x0 <== NOT EXECUTED 10dd9f: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dda2: e8 3d c8 ff ff call 10a5e4 <== NOT EXECUTED 10dda7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ddaa: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10ddad: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10ddaf: f7 d6 not %esi <== NOT EXECUTED 10ddb1: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10ddb4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ddb7: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10ddba: 75 12 jne 10ddce <== NOT EXECUTED if (err) 10ddbc: 85 f6 test %esi,%esi <== NOT EXECUTED 10ddbe: 74 09 je 10ddc9 <== NOT EXECUTED pipe_free(pipe); 10ddc0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ddc2: e8 41 fd ff ff call 10db08 <== NOT EXECUTED 10ddc7: eb 05 jmp 10ddce <== NOT EXECUTED else *pipep = pipe; 10ddc9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10ddcc: 89 18 mov %ebx,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10ddce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddd1: ff 35 b8 5e 12 00 pushl 0x125eb8 <== NOT EXECUTED 10ddd7: e8 f4 c8 ff ff call 10a6d0 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10dddc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dddf: 85 f6 test %esi,%esi <== NOT EXECUTED 10dde1: 0f 85 94 01 00 00 jne 10df7b <== NOT EXECUTED return err; pipe = *pipep; 10dde7: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ddea: 8b 1a mov (%edx),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10ddec: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10ddef: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10ddf2: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10ddf5: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10ddf8: 0f 84 91 00 00 00 je 10de8f <== NOT EXECUTED 10ddfe: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10de01: 0f 84 10 01 00 00 je 10df17 <== NOT EXECUTED 10de07: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10de0a: 0f 85 49 01 00 00 jne 10df59 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10de10: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10de13: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10de16: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10de19: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10de1c: 85 c0 test %eax,%eax <== NOT EXECUTED 10de1e: 75 11 jne 10de31 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10de20: 57 push %edi <== NOT EXECUTED 10de21: 57 push %edi <== NOT EXECUTED 10de22: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10de25: 50 push %eax <== NOT EXECUTED 10de26: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10de29: e8 6a 1c 00 00 call 10fa98 <== NOT EXECUTED 10de2e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10de31: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10de35: 0f 85 1e 01 00 00 jne 10df59 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10de3b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10de3e: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10de42: 0f 85 11 01 00 00 jne 10df59 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10de48: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10de4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10de4e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10de51: e8 7a c8 ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10de56: 5a pop %edx <== NOT EXECUTED 10de57: 59 pop %ecx <== NOT EXECUTED 10de58: 6a 00 push $0x0 <== NOT EXECUTED 10de5a: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10de5d: e8 8e 1c 00 00 call 10faf0 <== NOT EXECUTED 10de62: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10de65: 85 c0 test %eax,%eax <== NOT EXECUTED 10de67: 0f 85 f9 00 00 00 jne 10df66 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10de6d: 50 push %eax <== NOT EXECUTED 10de6e: 6a 00 push $0x0 <== NOT EXECUTED 10de70: 6a 00 push $0x0 <== NOT EXECUTED 10de72: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10de75: e8 6a c7 ff ff call 10a5e4 <== NOT EXECUTED 10de7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10de7d: 85 c0 test %eax,%eax <== NOT EXECUTED 10de7f: 0f 85 e1 00 00 00 jne 10df66 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10de85: 3b 7b 24 cmp 0x24(%ebx),%edi <== NOT EXECUTED 10de88: 74 c1 je 10de4b <== NOT EXECUTED 10de8a: e9 ca 00 00 00 jmp 10df59 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10de8f: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10de92: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10de95: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10de98: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10de9b: 85 c0 test %eax,%eax <== NOT EXECUTED 10de9d: 75 11 jne 10deb0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10de9f: 57 push %edi <== NOT EXECUTED 10dea0: 57 push %edi <== NOT EXECUTED 10dea1: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dea4: 50 push %eax <== NOT EXECUTED 10dea5: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dea8: e8 eb 1b 00 00 call 10fa98 <== NOT EXECUTED 10dead: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10deb0: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10deb4: 0f 85 9f 00 00 00 jne 10df59 <== NOT EXECUTED 10deba: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10debd: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10dec1: 74 18 je 10dedb <== NOT EXECUTED PIPE_UNLOCK(pipe); 10dec3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dec6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dec9: e8 02 c8 ff ff call 10a6d0 <== NOT EXECUTED 10dece: be fa ff ff ff mov $0xfffffffa,%esi <== NOT EXECUTED err = -ENXIO; goto out_error; 10ded3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ded6: e9 90 00 00 00 jmp 10df6b <== NOT EXECUTED } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10dedb: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10dede: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dee1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dee4: e8 e7 c7 ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10dee9: 5a pop %edx <== NOT EXECUTED 10deea: 59 pop %ecx <== NOT EXECUTED 10deeb: 6a 00 push $0x0 <== NOT EXECUTED 10deed: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10def0: e8 fb 1b 00 00 call 10faf0 <== NOT EXECUTED 10def5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10def8: 85 c0 test %eax,%eax <== NOT EXECUTED 10defa: 75 6a jne 10df66 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10defc: 50 push %eax <== NOT EXECUTED 10defd: 6a 00 push $0x0 <== NOT EXECUTED 10deff: 6a 00 push $0x0 <== NOT EXECUTED 10df01: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10df04: e8 db c6 ff ff call 10a5e4 <== NOT EXECUTED 10df09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10df0c: 85 c0 test %eax,%eax <== NOT EXECUTED 10df0e: 75 56 jne 10df66 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10df10: 3b 7b 20 cmp 0x20(%ebx),%edi <== NOT EXECUTED 10df13: 74 c9 je 10dede <== NOT EXECUTED 10df15: eb 42 jmp 10df59 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10df17: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10df1a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10df1d: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10df20: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10df23: 85 c0 test %eax,%eax <== NOT EXECUTED 10df25: 75 11 jne 10df38 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10df27: 57 push %edi <== NOT EXECUTED 10df28: 57 push %edi <== NOT EXECUTED 10df29: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10df2c: 50 push %eax <== NOT EXECUTED 10df2d: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10df30: e8 63 1b 00 00 call 10fa98 <== NOT EXECUTED 10df35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10df38: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10df3b: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10df3e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10df41: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10df44: 85 c0 test %eax,%eax <== NOT EXECUTED 10df46: 75 11 jne 10df59 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10df48: 51 push %ecx <== NOT EXECUTED 10df49: 51 push %ecx <== NOT EXECUTED 10df4a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10df4d: 50 push %eax <== NOT EXECUTED 10df4e: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10df51: e8 42 1b 00 00 call 10fa98 <== NOT EXECUTED 10df56: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10df59: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10df5c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10df5f: e8 6c c7 ff ff call 10a6d0 <== NOT EXECUTED 10df64: eb 12 jmp 10df78 <== NOT EXECUTED return 0; 10df66: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10df6b: 52 push %edx <== NOT EXECUTED 10df6c: 52 push %edx <== NOT EXECUTED 10df6d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10df70: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10df73: e8 cb fb ff ff call 10db43 <== NOT EXECUTED return err; 10df78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10df7b: 89 f0 mov %esi,%eax 10df7d: 8d 65 f4 lea -0xc(%ebp),%esp 10df80: 5b pop %ebx 10df81: 5e pop %esi 10df82: 5f pop %edi 10df83: c9 leave 10df84: c3 ret =============================================================================== 001080bc : long fpathconf( int fd, int name ) { 1080bc: 55 push %ebp 1080bd: 89 e5 mov %esp,%ebp 1080bf: 83 ec 08 sub $0x8,%esp 1080c2: 8b 45 08 mov 0x8(%ebp),%eax 1080c5: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 1080c8: 3b 05 a4 42 12 00 cmp 0x1242a4,%eax 1080ce: 73 11 jae 1080e1 iop = rtems_libio_iop(fd); 1080d0: c1 e0 06 shl $0x6,%eax 1080d3: 03 05 18 82 12 00 add 0x128218,%eax rtems_libio_check_is_open(iop); 1080d9: 8b 48 14 mov 0x14(%eax),%ecx 1080dc: f6 c5 01 test $0x1,%ch 1080df: 75 0d jne 1080ee <== ALWAYS TAKEN 1080e1: e8 e6 b7 00 00 call 1138cc <__errno> 1080e6: c7 00 09 00 00 00 movl $0x9,(%eax) 1080ec: eb 5b jmp 108149 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 1080ee: 80 e1 02 and $0x2,%cl 1080f1: 74 4b je 10813e <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1080f3: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1080f6: 83 fa 0b cmp $0xb,%edx 1080f9: 77 43 ja 10813e 1080fb: ff 24 95 00 1a 12 00 jmp *0x121a00(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 108102: 8b 40 38 mov 0x38(%eax),%eax break; 108105: eb 45 jmp 10814c case _PC_MAX_CANON: return_value = the_limits->max_canon; 108107: 8b 40 3c mov 0x3c(%eax),%eax break; 10810a: eb 40 jmp 10814c case _PC_MAX_INPUT: return_value = the_limits->max_input; 10810c: 8b 40 40 mov 0x40(%eax),%eax break; 10810f: eb 3b jmp 10814c case _PC_NAME_MAX: return_value = the_limits->name_max; 108111: 8b 40 44 mov 0x44(%eax),%eax break; 108114: eb 36 jmp 10814c case _PC_PATH_MAX: return_value = the_limits->path_max; 108116: 8b 40 48 mov 0x48(%eax),%eax break; 108119: eb 31 jmp 10814c case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10811b: 8b 40 4c mov 0x4c(%eax),%eax break; 10811e: eb 2c jmp 10814c case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108120: 8b 40 54 mov 0x54(%eax),%eax break; 108123: eb 27 jmp 10814c case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 108125: 8b 40 58 mov 0x58(%eax),%eax break; 108128: eb 22 jmp 10814c case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 10812a: 8b 40 64 mov 0x64(%eax),%eax break; 10812d: eb 1d jmp 10814c case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10812f: 8b 40 50 mov 0x50(%eax),%eax break; 108132: eb 18 jmp 10814c case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108134: 8b 40 5c mov 0x5c(%eax),%eax break; 108137: eb 13 jmp 10814c case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 108139: 8b 40 60 mov 0x60(%eax),%eax break; 10813c: eb 0e jmp 10814c default: rtems_set_errno_and_return_minus_one( EINVAL ); 10813e: e8 89 b7 00 00 call 1138cc <__errno> 108143: c7 00 16 00 00 00 movl $0x16,(%eax) 108149: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 10814c: c9 leave 10814d: c3 ret =============================================================================== 0010769c : void free( void *ptr ) { MSBUMP(free_calls, 1); 10769c: 55 push %ebp 10769d: 89 e5 mov %esp,%ebp 10769f: 53 push %ebx 1076a0: 83 ec 04 sub $0x4,%esp 1076a3: 8b 5d 08 mov 0x8(%ebp),%ebx 1076a6: ff 05 dc 60 12 00 incl 0x1260dc if ( !ptr ) 1076ac: 85 db test %ebx,%ebx 1076ae: 74 5f je 10770f /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1076b0: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 1076b7: 75 15 jne 1076ce <== NEVER TAKEN 1076b9: e8 56 01 00 00 call 107814 1076be: 84 c0 test %al,%al 1076c0: 75 0c jne 1076ce <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c2: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1076c5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1076c8: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c9: e9 84 01 00 00 jmp 107852 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1076ce: a1 30 45 12 00 mov 0x124530,%eax 1076d3: 85 c0 test %eax,%eax 1076d5: 74 0a je 1076e1 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 1076d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1076da: 53 push %ebx <== NOT EXECUTED 1076db: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 1076de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1076e1: 50 push %eax 1076e2: 50 push %eax 1076e3: 53 push %ebx 1076e4: ff 35 50 21 12 00 pushl 0x122150 1076ea: e8 05 47 00 00 call 10bdf4 <_Protected_heap_Free> 1076ef: 83 c4 10 add $0x10,%esp 1076f2: 84 c0 test %al,%al 1076f4: 75 19 jne 10770f <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1076f6: a1 50 21 12 00 mov 0x122150,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1076fb: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1076fe: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107701: 53 push %ebx <== NOT EXECUTED 107702: 68 47 00 12 00 push $0x120047 <== NOT EXECUTED 107707: e8 68 0c 00 00 call 108374 <== NOT EXECUTED 10770c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10770f: 8b 5d fc mov -0x4(%ebp),%ebx 107712: c9 leave 107713: c3 ret =============================================================================== 001088d4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1088d4: 55 push %ebp <== NOT EXECUTED 1088d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1088d7: 53 push %ebx <== NOT EXECUTED 1088d8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1088db: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1088de: 81 fb e8 60 12 00 cmp $0x1260e8,%ebx <== NOT EXECUTED 1088e4: 74 40 je 108926 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1088e6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 1088e9: 85 c0 test %eax,%eax <== NOT EXECUTED 1088eb: 74 13 je 108900 <== NOT EXECUTED 1088ed: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1088f0: 85 c0 test %eax,%eax <== NOT EXECUTED 1088f2: 74 0c je 108900 <== NOT EXECUTED 1088f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088f7: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 1088fa: 52 push %edx <== NOT EXECUTED 1088fb: ff d0 call *%eax <== NOT EXECUTED 1088fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 108900: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 108903: 85 c0 test %eax,%eax <== NOT EXECUTED 108905: 74 13 je 10891a <== NOT EXECUTED 108907: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10890a: 85 c0 test %eax,%eax <== NOT EXECUTED 10890c: 74 0c je 10891a <== NOT EXECUTED 10890e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108911: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 108914: 52 push %edx <== NOT EXECUTED 108915: ff d0 call *%eax <== NOT EXECUTED 108917: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 10891a: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 10891d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108920: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 108921: e9 b2 f0 ff ff jmp 1079d8 <== NOT EXECUTED } } 108926: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108929: c9 leave <== NOT EXECUTED 10892a: c3 ret <== NOT EXECUTED =============================================================================== 0011dfd4 : int fstat( int fd, struct stat *sbuf ) { 11dfd4: 55 push %ebp 11dfd5: 89 e5 mov %esp,%ebp 11dfd7: 57 push %edi 11dfd8: 53 push %ebx 11dfd9: 8b 55 08 mov 0x8(%ebp),%edx 11dfdc: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11dfdf: 85 db test %ebx,%ebx 11dfe1: 75 0d jne 11dff0 rtems_set_errno_and_return_minus_one( EFAULT ); 11dfe3: e8 38 4a ff ff call 112a20 <__errno> 11dfe8: c7 00 0e 00 00 00 movl $0xe,(%eax) 11dfee: eb 5d jmp 11e04d /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11dff0: 3b 15 44 21 12 00 cmp 0x122144,%edx 11dff6: 73 16 jae 11e00e 11dff8: c1 e2 06 shl $0x6,%edx 11dffb: 03 15 b8 60 12 00 add 0x1260b8,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11e001: f6 42 15 01 testb $0x1,0x15(%edx) 11e005: 74 07 je 11e00e <== NEVER TAKEN if ( !iop->handlers ) 11e007: 8b 42 3c mov 0x3c(%edx),%eax 11e00a: 85 c0 test %eax,%eax 11e00c: 75 0d jne 11e01b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11e00e: e8 0d 4a ff ff call 112a20 <__errno> 11e013: c7 00 09 00 00 00 movl $0x9,(%eax) 11e019: eb 32 jmp 11e04d if ( !iop->handlers->fstat_h ) 11e01b: 83 78 18 00 cmpl $0x0,0x18(%eax) 11e01f: 75 0d jne 11e02e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e021: e8 fa 49 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e026: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e02c: eb 1f jmp 11e04d <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11e02e: b9 12 00 00 00 mov $0x12,%ecx 11e033: 31 c0 xor %eax,%eax 11e035: 89 df mov %ebx,%edi 11e037: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11e039: 8b 42 3c mov 0x3c(%edx),%eax 11e03c: 89 5d 0c mov %ebx,0xc(%ebp) 11e03f: 83 c2 18 add $0x18,%edx 11e042: 89 55 08 mov %edx,0x8(%ebp) 11e045: 8b 40 18 mov 0x18(%eax),%eax } 11e048: 5b pop %ebx 11e049: 5f pop %edi 11e04a: 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 ); 11e04b: ff e0 jmp *%eax } 11e04d: 83 c8 ff or $0xffffffff,%eax 11e050: 5b pop %ebx 11e051: 5f pop %edi 11e052: c9 leave 11e053: c3 ret =============================================================================== 00108260 : #include int fsync( int fd ) { 108260: 55 push %ebp 108261: 89 e5 mov %esp,%ebp 108263: 83 ec 08 sub $0x8,%esp 108266: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108269: 3b 05 a4 42 12 00 cmp 0x1242a4,%eax 10826f: 73 2a jae 10829b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108271: c1 e0 06 shl $0x6,%eax 108274: 03 05 18 82 12 00 add 0x128218,%eax rtems_libio_check_is_open(iop); 10827a: 8b 50 14 mov 0x14(%eax),%edx 10827d: f6 c6 01 test $0x1,%dh 108280: 74 19 je 10829b <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108282: 80 e2 04 and $0x4,%dl 108285: 75 0d jne 108294 108287: e8 40 b6 00 00 call 1138cc <__errno> 10828c: c7 00 16 00 00 00 movl $0x16,(%eax) 108292: eb 2e jmp 1082c2 /* * Now process the fsync(). */ if ( !iop->handlers ) 108294: 8b 50 3c mov 0x3c(%eax),%edx 108297: 85 d2 test %edx,%edx 108299: 75 0d jne 1082a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10829b: e8 2c b6 00 00 call 1138cc <__errno> <== NOT EXECUTED 1082a0: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1082a6: eb 1a jmp 1082c2 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 1082a8: 8b 52 28 mov 0x28(%edx),%edx 1082ab: 85 d2 test %edx,%edx 1082ad: 75 0d jne 1082bc rtems_set_errno_and_return_minus_one( ENOTSUP ); 1082af: e8 18 b6 00 00 call 1138cc <__errno> 1082b4: c7 00 86 00 00 00 movl $0x86,(%eax) 1082ba: eb 06 jmp 1082c2 return (*iop->handlers->fsync_h)( iop ); 1082bc: 89 45 08 mov %eax,0x8(%ebp) } 1082bf: c9 leave rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1082c0: ff e2 jmp *%edx } 1082c2: 83 c8 ff or $0xffffffff,%eax 1082c5: c9 leave 1082c6: c3 ret =============================================================================== 0010ed3c : int ftruncate( int fd, off_t length ) { 10ed3c: 55 push %ebp 10ed3d: 89 e5 mov %esp,%ebp 10ed3f: 57 push %edi 10ed40: 56 push %esi 10ed41: 53 push %ebx 10ed42: 83 ec 3c sub $0x3c,%esp 10ed45: 8b 5d 08 mov 0x8(%ebp),%ebx 10ed48: 8b 45 0c mov 0xc(%ebp),%eax 10ed4b: 8b 55 10 mov 0x10(%ebp),%edx 10ed4e: 89 45 c0 mov %eax,-0x40(%ebp) 10ed51: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10ed54: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 10ed5a: 73 0f jae 10ed6b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10ed5c: c1 e3 06 shl $0x6,%ebx 10ed5f: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 10ed65: f6 43 15 01 testb $0x1,0x15(%ebx) 10ed69: 75 0d jne 10ed78 <== ALWAYS TAKEN 10ed6b: e8 b0 3c 00 00 call 112a20 <__errno> <== NOT EXECUTED 10ed70: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10ed76: eb 5b jmp 10edd3 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10ed78: 8d 7d d4 lea -0x2c(%ebp),%edi 10ed7b: 8d 73 18 lea 0x18(%ebx),%esi 10ed7e: b9 05 00 00 00 mov $0x5,%ecx 10ed83: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10ed85: 8b 45 e0 mov -0x20(%ebp),%eax 10ed88: 8b 40 10 mov 0x10(%eax),%eax 10ed8b: 85 c0 test %eax,%eax 10ed8d: 74 39 je 10edc8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10ed8f: 83 ec 0c sub $0xc,%esp 10ed92: 8d 55 d4 lea -0x2c(%ebp),%edx 10ed95: 52 push %edx 10ed96: ff d0 call *%eax 10ed98: 83 c4 10 add $0x10,%esp 10ed9b: 48 dec %eax 10ed9c: 75 0d jne 10edab rtems_set_errno_and_return_minus_one( EISDIR ); 10ed9e: e8 7d 3c 00 00 call 112a20 <__errno> 10eda3: c7 00 15 00 00 00 movl $0x15,(%eax) 10eda9: eb 28 jmp 10edd3 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10edab: f6 43 14 04 testb $0x4,0x14(%ebx) 10edaf: 75 0d jne 10edbe <== ALWAYS TAKEN 10edb1: e8 6a 3c 00 00 call 112a20 <__errno> <== NOT EXECUTED 10edb6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10edbc: eb 15 jmp 10edd3 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10edbe: 8b 43 3c mov 0x3c(%ebx),%eax 10edc1: 8b 40 20 mov 0x20(%eax),%eax 10edc4: 85 c0 test %eax,%eax 10edc6: 75 10 jne 10edd8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10edc8: e8 53 3c 00 00 call 112a20 <__errno> <== NOT EXECUTED 10edcd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10edd3: 83 c8 ff or $0xffffffff,%eax 10edd6: eb 0d jmp 10ede5 return (*iop->handlers->ftruncate_h)( iop, length ); 10edd8: 52 push %edx 10edd9: ff 75 c4 pushl -0x3c(%ebp) 10eddc: ff 75 c0 pushl -0x40(%ebp) 10eddf: 53 push %ebx 10ede0: ff d0 call *%eax 10ede2: 83 c4 10 add $0x10,%esp } 10ede5: 8d 65 f4 lea -0xc(%ebp),%esp 10ede8: 5b pop %ebx 10ede9: 5e pop %esi 10edea: 5f pop %edi 10edeb: c9 leave 10edec: c3 ret =============================================================================== 0011fa24 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11fa24: 55 push %ebp 11fa25: 89 e5 mov %esp,%ebp 11fa27: 57 push %edi 11fa28: 56 push %esi 11fa29: 53 push %ebx 11fa2a: 83 ec 2c sub $0x2c,%esp 11fa2d: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 11fa30: 31 db xor %ebx,%ebx 11fa32: 3b 05 44 51 12 00 cmp 0x125144,%eax 11fa38: 73 0b jae 11fa45 <== NEVER TAKEN 11fa3a: 89 c3 mov %eax,%ebx 11fa3c: c1 e3 06 shl $0x6,%ebx 11fa3f: 03 1d e0 91 12 00 add 0x1291e0,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11fa45: 8d 7d d4 lea -0x2c(%ebp),%edi 11fa48: 8d 73 18 lea 0x18(%ebx),%esi 11fa4b: b9 05 00 00 00 mov $0x5,%ecx 11fa50: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 11fa52: 8b 45 e0 mov -0x20(%ebp),%eax 11fa55: 8b 40 10 mov 0x10(%eax),%eax 11fa58: 85 c0 test %eax,%eax 11fa5a: 74 29 je 11fa85 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11fa5c: 83 ec 0c sub $0xc,%esp 11fa5f: 8d 55 d4 lea -0x2c(%ebp),%edx 11fa62: 52 push %edx 11fa63: ff d0 call *%eax 11fa65: 83 c4 10 add $0x10,%esp 11fa68: 48 dec %eax 11fa69: 74 10 je 11fa7b rtems_set_errno_and_return_minus_one( ENOTDIR ); 11fa6b: e8 dc 40 ff ff call 113b4c <__errno> 11fa70: c7 00 14 00 00 00 movl $0x14,(%eax) 11fa76: 83 c8 ff or $0xffffffff,%eax 11fa79: eb 24 jmp 11fa9f /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 11fa7b: 8b 43 3c mov 0x3c(%ebx),%eax 11fa7e: 8b 40 08 mov 0x8(%eax),%eax 11fa81: 85 c0 test %eax,%eax 11fa83: 75 0d jne 11fa92 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11fa85: e8 c2 40 ff ff call 113b4c <__errno> 11fa8a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11fa90: eb e4 jmp 11fa76 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 11fa92: 52 push %edx 11fa93: ff 75 10 pushl 0x10(%ebp) 11fa96: ff 75 0c pushl 0xc(%ebp) 11fa99: 53 push %ebx 11fa9a: ff d0 call *%eax 11fa9c: 83 c4 10 add $0x10,%esp } 11fa9f: 8d 65 f4 lea -0xc(%ebp),%esp 11faa2: 5b pop %ebx 11faa3: 5e pop %esi 11faa4: 5f pop %edi 11faa5: c9 leave 11faa6: c3 ret =============================================================================== 00107d1e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107d1e: 55 push %ebp 107d1f: 89 e5 mov %esp,%ebp 107d21: 57 push %edi 107d22: 56 push %esi 107d23: 53 push %ebx 107d24: 83 ec 1c sub $0x1c,%esp 107d27: 89 c7 mov %eax,%edi 107d29: 89 55 e4 mov %edx,-0x1c(%ebp) 107d2c: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107d2e: e8 df fe ff ff call 107c12 if ((fp = fopen("/etc/group", "r")) == NULL) { 107d33: 53 push %ebx 107d34: 53 push %ebx 107d35: 68 53 01 12 00 push $0x120153 107d3a: 68 7b 14 12 00 push $0x12147b 107d3f: e8 5c bd 00 00 call 113aa0 107d44: 89 c3 mov %eax,%ebx 107d46: 83 c4 10 add $0x10,%esp 107d49: 85 c0 test %eax,%eax 107d4b: 75 10 jne 107d5d <== ALWAYS TAKEN errno = EINVAL; 107d4d: e8 9e b5 00 00 call 1132f0 <__errno> <== NOT EXECUTED 107d52: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d58: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107d5b: eb 6b jmp 107dc8 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 107d5d: 83 ec 0c sub $0xc,%esp 107d60: ff 75 0c pushl 0xc(%ebp) 107d63: 8b 4d 08 mov 0x8(%ebp),%ecx 107d66: 89 f2 mov %esi,%edx 107d68: 89 d8 mov %ebx,%eax 107d6a: e8 39 fc ff ff call 1079a8 107d6f: 83 c4 10 add $0x10,%esp 107d72: 85 c0 test %eax,%eax 107d74: 75 19 jne 107d8f <== ALWAYS TAKEN errno = EINVAL; 107d76: e8 75 b5 00 00 call 1132f0 <__errno> <== NOT EXECUTED 107d7b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107d81: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d84: 53 push %ebx <== NOT EXECUTED 107d85: e8 b2 b6 00 00 call 11343c <== NOT EXECUTED 107d8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d8d: eb 36 jmp 107dc5 <== NOT EXECUTED return -1; } if (name) { 107d8f: 85 ff test %edi,%edi 107d91: 74 11 je 107da4 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 107d93: 51 push %ecx 107d94: 51 push %ecx 107d95: 57 push %edi 107d96: ff 36 pushl (%esi) 107d98: e8 c3 d0 00 00 call 114e60 107d9d: 83 c4 10 add $0x10,%esp 107da0: 85 c0 test %eax,%eax 107da2: eb 07 jmp 107dab } else { match = (grp->gr_gid == gid); 107da4: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107da8: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107dab: 0f 94 c0 sete %al 107dae: 0f b6 c0 movzbl %al,%eax } if (match) { 107db1: 85 c0 test %eax,%eax 107db3: 74 a8 je 107d5d fclose(fp); 107db5: 83 ec 0c sub $0xc,%esp 107db8: 53 push %ebx 107db9: e8 7e b6 00 00 call 11343c *result = grp; 107dbe: 8b 45 10 mov 0x10(%ebp),%eax 107dc1: 89 30 mov %esi,(%eax) 107dc3: 31 c0 xor %eax,%eax return 0; 107dc5: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107dc8: 8d 65 f4 lea -0xc(%ebp),%esp 107dcb: 5b pop %ebx 107dcc: 5e pop %esi 107dcd: 5f pop %edi 107dce: c9 leave 107dcf: c3 ret =============================================================================== 00107aa7 : return NULL; return p; } struct group *getgrent(void) { 107aa7: 55 push %ebp <== NOT EXECUTED 107aa8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107aaa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 107aad: a1 9c 6e 12 00 mov 0x126e9c,%eax <== NOT EXECUTED 107ab2: 85 c0 test %eax,%eax <== NOT EXECUTED 107ab4: 74 25 je 107adb <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 107ab6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ab9: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107abe: b9 a0 6e 12 00 mov $0x126ea0,%ecx <== NOT EXECUTED 107ac3: ba 68 6f 12 00 mov $0x126f68,%edx <== NOT EXECUTED 107ac8: e8 db fe ff ff call 1079a8 <== NOT EXECUTED 107acd: 89 c2 mov %eax,%edx <== NOT EXECUTED 107acf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ad2: b8 68 6f 12 00 mov $0x126f68,%eax <== NOT EXECUTED 107ad7: 85 d2 test %edx,%edx <== NOT EXECUTED 107ad9: 75 02 jne 107add <== NOT EXECUTED 107adb: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 107add: c9 leave <== NOT EXECUTED 107ade: c3 ret <== NOT EXECUTED =============================================================================== 00107dfa : } struct group *getgrgid( gid_t gid ) { 107dfa: 55 push %ebp <== NOT EXECUTED 107dfb: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dfd: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 107e00: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107e03: 50 push %eax <== NOT EXECUTED 107e04: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107e09: 68 a0 6e 12 00 push $0x126ea0 <== NOT EXECUTED 107e0e: 68 68 6f 12 00 push $0x126f68 <== NOT EXECUTED 107e13: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107e17: 50 push %eax <== NOT EXECUTED 107e18: e8 b3 ff ff ff call 107dd0 <== NOT EXECUTED 107e1d: 89 c2 mov %eax,%edx <== NOT EXECUTED 107e1f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107e22: 31 c0 xor %eax,%eax <== NOT EXECUTED 107e24: 85 d2 test %edx,%edx <== NOT EXECUTED 107e26: 75 03 jne 107e2b <== NOT EXECUTED return NULL; return p; 107e28: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e2b: c9 leave <== NOT EXECUTED 107e2c: c3 ret <== NOT EXECUTED =============================================================================== 00107dd0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 107dd0: 55 push %ebp <== NOT EXECUTED 107dd1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dd3: 53 push %ebx <== NOT EXECUTED 107dd4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107dd7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107dda: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107ddd: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107de1: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107de4: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107de7: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107dea: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107ded: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107df0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107df2: 5b pop %ebx <== NOT EXECUTED 107df3: 5b pop %ebx <== NOT EXECUTED 107df4: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 107df5: e9 24 ff ff ff jmp 107d1e <== NOT EXECUTED =============================================================================== 00107e56 : } struct group *getgrnam( const char *name ) { 107e56: 55 push %ebp 107e57: 89 e5 mov %esp,%ebp 107e59: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 107e5c: 8d 45 f4 lea -0xc(%ebp),%eax 107e5f: 50 push %eax 107e60: 68 c8 00 00 00 push $0xc8 107e65: 68 a0 6e 12 00 push $0x126ea0 107e6a: 68 68 6f 12 00 push $0x126f68 107e6f: ff 75 08 pushl 0x8(%ebp) 107e72: e8 b6 ff ff ff call 107e2d 107e77: 89 c2 mov %eax,%edx 107e79: 83 c4 20 add $0x20,%esp 107e7c: 31 c0 xor %eax,%eax 107e7e: 85 d2 test %edx,%edx 107e80: 75 03 jne 107e85 <== NEVER TAKEN return NULL; return p; 107e82: 8b 45 f4 mov -0xc(%ebp),%eax } 107e85: c9 leave 107e86: c3 ret =============================================================================== 00107ec2 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107ec2: 55 push %ebp 107ec3: 89 e5 mov %esp,%ebp 107ec5: 57 push %edi 107ec6: 56 push %esi 107ec7: 53 push %ebx 107ec8: 83 ec 1c sub $0x1c,%esp 107ecb: 89 c7 mov %eax,%edi 107ecd: 89 55 e4 mov %edx,-0x1c(%ebp) 107ed0: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 107ed2: e8 3b fd ff ff call 107c12 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 107ed7: 51 push %ecx 107ed8: 51 push %ecx 107ed9: 68 53 01 12 00 push $0x120153 107ede: 68 08 14 12 00 push $0x121408 107ee3: e8 b8 bb 00 00 call 113aa0 107ee8: 89 c3 mov %eax,%ebx 107eea: 83 c4 10 add $0x10,%esp 107eed: 85 c0 test %eax,%eax 107eef: 75 10 jne 107f01 <== ALWAYS TAKEN errno = EINVAL; 107ef1: e8 fa b3 00 00 call 1132f0 <__errno> <== NOT EXECUTED 107ef6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107efc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107eff: eb 6b jmp 107f6c <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 107f01: 83 ec 0c sub $0xc,%esp 107f04: ff 75 0c pushl 0xc(%ebp) 107f07: 8b 4d 08 mov 0x8(%ebp),%ecx 107f0a: 89 f2 mov %esi,%edx 107f0c: 89 d8 mov %ebx,%eax 107f0e: e8 cc fb ff ff call 107adf 107f13: 83 c4 10 add $0x10,%esp 107f16: 85 c0 test %eax,%eax 107f18: 75 19 jne 107f33 <== ALWAYS TAKEN errno = EINVAL; 107f1a: e8 d1 b3 00 00 call 1132f0 <__errno> <== NOT EXECUTED 107f1f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 107f25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f28: 53 push %ebx <== NOT EXECUTED 107f29: e8 0e b5 00 00 call 11343c <== NOT EXECUTED 107f2e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107f31: eb 36 jmp 107f69 <== NOT EXECUTED return -1; } if (name) { 107f33: 85 ff test %edi,%edi 107f35: 74 11 je 107f48 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 107f37: 52 push %edx 107f38: 52 push %edx 107f39: 57 push %edi 107f3a: ff 36 pushl (%esi) 107f3c: e8 1f cf 00 00 call 114e60 107f41: 83 c4 10 add $0x10,%esp 107f44: 85 c0 test %eax,%eax 107f46: eb 07 jmp 107f4f } else { match = (pwd->pw_uid == uid); 107f48: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 107f4c: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 107f4f: 0f 94 c0 sete %al 107f52: 0f b6 c0 movzbl %al,%eax } if (match) { 107f55: 85 c0 test %eax,%eax 107f57: 74 a8 je 107f01 fclose(fp); 107f59: 83 ec 0c sub $0xc,%esp 107f5c: 53 push %ebx 107f5d: e8 da b4 00 00 call 11343c *result = pwd; 107f62: 8b 45 10 mov 0x10(%ebp),%eax 107f65: 89 30 mov %esi,(%eax) 107f67: 31 c0 xor %eax,%eax return 0; 107f69: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 107f6c: 8d 65 f4 lea -0xc(%ebp),%esp 107f6f: 5b pop %ebx 107f70: 5e pop %esi 107f71: 5f pop %edi 107f72: c9 leave 107f73: c3 ret =============================================================================== 00107bda : return NULL; return p; } struct passwd *getpwent(void) { 107bda: 55 push %ebp <== NOT EXECUTED 107bdb: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107bdd: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 107be0: a1 b4 6d 12 00 mov 0x126db4,%eax <== NOT EXECUTED 107be5: 85 c0 test %eax,%eax <== NOT EXECUTED 107be7: 74 25 je 107c0e <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 107be9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107bec: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107bf1: b9 b8 6d 12 00 mov $0x126db8,%ecx <== NOT EXECUTED 107bf6: ba 80 6e 12 00 mov $0x126e80,%edx <== NOT EXECUTED 107bfb: e8 df fe ff ff call 107adf <== NOT EXECUTED 107c00: 89 c2 mov %eax,%edx <== NOT EXECUTED 107c02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c05: b8 80 6e 12 00 mov $0x126e80,%eax <== NOT EXECUTED 107c0a: 85 d2 test %edx,%edx <== NOT EXECUTED 107c0c: 75 02 jne 107c10 <== NOT EXECUTED 107c0e: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 107c10: c9 leave <== NOT EXECUTED 107c11: c3 ret <== NOT EXECUTED =============================================================================== 00107ffa : } struct passwd *getpwnam( const char *name ) { 107ffa: 55 push %ebp 107ffb: 89 e5 mov %esp,%ebp 107ffd: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108000: 8d 45 f4 lea -0xc(%ebp),%eax 108003: 50 push %eax 108004: 68 c8 00 00 00 push $0xc8 108009: 68 b8 6d 12 00 push $0x126db8 10800e: 68 80 6e 12 00 push $0x126e80 108013: ff 75 08 pushl 0x8(%ebp) 108016: e8 b6 ff ff ff call 107fd1 10801b: 89 c2 mov %eax,%edx 10801d: 83 c4 20 add $0x20,%esp 108020: 31 c0 xor %eax,%eax 108022: 85 d2 test %edx,%edx 108024: 75 03 jne 108029 <== NEVER TAKEN return NULL; return p; 108026: 8b 45 f4 mov -0xc(%ebp),%eax } 108029: c9 leave 10802a: c3 ret =============================================================================== 00107f9e : } struct passwd *getpwuid( uid_t uid ) { 107f9e: 55 push %ebp <== NOT EXECUTED 107f9f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107fa1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 107fa4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 107fa7: 50 push %eax <== NOT EXECUTED 107fa8: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 107fad: 68 b8 6d 12 00 push $0x126db8 <== NOT EXECUTED 107fb2: 68 80 6e 12 00 push $0x126e80 <== NOT EXECUTED 107fb7: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 107fbb: 50 push %eax <== NOT EXECUTED 107fbc: e8 b3 ff ff ff call 107f74 <== NOT EXECUTED 107fc1: 89 c2 mov %eax,%edx <== NOT EXECUTED 107fc3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107fc6: 31 c0 xor %eax,%eax <== NOT EXECUTED 107fc8: 85 d2 test %edx,%edx <== NOT EXECUTED 107fca: 75 03 jne 107fcf <== NOT EXECUTED return NULL; return p; 107fcc: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107fcf: c9 leave <== NOT EXECUTED 107fd0: c3 ret <== NOT EXECUTED =============================================================================== 00107f74 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 107f74: 55 push %ebp <== NOT EXECUTED 107f75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107f77: 53 push %ebx <== NOT EXECUTED 107f78: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 107f7b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107f7e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107f81: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 107f85: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 107f88: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 107f8b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 107f8e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 107f91: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 107f94: 31 c0 xor %eax,%eax <== NOT EXECUTED } 107f96: 5b pop %ebx <== NOT EXECUTED 107f97: 5b pop %ebx <== NOT EXECUTED 107f98: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 107f99: e9 24 ff ff ff jmp 107ec2 <== NOT EXECUTED =============================================================================== 00107714 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 107714: 55 push %ebp 107715: 89 e5 mov %esp,%ebp 107717: 56 push %esi 107718: 53 push %ebx 107719: 83 ec 10 sub $0x10,%esp 10771c: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10771f: 85 db test %ebx,%ebx 107721: 75 10 jne 107733 <== ALWAYS TAKEN errno = EFAULT; 107723: e8 f8 b2 00 00 call 112a20 <__errno> <== NOT EXECUTED 107728: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10772e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107731: eb 29 jmp 10775c <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 107733: 9c pushf 107734: fa cli 107735: 5e pop %esi _TOD_Get( &now ); 107736: 83 ec 0c sub $0xc,%esp 107739: 8d 45 f0 lea -0x10(%ebp),%eax 10773c: 50 push %eax 10773d: e8 4e 3b 00 00 call 10b290 <_TOD_Get> _ISR_Enable(level); 107742: 56 push %esi 107743: 9d popf useconds = (suseconds_t)now.tv_nsec; 107744: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 107747: 8b 55 f0 mov -0x10(%ebp),%edx 10774a: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10774c: b9 e8 03 00 00 mov $0x3e8,%ecx 107751: 99 cltd 107752: f7 f9 idiv %ecx 107754: 89 43 04 mov %eax,0x4(%ebx) 107757: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 107759: 83 c4 10 add $0x10,%esp } 10775c: 8d 65 f8 lea -0x8(%ebp),%esp 10775f: 5b pop %ebx 107760: 5e pop %esi 107761: c9 leave 107762: c3 ret =============================================================================== 001118c8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1118c8: 55 push %ebp 1118c9: 89 e5 mov %esp,%ebp 1118cb: 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; 1118ce: 8b 4a 38 mov 0x38(%edx),%ecx 1118d1: 83 c8 ff or $0xffffffff,%eax 1118d4: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 1118d8: 75 10 jne 1118ea <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 1118da: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 1118e1: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 1118e8: 31 c0 xor %eax,%eax return 0; } 1118ea: c9 leave 1118eb: c3 ret =============================================================================== 00111a9e : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111a9e: 55 push %ebp 111a9f: 89 e5 mov %esp,%ebp 111aa1: 57 push %edi 111aa2: 56 push %esi 111aa3: 53 push %ebx 111aa4: 81 ec 4c 01 00 00 sub $0x14c,%esp 111aaa: 8b 45 10 mov 0x10(%ebp),%eax int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 111aad: 8b 4d 08 mov 0x8(%ebp),%ecx 111ab0: 8b 51 38 mov 0x38(%ecx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111ab3: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111ab6: 83 c2 54 add $0x54,%edx 111ab9: 89 95 cc fe ff ff mov %edx,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 111abf: 31 d2 xor %edx,%edx 111ac1: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111ac7: 0f 84 02 01 00 00 je 111bcf <== NEVER TAKEN /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 111acd: 8b 51 0c mov 0xc(%ecx),%edx 111ad0: 89 95 c8 fe ff ff mov %edx,-0x138(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 111ad6: b9 10 01 00 00 mov $0x110,%ecx 111adb: 31 d2 xor %edx,%edx 111add: f7 f1 div %ecx 111adf: 69 c0 10 01 00 00 imul $0x110,%eax,%eax 111ae5: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 111aeb: 89 85 c4 fe ff ff mov %eax,-0x13c(%ebp) 111af1: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp) 111af8: 00 00 00 111afb: 31 d2 xor %edx,%edx tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 111afd: 8d 8d d8 fe ff ff lea -0x128(%ebp),%ecx 111b03: 89 8d b4 fe ff ff mov %ecx,-0x14c(%ebp) 111b09: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111b0f: e9 a3 00 00 00 jmp 111bb7 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 111b14: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111b1a: 0f 84 a9 00 00 00 je 111bc9 <== NEVER TAKEN /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 111b20: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111b26: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 111b2c: 7c 7d jl 111bab <== NEVER TAKEN /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 111b2e: 8b 85 d4 fe ff ff mov -0x12c(%ebp),%eax 111b34: 99 cltd 111b35: 89 85 dc fe ff ff mov %eax,-0x124(%ebp) 111b3b: 89 95 e0 fe ff ff mov %edx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 111b41: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 111b48: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 111b4a: 8b 43 38 mov 0x38(%ebx),%eax 111b4d: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 111b53: 8d 53 0c lea 0xc(%ebx),%edx 111b56: 31 c0 xor %eax,%eax 111b58: 83 c9 ff or $0xffffffff,%ecx 111b5b: 89 d7 mov %edx,%edi 111b5d: f2 ae repnz scas %es:(%edi),%al 111b5f: f7 d1 not %ecx 111b61: 49 dec %ecx 111b62: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 111b69: 51 push %ecx 111b6a: 51 push %ecx 111b6b: 52 push %edx 111b6c: 8d 95 e8 fe ff ff lea -0x118(%ebp),%edx 111b72: 52 push %edx 111b73: e8 1c 1a 00 00 call 113594 memcpy( 111b78: 8b 45 0c mov 0xc(%ebp),%eax 111b7b: 03 85 d0 fe ff ff add -0x130(%ebp),%eax 111b81: b9 44 00 00 00 mov $0x44,%ecx 111b86: 89 c7 mov %eax,%edi 111b88: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 111b8e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 111b90: 8b 4d 08 mov 0x8(%ebp),%ecx 111b93: 81 41 0c 10 01 00 00 addl $0x110,0xc(%ecx) 111b9a: 83 51 10 00 adcl $0x0,0x10(%ecx) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 111b9e: 81 85 d0 fe ff ff 10 addl $0x110,-0x130(%ebp) 111ba5: 01 00 00 111ba8: 83 c4 10 add $0x10,%esp } the_node = the_node->next; 111bab: 8b 1b mov (%ebx),%ebx * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 111bad: 81 85 d4 fe ff ff 10 addl $0x110,-0x12c(%ebp) 111bb4: 01 00 00 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111bb7: 8b 85 c4 fe ff ff mov -0x13c(%ebp),%eax 111bbd: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 111bc3: 0f 8c 4b ff ff ff jl 111b14 <== NEVER TAKEN 111bc9: 8b 95 d0 fe ff ff mov -0x130(%ebp),%edx the_node = the_node->next; } /* Success */ return bytes_transferred; } 111bcf: 89 d0 mov %edx,%eax 111bd1: 8d 65 f4 lea -0xc(%ebp),%esp 111bd4: 5b pop %ebx 111bd5: 5e pop %esi 111bd6: 5f pop %edi 111bd7: c9 leave 111bd8: c3 ret =============================================================================== 001119ec : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1119ec: 55 push %ebp 1119ed: 89 e5 mov %esp,%ebp 1119ef: 56 push %esi 1119f0: 53 push %ebx 1119f1: 83 ec 10 sub $0x10,%esp 1119f4: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1119f7: 8b 1e mov (%esi),%ebx 1119f9: 8d 43 54 lea 0x54(%ebx),%eax 1119fc: 39 43 50 cmp %eax,0x50(%ebx) 1119ff: 74 0d je 111a0e /* * 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 ); 111a01: e8 1a 10 00 00 call 112a20 <__errno> 111a06: c7 00 5a 00 00 00 movl $0x5a,(%eax) 111a0c: eb 19 jmp 111a27 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 111a0e: 8b 46 10 mov 0x10(%esi),%eax 111a11: 39 58 1c cmp %ebx,0x1c(%eax) 111a14: 74 06 je 111a1c /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 111a16: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 111a1a: 74 10 je 111a2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 111a1c: e8 ff 0f 00 00 call 112a20 <__errno> 111a21: c7 00 10 00 00 00 movl $0x10,(%eax) 111a27: 83 c8 ff or $0xffffffff,%eax 111a2a: eb 6b jmp 111a97 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 111a2c: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 111a30: 74 13 je 111a45 111a32: 83 ec 0c sub $0xc,%esp 111a35: 53 push %ebx 111a36: e8 31 94 ff ff call 10ae6c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 111a3b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111a42: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 111a45: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 111a49: 50 push %eax 111a4a: 50 push %eax 111a4b: 6a 00 push $0x0 111a4d: 8d 45 f0 lea -0x10(%ebp),%eax 111a50: 50 push %eax 111a51: e8 be 5c ff ff call 107714 111a56: 8b 45 f0 mov -0x10(%ebp),%eax 111a59: 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) ) { 111a5c: 89 1c 24 mov %ebx,(%esp) 111a5f: e8 fe d3 ff ff call 10ee62 111a64: 83 c4 10 add $0x10,%esp 111a67: 85 c0 test %eax,%eax 111a69: 75 2a jne 111a95 111a6b: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 111a70: 75 23 jne 111a95 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 111a72: a1 54 3f 12 00 mov 0x123f54,%eax 111a77: 8b 50 04 mov 0x4(%eax),%edx 111a7a: 3b 16 cmp (%esi),%edx 111a7c: 75 07 jne 111a85 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 111a7e: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 111a85: 83 ec 0c sub $0xc,%esp 111a88: 53 push %ebx 111a89: e8 0e 5c ff ff call 10769c 111a8e: 31 c0 xor %eax,%eax 111a90: 83 c4 10 add $0x10,%esp 111a93: eb 02 jmp 111a97 111a95: 31 c0 xor %eax,%eax } return 0; } 111a97: 8d 65 f8 lea -0x8(%ebp),%esp 111a9a: 5b pop %ebx 111a9b: 5e pop %esi 111a9c: c9 leave 111a9d: c3 ret =============================================================================== 00107c12 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 107c12: 55 push %ebp 107c13: 89 e5 mov %esp,%ebp 107c15: 53 push %ebx 107c16: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 107c19: 80 3d b0 6d 12 00 00 cmpb $0x0,0x126db0 107c20: 0f 85 b8 00 00 00 jne 107cde return; etc_passwd_initted = 1; 107c26: c6 05 b0 6d 12 00 01 movb $0x1,0x126db0 mkdir("/etc", 0777); 107c2d: 50 push %eax 107c2e: 50 push %eax 107c2f: 68 ff 01 00 00 push $0x1ff 107c34: 68 03 14 12 00 push $0x121403 107c39: e8 ba 06 00 00 call 1082f8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 107c3e: 59 pop %ecx 107c3f: 5b pop %ebx 107c40: 68 53 01 12 00 push $0x120153 107c45: 68 08 14 12 00 push $0x121408 107c4a: e8 51 be 00 00 call 113aa0 107c4f: 83 c4 10 add $0x10,%esp 107c52: 85 c0 test %eax,%eax 107c54: 74 06 je 107c5c <== ALWAYS TAKEN fclose(fp); 107c56: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107c59: 50 push %eax <== NOT EXECUTED 107c5a: eb 2a jmp 107c86 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 107c5c: 52 push %edx 107c5d: 52 push %edx 107c5e: 68 5c 00 12 00 push $0x12005c 107c63: 68 08 14 12 00 push $0x121408 107c68: e8 33 be 00 00 call 113aa0 107c6d: 89 c3 mov %eax,%ebx 107c6f: 83 c4 10 add $0x10,%esp 107c72: 85 c0 test %eax,%eax 107c74: 74 18 je 107c8e <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 107c76: 50 push %eax 107c77: 50 push %eax 107c78: 53 push %ebx 107c79: 68 14 14 12 00 push $0x121414 107c7e: e8 e9 be 00 00 call 113b6c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 107c83: 89 1c 24 mov %ebx,(%esp) 107c86: e8 b1 b7 00 00 call 11343c 107c8b: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 107c8e: 51 push %ecx 107c8f: 51 push %ecx 107c90: 68 53 01 12 00 push $0x120153 107c95: 68 7b 14 12 00 push $0x12147b 107c9a: e8 01 be 00 00 call 113aa0 107c9f: 83 c4 10 add $0x10,%esp 107ca2: 85 c0 test %eax,%eax 107ca4: 74 06 je 107cac <== ALWAYS TAKEN fclose(fp); 107ca6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ca9: 50 push %eax <== NOT EXECUTED 107caa: eb 2a jmp 107cd6 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 107cac: 52 push %edx 107cad: 52 push %edx 107cae: 68 5c 00 12 00 push $0x12005c 107cb3: 68 7b 14 12 00 push $0x12147b 107cb8: e8 e3 bd 00 00 call 113aa0 107cbd: 89 c3 mov %eax,%ebx 107cbf: 83 c4 10 add $0x10,%esp 107cc2: 85 c0 test %eax,%eax 107cc4: 74 18 je 107cde <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 107cc6: 50 push %eax 107cc7: 50 push %eax 107cc8: 53 push %ebx 107cc9: 68 86 14 12 00 push $0x121486 107cce: e8 99 be 00 00 call 113b6c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 107cd3: 89 1c 24 mov %ebx,(%esp) 107cd6: e8 61 b7 00 00 call 11343c 107cdb: 83 c4 10 add $0x10,%esp } } 107cde: 8b 5d fc mov -0x4(%ebp),%ebx 107ce1: c9 leave 107ce2: c3 ret =============================================================================== 0010a3d8 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a3d8: 55 push %ebp 10a3d9: 89 e5 mov %esp,%ebp 10a3db: 83 ec 08 sub $0x8,%esp 10a3de: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10a3e1: 3b 05 44 51 12 00 cmp 0x125144,%eax 10a3e7: 73 19 jae 10a402 iop = rtems_libio_iop( fd ); 10a3e9: c1 e0 06 shl $0x6,%eax 10a3ec: 03 05 88 91 12 00 add 0x129188,%eax rtems_libio_check_is_open(iop); 10a3f2: f6 40 15 01 testb $0x1,0x15(%eax) 10a3f6: 74 0a je 10a402 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a3f8: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a3fb: 8b 50 3c mov 0x3c(%eax),%edx 10a3fe: 85 d2 test %edx,%edx 10a400: 75 0d jne 10a40f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a402: e8 b9 bd 00 00 call 1161c0 <__errno> 10a407: c7 00 09 00 00 00 movl $0x9,(%eax) 10a40d: eb 12 jmp 10a421 if ( !iop->handlers->ioctl_h ) 10a40f: 8b 52 10 mov 0x10(%edx),%edx 10a412: 85 d2 test %edx,%edx 10a414: 75 10 jne 10a426 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a416: e8 a5 bd 00 00 call 1161c0 <__errno> <== NOT EXECUTED 10a41b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a421: 83 c8 ff or $0xffffffff,%eax 10a424: eb 0d jmp 10a433 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a426: 83 ec 04 sub $0x4,%esp 10a429: 51 push %ecx 10a42a: ff 75 0c pushl 0xc(%ebp) 10a42d: 50 push %eax 10a42e: ff d2 call *%edx return rc; 10a430: 83 c4 10 add $0x10,%esp } 10a433: c9 leave 10a434: c3 ret =============================================================================== 00108e28 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108e28: 55 push %ebp <== NOT EXECUTED 108e29: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e2b: 53 push %ebx <== NOT EXECUTED 108e2c: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108e2f: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108e31: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 108e33: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 108e36: a8 20 test $0x20,%al <== NOT EXECUTED 108e38: 74 03 je 108e3d <== NOT EXECUTED c &= 0x7f; 108e3a: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108e3d: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108e40: 74 17 je 108e59 <== NOT EXECUTED c = tolower (c); 108e42: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 108e45: 8b 15 20 40 12 00 mov 0x124020,%edx <== NOT EXECUTED 108e4b: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108e50: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108e53: 4a dec %edx <== NOT EXECUTED 108e54: 75 03 jne 108e59 <== NOT EXECUTED 108e56: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 108e59: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 108e5c: 75 11 jne 108e6f <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 108e5e: 84 c0 test %al,%al <== NOT EXECUTED 108e60: 0f 88 d3 00 00 00 js 108f39 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 108e66: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108e69: 74 19 je 108e84 <== NOT EXECUTED 108e6b: b1 0a mov $0xa,%cl <== NOT EXECUTED 108e6d: eb 15 jmp 108e84 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108e6f: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108e72: 75 08 jne 108e7c <== NOT EXECUTED 108e74: a8 40 test $0x40,%al <== NOT EXECUTED 108e76: 74 0c je 108e84 <== NOT EXECUTED 108e78: b1 0d mov $0xd,%cl <== NOT EXECUTED 108e7a: eb 08 jmp 108e84 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108e7c: 84 c9 test %cl,%cl <== NOT EXECUTED 108e7e: 0f 84 87 00 00 00 je 108f0b <== NOT EXECUTED 108e84: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 108e87: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 108e8a: 74 7f je 108f0b <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 108e8c: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 108e8f: 75 04 jne 108e95 <== NOT EXECUTED erase (tty, 0); 108e91: 31 d2 xor %edx,%edx <== NOT EXECUTED 108e93: eb 0a jmp 108e9f <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108e95: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 108e98: 75 11 jne 108eab <== NOT EXECUTED erase (tty, 1); 108e9a: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 108e9f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108ea1: e8 09 fe ff ff call 108caf <== NOT EXECUTED 108ea6: e9 8e 00 00 00 jmp 108f39 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108eab: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 108eb0: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 108eb3: 0f 84 82 00 00 00 je 108f3b <== NOT EXECUTED return 1; } else if (c == '\n') { 108eb9: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108ebc: 75 1a jne 108ed8 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 108ebe: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 108ec1: 74 09 je 108ecc <== NOT EXECUTED echo (c, tty); 108ec3: 89 da mov %ebx,%edx <== NOT EXECUTED 108ec5: b0 0a mov $0xa,%al <== NOT EXECUTED 108ec7: e8 8b fd ff ff call 108c57 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ecc: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108ecf: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108ed2: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 108ed6: eb 28 jmp 108f00 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 108ed8: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 108edb: 74 05 je 108ee2 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 108edd: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 108ee0: 75 29 jne 108f0b <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108ee2: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 108ee5: 74 10 je 108ef7 <== NOT EXECUTED echo (c, tty); 108ee7: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108eea: 89 da mov %ebx,%edx <== NOT EXECUTED 108eec: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108eef: e8 63 fd ff ff call 108c57 <== NOT EXECUTED 108ef4: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ef7: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108efa: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108efd: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f00: 40 inc %eax <== NOT EXECUTED 108f01: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f04: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108f09: eb 30 jmp 108f3b <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f0b: a1 44 3f 12 00 mov 0x123f44,%eax <== NOT EXECUTED 108f10: 48 dec %eax <== NOT EXECUTED 108f11: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108f14: 7d 23 jge 108f39 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108f16: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108f1a: 74 10 je 108f2c <== NOT EXECUTED echo (c, tty); 108f1c: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f1f: 89 da mov %ebx,%edx <== NOT EXECUTED 108f21: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f24: e8 2e fd ff ff call 108c57 <== NOT EXECUTED 108f29: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f2c: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f2f: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f32: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f35: 40 inc %eax <== NOT EXECUTED 108f36: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f39: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108f3b: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108f3e: 5b pop %ebx <== NOT EXECUTED 108f3f: c9 leave <== NOT EXECUTED 108f40: c3 ret <== NOT EXECUTED =============================================================================== 00111fc8 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 111fc8: 55 push %ebp 111fc9: 89 e5 mov %esp,%ebp 111fcb: 57 push %edi 111fcc: 56 push %esi 111fcd: 53 push %ebx 111fce: 83 ec 3c sub $0x3c,%esp 111fd1: 8b 5d 0c mov 0xc(%ebp),%ebx 111fd4: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 111fd7: e8 34 ce ff ff call 10ee10 111fdc: 39 45 08 cmp %eax,0x8(%ebp) 111fdf: 74 0d je 111fee rtems_set_errno_and_return_minus_one( ESRCH ); 111fe1: e8 3a 0a 00 00 call 112a20 <__errno> 111fe6: c7 00 03 00 00 00 movl $0x3,(%eax) 111fec: eb 0f jmp 111ffd /* * Validate the signal passed. */ if ( !sig ) 111fee: 85 db test %ebx,%ebx 111ff0: 75 13 jne 112005 rtems_set_errno_and_return_minus_one( EINVAL ); 111ff2: e8 29 0a 00 00 call 112a20 <__errno> 111ff7: c7 00 16 00 00 00 movl $0x16,(%eax) 111ffd: 83 c8 ff or $0xffffffff,%eax 112000: e9 e7 01 00 00 jmp 1121ec static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 112005: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 112008: 83 f9 1f cmp $0x1f,%ecx 11200b: 77 e5 ja 111ff2 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 11200d: 6b d3 0c imul $0xc,%ebx,%edx 112010: 31 c0 xor %eax,%eax 112012: 83 ba 70 67 12 00 01 cmpl $0x1,0x126770(%edx) 112019: 0f 84 cd 01 00 00 je 1121ec /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 11201f: 83 fb 04 cmp $0x4,%ebx 112022: 74 0a je 11202e 112024: 83 fb 08 cmp $0x8,%ebx 112027: 74 05 je 11202e 112029: 83 fb 0b cmp $0xb,%ebx 11202c: 75 16 jne 112044 return pthread_kill( pthread_self(), sig ); 11202e: e8 71 05 00 00 call 1125a4 112033: 56 push %esi 112034: 56 push %esi 112035: 53 push %ebx 112036: 50 push %eax 112037: e8 bc 04 00 00 call 1124f8 11203c: 83 c4 10 add $0x10,%esp 11203f: e9 a8 01 00 00 jmp 1121ec static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 112044: be 01 00 00 00 mov $0x1,%esi 112049: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 11204b: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 11204e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 112055: 85 ff test %edi,%edi 112057: 75 09 jne 112062 siginfo->si_value.sival_int = 0; 112059: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 112060: eb 05 jmp 112067 } else { siginfo->si_value = *value; 112062: 8b 07 mov (%edi),%eax 112064: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 112067: a1 08 62 12 00 mov 0x126208,%eax 11206c: 40 inc %eax 11206d: a3 08 62 12 00 mov %eax,0x126208 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 112072: 8b 15 c4 62 12 00 mov 0x1262c4,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 112078: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax 11207e: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 112084: f7 d0 not %eax 112086: 85 c6 test %eax,%esi 112088: 0f 85 e0 00 00 00 jne 11216e /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11208e: a1 f4 68 12 00 mov 0x1268f4,%eax 112093: eb 23 jmp 1120b8 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 112095: 89 c2 mov %eax,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 112097: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 11209d: 85 70 30 test %esi,0x30(%eax) 1120a0: 0f 85 c8 00 00 00 jne 11216e /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 1120a6: 8b 89 cc 00 00 00 mov 0xcc(%ecx),%ecx 1120ac: f7 d1 not %ecx 1120ae: 85 ce test %ecx,%esi 1120b0: 0f 85 b8 00 00 00 jne 11216e the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 1120b6: 8b 00 mov (%eax),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1120b8: 3d f8 68 12 00 cmp $0x1268f8,%eax 1120bd: 75 d6 jne 112095 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1120bf: 0f b6 05 f4 21 12 00 movzbl 0x1221f4,%eax 1120c6: 40 inc %eax 1120c7: 89 45 d4 mov %eax,-0x2c(%ebp) 1120ca: 31 d2 xor %edx,%edx 1120cc: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1120d3: 8b 4d cc mov -0x34(%ebp),%ecx 1120d6: 8b 04 8d dc 61 12 00 mov 0x1261dc(,%ecx,4),%eax 1120dd: 85 c0 test %eax,%eax 1120df: 74 7c je 11215d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1120e1: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 1120e4: 0f b7 78 10 movzwl 0x10(%eax),%edi 1120e8: 89 7d c0 mov %edi,-0x40(%ebp) object_table = the_info->local_table; 1120eb: 8b 40 1c mov 0x1c(%eax),%eax 1120ee: 89 45 c4 mov %eax,-0x3c(%ebp) 1120f1: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 1120f8: eb 5b jmp 112155 the_thread = (Thread_Control *) object_table[ index ]; 1120fa: 8b 4d d0 mov -0x30(%ebp),%ecx 1120fd: 8b 7d c4 mov -0x3c(%ebp),%edi 112100: 8b 04 8f mov (%edi,%ecx,4),%eax if ( !the_thread ) 112103: 85 c0 test %eax,%eax 112105: 74 41 je 112148 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 112107: 8b 48 14 mov 0x14(%eax),%ecx 11210a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 11210d: 77 39 ja 112148 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11210f: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi 112115: 8b bf cc 00 00 00 mov 0xcc(%edi),%edi 11211b: f7 d7 not %edi 11211d: 85 fe test %edi,%esi 11211f: 74 27 je 112148 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 112121: 3b 4d d4 cmp -0x2c(%ebp),%ecx 112124: 72 27 jb 11214d * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 112126: 8b 7a 10 mov 0x10(%edx),%edi 112129: 89 7d c8 mov %edi,-0x38(%ebp) 11212c: 85 ff test %edi,%edi 11212e: 74 18 je 112148 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 112130: 8b 78 10 mov 0x10(%eax),%edi 112133: 85 ff test %edi,%edi 112135: 74 16 je 11214d continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 112137: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 11213e: 75 08 jne 112148 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 112140: 81 e7 00 00 00 10 and $0x10000000,%edi 112146: 75 05 jne 11214d 112148: 8b 4d d4 mov -0x2c(%ebp),%ecx 11214b: eb 02 jmp 11214f 11214d: 89 c2 mov %eax,%edx #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11214f: ff 45 d0 incl -0x30(%ebp) 112152: 89 4d d4 mov %ecx,-0x2c(%ebp) 112155: 8b 45 c0 mov -0x40(%ebp),%eax 112158: 39 45 d0 cmp %eax,-0x30(%ebp) 11215b: 76 9d jbe 1120fa * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 11215d: ff 45 cc incl -0x34(%ebp) 112160: 83 7d cc 05 cmpl $0x5,-0x34(%ebp) 112164: 0f 85 69 ff ff ff jne 1120d3 } } } } if ( interested ) { 11216a: 85 d2 test %edx,%edx 11216c: 74 17 je 112185 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 11216e: c6 42 74 01 movb $0x1,0x74(%edx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 112172: 51 push %ecx 112173: 8d 45 dc lea -0x24(%ebp),%eax 112176: 50 push %eax 112177: 53 push %ebx 112178: 52 push %edx 112179: e8 02 02 00 00 call 112380 <_POSIX_signals_Unblock_thread> 11217e: 83 c4 10 add $0x10,%esp 112181: 84 c0 test %al,%al 112183: 75 60 jne 1121e5 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 112185: 83 ec 0c sub $0xc,%esp 112188: 56 push %esi 112189: e8 ce 01 00 00 call 11235c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11218e: 6b db 0c imul $0xc,%ebx,%ebx 112191: 83 c4 10 add $0x10,%esp 112194: 83 bb 68 67 12 00 02 cmpl $0x2,0x126768(%ebx) 11219b: 75 48 jne 1121e5 psiginfo = (POSIX_signals_Siginfo_node *) 11219d: 83 ec 0c sub $0xc,%esp 1121a0: 68 e8 68 12 00 push $0x1268e8 1121a5: e8 da 8c ff ff call 10ae84 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1121aa: 83 c4 10 add $0x10,%esp 1121ad: 85 c0 test %eax,%eax 1121af: 75 15 jne 1121c6 _Thread_Enable_dispatch(); 1121b1: e8 67 a1 ff ff call 10c31d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1121b6: e8 65 08 00 00 call 112a20 <__errno> 1121bb: c7 00 0b 00 00 00 movl $0xb,(%eax) 1121c1: e9 37 fe ff ff jmp 111ffd } psiginfo->Info = *siginfo; 1121c6: 8d 78 08 lea 0x8(%eax),%edi 1121c9: 8d 75 dc lea -0x24(%ebp),%esi 1121cc: b9 03 00 00 00 mov $0x3,%ecx 1121d1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1121d3: 52 push %edx 1121d4: 52 push %edx 1121d5: 50 push %eax 1121d6: 81 c3 60 69 12 00 add $0x126960,%ebx 1121dc: 53 push %ebx 1121dd: e8 66 8c ff ff call 10ae48 <_Chain_Append> 1121e2: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1121e5: e8 33 a1 ff ff call 10c31d <_Thread_Enable_dispatch> 1121ea: 31 c0 xor %eax,%eax return 0; } 1121ec: 8d 65 f4 lea -0xc(%ebp),%esp 1121ef: 5b pop %ebx 1121f0: 5e pop %esi 1121f1: 5f pop %edi 1121f2: c9 leave 1121f3: c3 ret =============================================================================== 00108738 : int link( const char *existing, const char *new ) { 108738: 55 push %ebp 108739: 89 e5 mov %esp,%ebp 10873b: 57 push %edi 10873c: 56 push %esi 10873d: 53 push %ebx 10873e: 83 ec 48 sub $0x48,%esp 108741: 8b 55 08 mov 0x8(%ebp),%edx 108744: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 108747: 31 c0 xor %eax,%eax 108749: 83 c9 ff or $0xffffffff,%ecx 10874c: 89 d7 mov %edx,%edi 10874e: f2 ae repnz scas %es:(%edi),%al 108750: f7 d1 not %ecx 108752: 49 dec %ecx 108753: 6a 01 push $0x1 108755: 8d 75 cc lea -0x34(%ebp),%esi 108758: 56 push %esi 108759: 6a 00 push $0x0 10875b: 51 push %ecx 10875c: 52 push %edx 10875d: e8 e7 fb ff ff call 108349 0, &existing_loc, true ); if ( result != 0 ) 108762: 83 c4 20 add $0x20,%esp 108765: 83 cf ff or $0xffffffff,%edi 108768: 85 c0 test %eax,%eax 10876a: 0f 85 45 01 00 00 jne 1088b5 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 108770: 57 push %edi 108771: 8d 7d b8 lea -0x48(%ebp),%edi 108774: 57 push %edi 108775: 8d 45 e4 lea -0x1c(%ebp),%eax 108778: 50 push %eax 108779: 53 push %ebx 10877a: e8 99 0d 00 00 call 109518 if ( !parent_loc.ops->evalformake_h ) { 10877f: 8b 45 c4 mov -0x3c(%ebp),%eax 108782: 8b 40 04 mov 0x4(%eax),%eax 108785: 83 c4 10 add $0x10,%esp 108788: 85 c0 test %eax,%eax 10878a: 75 1f jne 1087ab <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 10878c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 10878f: 85 c0 test %eax,%eax <== NOT EXECUTED 108791: 0f 84 d0 00 00 00 je 108867 <== NOT EXECUTED 108797: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10879a: 85 c0 test %eax,%eax <== NOT EXECUTED 10879c: 0f 84 c5 00 00 00 je 108867 <== NOT EXECUTED 1087a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087a5: 56 push %esi <== NOT EXECUTED 1087a6: e9 b7 00 00 00 jmp 108862 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 1087ab: 51 push %ecx 1087ac: 8d 55 e0 lea -0x20(%ebp),%edx 1087af: 52 push %edx 1087b0: 57 push %edi 1087b1: 03 5d e4 add -0x1c(%ebp),%ebx 1087b4: 53 push %ebx 1087b5: ff d0 call *%eax 1087b7: 89 c3 mov %eax,%ebx if ( result != 0 ) { 1087b9: 83 c4 10 add $0x10,%esp 1087bc: 85 c0 test %eax,%eax 1087be: 74 26 je 1087e6 rtems_filesystem_freenode( &existing_loc ); 1087c0: 8b 45 d8 mov -0x28(%ebp),%eax 1087c3: 85 c0 test %eax,%eax 1087c5: 74 10 je 1087d7 <== NEVER TAKEN 1087c7: 8b 40 1c mov 0x1c(%eax),%eax 1087ca: 85 c0 test %eax,%eax 1087cc: 74 09 je 1087d7 <== NEVER TAKEN 1087ce: 83 ec 0c sub $0xc,%esp 1087d1: 56 push %esi 1087d2: ff d0 call *%eax 1087d4: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 1087d7: e8 70 b3 00 00 call 113b4c <__errno> 1087dc: 89 18 mov %ebx,(%eax) 1087de: 83 cf ff or $0xffffffff,%edi 1087e1: e9 cf 00 00 00 jmp 1088b5 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 1087e6: 8b 45 c8 mov -0x38(%ebp),%eax 1087e9: 3b 45 dc cmp -0x24(%ebp),%eax 1087ec: 74 3e je 10882c rtems_filesystem_freenode( &existing_loc ); 1087ee: 8b 45 d8 mov -0x28(%ebp),%eax 1087f1: 85 c0 test %eax,%eax 1087f3: 74 10 je 108805 <== NEVER TAKEN 1087f5: 8b 40 1c mov 0x1c(%eax),%eax 1087f8: 85 c0 test %eax,%eax 1087fa: 74 09 je 108805 <== NEVER TAKEN 1087fc: 83 ec 0c sub $0xc,%esp 1087ff: 56 push %esi 108800: ff d0 call *%eax 108802: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 108805: 8b 45 c4 mov -0x3c(%ebp),%eax 108808: 85 c0 test %eax,%eax 10880a: 74 13 je 10881f <== NEVER TAKEN 10880c: 8b 40 1c mov 0x1c(%eax),%eax 10880f: 85 c0 test %eax,%eax 108811: 74 0c je 10881f <== NEVER TAKEN 108813: 83 ec 0c sub $0xc,%esp 108816: 8d 55 b8 lea -0x48(%ebp),%edx 108819: 52 push %edx 10881a: ff d0 call *%eax 10881c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10881f: e8 28 b3 00 00 call 113b4c <__errno> 108824: c7 00 12 00 00 00 movl $0x12,(%eax) 10882a: eb b2 jmp 1087de } if ( !parent_loc.ops->link_h ) { 10882c: 8b 45 c4 mov -0x3c(%ebp),%eax 10882f: 8b 40 08 mov 0x8(%eax),%eax 108832: 85 c0 test %eax,%eax 108834: 75 41 jne 108877 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 108836: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 108839: 85 c0 test %eax,%eax <== NOT EXECUTED 10883b: 74 10 je 10884d <== NOT EXECUTED 10883d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108840: 85 c0 test %eax,%eax <== NOT EXECUTED 108842: 74 09 je 10884d <== NOT EXECUTED 108844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108847: 56 push %esi <== NOT EXECUTED 108848: ff d0 call *%eax <== NOT EXECUTED 10884a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 10884d: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 108850: 85 c0 test %eax,%eax <== NOT EXECUTED 108852: 74 13 je 108867 <== NOT EXECUTED 108854: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108857: 85 c0 test %eax,%eax <== NOT EXECUTED 108859: 74 0c je 108867 <== NOT EXECUTED 10885b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10885e: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED 108861: 52 push %edx <== NOT EXECUTED 108862: ff d0 call *%eax <== NOT EXECUTED 108864: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108867: e8 e0 b2 00 00 call 113b4c <__errno> <== NOT EXECUTED 10886c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108872: e9 67 ff ff ff jmp 1087de <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 108877: 52 push %edx 108878: ff 75 e0 pushl -0x20(%ebp) 10887b: 57 push %edi 10887c: 56 push %esi 10887d: ff d0 call *%eax 10887f: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &existing_loc ); 108881: 8b 45 d8 mov -0x28(%ebp),%eax 108884: 83 c4 10 add $0x10,%esp 108887: 85 c0 test %eax,%eax 108889: 74 10 je 10889b <== NEVER TAKEN 10888b: 8b 40 1c mov 0x1c(%eax),%eax 10888e: 85 c0 test %eax,%eax 108890: 74 09 je 10889b <== NEVER TAKEN 108892: 83 ec 0c sub $0xc,%esp 108895: 56 push %esi 108896: ff d0 call *%eax 108898: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 10889b: 8b 45 c4 mov -0x3c(%ebp),%eax 10889e: 85 c0 test %eax,%eax 1088a0: 74 13 je 1088b5 <== NEVER TAKEN 1088a2: 8b 40 1c mov 0x1c(%eax),%eax 1088a5: 85 c0 test %eax,%eax 1088a7: 74 0c je 1088b5 <== NEVER TAKEN 1088a9: 83 ec 0c sub $0xc,%esp 1088ac: 8d 55 b8 lea -0x48(%ebp),%edx 1088af: 52 push %edx 1088b0: ff d0 call *%eax 1088b2: 83 c4 10 add $0x10,%esp return result; } 1088b5: 89 f8 mov %edi,%eax 1088b7: 8d 65 f4 lea -0xc(%ebp),%esp 1088ba: 5b pop %ebx 1088bb: 5e pop %esi 1088bc: 5f pop %edi 1088bd: c9 leave 1088be: c3 ret =============================================================================== 0011e080 : off_t lseek( int fd, off_t offset, int whence ) { 11e080: 55 push %ebp 11e081: 89 e5 mov %esp,%ebp 11e083: 57 push %edi 11e084: 56 push %esi 11e085: 53 push %ebx 11e086: 83 ec 1c sub $0x1c,%esp 11e089: 8b 5d 08 mov 0x8(%ebp),%ebx 11e08c: 8b 45 0c mov 0xc(%ebp),%eax 11e08f: 8b 55 10 mov 0x10(%ebp),%edx 11e092: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11e095: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 11e09b: 73 0f jae 11e0ac <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e09d: c1 e3 06 shl $0x6,%ebx 11e0a0: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open(iop); 11e0a6: f6 43 15 01 testb $0x1,0x15(%ebx) 11e0aa: 75 0d jne 11e0b9 <== ALWAYS TAKEN 11e0ac: e8 6f 49 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e0b1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11e0b7: eb 61 jmp 11e11a <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11e0b9: 8b 73 3c mov 0x3c(%ebx),%esi 11e0bc: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11e0c0: 75 0d jne 11e0cf <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e0c2: e8 59 49 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e0c7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e0cd: eb 4b jmp 11e11a <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11e0cf: 8b 73 0c mov 0xc(%ebx),%esi 11e0d2: 8b 7b 10 mov 0x10(%ebx),%edi 11e0d5: 89 75 e0 mov %esi,-0x20(%ebp) 11e0d8: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11e0db: 83 f9 01 cmp $0x1,%ecx 11e0de: 74 11 je 11e0f1 11e0e0: 83 f9 02 cmp $0x2,%ecx 11e0e3: 74 18 je 11e0fd 11e0e5: 85 c9 test %ecx,%ecx 11e0e7: 75 26 jne 11e10f case SEEK_SET: iop->offset = offset; 11e0e9: 89 43 0c mov %eax,0xc(%ebx) 11e0ec: 89 53 10 mov %edx,0x10(%ebx) break; 11e0ef: eb 30 jmp 11e121 case SEEK_CUR: iop->offset += offset; 11e0f1: 8b 75 e0 mov -0x20(%ebp),%esi 11e0f4: 8b 7d e4 mov -0x1c(%ebp),%edi 11e0f7: 01 c6 add %eax,%esi 11e0f9: 11 d7 adc %edx,%edi 11e0fb: eb 0a jmp 11e107 break; case SEEK_END: iop->offset = iop->size + offset; 11e0fd: 89 c6 mov %eax,%esi 11e0ff: 89 d7 mov %edx,%edi 11e101: 03 73 04 add 0x4(%ebx),%esi 11e104: 13 7b 08 adc 0x8(%ebx),%edi 11e107: 89 73 0c mov %esi,0xc(%ebx) 11e10a: 89 7b 10 mov %edi,0x10(%ebx) break; 11e10d: eb 12 jmp 11e121 default: rtems_set_errno_and_return_minus_one( EINVAL ); 11e10f: e8 0c 49 ff ff call 112a20 <__errno> 11e114: c7 00 16 00 00 00 movl $0x16,(%eax) 11e11a: 83 c8 ff or $0xffffffff,%eax 11e11d: 89 c2 mov %eax,%edx 11e11f: eb 23 jmp 11e144 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11e121: 8b 73 3c mov 0x3c(%ebx),%esi 11e124: 51 push %ecx 11e125: 52 push %edx 11e126: 50 push %eax 11e127: 53 push %ebx 11e128: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11e12b: 83 c4 10 add $0x10,%esp 11e12e: 83 fa ff cmp $0xffffffff,%edx 11e131: 75 11 jne 11e144 11e133: 83 f8 ff cmp $0xffffffff,%eax 11e136: 75 0c jne 11e144 <== NEVER TAKEN iop->offset = old_offset; 11e138: 8b 75 e0 mov -0x20(%ebp),%esi 11e13b: 8b 7d e4 mov -0x1c(%ebp),%edi 11e13e: 89 73 0c mov %esi,0xc(%ebx) 11e141: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11e144: 8d 65 f4 lea -0xc(%ebp),%esp 11e147: 5b pop %ebx 11e148: 5e pop %esi 11e149: 5f pop %edi 11e14a: c9 leave 11e14b: c3 ret =============================================================================== 0010793c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10793c: 55 push %ebp 10793d: 89 e5 mov %esp,%ebp 10793f: 57 push %edi 107940: 56 push %esi 107941: 53 push %ebx 107942: 83 ec 0c sub $0xc,%esp 107945: 8b 75 08 mov 0x8(%ebp),%esi 107948: ff 05 d4 60 12 00 incl 0x1260d4 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10794e: e8 17 ff ff ff call 10786a /* * Validate the parameters */ if ( !size ) 107953: 85 f6 test %esi,%esi 107955: 74 7c je 1079d3 <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107957: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 10795e: 75 09 jne 107969 107960: e8 af fe ff ff call 107814 107965: 84 c0 test %al,%al 107967: 74 6a je 1079d3 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107969: 6a 00 push $0x0 10796b: 6a 00 push $0x0 10796d: 56 push %esi 10796e: ff 35 50 21 12 00 pushl 0x122150 107974: e8 43 44 00 00 call 10bdbc <_Protected_heap_Allocate_aligned_with_boundary> 107979: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10797b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10797e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 107980: 85 c0 test %eax,%eax 107982: 75 26 jne 1079aa if (rtems_malloc_sbrk_helpers) 107984: a1 34 45 12 00 mov 0x124534,%eax 107989: 85 c0 test %eax,%eax 10798b: 74 10 je 10799d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10798d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107990: 56 push %esi <== NOT EXECUTED 107991: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 107994: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 107996: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107999: 85 c0 test %eax,%eax <== NOT EXECUTED 10799b: 75 0d jne 1079aa <== NOT EXECUTED errno = ENOMEM; 10799d: e8 7e b0 00 00 call 112a20 <__errno> 1079a2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1079a8: eb 2b jmp 1079d5 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1079aa: a1 38 45 12 00 mov 0x124538,%eax 1079af: 85 c0 test %eax,%eax 1079b1: 74 09 je 1079bc <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1079b3: 52 push %edx <== NOT EXECUTED 1079b4: 52 push %edx <== NOT EXECUTED 1079b5: 56 push %esi <== NOT EXECUTED 1079b6: 57 push %edi <== NOT EXECUTED 1079b7: ff d0 call *%eax <== NOT EXECUTED 1079b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1079bc: a1 30 45 12 00 mov 0x124530,%eax 1079c1: 89 fb mov %edi,%ebx 1079c3: 85 c0 test %eax,%eax 1079c5: 74 0e je 1079d5 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1079c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1079ca: 57 push %edi <== NOT EXECUTED 1079cb: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1079ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1079d1: eb 02 jmp 1079d5 <== NOT EXECUTED 1079d3: 31 db xor %ebx,%ebx <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1079d5: 89 d8 mov %ebx,%eax 1079d7: 8d 65 f4 lea -0xc(%ebp),%esp 1079da: 5b pop %ebx 1079db: 5e pop %esi 1079dc: 5f pop %edi 1079dd: c9 leave 1079de: c3 ret =============================================================================== 00107852 : } void malloc_deferred_free( void *pointer ) { 107852: 55 push %ebp <== NOT EXECUTED 107853: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107855: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107858: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10785b: 68 c4 60 12 00 push $0x1260c4 <== NOT EXECUTED 107860: e8 e3 35 00 00 call 10ae48 <_Chain_Append> <== NOT EXECUTED 107865: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107868: c9 leave <== NOT EXECUTED 107869: c3 ret <== NOT EXECUTED =============================================================================== 0010786a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10786a: 55 push %ebp 10786b: 89 e5 mov %esp,%ebp 10786d: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 107870: eb 0c jmp 10787e free(to_be_freed); 107872: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107875: 50 push %eax <== NOT EXECUTED 107876: e8 21 fe ff ff call 10769c <== NOT EXECUTED 10787b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10787e: 83 ec 0c sub $0xc,%esp 107881: 68 c4 60 12 00 push $0x1260c4 107886: e8 f9 35 00 00 call 10ae84 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 10788b: 83 c4 10 add $0x10,%esp 10788e: 85 c0 test %eax,%eax 107890: 75 e0 jne 107872 <== NEVER TAKEN free(to_be_freed); } 107892: c9 leave 107893: c3 ret =============================================================================== 00107814 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 107814: 55 push %ebp 107815: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 107817: 8b 15 08 62 12 00 mov 0x126208,%edx 10781d: 31 c0 xor %eax,%eax 10781f: 85 d2 test %edx,%edx 107821: 75 0a jne 10782d <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 107823: a1 a0 62 12 00 mov 0x1262a0,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107828: 85 c0 test %eax,%eax 10782a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10782d: c9 leave 10782e: c3 ret =============================================================================== 00110a18 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 110a18: 55 push %ebp 110a19: 89 e5 mov %esp,%ebp 110a1b: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 110a1e: ff 35 a8 5d 12 00 pushl 0x125da8 110a24: 6a 01 push $0x1 110a26: e8 91 6a ff ff call 1074bc if ( memory ) 110a2b: 83 c4 10 add $0x10,%esp 110a2e: 85 c0 test %eax,%eax 110a30: 74 06 je 110a38 <== NEVER TAKEN memfile_blocks_allocated++; 110a32: ff 05 bc 5e 12 00 incl 0x125ebc return memory; } 110a38: c9 leave 110a39: c3 ret =============================================================================== 00110d94 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 110d94: 55 push %ebp 110d95: 89 e5 mov %esp,%ebp 110d97: 53 push %ebx 110d98: 83 ec 10 sub $0x10,%esp 110d9b: 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) ) { 110d9e: 53 push %ebx 110d9f: e8 be e0 ff ff call 10ee62 110da4: 83 c4 10 add $0x10,%esp 110da7: 85 c0 test %eax,%eax 110da9: 75 36 jne 110de1 110dab: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 110db0: 75 2f jne 110de1 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 110db2: a1 54 3f 12 00 mov 0x123f54,%eax 110db7: 39 58 04 cmp %ebx,0x4(%eax) 110dba: 75 07 jne 110dc3 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 110dbc: 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) 110dc3: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 110dc7: 74 0c je 110dd5 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 110dc9: 83 ec 0c sub $0xc,%esp 110dcc: 53 push %ebx 110dcd: e8 98 fe ff ff call 110c6a 110dd2: 83 c4 10 add $0x10,%esp free( the_jnode ); 110dd5: 83 ec 0c sub $0xc,%esp 110dd8: 53 push %ebx 110dd9: e8 be 68 ff ff call 10769c 110dde: 83 c4 10 add $0x10,%esp } return 0; } 110de1: 31 c0 xor %eax,%eax 110de3: 8b 5d fc mov -0x4(%ebp),%ebx 110de6: c9 leave 110de7: c3 ret =============================================================================== 00110bb5 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 110bb5: 55 push %ebp 110bb6: 89 e5 mov %esp,%ebp 110bb8: 57 push %edi 110bb9: 56 push %esi 110bba: 53 push %ebx 110bbb: 83 ec 0c sub $0xc,%esp 110bbe: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 110bc1: 85 f6 test %esi,%esi 110bc3: 75 19 jne 110bde <== ALWAYS TAKEN 110bc5: 68 70 09 12 00 push $0x120970 110bca: 68 64 0a 12 00 push $0x120a64 110bcf: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 110bd4: 68 02 09 12 00 push $0x120902 <== NOT EXECUTED 110bd9: e8 c2 67 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 110bde: 8b 3e mov (%esi),%edi 110be0: 31 db xor %ebx,%ebx for ( i=0 ; i if ( b[i] ) { 110be4: 8b 04 9f mov (%edi,%ebx,4),%eax 110be7: 85 c0 test %eax,%eax 110be9: 74 13 je 110bfe memfile_free_block( b[i] ); 110beb: 83 ec 0c sub $0xc,%esp 110bee: 50 push %eax 110bef: e8 0b fe ff ff call 1109ff b[i] = 0; 110bf4: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 110bfb: 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 ); 110c04: 83 ec 0c sub $0xc,%esp 110c07: ff 36 pushl (%esi) 110c09: e8 f1 fd ff ff call 1109ff *block_table = 0; 110c0e: c7 06 00 00 00 00 movl $0x0,(%esi) 110c14: 83 c4 10 add $0x10,%esp } 110c17: 8d 65 f4 lea -0xc(%ebp),%esp 110c1a: 5b pop %ebx 110c1b: 5e pop %esi 110c1c: 5f pop %edi 110c1d: c9 leave 110c1e: c3 ret =============================================================================== 00110ff5 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 110ff5: 55 push %ebp 110ff6: 89 e5 mov %esp,%ebp 110ff8: 53 push %ebx 110ff9: 83 ec 14 sub $0x14,%esp 110ffc: 8b 4d 08 mov 0x8(%ebp),%ecx 110fff: 8b 45 0c mov 0xc(%ebp),%eax 111002: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 111005: 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 ) 111008: 3b 53 54 cmp 0x54(%ebx),%edx 11100b: 7c 12 jl 11101f <== NEVER TAKEN 11100d: 7f 05 jg 111014 <== NEVER TAKEN 11100f: 3b 43 50 cmp 0x50(%ebx),%eax 111012: 76 0b jbe 11101f <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 111014: 51 push %ecx <== NOT EXECUTED 111015: 52 push %edx <== NOT EXECUTED 111016: 50 push %eax <== NOT EXECUTED 111017: 53 push %ebx <== NOT EXECUTED 111018: e8 b2 fe ff ff call 110ecf <== NOT EXECUTED 11101d: eb 21 jmp 111040 <== 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; 11101f: 89 43 50 mov %eax,0x50(%ebx) 111022: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 111025: 89 41 04 mov %eax,0x4(%ecx) 111028: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 11102b: 52 push %edx 11102c: 52 push %edx 11102d: 6a 00 push $0x0 11102f: 8d 45 f0 lea -0x10(%ebp),%eax 111032: 50 push %eax 111033: e8 dc 66 ff ff call 107714 111038: 8b 45 f0 mov -0x10(%ebp),%eax 11103b: 89 43 40 mov %eax,0x40(%ebx) 11103e: 31 c0 xor %eax,%eax return 0; 111040: 83 c4 10 add $0x10,%esp } 111043: 8b 5d fc mov -0x4(%ebp),%ebx 111046: c9 leave 111047: c3 ret =============================================================================== 00111048 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111048: 55 push %ebp 111049: 89 e5 mov %esp,%ebp 11104b: 56 push %esi 11104c: 53 push %ebx 11104d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 111050: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 111053: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 111057: 75 1a jne 111073 <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 111059: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 11105c: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 11105f: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 111062: 7c 41 jl 1110a5 <== NOT EXECUTED 111064: 7f 05 jg 11106b <== NOT EXECUTED 111066: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 111069: 76 3a jbe 1110a5 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 11106b: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 11106e: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 111071: eb 32 jmp 1110a5 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 111073: 50 push %eax 111074: ff 73 10 pushl 0x10(%ebx) 111077: ff 73 0c pushl 0xc(%ebx) 11107a: 56 push %esi 11107b: e8 4f fe ff ff call 110ecf 111080: 83 c4 10 add $0x10,%esp 111083: 85 c0 test %eax,%eax 111085: 74 12 je 111099 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 111087: e8 94 19 00 00 call 112a20 <__errno> <== NOT EXECUTED 11108c: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 111092: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111095: 89 c2 mov %eax,%edx <== NOT EXECUTED 111097: eb 12 jmp 1110ab <== NOT EXECUTED iop->size = the_jnode->info.file.size; 111099: 8b 46 50 mov 0x50(%esi),%eax 11109c: 8b 56 54 mov 0x54(%esi),%edx 11109f: 89 43 04 mov %eax,0x4(%ebx) 1110a2: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 1110a5: 8b 43 0c mov 0xc(%ebx),%eax 1110a8: 8b 53 10 mov 0x10(%ebx),%edx } 1110ab: 8d 65 f8 lea -0x8(%ebp),%esp 1110ae: 5b pop %ebx 1110af: 5e pop %esi 1110b0: c9 leave 1110b1: c3 ret =============================================================================== 001112d7 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1112d7: 55 push %ebp 1112d8: 89 e5 mov %esp,%ebp 1112da: 56 push %esi 1112db: 53 push %ebx 1112dc: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1112df: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1112e2: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 1112e9: 74 54 je 11133f && (the_jnode->type == IMFS_LINEAR_FILE)) { 1112eb: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1112ef: 75 4e jne 11133f <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 1112f1: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1112f4: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 1112f7: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 1112fe: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 111305: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 11130c: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 111313: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 11131a: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 111321: 85 c0 test %eax,%eax <== NOT EXECUTED 111323: 74 1a je 11133f <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 111325: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111328: 50 push %eax <== NOT EXECUTED 111329: 52 push %edx <== NOT EXECUTED 11132a: 6a 00 push $0x0 <== NOT EXECUTED 11132c: 6a 00 push $0x0 <== NOT EXECUTED 11132e: 53 push %ebx <== NOT EXECUTED 11132f: e8 7e fd ff ff call 1110b2 <== NOT EXECUTED 111334: 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) 111336: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 111339: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11133c: 42 inc %edx <== NOT EXECUTED 11133d: 74 20 je 11135f <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 11133f: f6 46 15 02 testb $0x2,0x15(%esi) 111343: 74 0c je 111351 iop->offset = the_jnode->info.file.size; 111345: 8b 43 50 mov 0x50(%ebx),%eax 111348: 8b 53 54 mov 0x54(%ebx),%edx 11134b: 89 46 0c mov %eax,0xc(%esi) 11134e: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 111351: 8b 43 50 mov 0x50(%ebx),%eax 111354: 8b 53 54 mov 0x54(%ebx),%edx 111357: 89 46 04 mov %eax,0x4(%esi) 11135a: 89 56 08 mov %edx,0x8(%esi) 11135d: 31 c0 xor %eax,%eax return 0; } 11135f: 8d 65 f8 lea -0x8(%ebp),%esp 111362: 5b pop %ebx 111363: 5e pop %esi 111364: c9 leave 111365: c3 ret =============================================================================== 00110de8 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110de8: 55 push %ebp 110de9: 89 e5 mov %esp,%ebp 110deb: 53 push %ebx 110dec: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110def: 8b 45 0c mov 0xc(%ebp),%eax 110df2: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 110df4: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 110df8: 74 13 je 110e0d <== NEVER TAKEN 110dfa: 83 ec 0c sub $0xc,%esp 110dfd: 53 push %ebx 110dfe: e8 69 a0 ff ff call 10ae6c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 110e03: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110e0a: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110e0d: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110e11: 50 push %eax 110e12: 50 push %eax 110e13: 6a 00 push $0x0 110e15: 8d 45 f0 lea -0x10(%ebp),%eax 110e18: 50 push %eax 110e19: e8 f6 68 ff ff call 107714 110e1e: 8b 45 f0 mov -0x10(%ebp),%eax 110e21: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 110e24: 89 1c 24 mov %ebx,(%esp) 110e27: e8 68 ff ff ff call 110d94 } 110e2c: 8b 5d fc mov -0x4(%ebp),%ebx 110e2f: c9 leave 110e30: c3 ret =============================================================================== 001079fc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1079fc: 55 push %ebp 1079fd: 89 e5 mov %esp,%ebp 1079ff: 57 push %edi 107a00: 56 push %esi 107a01: 53 push %ebx 107a02: 83 ec 3c sub $0x3c,%esp 107a05: 8b 5d 08 mov 0x8(%ebp),%ebx 107a08: 8b 7d 0c mov 0xc(%ebp),%edi 107a0b: 8b 45 10 mov 0x10(%ebp),%eax 107a0e: 8b 55 14 mov 0x14(%ebp),%edx 107a11: 89 45 c0 mov %eax,-0x40(%ebp) 107a14: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 107a17: 66 f7 c7 00 f0 test $0xf000,%di 107a1c: 75 0d jne 107a2b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107a1e: e8 fd af 00 00 call 112a20 <__errno> <== NOT EXECUTED 107a23: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107a29: eb 27 jmp 107a52 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107a2b: 51 push %ecx 107a2c: 8d 75 cc lea -0x34(%ebp),%esi 107a2f: 56 push %esi 107a30: 8d 45 e4 lea -0x1c(%ebp),%eax 107a33: 50 push %eax 107a34: 53 push %ebx 107a35: e8 52 09 00 00 call 10838c if ( !temp_loc.ops->evalformake_h ) { 107a3a: 8b 45 d8 mov -0x28(%ebp),%eax 107a3d: 8b 40 04 mov 0x4(%eax),%eax 107a40: 83 c4 10 add $0x10,%esp 107a43: 85 c0 test %eax,%eax 107a45: 75 10 jne 107a57 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107a47: e8 d4 af 00 00 call 112a20 <__errno> <== NOT EXECUTED 107a4c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107a52: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 107a55: eb 5e jmp 107ab5 <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 107a57: 52 push %edx 107a58: 8d 55 e0 lea -0x20(%ebp),%edx 107a5b: 52 push %edx 107a5c: 56 push %esi 107a5d: 03 5d e4 add -0x1c(%ebp),%ebx 107a60: 53 push %ebx 107a61: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107a63: 83 c4 10 add $0x10,%esp 107a66: 83 cb ff or $0xffffffff,%ebx 107a69: 85 c0 test %eax,%eax 107a6b: 75 48 jne 107ab5 return -1; if ( !temp_loc.ops->mknod_h ) { 107a6d: 8b 55 d8 mov -0x28(%ebp),%edx 107a70: 8b 42 14 mov 0x14(%edx),%eax 107a73: 85 c0 test %eax,%eax 107a75: 75 12 jne 107a89 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 107a77: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107a7a: 85 c0 test %eax,%eax <== NOT EXECUTED 107a7c: 74 c9 je 107a47 <== NOT EXECUTED 107a7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a81: 56 push %esi <== NOT EXECUTED 107a82: ff d0 call *%eax <== NOT EXECUTED 107a84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107a87: eb be jmp 107a47 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107a89: 83 ec 0c sub $0xc,%esp 107a8c: 56 push %esi 107a8d: ff 75 c4 pushl -0x3c(%ebp) 107a90: ff 75 c0 pushl -0x40(%ebp) 107a93: 57 push %edi 107a94: ff 75 e0 pushl -0x20(%ebp) 107a97: ff d0 call *%eax 107a99: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 107a9b: 8b 45 d8 mov -0x28(%ebp),%eax 107a9e: 83 c4 20 add $0x20,%esp 107aa1: 85 c0 test %eax,%eax 107aa3: 74 10 je 107ab5 <== NEVER TAKEN 107aa5: 8b 40 1c mov 0x1c(%eax),%eax 107aa8: 85 c0 test %eax,%eax 107aaa: 74 09 je 107ab5 107aac: 83 ec 0c sub $0xc,%esp 107aaf: 56 push %esi 107ab0: ff d0 call *%eax 107ab2: 83 c4 10 add $0x10,%esp return result; } 107ab5: 89 d8 mov %ebx,%eax 107ab7: 8d 65 f4 lea -0xc(%ebp),%esp 107aba: 5b pop %ebx 107abb: 5e pop %esi 107abc: 5f pop %edi 107abd: c9 leave 107abe: c3 ret =============================================================================== 00107b2a : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107b2a: 55 push %ebp 107b2b: 89 e5 mov %esp,%ebp 107b2d: 57 push %edi 107b2e: 56 push %esi 107b2f: 53 push %ebx 107b30: 83 ec 4c sub $0x4c,%esp 107b33: 8b 75 08 mov 0x8(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107b36: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107b3a: 77 15 ja 107b51 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107b3c: 83 ec 0c sub $0xc,%esp 107b3f: ff 75 10 pushl 0x10(%ebp) 107b42: e8 38 76 00 00 call 10f17f 107b47: 89 45 b0 mov %eax,-0x50(%ebp) if ( !mount_h ) 107b4a: 83 c4 10 add $0x10,%esp 107b4d: 85 c0 test %eax,%eax 107b4f: 75 10 jne 107b61 rtems_set_errno_and_return_minus_one( EINVAL ); 107b51: e8 ca ae 00 00 call 112a20 <__errno> 107b56: c7 00 16 00 00 00 movl $0x16,(%eax) 107b5c: e9 45 02 00 00 jmp 107da6 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 107b61: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107b65: 0f 95 45 bb setne -0x45(%ebp) const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 107b69: c7 45 bc 40 00 12 00 movl $0x120040,-0x44(%ebp) 107b70: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107b74: 74 06 je 107b7c 107b76: 8b 45 0c mov 0xc(%ebp),%eax 107b79: 89 45 bc mov %eax,-0x44(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 107b7c: 83 ca ff or $0xffffffff,%edx 107b7f: 31 c0 xor %eax,%eax 107b81: 89 d1 mov %edx,%ecx 107b83: 8b 7d 10 mov 0x10(%ebp),%edi 107b86: f2 ae repnz scas %es:(%edi),%al 107b88: f7 d1 not %ecx 107b8a: 89 4d c0 mov %ecx,-0x40(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107b8d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 107b94: 85 f6 test %esi,%esi 107b96: 74 0b je 107ba3 107b98: 89 d1 mov %edx,%ecx 107b9a: 89 f7 mov %esi,%edi 107b9c: f2 ae repnz scas %es:(%edi),%al 107b9e: f7 d1 not %ecx 107ba0: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t target_length = strlen( target ); 107ba3: 31 c0 xor %eax,%eax 107ba5: 83 c9 ff or $0xffffffff,%ecx 107ba8: 8b 7d bc mov -0x44(%ebp),%edi 107bab: f2 ae repnz scas %es:(%edi),%al 107bad: f7 d1 not %ecx 107baf: 49 dec %ecx 107bb0: 89 4d b4 mov %ecx,-0x4c(%ebp) size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 107bb3: 53 push %ebx 107bb4: 53 push %ebx 107bb5: 8b 55 c0 mov -0x40(%ebp),%edx 107bb8: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 107bbc: 03 45 c4 add -0x3c(%ebp),%eax 107bbf: 50 push %eax 107bc0: 6a 01 push $0x1 107bc2: e8 f5 f8 ff ff call 1074bc 107bc7: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 107bc9: 83 c4 10 add $0x10,%esp 107bcc: 85 c0 test %eax,%eax 107bce: 74 62 je 107c32 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 107bd0: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 107bd3: 52 push %edx 107bd4: 52 push %edx 107bd5: ff 75 10 pushl 0x10(%ebp) 107bd8: 57 push %edi 107bd9: e8 b6 b9 00 00 call 113594 mt_entry->type = str; 107bde: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 107be1: 03 7d c0 add -0x40(%ebp),%edi if ( source_or_null != NULL ) { 107be4: 83 c4 10 add $0x10,%esp 107be7: 85 f6 test %esi,%esi 107be9: 74 12 je 107bfd strcpy( str, source_or_null ); 107beb: 50 push %eax 107bec: 50 push %eax 107bed: 56 push %esi 107bee: 57 push %edi 107bef: e8 a0 b9 00 00 call 113594 mt_entry->dev = str; 107bf4: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 107bf7: 03 7d c4 add -0x3c(%ebp),%edi 107bfa: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 107bfd: 51 push %ecx 107bfe: 51 push %ecx 107bff: ff 75 bc pushl -0x44(%ebp) 107c02: 57 push %edi 107c03: e8 8c b9 00 00 call 113594 mt_entry->target = str; 107c08: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 107c0b: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107c0e: 8b 4d 14 mov 0x14(%ebp),%ecx 107c11: 89 4b 30 mov %ecx,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 107c14: 8d 7b 38 lea 0x38(%ebx),%edi 107c17: be 80 00 12 00 mov $0x120080,%esi 107c1c: b9 0c 00 00 00 mov $0xc,%ecx 107c21: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 107c23: 83 c4 10 add $0x10,%esp 107c26: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107c2a: 0f 84 bf 00 00 00 je 107cef 107c30: eb 10 jmp 107c42 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c32: e8 e9 ad 00 00 call 112a20 <__errno> <== NOT EXECUTED 107c37: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c3d: e9 64 01 00 00 jmp 107da6 <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 107c42: 83 ec 0c sub $0xc,%esp 107c45: 6a 01 push $0x1 107c47: 8d 75 d4 lea -0x2c(%ebp),%esi 107c4a: 56 push %esi 107c4b: 6a 07 push $0x7 107c4d: ff 75 b4 pushl -0x4c(%ebp) 107c50: ff 75 0c pushl 0xc(%ebp) 107c53: e8 d9 f9 ff ff call 107631 107c58: 83 c4 20 add $0x20,%esp 107c5b: 40 inc %eax 107c5c: 0f 84 16 01 00 00 je 107d78 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 107c62: 8b 45 e0 mov -0x20(%ebp),%eax 107c65: 8b 40 10 mov 0x10(%eax),%eax 107c68: 85 c0 test %eax,%eax 107c6a: 74 61 je 107ccd <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 107c6c: 83 ec 0c sub $0xc,%esp 107c6f: 56 push %esi 107c70: ff d0 call *%eax 107c72: 83 c4 10 add $0x10,%esp 107c75: 48 dec %eax 107c76: 74 10 je 107c88 errno = ENOTDIR; 107c78: e8 a3 ad 00 00 call 112a20 <__errno> 107c7d: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107c83: e9 f2 00 00 00 jmp 107d7a /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 107c88: 52 push %edx 107c89: 52 push %edx 107c8a: ff 75 d4 pushl -0x2c(%ebp) 107c8d: 68 c0 7a 10 00 push $0x107ac0 107c92: e8 3a fe ff ff call 107ad1 107c97: 83 c4 10 add $0x10,%esp 107c9a: 84 c0 test %al,%al 107c9c: 74 10 je 107cae errno = EBUSY; 107c9e: e8 7d ad 00 00 call 112a20 <__errno> 107ca3: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 107ca9: e9 cc 00 00 00 jmp 107d7a * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 107cae: 8b 45 d4 mov -0x2c(%ebp),%eax 107cb1: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 107cb4: 8b 45 dc mov -0x24(%ebp),%eax 107cb7: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 107cba: 8b 45 e0 mov -0x20(%ebp),%eax 107cbd: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 107cc0: 8b 55 e4 mov -0x1c(%ebp),%edx 107cc3: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 107cc6: 8b 40 20 mov 0x20(%eax),%eax 107cc9: 85 c0 test %eax,%eax 107ccb: 75 10 jne 107cdd <== ALWAYS TAKEN errno = ENOTSUP; 107ccd: e8 4e ad 00 00 call 112a20 <__errno> <== NOT EXECUTED 107cd2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107cd8: e9 9d 00 00 00 jmp 107d7a <== NOT EXECUTED } if ( loc.ops->mount_h( mt_entry ) ) { 107cdd: 83 ec 0c sub $0xc,%esp 107ce0: 53 push %ebx 107ce1: ff d0 call *%eax 107ce3: 83 c4 10 add $0x10,%esp 107ce6: 85 c0 test %eax,%eax 107ce8: 74 20 je 107d0a <== ALWAYS TAKEN 107cea: e9 8b 00 00 00 jmp 107d7a <== NOT EXECUTED 107cef: 31 f6 xor %esi,%esi 107cf1: 81 3d 34 3f 12 00 38 cmpl $0x123f38,0x123f34 107cf8: 3f 12 00 107cfb: 74 0d je 107d0a <== ALWAYS TAKEN } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 107cfd: e8 1e ad 00 00 call 112a20 <__errno> <== NOT EXECUTED 107d02: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107d08: eb 70 jmp 107d7a <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 107d0a: 50 push %eax 107d0b: 50 push %eax 107d0c: ff 75 18 pushl 0x18(%ebp) 107d0f: 53 push %ebx 107d10: ff 55 b0 call *-0x50(%ebp) 107d13: 83 c4 10 add $0x10,%esp 107d16: 85 c0 test %eax,%eax 107d18: 74 15 je 107d2f <== ALWAYS TAKEN /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 107d1a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107d1d: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 107d20: 85 c0 test %eax,%eax <== NOT EXECUTED 107d22: 74 56 je 107d7a <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 107d24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d27: 53 push %ebx <== NOT EXECUTED 107d28: ff d0 call *%eax <== NOT EXECUTED 107d2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d2d: eb 4b jmp 107d7a <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 107d2f: 57 push %edi 107d30: 6a 00 push $0x0 107d32: 6a 00 push $0x0 107d34: ff 35 c0 60 12 00 pushl 0x1260c0 107d3a: e8 a5 28 00 00 call 10a5e4 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107d3f: 59 pop %ecx 107d40: 5e pop %esi 107d41: 53 push %ebx 107d42: 68 34 3f 12 00 push $0x123f34 107d47: e8 fc 30 00 00 call 10ae48 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107d4c: 5a pop %edx 107d4d: ff 35 c0 60 12 00 pushl 0x1260c0 107d53: e8 78 29 00 00 call 10a6d0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107d58: 83 c4 10 add $0x10,%esp 107d5b: 31 c0 xor %eax,%eax 107d5d: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107d61: 75 46 jne 107da9 rtems_filesystem_root = mt_entry->mt_fs_root; 107d63: 8b 3d 54 3f 12 00 mov 0x123f54,%edi 107d69: 83 c7 18 add $0x18,%edi 107d6c: 8d 73 1c lea 0x1c(%ebx),%esi 107d6f: b9 05 00 00 00 mov $0x5,%ecx 107d74: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107d76: eb 31 jmp 107da9 107d78: 31 f6 xor %esi,%esi return 0; cleanup_and_bail: free( mt_entry ); 107d7a: 83 ec 0c sub $0xc,%esp 107d7d: 53 push %ebx 107d7e: e8 19 f9 ff ff call 10769c if ( loc_to_free ) 107d83: 83 c4 10 add $0x10,%esp 107d86: 85 f6 test %esi,%esi 107d88: 74 1c je 107da6 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 107d8a: 8b 46 0c mov 0xc(%esi),%eax 107d8d: 85 c0 test %eax,%eax 107d8f: 74 15 je 107da6 <== NEVER TAKEN 107d91: 8b 40 1c mov 0x1c(%eax),%eax 107d94: 85 c0 test %eax,%eax 107d96: 74 0e je 107da6 <== NEVER TAKEN 107d98: 83 ec 0c sub $0xc,%esp 107d9b: 56 push %esi 107d9c: ff d0 call *%eax 107d9e: 83 c8 ff or $0xffffffff,%eax 107da1: 83 c4 10 add $0x10,%esp 107da4: eb 03 jmp 107da9 107da6: 83 c8 ff or $0xffffffff,%eax return -1; } 107da9: 8d 65 f4 lea -0xc(%ebp),%esp 107dac: 5b pop %ebx 107dad: 5e pop %esi 107dae: 5f pop %edi 107daf: c9 leave 107db0: c3 ret =============================================================================== 0011edd0 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 11edd0: 55 push %ebp 11edd1: 89 e5 mov %esp,%ebp 11edd3: 56 push %esi 11edd4: 53 push %ebx 11edd5: 8b 75 08 mov 0x8(%ebp),%esi 11edd8: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 11eddb: 83 ec 0c sub $0xc,%esp 11edde: 56 push %esi 11eddf: e8 44 01 00 00 call 11ef28 <_Timespec_Is_valid> 11ede4: 83 c4 10 add $0x10,%esp 11ede7: 84 c0 test %al,%al 11ede9: 74 0b je 11edf6 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 11edeb: 83 3e 00 cmpl $0x0,(%esi) 11edee: 78 06 js 11edf6 <== NEVER TAKEN 11edf0: 83 7e 04 00 cmpl $0x0,0x4(%esi) 11edf4: 79 10 jns 11ee06 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11edf6: e8 35 40 ff ff call 112e30 <__errno> 11edfb: c7 00 16 00 00 00 movl $0x16,(%eax) 11ee01: e9 c4 00 00 00 jmp 11eeca ticks = _Timespec_To_ticks( rqtp ); 11ee06: 83 ec 0c sub $0xc,%esp 11ee09: 56 push %esi 11ee0a: e8 5d 1f ff ff call 110d6c <_Timespec_To_ticks> 11ee0f: 89 c6 mov %eax,%esi * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 11ee11: 83 c4 10 add $0x10,%esp 11ee14: 85 c0 test %eax,%eax 11ee16: 75 2f jne 11ee47 11ee18: a1 70 72 12 00 mov 0x127270,%eax 11ee1d: 40 inc %eax 11ee1e: a3 70 72 12 00 mov %eax,0x127270 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 11ee23: e8 6c e3 fe ff call 10d194 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 11ee28: e8 78 d8 fe ff call 10c6a5 <_Thread_Enable_dispatch> if ( rmtp ) { 11ee2d: 85 db test %ebx,%ebx 11ee2f: 0f 84 9a 00 00 00 je 11eecf rmtp->tv_sec = 0; 11ee35: c7 03 00 00 00 00 movl $0x0,(%ebx) rmtp->tv_nsec = 0; 11ee3b: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 11ee42: e9 88 00 00 00 jmp 11eecf 11ee47: a1 70 72 12 00 mov 0x127270,%eax 11ee4c: 40 inc %eax 11ee4d: a3 70 72 12 00 mov %eax,0x127270 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 11ee52: 52 push %edx 11ee53: 52 push %edx 11ee54: 68 08 00 00 10 push $0x10000008 11ee59: ff 35 2c 73 12 00 pushl 0x12732c 11ee5f: e8 50 e0 fe ff call 10ceb4 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 11ee64: 8b 15 2c 73 12 00 mov 0x12732c,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 11ee6a: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11ee6d: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 11ee74: c7 42 64 28 c5 10 00 movl $0x10c528,0x64(%edx) the_watchdog->id = id; 11ee7b: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 11ee7e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11ee85: 89 72 54 mov %esi,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11ee88: 59 pop %ecx 11ee89: 58 pop %eax 11ee8a: 83 c2 48 add $0x48,%edx 11ee8d: 52 push %edx 11ee8e: 68 4c 73 12 00 push $0x12734c 11ee93: e8 5c e6 fe ff call 10d4f4 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 11ee98: e8 08 d8 fe ff call 10c6a5 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 11ee9d: 83 c4 10 add $0x10,%esp 11eea0: 85 db test %ebx,%ebx 11eea2: 74 2b je 11eecf ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 11eea4: a1 2c 73 12 00 mov 0x12732c,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 11eea9: 03 70 5c add 0x5c(%eax),%esi 11eeac: 2b 70 60 sub 0x60(%eax),%esi _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 11eeaf: 50 push %eax 11eeb0: 50 push %eax 11eeb1: 53 push %ebx 11eeb2: 56 push %esi 11eeb3: e8 48 00 00 00 call 11ef00 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 11eeb8: 83 c4 10 add $0x10,%esp 11eebb: 85 f6 test %esi,%esi 11eebd: 74 10 je 11eecf rtems_set_errno_and_return_minus_one( EINTR ); 11eebf: e8 6c 3f ff ff call 112e30 <__errno> 11eec4: c7 00 04 00 00 00 movl $0x4,(%eax) 11eeca: 83 c8 ff or $0xffffffff,%eax 11eecd: eb 02 jmp 11eed1 11eecf: 31 c0 xor %eax,%eax #endif } return 0; } 11eed1: 8d 65 f8 lea -0x8(%ebp),%esp 11eed4: 5b pop %ebx 11eed5: 5e pop %esi 11eed6: c9 leave 11eed7: c3 ret =============================================================================== 00107dbc : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 107dbc: 55 push %ebp 107dbd: 89 e5 mov %esp,%ebp 107dbf: 57 push %edi 107dc0: 56 push %esi 107dc1: 53 push %ebx 107dc2: 83 ec 0c sub $0xc,%esp 107dc5: 8b 7d 08 mov 0x8(%ebp),%edi 107dc8: 8b 75 0c mov 0xc(%ebp),%esi /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 107dcb: 39 f7 cmp %esi,%edi 107dcd: 75 08 jne 107dd7 ptr = _REENT; 107dcf: 8b 1d 40 40 12 00 mov 0x124040,%ebx 107dd5: eb 06 jmp 107ddd } else { ptr = deleted_task->libc_reent; 107dd7: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 107ddd: 85 db test %ebx,%ebx 107ddf: 74 20 je 107e01 <== NEVER TAKEN 107de1: 3b 1d 80 0e 12 00 cmp 0x120e80,%ebx 107de7: 74 18 je 107e01 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 107de9: 50 push %eax 107dea: 50 push %eax 107deb: 68 21 7e 10 00 push $0x107e21 107df0: 53 push %ebx 107df1: e8 da b3 00 00 call 1131d0 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 107df6: 89 1c 24 mov %ebx,(%esp) 107df9: e8 2f 55 00 00 call 10d32d <_Workspace_Free> 107dfe: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 107e01: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi) 107e08: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 107e0b: 39 f7 cmp %esi,%edi 107e0d: 75 0a jne 107e19 _REENT = 0; 107e0f: c7 05 40 40 12 00 00 movl $0x0,0x124040 107e16: 00 00 00 } } 107e19: 8d 65 f4 lea -0xc(%ebp),%esp 107e1c: 5b pop %ebx 107e1d: 5e pop %esi 107e1e: 5f pop %edi 107e1f: c9 leave 107e20: c3 ret =============================================================================== 00107e21 : */ int newlib_free_buffers( FILE *fp ) { 107e21: 55 push %ebp 107e22: 89 e5 mov %esp,%ebp 107e24: 53 push %ebx 107e25: 83 ec 10 sub $0x10,%esp 107e28: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 107e2b: 53 push %ebx 107e2c: e8 a7 af 00 00 call 112dd8 107e31: 83 c4 10 add $0x10,%esp 107e34: 83 f8 02 cmp $0x2,%eax 107e37: 77 26 ja 107e5f <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 107e39: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 107e3d: 79 2c jns 107e6b <== ALWAYS TAKEN free( fp->_bf._base ); 107e3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e42: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 107e45: e8 52 f8 ff ff call 10769c <== NOT EXECUTED fp->_flags &= ~__SMBF; 107e4a: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 107e50: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 107e56: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 107e5d: eb 09 jmp 107e68 <== NOT EXECUTED } break; default: fclose(fp); 107e5f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e62: 53 push %ebx <== NOT EXECUTED 107e63: e8 04 ad 00 00 call 112b6c <== NOT EXECUTED 107e68: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107e6b: 31 c0 xor %eax,%eax 107e6d: 8b 5d fc mov -0x4(%ebp),%ebx 107e70: c9 leave 107e71: c3 ret =============================================================================== 001078d0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1078d0: 55 push %ebp 1078d1: 89 e5 mov %esp,%ebp 1078d3: 53 push %ebx 1078d4: 83 ec 04 sub $0x4,%esp 1078d7: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 1078da: 80 3d 20 7e 12 00 00 cmpb $0x0,0x127e20 1078e1: 75 2b jne 10790e initialized = 1; 1078e3: c6 05 20 7e 12 00 01 movb $0x1,0x127e20 status = rtems_io_register_name( 1078ea: 50 push %eax 1078eb: 6a 00 push $0x0 1078ed: 53 push %ebx 1078ee: 68 40 17 12 00 push $0x121740 1078f3: e8 a5 05 00 00 call 107e9d "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1078f8: 83 c4 10 add $0x10,%esp 1078fb: 85 c0 test %eax,%eax 1078fd: 74 09 je 107908 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 1078ff: 83 ec 0c sub $0xc,%esp 107902: 50 push %eax <== NOT EXECUTED 107903: e8 dc 3f 00 00 call 10b8e4 <== NOT EXECUTED NULL_major = major; 107908: 89 1d 58 81 12 00 mov %ebx,0x128158 } 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 1078c2: 89 50 18 mov %edx,0x18(%eax) return NULL_SUCCESSFUL; } 1078c5: 31 c0 xor %eax,%eax 1078c7: c9 leave 1078c8: c3 ret =============================================================================== 0010814c : int open( const char *pathname, int flags, ... ) { 10814c: 55 push %ebp 10814d: 89 e5 mov %esp,%ebp 10814f: 57 push %edi 108150: 56 push %esi 108151: 53 push %ebx 108152: 83 ec 3c sub $0x3c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108155: 8b 45 0c mov 0xc(%ebp),%eax 108158: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108159: 89 c6 mov %eax,%esi 10815b: 83 e6 01 and $0x1,%esi 10815e: f7 de neg %esi 108160: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 108163: a8 02 test $0x2,%al 108165: 74 03 je 10816a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108167: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 10816a: 8b 45 10 mov 0x10(%ebp),%eax 10816d: 89 45 c4 mov %eax,-0x3c(%ebp) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 108170: e8 fa 6d 00 00 call 10ef6f 108175: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 108177: bf 17 00 00 00 mov $0x17,%edi 10817c: 85 c0 test %eax,%eax 10817e: 0f 84 a8 01 00 00 je 10832c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108184: 83 c9 ff or $0xffffffff,%ecx 108187: 8b 7d 08 mov 0x8(%ebp),%edi 10818a: 31 c0 xor %eax,%eax 10818c: f2 ae repnz scas %es:(%edi),%al 10818e: f7 d1 not %ecx 108190: 49 dec %ecx 108191: 83 ec 0c sub $0xc,%esp 108194: 6a 01 push $0x1 108196: 8d 45 d4 lea -0x2c(%ebp),%eax 108199: 50 push %eax 10819a: 56 push %esi 10819b: 51 push %ecx 10819c: ff 75 08 pushl 0x8(%ebp) 10819f: e8 8d f4 ff ff call 107631 1081a4: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1081a6: 83 c4 20 add $0x20,%esp 1081a9: 83 f8 ff cmp $0xffffffff,%eax 1081ac: 75 7a jne 108228 if ( errno != ENOENT ) { 1081ae: e8 6d a8 00 00 call 112a20 <__errno> 1081b3: 83 38 02 cmpl $0x2,(%eax) 1081b6: 75 2f jne 1081e7 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1081b8: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1081bf: 75 0c jne 1081cd 1081c1: 31 f6 xor %esi,%esi 1081c3: bf 02 00 00 00 mov $0x2,%edi 1081c8: e9 34 01 00 00 jmp 108301 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1081cd: 6a 00 push $0x0 1081cf: 6a 00 push $0x0 1081d1: 8b 45 c4 mov -0x3c(%ebp),%eax 1081d4: 80 cc 80 or $0x80,%ah 1081d7: 50 push %eax 1081d8: ff 75 08 pushl 0x8(%ebp) 1081db: e8 1c f8 ff ff call 1079fc if ( rc ) { 1081e0: 83 c4 10 add $0x10,%esp 1081e3: 85 c0 test %eax,%eax 1081e5: 74 0e je 1081f5 <== ALWAYS TAKEN rc = errno; 1081e7: e8 34 a8 00 00 call 112a20 <__errno> 1081ec: 8b 38 mov (%eax),%edi 1081ee: 31 f6 xor %esi,%esi goto done; 1081f0: e9 08 01 00 00 jmp 1082fd } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1081f5: 89 f1 mov %esi,%ecx 1081f7: 8b 7d 08 mov 0x8(%ebp),%edi 1081fa: 31 c0 xor %eax,%eax 1081fc: f2 ae repnz scas %es:(%edi),%al 1081fe: f7 d1 not %ecx 108200: 49 dec %ecx 108201: 83 ec 0c sub $0xc,%esp 108204: 6a 01 push $0x1 108206: 8d 45 d4 lea -0x2c(%ebp),%eax 108209: 50 push %eax 10820a: 6a 00 push $0x0 10820c: 51 push %ecx 10820d: ff 75 08 pushl 0x8(%ebp) 108210: e8 1c f4 ff ff call 107631 if ( status != 0 ) { /* The file did not exist */ 108215: 83 c4 20 add $0x20,%esp 108218: 85 c0 test %eax,%eax 10821a: 74 28 je 108244 <== ALWAYS TAKEN 10821c: 31 f6 xor %esi,%esi 10821e: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED 108223: e9 d9 00 00 00 jmp 108301 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108228: 8b 45 0c mov 0xc(%ebp),%eax 10822b: 25 00 0a 00 00 and $0xa00,%eax 108230: 3d 00 0a 00 00 cmp $0xa00,%eax 108235: 75 0d jne 108244 108237: 8d 75 d4 lea -0x2c(%ebp),%esi 10823a: bf 11 00 00 00 mov $0x11,%edi 10823f: e9 bd 00 00 00 jmp 108301 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 108244: 8b 45 dc mov -0x24(%ebp),%eax 108247: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 10824a: 8b 45 d4 mov -0x2c(%ebp),%eax 10824d: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 108250: 8b 73 14 mov 0x14(%ebx),%esi 108253: 83 ec 0c sub $0xc,%esp 108256: ff 75 0c pushl 0xc(%ebp) 108259: e8 9c 6d 00 00 call 10effa 10825e: 09 f0 or %esi,%eax 108260: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 108263: 8d 7b 18 lea 0x18(%ebx),%edi 108266: 8d 75 d4 lea -0x2c(%ebp),%esi 108269: b9 05 00 00 00 mov $0x5,%ecx 10826e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 108270: 8b 43 3c mov 0x3c(%ebx),%eax 108273: 83 c4 10 add $0x10,%esp 108276: 85 c0 test %eax,%eax 108278: 0f 84 cd 00 00 00 je 10834b <== NEVER TAKEN 10827e: 8b 00 mov (%eax),%eax 108280: 85 c0 test %eax,%eax 108282: 0f 84 c3 00 00 00 je 10834b <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 108288: ff 75 c4 pushl -0x3c(%ebp) 10828b: ff 75 0c pushl 0xc(%ebp) 10828e: ff 75 08 pushl 0x8(%ebp) 108291: 53 push %ebx 108292: ff d0 call *%eax if ( rc ) { 108294: 83 c4 10 add $0x10,%esp 108297: 85 c0 test %eax,%eax 108299: 74 0c je 1082a7 rc = errno; 10829b: e8 80 a7 00 00 call 112a20 <__errno> 1082a0: 8b 38 mov (%eax),%edi 1082a2: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; 1082a5: eb 56 jmp 1082fd /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1082a7: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1082ae: 0f 84 84 00 00 00 je 108338 rc = ftruncate( iop - rtems_libio_iops, 0 ); 1082b4: 50 push %eax 1082b5: 6a 00 push $0x0 1082b7: 6a 00 push $0x0 1082b9: 89 d8 mov %ebx,%eax 1082bb: 2b 05 b8 60 12 00 sub 0x1260b8,%eax 1082c1: c1 f8 06 sar $0x6,%eax 1082c4: 50 push %eax 1082c5: e8 72 6a 00 00 call 10ed3c 1082ca: 89 c7 mov %eax,%edi if ( rc ) { 1082cc: 83 c4 10 add $0x10,%esp 1082cf: 85 c0 test %eax,%eax 1082d1: 74 65 je 108338 <== ALWAYS TAKEN if(errno) rc = errno; 1082d3: e8 48 a7 00 00 call 112a20 <__errno> <== NOT EXECUTED 1082d8: 83 38 00 cmpl $0x0,(%eax) <== NOT EXECUTED 1082db: 74 07 je 1082e4 <== NOT EXECUTED 1082dd: e8 3e a7 00 00 call 112a20 <__errno> <== NOT EXECUTED 1082e2: 8b 38 mov (%eax),%edi <== NOT EXECUTED close( iop - rtems_libio_iops ); 1082e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1082e7: 2b 1d b8 60 12 00 sub 0x1260b8,%ebx <== NOT EXECUTED 1082ed: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 1082f0: 53 push %ebx <== NOT EXECUTED 1082f1: e8 be 69 00 00 call 10ecb4 <== NOT EXECUTED 1082f6: 31 f6 xor %esi,%esi <== NOT EXECUTED 1082f8: 31 db xor %ebx,%ebx <== NOT EXECUTED 1082fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1082fd: 85 ff test %edi,%edi 1082ff: 74 37 je 108338 <== NEVER TAKEN if ( iop ) 108301: 85 db test %ebx,%ebx 108303: 74 0c je 108311 <== NEVER TAKEN rtems_libio_free( iop ); 108305: 83 ec 0c sub $0xc,%esp 108308: 53 push %ebx 108309: e8 0c 6c 00 00 call 10ef1a 10830e: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108311: 85 f6 test %esi,%esi 108313: 74 17 je 10832c rtems_filesystem_freenode( loc_to_free ); 108315: 8b 46 0c mov 0xc(%esi),%eax 108318: 85 c0 test %eax,%eax 10831a: 74 10 je 10832c <== NEVER TAKEN 10831c: 8b 40 1c mov 0x1c(%eax),%eax 10831f: 85 c0 test %eax,%eax 108321: 74 09 je 10832c <== NEVER TAKEN 108323: 83 ec 0c sub $0xc,%esp 108326: 56 push %esi 108327: ff d0 call *%eax 108329: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( rc ); 10832c: e8 ef a6 00 00 call 112a20 <__errno> 108331: 89 38 mov %edi,(%eax) 108333: 83 c8 ff or $0xffffffff,%eax 108336: eb 0b jmp 108343 } return iop - rtems_libio_iops; 108338: 89 d8 mov %ebx,%eax 10833a: 2b 05 b8 60 12 00 sub 0x1260b8,%eax 108340: c1 f8 06 sar $0x6,%eax } 108343: 8d 65 f4 lea -0xc(%ebp),%esp 108346: 5b pop %ebx 108347: 5e pop %esi 108348: 5f pop %edi 108349: c9 leave 10834a: c3 ret if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 10834b: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 10834e: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED 108353: eb ac jmp 108301 <== NOT EXECUTED =============================================================================== 001080ec : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1080ec: 55 push %ebp 1080ed: 89 e5 mov %esp,%ebp 1080ef: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1080f2: 6a 00 push $0x0 1080f4: 6a 00 push $0x0 1080f6: 68 6a ea 11 00 push $0x11ea6a 1080fb: e8 4c 00 00 00 call 10814c 108100: 83 c4 10 add $0x10,%esp 108103: 40 inc %eax 108104: 74 41 je 108147 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108106: 52 push %edx 108107: 6a 00 push $0x0 108109: 6a 01 push $0x1 10810b: 68 6a ea 11 00 push $0x11ea6a 108110: e8 37 00 00 00 call 10814c 108115: 83 c4 10 add $0x10,%esp 108118: 40 inc %eax 108119: 75 0a jne 108125 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 10811b: 83 ec 0c sub $0xc,%esp 10811e: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 108123: eb 1d jmp 108142 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 108125: 50 push %eax 108126: 6a 00 push $0x0 108128: 6a 01 push $0x1 10812a: 68 6a ea 11 00 push $0x11ea6a 10812f: e8 18 00 00 00 call 10814c 108134: 83 c4 10 add $0x10,%esp 108137: 40 inc %eax 108138: 75 0d jne 108147 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 10813a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10813d: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 108142: e8 5d 2a 00 00 call 10aba4 <== NOT EXECUTED } 108147: c9 leave 108148: c3 ret =============================================================================== 00108b39 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 108b39: 55 push %ebp 108b3a: 89 e5 mov %esp,%ebp 108b3c: 56 push %esi 108b3d: 53 push %ebx 108b3e: 83 ec 10 sub $0x10,%esp 108b41: 89 d3 mov %edx,%ebx 108b43: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 108b46: 8b 52 34 mov 0x34(%edx),%edx 108b49: f6 c2 01 test $0x1,%dl 108b4c: 0f 84 ee 00 00 00 je 108c40 <== NEVER TAKEN switch (c) { 108b52: 3c 09 cmp $0x9,%al 108b54: 74 76 je 108bcc 108b56: 77 0d ja 108b65 <== ALWAYS TAKEN 108b58: 3c 08 cmp $0x8,%al <== NOT EXECUTED 108b5a: 0f 85 ab 00 00 00 jne 108c0b <== NOT EXECUTED 108b60: e9 99 00 00 00 jmp 108bfe <== NOT EXECUTED 108b65: 3c 0a cmp $0xa,%al 108b67: 74 0a je 108b73 108b69: 3c 0d cmp $0xd,%al 108b6b: 0f 85 9a 00 00 00 jne 108c0b <== ALWAYS TAKEN 108b71: eb 33 jmp 108ba6 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 108b73: 80 e2 20 and $0x20,%dl 108b76: 74 07 je 108b7f <== ALWAYS TAKEN tty->column = 0; 108b78: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 108b7f: f6 43 34 04 testb $0x4,0x34(%ebx) 108b83: 0f 84 b7 00 00 00 je 108c40 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 108b89: 56 push %esi 108b8a: 53 push %ebx 108b8b: 6a 01 push $0x1 108b8d: 68 b0 00 12 00 push $0x1200b0 108b92: e8 82 fe ff ff call 108a19 tty->column = 0; 108b97: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) 108b9e: 83 c4 10 add $0x10,%esp 108ba1: e9 9a 00 00 00 jmp 108c40 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 108ba6: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 108ba9: 74 0a je 108bb5 <== NOT EXECUTED 108bab: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED 108baf: 0f 84 9b 00 00 00 je 108c50 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 108bb5: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 108bb8: 74 09 je 108bc3 <== NOT EXECUTED c = '\n'; 108bba: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 108bbe: 80 e2 20 and $0x20,%dl <== NOT EXECUTED 108bc1: 74 7d je 108c40 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 108bc3: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED break; 108bca: eb 74 jmp 108c40 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 108bcc: 8b 4b 28 mov 0x28(%ebx),%ecx 108bcf: 89 ce mov %ecx,%esi 108bd1: 83 e6 07 and $0x7,%esi 108bd4: b8 08 00 00 00 mov $0x8,%eax 108bd9: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 108bdb: 81 e2 00 18 00 00 and $0x1800,%edx 108be1: 81 fa 00 18 00 00 cmp $0x1800,%edx 108be7: 8d 14 08 lea (%eax,%ecx,1),%edx 108bea: 75 0d jne 108bf9 <== NEVER TAKEN tty->column += i; 108bec: 89 53 28 mov %edx,0x28(%ebx) rtems_termios_puts ( " ", i, tty); 108bef: 51 push %ecx 108bf0: 53 push %ebx 108bf1: 50 push %eax 108bf2: 68 e4 fc 11 00 push $0x11fce4 108bf7: eb 4f jmp 108c48 return; } tty->column += i; 108bf9: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED break; 108bfc: eb 42 jmp 108c40 <== NOT EXECUTED case '\b': if (tty->column > 0) 108bfe: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108c01: 85 c0 test %eax,%eax <== NOT EXECUTED 108c03: 7e 3b jle 108c40 <== NOT EXECUTED tty->column--; 108c05: 48 dec %eax <== NOT EXECUTED 108c06: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 108c09: eb 35 jmp 108c40 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 108c0b: 80 e2 02 and $0x2,%dl 108c0e: 74 1c je 108c2c <== ALWAYS TAKEN c = toupper(c); 108c10: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108c13: 8b 15 20 40 12 00 mov 0x124020,%edx <== NOT EXECUTED 108c19: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED 108c1e: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108c21: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 108c24: 75 03 jne 108c29 <== NOT EXECUTED 108c26: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED 108c29: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED if (!iscntrl(c)) 108c2c: 0f b6 45 f4 movzbl -0xc(%ebp),%eax 108c30: 8b 15 20 40 12 00 mov 0x124020,%edx 108c36: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1) 108c3b: 75 03 jne 108c40 <== NEVER TAKEN tty->column++; 108c3d: ff 43 28 incl 0x28(%ebx) break; } } rtems_termios_puts (&c, 1, tty); 108c40: 52 push %edx 108c41: 53 push %ebx 108c42: 6a 01 push $0x1 108c44: 8d 45 f4 lea -0xc(%ebp),%eax 108c47: 50 push %eax 108c48: e8 cc fd ff ff call 108a19 108c4d: 83 c4 10 add $0x10,%esp } 108c50: 8d 65 f8 lea -0x8(%ebp),%esp 108c53: 5b pop %ebx 108c54: 5e pop %esi 108c55: c9 leave 108c56: c3 ret =============================================================================== 001115dc : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 1115dc: 55 push %ebp 1115dd: 89 e5 mov %esp,%ebp 1115df: 57 push %edi 1115e0: 56 push %esi 1115e1: 53 push %ebx 1115e2: 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) 1115e5: 6a 01 push $0x1 1115e7: 8d 5d c4 lea -0x3c(%ebp),%ebx 1115ea: 53 push %ebx 1115eb: 6a 07 push $0x7 1115ed: 6a 03 push $0x3 1115ef: 68 cc 0a 12 00 push $0x120acc 1115f4: e8 38 60 ff ff call 107631 1115f9: 83 c4 20 add $0x20,%esp 1115fc: 85 c0 test %eax,%eax 1115fe: 74 2b je 11162b <== NEVER TAKEN != 0) { if (errno != ENOENT) 111600: e8 1b 14 00 00 call 112a20 <__errno> 111605: 83 38 02 cmpl $0x2,(%eax) 111608: 0f 85 0c 01 00 00 jne 11171a <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 11160e: 50 push %eax 11160f: 50 push %eax 111610: 68 ff 03 00 00 push $0x3ff 111615: 68 cc 0a 12 00 push $0x120acc 11161a: e8 c1 63 ff ff call 1079e0 11161f: 83 c4 10 add $0x10,%esp 111622: 85 c0 test %eax,%eax 111624: 74 1c je 111642 <== ALWAYS TAKEN 111626: e9 ef 00 00 00 jmp 11171a <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 11162b: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 11162e: 85 c0 test %eax,%eax <== NOT EXECUTED 111630: 74 10 je 111642 <== NOT EXECUTED 111632: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 111635: 85 c0 test %eax,%eax <== NOT EXECUTED 111637: 74 09 je 111642 <== NOT EXECUTED 111639: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11163c: 53 push %ebx <== NOT EXECUTED 11163d: ff d0 call *%eax <== NOT EXECUTED 11163f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 111642: 8d 5d d9 lea -0x27(%ebp),%ebx 111645: be d1 0a 12 00 mov $0x120ad1,%esi 11164a: b9 0a 00 00 00 mov $0xa,%ecx 11164f: 89 df mov %ebx,%edi 111651: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 111653: 0f b7 05 c0 5e 12 00 movzwl 0x125ec0,%eax 11165a: 8d 50 01 lea 0x1(%eax),%edx 11165d: 66 89 15 c0 5e 12 00 mov %dx,0x125ec0 111664: 57 push %edi 111665: 50 push %eax 111666: 68 dc 0a 12 00 push $0x120adc 11166b: 8d 45 e3 lea -0x1d(%ebp),%eax 11166e: 50 push %eax 11166f: e8 40 1d 00 00 call 1133b4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 111674: 59 pop %ecx 111675: 5e pop %esi 111676: 68 80 01 00 00 push $0x180 11167b: 53 push %ebx 11167c: e8 73 06 00 00 call 111cf4 111681: 83 c4 10 add $0x10,%esp 111684: 85 c0 test %eax,%eax 111686: 74 0a je 111692 <== ALWAYS TAKEN if (errno != EEXIST){ 111688: e8 93 13 00 00 call 112a20 <__errno> <== NOT EXECUTED 11168d: e9 88 00 00 00 jmp 11171a <== 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); 111692: 52 push %edx 111693: 52 push %edx 111694: 68 00 40 00 00 push $0x4000 111699: 53 push %ebx 11169a: e8 ad 6a ff ff call 10814c 11169f: 8b 55 08 mov 0x8(%ebp),%edx 1116a2: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 1116a4: 83 c4 10 add $0x10,%esp 1116a7: 85 c0 test %eax,%eax 1116a9: 79 0d jns 1116b8 <== NEVER TAKEN err = errno; 1116ab: e8 70 13 00 00 call 112a20 <__errno> 1116b0: 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); 1116b2: 83 ec 0c sub $0xc,%esp 1116b5: 53 push %ebx 1116b6: eb 53 jmp 11170b } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 1116b8: 31 d2 xor %edx,%edx <== NOT EXECUTED 1116ba: 3b 05 44 21 12 00 cmp 0x122144,%eax <== NOT EXECUTED 1116c0: 73 0b jae 1116cd <== NOT EXECUTED 1116c2: 89 c2 mov %eax,%edx <== NOT EXECUTED 1116c4: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 1116c7: 03 15 b8 60 12 00 add 0x1260b8,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 1116cd: 83 62 14 fe andl $0xfffffffe,0x14(%edx) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 1116d1: 50 push %eax <== NOT EXECUTED 1116d2: 50 push %eax <== NOT EXECUTED 1116d3: 6a 01 push $0x1 <== NOT EXECUTED 1116d5: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 1116d8: 50 push %eax <== NOT EXECUTED 1116d9: e8 6e 6a ff ff call 10814c <== NOT EXECUTED 1116de: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1116e1: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 1116e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1116e7: 31 f6 xor %esi,%esi <== NOT EXECUTED 1116e9: 85 c0 test %eax,%eax <== NOT EXECUTED 1116eb: 79 17 jns 111704 <== NOT EXECUTED err = errno; 1116ed: e8 2e 13 00 00 call 112a20 <__errno> <== NOT EXECUTED 1116f2: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 1116f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1116f7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1116fa: ff 30 pushl (%eax) <== NOT EXECUTED 1116fc: e8 b3 d5 ff ff call 10ecb4 <== NOT EXECUTED 111701: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } unlink(fifopath); 111704: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111707: 8d 45 d9 lea -0x27(%ebp),%eax <== NOT EXECUTED 11170a: 50 push %eax <== NOT EXECUTED 11170b: e8 00 06 00 00 call 111d10 111710: 83 c4 10 add $0x10,%esp } rtems_set_errno_and_return_minus_one(err); 111713: e8 08 13 00 00 call 112a20 <__errno> 111718: 89 30 mov %esi,(%eax) } 11171a: 83 c8 ff or $0xffffffff,%eax 11171d: 8d 65 f4 lea -0xc(%ebp),%esp 111720: 5b pop %ebx 111721: 5e pop %esi 111722: 5f pop %edi 111723: c9 leave 111724: c3 ret =============================================================================== 0010db08 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 10db08: 55 push %ebp <== NOT EXECUTED 10db09: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10db0b: 53 push %ebx <== NOT EXECUTED 10db0c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10db0f: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 10db11: ff 70 2c pushl 0x2c(%eax) <== NOT EXECUTED 10db14: e8 f7 1e 00 00 call 10fa10 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10db19: 59 pop %ecx <== NOT EXECUTED 10db1a: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10db1d: e8 ee 1e 00 00 call 10fa10 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10db22: 5a pop %edx <== NOT EXECUTED 10db23: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10db26: e8 29 ca ff ff call 10a554 <== NOT EXECUTED free(pipe->Buffer); 10db2b: 58 pop %eax <== NOT EXECUTED 10db2c: ff 33 pushl (%ebx) <== NOT EXECUTED 10db2e: e8 69 9b ff ff call 10769c <== NOT EXECUTED free(pipe); 10db33: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10db36: e8 61 9b ff ff call 10769c <== NOT EXECUTED 10db3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10db3e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10db41: c9 leave <== NOT EXECUTED 10db42: c3 ret <== NOT EXECUTED =============================================================================== 0010d7a7 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10d7a7: 55 push %ebp <== NOT EXECUTED 10d7a8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d7aa: 56 push %esi <== NOT EXECUTED 10d7ab: 53 push %ebx <== NOT EXECUTED 10d7ac: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10d7af: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED if (cmd == FIONREAD) { 10d7b2: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED 10d7b7: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10d7be: 75 36 jne 10d7f6 <== NOT EXECUTED if (buffer == NULL) 10d7c0: b0 f2 mov $0xf2,%al <== NOT EXECUTED 10d7c2: 85 f6 test %esi,%esi <== NOT EXECUTED 10d7c4: 74 30 je 10d7f6 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10d7c6: 50 push %eax <== NOT EXECUTED 10d7c7: 6a 00 push $0x0 <== NOT EXECUTED 10d7c9: 6a 00 push $0x0 <== NOT EXECUTED 10d7cb: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d7ce: e8 11 ce ff ff call 10a5e4 <== NOT EXECUTED 10d7d3: 89 c2 mov %eax,%edx <== NOT EXECUTED 10d7d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d7d8: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10d7dd: 85 d2 test %edx,%edx <== NOT EXECUTED 10d7df: 75 15 jne 10d7f6 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 10d7e1: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10d7e4: 89 06 mov %eax,(%esi) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d7e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d7e9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d7ec: e8 df ce ff ff call 10a6d0 <== NOT EXECUTED 10d7f1: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10d7f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return -EINVAL; } 10d7f6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10d7f9: 5b pop %ebx <== NOT EXECUTED 10d7fa: 5e pop %esi <== NOT EXECUTED 10d7fb: c9 leave <== NOT EXECUTED 10d7fc: c3 ret <== NOT EXECUTED =============================================================================== 0010d750 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10d750: 55 push %ebp <== NOT EXECUTED 10d751: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10d753: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10d758: c9 leave <== NOT EXECUTED 10d759: c3 ret <== NOT EXECUTED =============================================================================== 0010d7fd : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10d7fd: 55 push %ebp <== NOT EXECUTED 10d7fe: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d800: 57 push %edi <== NOT EXECUTED 10d801: 56 push %esi <== NOT EXECUTED 10d802: 53 push %ebx <== NOT EXECUTED 10d803: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10d806: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10d809: 6a 00 push $0x0 <== NOT EXECUTED 10d80b: 6a 00 push $0x0 <== NOT EXECUTED 10d80d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d810: e8 cf cd ff ff call 10a5e4 <== NOT EXECUTED 10d815: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d818: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d81f: 85 c0 test %eax,%eax <== NOT EXECUTED 10d821: 0f 84 08 01 00 00 je 10d92f <== NOT EXECUTED 10d827: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10d82e: e9 21 01 00 00 jmp 10d954 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10d833: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10d837: 0f 84 fe 00 00 00 je 10d93b <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10d83d: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d840: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10d844: 74 0a je 10d850 <== NOT EXECUTED 10d846: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10d84b: e9 ed 00 00 00 jmp 10d93d <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10d850: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d853: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d856: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d859: e8 72 ce ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10d85e: 59 pop %ecx <== NOT EXECUTED 10d85f: 5e pop %esi <== NOT EXECUTED 10d860: 6a 00 push $0x0 <== NOT EXECUTED 10d862: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10d865: e8 86 22 00 00 call 10faf0 <== NOT EXECUTED 10d86a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10d86d: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10d870: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10d872: f7 d6 not %esi <== NOT EXECUTED 10d874: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10d877: 6a 00 push $0x0 <== NOT EXECUTED 10d879: 6a 00 push $0x0 <== NOT EXECUTED 10d87b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d87e: e8 61 cd ff ff call 10a5e4 <== NOT EXECUTED 10d883: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d886: 85 c0 test %eax,%eax <== NOT EXECUTED 10d888: 74 0a je 10d894 <== NOT EXECUTED 10d88a: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10d88f: e9 b7 00 00 00 jmp 10d94b <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10d894: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10d897: 85 f6 test %esi,%esi <== NOT EXECUTED 10d899: 0f 85 9e 00 00 00 jne 10d93d <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10d89f: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10d8a2: 85 d2 test %edx,%edx <== NOT EXECUTED 10d8a4: 74 8d je 10d833 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10d8a6: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10d8a9: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 10d8ac: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10d8af: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10d8b1: 76 03 jbe 10d8b6 <== NOT EXECUTED 10d8b3: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10d8b6: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10d8b9: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10d8bc: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10d8be: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10d8c1: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10d8c4: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10d8c7: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 10d8ca: 7e 1b jle 10d8e7 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10d8cc: 03 33 add (%ebx),%esi <== NOT EXECUTED 10d8ce: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d8d0: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10d8d2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10d8d4: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10d8d7: 01 c2 add %eax,%edx <== NOT EXECUTED 10d8d9: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10d8dc: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d8df: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10d8e1: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10d8e3: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d8e5: eb 07 jmp 10d8ee <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10d8e7: 03 33 add (%ebx),%esi <== NOT EXECUTED 10d8e9: 89 d7 mov %edx,%edi <== NOT EXECUTED 10d8eb: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d8ee: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10d8f0: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d8f3: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10d8f6: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d8f8: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10d8fb: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10d8fe: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10d901: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10d904: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10d907: 85 c0 test %eax,%eax <== NOT EXECUTED 10d909: 75 07 jne 10d912 <== NOT EXECUTED pipe->Start = 0; 10d90b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10d912: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) <== NOT EXECUTED 10d916: 74 11 je 10d929 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10d918: 52 push %edx <== NOT EXECUTED 10d919: 52 push %edx <== NOT EXECUTED 10d91a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10d91d: 50 push %eax <== NOT EXECUTED 10d91e: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10d921: e8 72 21 00 00 call 10fa98 <== NOT EXECUTED 10d926: 83 c4 10 add $0x10,%esp <== NOT EXECUTED read += chunk; 10d929: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d92c: 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) { 10d92f: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10d932: 39 7d d4 cmp %edi,-0x2c(%ebp) <== NOT EXECUTED 10d935: 0f 82 64 ff ff ff jb 10d89f <== NOT EXECUTED 10d93b: 31 f6 xor %esi,%esi <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10d93d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d940: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d943: e8 88 cd ff ff call 10a6d0 <== NOT EXECUTED 10d948: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10d94b: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d94f: 7f 03 jg 10d954 <== NOT EXECUTED 10d951: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10d954: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10d957: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d95a: 5b pop %ebx <== NOT EXECUTED 10d95b: 5e pop %esi <== NOT EXECUTED 10d95c: 5f pop %edi <== NOT EXECUTED 10d95d: c9 leave <== NOT EXECUTED 10d95e: c3 ret <== NOT EXECUTED =============================================================================== 0010db43 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10db43: 55 push %ebp <== NOT EXECUTED 10db44: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10db46: 57 push %edi <== NOT EXECUTED 10db47: 56 push %esi <== NOT EXECUTED 10db48: 53 push %ebx <== NOT EXECUTED 10db49: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10db4c: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10db4f: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10db51: 6a 00 push $0x0 <== NOT EXECUTED 10db53: 6a 00 push $0x0 <== NOT EXECUTED 10db55: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10db58: e8 87 ca ff ff call 10a5e4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10db5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db60: 85 c0 test %eax,%eax <== NOT EXECUTED 10db62: 75 34 jne 10db98 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10db64: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10db67: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10db6a: 89 c6 mov %eax,%esi <== NOT EXECUTED 10db6c: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10db6f: a8 02 test $0x2,%al <== NOT EXECUTED 10db71: 74 03 je 10db76 <== NOT EXECUTED pipe->Readers --; 10db73: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10db76: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10db7c: 74 03 je 10db81 <== NOT EXECUTED pipe->Writers --; 10db7e: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10db81: 50 push %eax <== NOT EXECUTED 10db82: 6a 00 push $0x0 <== NOT EXECUTED 10db84: 6a 00 push $0x0 <== NOT EXECUTED 10db86: ff 35 b8 5e 12 00 pushl 0x125eb8 <== NOT EXECUTED 10db8c: e8 53 ca ff ff call 10a5e4 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10db91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db94: 85 c0 test %eax,%eax <== NOT EXECUTED 10db96: 74 09 je 10dba1 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 10db98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10db9b: 50 push %eax <== NOT EXECUTED 10db9c: e8 03 d0 ff ff call 10aba4 <== NOT EXECUTED PIPE_UNLOCK(pipe); 10dba1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dba4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dba7: e8 24 cb ff ff call 10a6d0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10dbac: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10dbaf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dbb2: 85 c0 test %eax,%eax <== NOT EXECUTED 10dbb4: 75 15 jne 10dbcb <== NOT EXECUTED 10dbb6: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10dbba: 75 0f jne 10dbcb <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10dbbc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10dbbe: e8 45 ff ff ff call 10db08 <== NOT EXECUTED *pipep = NULL; 10dbc3: 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) { 10dbc9: eb 30 jmp 10dbfb <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10dbcb: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10dbce: 74 0f je 10dbdf <== NOT EXECUTED 10dbd0: 85 c0 test %eax,%eax <== NOT EXECUTED 10dbd2: 75 0b jne 10dbdf <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10dbd4: 57 push %edi <== NOT EXECUTED 10dbd5: 57 push %edi <== NOT EXECUTED 10dbd6: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dbd9: 50 push %eax <== NOT EXECUTED 10dbda: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dbdd: eb 14 jmp 10dbf3 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10dbdf: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10dbe2: 74 17 je 10dbfb <== NOT EXECUTED 10dbe4: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10dbe8: 75 11 jne 10dbfb <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10dbea: 56 push %esi <== NOT EXECUTED 10dbeb: 56 push %esi <== NOT EXECUTED 10dbec: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dbef: 50 push %eax <== NOT EXECUTED 10dbf0: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dbf3: e8 a0 1e 00 00 call 10fa98 <== NOT EXECUTED 10dbf8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10dbfb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbfe: ff 35 b8 5e 12 00 pushl 0x125eb8 <== NOT EXECUTED 10dc04: e8 c7 ca ff ff call 10a6d0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10dc09: 31 c0 xor %eax,%eax <== NOT EXECUTED 10dc0b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dc0e: 5b pop %ebx <== NOT EXECUTED 10dc0f: 5e pop %esi <== NOT EXECUTED 10dc10: 5f pop %edi <== NOT EXECUTED 10dc11: c9 leave <== NOT EXECUTED 10dc12: c3 ret <== NOT EXECUTED =============================================================================== 0010d95f : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10d95f: 55 push %ebp <== NOT EXECUTED 10d960: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d962: 57 push %edi <== NOT EXECUTED 10d963: 56 push %esi <== NOT EXECUTED 10d964: 53 push %ebx <== NOT EXECUTED 10d965: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10d968: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10d96b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d972: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 10d976: 0f 84 81 01 00 00 je 10dafd <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 10d97c: 56 push %esi <== NOT EXECUTED 10d97d: 6a 00 push $0x0 <== NOT EXECUTED 10d97f: 6a 00 push $0x0 <== NOT EXECUTED 10d981: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d984: e8 5b cc ff ff call 10a5e4 <== NOT EXECUTED 10d989: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d98c: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED 10d993: 85 c0 test %eax,%eax <== NOT EXECUTED 10d995: 0f 85 62 01 00 00 jne 10dafd <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10d99b: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10d99f: 75 11 jne 10d9b2 <== NOT EXECUTED 10d9a1: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10d9a6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d9ad: e9 1d 01 00 00 jmp 10dacf <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10d9b2: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10d9b5: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10d9b8: 76 05 jbe 10d9bf <== NOT EXECUTED 10d9ba: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10d9bf: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10d9c6: e9 f6 00 00 00 jmp 10dac1 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10d9cb: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d9ce: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10d9d2: 74 0a je 10d9de <== NOT EXECUTED 10d9d4: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10d9d9: e9 f1 00 00 00 jmp 10dacf <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10d9de: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10d9e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d9e4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10d9e7: e8 e4 cc ff ff call 10a6d0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10d9ec: 5a pop %edx <== NOT EXECUTED 10d9ed: 59 pop %ecx <== NOT EXECUTED 10d9ee: 6a 00 push $0x0 <== NOT EXECUTED 10d9f0: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10d9f3: e8 f8 20 00 00 call 10faf0 <== NOT EXECUTED 10d9f8: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10d9fb: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10d9fe: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10da00: f7 d6 not %esi <== NOT EXECUTED 10da02: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10da05: 6a 00 push $0x0 <== NOT EXECUTED 10da07: 6a 00 push $0x0 <== NOT EXECUTED 10da09: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10da0c: e8 d3 cb ff ff call 10a5e4 <== NOT EXECUTED 10da11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10da14: 85 c0 test %eax,%eax <== NOT EXECUTED 10da16: 74 0a je 10da22 <== NOT EXECUTED 10da18: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10da1d: e9 d2 00 00 00 jmp 10daf4 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10da22: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10da25: 85 f6 test %esi,%esi <== NOT EXECUTED 10da27: 0f 85 a2 00 00 00 jne 10dacf <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10da2d: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10da31: 75 0a jne 10da3d <== NOT EXECUTED 10da33: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10da38: e9 92 00 00 00 jmp 10dacf <== 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) { 10da3d: 8b 73 04 mov 0x4(%ebx),%esi <== NOT EXECUTED 10da40: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10da43: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10da45: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10da47: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 10da49: 72 80 jb 10d9cb <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10da4b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10da4e: 2b 55 d4 sub -0x2c(%ebp),%edx <== NOT EXECUTED 10da51: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 10da54: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10da56: 76 03 jbe 10da5b <== NOT EXECUTED 10da58: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10da5b: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10da5e: 31 d2 xor %edx,%edx <== NOT EXECUTED 10da60: f7 f6 div %esi <== NOT EXECUTED 10da62: 89 f0 mov %esi,%eax <== NOT EXECUTED 10da64: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10da66: 39 45 d0 cmp %eax,-0x30(%ebp) <== NOT EXECUTED 10da69: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 10da6c: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10da6f: 8d 34 0f lea (%edi,%ecx,1),%esi <== NOT EXECUTED 10da72: 7e 1c jle 10da90 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10da74: 03 13 add (%ebx),%edx <== NOT EXECUTED 10da76: 89 d7 mov %edx,%edi <== NOT EXECUTED 10da78: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10da7a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10da7c: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10da7e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10da81: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10da83: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10da86: 8d 34 38 lea (%eax,%edi,1),%esi <== NOT EXECUTED 10da89: 03 75 0c add 0xc(%ebp),%esi <== NOT EXECUTED 10da8c: 89 d7 mov %edx,%edi <== NOT EXECUTED 10da8e: eb 07 jmp 10da97 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10da90: 03 13 add (%ebx),%edx <== NOT EXECUTED 10da92: 89 d7 mov %edx,%edi <== NOT EXECUTED 10da94: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10da97: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Length += chunk; 10da99: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10da9c: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10da9f: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10daa3: 74 11 je 10dab6 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10daa5: 50 push %eax <== NOT EXECUTED 10daa6: 50 push %eax <== NOT EXECUTED 10daa7: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 10daaa: 51 push %ecx <== NOT EXECUTED 10daab: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10daae: e8 e5 1f 00 00 call 10fa98 <== NOT EXECUTED 10dab3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED written += chunk; 10dab6: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 10dab9: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 10dabc: 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) { 10dac1: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10dac4: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10dac7: 0f 82 70 ff ff ff jb 10da3d <== NOT EXECUTED 10dacd: 31 f6 xor %esi,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10dacf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dad2: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dad5: e8 f6 cb ff ff call 10a6d0 <== NOT EXECUTED 10dada: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 10dadd: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED 10dae0: 75 12 jne 10daf4 <== NOT EXECUTED kill(getpid(), SIGPIPE); 10dae2: e8 29 13 00 00 call 10ee10 <== NOT EXECUTED 10dae7: 57 push %edi <== NOT EXECUTED 10dae8: 57 push %edi <== NOT EXECUTED 10dae9: 6a 0d push $0xd <== NOT EXECUTED 10daeb: 50 push %eax <== NOT EXECUTED 10daec: e8 13 18 00 00 call 10f304 <== NOT EXECUTED 10daf1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #endif if (written > 0) 10daf4: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10daf8: 7f 03 jg 10dafd <== NOT EXECUTED 10dafa: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return written; return ret; } 10dafd: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10db00: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10db03: 5b pop %ebx <== NOT EXECUTED 10db04: 5e pop %esi <== NOT EXECUTED 10db05: 5f pop %edi <== NOT EXECUTED 10db06: c9 leave <== NOT EXECUTED 10db07: c3 ret <== NOT EXECUTED =============================================================================== 0010aa10 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10aa10: 55 push %ebp 10aa11: 89 e5 mov %esp,%ebp 10aa13: 53 push %ebx 10aa14: 83 ec 04 sub $0x4,%esp 10aa17: 8b 55 08 mov 0x8(%ebp),%edx 10aa1a: 8b 45 0c mov 0xc(%ebp),%eax 10aa1d: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10aa20: ff 05 6c cd 12 00 incl 0x12cd6c if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10aa26: 8d 58 ff lea -0x1(%eax),%ebx 10aa29: 85 c3 test %eax,%ebx 10aa2b: 75 05 jne 10aa32 <== NEVER TAKEN 10aa2d: 83 f8 03 cmp $0x3,%eax 10aa30: 77 09 ja 10aa3b /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10aa32: b8 16 00 00 00 mov $0x16,%eax 10aa37: 5a pop %edx 10aa38: 5b pop %ebx 10aa39: c9 leave 10aa3a: c3 ret /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10aa3b: 89 4d 10 mov %ecx,0x10(%ebp) 10aa3e: 89 45 0c mov %eax,0xc(%ebp) 10aa41: 89 55 08 mov %edx,0x8(%ebp) } 10aa44: 58 pop %eax 10aa45: 5b pop %ebx 10aa46: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10aa47: e9 10 01 00 00 jmp 10ab5c =============================================================================== 0010eaec : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10eaec: 55 push %ebp 10eaed: 89 e5 mov %esp,%ebp 10eaef: 8b 45 08 mov 0x8(%ebp),%eax 10eaf2: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) 10eaf5: 85 c0 test %eax,%eax 10eaf7: 74 24 je 10eb1d 10eaf9: 83 38 00 cmpl $0x0,(%eax) 10eafc: 74 1f je 10eb1d return EINVAL; switch ( policy ) { 10eafe: 83 f9 04 cmp $0x4,%ecx 10eb01: 77 0c ja 10eb0f 10eb03: ba 01 00 00 00 mov $0x1,%edx 10eb08: d3 e2 shl %cl,%edx 10eb0a: 80 e2 17 and $0x17,%dl 10eb0d: 75 07 jne 10eb16 <== ALWAYS TAKEN 10eb0f: b8 86 00 00 00 mov $0x86,%eax 10eb14: eb 0c jmp 10eb22 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10eb16: 89 48 14 mov %ecx,0x14(%eax) 10eb19: 31 c0 xor %eax,%eax return 0; 10eb1b: eb 05 jmp 10eb22 10eb1d: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10eb22: c9 leave 10eb23: c3 ret =============================================================================== 0010a958 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a958: 55 push %ebp 10a959: 89 e5 mov %esp,%ebp 10a95b: 57 push %edi 10a95c: 56 push %esi 10a95d: 53 push %ebx 10a95e: 83 ec 1c sub $0x1c,%esp 10a961: 8b 5d 08 mov 0x8(%ebp),%ebx 10a964: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a967: 85 db test %ebx,%ebx 10a969: 0f 84 93 00 00 00 je 10aa02 return EINVAL; if ( count == 0 ) 10a96f: 85 f6 test %esi,%esi 10a971: 0f 84 8b 00 00 00 je 10aa02 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a977: 8b 7d 0c mov 0xc(%ebp),%edi 10a97a: 85 ff test %edi,%edi 10a97c: 75 0f jne 10a98d the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a97e: 83 ec 0c sub $0xc,%esp 10a981: 8d 7d d8 lea -0x28(%ebp),%edi 10a984: 57 push %edi 10a985: e8 1a ff ff ff call 10a8a4 10a98a: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a98d: 83 3f 00 cmpl $0x0,(%edi) 10a990: 74 70 je 10aa02 return EINVAL; switch ( the_attr->process_shared ) { 10a992: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a996: 75 6a jne 10aa02 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a998: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a99f: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a9a2: a1 20 72 12 00 mov 0x127220,%eax 10a9a7: 40 inc %eax 10a9a8: a3 20 72 12 00 mov %eax,0x127220 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10a9ad: 83 ec 0c sub $0xc,%esp 10a9b0: 68 08 76 12 00 push $0x127608 10a9b5: e8 de 1d 00 00 call 10c798 <_Objects_Allocate> 10a9ba: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a9bc: 83 c4 10 add $0x10,%esp 10a9bf: 85 c0 test %eax,%eax 10a9c1: 75 0c jne 10a9cf _Thread_Enable_dispatch(); 10a9c3: e8 d5 29 00 00 call 10d39d <_Thread_Enable_dispatch> 10a9c8: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10a9cd: eb 38 jmp 10aa07 } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a9cf: 50 push %eax 10a9d0: 50 push %eax 10a9d1: 8d 45 e0 lea -0x20(%ebp),%eax 10a9d4: 50 push %eax 10a9d5: 8d 46 10 lea 0x10(%esi),%eax 10a9d8: 50 push %eax 10a9d9: e8 92 14 00 00 call 10be70 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a9de: 8b 46 08 mov 0x8(%esi),%eax 10a9e1: 0f b7 c8 movzwl %ax,%ecx 10a9e4: 8b 15 24 76 12 00 mov 0x127624,%edx 10a9ea: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a9ed: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a9f4: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a9f6: e8 a2 29 00 00 call 10d39d <_Thread_Enable_dispatch> 10a9fb: 31 c0 xor %eax,%eax return 0; 10a9fd: 83 c4 10 add $0x10,%esp 10aa00: eb 05 jmp 10aa07 10aa02: b8 16 00 00 00 mov $0x16,%eax } 10aa07: 8d 65 f4 lea -0xc(%ebp),%esp 10aa0a: 5b pop %ebx 10aa0b: 5e pop %esi 10aa0c: 5f pop %edi 10aa0d: c9 leave 10aa0e: c3 ret =============================================================================== 0010a338 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10a338: 55 push %ebp 10a339: 89 e5 mov %esp,%ebp 10a33b: 56 push %esi 10a33c: 53 push %ebx 10a33d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a340: 8b 75 0c mov 0xc(%ebp),%esi /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 10a343: 85 db test %ebx,%ebx 10a345: 74 4b je 10a392 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a347: a1 b8 82 12 00 mov 0x1282b8,%eax 10a34c: 40 inc %eax 10a34d: a3 b8 82 12 00 mov %eax,0x1282b8 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10a352: 83 ec 0c sub $0xc,%esp 10a355: 6a 10 push $0x10 10a357: e8 f8 3a 00 00 call 10de54 <_Workspace_Allocate> if ( handler ) { 10a35c: 83 c4 10 add $0x10,%esp 10a35f: 85 c0 test %eax,%eax 10a361: 74 24 je 10a387 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10a363: 8b 15 74 83 12 00 mov 0x128374,%edx 10a369: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10a36f: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10a375: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10a378: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10a37b: 51 push %ecx 10a37c: 51 push %ecx 10a37d: 50 push %eax 10a37e: 52 push %edx 10a37f: e8 88 15 00 00 call 10b90c <_Chain_Append> 10a384: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10a387: 8d 65 f8 lea -0x8(%ebp),%esp 10a38a: 5b pop %ebx 10a38b: 5e pop %esi 10a38c: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10a38d: e9 4f 2a 00 00 jmp 10cde1 <_Thread_Enable_dispatch> } 10a392: 8d 65 f8 lea -0x8(%ebp),%esp 10a395: 5b pop %ebx 10a396: 5e pop %esi 10a397: c9 leave 10a398: c3 ret =============================================================================== 0010b0a8 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10b0a8: 55 push %ebp 10b0a9: 89 e5 mov %esp,%ebp 10b0ab: 56 push %esi 10b0ac: 53 push %ebx 10b0ad: 8b 45 0c mov 0xc(%ebp),%eax POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10b0b0: bb cc 25 12 00 mov $0x1225cc,%ebx 10b0b5: 85 c0 test %eax,%eax 10b0b7: 74 02 je 10b0bb 10b0b9: 89 c3 mov %eax,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10b0bb: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10b0bf: 74 78 je 10b139 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10b0c1: 83 3b 00 cmpl $0x0,(%ebx) 10b0c4: 74 73 je 10b139 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b0c6: a1 08 82 12 00 mov 0x128208,%eax 10b0cb: 40 inc %eax 10b0cc: a3 08 82 12 00 mov %eax,0x128208 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10b0d1: 83 ec 0c sub $0xc,%esp 10b0d4: 68 88 86 12 00 push $0x128688 10b0d9: e8 c2 22 00 00 call 10d3a0 <_Objects_Allocate> 10b0de: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10b0e0: 83 c4 10 add $0x10,%esp 10b0e3: 85 c0 test %eax,%eax 10b0e5: 75 0c jne 10b0f3 _Thread_Enable_dispatch(); 10b0e7: e8 b9 2e 00 00 call 10dfa5 <_Thread_Enable_dispatch> 10b0ec: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b0f1: eb 4b jmp 10b13e } the_cond->process_shared = the_attr->process_shared; 10b0f3: 8b 43 04 mov 0x4(%ebx),%eax 10b0f6: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10b0f9: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10b100: 6a 74 push $0x74 10b102: 68 00 08 00 00 push $0x800 10b107: 6a 00 push $0x0 10b109: 8d 46 18 lea 0x18(%esi),%eax 10b10c: 50 push %eax 10b10d: e8 aa 35 00 00 call 10e6bc <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b112: 8b 46 08 mov 0x8(%esi),%eax 10b115: 0f b7 c8 movzwl %ax,%ecx 10b118: 8b 15 a4 86 12 00 mov 0x1286a4,%edx 10b11e: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b121: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10b128: 8b 55 08 mov 0x8(%ebp),%edx 10b12b: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b12d: e8 73 2e 00 00 call 10dfa5 <_Thread_Enable_dispatch> 10b132: 31 c0 xor %eax,%eax return 0; 10b134: 83 c4 10 add $0x10,%esp 10b137: eb 05 jmp 10b13e 10b139: b8 16 00 00 00 mov $0x16,%eax } 10b13e: 8d 65 f8 lea -0x8(%ebp),%esp 10b141: 5b pop %ebx 10b142: 5e pop %esi 10b143: c9 leave 10b144: c3 ret =============================================================================== 0010af5c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10af5c: 55 push %ebp 10af5d: 89 e5 mov %esp,%ebp 10af5f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10af62: 85 c0 test %eax,%eax 10af64: 74 0f je 10af75 10af66: 83 38 00 cmpl $0x0,(%eax) 10af69: 74 0a je 10af75 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10af6b: c7 00 00 00 00 00 movl $0x0,(%eax) 10af71: 31 c0 xor %eax,%eax return 0; 10af73: eb 05 jmp 10af7a 10af75: b8 16 00 00 00 mov $0x16,%eax } 10af7a: c9 leave 10af7b: c3 ret =============================================================================== 0010a684 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10a684: 55 push %ebp 10a685: 89 e5 mov %esp,%ebp 10a687: 57 push %edi 10a688: 56 push %esi 10a689: 53 push %ebx 10a68a: 83 ec 4c sub $0x4c,%esp 10a68d: 8b 45 0c mov 0xc(%ebp),%eax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10a690: c7 45 b0 0e 00 00 00 movl $0xe,-0x50(%ebp) 10a697: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a69b: 0f 84 08 02 00 00 je 10a8a9 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10a6a1: bb 30 11 12 00 mov $0x121130,%ebx 10a6a6: 85 c0 test %eax,%eax 10a6a8: 74 02 je 10a6ac 10a6aa: 89 c3 mov %eax,%ebx if ( !the_attr->is_initialized ) 10a6ac: 83 3b 00 cmpl $0x0,(%ebx) 10a6af: 0f 84 ed 01 00 00 je 10a8a2 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 10a6b5: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a6b9: 74 0f je 10a6ca 10a6bb: 8b 43 08 mov 0x8(%ebx),%eax 10a6be: 3b 05 14 32 12 00 cmp 0x123214,%eax 10a6c4: 0f 82 d8 01 00 00 jb 10a8a2 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 10a6ca: 8b 43 10 mov 0x10(%ebx),%eax 10a6cd: 83 f8 01 cmp $0x1,%eax 10a6d0: 74 0b je 10a6dd 10a6d2: 83 f8 02 cmp $0x2,%eax 10a6d5: 0f 85 c7 01 00 00 jne 10a8a2 10a6db: eb 1f jmp 10a6fc case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a6dd: a1 b4 72 12 00 mov 0x1272b4,%eax 10a6e2: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10a6e8: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10a6ee: 89 45 ac mov %eax,-0x54(%ebp) schedparam = api->schedparam; 10a6f1: 8d 7d c4 lea -0x3c(%ebp),%edi 10a6f4: 81 c6 84 00 00 00 add $0x84,%esi 10a6fa: eb 0c jmp 10a708 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a6fc: 8b 53 14 mov 0x14(%ebx),%edx 10a6ff: 89 55 ac mov %edx,-0x54(%ebp) schedparam = the_attr->schedparam; 10a702: 8d 7d c4 lea -0x3c(%ebp),%edi 10a705: 8d 73 18 lea 0x18(%ebx),%esi 10a708: b9 07 00 00 00 mov $0x7,%ecx 10a70d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10a70f: c7 45 b0 86 00 00 00 movl $0x86,-0x50(%ebp) 10a716: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a71a: 0f 85 89 01 00 00 jne 10a8a9 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a720: 83 ec 0c sub $0xc,%esp 10a723: ff 75 c4 pushl -0x3c(%ebp) 10a726: e8 21 5f 00 00 call 11064c <_POSIX_Priority_Is_valid> 10a72b: 83 c4 10 add $0x10,%esp 10a72e: 84 c0 test %al,%al 10a730: 0f 84 6c 01 00 00 je 10a8a2 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a736: 8b 7d c4 mov -0x3c(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10a739: 0f b6 35 18 32 12 00 movzbl 0x123218,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a740: 8d 45 e0 lea -0x20(%ebp),%eax 10a743: 50 push %eax 10a744: 8d 45 e4 lea -0x1c(%ebp),%eax 10a747: 50 push %eax 10a748: 8d 45 c4 lea -0x3c(%ebp),%eax 10a74b: 50 push %eax 10a74c: ff 75 ac pushl -0x54(%ebp) 10a74f: e8 18 5f 00 00 call 11066c <_POSIX_Thread_Translate_sched_param> 10a754: 89 45 b0 mov %eax,-0x50(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a757: 83 c4 10 add $0x10,%esp 10a75a: 85 c0 test %eax,%eax 10a75c: 0f 85 47 01 00 00 jne 10a8a9 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a762: 83 ec 0c sub $0xc,%esp 10a765: ff 35 ac 72 12 00 pushl 0x1272ac 10a76b: e8 44 15 00 00 call 10bcb4 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a770: c7 04 24 60 74 12 00 movl $0x127460,(%esp) 10a777: e8 80 1e 00 00 call 10c5fc <_Objects_Allocate> 10a77c: 89 c2 mov %eax,%edx * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10a77e: 83 c4 10 add $0x10,%esp 10a781: 85 c0 test %eax,%eax 10a783: 75 05 jne 10a78a _RTEMS_Unlock_allocator(); 10a785: 83 ec 0c sub $0xc,%esp 10a788: eb 53 jmp 10a7dd /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a78a: 8b 43 08 mov 0x8(%ebx),%eax 10a78d: 51 push %ecx 10a78e: 6a 00 push $0x0 10a790: 6a 00 push $0x0 10a792: ff 75 e0 pushl -0x20(%ebp) 10a795: ff 75 e4 pushl -0x1c(%ebp) 10a798: 6a 01 push $0x1 10a79a: 81 e6 ff 00 00 00 and $0xff,%esi 10a7a0: 29 fe sub %edi,%esi 10a7a2: 56 push %esi 10a7a3: 6a 01 push $0x1 10a7a5: 8b 0d 14 32 12 00 mov 0x123214,%ecx 10a7ab: d1 e1 shl %ecx 10a7ad: 39 c1 cmp %eax,%ecx 10a7af: 73 02 jae 10a7b3 10a7b1: 89 c1 mov %eax,%ecx 10a7b3: 51 push %ecx 10a7b4: ff 73 04 pushl 0x4(%ebx) 10a7b7: 52 push %edx 10a7b8: 68 60 74 12 00 push $0x127460 10a7bd: 89 55 a8 mov %edx,-0x58(%ebp) 10a7c0: e8 ff 2a 00 00 call 10d2c4 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a7c5: 83 c4 30 add $0x30,%esp 10a7c8: 84 c0 test %al,%al 10a7ca: 8b 55 a8 mov -0x58(%ebp),%edx 10a7cd: 75 25 jne 10a7f4 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a7cf: 53 push %ebx 10a7d0: 53 push %ebx 10a7d1: 52 push %edx 10a7d2: 68 60 74 12 00 push $0x127460 10a7d7: e8 0c 21 00 00 call 10c8e8 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a7dc: 59 pop %ecx 10a7dd: ff 35 ac 72 12 00 pushl 0x1272ac 10a7e3: e8 14 15 00 00 call 10bcfc <_API_Mutex_Unlock> 10a7e8: c7 45 b0 0b 00 00 00 movl $0xb,-0x50(%ebp) 10a7ef: e9 a9 00 00 00 jmp 10a89d } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a7f4: 8b 8a f8 00 00 00 mov 0xf8(%edx),%ecx 10a7fa: 89 4d b4 mov %ecx,-0x4c(%ebp) api->Attributes = *the_attr; 10a7fd: b9 0f 00 00 00 mov $0xf,%ecx 10a802: 8b 7d b4 mov -0x4c(%ebp),%edi 10a805: 89 de mov %ebx,%esi 10a807: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a809: 8b 43 38 mov 0x38(%ebx),%eax 10a80c: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a80f: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10a812: 8b 45 ac mov -0x54(%ebp),%eax 10a815: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10a81b: 89 cf mov %ecx,%edi 10a81d: 81 c7 84 00 00 00 add $0x84,%edi 10a823: 8d 75 c4 lea -0x3c(%ebp),%esi 10a826: b9 07 00 00 00 mov $0x7,%ecx 10a82b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10a82d: c6 42 74 01 movb $0x1,0x74(%edx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a831: 83 ec 0c sub $0xc,%esp 10a834: 6a 00 push $0x0 10a836: ff 75 14 pushl 0x14(%ebp) 10a839: ff 75 10 pushl 0x10(%ebp) 10a83c: 6a 01 push $0x1 10a83e: 52 push %edx 10a83f: 89 55 a8 mov %edx,-0x58(%ebp) 10a842: e8 15 34 00 00 call 10dc5c <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a847: 83 c4 20 add $0x20,%esp 10a84a: 83 7d ac 04 cmpl $0x4,-0x54(%ebp) 10a84e: 8b 55 a8 mov -0x58(%ebp),%edx 10a851: 75 34 jne 10a887 _Watchdog_Insert_ticks( 10a853: 83 ec 0c sub $0xc,%esp 10a856: 8b 45 b4 mov -0x4c(%ebp),%eax 10a859: 05 8c 00 00 00 add $0x8c,%eax 10a85e: 50 push %eax 10a85f: e8 a4 35 00 00 call 10de08 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a864: 8b 4d b4 mov -0x4c(%ebp),%ecx 10a867: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a86d: 58 pop %eax 10a86e: 5a pop %edx 10a86f: 89 c8 mov %ecx,%eax 10a871: 05 a4 00 00 00 add $0xa4,%eax 10a876: 50 push %eax 10a877: 68 d4 72 12 00 push $0x1272d4 10a87c: e8 33 38 00 00 call 10e0b4 <_Watchdog_Insert> 10a881: 83 c4 10 add $0x10,%esp 10a884: 8b 55 a8 mov -0x58(%ebp),%edx } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a887: 8b 52 08 mov 0x8(%edx),%edx 10a88a: 8b 45 08 mov 0x8(%ebp),%eax 10a88d: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a88f: 83 ec 0c sub $0xc,%esp 10a892: ff 35 ac 72 12 00 pushl 0x1272ac 10a898: e8 5f 14 00 00 call 10bcfc <_API_Mutex_Unlock> return 0; 10a89d: 83 c4 10 add $0x10,%esp 10a8a0: eb 07 jmp 10a8a9 10a8a2: c7 45 b0 16 00 00 00 movl $0x16,-0x50(%ebp) } 10a8a9: 8b 45 b0 mov -0x50(%ebp),%eax 10a8ac: 8d 65 f4 lea -0xc(%ebp),%esp 10a8af: 5b pop %ebx 10a8b0: 5e pop %esi 10a8b1: 5f pop %edi 10a8b2: c9 leave 10a8b3: c3 ret =============================================================================== 001124dc : } void pthread_exit( void *value_ptr ) { 1124dc: 55 push %ebp 1124dd: 89 e5 mov %esp,%ebp 1124df: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 1124e2: ff 75 08 pushl 0x8(%ebp) 1124e5: ff 35 c4 62 12 00 pushl 0x1262c4 1124eb: e8 88 ff ff ff call 112478 <_POSIX_Thread_Exit> 1124f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1124f3: c9 leave <== NOT EXECUTED 1124f4: c3 ret <== NOT EXECUTED =============================================================================== 0010a1e0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10a1e0: 55 push %ebp 10a1e1: 89 e5 mov %esp,%ebp 10a1e3: 8b 45 08 mov 0x8(%ebp),%eax 10a1e6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10a1e9: 85 c0 test %eax,%eax 10a1eb: 74 12 je 10a1ff return EINVAL; if ( !attr->is_initialized ) 10a1ed: 83 38 00 cmpl $0x0,(%eax) 10a1f0: 74 0d je 10a1ff return EINVAL; if ( !type ) 10a1f2: 85 d2 test %edx,%edx 10a1f4: 74 09 je 10a1ff <== NEVER TAKEN return EINVAL; *type = attr->type; 10a1f6: 8b 40 10 mov 0x10(%eax),%eax 10a1f9: 89 02 mov %eax,(%edx) 10a1fb: 31 c0 xor %eax,%eax return 0; 10a1fd: eb 05 jmp 10a204 10a1ff: b8 16 00 00 00 mov $0x16,%eax } 10a204: c9 leave 10a205: c3 ret =============================================================================== 0010c004 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10c004: 55 push %ebp 10c005: 89 e5 mov %esp,%ebp 10c007: 8b 45 08 mov 0x8(%ebp),%eax 10c00a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10c00d: 85 c0 test %eax,%eax 10c00f: 74 11 je 10c022 10c011: 83 38 00 cmpl $0x0,(%eax) 10c014: 74 0c je 10c022 return EINVAL; switch ( pshared ) { 10c016: 83 fa 01 cmp $0x1,%edx 10c019: 77 07 ja 10c022 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10c01b: 89 50 04 mov %edx,0x4(%eax) 10c01e: 31 c0 xor %eax,%eax return 0; 10c020: eb 05 jmp 10c027 10c022: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10c027: c9 leave 10c028: c3 ret =============================================================================== 0010a230 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10a230: 55 push %ebp 10a231: 89 e5 mov %esp,%ebp 10a233: 8b 45 08 mov 0x8(%ebp),%eax 10a236: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10a239: 85 c0 test %eax,%eax 10a23b: 74 11 je 10a24e 10a23d: 83 38 00 cmpl $0x0,(%eax) 10a240: 74 0c je 10a24e <== NEVER TAKEN return EINVAL; switch ( type ) { 10a242: 83 fa 03 cmp $0x3,%edx 10a245: 77 07 ja 10a24e case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10a247: 89 50 10 mov %edx,0x10(%eax) 10a24a: 31 c0 xor %eax,%eax return 0; 10a24c: eb 05 jmp 10a253 10a24e: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10a253: c9 leave 10a254: c3 ret =============================================================================== 0010accc : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10accc: 55 push %ebp 10accd: 89 e5 mov %esp,%ebp 10accf: 56 push %esi 10acd0: 53 push %ebx 10acd1: 83 ec 10 sub $0x10,%esp 10acd4: 8b 5d 08 mov 0x8(%ebp),%ebx 10acd7: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10acda: 85 f6 test %esi,%esi 10acdc: 74 04 je 10ace2 10acde: 85 db test %ebx,%ebx 10ace0: 75 07 jne 10ace9 10ace2: b8 16 00 00 00 mov $0x16,%eax 10ace7: eb 4b jmp 10ad34 return EINVAL; if ( !once_control->init_executed ) { 10ace9: 31 c0 xor %eax,%eax 10aceb: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10acef: 75 43 jne 10ad34 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10acf1: 52 push %edx 10acf2: 8d 45 f4 lea -0xc(%ebp),%eax 10acf5: 50 push %eax 10acf6: 68 00 01 00 00 push $0x100 10acfb: 68 00 01 00 00 push $0x100 10ad00: e8 93 0a 00 00 call 10b798 if ( !once_control->init_executed ) { 10ad05: 83 c4 10 add $0x10,%esp 10ad08: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10ad0c: 75 0f jne 10ad1d <== NEVER TAKEN once_control->is_initialized = true; 10ad0e: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10ad14: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10ad1b: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10ad1d: 50 push %eax 10ad1e: 8d 45 f4 lea -0xc(%ebp),%eax 10ad21: 50 push %eax 10ad22: 68 00 01 00 00 push $0x100 10ad27: ff 75 f4 pushl -0xc(%ebp) 10ad2a: e8 69 0a 00 00 call 10b798 10ad2f: 31 c0 xor %eax,%eax 10ad31: 83 c4 10 add $0x10,%esp } return 0; } 10ad34: 8d 65 f8 lea -0x8(%ebp),%esp 10ad37: 5b pop %ebx 10ad38: 5e pop %esi 10ad39: c9 leave 10ad3a: c3 ret =============================================================================== 0010b298 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10b298: 55 push %ebp 10b299: 89 e5 mov %esp,%ebp 10b29b: 56 push %esi 10b29c: 53 push %ebx 10b29d: 83 ec 10 sub $0x10,%esp 10b2a0: 8b 5d 08 mov 0x8(%ebp),%ebx const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10b2a3: 85 db test %ebx,%ebx 10b2a5: 0f 84 81 00 00 00 je 10b32c return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b2ab: 8b 75 0c mov 0xc(%ebp),%esi 10b2ae: 85 f6 test %esi,%esi 10b2b0: 75 0f jne 10b2c1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10b2b2: 83 ec 0c sub $0xc,%esp 10b2b5: 8d 75 ec lea -0x14(%ebp),%esi 10b2b8: 56 push %esi 10b2b9: e8 3e 09 00 00 call 10bbfc 10b2be: 83 c4 10 add $0x10,%esp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b2c1: 83 3e 00 cmpl $0x0,(%esi) 10b2c4: 74 66 je 10b32c <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10b2c6: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10b2ca: 75 60 jne 10b32c <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b2cc: a1 a0 93 12 00 mov 0x1293a0,%eax 10b2d1: 40 inc %eax 10b2d2: a3 a0 93 12 00 mov %eax,0x1293a0 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10b2d7: 83 ec 0c sub $0xc,%esp 10b2da: 68 c8 95 12 00 push $0x1295c8 10b2df: e8 fc 22 00 00 call 10d5e0 <_Objects_Allocate> 10b2e4: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10b2e6: 83 c4 10 add $0x10,%esp 10b2e9: 85 c0 test %eax,%eax 10b2eb: 75 0c jne 10b2f9 _Thread_Enable_dispatch(); 10b2ed: e8 f3 2e 00 00 call 10e1e5 <_Thread_Enable_dispatch> 10b2f2: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b2f7: eb 38 jmp 10b331 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10b2f9: 50 push %eax 10b2fa: 50 push %eax 10b2fb: 8d 45 f4 lea -0xc(%ebp),%eax 10b2fe: 50 push %eax 10b2ff: 8d 46 10 lea 0x10(%esi),%eax 10b302: 50 push %eax 10b303: e8 64 1b 00 00 call 10ce6c <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b308: 8b 46 08 mov 0x8(%esi),%eax 10b30b: 0f b7 c8 movzwl %ax,%ecx 10b30e: 8b 15 e4 95 12 00 mov 0x1295e4,%edx 10b314: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b317: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10b31e: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10b320: e8 c0 2e 00 00 call 10e1e5 <_Thread_Enable_dispatch> 10b325: 31 c0 xor %eax,%eax return 0; 10b327: 83 c4 10 add $0x10,%esp 10b32a: eb 05 jmp 10b331 10b32c: b8 16 00 00 00 mov $0x16,%eax } 10b331: 8d 65 f8 lea -0x8(%ebp),%esp 10b334: 5b pop %ebx 10b335: 5e pop %esi 10b336: c9 leave 10b337: c3 ret =============================================================================== 0010b39c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b39c: 55 push %ebp 10b39d: 89 e5 mov %esp,%ebp 10b39f: 56 push %esi 10b3a0: 53 push %ebx 10b3a1: 83 ec 20 sub $0x20,%esp 10b3a4: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b3a7: 85 f6 test %esi,%esi 10b3a9: 0f 84 89 00 00 00 je 10b438 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10b3af: 50 push %eax 10b3b0: 50 push %eax 10b3b1: 8d 45 f0 lea -0x10(%ebp),%eax 10b3b4: 50 push %eax 10b3b5: ff 75 0c pushl 0xc(%ebp) 10b3b8: e8 d7 61 00 00 call 111594 <_POSIX_Absolute_timeout_to_ticks> 10b3bd: 89 c3 mov %eax,%ebx 10b3bf: 83 c4 0c add $0xc,%esp 10b3c2: 8d 45 f4 lea -0xc(%ebp),%eax 10b3c5: 50 push %eax 10b3c6: ff 36 pushl (%esi) 10b3c8: 68 c8 95 12 00 push $0x1295c8 10b3cd: e8 22 26 00 00 call 10d9f4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10b3d2: 83 c4 10 add $0x10,%esp 10b3d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b3d9: 75 5d jne 10b438 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 10b3db: 83 fb 03 cmp $0x3,%ebx 10b3de: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10b3e1: 83 ec 0c sub $0xc,%esp 10b3e4: 6a 00 push $0x0 10b3e6: ff 75 f0 pushl -0x10(%ebp) 10b3e9: 0f b6 ca movzbl %dl,%ecx 10b3ec: 51 push %ecx 10b3ed: ff 36 pushl (%esi) 10b3ef: 83 c0 10 add $0x10,%eax 10b3f2: 50 push %eax 10b3f3: 88 55 e4 mov %dl,-0x1c(%ebp) 10b3f6: e8 a5 1a 00 00 call 10cea0 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b3fb: 83 c4 20 add $0x20,%esp 10b3fe: e8 e2 2d 00 00 call 10e1e5 <_Thread_Enable_dispatch> if ( !do_wait ) { 10b403: 8a 55 e4 mov -0x1c(%ebp),%dl 10b406: 84 d2 test %dl,%dl 10b408: 75 19 jne 10b423 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10b40a: a1 5c 94 12 00 mov 0x12945c,%eax 10b40f: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b413: 75 0e jne 10b423 switch (status) { 10b415: 85 db test %ebx,%ebx 10b417: 74 1f je 10b438 <== NEVER TAKEN 10b419: b8 74 00 00 00 mov $0x74,%eax 10b41e: 83 fb 02 cmp $0x2,%ebx 10b421: 76 1a jbe 10b43d <== ALWAYS TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b423: 83 ec 0c sub $0xc,%esp 10b426: a1 5c 94 12 00 mov 0x12945c,%eax 10b42b: ff 70 34 pushl 0x34(%eax) 10b42e: e8 b9 00 00 00 call 10b4ec <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b433: 83 c4 10 add $0x10,%esp 10b436: eb 05 jmp 10b43d 10b438: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b43d: 8d 65 f8 lea -0x8(%ebp),%esp 10b440: 5b pop %ebx 10b441: 5e pop %esi 10b442: c9 leave 10b443: c3 ret =============================================================================== 0010b444 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b444: 55 push %ebp 10b445: 89 e5 mov %esp,%ebp 10b447: 56 push %esi 10b448: 53 push %ebx 10b449: 83 ec 20 sub $0x20,%esp 10b44c: 8b 75 08 mov 0x8(%ebp),%esi Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b44f: 85 f6 test %esi,%esi 10b451: 0f 84 89 00 00 00 je 10b4e0 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10b457: 50 push %eax 10b458: 50 push %eax 10b459: 8d 45 f0 lea -0x10(%ebp),%eax 10b45c: 50 push %eax 10b45d: ff 75 0c pushl 0xc(%ebp) 10b460: e8 2f 61 00 00 call 111594 <_POSIX_Absolute_timeout_to_ticks> 10b465: 89 c3 mov %eax,%ebx 10b467: 83 c4 0c add $0xc,%esp 10b46a: 8d 45 f4 lea -0xc(%ebp),%eax 10b46d: 50 push %eax 10b46e: ff 36 pushl (%esi) 10b470: 68 c8 95 12 00 push $0x1295c8 10b475: e8 7a 25 00 00 call 10d9f4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10b47a: 83 c4 10 add $0x10,%esp 10b47d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b481: 75 5d jne 10b4e0 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 10b483: 83 fb 03 cmp $0x3,%ebx 10b486: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10b489: 83 ec 0c sub $0xc,%esp 10b48c: 6a 00 push $0x0 10b48e: ff 75 f0 pushl -0x10(%ebp) 10b491: 0f b6 ca movzbl %dl,%ecx 10b494: 51 push %ecx 10b495: ff 36 pushl (%esi) 10b497: 83 c0 10 add $0x10,%eax 10b49a: 50 push %eax 10b49b: 88 55 e4 mov %dl,-0x1c(%ebp) 10b49e: e8 b5 1a 00 00 call 10cf58 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b4a3: 83 c4 20 add $0x20,%esp 10b4a6: e8 3a 2d 00 00 call 10e1e5 <_Thread_Enable_dispatch> if ( !do_wait && 10b4ab: 8a 55 e4 mov -0x1c(%ebp),%dl 10b4ae: 84 d2 test %dl,%dl 10b4b0: 75 19 jne 10b4cb (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10b4b2: a1 5c 94 12 00 mov 0x12945c,%eax 10b4b7: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b4bb: 75 0e jne 10b4cb switch (status) { 10b4bd: 85 db test %ebx,%ebx 10b4bf: 74 1f je 10b4e0 <== NEVER TAKEN 10b4c1: b8 74 00 00 00 mov $0x74,%eax 10b4c6: 83 fb 02 cmp $0x2,%ebx 10b4c9: 76 1a jbe 10b4e5 <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b4cb: 83 ec 0c sub $0xc,%esp 10b4ce: a1 5c 94 12 00 mov 0x12945c,%eax 10b4d3: ff 70 34 pushl 0x34(%eax) 10b4d6: e8 11 00 00 00 call 10b4ec <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b4db: 83 c4 10 add $0x10,%esp 10b4de: eb 05 jmp 10b4e5 10b4e0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b4e5: 8d 65 f8 lea -0x8(%ebp),%esp 10b4e8: 5b pop %ebx 10b4e9: 5e pop %esi 10b4ea: c9 leave 10b4eb: c3 ret =============================================================================== 0010bc1c : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10bc1c: 55 push %ebp 10bc1d: 89 e5 mov %esp,%ebp 10bc1f: 8b 45 08 mov 0x8(%ebp),%eax 10bc22: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bc25: 85 c0 test %eax,%eax 10bc27: 74 11 je 10bc3a return EINVAL; if ( !attr->is_initialized ) 10bc29: 83 38 00 cmpl $0x0,(%eax) 10bc2c: 74 0c je 10bc3a return EINVAL; switch ( pshared ) { 10bc2e: 83 fa 01 cmp $0x1,%edx 10bc31: 77 07 ja 10bc3a <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10bc33: 89 50 04 mov %edx,0x4(%eax) 10bc36: 31 c0 xor %eax,%eax return 0; 10bc38: eb 05 jmp 10bc3f 10bc3a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bc3f: c9 leave 10bc40: c3 ret =============================================================================== 0010cb7c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10cb7c: 55 push %ebp 10cb7d: 89 e5 mov %esp,%ebp 10cb7f: 57 push %edi 10cb80: 56 push %esi 10cb81: 53 push %ebx 10cb82: 83 ec 2c sub $0x2c,%esp 10cb85: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10cb88: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) 10cb8f: 85 f6 test %esi,%esi 10cb91: 0f 84 ff 00 00 00 je 10cc96 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10cb97: 8d 45 e0 lea -0x20(%ebp),%eax 10cb9a: 50 push %eax 10cb9b: 8d 45 e4 lea -0x1c(%ebp),%eax 10cb9e: 50 push %eax 10cb9f: 56 push %esi 10cba0: ff 75 0c pushl 0xc(%ebp) 10cba3: e8 18 59 00 00 call 1124c0 <_POSIX_Thread_Translate_sched_param> 10cba8: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10cbab: 83 c4 10 add $0x10,%esp 10cbae: 85 c0 test %eax,%eax 10cbb0: 0f 85 e0 00 00 00 jne 10cc96 10cbb6: 53 push %ebx 10cbb7: 8d 45 dc lea -0x24(%ebp),%eax 10cbba: 50 push %eax 10cbbb: ff 75 08 pushl 0x8(%ebp) 10cbbe: 68 c0 b4 12 00 push $0x12b4c0 10cbc3: e8 40 1c 00 00 call 10e808 <_Objects_Get> 10cbc8: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10cbca: 83 c4 10 add $0x10,%esp 10cbcd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10cbd1: 74 0c je 10cbdf 10cbd3: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) 10cbda: e9 b7 00 00 00 jmp 10cc96 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10cbdf: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10cbe5: 83 bb 80 00 00 00 04 cmpl $0x4,0x80(%ebx) 10cbec: 75 18 jne 10cc06 (void) _Watchdog_Remove( &api->Sporadic_timer ); 10cbee: 83 ec 0c sub $0xc,%esp 10cbf1: 8d 83 a4 00 00 00 lea 0xa4(%ebx),%eax 10cbf7: 50 push %eax 10cbf8: 89 55 d0 mov %edx,-0x30(%ebp) 10cbfb: e8 24 34 00 00 call 110024 <_Watchdog_Remove> 10cc00: 83 c4 10 add $0x10,%esp 10cc03: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10cc06: 8b 45 0c mov 0xc(%ebp),%eax 10cc09: 89 83 80 00 00 00 mov %eax,0x80(%ebx) api->schedparam = *param; 10cc0f: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 10cc15: b9 07 00 00 00 mov $0x7,%ecx 10cc1a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10cc1c: 8b 45 e4 mov -0x1c(%ebp),%eax 10cc1f: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10cc22: 8b 45 e0 mov -0x20(%ebp),%eax 10cc25: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10cc2b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10cc2f: 78 60 js 10cc91 <== NEVER TAKEN 10cc31: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10cc35: 7e 08 jle 10cc3f 10cc37: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10cc3b: 75 54 jne 10cc91 <== NEVER TAKEN 10cc3d: eb 24 jmp 10cc63 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cc3f: a1 24 b2 12 00 mov 0x12b224,%eax 10cc44: 89 42 78 mov %eax,0x78(%edx) 10cc47: 0f b6 05 18 72 12 00 movzbl 0x127218,%eax 10cc4e: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax the_thread->real_priority = 10cc54: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10cc57: 51 push %ecx 10cc58: 6a 01 push $0x1 10cc5a: 50 push %eax 10cc5b: 52 push %edx 10cc5c: e8 fb 1e 00 00 call 10eb5c <_Thread_Change_priority> 10cc61: eb 2b jmp 10cc8e true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10cc63: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10cc69: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10cc6f: 83 ec 0c sub $0xc,%esp 10cc72: 81 c3 a4 00 00 00 add $0xa4,%ebx 10cc78: 53 push %ebx 10cc79: 89 55 d0 mov %edx,-0x30(%ebp) 10cc7c: e8 a3 33 00 00 call 110024 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10cc81: 58 pop %eax 10cc82: 5a pop %edx 10cc83: 8b 55 d0 mov -0x30(%ebp),%edx 10cc86: 52 push %edx 10cc87: 6a 00 push $0x0 10cc89: e8 5d fe ff ff call 10caeb <_POSIX_Threads_Sporadic_budget_TSR> 10cc8e: 83 c4 10 add $0x10,%esp break; } _Thread_Enable_dispatch(); 10cc91: e8 63 23 00 00 call 10eff9 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10cc96: 8b 45 d4 mov -0x2c(%ebp),%eax 10cc99: 8d 65 f4 lea -0xc(%ebp),%esp 10cc9c: 5b pop %ebx 10cc9d: 5e pop %esi 10cc9e: 5f pop %edi 10cc9f: c9 leave 10cca0: c3 ret =============================================================================== 0010aabc : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10aabc: 55 push %ebp 10aabd: 89 e5 mov %esp,%ebp 10aabf: 53 push %ebx 10aac0: 83 ec 04 sub $0x4,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10aac3: a1 50 83 12 00 mov 0x128350,%eax 10aac8: 85 c0 test %eax,%eax 10aaca: 75 48 jne 10ab14 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10aacc: a1 74 83 12 00 mov 0x128374,%eax 10aad1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10aad7: 8b 15 b8 82 12 00 mov 0x1282b8,%edx 10aadd: 42 inc %edx 10aade: 89 15 b8 82 12 00 mov %edx,0x1282b8 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10aae4: 31 db xor %ebx,%ebx 10aae6: 83 b8 d4 00 00 00 00 cmpl $0x0,0xd4(%eax) 10aaed: 75 0a jne 10aaf9 <== NEVER TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 10aaef: 83 b8 dc 00 00 00 00 cmpl $0x0,0xdc(%eax) 10aaf6: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10aaf9: e8 e3 22 00 00 call 10cde1 <_Thread_Enable_dispatch> if ( cancel ) 10aafe: 84 db test %bl,%bl 10ab00: 74 12 je 10ab14 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10ab02: 50 push %eax 10ab03: 50 push %eax 10ab04: 6a ff push $0xffffffff 10ab06: ff 35 74 83 12 00 pushl 0x128374 10ab0c: e8 9f 58 00 00 call 1103b0 <_POSIX_Thread_Exit> 10ab11: 83 c4 10 add $0x10,%esp } 10ab14: 8b 5d fc mov -0x4(%ebp),%ebx 10ab17: c9 leave 10ab18: c3 ret =============================================================================== 0011e20c : ssize_t read( int fd, void *buffer, size_t count ) { 11e20c: 55 push %ebp 11e20d: 89 e5 mov %esp,%ebp 11e20f: 56 push %esi 11e210: 53 push %ebx 11e211: 8b 5d 08 mov 0x8(%ebp),%ebx 11e214: 8b 55 0c mov 0xc(%ebp),%edx 11e217: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11e21a: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 11e220: 73 14 jae 11e236 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e222: c1 e3 06 shl $0x6,%ebx 11e225: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open( iop ); 11e22b: 8b 73 14 mov 0x14(%ebx),%esi 11e22e: f7 c6 00 01 00 00 test $0x100,%esi 11e234: 75 0d jne 11e243 11e236: e8 e5 47 ff ff call 112a20 <__errno> 11e23b: c7 00 09 00 00 00 movl $0x9,(%eax) 11e241: eb 31 jmp 11e274 rtems_libio_check_buffer( buffer ); 11e243: 85 d2 test %edx,%edx 11e245: 74 0b je 11e252 <== NEVER TAKEN rtems_libio_check_count( count ); 11e247: 31 c0 xor %eax,%eax 11e249: 85 c9 test %ecx,%ecx 11e24b: 74 44 je 11e291 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11e24d: 83 e6 02 and $0x2,%esi 11e250: 75 0d jne 11e25f <== ALWAYS TAKEN 11e252: e8 c9 47 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e257: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11e25d: eb 15 jmp 11e274 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11e25f: 8b 43 3c mov 0x3c(%ebx),%eax 11e262: 8b 40 08 mov 0x8(%eax),%eax 11e265: 85 c0 test %eax,%eax 11e267: 75 10 jne 11e279 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e269: e8 b2 47 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e26e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e274: 83 c8 ff or $0xffffffff,%eax 11e277: eb 18 jmp 11e291 rc = (*iop->handlers->read_h)( iop, buffer, count ); 11e279: 56 push %esi 11e27a: 51 push %ecx 11e27b: 52 push %edx 11e27c: 53 push %ebx 11e27d: ff d0 call *%eax if ( rc > 0 ) 11e27f: 83 c4 10 add $0x10,%esp 11e282: 85 c0 test %eax,%eax 11e284: 7e 0b jle 11e291 iop->offset += rc; 11e286: 89 c1 mov %eax,%ecx 11e288: c1 f9 1f sar $0x1f,%ecx 11e28b: 01 43 0c add %eax,0xc(%ebx) 11e28e: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11e291: 8d 65 f8 lea -0x8(%ebp),%esp 11e294: 5b pop %ebx 11e295: 5e pop %esi 11e296: c9 leave 11e297: c3 ret =============================================================================== 0010a034 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10a034: 55 push %ebp 10a035: 89 e5 mov %esp,%ebp 10a037: 57 push %edi 10a038: 56 push %esi 10a039: 53 push %ebx 10a03a: 83 ec 2c sub $0x2c,%esp 10a03d: 8b 55 08 mov 0x8(%ebp),%edx 10a040: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10a043: 85 db test %ebx,%ebx 10a045: 75 0d jne 10a054 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10a047: e8 74 ae 00 00 call 114ec0 <__errno> <== NOT EXECUTED 10a04c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10a052: eb 51 jmp 10a0a5 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10a054: 31 c0 xor %eax,%eax 10a056: 83 c9 ff or $0xffffffff,%ecx 10a059: 89 d7 mov %edx,%edi 10a05b: f2 ae repnz scas %es:(%edi),%al 10a05d: f7 d1 not %ecx 10a05f: 49 dec %ecx 10a060: 83 ec 0c sub $0xc,%esp 10a063: 6a 00 push $0x0 10a065: 8d 75 d4 lea -0x2c(%ebp),%esi 10a068: 56 push %esi 10a069: 6a 00 push $0x0 10a06b: 51 push %ecx 10a06c: 52 push %edx 10a06d: e8 0f f0 ff ff call 109081 0, &loc, false ); if ( result != 0 ) 10a072: 83 c4 20 add $0x20,%esp 10a075: 83 cf ff or $0xffffffff,%edi 10a078: 85 c0 test %eax,%eax 10a07a: 0f 85 8c 00 00 00 jne 10a10c <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 10a080: 8b 55 e0 mov -0x20(%ebp),%edx 10a083: 8b 42 10 mov 0x10(%edx),%eax 10a086: 85 c0 test %eax,%eax 10a088: 75 20 jne 10a0aa <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a08a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10a08d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a08f: 74 09 je 10a09a <== NOT EXECUTED 10a091: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a094: 56 push %esi <== NOT EXECUTED 10a095: ff d0 call *%eax <== NOT EXECUTED 10a097: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a09a: e8 21 ae 00 00 call 114ec0 <__errno> <== NOT EXECUTED 10a09f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a0a5: 83 cf ff or $0xffffffff,%edi 10a0a8: eb 62 jmp 10a10c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10a0aa: 83 ec 0c sub $0xc,%esp 10a0ad: 56 push %esi 10a0ae: ff d0 call *%eax 10a0b0: 83 c4 10 add $0x10,%esp 10a0b3: 83 f8 04 cmp $0x4,%eax 10a0b6: 8b 45 e0 mov -0x20(%ebp),%eax 10a0b9: 74 21 je 10a0dc rtems_filesystem_freenode( &loc ); 10a0bb: 85 c0 test %eax,%eax 10a0bd: 74 10 je 10a0cf <== NEVER TAKEN 10a0bf: 8b 40 1c mov 0x1c(%eax),%eax 10a0c2: 85 c0 test %eax,%eax 10a0c4: 74 09 je 10a0cf <== NEVER TAKEN 10a0c6: 83 ec 0c sub $0xc,%esp 10a0c9: 56 push %esi 10a0ca: ff d0 call *%eax 10a0cc: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 10a0cf: e8 ec ad 00 00 call 114ec0 <__errno> 10a0d4: c7 00 16 00 00 00 movl $0x16,(%eax) 10a0da: eb c9 jmp 10a0a5 } if ( !loc.ops->readlink_h ){ 10a0dc: 8b 50 3c mov 0x3c(%eax),%edx 10a0df: 85 d2 test %edx,%edx 10a0e1: 75 05 jne 10a0e8 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10a0e3: 8b 40 1c mov 0x1c(%eax),%eax 10a0e6: eb a5 jmp 10a08d <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10a0e8: 50 push %eax 10a0e9: ff 75 10 pushl 0x10(%ebp) 10a0ec: 53 push %ebx 10a0ed: 56 push %esi 10a0ee: ff d2 call *%edx 10a0f0: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 10a0f2: 8b 45 e0 mov -0x20(%ebp),%eax 10a0f5: 83 c4 10 add $0x10,%esp 10a0f8: 85 c0 test %eax,%eax 10a0fa: 74 10 je 10a10c <== NEVER TAKEN 10a0fc: 8b 40 1c mov 0x1c(%eax),%eax 10a0ff: 85 c0 test %eax,%eax 10a101: 74 09 je 10a10c <== NEVER TAKEN 10a103: 83 ec 0c sub $0xc,%esp 10a106: 56 push %esi 10a107: ff d0 call *%eax 10a109: 83 c4 10 add $0x10,%esp return result; } 10a10c: 89 f8 mov %edi,%eax 10a10e: 8d 65 f4 lea -0xc(%ebp),%esp 10a111: 5b pop %ebx 10a112: 5e pop %esi 10a113: 5f pop %edi 10a114: c9 leave 10a115: c3 ret =============================================================================== 00108d68 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 108d68: 55 push %ebp 108d69: 89 e5 mov %esp,%ebp 108d6b: 57 push %edi 108d6c: 56 push %esi 108d6d: 53 push %ebx 108d6e: 83 ec 2c sub $0x2c,%esp 108d71: 8b 75 08 mov 0x8(%ebp),%esi 108d74: 8b 7d 0c mov 0xc(%ebp),%edi int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 108d77: 3b 35 e4 4a 12 00 cmp 0x124ae4,%esi 108d7d: 73 11 jae 108d90 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108d7f: c1 e6 06 shl $0x6,%esi 108d82: 03 35 28 92 12 00 add 0x129228,%esi rtems_libio_check_is_open( iop ); 108d88: 8b 46 14 mov 0x14(%esi),%eax 108d8b: f6 c4 01 test $0x1,%ah 108d8e: 75 10 jne 108da0 <== ALWAYS TAKEN 108d90: e8 2f a8 00 00 call 1135c4 <__errno> 108d95: c7 00 09 00 00 00 movl $0x9,(%eax) 108d9b: e9 95 00 00 00 jmp 108e35 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108da0: a8 02 test $0x2,%al 108da2: 74 46 je 108dea <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 108da4: 85 ff test %edi,%edi 108da6: 74 42 je 108dea rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 108da8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 108dac: 7e 3c jle 108dea rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 108dae: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 108db5: 7f 33 jg 108dea <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 108db7: 8b 46 3c mov 0x3c(%esi),%eax 108dba: 83 78 08 00 cmpl $0x0,0x8(%eax) 108dbe: 75 0d jne 108dcd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108dc0: e8 ff a7 00 00 call 1135c4 <__errno> 108dc5: c7 00 86 00 00 00 movl $0x86,(%eax) 108dcb: eb 68 jmp 108e35 108dcd: b2 01 mov $0x1,%dl 108dcf: 31 c0 xor %eax,%eax 108dd1: 31 c9 xor %ecx,%ecx 108dd3: 89 75 d4 mov %esi,-0x2c(%ebp) all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 108dd6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 108dda: 74 0e je 108dea if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108ddc: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx 108de0: 8d 34 19 lea (%ecx,%ebx,1),%esi 108de3: 89 75 e4 mov %esi,-0x1c(%ebp) if ( total < old ) 108de6: 39 ce cmp %ecx,%esi 108de8: 7d 0d jge 108df7 rtems_set_errno_and_return_minus_one( EINVAL ); 108dea: e8 d5 a7 00 00 call 1135c4 <__errno> 108def: c7 00 16 00 00 00 movl $0x16,(%eax) 108df5: eb 3e jmp 108e35 if ( iov[v].iov_len ) 108df7: 85 db test %ebx,%ebx 108df9: 0f 94 c1 sete %cl 108dfc: f7 d9 neg %ecx 108dfe: 21 ca and %ecx,%edx * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108e00: 40 inc %eax 108e01: 3b 45 10 cmp 0x10(%ebp),%eax 108e04: 7d 05 jge 108e0b <== NEVER TAKEN 108e06: 8b 4d e4 mov -0x1c(%ebp),%ecx 108e09: eb cb jmp 108dd6 108e0b: 8b 75 d4 mov -0x2c(%ebp),%esi /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 108e0e: 31 db xor %ebx,%ebx 108e10: 84 d2 test %dl,%dl 108e12: 75 49 jne 108e5d <== NOT EXECUTED 108e14: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 108e1b: 50 push %eax <== NOT EXECUTED 108e1c: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 108e1f: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108e22: ff 74 d7 04 pushl 0x4(%edi,%edx,8) <== NOT EXECUTED 108e26: ff 34 d7 pushl (%edi,%edx,8) <== NOT EXECUTED 108e29: 56 push %esi <== NOT EXECUTED 108e2a: ff 50 08 call *0x8(%eax) <== NOT EXECUTED if ( bytes < 0 ) 108e2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e30: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 108e33: 7d 05 jge 108e3a <== NOT EXECUTED 108e35: 83 cb ff or $0xffffffff,%ebx 108e38: eb 23 jmp 108e5d return -1; if ( bytes > 0 ) { 108e3a: 74 0d je 108e49 <== NOT EXECUTED iop->offset += bytes; 108e3c: 89 c1 mov %eax,%ecx <== NOT EXECUTED 108e3e: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 108e41: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 108e44: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 108e47: 01 c3 add %eax,%ebx <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 108e49: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108e4c: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax <== NOT EXECUTED 108e50: 75 0b jne 108e5d <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108e52: 42 inc %edx <== NOT EXECUTED 108e53: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108e56: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108e59: 39 c2 cmp %eax,%edx <== NOT EXECUTED 108e5b: 7c be jl 108e1b <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 108e5d: 89 d8 mov %ebx,%eax 108e5f: 8d 65 f4 lea -0xc(%ebp),%esp 108e62: 5b pop %ebx 108e63: 5e pop %esi 108e64: 5f pop %edi 108e65: c9 leave 108e66: c3 ret =============================================================================== 0011e318 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11e318: 55 push %ebp 11e319: 89 e5 mov %esp,%ebp 11e31b: 57 push %edi 11e31c: 56 push %esi 11e31d: 53 push %ebx 11e31e: 83 ec 2c sub $0x2c,%esp 11e321: 8b 5d 08 mov 0x8(%ebp),%ebx 11e324: 8b 75 0c mov 0xc(%ebp),%esi 11e327: ff 05 e0 60 12 00 incl 0x1260e0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11e32d: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 11e334: 75 1a jne 11e350 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 11e336: a1 08 62 12 00 mov 0x126208,%eax 11e33b: 85 c0 test %eax,%eax 11e33d: 0f 85 a7 00 00 00 jne 11e3ea <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11e343: a1 a0 62 12 00 mov 0x1262a0,%eax 11e348: 85 c0 test %eax,%eax 11e34a: 0f 85 9a 00 00 00 jne 11e3ea <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11e350: 85 db test %ebx,%ebx 11e352: 75 0e jne 11e362 return malloc( size ); 11e354: 83 ec 0c sub $0xc,%esp 11e357: 56 push %esi 11e358: e8 df 95 fe ff call 10793c 11e35d: e9 81 00 00 00 jmp 11e3e3 if ( !size ) { 11e362: 85 f6 test %esi,%esi 11e364: 75 0d jne 11e373 <== ALWAYS TAKEN free( ptr ); 11e366: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11e369: 53 push %ebx <== NOT EXECUTED 11e36a: e8 2d 93 fe ff call 10769c <== NOT EXECUTED 11e36f: 31 db xor %ebx,%ebx <== NOT EXECUTED 11e371: eb 72 jmp 11e3e5 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11e373: 52 push %edx 11e374: 8d 45 e4 lea -0x1c(%ebp),%eax 11e377: 50 push %eax 11e378: 53 push %ebx 11e379: ff 35 50 21 12 00 pushl 0x122150 11e37f: e8 00 01 00 00 call 11e484 <_Protected_heap_Get_block_size> 11e384: 83 c4 10 add $0x10,%esp 11e387: 84 c0 test %al,%al 11e389: 75 0d jne 11e398 errno = EINVAL; 11e38b: e8 90 46 ff ff call 112a20 <__errno> 11e390: c7 00 16 00 00 00 movl $0x16,(%eax) 11e396: eb 52 jmp 11e3ea #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 ) ) { 11e398: 50 push %eax 11e399: 56 push %esi 11e39a: 53 push %ebx 11e39b: ff 35 50 21 12 00 pushl 0x122150 11e3a1: e8 16 01 00 00 call 11e4bc <_Protected_heap_Resize_block> 11e3a6: 83 c4 10 add $0x10,%esp 11e3a9: 84 c0 test %al,%al 11e3ab: 75 3f jne 11e3ec * 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 ); 11e3ad: 83 ec 0c sub $0xc,%esp 11e3b0: 56 push %esi 11e3b1: e8 86 95 fe ff call 10793c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11e3b6: ff 0d d4 60 12 00 decl 0x1260d4 if ( !new_area ) { 11e3bc: 83 c4 10 add $0x10,%esp 11e3bf: 85 c0 test %eax,%eax 11e3c1: 74 27 je 11e3ea return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11e3c3: 8b 55 e4 mov -0x1c(%ebp),%edx 11e3c6: 89 f1 mov %esi,%ecx 11e3c8: 39 d6 cmp %edx,%esi 11e3ca: 76 02 jbe 11e3ce <== NEVER TAKEN 11e3cc: 89 d1 mov %edx,%ecx 11e3ce: 89 c7 mov %eax,%edi 11e3d0: 89 de mov %ebx,%esi 11e3d2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11e3d4: 83 ec 0c sub $0xc,%esp 11e3d7: 53 push %ebx 11e3d8: 89 45 d4 mov %eax,-0x2c(%ebp) 11e3db: e8 bc 92 fe ff call 10769c 11e3e0: 8b 45 d4 mov -0x2c(%ebp),%eax 11e3e3: 89 c3 mov %eax,%ebx return new_area; 11e3e5: 83 c4 10 add $0x10,%esp 11e3e8: eb 02 jmp 11e3ec 11e3ea: 31 db xor %ebx,%ebx } 11e3ec: 89 d8 mov %ebx,%eax 11e3ee: 8d 65 f4 lea -0xc(%ebp),%esp 11e3f1: 5b pop %ebx 11e3f2: 5e pop %esi 11e3f3: 5f pop %edi 11e3f4: c9 leave 11e3f5: c3 ret =============================================================================== 0010afe4 : #include int rmdir( const char *pathname ) { 10afe4: 55 push %ebp 10afe5: 89 e5 mov %esp,%ebp 10afe7: 57 push %edi 10afe8: 56 push %esi 10afe9: 53 push %ebx 10afea: 83 ec 58 sub $0x58,%esp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 10afed: ff 75 08 pushl 0x8(%ebp) 10aff0: e8 f7 e8 ff ff call 1098ec 10aff5: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 10aff8: 83 c4 10 add $0x10,%esp 10affb: 85 c0 test %eax,%eax 10affd: 8d 45 d0 lea -0x30(%ebp),%eax 10b000: 75 15 jne 10b017 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10b002: 52 push %edx 10b003: 50 push %eax 10b004: 8d 45 e4 lea -0x1c(%ebp),%eax 10b007: 50 push %eax 10b008: ff 75 08 pushl 0x8(%ebp) 10b00b: e8 70 02 00 00 call 10b280 10b010: 31 db xor %ebx,%ebx 10b012: 83 c4 10 add $0x10,%esp 10b015: eb 20 jmp 10b037 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10b017: 83 ec 0c sub $0xc,%esp 10b01a: 6a 00 push $0x0 10b01c: 50 push %eax 10b01d: 6a 02 push $0x2 10b01f: ff 75 b4 pushl -0x4c(%ebp) 10b022: ff 75 08 pushl 0x8(%ebp) 10b025: e8 bf e9 ff ff call 1099e9 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10b02a: 83 c4 20 add $0x20,%esp 10b02d: 85 c0 test %eax,%eax 10b02f: 0f 85 73 01 00 00 jne 10b1a8 <== NEVER TAKEN 10b035: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10b037: 8d 7d bc lea -0x44(%ebp),%edi 10b03a: 8d 75 d0 lea -0x30(%ebp),%esi 10b03d: b9 05 00 00 00 mov $0x5,%ecx 10b042: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10b044: 8b 75 08 mov 0x8(%ebp),%esi 10b047: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10b04a: 83 c9 ff or $0xffffffff,%ecx 10b04d: 89 f7 mov %esi,%edi 10b04f: 31 c0 xor %eax,%eax 10b051: f2 ae repnz scas %es:(%edi),%al 10b053: f7 d1 not %ecx 10b055: 49 dec %ecx 10b056: 57 push %edi 10b057: 57 push %edi 10b058: 51 push %ecx 10b059: 56 push %esi 10b05a: e8 51 e8 ff ff call 1098b0 10b05f: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10b061: 83 c9 ff or $0xffffffff,%ecx 10b064: 89 f7 mov %esi,%edi 10b066: 31 c0 xor %eax,%eax 10b068: f2 ae repnz scas %es:(%edi),%al 10b06a: f7 d1 not %ecx 10b06c: 49 dec %ecx 10b06d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b074: 8d 7d bc lea -0x44(%ebp),%edi 10b077: 57 push %edi 10b078: 6a 00 push $0x0 10b07a: 51 push %ecx 10b07b: 56 push %esi 10b07c: e8 ae e8 ff ff call 10992f 0, &loc, false ); if ( result != 0 ) { 10b081: 83 c4 20 add $0x20,%esp 10b084: 85 c0 test %eax,%eax 10b086: 74 2f je 10b0b7 if ( free_parentloc ) 10b088: 84 db test %bl,%bl 10b08a: 0f 84 18 01 00 00 je 10b1a8 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10b090: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10b093: 85 c0 test %eax,%eax <== NOT EXECUTED 10b095: 0f 84 0d 01 00 00 je 10b1a8 <== NOT EXECUTED 10b09b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b09e: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0a0: 0f 84 02 01 00 00 je 10b1a8 <== NOT EXECUTED 10b0a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b0a9: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10b0ac: 52 push %edx <== NOT EXECUTED 10b0ad: ff d0 call *%eax <== NOT EXECUTED 10b0af: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10b0b2: e9 ec 00 00 00 jmp 10b1a3 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10b0b7: 8b 55 c8 mov -0x38(%ebp),%edx 10b0ba: 8b 42 10 mov 0x10(%edx),%eax 10b0bd: 85 c0 test %eax,%eax 10b0bf: 75 05 jne 10b0c6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10b0c1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b0c4: eb 65 jmp 10b12b <== NOT EXECUTED if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 10b0c6: 83 ec 0c sub $0xc,%esp 10b0c9: 57 push %edi 10b0ca: ff d0 call *%eax 10b0cc: 83 c4 10 add $0x10,%esp 10b0cf: 48 dec %eax 10b0d0: 74 45 je 10b117 rtems_filesystem_freenode( &loc ); 10b0d2: 8b 45 c8 mov -0x38(%ebp),%eax 10b0d5: 85 c0 test %eax,%eax 10b0d7: 74 10 je 10b0e9 <== NEVER TAKEN 10b0d9: 8b 40 1c mov 0x1c(%eax),%eax 10b0dc: 85 c0 test %eax,%eax 10b0de: 74 09 je 10b0e9 <== NEVER TAKEN 10b0e0: 83 ec 0c sub $0xc,%esp 10b0e3: 57 push %edi 10b0e4: ff d0 call *%eax 10b0e6: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10b0e9: 84 db test %bl,%bl 10b0eb: 74 1a je 10b107 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10b0ed: 8b 45 dc mov -0x24(%ebp),%eax 10b0f0: 85 c0 test %eax,%eax 10b0f2: 74 13 je 10b107 <== NEVER TAKEN 10b0f4: 8b 40 1c mov 0x1c(%eax),%eax 10b0f7: 85 c0 test %eax,%eax 10b0f9: 74 0c je 10b107 <== NEVER TAKEN 10b0fb: 83 ec 0c sub $0xc,%esp 10b0fe: 8d 55 d0 lea -0x30(%ebp),%edx 10b101: 52 push %edx 10b102: ff d0 call *%eax 10b104: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10b107: e8 30 a7 00 00 call 11583c <__errno> 10b10c: c7 00 14 00 00 00 movl $0x14,(%eax) 10b112: e9 91 00 00 00 jmp 10b1a8 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10b117: 8b 45 c4 mov -0x3c(%ebp),%eax 10b11a: 8b 40 34 mov 0x34(%eax),%eax 10b11d: 85 c0 test %eax,%eax 10b11f: 75 42 jne 10b163 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10b121: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 10b124: 85 c0 test %eax,%eax <== NOT EXECUTED 10b126: 74 10 je 10b138 <== NOT EXECUTED 10b128: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b12b: 85 c0 test %eax,%eax <== NOT EXECUTED 10b12d: 74 09 je 10b138 <== NOT EXECUTED 10b12f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b132: 57 push %edi <== NOT EXECUTED 10b133: ff d0 call *%eax <== NOT EXECUTED 10b135: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10b138: 84 db test %bl,%bl <== NOT EXECUTED 10b13a: 74 1a je 10b156 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10b13c: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10b13f: 85 c0 test %eax,%eax <== NOT EXECUTED 10b141: 74 13 je 10b156 <== NOT EXECUTED 10b143: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10b146: 85 c0 test %eax,%eax <== NOT EXECUTED 10b148: 74 0c je 10b156 <== NOT EXECUTED 10b14a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b14d: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10b150: 52 push %edx <== NOT EXECUTED 10b151: ff d0 call *%eax <== NOT EXECUTED 10b153: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b156: e8 e1 a6 00 00 call 11583c <__errno> <== NOT EXECUTED 10b15b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b161: eb 45 jmp 10b1a8 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10b163: 52 push %edx 10b164: 52 push %edx 10b165: 57 push %edi 10b166: 8d 55 d0 lea -0x30(%ebp),%edx 10b169: 52 push %edx 10b16a: ff d0 call *%eax 10b16c: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10b16e: 8b 45 c8 mov -0x38(%ebp),%eax 10b171: 83 c4 10 add $0x10,%esp 10b174: 85 c0 test %eax,%eax 10b176: 74 10 je 10b188 <== NEVER TAKEN 10b178: 8b 40 1c mov 0x1c(%eax),%eax 10b17b: 85 c0 test %eax,%eax 10b17d: 74 09 je 10b188 <== NEVER TAKEN 10b17f: 83 ec 0c sub $0xc,%esp 10b182: 57 push %edi 10b183: ff d0 call *%eax 10b185: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10b188: 84 db test %bl,%bl 10b18a: 74 1f je 10b1ab rtems_filesystem_freenode( &parentloc ); 10b18c: 8b 45 dc mov -0x24(%ebp),%eax 10b18f: 85 c0 test %eax,%eax 10b191: 74 18 je 10b1ab <== NEVER TAKEN 10b193: 8b 40 1c mov 0x1c(%eax),%eax 10b196: 85 c0 test %eax,%eax 10b198: 74 11 je 10b1ab <== NEVER TAKEN 10b19a: 83 ec 0c sub $0xc,%esp 10b19d: 8d 55 d0 lea -0x30(%ebp),%edx 10b1a0: 52 push %edx 10b1a1: ff d0 call *%eax 10b1a3: 83 c4 10 add $0x10,%esp 10b1a6: eb 03 jmp 10b1ab 10b1a8: 83 ce ff or $0xffffffff,%esi return result; } 10b1ab: 89 f0 mov %esi,%eax 10b1ad: 8d 65 f4 lea -0xc(%ebp),%esp 10b1b0: 5b pop %ebx 10b1b1: 5e pop %esi 10b1b2: 5f pop %edi 10b1b3: c9 leave 10b1b4: c3 ret =============================================================================== 001167c4 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 1167c4: 55 push %ebp <== NOT EXECUTED 1167c5: 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; } 1167c7: b8 64 a0 12 00 mov $0x12a064,%eax <== NOT EXECUTED 1167cc: c9 leave <== NOT EXECUTED 1167cd: c3 ret <== NOT EXECUTED =============================================================================== 00113604 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113604: 55 push %ebp 113605: 89 e5 mov %esp,%ebp 113607: 53 push %ebx 113608: 83 ec 0c sub $0xc,%esp 11360b: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11360e: 53 push %ebx 11360f: ff 75 08 pushl 0x8(%ebp) 113612: e8 1d 00 00 00 call 113634 if (nap) 113617: 83 c4 10 add $0x10,%esp 11361a: 85 c0 test %eax,%eax 11361c: 74 07 je 113625 <== NEVER TAKEN return nap->name; 11361e: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 113620: 8b 5d fc mov -0x4(%ebp),%ebx 113623: c9 leave 113624: c3 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 113625: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } 113628: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11362b: 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); 11362c: e9 93 31 00 00 jmp 1167c4 <== NOT EXECUTED =============================================================================== 001129c0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1129c0: 55 push %ebp 1129c1: 89 e5 mov %esp,%ebp 1129c3: 56 push %esi 1129c4: 53 push %ebx 1129c5: 8b 5d 08 mov 0x8(%ebp),%ebx 1129c8: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1129cb: 8b 03 mov (%ebx),%eax 1129cd: 85 c0 test %eax,%eax 1129cf: 74 1b je 1129ec <== NEVER TAKEN 1129d1: 52 push %edx 1129d2: 52 push %edx 1129d3: 68 e1 0a 12 00 push $0x120ae1 1129d8: 50 push %eax 1129d9: e8 5e 0b 00 00 call 11353c 1129de: 83 c4 10 add $0x10,%esp 1129e1: 85 c0 test %eax,%eax 1129e3: 75 07 jne 1129ec <== ALWAYS TAKEN default_ap = ap++; 1129e5: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1129e7: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 1129ea: eb 0c jmp 1129f8 <== NOT EXECUTED 1129ec: 31 c0 xor %eax,%eax 1129ee: eb 08 jmp 1129f8 for ( ; ap->name; ap++) if (ap->local_value == local_value) 1129f0: 39 73 04 cmp %esi,0x4(%ebx) 1129f3: 74 0a je 1129ff const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 1129f5: 83 c3 0c add $0xc,%ebx 1129f8: 83 3b 00 cmpl $0x0,(%ebx) 1129fb: 75 f3 jne 1129f0 1129fd: 89 c3 mov %eax,%ebx if (ap->local_value == local_value) return ap; return default_ap; } 1129ff: 89 d8 mov %ebx,%eax 112a01: 8d 65 f8 lea -0x8(%ebp),%esp 112a04: 5b pop %ebx 112a05: 5e pop %esi 112a06: c9 leave 112a07: c3 ret =============================================================================== 00111cac : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 111cac: 55 push %ebp 111cad: 89 e5 mov %esp,%ebp 111caf: 56 push %esi 111cb0: 53 push %ebx 111cb1: 8b 5d 08 mov 0x8(%ebp),%ebx 111cb4: 8b 75 0c mov 0xc(%ebp),%esi const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 111cb7: 8b 03 mov (%ebx),%eax 111cb9: 85 c0 test %eax,%eax 111cbb: 74 1b je 111cd8 <== NEVER TAKEN 111cbd: 52 push %edx 111cbe: 52 push %edx 111cbf: 68 e1 0a 12 00 push $0x120ae1 111cc4: 50 push %eax 111cc5: e8 72 18 00 00 call 11353c 111cca: 83 c4 10 add $0x10,%esp 111ccd: 85 c0 test %eax,%eax 111ccf: 75 07 jne 111cd8 <== ALWAYS TAKEN default_ap = ap++; 111cd1: 89 d8 mov %ebx,%eax <== NOT EXECUTED 111cd3: 83 c3 0c add $0xc,%ebx <== NOT EXECUTED 111cd6: eb 0c jmp 111ce4 <== NOT EXECUTED 111cd8: 31 c0 xor %eax,%eax 111cda: eb 08 jmp 111ce4 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 111cdc: 39 73 08 cmp %esi,0x8(%ebx) 111cdf: 74 0a je 111ceb const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 111ce1: 83 c3 0c add $0xc,%ebx 111ce4: 83 3b 00 cmpl $0x0,(%ebx) 111ce7: 75 f3 jne 111cdc 111ce9: 89 c3 mov %eax,%ebx if (ap->remote_value == remote_value) return ap; return default_ap; } 111ceb: 89 d8 mov %ebx,%eax 111ced: 8d 65 f8 lea -0x8(%ebp),%esp 111cf0: 5b pop %ebx 111cf1: 5e pop %esi 111cf2: c9 leave 111cf3: c3 ret =============================================================================== 00112954 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 112954: 55 push %ebp <== NOT EXECUTED 112955: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112957: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 11295a: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 11295d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112960: e8 5b 00 00 00 call 1129c0 <== NOT EXECUTED 112965: 89 c2 mov %eax,%edx <== NOT EXECUTED if (nap) 112967: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11296a: 31 c0 xor %eax,%eax <== NOT EXECUTED 11296c: 85 d2 test %edx,%edx <== NOT EXECUTED 11296e: 74 03 je 112973 <== NOT EXECUTED return nap->remote_value; 112970: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED return 0; } 112973: c9 leave <== NOT EXECUTED 112974: c3 ret <== NOT EXECUTED =============================================================================== 0010fa10 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 10fa10: 55 push %ebp 10fa11: 89 e5 mov %esp,%ebp 10fa13: 53 push %ebx 10fa14: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10fa17: 8d 45 f4 lea -0xc(%ebp),%eax 10fa1a: 50 push %eax 10fa1b: ff 75 08 pushl 0x8(%ebp) 10fa1e: 68 08 6b 12 00 push $0x126b08 10fa23: e8 04 c1 ff ff call 10bb2c <_Objects_Get> 10fa28: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 10fa2a: 83 c4 10 add $0x10,%esp 10fa2d: b8 04 00 00 00 mov $0x4,%eax 10fa32: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10fa36: 75 32 jne 10fa6a <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 10fa38: 52 push %edx 10fa39: 6a 02 push $0x2 10fa3b: 6a 00 push $0x0 10fa3d: 8d 43 14 lea 0x14(%ebx),%eax 10fa40: 50 push %eax 10fa41: e8 7e cf ff ff call 10c9c4 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 10fa46: 59 pop %ecx 10fa47: 58 pop %eax 10fa48: 53 push %ebx 10fa49: 68 08 6b 12 00 push $0x126b08 10fa4e: e8 31 bd ff ff call 10b784 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 10fa53: 58 pop %eax 10fa54: 5a pop %edx 10fa55: 53 push %ebx 10fa56: 68 08 6b 12 00 push $0x126b08 10fa5b: e8 a4 bf ff ff call 10ba04 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10fa60: e8 b8 c8 ff ff call 10c31d <_Thread_Enable_dispatch> 10fa65: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10fa67: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa6a: 8b 5d fc mov -0x4(%ebp),%ebx 10fa6d: c9 leave 10fa6e: c3 ret =============================================================================== 001071ec : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1071ec: 55 push %ebp 1071ed: 89 e5 mov %esp,%ebp 1071ef: 57 push %edi 1071f0: 56 push %esi 1071f1: 53 push %ebx 1071f2: 83 ec 0c sub $0xc,%esp 1071f5: 8b 45 08 mov 0x8(%ebp),%eax 1071f8: 8b 5d 0c mov 0xc(%ebp),%ebx 1071fb: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1071fe: 85 c0 test %eax,%eax 107200: 74 4c je 10724e return NULL; if ( !value ) 107202: 85 db test %ebx,%ebx 107204: 74 4a je 107250 return NULL; if ( !length ) 107206: 85 f6 test %esi,%esi 107208: 74 44 je 10724e return NULL; value[0] = '\0'; 10720a: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 10720d: 83 ec 0c sub $0xc,%esp 107210: 50 push %eax 107211: e8 46 00 00 00 call 10725c if ( !p ) 107216: 83 c4 10 add $0x10,%esp 107219: 85 c0 test %eax,%eax 10721b: 74 31 je 10724e 10721d: 31 ff xor %edi,%edi 10721f: 31 d2 xor %edx,%edx int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i if ( *p == '\"' ) { 107224: 80 f9 22 cmp $0x22,%cl 107227: 75 03 jne 10722c <== ALWAYS TAKEN quotes++; 107229: 47 inc %edi <== NOT EXECUTED 10722a: eb 0d jmp 107239 <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 10722c: f7 c7 01 00 00 00 test $0x1,%edi 107232: 75 05 jne 107239 <== NEVER TAKEN 107234: 80 f9 20 cmp $0x20,%cl 107237: 74 17 je 107250 <== NEVER TAKEN break; value[i++] = *p++; 107239: 88 0c 13 mov %cl,(%ebx,%edx,1) 10723c: 42 inc %edx value[i] = '\0'; 10723d: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107248: 39 f2 cmp %esi,%edx 10724a: 72 d8 jb 107224 <== ALWAYS TAKEN 10724c: eb 02 jmp 107250 <== NOT EXECUTED 10724e: 31 db xor %ebx,%ebx return NULL; copy_string( p, value, length ); return value; } 107250: 89 d8 mov %ebx,%eax 107252: 8d 65 f4 lea -0xc(%ebp),%esp 107255: 5b pop %ebx 107256: 5e pop %esi 107257: 5f pop %edi 107258: c9 leave 107259: c3 ret =============================================================================== 00107284 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 107284: 55 push %ebp 107285: 89 e5 mov %esp,%ebp 107287: 57 push %edi 107288: 53 push %ebx 107289: 8b 7d 08 mov 0x8(%ebp),%edi 10728c: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 10728f: 50 push %eax 107290: ff 75 10 pushl 0x10(%ebp) 107293: 53 push %ebx 107294: 57 push %edi 107295: e8 52 ff ff ff call 1071ec 10729a: 89 c2 mov %eax,%edx if ( !p ) 10729c: 83 c4 10 add $0x10,%esp 10729f: 85 c0 test %eax,%eax 1072a1: 74 3c je 1072df <== NEVER TAKEN return NULL; rhs = &p[strlen(name)]; 1072a3: 31 c0 xor %eax,%eax 1072a5: 83 c9 ff or $0xffffffff,%ecx 1072a8: f2 ae repnz scas %es:(%edi),%al 1072aa: f7 d1 not %ecx 1072ac: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 1072b0: 80 38 3d cmpb $0x3d,(%eax) 1072b3: 75 2a jne 1072df <== NEVER TAKEN return NULL; rhs++; 1072b5: 8d 50 01 lea 0x1(%eax),%edx if ( *rhs == '\"' ) 1072b8: 80 78 01 22 cmpb $0x22,0x1(%eax) 1072bc: 75 03 jne 1072c1 <== ALWAYS TAKEN rhs++; 1072be: 8d 50 02 lea 0x2(%eax),%edx <== NOT EXECUTED 1072c1: 89 d8 mov %ebx,%eax 1072c3: eb 04 jmp 1072c9 for ( d=value ; *rhs ; ) *d++ = *rhs++; 1072c5: 88 08 mov %cl,(%eax) <== NOT EXECUTED 1072c7: 40 inc %eax <== NOT EXECUTED 1072c8: 42 inc %edx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1072c9: 8a 0a mov (%edx),%cl 1072cb: 84 c9 test %cl,%cl 1072cd: 75 f6 jne 1072c5 <== NEVER TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) 1072cf: 8d 50 ff lea -0x1(%eax),%edx 1072d2: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 1072d6: 75 02 jne 1072da <== ALWAYS TAKEN 1072d8: 89 d0 mov %edx,%eax <== NOT EXECUTED d--; *d = '\0'; 1072da: c6 00 00 movb $0x0,(%eax) return value; 1072dd: eb 02 jmp 1072e1 1072df: 31 db xor %ebx,%ebx } 1072e1: 89 d8 mov %ebx,%eax 1072e3: 8d 65 f8 lea -0x8(%ebp),%esp 1072e6: 5b pop %ebx 1072e7: 5f pop %edi 1072e8: c9 leave 1072e9: c3 ret =============================================================================== 00107920 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 107920: 55 push %ebp 107921: 89 e5 mov %esp,%ebp 107923: 57 push %edi 107924: 56 push %esi 107925: 53 push %ebx 107926: 83 ec 6c sub $0x6c,%esp 107929: 8b 5d 08 mov 0x8(%ebp),%ebx Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 10792c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107930: 0f 84 53 01 00 00 je 107a89 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 107936: 83 ec 0c sub $0xc,%esp 107939: 8d 75 d8 lea -0x28(%ebp),%esi 10793c: 56 push %esi 10793d: e8 3a 4d 00 00 call 10c67c <_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 ec a4 12 00 push $0x12a4ec 10794f: e8 18 6d 00 00 call 10e66c <_Timespec_Subtract> } } } #endif (*print)( 107954: 5e pop %esi 107955: 5f pop %edi 107956: 68 8c 21 12 00 push $0x12218c 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 20 9f 12 00 mov 0x129f20(,%edx,4),%eax 107973: 85 c0 test %eax,%eax 107975: 0f 84 e5 00 00 00 je 107a60 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10797b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10797e: 85 f6 test %esi,%esi 107980: 0f 84 da 00 00 00 je 107a60 <== NEVER TAKEN 107986: bf 01 00 00 00 mov $0x1,%edi 10798b: 89 5d 94 mov %ebx,-0x6c(%ebp) 10798e: e9 be 00 00 00 jmp 107a51 for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 107993: 8b 46 1c mov 0x1c(%esi),%eax 107996: 8b 14 b8 mov (%eax,%edi,4),%edx if ( !the_thread ) 107999: 85 d2 test %edx,%edx 10799b: 0f 84 af 00 00 00 je 107a50 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1079a1: 51 push %ecx 1079a2: 8d 4d b3 lea -0x4d(%ebp),%ecx 1079a5: 51 push %ecx 1079a6: 6a 0d push $0xd 1079a8: ff 72 08 pushl 0x8(%edx) 1079ab: 89 55 a0 mov %edx,-0x60(%ebp) 1079ae: e8 65 3b 00 00 call 10b518 (*print)( 1079b3: 8d 5d b3 lea -0x4d(%ebp),%ebx 1079b6: 53 push %ebx 1079b7: 8b 55 a0 mov -0x60(%ebp),%edx 1079ba: ff 72 08 pushl 0x8(%edx) 1079bd: 68 fe 22 12 00 push $0x1222fe 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 08 a0 12 00 mov 0x12a008,%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 10 a0 12 00 push $0x12a010 1079fb: 89 45 a0 mov %eax,-0x60(%ebp) 1079fe: e8 69 6c 00 00 call 10e66c <_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 5e 6b 00 00 call 10e570 <_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 76 6b 00 00 call 10e5a0 <_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 11 23 12 00 push $0x122311 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 29 23 12 00 push $0x122329 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 =============================================================================== 00112928 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 112928: 55 push %ebp <== NOT EXECUTED 112929: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11292b: 53 push %ebx <== NOT EXECUTED 11292c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 11292f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112932: 68 58 0b 12 00 push $0x120b58 <== NOT EXECUTED 112937: e8 18 00 00 00 call 112954 <== NOT EXECUTED 11293c: 89 c3 mov %eax,%ebx <== NOT EXECUTED 11293e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112941: 85 c0 test %eax,%eax <== NOT EXECUTED 112943: 74 07 je 11294c <== NOT EXECUTED { errno = rc; 112945: e8 d6 00 00 00 call 112a20 <__errno> <== NOT EXECUTED 11294a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 11294c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11294f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 112952: c9 leave <== NOT EXECUTED 112953: c3 ret <== NOT EXECUTED =============================================================================== 0010b6b3 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10b6b3: 55 push %ebp <== NOT EXECUTED 10b6b4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6b6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED * printf(3) format string, with its concommitant arguments. * * Returns the number of characters written. */ int rtems_error( 10b6b9: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED { va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 10b6bc: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10b6bf: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b6c2: e8 6a fe ff ff call 10b531 <== NOT EXECUTED va_end(arglist); return chars_written; } 10b6c7: c9 leave <== NOT EXECUTED 10b6c8: c3 ret <== NOT EXECUTED =============================================================================== 00107631 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107631: 55 push %ebp 107632: 89 e5 mov %esp,%ebp 107634: 56 push %esi 107635: 53 push %ebx 107636: 83 ec 10 sub $0x10,%esp 107639: 8b 5d 08 mov 0x8(%ebp),%ebx 10763c: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 10763f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107646: 85 db test %ebx,%ebx 107648: 75 0d jne 107657 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10764a: e8 d1 b3 00 00 call 112a20 <__errno> <== NOT EXECUTED 10764f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107655: eb 0f jmp 107666 <== NOT EXECUTED if ( !pathloc ) 107657: 85 f6 test %esi,%esi 107659: 75 10 jne 10766b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 10765b: e8 c0 b3 00 00 call 112a20 <__errno> <== NOT EXECUTED 107660: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107666: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107669: eb 28 jmp 107693 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 10766b: 51 push %ecx 10766c: 56 push %esi 10766d: 8d 45 f4 lea -0xc(%ebp),%eax 107670: 50 push %eax 107671: 53 push %ebx 107672: e8 15 0d 00 00 call 10838c /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107677: 8b 45 f4 mov -0xc(%ebp),%eax 10767a: 5a pop %edx 10767b: ff 75 18 pushl 0x18(%ebp) 10767e: 56 push %esi 10767f: ff 75 10 pushl 0x10(%ebp) 107682: 8b 55 0c mov 0xc(%ebp),%edx 107685: 29 c2 sub %eax,%edx 107687: 52 push %edx 107688: 01 c3 add %eax,%ebx 10768a: 53 push %ebx 10768b: e8 e7 fe ff ff call 107577 107690: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 107693: 8d 65 f8 lea -0x8(%ebp),%esp 107696: 5b pop %ebx 107697: 5e pop %esi 107698: c9 leave 107699: c3 ret =============================================================================== 00107577 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107577: 55 push %ebp 107578: 89 e5 mov %esp,%ebp 10757a: 57 push %edi 10757b: 56 push %esi 10757c: 53 push %ebx 10757d: 83 ec 1c sub $0x1c,%esp 107580: 8b 4d 08 mov 0x8(%ebp),%ecx 107583: 8b 75 0c mov 0xc(%ebp),%esi 107586: 8b 7d 10 mov 0x10(%ebp),%edi 107589: 8b 5d 14 mov 0x14(%ebp),%ebx 10758c: 8b 55 18 mov 0x18(%ebp),%edx /* * Verify Input parameters. */ if ( !pathname ) 10758f: 85 c9 test %ecx,%ecx 107591: 75 0d jne 1075a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 107593: e8 88 b4 00 00 call 112a20 <__errno> <== NOT EXECUTED 107598: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10759e: eb 0f jmp 1075af <== NOT EXECUTED if ( !pathloc ) 1075a0: 85 db test %ebx,%ebx 1075a2: 75 10 jne 1075b4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1075a4: e8 77 b4 00 00 call 112a20 <__errno> <== NOT EXECUTED 1075a9: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1075af: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1075b2: eb 73 jmp 107627 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 1075b4: 8b 43 0c mov 0xc(%ebx),%eax 1075b7: 8b 00 mov (%eax),%eax 1075b9: 85 c0 test %eax,%eax 1075bb: 74 4e je 10760b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1075bd: 53 push %ebx 1075be: 57 push %edi 1075bf: 56 push %esi 1075c0: 51 push %ecx 1075c1: 89 55 e4 mov %edx,-0x1c(%ebp) 1075c4: ff d0 call *%eax 1075c6: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1075c8: 83 c4 10 add $0x10,%esp 1075cb: 85 c0 test %eax,%eax 1075cd: 8b 55 e4 mov -0x1c(%ebp),%edx 1075d0: 75 55 jne 107627 1075d2: 85 d2 test %edx,%edx 1075d4: 74 51 je 107627 if ( !pathloc->ops->node_type_h ){ 1075d6: 8b 53 0c mov 0xc(%ebx),%edx 1075d9: 8b 42 10 mov 0x10(%edx),%eax 1075dc: 85 c0 test %eax,%eax 1075de: 74 1b je 1075fb <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1075e0: 83 ec 0c sub $0xc,%esp 1075e3: 53 push %ebx 1075e4: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1075e6: 83 e8 03 sub $0x3,%eax 1075e9: 83 c4 10 add $0x10,%esp 1075ec: 83 f8 01 cmp $0x1,%eax 1075ef: 77 36 ja 107627 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1075f1: 8b 53 0c mov 0xc(%ebx),%edx 1075f4: 8b 42 34 mov 0x34(%edx),%eax 1075f7: 85 c0 test %eax,%eax 1075f9: 75 1d jne 107618 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); 1075fb: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1075fe: 85 c0 test %eax,%eax <== NOT EXECUTED 107600: 74 09 je 10760b <== NOT EXECUTED 107602: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107605: 53 push %ebx <== NOT EXECUTED 107606: ff d0 call *%eax <== NOT EXECUTED 107608: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10760b: e8 10 b4 00 00 call 112a20 <__errno> <== NOT EXECUTED 107610: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107616: eb 97 jmp 1075af <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107618: 89 7d 0c mov %edi,0xc(%ebp) 10761b: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 10761e: 8d 65 f4 lea -0xc(%ebp),%esp 107621: 5b pop %ebx 107622: 5e pop %esi 107623: 5f pop %edi 107624: c9 leave * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107625: ff e0 jmp *%eax } } return result; } 107627: 89 f0 mov %esi,%eax 107629: 8d 65 f4 lea -0xc(%ebp),%esp 10762c: 5b pop %ebx 10762d: 5e pop %esi 10762e: 5f pop %edi 10762f: c9 leave 107630: c3 ret =============================================================================== 0010f17f : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10f17f: 55 push %ebp 10f180: 89 e5 mov %esp,%ebp 10f182: 83 ec 18 sub $0x18,%esp 10f185: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { .type = type, .mount_h = NULL }; 10f188: 89 45 f0 mov %eax,-0x10(%ebp) 10f18b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if ( type != NULL ) { 10f192: 85 c0 test %eax,%eax 10f194: 74 13 je 10f1a9 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10f196: 50 push %eax 10f197: 50 push %eax 10f198: 8d 45 f0 lea -0x10(%ebp),%eax 10f19b: 50 push %eax 10f19c: 68 30 f0 10 00 push $0x10f030 10f1a1: e8 54 ff ff ff call 10f0fa 10f1a6: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10f1a9: 8b 45 f4 mov -0xc(%ebp),%eax 10f1ac: c9 leave 10f1ad: c3 ret =============================================================================== 001073dc : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1073dc: 55 push %ebp 1073dd: 89 e5 mov %esp,%ebp 1073df: 57 push %edi 1073e0: 56 push %esi 1073e1: 53 push %ebx 1073e2: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1073e5: a1 54 3f 12 00 mov 0x123f54,%eax 1073ea: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1073f1: 83 3d 00 e9 11 00 00 cmpl $0x0,0x11e900 1073f8: 75 0a jne 107404 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 1073fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1073fd: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107402: eb 28 jmp 10742c <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 107404: a1 4c 21 12 00 mov 0x12214c,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107409: 83 ec 0c sub $0xc,%esp 10740c: 6a 00 push $0x0 10740e: ff 70 04 pushl 0x4(%eax) 107411: ff 30 pushl (%eax) 107413: ff 70 0c pushl 0xc(%eax) 107416: ff 70 08 pushl 0x8(%eax) 107419: e8 0c 07 00 00 call 107b2a if ( status == -1 ) 10741e: 83 c4 20 add $0x20,%esp 107421: 40 inc %eax 107422: 75 0d jne 107431 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 107424: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107427: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 10742c: e8 73 37 00 00 call 10aba4 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 107431: a1 54 3f 12 00 mov 0x123f54,%eax 107436: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10743c: 83 ec 0c sub $0xc,%esp 10743f: 6a 00 push $0x0 107441: 8d 5d d4 lea -0x2c(%ebp),%ebx 107444: 53 push %ebx 107445: 6a 00 push $0x0 107447: 6a 01 push $0x1 107449: 68 40 00 12 00 push $0x120040 10744e: e8 de 01 00 00 call 107631 rtems_filesystem_root = loc; 107453: 8b 3d 54 3f 12 00 mov 0x123f54,%edi 107459: 83 c7 18 add $0x18,%edi 10745c: b9 05 00 00 00 mov $0x5,%ecx 107461: 89 de mov %ebx,%esi 107463: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107465: 83 c4 14 add $0x14,%esp 107468: 6a 00 push $0x0 10746a: 53 push %ebx 10746b: 6a 00 push $0x0 10746d: 6a 01 push $0x1 10746f: 68 40 00 12 00 push $0x120040 107474: e8 b8 01 00 00 call 107631 rtems_filesystem_current = loc; 107479: 8b 3d 54 3f 12 00 mov 0x123f54,%edi 10747f: 83 c7 04 add $0x4,%edi 107482: b9 05 00 00 00 mov $0x5,%ecx 107487: 89 de mov %ebx,%esi 107489: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 10748b: 83 c4 18 add $0x18,%esp 10748e: 68 ff 01 00 00 push $0x1ff 107493: 68 42 00 12 00 push $0x120042 107498: e8 43 05 00 00 call 1079e0 if ( status != 0 ) 10749d: 83 c4 10 add $0x10,%esp 1074a0: 85 c0 test %eax,%eax 1074a2: 74 0d je 1074b1 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 1074a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1074a7: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 1074ac: e9 7b ff ff ff jmp 10742c <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 1074b1: 8d 65 f4 lea -0xc(%ebp),%esp 1074b4: 5b pop %ebx 1074b5: 5e pop %esi 1074b6: 5f pop %edi 1074b7: c9 leave 1074b8: c3 ret =============================================================================== 0010f0fa : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10f0fa: 55 push %ebp 10f0fb: 89 e5 mov %esp,%ebp 10f0fd: 57 push %edi 10f0fe: 56 push %esi 10f0ff: 53 push %ebx 10f100: 83 ec 0c sub $0xc,%esp 10f103: 8b 7d 08 mov 0x8(%ebp),%edi 10f106: 31 c0 xor %eax,%eax 10f108: bb e0 e8 11 00 mov $0x11e8e0,%ebx const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10f10d: eb 0e jmp 10f11d stop = (*routine)( table_entry, routine_arg ); 10f10f: 51 push %ecx 10f110: 51 push %ecx 10f111: ff 75 0c pushl 0xc(%ebp) 10f114: 53 push %ebx 10f115: ff d7 call *%edi ++table_entry; 10f117: 83 c3 08 add $0x8,%ebx 10f11a: 83 c4 10 add $0x10,%esp { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10f11d: 83 3b 00 cmpl $0x0,(%ebx) 10f120: 74 06 je 10f128 10f122: 84 c0 test %al,%al 10f124: 74 e9 je 10f10f <== ALWAYS TAKEN 10f126: eb 4f jmp 10f177 <== NOT EXECUTED 10f128: 88 c3 mov %al,%bl stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10f12a: 84 c0 test %al,%al 10f12c: 75 49 jne 10f177 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 ); 10f12e: 52 push %edx 10f12f: 6a 00 push $0x0 10f131: 6a 00 push $0x0 10f133: ff 35 c0 60 12 00 pushl 0x1260c0 10f139: e8 a6 b4 ff ff call 10a5e4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 10f13e: 8b 35 7c 3f 12 00 mov 0x123f7c,%esi 10f144: eb 0f jmp 10f155 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10f146: 50 push %eax 10f147: 50 push %eax 10f148: ff 75 0c pushl 0xc(%ebp) 10f14b: 8d 46 08 lea 0x8(%esi),%eax 10f14e: 50 push %eax 10f14f: ff d7 call *%edi 10f151: 88 c3 mov %al,%bl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 10f153: 8b 36 mov (%esi),%esi 10f155: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f158: 81 fe 80 3f 12 00 cmp $0x123f80,%esi 10f15e: 74 04 je 10f164 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10f160: 84 db test %bl,%bl 10f162: 74 e2 je 10f146 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f164: 83 ec 0c sub $0xc,%esp 10f167: ff 35 c0 60 12 00 pushl 0x1260c0 10f16d: e8 5e b5 ff ff call 10a6d0 10f172: 88 d8 mov %bl,%al 10f174: 83 c4 10 add $0x10,%esp } rtems_libio_unlock(); } return stop; } 10f177: 8d 65 f4 lea -0xc(%ebp),%esp 10f17a: 5b pop %ebx 10f17b: 5e pop %esi 10f17c: 5f pop %edi 10f17d: c9 leave 10f17e: c3 ret =============================================================================== 00107ad1 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 107ad1: 55 push %ebp 107ad2: 89 e5 mov %esp,%ebp 107ad4: 57 push %edi 107ad5: 56 push %esi 107ad6: 53 push %ebx 107ad7: 83 ec 10 sub $0x10,%esp 107ada: 8b 7d 0c mov 0xc(%ebp),%edi rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 107add: 6a 00 push $0x0 107adf: 6a 00 push $0x0 107ae1: ff 35 c0 60 12 00 pushl 0x1260c0 107ae7: e8 f8 2a 00 00 call 10a5e4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 107aec: 8b 1d 34 3f 12 00 mov 0x123f34,%ebx 107af2: 31 f6 xor %esi,%esi 107af4: eb 0b jmp 107b01 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 107af6: 50 push %eax 107af7: 50 push %eax 107af8: 57 push %edi 107af9: 53 push %ebx 107afa: ff 55 08 call *0x8(%ebp) 107afd: 89 c6 mov %eax,%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 107aff: 8b 1b mov (%ebx),%ebx 107b01: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 107b04: 81 fb 38 3f 12 00 cmp $0x123f38,%ebx 107b0a: 74 06 je 107b12 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 107b0c: 89 f0 mov %esi,%eax 107b0e: 84 c0 test %al,%al 107b10: 74 e4 je 107af6 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107b12: 83 ec 0c sub $0xc,%esp 107b15: ff 35 c0 60 12 00 pushl 0x1260c0 107b1b: e8 b0 2b 00 00 call 10a6d0 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 107b20: 89 f0 mov %esi,%eax 107b22: 8d 65 f4 lea -0xc(%ebp),%esp 107b25: 5b pop %ebx 107b26: 5e pop %esi 107b27: 5f pop %edi 107b28: c9 leave 107b29: c3 ret =============================================================================== 001074f8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 1074f8: 55 push %ebp 1074f9: 89 e5 mov %esp,%ebp 1074fb: 57 push %edi 1074fc: 56 push %esi 1074fd: 53 push %ebx 1074fe: 83 ec 0c sub $0xc,%esp 107501: 8b 7d 08 mov 0x8(%ebp),%edi 107504: 8b 75 0c mov 0xc(%ebp),%esi 107507: 31 db xor %ebx,%ebx /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107509: eb 01 jmp 10750c { pathname++; pathnamelen--; stripped++; 10750b: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 10750c: 8a 04 1f mov (%edi,%ebx,1),%al 10750f: 39 de cmp %ebx,%esi 107511: 74 17 je 10752a <== NEVER TAKEN 107513: 84 c0 test %al,%al 107515: 74 13 je 10752a <== NEVER TAKEN 107517: 83 ec 0c sub $0xc,%esp 10751a: 0f be c0 movsbl %al,%eax 10751d: 50 push %eax 10751e: e8 c1 0e 00 00 call 1083e4 107523: 83 c4 10 add $0x10,%esp 107526: 85 c0 test %eax,%eax 107528: 75 e1 jne 10750b pathname++; pathnamelen--; stripped++; } return stripped; } 10752a: 89 d8 mov %ebx,%eax 10752c: 8d 65 f4 lea -0xc(%ebp),%esp 10752f: 5b pop %ebx 107530: 5e pop %esi 107531: 5f pop %edi 107532: c9 leave 107533: c3 ret =============================================================================== 0010f1ae : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10f1ae: 55 push %ebp 10f1af: 89 e5 mov %esp,%ebp 10f1b1: 57 push %edi 10f1b2: 56 push %esi 10f1b3: 53 push %ebx 10f1b4: 83 ec 18 sub $0x18,%esp 10f1b7: 8b 5d 08 mov 0x8(%ebp),%ebx size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 10f1ba: 31 c0 xor %eax,%eax 10f1bc: 83 c9 ff or $0xffffffff,%ecx 10f1bf: 89 df mov %ebx,%edi 10f1c1: f2 ae repnz scas %es:(%edi),%al 10f1c3: f7 d1 not %ecx filesystem_node *fsn = malloc( fsn_size ); 10f1c5: 83 c1 10 add $0x10,%ecx 10f1c8: 51 push %ecx 10f1c9: e8 6e 87 ff ff call 10793c 10f1ce: 89 c6 mov %eax,%esi char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 10f1d0: 83 c4 10 add $0x10,%esp 10f1d3: 85 c0 test %eax,%eax 10f1d5: 75 10 jne 10f1e7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10f1d7: e8 44 38 00 00 call 112a20 <__errno> <== NOT EXECUTED 10f1dc: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10f1e2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f1e5: eb 7a jmp 10f261 <== NOT EXECUTED rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); 10f1e7: 8d 78 10 lea 0x10(%eax),%edi if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 10f1ea: 50 push %eax 10f1eb: 50 push %eax 10f1ec: 53 push %ebx 10f1ed: 57 push %edi 10f1ee: e8 a1 43 00 00 call 113594 fsn->entry.type = type_storage; 10f1f3: 89 7e 08 mov %edi,0x8(%esi) fsn->entry.mount_h = mount_h; 10f1f6: 8b 45 0c mov 0xc(%ebp),%eax 10f1f9: 89 46 0c mov %eax,0xc(%esi) rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10f1fc: 83 c4 0c add $0xc,%esp 10f1ff: 6a 00 push $0x0 10f201: 6a 00 push $0x0 10f203: ff 35 c0 60 12 00 pushl 0x1260c0 10f209: e8 d6 b3 ff ff call 10a5e4 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 10f20e: 89 1c 24 mov %ebx,(%esp) 10f211: e8 69 ff ff ff call 10f17f 10f216: 83 c4 10 add $0x10,%esp 10f219: 85 c0 test %eax,%eax 10f21b: 75 1d jne 10f23a <== NEVER TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 10f21d: 51 push %ecx 10f21e: 51 push %ecx 10f21f: 56 push %esi 10f220: 68 7c 3f 12 00 push $0x123f7c 10f225: e8 1e bc ff ff call 10ae48 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f22a: 5a pop %edx 10f22b: ff 35 c0 60 12 00 pushl 0x1260c0 10f231: e8 9a b4 ff ff call 10a6d0 10f236: 31 c0 xor %eax,%eax 10f238: eb 24 jmp 10f25e 10f23a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f23d: ff 35 c0 60 12 00 pushl 0x1260c0 <== NOT EXECUTED 10f243: e8 88 b4 ff ff call 10a6d0 <== NOT EXECUTED rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 10f248: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10f24b: e8 4c 84 ff ff call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10f250: e8 cb 37 00 00 call 112a20 <__errno> <== NOT EXECUTED 10f255: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f25b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f25e: 83 c4 10 add $0x10,%esp } rtems_libio_unlock(); return 0; } 10f261: 8d 65 f4 lea -0xc(%ebp),%esp 10f264: 5b pop %ebx 10f265: 5e pop %esi 10f266: 5f pop %edi 10f267: c9 leave 10f268: c3 ret =============================================================================== 0010f060 : int rtems_filesystem_unregister( const char *type ) { 10f060: 55 push %ebp <== NOT EXECUTED 10f061: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f063: 56 push %esi <== NOT EXECUTED 10f064: 53 push %ebx <== NOT EXECUTED 10f065: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 10f068: 85 f6 test %esi,%esi <== NOT EXECUTED 10f06a: 75 10 jne 10f07c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 10f06c: e8 af 39 00 00 call 112a20 <__errno> <== NOT EXECUTED 10f071: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f077: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f07a: eb 77 jmp 10f0f3 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10f07c: 53 push %ebx <== NOT EXECUTED 10f07d: 6a 00 push $0x0 <== NOT EXECUTED 10f07f: 6a 00 push $0x0 <== NOT EXECUTED 10f081: ff 35 c0 60 12 00 pushl 0x1260c0 <== NOT EXECUTED 10f087: e8 58 b5 ff ff call 10a5e4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 10f08c: 8b 1d 7c 3f 12 00 mov 0x123f7c,%ebx <== NOT EXECUTED } rtems_libio_lock(); for ( 10f092: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f095: eb 35 jmp 10f0cc <== NOT EXECUTED !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 10f097: 51 push %ecx <== NOT EXECUTED 10f098: 51 push %ecx <== NOT EXECUTED 10f099: 56 push %esi <== NOT EXECUTED 10f09a: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10f09d: e8 9a 44 00 00 call 11353c <== NOT EXECUTED 10f0a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f0a5: 85 c0 test %eax,%eax <== NOT EXECUTED 10f0a7: 75 21 jne 10f0ca <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10f0a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f0ac: 53 push %ebx <== NOT EXECUTED 10f0ad: e8 ba bd ff ff call 10ae6c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( node ); free( fsn ); 10f0b2: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f0b5: e8 e2 85 ff ff call 10769c <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f0ba: 5a pop %edx <== NOT EXECUTED 10f0bb: ff 35 c0 60 12 00 pushl 0x1260c0 <== NOT EXECUTED 10f0c1: e8 0a b6 ff ff call 10a6d0 <== NOT EXECUTED 10f0c6: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f0c8: eb 26 jmp 10f0f0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 10f0ca: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f0cc: 81 fb 80 3f 12 00 cmp $0x123f80,%ebx <== NOT EXECUTED 10f0d2: 75 c3 jne 10f097 <== NOT EXECUTED 10f0d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f0d7: ff 35 c0 60 12 00 pushl 0x1260c0 <== NOT EXECUTED 10f0dd: e8 ee b5 ff ff call 10a6d0 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 10f0e2: e8 39 39 00 00 call 112a20 <__errno> <== NOT EXECUTED 10f0e7: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED 10f0ed: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f0f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10f0f3: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f0f6: 5b pop %ebx <== NOT EXECUTED 10f0f7: 5e pop %esi <== NOT EXECUTED 10f0f8: c9 leave <== NOT EXECUTED 10f0f9: c3 ret <== NOT EXECUTED =============================================================================== 00107290 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107290: 55 push %ebp <== NOT EXECUTED 107291: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107293: 57 push %edi <== NOT EXECUTED 107294: 56 push %esi <== NOT EXECUTED 107295: 53 push %ebx <== NOT EXECUTED 107296: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 107299: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 10729c: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 10729f: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 1072a2: 31 c0 xor %eax,%eax <== NOT EXECUTED 1072a4: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1072a6: f7 d1 not %ecx <== NOT EXECUTED 1072a8: 49 dec %ecx <== NOT EXECUTED 1072a9: 6a 01 push $0x1 <== NOT EXECUTED 1072ab: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 1072ae: 56 push %esi <== NOT EXECUTED 1072af: 6a 00 push $0x0 <== NOT EXECUTED 1072b1: 51 push %ecx <== NOT EXECUTED 1072b2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1072b5: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 1072b8: e8 74 03 00 00 call 107631 <== NOT EXECUTED 1072bd: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 1072bf: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 1072c2: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1072c5: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 1072c8: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1072cb: 85 c0 test %eax,%eax <== NOT EXECUTED 1072cd: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 1072d0: 75 20 jne 1072f2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1072d2: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 1072d5: 85 c0 test %eax,%eax <== NOT EXECUTED 1072d7: 74 09 je 1072e2 <== NOT EXECUTED 1072d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1072dc: 56 push %esi <== NOT EXECUTED 1072dd: ff d0 call *%eax <== NOT EXECUTED 1072df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1072e2: e8 39 b7 00 00 call 112a20 <__errno> <== NOT EXECUTED 1072e7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1072ed: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1072f0: eb 7b jmp 10736d <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 1072f2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1072f5: 56 push %esi <== NOT EXECUTED 1072f6: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 1072f9: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 1072fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1072fe: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 107301: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 107304: 75 04 jne 10730a <== NOT EXECUTED 107306: 85 ff test %edi,%edi <== NOT EXECUTED 107308: 74 1e je 107328 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 10730a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10730d: 85 c0 test %eax,%eax <== NOT EXECUTED 10730f: 74 53 je 107364 <== NOT EXECUTED 107311: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107314: 85 c0 test %eax,%eax <== NOT EXECUTED 107316: 74 4c je 107364 <== NOT EXECUTED 107318: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10731b: 8d 55 d4 lea -0x2c(%ebp),%edx <== NOT EXECUTED 10731e: 52 push %edx <== NOT EXECUTED 10731f: ff d0 call *%eax <== NOT EXECUTED 107321: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107326: eb 37 jmp 10735f <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107328: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10732b: 89 02 mov %eax,(%edx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 10732d: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107330: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 107333: 31 c0 xor %eax,%eax <== NOT EXECUTED 107335: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107337: f7 d1 not %ecx <== NOT EXECUTED 107339: 49 dec %ecx <== NOT EXECUTED 10733a: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 10733d: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED 107340: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 107343: 8b 43 54 mov 0x54(%ebx),%eax <== NOT EXECUTED 107346: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 107349: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10734c: 85 c0 test %eax,%eax <== NOT EXECUTED 10734e: 74 1b je 10736b <== NOT EXECUTED 107350: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 107353: 85 c0 test %eax,%eax <== NOT EXECUTED 107355: 74 14 je 10736b <== NOT EXECUTED 107357: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10735a: 56 push %esi <== NOT EXECUTED 10735b: ff d0 call *%eax <== NOT EXECUTED 10735d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10735f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107362: eb 09 jmp 10736d <== NOT EXECUTED 107364: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 107369: eb 02 jmp 10736d <== NOT EXECUTED 10736b: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 10736d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107370: 5b pop %ebx <== NOT EXECUTED 107371: 5e pop %esi <== NOT EXECUTED 107372: 5f pop %edi <== NOT EXECUTED 107373: c9 leave <== NOT EXECUTED 107374: c3 ret <== NOT EXECUTED =============================================================================== 0010cb60 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10cb60: 55 push %ebp 10cb61: 89 e5 mov %esp,%ebp 10cb63: 57 push %edi 10cb64: 56 push %esi 10cb65: 53 push %ebx 10cb66: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10cb69: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10cb6d: 74 41 je 10cbb0 <== NEVER TAKEN 10cb6f: 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 ] ) 10cb74: 8b 04 9d 20 9f 12 00 mov 0x129f20(,%ebx,4),%eax 10cb7b: 85 c0 test %eax,%eax 10cb7d: 74 2b je 10cbaa continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10cb7f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10cb82: be 01 00 00 00 mov $0x1,%esi 10cb87: 85 ff test %edi,%edi 10cb89: 75 17 jne 10cba2 10cb8b: eb 1d jmp 10cbaa continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10cb8d: 8b 47 1c mov 0x1c(%edi),%eax 10cb90: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10cb93: 85 c0 test %eax,%eax 10cb95: 74 0a je 10cba1 <== NEVER TAKEN continue; (*routine)(the_thread); 10cb97: 83 ec 0c sub $0xc,%esp 10cb9a: 50 push %eax 10cb9b: ff 55 08 call *0x8(%ebp) 10cb9e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10cba1: 46 inc %esi 10cba2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10cba6: 39 c6 cmp %eax,%esi 10cba8: 76 e3 jbe 10cb8d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10cbaa: 43 inc %ebx 10cbab: 83 fb 05 cmp $0x5,%ebx 10cbae: 75 c4 jne 10cb74 (*routine)(the_thread); } } } 10cbb0: 8d 65 f4 lea -0xc(%ebp),%esp 10cbb3: 5b pop %ebx 10cbb4: 5e pop %esi 10cbb5: 5f pop %edi 10cbb6: c9 leave 10cbb7: c3 ret =============================================================================== 0010ef6f : * 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 ) { 10ef6f: 55 push %ebp 10ef70: 89 e5 mov %esp,%ebp 10ef72: 57 push %edi 10ef73: 53 push %ebx 10ef74: 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 ); 10ef77: 6a 00 push $0x0 10ef79: 6a 00 push $0x0 10ef7b: ff 35 c0 60 12 00 pushl 0x1260c0 10ef81: e8 5e b6 ff ff call 10a5e4 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 10ef86: a1 bc 60 12 00 mov 0x1260bc,%eax 10ef8b: 83 c4 10 add $0x10,%esp 10ef8e: 85 c0 test %eax,%eax 10ef90: 74 4f je 10efe1 rc = rtems_semaphore_create( 10ef92: 83 ec 0c sub $0xc,%esp 10ef95: 8d 55 f4 lea -0xc(%ebp),%edx 10ef98: 52 push %edx 10ef99: 6a 00 push $0x0 10ef9b: 6a 54 push $0x54 10ef9d: 6a 01 push $0x1 10ef9f: 2b 05 b8 60 12 00 sub 0x1260b8,%eax 10efa5: c1 f8 06 sar $0x6,%eax 10efa8: 0d 00 49 42 4c or $0x4c424900,%eax 10efad: 50 push %eax 10efae: e8 05 b4 ff ff call 10a3b8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 10efb3: 83 c4 20 add $0x20,%esp 10efb6: 85 c0 test %eax,%eax 10efb8: 75 27 jne 10efe1 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 10efba: 8b 1d bc 60 12 00 mov 0x1260bc,%ebx next = iop->data1; 10efc0: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 10efc3: b9 10 00 00 00 mov $0x10,%ecx 10efc8: 89 df mov %ebx,%edi 10efca: f3 ab rep stos %eax,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 10efcc: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 10efd3: 8b 45 f4 mov -0xc(%ebp),%eax 10efd6: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 10efd9: 89 15 bc 60 12 00 mov %edx,0x1260bc goto done; 10efdf: eb 02 jmp 10efe3 10efe1: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10efe3: 83 ec 0c sub $0xc,%esp 10efe6: ff 35 c0 60 12 00 pushl 0x1260c0 10efec: e8 df b6 ff ff call 10a6d0 iop = 0; done: rtems_libio_unlock(); return iop; } 10eff1: 89 d8 mov %ebx,%eax 10eff3: 8d 65 f8 lea -0x8(%ebp),%esp 10eff6: 5b pop %ebx 10eff7: 5f pop %edi 10eff8: c9 leave 10eff9: c3 ret =============================================================================== 0010ef1a : */ void rtems_libio_free( rtems_libio_t *iop ) { 10ef1a: 55 push %ebp 10ef1b: 89 e5 mov %esp,%ebp 10ef1d: 53 push %ebx 10ef1e: 83 ec 08 sub $0x8,%esp 10ef21: 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 ); 10ef24: 6a 00 push $0x0 10ef26: 6a 00 push $0x0 10ef28: ff 35 c0 60 12 00 pushl 0x1260c0 10ef2e: e8 b1 b6 ff ff call 10a5e4 rtems_libio_lock(); if (iop->sem) 10ef33: 8b 43 2c mov 0x2c(%ebx),%eax 10ef36: 83 c4 10 add $0x10,%esp 10ef39: 85 c0 test %eax,%eax 10ef3b: 74 0c je 10ef49 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10ef3d: 83 ec 0c sub $0xc,%esp 10ef40: 50 push %eax 10ef41: e8 0e b6 ff ff call 10a554 10ef46: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10ef49: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10ef50: a1 bc 60 12 00 mov 0x1260bc,%eax 10ef55: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10ef58: 89 1d bc 60 12 00 mov %ebx,0x1260bc } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ef5e: a1 c0 60 12 00 mov 0x1260c0,%eax 10ef63: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10ef66: 8b 5d fc mov -0x4(%ebp),%ebx 10ef69: c9 leave 10ef6a: e9 61 b7 ff ff jmp 10a6d0 =============================================================================== 00107788 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 107788: 55 push %ebp 107789: 89 e5 mov %esp,%ebp 10778b: 53 push %ebx 10778c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10778f: a1 44 21 12 00 mov 0x122144,%eax 107794: 85 c0 test %eax,%eax 107796: 74 40 je 1077d8 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 107798: 52 push %edx 107799: 52 push %edx 10779a: 6a 40 push $0x40 10779c: 50 push %eax 10779d: e8 1a fd ff ff call 1074bc 1077a2: a3 b8 60 12 00 mov %eax,0x1260b8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1077a7: 83 c4 10 add $0x10,%esp 1077aa: 85 c0 test %eax,%eax 1077ac: 75 07 jne 1077b5 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1077ae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077b1: 6a 1a push $0x1a <== NOT EXECUTED 1077b3: eb 46 jmp 1077fb <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 1077b5: a3 bc 60 12 00 mov %eax,0x1260bc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1077ba: 8b 1d 44 21 12 00 mov 0x122144,%ebx 1077c0: 31 d2 xor %edx,%edx 1077c2: eb 03 jmp 1077c7 iop->data1 = iop + 1; 1077c4: 89 40 f4 mov %eax,-0xc(%eax) 1077c7: 89 c1 mov %eax,%ecx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1077c9: 42 inc %edx 1077ca: 83 c0 40 add $0x40,%eax 1077cd: 39 da cmp %ebx,%edx 1077cf: 72 f3 jb 1077c4 iop->data1 = iop + 1; iop->data1 = NULL; 1077d1: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1077d8: 83 ec 0c sub $0xc,%esp 1077db: 68 c0 60 12 00 push $0x1260c0 1077e0: 6a 00 push $0x0 1077e2: 6a 54 push $0x54 1077e4: 6a 01 push $0x1 1077e6: 68 4f 49 42 4c push $0x4c42494f 1077eb: e8 c8 2b 00 00 call 10a3b8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1077f0: 83 c4 20 add $0x20,%esp 1077f3: 85 c0 test %eax,%eax 1077f5: 74 09 je 107800 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 1077f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077fa: 50 push %eax <== NOT EXECUTED 1077fb: e8 a4 33 00 00 call 10aba4 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 107800: a1 40 21 12 00 mov 0x122140,%eax 107805: 85 c0 test %eax,%eax 107807: 74 06 je 10780f <== NEVER TAKEN (* rtems_fs_init_helper)(); } 107809: 8b 5d fc mov -0x4(%ebp),%ebx 10780c: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 10780d: ff e0 jmp *%eax } 10780f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107812: c9 leave <== NOT EXECUTED 107813: c3 ret <== NOT EXECUTED =============================================================================== 001089c0 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 1089c0: 55 push %ebp 1089c1: 89 e5 mov %esp,%ebp 1089c3: 57 push %edi 1089c4: 56 push %esi 1089c5: 53 push %ebx 1089c6: 83 ec 40 sub $0x40,%esp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 1089c9: 8d 45 e4 lea -0x1c(%ebp),%eax 1089cc: 50 push %eax 1089cd: 6a 00 push $0x0 1089cf: 6a 00 push $0x0 1089d1: e8 32 27 00 00 call 10b108 1089d6: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 1089d9: 83 c4 10 add $0x10,%esp 1089dc: 85 c0 test %eax,%eax 1089de: 0f 85 c7 00 00 00 jne 108aab <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1089e4: 81 3d 40 3f 12 00 e8 cmpl $0x1260e8,0x123f40 1089eb: 60 12 00 1089ee: 75 51 jne 108a41 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1089f0: 83 ec 0c sub $0xc,%esp 1089f3: 6a 48 push $0x48 1089f5: e8 8a f4 ff ff call 107e84 1089fa: 89 c3 mov %eax,%ebx if (!tmp) 1089fc: 83 c4 10 add $0x10,%esp 1089ff: 85 c0 test %eax,%eax 108a01: 75 0c jne 108a0f <== ALWAYS TAKEN 108a03: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED 108a0a: e9 9c 00 00 00 jmp 108aab <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 108a0f: 56 push %esi 108a10: 68 d4 88 10 00 push $0x1088d4 108a15: 68 40 3f 12 00 push $0x123f40 108a1a: 6a 00 push $0x0 108a1c: e8 03 28 00 00 call 10b224 108a21: 89 c6 mov %eax,%esi if (sc != RTEMS_SUCCESSFUL) { 108a23: 83 c4 10 add $0x10,%esp 108a26: 85 c0 test %eax,%eax 108a28: 74 11 je 108a3b <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 108a2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a2d: 53 push %ebx <== NOT EXECUTED 108a2e: e8 a5 ef ff ff call 1079d8 <== NOT EXECUTED 108a33: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED return sc; 108a36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a39: eb 70 jmp 108aab <== NOT EXECUTED } rtems_current_user_env = tmp; 108a3b: 89 1d 40 3f 12 00 mov %ebx,0x123f40 }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 108a41: a1 40 3f 12 00 mov 0x123f40,%eax 108a46: be e8 60 12 00 mov $0x1260e8,%esi 108a4b: b9 12 00 00 00 mov $0x12,%ecx 108a50: 89 c7 mov %eax,%edi 108a52: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 108a54: 8b 55 e4 mov -0x1c(%ebp),%edx 108a57: 89 10 mov %edx,(%eax) * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a59: 83 ec 0c sub $0xc,%esp 108a5c: 6a 00 push $0x0 108a5e: 8d 5d d0 lea -0x30(%ebp),%ebx 108a61: 53 push %ebx 108a62: 6a 00 push $0x0 108a64: 6a 01 push $0x1 108a66: 68 c8 07 12 00 push $0x1207c8 108a6b: e8 fd ee ff ff call 10796d rtems_filesystem_root = loc; 108a70: 8b 3d 40 3f 12 00 mov 0x123f40,%edi 108a76: 83 c7 18 add $0x18,%edi 108a79: b9 05 00 00 00 mov $0x5,%ecx 108a7e: 89 de mov %ebx,%esi 108a80: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 108a82: 83 c4 14 add $0x14,%esp 108a85: 6a 00 push $0x0 108a87: 53 push %ebx 108a88: 6a 00 push $0x0 108a8a: 6a 01 push $0x1 108a8c: 68 c8 07 12 00 push $0x1207c8 108a91: e8 d7 ee ff ff call 10796d rtems_filesystem_current = loc; 108a96: 8b 3d 40 3f 12 00 mov 0x123f40,%edi 108a9c: 83 c7 04 add $0x4,%edi 108a9f: b9 05 00 00 00 mov $0x5,%ecx 108aa4: 89 de mov %ebx,%esi 108aa6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 108aa8: 83 c4 20 add $0x20,%esp } 108aab: 8b 45 c4 mov -0x3c(%ebp),%eax 108aae: 8d 65 f4 lea -0xc(%ebp),%esp 108ab1: 5b pop %ebx 108ab2: 5e pop %esi 108ab3: 5f pop %edi 108ab4: c9 leave 108ab5: c3 ret =============================================================================== 0010892b : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 10892b: 55 push %ebp <== NOT EXECUTED 10892c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10892e: 53 push %ebx <== NOT EXECUTED 10892f: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 108932: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108935: 50 push %eax <== NOT EXECUTED 108936: 6a 00 push $0x0 <== NOT EXECUTED 108938: 6a 00 push $0x0 <== NOT EXECUTED 10893a: e8 c9 27 00 00 call 10b108 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 10893f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108942: 85 c0 test %eax,%eax <== NOT EXECUTED 108944: 75 75 jne 1089bb <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 108946: 8b 1d 40 3f 12 00 mov 0x123f40,%ebx <== NOT EXECUTED 10894c: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 10894e: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 108951: 75 21 jne 108974 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 108953: 51 push %ecx <== NOT EXECUTED 108954: 51 push %ecx <== NOT EXECUTED 108955: 68 40 3f 12 00 push $0x123f40 <== NOT EXECUTED 10895a: 6a 00 push $0x0 <== NOT EXECUTED 10895c: e8 57 29 00 00 call 10b2b8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 108961: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108964: 85 c0 test %eax,%eax <== NOT EXECUTED 108966: 75 53 jne 1089bb <== NOT EXECUTED free_user_env(tmp); 108968: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10896b: 53 push %ebx <== NOT EXECUTED 10896c: e8 63 ff ff ff call 1088d4 <== NOT EXECUTED 108971: 83 c4 10 add $0x10,%esp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 108974: 52 push %edx <== NOT EXECUTED 108975: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108978: 50 push %eax <== NOT EXECUTED 108979: 68 40 3f 12 00 push $0x123f40 <== NOT EXECUTED 10897e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108981: e8 ae 29 00 00 call 10b334 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 108986: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108989: 85 c0 test %eax,%eax <== NOT EXECUTED 10898b: 75 24 jne 1089b1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 10898d: 50 push %eax <== NOT EXECUTED 10898e: 68 d4 88 10 00 push $0x1088d4 <== NOT EXECUTED 108993: 68 40 3f 12 00 push $0x123f40 <== NOT EXECUTED 108998: 6a 00 push $0x0 <== NOT EXECUTED 10899a: e8 85 28 00 00 call 10b224 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10899f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1089a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1089a4: 75 0b jne 1089b1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1089a6: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 1089a9: 89 15 40 3f 12 00 mov %edx,0x123f40 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 1089af: eb 0a jmp 1089bb <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 1089b1: c7 05 40 3f 12 00 e8 movl $0x1260e8,0x123f40 <== NOT EXECUTED 1089b8: 60 12 00 return sc; } 1089bb: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1089be: c9 leave <== NOT EXECUTED 1089bf: c3 ret <== NOT EXECUTED =============================================================================== 0010ee24 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10ee24: 55 push %ebp 10ee25: 89 e5 mov %esp,%ebp 10ee27: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10ee2a: 89 d1 mov %edx,%ecx 10ee2c: 83 e1 06 and $0x6,%ecx 10ee2f: b8 02 00 00 00 mov $0x2,%eax 10ee34: 83 f9 06 cmp $0x6,%ecx 10ee37: 74 0f je 10ee48 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10ee39: 30 c0 xor %al,%al 10ee3b: f6 c2 02 test $0x2,%dl 10ee3e: 75 08 jne 10ee48 <== ALWAYS TAKEN 10ee40: 89 d0 mov %edx,%eax <== NOT EXECUTED 10ee42: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 10ee45: 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 ) { 10ee48: f6 c2 01 test $0x1,%dl 10ee4b: 74 03 je 10ee50 fcntl_flags |= O_NONBLOCK; 10ee4d: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10ee50: f6 c6 02 test $0x2,%dh 10ee53: 74 03 je 10ee58 fcntl_flags |= O_APPEND; 10ee55: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10ee58: 80 e6 04 and $0x4,%dh 10ee5b: 74 03 je 10ee60 fcntl_flags |= O_CREAT; 10ee5d: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10ee60: c9 leave 10ee61: c3 ret =============================================================================== 00112784 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 112784: 55 push %ebp 112785: 89 e5 mov %esp,%ebp 112787: 56 push %esi 112788: 53 push %ebx 112789: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 11278c: 85 db test %ebx,%ebx 11278e: 74 57 je 1127e7 return EINVAL; *pointer = NULL; 112790: 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()) && 112796: 83 3d 60 94 12 00 03 cmpl $0x3,0x129460 11279d: 75 09 jne 1127a8 <== NEVER TAKEN 11279f: e8 5c 5d ff ff call 108500 1127a4: 84 c0 test %al,%al 1127a6: 74 3f je 1127e7 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1127a8: e8 a9 5d ff ff call 108556 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 1127ad: 6a 00 push $0x0 1127af: ff 75 0c pushl 0xc(%ebp) 1127b2: ff 75 10 pushl 0x10(%ebp) 1127b5: ff 35 50 51 12 00 pushl 0x125150 1127bb: e8 d4 a6 ff ff call 10ce94 <_Protected_heap_Allocate_aligned_with_boundary> 1127c0: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 1127c2: 83 c4 10 add $0x10,%esp 1127c5: b8 0c 00 00 00 mov $0xc,%eax 1127ca: 85 f6 test %esi,%esi 1127cc: 74 1e je 1127ec return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 1127ce: a1 50 75 12 00 mov 0x127550,%eax 1127d3: 85 c0 test %eax,%eax 1127d5: 74 0a je 1127e1 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 1127d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1127da: 53 push %ebx <== NOT EXECUTED 1127db: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1127de: 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; 1127e1: 89 33 mov %esi,(%ebx) 1127e3: 31 c0 xor %eax,%eax return 0; 1127e5: eb 05 jmp 1127ec 1127e7: b8 16 00 00 00 mov $0x16,%eax } 1127ec: 8d 65 f8 lea -0x8(%ebp),%esp 1127ef: 5b pop %ebx 1127f0: 5e pop %esi 1127f1: c9 leave 1127f2: c3 ret =============================================================================== 0010b69b : void rtems_panic( const char *printf_format, ... ) { 10b69b: 55 push %ebp <== NOT EXECUTED 10b69c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b69e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10b6a1: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED ) { va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 10b6a4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b6a7: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10b6ac: e8 80 fe ff ff call 10b531 <== NOT EXECUTED va_end(arglist); } 10b6b1: c9 leave <== NOT EXECUTED 10b6b2: c3 ret <== NOT EXECUTED =============================================================================== 00114f08 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114f08: 55 push %ebp 114f09: 89 e5 mov %esp,%ebp 114f0b: 57 push %edi 114f0c: 56 push %esi 114f0d: 53 push %ebx 114f0e: 83 ec 1c sub $0x1c,%esp 114f11: 8b 75 0c mov 0xc(%ebp),%esi 114f14: 8b 55 10 mov 0x10(%ebp),%edx 114f17: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114f1a: b8 03 00 00 00 mov $0x3,%eax 114f1f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114f23: 0f 84 cf 00 00 00 je 114ff8 return RTEMS_INVALID_NAME; if ( !starting_address ) 114f29: 85 f6 test %esi,%esi 114f2b: 0f 84 bb 00 00 00 je 114fec return RTEMS_INVALID_ADDRESS; if ( !id ) 114f31: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114f35: 0f 84 b1 00 00 00 je 114fec <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114f3b: 85 ff test %edi,%edi 114f3d: 0f 84 b0 00 00 00 je 114ff3 114f43: 85 d2 test %edx,%edx 114f45: 0f 84 a8 00 00 00 je 114ff3 114f4b: 39 fa cmp %edi,%edx 114f4d: 0f 82 a0 00 00 00 jb 114ff3 114f53: f7 c7 03 00 00 00 test $0x3,%edi 114f59: 0f 85 94 00 00 00 jne 114ff3 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114f5f: f7 c6 03 00 00 00 test $0x3,%esi 114f65: 0f 85 81 00 00 00 jne 114fec 114f6b: a1 dc f5 13 00 mov 0x13f5dc,%eax 114f70: 40 inc %eax 114f71: a3 dc f5 13 00 mov %eax,0x13f5dc * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 114f76: 83 ec 0c sub $0xc,%esp 114f79: 68 64 f4 13 00 push $0x13f464 114f7e: 89 55 e4 mov %edx,-0x1c(%ebp) 114f81: e8 aa 3c 00 00 call 118c30 <_Objects_Allocate> 114f86: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114f88: 83 c4 10 add $0x10,%esp 114f8b: 85 c0 test %eax,%eax 114f8d: 8b 55 e4 mov -0x1c(%ebp),%edx 114f90: 75 0c jne 114f9e _Thread_Enable_dispatch(); 114f92: e8 4e 49 00 00 call 1198e5 <_Thread_Enable_dispatch> 114f97: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114f9c: eb 5a jmp 114ff8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 114f9e: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 114fa1: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 114fa4: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114fa7: 8b 45 18 mov 0x18(%ebp),%eax 114faa: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 114fad: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 114fb4: 57 push %edi 114fb5: 89 d0 mov %edx,%eax 114fb7: 31 d2 xor %edx,%edx 114fb9: f7 f7 div %edi 114fbb: 50 push %eax 114fbc: 56 push %esi 114fbd: 8d 43 24 lea 0x24(%ebx),%eax 114fc0: 50 push %eax 114fc1: e8 b2 2a 00 00 call 117a78 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114fc6: 8b 43 08 mov 0x8(%ebx),%eax 114fc9: 0f b7 c8 movzwl %ax,%ecx 114fcc: 8b 15 80 f4 13 00 mov 0x13f480,%edx 114fd2: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114fd5: 8b 55 08 mov 0x8(%ebp),%edx 114fd8: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114fdb: 8b 55 1c mov 0x1c(%ebp),%edx 114fde: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114fe0: e8 00 49 00 00 call 1198e5 <_Thread_Enable_dispatch> 114fe5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114fe7: 83 c4 10 add $0x10,%esp 114fea: eb 0c jmp 114ff8 114fec: b8 09 00 00 00 mov $0x9,%eax 114ff1: eb 05 jmp 114ff8 114ff3: b8 08 00 00 00 mov $0x8,%eax } 114ff8: 8d 65 f4 lea -0xc(%ebp),%esp 114ffb: 5b pop %ebx 114ffc: 5e pop %esi 114ffd: 5f pop %edi 114ffe: c9 leave 114fff: c3 ret =============================================================================== 0010d75a : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10d75a: 55 push %ebp 10d75b: 89 e5 mov %esp,%ebp 10d75d: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10d760: 80 3d 2c 45 12 00 00 cmpb $0x0,0x12452c 10d767: 74 3c je 10d7a5 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 10d769: 83 3d b8 5e 12 00 00 cmpl $0x0,0x125eb8 <== NOT EXECUTED 10d770: 75 33 jne 10d7a5 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 10d772: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d775: 68 b8 5e 12 00 push $0x125eb8 <== NOT EXECUTED 10d77a: 6a 00 push $0x0 <== NOT EXECUTED 10d77c: 6a 54 push $0x54 <== NOT EXECUTED 10d77e: 6a 01 push $0x1 <== NOT EXECUTED 10d780: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10d785: e8 2e cc ff ff call 10a3b8 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 10d78a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10d78d: 85 c0 test %eax,%eax <== NOT EXECUTED 10d78f: 74 09 je 10d79a <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10d791: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d794: 50 push %eax <== NOT EXECUTED 10d795: e8 0a d4 ff ff call 10aba4 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10d79a: e8 15 c8 ff ff call 109fb4 <== NOT EXECUTED rtems_pipe_no = now; 10d79f: 66 a3 c0 5e 12 00 mov %ax,0x125ec0 <== NOT EXECUTED } 10d7a5: c9 leave 10d7a6: c3 ret =============================================================================== 0010b465 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b465: 55 push %ebp 10b466: 89 e5 mov %esp,%ebp 10b468: 57 push %edi 10b469: 56 push %esi 10b46a: 53 push %ebx 10b46b: 83 ec 30 sub $0x30,%esp 10b46e: 8b 75 08 mov 0x8(%ebp),%esi 10b471: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10b474: 8d 45 e4 lea -0x1c(%ebp),%eax 10b477: 50 push %eax 10b478: 56 push %esi 10b479: 68 14 92 12 00 push $0x129214 10b47e: e8 ed 1d 00 00 call 10d270 <_Objects_Get> 10b483: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b485: 83 c4 10 add $0x10,%esp 10b488: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b48c: 0f 85 40 01 00 00 jne 10b5d2 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b492: 8b 40 40 mov 0x40(%eax),%eax 10b495: 3b 05 c8 93 12 00 cmp 0x1293c8,%eax 10b49b: 74 0f je 10b4ac _Thread_Enable_dispatch(); 10b49d: e8 bf 25 00 00 call 10da61 <_Thread_Enable_dispatch> 10b4a2: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 10b4a7: e9 2b 01 00 00 jmp 10b5d7 } if ( length == RTEMS_PERIOD_STATUS ) { 10b4ac: 85 db test %ebx,%ebx 10b4ae: 75 19 jne 10b4c9 switch ( the_period->state ) { 10b4b0: 8b 47 38 mov 0x38(%edi),%eax 10b4b3: 83 f8 04 cmp $0x4,%eax 10b4b6: 77 07 ja 10b4bf <== NEVER TAKEN 10b4b8: 8b 1c 85 40 22 12 00 mov 0x122240(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b4bf: e8 9d 25 00 00 call 10da61 <_Thread_Enable_dispatch> return( return_value ); 10b4c4: e9 0e 01 00 00 jmp 10b5d7 } _ISR_Disable( level ); 10b4c9: 9c pushf 10b4ca: fa cli 10b4cb: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10b4ce: 8b 47 38 mov 0x38(%edi),%eax 10b4d1: 83 f8 02 cmp $0x2,%eax 10b4d4: 74 5f je 10b535 10b4d6: 83 f8 04 cmp $0x4,%eax 10b4d9: 0f 84 ba 00 00 00 je 10b599 10b4df: 85 c0 test %eax,%eax 10b4e1: 0f 85 eb 00 00 00 jne 10b5d2 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10b4e7: ff 75 d4 pushl -0x2c(%ebp) 10b4ea: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b4eb: 83 ec 0c sub $0xc,%esp 10b4ee: 57 push %edi 10b4ef: e8 9c fd ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b4f4: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b4fb: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b502: c7 47 2c e0 b7 10 00 movl $0x10b7e0,0x2c(%edi) the_watchdog->id = id; 10b509: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b50c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b513: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b516: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b519: 5b pop %ebx 10b51a: 5e pop %esi 10b51b: 83 c7 10 add $0x10,%edi 10b51e: 57 push %edi 10b51f: 68 e8 93 12 00 push $0x1293e8 10b524: e8 df 34 00 00 call 10ea08 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b529: e8 33 25 00 00 call 10da61 <_Thread_Enable_dispatch> 10b52e: 31 db xor %ebx,%ebx 10b530: e9 98 00 00 00 jmp 10b5cd case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b535: 83 ec 0c sub $0xc,%esp 10b538: 57 push %edi 10b539: e8 4c fe ff ff call 10b38a <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10b53e: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b545: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b548: ff 75 d4 pushl -0x2c(%ebp) 10b54b: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b54c: a1 c8 93 12 00 mov 0x1293c8,%eax 10b551: 8b 57 08 mov 0x8(%edi),%edx 10b554: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b557: 5a pop %edx 10b558: 59 pop %ecx 10b559: 68 00 40 00 00 push $0x4000 10b55e: 50 push %eax 10b55f: e8 38 2d 00 00 call 10e29c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b564: 9c pushf 10b565: fa cli 10b566: 5a pop %edx local_state = the_period->state; 10b567: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b56a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b571: 52 push %edx 10b572: 9d popf /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 10b573: 83 c4 10 add $0x10,%esp 10b576: 83 f8 03 cmp $0x3,%eax 10b579: 75 15 jne 10b590 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b57b: 56 push %esi 10b57c: 56 push %esi 10b57d: 68 00 40 00 00 push $0x4000 10b582: ff 35 c8 93 12 00 pushl 0x1293c8 10b588: e8 57 21 00 00 call 10d6e4 <_Thread_Clear_state> 10b58d: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b590: e8 cc 24 00 00 call 10da61 <_Thread_Enable_dispatch> 10b595: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 10b597: eb 3e jmp 10b5d7 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b599: 83 ec 0c sub $0xc,%esp 10b59c: 57 push %edi 10b59d: e8 e8 fd ff ff call 10b38a <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b5a2: ff 75 d4 pushl -0x2c(%ebp) 10b5a5: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b5a6: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b5ad: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b5b0: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b5b3: 59 pop %ecx 10b5b4: 5b pop %ebx 10b5b5: 83 c7 10 add $0x10,%edi 10b5b8: 57 push %edi 10b5b9: 68 e8 93 12 00 push $0x1293e8 10b5be: e8 45 34 00 00 call 10ea08 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b5c3: e8 99 24 00 00 call 10da61 <_Thread_Enable_dispatch> 10b5c8: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 10b5cd: 83 c4 10 add $0x10,%esp 10b5d0: eb 05 jmp 10b5d7 10b5d2: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b5d7: 89 d8 mov %ebx,%eax 10b5d9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret =============================================================================== 0010b5e4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b5e4: 55 push %ebp 10b5e5: 89 e5 mov %esp,%ebp 10b5e7: 57 push %edi 10b5e8: 56 push %esi 10b5e9: 53 push %ebx 10b5ea: 83 ec 7c sub $0x7c,%esp 10b5ed: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5f0: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10b5f3: 85 ff test %edi,%edi 10b5f5: 0f 84 2b 01 00 00 je 10b726 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b5fb: 52 push %edx 10b5fc: 52 push %edx 10b5fd: 68 54 22 12 00 push $0x122254 10b602: 53 push %ebx 10b603: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b605: 5e pop %esi 10b606: 58 pop %eax 10b607: 68 72 22 12 00 push $0x122272 10b60c: 53 push %ebx 10b60d: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b60f: 5a pop %edx 10b610: 59 pop %ecx 10b611: 68 94 22 12 00 push $0x122294 10b616: 53 push %ebx 10b617: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b619: 5e pop %esi 10b61a: 58 pop %eax 10b61b: 68 b7 22 12 00 push $0x1222b7 10b620: 53 push %ebx 10b621: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b623: 5a pop %edx 10b624: 59 pop %ecx 10b625: 68 02 23 12 00 push $0x122302 10b62a: 53 push %ebx 10b62b: ff d7 call *%edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b62d: 8b 35 1c 92 12 00 mov 0x12921c,%esi 10b633: 83 c4 10 add $0x10,%esp 10b636: e9 df 00 00 00 jmp 10b71a id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b63b: 50 push %eax 10b63c: 50 push %eax 10b63d: 8d 45 88 lea -0x78(%ebp),%eax 10b640: 50 push %eax 10b641: 56 push %esi 10b642: e8 31 5f 00 00 call 111578 if ( status != RTEMS_SUCCESSFUL ) 10b647: 83 c4 10 add $0x10,%esp 10b64a: 85 c0 test %eax,%eax 10b64c: 0f 85 c7 00 00 00 jne 10b719 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b652: 51 push %ecx 10b653: 51 push %ecx 10b654: 8d 55 c0 lea -0x40(%ebp),%edx 10b657: 52 push %edx 10b658: 56 push %esi 10b659: e8 be 5f 00 00 call 11161c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b65e: 83 c4 0c add $0xc,%esp 10b661: 8d 45 e3 lea -0x1d(%ebp),%eax 10b664: 50 push %eax 10b665: 6a 05 push $0x5 10b667: ff 75 c0 pushl -0x40(%ebp) 10b66a: e8 fd 01 00 00 call 10b86c /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b66f: 58 pop %eax 10b670: 5a pop %edx 10b671: ff 75 8c pushl -0x74(%ebp) 10b674: ff 75 88 pushl -0x78(%ebp) 10b677: 8d 55 e3 lea -0x1d(%ebp),%edx 10b67a: 52 push %edx 10b67b: 56 push %esi 10b67c: 68 4e 23 12 00 push $0x12234e 10b681: 53 push %ebx 10b682: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b684: 8b 45 88 mov -0x78(%ebp),%eax 10b687: 83 c4 20 add $0x20,%esp 10b68a: 85 c0 test %eax,%eax 10b68c: 75 0f jne 10b69d (*print)( context, "\n" ); 10b68e: 51 push %ecx 10b68f: 51 push %ecx 10b690: 68 c8 25 12 00 push $0x1225c8 10b695: 53 push %ebx 10b696: ff d7 call *%edi continue; 10b698: 83 c4 10 add $0x10,%esp 10b69b: eb 7c jmp 10b719 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10b69d: 52 push %edx 10b69e: 8d 55 d8 lea -0x28(%ebp),%edx 10b6a1: 52 push %edx 10b6a2: 50 push %eax 10b6a3: 8d 45 a0 lea -0x60(%ebp),%eax 10b6a6: 50 push %eax 10b6a7: e8 30 30 00 00 call 10e6dc <_Timespec_Divide_by_integer> (*print)( context, 10b6ac: 8b 45 dc mov -0x24(%ebp),%eax 10b6af: b9 e8 03 00 00 mov $0x3e8,%ecx 10b6b4: 99 cltd 10b6b5: f7 f9 idiv %ecx 10b6b7: 50 push %eax 10b6b8: ff 75 d8 pushl -0x28(%ebp) 10b6bb: 8b 45 9c mov -0x64(%ebp),%eax 10b6be: 99 cltd 10b6bf: f7 f9 idiv %ecx 10b6c1: 50 push %eax 10b6c2: ff 75 98 pushl -0x68(%ebp) 10b6c5: 8b 45 94 mov -0x6c(%ebp),%eax 10b6c8: 99 cltd 10b6c9: f7 f9 idiv %ecx 10b6cb: 50 push %eax 10b6cc: ff 75 90 pushl -0x70(%ebp) 10b6cf: 68 65 23 12 00 push $0x122365 10b6d4: 53 push %ebx 10b6d5: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b6d8: ff d7 call *%edi struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b6da: 83 c4 2c add $0x2c,%esp 10b6dd: 8d 55 d8 lea -0x28(%ebp),%edx 10b6e0: 52 push %edx 10b6e1: ff 75 88 pushl -0x78(%ebp) 10b6e4: 8d 45 b8 lea -0x48(%ebp),%eax 10b6e7: 50 push %eax 10b6e8: e8 ef 2f 00 00 call 10e6dc <_Timespec_Divide_by_integer> (*print)( context, 10b6ed: 8b 45 dc mov -0x24(%ebp),%eax 10b6f0: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b6f3: 99 cltd 10b6f4: f7 f9 idiv %ecx 10b6f6: 50 push %eax 10b6f7: ff 75 d8 pushl -0x28(%ebp) 10b6fa: 8b 45 b4 mov -0x4c(%ebp),%eax 10b6fd: 99 cltd 10b6fe: f7 f9 idiv %ecx 10b700: 50 push %eax 10b701: ff 75 b0 pushl -0x50(%ebp) 10b704: 8b 45 ac mov -0x54(%ebp),%eax 10b707: 99 cltd 10b708: f7 f9 idiv %ecx 10b70a: 50 push %eax 10b70b: ff 75 a8 pushl -0x58(%ebp) 10b70e: 68 84 23 12 00 push $0x122384 10b713: 53 push %ebx 10b714: ff d7 call *%edi 10b716: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10b719: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b71a: 3b 35 20 92 12 00 cmp 0x129220,%esi 10b720: 0f 86 15 ff ff ff jbe 10b63b the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b726: 8d 65 f4 lea -0xc(%ebp),%esp 10b729: 5b pop %ebx 10b72a: 5e pop %esi 10b72b: 5f pop %edi 10b72c: c9 leave 10b72d: c3 ret =============================================================================== 0010a3b8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a3b8: 55 push %ebp 10a3b9: 89 e5 mov %esp,%ebp 10a3bb: 57 push %edi 10a3bc: 56 push %esi 10a3bd: 53 push %ebx 10a3be: 83 ec 3c sub $0x3c,%esp 10a3c1: 8b 7d 0c mov 0xc(%ebp),%edi 10a3c4: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10a3c7: b8 03 00 00 00 mov $0x3,%eax 10a3cc: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10a3d0: 0f 84 74 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 10a3d6: b0 09 mov $0x9,%al 10a3d8: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10a3dc: 0f 84 68 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a3e2: 89 d8 mov %ebx,%eax 10a3e4: 25 c0 00 00 00 and $0xc0,%eax 10a3e9: 74 22 je 10a40d _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a3eb: 89 da mov %ebx,%edx 10a3ed: 83 e2 30 and $0x30,%edx 10a3f0: 83 fa 10 cmp $0x10,%edx 10a3f3: 0f 85 4c 01 00 00 jne 10a545 <== NEVER TAKEN 10a3f9: f6 c3 04 test $0x4,%bl 10a3fc: 0f 84 43 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a402: 3d c0 00 00 00 cmp $0xc0,%eax 10a407: 0f 84 38 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10a40d: 89 da mov %ebx,%edx 10a40f: 83 e2 30 and $0x30,%edx 10a412: 74 0e je 10a422 10a414: b8 0a 00 00 00 mov $0xa,%eax 10a419: 83 ff 01 cmp $0x1,%edi 10a41c: 0f 87 28 01 00 00 ja 10a54a <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a422: a1 08 62 12 00 mov 0x126208,%eax 10a427: 40 inc %eax 10a428: a3 08 62 12 00 mov %eax,0x126208 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 10a42d: 83 ec 0c sub $0xc,%esp 10a430: 68 50 61 12 00 push $0x126150 10a435: 89 55 c4 mov %edx,-0x3c(%ebp) 10a438: e8 db 12 00 00 call 10b718 <_Objects_Allocate> 10a43d: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a43f: 83 c4 10 add $0x10,%esp 10a442: 85 c0 test %eax,%eax 10a444: 8b 55 c4 mov -0x3c(%ebp),%edx 10a447: 75 0f jne 10a458 _Thread_Enable_dispatch(); 10a449: e8 cf 1e 00 00 call 10c31d <_Thread_Enable_dispatch> 10a44e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10a453: e9 f2 00 00 00 jmp 10a54a _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a458: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10a45b: 85 d2 test %edx,%edx 10a45d: 75 37 jne 10a496 /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10a45f: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10a466: 31 c0 xor %eax,%eax 10a468: f6 c3 04 test $0x4,%bl 10a46b: 0f 95 c0 setne %al 10a46e: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a471: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10a478: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10a47f: 51 push %ecx 10a480: 57 push %edi 10a481: 8d 45 e0 lea -0x20(%ebp),%eax 10a484: 50 push %eax 10a485: 8d 46 14 lea 0x14(%esi),%eax 10a488: 50 push %eax 10a489: e8 8a 0d 00 00 call 10b218 <_CORE_semaphore_Initialize> 10a48e: 83 c4 10 add $0x10,%esp 10a491: e9 8c 00 00 00 jmp 10a522 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10a496: 31 c0 xor %eax,%eax 10a498: f6 c3 04 test $0x4,%bl 10a49b: 0f 95 c0 setne %al 10a49e: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a4a1: 83 fa 10 cmp $0x10,%edx 10a4a4: 75 36 jne 10a4dc the_mutex_attr.priority_ceiling = priority_ceiling; 10a4a6: 8b 45 14 mov 0x14(%ebp),%eax 10a4a9: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a4ac: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4b3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10a4b7: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10a4bb: 75 2a jne 10a4e7 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10a4bd: f6 c3 40 test $0x40,%bl 10a4c0: 74 09 je 10a4cb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a4c2: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 10a4c9: eb 0b jmp 10a4d6 the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10a4cb: 84 db test %bl,%bl 10a4cd: 79 18 jns 10a4e7 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10a4cf: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10a4d6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10a4da: eb 0b jmp 10a4e7 } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10a4dc: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4e3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10a4e7: 52 push %edx 10a4e8: 31 c0 xor %eax,%eax 10a4ea: 83 ff 01 cmp $0x1,%edi 10a4ed: 0f 94 c0 sete %al 10a4f0: 50 push %eax 10a4f1: 8d 45 d0 lea -0x30(%ebp),%eax 10a4f4: 50 push %eax 10a4f5: 8d 46 14 lea 0x14(%esi),%eax 10a4f8: 50 push %eax 10a4f9: e8 ae 0a 00 00 call 10afac <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10a4fe: 83 c4 10 add $0x10,%esp 10a501: 83 f8 06 cmp $0x6,%eax 10a504: 75 1c jne 10a522 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10a506: 50 push %eax 10a507: 50 push %eax 10a508: 56 push %esi 10a509: 68 50 61 12 00 push $0x126150 10a50e: e8 f1 14 00 00 call 10ba04 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10a513: e8 05 1e 00 00 call 10c31d <_Thread_Enable_dispatch> 10a518: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10a51d: 83 c4 10 add $0x10,%esp 10a520: eb 28 jmp 10a54a #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a522: 8b 46 08 mov 0x8(%esi),%eax 10a525: 0f b7 c8 movzwl %ax,%ecx 10a528: 8b 15 6c 61 12 00 mov 0x12616c,%edx 10a52e: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10a531: 8b 55 08 mov 0x8(%ebp),%edx 10a534: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10a537: 8b 55 18 mov 0x18(%ebp),%edx 10a53a: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10a53c: e8 dc 1d 00 00 call 10c31d <_Thread_Enable_dispatch> 10a541: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a543: eb 05 jmp 10a54a 10a545: b8 0b 00 00 00 mov $0xb,%eax } 10a54a: 8d 65 f4 lea -0xc(%ebp),%esp 10a54d: 5b pop %ebx 10a54e: 5e pop %esi 10a54f: 5f pop %edi 10a550: c9 leave 10a551: c3 ret =============================================================================== 001162b0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1162b0: 55 push %ebp 1162b1: 89 e5 mov %esp,%ebp 1162b3: 53 push %ebx 1162b4: 83 ec 14 sub $0x14,%esp 1162b7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1162ba: b8 0a 00 00 00 mov $0xa,%eax 1162bf: 85 db test %ebx,%ebx 1162c1: 74 71 je 116334 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1162c3: 50 push %eax 1162c4: 50 push %eax 1162c5: 8d 45 f4 lea -0xc(%ebp),%eax 1162c8: 50 push %eax 1162c9: ff 75 08 pushl 0x8(%ebp) 1162cc: e8 63 36 00 00 call 119934 <_Thread_Get> 1162d1: 89 c1 mov %eax,%ecx switch ( location ) { 1162d3: 83 c4 10 add $0x10,%esp 1162d6: b8 04 00 00 00 mov $0x4,%eax 1162db: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1162df: 75 53 jne 116334 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1162e1: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; 1162e7: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 1162eb: 74 3d je 11632a if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1162ed: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1162f1: 74 26 je 116319 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1162f3: 9c pushf 1162f4: fa cli 1162f5: 58 pop %eax *signal_set |= signals; 1162f6: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1162f9: 50 push %eax 1162fa: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1162fb: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1162ff: a1 74 f6 13 00 mov 0x13f674,%eax 116304: 85 c0 test %eax,%eax 116306: 74 19 je 116321 116308: 3b 0d 98 f6 13 00 cmp 0x13f698,%ecx 11630e: 75 11 jne 116321 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 116310: c6 05 2c f7 13 00 01 movb $0x1,0x13f72c 116317: eb 08 jmp 116321 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 116319: 9c pushf 11631a: fa cli 11631b: 58 pop %eax *signal_set |= signals; 11631c: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 11631f: 50 push %eax 116320: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 116321: e8 bf 35 00 00 call 1198e5 <_Thread_Enable_dispatch> 116326: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116328: eb 0a jmp 116334 } _Thread_Enable_dispatch(); 11632a: e8 b6 35 00 00 call 1198e5 <_Thread_Enable_dispatch> 11632f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116334: 8b 5d fc mov -0x4(%ebp),%ebx 116337: c9 leave 116338: c3 ret =============================================================================== 00106dc0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 106dc0: 55 push %ebp 106dc1: 89 e5 mov %esp,%ebp 106dc3: 57 push %edi 106dc4: 56 push %esi 106dc5: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 106dc8: 83 78 08 00 cmpl $0x0,0x8(%eax) 106dcc: 74 15 je 106de3 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 106dce: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi 106dd4: 83 c7 08 add $0x8,%edi 106dd7: be c8 60 12 00 mov $0x1260c8,%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 c4 00 00 00 mov 0xc4(%edi),%ecx 107194: 8b 97 c8 00 00 00 mov 0xc8(%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 ec 62 12 00 mov 0x1262ec,%edx ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 10705d: 8b 82 c8 00 00 00 mov 0xc8(%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 c4 00 00 00 mov 0xc4(%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 a8 5d 12 00 00 cmpl $0x0,0x125da8 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 c8 60 12 00 push $0x1260c8 10708d: 50 push %eax 10708e: e8 7d c6 00 00 call 113710 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 ec 62 12 00 pushl 0x1262ec <== NOT EXECUTED 1070b1: e8 e6 fe ff ff call 106f9c <== NOT EXECUTED 1070b6: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 1070b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1070bb: 8b 5d fc mov -0x4(%ebp),%ebx 1070be: c9 leave 1070bf: c3 ret =============================================================================== 00106f85 : void rtems_stack_checker_report_usage( void ) { 106f85: 55 push %ebp <== NOT EXECUTED 106f86: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f88: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 106f8b: 68 44 87 10 00 push $0x108744 <== NOT EXECUTED 106f90: 6a 00 push $0x0 <== NOT EXECUTED 106f92: e8 8d ff ff ff call 106f24 <== NOT EXECUTED 106f97: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 106f9a: c9 leave <== NOT EXECUTED 106f9b: c3 ret <== NOT EXECUTED =============================================================================== 00106f24 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 106f24: 55 push %ebp <== NOT EXECUTED 106f25: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f27: 56 push %esi <== NOT EXECUTED 106f28: 53 push %ebx <== NOT EXECUTED 106f29: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 106f2c: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 106f2f: 89 35 ac 5d 12 00 mov %esi,0x125dac <== NOT EXECUTED print_handler = print; 106f35: 89 1d b0 5d 12 00 mov %ebx,0x125db0 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 106f3b: 51 push %ecx <== NOT EXECUTED 106f3c: 51 push %ecx <== NOT EXECUTED 106f3d: 68 3e 04 12 00 push $0x12043e <== 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 55 04 12 00 push $0x120455 <== 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 55 4b 00 00 call 10bab0 <== 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 ac 5d 12 00 00 movl $0x0,0x125dac <== NOT EXECUTED 106f6e: 00 00 00 print_handler = NULL; 106f71: c7 05 b0 5d 12 00 00 movl $0x0,0x125db0 <== 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 c8 00 00 00 mov 0xc8(%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 c4 00 00 00 mov 0xc4(%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 c8 60 12 00 push $0x1260c8 1070ee: 50 push %eax 1070ef: 88 55 f4 mov %dl,-0xc(%ebp) 1070f2: e8 19 c6 00 00 call 113710 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 =============================================================================== 0010f1d0 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 10f1d0: 55 push %ebp 10f1d1: 89 e5 mov %esp,%ebp 10f1d3: 57 push %edi 10f1d4: 56 push %esi 10f1d5: 53 push %ebx 10f1d6: 83 ec 2c sub $0x2c,%esp 10f1d9: 8b 75 08 mov 0x8(%ebp),%esi 10f1dc: 8b 5d 0c mov 0xc(%ebp),%ebx 10f1df: 8b 7d 10 mov 0x10(%ebp),%edi double result; char *end; if ( !n ) 10f1e2: b8 09 00 00 00 mov $0x9,%eax 10f1e7: 85 db test %ebx,%ebx 10f1e9: 0f 84 90 00 00 00 je 10f27f return RTEMS_INVALID_ADDRESS; errno = 0; 10f1ef: e8 e8 27 00 00 call 1119dc <__errno> 10f1f4: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f1fa: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f200: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtod( s, &end ); 10f207: 50 push %eax 10f208: 50 push %eax 10f209: 8d 45 e4 lea -0x1c(%ebp),%eax 10f20c: 50 push %eax 10f20d: 56 push %esi 10f20e: e8 95 52 00 00 call 1144a8 if ( endptr ) 10f213: 83 c4 10 add $0x10,%esp 10f216: 85 ff test %edi,%edi 10f218: 74 05 je 10f21f *endptr = end; 10f21a: 8b 45 e4 mov -0x1c(%ebp),%eax 10f21d: 89 07 mov %eax,(%edi) if ( end == s ) 10f21f: b8 0b 00 00 00 mov $0xb,%eax 10f224: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f227: 74 54 je 10f27d return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f229: dd 5d c8 fstpl -0x38(%ebp) 10f22c: e8 ab 27 00 00 call 1119dc <__errno> 10f231: 83 38 22 cmpl $0x22,(%eax) 10f234: dd 45 c8 fldl -0x38(%ebp) 10f237: 75 2d jne 10f266 10f239: d9 ee fldz 10f23b: d9 c9 fxch %st(1) 10f23d: dd e1 fucom %st(1) 10f23f: df e0 fnstsw %ax 10f241: dd d9 fstp %st(1) 10f243: 9e sahf 10f244: 7a 02 jp 10f248 <== NEVER TAKEN 10f246: 74 24 je 10f26c <== NEVER TAKEN 10f248: dd 05 f8 33 12 00 fldl 0x1233f8 10f24e: d9 c9 fxch %st(1) 10f250: dd e1 fucom %st(1) 10f252: df e0 fnstsw %ax 10f254: dd d9 fstp %st(1) 10f256: 9e sahf 10f257: 77 17 ja 10f270 <== ALWAYS TAKEN 10f259: dd 05 00 34 12 00 fldl 0x123400 <== NOT EXECUTED 10f25f: dd e9 fucomp %st(1) <== NOT EXECUTED 10f261: df e0 fnstsw %ax <== NOT EXECUTED 10f263: 9e sahf <== NOT EXECUTED 10f264: 77 0e ja 10f274 <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 10f266: dd 1b fstpl (%ebx) 10f268: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f26a: eb 13 jmp 10f27f 10f26c: dd d8 fstp %st(0) <== NOT EXECUTED 10f26e: eb 06 jmp 10f276 <== NOT EXECUTED 10f270: dd d8 fstp %st(0) 10f272: eb 02 jmp 10f276 10f274: dd d8 fstp %st(0) <== NOT EXECUTED 10f276: b8 0a 00 00 00 mov $0xa,%eax 10f27b: eb 02 jmp 10f27f 10f27d: dd d8 fstp %st(0) } 10f27f: 8d 65 f4 lea -0xc(%ebp),%esp 10f282: 5b pop %ebx 10f283: 5e pop %esi 10f284: 5f pop %edi 10f285: c9 leave 10f286: c3 ret =============================================================================== 0010f288 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 10f288: 55 push %ebp 10f289: 89 e5 mov %esp,%ebp 10f28b: 57 push %edi 10f28c: 56 push %esi 10f28d: 53 push %ebx 10f28e: 83 ec 2c sub $0x2c,%esp 10f291: 8b 75 08 mov 0x8(%ebp),%esi 10f294: 8b 5d 0c mov 0xc(%ebp),%ebx 10f297: 8b 7d 10 mov 0x10(%ebp),%edi float result; char *end; if ( !n ) 10f29a: b8 09 00 00 00 mov $0x9,%eax 10f29f: 85 db test %ebx,%ebx 10f2a1: 0f 84 89 00 00 00 je 10f330 return RTEMS_INVALID_ADDRESS; errno = 0; 10f2a7: e8 30 27 00 00 call 1119dc <__errno> 10f2ac: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f2b2: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtof( s, &end ); 10f2b8: 50 push %eax 10f2b9: 50 push %eax 10f2ba: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2bd: 50 push %eax 10f2be: 56 push %esi 10f2bf: e8 a0 51 00 00 call 114464 if ( endptr ) 10f2c4: 83 c4 10 add $0x10,%esp 10f2c7: 85 ff test %edi,%edi 10f2c9: 74 05 je 10f2d0 *endptr = end; 10f2cb: 8b 45 e4 mov -0x1c(%ebp),%eax 10f2ce: 89 07 mov %eax,(%edi) if ( end == s ) 10f2d0: b8 0b 00 00 00 mov $0xb,%eax 10f2d5: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f2d8: 74 54 je 10f32e return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f2da: d9 5d c8 fstps -0x38(%ebp) 10f2dd: e8 fa 26 00 00 call 1119dc <__errno> 10f2e2: 83 38 22 cmpl $0x22,(%eax) 10f2e5: d9 45 c8 flds -0x38(%ebp) 10f2e8: 75 2d jne 10f317 10f2ea: d9 ee fldz 10f2ec: d9 c9 fxch %st(1) 10f2ee: dd e1 fucom %st(1) 10f2f0: df e0 fnstsw %ax 10f2f2: dd d9 fstp %st(1) 10f2f4: 9e sahf 10f2f5: 7a 02 jp 10f2f9 <== NEVER TAKEN 10f2f7: 74 24 je 10f31d <== NEVER TAKEN 10f2f9: d9 05 08 34 12 00 flds 0x123408 10f2ff: d9 c9 fxch %st(1) 10f301: dd e1 fucom %st(1) 10f303: df e0 fnstsw %ax 10f305: dd d9 fstp %st(1) 10f307: 9e sahf 10f308: 77 17 ja 10f321 <== ALWAYS TAKEN 10f30a: d9 05 0c 34 12 00 flds 0x12340c <== NOT EXECUTED 10f310: dd e9 fucomp %st(1) <== NOT EXECUTED 10f312: df e0 fnstsw %ax <== NOT EXECUTED 10f314: 9e sahf <== NOT EXECUTED 10f315: 77 0e ja 10f325 <== NOT EXECUTED (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 10f317: d9 1b fstps (%ebx) 10f319: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f31b: eb 13 jmp 10f330 10f31d: dd d8 fstp %st(0) <== NOT EXECUTED 10f31f: eb 06 jmp 10f327 <== NOT EXECUTED 10f321: dd d8 fstp %st(0) 10f323: eb 02 jmp 10f327 10f325: dd d8 fstp %st(0) <== NOT EXECUTED 10f327: b8 0a 00 00 00 mov $0xa,%eax 10f32c: eb 02 jmp 10f330 10f32e: dd d8 fstp %st(0) } 10f330: 8d 65 f4 lea -0xc(%ebp),%esp 10f333: 5b pop %ebx 10f334: 5e pop %esi 10f335: 5f pop %edi 10f336: c9 leave 10f337: c3 ret =============================================================================== 0010f338 : const char *s, int *n, char **endptr, int base ) { 10f338: 55 push %ebp 10f339: 89 e5 mov %esp,%ebp 10f33b: 57 push %edi 10f33c: 56 push %esi 10f33d: 53 push %ebx 10f33e: 83 ec 2c sub $0x2c,%esp 10f341: 8b 7d 08 mov 0x8(%ebp),%edi 10f344: 8b 75 0c mov 0xc(%ebp),%esi 10f347: 8b 55 10 mov 0x10(%ebp),%edx long result; char *end; if ( !n ) 10f34a: b8 09 00 00 00 mov $0x9,%eax 10f34f: 85 f6 test %esi,%esi 10f351: 74 66 je 10f3b9 return RTEMS_INVALID_ADDRESS; errno = 0; 10f353: 89 55 d4 mov %edx,-0x2c(%ebp) 10f356: e8 81 26 00 00 call 1119dc <__errno> 10f35b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f361: c7 06 00 00 00 00 movl $0x0,(%esi) result = strtol( s, &end, base ); 10f367: 50 push %eax 10f368: ff 75 14 pushl 0x14(%ebp) 10f36b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f36e: 50 push %eax 10f36f: 57 push %edi 10f370: e8 cf 52 00 00 call 114644 10f375: 89 c3 mov %eax,%ebx if ( endptr ) 10f377: 83 c4 10 add $0x10,%esp 10f37a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f37d: 85 d2 test %edx,%edx 10f37f: 74 05 je 10f386 *endptr = end; 10f381: 8b 45 e4 mov -0x1c(%ebp),%eax 10f384: 89 02 mov %eax,(%edx) if ( end == s ) 10f386: b8 0b 00 00 00 mov $0xb,%eax 10f38b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f38e: 74 29 je 10f3b9 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f390: e8 47 26 00 00 call 1119dc <__errno> 10f395: 83 38 22 cmpl $0x22,(%eax) 10f398: 75 14 jne 10f3ae 10f39a: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10f3a0: 74 12 je 10f3b4 <== ALWAYS TAKEN 10f3a2: 85 db test %ebx,%ebx <== NOT EXECUTED 10f3a4: 74 0e je 10f3b4 <== NOT EXECUTED 10f3a6: 81 fb 00 00 00 80 cmp $0x80000000,%ebx <== NOT EXECUTED 10f3ac: 74 06 je 10f3b4 <== NOT EXECUTED errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 10f3ae: 89 1e mov %ebx,(%esi) 10f3b0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f3b2: eb 05 jmp 10f3b9 10f3b4: b8 0a 00 00 00 mov $0xa,%eax } 10f3b9: 8d 65 f4 lea -0xc(%ebp),%esp 10f3bc: 5b pop %ebx 10f3bd: 5e pop %esi 10f3be: 5f pop %edi 10f3bf: c9 leave 10f3c0: c3 ret =============================================================================== 0010f464 : const char *s, long *n, char **endptr, int base ) { 10f464: 55 push %ebp 10f465: 89 e5 mov %esp,%ebp 10f467: 57 push %edi 10f468: 56 push %esi 10f469: 53 push %ebx 10f46a: 83 ec 2c sub $0x2c,%esp 10f46d: 8b 7d 08 mov 0x8(%ebp),%edi 10f470: 8b 75 0c mov 0xc(%ebp),%esi 10f473: 8b 55 10 mov 0x10(%ebp),%edx long result; char *end; if ( !n ) 10f476: b8 09 00 00 00 mov $0x9,%eax 10f47b: 85 f6 test %esi,%esi 10f47d: 74 66 je 10f4e5 return RTEMS_INVALID_ADDRESS; errno = 0; 10f47f: 89 55 d4 mov %edx,-0x2c(%ebp) 10f482: e8 55 25 00 00 call 1119dc <__errno> 10f487: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f48d: c7 06 00 00 00 00 movl $0x0,(%esi) result = strtol( s, &end, base ); 10f493: 50 push %eax 10f494: ff 75 14 pushl 0x14(%ebp) 10f497: 8d 45 e4 lea -0x1c(%ebp),%eax 10f49a: 50 push %eax 10f49b: 57 push %edi 10f49c: e8 a3 51 00 00 call 114644 10f4a1: 89 c3 mov %eax,%ebx if ( endptr ) 10f4a3: 83 c4 10 add $0x10,%esp 10f4a6: 8b 55 d4 mov -0x2c(%ebp),%edx 10f4a9: 85 d2 test %edx,%edx 10f4ab: 74 05 je 10f4b2 *endptr = end; 10f4ad: 8b 45 e4 mov -0x1c(%ebp),%eax 10f4b0: 89 02 mov %eax,(%edx) if ( end == s ) 10f4b2: b8 0b 00 00 00 mov $0xb,%eax 10f4b7: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f4ba: 74 29 je 10f4e5 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f4bc: e8 1b 25 00 00 call 1119dc <__errno> 10f4c1: 83 38 22 cmpl $0x22,(%eax) 10f4c4: 75 14 jne 10f4da 10f4c6: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx 10f4cc: 74 12 je 10f4e0 10f4ce: 85 db test %ebx,%ebx 10f4d0: 74 0e je 10f4e0 <== NEVER TAKEN 10f4d2: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 10f4d8: 74 06 je 10f4e0 <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 10f4da: 89 1e mov %ebx,(%esi) 10f4dc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f4de: eb 05 jmp 10f4e5 10f4e0: b8 0a 00 00 00 mov $0xa,%eax } 10f4e5: 8d 65 f4 lea -0xc(%ebp),%esp 10f4e8: 5b pop %ebx 10f4e9: 5e pop %esi 10f4ea: 5f pop %edi 10f4eb: c9 leave 10f4ec: c3 ret =============================================================================== 0010f3c4 : const char *s, long long *n, char **endptr, int base ) { 10f3c4: 55 push %ebp 10f3c5: 89 e5 mov %esp,%ebp 10f3c7: 57 push %edi 10f3c8: 56 push %esi 10f3c9: 53 push %ebx 10f3ca: 83 ec 2c sub $0x2c,%esp 10f3cd: 8b 5d 0c mov 0xc(%ebp),%ebx 10f3d0: 8b 7d 10 mov 0x10(%ebp),%edi long long result; char *end; if ( !n ) 10f3d3: b8 09 00 00 00 mov $0x9,%eax 10f3d8: 85 db test %ebx,%ebx 10f3da: 74 7e je 10f45a return RTEMS_INVALID_ADDRESS; errno = 0; 10f3dc: e8 fb 25 00 00 call 1119dc <__errno> 10f3e1: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f3e7: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f3ed: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoll( s, &end, base ); 10f3f4: 50 push %eax 10f3f5: ff 75 14 pushl 0x14(%ebp) 10f3f8: 8d 45 e4 lea -0x1c(%ebp),%eax 10f3fb: 50 push %eax 10f3fc: ff 75 08 pushl 0x8(%ebp) 10f3ff: e8 5c 52 00 00 call 114660 10f404: 89 c6 mov %eax,%esi if ( endptr ) 10f406: 83 c4 10 add $0x10,%esp 10f409: 85 ff test %edi,%edi 10f40b: 74 05 je 10f412 *endptr = end; 10f40d: 8b 45 e4 mov -0x1c(%ebp),%eax 10f410: 89 07 mov %eax,(%edi) if ( end == s ) 10f412: b8 0b 00 00 00 mov $0xb,%eax 10f417: 8b 4d 08 mov 0x8(%ebp),%ecx 10f41a: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f41d: 74 3b je 10f45a return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f41f: 89 55 d4 mov %edx,-0x2c(%ebp) 10f422: e8 b5 25 00 00 call 1119dc <__errno> 10f427: 83 38 22 cmpl $0x22,(%eax) 10f42a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f42d: 75 1d jne 10f44c 10f42f: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10f435: 75 05 jne 10f43c 10f437: 83 fe ff cmp $0xffffffff,%esi 10f43a: 74 19 je 10f455 <== ALWAYS TAKEN 10f43c: 89 d0 mov %edx,%eax 10f43e: 09 f0 or %esi,%eax 10f440: 74 13 je 10f455 <== NEVER TAKEN 10f442: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10f448: 09 f0 or %esi,%eax 10f44a: 74 09 je 10f455 <== ALWAYS TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 10f44c: 89 33 mov %esi,(%ebx) 10f44e: 89 53 04 mov %edx,0x4(%ebx) 10f451: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f453: eb 05 jmp 10f45a 10f455: b8 0a 00 00 00 mov $0xa,%eax } 10f45a: 8d 65 f4 lea -0xc(%ebp),%esp 10f45d: 5b pop %ebx 10f45e: 5e pop %esi 10f45f: 5f pop %edi 10f460: c9 leave 10f461: c3 ret =============================================================================== 0010f508 : const char *s, unsigned char *n, char **endptr, int base ) { 10f508: 55 push %ebp 10f509: 89 e5 mov %esp,%ebp 10f50b: 57 push %edi 10f50c: 56 push %esi 10f50d: 53 push %ebx 10f50e: 83 ec 2c sub $0x2c,%esp 10f511: 8b 7d 08 mov 0x8(%ebp),%edi 10f514: 8b 5d 0c mov 0xc(%ebp),%ebx 10f517: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f51a: b8 09 00 00 00 mov $0x9,%eax 10f51f: 85 db test %ebx,%ebx 10f521: 74 71 je 10f594 return RTEMS_INVALID_ADDRESS; errno = 0; 10f523: 89 55 d4 mov %edx,-0x2c(%ebp) 10f526: e8 b1 24 00 00 call 1119dc <__errno> 10f52b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f531: c6 03 00 movb $0x0,(%ebx) result = strtoul( s, &end, base ); 10f534: 50 push %eax 10f535: ff 75 14 pushl 0x14(%ebp) 10f538: 8d 45 e4 lea -0x1c(%ebp),%eax 10f53b: 50 push %eax 10f53c: 57 push %edi 10f53d: e8 7e 55 00 00 call 114ac0 10f542: 89 c6 mov %eax,%esi if ( endptr ) 10f544: 83 c4 10 add $0x10,%esp 10f547: 8b 55 d4 mov -0x2c(%ebp),%edx 10f54a: 85 d2 test %edx,%edx 10f54c: 74 05 je 10f553 *endptr = end; 10f54e: 8b 45 e4 mov -0x1c(%ebp),%eax 10f551: 89 02 mov %eax,(%edx) if ( end == s ) 10f553: b8 0b 00 00 00 mov $0xb,%eax 10f558: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f55b: 74 37 je 10f594 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f55d: e8 7a 24 00 00 call 1119dc <__errno> 10f562: 83 38 22 cmpl $0x22,(%eax) 10f565: 75 0d jne 10f574 <== ALWAYS TAKEN 10f567: 8d 56 ff lea -0x1(%esi),%edx <== NOT EXECUTED 10f56a: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10f56f: 83 fa fd cmp $0xfffffffd,%edx <== NOT EXECUTED 10f572: 77 20 ja 10f594 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 10f574: 81 fe ff 00 00 00 cmp $0xff,%esi 10f57a: 76 12 jbe 10f58e <== ALWAYS TAKEN errno = ERANGE; 10f57c: e8 5b 24 00 00 call 1119dc <__errno> <== NOT EXECUTED 10f581: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED 10f587: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 10f58c: eb 06 jmp 10f594 <== NOT EXECUTED } #endif *n = result; 10f58e: 89 f0 mov %esi,%eax 10f590: 88 03 mov %al,(%ebx) 10f592: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f594: 8d 65 f4 lea -0xc(%ebp),%esp 10f597: 5b pop %ebx 10f598: 5e pop %esi 10f599: 5f pop %edi 10f59a: c9 leave 10f59b: c3 ret =============================================================================== 0010f59c : const char *s, unsigned int *n, char **endptr, int base ) { 10f59c: 55 push %ebp 10f59d: 89 e5 mov %esp,%ebp 10f59f: 57 push %edi 10f5a0: 56 push %esi 10f5a1: 53 push %ebx 10f5a2: 83 ec 2c sub $0x2c,%esp 10f5a5: 8b 7d 08 mov 0x8(%ebp),%edi 10f5a8: 8b 5d 0c mov 0xc(%ebp),%ebx 10f5ab: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f5ae: b8 09 00 00 00 mov $0x9,%eax 10f5b3: 85 db test %ebx,%ebx 10f5b5: 74 58 je 10f60f return RTEMS_INVALID_ADDRESS; errno = 0; 10f5b7: 89 55 d4 mov %edx,-0x2c(%ebp) 10f5ba: e8 1d 24 00 00 call 1119dc <__errno> 10f5bf: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f5c5: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 10f5cb: 50 push %eax 10f5cc: ff 75 14 pushl 0x14(%ebp) 10f5cf: 8d 45 e4 lea -0x1c(%ebp),%eax 10f5d2: 50 push %eax 10f5d3: 57 push %edi 10f5d4: e8 e7 54 00 00 call 114ac0 10f5d9: 89 c6 mov %eax,%esi if ( endptr ) 10f5db: 83 c4 10 add $0x10,%esp 10f5de: 8b 55 d4 mov -0x2c(%ebp),%edx 10f5e1: 85 d2 test %edx,%edx 10f5e3: 74 05 je 10f5ea *endptr = end; 10f5e5: 8b 45 e4 mov -0x1c(%ebp),%eax 10f5e8: 89 02 mov %eax,(%edx) if ( end == s ) 10f5ea: b8 0b 00 00 00 mov $0xb,%eax 10f5ef: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f5f2: 74 1b je 10f60f return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f5f4: e8 e3 23 00 00 call 1119dc <__errno> 10f5f9: 83 38 22 cmpl $0x22,(%eax) 10f5fc: 75 0d jne 10f60b 10f5fe: 8d 56 ff lea -0x1(%esi),%edx 10f601: b8 0a 00 00 00 mov $0xa,%eax 10f606: 83 fa fd cmp $0xfffffffd,%edx 10f609: 77 04 ja 10f60f <== ALWAYS TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 10f60b: 89 33 mov %esi,(%ebx) 10f60d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f60f: 8d 65 f4 lea -0xc(%ebp),%esp 10f612: 5b pop %ebx 10f613: 5e pop %esi 10f614: 5f pop %edi 10f615: c9 leave 10f616: c3 ret =============================================================================== 0010f6b4 : const char *s, unsigned long *n, char **endptr, int base ) { 10f6b4: 55 push %ebp 10f6b5: 89 e5 mov %esp,%ebp 10f6b7: 57 push %edi 10f6b8: 56 push %esi 10f6b9: 53 push %ebx 10f6ba: 83 ec 2c sub $0x2c,%esp 10f6bd: 8b 7d 08 mov 0x8(%ebp),%edi 10f6c0: 8b 5d 0c mov 0xc(%ebp),%ebx 10f6c3: 8b 55 10 mov 0x10(%ebp),%edx unsigned long result; char *end; if ( !n ) 10f6c6: b8 09 00 00 00 mov $0x9,%eax 10f6cb: 85 db test %ebx,%ebx 10f6cd: 74 58 je 10f727 return RTEMS_INVALID_ADDRESS; errno = 0; 10f6cf: 89 55 d4 mov %edx,-0x2c(%ebp) 10f6d2: e8 05 23 00 00 call 1119dc <__errno> 10f6d7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f6dd: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 10f6e3: 50 push %eax 10f6e4: ff 75 14 pushl 0x14(%ebp) 10f6e7: 8d 45 e4 lea -0x1c(%ebp),%eax 10f6ea: 50 push %eax 10f6eb: 57 push %edi 10f6ec: e8 cf 53 00 00 call 114ac0 10f6f1: 89 c6 mov %eax,%esi if ( endptr ) 10f6f3: 83 c4 10 add $0x10,%esp 10f6f6: 8b 55 d4 mov -0x2c(%ebp),%edx 10f6f9: 85 d2 test %edx,%edx 10f6fb: 74 05 je 10f702 *endptr = end; 10f6fd: 8b 45 e4 mov -0x1c(%ebp),%eax 10f700: 89 02 mov %eax,(%edx) if ( end == s ) 10f702: b8 0b 00 00 00 mov $0xb,%eax 10f707: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f70a: 74 1b je 10f727 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f70c: e8 cb 22 00 00 call 1119dc <__errno> 10f711: 83 38 22 cmpl $0x22,(%eax) 10f714: 75 0d jne 10f723 10f716: 8d 56 ff lea -0x1(%esi),%edx 10f719: b8 0a 00 00 00 mov $0xa,%eax 10f71e: 83 fa fd cmp $0xfffffffd,%edx 10f721: 77 04 ja 10f727 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 10f723: 89 33 mov %esi,(%ebx) 10f725: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f727: 8d 65 f4 lea -0xc(%ebp),%esp 10f72a: 5b pop %ebx 10f72b: 5e pop %esi 10f72c: 5f pop %edi 10f72d: c9 leave 10f72e: c3 ret =============================================================================== 0010f618 : const char *s, unsigned long long *n, char **endptr, int base ) { 10f618: 55 push %ebp 10f619: 89 e5 mov %esp,%ebp 10f61b: 57 push %edi 10f61c: 56 push %esi 10f61d: 53 push %ebx 10f61e: 83 ec 2c sub $0x2c,%esp 10f621: 8b 7d 08 mov 0x8(%ebp),%edi 10f624: 8b 5d 0c mov 0xc(%ebp),%ebx 10f627: 8b 75 10 mov 0x10(%ebp),%esi unsigned long long result; char *end; if ( !n ) 10f62a: b8 09 00 00 00 mov $0x9,%eax 10f62f: 85 db test %ebx,%ebx 10f631: 74 76 je 10f6a9 return RTEMS_INVALID_ADDRESS; errno = 0; 10f633: e8 a4 23 00 00 call 1119dc <__errno> 10f638: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f63e: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f644: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoull( s, &end, base ); 10f64b: 50 push %eax 10f64c: ff 75 14 pushl 0x14(%ebp) 10f64f: 8d 45 e4 lea -0x1c(%ebp),%eax 10f652: 50 push %eax 10f653: 57 push %edi 10f654: e8 83 54 00 00 call 114adc 10f659: 89 d1 mov %edx,%ecx 10f65b: 89 c2 mov %eax,%edx if ( endptr ) 10f65d: 83 c4 10 add $0x10,%esp 10f660: 85 f6 test %esi,%esi 10f662: 74 05 je 10f669 *endptr = end; 10f664: 8b 45 e4 mov -0x1c(%ebp),%eax 10f667: 89 06 mov %eax,(%esi) if ( end == s ) 10f669: b8 0b 00 00 00 mov $0xb,%eax 10f66e: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f671: 74 36 je 10f6a9 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 10f673: 89 55 d4 mov %edx,-0x2c(%ebp) 10f676: 89 4d d0 mov %ecx,-0x30(%ebp) 10f679: e8 5e 23 00 00 call 1119dc <__errno> 10f67e: 83 38 22 cmpl $0x22,(%eax) 10f681: 8b 55 d4 mov -0x2c(%ebp),%edx 10f684: 8b 4d d0 mov -0x30(%ebp),%ecx 10f687: 75 19 jne 10f6a2 10f689: 89 d6 mov %edx,%esi 10f68b: 89 cf mov %ecx,%edi 10f68d: 83 c6 ff add $0xffffffff,%esi 10f690: 83 d7 ff adc $0xffffffff,%edi 10f693: 83 ff ff cmp $0xffffffff,%edi 10f696: 72 0a jb 10f6a2 <== NEVER TAKEN 10f698: b8 0a 00 00 00 mov $0xa,%eax 10f69d: 83 fe fd cmp $0xfffffffd,%esi 10f6a0: 77 07 ja 10f6a9 <== ALWAYS TAKEN (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 10f6a2: 89 13 mov %edx,(%ebx) 10f6a4: 89 4b 04 mov %ecx,0x4(%ebx) 10f6a7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10f6a9: 8d 65 f4 lea -0xc(%ebp),%esp 10f6ac: 5b pop %ebx 10f6ad: 5e pop %esi 10f6ae: 5f pop %edi 10f6af: c9 leave 10f6b0: c3 ret =============================================================================== 001125c4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 1125c4: 55 push %ebp 1125c5: 89 e5 mov %esp,%ebp 1125c7: 57 push %edi 1125c8: 56 push %esi 1125c9: 53 push %ebx 1125ca: 83 ec 1c sub $0x1c,%esp 1125cd: 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 ) 1125d0: b8 09 00 00 00 mov $0x9,%eax 1125d5: 85 c9 test %ecx,%ecx 1125d7: 0f 84 f4 00 00 00 je 1126d1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 1125dd: 8b 1d c4 62 12 00 mov 0x1262c4,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1125e3: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 1125e9: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 1125ed: 19 ff sbb %edi,%edi 1125ef: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 1125f5: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 1125f9: 74 06 je 112601 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 1125fb: 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; 112601: 80 7e 08 01 cmpb $0x1,0x8(%esi) 112605: 19 d2 sbb %edx,%edx 112607: 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(); 11260d: 89 55 e4 mov %edx,-0x1c(%ebp) 112610: 89 4d e0 mov %ecx,-0x20(%ebp) 112613: e8 63 af ff ff call 10d57b <_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; 112618: 8b 55 e4 mov -0x1c(%ebp),%edx 11261b: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 11261d: 09 f8 or %edi,%eax 11261f: 8b 4d e0 mov -0x20(%ebp),%ecx 112622: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112624: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 11262b: 74 0f je 11263c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 11262d: 8b 45 08 mov 0x8(%ebp),%eax 112630: c1 e8 08 shr $0x8,%eax 112633: 83 f0 01 xor $0x1,%eax 112636: 83 e0 01 and $0x1,%eax 112639: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 11263c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 112643: 74 21 je 112666 if ( _Modes_Is_timeslice(mode_set) ) { 112645: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 11264c: 74 11 je 11265f executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 11264e: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112655: a1 d4 61 12 00 mov 0x1261d4,%eax 11265a: 89 43 78 mov %eax,0x78(%ebx) 11265d: eb 07 jmp 112666 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 11265f: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112666: f6 45 0c 01 testb $0x1,0xc(%ebp) 11266a: 74 0a je 112676 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 11266c: f6 45 08 01 testb $0x1,0x8(%ebp) 112670: 74 03 je 112675 112672: fa cli 112673: eb 01 jmp 112676 112675: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 112676: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 11267d: 74 33 je 1126b2 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 11267f: 8b 45 08 mov 0x8(%ebp),%eax 112682: c1 e8 0a shr $0xa,%eax 112685: 83 f0 01 xor $0x1,%eax 112688: 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; 11268b: 3a 46 08 cmp 0x8(%esi),%al 11268e: 74 22 je 1126b2 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; 112690: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112693: 9c pushf 112694: fa cli 112695: 58 pop %eax _signals = information->signals_pending; 112696: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 112699: 8b 4e 14 mov 0x14(%esi),%ecx 11269c: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 11269f: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 1126a2: 50 push %eax 1126a3: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1126a4: 83 7e 14 00 cmpl $0x0,0x14(%esi) 1126a8: 74 08 je 1126b2 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; 1126aa: c6 43 74 01 movb $0x1,0x74(%ebx) 1126ae: b3 01 mov $0x1,%bl 1126b0: eb 02 jmp 1126b4 1126b2: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1126b4: 83 3d a0 63 12 00 03 cmpl $0x3,0x1263a0 1126bb: 75 12 jne 1126cf <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 1126bd: e8 1e 01 00 00 call 1127e0 <_Thread_Evaluate_mode> 1126c2: 84 c0 test %al,%al 1126c4: 75 04 jne 1126ca 1126c6: 84 db test %bl,%bl 1126c8: 74 05 je 1126cf _Thread_Dispatch(); 1126ca: e8 09 9b ff ff call 10c1d8 <_Thread_Dispatch> 1126cf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1126d1: 83 c4 1c add $0x1c,%esp 1126d4: 5b pop %ebx 1126d5: 5e pop %esi 1126d6: 5f pop %edi 1126d7: c9 leave 1126d8: c3 ret =============================================================================== 0010e200 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e200: 55 push %ebp 10e201: 89 e5 mov %esp,%ebp 10e203: 56 push %esi 10e204: 53 push %ebx 10e205: 83 ec 10 sub $0x10,%esp 10e208: 8b 5d 0c mov 0xc(%ebp),%ebx 10e20b: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e20e: 85 db test %ebx,%ebx 10e210: 74 10 je 10e222 10e212: 0f b6 05 f4 51 12 00 movzbl 0x1251f4,%eax 10e219: ba 13 00 00 00 mov $0x13,%edx 10e21e: 39 c3 cmp %eax,%ebx 10e220: 77 50 ja 10e272 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e222: ba 09 00 00 00 mov $0x9,%edx 10e227: 85 f6 test %esi,%esi 10e229: 74 47 je 10e272 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e22b: 51 push %ecx 10e22c: 51 push %ecx 10e22d: 8d 45 f4 lea -0xc(%ebp),%eax 10e230: 50 push %eax 10e231: ff 75 08 pushl 0x8(%ebp) 10e234: e8 f3 1b 00 00 call 10fe2c <_Thread_Get> switch ( location ) { 10e239: 83 c4 10 add $0x10,%esp 10e23c: ba 04 00 00 00 mov $0x4,%edx 10e241: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e245: 75 2b jne 10e272 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e247: 8b 50 14 mov 0x14(%eax),%edx 10e24a: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e24c: 85 db test %ebx,%ebx 10e24e: 74 1b je 10e26b the_thread->real_priority = new_priority; 10e250: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e253: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e257: 74 05 je 10e25e the_thread->current_priority > new_priority ) 10e259: 39 58 14 cmp %ebx,0x14(%eax) 10e25c: 76 0d jbe 10e26b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e25e: 52 push %edx 10e25f: 6a 00 push $0x0 10e261: 53 push %ebx 10e262: 50 push %eax 10e263: e8 d8 16 00 00 call 10f940 <_Thread_Change_priority> 10e268: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e26b: e8 6d 1b 00 00 call 10fddd <_Thread_Enable_dispatch> 10e270: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e272: 89 d0 mov %edx,%eax 10e274: 8d 65 f8 lea -0x8(%ebp),%esp 10e277: 5b pop %ebx 10e278: 5e pop %esi 10e279: c9 leave 10e27a: c3 ret =============================================================================== 0010960c : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10960c: 55 push %ebp 10960d: 89 e5 mov %esp,%ebp 10960f: 8b 55 08 mov 0x8(%ebp),%edx case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 109612: b8 09 00 00 00 mov $0x9,%eax rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109617: 83 fa 09 cmp $0x9,%edx 10961a: 0f 84 b5 00 00 00 je 1096d5 <== NEVER TAKEN 109620: 7f 54 jg 109676 <== NEVER TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 109622: b0 04 mov $0x4,%al rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109624: 83 fa 04 cmp $0x4,%edx 109627: 0f 84 a8 00 00 00 je 1096d5 <== NEVER TAKEN 10962d: 7f 2b jg 10965a <== NEVER TAKEN 10962f: b0 01 mov $0x1,%al 109631: 83 fa 01 cmp $0x1,%edx 109634: 0f 84 9b 00 00 00 je 1096d5 <== NEVER TAKEN 10963a: 7f 09 jg 109645 <== NEVER TAKEN 10963c: 30 c0 xor %al,%al 10963e: 85 d2 test %edx,%edx 109640: e9 8b 00 00 00 jmp 1096d0 109645: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10964a: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 10964d: 0f 84 82 00 00 00 je 1096d5 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 109653: b0 03 mov $0x3,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109655: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 109658: eb 76 jmp 1096d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 10965a: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10965f: 83 fa 06 cmp $0x6,%edx <== NOT EXECUTED 109662: 74 71 je 1096d5 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 109664: b0 05 mov $0x5,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109666: 7c 6d jl 1096d5 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 109668: b0 07 mov $0x7,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10966a: 83 fa 07 cmp $0x7,%edx <== NOT EXECUTED 10966d: 74 66 je 1096d5 <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 10966f: b0 08 mov $0x8,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109671: 83 fa 08 cmp $0x8,%edx <== NOT EXECUTED 109674: eb 5a jmp 1096d0 <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 109676: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10967b: 83 fa 0e cmp $0xe,%edx <== NOT EXECUTED 10967e: 74 55 je 1096d5 <== NOT EXECUTED 109680: 7f 19 jg 10969b <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 109682: b0 0b mov $0xb,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109684: 83 fa 0b cmp $0xb,%edx <== NOT EXECUTED 109687: 74 4c je 1096d5 <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 109689: b0 0a mov $0xa,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10968b: 7c 48 jl 1096d5 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 10968d: b0 0c mov $0xc,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10968f: 83 fa 0c cmp $0xc,%edx <== NOT EXECUTED 109692: 74 41 je 1096d5 <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 109694: b0 0d mov $0xd,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 109696: 83 fa 0d cmp $0xd,%edx <== NOT EXECUTED 109699: eb 35 jmp 1096d0 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 10969b: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096a0: 81 fa 02 10 00 00 cmp $0x1002,%edx <== NOT EXECUTED 1096a6: 74 2d je 1096d5 <== NOT EXECUTED 1096a8: 7f 11 jg 1096bb <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 1096aa: b0 0f mov $0xf,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096ac: 83 fa 0f cmp $0xf,%edx <== NOT EXECUTED 1096af: 74 24 je 1096d5 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 1096b1: b0 10 mov $0x10,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096b3: 81 fa 01 10 00 00 cmp $0x1001,%edx <== NOT EXECUTED 1096b9: eb 15 jmp 1096d0 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 1096bb: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096c0: 81 fa 03 10 00 00 cmp $0x1003,%edx <== NOT EXECUTED 1096c6: 74 0d je 1096d5 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 1096c8: b0 13 mov $0x13,%al <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 1096ca: 81 fa 04 10 00 00 cmp $0x1004,%edx <== NOT EXECUTED 1096d0: 74 03 je 1096d5 <== NEVER TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 1096d2: 83 c8 ff or $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 1096d5: c9 leave 1096d6: c3 ret =============================================================================== 0010852c : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 10852c: 55 push %ebp <== NOT EXECUTED 10852d: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 10852f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108532: a3 44 3f 12 00 mov %eax,0x123f44 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 108537: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10853a: a3 48 3f 12 00 mov %eax,0x123f48 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 10853f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 108542: a3 4c 3f 12 00 mov %eax,0x123f4c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108547: 31 c0 xor %eax,%eax <== NOT EXECUTED 108549: c9 leave <== NOT EXECUTED 10854a: c3 ret <== NOT EXECUTED =============================================================================== 001096b6 : } } rtems_status_code rtems_termios_close (void *arg) { 1096b6: 55 push %ebp 1096b7: 89 e5 mov %esp,%ebp 1096b9: 56 push %esi 1096ba: 53 push %ebx 1096bb: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1096be: 8b 06 mov (%esi),%eax 1096c0: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1096c3: 50 push %eax 1096c4: 6a 00 push $0x0 1096c6: 6a 00 push $0x0 1096c8: ff 35 fc 60 12 00 pushl 0x1260fc 1096ce: e8 11 0f 00 00 call 10a5e4 if (sc != RTEMS_SUCCESSFUL) 1096d3: 83 c4 10 add $0x10,%esp 1096d6: 85 c0 test %eax,%eax 1096d8: 75 7d jne 109757 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 1096da: 8b 43 08 mov 0x8(%ebx),%eax 1096dd: 48 dec %eax 1096de: 89 43 08 mov %eax,0x8(%ebx) 1096e1: 85 c0 test %eax,%eax 1096e3: 0f 85 33 01 00 00 jne 10981c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1096e9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1096ef: c1 e0 05 shl $0x5,%eax 1096f2: 8b 80 b4 5d 12 00 mov 0x125db4(%eax),%eax 1096f8: 85 c0 test %eax,%eax 1096fa: 74 0b je 109707 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1096fc: 83 ec 0c sub $0xc,%esp 1096ff: 53 push %ebx 109700: ff d0 call *%eax 109702: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109705: eb 1b jmp 109722 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109707: 51 push %ecx 109708: 6a 00 push $0x0 10970a: 6a 00 push $0x0 10970c: ff 73 18 pushl 0x18(%ebx) 10970f: e8 d0 0e 00 00 call 10a5e4 if (sc != RTEMS_SUCCESSFUL) { 109714: 83 c4 10 add $0x10,%esp 109717: 85 c0 test %eax,%eax 109719: 75 3c jne 109757 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10971b: 89 d8 mov %ebx,%eax 10971d: e8 18 f9 ff ff call 10903a } if (tty->device.outputUsesInterrupts 109722: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109729: 75 35 jne 109760 <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10972b: 52 push %edx 10972c: 52 push %edx 10972d: 6a 01 push $0x1 <== NOT EXECUTED 10972f: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 109735: e8 3e 0a 00 00 call 10a178 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10973a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10973d: 85 c0 test %eax,%eax <== NOT EXECUTED 10973f: 75 16 jne 109757 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 109741: 50 push %eax <== NOT EXECUTED 109742: 50 push %eax <== NOT EXECUTED 109743: 6a 01 push $0x1 <== NOT EXECUTED 109745: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10974b: e8 28 0a 00 00 call 10a178 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 109750: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109753: 85 c0 test %eax,%eax <== NOT EXECUTED 109755: 74 09 je 109760 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109757: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10975a: 50 push %eax <== NOT EXECUTED 10975b: e8 44 14 00 00 call 10aba4 <== NOT EXECUTED } if (tty->device.lastClose) 109760: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 109766: 85 c0 test %eax,%eax 109768: 74 0d je 109777 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10976a: 51 push %ecx 10976b: 56 push %esi 10976c: ff 73 10 pushl 0x10(%ebx) 10976f: ff 73 0c pushl 0xc(%ebx) 109772: ff d0 call *%eax 109774: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 109777: 8b 13 mov (%ebx),%edx 109779: 85 d2 test %edx,%edx 10977b: 8b 43 04 mov 0x4(%ebx),%eax 10977e: 75 11 jne 109791 rtems_termios_ttyTail = tty->back; 109780: a3 00 61 12 00 mov %eax,0x126100 if ( rtems_termios_ttyTail != NULL ) { 109785: 85 c0 test %eax,%eax 109787: 74 0b je 109794 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 109789: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10978f: eb 03 jmp 109794 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 109791: 89 42 04 mov %eax,0x4(%edx) } if (tty->back == NULL) { 109794: 8b 53 04 mov 0x4(%ebx),%edx 109797: 85 d2 test %edx,%edx 109799: 8b 03 mov (%ebx),%eax 10979b: 75 12 jne 1097af <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 10979d: a3 04 61 12 00 mov %eax,0x126104 if ( rtems_termios_ttyHead != NULL ) { 1097a2: 85 c0 test %eax,%eax 1097a4: 74 0b je 1097b1 rtems_termios_ttyHead->back = NULL; 1097a6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1097ad: eb 02 jmp 1097b1 } } else { tty->back->forw = tty->forw; 1097af: 89 02 mov %eax,(%edx) } rtems_semaphore_delete (tty->isem); 1097b1: 83 ec 0c sub $0xc,%esp 1097b4: ff 73 14 pushl 0x14(%ebx) 1097b7: e8 98 0d 00 00 call 10a554 rtems_semaphore_delete (tty->osem); 1097bc: 5a pop %edx 1097bd: ff 73 18 pushl 0x18(%ebx) 1097c0: e8 8f 0d 00 00 call 10a554 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 1097c5: 58 pop %eax 1097c6: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 1097cc: e8 83 0d 00 00 call 10a554 if ((tty->device.pollRead == NULL) || 1097d1: 83 c4 10 add $0x10,%esp 1097d4: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1097db: 74 09 je 1097e6 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 1097dd: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1097e4: 75 0e jne 1097f4 <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 1097e6: 83 ec 0c sub $0xc,%esp 1097e9: ff 73 68 pushl 0x68(%ebx) 1097ec: e8 63 0d 00 00 call 10a554 1097f1: 83 c4 10 add $0x10,%esp free (tty->rawInBuf.theBuf); 1097f4: 83 ec 0c sub $0xc,%esp 1097f7: ff 73 58 pushl 0x58(%ebx) 1097fa: e8 9d de ff ff call 10769c free (tty->rawOutBuf.theBuf); 1097ff: 5e pop %esi 109800: ff 73 7c pushl 0x7c(%ebx) 109803: e8 94 de ff ff call 10769c free (tty->cbuf); 109808: 59 pop %ecx 109809: ff 73 1c pushl 0x1c(%ebx) 10980c: e8 8b de ff ff call 10769c free (tty); 109811: 89 1c 24 mov %ebx,(%esp) 109814: e8 83 de ff ff call 10769c 109819: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10981c: 83 ec 0c sub $0xc,%esp 10981f: ff 35 fc 60 12 00 pushl 0x1260fc 109825: e8 a6 0e 00 00 call 10a6d0 return RTEMS_SUCCESSFUL; } 10982a: 31 c0 xor %eax,%eax 10982c: 8d 65 f8 lea -0x8(%ebp),%esp 10982f: 5b pop %ebx 109830: 5e pop %esi 109831: c9 leave 109832: c3 ret =============================================================================== 0010872e : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10872e: 55 push %ebp 10872f: 89 e5 mov %esp,%ebp 108731: 83 ec 08 sub $0x8,%esp 108734: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 108737: 8b 55 0c mov 0xc(%ebp),%edx 10873a: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 108740: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 108747: 75 1f jne 108768 <== ALWAYS TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 108749: 52 push %edx <== NOT EXECUTED 10874a: 52 push %edx <== NOT EXECUTED 10874b: 6a 02 push $0x2 <== NOT EXECUTED 10874d: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 108753: e8 20 1a 00 00 call 10a178 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 108758: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10875b: 85 c0 test %eax,%eax <== NOT EXECUTED 10875d: 74 30 je 10878f <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10875f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108762: 50 push %eax <== NOT EXECUTED 108763: e8 3c 24 00 00 call 10aba4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 108768: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10876f: 75 15 jne 108786 <== ALWAYS TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 108771: 8b 15 64 5e 12 00 mov 0x125e64,%edx 108777: 85 d2 test %edx,%edx 108779: 74 14 je 10878f <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10877b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10877e: 50 push %eax <== NOT EXECUTED 10877f: ff d2 call *%edx <== NOT EXECUTED 108781: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108784: eb 09 jmp 10878f <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 108786: 89 45 08 mov %eax,0x8(%ebp) } } 108789: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 10878a: e9 d7 fd ff ff jmp 108566 } } 10878f: 31 c0 xor %eax,%eax 108791: c9 leave 108792: c3 ret <== NOT EXECUTED =============================================================================== 00108793 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 108793: 55 push %ebp <== NOT EXECUTED 108794: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108796: 57 push %edi <== NOT EXECUTED 108797: 56 push %esi <== NOT EXECUTED 108798: 53 push %ebx <== NOT EXECUTED 108799: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10879c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10879f: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 1087a2: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1087a5: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 1087ab: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1087ae: 89 c6 mov %eax,%esi <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1087b0: 83 ba c0 5d 12 00 00 cmpl $0x0,0x125dc0(%edx) <== NOT EXECUTED 1087b7: 75 35 jne 1087ee <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 1087b9: 8d 53 4a lea 0x4a(%ebx),%edx <== NOT EXECUTED 1087bc: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1087bf: 8d 4b 30 lea 0x30(%ebx),%ecx <== NOT EXECUTED 1087c2: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 1087c5: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 1087c8: c6 45 de 00 movb $0x0,-0x22(%ebp) <== NOT EXECUTED 1087cc: 31 f6 xor %esi,%esi <== NOT EXECUTED 1087ce: e9 1d 02 00 00 jmp 1089f0 <== NOT EXECUTED bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; 1087d3: 0f be 17 movsbl (%edi),%edx <== NOT EXECUTED 1087d6: 47 inc %edi <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1087d7: 50 push %eax <== NOT EXECUTED 1087d8: 50 push %eax <== NOT EXECUTED 1087d9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1087df: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1087e2: 53 push %ebx <== NOT EXECUTED 1087e3: 52 push %edx <== NOT EXECUTED 1087e4: ff 90 c0 5d 12 00 call *0x125dc0(%eax) <== NOT EXECUTED 1087ea: 4e dec %esi <== NOT EXECUTED 1087eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 1087ee: 85 f6 test %esi,%esi <== NOT EXECUTED 1087f0: 75 e1 jne 1087d3 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1087f2: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 1087f9: 0f 85 0e 02 00 00 jne 108a0d <== NOT EXECUTED 1087ff: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 108805: 85 c0 test %eax,%eax <== NOT EXECUTED 108807: 0f 84 00 02 00 00 je 108a0d <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10880d: 51 push %ecx <== NOT EXECUTED 10880e: 51 push %ecx <== NOT EXECUTED 10880f: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 108815: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 108818: 52 push %edx <== NOT EXECUTED 108819: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10881b: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 108822: 00 00 00 108825: e9 de 01 00 00 jmp 108a08 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 10882a: 8a 07 mov (%edi),%al <== NOT EXECUTED 10882c: 88 45 df mov %al,-0x21(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10882f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108835: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108838: 74 47 je 108881 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10883a: 0f be 45 df movsbl -0x21(%ebp),%eax <== NOT EXECUTED 10883e: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 108842: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108844: 75 28 jne 10886e <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 108846: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 10884a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10884c: 75 0b jne 108859 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 10884e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108854: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 108857: eb 09 jmp 108862 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 108859: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10885f: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 108862: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 108868: c6 45 de 01 movb $0x1,-0x22(%ebp) <== NOT EXECUTED 10886c: eb 19 jmp 108887 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 10886e: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 108872: 39 d0 cmp %edx,%eax <== NOT EXECUTED 108874: 75 0b jne 108881 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 108876: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10887c: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10887f: eb e1 jmp 108862 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 108881: 80 7d de 00 cmpb $0x0,-0x22(%ebp) <== NOT EXECUTED 108885: 74 51 je 1088d8 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 108887: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10888d: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 108890: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 108893: 0f 85 53 01 00 00 jne 1089ec <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 108899: 9c pushf <== NOT EXECUTED 10889a: fa cli <== NOT EXECUTED 10889b: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10889e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088a4: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1088a7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 1088ad: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 1088b4: 74 19 je 1088cf <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1088b6: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 1088bc: 52 push %edx <== NOT EXECUTED 1088bd: 6a 01 push $0x1 <== NOT EXECUTED 1088bf: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1088c2: 50 push %eax <== NOT EXECUTED 1088c3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1088c6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1088cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1088cf: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1088d2: 9d popf <== NOT EXECUTED 1088d3: e9 14 01 00 00 jmp 1089ec <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1088d8: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1088db: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1088de: 40 inc %eax <== NOT EXECUTED 1088df: 31 d2 xor %edx,%edx <== NOT EXECUTED 1088e1: f7 f1 div %ecx <== NOT EXECUTED 1088e3: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1088e6: 9c pushf <== NOT EXECUTED 1088e7: fa cli <== NOT EXECUTED 1088e8: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1088eb: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 1088ee: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1088f1: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 1088f4: 29 d0 sub %edx,%eax <== NOT EXECUTED 1088f6: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 1088f9: 31 d2 xor %edx,%edx <== NOT EXECUTED 1088fb: f7 f1 div %ecx <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 1088fd: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 108903: 0f 86 98 00 00 00 jbe 1089a1 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 108909: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10890f: a8 01 test $0x1,%al <== NOT EXECUTED 108911: 0f 85 8a 00 00 00 jne 1089a1 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 108917: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10891d: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 108920: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 108926: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10892c: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 108931: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 108936: 75 33 jne 10896b <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 108938: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10893e: a8 20 test $0x20,%al <== NOT EXECUTED 108940: 75 09 jne 10894b <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 108942: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108949: 75 56 jne 1089a1 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 10894b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108951: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 108954: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10895a: 50 push %eax <== NOT EXECUTED 10895b: 6a 01 push $0x1 <== NOT EXECUTED 10895d: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 108960: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108963: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 108969: eb 33 jmp 10899e <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 10896b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108971: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 108976: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 10897b: 75 24 jne 1089a1 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 10897d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108983: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 108986: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10898c: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 108992: 85 c0 test %eax,%eax <== NOT EXECUTED 108994: 74 0b je 1089a1 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 108996: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108999: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10899c: ff d0 call *%eax <== NOT EXECUTED 10899e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 1089a1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1089a4: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 1089a5: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1089a8: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 1089ab: 75 03 jne 1089b0 <== NOT EXECUTED dropped++; 1089ad: 46 inc %esi <== NOT EXECUTED 1089ae: eb 3c jmp 1089ec <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 1089b0: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 1089b3: 8a 4d df mov -0x21(%ebp),%cl <== NOT EXECUTED 1089b6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1089b9: 88 0c 10 mov %cl,(%eax,%edx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 1089bc: 89 53 60 mov %edx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1089bf: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) <== NOT EXECUTED 1089c6: 75 24 jne 1089ec <== NOT EXECUTED 1089c8: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 1089ce: 85 c0 test %eax,%eax <== NOT EXECUTED 1089d0: 74 1a je 1089ec <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1089d2: 51 push %ecx <== NOT EXECUTED 1089d3: 51 push %ecx <== NOT EXECUTED 1089d4: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1089da: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED 1089dd: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1089df: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1089e6: 00 00 00 1089e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 1089ec: 47 inc %edi <== NOT EXECUTED 1089ed: ff 4d e0 decl -0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1089f0: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 1089f4: 0f 85 30 fe ff ff jne 10882a <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 1089fa: 01 73 78 add %esi,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 1089fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a00: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 108a03: e8 c8 1c 00 00 call 10a6d0 <== NOT EXECUTED return dropped; 108a08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a0b: eb 02 jmp 108a0f <== NOT EXECUTED 108a0d: 31 f6 xor %esi,%esi <== NOT EXECUTED } 108a0f: 89 f0 mov %esi,%eax <== NOT EXECUTED 108a11: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108a14: 5b pop %ebx <== NOT EXECUTED 108a15: 5e pop %esi <== NOT EXECUTED 108a16: 5f pop %edi <== NOT EXECUTED 108a17: c9 leave <== NOT EXECUTED 108a18: c3 ret <== NOT EXECUTED =============================================================================== 001084f0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 1084f0: 55 push %ebp 1084f1: 89 e5 mov %esp,%ebp 1084f3: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 1084f6: 83 3d fc 60 12 00 00 cmpl $0x0,0x1260fc 1084fd: 75 28 jne 108527 sc = rtems_semaphore_create ( 1084ff: 83 ec 0c sub $0xc,%esp 108502: 68 fc 60 12 00 push $0x1260fc 108507: 6a 00 push $0x0 108509: 6a 54 push $0x54 10850b: 6a 01 push $0x1 10850d: 68 69 6d 52 54 push $0x54526d69 108512: e8 a1 1e 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 108517: 83 c4 20 add $0x20,%esp 10851a: 85 c0 test %eax,%eax 10851c: 74 09 je 108527 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10851e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108521: 50 push %eax <== NOT EXECUTED 108522: e8 7d 26 00 00 call 10aba4 <== NOT EXECUTED } } 108527: c9 leave 108528: c3 ret =============================================================================== 0010936b : } } rtems_status_code rtems_termios_ioctl (void *arg) { 10936b: 55 push %ebp 10936c: 89 e5 mov %esp,%ebp 10936e: 57 push %edi 10936f: 56 push %esi 109370: 53 push %ebx 109371: 83 ec 20 sub $0x20,%esp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109374: 8b 55 08 mov 0x8(%ebp),%edx 109377: 8b 02 mov (%edx),%eax 109379: 8b 58 34 mov 0x34(%eax),%ebx struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10937c: 8b 72 08 mov 0x8(%edx),%esi rtems_status_code sc; args->ioctl_return = 0; 10937f: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 109386: 6a 00 push $0x0 109388: 6a 00 push $0x0 10938a: ff 73 18 pushl 0x18(%ebx) 10938d: e8 52 12 00 00 call 10a5e4 109392: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) { 109395: 83 c4 10 add $0x10,%esp 109398: 85 c0 test %eax,%eax 10939a: 74 0b je 1093a7 <== ALWAYS TAKEN args->ioctl_return = sc; 10939c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10939f: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED return sc; 1093a2: e9 04 03 00 00 jmp 1096ab <== NOT EXECUTED } switch (args->command) { 1093a7: 8b 55 08 mov 0x8(%ebp),%edx 1093aa: 8b 42 04 mov 0x4(%edx),%eax 1093ad: 83 f8 04 cmp $0x4,%eax 1093b0: 0f 84 4c 02 00 00 je 109602 <== NEVER TAKEN 1093b6: 77 10 ja 1093c8 <== NEVER TAKEN 1093b8: 83 f8 02 cmp $0x2,%eax 1093bb: 74 77 je 109434 1093bd: 0f 87 1d 02 00 00 ja 1095e0 1093c3: 48 dec %eax 1093c4: 75 2f jne 1093f5 <== NEVER TAKEN 1093c6: eb 55 jmp 10941d 1093c8: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 1093cd: 0f 84 a4 02 00 00 je 109677 <== NOT EXECUTED 1093d3: 77 0a ja 1093df <== NOT EXECUTED 1093d5: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 1093d8: 75 1b jne 1093f5 <== NOT EXECUTED 1093da: e9 0d 02 00 00 jmp 1095ec <== NOT EXECUTED 1093df: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 1093e4: 0f 84 7d 02 00 00 je 109667 <== NOT EXECUTED 1093ea: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 1093ef: 0f 84 20 02 00 00 je 109615 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 1093f5: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1093fb: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1093fe: 8b 80 c8 5d 12 00 mov 0x125dc8(%eax),%eax <== NOT EXECUTED 109404: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) <== NOT EXECUTED 10940b: 85 c0 test %eax,%eax <== NOT EXECUTED 10940d: 0f 84 81 02 00 00 je 109694 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 109413: 52 push %edx <== NOT EXECUTED 109414: 52 push %edx <== NOT EXECUTED 109415: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109418: e9 3f 02 00 00 jmp 10965c <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10941d: 8b 4d 08 mov 0x8(%ebp),%ecx 109420: 8b 41 08 mov 0x8(%ecx),%eax 109423: 8d 73 30 lea 0x30(%ebx),%esi 109426: b9 09 00 00 00 mov $0x9,%ecx 10942b: 89 c7 mov %eax,%edi 10942d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10942f: e9 60 02 00 00 jmp 109694 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 109434: 8b 45 08 mov 0x8(%ebp),%eax 109437: 8b 70 08 mov 0x8(%eax),%esi 10943a: 8d 7b 30 lea 0x30(%ebx),%edi 10943d: b9 09 00 00 00 mov $0x9,%ecx 109442: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 109444: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10944a: f6 c4 02 test $0x2,%ah 10944d: 74 57 je 1094a6 10944f: f6 43 31 04 testb $0x4,0x31(%ebx) 109453: 75 51 jne 1094a6 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 109455: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10945b: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 109460: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 109466: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10946c: a8 20 test $0x20,%al <== NOT EXECUTED 10946e: 74 36 je 1094a6 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109470: 9c pushf <== NOT EXECUTED 109471: fa cli <== NOT EXECUTED 109472: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109473: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109479: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10947c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 109482: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109489: 74 19 je 1094a4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 10948b: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 109491: 57 push %edi <== NOT EXECUTED 109492: 6a 01 push $0x1 <== NOT EXECUTED 109494: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109497: 50 push %eax <== NOT EXECUTED 109498: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10949b: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1094a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1094a4: 56 push %esi <== NOT EXECUTED 1094a5: 9d popf <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 1094a6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1094ac: f6 c4 04 test $0x4,%ah 1094af: 74 24 je 1094d5 <== ALWAYS TAKEN 1094b1: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED 1094b5: 75 1e jne 1094d5 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 1094b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094bd: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 1094c0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 1094c6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094cc: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1094cf: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 1094d5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1094db: f6 c4 01 test $0x1,%ah 1094de: 74 43 je 109523 <== ALWAYS TAKEN 1094e0: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED 1094e4: 78 3d js 109523 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 1094e6: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094ec: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 1094ef: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 1094f5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1094fb: a8 04 test $0x4,%al <== NOT EXECUTED 1094fd: 74 15 je 109514 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 1094ff: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 109505: 85 c0 test %eax,%eax <== NOT EXECUTED 109507: 74 0b je 109514 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 109509: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10950c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10950f: ff d0 call *%eax <== NOT EXECUTED 109511: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 109514: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10951a: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10951d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 109523: 83 7b 38 00 cmpl $0x0,0x38(%ebx) 109527: 79 0f jns 109538 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 109529: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10952f: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 109532: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 109538: f6 43 31 10 testb $0x10,0x31(%ebx) 10953c: 74 0f je 10954d <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 10953e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109544: 80 cc 04 or $0x4,%ah <== NOT EXECUTED 109547: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10954d: f6 43 31 04 testb $0x4,0x31(%ebx) 109551: 74 0f je 109562 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 109553: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109559: 80 cc 02 or $0x2,%ah 10955c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 109562: f6 43 3c 02 testb $0x2,0x3c(%ebx) 109566: 75 39 jne 1095a1 <== ALWAYS TAKEN tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 109568: 0f b6 73 46 movzbl 0x46(%ebx),%esi <== NOT EXECUTED 10956c: e8 2f 0a 00 00 call 109fa0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109571: 0f af c6 imul %esi,%eax <== NOT EXECUTED 109574: b9 0a 00 00 00 mov $0xa,%ecx <== NOT EXECUTED 109579: 31 d2 xor %edx,%edx <== NOT EXECUTED 10957b: f7 f1 div %ecx <== NOT EXECUTED 10957d: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 109580: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109584: 74 15 je 10959b <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109586: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10958d: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 109590: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 109594: 75 19 jne 1095af <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 109596: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 109599: eb 24 jmp 1095bf <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 10959b: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10959f: 74 17 je 1095b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 1095a1: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 1095a8: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 1095af: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) 1095b6: eb 07 jmp 1095bf } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 1095b8: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED } } } if (tty->device.setAttributes) 1095bf: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 1095c5: 85 c0 test %eax,%eax 1095c7: 0f 84 c7 00 00 00 je 109694 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 1095cd: 56 push %esi 1095ce: 56 push %esi 1095cf: 8d 53 30 lea 0x30(%ebx),%edx 1095d2: 52 push %edx 1095d3: ff 73 10 pushl 0x10(%ebx) 1095d6: ff d0 call *%eax 1095d8: 83 c4 10 add $0x10,%esp 1095db: e9 b4 00 00 00 jmp 109694 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 1095e0: 89 d8 mov %ebx,%eax 1095e2: e8 53 fa ff ff call 10903a break; 1095e7: e9 a8 00 00 00 jmp 109694 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 1095ec: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1095ee: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 1095f1: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED 1095f7: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED break; 1095fd: e9 92 00 00 00 jmp 109694 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 109602: 8b 06 mov (%esi),%eax <== NOT EXECUTED 109604: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 109607: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED 10960d: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED break; 109613: eb 7f jmp 109694 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 109615: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10961b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10961e: 8b 80 b4 5d 12 00 mov 0x125db4(%eax),%eax <== NOT EXECUTED 109624: 85 c0 test %eax,%eax <== NOT EXECUTED 109626: 74 0c je 109634 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109628: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10962b: 53 push %ebx <== NOT EXECUTED 10962c: ff d0 call *%eax <== NOT EXECUTED 10962e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 109631: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 109634: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 109637: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED 10963a: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10963c: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 109642: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED 109649: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10964c: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10964f: 8b 80 b0 5d 12 00 mov 0x125db0(%eax),%eax <== NOT EXECUTED 109655: 85 c0 test %eax,%eax <== NOT EXECUTED 109657: 74 3b je 109694 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109659: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10965c: 53 push %ebx <== NOT EXECUTED 10965d: ff d0 call *%eax <== NOT EXECUTED 10965f: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 109662: e9 71 ff ff ff jmp 1095d8 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 109667: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10966a: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED 10966d: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx <== NOT EXECUTED 109673: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 109675: eb 1d jmp 109694 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 109677: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10967a: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10967d: 29 d0 sub %edx,%eax <== NOT EXECUTED 10967f: 79 05 jns 109686 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 109681: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 109684: 01 d0 add %edx,%eax <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 109686: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 109689: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 10968c: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED 10968f: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED 109692: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 109694: 83 ec 0c sub $0xc,%esp 109697: ff 73 18 pushl 0x18(%ebx) 10969a: e8 31 10 00 00 call 10a6d0 args->ioctl_return = sc; 10969f: 8b 55 e4 mov -0x1c(%ebp),%edx 1096a2: 8b 45 08 mov 0x8(%ebp),%eax 1096a5: 89 50 0c mov %edx,0xc(%eax) return sc; 1096a8: 83 c4 10 add $0x10,%esp } 1096ab: 8b 45 e4 mov -0x1c(%ebp),%eax 1096ae: 8d 65 f4 lea -0xc(%ebp),%esp 1096b1: 5b pop %ebx 1096b2: 5e pop %esi 1096b3: 5f pop %edi 1096b4: c9 leave 1096b5: c3 ret =============================================================================== 00109833 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 109833: 55 push %ebp 109834: 89 e5 mov %esp,%ebp 109836: 57 push %edi 109837: 56 push %esi 109838: 53 push %ebx 109839: 83 ec 20 sub $0x20,%esp 10983c: 8b 75 14 mov 0x14(%ebp),%esi struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 10983f: 6a 00 push $0x0 109841: 6a 00 push $0x0 109843: ff 35 fc 60 12 00 pushl 0x1260fc 109849: e8 96 0d 00 00 call 10a5e4 10984e: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109851: 83 c4 10 add $0x10,%esp 109854: 85 c0 test %eax,%eax 109856: 0f 85 cf 03 00 00 jne 109c2b <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10985c: 8b 15 04 61 12 00 mov 0x126104,%edx 109862: eb 16 jmp 10987a if ((tty->major == major) && (tty->minor == minor)) 109864: 8b 45 08 mov 0x8(%ebp),%eax 109867: 39 42 0c cmp %eax,0xc(%edx) 10986a: 75 0c jne 109878 10986c: 8b 4d 0c mov 0xc(%ebp),%ecx 10986f: 39 4a 10 cmp %ecx,0x10(%edx) 109872: 0f 84 24 03 00 00 je 109b9c <== ALWAYS TAKEN */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 109878: 8b 12 mov (%edx),%edx 10987a: 85 d2 test %edx,%edx 10987c: 75 e6 jne 109864 10987e: e9 b3 03 00 00 jmp 109c36 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 109883: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109886: e9 98 00 00 00 jmp 109923 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10988b: a1 48 3f 12 00 mov 0x123f48,%eax 109890: 89 42 64 mov %eax,0x64(%edx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 109893: 8b 42 64 mov 0x64(%edx),%eax 109896: 83 ec 0c sub $0xc,%esp 109899: 50 push %eax 10989a: 89 55 e0 mov %edx,-0x20(%ebp) 10989d: e8 9a e0 ff ff call 10793c 1098a2: 8b 55 e0 mov -0x20(%ebp),%edx 1098a5: 89 42 58 mov %eax,0x58(%edx) if (tty->rawInBuf.theBuf == NULL) { 1098a8: 83 c4 10 add $0x10,%esp 1098ab: 85 c0 test %eax,%eax 1098ad: 75 05 jne 1098b4 <== ALWAYS TAKEN free(tty); 1098af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098b2: eb 68 jmp 10991c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1098b4: a1 4c 3f 12 00 mov 0x123f4c,%eax 1098b9: 89 82 88 00 00 00 mov %eax,0x88(%edx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 1098bf: 8b 82 88 00 00 00 mov 0x88(%edx),%eax 1098c5: 83 ec 0c sub $0xc,%esp 1098c8: 50 push %eax 1098c9: 89 55 e0 mov %edx,-0x20(%ebp) 1098cc: e8 6b e0 ff ff call 10793c 1098d1: 8b 55 e0 mov -0x20(%ebp),%edx 1098d4: 89 42 7c mov %eax,0x7c(%edx) if (tty->rawOutBuf.theBuf == NULL) { 1098d7: 83 c4 10 add $0x10,%esp 1098da: 85 c0 test %eax,%eax 1098dc: 75 05 jne 1098e3 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 1098de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098e1: eb 2d jmp 109910 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 1098e3: 83 ec 0c sub $0xc,%esp 1098e6: ff 35 44 3f 12 00 pushl 0x123f44 1098ec: 89 55 e0 mov %edx,-0x20(%ebp) 1098ef: e8 48 e0 ff ff call 10793c 1098f4: 8b 55 e0 mov -0x20(%ebp),%edx 1098f7: 89 42 1c mov %eax,0x1c(%edx) if (tty->cbuf == NULL) { 1098fa: 83 c4 10 add $0x10,%esp 1098fd: 85 c0 test %eax,%eax 1098ff: 75 39 jne 10993a <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 109901: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109904: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED 109907: e8 90 dd ff ff call 10769c <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10990c: 5b pop %ebx <== NOT EXECUTED 10990d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109910: ff 72 58 pushl 0x58(%edx) <== NOT EXECUTED 109913: e8 84 dd ff ff call 10769c <== NOT EXECUTED free(tty); 109918: 59 pop %ecx <== NOT EXECUTED 109919: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10991c: 52 push %edx <== NOT EXECUTED 10991d: e8 7a dd ff ff call 10769c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 109922: 5a pop %edx <== NOT EXECUTED 109923: ff 35 fc 60 12 00 pushl 0x1260fc <== NOT EXECUTED 109929: e8 a2 0d 00 00 call 10a6d0 <== NOT EXECUTED 10992e: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 109935: e9 ee 02 00 00 jmp 109c28 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10993a: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx) 109941: 00 00 00 tty->tty_snd.sw_arg = NULL; 109944: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx) 10994b: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10994e: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx) 109955: 00 00 00 tty->tty_rcv.sw_arg = NULL; 109958: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx) 10995f: 00 00 00 tty->tty_rcvwakeup = 0; 109962: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx) 109969: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10996c: a1 04 61 12 00 mov 0x126104,%eax 109971: 89 02 mov %eax,(%edx) tty->back = NULL; 109973: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if (rtems_termios_ttyHead != NULL) 10997a: 85 c0 test %eax,%eax 10997c: 74 03 je 109981 rtems_termios_ttyHead->back = tty; 10997e: 89 50 04 mov %edx,0x4(%eax) rtems_termios_ttyHead = tty; 109981: 89 1d 04 61 12 00 mov %ebx,0x126104 if (rtems_termios_ttyTail == NULL) 109987: 83 3d 00 61 12 00 00 cmpl $0x0,0x126100 10998e: 75 06 jne 109996 rtems_termios_ttyTail = tty; 109990: 89 1d 00 61 12 00 mov %ebx,0x126100 tty->minor = minor; 109996: 8b 45 0c mov 0xc(%ebp),%eax 109999: 89 43 10 mov %eax,0x10(%ebx) tty->major = major; 10999c: 8b 4d 08 mov 0x8(%ebp),%ecx 10999f: 89 4b 0c mov %ecx,0xc(%ebx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1099a2: 83 ec 0c sub $0xc,%esp 1099a5: 8d 43 14 lea 0x14(%ebx),%eax 1099a8: 50 push %eax 1099a9: 6a 00 push $0x0 1099ab: 6a 54 push $0x54 1099ad: 6a 01 push $0x1 1099af: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax 1099b6: 0d 00 69 52 54 or $0x54526900,%eax 1099bb: 50 push %eax 1099bc: 89 55 e0 mov %edx,-0x20(%ebp) 1099bf: e8 f4 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 1099c4: 83 c4 20 add $0x20,%esp 1099c7: 85 c0 test %eax,%eax 1099c9: 8b 55 e0 mov -0x20(%ebp),%edx 1099cc: 0f 85 3f 02 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1099d2: 83 ec 0c sub $0xc,%esp 1099d5: 8d 43 18 lea 0x18(%ebx),%eax 1099d8: 50 push %eax 1099d9: 6a 00 push $0x0 1099db: 6a 54 push $0x54 1099dd: 6a 01 push $0x1 1099df: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax 1099e6: 0d 00 6f 52 54 or $0x54526f00,%eax 1099eb: 50 push %eax 1099ec: 89 55 e0 mov %edx,-0x20(%ebp) 1099ef: e8 c4 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 1099f4: 83 c4 20 add $0x20,%esp 1099f7: 85 c0 test %eax,%eax 1099f9: 8b 55 e0 mov -0x20(%ebp),%edx 1099fc: 0f 85 0f 02 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109a02: 83 ec 0c sub $0xc,%esp 109a05: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 109a0b: 50 push %eax 109a0c: 6a 00 push $0x0 109a0e: 6a 20 push $0x20 109a10: 6a 00 push $0x0 109a12: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax 109a19: 0d 00 78 52 54 or $0x54527800,%eax 109a1e: 50 push %eax 109a1f: 89 55 e0 mov %edx,-0x20(%ebp) 109a22: e8 91 09 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109a27: 83 c4 20 add $0x20,%esp 109a2a: 85 c0 test %eax,%eax 109a2c: 8b 55 e0 mov -0x20(%ebp),%edx 109a2f: 0f 85 dc 01 00 00 jne 109c11 <== NEVER TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 109a35: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109a3c: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109a3f: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi 109a45: b9 08 00 00 00 mov $0x8,%ecx 109a4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109a4c: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109a53: 75 74 jne 109ac9 <== ALWAYS TAKEN sc = rtems_task_create ( 109a55: 50 push %eax <== NOT EXECUTED 109a56: 50 push %eax <== NOT EXECUTED 109a57: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax <== NOT EXECUTED 109a5d: 50 push %eax <== NOT EXECUTED 109a5e: 6a 00 push $0x0 <== NOT EXECUTED 109a60: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 109a65: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 109a6a: 6a 0a push $0xa <== NOT EXECUTED 109a6c: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax <== NOT EXECUTED 109a73: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 109a78: 50 push %eax <== NOT EXECUTED 109a79: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109a7c: e8 df 0c 00 00 call 10a760 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 109a81: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 109a84: 85 c0 test %eax,%eax <== NOT EXECUTED 109a86: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109a89: 0f 85 82 01 00 00 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 109a8f: 57 push %edi <== NOT EXECUTED 109a90: 57 push %edi <== NOT EXECUTED 109a91: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax <== NOT EXECUTED 109a97: 50 push %eax <== NOT EXECUTED 109a98: 6a 00 push $0x0 <== NOT EXECUTED 109a9a: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 109a9f: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 109aa4: 6a 09 push $0x9 <== NOT EXECUTED 109aa6: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax <== NOT EXECUTED 109aad: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 109ab2: 50 push %eax <== NOT EXECUTED 109ab3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109ab6: e8 a5 0c 00 00 call 10a760 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 109abb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 109abe: 85 c0 test %eax,%eax <== NOT EXECUTED 109ac0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109ac3: 0f 85 48 01 00 00 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 109ac9: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 109ad0: 74 09 je 109adb (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 109ad2: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109ad9: 75 30 jne 109b0b <== ALWAYS TAKEN sc = rtems_semaphore_create ( 109adb: 83 ec 0c sub $0xc,%esp 109ade: 8d 43 68 lea 0x68(%ebx),%eax 109ae1: 50 push %eax 109ae2: 6a 00 push $0x0 109ae4: 6a 24 push $0x24 109ae6: 6a 00 push $0x0 109ae8: 0f be 05 50 3f 12 00 movsbl 0x123f50,%eax 109aef: 0d 00 72 52 54 or $0x54527200,%eax 109af4: 50 push %eax 109af5: 89 55 e0 mov %edx,-0x20(%ebp) 109af8: e8 bb 08 00 00 call 10a3b8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109afd: 83 c4 20 add $0x20,%esp 109b00: 85 c0 test %eax,%eax 109b02: 8b 55 e0 mov -0x20(%ebp),%edx 109b05: 0f 85 06 01 00 00 jne 109c11 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 109b0b: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 109b12: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 109b19: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 109b20: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx) tty->termios.c_cc[VINTR] = '\003'; 109b27: c6 43 41 03 movb $0x3,0x41(%ebx) tty->termios.c_cc[VQUIT] = '\034'; 109b2b: c6 43 42 1c movb $0x1c,0x42(%ebx) tty->termios.c_cc[VERASE] = '\177'; 109b2f: c6 43 43 7f movb $0x7f,0x43(%ebx) tty->termios.c_cc[VKILL] = '\025'; 109b33: c6 43 44 15 movb $0x15,0x44(%ebx) tty->termios.c_cc[VEOF] = '\004'; 109b37: c6 43 45 04 movb $0x4,0x45(%ebx) tty->termios.c_cc[VEOL] = '\000'; 109b3b: c6 43 4c 00 movb $0x0,0x4c(%ebx) tty->termios.c_cc[VEOL2] = '\000'; 109b3f: c6 43 51 00 movb $0x0,0x51(%ebx) tty->termios.c_cc[VSTART] = '\021'; 109b43: c6 43 49 11 movb $0x11,0x49(%ebx) tty->termios.c_cc[VSTOP] = '\023'; 109b47: c6 43 4a 13 movb $0x13,0x4a(%ebx) tty->termios.c_cc[VSUSP] = '\032'; 109b4b: c6 43 4b 1a movb $0x1a,0x4b(%ebx) tty->termios.c_cc[VREPRINT] = '\022'; 109b4f: c6 43 4d 12 movb $0x12,0x4d(%ebx) tty->termios.c_cc[VDISCARD] = '\017'; 109b53: c6 43 4e 0f movb $0xf,0x4e(%ebx) tty->termios.c_cc[VWERASE] = '\027'; 109b57: c6 43 4f 17 movb $0x17,0x4f(%ebx) tty->termios.c_cc[VLNEXT] = '\026'; 109b5b: c6 43 50 16 movb $0x16,0x50(%ebx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 109b5f: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx) 109b66: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 109b69: 8b 43 64 mov 0x64(%ebx),%eax 109b6c: d1 e8 shr %eax 109b6e: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) tty->highwater = tty->rawInBuf.Size * 3/4; 109b74: 8b 43 64 mov 0x64(%ebx),%eax 109b77: 8d 04 40 lea (%eax,%eax,2),%eax 109b7a: c1 e8 02 shr $0x2,%eax 109b7d: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Bump name characer */ if (c++ == 'z') 109b83: a0 50 3f 12 00 mov 0x123f50,%al 109b88: 8d 48 01 lea 0x1(%eax),%ecx 109b8b: 88 0d 50 3f 12 00 mov %cl,0x123f50 109b91: 3c 7a cmp $0x7a,%al 109b93: 75 07 jne 109b9c <== ALWAYS TAKEN c = 'a'; 109b95: c6 05 50 3f 12 00 61 movb $0x61,0x123f50 <== NOT EXECUTED } args->iop->data1 = tty; 109b9c: 8b 4d 10 mov 0x10(%ebp),%ecx 109b9f: 8b 01 mov (%ecx),%eax 109ba1: 89 50 34 mov %edx,0x34(%eax) if (!tty->refcount++) { 109ba4: 8b 42 08 mov 0x8(%edx),%eax 109ba7: 8d 48 01 lea 0x1(%eax),%ecx 109baa: 89 4a 08 mov %ecx,0x8(%edx) 109bad: 85 c0 test %eax,%eax 109baf: 75 69 jne 109c1a if (tty->device.firstOpen) 109bb1: 8b 82 98 00 00 00 mov 0x98(%edx),%eax 109bb7: 85 c0 test %eax,%eax 109bb9: 74 15 je 109bd0 (*tty->device.firstOpen)(major, minor, arg); 109bbb: 56 push %esi 109bbc: ff 75 10 pushl 0x10(%ebp) 109bbf: ff 75 0c pushl 0xc(%ebp) 109bc2: ff 75 08 pushl 0x8(%ebp) 109bc5: 89 55 e0 mov %edx,-0x20(%ebp) 109bc8: ff d0 call *%eax 109bca: 83 c4 10 add $0x10,%esp 109bcd: 8b 55 e0 mov -0x20(%ebp),%edx /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109bd0: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) 109bd7: 75 41 jne 109c1a <== ALWAYS TAKEN sc = rtems_task_start(tty->rxTaskId, 109bd9: 53 push %ebx <== NOT EXECUTED 109bda: 52 push %edx <== NOT EXECUTED 109bdb: 68 bb 9c 10 00 push $0x109cbb <== NOT EXECUTED 109be0: ff b2 c4 00 00 00 pushl 0xc4(%edx) <== NOT EXECUTED 109be6: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109be9: e8 de 0d 00 00 call 10a9cc <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109bee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109bf1: 85 c0 test %eax,%eax <== NOT EXECUTED 109bf3: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109bf6: 75 19 jne 109c11 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 109bf8: 51 push %ecx <== NOT EXECUTED 109bf9: 52 push %edx <== NOT EXECUTED 109bfa: 68 58 9c 10 00 push $0x109c58 <== NOT EXECUTED 109bff: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED 109c05: e8 c2 0d 00 00 call 10a9cc <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109c0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c0d: 85 c0 test %eax,%eax <== NOT EXECUTED 109c0f: 74 09 je 109c1a <== NOT EXECUTED rtems_fatal_error_occurred (sc); 109c11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c14: 50 push %eax <== NOT EXECUTED 109c15: e8 8a 0f 00 00 call 10aba4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 109c1a: 83 ec 0c sub $0xc,%esp 109c1d: ff 35 fc 60 12 00 pushl 0x1260fc 109c23: e8 a8 0a 00 00 call 10a6d0 return RTEMS_SUCCESSFUL; 109c28: 83 c4 10 add $0x10,%esp } 109c2b: 8b 45 e4 mov -0x1c(%ebp),%eax 109c2e: 8d 65 f4 lea -0xc(%ebp),%esp 109c31: 5b pop %ebx 109c32: 5e pop %esi 109c33: 5f pop %edi 109c34: c9 leave 109c35: c3 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 109c36: 52 push %edx 109c37: 52 push %edx 109c38: 68 e8 00 00 00 push $0xe8 109c3d: 6a 01 push $0x1 109c3f: e8 78 d8 ff ff call 1074bc 109c44: 89 c2 mov %eax,%edx 109c46: 89 c3 mov %eax,%ebx if (tty == NULL) { 109c48: 83 c4 10 add $0x10,%esp 109c4b: 85 c0 test %eax,%eax 109c4d: 0f 85 38 fc ff ff jne 10988b <== ALWAYS TAKEN 109c53: e9 2b fc ff ff jmp 109883 <== NOT EXECUTED =============================================================================== 00108a19 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 108a19: 55 push %ebp 108a1a: 89 e5 mov %esp,%ebp 108a1c: 57 push %edi 108a1d: 56 push %esi 108a1e: 53 push %ebx 108a1f: 83 ec 3c sub $0x3c,%esp 108a22: 8b 45 08 mov 0x8(%ebp),%eax 108a25: 8b 75 0c mov 0xc(%ebp),%esi 108a28: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 108a2b: 89 c7 mov %eax,%edi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 108a2d: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 108a34: 75 1b jne 108a51 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 108a36: 89 75 10 mov %esi,0x10(%ebp) <== NOT EXECUTED 108a39: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 108a3c: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 108a3f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108a42: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108a48: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108a4b: 5b pop %ebx <== NOT EXECUTED 108a4c: 5e pop %esi <== NOT EXECUTED 108a4d: 5f pop %edi <== NOT EXECUTED 108a4e: c9 leave <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 108a4f: ff e0 jmp *%eax <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 108a51: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108a57: 89 45 e4 mov %eax,-0x1c(%ebp) while (len) { 108a5a: e9 ca 00 00 00 jmp 108b29 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 108a5f: 8b 45 e4 mov -0x1c(%ebp),%eax 108a62: 40 inc %eax 108a63: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 108a69: 31 d2 xor %edx,%edx 108a6b: f7 f1 div %ecx 108a6d: 89 55 c4 mov %edx,-0x3c(%ebp) 108a70: 89 55 e4 mov %edx,-0x1c(%ebp) rtems_interrupt_disable (level); 108a73: 9c pushf 108a74: fa cli 108a75: 8f 45 d4 popl -0x2c(%ebp) 108a78: 8b 55 d4 mov -0x2c(%ebp),%edx 108a7b: 8b 4d c4 mov -0x3c(%ebp),%ecx while (newHead == tty->rawOutBuf.Tail) { 108a7e: eb 35 jmp 108ab5 tty->rawOutBufState = rob_wait; 108a80: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108a87: 00 00 00 rtems_interrupt_enable (level); 108a8a: 52 push %edx 108a8b: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 108a8c: 50 push %eax 108a8d: 6a 00 push $0x0 108a8f: 6a 00 push $0x0 108a91: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108a97: 89 4d e0 mov %ecx,-0x20(%ebp) 108a9a: e8 45 1b 00 00 call 10a5e4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108a9f: 83 c4 10 add $0x10,%esp 108aa2: 85 c0 test %eax,%eax 108aa4: 8b 4d e0 mov -0x20(%ebp),%ecx 108aa7: 74 09 je 108ab2 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108aa9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108aac: 50 push %eax <== NOT EXECUTED 108aad: e8 f2 20 00 00 call 10aba4 <== NOT EXECUTED rtems_interrupt_disable (level); 108ab2: 9c pushf 108ab3: fa cli 108ab4: 5a pop %edx * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 108ab5: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108abb: 39 c1 cmp %eax,%ecx 108abd: 74 c1 je 108a80 108abf: 89 55 d4 mov %edx,-0x2c(%ebp) 108ac2: 89 4d c4 mov %ecx,-0x3c(%ebp) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 108ac5: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx 108acb: 8a 07 mov (%edi),%al 108acd: 8b 53 7c mov 0x7c(%ebx),%edx 108ad0: 88 04 0a mov %al,(%edx,%ecx,1) tty->rawOutBuf.Head = newHead; 108ad3: 8b 4d c4 mov -0x3c(%ebp),%ecx 108ad6: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 108adc: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 108ae3: 75 3e jne 108b23 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 108ae5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108aeb: a8 10 test $0x10,%al 108aed: 75 1b jne 108b0a <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108aef: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 108af5: 52 push %edx 108af6: 6a 01 push $0x1 108af8: 03 43 7c add 0x7c(%ebx),%eax 108afb: 50 push %eax 108afc: ff 73 10 pushl 0x10(%ebx) 108aff: ff 93 a4 00 00 00 call *0xa4(%ebx) 108b05: 83 c4 10 add $0x10,%esp 108b08: eb 0f jmp 108b19 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 108b0a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108b10: 83 c8 20 or $0x20,%eax 108b13: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 108b19: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108b20: 00 00 00 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 108b23: 47 inc %edi /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 108b24: ff 75 d4 pushl -0x2c(%ebp) 108b27: 9d popf len--; 108b28: 4e dec %esi if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 108b29: 85 f6 test %esi,%esi 108b2b: 0f 85 2e ff ff ff jne 108a5f tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108b31: 8d 65 f4 lea -0xc(%ebp),%esp 108b34: 5b pop %ebx 108b35: 5e pop %esi 108b36: 5f pop %edi 108b37: c9 leave 108b38: c3 ret =============================================================================== 00109097 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 109097: 55 push %ebp <== NOT EXECUTED 109098: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10909a: 57 push %edi <== NOT EXECUTED 10909b: 56 push %esi <== NOT EXECUTED 10909c: 53 push %ebx <== NOT EXECUTED 10909d: 83 ec 50 sub $0x50,%esp <== NOT EXECUTED 1090a0: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1090a3: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1090a5: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 1090a8: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 1090ab: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 1090ae: 8b 4e 0c mov 0xc(%esi),%ecx <== NOT EXECUTED 1090b1: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1090b4: 6a 00 push $0x0 <== NOT EXECUTED 1090b6: 6a 00 push $0x0 <== NOT EXECUTED 1090b8: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 1090bb: e8 24 15 00 00 call 10a5e4 <== NOT EXECUTED 1090c0: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1090c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1090c6: 85 c0 test %eax,%eax <== NOT EXECUTED 1090c8: 0f 85 92 02 00 00 jne 109360 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 1090ce: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1090d4: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1090d7: 8b 80 b8 5d 12 00 mov 0x125db8(%eax),%eax <== NOT EXECUTED 1090dd: 85 c0 test %eax,%eax <== NOT EXECUTED 1090df: 74 19 je 1090fa <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 1090e1: 51 push %ecx <== NOT EXECUTED 1090e2: 51 push %ecx <== NOT EXECUTED 1090e3: 56 push %esi <== NOT EXECUTED 1090e4: 53 push %ebx <== NOT EXECUTED 1090e5: ff d0 call *%eax <== NOT EXECUTED 1090e7: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 1090ea: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 1090f1: 00 00 00 rtems_semaphore_release (tty->isem); 1090f4: 5a pop %edx <== NOT EXECUTED 1090f5: e9 5b 02 00 00 jmp 109355 <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 1090fa: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 1090fd: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 109100: 0f 85 25 02 00 00 jne 10932b <== NOT EXECUTED tty->cindex = tty->ccount = 0; 109106: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 10910d: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 109114: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109117: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL 10911a: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) <== NOT EXECUTED 109121: 0f 84 c4 00 00 00 je 1091eb <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 109127: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) <== NOT EXECUTED 10912e: 0f 85 b7 00 00 00 jne 1091eb <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109134: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 109138: 74 35 je 10916f <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10913a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10913d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109140: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109146: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109149: 85 c0 test %eax,%eax <== NOT EXECUTED 10914b: 79 0f jns 10915c <== NOT EXECUTED rtems_task_wake_after (1); 10914d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109150: 6a 01 push $0x1 <== NOT EXECUTED 109152: e8 d9 18 00 00 call 10aa30 <== NOT EXECUTED 109157: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10915a: eb de jmp 10913a <== NOT EXECUTED } else { if (siproc (n, tty)) 10915c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10915f: 89 da mov %ebx,%edx <== NOT EXECUTED 109161: e8 db fd ff ff call 108f41 <== NOT EXECUTED 109166: 85 c0 test %eax,%eax <== NOT EXECUTED 109168: 74 d0 je 10913a <== NOT EXECUTED 10916a: e9 bc 01 00 00 jmp 10932b <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10916f: e8 40 0e 00 00 call 109fb4 <== NOT EXECUTED 109174: 89 c7 mov %eax,%edi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109176: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109179: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10917c: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109182: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109185: 85 c0 test %eax,%eax <== NOT EXECUTED 109187: 79 3d jns 1091c6 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 109189: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10918d: 74 0e je 10919d <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 10918f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109193: 74 22 je 1091b7 <== NOT EXECUTED 109195: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED 109199: 74 1c je 1091b7 <== NOT EXECUTED 10919b: eb 0a jmp 1091a7 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 10919d: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 1091a1: 0f 84 84 01 00 00 je 10932b <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 1091a7: e8 08 0e 00 00 call 109fb4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 1091ac: 29 f8 sub %edi,%eax <== NOT EXECUTED 1091ae: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 1091b1: 0f 87 74 01 00 00 ja 10932b <== NOT EXECUTED break; } } rtems_task_wake_after (1); 1091b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091ba: 6a 01 push $0x1 <== NOT EXECUTED 1091bc: e8 6f 18 00 00 call 10aa30 <== NOT EXECUTED 1091c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091c4: eb b0 jmp 109176 <== NOT EXECUTED } else { siproc (n, tty); 1091c6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1091c9: 89 da mov %ebx,%edx <== NOT EXECUTED 1091cb: e8 71 fd ff ff call 108f41 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1091d0: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 1091d3: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 1091d6: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 1091d9: 0f 8d 4c 01 00 00 jge 10932b <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 1091df: 84 c0 test %al,%al <== NOT EXECUTED 1091e1: 74 93 je 109176 <== NOT EXECUTED 1091e3: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 1091e7: 74 8d je 109176 <== NOT EXECUTED 1091e9: eb 84 jmp 10916f <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 1091eb: 8b 53 74 mov 0x74(%ebx),%edx <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 1091ee: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1091f1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1091f4: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1091f9: e9 de 00 00 00 jmp 1092dc <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 1091fe: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109201: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109204: 40 inc %eax <== NOT EXECUTED 109205: 31 d2 xor %edx,%edx <== NOT EXECUTED 109207: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 109209: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10920c: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED 10920f: 88 45 d7 mov %al,-0x29(%ebp) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 109212: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109215: 8b 4b 60 mov 0x60(%ebx),%ecx <== NOT EXECUTED 109218: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 10921b: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 10921e: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 109221: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 109224: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 109227: 03 45 c4 add -0x3c(%ebp),%eax <== NOT EXECUTED 10922a: 29 d0 sub %edx,%eax <== NOT EXECUTED 10922c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10922e: f7 f1 div %ecx <== NOT EXECUTED 109230: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 109236: 73 74 jae 1092ac <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 109238: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10923e: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 109241: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 109247: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10924d: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 109252: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 109257: 75 24 jne 10927d <== NOT EXECUTED 109259: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109260: 74 0a je 10926c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 109262: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 109268: a8 20 test $0x20,%al <== NOT EXECUTED 10926a: 74 11 je 10927d <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 10926c: 50 push %eax <== NOT EXECUTED 10926d: 6a 01 push $0x1 <== NOT EXECUTED 10926f: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109272: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109275: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10927b: eb 2c jmp 1092a9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10927d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109283: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 109286: 74 24 je 1092ac <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 109288: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10928e: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109291: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 109297: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10929d: 85 c0 test %eax,%eax <== NOT EXECUTED 10929f: 74 0b je 1092ac <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 1092a1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1092a4: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1092a7: ff d0 call *%eax <== NOT EXECUTED 1092a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 1092ac: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 1092b0: 74 11 je 1092c3 <== NOT EXECUTED if (siproc (c, tty)) 1092b2: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 1092b6: 89 da mov %ebx,%edx <== NOT EXECUTED 1092b8: e8 84 fc ff ff call 108f41 <== NOT EXECUTED 1092bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1092bf: 75 16 jne 1092d7 <== NOT EXECUTED 1092c1: eb 16 jmp 1092d9 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 1092c3: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 1092c7: 89 da mov %ebx,%edx <== NOT EXECUTED 1092c9: e8 73 fc ff ff call 108f41 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1092ce: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 1092d2: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 1092d5: 7c 02 jl 1092d9 <== NOT EXECUTED 1092d7: 31 ff xor %edi,%edi <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 1092d9: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1092dc: 8b 4b 5c mov 0x5c(%ebx),%ecx <== NOT EXECUTED 1092df: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1092e2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 1092e4: 74 0f je 1092f5 <== NOT EXECUTED 1092e6: a1 44 3f 12 00 mov 0x123f44,%eax <== NOT EXECUTED 1092eb: 48 dec %eax <== NOT EXECUTED 1092ec: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 1092ef: 0f 8c 09 ff ff ff jl 1091fe <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 1092f5: 85 ff test %edi,%edi <== NOT EXECUTED 1092f7: 74 32 je 10932b <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 1092f9: 51 push %ecx <== NOT EXECUTED 1092fa: 52 push %edx <== NOT EXECUTED 1092fb: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 1092fe: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109301: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 109304: e8 db 12 00 00 call 10a5e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 109309: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10930c: 85 c0 test %eax,%eax <== NOT EXECUTED 10930e: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 109311: 74 c9 je 1092dc <== NOT EXECUTED 109313: eb 16 jmp 10932b <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 109315: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109318: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10931b: 8a 04 07 mov (%edi,%eax,1),%al <== NOT EXECUTED 10931e: 88 02 mov %al,(%edx) <== NOT EXECUTED 109320: 42 inc %edx <== NOT EXECUTED 109321: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109324: 40 inc %eax <== NOT EXECUTED 109325: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED count--; 109328: 49 dec %ecx <== NOT EXECUTED 109329: eb 06 jmp 109331 <== NOT EXECUTED 10932b: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10932e: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 109331: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109333: 74 0b je 109340 <== NOT EXECUTED 109335: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 109338: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 10933b: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10933e: 7c d5 jl 109315 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 109340: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED 109343: 29 c8 sub %ecx,%eax <== NOT EXECUTED 109345: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 109348: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10934f: 00 00 00 rtems_semaphore_release (tty->isem); 109352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109355: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 109358: e8 73 13 00 00 call 10a6d0 <== NOT EXECUTED return sc; 10935d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109360: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 109363: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109366: 5b pop %ebx <== NOT EXECUTED 109367: 5e pop %esi <== NOT EXECUTED 109368: 5f pop %edi <== NOT EXECUTED 109369: c9 leave <== NOT EXECUTED 10936a: c3 ret <== NOT EXECUTED =============================================================================== 00108566 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 108566: 55 push %ebp 108567: 89 e5 mov %esp,%ebp 108569: 57 push %edi 10856a: 56 push %esi 10856b: 53 push %ebx 10856c: 83 ec 0c sub $0xc,%esp 10856f: 8b 5d 08 mov 0x8(%ebp),%ebx int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 108572: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108578: 25 03 04 00 00 and $0x403,%eax 10857d: 3d 01 04 00 00 cmp $0x401,%eax 108582: 75 2c jne 1085b0 <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 108584: 56 push %esi <== NOT EXECUTED 108585: 6a 01 push $0x1 <== NOT EXECUTED 108587: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10858a: 50 push %eax <== NOT EXECUTED 10858b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10858e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 108594: 9c pushf <== NOT EXECUTED 108595: fa cli <== NOT EXECUTED 108596: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 108597: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 10859d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1085a3: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1085a6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1085ac: 52 push %edx <== NOT EXECUTED 1085ad: 9d popf <== NOT EXECUTED 1085ae: eb 38 jmp 1085e8 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1085b0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1085b6: 83 e0 03 and $0x3,%eax 1085b9: 83 f8 02 cmp $0x2,%eax 1085bc: 75 37 jne 1085f5 <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 1085be: 51 push %ecx <== NOT EXECUTED 1085bf: 6a 01 push $0x1 <== NOT EXECUTED 1085c1: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1085c4: 50 push %eax <== NOT EXECUTED 1085c5: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1085c8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 1085ce: 9c pushf <== NOT EXECUTED 1085cf: fa cli <== NOT EXECUTED 1085d0: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1085d1: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1085d7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1085dd: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1085e0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1085e6: 52 push %edx <== NOT EXECUTED 1085e7: 9d popf <== NOT EXECUTED 1085e8: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 1085ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085f0: e9 2f 01 00 00 jmp 108724 <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1085f5: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1085fb: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108601: 39 c2 cmp %eax,%edx 108603: 75 1f jne 108624 <== ALWAYS TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 108605: 31 f6 xor %esi,%esi 108607: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 10860e: 0f 85 10 01 00 00 jne 108724 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 108614: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108617: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10861d: e8 ae 20 00 00 call 10a6d0 <== NOT EXECUTED 108622: eb c9 jmp 1085ed <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 108624: 9c pushf 108625: fa cli 108626: 58 pop %eax len = tty->t_dqlen; 108627: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 10862d: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 108634: 00 00 00 rtems_interrupt_enable(level); 108637: 50 push %eax 108638: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 108639: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10863f: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 108645: 8d 04 01 lea (%ecx,%eax,1),%eax 108648: 31 d2 xor %edx,%edx 10864a: f7 f6 div %esi 10864c: 89 d7 mov %edx,%edi tty->rawOutBuf.Tail = newTail; 10864e: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 108654: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10865b: 75 11 jne 10866e /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10865d: 83 ec 0c sub $0xc,%esp 108660: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108666: e8 65 20 00 00 call 10a6d0 10866b: 83 c4 10 add $0x10,%esp } if (newTail == tty->rawOutBuf.Head) { 10866e: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108674: 39 c7 cmp %eax,%edi 108676: 75 2a jne 1086a2 /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 108678: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10867f: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 108682: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 108688: 31 f6 xor %esi,%esi 10868a: 85 c0 test %eax,%eax 10868c: 0f 84 8c 00 00 00 je 10871e <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 108692: 52 push %edx <== NOT EXECUTED 108693: 52 push %edx <== NOT EXECUTED 108694: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 10869a: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10869d: 52 push %edx <== NOT EXECUTED 10869e: ff d0 call *%eax <== NOT EXECUTED 1086a0: eb 79 jmp 10871b <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 1086a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1086a8: 25 10 02 00 00 and $0x210,%eax 1086ad: 3d 10 02 00 00 cmp $0x210,%eax 1086b2: 75 22 jne 1086d6 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 1086b4: 9c pushf <== NOT EXECUTED 1086b5: fa cli <== NOT EXECUTED 1086b6: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 1086b7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1086bd: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1086c0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1086c6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1086cd: 00 00 00 rtems_interrupt_enable(level); 1086d0: 52 push %edx <== NOT EXECUTED 1086d1: 9d popf <== NOT EXECUTED 1086d2: 31 f6 xor %esi,%esi <== NOT EXECUTED 1086d4: eb 48 jmp 10871e <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1086d6: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1086dc: 39 c7 cmp %eax,%edi 1086de: 76 08 jbe 1086e8 nToSend = tty->rawOutBuf.Size - newTail; 1086e0: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 1086e6: eb 06 jmp 1086ee else nToSend = tty->rawOutBuf.Head - newTail; 1086e8: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi 1086ee: 29 fe sub %edi,%esi /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 1086f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1086f6: f6 c4 06 test $0x6,%ah 1086f9: 74 05 je 108700 <== ALWAYS TAKEN 1086fb: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 108700: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108707: 00 00 00 (*tty->device.write)(tty->minor, 10870a: 50 push %eax 10870b: 56 push %esi 10870c: 8b 43 7c mov 0x7c(%ebx),%eax 10870f: 01 f8 add %edi,%eax 108711: 50 push %eax 108712: ff 73 10 pushl 0x10(%ebx) 108715: ff 93 a4 00 00 00 call *0xa4(%ebx) 10871b: 83 c4 10 add $0x10,%esp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 10871e: 89 bb 84 00 00 00 mov %edi,0x84(%ebx) } return nToSend; } 108724: 89 f0 mov %esi,%eax 108726: 8d 65 f4 lea -0xc(%ebp),%esp 108729: 5b pop %ebx 10872a: 5e pop %esi 10872b: 5f pop %edi 10872c: c9 leave 10872d: c3 ret =============================================================================== 00109cbb : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 109cbb: 55 push %ebp <== NOT EXECUTED 109cbc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109cbe: 57 push %edi <== NOT EXECUTED 109cbf: 56 push %esi <== NOT EXECUTED 109cc0: 53 push %ebx <== NOT EXECUTED 109cc1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109cc4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 109cc7: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 109cca: 8d 75 e7 lea -0x19(%ebp),%esi <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 109ccd: 57 push %edi <== NOT EXECUTED 109cce: 6a 00 push $0x0 <== NOT EXECUTED 109cd0: 6a 02 push $0x2 <== NOT EXECUTED 109cd2: 6a 03 push $0x3 <== NOT EXECUTED 109cd4: e8 3f 03 00 00 call 10a018 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 109cd9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109cdc: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 109ce0: 74 16 je 109cf8 <== NOT EXECUTED tty->rxTaskId = 0; 109ce2: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 109ce9: 00 00 00 rtems_task_delete(RTEMS_SELF); 109cec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cef: 6a 00 push $0x0 <== NOT EXECUTED 109cf1: e8 9a 0b 00 00 call 10a890 <== NOT EXECUTED 109cf6: eb 21 jmp 109d19 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 109cf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cfb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109cfe: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 109d04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109d07: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 109d0a: 74 c1 je 109ccd <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 109d0c: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 109d0f: 50 push %eax <== NOT EXECUTED 109d10: 6a 01 push $0x1 <== NOT EXECUTED 109d12: 56 push %esi <== NOT EXECUTED 109d13: 53 push %ebx <== NOT EXECUTED 109d14: e8 7a ea ff ff call 108793 <== NOT EXECUTED 109d19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109d1c: eb af jmp 109ccd <== NOT EXECUTED =============================================================================== 0010854b : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 10854b: 55 push %ebp <== NOT EXECUTED 10854c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10854e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 108551: 6a 02 push $0x2 <== NOT EXECUTED 108553: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108556: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 10855c: e8 17 1c 00 00 call 10a178 <== NOT EXECUTED 108561: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108564: c9 leave <== NOT EXECUTED 108565: c3 ret <== NOT EXECUTED =============================================================================== 00109c58 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 109c58: 55 push %ebp <== NOT EXECUTED 109c59: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109c5b: 56 push %esi <== NOT EXECUTED 109c5c: 53 push %ebx <== NOT EXECUTED 109c5d: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 109c60: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 109c63: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 109c66: 56 push %esi <== NOT EXECUTED 109c67: 6a 00 push $0x0 <== NOT EXECUTED 109c69: 6a 02 push $0x2 <== NOT EXECUTED 109c6b: 6a 03 push $0x3 <== NOT EXECUTED 109c6d: e8 a6 03 00 00 call 10a018 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 109c72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109c75: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 109c79: 74 16 je 109c91 <== NOT EXECUTED tty->txTaskId = 0; 109c7b: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 109c82: 00 00 00 rtems_task_delete(RTEMS_SELF); 109c85: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c88: 6a 00 push $0x0 <== NOT EXECUTED 109c8a: e8 01 0c 00 00 call 10a890 <== NOT EXECUTED 109c8f: eb 25 jmp 109cb6 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109c91: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 109c97: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 109c9a: 8b 80 c4 5d 12 00 mov 0x125dc4(%eax),%eax <== NOT EXECUTED 109ca0: 85 c0 test %eax,%eax <== NOT EXECUTED 109ca2: 74 09 je 109cad <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 109ca4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109ca7: 53 push %ebx <== NOT EXECUTED 109ca8: ff d0 call *%eax <== NOT EXECUTED 109caa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 109cad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cb0: 53 push %ebx <== NOT EXECUTED 109cb1: e8 b0 e8 ff ff call 108566 <== NOT EXECUTED 109cb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109cb9: eb ab jmp 109c66 <== NOT EXECUTED =============================================================================== 00108f93 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 108f93: 55 push %ebp 108f94: 89 e5 mov %esp,%ebp 108f96: 57 push %edi 108f97: 56 push %esi 108f98: 53 push %ebx 108f99: 83 ec 20 sub $0x20,%esp 108f9c: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108f9f: 8b 03 mov (%ebx),%eax 108fa1: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108fa4: 6a 00 push $0x0 108fa6: 6a 00 push $0x0 108fa8: ff 76 18 pushl 0x18(%esi) 108fab: e8 34 16 00 00 call 10a5e4 108fb0: 89 c7 mov %eax,%edi if (sc != RTEMS_SUCCESSFUL) 108fb2: 83 c4 10 add $0x10,%esp 108fb5: 85 c0 test %eax,%eax 108fb7: 75 77 jne 109030 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 108fb9: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 108fbf: c1 e0 05 shl $0x5,%eax 108fc2: 8b 80 bc 5d 12 00 mov 0x125dbc(%eax),%eax 108fc8: 85 c0 test %eax,%eax 108fca: 74 0b je 108fd7 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 108fcc: 57 push %edi <== NOT EXECUTED 108fcd: 57 push %edi <== NOT EXECUTED 108fce: 53 push %ebx <== NOT EXECUTED 108fcf: 56 push %esi <== NOT EXECUTED 108fd0: ff d0 call *%eax <== NOT EXECUTED 108fd2: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 108fd4: 5b pop %ebx <== NOT EXECUTED 108fd5: eb 4e jmp 109025 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 108fd7: f6 46 34 01 testb $0x1,0x34(%esi) 108fdb: 74 2f je 10900c <== NEVER TAKEN uint32_t count = args->count; 108fdd: 8b 4b 10 mov 0x10(%ebx),%ecx char *buffer = args->buffer; 108fe0: 8b 43 0c mov 0xc(%ebx),%eax 108fe3: 89 45 e4 mov %eax,-0x1c(%ebp) while (count--) 108fe6: eb 18 jmp 109000 oproc (*buffer++, tty); 108fe8: 8b 55 e4 mov -0x1c(%ebp),%edx 108feb: 0f b6 02 movzbl (%edx),%eax 108fee: 42 inc %edx 108fef: 89 55 e4 mov %edx,-0x1c(%ebp) 108ff2: 89 f2 mov %esi,%edx 108ff4: 89 4d e0 mov %ecx,-0x20(%ebp) 108ff7: e8 3d fb ff ff call 108b39 108ffc: 8b 4d e0 mov -0x20(%ebp),%ecx 108fff: 49 dec %ecx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109000: 85 c9 test %ecx,%ecx 109002: 75 e4 jne 108fe8 oproc (*buffer++, tty); args->bytes_moved = args->count; 109004: 8b 43 10 mov 0x10(%ebx),%eax 109007: 89 43 18 mov %eax,0x18(%ebx) 10900a: eb 16 jmp 109022 } else { rtems_termios_puts (args->buffer, args->count, tty); 10900c: 51 push %ecx <== NOT EXECUTED 10900d: 56 push %esi <== NOT EXECUTED 10900e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109011: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 109014: e8 00 fa ff ff call 108a19 <== NOT EXECUTED args->bytes_moved = args->count; 109019: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10901c: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 10901f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 109022: 83 ec 0c sub $0xc,%esp 109025: ff 76 18 pushl 0x18(%esi) 109028: e8 a3 16 00 00 call 10a6d0 return sc; 10902d: 83 c4 10 add $0x10,%esp } 109030: 89 f8 mov %edi,%eax 109032: 8d 65 f4 lea -0xc(%ebp),%esp 109035: 5b pop %ebx 109036: 5e pop %esi 109037: 5f pop %edi 109038: c9 leave 109039: c3 ret =============================================================================== 00116af8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116af8: 55 push %ebp 116af9: 89 e5 mov %esp,%ebp 116afb: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116afe: 8d 45 f4 lea -0xc(%ebp),%eax 116b01: 50 push %eax 116b02: ff 75 08 pushl 0x8(%ebp) 116b05: 68 68 ff 13 00 push $0x13ff68 116b0a: e8 71 25 00 00 call 119080 <_Objects_Get> 116b0f: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116b11: 83 c4 10 add $0x10,%esp 116b14: b8 04 00 00 00 mov $0x4,%eax 116b19: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116b1d: 75 1c jne 116b3b case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116b1f: 83 7a 38 04 cmpl $0x4,0x38(%edx) 116b23: 74 0f je 116b34 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 116b25: 83 ec 0c sub $0xc,%esp 116b28: 83 c2 10 add $0x10,%edx 116b2b: 52 push %edx 116b2c: e8 2b 40 00 00 call 11ab5c <_Watchdog_Remove> 116b31: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 116b34: e8 ac 2d 00 00 call 1198e5 <_Thread_Enable_dispatch> 116b39: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b3b: c9 leave 116b3c: c3 ret =============================================================================== 00116f60 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116f60: 55 push %ebp 116f61: 89 e5 mov %esp,%ebp 116f63: 57 push %edi 116f64: 56 push %esi 116f65: 53 push %ebx 116f66: 83 ec 1c sub $0x1c,%esp 116f69: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116f6c: 8b 35 a8 ff 13 00 mov 0x13ffa8,%esi if ( !timer_server ) 116f72: b8 0e 00 00 00 mov $0xe,%eax 116f77: 85 f6 test %esi,%esi 116f79: 0f 84 b4 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116f7f: b0 0b mov $0xb,%al 116f81: 80 3d f0 f5 13 00 00 cmpb $0x0,0x13f5f0 116f88: 0f 84 a5 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116f8e: b0 09 mov $0x9,%al 116f90: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 116f94: 0f 84 99 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116f9a: 83 ec 0c sub $0xc,%esp 116f9d: 53 push %ebx 116f9e: e8 61 d6 ff ff call 114604 <_TOD_Validate> 116fa3: 83 c4 10 add $0x10,%esp 116fa6: 84 c0 test %al,%al 116fa8: 0f 84 80 00 00 00 je 11702e <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116fae: 83 ec 0c sub $0xc,%esp 116fb1: 53 push %ebx 116fb2: e8 e5 d5 ff ff call 11459c <_TOD_To_seconds> 116fb7: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116fb9: 83 c4 10 add $0x10,%esp 116fbc: 3b 05 6c f6 13 00 cmp 0x13f66c,%eax 116fc2: 76 6a jbe 11702e <== NEVER TAKEN 116fc4: 51 push %ecx 116fc5: 8d 45 e4 lea -0x1c(%ebp),%eax 116fc8: 50 push %eax 116fc9: ff 75 08 pushl 0x8(%ebp) 116fcc: 68 68 ff 13 00 push $0x13ff68 116fd1: e8 aa 20 00 00 call 119080 <_Objects_Get> 116fd6: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116fd8: 83 c4 10 add $0x10,%esp 116fdb: b8 04 00 00 00 mov $0x4,%eax 116fe0: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116fe4: 75 4d jne 117033 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116fe6: 83 ec 0c sub $0xc,%esp 116fe9: 8d 43 10 lea 0x10(%ebx),%eax 116fec: 50 push %eax 116fed: e8 6a 3b 00 00 call 11ab5c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116ff2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116ff9: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 117000: 8b 45 10 mov 0x10(%ebp),%eax 117003: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 117006: 8b 45 08 mov 0x8(%ebp),%eax 117009: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11700c: 8b 45 14 mov 0x14(%ebp),%eax 11700f: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 117012: 2b 3d 6c f6 13 00 sub 0x13f66c,%edi 117018: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11701b: 58 pop %eax 11701c: 5a pop %edx 11701d: 53 push %ebx 11701e: 56 push %esi 11701f: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 117022: e8 be 28 00 00 call 1198e5 <_Thread_Enable_dispatch> 117027: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117029: 83 c4 10 add $0x10,%esp 11702c: eb 05 jmp 117033 11702e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117033: 8d 65 f4 lea -0xc(%ebp),%esp 117036: 5b pop %ebx 117037: 5e pop %esi 117038: 5f pop %edi 117039: c9 leave 11703a: c3 ret =============================================================================== 0010b531 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10b531: 55 push %ebp <== NOT EXECUTED 10b532: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b534: 57 push %edi <== NOT EXECUTED 10b535: 56 push %esi <== NOT EXECUTED 10b536: 53 push %ebx <== NOT EXECUTED 10b537: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b53a: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10b53c: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 10b53f: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10b542: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10b547: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10b54a: 74 2a je 10b576 <== NOT EXECUTED { if (rtems_panic_in_progress++) 10b54c: a1 10 c2 12 00 mov 0x12c210,%eax <== NOT EXECUTED 10b551: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10b554: 89 15 10 c2 12 00 mov %edx,0x12c210 <== NOT EXECUTED 10b55a: 85 c0 test %eax,%eax <== NOT EXECUTED 10b55c: 74 0b je 10b569 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b55e: a1 64 c3 12 00 mov 0x12c364,%eax <== NOT EXECUTED 10b563: 40 inc %eax <== NOT EXECUTED 10b564: a3 64 c3 12 00 mov %eax,0x12c364 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b569: 83 3d 10 c2 12 00 02 cmpl $0x2,0x12c210 <== NOT EXECUTED 10b570: 0f 8f 1b 01 00 00 jg 10b691 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10b576: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b579: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b57e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10b581: e8 ee bf 00 00 call 117574 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10b586: 89 df mov %ebx,%edi <== NOT EXECUTED 10b588: 81 e7 ff ff ff 8f and $0x8fffffff,%edi <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b58e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b591: 31 f6 xor %esi,%esi <== NOT EXECUTED 10b593: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10b599: 74 07 je 10b5a2 <== NOT EXECUTED local_errno = errno; 10b59b: e8 58 bc 00 00 call 1171f8 <__errno> <== NOT EXECUTED 10b5a0: 8b 30 mov (%eax),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10b5a2: 52 push %edx <== NOT EXECUTED 10b5a3: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED 10b5a6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b5a9: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b5ae: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5b1: e8 7a 1b 01 00 call 11d130 <== NOT EXECUTED 10b5b6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (status) 10b5b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5bc: 85 ff test %edi,%edi <== NOT EXECUTED 10b5be: 74 25 je 10b5e5 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10b5c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b5c3: 57 push %edi <== NOT EXECUTED 10b5c4: e8 53 ff ff ff call 10b51c <== NOT EXECUTED 10b5c9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b5cc: 50 push %eax <== NOT EXECUTED 10b5cd: 68 93 50 12 00 push $0x125093 <== NOT EXECUTED 10b5d2: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b5d7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b5da: e8 dd c2 00 00 call 1178bc <== NOT EXECUTED 10b5df: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b5e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (local_errno) 10b5e5: 83 fe 00 cmp $0x0,%esi <== NOT EXECUTED 10b5e8: 74 41 je 10b62b <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10b5ea: 7e 25 jle 10b611 <== NOT EXECUTED 10b5ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b5ef: 56 push %esi <== NOT EXECUTED 10b5f0: e8 97 ca 00 00 call 11808c <== NOT EXECUTED 10b5f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5f8: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10b5fb: 74 14 je 10b611 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10b5fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b600: 56 push %esi <== NOT EXECUTED 10b601: e8 86 ca 00 00 call 11808c <== NOT EXECUTED 10b606: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b609: 50 push %eax <== NOT EXECUTED 10b60a: 68 a1 50 12 00 push $0x1250a1 <== NOT EXECUTED 10b60f: eb 07 jmp 10b618 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10b611: 50 push %eax <== NOT EXECUTED 10b612: 56 push %esi <== NOT EXECUTED 10b613: 68 ae 50 12 00 push $0x1250ae <== NOT EXECUTED 10b618: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b61d: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b620: e8 97 c2 00 00 call 1178bc <== NOT EXECUTED 10b625: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED 10b628: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10b62b: 57 push %edi <== NOT EXECUTED 10b62c: 57 push %edi <== NOT EXECUTED 10b62d: 68 ac 57 12 00 push $0x1257ac <== NOT EXECUTED 10b632: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b637: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b63a: e8 7d c2 00 00 call 1178bc <== NOT EXECUTED 10b63f: 89 c7 mov %eax,%edi <== NOT EXECUTED (void) fflush(stderr); 10b641: 59 pop %ecx <== NOT EXECUTED 10b642: a1 a0 a0 12 00 mov 0x12a0a0,%eax <== NOT EXECUTED 10b647: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10b64a: e8 25 bf 00 00 call 117574 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10b64f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b652: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10b658: 75 08 jne 10b662 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 10b65a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10b65d: 8d 04 17 lea (%edi,%edx,1),%eax <== NOT EXECUTED 10b660: eb 31 jmp 10b693 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 10b662: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 10b666: 74 16 je 10b67e <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10b668: 52 push %edx <== NOT EXECUTED 10b669: 52 push %edx <== NOT EXECUTED 10b66a: 68 c2 50 12 00 push $0x1250c2 <== NOT EXECUTED 10b66f: 6a 00 push $0x0 <== NOT EXECUTED 10b671: e8 3d 00 00 00 call 10b6b3 <== NOT EXECUTED _exit(local_errno); 10b676: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10b679: e8 6e 09 00 00 call 10bfec <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 10b67e: 50 push %eax <== NOT EXECUTED 10b67f: 50 push %eax <== NOT EXECUTED 10b680: 68 d7 50 12 00 push $0x1250d7 <== NOT EXECUTED 10b685: 6a 00 push $0x0 <== NOT EXECUTED 10b687: e8 27 00 00 00 call 10b6b3 <== NOT EXECUTED abort(); 10b68c: e8 33 bb 00 00 call 1171c4 <== NOT EXECUTED 10b691: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10b693: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b696: 5b pop %ebx <== NOT EXECUTED 10b697: 5e pop %esi <== NOT EXECUTED 10b698: 5f pop %edi <== NOT EXECUTED 10b699: c9 leave <== NOT EXECUTED 10b69a: c3 ret <== NOT EXECUTED =============================================================================== 0010786e : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 10786e: 55 push %ebp 10786f: 89 e5 mov %esp,%ebp 107871: 57 push %edi 107872: 56 push %esi 107873: 53 push %ebx 107874: 83 ec 3c sub $0x3c,%esp 107877: 89 c3 mov %eax,%ebx 107879: 89 55 e0 mov %edx,-0x20(%ebp) 10787c: 31 f6 xor %esi,%esi 10787e: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 107885: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 107887: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 10788a: 8b 43 04 mov 0x4(%ebx),%eax 10788d: 48 dec %eax 10788e: 89 43 04 mov %eax,0x4(%ebx) 107891: 85 c0 test %eax,%eax 107893: 79 15 jns 1078aa <== ALWAYS TAKEN 107895: 50 push %eax <== NOT EXECUTED 107896: 50 push %eax <== NOT EXECUTED 107897: 53 push %ebx <== NOT EXECUTED 107898: ff 35 40 50 12 00 pushl 0x125040 <== NOT EXECUTED 10789e: e8 c5 d3 00 00 call 114c68 <__srget_r> <== NOT EXECUTED 1078a3: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1078a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1078a8: eb 08 jmp 1078b2 <== NOT EXECUTED 1078aa: 8b 03 mov (%ebx),%eax 1078ac: 0f b6 08 movzbl (%eax),%ecx 1078af: 40 inc %eax 1078b0: 89 03 mov %eax,(%ebx) if (c == ':') 1078b2: 83 f9 3a cmp $0x3a,%ecx 1078b5: 74 4a je 107901 break; if (sign == 0) { 1078b7: 85 f6 test %esi,%esi 1078b9: 75 11 jne 1078cc <== NEVER TAKEN if (c == '-') { sign = -1; limit++; continue; 1078bb: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 1078bf: 83 f9 2d cmp $0x2d,%ecx 1078c2: 75 08 jne 1078cc <== ALWAYS TAKEN sign = -1; limit++; 1078c4: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 1078c7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED continue; 1078ca: eb be jmp 10788a <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 1078cc: a1 20 50 12 00 mov 0x125020,%eax 1078d1: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1078d6: 74 3f je 107917 <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 1078d8: 8b 45 e4 mov -0x1c(%ebp),%eax 1078db: bf 0a 00 00 00 mov $0xa,%edi 1078e0: 31 d2 xor %edx,%edx 1078e2: f7 f7 div %edi 1078e4: 89 55 d4 mov %edx,-0x2c(%ebp) 1078e7: 39 45 c4 cmp %eax,-0x3c(%ebp) 1078ea: 77 2b ja 107917 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1078ec: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 1078ef: 39 45 c4 cmp %eax,-0x3c(%ebp) 1078f2: 75 04 jne 1078f8 <== ALWAYS TAKEN 1078f4: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1078f6: 77 1f ja 107917 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1078f8: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 1078fc: 8d 3c 39 lea (%ecx,%edi,1),%edi 1078ff: eb 86 jmp 107887 107901: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) 107904: 85 f6 test %esi,%esi 107906: 74 0f je 107917 <== NEVER TAKEN return 0; *val = i * sign; 107908: 0f af f7 imul %edi,%esi 10790b: 8b 45 e0 mov -0x20(%ebp),%eax 10790e: 89 30 mov %esi,(%eax) 107910: b8 01 00 00 00 mov $0x1,%eax return 1; 107915: eb 02 jmp 107919 107917: 31 c0 xor %eax,%eax } 107919: 8d 65 f4 lea -0xc(%ebp),%esp 10791c: 5b pop %ebx 10791d: 5e pop %esi 10791e: 5f pop %edi 10791f: c9 leave 107920: c3 ret =============================================================================== 00107921 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 107921: 55 push %ebp 107922: 89 e5 mov %esp,%ebp 107924: 57 push %edi 107925: 56 push %esi 107926: 53 push %ebx 107927: 83 ec 1c sub $0x1c,%esp 10792a: 89 c3 mov %eax,%ebx 10792c: 89 ce mov %ecx,%esi 10792e: 8b 7d 08 mov 0x8(%ebp),%edi 107931: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 107934: 8b 06 mov (%esi),%eax 107936: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 107938: 8b 43 04 mov 0x4(%ebx),%eax 10793b: 48 dec %eax 10793c: 89 43 04 mov %eax,0x4(%ebx) 10793f: 85 c0 test %eax,%eax 107941: 79 19 jns 10795c 107943: 52 push %edx 107944: 52 push %edx 107945: 53 push %ebx 107946: ff 35 40 50 12 00 pushl 0x125040 10794c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10794f: e8 14 d3 00 00 call 114c68 <__srget_r> 107954: 83 c4 10 add $0x10,%esp 107957: 8b 4d e4 mov -0x1c(%ebp),%ecx 10795a: eb 08 jmp 107964 10795c: 8b 13 mov (%ebx),%edx 10795e: 0f b6 02 movzbl (%edx),%eax 107961: 42 inc %edx 107962: 89 13 mov %edx,(%ebx) if (c == ':') { 107964: 83 f8 3a cmp $0x3a,%eax 107967: 75 06 jne 10796f if (nlFlag) 107969: 85 c9 test %ecx,%ecx 10796b: 74 21 je 10798e <== ALWAYS TAKEN 10796d: eb 2f jmp 10799e <== NOT EXECUTED return 0; break; } if (c == '\n') { 10796f: 83 f8 0a cmp $0xa,%eax 107972: 75 06 jne 10797a if (!nlFlag) 107974: 85 c9 test %ecx,%ecx 107976: 75 16 jne 10798e <== ALWAYS TAKEN 107978: eb 24 jmp 10799e <== NOT EXECUTED return 0; break; } if (c == EOF) 10797a: 83 f8 ff cmp $0xffffffff,%eax 10797d: 74 1f je 10799e <== NEVER TAKEN return 0; if (*nleft < 2) 10797f: 83 3f 01 cmpl $0x1,(%edi) 107982: 76 1a jbe 10799e <== NEVER TAKEN return 0; **bufp = c; 107984: 8b 16 mov (%esi),%edx 107986: 88 02 mov %al,(%edx) ++(*bufp); 107988: ff 06 incl (%esi) --(*nleft); 10798a: ff 0f decl (%edi) } 10798c: eb aa jmp 107938 **bufp = '\0'; 10798e: 8b 06 mov (%esi),%eax 107990: c6 00 00 movb $0x0,(%eax) ++(*bufp); 107993: ff 06 incl (%esi) --(*nleft); 107995: ff 0f decl (%edi) 107997: b8 01 00 00 00 mov $0x1,%eax return 1; 10799c: eb 02 jmp 1079a0 10799e: 31 c0 xor %eax,%eax } 1079a0: 8d 65 f4 lea -0xc(%ebp),%esp 1079a3: 5b pop %ebx 1079a4: 5e pop %esi 1079a5: 5f pop %edi 1079a6: c9 leave 1079a7: c3 ret =============================================================================== 001079a8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1079a8: 55 push %ebp 1079a9: 89 e5 mov %esp,%ebp 1079ab: 57 push %edi 1079ac: 56 push %esi 1079ad: 53 push %ebx 1079ae: 83 ec 34 sub $0x34,%esp 1079b1: 89 c6 mov %eax,%esi 1079b3: 89 d3 mov %edx,%ebx 1079b5: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079b8: 8d 7d d4 lea -0x2c(%ebp),%edi 1079bb: 6a 00 push $0x0 1079bd: 8d 45 08 lea 0x8(%ebp),%eax 1079c0: 50 push %eax 1079c1: 89 f9 mov %edi,%ecx 1079c3: 89 f0 mov %esi,%eax 1079c5: e8 57 ff ff ff call 107921 1079ca: 83 c4 10 add $0x10,%esp 1079cd: 85 c0 test %eax,%eax 1079cf: 0f 84 c8 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 1079d5: 50 push %eax 1079d6: 50 push %eax 1079d7: 8d 53 04 lea 0x4(%ebx),%edx 1079da: 6a 00 push $0x0 1079dc: 8d 45 08 lea 0x8(%ebp),%eax 1079df: 50 push %eax 1079e0: 89 f9 mov %edi,%ecx 1079e2: 89 f0 mov %esi,%eax 1079e4: e8 38 ff ff ff call 107921 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079e9: 83 c4 10 add $0x10,%esp 1079ec: 85 c0 test %eax,%eax 1079ee: 0f 84 a9 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 1079f4: 8d 55 e4 lea -0x1c(%ebp),%edx 1079f7: 89 f0 mov %esi,%eax 1079f9: e8 70 fe ff ff call 10786e { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1079fe: 85 c0 test %eax,%eax 107a00: 0f 84 97 00 00 00 je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 107a06: 51 push %ecx 107a07: 51 push %ecx 107a08: 8d 55 e0 lea -0x20(%ebp),%edx 107a0b: 6a 01 push $0x1 107a0d: 8d 45 08 lea 0x8(%ebp),%eax 107a10: 50 push %eax 107a11: 89 f9 mov %edi,%ecx 107a13: 89 f0 mov %esi,%eax 107a15: e8 07 ff ff ff call 107921 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a1a: 83 c4 10 add $0x10,%esp 107a1d: 85 c0 test %eax,%eax 107a1f: 74 7c je 107a9d <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 107a21: 8b 45 e4 mov -0x1c(%ebp),%eax 107a24: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a28: 8b 7d e0 mov -0x20(%ebp),%edi 107a2b: 89 fa mov %edi,%edx 107a2d: b8 01 00 00 00 mov $0x1,%eax 107a32: eb 12 jmp 107a46 if(*cp == ',') memcount++; 107a34: 80 7d d3 2c cmpb $0x2c,-0x2d(%ebp) 107a38: 0f 94 c1 sete %cl 107a3b: 89 ce mov %ecx,%esi 107a3d: 81 e6 ff 00 00 00 and $0xff,%esi 107a43: 01 f0 add %esi,%eax grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a45: 42 inc %edx 107a46: 8a 0a mov (%edx),%cl 107a48: 88 4d d3 mov %cl,-0x2d(%ebp) 107a4b: 84 c9 test %cl,%cl 107a4d: 75 e5 jne 107a34 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 107a4f: 8d 04 85 13 00 00 00 lea 0x13(,%eax,4),%eax 107a56: 39 45 08 cmp %eax,0x8(%ebp) 107a59: 72 42 jb 107a9d <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 107a5b: 8b 45 d4 mov -0x2c(%ebp),%eax 107a5e: 83 c0 0f add $0xf,%eax 107a61: 83 e0 f0 and $0xfffffff0,%eax 107a64: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 107a67: 89 38 mov %edi,(%eax) 107a69: 8b 45 e0 mov -0x20(%ebp),%eax 107a6c: 40 inc %eax 107a6d: ba 01 00 00 00 mov $0x1,%edx for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a72: eb 11 jmp 107a85 if(*cp == ',') { 107a74: 80 f9 2c cmp $0x2c,%cl 107a77: 75 0b jne 107a84 <== ALWAYS TAKEN *cp = '\0'; 107a79: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 107a7d: 8b 4b 0c mov 0xc(%ebx),%ecx <== NOT EXECUTED 107a80: 89 04 91 mov %eax,(%ecx,%edx,4) <== NOT EXECUTED 107a83: 42 inc %edx <== NOT EXECUTED 107a84: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107a85: 8a 48 ff mov -0x1(%eax),%cl 107a88: 84 c9 test %cl,%cl 107a8a: 75 e8 jne 107a74 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 107a8c: 8b 43 0c mov 0xc(%ebx),%eax 107a8f: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) 107a96: b8 01 00 00 00 mov $0x1,%eax return 1; 107a9b: eb 02 jmp 107a9f 107a9d: 31 c0 xor %eax,%eax } 107a9f: 8d 65 f4 lea -0xc(%ebp),%esp 107aa2: 5b pop %ebx 107aa3: 5e pop %esi 107aa4: 5f pop %edi 107aa5: c9 leave 107aa6: c3 ret =============================================================================== 00107adf : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 107adf: 55 push %ebp 107ae0: 89 e5 mov %esp,%ebp 107ae2: 57 push %edi 107ae3: 56 push %esi 107ae4: 53 push %ebx 107ae5: 83 ec 34 sub $0x34,%esp 107ae8: 89 c6 mov %eax,%esi 107aea: 89 d3 mov %edx,%ebx 107aec: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107aef: 8d 7d d4 lea -0x2c(%ebp),%edi 107af2: 6a 00 push $0x0 107af4: 8d 45 08 lea 0x8(%ebp),%eax 107af7: 50 push %eax 107af8: 89 f9 mov %edi,%ecx 107afa: 89 f0 mov %esi,%eax 107afc: e8 20 fe ff ff call 107921 107b01: 83 c4 10 add $0x10,%esp 107b04: 85 c0 test %eax,%eax 107b06: 0f 84 c4 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 107b0c: 51 push %ecx 107b0d: 51 push %ecx 107b0e: 8d 53 04 lea 0x4(%ebx),%edx 107b11: 6a 00 push $0x0 107b13: 8d 45 08 lea 0x8(%ebp),%eax 107b16: 50 push %eax 107b17: 89 f9 mov %edi,%ecx 107b19: 89 f0 mov %esi,%eax 107b1b: e8 01 fe ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b20: 83 c4 10 add $0x10,%esp 107b23: 85 c0 test %eax,%eax 107b25: 0f 84 a5 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 107b2b: 8d 55 e4 lea -0x1c(%ebp),%edx 107b2e: 89 f0 mov %esi,%eax 107b30: e8 39 fd ff ff call 10786e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b35: 85 c0 test %eax,%eax 107b37: 0f 84 93 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 107b3d: 8d 55 e0 lea -0x20(%ebp),%edx 107b40: 89 f0 mov %esi,%eax 107b42: e8 27 fd ff ff call 10786e size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b47: 85 c0 test %eax,%eax 107b49: 0f 84 81 00 00 00 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 107b4f: 52 push %edx 107b50: 52 push %edx 107b51: 8d 53 0c lea 0xc(%ebx),%edx 107b54: 6a 00 push $0x0 107b56: 8d 45 08 lea 0x8(%ebp),%eax 107b59: 50 push %eax 107b5a: 89 f9 mov %edi,%ecx 107b5c: 89 f0 mov %esi,%eax 107b5e: e8 be fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b63: 83 c4 10 add $0x10,%esp 107b66: 85 c0 test %eax,%eax 107b68: 74 66 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 107b6a: 50 push %eax 107b6b: 50 push %eax 107b6c: 8d 53 10 lea 0x10(%ebx),%edx 107b6f: 6a 00 push $0x0 107b71: 8d 45 08 lea 0x8(%ebp),%eax 107b74: 50 push %eax 107b75: 89 f9 mov %edi,%ecx 107b77: 89 f0 mov %esi,%eax 107b79: e8 a3 fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b7e: 83 c4 10 add $0x10,%esp 107b81: 85 c0 test %eax,%eax 107b83: 74 4b je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 107b85: 51 push %ecx 107b86: 51 push %ecx 107b87: 8d 53 14 lea 0x14(%ebx),%edx 107b8a: 6a 00 push $0x0 107b8c: 8d 45 08 lea 0x8(%ebp),%eax 107b8f: 50 push %eax 107b90: 89 f9 mov %edi,%ecx 107b92: 89 f0 mov %esi,%eax 107b94: e8 88 fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b99: 83 c4 10 add $0x10,%esp 107b9c: 85 c0 test %eax,%eax 107b9e: 74 30 je 107bd0 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 107ba0: 52 push %edx 107ba1: 52 push %edx 107ba2: 8d 53 18 lea 0x18(%ebx),%edx 107ba5: 6a 01 push $0x1 107ba7: 8d 45 08 lea 0x8(%ebp),%eax 107baa: 50 push %eax 107bab: 89 f9 mov %edi,%ecx 107bad: 89 f0 mov %esi,%eax 107baf: e8 6d fd ff ff call 107921 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107bb4: 83 c4 10 add $0x10,%esp 107bb7: 85 c0 test %eax,%eax 107bb9: 74 15 je 107bd0 <== NEVER TAKEN || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 107bbb: 8b 45 e4 mov -0x1c(%ebp),%eax 107bbe: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 107bc2: 8b 45 e0 mov -0x20(%ebp),%eax 107bc5: 66 89 43 0a mov %ax,0xa(%ebx) 107bc9: b8 01 00 00 00 mov $0x1,%eax return 1; 107bce: eb 02 jmp 107bd2 107bd0: 31 c0 xor %eax,%eax } 107bd2: 8d 65 f4 lea -0xc(%ebp),%esp 107bd5: 5b pop %ebx 107bd6: 5e pop %esi 107bd7: 5f pop %edi 107bd8: c9 leave 107bd9: c3 ret =============================================================================== 0010ad4c : #include int sched_get_priority_max( int policy ) { 10ad4c: 55 push %ebp 10ad4d: 89 e5 mov %esp,%ebp 10ad4f: 83 ec 08 sub $0x8,%esp 10ad52: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10ad55: 83 f9 04 cmp $0x4,%ecx 10ad58: 77 0b ja 10ad65 10ad5a: b8 01 00 00 00 mov $0x1,%eax 10ad5f: d3 e0 shl %cl,%eax 10ad61: a8 17 test $0x17,%al 10ad63: 75 10 jne 10ad75 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10ad65: e8 6a 88 00 00 call 1135d4 <__errno> 10ad6a: c7 00 16 00 00 00 movl $0x16,(%eax) 10ad70: 83 c8 ff or $0xffffffff,%eax 10ad73: eb 08 jmp 10ad7d } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10ad75: 0f b6 05 18 32 12 00 movzbl 0x123218,%eax 10ad7c: 48 dec %eax } 10ad7d: c9 leave 10ad7e: c3 ret =============================================================================== 0010ad80 : #include int sched_get_priority_min( int policy ) { 10ad80: 55 push %ebp 10ad81: 89 e5 mov %esp,%ebp 10ad83: 83 ec 08 sub $0x8,%esp 10ad86: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10ad89: 83 f9 04 cmp $0x4,%ecx 10ad8c: 77 11 ja 10ad9f 10ad8e: ba 01 00 00 00 mov $0x1,%edx 10ad93: d3 e2 shl %cl,%edx 10ad95: b8 01 00 00 00 mov $0x1,%eax 10ad9a: 80 e2 17 and $0x17,%dl 10ad9d: 75 0e jne 10adad <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10ad9f: e8 30 88 00 00 call 1135d4 <__errno> 10ada4: c7 00 16 00 00 00 movl $0x16,(%eax) 10adaa: 83 c8 ff or $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10adad: c9 leave 10adae: c3 ret =============================================================================== 0010adb0 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10adb0: 55 push %ebp 10adb1: 89 e5 mov %esp,%ebp 10adb3: 56 push %esi 10adb4: 53 push %ebx 10adb5: 8b 75 08 mov 0x8(%ebp),%esi 10adb8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10adbb: 85 f6 test %esi,%esi 10adbd: 74 16 je 10add5 <== NEVER TAKEN 10adbf: e8 a0 cf ff ff call 107d64 10adc4: 39 c6 cmp %eax,%esi 10adc6: 74 0d je 10add5 rtems_set_errno_and_return_minus_one( ESRCH ); 10adc8: e8 07 88 00 00 call 1135d4 <__errno> 10adcd: c7 00 03 00 00 00 movl $0x3,(%eax) 10add3: eb 0f jmp 10ade4 if ( !interval ) 10add5: 85 db test %ebx,%ebx 10add7: 75 10 jne 10ade9 rtems_set_errno_and_return_minus_one( EINVAL ); 10add9: e8 f6 87 00 00 call 1135d4 <__errno> 10adde: c7 00 16 00 00 00 movl $0x16,(%eax) 10ade4: 83 c8 ff or $0xffffffff,%eax 10ade7: eb 13 jmp 10adfc _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10ade9: 50 push %eax 10adea: 50 push %eax 10adeb: 53 push %ebx 10adec: ff 35 c4 71 12 00 pushl 0x1271c4 10adf2: e8 b5 2f 00 00 call 10ddac <_Timespec_From_ticks> 10adf7: 31 c0 xor %eax,%eax return 0; 10adf9: 83 c4 10 add $0x10,%esp } 10adfc: 8d 65 f8 lea -0x8(%ebp),%esp 10adff: 5b pop %ebx 10ae00: 5e pop %esi 10ae01: c9 leave 10ae02: c3 ret =============================================================================== 0010d430 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10d430: 55 push %ebp 10d431: 89 e5 mov %esp,%ebp 10d433: 57 push %edi 10d434: 56 push %esi 10d435: 53 push %ebx 10d436: 83 ec 2c sub $0x2c,%esp 10d439: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d43c: a1 f8 b3 12 00 mov 0x12b3f8,%eax 10d441: 40 inc %eax 10d442: a3 f8 b3 12 00 mov %eax,0x12b3f8 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10d447: 8b 45 0c mov 0xc(%ebp),%eax 10d44a: 25 00 02 00 00 and $0x200,%eax 10d44f: 89 45 d4 mov %eax,-0x2c(%ebp) 10d452: 75 04 jne 10d458 10d454: 31 ff xor %edi,%edi 10d456: eb 03 jmp 10d45b va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10d458: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10d45b: 52 push %edx 10d45c: 52 push %edx 10d45d: 8d 45 e4 lea -0x1c(%ebp),%eax 10d460: 50 push %eax 10d461: 56 push %esi 10d462: e8 79 5f 00 00 call 1133e0 <_POSIX_Semaphore_Name_to_id> 10d467: 89 c3 mov %eax,%ebx * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10d469: 83 c4 10 add $0x10,%esp 10d46c: 85 c0 test %eax,%eax 10d46e: 74 19 je 10d489 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10d470: 83 f8 02 cmp $0x2,%eax 10d473: 75 06 jne 10d47b <== NEVER TAKEN 10d475: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10d479: 75 59 jne 10d4d4 _Thread_Enable_dispatch(); 10d47b: e8 0d 25 00 00 call 10f98d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10d480: e8 df 93 00 00 call 116864 <__errno> 10d485: 89 18 mov %ebx,(%eax) 10d487: eb 1f jmp 10d4a8 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10d489: 8b 45 0c mov 0xc(%ebp),%eax 10d48c: 25 00 0a 00 00 and $0xa00,%eax 10d491: 3d 00 0a 00 00 cmp $0xa00,%eax 10d496: 75 15 jne 10d4ad _Thread_Enable_dispatch(); 10d498: e8 f0 24 00 00 call 10f98d <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10d49d: e8 c2 93 00 00 call 116864 <__errno> 10d4a2: c7 00 11 00 00 00 movl $0x11,(%eax) 10d4a8: 83 c8 ff or $0xffffffff,%eax 10d4ab: eb 4a jmp 10d4f7 10d4ad: 50 push %eax 10d4ae: 8d 45 dc lea -0x24(%ebp),%eax 10d4b1: 50 push %eax 10d4b2: ff 75 e4 pushl -0x1c(%ebp) 10d4b5: 68 e0 b6 12 00 push $0x12b6e0 10d4ba: e8 95 1c 00 00 call 10f154 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10d4bf: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10d4c2: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10d4c5: e8 c3 24 00 00 call 10f98d <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10d4ca: e8 be 24 00 00 call 10f98d <_Thread_Enable_dispatch> goto return_id; 10d4cf: 83 c4 10 add $0x10,%esp 10d4d2: eb 1d jmp 10d4f1 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 10d4d4: 8d 45 e0 lea -0x20(%ebp),%eax 10d4d7: 50 push %eax 10d4d8: 57 push %edi 10d4d9: 6a 00 push $0x0 10d4db: 56 push %esi 10d4dc: e8 cb 5d 00 00 call 1132ac <_POSIX_Semaphore_Create_support> 10d4e1: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10d4e3: e8 a5 24 00 00 call 10f98d <_Thread_Enable_dispatch> if ( status == -1 ) 10d4e8: 83 c4 10 add $0x10,%esp 10d4eb: 83 c8 ff or $0xffffffff,%eax 10d4ee: 43 inc %ebx 10d4ef: 74 06 je 10d4f7 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 10d4f1: 8b 45 e0 mov -0x20(%ebp),%eax 10d4f4: 83 c0 08 add $0x8,%eax #endif return id; } 10d4f7: 8d 65 f4 lea -0xc(%ebp),%esp 10d4fa: 5b pop %ebx 10d4fb: 5e pop %esi 10d4fc: 5f pop %edi 10d4fd: c9 leave 10d4fe: c3 ret =============================================================================== 00107ce3 : return NULL; return &grent; } void setgrent(void) { 107ce3: 55 push %ebp <== NOT EXECUTED 107ce4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107ce6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107ce9: e8 24 ff ff ff call 107c12 <== NOT EXECUTED if (group_fp != NULL) 107cee: a1 9c 6e 12 00 mov 0x126e9c,%eax <== NOT EXECUTED 107cf3: 85 c0 test %eax,%eax <== NOT EXECUTED 107cf5: 74 0c je 107d03 <== NOT EXECUTED fclose(group_fp); 107cf7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cfa: 50 push %eax <== NOT EXECUTED 107cfb: e8 3c b7 00 00 call 11343c <== NOT EXECUTED 107d00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 107d03: 52 push %edx <== NOT EXECUTED 107d04: 52 push %edx <== NOT EXECUTED 107d05: 68 53 01 12 00 push $0x120153 <== NOT EXECUTED 107d0a: 68 7b 14 12 00 push $0x12147b <== NOT EXECUTED 107d0f: e8 8c bd 00 00 call 113aa0 <== NOT EXECUTED 107d14: a3 9c 6e 12 00 mov %eax,0x126e9c <== NOT EXECUTED 107d19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107d1c: c9 leave <== NOT EXECUTED 107d1d: c3 ret <== NOT EXECUTED =============================================================================== 00107e87 : return NULL; return &pwent; } void setpwent(void) { 107e87: 55 push %ebp <== NOT EXECUTED 107e88: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e8a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 107e8d: e8 80 fd ff ff call 107c12 <== NOT EXECUTED if (passwd_fp != NULL) 107e92: a1 b4 6d 12 00 mov 0x126db4,%eax <== NOT EXECUTED 107e97: 85 c0 test %eax,%eax <== NOT EXECUTED 107e99: 74 0c je 107ea7 <== NOT EXECUTED fclose(passwd_fp); 107e9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e9e: 50 push %eax <== NOT EXECUTED 107e9f: e8 98 b5 00 00 call 11343c <== NOT EXECUTED 107ea4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 107ea7: 50 push %eax <== NOT EXECUTED 107ea8: 50 push %eax <== NOT EXECUTED 107ea9: 68 53 01 12 00 push $0x120153 <== NOT EXECUTED 107eae: 68 08 14 12 00 push $0x121408 <== NOT EXECUTED 107eb3: e8 e8 bb 00 00 call 113aa0 <== NOT EXECUTED 107eb8: a3 b4 6d 12 00 mov %eax,0x126db4 <== NOT EXECUTED 107ebd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107ec0: c9 leave <== NOT EXECUTED 107ec1: c3 ret <== NOT EXECUTED =============================================================================== 0010ac48 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10ac48: 55 push %ebp 10ac49: 89 e5 mov %esp,%ebp 10ac4b: 57 push %edi 10ac4c: 56 push %esi 10ac4d: 53 push %ebx 10ac4e: 83 ec 1c sub $0x1c,%esp 10ac51: 8b 5d 08 mov 0x8(%ebp),%ebx 10ac54: 8b 55 0c mov 0xc(%ebp),%edx 10ac57: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10ac5a: 85 c0 test %eax,%eax 10ac5c: 74 12 je 10ac70 *oact = _POSIX_signals_Vectors[ sig ]; 10ac5e: 6b f3 0c imul $0xc,%ebx,%esi 10ac61: 81 c6 a8 87 12 00 add $0x1287a8,%esi 10ac67: b9 03 00 00 00 mov $0x3,%ecx 10ac6c: 89 c7 mov %eax,%edi 10ac6e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10ac70: 85 db test %ebx,%ebx 10ac72: 74 0d je 10ac81 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10ac74: 8d 43 ff lea -0x1(%ebx),%eax 10ac77: 83 f8 1f cmp $0x1f,%eax 10ac7a: 77 05 ja 10ac81 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10ac7c: 83 fb 09 cmp $0x9,%ebx 10ac7f: 75 10 jne 10ac91 rtems_set_errno_and_return_minus_one( EINVAL ); 10ac81: e8 5e 8a 00 00 call 1136e4 <__errno> 10ac86: c7 00 16 00 00 00 movl $0x16,(%eax) 10ac8c: 83 c8 ff or $0xffffffff,%eax 10ac8f: eb 53 jmp 10ace4 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10ac91: 31 c0 xor %eax,%eax 10ac93: 85 d2 test %edx,%edx 10ac95: 74 4d je 10ace4 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10ac97: 9c pushf 10ac98: fa cli 10ac99: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10ac9c: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10aca0: 75 18 jne 10acba _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10aca2: 6b db 0c imul $0xc,%ebx,%ebx 10aca5: 8d bb a8 87 12 00 lea 0x1287a8(%ebx),%edi 10acab: 8d b3 38 22 12 00 lea 0x122238(%ebx),%esi 10acb1: b9 03 00 00 00 mov $0x3,%ecx 10acb6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10acb8: eb 24 jmp 10acde } else { _POSIX_signals_Clear_process_signals( sig ); 10acba: 83 ec 0c sub $0xc,%esp 10acbd: 53 push %ebx 10acbe: 89 55 e0 mov %edx,-0x20(%ebp) 10acc1: e8 26 57 00 00 call 1103ec <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10acc6: 6b db 0c imul $0xc,%ebx,%ebx 10acc9: 8d bb a8 87 12 00 lea 0x1287a8(%ebx),%edi 10accf: b9 03 00 00 00 mov $0x3,%ecx 10acd4: 8b 55 e0 mov -0x20(%ebp),%edx 10acd7: 89 d6 mov %edx,%esi 10acd9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10acdb: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10acde: ff 75 e4 pushl -0x1c(%ebp) 10ace1: 9d popf 10ace2: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10ace4: 8d 65 f4 lea -0xc(%ebp),%esp 10ace7: 5b pop %ebx 10ace8: 5e pop %esi 10ace9: 5f pop %edi 10acea: c9 leave 10aceb: c3 ret =============================================================================== 0010c9a4 : #include int sigsuspend( const sigset_t *sigmask ) { 10c9a4: 55 push %ebp 10c9a5: 89 e5 mov %esp,%ebp 10c9a7: 56 push %esi 10c9a8: 53 push %ebx 10c9a9: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10c9ac: 8d 5d f4 lea -0xc(%ebp),%ebx 10c9af: 53 push %ebx 10c9b0: ff 75 08 pushl 0x8(%ebp) 10c9b3: 6a 01 push $0x1 10c9b5: e8 c6 ff ff ff call 10c980 (void) sigfillset( &all_signals ); 10c9ba: 8d 75 f0 lea -0x10(%ebp),%esi 10c9bd: 89 34 24 mov %esi,(%esp) 10c9c0: e8 17 ff ff ff call 10c8dc status = sigtimedwait( &all_signals, NULL, NULL ); 10c9c5: 83 c4 0c add $0xc,%esp 10c9c8: 6a 00 push $0x0 10c9ca: 6a 00 push $0x0 10c9cc: 56 push %esi 10c9cd: e8 69 00 00 00 call 10ca3b 10c9d2: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10c9d4: 83 c4 0c add $0xc,%esp 10c9d7: 6a 00 push $0x0 10c9d9: 53 push %ebx 10c9da: 6a 00 push $0x0 10c9dc: e8 9f ff ff ff call 10c980 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10c9e1: 83 c4 10 add $0x10,%esp 10c9e4: 46 inc %esi 10c9e5: 74 0b je 10c9f2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 10c9e7: e8 08 88 00 00 call 1151f4 <__errno> 10c9ec: c7 00 04 00 00 00 movl $0x4,(%eax) return status; } 10c9f2: 83 c8 ff or $0xffffffff,%eax 10c9f5: 8d 65 f8 lea -0x8(%ebp),%esp 10c9f8: 5b pop %ebx 10c9f9: 5e pop %esi 10c9fa: c9 leave 10c9fb: c3 ret =============================================================================== 0010b00b : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10b00b: 55 push %ebp 10b00c: 89 e5 mov %esp,%ebp 10b00e: 57 push %edi 10b00f: 56 push %esi 10b010: 53 push %ebx 10b011: 83 ec 2c sub $0x2c,%esp 10b014: 8b 7d 08 mov 0x8(%ebp),%edi 10b017: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10b01a: 85 ff test %edi,%edi 10b01c: 74 24 je 10b042 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10b01e: 85 db test %ebx,%ebx 10b020: 74 33 je 10b055 if ( !_Timespec_Is_valid( timeout ) ) 10b022: 83 ec 0c sub $0xc,%esp 10b025: 53 push %ebx 10b026: e8 0d 30 00 00 call 10e038 <_Timespec_Is_valid> 10b02b: 83 c4 10 add $0x10,%esp 10b02e: 84 c0 test %al,%al 10b030: 74 10 je 10b042 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10b032: 83 ec 0c sub $0xc,%esp 10b035: 53 push %ebx 10b036: e8 55 30 00 00 call 10e090 <_Timespec_To_ticks> if ( !interval ) 10b03b: 83 c4 10 add $0x10,%esp 10b03e: 85 c0 test %eax,%eax 10b040: 75 15 jne 10b057 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10b042: e8 b1 89 00 00 call 1139f8 <__errno> 10b047: c7 00 16 00 00 00 movl $0x16,(%eax) 10b04d: 83 cf ff or $0xffffffff,%edi 10b050: e9 13 01 00 00 jmp 10b168 10b055: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10b057: 8b 5d 0c mov 0xc(%ebp),%ebx 10b05a: 85 db test %ebx,%ebx 10b05c: 75 03 jne 10b061 10b05e: 8d 5d dc lea -0x24(%ebp),%ebx the_thread = _Thread_Executing; 10b061: 8b 15 04 83 12 00 mov 0x128304,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b067: 8b b2 f8 00 00 00 mov 0xf8(%edx),%esi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10b06d: 9c pushf 10b06e: fa cli 10b06f: 8f 45 d4 popl -0x2c(%ebp) if ( *set & api->signals_pending ) { 10b072: 8b 0f mov (%edi),%ecx 10b074: 89 4d d0 mov %ecx,-0x30(%ebp) 10b077: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx 10b07d: 85 4d d0 test %ecx,-0x30(%ebp) 10b080: 74 32 je 10b0b4 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10b082: 83 ec 0c sub $0xc,%esp 10b085: 51 push %ecx 10b086: e8 41 ff ff ff call 10afcc <_POSIX_signals_Get_highest> 10b08b: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10b08d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b094: 6a 00 push $0x0 10b096: 53 push %ebx 10b097: 50 push %eax 10b098: 56 push %esi 10b099: e8 56 59 00 00 call 1109f4 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10b09e: ff 75 d4 pushl -0x2c(%ebp) 10b0a1: 9d popf the_info->si_code = SI_USER; 10b0a2: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10b0a9: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10b0b0: 8b 3b mov (%ebx),%edi 10b0b2: eb 3b jmp 10b0ef } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10b0b4: 8b 0d 9c 89 12 00 mov 0x12899c,%ecx 10b0ba: 85 4d d0 test %ecx,-0x30(%ebp) 10b0bd: 74 35 je 10b0f4 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10b0bf: 83 ec 0c sub $0xc,%esp 10b0c2: 51 push %ecx 10b0c3: e8 04 ff ff ff call 10afcc <_POSIX_signals_Get_highest> 10b0c8: 89 c7 mov %eax,%edi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10b0ca: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b0d1: 6a 01 push $0x1 10b0d3: 53 push %ebx 10b0d4: 50 push %eax 10b0d5: 56 push %esi 10b0d6: e8 19 59 00 00 call 1109f4 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10b0db: ff 75 d4 pushl -0x2c(%ebp) 10b0de: 9d popf the_info->si_signo = signo; 10b0df: 89 3b mov %edi,(%ebx) the_info->si_code = SI_USER; 10b0e1: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10b0e8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10b0ef: 83 c4 20 add $0x20,%esp 10b0f2: eb 74 jmp 10b168 } the_info->si_signo = -1; 10b0f4: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10b0fa: 8b 0d 48 82 12 00 mov 0x128248,%ecx 10b100: 41 inc %ecx 10b101: 89 0d 48 82 12 00 mov %ecx,0x128248 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10b107: c7 42 44 34 89 12 00 movl $0x128934,0x44(%edx) the_thread->Wait.return_code = EINTR; 10b10e: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10b115: 8b 0f mov (%edi),%ecx 10b117: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10b11a: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b11d: c7 05 64 89 12 00 01 movl $0x1,0x128964 10b124: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10b127: ff 75 d4 pushl -0x2c(%ebp) 10b12a: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10b12b: 52 push %edx 10b12c: 68 2c dc 10 00 push $0x10dc2c 10b131: 50 push %eax 10b132: 68 34 89 12 00 push $0x128934 10b137: e8 34 28 00 00 call 10d970 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b13c: e8 78 23 00 00 call 10d4b9 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 10b141: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b148: 6a 00 push $0x0 10b14a: 53 push %ebx 10b14b: ff 33 pushl (%ebx) 10b14d: 56 push %esi 10b14e: e8 a1 58 00 00 call 1109f4 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10b153: 83 c4 20 add $0x20,%esp 10b156: e8 9d 88 00 00 call 1139f8 <__errno> 10b15b: 8b 15 04 83 12 00 mov 0x128304,%edx 10b161: 8b 52 34 mov 0x34(%edx),%edx 10b164: 89 10 mov %edx,(%eax) return the_info->si_signo; 10b166: 8b 3b mov (%ebx),%edi } 10b168: 89 f8 mov %edi,%eax 10b16a: 8d 65 f4 lea -0xc(%ebp),%esp 10b16d: 5b pop %ebx 10b16e: 5e pop %esi 10b16f: 5f pop %edi 10b170: c9 leave 10b171: c3 ret =============================================================================== 0010cbbc : int sigwait( const sigset_t *set, int *sig ) { 10cbbc: 55 push %ebp 10cbbd: 89 e5 mov %esp,%ebp 10cbbf: 53 push %ebx 10cbc0: 83 ec 08 sub $0x8,%esp 10cbc3: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10cbc6: 6a 00 push $0x0 10cbc8: 6a 00 push $0x0 10cbca: ff 75 08 pushl 0x8(%ebp) 10cbcd: e8 69 fe ff ff call 10ca3b 10cbd2: 89 c2 mov %eax,%edx if ( status != -1 ) { 10cbd4: 83 c4 10 add $0x10,%esp 10cbd7: 83 f8 ff cmp $0xffffffff,%eax 10cbda: 74 0a je 10cbe6 if ( sig ) 10cbdc: 31 c0 xor %eax,%eax 10cbde: 85 db test %ebx,%ebx 10cbe0: 74 0b je 10cbed <== NEVER TAKEN *sig = status; 10cbe2: 89 13 mov %edx,(%ebx) 10cbe4: eb 07 jmp 10cbed return 0; } return errno; 10cbe6: e8 09 86 00 00 call 1151f4 <__errno> 10cbeb: 8b 00 mov (%eax),%eax } 10cbed: 8b 5d fc mov -0x4(%ebp),%ebx 10cbf0: c9 leave 10cbf1: c3 ret =============================================================================== 00108f41 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 108f41: 55 push %ebp <== NOT EXECUTED 108f42: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f44: 56 push %esi <== NOT EXECUTED 108f45: 53 push %ebx <== NOT EXECUTED 108f46: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108f48: 89 c6 mov %eax,%esi <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 108f4a: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 108f51: 74 30 je 108f83 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108f53: 52 push %edx <== NOT EXECUTED 108f54: 6a 00 push $0x0 <== NOT EXECUTED 108f56: 6a 00 push $0x0 <== NOT EXECUTED 108f58: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 108f5b: e8 84 16 00 00 call 10a5e4 <== NOT EXECUTED i = iproc (c, tty); 108f60: 89 f2 mov %esi,%edx <== NOT EXECUTED 108f62: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 108f65: 89 da mov %ebx,%edx <== NOT EXECUTED 108f67: e8 bc fe ff ff call 108e28 <== NOT EXECUTED 108f6c: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 108f6e: 58 pop %eax <== NOT EXECUTED 108f6f: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 108f72: e8 59 17 00 00 call 10a6d0 <== NOT EXECUTED 108f77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 108f7a: 89 f0 mov %esi,%eax <== NOT EXECUTED 108f7c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108f7f: 5b pop %ebx <== NOT EXECUTED 108f80: 5e pop %esi <== NOT EXECUTED 108f81: c9 leave <== NOT EXECUTED 108f82: c3 ret <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108f83: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108f86: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 108f88: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108f8b: 5b pop %ebx <== NOT EXECUTED 108f8c: 5e pop %esi <== NOT EXECUTED 108f8d: c9 leave <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108f8e: e9 95 fe ff ff jmp 108e28 <== NOT EXECUTED =============================================================================== 001092a8 : int _STAT_NAME( const char *path, struct stat *buf ) { 1092a8: 55 push %ebp 1092a9: 89 e5 mov %esp,%ebp 1092ab: 57 push %edi 1092ac: 56 push %esi 1092ad: 53 push %ebx 1092ae: 83 ec 2c sub $0x2c,%esp 1092b1: 8b 55 08 mov 0x8(%ebp),%edx 1092b4: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1092b7: 85 f6 test %esi,%esi 1092b9: 75 0d jne 1092c8 rtems_set_errno_and_return_minus_one( EFAULT ); 1092bb: e8 0c a6 00 00 call 1138cc <__errno> 1092c0: c7 00 0e 00 00 00 movl $0xe,(%eax) 1092c6: eb 53 jmp 10931b status = rtems_filesystem_evaluate_path( path, strlen( path ), 1092c8: 31 c0 xor %eax,%eax 1092ca: 83 c9 ff or $0xffffffff,%ecx 1092cd: 89 d7 mov %edx,%edi 1092cf: f2 ae repnz scas %es:(%edi),%al 1092d1: f7 d1 not %ecx 1092d3: 49 dec %ecx 1092d4: 83 ec 0c sub $0xc,%esp 1092d7: 6a 01 push $0x1 1092d9: 8d 5d d4 lea -0x2c(%ebp),%ebx 1092dc: 53 push %ebx 1092dd: 6a 00 push $0x0 1092df: 51 push %ecx 1092e0: 52 push %edx 1092e1: e8 9f eb ff ff call 107e85 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 1092e6: 83 c4 20 add $0x20,%esp 1092e9: 83 cf ff or $0xffffffff,%edi 1092ec: 85 c0 test %eax,%eax 1092ee: 75 5c jne 10934c return -1; if ( !loc.handlers->fstat_h ){ 1092f0: 8b 55 dc mov -0x24(%ebp),%edx 1092f3: 83 7a 18 00 cmpl $0x0,0x18(%edx) 1092f7: 75 27 jne 109320 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1092f9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1092fc: 85 c0 test %eax,%eax <== NOT EXECUTED 1092fe: 74 10 je 109310 <== NOT EXECUTED 109300: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109303: 85 c0 test %eax,%eax <== NOT EXECUTED 109305: 74 09 je 109310 <== NOT EXECUTED 109307: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10930a: 53 push %ebx <== NOT EXECUTED 10930b: ff d0 call *%eax <== NOT EXECUTED 10930d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109310: e8 b7 a5 00 00 call 1138cc <__errno> <== NOT EXECUTED 109315: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10931b: 83 cf ff or $0xffffffff,%edi 10931e: eb 2c jmp 10934c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 109320: b9 12 00 00 00 mov $0x12,%ecx 109325: 89 f7 mov %esi,%edi 109327: f3 ab rep stos %eax,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 109329: 50 push %eax 10932a: 50 push %eax 10932b: 56 push %esi 10932c: 53 push %ebx 10932d: ff 52 18 call *0x18(%edx) 109330: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 109332: 8b 45 e0 mov -0x20(%ebp),%eax 109335: 83 c4 10 add $0x10,%esp 109338: 85 c0 test %eax,%eax 10933a: 74 10 je 10934c <== NEVER TAKEN 10933c: 8b 40 1c mov 0x1c(%eax),%eax 10933f: 85 c0 test %eax,%eax 109341: 74 09 je 10934c <== NEVER TAKEN 109343: 83 ec 0c sub $0xc,%esp 109346: 53 push %ebx 109347: ff d0 call *%eax 109349: 83 c4 10 add $0x10,%esp return status; } 10934c: 89 f8 mov %edi,%eax 10934e: 8d 65 f4 lea -0xc(%ebp),%esp 109351: 5b pop %ebx 109352: 5e pop %esi 109353: 5f pop %edi 109354: c9 leave 109355: c3 ret =============================================================================== 00109590 : int symlink( const char *actualpath, const char *sympath ) { 109590: 55 push %ebp 109591: 89 e5 mov %esp,%ebp 109593: 56 push %esi 109594: 53 push %ebx 109595: 83 ec 24 sub $0x24,%esp 109598: 8b 75 0c mov 0xc(%ebp),%esi rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 10959b: 8d 5d dc lea -0x24(%ebp),%ebx 10959e: 53 push %ebx 10959f: 8d 45 f4 lea -0xc(%ebp),%eax 1095a2: 50 push %eax 1095a3: 56 push %esi 1095a4: e8 6f ff ff ff call 109518 if ( !loc.ops->evalformake_h ) { 1095a9: 8b 45 e8 mov -0x18(%ebp),%eax 1095ac: 8b 40 04 mov 0x4(%eax),%eax 1095af: 83 c4 10 add $0x10,%esp 1095b2: 85 c0 test %eax,%eax 1095b4: 74 30 je 1095e6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 1095b6: 51 push %ecx 1095b7: 8d 55 f0 lea -0x10(%ebp),%edx 1095ba: 52 push %edx 1095bb: 53 push %ebx 1095bc: 03 75 f4 add -0xc(%ebp),%esi 1095bf: 56 push %esi 1095c0: ff d0 call *%eax if ( result != 0 ) 1095c2: 83 c4 10 add $0x10,%esp 1095c5: 83 ce ff or $0xffffffff,%esi 1095c8: 85 c0 test %eax,%eax 1095ca: 75 50 jne 10961c return -1; if ( !loc.ops->symlink_h ) { 1095cc: 8b 55 e8 mov -0x18(%ebp),%edx 1095cf: 8b 42 38 mov 0x38(%edx),%eax 1095d2: 85 c0 test %eax,%eax 1095d4: 75 20 jne 1095f6 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 1095d6: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1095d9: 85 c0 test %eax,%eax <== NOT EXECUTED 1095db: 74 09 je 1095e6 <== NOT EXECUTED 1095dd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095e0: 53 push %ebx <== NOT EXECUTED 1095e1: ff d0 call *%eax <== NOT EXECUTED 1095e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1095e6: e8 61 a5 00 00 call 113b4c <__errno> <== NOT EXECUTED 1095eb: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1095f1: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1095f4: eb 26 jmp 10961c <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 1095f6: 52 push %edx 1095f7: ff 75 f0 pushl -0x10(%ebp) 1095fa: ff 75 08 pushl 0x8(%ebp) 1095fd: 53 push %ebx 1095fe: ff d0 call *%eax 109600: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 109602: 8b 45 e8 mov -0x18(%ebp),%eax 109605: 83 c4 10 add $0x10,%esp 109608: 85 c0 test %eax,%eax 10960a: 74 10 je 10961c <== NEVER TAKEN 10960c: 8b 40 1c mov 0x1c(%eax),%eax 10960f: 85 c0 test %eax,%eax 109611: 74 09 je 10961c <== NEVER TAKEN 109613: 83 ec 0c sub $0xc,%esp 109616: 53 push %ebx 109617: ff d0 call *%eax 109619: 83 c4 10 add $0x10,%esp return result; } 10961c: 89 f0 mov %esi,%eax 10961e: 8d 65 f8 lea -0x8(%ebp),%esp 109621: 5b pop %ebx 109622: 5e pop %esi 109623: c9 leave 109624: c3 ret =============================================================================== 001093e8 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 1093e8: 55 push %ebp 1093e9: 89 e5 mov %esp,%ebp 1093eb: 53 push %ebx 1093ec: 83 ec 04 sub $0x4,%esp 1093ef: 8b 45 08 mov 0x8(%ebp),%eax /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 1093f2: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx if ( this_reent ) { 1093f8: 85 c9 test %ecx,%ecx 1093fa: 74 32 je 10942e <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 1093fc: 8b 15 24 84 12 00 mov 0x128424,%edx 109402: 8b 9a f0 00 00 00 mov 0xf0(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 109408: 89 8a f0 00 00 00 mov %ecx,0xf0(%edx) _fwalk (t->libc_reent, sync_wrapper); 10940e: 52 push %edx 10940f: 52 push %edx 109410: 68 5a 94 10 00 push $0x10945a 109415: ff b0 f0 00 00 00 pushl 0xf0(%eax) 10941b: e8 c0 b3 00 00 call 1147e0 <_fwalk> _Thread_Executing->libc_reent = current_reent; 109420: a1 24 84 12 00 mov 0x128424,%eax 109425: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 10942b: 83 c4 10 add $0x10,%esp } } 10942e: 8b 5d fc mov -0x4(%ebp),%ebx 109431: c9 leave 109432: c3 ret =============================================================================== 001095b4 : int tcsetattr( int fd, int opt, struct termios *tp ) { 1095b4: 55 push %ebp 1095b5: 89 e5 mov %esp,%ebp 1095b7: 56 push %esi 1095b8: 53 push %ebx 1095b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1095bc: 8b 45 0c mov 0xc(%ebp),%eax 1095bf: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 1095c2: 85 c0 test %eax,%eax 1095c4: 74 22 je 1095e8 <== ALWAYS TAKEN 1095c6: 48 dec %eax 1095c7: 74 0d je 1095d6 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 1095c9: e8 96 a7 00 00 call 113d64 <__errno> <== NOT EXECUTED 1095ce: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1095d4: eb 2a jmp 109600 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 1095d6: 50 push %eax <== NOT EXECUTED 1095d7: 6a 00 push $0x0 <== NOT EXECUTED 1095d9: 6a 03 push $0x3 <== NOT EXECUTED 1095db: 53 push %ebx <== NOT EXECUTED 1095dc: e8 fb 6d 00 00 call 1103dc <== NOT EXECUTED 1095e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095e4: 85 c0 test %eax,%eax <== NOT EXECUTED 1095e6: 78 18 js 109600 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095e8: 89 75 10 mov %esi,0x10(%ebp) 1095eb: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 1095f2: 89 5d 08 mov %ebx,0x8(%ebp) } } 1095f5: 8d 65 f8 lea -0x8(%ebp),%esp 1095f8: 5b pop %ebx 1095f9: 5e pop %esi 1095fa: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095fb: e9 dc 6d 00 00 jmp 1103dc } } 109600: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 109603: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 109606: 5b pop %ebx <== NOT EXECUTED 109607: 5e pop %esi <== NOT EXECUTED 109608: c9 leave <== NOT EXECUTED 109609: c3 ret <== NOT EXECUTED =============================================================================== 0010a484 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10a484: 55 push %ebp 10a485: 89 e5 mov %esp,%ebp 10a487: 56 push %esi 10a488: 53 push %ebx 10a489: 8b 5d 0c mov 0xc(%ebp),%ebx 10a48c: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10a48f: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10a493: 75 1d jne 10a4b2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10a495: 85 f6 test %esi,%esi 10a497: 74 19 je 10a4b2 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10a499: 85 db test %ebx,%ebx 10a49b: 74 22 je 10a4bf /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10a49d: 8b 03 mov (%ebx),%eax 10a49f: 48 dec %eax 10a4a0: 83 f8 01 cmp $0x1,%eax 10a4a3: 77 0d ja 10a4b2 <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 10a4a5: 8b 43 04 mov 0x4(%ebx),%eax 10a4a8: 85 c0 test %eax,%eax 10a4aa: 74 06 je 10a4b2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10a4ac: 48 dec %eax 10a4ad: 83 f8 1f cmp $0x1f,%eax 10a4b0: 76 0d jbe 10a4bf <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10a4b2: e8 41 8f 00 00 call 1133f8 <__errno> 10a4b7: c7 00 16 00 00 00 movl $0x16,(%eax) 10a4bd: eb 2f jmp 10a4ee rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a4bf: a1 5c 82 12 00 mov 0x12825c,%eax 10a4c4: 40 inc %eax 10a4c5: a3 5c 82 12 00 mov %eax,0x12825c * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 10a4ca: 83 ec 0c sub $0xc,%esp 10a4cd: 68 84 85 12 00 push $0x128584 10a4d2: e8 35 1b 00 00 call 10c00c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10a4d7: 83 c4 10 add $0x10,%esp 10a4da: 85 c0 test %eax,%eax 10a4dc: 75 18 jne 10a4f6 _Thread_Enable_dispatch(); 10a4de: e8 2e 27 00 00 call 10cc11 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10a4e3: e8 10 8f 00 00 call 1133f8 <__errno> 10a4e8: c7 00 0b 00 00 00 movl $0xb,(%eax) 10a4ee: 83 c8 ff or $0xffffffff,%eax 10a4f1: e9 83 00 00 00 jmp 10a579 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10a4f6: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10a4fa: 8b 15 18 83 12 00 mov 0x128318,%edx 10a500: 8b 52 08 mov 0x8(%edx),%edx 10a503: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10a506: 85 db test %ebx,%ebx 10a508: 74 11 je 10a51b ptimer->inf.sigev_notify = evp->sigev_notify; 10a50a: 8b 13 mov (%ebx),%edx 10a50c: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10a50f: 8b 53 04 mov 0x4(%ebx),%edx 10a512: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10a515: 8b 53 08 mov 0x8(%ebx),%edx 10a518: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10a51b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10a522: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10a529: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10a530: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10a537: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a53e: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10a545: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10a54c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10a553: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a55a: 8b 50 08 mov 0x8(%eax),%edx 10a55d: 0f b7 da movzwl %dx,%ebx 10a560: 8b 0d a0 85 12 00 mov 0x1285a0,%ecx 10a566: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a569: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 10a570: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10a572: e8 9a 26 00 00 call 10cc11 <_Thread_Enable_dispatch> 10a577: 31 c0 xor %eax,%eax return 0; } 10a579: 8d 65 f8 lea -0x8(%ebp),%esp 10a57c: 5b pop %ebx 10a57d: 5e pop %esi 10a57e: c9 leave 10a57f: c3 ret =============================================================================== 0010a580 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10a580: 55 push %ebp 10a581: 89 e5 mov %esp,%ebp 10a583: 57 push %edi 10a584: 56 push %esi 10a585: 53 push %ebx 10a586: 83 ec 2c sub $0x2c,%esp 10a589: 8b 45 0c mov 0xc(%ebp),%eax Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10a58c: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a590: 0f 84 47 01 00 00 je 10a6dd <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 10a596: 8b 55 10 mov 0x10(%ebp),%edx 10a599: 81 7a 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%edx) 10a5a0: 0f 87 37 01 00 00 ja 10a6dd ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10a5a6: 81 7a 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%edx) 10a5ad: 0f 87 2a 01 00 00 ja 10a6dd <== NEVER TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10a5b3: 85 c0 test %eax,%eax 10a5b5: 74 09 je 10a5c0 10a5b7: 83 f8 04 cmp $0x4,%eax 10a5ba: 0f 85 1d 01 00 00 jne 10a6dd rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10a5c0: 8d 7d cc lea -0x34(%ebp),%edi 10a5c3: b9 04 00 00 00 mov $0x4,%ecx 10a5c8: 8b 75 10 mov 0x10(%ebp),%esi 10a5cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 10a5cd: 83 f8 04 cmp $0x4,%eax 10a5d0: 75 2f jne 10a601 struct timespec now; _TOD_Get( &now ); 10a5d2: 83 ec 0c sub $0xc,%esp 10a5d5: 8d 5d dc lea -0x24(%ebp),%ebx 10a5d8: 53 push %ebx 10a5d9: e8 a6 15 00 00 call 10bb84 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10a5de: 59 pop %ecx 10a5df: 5e pop %esi 10a5e0: 8d 75 d4 lea -0x2c(%ebp),%esi 10a5e3: 56 push %esi 10a5e4: 53 push %ebx 10a5e5: e8 a6 31 00 00 call 10d790 <_Timespec_Greater_than> 10a5ea: 83 c4 10 add $0x10,%esp 10a5ed: 84 c0 test %al,%al 10a5ef: 0f 85 e8 00 00 00 jne 10a6dd rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10a5f5: 52 push %edx 10a5f6: 56 push %esi 10a5f7: 56 push %esi 10a5f8: 53 push %ebx 10a5f9: e8 b6 31 00 00 call 10d7b4 <_Timespec_Subtract> 10a5fe: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10a601: 50 push %eax 10a602: 8d 45 e4 lea -0x1c(%ebp),%eax 10a605: 50 push %eax 10a606: ff 75 08 pushl 0x8(%ebp) 10a609: 68 84 85 12 00 push $0x128584 10a60e: e8 0d 1e 00 00 call 10c420 <_Objects_Get> 10a613: 89 c3 mov %eax,%ebx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10a615: 83 c4 10 add $0x10,%esp 10a618: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a61c: 0f 85 bb 00 00 00 jne 10a6dd case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 10a622: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10a626: 75 3b jne 10a663 10a628: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10a62c: 75 35 jne 10a663 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10a62e: 83 ec 0c sub $0xc,%esp 10a631: 8d 40 10 lea 0x10(%eax),%eax 10a634: 50 push %eax 10a635: e8 36 35 00 00 call 10db70 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10a63a: 83 c4 10 add $0x10,%esp 10a63d: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a641: 74 0d je 10a650 *ovalue = ptimer->timer_data; 10a643: 8d 73 54 lea 0x54(%ebx),%esi 10a646: b9 04 00 00 00 mov $0x4,%ecx 10a64b: 8b 7d 14 mov 0x14(%ebp),%edi 10a64e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10a650: 8d 7b 54 lea 0x54(%ebx),%edi 10a653: 8d 75 cc lea -0x34(%ebp),%esi 10a656: b9 04 00 00 00 mov $0x4,%ecx 10a65b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a65d: c6 43 3c 04 movb $0x4,0x3c(%ebx) 10a661: eb 35 jmp 10a698 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10a663: 83 ec 0c sub $0xc,%esp 10a666: ff 75 10 pushl 0x10(%ebp) 10a669: e8 7a 31 00 00 call 10d7e8 <_Timespec_To_ticks> 10a66e: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10a671: 8d 45 d4 lea -0x2c(%ebp),%eax 10a674: 89 04 24 mov %eax,(%esp) 10a677: e8 6c 31 00 00 call 10d7e8 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10a67c: 89 1c 24 mov %ebx,(%esp) 10a67f: 68 f4 a6 10 00 push $0x10a6f4 10a684: ff 73 08 pushl 0x8(%ebx) 10a687: 50 push %eax 10a688: 8d 43 10 lea 0x10(%ebx),%eax 10a68b: 50 push %eax 10a68c: e8 4b 5d 00 00 call 1103dc <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10a691: 83 c4 20 add $0x20,%esp 10a694: 84 c0 test %al,%al 10a696: 75 09 jne 10a6a1 _Thread_Enable_dispatch(); 10a698: e8 74 25 00 00 call 10cc11 <_Thread_Enable_dispatch> 10a69d: 31 c0 xor %eax,%eax return 0; 10a69f: eb 4a jmp 10a6eb /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10a6a1: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a6a5: 74 0d je 10a6b4 *ovalue = ptimer->timer_data; 10a6a7: 8d 73 54 lea 0x54(%ebx),%esi 10a6aa: b9 04 00 00 00 mov $0x4,%ecx 10a6af: 8b 7d 14 mov 0x14(%ebp),%edi 10a6b2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10a6b4: 8d 7b 54 lea 0x54(%ebx),%edi 10a6b7: 8d 75 cc lea -0x34(%ebp),%esi 10a6ba: b9 04 00 00 00 mov $0x4,%ecx 10a6bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a6c1: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a6c5: 83 ec 0c sub $0xc,%esp 10a6c8: 83 c3 6c add $0x6c,%ebx 10a6cb: 53 push %ebx 10a6cc: e8 b3 14 00 00 call 10bb84 <_TOD_Get> _Thread_Enable_dispatch(); 10a6d1: e8 3b 25 00 00 call 10cc11 <_Thread_Enable_dispatch> 10a6d6: 31 c0 xor %eax,%eax return 0; 10a6d8: 83 c4 10 add $0x10,%esp 10a6db: eb 0e jmp 10a6eb #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a6dd: e8 16 8d 00 00 call 1133f8 <__errno> 10a6e2: c7 00 16 00 00 00 movl $0x16,(%eax) 10a6e8: 83 c8 ff or $0xffffffff,%eax } 10a6eb: 8d 65 f4 lea -0xc(%ebp),%esp 10a6ee: 5b pop %ebx 10a6ef: 5e pop %esi 10a6f0: 5f pop %edi 10a6f1: c9 leave 10a6f2: c3 ret =============================================================================== 0010a3a8 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10a3a8: 55 push %ebp 10a3a9: 89 e5 mov %esp,%ebp 10a3ab: 57 push %edi 10a3ac: 56 push %esi 10a3ad: 53 push %ebx 10a3ae: 83 ec 1c sub $0x1c,%esp 10a3b1: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10a3b4: 83 3d 4c 7b 12 00 00 cmpl $0x0,0x127b4c 10a3bb: 75 2c jne 10a3e9 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a3bd: c7 05 38 7b 12 00 00 movl $0x0,0x127b38 10a3c4: 00 00 00 the_watchdog->routine = routine; 10a3c7: c7 05 4c 7b 12 00 8a movl $0x10a48a,0x127b4c 10a3ce: a4 10 00 the_watchdog->id = id; 10a3d1: c7 05 50 7b 12 00 00 movl $0x0,0x127b50 10a3d8: 00 00 00 the_watchdog->user_data = user_data; 10a3db: c7 05 54 7b 12 00 00 movl $0x0,0x127b54 10a3e2: 00 00 00 10a3e5: 31 db xor %ebx,%ebx 10a3e7: eb 4f jmp 10a438 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10a3e9: 83 ec 0c sub $0xc,%esp 10a3ec: 68 30 7b 12 00 push $0x127b30 10a3f1: e8 be 33 00 00 call 10d7b4 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10a3f6: 83 e8 02 sub $0x2,%eax 10a3f9: 83 c4 10 add $0x10,%esp 10a3fc: 31 db xor %ebx,%ebx 10a3fe: 83 f8 01 cmp $0x1,%eax 10a401: 77 35 ja 10a438 <== NEVER TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 10a403: a1 44 7b 12 00 mov 0x127b44,%eax 10a408: 03 05 3c 7b 12 00 add 0x127b3c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10a40e: 51 push %ecx 10a40f: 51 push %ecx 10a410: 8d 55 e0 lea -0x20(%ebp),%edx 10a413: 52 push %edx 10a414: 2b 05 48 7b 12 00 sub 0x127b48,%eax 10a41a: 50 push %eax 10a41b: e8 44 2f 00 00 call 10d364 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10a420: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 10a427: 8b 45 e4 mov -0x1c(%ebp),%eax 10a42a: bf e8 03 00 00 mov $0x3e8,%edi 10a42f: 99 cltd 10a430: f7 ff idiv %edi 10a432: 8d 1c 08 lea (%eax,%ecx,1),%ebx 10a435: 83 c4 10 add $0x10,%esp /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 10a438: 85 f6 test %esi,%esi 10a43a: 74 44 je 10a480 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10a43c: b9 40 42 0f 00 mov $0xf4240,%ecx 10a441: 89 f0 mov %esi,%eax 10a443: 31 d2 xor %edx,%edx 10a445: f7 f1 div %ecx 10a447: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10a44a: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 10a450: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10a453: 83 ec 0c sub $0xc,%esp 10a456: 8d 75 e0 lea -0x20(%ebp),%esi 10a459: 56 push %esi 10a45a: e8 61 2f 00 00 call 10d3c0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10a45f: 89 34 24 mov %esi,(%esp) 10a462: e8 59 2f 00 00 call 10d3c0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a467: a3 3c 7b 12 00 mov %eax,0x127b3c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a46c: 58 pop %eax 10a46d: 5a pop %edx 10a46e: 68 30 7b 12 00 push $0x127b30 10a473: 68 34 73 12 00 push $0x127334 10a478: e8 1f 32 00 00 call 10d69c <_Watchdog_Insert> 10a47d: 83 c4 10 add $0x10,%esp } return remaining; } 10a480: 89 d8 mov %ebx,%eax 10a482: 8d 65 f4 lea -0xc(%ebp),%esp 10a485: 5b pop %ebx 10a486: 5e pop %esi 10a487: 5f pop %edi 10a488: c9 leave 10a489: c3 ret =============================================================================== 00111d10 : #include int unlink( const char *path ) { 111d10: 55 push %ebp 111d11: 89 e5 mov %esp,%ebp 111d13: 57 push %edi 111d14: 56 push %esi 111d15: 53 push %ebx 111d16: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 111d19: ff 75 08 pushl 0x8(%ebp) 111d1c: e8 13 58 ff ff call 107534 111d21: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 111d24: 83 c4 10 add $0x10,%esp 111d27: 85 c0 test %eax,%eax 111d29: 8d 45 d0 lea -0x30(%ebp),%eax 111d2c: 75 15 jne 111d43 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 111d2e: 51 push %ecx 111d2f: 50 push %eax 111d30: 8d 45 e4 lea -0x1c(%ebp),%eax 111d33: 50 push %eax 111d34: ff 75 08 pushl 0x8(%ebp) 111d37: e8 50 66 ff ff call 10838c 111d3c: 31 db xor %ebx,%ebx 111d3e: 83 c4 10 add $0x10,%esp 111d41: eb 20 jmp 111d63 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 111d43: 83 ec 0c sub $0xc,%esp 111d46: 6a 00 push $0x0 111d48: 50 push %eax 111d49: 6a 02 push $0x2 111d4b: ff 75 b4 pushl -0x4c(%ebp) 111d4e: ff 75 08 pushl 0x8(%ebp) 111d51: e8 db 58 ff ff call 107631 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 111d56: 83 c4 20 add $0x20,%esp 111d59: 85 c0 test %eax,%eax 111d5b: 0f 85 69 01 00 00 jne 111eca <== NEVER TAKEN 111d61: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 111d63: 8d 7d bc lea -0x44(%ebp),%edi 111d66: 8d 75 d0 lea -0x30(%ebp),%esi 111d69: b9 05 00 00 00 mov $0x5,%ecx 111d6e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 111d70: 8b 75 08 mov 0x8(%ebp),%esi 111d73: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 111d76: 83 c9 ff or $0xffffffff,%ecx 111d79: 89 f7 mov %esi,%edi 111d7b: 31 c0 xor %eax,%eax 111d7d: f2 ae repnz scas %es:(%edi),%al 111d7f: f7 d1 not %ecx 111d81: 49 dec %ecx 111d82: 52 push %edx 111d83: 52 push %edx 111d84: 51 push %ecx 111d85: 56 push %esi 111d86: e8 6d 57 ff ff call 1074f8 111d8b: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 111d8d: 83 c9 ff or $0xffffffff,%ecx 111d90: 89 f7 mov %esi,%edi 111d92: 31 c0 xor %eax,%eax 111d94: f2 ae repnz scas %es:(%edi),%al 111d96: f7 d1 not %ecx 111d98: 49 dec %ecx 111d99: c7 04 24 00 00 00 00 movl $0x0,(%esp) 111da0: 8d 7d bc lea -0x44(%ebp),%edi 111da3: 57 push %edi 111da4: 6a 00 push $0x0 111da6: 51 push %ecx 111da7: 56 push %esi 111da8: e8 ca 57 ff ff call 107577 0, &loc, false ); if ( result != 0 ) { 111dad: 83 c4 20 add $0x20,%esp 111db0: 85 c0 test %eax,%eax 111db2: 74 2f je 111de3 if ( free_parentloc ) 111db4: 84 db test %bl,%bl 111db6: 0f 84 0e 01 00 00 je 111eca <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 111dbc: 8b 45 dc mov -0x24(%ebp),%eax 111dbf: 85 c0 test %eax,%eax 111dc1: 0f 84 03 01 00 00 je 111eca <== NEVER TAKEN 111dc7: 8b 40 1c mov 0x1c(%eax),%eax 111dca: 85 c0 test %eax,%eax 111dcc: 0f 84 f8 00 00 00 je 111eca <== NEVER TAKEN 111dd2: 83 ec 0c sub $0xc,%esp 111dd5: 8d 55 d0 lea -0x30(%ebp),%edx 111dd8: 52 push %edx 111dd9: ff d0 call *%eax 111ddb: 83 ce ff or $0xffffffff,%esi 111dde: e9 e2 00 00 00 jmp 111ec5 return -1; } if ( !loc.ops->node_type_h ) { 111de3: 8b 55 c8 mov -0x38(%ebp),%edx 111de6: 8b 42 10 mov 0x10(%edx),%eax 111de9: 85 c0 test %eax,%eax 111deb: 75 05 jne 111df2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 111ded: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 111df0: eb 5b jmp 111e4d <== 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 ) { 111df2: 83 ec 0c sub $0xc,%esp 111df5: 57 push %edi 111df6: ff d0 call *%eax 111df8: 83 c4 10 add $0x10,%esp 111dfb: 48 dec %eax 111dfc: 8b 45 c8 mov -0x38(%ebp),%eax 111dff: 75 42 jne 111e43 rtems_filesystem_freenode( &loc ); 111e01: 85 c0 test %eax,%eax 111e03: 74 10 je 111e15 <== NEVER TAKEN 111e05: 8b 40 1c mov 0x1c(%eax),%eax 111e08: 85 c0 test %eax,%eax 111e0a: 74 09 je 111e15 <== NEVER TAKEN 111e0c: 83 ec 0c sub $0xc,%esp 111e0f: 57 push %edi 111e10: ff d0 call *%eax 111e12: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 111e15: 84 db test %bl,%bl 111e17: 74 1a je 111e33 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 111e19: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 111e1c: 85 c0 test %eax,%eax <== NOT EXECUTED 111e1e: 74 13 je 111e33 <== NOT EXECUTED 111e20: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 111e23: 85 c0 test %eax,%eax <== NOT EXECUTED 111e25: 74 0c je 111e33 <== NOT EXECUTED 111e27: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e2a: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 111e2d: 52 push %edx <== NOT EXECUTED 111e2e: ff d0 call *%eax <== NOT EXECUTED 111e30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 111e33: e8 e8 0b 00 00 call 112a20 <__errno> 111e38: c7 00 15 00 00 00 movl $0x15,(%eax) 111e3e: e9 87 00 00 00 jmp 111eca } if ( !loc.ops->unlink_h ) { 111e43: 8b 50 0c mov 0xc(%eax),%edx 111e46: 85 d2 test %edx,%edx 111e48: 75 3b jne 111e85 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 111e4a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 111e4d: 85 c0 test %eax,%eax <== NOT EXECUTED 111e4f: 74 09 je 111e5a <== NOT EXECUTED 111e51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e54: 57 push %edi <== NOT EXECUTED 111e55: ff d0 call *%eax <== NOT EXECUTED 111e57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 111e5a: 84 db test %bl,%bl <== NOT EXECUTED 111e5c: 74 1a je 111e78 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 111e5e: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 111e61: 85 c0 test %eax,%eax <== NOT EXECUTED 111e63: 74 13 je 111e78 <== NOT EXECUTED 111e65: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 111e68: 85 c0 test %eax,%eax <== NOT EXECUTED 111e6a: 74 0c je 111e78 <== NOT EXECUTED 111e6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111e6f: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 111e72: 52 push %edx <== NOT EXECUTED 111e73: ff d0 call *%eax <== NOT EXECUTED 111e75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 111e78: e8 a3 0b 00 00 call 112a20 <__errno> <== NOT EXECUTED 111e7d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 111e83: eb 45 jmp 111eca <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 111e85: 50 push %eax 111e86: 50 push %eax 111e87: 57 push %edi 111e88: 8d 45 d0 lea -0x30(%ebp),%eax 111e8b: 50 push %eax 111e8c: ff d2 call *%edx 111e8e: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 111e90: 8b 45 c8 mov -0x38(%ebp),%eax 111e93: 83 c4 10 add $0x10,%esp 111e96: 85 c0 test %eax,%eax 111e98: 74 10 je 111eaa <== NEVER TAKEN 111e9a: 8b 40 1c mov 0x1c(%eax),%eax 111e9d: 85 c0 test %eax,%eax 111e9f: 74 09 je 111eaa <== NEVER TAKEN 111ea1: 83 ec 0c sub $0xc,%esp 111ea4: 57 push %edi 111ea5: ff d0 call *%eax 111ea7: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 111eaa: 84 db test %bl,%bl 111eac: 74 1f je 111ecd <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 111eae: 8b 45 dc mov -0x24(%ebp),%eax 111eb1: 85 c0 test %eax,%eax 111eb3: 74 18 je 111ecd <== NEVER TAKEN 111eb5: 8b 40 1c mov 0x1c(%eax),%eax 111eb8: 85 c0 test %eax,%eax 111eba: 74 11 je 111ecd <== NEVER TAKEN 111ebc: 83 ec 0c sub $0xc,%esp 111ebf: 8d 55 d0 lea -0x30(%ebp),%edx 111ec2: 52 push %edx 111ec3: ff d0 call *%eax 111ec5: 83 c4 10 add $0x10,%esp 111ec8: eb 03 jmp 111ecd 111eca: 83 ce ff or $0xffffffff,%esi return result; } 111ecd: 89 f0 mov %esi,%eax 111ecf: 8d 65 f4 lea -0xc(%ebp),%esp 111ed2: 5b pop %ebx 111ed3: 5e pop %esi 111ed4: 5f pop %edi 111ed5: c9 leave 111ed6: c3 ret =============================================================================== 0010ce65 : */ int unmount( const char *path ) { 10ce65: 55 push %ebp 10ce66: 89 e5 mov %esp,%ebp 10ce68: 57 push %edi 10ce69: 56 push %esi 10ce6a: 53 push %ebx 10ce6b: 83 ec 38 sub $0x38,%esp 10ce6e: 8b 55 08 mov 0x8(%ebp),%edx * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 10ce71: 31 c0 xor %eax,%eax 10ce73: 83 c9 ff or $0xffffffff,%ecx 10ce76: 89 d7 mov %edx,%edi 10ce78: f2 ae repnz scas %es:(%edi),%al 10ce7a: f7 d1 not %ecx 10ce7c: 49 dec %ecx 10ce7d: 6a 01 push $0x1 10ce7f: 8d 75 d4 lea -0x2c(%ebp),%esi 10ce82: 56 push %esi 10ce83: 6a 00 push $0x0 10ce85: 51 push %ecx 10ce86: 52 push %edx 10ce87: e8 5d cb ff ff call 1099e9 10ce8c: 83 c4 20 add $0x20,%esp 10ce8f: 85 c0 test %eax,%eax 10ce91: 0f 85 35 01 00 00 jne 10cfcc <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; 10ce97: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10ce9a: 8b 43 1c mov 0x1c(%ebx),%eax 10ce9d: 3b 45 d4 cmp -0x2c(%ebp),%eax 10cea0: 8b 45 e0 mov -0x20(%ebp),%eax 10cea3: 74 24 je 10cec9 /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 10cea5: 85 c0 test %eax,%eax 10cea7: 74 10 je 10ceb9 <== NEVER TAKEN 10cea9: 8b 40 1c mov 0x1c(%eax),%eax 10ceac: 85 c0 test %eax,%eax 10ceae: 74 09 je 10ceb9 <== NEVER TAKEN 10ceb0: 83 ec 0c sub $0xc,%esp 10ceb3: 56 push %esi 10ceb4: ff d0 call *%eax 10ceb6: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10ceb9: e8 7e 89 00 00 call 11583c <__errno> 10cebe: c7 00 0d 00 00 00 movl $0xd,(%eax) 10cec4: e9 03 01 00 00 jmp 10cfcc /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10cec9: 85 c0 test %eax,%eax 10cecb: 74 10 je 10cedd <== NEVER TAKEN 10cecd: 8b 40 1c mov 0x1c(%eax),%eax 10ced0: 85 c0 test %eax,%eax 10ced2: 74 09 je 10cedd <== NEVER TAKEN 10ced4: 83 ec 0c sub $0xc,%esp 10ced7: 56 push %esi 10ced8: ff d0 call *%eax 10ceda: 83 c4 10 add $0x10,%esp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 10cedd: 8b 43 14 mov 0x14(%ebx),%eax 10cee0: 83 78 28 00 cmpl $0x0,0x28(%eax) 10cee4: 74 09 je 10ceef <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10cee6: 8b 43 28 mov 0x28(%ebx),%eax 10cee9: 83 78 2c 00 cmpl $0x0,0x2c(%eax) 10ceed: 75 10 jne 10ceff <== ALWAYS TAKEN if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ceef: e8 48 89 00 00 call 11583c <__errno> <== NOT EXECUTED 10cef4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10cefa: e9 cd 00 00 00 jmp 10cfcc <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 10ceff: a1 20 a2 12 00 mov 0x12a220,%eax 10cf04: 39 58 14 cmp %ebx,0x14(%eax) 10cf07: 74 25 je 10cf2e <== NEVER TAKEN /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10cf09: 51 push %ecx 10cf0a: 51 push %ecx 10cf0b: ff 73 2c pushl 0x2c(%ebx) 10cf0e: 68 54 ce 10 00 push $0x10ce54 10cf13: e8 c9 d4 ff ff call 10a3e1 10cf18: 83 c4 10 add $0x10,%esp 10cf1b: 84 c0 test %al,%al 10cf1d: 75 0f jne 10cf2e * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 10cf1f: 83 ec 0c sub $0xc,%esp 10cf22: 53 push %ebx 10cf23: e8 3e cd ff ff call 109c66 10cf28: 83 c4 10 add $0x10,%esp 10cf2b: 48 dec %eax 10cf2c: 75 10 jne 10cf3e rtems_set_errno_and_return_minus_one( EBUSY ); 10cf2e: e8 09 89 00 00 call 11583c <__errno> 10cf33: c7 00 10 00 00 00 movl $0x10,(%eax) 10cf39: e9 8e 00 00 00 jmp 10cfcc * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 10cf3e: 83 ec 0c sub $0xc,%esp 10cf41: 8b 43 14 mov 0x14(%ebx),%eax 10cf44: 53 push %ebx 10cf45: ff 50 28 call *0x28(%eax) 10cf48: 83 c4 10 add $0x10,%esp 10cf4b: 85 c0 test %eax,%eax 10cf4d: 75 7d jne 10cfcc <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 10cf4f: 83 ec 0c sub $0xc,%esp 10cf52: 8b 43 28 mov 0x28(%ebx),%eax 10cf55: 53 push %ebx 10cf56: ff 50 2c call *0x2c(%eax) 10cf59: 83 c4 10 add $0x10,%esp 10cf5c: 85 c0 test %eax,%eax 10cf5e: 74 1b je 10cf7b <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10cf60: 83 ec 0c sub $0xc,%esp 10cf63: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10cf66: 53 push %ebx <== NOT EXECUTED 10cf67: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10cf6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cf6d: 85 c0 test %eax,%eax <== NOT EXECUTED 10cf6f: 74 5b je 10cfcc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10cf71: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cf74: 6a 00 push $0x0 <== NOT EXECUTED 10cf76: e8 71 10 00 00 call 10dfec <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10cf7b: 52 push %edx 10cf7c: 6a 00 push $0x0 10cf7e: 6a 00 push $0x0 10cf80: ff 35 58 cc 12 00 pushl 0x12cc58 10cf86: e8 e5 0a 00 00 call 10da70 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10cf8b: 89 1c 24 mov %ebx,(%esp) 10cf8e: e8 21 13 00 00 call 10e2b4 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10cf93: 58 pop %eax 10cf94: ff 35 58 cc 12 00 pushl 0x12cc58 10cf9a: e8 bd 0b 00 00 call 10db5c /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 10cf9f: 8b 43 14 mov 0x14(%ebx),%eax 10cfa2: 83 c4 10 add $0x10,%esp 10cfa5: 85 c0 test %eax,%eax 10cfa7: 74 13 je 10cfbc <== NEVER TAKEN 10cfa9: 8b 40 1c mov 0x1c(%eax),%eax 10cfac: 85 c0 test %eax,%eax 10cfae: 74 0c je 10cfbc <== NEVER TAKEN 10cfb0: 83 ec 0c sub $0xc,%esp 10cfb3: 8d 53 08 lea 0x8(%ebx),%edx 10cfb6: 52 push %edx 10cfb7: ff d0 call *%eax 10cfb9: 83 c4 10 add $0x10,%esp free( mt_entry ); 10cfbc: 83 ec 0c sub $0xc,%esp 10cfbf: 53 push %ebx 10cfc0: e8 8f ca ff ff call 109a54 10cfc5: 31 c0 xor %eax,%eax return 0; 10cfc7: 83 c4 10 add $0x10,%esp 10cfca: eb 03 jmp 10cfcf 10cfcc: 83 c8 ff or $0xffffffff,%eax } 10cfcf: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd2: 5b pop %ebx 10cfd3: 5e pop %esi 10cfd4: 5f pop %edi 10cfd5: c9 leave 10cfd6: c3 ret =============================================================================== 0010adb4 : int utime( const char *path, const struct utimbuf *times ) { 10adb4: 55 push %ebp 10adb5: 89 e5 mov %esp,%ebp 10adb7: 57 push %edi 10adb8: 56 push %esi 10adb9: 53 push %ebx 10adba: 83 ec 38 sub $0x38,%esp 10adbd: 8b 55 08 mov 0x8(%ebp),%edx 10adc0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10adc3: 31 c0 xor %eax,%eax 10adc5: 83 c9 ff or $0xffffffff,%ecx 10adc8: 89 d7 mov %edx,%edi 10adca: f2 ae repnz scas %es:(%edi),%al 10adcc: f7 d1 not %ecx 10adce: 49 dec %ecx 10adcf: 6a 01 push $0x1 10add1: 8d 75 d4 lea -0x2c(%ebp),%esi 10add4: 56 push %esi 10add5: 6a 00 push $0x0 10add7: 51 push %ecx 10add8: 52 push %edx 10add9: e8 a7 d0 ff ff call 107e85 10adde: 83 c4 20 add $0x20,%esp 10ade1: 83 cf ff or $0xffffffff,%edi 10ade4: 85 c0 test %eax,%eax 10ade6: 75 4f jne 10ae37 return -1; if ( !temp_loc.ops->utime_h ){ 10ade8: 8b 55 e0 mov -0x20(%ebp),%edx 10adeb: 8b 42 30 mov 0x30(%edx),%eax 10adee: 85 c0 test %eax,%eax 10adf0: 75 20 jne 10ae12 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 10adf2: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10adf5: 85 c0 test %eax,%eax <== NOT EXECUTED 10adf7: 74 09 je 10ae02 <== NOT EXECUTED 10adf9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10adfc: 56 push %esi <== NOT EXECUTED 10adfd: ff d0 call *%eax <== NOT EXECUTED 10adff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ae02: e8 c5 8a 00 00 call 1138cc <__errno> <== NOT EXECUTED 10ae07: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ae0d: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10ae10: eb 25 jmp 10ae37 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10ae12: 52 push %edx 10ae13: ff 73 04 pushl 0x4(%ebx) 10ae16: ff 33 pushl (%ebx) 10ae18: 56 push %esi 10ae19: ff d0 call *%eax 10ae1b: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &temp_loc ); 10ae1d: 8b 45 e0 mov -0x20(%ebp),%eax 10ae20: 83 c4 10 add $0x10,%esp 10ae23: 85 c0 test %eax,%eax 10ae25: 74 10 je 10ae37 <== NEVER TAKEN 10ae27: 8b 40 1c mov 0x1c(%eax),%eax 10ae2a: 85 c0 test %eax,%eax 10ae2c: 74 09 je 10ae37 <== NEVER TAKEN 10ae2e: 83 ec 0c sub $0xc,%esp 10ae31: 56 push %esi 10ae32: ff d0 call *%eax 10ae34: 83 c4 10 add $0x10,%esp return result; } 10ae37: 89 f8 mov %edi,%eax 10ae39: 8d 65 f4 lea -0xc(%ebp),%esp 10ae3c: 5b pop %ebx 10ae3d: 5e pop %esi 10ae3e: 5f pop %edi 10ae3f: c9 leave 10ae40: c3 ret =============================================================================== 00109d20 : */ void vprintk( const char *fmt, va_list ap ) { 109d20: 55 push %ebp 109d21: 89 e5 mov %esp,%ebp 109d23: 57 push %edi 109d24: 56 push %esi 109d25: 53 push %ebx 109d26: 83 ec 4c sub $0x4c,%esp 109d29: 8b 5d 08 mov 0x8(%ebp),%ebx 109d2c: 8b 75 0c mov 0xc(%ebp),%esi for (; *fmt != '\0'; fmt++) { 109d2f: e9 58 02 00 00 jmp 109f8c bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 109d34: 3c 25 cmp $0x25,%al 109d36: 74 0c je 109d44 BSP_output_char(*fmt); 109d38: 83 ec 0c sub $0xc,%esp 109d3b: 0f be c0 movsbl %al,%eax 109d3e: 50 push %eax 109d3f: e9 52 01 00 00 jmp 109e96 continue; } fmt++; 109d44: 43 inc %ebx if (*fmt == '0' ) { 109d45: c6 45 c4 20 movb $0x20,-0x3c(%ebp) 109d49: 80 3b 30 cmpb $0x30,(%ebx) 109d4c: 75 05 jne 109d53 lead = '0'; fmt++; 109d4e: 43 inc %ebx 109d4f: c6 45 c4 30 movb $0x30,-0x3c(%ebp) } if (*fmt == '-' ) { 109d53: 31 c9 xor %ecx,%ecx 109d55: 80 3b 2d cmpb $0x2d,(%ebx) 109d58: 75 03 jne 109d5d minus = true; fmt++; 109d5a: 43 inc %ebx 109d5b: b1 01 mov $0x1,%cl 109d5d: 31 ff xor %edi,%edi 109d5f: eb 0b jmp 109d6c } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 109d61: 6b ff 0a imul $0xa,%edi,%edi width += ((unsigned) *fmt - '0'); 109d64: 0f be d2 movsbl %dl,%edx 109d67: 8d 7c 17 d0 lea -0x30(%edi,%edx,1),%edi fmt++; 109d6b: 43 inc %ebx } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 109d6c: 8a 13 mov (%ebx),%dl 109d6e: 8d 42 d0 lea -0x30(%edx),%eax 109d71: 3c 09 cmp $0x9,%al 109d73: 76 ec jbe 109d61 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 109d75: c6 45 c0 00 movb $0x0,-0x40(%ebp) 109d79: 80 fa 6c cmp $0x6c,%dl 109d7c: 75 07 jne 109d85 lflag = true; c = *++fmt; 109d7e: 43 inc %ebx 109d7f: 8a 13 mov (%ebx),%dl 109d81: c6 45 c0 01 movb $0x1,-0x40(%ebp) } if ( c == 'c' ) { 109d85: 80 fa 63 cmp $0x63,%dl 109d88: 75 17 jne 109da1 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 109d8a: 8d 7e 04 lea 0x4(%esi),%edi BSP_output_char(chr); 109d8d: 83 ec 0c sub $0xc,%esp 109d90: 0f be 06 movsbl (%esi),%eax 109d93: 50 push %eax 109d94: ff 15 5c 22 12 00 call *0x12225c 109d9a: 89 fe mov %edi,%esi 109d9c: e9 fb 00 00 00 jmp 109e9c continue; } if ( c == 's' ) { 109da1: 80 fa 73 cmp $0x73,%dl 109da4: 0f 85 99 00 00 00 jne 109e43 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 109daa: 8d 46 04 lea 0x4(%esi),%eax 109dad: 89 45 c4 mov %eax,-0x3c(%ebp) 109db0: 8b 06 mov (%esi),%eax if ( str == NULL ) { 109db2: 85 c0 test %eax,%eax 109db4: 75 05 jne 109dbb 109db6: b8 b5 00 12 00 mov $0x1200b5,%eax 109dbb: 31 f6 xor %esi,%esi str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 109dbd: eb 01 jmp 109dc0 109dbf: 46 inc %esi 109dc0: 80 3c 30 00 cmpb $0x0,(%eax,%esi,1) 109dc4: 75 f9 jne 109dbf ; /* leading spaces */ if ( !minus ) 109dc6: 89 f2 mov %esi,%edx 109dc8: 84 c9 test %cl,%cl 109dca: 74 23 je 109def 109dcc: eb 25 jmp 109df3 for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { 109df3: 85 ff test %edi,%edi 109df5: 75 02 jne 109df9 109df7: 89 f7 mov %esi,%edi width = len; } /* output the string */ for ( i=0 ; i 109dfd: eb 1d jmp 109e1c BSP_output_char(*str); 109dff: 83 ec 0c sub $0xc,%esp 109e02: 0f be d2 movsbl %dl,%edx 109e05: 52 push %edx 109e06: 89 45 b0 mov %eax,-0x50(%ebp) 109e09: 88 4d ac mov %cl,-0x54(%ebp) 109e0c: ff 15 5c 22 12 00 call *0x12225c if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 109e22: 84 c9 test %cl,%cl 109e24: 75 14 jne 109e3a 109e26: e9 5d 01 00 00 jmp 109f88 for ( i=len ; i 109e3e: e9 45 01 00 00 jmp 109f88 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 109e43: 80 fa 4f cmp $0x4f,%dl 109e46: 74 5c je 109ea4 109e48: 80 fa 6f cmp $0x6f,%dl 109e4b: 74 57 je 109ea4 <== NEVER TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 109e4d: 80 fa 49 cmp $0x49,%dl 109e50: 74 5b je 109ead 109e52: 80 fa 69 cmp $0x69,%dl 109e55: 74 56 je 109ead 109e57: 80 fa 44 cmp $0x44,%dl 109e5a: 74 51 je 109ead 109e5c: 80 fa 64 cmp $0x64,%dl 109e5f: 74 4c je 109ead c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 109e61: 80 fa 55 cmp $0x55,%dl 109e64: 74 05 je 109e6b 109e66: 80 fa 75 cmp $0x75,%dl 109e69: 75 04 jne 109e6f 109e6b: 31 d2 xor %edx,%edx 109e6d: eb 40 jmp 109eaf base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 109e6f: 80 fa 58 cmp $0x58,%dl 109e72: 74 05 je 109e79 109e74: 80 fa 78 cmp $0x78,%dl 109e77: 75 04 jne 109e7d 109e79: 31 d2 xor %edx,%edx 109e7b: eb 0b jmp 109e88 base = 16; sign = false; } else if ( c == 'p' ) { 109e7d: 80 fa 70 cmp $0x70,%dl 109e80: 75 0d jne 109e8f 109e82: 31 d2 xor %edx,%edx 109e84: c6 45 c0 01 movb $0x1,-0x40(%ebp) 109e88: b9 10 00 00 00 mov $0x10,%ecx 109e8d: eb 25 jmp 109eb4 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 109e8f: 83 ec 0c sub $0xc,%esp 109e92: 0f be d2 movsbl %dl,%edx 109e95: 52 push %edx 109e96: ff 15 5c 22 12 00 call *0x12225c continue; 109e9c: 83 c4 10 add $0x10,%esp 109e9f: e9 e7 00 00 00 jmp 109f8b 109ea4: 31 d2 xor %edx,%edx 109ea6: b9 08 00 00 00 mov $0x8,%ecx 109eab: eb 07 jmp 109eb4 109ead: b2 01 mov $0x1,%dl 109eaf: b9 0a 00 00 00 mov $0xa,%ecx } printNum( 109eb4: 0f be 45 c4 movsbl -0x3c(%ebp),%eax 109eb8: 89 45 b4 mov %eax,-0x4c(%ebp) 109ebb: 8d 46 04 lea 0x4(%esi),%eax 109ebe: 89 45 c4 mov %eax,-0x3c(%ebp) 109ec1: 8b 06 mov (%esi),%eax 109ec3: 8b 75 c4 mov -0x3c(%ebp),%esi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 109ec6: 84 d2 test %dl,%dl 109ec8: 74 2b je 109ef5 109eca: 85 c0 test %eax,%eax 109ecc: 79 27 jns 109ef5 BSP_output_char('-'); 109ece: 83 ec 0c sub $0xc,%esp 109ed1: 6a 2d push $0x2d 109ed3: 89 45 b0 mov %eax,-0x50(%ebp) 109ed6: 89 4d ac mov %ecx,-0x54(%ebp) 109ed9: ff 15 5c 22 12 00 call *0x12225c unsigned_num = (unsigned long) -num; 109edf: 8b 45 b0 mov -0x50(%ebp),%eax 109ee2: f7 d8 neg %eax 109ee4: 89 45 c4 mov %eax,-0x3c(%ebp) if (maxwidth) maxwidth--; 109ee7: 83 c4 10 add $0x10,%esp 109eea: 83 ff 01 cmp $0x1,%edi 109eed: 83 d7 ff adc $0xffffffff,%edi 109ef0: 8b 4d ac mov -0x54(%ebp),%ecx 109ef3: eb 03 jmp 109ef8 } else { unsigned_num = (unsigned long) num; 109ef5: 89 45 c4 mov %eax,-0x3c(%ebp) 109ef8: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 109eff: eb 1f jmp 109f20 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 109f01: 8a 45 bc mov -0x44(%ebp),%al 109f04: f6 e1 mul %cl 109f06: 8a 55 c4 mov -0x3c(%ebp),%dl 109f09: 28 c2 sub %al,%dl 109f0b: 88 d0 mov %dl,%al 109f0d: 8b 55 c0 mov -0x40(%ebp),%edx 109f10: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109f14: 8b 45 b8 mov -0x48(%ebp),%eax 109f17: 89 45 c0 mov %eax,-0x40(%ebp) 109f1a: 8b 55 bc mov -0x44(%ebp),%edx 109f1d: 89 55 c4 mov %edx,-0x3c(%ebp) } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 109f20: 8b 45 c4 mov -0x3c(%ebp),%eax 109f23: 31 d2 xor %edx,%edx 109f25: f7 f1 div %ecx 109f27: 89 45 bc mov %eax,-0x44(%ebp) 109f2a: 85 c0 test %eax,%eax 109f2c: 8b 55 c0 mov -0x40(%ebp),%edx 109f2f: 8d 52 01 lea 0x1(%edx),%edx 109f32: 89 55 b8 mov %edx,-0x48(%ebp) 109f35: 75 ca jne 109f01 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 109f37: 8a 45 c4 mov -0x3c(%ebp),%al 109f3a: 8b 55 c0 mov -0x40(%ebp),%edx 109f3d: 88 44 15 d4 mov %al,-0x2c(%ebp,%edx,1) 109f41: eb 10 jmp 109f53 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 109f43: 83 ec 0c sub $0xc,%esp 109f46: ff 75 b4 pushl -0x4c(%ebp) 109f49: ff 15 5c 22 12 00 call *0x12225c toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 109f4f: 4f dec %edi 109f50: 83 c4 10 add $0x10,%esp 109f53: 3b 7d b8 cmp -0x48(%ebp),%edi 109f56: 77 eb ja 109f43 109f58: 8d 45 d4 lea -0x2c(%ebp),%eax 109f5b: 03 45 c0 add -0x40(%ebp),%eax 109f5e: 31 ff xor %edi,%edi 109f60: eb 1f jmp 109f81 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 109f62: 83 ec 0c sub $0xc,%esp 109f65: 0f be 10 movsbl (%eax),%edx 109f68: 0f be 92 b6 00 12 00 movsbl 0x1200b6(%edx),%edx 109f6f: 52 push %edx 109f70: 89 45 b0 mov %eax,-0x50(%ebp) 109f73: ff 15 5c 22 12 00 call *0x12225c toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 109f79: 47 inc %edi 109f7a: 8b 45 b0 mov -0x50(%ebp),%eax 109f7d: 48 dec %eax 109f7e: 83 c4 10 add $0x10,%esp 109f81: 3b 7d b8 cmp -0x48(%ebp),%edi 109f84: 72 dc jb 109f62 109f86: eb 03 jmp 109f8b 109f88: 8b 75 c4 mov -0x3c(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 109f8b: 43 inc %ebx 109f8c: 8a 03 mov (%ebx),%al 109f8e: 84 c0 test %al,%al 109f90: 0f 85 9e fd ff ff jne 109d34 sign, width, lead ); } } 109f96: 8d 65 f4 lea -0xc(%ebp),%esp 109f99: 5b pop %ebx 109f9a: 5e pop %esi 109f9b: 5f pop %edi 109f9c: c9 leave 109f9d: c3 ret =============================================================================== 0011e3f8 : ssize_t write( int fd, const void *buffer, size_t count ) { 11e3f8: 55 push %ebp 11e3f9: 89 e5 mov %esp,%ebp 11e3fb: 56 push %esi 11e3fc: 53 push %ebx 11e3fd: 8b 5d 08 mov 0x8(%ebp),%ebx 11e400: 8b 55 0c mov 0xc(%ebp),%edx 11e403: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11e406: 3b 1d 44 21 12 00 cmp 0x122144,%ebx 11e40c: 73 14 jae 11e422 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11e40e: c1 e3 06 shl $0x6,%ebx 11e411: 03 1d b8 60 12 00 add 0x1260b8,%ebx rtems_libio_check_is_open( iop ); 11e417: 8b 73 14 mov 0x14(%ebx),%esi 11e41a: f7 c6 00 01 00 00 test $0x100,%esi 11e420: 75 0d jne 11e42f <== ALWAYS TAKEN 11e422: e8 f9 45 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e427: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11e42d: eb 31 jmp 11e460 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 11e42f: 85 d2 test %edx,%edx 11e431: 74 0b je 11e43e <== NEVER TAKEN rtems_libio_check_count( count ); 11e433: 31 c0 xor %eax,%eax 11e435: 85 c9 test %ecx,%ecx 11e437: 74 44 je 11e47d rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11e439: 83 e6 04 and $0x4,%esi 11e43c: 75 0d jne 11e44b <== ALWAYS TAKEN 11e43e: e8 dd 45 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e443: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11e449: eb 15 jmp 11e460 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11e44b: 8b 43 3c mov 0x3c(%ebx),%eax 11e44e: 8b 40 0c mov 0xc(%eax),%eax 11e451: 85 c0 test %eax,%eax 11e453: 75 10 jne 11e465 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11e455: e8 c6 45 ff ff call 112a20 <__errno> <== NOT EXECUTED 11e45a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11e460: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11e463: eb 18 jmp 11e47d <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 11e465: 56 push %esi 11e466: 51 push %ecx 11e467: 52 push %edx 11e468: 53 push %ebx 11e469: ff d0 call *%eax if ( rc > 0 ) 11e46b: 83 c4 10 add $0x10,%esp 11e46e: 85 c0 test %eax,%eax 11e470: 7e 0b jle 11e47d <== NEVER TAKEN iop->offset += rc; 11e472: 89 c1 mov %eax,%ecx 11e474: c1 f9 1f sar $0x1f,%ecx 11e477: 01 43 0c add %eax,0xc(%ebx) 11e47a: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11e47d: 8d 65 f8 lea -0x8(%ebp),%esp 11e480: 5b pop %ebx 11e481: 5e pop %esi 11e482: c9 leave 11e483: c3 ret =============================================================================== 0010ac58 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10ac58: 55 push %ebp 10ac59: 89 e5 mov %esp,%ebp 10ac5b: 57 push %edi 10ac5c: 56 push %esi 10ac5d: 53 push %ebx 10ac5e: 83 ec 1c sub $0x1c,%esp 10ac61: 8b 75 08 mov 0x8(%ebp),%esi 10ac64: 8b 7d 0c mov 0xc(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10ac67: 3b 35 e4 4a 12 00 cmp 0x124ae4,%esi 10ac6d: 73 11 jae 10ac80 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10ac6f: c1 e6 06 shl $0x6,%esi 10ac72: 03 35 28 92 12 00 add 0x129228,%esi rtems_libio_check_is_open( iop ); 10ac78: 8b 46 14 mov 0x14(%esi),%eax 10ac7b: f6 c4 01 test $0x1,%ah 10ac7e: 75 10 jne 10ac90 10ac80: e8 3f 89 00 00 call 1135c4 <__errno> 10ac85: c7 00 09 00 00 00 movl $0x9,(%eax) 10ac8b: e9 a4 00 00 00 jmp 10ad34 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ac90: a8 04 test $0x4,%al 10ac92: 74 57 je 10aceb <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10ac94: 85 ff test %edi,%edi 10ac96: 74 53 je 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10ac98: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10ac9c: 7e 4d jle 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10ac9e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 10aca5: 7f 44 jg 10aceb <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10aca7: 8b 46 3c mov 0x3c(%esi),%eax 10acaa: 83 78 0c 00 cmpl $0x0,0xc(%eax) 10acae: 75 0d jne 10acbd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10acb0: e8 0f 89 00 00 call 1135c4 <__errno> 10acb5: c7 00 86 00 00 00 movl $0x86,(%eax) 10acbb: eb 77 jmp 10ad34 10acbd: b2 01 mov $0x1,%dl 10acbf: 31 c0 xor %eax,%eax 10acc1: 31 c9 xor %ecx,%ecx 10acc3: 89 75 e4 mov %esi,-0x1c(%ebp) * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 10acc6: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 10acca: 74 1f je 10aceb rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 10accc: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8) 10acd1: 0f 94 c3 sete %bl 10acd4: f7 db neg %ebx 10acd6: 21 da and %ebx,%edx all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10acd8: 8b 74 c7 04 mov 0x4(%edi,%eax,8),%esi 10acdc: 8d 1c 31 lea (%ecx,%esi,1),%ebx if ( total < old || total > SSIZE_MAX ) 10acdf: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx 10ace5: 7f 04 jg 10aceb <== NEVER TAKEN 10ace7: 39 cb cmp %ecx,%ebx 10ace9: 7d 0d jge 10acf8 rtems_set_errno_and_return_minus_one( EINVAL ); 10aceb: e8 d4 88 00 00 call 1135c4 <__errno> 10acf0: c7 00 16 00 00 00 movl $0x16,(%eax) 10acf6: eb 3c jmp 10ad34 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10acf8: 40 inc %eax 10acf9: 3b 45 10 cmp 0x10(%ebp),%eax 10acfc: 7d 04 jge 10ad02 10acfe: 89 d9 mov %ebx,%ecx 10ad00: eb c4 jmp 10acc6 10ad02: 8b 75 e4 mov -0x1c(%ebp),%esi } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10ad05: 31 db xor %ebx,%ebx 10ad07: 84 d2 test %dl,%dl 10ad09: 75 51 jne 10ad5c <== NEVER TAKEN 10ad0b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10ad12: 8b 55 e4 mov -0x1c(%ebp),%edx 10ad15: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax 10ad19: 85 c0 test %eax,%eax 10ad1b: 74 34 je 10ad51 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10ad1d: 52 push %edx 10ad1e: 8b 56 3c mov 0x3c(%esi),%edx 10ad21: 50 push %eax 10ad22: 8b 45 e4 mov -0x1c(%ebp),%eax 10ad25: ff 34 c7 pushl (%edi,%eax,8) 10ad28: 56 push %esi 10ad29: ff 52 0c call *0xc(%edx) if ( bytes < 0 ) 10ad2c: 83 c4 10 add $0x10,%esp 10ad2f: 83 f8 00 cmp $0x0,%eax 10ad32: 7d 05 jge 10ad39 <== ALWAYS TAKEN 10ad34: 83 cb ff or $0xffffffff,%ebx 10ad37: eb 23 jmp 10ad5c return -1; if ( bytes > 0 ) { 10ad39: 74 0d je 10ad48 <== NEVER TAKEN iop->offset += bytes; 10ad3b: 89 c1 mov %eax,%ecx 10ad3d: c1 f9 1f sar $0x1f,%ecx 10ad40: 01 46 0c add %eax,0xc(%esi) 10ad43: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 10ad46: 01 c3 add %eax,%ebx } if (bytes != iov[ v ].iov_len) 10ad48: 8b 55 e4 mov -0x1c(%ebp),%edx 10ad4b: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 10ad4f: 75 0b jne 10ad5c <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10ad51: ff 45 e4 incl -0x1c(%ebp) 10ad54: 8b 45 10 mov 0x10(%ebp),%eax 10ad57: 39 45 e4 cmp %eax,-0x1c(%ebp) 10ad5a: 7c b6 jl 10ad12 if (bytes != iov[ v ].iov_len) break; } return total; } 10ad5c: 89 d8 mov %ebx,%eax 10ad5e: 8d 65 f4 lea -0xc(%ebp),%esp 10ad61: 5b pop %ebx 10ad62: 5e pop %esi 10ad63: 5f pop %edi 10ad64: c9 leave 10ad65: c3 ret