=============================================================================== 0010fc68 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10fc68: 55 push %ebp 10fc69: 89 e5 mov %esp,%ebp 10fc6b: 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; 10fc6e: 8b 50 10 mov 0x10(%eax),%edx 10fc71: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10fc74: 8b 10 mov (%eax),%edx 10fc76: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10fc7a: 77 12 ja 10fc8e <== NEVER TAKEN 10fc7c: 8b 52 4c mov 0x4c(%edx),%edx 10fc7f: ff 24 95 54 1b 12 00 jmp *0x121b54(,%edx,4) 10fc86: 66 90 xchg %ax,%ax case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10fc88: 8b 51 0c mov 0xc(%ecx),%edx 10fc8b: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fc8e: 31 c0 xor %eax,%eax 10fc90: c9 leave 10fc91: c3 ret 10fc92: 66 90 xchg %ax,%ax break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10fc94: 8b 51 08 mov 0x8(%ecx),%edx 10fc97: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fc9a: 31 c0 xor %eax,%eax 10fc9c: c9 leave 10fc9d: c3 ret 10fc9e: 66 90 xchg %ax,%ax case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10fca0: c7 40 08 20 1d 12 00 movl $0x121d20,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fca7: 31 c0 xor %eax,%eax 10fca9: c9 leave 10fcaa: c3 ret 10fcab: 90 nop break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10fcac: c7 40 08 e0 1b 12 00 movl $0x121be0,0x8(%eax) break; } return 0; } 10fcb3: 31 c0 xor %eax,%eax 10fcb5: c9 leave 10fcb6: c3 ret 10fcb7: 90 nop switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10fcb8: c7 40 08 a0 1c 12 00 movl $0x121ca0,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fcbf: 31 c0 xor %eax,%eax 10fcc1: c9 leave 10fcc2: c3 ret =============================================================================== 0010fabc : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10fabc: 55 push %ebp 10fabd: 89 e5 mov %esp,%ebp 10fabf: 53 push %ebx 10fac0: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10fac3: 6a 64 push $0x64 10fac5: 6a 01 push $0x1 10fac7: e8 a0 88 ff ff call 10836c 10facc: 89 c3 mov %eax,%ebx if ( !node ) 10face: 83 c4 10 add $0x10,%esp 10fad1: 85 c0 test %eax,%eax 10fad3: 74 49 je 10fb1e <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10fad5: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10fadb: 8b 45 08 mov 0x8(%ebp),%eax 10fade: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10fae1: 51 push %ecx 10fae2: 6a 20 push $0x20 10fae4: ff 75 0c pushl 0xc(%ebp) 10fae7: 8d 43 0c lea 0xc(%ebx),%eax 10faea: 50 push %eax 10faeb: e8 7c 4f 00 00 call 114a6c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10faf0: 8b 45 10 mov 0x10(%ebp),%eax 10faf3: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 10faf6: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10fafc: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10fb02: 58 pop %eax 10fb03: 5a pop %edx 10fb04: 6a 00 push $0x0 10fb06: 8d 45 f0 lea -0x10(%ebp),%eax 10fb09: 50 push %eax 10fb0a: e8 f1 8a ff ff call 108600 node->stat_atime = (time_t) tv.tv_sec; 10fb0f: 8b 45 f0 mov -0x10(%ebp),%eax 10fb12: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10fb15: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10fb18: 89 43 48 mov %eax,0x48(%ebx) return node; 10fb1b: 83 c4 10 add $0x10,%esp } 10fb1e: 89 d8 mov %ebx,%eax 10fb20: 8b 5d fc mov -0x4(%ebp),%ebx 10fb23: c9 leave 10fb24: c3 ret =============================================================================== 0010fb5c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10fb5c: 55 push %ebp 10fb5d: 89 e5 mov %esp,%ebp 10fb5f: 57 push %edi 10fb60: 56 push %esi 10fb61: 53 push %ebx 10fb62: 83 ec 1c sub $0x1c,%esp 10fb65: 8b 5d 08 mov 0x8(%ebp),%ebx 10fb68: 8b 75 0c mov 0xc(%ebp),%esi 10fb6b: 8b 7d 18 mov 0x18(%ebp),%edi IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10fb6e: 85 db test %ebx,%ebx 10fb70: 75 0a jne 10fb7c <== ALWAYS TAKEN 10fb72: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10fb74: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fb77: 5b pop %ebx <== NOT EXECUTED 10fb78: 5e pop %esi <== NOT EXECUTED 10fb79: 5f pop %edi <== NOT EXECUTED 10fb7a: c9 leave <== NOT EXECUTED 10fb7b: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10fb7c: 50 push %eax 10fb7d: a1 24 50 12 00 mov 0x125024,%eax 10fb82: 8b 40 2c mov 0x2c(%eax),%eax 10fb85: f7 d0 not %eax 10fb87: 23 45 14 and 0x14(%ebp),%eax 10fb8a: 50 push %eax 10fb8b: ff 75 10 pushl 0x10(%ebp) 10fb8e: 56 push %esi 10fb8f: e8 28 ff ff ff call 10fabc if ( !node ) 10fb94: 83 c4 10 add $0x10,%esp 10fb97: 85 c0 test %eax,%eax 10fb99: 74 d9 je 10fb74 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10fb9b: 83 fe 07 cmp $0x7,%esi 10fb9e: 76 18 jbe 10fbb8 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 10fba0: 68 9a 14 12 00 push $0x12149a <== NOT EXECUTED 10fba5: 68 40 1b 12 00 push $0x121b40 <== NOT EXECUTED 10fbaa: 6a 5c push $0x5c <== NOT EXECUTED 10fbac: 68 d0 1a 12 00 push $0x121ad0 <== NOT EXECUTED 10fbb1: e8 8e 86 ff ff call 108244 <__assert_func> <== NOT EXECUTED 10fbb6: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 10fbb8: ff 24 b5 20 1b 12 00 jmp *0x121b20(,%esi,4) 10fbbf: 90 nop case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 10fbc0: 8b 17 mov (%edi),%edx 10fbc2: 89 50 50 mov %edx,0x50(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10fbc5: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 10fbc7: 8b 4b 10 mov 0x10(%ebx),%ecx 10fbca: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10fbcd: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10fbd0: 8b 4b 04 mov 0x4(%ebx),%ecx 10fbd3: 41 inc %ecx 10fbd4: 89 4b 04 mov %ecx,0x4(%ebx) 10fbd7: 89 48 38 mov %ecx,0x38(%eax) 10fbda: 83 ec 08 sub $0x8,%esp 10fbdd: 50 push %eax 10fbde: 83 c2 50 add $0x50,%edx 10fbe1: 52 push %edx 10fbe2: 89 45 e4 mov %eax,-0x1c(%ebp) 10fbe5: e8 8a c9 ff ff call 10c574 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10fbea: 83 c4 10 add $0x10,%esp 10fbed: 8b 45 e4 mov -0x1c(%ebp),%eax } 10fbf0: 8d 65 f4 lea -0xc(%ebp),%esp 10fbf3: 5b pop %ebx 10fbf4: 5e pop %esi 10fbf5: 5f pop %edi 10fbf6: c9 leave 10fbf7: c3 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10fbf8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10fbff: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10fc06: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10fc0d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10fc14: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10fc1b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10fc22: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10fc29: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10fc30: eb 93 jmp 10fbc5 10fc32: 66 90 xchg %ax,%ax case IMFS_FIFO: node->info.fifo.pipe = NULL; 10fc34: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10fc3b: eb 88 jmp 10fbc5 10fc3d: 8d 76 00 lea 0x0(%esi),%esi case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 10fc40: 8b 17 mov (%edi),%edx 10fc42: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10fc45: 8b 57 04 mov 0x4(%edi),%edx 10fc48: 89 50 54 mov %edx,0x54(%eax) break; 10fc4b: e9 75 ff ff ff jmp 10fbc5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fc50: 8d 50 54 lea 0x54(%eax),%edx 10fc53: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fc56: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fc5d: 8d 50 50 lea 0x50(%eax),%edx 10fc60: 89 50 58 mov %edx,0x58(%eax) 10fc63: e9 5d ff ff ff jmp 10fbc5 =============================================================================== 0010fb28 : IMFS_jnode_t *IMFS_create_root_node(void) { 10fb28: 55 push %ebp 10fb29: 89 e5 mov %esp,%ebp 10fb2b: 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) ); 10fb2e: 68 ed 41 00 00 push $0x41ed 10fb33: 68 55 17 12 00 push $0x121755 10fb38: 6a 01 push $0x1 10fb3a: e8 7d ff ff ff call 10fabc if ( !node ) 10fb3f: 83 c4 10 add $0x10,%esp 10fb42: 85 c0 test %eax,%eax 10fb44: 74 13 je 10fb59 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fb46: 8d 50 54 lea 0x54(%eax),%edx 10fb49: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fb4c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fb53: 8d 50 50 lea 0x50(%eax),%edx 10fb56: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10fb59: c9 leave 10fb5a: c3 ret =============================================================================== 00109d54 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 109d54: 55 push %ebp 109d55: 89 e5 mov %esp,%ebp 109d57: 57 push %edi 109d58: 56 push %esi 109d59: 53 push %ebx 109d5a: 83 ec 1c sub $0x1c,%esp 109d5d: 8b 45 08 mov 0x8(%ebp),%eax 109d60: 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 ); 109d63: 85 c0 test %eax,%eax 109d65: 74 7a je 109de1 <== NEVER TAKEN assert( level >= 0 ); 109d67: 85 f6 test %esi,%esi 109d69: 0f 88 a4 00 00 00 js 109e13 <== NEVER TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 109d6f: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109d73: 0f 85 81 00 00 00 jne 109dfa <== NEVER TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109d79: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 109d7c: 83 c0 54 add $0x54,%eax 109d7f: 89 45 e4 mov %eax,-0x1c(%ebp) 109d82: 39 c7 cmp %eax,%edi 109d84: 74 41 je 109dc7 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 ); 109d86: 8d 46 01 lea 0x1(%esi),%eax 109d89: 89 45 e0 mov %eax,-0x20(%ebp) for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 109d8c: 31 db xor %ebx,%ebx 109d8e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109d90: a1 c0 bc 12 00 mov 0x12bcc0,%eax 109d95: ff 70 08 pushl 0x8(%eax) 109d98: 6a 04 push $0x4 109d9a: 6a 01 push $0x1 109d9c: 68 f5 69 12 00 push $0x1269f5 109da1: e8 96 e7 00 00 call 11853c !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++ ) 109da6: 43 inc %ebx 109da7: 83 c4 10 add $0x10,%esp 109daa: 39 de cmp %ebx,%esi 109dac: 7d e2 jge 109d90 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 109dae: 83 ec 0c sub $0xc,%esp 109db1: 57 push %edi 109db2: e8 f5 fd ff ff call 109bac if ( the_jnode->type == IMFS_DIRECTORY ) 109db7: 83 c4 10 add $0x10,%esp 109dba: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109dbe: 74 10 je 109dd0 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 ) { 109dc0: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109dc2: 3b 7d e4 cmp -0x1c(%ebp),%edi 109dc5: 75 c5 jne 109d8c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109dc7: 8d 65 f4 lea -0xc(%ebp),%esp 109dca: 5b pop %ebx 109dcb: 5e pop %esi 109dcc: 5f pop %edi 109dcd: c9 leave 109dce: c3 ret 109dcf: 90 nop for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109dd0: 83 ec 08 sub $0x8,%esp 109dd3: ff 75 e0 pushl -0x20(%ebp) 109dd6: 57 push %edi 109dd7: e8 78 ff ff ff call 109d54 109ddc: 83 c4 10 add $0x10,%esp 109ddf: eb df jmp 109dc0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109de1: 68 dc 69 12 00 push $0x1269dc <== NOT EXECUTED 109de6: 68 24 6b 12 00 push $0x126b24 <== NOT EXECUTED 109deb: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109df0: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109df5: e8 8a 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 109dfa: 68 68 6a 12 00 push $0x126a68 <== NOT EXECUTED 109dff: 68 24 6b 12 00 push $0x126b24 <== NOT EXECUTED 109e04: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 109e09: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109e0e: e8 71 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 109e13: 68 ea 69 12 00 push $0x1269ea <== NOT EXECUTED 109e18: 68 24 6b 12 00 push $0x126b24 <== NOT EXECUTED 109e1d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 109e22: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109e27: e8 58 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED =============================================================================== 0010fdf8 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10fdf8: 55 push %ebp 10fdf9: 89 e5 mov %esp,%ebp 10fdfb: 57 push %edi 10fdfc: 56 push %esi 10fdfd: 53 push %ebx 10fdfe: 83 ec 5c sub $0x5c,%esp 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 ) ) { 10fe01: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10fe08: 0f 85 20 02 00 00 jne 11002e <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10fe0e: 8b 45 14 mov 0x14(%ebp),%eax 10fe11: 8b 38 mov (%eax),%edi 10fe13: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10fe1a: 8d 75 af lea -0x51(%ebp),%esi * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10fe1d: 8d 55 e4 lea -0x1c(%ebp),%edx 10fe20: 52 push %edx 10fe21: 56 push %esi 10fe22: ff 75 0c pushl 0xc(%ebp) 10fe25: 8b 45 08 mov 0x8(%ebp),%eax 10fe28: 03 45 a4 add -0x5c(%ebp),%eax 10fe2b: 50 push %eax 10fe2c: e8 cb 08 00 00 call 1106fc 10fe31: 89 c3 mov %eax,%ebx pathnamelen -= len; 10fe33: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10fe36: 8b 4d 14 mov 0x14(%ebp),%ecx 10fe39: 8b 01 mov (%ecx),%eax 10fe3b: 83 c4 10 add $0x10,%esp 10fe3e: 85 c0 test %eax,%eax 10fe40: 0f 84 e6 00 00 00 je 10ff2c <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10fe46: 29 55 0c sub %edx,0xc(%ebp) i += len; 10fe49: 01 55 a4 add %edx,-0x5c(%ebp) rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10fe4c: 85 db test %ebx,%ebx 10fe4e: 75 44 jne 10fe94 * 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 ) { 10fe50: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10fe54: 0f 84 26 01 00 00 je 10ff80 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10fe5a: 83 ec 0c sub $0xc,%esp 10fe5d: ff 75 14 pushl 0x14(%ebp) 10fe60: e8 03 fe ff ff call 10fc68 10fe65: 89 c3 mov %eax,%ebx 10fe67: 59 pop %ecx 10fe68: 5e pop %esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10fe69: ff 75 10 pushl 0x10(%ebp) 10fe6c: ff 75 14 pushl 0x14(%ebp) 10fe6f: e8 50 fe ff ff call 10fcc4 10fe74: 83 c4 10 add $0x10,%esp 10fe77: 85 c0 test %eax,%eax 10fe79: 0f 85 d1 00 00 00 jne 10ff50 rtems_set_errno_and_return_minus_one( EACCES ); 10fe7f: e8 98 3f 00 00 call 113e1c <__errno> 10fe84: c7 00 0d 00 00 00 movl $0xd,(%eax) 10fe8a: bb ff ff ff ff mov $0xffffffff,%ebx 10fe8f: e9 bc 00 00 00 jmp 10ff50 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10fe94: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10fe98: 0f 84 be 00 00 00 je 10ff5c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10fe9e: 89 c7 mov %eax,%edi switch( type ) { 10fea0: 83 fb 03 cmp $0x3,%ebx 10fea3: 74 1b je 10fec0 10fea5: 83 fb 04 cmp $0x4,%ebx 10fea8: 0f 84 92 00 00 00 je 10ff40 10feae: 83 fb 02 cmp $0x2,%ebx 10feb1: 74 51 je 10ff04 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10feb3: 83 fb 04 cmp $0x4,%ebx 10feb6: 0f 85 61 ff ff ff jne 10fe1d <== ALWAYS TAKEN 10febc: eb 92 jmp 10fe50 <== NOT EXECUTED 10febe: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10fec0: 8b 40 4c mov 0x4c(%eax),%eax 10fec3: 83 f8 03 cmp $0x3,%eax 10fec6: 0f 84 00 01 00 00 je 10ffcc node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10fecc: 83 f8 04 cmp $0x4,%eax 10fecf: 0f 84 2d 01 00 00 je 110002 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10fed5: 48 dec %eax 10fed6: 0f 85 11 01 00 00 jne 10ffed /* * 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 ) { 10fedc: 8b 47 5c mov 0x5c(%edi),%eax 10fedf: 85 c0 test %eax,%eax 10fee1: 0f 85 a4 00 00 00 jne 10ff8b /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10fee7: 83 ec 08 sub $0x8,%esp 10feea: 56 push %esi 10feeb: 57 push %edi 10feec: e8 7b 07 00 00 call 11066c 10fef1: 89 c7 mov %eax,%edi if ( !node ) 10fef3: 83 c4 10 add $0x10,%esp 10fef6: 85 c0 test %eax,%eax 10fef8: 74 32 je 10ff2c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10fefa: 8b 45 14 mov 0x14(%ebp),%eax 10fefd: 89 38 mov %edi,(%eax) break; 10feff: e9 19 ff ff ff jmp 10fe1d case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10ff04: 8b 15 24 50 12 00 mov 0x125024,%edx 10ff0a: 39 42 18 cmp %eax,0x18(%edx) 10ff0d: 0f 84 0a ff ff ff je 10fe1d /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10ff13: 8b 4d 14 mov 0x14(%ebp),%ecx 10ff16: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10ff19: 39 42 1c cmp %eax,0x1c(%edx) 10ff1c: 0f 84 01 01 00 00 je 110023 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10ff22: 8b 78 08 mov 0x8(%eax),%edi 10ff25: 85 ff test %edi,%edi 10ff27: 75 d1 jne 10fefa 10ff29: 8d 76 00 lea 0x0(%esi),%esi * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 10ff2c: e8 eb 3e 00 00 call 113e1c <__errno> 10ff31: c7 00 02 00 00 00 movl $0x2,(%eax) 10ff37: bb ff ff ff ff mov $0xffffffff,%ebx 10ff3c: eb 12 jmp 10ff50 10ff3e: 66 90 xchg %ax,%ax case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10ff40: e8 d7 3e 00 00 call 113e1c <__errno> 10ff45: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10ff4b: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ff50: 89 d8 mov %ebx,%eax 10ff52: 8d 65 f4 lea -0xc(%ebp),%esp 10ff55: 5b pop %ebx 10ff56: 5e pop %esi 10ff57: 5f pop %edi 10ff58: c9 leave 10ff59: c3 ret 10ff5a: 66 90 xchg %ax,%ax /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10ff5c: 83 ec 08 sub $0x8,%esp 10ff5f: 6a 01 push $0x1 10ff61: ff 75 14 pushl 0x14(%ebp) 10ff64: e8 5b fd ff ff call 10fcc4 10ff69: 83 c4 10 add $0x10,%esp 10ff6c: 85 c0 test %eax,%eax 10ff6e: 0f 84 0b ff ff ff je 10fe7f 10ff74: 8b 55 14 mov 0x14(%ebp),%edx 10ff77: 8b 02 mov (%edx),%eax 10ff79: e9 20 ff ff ff jmp 10fe9e 10ff7e: 66 90 xchg %ax,%ax * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 10ff80: 8b 40 5c mov 0x5c(%eax),%eax 10ff83: 85 c0 test %eax,%eax 10ff85: 0f 84 cf fe ff ff je 10fe5a newloc = node->info.directory.mt_fs->mt_fs_root; 10ff8b: 8d 7d d0 lea -0x30(%ebp),%edi 10ff8e: 8d 70 1c lea 0x1c(%eax),%esi 10ff91: b9 05 00 00 00 mov $0x5,%ecx 10ff96: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10ff98: 8d 75 d0 lea -0x30(%ebp),%esi 10ff9b: b1 05 mov $0x5,%cl 10ff9d: 8b 7d 14 mov 0x14(%ebp),%edi 10ffa0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10ffa2: 8b 55 e4 mov -0x1c(%ebp),%edx 10ffa5: 8b 4d 14 mov 0x14(%ebp),%ecx 10ffa8: 8b 41 0c mov 0xc(%ecx),%eax 10ffab: 51 push %ecx 10ffac: ff 75 10 pushl 0x10(%ebp) 10ffaf: 8b 4d 0c mov 0xc(%ebp),%ecx 10ffb2: 01 d1 add %edx,%ecx 10ffb4: 51 push %ecx 10ffb5: 8b 4d a4 mov -0x5c(%ebp),%ecx 10ffb8: 29 d1 sub %edx,%ecx 10ffba: 8b 55 08 mov 0x8(%ebp),%edx 10ffbd: 01 ca add %ecx,%edx 10ffbf: 52 push %edx 10ffc0: ff 10 call *(%eax) 10ffc2: 89 c3 mov %eax,%ebx 10ffc4: 83 c4 10 add $0x10,%esp 10ffc7: eb 87 jmp 10ff50 10ffc9: 8d 76 00 lea 0x0(%esi),%esi * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10ffcc: 83 ec 08 sub $0x8,%esp 10ffcf: 6a 00 push $0x0 10ffd1: ff 75 14 pushl 0x14(%ebp) 10ffd4: e8 27 fd ff ff call 10fd00 node = pathloc->node_access; 10ffd9: 8b 55 14 mov 0x14(%ebp),%edx 10ffdc: 8b 3a mov (%edx),%edi if ( !node ) 10ffde: 83 c4 10 add $0x10,%esp 10ffe1: 85 ff test %edi,%edi 10ffe3: 74 08 je 10ffed <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 10ffe5: 8b 47 4c mov 0x4c(%edi),%eax 10ffe8: e9 e8 fe ff ff jmp 10fed5 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10ffed: e8 2a 3e 00 00 call 113e1c <__errno> 10fff2: c7 00 14 00 00 00 movl $0x14,(%eax) 10fff8: bb ff ff ff ff mov $0xffffffff,%ebx 10fffd: e9 4e ff ff ff jmp 10ff50 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 110002: 83 ec 08 sub $0x8,%esp 110005: 6a 00 push $0x0 110007: ff 75 14 pushl 0x14(%ebp) 11000a: e8 4d fd ff ff call 10fd5c 11000f: 89 c3 mov %eax,%ebx node = pathloc->node_access; 110011: 8b 4d 14 mov 0x14(%ebp),%ecx 110014: 8b 39 mov (%ecx),%edi if ( result == -1 ) 110016: 83 c4 10 add $0x10,%esp 110019: 83 f8 ff cmp $0xffffffff,%eax 11001c: 75 c7 jne 10ffe5 <== ALWAYS TAKEN 11001e: e9 2d ff ff ff jmp 10ff50 <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 110023: 8d 7d d0 lea -0x30(%ebp),%edi 110026: 8d 72 08 lea 0x8(%edx),%esi 110029: e9 63 ff ff ff jmp 10ff91 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 11002e: 68 9a 14 12 00 push $0x12149a <== NOT EXECUTED 110033: 68 74 1b 12 00 push $0x121b74 <== NOT EXECUTED 110038: 68 f6 01 00 00 push $0x1f6 <== NOT EXECUTED 11003d: 68 84 1b 12 00 push $0x121b84 <== NOT EXECUTED 110042: e8 fd 81 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 001100f4 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 1100f4: 55 push %ebp 1100f5: 89 e5 mov %esp,%ebp 1100f7: 57 push %edi 1100f8: 56 push %esi 1100f9: 53 push %ebx 1100fa: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 1100fd: 8b 45 0c mov 0xc(%ebp),%eax 110100: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 110102: 31 c0 xor %eax,%eax 110104: b9 ff ff ff ff mov $0xffffffff,%ecx 110109: 8b 7d 08 mov 0x8(%ebp),%edi 11010c: f2 ae repnz scas %es:(%edi),%al 11010e: f7 d1 not %ecx 110110: 8d 71 ff lea -0x1(%ecx),%esi 110113: 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 ); 11011a: 8d 55 e4 lea -0x1c(%ebp),%edx 11011d: 52 push %edx 11011e: 8d 4d af lea -0x51(%ebp),%ecx 110121: 51 push %ecx 110122: 56 push %esi 110123: 8b 45 08 mov 0x8(%ebp),%eax 110126: 03 45 a4 add -0x5c(%ebp),%eax 110129: 50 push %eax 11012a: e8 cd 05 00 00 call 1106fc 11012f: 89 c7 mov %eax,%edi pathlen -= len; 110131: 8b 55 e4 mov -0x1c(%ebp),%edx 110134: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 110136: 8b 4d 0c mov 0xc(%ebp),%ecx 110139: 8b 01 mov (%ecx),%eax 11013b: 83 c4 10 add $0x10,%esp 11013e: 85 c0 test %eax,%eax 110140: 0f 84 35 01 00 00 je 11027b <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 110146: 85 ff test %edi,%edi 110148: 75 1a jne 110164 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 11014a: e8 cd 3c 00 00 call 113e1c <__errno> 11014f: c7 00 11 00 00 00 movl $0x11,(%eax) 110155: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 11015a: 89 d8 mov %ebx,%eax 11015c: 8d 65 f4 lea -0xc(%ebp),%esp 11015f: 5b pop %ebx 110160: 5e pop %esi 110161: 5f pop %edi 110162: c9 leave 110163: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 110164: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110168: 0f 84 ca 00 00 00 je 110238 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 11016e: 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; 110171: 89 c3 mov %eax,%ebx switch( type ) { 110173: 83 ff 02 cmp $0x2,%edi 110176: 0f 84 8c 00 00 00 je 110208 11017c: 76 26 jbe 1101a4 11017e: 83 ff 03 cmp $0x3,%edi 110181: 74 2d je 1101b0 110183: 83 ff 04 cmp $0x4,%edi 110186: 75 92 jne 11011a <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 110188: e8 8f 3c 00 00 call 113e1c <__errno> 11018d: c7 00 5b 00 00 00 movl $0x5b,(%eax) 110193: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 110198: 89 d8 mov %ebx,%eax 11019a: 8d 65 f4 lea -0xc(%ebp),%esp 11019d: 5b pop %ebx 11019e: 5e pop %esi 11019f: 5f pop %edi 1101a0: c9 leave 1101a1: c3 ret 1101a2: 66 90 xchg %ax,%ax if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 1101a4: 85 ff test %edi,%edi 1101a6: 74 a2 je 11014a <== NEVER TAKEN 1101a8: e9 6d ff ff ff jmp 11011a 1101ad: 8d 76 00 lea 0x0(%esi),%esi pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 1101b0: 8b 40 4c mov 0x4c(%eax),%eax 1101b3: 83 f8 03 cmp $0x3,%eax 1101b6: 0f 84 8e 01 00 00 je 11034a result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 1101bc: 83 f8 04 cmp $0x4,%eax 1101bf: 0f 84 a4 01 00 00 je 110369 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 1101c5: 85 db test %ebx,%ebx 1101c7: 0f 84 2f 01 00 00 je 1102fc <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 1101cd: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1101d1: 0f 85 25 01 00 00 jne 1102fc /* * 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 ) { 1101d7: 8b 43 5c mov 0x5c(%ebx),%eax 1101da: 85 c0 test %eax,%eax 1101dc: 0f 85 2f 01 00 00 jne 110311 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 1101e2: 83 ec 08 sub $0x8,%esp 1101e5: 8d 45 af lea -0x51(%ebp),%eax 1101e8: 50 push %eax 1101e9: 53 push %ebx 1101ea: e8 7d 04 00 00 call 11066c 1101ef: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 1101f1: 83 c4 10 add $0x10,%esp 1101f4: 85 c0 test %eax,%eax 1101f6: 0f 84 94 00 00 00 je 110290 done = true; else pathloc->node_access = node; 1101fc: 8b 55 0c mov 0xc(%ebp),%edx 1101ff: 89 02 mov %eax,(%edx) 110201: e9 14 ff ff ff jmp 11011a 110206: 66 90 xchg %ax,%ax case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 110208: 8b 15 24 50 12 00 mov 0x125024,%edx 11020e: 39 42 18 cmp %eax,0x18(%edx) 110211: 0f 84 03 ff ff ff je 11011a /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 110217: 8b 4d 0c mov 0xc(%ebp),%ecx 11021a: 8b 51 10 mov 0x10(%ecx),%edx 11021d: 39 42 1c cmp %eax,0x1c(%edx) 110220: 0f 84 62 01 00 00 je 110388 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 110226: 8b 58 08 mov 0x8(%eax),%ebx 110229: 85 db test %ebx,%ebx 11022b: 74 4e je 11027b rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 11022d: 8b 4d 0c mov 0xc(%ebp),%ecx 110230: 89 19 mov %ebx,(%ecx) break; 110232: e9 e3 fe ff ff jmp 11011a 110237: 90 nop * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 110238: 83 ec 08 sub $0x8,%esp 11023b: 6a 01 push $0x1 11023d: ff 75 0c pushl 0xc(%ebp) 110240: 89 55 a0 mov %edx,-0x60(%ebp) 110243: e8 7c fa ff ff call 10fcc4 110248: 83 c4 10 add $0x10,%esp 11024b: 85 c0 test %eax,%eax 11024d: 8b 55 a0 mov -0x60(%ebp),%edx 110250: 0f 84 91 00 00 00 je 1102e7 110256: 8b 4d 0c mov 0xc(%ebp),%ecx 110259: 8b 01 mov (%ecx),%eax 11025b: e9 0e ff ff ff jmp 11016e /* * 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++) { 110260: 8a 43 01 mov 0x1(%ebx),%al 110263: 43 inc %ebx 110264: 84 c0 test %al,%al 110266: 74 4c je 1102b4 if ( !IMFS_is_separator( path[ i ] ) ) 110268: 83 ec 0c sub $0xc,%esp 11026b: 0f be c0 movsbl %al,%eax 11026e: 50 push %eax 11026f: e8 c0 91 ff ff call 109434 110274: 83 c4 10 add $0x10,%esp 110277: 85 c0 test %eax,%eax 110279: 75 e5 jne 110260 rtems_set_errno_and_return_minus_one( ENOENT ); 11027b: e8 9c 3b 00 00 call 113e1c <__errno> 110280: c7 00 02 00 00 00 movl $0x2,(%eax) 110286: bb ff ff ff ff mov $0xffffffff,%ebx 11028b: e9 ca fe ff ff jmp 11015a case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 110290: 8b 45 a4 mov -0x5c(%ebp),%eax 110293: 2b 45 e4 sub -0x1c(%ebp),%eax 110296: 03 45 08 add 0x8(%ebp),%eax 110299: 8b 4d 10 mov 0x10(%ebp),%ecx 11029c: 89 01 mov %eax,(%ecx) /* * 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++) { 11029e: 8b 4d 08 mov 0x8(%ebp),%ecx 1102a1: 8b 55 a4 mov -0x5c(%ebp),%edx 1102a4: 8a 04 11 mov (%ecx,%edx,1),%al 1102a7: 84 c0 test %al,%al 1102a9: 74 09 je 1102b4 1102ab: 89 cb mov %ecx,%ebx 1102ad: 01 d3 add %edx,%ebx 1102af: eb b7 jmp 110268 1102b1: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 1102b4: 83 ec 0c sub $0xc,%esp 1102b7: ff 75 0c pushl 0xc(%ebp) 1102ba: e8 a9 f9 ff ff call 10fc68 1102bf: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 1102c1: 8b 55 0c mov 0xc(%ebp),%edx 1102c4: 8b 02 mov (%edx),%eax 1102c6: 83 c4 10 add $0x10,%esp 1102c9: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 1102cd: 75 2d jne 1102fc <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 1102cf: 83 ec 08 sub $0x8,%esp 1102d2: 6a 03 push $0x3 1102d4: ff 75 0c pushl 0xc(%ebp) 1102d7: e8 e8 f9 ff ff call 10fcc4 1102dc: 83 c4 10 add $0x10,%esp 1102df: 85 c0 test %eax,%eax 1102e1: 0f 85 73 fe ff ff jne 11015a rtems_set_errno_and_return_minus_one( EACCES ); 1102e7: e8 30 3b 00 00 call 113e1c <__errno> 1102ec: c7 00 0d 00 00 00 movl $0xd,(%eax) 1102f2: bb ff ff ff ff mov $0xffffffff,%ebx 1102f7: e9 5e fe ff ff jmp 11015a /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1102fc: e8 1b 3b 00 00 call 113e1c <__errno> 110301: c7 00 14 00 00 00 movl $0x14,(%eax) 110307: bb ff ff ff ff mov $0xffffffff,%ebx 11030c: e9 49 fe ff ff jmp 11015a * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 110311: 8d 7d d0 lea -0x30(%ebp),%edi 110314: 8d 70 1c lea 0x1c(%eax),%esi 110317: b9 05 00 00 00 mov $0x5,%ecx 11031c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 11031e: 8d 75 d0 lea -0x30(%ebp),%esi 110321: b1 05 mov $0x5,%cl 110323: 8b 7d 0c mov 0xc(%ebp),%edi 110326: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 110328: 57 push %edi 110329: 8b 4d 0c mov 0xc(%ebp),%ecx 11032c: 8b 41 0c mov 0xc(%ecx),%eax 11032f: ff 75 10 pushl 0x10(%ebp) 110332: 51 push %ecx 110333: 8b 55 a4 mov -0x5c(%ebp),%edx 110336: 2b 55 e4 sub -0x1c(%ebp),%edx 110339: 03 55 08 add 0x8(%ebp),%edx 11033c: 52 push %edx 11033d: ff 50 04 call *0x4(%eax) 110340: 89 c3 mov %eax,%ebx 110342: 83 c4 10 add $0x10,%esp 110345: e9 10 fe ff ff jmp 11015a case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 11034a: 83 ec 08 sub $0x8,%esp 11034d: 6a 00 push $0x0 11034f: ff 75 0c pushl 0xc(%ebp) 110352: e8 f1 fc ff ff call 110048 if ( result == -1 ) 110357: 83 c4 10 add $0x10,%esp 11035a: 83 f8 ff cmp $0xffffffff,%eax 11035d: 74 4d je 1103ac <== NEVER TAKEN 11035f: 8b 45 0c mov 0xc(%ebp),%eax 110362: 8b 18 mov (%eax),%ebx 110364: e9 5c fe ff ff jmp 1101c5 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 110369: 83 ec 08 sub $0x8,%esp 11036c: 6a 00 push $0x0 11036e: ff 75 0c pushl 0xc(%ebp) 110371: e8 d2 fc ff ff call 110048 if ( result == -1 ) 110376: 83 c4 10 add $0x10,%esp 110379: 83 f8 ff cmp $0xffffffff,%eax 11037c: 74 2e je 1103ac <== NEVER TAKEN 11037e: 8b 55 0c mov 0xc(%ebp),%edx 110381: 8b 1a mov (%edx),%ebx 110383: e9 3d fe ff ff jmp 1101c5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 110388: 8d 7d d0 lea -0x30(%ebp),%edi 11038b: 8d 72 08 lea 0x8(%edx),%esi 11038e: b9 05 00 00 00 mov $0x5,%ecx 110393: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 110395: 8d 75 d0 lea -0x30(%ebp),%esi 110398: b1 05 mov $0x5,%cl 11039a: 8b 7d 0c mov 0xc(%ebp),%edi 11039d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 11039f: 50 push %eax 1103a0: 8b 55 0c mov 0xc(%ebp),%edx 1103a3: 8b 42 0c mov 0xc(%edx),%eax 1103a6: ff 75 10 pushl 0x10(%ebp) 1103a9: 52 push %edx 1103aa: eb 87 jmp 110333 1103ac: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1103ae: e9 a7 fd ff ff jmp 11015a <== NOT EXECUTED =============================================================================== 0010fd00 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10fd00: 55 push %ebp 10fd01: 89 e5 mov %esp,%ebp 10fd03: 53 push %ebx 10fd04: 83 ec 04 sub $0x4,%esp 10fd07: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10fd0a: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10fd0c: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10fd10: 75 3c jne 10fd4e <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10fd12: 8b 40 50 mov 0x50(%eax),%eax 10fd15: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10fd17: 83 ec 0c sub $0xc,%esp 10fd1a: 53 push %ebx 10fd1b: e8 48 ff ff ff call 10fc68 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10fd20: 58 pop %eax 10fd21: 5a pop %edx 10fd22: ff 75 0c pushl 0xc(%ebp) 10fd25: 53 push %ebx 10fd26: e8 99 ff ff ff call 10fcc4 10fd2b: 83 c4 10 add $0x10,%esp 10fd2e: 85 c0 test %eax,%eax 10fd30: 74 0a je 10fd3c <== NEVER TAKEN 10fd32: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10fd34: 8b 5d fc mov -0x4(%ebp),%ebx 10fd37: c9 leave 10fd38: c3 ret 10fd39: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10fd3c: e8 db 40 00 00 call 113e1c <__errno> <== NOT EXECUTED 10fd41: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10fd47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fd4c: eb e6 jmp 10fd34 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10fd4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fd51: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10fd56: e8 85 c5 ff ff call 10c2e0 <== NOT EXECUTED =============================================================================== 00110048 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 110048: 55 push %ebp 110049: 89 e5 mov %esp,%ebp 11004b: 57 push %edi 11004c: 56 push %esi 11004d: 53 push %ebx 11004e: 83 ec 0c sub $0xc,%esp 110051: 8b 75 08 mov 0x8(%ebp),%esi 110054: 8b 7d 0c mov 0xc(%ebp),%edi 110057: 8b 15 24 50 12 00 mov 0x125024,%edx 11005d: eb 0e jmp 11006d 11005f: 90 nop */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 110060: 83 f8 04 cmp $0x4,%eax 110063: 74 53 je 1100b8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 110065: 83 e8 03 sub $0x3,%eax 110068: 83 f8 01 cmp $0x1,%eax 11006b: 77 3a ja 1100a7 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 11006d: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 11006f: 8b 42 30 mov 0x30(%edx),%eax 110072: 40 inc %eax 110073: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 110077: 66 83 f8 05 cmp $0x5,%ax 11007b: 77 57 ja 1100d4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 11007d: 8b 43 4c mov 0x4c(%ebx),%eax 110080: 83 f8 03 cmp $0x3,%eax 110083: 75 db jne 110060 result = IMFS_evaluate_hard_link( node, flags ); 110085: 83 ec 08 sub $0x8,%esp 110088: 57 push %edi 110089: 56 push %esi 11008a: e8 71 fc ff ff call 10fd00 11008f: 83 c4 10 add $0x10,%esp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 110092: 85 c0 test %eax,%eax 110094: 75 33 jne 1100c9 <== NEVER TAKEN 110096: 8b 43 4c mov 0x4c(%ebx),%eax 110099: 8b 15 24 50 12 00 mov 0x125024,%edx 11009f: 83 e8 03 sub $0x3,%eax 1100a2: 83 f8 01 cmp $0x1,%eax 1100a5: 76 c6 jbe 11006d <== ALWAYS TAKEN 1100a7: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 1100a9: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 1100af: 8d 65 f4 lea -0xc(%ebp),%esp 1100b2: 5b pop %ebx 1100b3: 5e pop %esi 1100b4: 5f pop %edi 1100b5: c9 leave 1100b6: c3 ret 1100b7: 90 nop if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 1100b8: 83 ec 08 sub $0x8,%esp 1100bb: 57 push %edi 1100bc: 56 push %esi 1100bd: e8 9a fc ff ff call 10fd5c 1100c2: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 1100c5: 85 c0 test %eax,%eax 1100c7: 74 cd je 110096 1100c9: 8b 15 24 50 12 00 mov 0x125024,%edx 1100cf: eb d8 jmp 1100a9 1100d1: 8d 76 00 lea 0x0(%esi),%esi * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 1100d4: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 1100da: e8 3d 3d 00 00 call 113e1c <__errno> 1100df: c7 00 5c 00 00 00 movl $0x5c,(%eax) 1100e5: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 1100ea: 8d 65 f4 lea -0xc(%ebp),%esp 1100ed: 5b pop %ebx 1100ee: 5e pop %esi 1100ef: 5f pop %edi 1100f0: c9 leave 1100f1: c3 ret =============================================================================== 0010fcc4 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10fcc4: 55 push %ebp 10fcc5: 89 e5 mov %esp,%ebp 10fcc7: 83 ec 08 sub $0x8,%esp 10fcca: 8b 45 0c mov 0xc(%ebp),%eax uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10fccd: a9 f8 ff ff ff test $0xfffffff8,%eax 10fcd2: 75 18 jne 10fcec <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10fcd4: c1 e0 06 shl $0x6,%eax 10fcd7: 8b 55 08 mov 0x8(%ebp),%edx 10fcda: 8b 12 mov (%edx),%edx 10fcdc: 8b 52 30 mov 0x30(%edx),%edx 10fcdf: 21 c2 and %eax,%edx 10fce1: 39 d0 cmp %edx,%eax 10fce3: 0f 94 c0 sete %al 10fce6: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10fce9: c9 leave 10fcea: c3 ret 10fceb: 90 nop gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10fcec: e8 2b 41 00 00 call 113e1c <__errno> <== NOT EXECUTED 10fcf1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10fcf7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10fcfc: c9 leave <== NOT EXECUTED 10fcfd: c3 ret <== NOT EXECUTED =============================================================================== 0010fd5c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10fd5c: 55 push %ebp 10fd5d: 89 e5 mov %esp,%ebp 10fd5f: 57 push %edi 10fd60: 56 push %esi 10fd61: 53 push %ebx 10fd62: 83 ec 1c sub $0x1c,%esp 10fd65: 8b 5d 08 mov 0x8(%ebp),%ebx 10fd68: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10fd6b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10fd6d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10fd71: 75 78 jne 10fdeb <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10fd73: 8b 47 08 mov 0x8(%edi),%eax 10fd76: 85 c0 test %eax,%eax 10fd78: 74 64 je 10fdde <== NEVER TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10fd7a: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10fd7c: 52 push %edx 10fd7d: 53 push %ebx 10fd7e: 8d 45 e4 lea -0x1c(%ebp),%eax 10fd81: 50 push %eax 10fd82: ff 77 50 pushl 0x50(%edi) 10fd85: e8 b2 11 00 00 call 110f3c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10fd8a: 8b 57 50 mov 0x50(%edi),%edx 10fd8d: 03 55 e4 add -0x1c(%ebp),%edx 10fd90: 31 c0 xor %eax,%eax 10fd92: b9 ff ff ff ff mov $0xffffffff,%ecx 10fd97: 89 d7 mov %edx,%edi 10fd99: f2 ae repnz scas %es:(%edi),%al 10fd9b: f7 d1 not %ecx 10fd9d: 49 dec %ecx 10fd9e: 53 push %ebx 10fd9f: 56 push %esi 10fda0: 51 push %ecx 10fda1: 52 push %edx 10fda2: e8 51 00 00 00 call 10fdf8 10fda7: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10fda9: 83 c4 14 add $0x14,%esp 10fdac: 53 push %ebx 10fdad: e8 b6 fe ff ff call 10fc68 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10fdb2: 59 pop %ecx 10fdb3: 58 pop %eax 10fdb4: 56 push %esi 10fdb5: 53 push %ebx 10fdb6: e8 09 ff ff ff call 10fcc4 10fdbb: 83 c4 10 add $0x10,%esp 10fdbe: 85 c0 test %eax,%eax 10fdc0: 74 0a je 10fdcc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10fdc2: 89 f8 mov %edi,%eax 10fdc4: 8d 65 f4 lea -0xc(%ebp),%esp 10fdc7: 5b pop %ebx 10fdc8: 5e pop %esi 10fdc9: 5f pop %edi 10fdca: c9 leave 10fdcb: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10fdcc: e8 4b 40 00 00 call 113e1c <__errno> <== NOT EXECUTED 10fdd1: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10fdd7: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10fddc: eb e4 jmp 10fdc2 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10fdde: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fde1: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10fde6: e8 f5 c4 ff ff call 10c2e0 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10fdeb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fdee: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10fdf3: e8 e8 c4 ff ff call 10c2e0 <== NOT EXECUTED =============================================================================== 00110528 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 110528: 55 push %ebp <== NOT EXECUTED 110529: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11052b: 57 push %edi <== NOT EXECUTED 11052c: 56 push %esi <== NOT EXECUTED 11052d: 53 push %ebx <== NOT EXECUTED 11052e: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 110531: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 110534: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 110537: 53 push %ebx <== NOT EXECUTED 110538: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 11053b: 50 push %eax <== NOT EXECUTED 11053c: e8 53 f0 ff ff call 10f594 <== NOT EXECUTED 110541: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 110543: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110546: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110549: 74 0d je 110558 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 11054b: 7c 37 jl 110584 <== NOT EXECUTED } 11054d: 89 f0 mov %esi,%eax <== NOT EXECUTED 11054f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 110552: 5b pop %ebx <== NOT EXECUTED 110553: 5e pop %esi <== NOT EXECUTED 110554: 5f pop %edi <== NOT EXECUTED 110555: c9 leave <== NOT EXECUTED 110556: c3 ret <== NOT EXECUTED 110557: 90 nop <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 110558: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 11055f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110562: 57 push %edi <== NOT EXECUTED 110563: e8 58 05 00 00 call 110ac0 <== NOT EXECUTED 110568: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11056b: 85 c0 test %eax,%eax <== NOT EXECUTED 11056d: 75 de jne 11054d <== NOT EXECUTED 11056f: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 110574: 75 d7 jne 11054d <== NOT EXECUTED free(jnode); 110576: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110579: 57 push %edi <== NOT EXECUTED 11057a: e8 05 80 ff ff call 108584 <== NOT EXECUTED 11057f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110582: eb c9 jmp 11054d <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 110584: e8 93 38 00 00 call 113e1c <__errno> <== NOT EXECUTED 110589: f7 de neg %esi <== NOT EXECUTED 11058b: 89 30 mov %esi,(%eax) <== NOT EXECUTED 11058d: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 110592: eb b9 jmp 11054d <== NOT EXECUTED =============================================================================== 001103f8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1103f8: 55 push %ebp <== NOT EXECUTED 1103f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1103fb: 53 push %ebx <== NOT EXECUTED 1103fc: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1103ff: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 110402: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 110405: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 110408: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 11040e: 74 1c je 11042c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 110410: 50 push %eax <== NOT EXECUTED 110411: 51 push %ecx <== NOT EXECUTED 110412: 52 push %edx <== NOT EXECUTED 110413: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 110416: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 110419: e8 72 ed ff ff call 10f190 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 11041e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110421: 85 c0 test %eax,%eax <== NOT EXECUTED 110423: 78 3e js 110463 <== NOT EXECUTED } 110425: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110428: c9 leave <== NOT EXECUTED 110429: c3 ret <== NOT EXECUTED 11042a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 11042c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 11042e: 74 20 je 110450 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 110430: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 110432: 85 d2 test %edx,%edx <== NOT EXECUTED 110434: 74 0e je 110444 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 110436: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 11043a: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 11043c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11043f: c9 leave <== NOT EXECUTED 110440: c3 ret <== NOT EXECUTED 110441: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110444: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 110448: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 11044a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11044d: c9 leave <== NOT EXECUTED 11044e: c3 ret <== NOT EXECUTED 11044f: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 110450: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 110455: e8 c2 39 00 00 call 113e1c <__errno> <== NOT EXECUTED 11045a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 11045c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110461: eb c2 jmp 110425 <== NOT EXECUTED 110463: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110465: f7 db neg %ebx <== NOT EXECUTED 110467: eb ec jmp 110455 <== NOT EXECUTED =============================================================================== 001103b4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 1103b4: 55 push %ebp <== NOT EXECUTED 1103b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1103b7: 53 push %ebx <== NOT EXECUTED 1103b8: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1103bb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 1103be: 50 push %eax <== NOT EXECUTED 1103bf: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 1103c2: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1103c5: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1103c8: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 1103cb: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 1103ce: e8 5d ed ff ff call 10f130 <== NOT EXECUTED 1103d3: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1103d5: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 1103d6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1103d9: 85 d2 test %edx,%edx <== NOT EXECUTED 1103db: 78 05 js 1103e2 <== NOT EXECUTED } 1103dd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1103e0: c9 leave <== NOT EXECUTED 1103e1: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 1103e2: e8 35 3a 00 00 call 113e1c <__errno> <== NOT EXECUTED 1103e7: f7 db neg %ebx <== NOT EXECUTED 1103e9: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1103eb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1103f0: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 1103f5: eb e6 jmp 1103dd <== NOT EXECUTED =============================================================================== 00110594 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110594: 55 push %ebp 110595: 89 e5 mov %esp,%ebp 110597: 53 push %ebx 110598: 83 ec 0c sub $0xc,%esp 11059b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 11059e: 50 push %eax 11059f: 8b 40 38 mov 0x38(%eax),%eax 1105a2: 83 c0 50 add $0x50,%eax 1105a5: 50 push %eax 1105a6: e8 fd f0 ff ff call 10f6a8 1105ab: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 1105ad: 83 c4 10 add $0x10,%esp 1105b0: 85 c0 test %eax,%eax 1105b2: 78 07 js 1105bb <== ALWAYS TAKEN } 1105b4: 89 d8 mov %ebx,%eax 1105b6: 8b 5d fc mov -0x4(%ebp),%ebx 1105b9: c9 leave 1105ba: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 1105bb: e8 5c 38 00 00 call 113e1c <__errno> 1105c0: f7 db neg %ebx 1105c2: 89 18 mov %ebx,(%eax) 1105c4: bb ff ff ff ff mov $0xffffffff,%ebx 1105c9: eb e9 jmp 1105b4 =============================================================================== 001104cc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1104cc: 55 push %ebp <== NOT EXECUTED 1104cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1104cf: 56 push %esi <== NOT EXECUTED 1104d0: 53 push %ebx <== NOT EXECUTED 1104d1: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1104d4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1104d7: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 1104da: 50 push %eax <== NOT EXECUTED 1104db: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1104de: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1104e1: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 1104e4: e8 eb ee ff ff call 10f3d4 <== NOT EXECUTED 1104e9: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 1104eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1104ee: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 1104f1: 7e 21 jle 110514 <== NOT EXECUTED IMFS_update_atime(jnode); 1104f3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1104f6: 6a 00 push $0x0 <== NOT EXECUTED 1104f8: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 1104fb: 50 push %eax <== NOT EXECUTED 1104fc: e8 ff 80 ff ff call 108600 <== NOT EXECUTED 110501: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 110504: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 110507: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 11050a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11050c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11050f: 5b pop %ebx <== NOT EXECUTED 110510: 5e pop %esi <== NOT EXECUTED 110511: c9 leave <== NOT EXECUTED 110512: c3 ret <== NOT EXECUTED 110513: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 110514: 74 f4 je 11050a <== NOT EXECUTED 110516: e8 01 39 00 00 call 113e1c <__errno> <== NOT EXECUTED 11051b: f7 db neg %ebx <== NOT EXECUTED 11051d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 11051f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 110524: eb e4 jmp 11050a <== NOT EXECUTED =============================================================================== 0011046c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 11046c: 55 push %ebp <== NOT EXECUTED 11046d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11046f: 56 push %esi <== NOT EXECUTED 110470: 53 push %ebx <== NOT EXECUTED 110471: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 110474: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 110477: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 11047a: 50 push %eax <== NOT EXECUTED 11047b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 11047e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110481: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 110484: e8 67 ed ff ff call 10f1f0 <== NOT EXECUTED 110489: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 11048b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11048e: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110491: 7e 25 jle 1104b8 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 110493: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110496: 6a 00 push $0x0 <== NOT EXECUTED 110498: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 11049b: 50 push %eax <== NOT EXECUTED 11049c: e8 5f 81 ff ff call 108600 <== NOT EXECUTED 1104a1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 1104a4: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 1104a7: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 1104aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 1104ad: 89 f0 mov %esi,%eax <== NOT EXECUTED 1104af: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1104b2: 5b pop %ebx <== NOT EXECUTED 1104b3: 5e pop %esi <== NOT EXECUTED 1104b4: c9 leave <== NOT EXECUTED 1104b5: c3 ret <== NOT EXECUTED 1104b6: 66 90 xchg %ax,%ax <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 1104b8: 74 f3 je 1104ad <== NOT EXECUTED 1104ba: e8 5d 39 00 00 call 113e1c <__errno> <== NOT EXECUTED 1104bf: f7 de neg %esi <== NOT EXECUTED 1104c1: 89 30 mov %esi,(%eax) <== NOT EXECUTED 1104c3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1104c8: eb e3 jmp 1104ad <== NOT EXECUTED =============================================================================== 0011066c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 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 0c sub $0xc,%esp 110675: 8b 45 08 mov 0x8(%ebp),%eax 110678: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 11067b: 85 c0 test %eax,%eax 11067d: 74 67 je 1106e6 <== NEVER TAKEN if ( !name ) 11067f: 85 db test %ebx,%ebx 110681: 74 2d je 1106b0 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 110683: bf 74 1c 12 00 mov $0x121c74,%edi 110688: b9 02 00 00 00 mov $0x2,%ecx 11068d: 89 de mov %ebx,%esi 11068f: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110691: 74 13 je 1106a6 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 110693: bf 76 1c 12 00 mov $0x121c76,%edi 110698: b9 03 00 00 00 mov $0x3,%ecx 11069d: 89 de mov %ebx,%esi 11069f: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1106a1: 75 19 jne 1106bc <== ALWAYS TAKEN return directory->Parent; 1106a3: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 1106a6: 8d 65 f4 lea -0xc(%ebp),%esp 1106a9: 5b pop %ebx 1106aa: 5e pop %esi 1106ab: 5f pop %edi 1106ac: c9 leave 1106ad: c3 ret 1106ae: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1106b0: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 1106b2: 8d 65 f4 lea -0xc(%ebp),%esp 1106b5: 5b pop %ebx 1106b6: 5e pop %esi 1106b7: 5f pop %edi 1106b8: c9 leave 1106b9: c3 ret 1106ba: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1106bc: 8b 70 50 mov 0x50(%eax),%esi 1106bf: 8d 78 54 lea 0x54(%eax),%edi 1106c2: 39 fe cmp %edi,%esi 1106c4: 75 08 jne 1106ce 1106c6: eb e8 jmp 1106b0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 1106c8: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1106ca: 39 fe cmp %edi,%esi 1106cc: 74 e2 je 1106b0 !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 ) ) 1106ce: 8d 46 0c lea 0xc(%esi),%eax 1106d1: 83 ec 08 sub $0x8,%esp 1106d4: 50 push %eax 1106d5: 53 push %ebx 1106d6: e8 09 42 00 00 call 1148e4 1106db: 83 c4 10 add $0x10,%esp 1106de: 85 c0 test %eax,%eax 1106e0: 75 e6 jne 1106c8 1106e2: 89 f0 mov %esi,%eax 1106e4: eb c0 jmp 1106a6 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 1106e6: 68 18 1c 12 00 push $0x121c18 <== NOT EXECUTED 1106eb: 68 79 1c 12 00 push $0x121c79 <== NOT EXECUTED 1106f0: 6a 2a push $0x2a <== NOT EXECUTED 1106f2: 68 24 1c 12 00 push $0x121c24 <== NOT EXECUTED 1106f7: e8 48 7b ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 001105d4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 1105d4: 55 push %ebp 1105d5: 89 e5 mov %esp,%ebp 1105d7: 57 push %edi 1105d8: 56 push %esi 1105d9: 53 push %ebx 1105da: 83 ec 3c sub $0x3c,%esp 1105dd: 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; 1105e0: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 1105e3: 8d 55 d4 lea -0x2c(%ebp),%edx 1105e6: 89 55 c4 mov %edx,-0x3c(%ebp) 1105e9: 8d 70 1c lea 0x1c(%eax),%esi 1105ec: b9 05 00 00 00 mov $0x5,%ecx 1105f1: 89 d7 mov %edx,%edi 1105f3: 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; 1105f5: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 1105fc: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 1105ff: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 110602: 83 ec 0c sub $0xc,%esp 110605: 8d 45 d4 lea -0x2c(%ebp),%eax 110608: 50 push %eax 110609: e8 5a f6 ff ff call 10fc68 if ( jnode->type != IMFS_DIRECTORY ) { 11060e: 83 c4 10 add $0x10,%esp 110611: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110615: 75 2d jne 110644 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110617: 8d 43 54 lea 0x54(%ebx),%eax 11061a: 39 43 50 cmp %eax,0x50(%ebx) 11061d: 74 3e je 11065d result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 11061f: 85 db test %ebx,%ebx 110621: 74 15 je 110638 if ( jnode->type == IMFS_DIRECTORY ) { 110623: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110627: 75 d3 jne 1105fc <== NEVER TAKEN 110629: 8d 43 54 lea 0x54(%ebx),%eax 11062c: 39 43 50 cmp %eax,0x50(%ebx) 11062f: 74 cb je 1105fc if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 110631: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 110634: 85 db test %ebx,%ebx 110636: 75 c4 jne 1105fc <== ALWAYS TAKEN 110638: 31 c0 xor %eax,%eax return 0; } 11063a: 8d 65 f4 lea -0xc(%ebp),%esp 11063d: 5b pop %ebx 11063e: 5e pop %esi 11063f: 5f pop %edi 110640: c9 leave 110641: c3 ret 110642: 66 90 xchg %ax,%ax next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 110644: 83 ec 08 sub $0x8,%esp 110647: 8d 55 d4 lea -0x2c(%ebp),%edx 11064a: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 11064b: 6a 00 push $0x0 11064d: e8 a2 79 ff ff call 107ff4 if (result != 0) 110652: 83 c4 10 add $0x10,%esp 110655: 85 c0 test %eax,%eax 110657: 75 0d jne 110666 <== NEVER TAKEN 110659: 89 f3 mov %esi,%ebx 11065b: eb c2 jmp 11061f result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 11065d: 83 ec 08 sub $0x8,%esp 110660: 8d 45 d4 lea -0x2c(%ebp),%eax 110663: 50 push %eax 110664: eb e5 jmp 11064b if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 110666: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110669: eb cf jmp 11063a <== NOT EXECUTED =============================================================================== 001106fc : const char *path, int pathlen, char *token, int *token_len ) { 1106fc: 55 push %ebp 1106fd: 89 e5 mov %esp,%ebp 1106ff: 57 push %edi 110700: 56 push %esi 110701: 53 push %ebx 110702: 83 ec 1c sub $0x1c,%esp 110705: 8b 7d 08 mov 0x8(%ebp),%edi 110708: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 11070b: 8a 17 mov (%edi),%dl 11070d: 31 f6 xor %esi,%esi 11070f: 89 7d e4 mov %edi,-0x1c(%ebp) 110712: 89 df mov %ebx,%edi 110714: 88 d3 mov %dl,%bl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 110716: eb 07 jmp 11071f return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 110718: 46 inc %esi 110719: 8b 45 e4 mov -0x1c(%ebp),%eax 11071c: 8a 1c 30 mov (%eax,%esi,1),%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 11071f: 83 ec 0c sub $0xc,%esp 110722: 0f be c3 movsbl %bl,%eax 110725: 50 push %eax 110726: e8 09 8d ff ff call 109434 11072b: 83 c4 10 add $0x10,%esp 11072e: 85 c0 test %eax,%eax 110730: 75 1a jne 11074c 110732: 3b 75 0c cmp 0xc(%ebp),%esi 110735: 7d 15 jge 11074c token[i] = c; 110737: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 11073a: 83 fe 20 cmp $0x20,%esi 11073d: 75 d9 jne 110718 11073f: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 110744: 8d 65 f4 lea -0xc(%ebp),%esp 110747: 5b pop %ebx 110748: 5e pop %esi 110749: 5f pop %edi 11074a: c9 leave 11074b: c3 ret 11074c: 88 da mov %bl,%dl 11074e: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 110750: 85 f6 test %esi,%esi 110752: 75 14 jne 110768 token[i] = c; 110754: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 110756: 84 d2 test %dl,%dl 110758: 74 07 je 110761 11075a: 8b 45 0c mov 0xc(%ebp),%eax 11075d: 85 c0 test %eax,%eax 11075f: 75 63 jne 1107c4 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 110761: 31 c0 xor %eax,%eax 110763: eb 68 jmp 1107cd 110765: 8d 76 00 lea 0x0(%esi),%esi i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 110768: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 11076d: 74 04 je 110773 <== NEVER TAKEN token[i] = '\0'; 11076f: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 110773: 8b 45 14 mov 0x14(%ebp),%eax 110776: 89 30 mov %esi,(%eax) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 110778: bf 90 1c 12 00 mov $0x121c90,%edi 11077d: b9 03 00 00 00 mov $0x3,%ecx 110782: 89 de mov %ebx,%esi 110784: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110786: 75 10 jne 110798 110788: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 11078d: 8d 65 f4 lea -0xc(%ebp),%esp 110790: 5b pop %ebx 110791: 5e pop %esi 110792: 5f pop %edi 110793: c9 leave 110794: c3 ret 110795: 8d 76 00 lea 0x0(%esi),%esi */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 110798: bf 91 1c 12 00 mov $0x121c91,%edi 11079d: b9 02 00 00 00 mov $0x2,%ecx 1107a2: 89 de mov %ebx,%esi 1107a4: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1107a6: 0f 97 c0 seta %al 1107a9: 0f 92 c2 setb %dl 1107ac: 28 d0 sub %dl,%al 1107ae: 0f be c0 movsbl %al,%eax 1107b1: 83 f8 01 cmp $0x1,%eax 1107b4: 19 c0 sbb %eax,%eax 1107b6: 83 e0 fe and $0xfffffffe,%eax 1107b9: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 1107bc: 8d 65 f4 lea -0xc(%ebp),%esp 1107bf: 5b pop %ebx 1107c0: 5e pop %esi 1107c1: 5f pop %edi 1107c2: c9 leave 1107c3: c3 ret */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 1107c4: b8 01 00 00 00 mov $0x1,%eax 1107c9: 66 be 01 00 mov $0x1,%si /* * Set token_len to the number of characters copied. */ *token_len = i; 1107cd: 8b 55 14 mov 0x14(%ebp),%edx 1107d0: 89 32 mov %esi,(%edx) 1107d2: e9 6d ff ff ff jmp 110744 =============================================================================== 00107c1c : 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 ) { 107c1c: 55 push %ebp 107c1d: 89 e5 mov %esp,%ebp 107c1f: 57 push %edi 107c20: 56 push %esi 107c21: 53 push %ebx 107c22: 83 ec 0c sub $0xc,%esp 107c25: 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, 107c28: 8b 0d 50 31 12 00 mov 0x123150,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107c2e: 83 f9 10 cmp $0x10,%ecx 107c31: 74 18 je 107c4b <== NEVER TAKEN 107c33: 31 d2 xor %edx,%edx 107c35: b8 20 00 00 00 mov $0x20,%eax 107c3a: 39 c1 cmp %eax,%ecx 107c3c: 74 0d je 107c4b 107c3e: d1 e0 shl %eax 107c40: 42 inc %edx 107c41: 83 fa 05 cmp $0x5,%edx 107c44: 75 f4 jne 107c3a <== ALWAYS TAKEN 107c46: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 107c4b: 89 0d 98 6e 12 00 mov %ecx,0x126e98 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 107c51: e8 d2 7e 00 00 call 10fb28 107c56: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 107c59: 8b 45 14 mov 0x14(%ebp),%eax 107c5c: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107c5f: 8b 45 0c mov 0xc(%ebp),%eax 107c62: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107c65: 8d 7b 38 lea 0x38(%ebx),%edi 107c68: be a0 1a 12 00 mov $0x121aa0,%esi 107c6d: b9 0c 00 00 00 mov $0xc,%ecx 107c72: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107c74: 83 ec 08 sub $0x8,%esp 107c77: 6a 10 push $0x10 107c79: 6a 01 push $0x1 107c7b: e8 ec 06 00 00 call 10836c if ( !fs_info ) { 107c80: 83 c4 10 add $0x10,%esp 107c83: 85 c0 test %eax,%eax 107c85: 74 3e je 107cc5 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 107c87: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 107c8a: 8b 15 9c 6e 12 00 mov 0x126e9c,%edx 107c90: 89 10 mov %edx,(%eax) 107c92: 42 inc %edx 107c93: 89 15 9c 6e 12 00 mov %edx,0x126e9c fs_info->ino_count = 1; 107c99: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 107ca0: 8b 55 10 mov 0x10(%ebp),%edx 107ca3: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 107ca6: 8b 55 14 mov 0x14(%ebp),%edx 107ca9: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 107cac: 8b 43 1c mov 0x1c(%ebx),%eax 107caf: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 107cb6: e8 81 74 00 00 call 10f13c 107cbb: 31 c0 xor %eax,%eax return 0; } 107cbd: 8d 65 f4 lea -0xc(%ebp),%esp 107cc0: 5b pop %ebx 107cc1: 5e pop %esi 107cc2: 5f pop %edi 107cc3: c9 leave 107cc4: c3 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 107cc5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cc8: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 107ccb: e8 b4 08 00 00 call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107cd0: e8 47 c1 00 00 call 113e1c <__errno> <== NOT EXECUTED 107cd5: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107cdb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ce0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ce3: eb d8 jmp 107cbd <== NOT EXECUTED =============================================================================== 00107ce8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107ce8: 55 push %ebp 107ce9: 89 e5 mov %esp,%ebp 107ceb: 57 push %edi 107cec: 53 push %ebx 107ced: 83 ec 50 sub $0x50,%esp 107cf0: 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; 107cf3: 8b 45 08 mov 0x8(%ebp),%eax 107cf6: 8b 00 mov (%eax),%eax 107cf8: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107cfb: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107d00: 77 66 ja 107d68 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107d02: 31 c0 xor %eax,%eax 107d04: b9 ff ff ff ff mov $0xffffffff,%ecx 107d09: 89 d7 mov %edx,%edi 107d0b: f2 ae repnz scas %es:(%edi),%al 107d0d: f7 d1 not %ecx 107d0f: 49 dec %ecx 107d10: 8d 45 f4 lea -0xc(%ebp),%eax 107d13: 50 push %eax 107d14: 8d 5d b7 lea -0x49(%ebp),%ebx 107d17: 53 push %ebx 107d18: 51 push %ecx 107d19: 52 push %edx 107d1a: e8 dd 89 00 00 call 1106fc * 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( 107d1f: 8d 45 d8 lea -0x28(%ebp),%eax 107d22: 89 04 24 mov %eax,(%esp) 107d25: 68 ff a1 00 00 push $0xa1ff 107d2a: 53 push %ebx 107d2b: 6a 03 push $0x3 107d2d: ff 75 0c pushl 0xc(%ebp) 107d30: e8 27 7e 00 00 call 10fb5c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107d35: 83 c4 20 add $0x20,%esp 107d38: 85 c0 test %eax,%eax 107d3a: 74 3e je 107d7a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107d3c: 8b 45 d8 mov -0x28(%ebp),%eax 107d3f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107d43: 83 ec 08 sub $0x8,%esp 107d46: 6a 00 push $0x0 107d48: 8d 45 ec lea -0x14(%ebp),%eax 107d4b: 50 push %eax 107d4c: e8 af 08 00 00 call 108600 107d51: 8b 55 ec mov -0x14(%ebp),%edx 107d54: 8b 45 d8 mov -0x28(%ebp),%eax 107d57: 89 50 48 mov %edx,0x48(%eax) 107d5a: 31 c0 xor %eax,%eax return 0; 107d5c: 83 c4 10 add $0x10,%esp } 107d5f: 8d 65 f8 lea -0x8(%ebp),%esp 107d62: 5b pop %ebx 107d63: 5f pop %edi 107d64: c9 leave 107d65: c3 ret 107d66: 66 90 xchg %ax,%ax /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 107d68: e8 af c0 00 00 call 113e1c <__errno> 107d6d: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107d73: b8 ff ff ff ff mov $0xffffffff,%eax 107d78: eb e5 jmp 107d5f ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d7a: e8 9d c0 00 00 call 113e1c <__errno> <== NOT EXECUTED 107d7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d85: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d8a: eb d3 jmp 107d5f <== NOT EXECUTED =============================================================================== 00112640 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 112640: 55 push %ebp 112641: 89 e5 mov %esp,%ebp 112643: 53 push %ebx 112644: 83 ec 04 sub $0x4,%esp 112647: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11264a: 85 c0 test %eax,%eax 11264c: 74 50 je 11269e <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11264e: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 112652: 75 31 jne 112685 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 112654: 52 push %edx 112655: 6a 01 push $0x1 112657: ff 75 0c pushl 0xc(%ebp) 11265a: 50 push %eax 11265b: e8 b8 fa ff ff call 112118 112660: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 112662: 83 c4 10 add $0x10,%esp 112665: 8b 00 mov (%eax),%eax 112667: 85 c0 test %eax,%eax 112669: 74 09 je 112674 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 11266b: 31 c0 xor %eax,%eax return 0; } 11266d: 8b 5d fc mov -0x4(%ebp),%ebx 112670: c9 leave 112671: c3 ret 112672: 66 90 xchg %ax,%ax #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 112674: e8 7b fa ff ff call 1120f4 if ( !memory ) 112679: 85 c0 test %eax,%eax 11267b: 74 04 je 112681 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 11267d: 89 03 mov %eax,(%ebx) 11267f: eb ea jmp 11266b fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 112681: b0 01 mov $0x1,%al <== NOT EXECUTED 112683: eb e8 jmp 11266d <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112685: 68 d8 1e 12 00 push $0x121ed8 <== NOT EXECUTED 11268a: 68 d7 1f 12 00 push $0x121fd7 <== NOT EXECUTED 11268f: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 112694: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112699: e8 a6 5b ff ff call 108244 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11269e: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 1126a3: 68 d7 1f 12 00 push $0x121fd7 <== NOT EXECUTED 1126a8: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 1126ad: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 1126b2: e8 8d 5b ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 001126b8 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1126b8: 55 push %ebp 1126b9: 89 e5 mov %esp,%ebp 1126bb: 57 push %edi 1126bc: 56 push %esi 1126bd: 53 push %ebx 1126be: 83 ec 2c sub $0x2c,%esp 1126c1: 8b 5d 08 mov 0x8(%ebp),%ebx 1126c4: 8b 45 0c mov 0xc(%ebp),%eax 1126c7: 8b 55 10 mov 0x10(%ebp),%edx 1126ca: 89 45 d8 mov %eax,-0x28(%ebp) 1126cd: 89 55 dc mov %edx,-0x24(%ebp) /* * Perform internal consistency checks */ assert( the_jnode ); 1126d0: 85 db test %ebx,%ebx 1126d2: 0f 84 29 01 00 00 je 112801 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1126d8: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1126dc: 0f 85 06 01 00 00 jne 1127e8 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 1126e2: a1 98 6e 12 00 mov 0x126e98,%eax 1126e7: 89 c1 mov %eax,%ecx 1126e9: c1 e9 02 shr $0x2,%ecx 1126ec: 8d 51 01 lea 0x1(%ecx),%edx 1126ef: 0f af d1 imul %ecx,%edx 1126f2: 42 inc %edx 1126f3: 0f af d1 imul %ecx,%edx 1126f6: 4a dec %edx 1126f7: 0f af d0 imul %eax,%edx 1126fa: 31 c9 xor %ecx,%ecx 1126fc: 3b 4d dc cmp -0x24(%ebp),%ecx 1126ff: 7f 1c jg 11271d <== NEVER TAKEN 112701: 7d 15 jge 112718 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 112703: e8 14 17 00 00 call 113e1c <__errno> <== NOT EXECUTED 112708: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11270e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112713: e9 9e 00 00 00 jmp 1127b6 <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 112718: 3b 55 d8 cmp -0x28(%ebp),%edx 11271b: 76 e6 jbe 112703 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 11271d: 8b 53 50 mov 0x50(%ebx),%edx 112720: 8b 4b 54 mov 0x54(%ebx),%ecx 112723: 89 55 e0 mov %edx,-0x20(%ebp) 112726: 89 4d e4 mov %ecx,-0x1c(%ebp) 112729: 39 4d dc cmp %ecx,-0x24(%ebp) 11272c: 0f 8e 8e 00 00 00 jle 1127c0 <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 112732: 89 45 d0 mov %eax,-0x30(%ebp) 112735: 89 c1 mov %eax,%ecx 112737: c1 f9 1f sar $0x1f,%ecx 11273a: 89 4d d4 mov %ecx,-0x2c(%ebp) 11273d: ff 75 d4 pushl -0x2c(%ebp) 112740: ff 75 d0 pushl -0x30(%ebp) 112743: ff 75 dc pushl -0x24(%ebp) 112746: ff 75 d8 pushl -0x28(%ebp) 112749: e8 0e c7 00 00 call 11ee5c <__divdi3> 11274e: 83 c4 10 add $0x10,%esp 112751: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 112753: ff 75 d4 pushl -0x2c(%ebp) 112756: ff 75 d0 pushl -0x30(%ebp) 112759: ff 75 e4 pushl -0x1c(%ebp) 11275c: ff 75 e0 pushl -0x20(%ebp) 11275f: e8 f8 c6 00 00 call 11ee5c <__divdi3> 112764: 83 c4 10 add $0x10,%esp 112767: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 11276a: 39 c6 cmp %eax,%esi 11276c: 72 6a jb 1127d8 <== NEVER TAKEN 11276e: 89 c7 mov %eax,%edi 112770: eb 07 jmp 112779 112772: 66 90 xchg %ax,%ax 112774: 47 inc %edi 112775: 39 fe cmp %edi,%esi 112777: 72 5f jb 1127d8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 112779: 83 ec 08 sub $0x8,%esp 11277c: 57 push %edi 11277d: 53 push %ebx 11277e: e8 bd fe ff ff call 112640 112783: 83 c4 10 add $0x10,%esp 112786: 85 c0 test %eax,%eax 112788: 74 ea je 112774 <== ALWAYS TAKEN for ( ; block>=old_blocks ; block-- ) { 11278a: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 11278d: 77 17 ja 1127a6 <== NOT EXECUTED 11278f: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 112792: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 112794: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112797: 57 push %edi <== NOT EXECUTED 112798: 53 push %ebx <== NOT EXECUTED 112799: e8 d6 fb ff ff call 112374 <== 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-- ) { 11279e: 4f dec %edi <== NOT EXECUTED 11279f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1127a2: 39 fe cmp %edi,%esi <== NOT EXECUTED 1127a4: 76 ee jbe 112794 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1127a6: e8 71 16 00 00 call 113e1c <__errno> <== NOT EXECUTED 1127ab: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1127b1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 1127b6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1127b9: 5b pop %ebx <== NOT EXECUTED 1127ba: 5e pop %esi <== NOT EXECUTED 1127bb: 5f pop %edi <== NOT EXECUTED 1127bc: c9 leave <== NOT EXECUTED 1127bd: c3 ret <== NOT EXECUTED 1127be: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 1127c0: 7c 09 jl 1127cb <== NEVER TAKEN 1127c2: 39 55 d8 cmp %edx,-0x28(%ebp) 1127c5: 0f 87 67 ff ff ff ja 112732 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1127cb: 31 c0 xor %eax,%eax return 0; } 1127cd: 8d 65 f4 lea -0xc(%ebp),%esp 1127d0: 5b pop %ebx 1127d1: 5e pop %esi 1127d2: 5f pop %edi 1127d3: c9 leave 1127d4: c3 ret 1127d5: 8d 76 00 lea 0x0(%esi),%esi /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1127d8: 8b 45 d8 mov -0x28(%ebp),%eax 1127db: 8b 55 dc mov -0x24(%ebp),%edx 1127de: 89 43 50 mov %eax,0x50(%ebx) 1127e1: 89 53 54 mov %edx,0x54(%ebx) 1127e4: 31 c0 xor %eax,%eax 1127e6: eb e5 jmp 1127cd assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1127e8: 68 d8 1e 12 00 push $0x121ed8 <== NOT EXECUTED 1127ed: 68 ed 1f 12 00 push $0x121fed <== NOT EXECUTED 1127f2: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 1127f7: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 1127fc: e8 43 5a ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112801: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 112806: 68 ed 1f 12 00 push $0x121fed <== NOT EXECUTED 11280b: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 112810: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112815: e8 2a 5a ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112118 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 112118: 55 push %ebp 112119: 89 e5 mov %esp,%ebp 11211b: 57 push %edi 11211c: 56 push %esi 11211d: 53 push %ebx 11211e: 83 ec 1c sub $0x1c,%esp 112121: 8b 5d 08 mov 0x8(%ebp),%ebx 112124: 8b 7d 0c mov 0xc(%ebp),%edi 112127: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 11212a: 85 db test %ebx,%ebx 11212c: 0f 84 59 01 00 00 je 11228b <== NEVER TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112132: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 112136: 0f 85 68 01 00 00 jne 1122a4 <== NEVER TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 11213c: 8b 0d 98 6e 12 00 mov 0x126e98,%ecx 112142: c1 e9 02 shr $0x2,%ecx 112145: 8d 41 ff lea -0x1(%ecx),%eax 112148: 39 c7 cmp %eax,%edi 11214a: 76 44 jbe 112190 <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 11214c: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 11214f: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 112152: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 112155: 39 d7 cmp %edx,%edi <== NOT EXECUTED 112157: 77 57 ja 1121b0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 112159: 89 f8 mov %edi,%eax <== NOT EXECUTED 11215b: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 11215d: 31 d2 xor %edx,%edx <== NOT EXECUTED 11215f: f7 f1 div %ecx <== NOT EXECUTED 112161: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 112163: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 112166: 85 f6 test %esi,%esi <== NOT EXECUTED 112168: 0f 84 96 00 00 00 je 112204 <== NOT EXECUTED if ( !p ) { 11216e: 85 c0 test %eax,%eax <== NOT EXECUTED 112170: 0f 84 dd 00 00 00 je 112253 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 112176: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112179: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 11217b: 85 c0 test %eax,%eax <== NOT EXECUTED 11217d: 0f 84 ba 00 00 00 je 11223d <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 112183: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112186: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112189: 5b pop %ebx <== NOT EXECUTED 11218a: 5e pop %esi <== NOT EXECUTED 11218b: 5f pop %edi <== NOT EXECUTED 11218c: c9 leave <== NOT EXECUTED 11218d: c3 ret <== NOT EXECUTED 11218e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 112190: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 112193: 85 f6 test %esi,%esi 112195: 0f 84 85 00 00 00 je 112220 if ( !p ) { 11219b: 85 c0 test %eax,%eax 11219d: 0f 84 89 00 00 00 je 11222c p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 1121a3: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 1121a6: 8d 65 f4 lea -0xc(%ebp),%esp 1121a9: 5b pop %ebx 1121aa: 5e pop %esi 1121ab: 5f pop %edi 1121ac: c9 leave 1121ad: c3 ret 1121ae: 66 90 xchg %ax,%ax #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 1121b0: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 1121b3: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 1121b6: 4a dec %edx <== NOT EXECUTED 1121b7: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1121b9: 77 59 ja 112214 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 1121bb: 29 c7 sub %eax,%edi <== NOT EXECUTED 1121bd: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1121bf: 31 d2 xor %edx,%edx <== NOT EXECUTED 1121c1: f7 f1 div %ecx <== NOT EXECUTED 1121c3: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 1121c5: 31 d2 xor %edx,%edx <== NOT EXECUTED 1121c7: f7 f1 div %ecx <== NOT EXECUTED 1121c9: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 1121cb: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1121ce: 85 f6 test %esi,%esi <== NOT EXECUTED 1121d0: 0f 84 9a 00 00 00 je 112270 <== NOT EXECUTED if ( !p ) { 1121d6: 85 c0 test %eax,%eax <== NOT EXECUTED 1121d8: 0f 84 df 00 00 00 je 1122bd <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 1121de: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 1121e1: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1121e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1121e5: 0f 84 f3 00 00 00 je 1122de <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 1121eb: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 1121ee: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 1121f0: 85 c0 test %eax,%eax <== NOT EXECUTED 1121f2: 75 af jne 1121a3 <== NOT EXECUTED p2 = memfile_alloc_block(); 1121f4: e8 fb fe ff ff call 1120f4 <== NOT EXECUTED if ( !p2 ) 1121f9: 85 c0 test %eax,%eax <== NOT EXECUTED 1121fb: 74 17 je 112214 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 1121fd: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 1121ff: eb a2 jmp 1121a3 <== NOT EXECUTED 112201: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 112204: 85 c0 test %eax,%eax <== NOT EXECUTED 112206: 74 0c je 112214 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 112208: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 11220b: 85 c0 test %eax,%eax <== NOT EXECUTED 11220d: 0f 85 70 ff ff ff jne 112183 <== NOT EXECUTED 112213: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112214: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112216: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112219: 5b pop %ebx <== NOT EXECUTED 11221a: 5e pop %esi <== NOT EXECUTED 11221b: 5f pop %edi <== NOT EXECUTED 11221c: c9 leave <== NOT EXECUTED 11221d: c3 ret <== NOT EXECUTED 11221e: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 112220: 85 c0 test %eax,%eax 112222: 0f 85 7b ff ff ff jne 1121a3 <== ALWAYS TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112228: 31 c0 xor %eax,%eax 11222a: eb ea jmp 112216 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 11222c: e8 c3 fe ff ff call 1120f4 if ( !p ) 112231: 85 c0 test %eax,%eax 112233: 74 df je 112214 <== NEVER TAKEN return 0; info->indirect = p; 112235: 89 43 58 mov %eax,0x58(%ebx) 112238: e9 66 ff ff ff jmp 1121a3 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 11223d: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112240: e8 af fe ff ff call 1120f4 <== NOT EXECUTED if ( !p1 ) 112245: 85 c0 test %eax,%eax <== NOT EXECUTED 112247: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11224a: 74 c8 je 112214 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 11224c: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 11224e: e9 30 ff ff ff jmp 112183 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112253: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112256: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 112259: e8 96 fe ff ff call 1120f4 <== NOT EXECUTED if ( !p ) 11225e: 85 c0 test %eax,%eax <== NOT EXECUTED 112260: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112263: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112266: 74 ac je 112214 <== NOT EXECUTED return 0; info->doubly_indirect = p; 112268: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 11226b: e9 06 ff ff ff jmp 112176 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 112270: 85 c0 test %eax,%eax <== NOT EXECUTED 112272: 74 a0 je 112214 <== 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 ]; 112274: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p1 ) 112277: 85 c0 test %eax,%eax <== NOT EXECUTED 112279: 74 99 je 112214 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 11227b: 8b 14 90 mov (%eax,%edx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 11227e: 8d 04 ba lea (%edx,%edi,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 112281: 85 d2 test %edx,%edx <== NOT EXECUTED 112283: 0f 85 fd fe ff ff jne 112186 <== NOT EXECUTED 112289: eb 89 jmp 112214 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11228b: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 112290: 68 48 1f 12 00 push $0x121f48 <== NOT EXECUTED 112295: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 11229a: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 11229f: e8 a0 5f ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 1122a4: 68 d8 1e 12 00 push $0x121ed8 <== NOT EXECUTED 1122a9: 68 48 1f 12 00 push $0x121f48 <== NOT EXECUTED 1122ae: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 1122b3: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 1122b8: e8 87 5f ff ff call 108244 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 1122bd: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1122c0: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 1122c3: e8 2c fe ff ff call 1120f4 <== NOT EXECUTED if ( !p ) 1122c8: 85 c0 test %eax,%eax <== NOT EXECUTED 1122ca: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1122cd: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1122d0: 0f 84 3e ff ff ff je 112214 <== NOT EXECUTED return 0; info->triply_indirect = p; 1122d6: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 1122d9: e9 00 ff ff ff jmp 1121de <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 1122de: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1122e1: e8 0e fe ff ff call 1120f4 <== NOT EXECUTED if ( !p1 ) 1122e6: 85 c0 test %eax,%eax <== NOT EXECUTED 1122e8: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1122eb: 0f 84 23 ff ff ff je 112214 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 1122f1: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 1122f3: e9 f3 fe ff ff jmp 1121eb <== NOT EXECUTED =============================================================================== 00112c38 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 112c38: 55 push %ebp 112c39: 89 e5 mov %esp,%ebp 112c3b: 57 push %edi 112c3c: 56 push %esi 112c3d: 53 push %ebx 112c3e: 83 ec 4c sub $0x4c,%esp 112c41: 8b 75 0c mov 0xc(%ebp),%esi 112c44: 8b 7d 10 mov 0x10(%ebp),%edi 112c47: 8b 45 18 mov 0x18(%ebp),%eax /* * Perform internal consistency checks */ assert( the_jnode ); 112c4a: 8b 55 08 mov 0x8(%ebp),%edx 112c4d: 85 d2 test %edx,%edx 112c4f: 0f 84 8e 02 00 00 je 112ee3 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 112c55: 8b 4d 08 mov 0x8(%ebp),%ecx 112c58: 8b 51 4c mov 0x4c(%ecx),%edx 112c5b: 8d 4a fb lea -0x5(%edx),%ecx 112c5e: 83 f9 01 cmp $0x1,%ecx 112c61: 0f 87 63 02 00 00 ja 112eca <== NEVER TAKEN /* * Error checks on arguments */ assert( dest ); 112c67: 8b 5d 14 mov 0x14(%ebp),%ebx 112c6a: 85 db test %ebx,%ebx 112c6c: 0f 84 26 02 00 00 je 112e98 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 112c72: 85 c0 test %eax,%eax 112c74: 0f 84 f0 01 00 00 je 112e6a <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 112c7a: 83 fa 06 cmp $0x6,%edx 112c7d: 0f 84 5d 01 00 00 je 112de0 <== NEVER TAKEN /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 112c83: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 112c85: 8b 4d 08 mov 0x8(%ebp),%ecx 112c88: 8b 49 50 mov 0x50(%ecx),%ecx 112c8b: 89 4d cc mov %ecx,-0x34(%ebp) 112c8e: 8d 1c 30 lea (%eax,%esi,1),%ebx 112c91: 89 5d d0 mov %ebx,-0x30(%ebp) 112c94: 31 c9 xor %ecx,%ecx 112c96: 8b 5d 08 mov 0x8(%ebp),%ebx 112c99: 3b 4b 54 cmp 0x54(%ebx),%ecx 112c9c: 0f 8e e2 00 00 00 jle 112d84 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 112ca2: 8b 5d cc mov -0x34(%ebp),%ebx 112ca5: 29 d3 sub %edx,%ebx 112ca7: 89 5d cc mov %ebx,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 112caa: a1 98 6e 12 00 mov 0x126e98,%eax 112caf: 89 45 d0 mov %eax,-0x30(%ebp) 112cb2: 99 cltd 112cb3: 89 d3 mov %edx,%ebx 112cb5: 52 push %edx 112cb6: 50 push %eax 112cb7: 57 push %edi 112cb8: 56 push %esi 112cb9: 89 45 c0 mov %eax,-0x40(%ebp) 112cbc: e8 eb c2 00 00 call 11efac <__moddi3> 112cc1: 83 c4 10 add $0x10,%esp 112cc4: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 112cc7: 8b 4d c0 mov -0x40(%ebp),%ecx 112cca: 53 push %ebx 112ccb: 51 push %ecx 112ccc: 57 push %edi 112ccd: 56 push %esi 112cce: e8 89 c1 00 00 call 11ee5c <__divdi3> 112cd3: 83 c4 10 add $0x10,%esp 112cd6: 89 c3 mov %eax,%ebx if ( start_offset ) { 112cd8: 8b 4d c8 mov -0x38(%ebp),%ecx 112cdb: 85 c9 test %ecx,%ecx 112cdd: 0f 85 b1 00 00 00 jne 112d94 112ce3: 8b 55 14 mov 0x14(%ebp),%edx 112ce6: 89 55 c8 mov %edx,-0x38(%ebp) 112ce9: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112cf0: 8b 55 d0 mov -0x30(%ebp),%edx 112cf3: 39 55 cc cmp %edx,-0x34(%ebp) 112cf6: 72 39 jb 112d31 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112cf8: 50 push %eax 112cf9: 6a 00 push $0x0 112cfb: 53 push %ebx 112cfc: ff 75 08 pushl 0x8(%ebp) 112cff: e8 14 f4 ff ff call 112118 assert( block_ptr ); 112d04: 83 c4 10 add $0x10,%esp 112d07: 85 c0 test %eax,%eax 112d09: 0f 84 70 01 00 00 je 112e7f <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 112d0f: 8b 30 mov (%eax),%esi 112d11: 8b 7d c8 mov -0x38(%ebp),%edi 112d14: 8b 4d d0 mov -0x30(%ebp),%ecx 112d17: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 112d19: 89 7d c8 mov %edi,-0x38(%ebp) block++; 112d1c: 43 inc %ebx my_length -= to_copy; 112d1d: 8b 4d d0 mov -0x30(%ebp),%ecx 112d20: 29 4d cc sub %ecx,-0x34(%ebp) copied += to_copy; 112d23: 01 4d c4 add %ecx,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 112d26: 8b 7d cc mov -0x34(%ebp),%edi 112d29: 39 3d 98 6e 12 00 cmp %edi,0x126e98 112d2f: 76 c7 jbe 112cf8 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 112d31: 8b 7d cc mov -0x34(%ebp),%edi 112d34: 85 ff test %edi,%edi 112d36: 74 27 je 112d5f block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112d38: 56 push %esi 112d39: 6a 00 push $0x0 112d3b: 53 push %ebx 112d3c: ff 75 08 pushl 0x8(%ebp) 112d3f: e8 d4 f3 ff ff call 112118 assert( block_ptr ); 112d44: 83 c4 10 add $0x10,%esp 112d47: 85 c0 test %eax,%eax 112d49: 0f 84 62 01 00 00 je 112eb1 <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 112d4f: 8b 30 mov (%eax),%esi 112d51: 8b 7d c8 mov -0x38(%ebp),%edi 112d54: 8b 4d cc mov -0x34(%ebp),%ecx 112d57: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 112d59: 8b 45 cc mov -0x34(%ebp),%eax 112d5c: 01 45 c4 add %eax,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 112d5f: 83 ec 08 sub $0x8,%esp 112d62: 6a 00 push $0x0 112d64: 8d 45 e0 lea -0x20(%ebp),%eax 112d67: 50 push %eax 112d68: e8 93 58 ff ff call 108600 112d6d: 8b 45 e0 mov -0x20(%ebp),%eax 112d70: 8b 55 08 mov 0x8(%ebp),%edx 112d73: 89 42 40 mov %eax,0x40(%edx) return copied; 112d76: 8b 45 c4 mov -0x3c(%ebp),%eax 112d79: 83 c4 10 add $0x10,%esp } 112d7c: 8d 65 f4 lea -0xc(%ebp),%esp 112d7f: 5b pop %ebx 112d80: 5e pop %esi 112d81: 5f pop %edi 112d82: c9 leave 112d83: c3 ret * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 112d84: 0f 8d ba 00 00 00 jge 112e44 <== ALWAYS TAKEN 112d8a: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 112d8d: e9 18 ff ff ff jmp 112caa <== NOT EXECUTED 112d92: 66 90 xchg %ax,%ax <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112d94: 52 push %edx 112d95: 6a 00 push $0x0 112d97: 53 push %ebx 112d98: ff 75 08 pushl 0x8(%ebp) 112d9b: e8 78 f3 ff ff call 112118 assert( block_ptr ); 112da0: 83 c4 10 add $0x10,%esp 112da3: 85 c0 test %eax,%eax 112da5: 0f 84 51 01 00 00 je 112efc <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112dab: 8b 4d d0 mov -0x30(%ebp),%ecx 112dae: 2b 4d c8 sub -0x38(%ebp),%ecx 112db1: 8b 55 cc mov -0x34(%ebp),%edx 112db4: 39 ca cmp %ecx,%edx 112db6: 0f 87 9c 00 00 00 ja 112e58 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 ); 112dbc: 8b 75 c8 mov -0x38(%ebp),%esi 112dbf: 03 30 add (%eax),%esi dest += to_copy; 112dc1: 8b 7d 14 mov 0x14(%ebp),%edi 112dc4: 89 d1 mov %edx,%ecx 112dc6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 112dc8: 89 7d c8 mov %edi,-0x38(%ebp) block++; 112dcb: 43 inc %ebx my_length -= to_copy; 112dcc: 29 55 cc sub %edx,-0x34(%ebp) 112dcf: a1 98 6e 12 00 mov 0x126e98,%eax 112dd4: 89 45 d0 mov %eax,-0x30(%ebp) 112dd7: 89 55 c4 mov %edx,-0x3c(%ebp) 112dda: e9 11 ff ff ff jmp 112cf0 112ddf: 90 nop * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 112de0: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 112de3: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED 112de6: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 112de9: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112dec: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED 112def: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED 112df2: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 112df5: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED 112df8: 29 f2 sub %esi,%edx <== NOT EXECUTED 112dfa: 19 f9 sbb %edi,%ecx <== NOT EXECUTED 112dfc: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 112dff: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 112e02: 31 db xor %ebx,%ebx <== NOT EXECUTED 112e04: 39 cb cmp %ecx,%ebx <== NOT EXECUTED 112e06: 7e 58 jle 112e60 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 112e08: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 112e0b: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 112e0d: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED 112e10: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 112e13: 89 d1 mov %edx,%ecx <== NOT EXECUTED 112e15: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 112e17: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e1a: 6a 00 push $0x0 <== NOT EXECUTED 112e1c: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 112e1f: 50 push %eax <== NOT EXECUTED 112e20: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 112e23: e8 d8 57 ff ff call 108600 <== NOT EXECUTED 112e28: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 112e2b: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 112e2e: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 112e31: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 112e34: 89 d0 mov %edx,%eax <== NOT EXECUTED 112e36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 112e39: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112e3c: 5b pop %ebx <== NOT EXECUTED 112e3d: 5e pop %esi <== NOT EXECUTED 112e3e: 5f pop %edi <== NOT EXECUTED 112e3f: c9 leave <== NOT EXECUTED 112e40: c3 ret <== NOT EXECUTED 112e41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 112e44: 8b 4d cc mov -0x34(%ebp),%ecx 112e47: 39 4d d0 cmp %ecx,-0x30(%ebp) 112e4a: 0f 87 52 fe ff ff ja 112ca2 <== ALWAYS TAKEN 112e50: e9 35 ff ff ff jmp 112d8a <== NOT EXECUTED 112e55: 8d 76 00 lea 0x0(%esi),%esi <== 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; 112e58: 89 ca mov %ecx,%edx 112e5a: e9 5d ff ff ff jmp 112dbc 112e5f: 90 nop if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 112e60: 7c 04 jl 112e66 <== NOT EXECUTED 112e62: 39 d0 cmp %edx,%eax <== NOT EXECUTED 112e64: 77 a2 ja 112e08 <== NOT EXECUTED 112e66: 89 c2 mov %eax,%edx <== NOT EXECUTED 112e68: eb a3 jmp 112e0d <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 112e6a: e8 ad 0f 00 00 call 113e1c <__errno> <== NOT EXECUTED 112e6f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112e75: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 112e7a: e9 fd fe ff ff jmp 112d7c <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112e7f: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112e84: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112e89: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 112e8e: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112e93: e8 ac 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 112e98: 68 87 1e 12 00 push $0x121e87 <== NOT EXECUTED 112e9d: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112ea2: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 112ea7: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112eac: e8 93 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112eb1: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112eb6: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112ebb: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 112ec0: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112ec5: e8 7a 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 112eca: 68 fc 1e 12 00 push $0x121efc <== NOT EXECUTED 112ecf: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112ed4: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 112ed9: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112ede: e8 61 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112ee3: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 112ee8: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112eed: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 112ef2: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112ef7: e8 48 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112efc: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112f01: 68 7a 1f 12 00 push $0x121f7a <== NOT EXECUTED 112f06: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 112f0b: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112f10: e8 2f 53 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 001123c0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1123c0: 55 push %ebp 1123c1: 89 e5 mov %esp,%ebp 1123c3: 57 push %edi 1123c4: 56 push %esi 1123c5: 53 push %ebx 1123c6: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 1123c9: 8b 55 08 mov 0x8(%ebp),%edx 1123cc: 85 d2 test %edx,%edx 1123ce: 0f 84 61 01 00 00 je 112535 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1123d4: 8b 45 08 mov 0x8(%ebp),%eax 1123d7: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 1123db: 0f 85 6d 01 00 00 jne 11254e <== NEVER TAKEN /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 1123e1: 8b 3d 98 6e 12 00 mov 0x126e98,%edi 1123e7: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1123ea: 8b 55 08 mov 0x8(%ebp),%edx 1123ed: 8b 42 58 mov 0x58(%edx),%eax 1123f0: 85 c0 test %eax,%eax 1123f2: 74 12 je 112406 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 1123f4: 83 ec 08 sub $0x8,%esp 1123f7: 57 push %edi 1123f8: 89 d0 mov %edx,%eax 1123fa: 83 c0 58 add $0x58,%eax 1123fd: 50 push %eax 1123fe: e8 f5 fe ff ff call 1122f8 112403: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 112406: 8b 4d 08 mov 0x8(%ebp),%ecx 112409: 8b 51 5c mov 0x5c(%ecx),%edx 11240c: 85 d2 test %edx,%edx 11240e: 74 57 je 112467 <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED 11241c: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 11241e: 31 db xor %ebx,%ebx <== NOT EXECUTED 112420: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 112423: eb 06 jmp 11242b <== NOT EXECUTED 112425: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 112428: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 11242b: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 11242e: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 112432: 74 14 je 112448 <== NOT EXECUTED memfile_free_blocks_in_table( 112434: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112437: 57 push %edi <== NOT EXECUTED 112438: 01 ca add %ecx,%edx <== NOT EXECUTED 11243a: 52 push %edx <== NOT EXECUTED 11243b: e8 b8 fe ff ff call 1122f8 <== NOT EXECUTED 112440: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112443: a1 98 6e 12 00 mov 0x126e98,%eax <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 112454: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112457: 57 push %edi <== NOT EXECUTED 112458: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11245b: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 11245e: 50 push %eax <== NOT EXECUTED 11245f: e8 94 fe ff ff call 1122f8 <== NOT EXECUTED 112464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 112467: 8b 45 08 mov 0x8(%ebp),%eax 11246a: 8b 50 60 mov 0x60(%eax),%edx 11246d: 85 d2 test %edx,%edx 11246f: 0f 84 b6 00 00 00 je 11252b <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 112485: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112487: 85 f6 test %esi,%esi <== NOT EXECUTED 112489: 0f 84 89 00 00 00 je 112518 <== NOT EXECUTED 11248f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 112496: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 11249d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 1124a7: 31 d2 xor %edx,%edx <== NOT EXECUTED 1124a9: 31 db xor %ebx,%ebx <== NOT EXECUTED 1124ab: 90 nop <== NOT EXECUTED if ( p[j] ) { 1124ac: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 1124af: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 1124b2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1124b4: 74 15 je 1124cb <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1124b6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1124b9: 57 push %edi <== NOT EXECUTED 1124ba: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 1124bd: 52 push %edx <== NOT EXECUTED 1124be: e8 35 fe ff ff call 1122f8 <== NOT EXECUTED 1124c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1124c6: a1 98 6e 12 00 mov 0x126e98,%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 1124d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1124da: 57 push %edi <== NOT EXECUTED 1124db: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1124de: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1124e1: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 1124e4: 50 push %eax <== NOT EXECUTED 1124e5: e8 0e fe ff ff call 1122f8 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 1124ff: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112502: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112505: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 112508: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 11250b: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 11250e: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112511: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112514: 85 f6 test %esi,%esi <== NOT EXECUTED 112516: 75 88 jne 1124a0 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 112518: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11251b: 57 push %edi <== NOT EXECUTED 11251c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11251f: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 112522: 50 push %eax <== NOT EXECUTED 112523: e8 d0 fd ff ff call 1122f8 <== NOT EXECUTED 112528: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 11252b: 31 c0 xor %eax,%eax 11252d: 8d 65 f4 lea -0xc(%ebp),%esp 112530: 5b pop %ebx 112531: 5e pop %esi 112532: 5f pop %edi 112533: c9 leave 112534: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 112535: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 11253a: 68 8c 1f 12 00 push $0x121f8c <== NOT EXECUTED 11253f: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 112544: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112549: e8 f6 5c ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11254e: 68 d8 1e 12 00 push $0x121ed8 <== NOT EXECUTED 112553: 68 8c 1f 12 00 push $0x121f8c <== NOT EXECUTED 112558: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 11255d: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112562: e8 dd 5c ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112374 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 112374: 55 push %ebp <== NOT EXECUTED 112375: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112377: 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 ); 11237a: 6a 00 push $0x0 <== NOT EXECUTED 11237c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 11237f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112382: e8 91 fd ff ff call 112118 <== NOT EXECUTED assert( block_ptr ); 112387: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11238a: 85 c0 test %eax,%eax <== NOT EXECUTED 11238c: 74 18 je 1123a6 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 11238e: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 112390: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 112396: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112399: 52 push %edx <== NOT EXECUTED 11239a: e8 39 fd ff ff call 1120d8 <== NOT EXECUTED } return 1; } 11239f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1123a4: c9 leave <== NOT EXECUTED 1123a5: c3 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1123a6: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 1123ab: 68 bd 1f 12 00 push $0x121fbd <== NOT EXECUTED 1123b0: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 1123b5: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 1123ba: e8 85 5e ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112908 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 112908: 55 push %ebp 112909: 89 e5 mov %esp,%ebp 11290b: 57 push %edi 11290c: 56 push %esi 11290d: 53 push %ebx 11290e: 83 ec 3c sub $0x3c,%esp 112911: 8b 5d 0c mov 0xc(%ebp),%ebx 112914: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 112917: 8b 4d 08 mov 0x8(%ebp),%ecx 11291a: 85 c9 test %ecx,%ecx 11291c: 0f 84 d8 01 00 00 je 112afa <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112922: 8b 45 08 mov 0x8(%ebp),%eax 112925: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 112929: 0f 85 b2 01 00 00 jne 112ae1 <== NEVER TAKEN /* * Error check arguments */ assert( source ); 11292f: 8b 55 14 mov 0x14(%ebp),%edx 112932: 85 d2 test %edx,%edx 112934: 0f 84 d9 01 00 00 je 112b13 <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 11293a: 8b 45 18 mov 0x18(%ebp),%eax 11293d: 85 c0 test %eax,%eax 11293f: 0f 84 6c 01 00 00 je 112ab1 <== NEVER TAKEN * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 112945: 8b 45 18 mov 0x18(%ebp),%eax 112948: 01 d8 add %ebx,%eax 11294a: 31 d2 xor %edx,%edx 11294c: 8b 4d 08 mov 0x8(%ebp),%ecx 11294f: 3b 51 54 cmp 0x54(%ecx),%edx 112952: 7c 10 jl 112964 <== NEVER TAKEN 112954: 0f 8f 26 01 00 00 jg 112a80 <== NEVER TAKEN 11295a: 3b 41 50 cmp 0x50(%ecx),%eax 11295d: 0f 87 1d 01 00 00 ja 112a80 <== ALWAYS TAKEN 112963: 90 nop /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 112964: a1 98 6e 12 00 mov 0x126e98,%eax 112969: 89 45 d4 mov %eax,-0x2c(%ebp) 11296c: 99 cltd 11296d: 89 45 c8 mov %eax,-0x38(%ebp) 112970: 89 55 cc mov %edx,-0x34(%ebp) 112973: 52 push %edx 112974: 50 push %eax 112975: 56 push %esi 112976: 53 push %ebx 112977: e8 30 c6 00 00 call 11efac <__moddi3> 11297c: 83 c4 10 add $0x10,%esp 11297f: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 112981: ff 75 cc pushl -0x34(%ebp) 112984: ff 75 c8 pushl -0x38(%ebp) 112987: 56 push %esi 112988: 53 push %ebx 112989: e8 ce c4 00 00 call 11ee5c <__divdi3> 11298e: 83 c4 10 add $0x10,%esp 112991: 89 c3 mov %eax,%ebx if ( start_offset ) { 112993: 85 ff test %edi,%edi 112995: 0f 85 a1 00 00 00 jne 112a3c 11299b: 8b 75 14 mov 0x14(%ebp),%esi 11299e: 8b 55 18 mov 0x18(%ebp),%edx 1129a1: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1129a8: 3b 55 d4 cmp -0x2c(%ebp),%edx 1129ab: 72 3b jb 1129e8 1129ad: 8d 76 00 lea 0x0(%esi),%esi block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1129b0: 51 push %ecx 1129b1: 6a 00 push $0x0 1129b3: 53 push %ebx 1129b4: ff 75 08 pushl 0x8(%ebp) 1129b7: 89 55 c4 mov %edx,-0x3c(%ebp) 1129ba: e8 59 f7 ff ff call 112118 assert( block_ptr ); 1129bf: 83 c4 10 add $0x10,%esp 1129c2: 85 c0 test %eax,%eax 1129c4: 8b 55 c4 mov -0x3c(%ebp),%edx 1129c7: 0f 84 fb 00 00 00 je 112ac8 <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1129cd: 8b 00 mov (%eax),%eax src += to_copy; 1129cf: 89 c7 mov %eax,%edi 1129d1: 8b 4d d4 mov -0x2c(%ebp),%ecx 1129d4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1129d6: 43 inc %ebx my_length -= to_copy; 1129d7: 2b 55 d4 sub -0x2c(%ebp),%edx * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 1129da: 8b 4d d4 mov -0x2c(%ebp),%ecx 1129dd: 01 4d c8 add %ecx,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1129e0: 39 15 98 6e 12 00 cmp %edx,0x126e98 1129e6: 76 c8 jbe 1129b0 <== NEVER TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 1129e8: 85 d2 test %edx,%edx 1129ea: 74 28 je 112a14 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1129ec: 50 push %eax 1129ed: 6a 00 push $0x0 1129ef: 53 push %ebx 1129f0: ff 75 08 pushl 0x8(%ebp) 1129f3: 89 55 c4 mov %edx,-0x3c(%ebp) 1129f6: e8 1d f7 ff ff call 112118 assert( block_ptr ); 1129fb: 83 c4 10 add $0x10,%esp 1129fe: 85 c0 test %eax,%eax 112a00: 8b 55 c4 mov -0x3c(%ebp),%edx 112a03: 0f 84 23 01 00 00 je 112b2c <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 112a09: 8b 00 mov (%eax),%eax 112a0b: 89 c7 mov %eax,%edi 112a0d: 89 d1 mov %edx,%ecx 112a0f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 112a11: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 112a14: 83 ec 08 sub $0x8,%esp 112a17: 6a 00 push $0x0 112a19: 8d 45 e0 lea -0x20(%ebp),%eax 112a1c: 50 push %eax 112a1d: e8 de 5b ff ff call 108600 112a22: 8b 45 e0 mov -0x20(%ebp),%eax 112a25: 8b 55 08 mov 0x8(%ebp),%edx 112a28: 89 42 44 mov %eax,0x44(%edx) 112a2b: 89 42 48 mov %eax,0x48(%edx) return copied; 112a2e: 83 c4 10 add $0x10,%esp } 112a31: 8b 45 c8 mov -0x38(%ebp),%eax 112a34: 8d 65 f4 lea -0xc(%ebp),%esp 112a37: 5b pop %ebx 112a38: 5e pop %esi 112a39: 5f pop %edi 112a3a: c9 leave 112a3b: c3 ret block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112a3c: 56 push %esi 112a3d: 6a 00 push $0x0 112a3f: 50 push %eax 112a40: ff 75 08 pushl 0x8(%ebp) 112a43: e8 d0 f6 ff ff call 112118 assert( block_ptr ); 112a48: 83 c4 10 add $0x10,%esp 112a4b: 85 c0 test %eax,%eax 112a4d: 0f 84 f2 00 00 00 je 112b45 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112a53: 8b 55 d4 mov -0x2c(%ebp),%edx 112a56: 29 fa sub %edi,%edx 112a58: 89 55 c8 mov %edx,-0x38(%ebp) 112a5b: 8b 4d 18 mov 0x18(%ebp),%ecx 112a5e: 39 ca cmp %ecx,%edx 112a60: 77 4a ja 112aac <== ALWAYS TAKEN 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 ); 112a62: 03 38 add (%eax),%edi src += to_copy; 112a64: 8b 75 14 mov 0x14(%ebp),%esi 112a67: 8b 4d c8 mov -0x38(%ebp),%ecx 112a6a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 112a6c: 43 inc %ebx my_length -= to_copy; 112a6d: 8b 55 18 mov 0x18(%ebp),%edx 112a70: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 112a73: a1 98 6e 12 00 mov 0x126e98,%eax 112a78: 89 45 d4 mov %eax,-0x2c(%ebp) 112a7b: e9 28 ff ff ff jmp 1129a8 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 112a80: 57 push %edi 112a81: 52 push %edx 112a82: 50 push %eax 112a83: ff 75 08 pushl 0x8(%ebp) 112a86: e8 2d fc ff ff call 1126b8 if ( status ) 112a8b: 83 c4 10 add $0x10,%esp 112a8e: 85 c0 test %eax,%eax 112a90: 0f 84 ce fe ff ff je 112964 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 112a96: e8 81 13 00 00 call 113e1c <__errno> <== NOT EXECUTED 112a9b: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 112aa1: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 112aa8: eb 87 jmp 112a31 <== NOT EXECUTED 112aaa: 66 90 xchg %ax,%ax <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 112aac: 89 4d c8 mov %ecx,-0x38(%ebp) 112aaf: eb b1 jmp 112a62 * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 112ab1: e8 66 13 00 00 call 113e1c <__errno> <== NOT EXECUTED 112ab6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112abc: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 112ac3: e9 69 ff ff ff jmp 112a31 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112ac8: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112acd: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112ad2: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 112ad7: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112adc: e8 63 57 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112ae1: 68 d8 1e 12 00 push $0x121ed8 <== NOT EXECUTED 112ae6: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112aeb: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 112af0: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112af5: e8 4a 57 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112afa: 68 60 1e 12 00 push $0x121e60 <== NOT EXECUTED 112aff: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112b04: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 112b09: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112b0e: e8 31 57 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 112b13: 68 80 1e 12 00 push $0x121e80 <== NOT EXECUTED 112b18: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112b1d: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 112b22: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112b27: e8 18 57 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112b2c: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112b31: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112b36: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 112b3b: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112b40: e8 ff 56 ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112b45: 68 76 1e 12 00 push $0x121e76 <== NOT EXECUTED 112b4a: 68 67 1f 12 00 push $0x121f67 <== NOT EXECUTED 112b4f: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 112b54: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 112b59: e8 e6 56 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00107d8c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 107d8c: 55 push %ebp 107d8d: 89 e5 mov %esp,%ebp 107d8f: 57 push %edi 107d90: 56 push %esi 107d91: 53 push %ebx 107d92: 83 ec 5c sub $0x5c,%esp 107d95: 8b 55 08 mov 0x8(%ebp),%edx 107d98: 8b 5d 0c mov 0xc(%ebp),%ebx 107d9b: 8b 75 10 mov 0x10(%ebp),%esi 107d9e: 8b 45 14 mov 0x14(%ebp),%eax 107da1: 89 45 a4 mov %eax,-0x5c(%ebp) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 107da4: 31 c0 xor %eax,%eax 107da6: b9 ff ff ff ff mov $0xffffffff,%ecx 107dab: 89 d7 mov %edx,%edi 107dad: f2 ae repnz scas %es:(%edi),%al 107daf: f7 d1 not %ecx 107db1: 49 dec %ecx 107db2: 8d 45 e4 lea -0x1c(%ebp),%eax 107db5: 50 push %eax 107db6: 8d 7d af lea -0x51(%ebp),%edi 107db9: 57 push %edi 107dba: 51 push %ecx 107dbb: 52 push %edx 107dbc: e8 3b 89 00 00 call 1106fc /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 107dc1: 89 d8 mov %ebx,%eax 107dc3: 25 00 f0 00 00 and $0xf000,%eax 107dc8: 83 c4 10 add $0x10,%esp 107dcb: 3d 00 40 00 00 cmp $0x4000,%eax 107dd0: 74 5e je 107e30 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107dd2: 3d 00 80 00 00 cmp $0x8000,%eax 107dd7: 74 4f je 107e28 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107dd9: 3d 00 60 00 00 cmp $0x6000,%eax 107dde: 74 38 je 107e18 107de0: 3d 00 20 00 00 cmp $0x2000,%eax 107de5: 74 31 je 107e18 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 107de7: 3d 00 10 00 00 cmp $0x1000,%eax 107dec: 75 4a jne 107e38 <== NEVER TAKEN 107dee: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107df3: 83 ec 0c sub $0xc,%esp 107df6: 8d 45 d0 lea -0x30(%ebp),%eax 107df9: 50 push %eax 107dfa: 53 push %ebx 107dfb: 57 push %edi 107dfc: 52 push %edx 107dfd: ff 75 18 pushl 0x18(%ebp) 107e00: e8 57 7d 00 00 call 10fb5c new_name, mode, &info ); if ( !new_node ) 107e05: 83 c4 20 add $0x20,%esp 107e08: 85 c0 test %eax,%eax 107e0a: 74 3e je 107e4a <== NEVER TAKEN 107e0c: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 107e0e: 8d 65 f4 lea -0xc(%ebp),%esp 107e11: 5b pop %ebx 107e12: 5e pop %esi 107e13: 5f pop %edi 107e14: c9 leave 107e15: c3 ret 107e16: 66 90 xchg %ax,%ax type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 107e18: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107e1b: 8b 45 a4 mov -0x5c(%ebp),%eax 107e1e: 89 45 d4 mov %eax,-0x2c(%ebp) 107e21: ba 02 00 00 00 mov $0x2,%edx */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e26: eb cb jmp 107df3 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e28: ba 05 00 00 00 mov $0x5,%edx 107e2d: eb c4 jmp 107df3 107e2f: 90 nop rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 107e30: ba 01 00 00 00 mov $0x1,%edx 107e35: eb bc jmp 107df3 107e37: 90 nop 107e38: e8 df bf 00 00 call 113e1c <__errno> <== NOT EXECUTED 107e3d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107e43: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e48: eb c4 jmp 107e0e <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107e4a: e8 cd bf 00 00 call 113e1c <__errno> <== NOT EXECUTED 107e4f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107e55: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e5a: eb b2 jmp 107e0e <== NOT EXECUTED =============================================================================== 00107e5c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107e5c: 55 push %ebp 107e5d: 89 e5 mov %esp,%ebp 107e5f: 83 ec 08 sub $0x8,%esp 107e62: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107e65: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107e68: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107e6c: 75 0a jne 107e78 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107e6e: 89 50 5c mov %edx,0x5c(%eax) 107e71: 31 c0 xor %eax,%eax return 0; } 107e73: c9 leave 107e74: c3 ret 107e75: 8d 76 00 lea 0x0(%esi),%esi /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107e78: e8 9f bf 00 00 call 113e1c <__errno> <== NOT EXECUTED 107e7d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107e83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107e88: c9 leave <== NOT EXECUTED 107e89: c3 ret <== NOT EXECUTED =============================================================================== 00109bac : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109bac: 55 push %ebp 109bad: 89 e5 mov %esp,%ebp 109baf: 53 push %ebx 109bb0: 83 ec 04 sub $0x4,%esp 109bb3: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109bb6: 85 db test %ebx,%ebx 109bb8: 0f 84 7f 01 00 00 je 109d3d <== NEVER TAKEN fprintf(stdout, "%s", the_jnode->name ); 109bbe: 83 ec 08 sub $0x8,%esp 109bc1: a1 c0 bc 12 00 mov 0x12bcc0,%eax 109bc6: ff 70 08 pushl 0x8(%eax) 109bc9: 8d 43 0c lea 0xc(%ebx),%eax 109bcc: 50 push %eax 109bcd: e8 32 dd 00 00 call 117904 switch( the_jnode->type ) { 109bd2: 8b 43 4c mov 0x4c(%ebx),%eax 109bd5: 83 c4 10 add $0x10,%esp 109bd8: 83 f8 07 cmp $0x7,%eax 109bdb: 76 2b jbe 109c08 <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109bdd: 52 push %edx <== NOT EXECUTED 109bde: 50 push %eax <== NOT EXECUTED 109bdf: 68 ce 69 12 00 push $0x1269ce <== NOT EXECUTED 109be4: a1 c0 bc 12 00 mov 0x12bcc0,%eax <== NOT EXECUTED 109be9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109bec: e8 eb db 00 00 call 1177dc <== NOT EXECUTED assert(0); 109bf1: 68 df 43 12 00 push $0x1243df <== NOT EXECUTED 109bf6: 68 38 6b 12 00 push $0x126b38 <== NOT EXECUTED 109bfb: 6a 6c push $0x6c <== NOT EXECUTED 109bfd: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109c02: e8 7d 09 00 00 call 10a584 <__assert_func> <== NOT EXECUTED 109c07: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109c08: ff 24 85 04 6b 12 00 jmp *0x126b04(,%eax,4) 109c0f: 90 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 109c10: a1 c0 bc 12 00 mov 0x12bcc0,%eax <== NOT EXECUTED 109c15: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c18: 6a 12 push $0x12 <== NOT EXECUTED 109c1a: 6a 01 push $0x1 <== NOT EXECUTED 109c1c: 68 bb 69 12 00 push $0x1269bb <== NOT EXECUTED 109c21: e8 16 e9 00 00 call 11853c <== NOT EXECUTED assert(0); 109c26: 68 df 43 12 00 push $0x1243df <== NOT EXECUTED 109c2b: 68 38 6b 12 00 push $0x126b38 <== NOT EXECUTED 109c30: 6a 67 push $0x67 <== NOT EXECUTED 109c32: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109c37: e8 48 09 00 00 call 10a584 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 109c3c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 109c3f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 109c42: 68 8c 69 12 00 push $0x12698c <== NOT EXECUTED 109c47: a1 c0 bc 12 00 mov 0x12bcc0,%eax <== NOT EXECUTED 109c4c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c4f: e8 88 db 00 00 call 1177dc <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 109c54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c57: c7 45 08 b5 6d 12 00 movl $0x126db5,0x8(%ebp) <== NOT EXECUTED } 109c5e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109c61: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c62: e9 39 f5 00 00 jmp 1191a0 <== NOT EXECUTED 109c67: 90 nop <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 109c68: 51 push %ecx 109c69: ff 73 50 pushl 0x50(%ebx) 109c6c: 68 9b 69 12 00 push $0x12699b 109c71: a1 c0 bc 12 00 mov 0x12bcc0,%eax 109c76: ff 70 08 pushl 0x8(%eax) 109c79: e8 5e db 00 00 call 1177dc (uint32_t)the_jnode->info.file.size ); #endif break; 109c7e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c81: c7 45 08 b5 6d 12 00 movl $0x126db5,0x8(%ebp) } 109c88: 8b 5d fc mov -0x4(%ebp),%ebx 109c8b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c8c: e9 0f f5 00 00 jmp 1191a0 109c91: 8d 76 00 lea 0x0(%esi),%esi fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 109c94: a1 c0 bc 12 00 mov 0x12bcc0,%eax <== NOT EXECUTED 109c99: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c9c: 6a 13 push $0x13 <== NOT EXECUTED 109c9e: 6a 01 push $0x1 <== NOT EXECUTED 109ca0: 68 a7 69 12 00 push $0x1269a7 <== NOT EXECUTED 109ca5: e8 92 e8 00 00 call 11853c <== NOT EXECUTED assert(0); 109caa: 68 df 43 12 00 push $0x1243df <== NOT EXECUTED 109caf: 68 38 6b 12 00 push $0x126b38 <== NOT EXECUTED 109cb4: 6a 62 push $0x62 <== NOT EXECUTED 109cb6: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109cbb: e8 c4 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109cc0: a1 c0 bc 12 00 mov 0x12bcc0,%eax <== NOT EXECUTED 109cc5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cc8: 6a 13 push $0x13 <== NOT EXECUTED 109cca: 6a 01 push $0x1 <== NOT EXECUTED 109ccc: 68 a7 69 12 00 push $0x1269a7 <== NOT EXECUTED 109cd1: e8 66 e8 00 00 call 11853c <== NOT EXECUTED assert(0); 109cd6: 68 df 43 12 00 push $0x1243df <== NOT EXECUTED 109cdb: 68 38 6b 12 00 push $0x126b38 <== NOT EXECUTED 109ce0: 6a 5d push $0x5d <== NOT EXECUTED 109ce2: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109ce7: e8 98 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 109cec: ff 73 54 pushl 0x54(%ebx) 109cef: ff 73 50 pushl 0x50(%ebx) 109cf2: 68 79 69 12 00 push $0x126979 109cf7: a1 c0 bc 12 00 mov 0x12bcc0,%eax 109cfc: ff 70 08 pushl 0x8(%eax) 109cff: e8 d8 da 00 00 call 1177dc the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109d04: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d07: c7 45 08 b5 6d 12 00 movl $0x126db5,0x8(%ebp) } 109d0e: 8b 5d fc mov -0x4(%ebp),%ebx 109d11: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d12: e9 89 f4 00 00 jmp 1191a0 109d17: 90 nop assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109d18: 83 ec 08 sub $0x8,%esp 109d1b: a1 c0 bc 12 00 mov 0x12bcc0,%eax 109d20: ff 70 08 pushl 0x8(%eax) 109d23: 6a 2f push $0x2f 109d25: e8 ee da 00 00 call 117818 break; 109d2a: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d2d: c7 45 08 b5 6d 12 00 movl $0x126db5,0x8(%ebp) } 109d34: 8b 5d fc mov -0x4(%ebp),%ebx 109d37: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d38: e9 63 f4 00 00 jmp 1191a0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 109d3d: 68 6f 69 12 00 push $0x12696f <== NOT EXECUTED 109d42: 68 38 6b 12 00 push $0x126b38 <== NOT EXECUTED 109d47: 6a 38 push $0x38 <== NOT EXECUTED 109d49: 68 18 6a 12 00 push $0x126a18 <== NOT EXECUTED 109d4e: e8 31 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED =============================================================================== 00107e9c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107e9c: 55 push %ebp 107e9d: 89 e5 mov %esp,%ebp 107e9f: 57 push %edi 107ea0: 56 push %esi 107ea1: 53 push %ebx 107ea2: 83 ec 0c sub $0xc,%esp 107ea5: 8b 7d 0c mov 0xc(%ebp),%edi 107ea8: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 107eab: 8b 45 08 mov 0x8(%ebp),%eax 107eae: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 107eb0: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 107eb4: 75 36 jne 107eec <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107eb6: 85 f6 test %esi,%esi 107eb8: 74 2e je 107ee8 <== NEVER TAKEN 107eba: 8b 43 50 mov 0x50(%ebx),%eax 107ebd: 8a 10 mov (%eax),%dl 107ebf: 84 d2 test %dl,%dl 107ec1: 74 25 je 107ee8 <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107ec3: 31 c9 xor %ecx,%ecx 107ec5: 31 c0 xor %eax,%eax 107ec7: eb 0d jmp 107ed6 107ec9: 8d 76 00 lea 0x0(%esi),%esi for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ecc: 8b 53 50 mov 0x50(%ebx),%edx 107ecf: 8a 14 02 mov (%edx,%eax,1),%dl 107ed2: 84 d2 test %dl,%dl 107ed4: 74 0a je 107ee0 buf[i] = node->info.sym_link.name[i]; 107ed6: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ed9: 40 inc %eax 107eda: 89 c1 mov %eax,%ecx 107edc: 39 c6 cmp %eax,%esi 107ede: 77 ec ja 107ecc buf[i] = node->info.sym_link.name[i]; return i; } 107ee0: 83 c4 0c add $0xc,%esp 107ee3: 5b pop %ebx 107ee4: 5e pop %esi 107ee5: 5f pop %edi 107ee6: c9 leave 107ee7: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ee8: 31 c0 xor %eax,%eax 107eea: eb f4 jmp 107ee0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107eec: e8 2b bf 00 00 call 113e1c <__errno> <== NOT EXECUTED 107ef1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ef7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107efc: eb e2 jmp 107ee0 <== NOT EXECUTED =============================================================================== 00107f00 : 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 */ ) { 107f00: 55 push %ebp 107f01: 89 e5 mov %esp,%ebp 107f03: 53 push %ebx 107f04: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107f07: 8b 45 0c mov 0xc(%ebp),%eax 107f0a: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107f0c: 6a 20 push $0x20 107f0e: ff 75 14 pushl 0x14(%ebp) 107f11: 8d 43 0c lea 0xc(%ebx),%eax 107f14: 50 push %eax 107f15: e8 52 cb 00 00 call 114a6c if ( the_jnode->Parent != NULL ) 107f1a: 83 c4 10 add $0x10,%esp 107f1d: 8b 4b 08 mov 0x8(%ebx),%ecx 107f20: 85 c9 test %ecx,%ecx 107f22: 74 0c je 107f30 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107f24: 83 ec 0c sub $0xc,%esp 107f27: 53 push %ebx 107f28: e8 6b 46 00 00 call 10c598 <_Chain_Extract> 107f2d: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107f30: 8b 45 10 mov 0x10(%ebp),%eax 107f33: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107f35: 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 ); 107f38: 83 ec 08 sub $0x8,%esp 107f3b: 53 push %ebx 107f3c: 83 c0 50 add $0x50,%eax 107f3f: 50 push %eax 107f40: e8 2f 46 00 00 call 10c574 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107f45: 58 pop %eax 107f46: 5a pop %edx 107f47: 6a 00 push $0x0 107f49: 8d 45 f0 lea -0x10(%ebp),%eax 107f4c: 50 push %eax 107f4d: e8 ae 06 00 00 call 108600 107f52: 8b 45 f0 mov -0x10(%ebp),%eax 107f55: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107f58: 31 c0 xor %eax,%eax 107f5a: 8b 5d fc mov -0x4(%ebp),%ebx 107f5d: c9 leave 107f5e: c3 ret =============================================================================== 001107d8 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1107d8: 55 push %ebp 1107d9: 89 e5 mov %esp,%ebp 1107db: 56 push %esi 1107dc: 53 push %ebx 1107dd: 83 ec 10 sub $0x10,%esp 1107e0: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1107e3: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1107e5: 8b 43 08 mov 0x8(%ebx),%eax 1107e8: 85 c0 test %eax,%eax 1107ea: 74 13 je 1107ff <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1107ec: 83 ec 0c sub $0xc,%esp 1107ef: 53 push %ebx 1107f0: e8 a3 bd ff ff call 10c598 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1107f5: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1107fc: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1107ff: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110803: 83 ec 08 sub $0x8,%esp 110806: 6a 00 push $0x0 110808: 8d 45 f0 lea -0x10(%ebp),%eax 11080b: 50 push %eax 11080c: e8 ef 7d ff ff call 108600 110811: 8b 45 f0 mov -0x10(%ebp),%eax 110814: 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) ) { 110817: 89 1c 24 mov %ebx,(%esp) 11081a: e8 a1 02 00 00 call 110ac0 11081f: 83 c4 10 add $0x10,%esp 110822: 85 c0 test %eax,%eax 110824: 75 25 jne 11084b <== NEVER TAKEN 110826: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 11082b: 75 1e jne 11084b <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 11082d: a1 24 50 12 00 mov 0x125024,%eax 110832: 8b 50 04 mov 0x4(%eax),%edx 110835: 3b 16 cmp (%esi),%edx 110837: 74 33 je 11086c <== NEVER TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 110839: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 11083d: 74 15 je 110854 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 11083f: 83 ec 0c sub $0xc,%esp 110842: 53 push %ebx 110843: e8 3c 7d ff ff call 108584 110848: 83 c4 10 add $0x10,%esp } return 0; } 11084b: 31 c0 xor %eax,%eax 11084d: 8d 65 f8 lea -0x8(%ebp),%esp 110850: 5b pop %ebx 110851: 5e pop %esi 110852: c9 leave 110853: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 110854: 8b 43 50 mov 0x50(%ebx),%eax 110857: 85 c0 test %eax,%eax 110859: 74 e4 je 11083f <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 11085b: 83 ec 0c sub $0xc,%esp 11085e: 50 push %eax 11085f: e8 20 7d ff ff call 108584 110864: 83 c4 10 add $0x10,%esp 110867: eb d6 jmp 11083f 110869: 8d 76 00 lea 0x0(%esi),%esi /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 11086c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 110873: eb c4 jmp 110839 <== NOT EXECUTED =============================================================================== 00110878 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 110878: 55 push %ebp 110879: 89 e5 mov %esp,%ebp 11087b: 56 push %esi 11087c: 53 push %ebx 11087d: 8b 4d 08 mov 0x8(%ebp),%ecx 110880: 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; 110883: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 110885: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 110889: 76 15 jbe 1108a0 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 11088b: e8 8c 35 00 00 call 113e1c <__errno> <== NOT EXECUTED 110890: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110896: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 11089b: 5b pop %ebx <== NOT EXECUTED 11089c: 5e pop %esi <== NOT EXECUTED 11089d: c9 leave <== NOT EXECUTED 11089e: c3 ret <== NOT EXECUTED 11089f: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 1108a0: 8b 5a 4c mov 0x4c(%edx),%ebx 1108a3: ff 24 9d 98 1d 12 00 jmp *0x121d98(,%ebx,4) 1108aa: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 1108ac: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 1108b3: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 1108ba: 8b 49 10 mov 0x10(%ecx),%ecx 1108bd: 8b 49 34 mov 0x34(%ecx),%ecx 1108c0: 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 = 1108c2: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 1108c8: 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; 1108cb: 8b 4a 30 mov 0x30(%edx),%ecx 1108ce: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 1108d1: 8b 4a 34 mov 0x34(%edx),%ecx 1108d4: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 1108d8: 8b 4a 38 mov 0x38(%edx),%ecx 1108db: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 1108de: 8b 4a 3c mov 0x3c(%edx),%ecx 1108e1: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 1108e5: 66 8b 4a 3e mov 0x3e(%edx),%cx 1108e9: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 1108ed: 8b 4a 40 mov 0x40(%edx),%ecx 1108f0: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 1108f3: 8b 4a 44 mov 0x44(%edx),%ecx 1108f6: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 1108f9: 8b 52 48 mov 0x48(%edx),%edx 1108fc: 89 50 38 mov %edx,0x38(%eax) 1108ff: 31 c0 xor %eax,%eax return 0; } 110901: 5b pop %ebx 110902: 5e pop %esi 110903: c9 leave 110904: c3 ret 110905: 8d 76 00 lea 0x0(%esi),%esi switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 110908: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 11090b: 8b 72 50 mov 0x50(%edx),%esi 11090e: 89 70 18 mov %esi,0x18(%eax) 110911: 89 58 1c mov %ebx,0x1c(%eax) break; 110914: eb a4 jmp 1108ba 110916: 66 90 xchg %ax,%ax case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 110918: 8b 5a 50 mov 0x50(%edx),%ebx 11091b: 8b 72 54 mov 0x54(%edx),%esi 11091e: 89 58 20 mov %ebx,0x20(%eax) 110921: 89 70 24 mov %esi,0x24(%eax) break; 110924: eb 94 jmp 1108ba =============================================================================== 00107f60 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107f60: 55 push %ebp 107f61: 89 e5 mov %esp,%ebp 107f63: 57 push %edi 107f64: 53 push %ebx 107f65: 83 ec 40 sub $0x40,%esp 107f68: 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 ); 107f6b: 31 c0 xor %eax,%eax 107f6d: b9 ff ff ff ff mov $0xffffffff,%ecx 107f72: 89 d7 mov %edx,%edi 107f74: f2 ae repnz scas %es:(%edi),%al 107f76: f7 d1 not %ecx 107f78: 49 dec %ecx 107f79: 8d 45 f4 lea -0xc(%ebp),%eax 107f7c: 50 push %eax 107f7d: 8d 5d bf lea -0x41(%ebp),%ebx 107f80: 53 push %ebx 107f81: 51 push %ecx 107f82: 52 push %edx 107f83: e8 74 87 00 00 call 1106fc /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107f88: 58 pop %eax 107f89: ff 75 0c pushl 0xc(%ebp) 107f8c: e8 fb c9 00 00 call 11498c 107f91: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107f94: 83 c4 10 add $0x10,%esp 107f97: 85 c0 test %eax,%eax 107f99: 74 27 je 107fc2 <== NEVER TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107f9b: 83 ec 0c sub $0xc,%esp 107f9e: 8d 45 e0 lea -0x20(%ebp),%eax 107fa1: 50 push %eax 107fa2: 68 ff a1 00 00 push $0xa1ff 107fa7: 53 push %ebx 107fa8: 6a 04 push $0x4 107faa: ff 75 08 pushl 0x8(%ebp) 107fad: e8 aa 7b 00 00 call 10fb5c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107fb2: 83 c4 20 add $0x20,%esp 107fb5: 85 c0 test %eax,%eax 107fb7: 74 1b je 107fd4 <== NEVER TAKEN 107fb9: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 107fbb: 8d 65 f8 lea -0x8(%ebp),%esp 107fbe: 5b pop %ebx 107fbf: 5f pop %edi 107fc0: c9 leave 107fc1: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 107fc2: e8 55 be 00 00 call 113e1c <__errno> <== NOT EXECUTED 107fc7: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107fcd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107fd2: eb e7 jmp 107fbb <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 107fd4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107fd7: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107fda: e8 a5 05 00 00 call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107fdf: e8 38 be 00 00 call 113e1c <__errno> <== NOT EXECUTED 107fe4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107fea: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107fef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ff2: eb c7 jmp 107fbb <== NOT EXECUTED =============================================================================== 00107ff4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107ff4: 55 push %ebp 107ff5: 89 e5 mov %esp,%ebp 107ff7: 57 push %edi 107ff8: 56 push %esi 107ff9: 53 push %ebx 107ffa: 83 ec 3c sub $0x3c,%esp 107ffd: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 108000: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108002: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108006: 74 18 je 108020 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108008: 83 ec 08 sub $0x8,%esp 10800b: 8b 43 08 mov 0x8(%ebx),%eax 10800e: 53 push %ebx 10800f: ff 75 08 pushl 0x8(%ebp) 108012: ff 50 34 call *0x34(%eax) return result; 108015: 83 c4 10 add $0x10,%esp } 108018: 8d 65 f4 lea -0xc(%ebp),%esp 10801b: 5b pop %ebx 10801c: 5e pop %esi 10801d: 5f pop %edi 10801e: c9 leave 10801f: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108020: 8b 42 50 mov 0x50(%edx),%eax 108023: 85 c0 test %eax,%eax 108025: 74 79 je 1080a0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108027: 8d 7d cc lea -0x34(%ebp),%edi 10802a: b9 05 00 00 00 mov $0x5,%ecx 10802f: 89 de mov %ebx,%esi 108031: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108033: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108036: 83 ec 0c sub $0xc,%esp 108039: 8d 75 cc lea -0x34(%ebp),%esi 10803c: 56 push %esi 10803d: 89 55 c4 mov %edx,-0x3c(%ebp) 108040: e8 23 7c 00 00 call 10fc68 /* * 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) 108045: 8b 55 c4 mov -0x3c(%ebp),%edx 108048: 8b 42 50 mov 0x50(%edx),%eax 10804b: 8b 48 34 mov 0x34(%eax),%ecx 10804e: 83 c4 10 add $0x10,%esp 108051: 66 83 f9 01 cmp $0x1,%cx 108055: 74 27 je 10807e if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 108057: 49 dec %ecx 108058: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 10805c: 83 ec 08 sub $0x8,%esp 10805f: 6a 00 push $0x0 108061: 8d 45 e0 lea -0x20(%ebp),%eax 108064: 50 push %eax 108065: 89 55 c4 mov %edx,-0x3c(%ebp) 108068: e8 93 05 00 00 call 108600 10806d: 8b 55 c4 mov -0x3c(%ebp),%edx 108070: 8b 42 50 mov 0x50(%edx),%eax 108073: 8b 55 e0 mov -0x20(%ebp),%edx 108076: 89 50 48 mov %edx,0x48(%eax) 108079: 83 c4 10 add $0x10,%esp 10807c: eb 8a jmp 108008 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 10807e: 83 ec 08 sub $0x8,%esp 108081: 56 push %esi 108082: ff 75 08 pushl 0x8(%ebp) 108085: 8b 45 d4 mov -0x2c(%ebp),%eax 108088: ff 50 34 call *0x34(%eax) if ( result != 0 ) 10808b: 83 c4 10 add $0x10,%esp 10808e: 85 c0 test %eax,%eax 108090: 0f 84 72 ff ff ff je 108008 108096: b8 ff ff ff ff mov $0xffffffff,%eax 10809b: e9 78 ff ff ff jmp 108018 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 1080a0: e8 77 bd 00 00 call 113e1c <__errno> <== NOT EXECUTED 1080a5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1080ab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1080b0: e9 63 ff ff ff jmp 108018 <== NOT EXECUTED =============================================================================== 001080b8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1080b8: 55 push %ebp 1080b9: 89 e5 mov %esp,%ebp 1080bb: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1080be: 8b 45 08 mov 0x8(%ebp),%eax 1080c1: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1080c4: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 1080c8: 75 12 jne 1080dc <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1080ca: 8b 50 5c mov 0x5c(%eax),%edx 1080cd: 85 d2 test %edx,%edx 1080cf: 74 1d je 1080ee <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 1080d1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 1080d8: 31 c0 xor %eax,%eax return 0; } 1080da: c9 leave 1080db: c3 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1080dc: e8 3b bd 00 00 call 113e1c <__errno> <== NOT EXECUTED 1080e1: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 1080e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 1080ec: c9 leave <== NOT EXECUTED 1080ed: c3 ret <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1080ee: e8 29 bd 00 00 call 113e1c <__errno> <== NOT EXECUTED 1080f3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1080f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 1080fe: c9 leave <== NOT EXECUTED 1080ff: c3 ret <== NOT EXECUTED =============================================================================== 001087b0 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1087b0: 55 push %ebp 1087b1: 89 e5 mov %esp,%ebp 1087b3: 57 push %edi 1087b4: 56 push %esi 1087b5: 53 push %ebx 1087b6: 83 ec 0c sub $0xc,%esp 1087b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1087bc: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1087bf: a1 e8 55 12 00 mov 0x1255e8,%eax 1087c4: 85 c0 test %eax,%eax 1087c6: 74 02 je 1087ca <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 1087c8: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1087ca: e8 79 ff ff ff call 108748 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1087cf: a1 ec 55 12 00 mov 0x1255ec,%eax 1087d4: 85 c0 test %eax,%eax 1087d6: 74 13 je 1087eb <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1087d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1087db: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1087de: 53 push %ebx <== NOT EXECUTED 1087df: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1087e1: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1087e4: 29 c6 sub %eax,%esi <== NOT EXECUTED 1087e6: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1087e8: 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 ( 1087eb: 80 3d e5 55 12 00 00 cmpb $0x0,0x1255e5 1087f2: 75 1f jne 108813 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1087f4: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 1087fb: 75 3f jne 10883c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1087fd: 6a 04 push $0x4 1087ff: 56 push %esi 108800: 53 push %ebx 108801: ff 35 58 31 12 00 pushl 0x123158 108807: e8 b0 42 00 00 call 10cabc <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 10880c: 83 c4 10 add $0x10,%esp 10880f: 85 c0 test %eax,%eax 108811: 74 3c je 10884f <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 108813: 8b 1d 00 72 12 00 mov 0x127200,%ebx 108819: 83 ec 0c sub $0xc,%esp 10881c: ff 35 58 31 12 00 pushl 0x123158 108822: e8 09 4e 00 00 call 10d630 <_Protected_heap_Get_size> 108827: 8d 1c 18 lea (%eax,%ebx,1),%ebx 10882a: 89 1d 00 72 12 00 mov %ebx,0x127200 108830: 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 } 108833: 8d 65 f4 lea -0xc(%ebp),%esp 108836: 5b pop %ebx 108837: 5e pop %esi 108838: 5f pop %edi 108839: c9 leave 10883a: c3 ret 10883b: 90 nop if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 10883c: 31 c0 xor %eax,%eax 10883e: 89 df mov %ebx,%edi 108840: 89 f1 mov %esi,%ecx 108842: 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 ) { 108844: 80 3d e5 55 12 00 00 cmpb $0x0,0x1255e5 10884b: 74 b0 je 1087fd <== ALWAYS TAKEN 10884d: eb c4 jmp 108813 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 10884f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108852: 6a 1a push $0x1a <== NOT EXECUTED 108854: e8 87 3a 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 00107c4c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 107c4c: 55 push %ebp <== NOT EXECUTED 107c4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c4f: 57 push %edi <== NOT EXECUTED 107c50: 56 push %esi <== NOT EXECUTED 107c51: 53 push %ebx <== NOT EXECUTED 107c52: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 107c55: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 107c58: 85 db test %ebx,%ebx <== NOT EXECUTED 107c5a: 0f 84 c5 00 00 00 je 107d25 <== NOT EXECUTED return; if ( !print_handler ) 107c60: a1 c8 81 12 00 mov 0x1281c8,%eax <== NOT EXECUTED 107c65: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 107c68: 85 c0 test %eax,%eax <== NOT EXECUTED 107c6a: 0f 84 b5 00 00 00 je 107d25 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 107c70: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 107c73: 0f 84 d7 00 00 00 je 107d50 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 107c79: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 107c7f: 8b 93 d4 00 00 00 mov 0xd4(%ebx),%edx <== NOT EXECUTED 107c85: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 107c88: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 107c8b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 107c8e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 107c91: 8b 3e mov (%esi),%edi <== NOT EXECUTED 107c93: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 107c96: 57 push %edi <== NOT EXECUTED 107c97: 50 push %eax <== NOT EXECUTED 107c98: e8 77 ff ff ff call 107c14 <== NOT EXECUTED if ( high_water_mark ) 107c9d: 59 pop %ecx <== NOT EXECUTED 107c9e: 5a pop %edx <== NOT EXECUTED 107c9f: 85 c0 test %eax,%eax <== NOT EXECUTED 107ca1: 0f 84 c9 00 00 00 je 107d70 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 107ca7: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 107caa: 01 fa add %edi,%edx <== NOT EXECUTED 107cac: 29 c2 sub %eax,%edx <== NOT EXECUTED 107cae: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 107cb1: 85 db test %ebx,%ebx <== NOT EXECUTED 107cb3: 0f 84 c7 00 00 00 je 107d80 <== NOT EXECUTED (*print_handler)( 107cb9: 52 push %edx <== NOT EXECUTED 107cba: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 107cbd: 50 push %eax <== NOT EXECUTED 107cbe: 6a 05 push $0x5 <== NOT EXECUTED 107cc0: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107cc3: e8 b0 41 00 00 call 10be78 <== NOT EXECUTED 107cc8: 50 push %eax <== NOT EXECUTED 107cc9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107ccc: 68 d7 1a 12 00 push $0x121ad7 <== NOT EXECUTED 107cd1: ff 35 c4 81 12 00 pushl 0x1281c4 <== NOT EXECUTED 107cd7: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 107cda: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 107cdd: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 107ce0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107ce3: 57 push %edi <== NOT EXECUTED 107ce4: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 107ce7: 8b 16 mov (%esi),%edx <== NOT EXECUTED 107ce9: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107ced: 52 push %edx <== NOT EXECUTED 107cee: 50 push %eax <== NOT EXECUTED 107cef: 68 f2 1a 12 00 push $0x121af2 <== NOT EXECUTED 107cf4: ff 35 c4 81 12 00 pushl 0x1281c4 <== NOT EXECUTED 107cfa: ff 15 c8 81 12 00 call *0x1281c8 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 107d00: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107d03: 8b 1d c0 81 12 00 mov 0x1281c0,%ebx <== NOT EXECUTED 107d09: 85 db test %ebx,%ebx <== NOT EXECUTED 107d0b: 74 23 je 107d30 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 107d0d: 51 push %ecx <== NOT EXECUTED 107d0e: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 107d11: 68 1d 1b 12 00 push $0x121b1d <== NOT EXECUTED 107d16: ff 35 c4 81 12 00 pushl 0x1281c4 <== NOT EXECUTED 107d1c: ff 15 c8 81 12 00 call *0x1281c8 <== NOT EXECUTED 107d22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 107d25: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d28: 5b pop %ebx <== NOT EXECUTED 107d29: 5e pop %esi <== NOT EXECUTED 107d2a: 5f pop %edi <== NOT EXECUTED 107d2b: c9 leave <== NOT EXECUTED 107d2c: c3 ret <== NOT EXECUTED 107d2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 107d30: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107d33: 68 10 1b 12 00 push $0x121b10 <== NOT EXECUTED 107d38: ff 35 c4 81 12 00 pushl 0x1281c4 <== NOT EXECUTED 107d3e: ff 15 c8 81 12 00 call *0x1281c8 <== NOT EXECUTED 107d44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 107d47: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d4a: 5b pop %ebx <== NOT EXECUTED 107d4b: 5e pop %esi <== NOT EXECUTED 107d4c: 5f pop %edi <== NOT EXECUTED 107d4d: c9 leave <== NOT EXECUTED 107d4e: c3 ret <== NOT EXECUTED 107d4f: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 107d50: 8b 0d 34 85 12 00 mov 0x128534,%ecx <== NOT EXECUTED 107d56: 85 c9 test %ecx,%ecx <== NOT EXECUTED 107d58: 74 cb je 107d25 <== NOT EXECUTED 107d5a: be 30 85 12 00 mov $0x128530,%esi <== NOT EXECUTED 107d5f: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 107d66: 31 db xor %ebx,%ebx <== NOT EXECUTED 107d68: e9 1b ff ff ff jmp 107c88 <== NOT EXECUTED 107d6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 107d70: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 107d77: 85 db test %ebx,%ebx <== NOT EXECUTED 107d79: 0f 85 3a ff ff ff jne 107cb9 <== NOT EXECUTED 107d7f: 90 nop <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 107d80: 50 push %eax <== NOT EXECUTED 107d81: 6a ff push $0xffffffff <== NOT EXECUTED 107d83: 68 e4 1a 12 00 push $0x121ae4 <== NOT EXECUTED 107d88: ff 35 c4 81 12 00 pushl 0x1281c4 <== NOT EXECUTED 107d8e: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 107d91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d94: e9 44 ff ff ff jmp 107cdd <== NOT EXECUTED =============================================================================== 00107fa4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 107fa4: 55 push %ebp 107fa5: 89 e5 mov %esp,%ebp 107fa7: 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) 107fa8: 8b 3d c0 81 12 00 mov 0x1281c0,%edi 107fae: 85 ff test %edi,%edi 107fb0: 75 4d jne 107fff 107fb2: 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 ]; 107fb4: 89 c2 mov %eax,%edx 107fb6: 83 e2 03 and $0x3,%edx 107fb9: 8b 14 95 5c 1c 12 00 mov 0x121c5c(,%edx,4),%edx 107fc0: 89 14 85 20 85 12 00 mov %edx,0x128520(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 107fc7: 40 inc %eax 107fc8: 83 f8 04 cmp $0x4,%eax 107fcb: 75 e7 jne 107fb4 /* * 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) { 107fcd: 8b 15 c8 86 12 00 mov 0x1286c8,%edx 107fd3: 85 d2 test %edx,%edx 107fd5: 74 1e je 107ff5 <== NEVER TAKEN 107fd7: 8b 0d 88 86 12 00 mov 0x128688,%ecx 107fdd: 85 c9 test %ecx,%ecx 107fdf: 74 14 je 107ff5 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 107fe1: 89 15 34 85 12 00 mov %edx,0x128534 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107fe7: 29 d1 sub %edx,%ecx 107fe9: 89 0d 30 85 12 00 mov %ecx,0x128530 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 107fef: b0 a5 mov $0xa5,%al 107ff1: 89 d7 mov %edx,%edi 107ff3: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 107ff5: c7 05 c0 81 12 00 01 movl $0x1,0x1281c0 107ffc: 00 00 00 } 107fff: 5f pop %edi 108000: c9 leave 108001: c3 ret =============================================================================== 00107c14 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 107c14: 55 push %ebp <== NOT EXECUTED 107c15: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c17: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 107c1a: 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; 107c1d: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 107c20: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 107c23: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107c26: 39 d0 cmp %edx,%eax <== NOT EXECUTED 107c28: 73 1d jae 107c47 <== NOT EXECUTED if (*base != U32_PATTERN) 107c2a: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 107c31: 74 0d je 107c40 <== NOT EXECUTED 107c33: eb 14 jmp 107c49 <== NOT EXECUTED 107c35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 107c38: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 107c3e: 75 09 jne 107c49 <== 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++) 107c40: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 107c43: 39 c2 cmp %eax,%edx <== NOT EXECUTED 107c45: 77 f1 ja 107c38 <== NOT EXECUTED 107c47: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 107c49: c9 leave <== NOT EXECUTED 107c4a: c3 ret <== NOT EXECUTED =============================================================================== 00107e18 : * * 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) { 107e18: 55 push %ebp <== NOT EXECUTED 107e19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e1b: 56 push %esi <== NOT EXECUTED 107e1c: 53 push %ebx <== NOT EXECUTED 107e1d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 107e20: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 107e23: 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); 107e26: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 107e2c: 68 3a 1b 12 00 push $0x121b3a <== NOT EXECUTED 107e31: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 107e34: e8 af 19 00 00 call 1097e8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 107e39: 58 pop %eax <== NOT EXECUTED 107e3a: 5a pop %edx <== NOT EXECUTED 107e3b: 53 push %ebx <== NOT EXECUTED 107e3c: 68 4a 1b 12 00 push $0x121b4a <== NOT EXECUTED 107e41: e8 a2 19 00 00 call 1097e8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 107e46: 5a pop %edx <== NOT EXECUTED 107e47: 59 pop %ecx <== NOT EXECUTED 107e48: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e4b: 68 67 1b 12 00 push $0x121b67 <== NOT EXECUTED 107e50: e8 93 19 00 00 call 1097e8 <== NOT EXECUTED printk( 107e55: 59 pop %ecx <== NOT EXECUTED 107e56: 58 pop %eax <== NOT EXECUTED 107e57: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 107e5a: 68 79 1b 12 00 push $0x121b79 <== NOT EXECUTED 107e5f: e8 84 19 00 00 call 1097e8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 107e64: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 107e67: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 107e6a: 50 push %eax <== NOT EXECUTED 107e6b: 6a 20 push $0x20 <== NOT EXECUTED 107e6d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e70: e8 03 40 00 00 call 10be78 <== NOT EXECUTED 107e75: 59 pop %ecx <== NOT EXECUTED 107e76: 5a pop %edx <== NOT EXECUTED 107e77: 50 push %eax <== NOT EXECUTED 107e78: 68 8d 1b 12 00 push $0x121b8d <== NOT EXECUTED 107e7d: e8 66 19 00 00 call 1097e8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107e82: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 107e88: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED 107e8e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107e91: 53 push %ebx <== NOT EXECUTED 107e92: 51 push %ecx <== NOT EXECUTED 107e93: 50 push %eax <== NOT EXECUTED 107e94: 68 f0 1b 12 00 push $0x121bf0 <== NOT EXECUTED 107e99: e8 4a 19 00 00 call 1097e8 <== 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) { 107e9e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107ea1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107ea4: 84 d2 test %dl,%dl <== NOT EXECUTED 107ea6: 74 10 je 107eb8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107ea8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eab: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 107eb0: e8 3b 48 00 00 call 10c6f0 <== NOT EXECUTED 107eb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 107eb8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 107ebb: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107ebe: 56 push %esi <== NOT EXECUTED 107ebf: 50 push %eax <== NOT EXECUTED 107ec0: 6a 10 push $0x10 <== NOT EXECUTED 107ec2: 68 24 1c 12 00 push $0x121c24 <== NOT EXECUTED 107ec7: e8 1c 19 00 00 call 1097e8 <== NOT EXECUTED 107ecc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ecf: eb d7 jmp 107ea8 <== NOT EXECUTED =============================================================================== 0010c428 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c428: 55 push %ebp 10c429: 89 e5 mov %esp,%ebp 10c42b: 53 push %ebx 10c42c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c42f: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c435: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c43b: 74 10 je 10c44d <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c43d: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10c440: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c443: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c445: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c44b: 75 f3 jne 10c440 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10c44d: 58 pop %eax 10c44e: 5b pop %ebx 10c44f: c9 leave 10c450: c3 ret =============================================================================== 0010c454 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c454: 55 push %ebp 10c455: 89 e5 mov %esp,%ebp 10c457: 53 push %ebx 10c458: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c45b: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c461: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c467: 74 1c je 10c485 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c469: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10c46c: 83 ec 0c sub $0xc,%esp 10c46f: ff 35 18 74 12 00 pushl 0x127418 10c475: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c478: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c47a: 83 c4 10 add $0x10,%esp 10c47d: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c483: 75 e7 jne 10c46c <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c485: 8b 5d fc mov -0x4(%ebp),%ebx 10c488: c9 leave 10c489: c3 ret =============================================================================== 0011a170 <_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 ) { 11a170: 55 push %ebp 11a171: 89 e5 mov %esp,%ebp 11a173: 57 push %edi 11a174: 56 push %esi 11a175: 53 push %ebx 11a176: 83 ec 1c sub $0x1c,%esp 11a179: 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 ) { 11a17c: 8b 45 10 mov 0x10(%ebp),%eax 11a17f: 39 43 4c cmp %eax,0x4c(%ebx) 11a182: 72 60 jb 11a1e4 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11a184: 8b 43 48 mov 0x48(%ebx),%eax 11a187: 85 c0 test %eax,%eax 11a189: 75 45 jne 11a1d0 <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a18b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a192: eb 18 jmp 11a1ac <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a194: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a197: 8b 42 2c mov 0x2c(%edx),%eax 11a19a: 89 c7 mov %eax,%edi 11a19c: 8b 75 0c mov 0xc(%ebp),%esi 11a19f: 8b 4d 10 mov 0x10(%ebp),%ecx 11a1a2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a1a4: 8b 42 28 mov 0x28(%edx),%eax 11a1a7: 8b 55 10 mov 0x10(%ebp),%edx 11a1aa: 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))) { 11a1ac: 83 ec 0c sub $0xc,%esp 11a1af: 53 push %ebx 11a1b0: e8 ab 23 00 00 call 11c560 <_Thread_queue_Dequeue> 11a1b5: 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 = 11a1b7: 83 c4 10 add $0x10,%esp 11a1ba: 85 c0 test %eax,%eax 11a1bc: 75 d6 jne 11a194 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11a1be: 8b 55 e4 mov -0x1c(%ebp),%edx 11a1c1: 8b 45 1c mov 0x1c(%ebp),%eax 11a1c4: 89 10 mov %edx,(%eax) 11a1c6: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1c8: 8d 65 f4 lea -0xc(%ebp),%esp 11a1cb: 5b pop %ebx 11a1cc: 5e pop %esi 11a1cd: 5f pop %edi 11a1ce: c9 leave 11a1cf: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11a1d0: 8b 55 1c mov 0x1c(%ebp),%edx 11a1d3: c7 02 00 00 00 00 movl $0x0,(%edx) 11a1d9: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1db: 8d 65 f4 lea -0xc(%ebp),%esp 11a1de: 5b pop %ebx 11a1df: 5e pop %esi 11a1e0: 5f pop %edi 11a1e1: c9 leave 11a1e2: c3 ret 11a1e3: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a1e4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a1ec: 5b pop %ebx <== NOT EXECUTED 11a1ed: 5e pop %esi <== NOT EXECUTED 11a1ee: 5f pop %edi <== NOT EXECUTED 11a1ef: c9 leave <== NOT EXECUTED 11a1f0: c3 ret <== NOT EXECUTED =============================================================================== 001152c8 <_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 ) { 1152c8: 55 push %ebp 1152c9: 89 e5 mov %esp,%ebp 1152cb: 57 push %edi 1152cc: 56 push %esi 1152cd: 53 push %ebx 1152ce: 83 ec 0c sub $0xc,%esp 1152d1: 8b 5d 08 mov 0x8(%ebp),%ebx 1152d4: 8b 75 10 mov 0x10(%ebp),%esi 1152d7: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1152da: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1152dd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1152e4: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 1152e7: a8 03 test $0x3,%al 1152e9: 75 19 jne 115304 <_CORE_message_queue_Initialize+0x3c> 1152eb: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1152ed: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1152f0: 89 f8 mov %edi,%eax 1152f2: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1152f5: 39 d0 cmp %edx,%eax 1152f7: 73 23 jae 11531c <_CORE_message_queue_Initialize+0x54><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1152f9: 31 c0 xor %eax,%eax } 1152fb: 8d 65 f4 lea -0xc(%ebp),%esp 1152fe: 5b pop %ebx 1152ff: 5e pop %esi 115300: 5f pop %edi 115301: c9 leave 115302: c3 ret 115303: 90 nop * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 115304: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 115307: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 11530a: 39 d0 cmp %edx,%eax 11530c: 77 eb ja 1152f9 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 11530e: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 115311: 89 f8 mov %edi,%eax 115313: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 115316: 39 d0 cmp %edx,%eax 115318: 72 df jb 1152f9 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN 11531a: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11531c: 83 ec 0c sub $0xc,%esp 11531f: 50 push %eax 115320: e8 af 28 00 00 call 117bd4 <_Workspace_Allocate> 115325: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115328: 83 c4 10 add $0x10,%esp 11532b: 85 c0 test %eax,%eax 11532d: 74 ca je 1152f9 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11532f: 57 push %edi 115330: 56 push %esi 115331: 50 push %eax 115332: 8d 43 60 lea 0x60(%ebx),%eax 115335: 50 push %eax 115336: e8 2d 52 00 00 call 11a568 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11533b: 8d 43 54 lea 0x54(%ebx),%eax 11533e: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 115341: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 115348: 8d 43 50 lea 0x50(%ebx),%eax 11534b: 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( 11534e: 6a 06 push $0x6 115350: 68 80 00 00 00 push $0x80 115355: 8b 45 0c mov 0xc(%ebp),%eax 115358: 83 38 01 cmpl $0x1,(%eax) 11535b: 0f 94 c0 sete %al 11535e: 0f b6 c0 movzbl %al,%eax 115361: 50 push %eax 115362: 53 push %ebx 115363: e8 8c 1e 00 00 call 1171f4 <_Thread_queue_Initialize> 115368: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11536a: 83 c4 20 add $0x20,%esp } 11536d: 8d 65 f4 lea -0xc(%ebp),%esp 115370: 5b pop %ebx 115371: 5e pop %esi 115372: 5f pop %edi 115373: c9 leave 115374: c3 ret =============================================================================== 0010c5d4 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c5d4: 55 push %ebp 10c5d5: 89 e5 mov %esp,%ebp 10c5d7: 57 push %edi 10c5d8: 56 push %esi 10c5d9: 53 push %ebx 10c5da: 83 ec 0c sub $0xc,%esp 10c5dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5e0: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c5e3: 8b 45 10 mov 0x10(%ebp),%eax 10c5e6: 39 43 4c cmp %eax,0x4c(%ebx) 10c5e9: 72 51 jb 10c63c <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c5eb: 8b 43 48 mov 0x48(%ebx),%eax 10c5ee: 85 c0 test %eax,%eax 10c5f0: 74 5a je 10c64c <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10c5f2: 39 43 44 cmp %eax,0x44(%ebx) 10c5f5: 77 0d ja 10c604 <_CORE_message_queue_Submit+0x30> 10c5f7: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c5fc: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ff: 5b pop %ebx 10c600: 5e pop %esi 10c601: 5f pop %edi 10c602: c9 leave 10c603: c3 ret RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10c604: 83 ec 0c sub $0xc,%esp 10c607: 8d 43 60 lea 0x60(%ebx),%eax 10c60a: 50 push %eax 10c60b: e8 a0 ff ff ff call 10c5b0 <_Chain_Get> 10c610: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c612: 8d 40 0c lea 0xc(%eax),%eax 10c615: 89 c7 mov %eax,%edi 10c617: 8b 4d 10 mov 0x10(%ebp),%ecx 10c61a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c61c: 8b 4d 10 mov 0x10(%ebp),%ecx 10c61f: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c622: 83 c4 0c add $0xc,%esp 10c625: ff 75 1c pushl 0x1c(%ebp) 10c628: 52 push %edx 10c629: 53 push %ebx 10c62a: e8 1d 51 00 00 call 11174c <_CORE_message_queue_Insert_message> 10c62f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c631: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c634: 8d 65 f4 lea -0xc(%ebp),%esp 10c637: 5b pop %ebx 10c638: 5e pop %esi 10c639: 5f pop %edi 10c63a: c9 leave 10c63b: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c63c: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c641: 8d 65 f4 lea -0xc(%ebp),%esp 10c644: 5b pop %ebx 10c645: 5e pop %esi 10c646: 5f pop %edi 10c647: c9 leave 10c648: c3 ret 10c649: 8d 76 00 lea 0x0(%esi),%esi /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c64c: 83 ec 0c sub $0xc,%esp 10c64f: 53 push %ebx 10c650: e8 fb 18 00 00 call 10df50 <_Thread_queue_Dequeue> 10c655: 89 c2 mov %eax,%edx if ( the_thread ) { 10c657: 83 c4 10 add $0x10,%esp 10c65a: 85 c0 test %eax,%eax 10c65c: 74 1e je 10c67c <_CORE_message_queue_Submit+0xa8> 10c65e: 8b 40 2c mov 0x2c(%eax),%eax 10c661: 89 c7 mov %eax,%edi 10c663: 8b 4d 10 mov 0x10(%ebp),%ecx 10c666: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10c668: 8b 42 28 mov 0x28(%edx),%eax 10c66b: 8b 4d 10 mov 0x10(%ebp),%ecx 10c66e: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c670: 8b 45 1c mov 0x1c(%ebp),%eax 10c673: 89 42 24 mov %eax,0x24(%edx) 10c676: 31 c0 xor %eax,%eax #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c678: eb 82 jmp 10c5fc <_CORE_message_queue_Submit+0x28> 10c67a: 66 90 xchg %ax,%ax /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10c67c: 8b 43 48 mov 0x48(%ebx),%eax 10c67f: e9 6e ff ff ff jmp 10c5f2 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c690 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c690: 55 push %ebp 10c691: 89 e5 mov %esp,%ebp 10c693: 57 push %edi 10c694: 56 push %esi 10c695: 53 push %ebx 10c696: 83 ec 0c sub $0xc,%esp 10c699: 8b 45 08 mov 0x8(%ebp),%eax 10c69c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c69f: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10c6a2: 8d 78 40 lea 0x40(%eax),%edi 10c6a5: b9 04 00 00 00 mov $0x4,%ecx 10c6aa: 89 de mov %ebx,%esi 10c6ac: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c6ae: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c6b1: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c6b8: 85 d2 test %edx,%edx 10c6ba: 75 30 jne 10c6ec <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c6bc: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c6c3: 8b 15 18 74 12 00 mov 0x127418,%edx 10c6c9: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c6cc: 8b 4a 08 mov 0x8(%edx),%ecx 10c6cf: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c6d2: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c6d5: 83 f9 02 cmp $0x2,%ecx 10c6d8: 74 05 je 10c6df <_CORE_mutex_Initialize+0x4f> 10c6da: 83 f9 03 cmp $0x3,%ecx 10c6dd: 75 22 jne 10c701 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c6df: 8b 4a 14 mov 0x14(%edx),%ecx 10c6e2: 3b 48 4c cmp 0x4c(%eax),%ecx 10c6e5: 72 41 jb 10c728 <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10c6e7: ff 42 1c incl 0x1c(%edx) 10c6ea: eb 15 jmp 10c701 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c6ec: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c6f3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c6fa: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c701: 6a 05 push $0x5 10c703: 68 00 04 00 00 push $0x400 10c708: 31 d2 xor %edx,%edx 10c70a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c70e: 0f 95 c2 setne %dl 10c711: 52 push %edx 10c712: 50 push %eax 10c713: e8 b4 1b 00 00 call 10e2cc <_Thread_queue_Initialize> 10c718: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c71a: 83 c4 10 add $0x10,%esp } 10c71d: 8d 65 f4 lea -0xc(%ebp),%esp 10c720: 5b pop %ebx 10c721: 5e pop %esi 10c722: 5f pop %edi 10c723: c9 leave 10c724: c3 ret 10c725: 8d 76 00 lea 0x0(%esi),%esi the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c728: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c72d: 8d 65 f4 lea -0xc(%ebp),%esp 10c730: 5b pop %ebx 10c731: 5e pop %esi 10c732: 5f pop %edi 10c733: c9 leave 10c734: c3 ret =============================================================================== 0010c788 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c788: 55 push %ebp 10c789: 89 e5 mov %esp,%ebp 10c78b: 53 push %ebx 10c78c: 83 ec 14 sub $0x14,%esp 10c78f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c792: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c795: a1 58 73 12 00 mov 0x127358,%eax 10c79a: 85 c0 test %eax,%eax 10c79c: 74 04 je 10c7a2 <_CORE_mutex_Seize+0x1a> 10c79e: 84 d2 test %dl,%dl 10c7a0: 75 36 jne 10c7d8 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c7a2: 83 ec 08 sub $0x8,%esp 10c7a5: 8d 45 18 lea 0x18(%ebp),%eax 10c7a8: 50 push %eax 10c7a9: 53 push %ebx 10c7aa: 88 55 f4 mov %dl,-0xc(%ebp) 10c7ad: e8 de 4f 00 00 call 111790 <_CORE_mutex_Seize_interrupt_trylock> 10c7b2: 83 c4 10 add $0x10,%esp 10c7b5: 85 c0 test %eax,%eax 10c7b7: 8a 55 f4 mov -0xc(%ebp),%dl 10c7ba: 74 14 je 10c7d0 <_CORE_mutex_Seize+0x48> 10c7bc: 84 d2 test %dl,%dl 10c7be: 75 30 jne 10c7f0 <_CORE_mutex_Seize+0x68> 10c7c0: ff 75 18 pushl 0x18(%ebp) 10c7c3: 9d popf 10c7c4: a1 18 74 12 00 mov 0x127418,%eax 10c7c9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c7d0: 8b 5d fc mov -0x4(%ebp),%ebx 10c7d3: c9 leave 10c7d4: c3 ret 10c7d5: 8d 76 00 lea 0x0(%esi),%esi bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c7d8: 83 3d 20 75 12 00 01 cmpl $0x1,0x127520 10c7df: 76 c1 jbe 10c7a2 <_CORE_mutex_Seize+0x1a> 10c7e1: 53 push %ebx 10c7e2: 6a 13 push $0x13 10c7e4: 6a 00 push $0x0 10c7e6: 6a 00 push $0x0 10c7e8: e8 f3 05 00 00 call 10cde0 <_Internal_error_Occurred> 10c7ed: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c7f0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c7f7: a1 18 74 12 00 mov 0x127418,%eax 10c7fc: 89 58 44 mov %ebx,0x44(%eax) 10c7ff: 8b 55 0c mov 0xc(%ebp),%edx 10c802: 89 50 20 mov %edx,0x20(%eax) 10c805: a1 58 73 12 00 mov 0x127358,%eax 10c80a: 40 inc %eax 10c80b: a3 58 73 12 00 mov %eax,0x127358 10c810: ff 75 18 pushl 0x18(%ebp) 10c813: 9d popf 10c814: 83 ec 08 sub $0x8,%esp 10c817: ff 75 14 pushl 0x14(%ebp) 10c81a: 53 push %ebx 10c81b: e8 18 ff ff ff call 10c738 <_CORE_mutex_Seize_interrupt_blocking> 10c820: 83 c4 10 add $0x10,%esp } 10c823: 8b 5d fc mov -0x4(%ebp),%ebx 10c826: c9 leave 10c827: c3 ret =============================================================================== 00111790 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 111790: 55 push %ebp 111791: 89 e5 mov %esp,%ebp 111793: 56 push %esi 111794: 53 push %ebx 111795: 8b 45 08 mov 0x8(%ebp),%eax 111798: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11179b: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1117a1: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1117a8: 8b 58 50 mov 0x50(%eax),%ebx 1117ab: 85 db test %ebx,%ebx 1117ad: 74 31 je 1117e0 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1117af: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1117b6: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1117b9: 8b 5a 08 mov 0x8(%edx),%ebx 1117bc: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1117bf: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 1117c6: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 1117c9: 83 fb 02 cmp $0x2,%ebx 1117cc: 74 26 je 1117f4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 1117ce: 83 fb 03 cmp $0x3,%ebx 1117d1: 74 3d je 111810 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1117d3: ff 31 pushl (%ecx) 1117d5: 9d popf 1117d6: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1117d8: 8d 65 f8 lea -0x8(%ebp),%esp 1117db: 5b pop %ebx 1117dc: 5e pop %esi 1117dd: c9 leave 1117de: c3 ret 1117df: 90 nop /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 1117e0: 3b 50 5c cmp 0x5c(%eax),%edx 1117e3: 74 17 je 1117fc <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 1117e5: b8 01 00 00 00 mov $0x1,%eax 1117ea: 8d 65 f8 lea -0x8(%ebp),%esp 1117ed: 5b pop %ebx 1117ee: 5e pop %esi 1117ef: c9 leave 1117f0: c3 ret 1117f1: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 1117f4: ff 42 1c incl 0x1c(%edx) 1117f7: eb da jmp 1117d3 <_CORE_mutex_Seize_interrupt_trylock+0x43> 1117f9: 8d 76 00 lea 0x0(%esi),%esi * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 1117fc: 8b 58 40 mov 0x40(%eax),%ebx 1117ff: 85 db test %ebx,%ebx 111801: 75 45 jne 111848 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 111803: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 111806: ff 31 pushl (%ecx) 111808: 9d popf 111809: 31 c0 xor %eax,%eax 11180b: eb dd jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> 11180d: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 111810: 8b 5a 1c mov 0x1c(%edx),%ebx 111813: 8d 73 01 lea 0x1(%ebx),%esi 111816: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 111819: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 11181c: 39 70 4c cmp %esi,0x4c(%eax) 11181f: 74 6b je 11188c <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111821: 72 39 jb 11185c <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 111823: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 11182a: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111831: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 111838: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11183b: ff 31 pushl (%ecx) 11183d: 9d popf 11183e: 31 c0 xor %eax,%eax 111840: 8d 65 f8 lea -0x8(%ebp),%esp 111843: 5b pop %ebx 111844: 5e pop %esi 111845: c9 leave 111846: c3 ret 111847: 90 nop * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 111848: 4b dec %ebx 111849: 75 9a jne 1117e5 <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 11184b: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 111852: ff 31 pushl (%ecx) <== NOT EXECUTED 111854: 9d popf <== NOT EXECUTED 111855: 31 c0 xor %eax,%eax <== NOT EXECUTED 111857: eb 91 jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 111859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11185c: 8b 15 58 73 12 00 mov 0x127358,%edx 111862: 42 inc %edx 111863: 89 15 58 73 12 00 mov %edx,0x127358 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 111869: ff 31 pushl (%ecx) 11186b: 9d popf _Thread_Change_priority( 11186c: 52 push %edx 11186d: 6a 00 push $0x0 11186f: ff 70 4c pushl 0x4c(%eax) 111872: ff 70 5c pushl 0x5c(%eax) 111875: e8 0e be ff ff call 10d688 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 11187a: e8 f1 c2 ff ff call 10db70 <_Thread_Enable_dispatch> 11187f: 31 c0 xor %eax,%eax 111881: 83 c4 10 add $0x10,%esp 111884: e9 61 ff ff ff jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111889: 8d 76 00 lea 0x0(%esi),%esi Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 11188c: ff 31 pushl (%ecx) 11188e: 9d popf 11188f: 31 c0 xor %eax,%eax 111891: e9 54 ff ff ff jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c828 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c828: 55 push %ebp 10c829: 89 e5 mov %esp,%ebp 10c82b: 53 push %ebx 10c82c: 83 ec 04 sub $0x4,%esp 10c82f: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c832: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c835: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c839: 74 15 je 10c850 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c83b: 3b 05 18 74 12 00 cmp 0x127418,%eax 10c841: 74 0d je 10c850 <_CORE_mutex_Surrender+0x28> 10c843: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c848: 8b 5d fc mov -0x4(%ebp),%ebx 10c84b: c9 leave 10c84c: c3 ret 10c84d: 8d 76 00 lea 0x0(%esi),%esi return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c850: 8b 53 54 mov 0x54(%ebx),%edx 10c853: 85 d2 test %edx,%edx 10c855: 74 65 je 10c8bc <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c857: 4a dec %edx 10c858: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c85b: 85 d2 test %edx,%edx 10c85d: 75 5d jne 10c8bc <_CORE_mutex_Surrender+0x94> 10c85f: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c862: 83 fa 02 cmp $0x2,%edx 10c865: 0f 84 99 00 00 00 je 10c904 <_CORE_mutex_Surrender+0xdc> 10c86b: 83 fa 03 cmp $0x3,%edx 10c86e: 0f 84 90 00 00 00 je 10c904 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c874: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c87b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c882: 83 fa 02 cmp $0x2,%edx 10c885: 74 5d je 10c8e4 <_CORE_mutex_Surrender+0xbc> 10c887: 83 fa 03 cmp $0x3,%edx 10c88a: 74 58 je 10c8e4 <_CORE_mutex_Surrender+0xbc> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c88c: 83 ec 0c sub $0xc,%esp 10c88f: 53 push %ebx 10c890: e8 bb 16 00 00 call 10df50 <_Thread_queue_Dequeue> 10c895: 83 c4 10 add $0x10,%esp 10c898: 85 c0 test %eax,%eax 10c89a: 74 7c je 10c918 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c89c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c89f: 8b 50 08 mov 0x8(%eax),%edx 10c8a2: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c8a5: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c8ac: 8b 53 48 mov 0x48(%ebx),%edx 10c8af: 83 fa 02 cmp $0x2,%edx 10c8b2: 74 58 je 10c90c <_CORE_mutex_Surrender+0xe4> 10c8b4: 83 fa 03 cmp $0x3,%edx 10c8b7: 74 0b je 10c8c4 <_CORE_mutex_Surrender+0x9c> 10c8b9: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c8bc: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c8be: 8b 5d fc mov -0x4(%ebp),%ebx 10c8c1: c9 leave 10c8c2: c3 ret 10c8c3: 90 nop case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c8c4: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c8c7: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c8ca: 3b 50 14 cmp 0x14(%eax),%edx 10c8cd: 73 ed jae 10c8bc <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c8cf: 51 push %ecx 10c8d0: 6a 00 push $0x0 10c8d2: 52 push %edx 10c8d3: 50 push %eax 10c8d4: e8 af 0d 00 00 call 10d688 <_Thread_Change_priority> 10c8d9: 31 c0 xor %eax,%eax 10c8db: 83 c4 10 add $0x10,%esp 10c8de: e9 65 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> 10c8e3: 90 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c8e4: 8b 50 1c mov 0x1c(%eax),%edx 10c8e7: 85 d2 test %edx,%edx 10c8e9: 75 a1 jne 10c88c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c8eb: 8b 50 18 mov 0x18(%eax),%edx 10c8ee: 3b 50 14 cmp 0x14(%eax),%edx 10c8f1: 74 99 je 10c88c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c8f3: 51 push %ecx 10c8f4: 6a 01 push $0x1 10c8f6: 52 push %edx 10c8f7: 50 push %eax 10c8f8: e8 8b 0d 00 00 call 10d688 <_Thread_Change_priority> 10c8fd: 83 c4 10 add $0x10,%esp 10c900: eb 8a jmp 10c88c <_CORE_mutex_Surrender+0x64> 10c902: 66 90 xchg %ax,%ax the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c904: ff 48 1c decl 0x1c(%eax) 10c907: e9 68 ff ff ff jmp 10c874 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c90c: ff 40 1c incl 0x1c(%eax) 10c90f: 31 c0 xor %eax,%eax break; 10c911: e9 32 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> 10c916: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c918: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c91f: 31 c0 xor %eax,%eax 10c921: e9 22 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c974 <_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 ) { 10c974: 55 push %ebp 10c975: 89 e5 mov %esp,%ebp 10c977: 53 push %ebx 10c978: 83 ec 10 sub $0x10,%esp 10c97b: 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)) ) { 10c97e: 53 push %ebx 10c97f: e8 cc 15 00 00 call 10df50 <_Thread_queue_Dequeue> 10c984: 83 c4 10 add $0x10,%esp 10c987: 85 c0 test %eax,%eax 10c989: 74 09 je 10c994 <_CORE_semaphore_Surrender+0x20> 10c98b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c98d: 8b 5d fc mov -0x4(%ebp),%ebx 10c990: c9 leave 10c991: c3 ret 10c992: 66 90 xchg %ax,%ax if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c994: 9c pushf 10c995: fa cli 10c996: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c997: 8b 43 48 mov 0x48(%ebx),%eax 10c99a: 3b 43 40 cmp 0x40(%ebx),%eax 10c99d: 72 0d jb 10c9ac <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10c99f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c9a4: 52 push %edx 10c9a5: 9d popf } return status; } 10c9a6: 8b 5d fc mov -0x4(%ebp),%ebx 10c9a9: c9 leave 10c9aa: c3 ret 10c9ab: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c9ac: 40 inc %eax 10c9ad: 89 43 48 mov %eax,0x48(%ebx) 10c9b0: 31 c0 xor %eax,%eax 10c9b2: eb f0 jmp 10c9a4 <_CORE_semaphore_Surrender+0x30> =============================================================================== 00111624 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111624: 55 push %ebp 111625: 89 e5 mov %esp,%ebp 111627: 57 push %edi 111628: 56 push %esi 111629: 53 push %ebx 11162a: 8b 7d 08 mov 0x8(%ebp),%edi 11162d: 8b 4d 10 mov 0x10(%ebp),%ecx 111630: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 111633: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111635: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 11163c: 85 c9 test %ecx,%ecx 11163e: 74 17 je 111657 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 111640: 8b 45 0c mov 0xc(%ebp),%eax 111643: eb 05 jmp 11164a <_Chain_Initialize+0x26> 111645: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111648: 89 d8 mov %ebx,%eax current->next = next; 11164a: 89 02 mov %eax,(%edx) next->previous = current; 11164c: 89 50 04 mov %edx,0x4(%eax) 11164f: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 111652: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 111654: 49 dec %ecx 111655: 75 f1 jne 111648 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 111657: 8d 47 04 lea 0x4(%edi),%eax 11165a: 89 02 mov %eax,(%edx) the_chain->last = current; 11165c: 89 57 08 mov %edx,0x8(%edi) } 11165f: 5b pop %ebx 111660: 5e pop %esi 111661: 5f pop %edi 111662: c9 leave 111663: c3 ret =============================================================================== 0010b66c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b66c: 55 push %ebp 10b66d: 89 e5 mov %esp,%ebp 10b66f: 57 push %edi 10b670: 56 push %esi 10b671: 53 push %ebx 10b672: 83 ec 2c sub $0x2c,%esp 10b675: 8b 45 08 mov 0x8(%ebp),%eax 10b678: 8b 4d 0c mov 0xc(%ebp),%ecx 10b67b: 8b 55 10 mov 0x10(%ebp),%edx 10b67e: 89 55 dc mov %edx,-0x24(%ebp) 10b681: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b684: 8b 1d 18 74 12 00 mov 0x127418,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b68a: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b691: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b697: 9c pushf 10b698: fa cli 10b699: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b69c: 8b 16 mov (%esi),%edx 10b69e: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6a1: 21 c2 and %eax,%edx 10b6a3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6a6: 74 0d je 10b6b5 <_Event_Seize+0x49> 10b6a8: 39 d0 cmp %edx,%eax 10b6aa: 0f 84 84 00 00 00 je 10b734 <_Event_Seize+0xc8> 10b6b0: f6 c1 02 test $0x2,%cl 10b6b3: 75 7f jne 10b734 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b6b5: f6 c1 01 test $0x1,%cl 10b6b8: 75 62 jne 10b71c <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b6ba: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b6bd: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b6c0: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b6c3: c7 05 60 76 12 00 01 movl $0x1,0x127660 10b6ca: 00 00 00 _ISR_Enable( level ); 10b6cd: ff 75 e0 pushl -0x20(%ebp) 10b6d0: 9d popf if ( ticks ) { 10b6d1: 8b 45 dc mov -0x24(%ebp),%eax 10b6d4: 85 c0 test %eax,%eax 10b6d6: 0f 85 80 00 00 00 jne 10b75c <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b6dc: 83 ec 08 sub $0x8,%esp 10b6df: 68 00 01 00 00 push $0x100 10b6e4: 53 push %ebx 10b6e5: e8 36 2d 00 00 call 10e420 <_Thread_Set_state> _ISR_Disable( level ); 10b6ea: 9c pushf 10b6eb: fa cli 10b6ec: 5a pop %edx sync_state = _Event_Sync_state; 10b6ed: a1 60 76 12 00 mov 0x127660,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b6f2: c7 05 60 76 12 00 00 movl $0x0,0x127660 10b6f9: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b6fc: 83 c4 10 add $0x10,%esp 10b6ff: 83 f8 01 cmp $0x1,%eax 10b702: 74 4c je 10b750 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b704: 89 55 10 mov %edx,0x10(%ebp) 10b707: 89 5d 0c mov %ebx,0xc(%ebp) 10b70a: 89 45 08 mov %eax,0x8(%ebp) } 10b70d: 8d 65 f4 lea -0xc(%ebp),%esp 10b710: 5b pop %ebx 10b711: 5e pop %esi 10b712: 5f pop %edi 10b713: 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 ); 10b714: e9 23 1f 00 00 jmp 10d63c <_Thread_blocking_operation_Cancel> 10b719: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b71c: ff 75 e0 pushl -0x20(%ebp) 10b71f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b720: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b727: 8b 55 e4 mov -0x1c(%ebp),%edx 10b72a: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b72c: 8d 65 f4 lea -0xc(%ebp),%esp 10b72f: 5b pop %ebx 10b730: 5e pop %esi 10b731: 5f pop %edi 10b732: c9 leave 10b733: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b734: 8b 45 e4 mov -0x1c(%ebp),%eax 10b737: f7 d0 not %eax 10b739: 23 45 d4 and -0x2c(%ebp),%eax 10b73c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b73e: ff 75 e0 pushl -0x20(%ebp) 10b741: 9d popf *event_out = seized_events; 10b742: 8b 45 e4 mov -0x1c(%ebp),%eax 10b745: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b747: 8d 65 f4 lea -0xc(%ebp),%esp 10b74a: 5b pop %ebx 10b74b: 5e pop %esi 10b74c: 5f pop %edi 10b74d: c9 leave 10b74e: c3 ret 10b74f: 90 nop _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b750: 52 push %edx 10b751: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b752: 8d 65 f4 lea -0xc(%ebp),%esp 10b755: 5b pop %ebx 10b756: 5e pop %esi 10b757: 5f pop %edi 10b758: c9 leave 10b759: c3 ret 10b75a: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b75c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b75f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b766: c7 43 64 10 b9 10 00 movl $0x10b910,0x64(%ebx) the_watchdog->id = id; 10b76d: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b770: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b777: 8b 45 dc mov -0x24(%ebp),%eax 10b77a: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b77d: 83 ec 08 sub $0x8,%esp 10b780: 8d 43 48 lea 0x48(%ebx),%eax 10b783: 50 push %eax 10b784: 68 38 74 12 00 push $0x127438 10b789: e8 e2 32 00 00 call 10ea70 <_Watchdog_Insert> 10b78e: 83 c4 10 add $0x10,%esp 10b791: e9 46 ff ff ff jmp 10b6dc <_Event_Seize+0x70> =============================================================================== 0010b7ec <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b7ec: 55 push %ebp 10b7ed: 89 e5 mov %esp,%ebp 10b7ef: 57 push %edi 10b7f0: 56 push %esi 10b7f1: 53 push %ebx 10b7f2: 83 ec 1c sub $0x1c,%esp 10b7f5: 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 ]; 10b7f8: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b7fe: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b801: 9c pushf 10b802: fa cli 10b803: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b806: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b808: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b80b: 89 c7 mov %eax,%edi 10b80d: 21 d7 and %edx,%edi 10b80f: 89 7d e0 mov %edi,-0x20(%ebp) 10b812: 74 74 je 10b888 <_Event_Surrender+0x9c> /* * 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() && 10b814: 8b 3d f4 73 12 00 mov 0x1273f4,%edi 10b81a: 85 ff test %edi,%edi 10b81c: 74 0c je 10b82a <_Event_Surrender+0x3e> 10b81e: 3b 1d 18 74 12 00 cmp 0x127418,%ebx 10b824: 0f 84 96 00 00 00 je 10b8c0 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b82a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b82e: 74 4c je 10b87c <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b830: 3b 45 e0 cmp -0x20(%ebp),%eax 10b833: 74 05 je 10b83a <_Event_Surrender+0x4e> 10b835: 83 e6 02 and $0x2,%esi 10b838: 74 42 je 10b87c <_Event_Surrender+0x90> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b83a: 8b 45 e0 mov -0x20(%ebp),%eax 10b83d: f7 d0 not %eax 10b83f: 21 d0 and %edx,%eax 10b841: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b843: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b84a: 8b 43 28 mov 0x28(%ebx),%eax 10b84d: 8b 7d e0 mov -0x20(%ebp),%edi 10b850: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b852: ff 75 e4 pushl -0x1c(%ebp) 10b855: 9d popf 10b856: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b857: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b85b: 74 37 je 10b894 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b85d: ff 75 e4 pushl -0x1c(%ebp) 10b860: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b861: 83 ec 08 sub $0x8,%esp 10b864: 68 f8 ff 03 10 push $0x1003fff8 10b869: 53 push %ebx 10b86a: e8 59 1f 00 00 call 10d7c8 <_Thread_Clear_state> 10b86f: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b872: 8d 65 f4 lea -0xc(%ebp),%esp 10b875: 5b pop %ebx 10b876: 5e pop %esi 10b877: 5f pop %edi 10b878: c9 leave 10b879: c3 ret 10b87a: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b87c: ff 75 e4 pushl -0x1c(%ebp) 10b87f: 9d popf } 10b880: 8d 65 f4 lea -0xc(%ebp),%esp 10b883: 5b pop %ebx 10b884: 5e pop %esi 10b885: 5f pop %edi 10b886: c9 leave 10b887: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b888: ff 75 e4 pushl -0x1c(%ebp) 10b88b: 9d popf } return; } } _ISR_Enable( level ); } 10b88c: 8d 65 f4 lea -0xc(%ebp),%esp 10b88f: 5b pop %ebx 10b890: 5e pop %esi 10b891: 5f pop %edi 10b892: c9 leave 10b893: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b894: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b89b: ff 75 e4 pushl -0x1c(%ebp) 10b89e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b89f: 83 ec 0c sub $0xc,%esp 10b8a2: 8d 43 48 lea 0x48(%ebx),%eax 10b8a5: 50 push %eax 10b8a6: e8 fd 32 00 00 call 10eba8 <_Watchdog_Remove> 10b8ab: 58 pop %eax 10b8ac: 5a pop %edx 10b8ad: 68 f8 ff 03 10 push $0x1003fff8 10b8b2: 53 push %ebx 10b8b3: e8 10 1f 00 00 call 10d7c8 <_Thread_Clear_state> 10b8b8: 83 c4 10 add $0x10,%esp 10b8bb: eb c3 jmp 10b880 <_Event_Surrender+0x94> 10b8bd: 8d 76 00 lea 0x0(%esi),%esi * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b8c0: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8c6: 83 ff 02 cmp $0x2,%edi 10b8c9: 74 0d je 10b8d8 <_Event_Surrender+0xec> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8cb: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8d1: 4f dec %edi 10b8d2: 0f 85 52 ff ff ff jne 10b82a <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b8d8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8db: 74 05 je 10b8e2 <_Event_Surrender+0xf6> 10b8dd: 83 e6 02 and $0x2,%esi 10b8e0: 74 22 je 10b904 <_Event_Surrender+0x118><== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8e2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8e5: f7 d0 not %eax 10b8e7: 21 d0 and %edx,%eax 10b8e9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8eb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8f2: 8b 43 28 mov 0x28(%ebx),%eax 10b8f5: 8b 55 e0 mov -0x20(%ebp),%edx 10b8f8: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b8fa: c7 05 60 76 12 00 03 movl $0x3,0x127660 10b901: 00 00 00 } _ISR_Enable( level ); 10b904: ff 75 e4 pushl -0x1c(%ebp) 10b907: 9d popf return; 10b908: e9 73 ff ff ff jmp 10b880 <_Event_Surrender+0x94> =============================================================================== 0010b910 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b910: 55 push %ebp 10b911: 89 e5 mov %esp,%ebp 10b913: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b916: 8d 45 f4 lea -0xc(%ebp),%eax 10b919: 50 push %eax 10b91a: ff 75 08 pushl 0x8(%ebp) 10b91d: e8 72 22 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10b922: 83 c4 10 add $0x10,%esp 10b925: 8b 55 f4 mov -0xc(%ebp),%edx 10b928: 85 d2 test %edx,%edx 10b92a: 75 37 jne 10b963 <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b92c: 9c pushf 10b92d: fa cli 10b92e: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b92f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b936: 3b 05 18 74 12 00 cmp 0x127418,%eax 10b93c: 74 2a je 10b968 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b93e: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b945: 52 push %edx 10b946: 9d popf 10b947: 83 ec 08 sub $0x8,%esp 10b94a: 68 f8 ff 03 10 push $0x1003fff8 10b94f: 50 push %eax 10b950: e8 73 1e 00 00 call 10d7c8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b955: a1 58 73 12 00 mov 0x127358,%eax 10b95a: 48 dec %eax 10b95b: a3 58 73 12 00 mov %eax,0x127358 10b960: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b963: c9 leave 10b964: c3 ret 10b965: 8d 76 00 lea 0x0(%esi),%esi } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b968: 8b 0d 60 76 12 00 mov 0x127660,%ecx 10b96e: 49 dec %ecx 10b96f: 75 cd jne 10b93e <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b971: c7 05 60 76 12 00 02 movl $0x2,0x127660 10b978: 00 00 00 10b97b: eb c1 jmp 10b93e <_Event_Timeout+0x2e> =============================================================================== 001118f0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 1118f0: 55 push %ebp 1118f1: 89 e5 mov %esp,%ebp 1118f3: 57 push %edi 1118f4: 56 push %esi 1118f5: 53 push %ebx 1118f6: 83 ec 2c sub $0x2c,%esp 1118f9: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1118fc: 8b 45 08 mov 0x8(%ebp),%eax 1118ff: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 111902: 8b 50 10 mov 0x10(%eax),%edx 111905: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 111908: 89 f8 mov %edi,%eax 11190a: 83 c0 04 add $0x4,%eax 11190d: 89 45 e0 mov %eax,-0x20(%ebp) 111910: 0f 82 5a 01 00 00 jb 111a70 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 111916: 8b 75 14 mov 0x14(%ebp),%esi 111919: 85 f6 test %esi,%esi 11191b: 0f 85 48 01 00 00 jne 111a69 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111921: 39 4d 08 cmp %ecx,0x8(%ebp) 111924: 0f 84 50 01 00 00 je 111a7a <_Heap_Allocate_aligned_with_boundary+0x18a> 11192a: 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; 111931: 8b 55 d4 mov -0x2c(%ebp),%edx 111934: 83 c2 07 add $0x7,%edx 111937: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 11193a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 111941: 29 7d d8 sub %edi,-0x28(%ebp) 111944: eb 19 jmp 11195f <_Heap_Allocate_aligned_with_boundary+0x6f> 111946: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111948: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 11194b: 85 db test %ebx,%ebx 11194d: 0f 85 e9 00 00 00 jne 111a3c <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 111953: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111956: 39 4d 08 cmp %ecx,0x8(%ebp) 111959: 0f 84 25 01 00 00 je 111a84 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11195f: 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 ) { 111962: 8b 59 04 mov 0x4(%ecx),%ebx 111965: 39 5d e0 cmp %ebx,-0x20(%ebp) 111968: 73 e9 jae 111953 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 11196a: 8b 55 10 mov 0x10(%ebp),%edx 11196d: 85 d2 test %edx,%edx 11196f: 74 d7 je 111948 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 111971: 8b 45 08 mov 0x8(%ebp),%eax 111974: 8b 40 14 mov 0x14(%eax),%eax 111977: 89 45 d0 mov %eax,-0x30(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 11197a: 83 e3 fe and $0xfffffffe,%ebx 11197d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 111980: 8d 51 08 lea 0x8(%ecx),%edx 111983: 89 55 cc mov %edx,-0x34(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 111986: 8b 75 c8 mov -0x38(%ebp),%esi 111989: 29 c6 sub %eax,%esi 11198b: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 11198d: 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); 111990: 89 d8 mov %ebx,%eax 111992: 31 d2 xor %edx,%edx 111994: f7 75 10 divl 0x10(%ebp) 111997: 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 ) { 111999: 39 de cmp %ebx,%esi 11199b: 73 0b jae 1119a8 <_Heap_Allocate_aligned_with_boundary+0xb8> 11199d: 89 f0 mov %esi,%eax 11199f: 31 d2 xor %edx,%edx 1119a1: f7 75 10 divl 0x10(%ebp) 1119a4: 89 f3 mov %esi,%ebx 1119a6: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1119a8: 8b 45 14 mov 0x14(%ebp),%eax 1119ab: 85 c0 test %eax,%eax 1119ad: 74 59 je 111a08 <_Heap_Allocate_aligned_with_boundary+0x118> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 1119af: 8d 34 3b lea (%ebx,%edi,1),%esi 1119b2: 89 f0 mov %esi,%eax 1119b4: 31 d2 xor %edx,%edx 1119b6: f7 75 14 divl 0x14(%ebp) 1119b9: 89 f0 mov %esi,%eax 1119bb: 29 d0 sub %edx,%eax 1119bd: 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 ) { 1119bf: 39 c3 cmp %eax,%ebx 1119c1: 73 45 jae 111a08 <_Heap_Allocate_aligned_with_boundary+0x118> 1119c3: 39 c6 cmp %eax,%esi 1119c5: 76 41 jbe 111a08 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1119c7: 8b 45 cc mov -0x34(%ebp),%eax 1119ca: 01 f8 add %edi,%eax 1119cc: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 1119cf: 39 d0 cmp %edx,%eax 1119d1: 77 80 ja 111953 <_Heap_Allocate_aligned_with_boundary+0x63> 1119d3: 89 ce mov %ecx,%esi 1119d5: eb 0e jmp 1119e5 <_Heap_Allocate_aligned_with_boundary+0xf5> 1119d7: 90 nop /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 1119d8: 39 c1 cmp %eax,%ecx 1119da: 76 2a jbe 111a06 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 1119dc: 39 55 dc cmp %edx,-0x24(%ebp) 1119df: 0f 87 a3 00 00 00 ja 111a88 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 1119e5: 89 d3 mov %edx,%ebx 1119e7: 29 fb sub %edi,%ebx 1119e9: 89 d8 mov %ebx,%eax 1119eb: 31 d2 xor %edx,%edx 1119ed: f7 75 10 divl 0x10(%ebp) 1119f0: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 1119f2: 8d 0c 3b lea (%ebx,%edi,1),%ecx 1119f5: 89 c8 mov %ecx,%eax 1119f7: 31 d2 xor %edx,%edx 1119f9: f7 75 14 divl 0x14(%ebp) 1119fc: 89 c8 mov %ecx,%eax 1119fe: 29 d0 sub %edx,%eax 111a00: 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 ) { 111a02: 39 c3 cmp %eax,%ebx 111a04: 72 d2 jb 1119d8 <_Heap_Allocate_aligned_with_boundary+0xe8> 111a06: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 111a08: 39 5d cc cmp %ebx,-0x34(%ebp) 111a0b: 0f 87 42 ff ff ff ja 111953 <_Heap_Allocate_aligned_with_boundary+0x63> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 111a11: be f8 ff ff ff mov $0xfffffff8,%esi 111a16: 29 ce sub %ecx,%esi 111a18: 01 de add %ebx,%esi 111a1a: 89 d8 mov %ebx,%eax 111a1c: 31 d2 xor %edx,%edx 111a1e: f7 75 d4 divl -0x2c(%ebp) 111a21: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111a23: 39 75 d0 cmp %esi,-0x30(%ebp) 111a26: 0f 86 1f ff ff ff jbe 11194b <_Heap_Allocate_aligned_with_boundary+0x5b> 111a2c: 85 f6 test %esi,%esi 111a2e: 0f 85 1f ff ff ff jne 111953 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 111a34: 85 db test %ebx,%ebx 111a36: 0f 84 17 ff ff ff je 111953 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 111a3c: 8b 55 e4 mov -0x1c(%ebp),%edx 111a3f: 8b 45 08 mov 0x8(%ebp),%eax 111a42: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 111a45: 57 push %edi 111a46: 53 push %ebx 111a47: 51 push %ecx 111a48: 50 push %eax 111a49: e8 a2 b2 ff ff call 10ccf0 <_Heap_Block_allocate> 111a4e: 89 d8 mov %ebx,%eax 111a50: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 111a53: 8b 4d e4 mov -0x1c(%ebp),%ecx 111a56: 8b 55 08 mov 0x8(%ebp),%edx 111a59: 39 4a 44 cmp %ecx,0x44(%edx) 111a5c: 73 14 jae 111a72 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a5e: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 111a61: 8d 65 f4 lea -0xc(%ebp),%esp 111a64: 5b pop %ebx 111a65: 5e pop %esi 111a66: 5f pop %edi 111a67: c9 leave 111a68: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111a69: 3b 7d 14 cmp 0x14(%ebp),%edi 111a6c: 76 21 jbe 111a8f <_Heap_Allocate_aligned_with_boundary+0x19f> 111a6e: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a70: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 111a72: 8d 65 f4 lea -0xc(%ebp),%esp 111a75: 5b pop %ebx 111a76: 5e pop %esi 111a77: 5f pop %edi 111a78: c9 leave 111a79: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111a7a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111a81: 8d 76 00 lea 0x0(%esi),%esi 111a84: 31 c0 xor %eax,%eax 111a86: eb cb jmp 111a53 <_Heap_Allocate_aligned_with_boundary+0x163> 111a88: 89 f1 mov %esi,%ecx <== NOT EXECUTED 111a8a: e9 c4 fe ff ff jmp 111953 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 111a8f: 8b 5d 10 mov 0x10(%ebp),%ebx 111a92: 85 db test %ebx,%ebx 111a94: 0f 85 87 fe ff ff jne 111921 <_Heap_Allocate_aligned_with_boundary+0x31> 111a9a: 89 55 10 mov %edx,0x10(%ebp) 111a9d: e9 7f fe ff ff jmp 111921 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010ccf0 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10ccf0: 55 push %ebp 10ccf1: 89 e5 mov %esp,%ebp 10ccf3: 57 push %edi 10ccf4: 56 push %esi 10ccf5: 53 push %ebx 10ccf6: 83 ec 10 sub $0x10,%esp 10ccf9: 8b 75 08 mov 0x8(%ebp),%esi 10ccfc: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10ccff: 89 5d ec mov %ebx,-0x14(%ebp) 10cd02: 8b 7d 10 mov 0x10(%ebp),%edi 10cd05: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10cd08: 89 f8 mov %edi,%eax 10cd0a: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cd0c: 8b 53 04 mov 0x4(%ebx),%edx 10cd0f: 83 e2 fe and $0xfffffffe,%edx 10cd12: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cd17: 0f 85 8b 00 00 00 jne 10cda8 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cd1d: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10cd20: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cd23: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cd26: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cd29: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cd2c: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cd2f: 8b 53 04 mov 0x4(%ebx),%edx 10cd32: 83 e2 fe and $0xfffffffe,%edx 10cd35: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10cd38: 8b 56 10 mov 0x10(%esi),%edx 10cd3b: 89 55 e4 mov %edx,-0x1c(%ebp) 10cd3e: 39 d0 cmp %edx,%eax 10cd40: 72 72 jb 10cdb4 <_Heap_Block_allocate+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cd42: 8b 43 04 mov 0x4(%ebx),%eax 10cd45: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10cd48: 8b 45 10 mov 0x10(%ebp),%eax 10cd4b: 31 d2 xor %edx,%edx 10cd4d: f7 75 e4 divl -0x1c(%ebp) 10cd50: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10cd52: 89 f8 mov %edi,%eax 10cd54: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10cd56: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10cd59: f6 43 04 01 testb $0x1,0x4(%ebx) 10cd5d: 75 69 jne 10cdc8 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10cd5f: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10cd61: 8b 53 04 mov 0x4(%ebx),%edx 10cd64: 83 e2 fe and $0xfffffffe,%edx 10cd67: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10cd69: 89 c2 mov %eax,%edx 10cd6b: 83 ca 01 or $0x1,%edx 10cd6e: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10cd71: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10cd73: 8b 45 f0 mov -0x10(%ebp),%eax 10cd76: 83 e0 fe and $0xfffffffe,%eax 10cd79: 03 45 ec add -0x14(%ebp),%eax 10cd7c: 29 f8 sub %edi,%eax 10cd7e: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10cd81: ff 75 14 pushl 0x14(%ebp) 10cd84: 51 push %ecx 10cd85: 57 push %edi 10cd86: 56 push %esi 10cd87: e8 80 fe ff ff call 10cc0c <_Heap_Block_split> 10cd8c: 89 fb mov %edi,%ebx 10cd8e: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10cd91: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10cd94: 39 46 34 cmp %eax,0x34(%esi) 10cd97: 76 03 jbe 10cd9c <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10cd99: 89 46 34 mov %eax,0x34(%esi) } return block; } 10cd9c: 89 d8 mov %ebx,%eax 10cd9e: 8d 65 f4 lea -0xc(%ebp),%esp 10cda1: 5b pop %ebx 10cda2: 5e pop %esi 10cda3: 5f pop %edi 10cda4: c9 leave 10cda5: c3 ret 10cda6: 66 90 xchg %ax,%ax /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10cda8: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10cdaa: 8b 56 10 mov 0x10(%esi),%edx 10cdad: 89 55 e4 mov %edx,-0x1c(%ebp) 10cdb0: 39 d0 cmp %edx,%eax 10cdb2: 73 8e jae 10cd42 <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10cdb4: 03 45 14 add 0x14(%ebp),%eax 10cdb7: 50 push %eax 10cdb8: 51 push %ecx 10cdb9: 53 push %ebx 10cdba: 56 push %esi 10cdbb: e8 4c fe ff ff call 10cc0c <_Heap_Block_split> 10cdc0: 83 c4 10 add $0x10,%esp 10cdc3: eb cc jmp 10cd91 <_Heap_Block_allocate+0xa1> 10cdc5: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10cdc8: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10cdcb: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10cdce: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cdd1: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cdd4: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cdd7: ff 46 38 incl 0x38(%esi) 10cdda: 89 d9 mov %ebx,%ecx 10cddc: eb 8b jmp 10cd69 <_Heap_Block_allocate+0x79> =============================================================================== 0010cc0c <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10cc0c: 55 push %ebp 10cc0d: 89 e5 mov %esp,%ebp 10cc0f: 57 push %edi 10cc10: 56 push %esi 10cc11: 53 push %ebx 10cc12: 83 ec 14 sub $0x14,%esp 10cc15: 8b 4d 08 mov 0x8(%ebp),%ecx 10cc18: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cc1b: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10cc1e: 8b 41 14 mov 0x14(%ecx),%eax 10cc21: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cc24: 8b 43 04 mov 0x4(%ebx),%eax 10cc27: 89 45 e4 mov %eax,-0x1c(%ebp) 10cc2a: 89 c6 mov %eax,%esi 10cc2c: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10cc2f: 8b 55 e8 mov -0x18(%ebp),%edx 10cc32: 83 ea 08 sub $0x8,%edx 10cc35: 8b 45 14 mov 0x14(%ebp),%eax 10cc38: 39 d0 cmp %edx,%eax 10cc3a: 73 02 jae 10cc3e <_Heap_Block_split+0x32> 10cc3c: 89 d0 mov %edx,%eax 10cc3e: 83 c0 08 add $0x8,%eax 10cc41: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10cc44: 31 d2 xor %edx,%edx 10cc46: f7 f7 div %edi if ( remainder != 0 ) { 10cc48: 85 d2 test %edx,%edx 10cc4a: 75 70 jne 10ccbc <_Heap_Block_split+0xb0> 10cc4c: 8b 7d f0 mov -0x10(%ebp),%edi 10cc4f: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cc52: 8d 04 33 lea (%ebx,%esi,1),%eax 10cc55: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10cc58: 8d 56 04 lea 0x4(%esi),%edx 10cc5b: 2b 55 f0 sub -0x10(%ebp),%edx 10cc5e: 8b 7d e8 mov -0x18(%ebp),%edi 10cc61: 83 c7 04 add $0x4,%edi 10cc64: 39 fa cmp %edi,%edx 10cc66: 72 60 jb 10ccc8 <_Heap_Block_split+0xbc> 10cc68: 8b 55 ec mov -0x14(%ebp),%edx 10cc6b: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10cc6d: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10cc70: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc73: 83 e7 01 and $0x1,%edi 10cc76: 0b 7d ec or -0x14(%ebp),%edi 10cc79: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10cc7c: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cc7f: 8b 58 04 mov 0x4(%eax),%ebx 10cc82: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cc85: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cc8a: 75 4c jne 10ccd8 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10cc8c: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10cc8f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10cc92: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10cc95: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10cc98: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10cc9b: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10cc9e: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cca0: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10cca3: 89 f1 mov %esi,%ecx 10cca5: 83 c9 01 or $0x1,%ecx 10cca8: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10ccab: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ccad: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10ccb1: 83 c4 14 add $0x14,%esp 10ccb4: 5b pop %ebx 10ccb5: 5e pop %esi 10ccb6: 5f pop %edi 10ccb7: c9 leave 10ccb8: c3 ret 10ccb9: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10ccbc: 03 7d f0 add -0x10(%ebp),%edi 10ccbf: 29 d7 sub %edx,%edi 10ccc1: 89 7d ec mov %edi,-0x14(%ebp) 10ccc4: eb 8c jmp 10cc52 <_Heap_Block_split+0x46> 10ccc6: 66 90 xchg %ax,%ax free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10ccc8: 8b 45 e0 mov -0x20(%ebp),%eax 10cccb: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cccf: 83 c4 14 add $0x14,%esp 10ccd2: 5b pop %ebx 10ccd3: 5e pop %esi 10ccd4: 5f pop %edi 10ccd5: c9 leave 10ccd6: c3 ret 10ccd7: 90 nop RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ccd8: 8b 7d 10 mov 0x10(%ebp),%edi 10ccdb: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ccde: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10cce1: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cce4: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cce7: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10ccea: ff 41 38 incl 0x38(%ecx) 10cced: eb b4 jmp 10cca3 <_Heap_Block_split+0x97> =============================================================================== 00115258 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115258: 55 push %ebp 115259: 89 e5 mov %esp,%ebp 11525b: 56 push %esi 11525c: 53 push %ebx 11525d: 8b 4d 08 mov 0x8(%ebp),%ecx 115260: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 115263: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 115266: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 115269: 3b 41 18 cmp 0x18(%ecx),%eax 11526c: 73 3a jae 1152a8 <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 11526e: 39 d0 cmp %edx,%eax 115270: 74 0e je 115280 <_Heap_Extend+0x28> 115272: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115277: 8d 65 f8 lea -0x8(%ebp),%esp 11527a: 5b pop %ebx 11527b: 5e pop %esi 11527c: c9 leave 11527d: c3 ret 11527e: 66 90 xchg %ax,%ax { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 115280: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 115283: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 115286: 29 d8 sub %ebx,%eax 115288: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11528b: 89 f0 mov %esi,%eax 11528d: 31 d2 xor %edx,%edx 11528f: f7 71 10 divl 0x10(%ecx) 115292: 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; 115294: 8b 45 14 mov 0x14(%ebp),%eax 115297: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 115299: 39 71 14 cmp %esi,0x14(%ecx) 11529c: 76 1a jbe 1152b8 <_Heap_Extend+0x60> <== ALWAYS TAKEN 11529e: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152a0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1152a3: 5b pop %ebx <== NOT EXECUTED 1152a4: 5e pop %esi <== NOT EXECUTED 1152a5: c9 leave <== NOT EXECUTED 1152a6: c3 ret <== NOT EXECUTED 1152a7: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 1152a8: 39 d0 cmp %edx,%eax 1152aa: 73 c2 jae 11526e <_Heap_Extend+0x16> 1152ac: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152b1: 8d 65 f8 lea -0x8(%ebp),%esp 1152b4: 5b pop %ebx 1152b5: 5e pop %esi 1152b6: c9 leave 1152b7: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1152b8: 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; 1152bb: 8b 43 04 mov 0x4(%ebx),%eax 1152be: 83 e0 01 and $0x1,%eax 1152c1: 09 f0 or %esi,%eax 1152c3: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 1152c6: 8b 41 20 mov 0x20(%ecx),%eax 1152c9: 29 d0 sub %edx,%eax 1152cb: 83 c8 01 or $0x1,%eax 1152ce: 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; 1152d1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1152d4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1152d7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1152da: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1152dd: 83 ec 08 sub $0x8,%esp 1152e0: 83 c3 08 add $0x8,%ebx 1152e3: 53 push %ebx 1152e4: 51 push %ecx 1152e5: e8 ea a7 ff ff call 10fad4 <_Heap_Free> 1152ea: 31 c0 xor %eax,%eax 1152ec: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1152ef: 8d 65 f8 lea -0x8(%ebp),%esp 1152f2: 5b pop %ebx 1152f3: 5e pop %esi 1152f4: c9 leave 1152f5: c3 ret =============================================================================== 00111aa4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 111aa4: 55 push %ebp 111aa5: 89 e5 mov %esp,%ebp 111aa7: 57 push %edi 111aa8: 56 push %esi 111aa9: 53 push %ebx 111aaa: 83 ec 18 sub $0x18,%esp 111aad: 8b 5d 08 mov 0x8(%ebp),%ebx 111ab0: 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 ) 111ab3: 8d 48 f8 lea -0x8(%eax),%ecx 111ab6: 31 d2 xor %edx,%edx 111ab8: f7 73 10 divl 0x10(%ebx) 111abb: 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; 111abd: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111ac0: 39 c1 cmp %eax,%ecx 111ac2: 72 07 jb 111acb <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 111ac4: 8b 73 24 mov 0x24(%ebx),%esi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111ac7: 39 f1 cmp %esi,%ecx 111ac9: 76 0d jbe 111ad8 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 111acb: 31 c0 xor %eax,%eax } 111acd: 83 c4 18 add $0x18,%esp 111ad0: 5b pop %ebx 111ad1: 5e pop %esi 111ad2: 5f pop %edi 111ad3: c9 leave 111ad4: c3 ret 111ad5: 8d 76 00 lea 0x0(%esi),%esi - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111ad8: 8b 51 04 mov 0x4(%ecx),%edx 111adb: 89 55 f0 mov %edx,-0x10(%ebp) 111ade: 83 e2 fe and $0xfffffffe,%edx 111ae1: 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); 111ae4: 01 ca add %ecx,%edx 111ae6: 89 55 dc mov %edx,-0x24(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111ae9: 39 d0 cmp %edx,%eax 111aeb: 77 de ja 111acb <_Heap_Free+0x27> <== NEVER TAKEN 111aed: 39 d6 cmp %edx,%esi 111aef: 72 da jb 111acb <_Heap_Free+0x27> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 111af1: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 111af4: f7 c7 01 00 00 00 test $0x1,%edi 111afa: 74 cf je 111acb <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111afc: 83 e7 fe and $0xfffffffe,%edi 111aff: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111b02: 39 d6 cmp %edx,%esi 111b04: 0f 84 e2 00 00 00 je 111bec <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111b0a: 8b 55 dc mov -0x24(%ebp),%edx 111b0d: 8b 7d e8 mov -0x18(%ebp),%edi 111b10: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 111b14: 89 7d e0 mov %edi,-0x20(%ebp) 111b17: 8a 55 e0 mov -0x20(%ebp),%dl 111b1a: 83 e2 01 and $0x1,%edx 111b1d: 88 55 e7 mov %dl,-0x19(%ebp) 111b20: 80 75 e7 01 xorb $0x1,-0x19(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 111b24: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111b28: 75 46 jne 111b70 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 111b2a: 8b 39 mov (%ecx),%edi 111b2c: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 111b2f: 29 f9 sub %edi,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 111b31: 39 c8 cmp %ecx,%eax 111b33: 77 96 ja 111acb <_Heap_Free+0x27> <== NEVER TAKEN 111b35: 39 ce cmp %ecx,%esi 111b37: 72 92 jb 111acb <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 111b39: f6 41 04 01 testb $0x1,0x4(%ecx) 111b3d: 74 8c je 111acb <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111b3f: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b43: 0f 84 af 00 00 00 je 111bf8 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 111b49: 8b 45 ec mov -0x14(%ebp),%eax 111b4c: 03 45 e8 add -0x18(%ebp),%eax 111b4f: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 111b51: 8b 55 dc mov -0x24(%ebp),%edx 111b54: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 111b57: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 111b5a: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 111b5d: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 111b60: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b63: 89 c2 mov %eax,%edx 111b65: 83 ca 01 or $0x1,%edx 111b68: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 111b6b: 89 04 01 mov %eax,(%ecx,%eax,1) 111b6e: eb 2c jmp 111b9c <_Heap_Free+0xf8> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 111b70: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b74: 74 3e je 111bb4 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 111b76: 8b 7d e8 mov -0x18(%ebp),%edi 111b79: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 111b7c: 8b 75 dc mov -0x24(%ebp),%esi 111b7f: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 111b82: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 111b85: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111b88: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111b8b: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111b8e: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b91: 89 f8 mov %edi,%eax 111b93: 83 c8 01 or $0x1,%eax 111b96: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 111b99: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 111b9c: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 111b9f: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 111ba2: 8b 55 ec mov -0x14(%ebp),%edx 111ba5: 01 53 30 add %edx,0x30(%ebx) 111ba8: b0 01 mov $0x1,%al return( true ); } 111baa: 83 c4 18 add $0x18,%esp 111bad: 5b pop %ebx 111bae: 5e pop %esi 111baf: 5f pop %edi 111bb0: c9 leave 111bb1: c3 ret 111bb2: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 111bb4: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 111bb7: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 111bba: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 111bbd: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 111bc0: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 111bc3: 8b 45 ec mov -0x14(%ebp),%eax 111bc6: 83 c8 01 or $0x1,%eax 111bc9: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111bcc: 8b 7d dc mov -0x24(%ebp),%edi 111bcf: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 111bd3: 8b 45 ec mov -0x14(%ebp),%eax 111bd6: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 111bd8: 8b 43 38 mov 0x38(%ebx),%eax 111bdb: 40 inc %eax 111bdc: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 111bdf: 3b 43 3c cmp 0x3c(%ebx),%eax 111be2: 76 b8 jbe 111b9c <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 111be4: 89 43 3c mov %eax,0x3c(%ebx) 111be7: eb b3 jmp 111b9c <_Heap_Free+0xf8> 111be9: 8d 76 00 lea 0x0(%esi),%esi _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111bec: c6 45 e7 00 movb $0x0,-0x19(%ebp) 111bf0: e9 2f ff ff ff jmp 111b24 <_Heap_Free+0x80> 111bf5: 8d 76 00 lea 0x0(%esi),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 111bf8: 8b 45 ec mov -0x14(%ebp),%eax 111bfb: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111bfe: 89 c6 mov %eax,%esi 111c00: 83 ce 01 or $0x1,%esi 111c03: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c06: 8b 55 dc mov -0x24(%ebp),%edx 111c09: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 111c0d: 89 02 mov %eax,(%edx) 111c0f: eb 8b jmp 111b9c <_Heap_Free+0xf8> =============================================================================== 001152f8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1152f8: 55 push %ebp 1152f9: 89 e5 mov %esp,%ebp 1152fb: 57 push %edi 1152fc: 56 push %esi 1152fd: 53 push %ebx 1152fe: 8b 7d 08 mov 0x8(%ebp),%edi 115301: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115304: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 11530a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 115311: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 115318: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 11531b: 39 d7 cmp %edx,%edi 11531d: 74 2a je 115349 <_Heap_Get_free_information+0x51><== NEVER TAKEN 11531f: bb 01 00 00 00 mov $0x1,%ebx 115324: 31 c9 xor %ecx,%ecx 115326: eb 02 jmp 11532a <_Heap_Get_free_information+0x32> 115328: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11532a: 8b 42 04 mov 0x4(%edx),%eax 11532d: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 115330: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 115332: 39 46 04 cmp %eax,0x4(%esi) 115335: 73 03 jae 11533a <_Heap_Get_free_information+0x42> info->largest = the_size; 115337: 89 46 04 mov %eax,0x4(%esi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 11533a: 8b 52 08 mov 0x8(%edx),%edx 11533d: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 115340: 39 d7 cmp %edx,%edi 115342: 75 e4 jne 115328 <_Heap_Get_free_information+0x30> 115344: 89 1e mov %ebx,(%esi) 115346: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 115349: 5b pop %ebx 11534a: 5e pop %esi 11534b: 5f pop %edi 11534c: c9 leave 11534d: c3 ret =============================================================================== 00115350 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 115350: 55 push %ebp 115351: 89 e5 mov %esp,%ebp 115353: 57 push %edi 115354: 56 push %esi 115355: 53 push %ebx 115356: 83 ec 04 sub $0x4,%esp 115359: 8b 45 08 mov 0x8(%ebp),%eax 11535c: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 11535f: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 115362: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 115365: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 11536b: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 115372: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 115379: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 115380: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 115387: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 11538e: 39 fb cmp %edi,%ebx 115390: 74 45 je 1153d7 <_Heap_Get_information+0x87><== NEVER TAKEN 115392: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 115395: 8d 46 0c lea 0xc(%esi),%eax 115398: 89 45 f0 mov %eax,-0x10(%ebp) 11539b: eb 16 jmp 1153b3 <_Heap_Get_information+0x63> 11539d: 8d 76 00 lea 0x0(%esi),%esi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 1153a0: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 1153a2: ff 00 incl (%eax) info->total += the_size; 1153a4: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 1153a7: 39 50 04 cmp %edx,0x4(%eax) 1153aa: 73 03 jae 1153af <_Heap_Get_information+0x5f> info->largest = the_size; 1153ac: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 1153af: 39 df cmp %ebx,%edi 1153b1: 74 15 je 1153c8 <_Heap_Get_information+0x78> 1153b3: 89 ca mov %ecx,%edx 1153b5: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1153b8: 01 d3 add %edx,%ebx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 1153ba: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 1153bd: f6 c1 01 test $0x1,%cl 1153c0: 74 de je 1153a0 <_Heap_Get_information+0x50> 1153c2: 8b 45 f0 mov -0x10(%ebp),%eax 1153c5: eb db jmp 1153a2 <_Heap_Get_information+0x52> 1153c7: 90 nop the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 1153c8: 8b 46 14 mov 0x14(%esi),%eax 1153cb: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 1153ce: 89 46 14 mov %eax,0x14(%esi) } 1153d1: 58 pop %eax 1153d2: 5b pop %ebx 1153d3: 5e pop %esi 1153d4: 5f pop %edi 1153d5: c9 leave 1153d6: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 1153d7: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 1153dc: eb f0 jmp 1153ce <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 0011f924 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f924: 55 push %ebp 11f925: 89 e5 mov %esp,%ebp 11f927: 57 push %edi 11f928: 56 push %esi 11f929: 53 push %ebx 11f92a: 83 ec 2c sub $0x2c,%esp 11f92d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f930: 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 ) 11f933: 8d 4e f8 lea -0x8(%esi),%ecx 11f936: 89 f0 mov %esi,%eax 11f938: 31 d2 xor %edx,%edx 11f93a: f7 73 10 divl 0x10(%ebx) 11f93d: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11f93f: 8b 45 14 mov 0x14(%ebp),%eax 11f942: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f948: 8b 55 18 mov 0x18(%ebp),%edx 11f94b: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11f951: 39 4b 20 cmp %ecx,0x20(%ebx) 11f954: 76 0e jbe 11f964 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 11f956: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f95b: 8d 65 f4 lea -0xc(%ebp),%esp 11f95e: 5b pop %ebx 11f95f: 5e pop %esi 11f960: 5f pop %edi 11f961: c9 leave 11f962: c3 ret 11f963: 90 nop 11f964: 39 4b 24 cmp %ecx,0x24(%ebx) 11f967: 72 ed jb 11f956 <_Heap_Resize_block+0x32> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11f969: 8b 41 04 mov 0x4(%ecx),%eax 11f96c: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11f96f: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f972: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f975: 89 fa mov %edi,%edx 11f977: 29 f2 sub %esi,%edx 11f979: 83 c2 04 add $0x4,%edx 11f97c: 89 55 dc mov %edx,-0x24(%ebp) 11f97f: 8b 57 04 mov 0x4(%edi),%edx 11f982: 83 e2 fe and $0xfffffffe,%edx 11f985: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f988: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f98c: 83 e2 01 and $0x1,%edx 11f98f: 89 55 e0 mov %edx,-0x20(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11f992: 8b 55 dc mov -0x24(%ebp),%edx 11f995: 8b 7d 14 mov 0x14(%ebp),%edi 11f998: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f99a: 8a 55 e0 mov -0x20(%ebp),%dl 11f99d: 80 f2 01 xor $0x1,%dl 11f9a0: 88 55 e0 mov %dl,-0x20(%ebp) 11f9a3: 75 17 jne 11f9bc <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f9a5: 8b 55 dc mov -0x24(%ebp),%edx 11f9a8: 39 55 10 cmp %edx,0x10(%ebp) 11f9ab: 76 20 jbe 11f9cd <_Heap_Resize_block+0xa9> 11f9ad: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f9b2: 8d 65 f4 lea -0xc(%ebp),%esp 11f9b5: 5b pop %ebx 11f9b6: 5e pop %esi 11f9b7: 5f pop %edi 11f9b8: c9 leave 11f9b9: c3 ret 11f9ba: 66 90 xchg %ax,%ax _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f9bc: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f9bf: 8b 7d d0 mov -0x30(%ebp),%edi 11f9c2: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f9c5: 8b 55 dc mov -0x24(%ebp),%edx 11f9c8: 39 55 10 cmp %edx,0x10(%ebp) 11f9cb: 77 e0 ja 11f9ad <_Heap_Resize_block+0x89><== NEVER TAKEN return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f9cd: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f9d1: 74 31 je 11fa04 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f9d3: 8b 79 04 mov 0x4(%ecx),%edi 11f9d6: 83 e7 01 and $0x1,%edi 11f9d9: 09 c7 or %eax,%edi 11f9db: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11f9de: 8b 7d d4 mov -0x2c(%ebp),%edi 11f9e1: 8b 7f 08 mov 0x8(%edi),%edi 11f9e4: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11f9e7: 8b 55 d4 mov -0x2c(%ebp),%edx 11f9ea: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11f9ed: 8b 55 e4 mov -0x1c(%ebp),%edx 11f9f0: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f9f3: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11f9f6: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11f9fb: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f9fe: 8b 7d d0 mov -0x30(%ebp),%edi 11fa01: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11fa04: ff 75 10 pushl 0x10(%ebp) 11fa07: 56 push %esi 11fa08: 51 push %ecx 11fa09: 53 push %ebx 11fa0a: e8 e1 d2 fe ff call 10ccf0 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11fa0f: 8b 50 04 mov 0x4(%eax),%edx 11fa12: 83 e2 fe and $0xfffffffe,%edx 11fa15: 29 f0 sub %esi,%eax 11fa17: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11fa1b: 8b 55 18 mov 0x18(%ebp),%edx 11fa1e: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11fa20: ff 43 54 incl 0x54(%ebx) 11fa23: 31 c0 xor %eax,%eax 11fa25: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11fa28: 8d 65 f4 lea -0xc(%ebp),%esp 11fa2b: 5b pop %ebx 11fa2c: 5e pop %esi 11fa2d: 5f pop %edi 11fa2e: c9 leave 11fa2f: c3 ret =============================================================================== 0011fa30 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11fa30: 55 push %ebp 11fa31: 89 e5 mov %esp,%ebp 11fa33: 56 push %esi 11fa34: 53 push %ebx 11fa35: 8b 5d 08 mov 0x8(%ebp),%ebx 11fa38: 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 ) 11fa3b: 8d 4e f8 lea -0x8(%esi),%ecx 11fa3e: 89 f0 mov %esi,%eax 11fa40: 31 d2 xor %edx,%edx 11fa42: f7 73 10 divl 0x10(%ebx) 11fa45: 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; 11fa47: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa4a: 39 c1 cmp %eax,%ecx 11fa4c: 72 07 jb 11fa55 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11fa4e: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa51: 39 d1 cmp %edx,%ecx 11fa53: 76 07 jbe 11fa5c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11fa55: 31 c0 xor %eax,%eax } 11fa57: 5b pop %ebx 11fa58: 5e pop %esi 11fa59: c9 leave 11fa5a: c3 ret 11fa5b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11fa5c: 8b 59 04 mov 0x4(%ecx),%ebx 11fa5f: 83 e3 fe and $0xfffffffe,%ebx 11fa62: 01 d9 add %ebx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11fa64: 39 c8 cmp %ecx,%eax 11fa66: 77 ed ja 11fa55 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11fa68: 39 ca cmp %ecx,%edx 11fa6a: 72 e9 jb 11fa55 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11fa6c: f6 41 04 01 testb $0x1,0x4(%ecx) 11fa70: 74 e3 je 11fa55 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11fa72: 29 f1 sub %esi,%ecx 11fa74: 8d 51 04 lea 0x4(%ecx),%edx 11fa77: 8b 45 10 mov 0x10(%ebp),%eax 11fa7a: 89 10 mov %edx,(%eax) 11fa7c: b0 01 mov $0x1,%al return true; } 11fa7e: 5b pop %ebx 11fa7f: 5e pop %esi 11fa80: c9 leave 11fa81: c3 ret =============================================================================== 0010d858 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d858: 55 push %ebp 10d859: 89 e5 mov %esp,%ebp 10d85b: 57 push %edi 10d85c: 56 push %esi 10d85d: 53 push %ebx 10d85e: 83 ec 3c sub $0x3c,%esp 10d861: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d864: 8b 43 10 mov 0x10(%ebx),%eax 10d867: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d86a: 8b 53 14 mov 0x14(%ebx),%edx 10d86d: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d870: 8b 43 24 mov 0x24(%ebx),%eax 10d873: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d876: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d879: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d87d: 75 1d jne 10d89c <_Heap_Walk+0x44> 10d87f: c7 45 e4 50 d8 10 00 movl $0x10d850,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d886: 83 3d 60 a7 12 00 03 cmpl $0x3,0x12a760 10d88d: 74 1d je 10d8ac <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d88f: b0 01 mov $0x1,%al block = next_block; } return true; } 10d891: 8d 65 f4 lea -0xc(%ebp),%esp 10d894: 5b pop %ebx 10d895: 5e pop %esi 10d896: 5f pop %edi 10d897: c9 leave 10d898: c3 ret 10d899: 8d 76 00 lea 0x0(%esi),%esi uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d89c: c7 45 e4 20 dc 10 00 movl $0x10dc20,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d8a3: 83 3d 60 a7 12 00 03 cmpl $0x3,0x12a760 10d8aa: 75 e3 jne 10d88f <_Heap_Walk+0x37> <== NEVER TAKEN Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d8ac: 52 push %edx 10d8ad: ff 73 0c pushl 0xc(%ebx) 10d8b0: ff 73 08 pushl 0x8(%ebx) 10d8b3: ff 75 d8 pushl -0x28(%ebp) 10d8b6: 56 push %esi 10d8b7: ff 73 1c pushl 0x1c(%ebx) 10d8ba: ff 73 18 pushl 0x18(%ebx) 10d8bd: ff 75 dc pushl -0x24(%ebp) 10d8c0: ff 75 e0 pushl -0x20(%ebp) 10d8c3: 68 b0 28 12 00 push $0x1228b0 10d8c8: 6a 00 push $0x0 10d8ca: ff 75 0c pushl 0xc(%ebp) 10d8cd: 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 ) { 10d8d0: 83 c4 30 add $0x30,%esp 10d8d3: 8b 45 e0 mov -0x20(%ebp),%eax 10d8d6: 85 c0 test %eax,%eax 10d8d8: 0f 84 b2 00 00 00 je 10d990 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d8de: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d8e2: 0f 85 b0 00 00 00 jne 10d998 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d8e8: 8b 45 dc mov -0x24(%ebp),%eax 10d8eb: 31 d2 xor %edx,%edx 10d8ed: f7 75 e0 divl -0x20(%ebp) 10d8f0: 85 d2 test %edx,%edx 10d8f2: 0f 85 ac 00 00 00 jne 10d9a4 <_Heap_Walk+0x14c> ); return false; } if ( 10d8f8: 8d 46 08 lea 0x8(%esi),%eax 10d8fb: 31 d2 xor %edx,%edx 10d8fd: f7 75 e0 divl -0x20(%ebp) 10d900: 85 d2 test %edx,%edx 10d902: 0f 85 a8 00 00 00 jne 10d9b0 <_Heap_Walk+0x158> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d908: 8b 56 04 mov 0x4(%esi),%edx 10d90b: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d90e: 83 e2 01 and $0x1,%edx 10d911: 0f 84 a1 00 00 00 je 10d9b8 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d917: 8b 06 mov (%esi),%eax 10d919: 39 45 e0 cmp %eax,-0x20(%ebp) 10d91c: 75 4e jne 10d96c <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d91e: 8b 55 d8 mov -0x28(%ebp),%edx 10d921: 8b 42 04 mov 0x4(%edx),%eax 10d924: 83 e0 fe and $0xfffffffe,%eax 10d927: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d92c: 0f 84 bd 02 00 00 je 10dbef <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d932: 8b 43 10 mov 0x10(%ebx),%eax 10d935: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d938: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d93b: 39 cb cmp %ecx,%ebx 10d93d: 0f 84 09 01 00 00 je 10da4c <_Heap_Walk+0x1f4> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d943: 8b 7b 20 mov 0x20(%ebx),%edi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d946: 39 cf cmp %ecx,%edi 10d948: 76 76 jbe 10d9c0 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10d94a: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d94c: 51 push %ecx 10d94d: 68 f8 29 12 00 push $0x1229f8 10d952: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d954: 6a 01 push $0x1 10d956: ff 75 0c pushl 0xc(%ebp) 10d959: ff 55 e4 call *-0x1c(%ebp) 10d95c: 31 c0 xor %eax,%eax 10d95e: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d961: 8d 65 f4 lea -0xc(%ebp),%esp 10d964: 5b pop %ebx 10d965: 5e pop %esi 10d966: 5f pop %edi 10d967: c9 leave 10d968: c3 ret 10d969: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d96c: 83 ec 0c sub $0xc,%esp 10d96f: ff 75 e0 pushl -0x20(%ebp) 10d972: 50 push %eax 10d973: 68 cc 29 12 00 push $0x1229cc return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d978: 6a 01 push $0x1 10d97a: ff 75 0c pushl 0xc(%ebp) 10d97d: ff 55 e4 call *-0x1c(%ebp) 10d980: 31 c0 xor %eax,%eax 10d982: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d985: 8d 65 f4 lea -0xc(%ebp),%esp 10d988: 5b pop %ebx 10d989: 5e pop %esi 10d98a: 5f pop %edi 10d98b: c9 leave 10d98c: c3 ret 10d98d: 8d 76 00 lea 0x0(%esi),%esi first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d990: 57 push %edi 10d991: 68 27 2c 12 00 push $0x122c27 10d996: eb bc jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d998: ff 75 e0 pushl -0x20(%ebp) 10d99b: 68 3a 2c 12 00 push $0x122c3a 10d9a0: eb b2 jmp 10d954 <_Heap_Walk+0xfc> 10d9a2: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d9a4: ff 75 dc pushl -0x24(%ebp) 10d9a7: 68 44 29 12 00 push $0x122944 10d9ac: eb a6 jmp 10d954 <_Heap_Walk+0xfc> 10d9ae: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d9b0: 56 push %esi 10d9b1: 68 68 29 12 00 push $0x122968 10d9b6: eb 9c jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d9b8: 56 push %esi 10d9b9: 68 9c 29 12 00 push $0x12299c 10d9be: eb 94 jmp 10d954 <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d9c0: 8b 53 24 mov 0x24(%ebx),%edx 10d9c3: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d9c6: 39 d1 cmp %edx,%ecx 10d9c8: 77 82 ja 10d94c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10d9ca: 8d 41 08 lea 0x8(%ecx),%eax 10d9cd: 31 d2 xor %edx,%edx 10d9cf: f7 75 d4 divl -0x2c(%ebp) 10d9d2: 85 d2 test %edx,%edx 10d9d4: 0f 85 20 02 00 00 jne 10dbfa <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d9da: 8b 41 04 mov 0x4(%ecx),%eax 10d9dd: 83 e0 fe and $0xfffffffe,%eax 10d9e0: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d9e5: 0f 85 29 02 00 00 jne 10dc14 <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d9eb: 8b 41 0c mov 0xc(%ecx),%eax 10d9ee: 39 d8 cmp %ebx,%eax 10d9f0: 0f 85 0f 02 00 00 jne 10dc05 <_Heap_Walk+0x3ad> <== NEVER TAKEN 10d9f6: 89 75 c8 mov %esi,-0x38(%ebp) 10d9f9: 89 c6 mov %eax,%esi 10d9fb: 89 5d c4 mov %ebx,-0x3c(%ebp) 10d9fe: eb 3d jmp 10da3d <_Heap_Walk+0x1e5> 10da00: 39 cf cmp %ecx,%edi 10da02: 0f 87 44 ff ff ff ja 10d94c <_Heap_Walk+0xf4> 10da08: 3b 4d d0 cmp -0x30(%ebp),%ecx 10da0b: 0f 87 3b ff ff ff ja 10d94c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da11: 8d 41 08 lea 0x8(%ecx),%eax 10da14: 31 d2 xor %edx,%edx 10da16: f7 75 d4 divl -0x2c(%ebp) 10da19: 85 d2 test %edx,%edx 10da1b: 0f 85 d9 01 00 00 jne 10dbfa <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10da21: 8b 41 04 mov 0x4(%ecx),%eax 10da24: 83 e0 fe and $0xfffffffe,%eax 10da27: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10da2c: 0f 85 e2 01 00 00 jne 10dc14 <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10da32: 8b 41 0c mov 0xc(%ecx),%eax 10da35: 39 d8 cmp %ebx,%eax 10da37: 0f 85 c8 01 00 00 jne 10dc05 <_Heap_Walk+0x3ad> (*printer)( 10da3d: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10da3f: 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 ) { 10da42: 39 ce cmp %ecx,%esi 10da44: 75 ba jne 10da00 <_Heap_Walk+0x1a8> 10da46: 8b 75 c8 mov -0x38(%ebp),%esi 10da49: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10da4c: 39 75 d8 cmp %esi,-0x28(%ebp) 10da4f: 0f 84 3a fe ff ff je 10d88f <_Heap_Walk+0x37> <== NEVER TAKEN 10da55: 8b 45 cc mov -0x34(%ebp),%eax - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10da58: 89 c1 mov %eax,%ecx 10da5a: 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); 10da5d: 8d 3c 31 lea (%ecx,%esi,1),%edi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10da60: a8 01 test $0x1,%al 10da62: 74 30 je 10da94 <_Heap_Walk+0x23c> (*printer)( 10da64: 83 ec 0c sub $0xc,%esp 10da67: 51 push %ecx 10da68: 56 push %esi 10da69: 68 89 2c 12 00 push $0x122c89 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da6e: 6a 00 push $0x0 10da70: ff 75 0c pushl 0xc(%ebp) 10da73: 89 4d c0 mov %ecx,-0x40(%ebp) 10da76: ff 55 e4 call *-0x1c(%ebp) 10da79: 83 c4 20 add $0x20,%esp 10da7c: 8b 4d c0 mov -0x40(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10da7f: 39 7b 20 cmp %edi,0x20(%ebx) 10da82: 76 20 jbe 10daa4 <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10da84: 83 ec 0c sub $0xc,%esp 10da87: 57 push %edi 10da88: 56 push %esi 10da89: 68 a4 2a 12 00 push $0x122aa4 10da8e: e9 e5 fe ff ff jmp 10d978 <_Heap_Walk+0x120> 10da93: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da94: 83 ec 08 sub $0x8,%esp 10da97: ff 36 pushl (%esi) 10da99: 51 push %ecx 10da9a: 56 push %esi 10da9b: 68 7c 2a 12 00 push $0x122a7c 10daa0: eb cc jmp 10da6e <_Heap_Walk+0x216> 10daa2: 66 90 xchg %ax,%ax 10daa4: 39 7b 24 cmp %edi,0x24(%ebx) 10daa7: 72 db jb 10da84 <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10daa9: 89 c8 mov %ecx,%eax 10daab: 31 d2 xor %edx,%edx 10daad: f7 75 e0 divl -0x20(%ebp) 10dab0: 85 d2 test %edx,%edx 10dab2: 0f 85 02 01 00 00 jne 10dbba <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10dab8: 39 4d dc cmp %ecx,-0x24(%ebp) 10dabb: 0f 87 0b 01 00 00 ja 10dbcc <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10dac1: 39 fe cmp %edi,%esi 10dac3: 0f 83 17 01 00 00 jae 10dbe0 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10dac9: f6 47 04 01 testb $0x1,0x4(%edi) 10dacd: 0f 85 91 00 00 00 jne 10db64 <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10dad3: 8b 4b 08 mov 0x8(%ebx),%ecx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10dad6: 8b 46 04 mov 0x4(%esi),%eax 10dad9: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10dadc: 83 e0 fe and $0xfffffffe,%eax 10dadf: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10dae2: 01 f0 add %esi,%eax 10dae4: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10dae7: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10daea: 39 53 0c cmp %edx,0xc(%ebx) 10daed: 0f 84 99 00 00 00 je 10db8c <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10daf3: 39 da cmp %ebx,%edx 10daf5: 0f 84 a9 00 00 00 je 10dba4 <_Heap_Walk+0x34c> 10dafb: c7 45 c8 f5 27 12 00 movl $0x1227f5,-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)( 10db02: 8b 46 0c mov 0xc(%esi),%eax 10db05: 39 c1 cmp %eax,%ecx 10db07: 74 7b je 10db84 <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10db09: 39 d8 cmp %ebx,%eax 10db0b: 0f 84 9f 00 00 00 je 10dbb0 <_Heap_Walk+0x358> 10db11: b9 f5 27 12 00 mov $0x1227f5,%ecx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10db16: ff 75 c8 pushl -0x38(%ebp) 10db19: 52 push %edx 10db1a: 51 push %ecx 10db1b: 50 push %eax 10db1c: 56 push %esi 10db1d: 68 64 2b 12 00 push $0x122b64 10db22: 6a 00 push $0x0 10db24: ff 75 0c pushl 0xc(%ebp) 10db27: 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 ) { 10db2a: 8b 55 d0 mov -0x30(%ebp),%edx 10db2d: 8b 02 mov (%edx),%eax 10db2f: 83 c4 20 add $0x20,%esp 10db32: 39 45 d4 cmp %eax,-0x2c(%ebp) 10db35: 74 11 je 10db48 <_Heap_Walk+0x2f0> (*printer)( 10db37: 51 push %ecx 10db38: 52 push %edx 10db39: 50 push %eax 10db3a: ff 75 d4 pushl -0x2c(%ebp) 10db3d: 56 push %esi 10db3e: 68 90 2b 12 00 push $0x122b90 10db43: e9 30 fe ff ff jmp 10d978 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10db48: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10db4c: 74 4a je 10db98 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10db4e: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10db51: 39 d8 cmp %ebx,%eax 10db53: 75 0a jne 10db5f <_Heap_Walk+0x307> <== ALWAYS TAKEN 10db55: eb 21 jmp 10db78 <_Heap_Walk+0x320> <== NOT EXECUTED 10db57: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10db58: 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 ) { 10db5b: 39 d8 cmp %ebx,%eax 10db5d: 74 19 je 10db78 <_Heap_Walk+0x320> if ( free_block == block ) { 10db5f: 39 f0 cmp %esi,%eax 10db61: 75 f5 jne 10db58 <_Heap_Walk+0x300> 10db63: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10db64: 39 7d d8 cmp %edi,-0x28(%ebp) 10db67: 0f 84 22 fd ff ff je 10d88f <_Heap_Walk+0x37> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10db6d: 8b 47 04 mov 0x4(%edi),%eax 10db70: 89 fe mov %edi,%esi 10db72: e9 e1 fe ff ff jmp 10da58 <_Heap_Walk+0x200> 10db77: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10db78: 56 push %esi 10db79: 68 fc 2b 12 00 push $0x122bfc 10db7e: e9 d1 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> 10db83: 90 nop Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10db84: b9 b4 2c 12 00 mov $0x122cb4,%ecx 10db89: eb 8b jmp 10db16 <_Heap_Walk+0x2be> 10db8b: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10db8c: c7 45 c8 a0 2c 12 00 movl $0x122ca0,-0x38(%ebp) 10db93: e9 6a ff ff ff jmp 10db02 <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10db98: 56 push %esi 10db99: 68 cc 2b 12 00 push $0x122bcc 10db9e: e9 b1 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> 10dba3: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dba4: c7 45 c8 aa 2c 12 00 movl $0x122caa,-0x38(%ebp) 10dbab: e9 52 ff ff ff jmp 10db02 <_Heap_Walk+0x2aa> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dbb0: b9 bf 2c 12 00 mov $0x122cbf,%ecx 10dbb5: e9 5c ff ff ff jmp 10db16 <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dbba: 83 ec 0c sub $0xc,%esp 10dbbd: 51 push %ecx 10dbbe: 56 push %esi 10dbbf: 68 d4 2a 12 00 push $0x122ad4 10dbc4: e9 af fd ff ff jmp 10d978 <_Heap_Walk+0x120> 10dbc9: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dbcc: 83 ec 08 sub $0x8,%esp 10dbcf: ff 75 dc pushl -0x24(%ebp) 10dbd2: 51 push %ecx 10dbd3: 56 push %esi 10dbd4: 68 04 2b 12 00 push $0x122b04 10dbd9: e9 9a fd ff ff jmp 10d978 <_Heap_Walk+0x120> 10dbde: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dbe0: 83 ec 0c sub $0xc,%esp 10dbe3: 57 push %edi 10dbe4: 56 push %esi 10dbe5: 68 30 2b 12 00 push $0x122b30 10dbea: e9 89 fd ff ff jmp 10d978 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dbef: 53 push %ebx 10dbf0: 68 58 2c 12 00 push $0x122c58 10dbf5: e9 5a fd ff ff jmp 10d954 <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dbfa: 51 push %ecx 10dbfb: 68 18 2a 12 00 push $0x122a18 10dc00: e9 4f fd ff ff jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dc05: 83 ec 0c sub $0xc,%esp 10dc08: 50 push %eax 10dc09: 51 push %ecx 10dc0a: 68 48 2a 12 00 push $0x122a48 10dc0f: e9 64 fd ff ff jmp 10d978 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dc14: 51 push %ecx 10dc15: 68 6d 2c 12 00 push $0x122c6d 10dc1a: e9 35 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> =============================================================================== 0010c2f4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c2f4: 55 push %ebp 10c2f5: 89 e5 mov %esp,%ebp 10c2f7: 53 push %ebx 10c2f8: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c2fb: 8b 15 00 77 12 00 mov 0x127700,%edx 10c301: 85 d2 test %edx,%edx 10c303: 74 1a je 10c31f <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c305: 31 db xor %ebx,%ebx 10c307: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c308: 50 push %eax 10c309: 6a 00 push $0x0 10c30b: 6a 00 push $0x0 10c30d: 53 push %ebx 10c30e: e8 c9 52 00 00 call 1115dc void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c313: 43 inc %ebx 10c314: 83 c4 10 add $0x10,%esp 10c317: 39 1d 00 77 12 00 cmp %ebx,0x127700 10c31d: 77 e9 ja 10c308 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c31f: 8b 5d fc mov -0x4(%ebp),%ebx 10c322: c9 leave 10c323: c3 ret =============================================================================== 0010c324 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c324: 55 push %ebp 10c325: 89 e5 mov %esp,%ebp 10c327: 57 push %edi 10c328: 56 push %esi 10c329: 53 push %ebx 10c32a: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10c32d: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c333: a1 50 32 12 00 mov 0x123250,%eax 10c338: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c33b: 8b 35 4c 32 12 00 mov 0x12324c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10c341: 39 f0 cmp %esi,%eax 10c343: 72 17 jb 10c35c <_IO_Manager_initialization+0x38> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10c345: 89 1d 04 77 12 00 mov %ebx,0x127704 _IO_Number_of_drivers = number_of_drivers; 10c34b: 8b 45 e4 mov -0x1c(%ebp),%eax 10c34e: a3 00 77 12 00 mov %eax,0x127700 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c353: 8d 65 f4 lea -0xc(%ebp),%esp 10c356: 5b pop %ebx 10c357: 5e pop %esi 10c358: 5f pop %edi 10c359: c9 leave 10c35a: c3 ret 10c35b: 90 nop /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10c35c: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c35f: c1 e1 03 shl $0x3,%ecx 10c362: 83 ec 0c sub $0xc,%esp 10c365: 51 push %ecx 10c366: 89 4d dc mov %ecx,-0x24(%ebp) 10c369: e8 12 29 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10c36e: 89 c2 mov %eax,%edx 10c370: a3 04 77 12 00 mov %eax,0x127704 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c375: 89 35 00 77 12 00 mov %esi,0x127700 memset( 10c37b: 31 c0 xor %eax,%eax 10c37d: 8b 4d dc mov -0x24(%ebp),%ecx 10c380: 89 d7 mov %edx,%edi 10c382: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10c384: 83 c4 10 add $0x10,%esp 10c387: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c38a: 85 c9 test %ecx,%ecx 10c38c: 74 c5 je 10c353 <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c38e: a1 04 77 12 00 mov 0x127704,%eax 10c393: 89 45 e0 mov %eax,-0x20(%ebp) 10c396: 31 c0 xor %eax,%eax 10c398: 31 d2 xor %edx,%edx 10c39a: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c39c: 8b 7d e0 mov -0x20(%ebp),%edi 10c39f: 01 c7 add %eax,%edi 10c3a1: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3a4: b9 06 00 00 00 mov $0x6,%ecx 10c3a9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10c3ab: 42 inc %edx 10c3ac: 83 c0 18 add $0x18,%eax 10c3af: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3b2: 77 e8 ja 10c39c <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3b4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3b7: 5b pop %ebx 10c3b8: 5e pop %esi 10c3b9: 5f pop %edi 10c3ba: c9 leave 10c3bb: c3 ret =============================================================================== 0010cde0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cde0: 55 push %ebp 10cde1: 89 e5 mov %esp,%ebp 10cde3: 53 push %ebx 10cde4: 83 ec 08 sub $0x8,%esp 10cde7: 8b 45 08 mov 0x8(%ebp),%eax 10cdea: 8b 55 0c mov 0xc(%ebp),%edx 10cded: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10cdf0: a3 00 74 12 00 mov %eax,0x127400 _Internal_errors_What_happened.is_internal = is_internal; 10cdf5: 88 15 04 74 12 00 mov %dl,0x127404 _Internal_errors_What_happened.the_error = the_error; 10cdfb: 89 1d 08 74 12 00 mov %ebx,0x127408 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ce01: 53 push %ebx 10ce02: 0f b6 d2 movzbl %dl,%edx 10ce05: 52 push %edx 10ce06: 50 push %eax 10ce07: e8 0c 1b 00 00 call 10e918 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10ce0c: c7 05 20 75 12 00 05 movl $0x5,0x127520 <== NOT EXECUTED 10ce13: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10ce16: fa cli <== NOT EXECUTED 10ce17: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ce19: f4 hlt <== NOT EXECUTED 10ce1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ce1d: eb fe jmp 10ce1d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00111c14 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111c14: 55 push %ebp 111c15: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 111c17: 8b 45 08 mov 0x8(%ebp),%eax 111c1a: 48 dec %eax 111c1b: 83 f8 03 cmp $0x3,%eax 111c1e: 77 0c ja 111c2c <_Objects_API_maximum_class+0x18> 111c20: 8b 04 85 50 1e 12 00 mov 0x121e50(,%eax,4),%eax 111c27: c9 leave 111c28: c3 ret 111c29: 8d 76 00 lea 0x0(%esi),%esi 111c2c: 31 c0 xor %eax,%eax 111c2e: c9 leave 111c2f: c3 ret =============================================================================== 0010ce78 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ce78: 55 push %ebp 10ce79: 89 e5 mov %esp,%ebp 10ce7b: 56 push %esi 10ce7c: 53 push %ebx 10ce7d: 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 ) 10ce80: 8b 43 18 mov 0x18(%ebx),%eax 10ce83: 85 c0 test %eax,%eax 10ce85: 75 0d jne 10ce94 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10ce87: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10ce89: 89 c8 mov %ecx,%eax 10ce8b: 8d 65 f8 lea -0x8(%ebp),%esp 10ce8e: 5b pop %ebx 10ce8f: 5e pop %esi 10ce90: c9 leave 10ce91: c3 ret 10ce92: 66 90 xchg %ax,%ax /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10ce94: 8d 73 20 lea 0x20(%ebx),%esi 10ce97: 83 ec 0c sub $0xc,%esp 10ce9a: 56 push %esi 10ce9b: e8 10 f7 ff ff call 10c5b0 <_Chain_Get> 10cea0: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cea2: 83 c4 10 add $0x10,%esp 10cea5: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cea9: 74 de je 10ce89 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10ceab: 85 c0 test %eax,%eax 10cead: 74 29 je 10ced8 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10ceaf: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10ceb3: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ceb7: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10ceb9: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cebd: 31 d2 xor %edx,%edx 10cebf: f7 f6 div %esi 10cec1: c1 e0 02 shl $0x2,%eax 10cec4: 03 43 30 add 0x30(%ebx),%eax 10cec7: ff 08 decl (%eax) information->inactive--; 10cec9: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cecd: 89 c8 mov %ecx,%eax 10cecf: 8d 65 f8 lea -0x8(%ebp),%esp 10ced2: 5b pop %ebx 10ced3: 5e pop %esi 10ced4: c9 leave 10ced5: c3 ret 10ced6: 66 90 xchg %ax,%ax * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10ced8: 83 ec 0c sub $0xc,%esp 10cedb: 53 push %ebx 10cedc: e8 3b 00 00 00 call 10cf1c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cee1: 89 34 24 mov %esi,(%esp) 10cee4: e8 c7 f6 ff ff call 10c5b0 <_Chain_Get> 10cee9: 89 c1 mov %eax,%ecx } if ( the_object ) { 10ceeb: 83 c4 10 add $0x10,%esp 10ceee: 85 c0 test %eax,%eax 10cef0: 74 97 je 10ce89 <_Objects_Allocate+0x11> 10cef2: eb bb jmp 10ceaf <_Objects_Allocate+0x37> =============================================================================== 0010cf1c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cf1c: 55 push %ebp 10cf1d: 89 e5 mov %esp,%ebp 10cf1f: 57 push %edi 10cf20: 56 push %esi 10cf21: 53 push %ebx 10cf22: 83 ec 4c sub $0x4c,%esp 10cf25: 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 ); 10cf28: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cf2c: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cf2f: 8b 4b 34 mov 0x34(%ebx),%ecx 10cf32: 85 c9 test %ecx,%ecx 10cf34: 0f 84 72 02 00 00 je 10d1ac <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10cf3a: 8b 7b 10 mov 0x10(%ebx),%edi 10cf3d: 66 89 7d d4 mov %di,-0x2c(%ebp) 10cf41: 8b 7b 14 mov 0x14(%ebx),%edi 10cf44: 31 d2 xor %edx,%edx 10cf46: 8b 45 d4 mov -0x2c(%ebp),%eax 10cf49: 66 f7 f7 div %di 10cf4c: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10cf4f: 85 f6 test %esi,%esi 10cf51: 0f 84 6c 02 00 00 je 10d1c3 <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10cf57: 8b 01 mov (%ecx),%eax 10cf59: 85 c0 test %eax,%eax 10cf5b: 0f 84 72 02 00 00 je 10d1d3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10cf61: 0f b7 ff movzwl %di,%edi 10cf64: 8b 55 d0 mov -0x30(%ebp),%edx 10cf67: 89 55 cc mov %edx,-0x34(%ebp) 10cf6a: 31 d2 xor %edx,%edx 10cf6c: 8b 45 cc mov -0x34(%ebp),%eax 10cf6f: eb 09 jmp 10cf7a <_Objects_Extend_information+0x5e> 10cf71: 8d 76 00 lea 0x0(%esi),%esi 10cf74: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10cf78: 74 07 je 10cf81 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10cf7a: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cf7c: 42 inc %edx 10cf7d: 39 d6 cmp %edx,%esi 10cf7f: 77 f3 ja 10cf74 <_Objects_Extend_information+0x58> 10cf81: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10cf84: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10cf88: 01 f8 add %edi,%eax 10cf8a: 89 45 d4 mov %eax,-0x2c(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10cf8d: 3d ff ff 00 00 cmp $0xffff,%eax 10cf92: 0f 87 b1 01 00 00 ja 10d149 <_Objects_Extend_information+0x22d><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10cf98: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10cf9c: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cfa0: 0f 85 ae 01 00 00 jne 10d154 <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cfa6: 83 ec 0c sub $0xc,%esp 10cfa9: 57 push %edi 10cfaa: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfad: e8 ce 1c 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10cfb2: 89 45 c4 mov %eax,-0x3c(%ebp) 10cfb5: 83 c4 10 add $0x10,%esp 10cfb8: 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 ) { 10cfbb: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10cfbf: 39 45 cc cmp %eax,-0x34(%ebp) 10cfc2: 0f 82 fe 00 00 00 jb 10d0c6 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10cfc8: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10cfcb: 83 ec 0c sub $0xc,%esp 10cfce: 8d 04 7f lea (%edi,%edi,2),%eax 10cfd1: 03 45 d4 add -0x2c(%ebp),%eax 10cfd4: 03 45 d0 add -0x30(%ebp),%eax 10cfd7: c1 e0 02 shl $0x2,%eax 10cfda: 50 push %eax 10cfdb: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfde: e8 c9 1c 00 00 call 10ecac <_Workspace_Allocate> 10cfe3: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10cfe6: 83 c4 10 add $0x10,%esp 10cfe9: 85 c0 test %eax,%eax 10cfeb: 8b 55 b4 mov -0x4c(%ebp),%edx 10cfee: 0f 84 ef 01 00 00 je 10d1e3 <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10cff4: 8b 45 c8 mov -0x38(%ebp),%eax 10cff7: 8d 04 b8 lea (%eax,%edi,4),%eax 10cffa: 89 45 b8 mov %eax,-0x48(%ebp) 10cffd: 8b 4d c8 mov -0x38(%ebp),%ecx 10d000: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d003: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10d006: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d00a: 39 45 d0 cmp %eax,-0x30(%ebp) 10d00d: 0f 82 60 01 00 00 jb 10d173 <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d013: 8b 45 d0 mov -0x30(%ebp),%eax 10d016: 85 c0 test %eax,%eax 10d018: 74 16 je 10d030 <_Objects_Extend_information+0x114><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d01a: 31 c0 xor %eax,%eax 10d01c: 8b 4d bc mov -0x44(%ebp),%ecx 10d01f: 8b 7d d0 mov -0x30(%ebp),%edi 10d022: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10d024: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d02b: 40 inc %eax 10d02c: 39 c7 cmp %eax,%edi 10d02e: 77 f4 ja 10d024 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d030: c1 e6 02 shl $0x2,%esi 10d033: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d036: 8b 45 c8 mov -0x38(%ebp),%eax 10d039: 8b 7d c0 mov -0x40(%ebp),%edi 10d03c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d043: 8b 4d b8 mov -0x48(%ebp),%ecx 10d046: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d04d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d051: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d054: 39 75 cc cmp %esi,-0x34(%ebp) 10d057: 73 19 jae 10d072 <_Objects_Extend_information+0x156><== NEVER TAKEN 10d059: 8b 7d cc mov -0x34(%ebp),%edi 10d05c: 8b 45 bc mov -0x44(%ebp),%eax 10d05f: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d062: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d064: 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++ ) { 10d06a: 40 inc %eax 10d06b: 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 ; 10d06e: 39 c6 cmp %eax,%esi 10d070: 77 f2 ja 10d064 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d072: 9c pushf 10d073: fa cli 10d074: 5f pop %edi old_tables = information->object_blocks; 10d075: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d078: 8b 45 c8 mov -0x38(%ebp),%eax 10d07b: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d07e: 8b 45 b8 mov -0x48(%ebp),%eax 10d081: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d084: 8b 45 bc mov -0x44(%ebp),%eax 10d087: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d08a: 8b 45 d4 mov -0x2c(%ebp),%eax 10d08d: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d091: 8b 33 mov (%ebx),%esi 10d093: c1 e6 18 shl $0x18,%esi 10d096: 81 ce 00 00 01 00 or $0x10000,%esi 10d09c: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d0a0: c1 e0 1b shl $0x1b,%eax 10d0a3: 09 c6 or %eax,%esi 10d0a5: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d0a9: 09 c6 or %eax,%esi 10d0ab: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d0ae: 57 push %edi 10d0af: 9d popf if ( old_tables ) 10d0b0: 85 c9 test %ecx,%ecx 10d0b2: 74 12 je 10d0c6 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d0b4: 83 ec 0c sub $0xc,%esp 10d0b7: 51 push %ecx 10d0b8: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0bb: e8 08 1c 00 00 call 10ecc8 <_Workspace_Free> 10d0c0: 83 c4 10 add $0x10,%esp 10d0c3: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d0c6: c1 e2 02 shl $0x2,%edx 10d0c9: 89 55 d0 mov %edx,-0x30(%ebp) 10d0cc: 8b 43 34 mov 0x34(%ebx),%eax 10d0cf: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d0d2: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d0d5: ff 73 18 pushl 0x18(%ebx) 10d0d8: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d0dc: 52 push %edx 10d0dd: 8b 7d d0 mov -0x30(%ebp),%edi 10d0e0: ff 34 38 pushl (%eax,%edi,1) 10d0e3: 8d 7d dc lea -0x24(%ebp),%edi 10d0e6: 57 push %edi 10d0e7: e8 38 45 00 00 call 111624 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d0ec: 8d 43 20 lea 0x20(%ebx),%eax 10d0ef: 89 45 d4 mov %eax,-0x2c(%ebp) 10d0f2: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d0f5: 83 c4 10 add $0x10,%esp 10d0f8: eb 2b jmp 10d125 <_Objects_Extend_information+0x209> 10d0fa: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d0fc: 8b 13 mov (%ebx),%edx 10d0fe: c1 e2 18 shl $0x18,%edx 10d101: 81 ca 00 00 01 00 or $0x10000,%edx 10d107: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d10b: c1 e1 1b shl $0x1b,%ecx 10d10e: 09 ca or %ecx,%edx 10d110: 09 f2 or %esi,%edx 10d112: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d115: 83 ec 08 sub $0x8,%esp 10d118: 50 push %eax 10d119: ff 75 d4 pushl -0x2c(%ebp) 10d11c: e8 53 f4 ff ff call 10c574 <_Chain_Append> index++; 10d121: 46 inc %esi 10d122: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d125: 83 ec 0c sub $0xc,%esp 10d128: 57 push %edi 10d129: e8 82 f4 ff ff call 10c5b0 <_Chain_Get> 10d12e: 83 c4 10 add $0x10,%esp 10d131: 85 c0 test %eax,%eax 10d133: 75 c7 jne 10d0fc <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d135: 8b 43 30 mov 0x30(%ebx),%eax 10d138: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d13c: 8b 4d d0 mov -0x30(%ebp),%ecx 10d13f: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d142: 8b 43 14 mov 0x14(%ebx),%eax 10d145: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d149: 8d 65 f4 lea -0xc(%ebp),%esp 10d14c: 5b pop %ebx 10d14d: 5e pop %esi 10d14e: 5f pop %edi 10d14f: c9 leave 10d150: c3 ret 10d151: 8d 76 00 lea 0x0(%esi),%esi * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10d154: 83 ec 0c sub $0xc,%esp 10d157: 57 push %edi 10d158: 89 55 b4 mov %edx,-0x4c(%ebp) 10d15b: e8 4c 1b 00 00 call 10ecac <_Workspace_Allocate> 10d160: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d163: 83 c4 10 add $0x10,%esp 10d166: 85 c0 test %eax,%eax 10d168: 8b 55 b4 mov -0x4c(%ebp),%edx 10d16b: 0f 85 4a fe ff ff jne 10cfbb <_Objects_Extend_information+0x9f> 10d171: eb d6 jmp 10d149 <_Objects_Extend_information+0x22d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10d173: c1 e6 02 shl $0x2,%esi 10d176: 89 75 c0 mov %esi,-0x40(%ebp) 10d179: 8b 73 34 mov 0x34(%ebx),%esi 10d17c: 8b 7d c8 mov -0x38(%ebp),%edi 10d17f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d182: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d184: 8b 73 30 mov 0x30(%ebx),%esi 10d187: 8b 7d b8 mov -0x48(%ebp),%edi 10d18a: 8b 4d c0 mov -0x40(%ebp),%ecx 10d18d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d18f: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d193: 03 45 d0 add -0x30(%ebp),%eax 10d196: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d19d: 8b 73 1c mov 0x1c(%ebx),%esi 10d1a0: 8b 7d bc mov -0x44(%ebp),%edi 10d1a3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d1a5: e9 8c fe ff ff jmp 10d036 <_Objects_Extend_information+0x11a> 10d1aa: 66 90 xchg %ax,%ax minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10d1ac: 8b 53 10 mov 0x10(%ebx),%edx 10d1af: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d1b3: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d1b7: 89 45 cc mov %eax,-0x34(%ebp) 10d1ba: 31 d2 xor %edx,%edx 10d1bc: 31 f6 xor %esi,%esi 10d1be: e9 c1 fd ff ff jmp 10cf84 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d1c3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1c6: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d1c9: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d1cc: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1ce: e9 b1 fd ff ff jmp 10cf84 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d1d3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1d6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d1d9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d1dc: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1de: e9 a1 fd ff ff jmp 10cf84 <_Objects_Extend_information+0x68><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10d1e3: 83 ec 0c sub $0xc,%esp 10d1e6: ff 75 c4 pushl -0x3c(%ebp) 10d1e9: e8 da 1a 00 00 call 10ecc8 <_Workspace_Free> return; 10d1ee: 83 c4 10 add $0x10,%esp 10d1f1: e9 53 ff ff ff jmp 10d149 <_Objects_Extend_information+0x22d> =============================================================================== 0010d288 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d288: 55 push %ebp 10d289: 89 e5 mov %esp,%ebp 10d28b: 56 push %esi 10d28c: 53 push %ebx 10d28d: 8b 75 08 mov 0x8(%ebp),%esi 10d290: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d293: 85 db test %ebx,%ebx 10d295: 75 09 jne 10d2a0 <_Objects_Get_information+0x18> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d297: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d299: 8d 65 f8 lea -0x8(%ebp),%esp 10d29c: 5b pop %ebx 10d29d: 5e pop %esi 10d29e: c9 leave 10d29f: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10d2a0: 83 ec 0c sub $0xc,%esp 10d2a3: 56 push %esi 10d2a4: e8 6b 49 00 00 call 111c14 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d2a9: 83 c4 10 add $0x10,%esp 10d2ac: 85 c0 test %eax,%eax 10d2ae: 74 e7 je 10d297 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d2b0: 39 c3 cmp %eax,%ebx 10d2b2: 77 e3 ja 10d297 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d2b4: 8b 04 b5 2c 73 12 00 mov 0x12732c(,%esi,4),%eax 10d2bb: 85 c0 test %eax,%eax 10d2bd: 74 d8 je 10d297 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d2bf: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d2c2: 85 c0 test %eax,%eax 10d2c4: 74 d3 je 10d299 <_Objects_Get_information+0x11><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d2c6: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d2cb: 75 cc jne 10d299 <_Objects_Get_information+0x11> 10d2cd: eb c8 jmp 10d297 <_Objects_Get_information+0xf> =============================================================================== 0010d2d0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d2d0: 55 push %ebp 10d2d1: 89 e5 mov %esp,%ebp 10d2d3: 56 push %esi 10d2d4: 53 push %ebx 10d2d5: 8b 55 08 mov 0x8(%ebp),%edx 10d2d8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d2db: b8 01 00 00 00 mov $0x1,%eax 10d2e0: 2b 42 08 sub 0x8(%edx),%eax 10d2e3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d2e6: 9c pushf 10d2e7: fa cli 10d2e8: 5e pop %esi if ( information->maximum >= index ) { 10d2e9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d2ed: 39 c8 cmp %ecx,%eax 10d2ef: 77 1b ja 10d30c <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d2f1: 8b 52 1c mov 0x1c(%edx),%edx 10d2f4: 8b 04 82 mov (%edx,%eax,4),%eax 10d2f7: 85 c0 test %eax,%eax 10d2f9: 74 21 je 10d31c <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d2fb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d301: 8b 55 14 mov 0x14(%ebp),%edx 10d304: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d306: 5b pop %ebx 10d307: 5e pop %esi 10d308: c9 leave 10d309: c3 ret 10d30a: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d30c: 56 push %esi 10d30d: 9d popf *location = OBJECTS_ERROR; 10d30e: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d314: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d316: 5b pop %ebx 10d317: 5e pop %esi 10d318: c9 leave 10d319: c3 ret 10d31a: 66 90 xchg %ax,%ax if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10d31c: 56 push %esi 10d31d: 9d popf *location = OBJECTS_ERROR; 10d31e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d324: eb e0 jmp 10d306 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e978 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e978: 55 push %ebp 10e979: 89 e5 mov %esp,%ebp 10e97b: 57 push %edi 10e97c: 56 push %esi 10e97d: 53 push %ebx 10e97e: 83 ec 2c sub $0x2c,%esp 10e981: 8b 7d 08 mov 0x8(%ebp),%edi 10e984: 8b 75 0c mov 0xc(%ebp),%esi 10e987: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e98a: 85 f6 test %esi,%esi 10e98c: 75 0e jne 10e99c <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 10e98e: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 10e990: 89 d8 mov %ebx,%eax 10e992: 8d 65 f4 lea -0xc(%ebp),%esp 10e995: 5b pop %ebx 10e996: 5e pop %esi 10e997: 5f pop %edi 10e998: c9 leave 10e999: c3 ret 10e99a: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e99c: 85 db test %ebx,%ebx 10e99e: 74 f0 je 10e990 <_Objects_Get_name_as_string+0x18><== NEVER TAKEN return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e9a0: 85 ff test %edi,%edi 10e9a2: 75 08 jne 10e9ac <_Objects_Get_name_as_string+0x34> 10e9a4: a1 98 b8 12 00 mov 0x12b898,%eax 10e9a9: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e9ac: 83 ec 0c sub $0xc,%esp 10e9af: 57 push %edi 10e9b0: e8 03 ff ff ff call 10e8b8 <_Objects_Get_information_id> if ( !information ) 10e9b5: 83 c4 10 add $0x10,%esp 10e9b8: 85 c0 test %eax,%eax 10e9ba: 74 d2 je 10e98e <_Objects_Get_name_as_string+0x16><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e9bc: 51 push %ecx 10e9bd: 8d 55 e4 lea -0x1c(%ebp),%edx 10e9c0: 52 push %edx 10e9c1: 57 push %edi 10e9c2: 50 push %eax 10e9c3: e8 74 00 00 00 call 10ea3c <_Objects_Get> switch ( location ) { 10e9c8: 83 c4 10 add $0x10,%esp 10e9cb: 8b 55 e4 mov -0x1c(%ebp),%edx 10e9ce: 85 d2 test %edx,%edx 10e9d0: 75 bc jne 10e98e <_Objects_Get_name_as_string+0x16><== NEVER TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10e9d2: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e9d5: 89 d1 mov %edx,%ecx 10e9d7: c1 e9 18 shr $0x18,%ecx 10e9da: 88 c8 mov %cl,%al 10e9dc: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e9df: 89 d1 mov %edx,%ecx 10e9e1: c1 e9 10 shr $0x10,%ecx 10e9e4: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e9e7: 89 d1 mov %edx,%ecx 10e9e9: c1 e9 08 shr $0x8,%ecx 10e9ec: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e9ef: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e9f2: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e9f6: 4e dec %esi 10e9f7: 89 75 d4 mov %esi,-0x2c(%ebp) 10e9fa: 74 3c je 10ea38 <_Objects_Get_name_as_string+0xc0><== NEVER TAKEN 10e9fc: 84 c0 test %al,%al 10e9fe: 74 38 je 10ea38 <_Objects_Get_name_as_string+0xc0> 10ea00: 89 d9 mov %ebx,%ecx 10ea02: 31 d2 xor %edx,%edx 10ea04: eb 0a jmp 10ea10 <_Objects_Get_name_as_string+0x98> 10ea06: 66 90 xchg %ax,%ax 10ea08: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10ea0c: 84 c0 test %al,%al 10ea0e: 74 1b je 10ea2b <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10ea10: 0f b6 f0 movzbl %al,%esi 10ea13: 8b 3d 58 91 12 00 mov 0x129158,%edi 10ea19: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 10ea1e: 75 02 jne 10ea22 <_Objects_Get_name_as_string+0xaa> 10ea20: b0 2a mov $0x2a,%al 10ea22: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10ea24: 42 inc %edx 10ea25: 41 inc %ecx 10ea26: 3b 55 d4 cmp -0x2c(%ebp),%edx 10ea29: 72 dd jb 10ea08 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10ea2b: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10ea2e: e8 51 08 00 00 call 10f284 <_Thread_Enable_dispatch> return name; 10ea33: e9 58 ff ff ff jmp 10e990 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10ea38: 89 d9 mov %ebx,%ecx 10ea3a: eb ef jmp 10ea2b <_Objects_Get_name_as_string+0xb3> =============================================================================== 0010d474 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10d474: 55 push %ebp 10d475: 89 e5 mov %esp,%ebp 10d477: 57 push %edi 10d478: 56 push %esi 10d479: 53 push %ebx 10d47a: 83 ec 0c sub $0xc,%esp 10d47d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d480: 8b 75 0c mov 0xc(%ebp),%esi 10d483: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10d486: 85 db test %ebx,%ebx 10d488: 75 0a jne 10d494 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 10d48a: 31 c0 xor %eax,%eax } 10d48c: 8d 65 f4 lea -0xc(%ebp),%esp 10d48f: 5b pop %ebx 10d490: 5e pop %esi 10d491: 5f pop %edi 10d492: c9 leave 10d493: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10d494: 85 ff test %edi,%edi 10d496: 74 f2 je 10d48a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10d498: 8b 45 14 mov 0x14(%ebp),%eax 10d49b: 85 c0 test %eax,%eax 10d49d: 74 eb je 10d48a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10d49f: 66 85 f6 test %si,%si 10d4a2: 75 04 jne 10d4a8 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10d4a4: 8b 73 08 mov 0x8(%ebx),%esi 10d4a7: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10d4a8: 66 39 73 10 cmp %si,0x10(%ebx) 10d4ac: 72 22 jb 10d4d0 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10d4ae: 51 push %ecx 10d4af: 57 push %edi 10d4b0: 56 push %esi 10d4b1: 53 push %ebx 10d4b2: e8 2d 00 00 00 call 10d4e4 <_Objects_Get> next_id++; 10d4b7: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10d4b8: 83 c4 10 add $0x10,%esp 10d4bb: 8b 17 mov (%edi),%edx 10d4bd: 85 d2 test %edx,%edx 10d4bf: 75 e7 jne 10d4a8 <_Objects_Get_next+0x34> *next_id_p = next_id; 10d4c1: 8b 55 14 mov 0x14(%ebp),%edx 10d4c4: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10d4c6: 8d 65 f4 lea -0xc(%ebp),%esp 10d4c9: 5b pop %ebx 10d4ca: 5e pop %esi 10d4cb: 5f pop %edi 10d4cc: c9 leave 10d4cd: c3 ret 10d4ce: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10d4d0: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10d4d6: 8b 45 14 mov 0x14(%ebp),%eax 10d4d9: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 10d4df: 31 c0 xor %eax,%eax return 0; 10d4e1: eb a9 jmp 10d48c <_Objects_Get_next+0x18> =============================================================================== 0011b868 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b868: 55 push %ebp 11b869: 89 e5 mov %esp,%ebp 11b86b: 53 push %ebx 11b86c: 8b 55 08 mov 0x8(%ebp),%edx 11b86f: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 11b872: b8 01 00 00 00 mov $0x1,%eax 11b877: 2b 42 08 sub 0x8(%edx),%eax 11b87a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b87d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b881: 39 c8 cmp %ecx,%eax 11b883: 77 13 ja 11b898 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b885: 8b 52 1c mov 0x1c(%edx),%edx 11b888: 8b 04 82 mov (%edx,%eax,4),%eax 11b88b: 85 c0 test %eax,%eax 11b88d: 74 09 je 11b898 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b88f: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11b895: 5b pop %ebx 11b896: c9 leave 11b897: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11b898: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b89e: 31 c0 xor %eax,%eax return NULL; } 11b8a0: 5b pop %ebx 11b8a1: c9 leave 11b8a2: c3 ret =============================================================================== 0010e5bc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e5bc: 55 push %ebp 10e5bd: 89 e5 mov %esp,%ebp 10e5bf: 83 ec 18 sub $0x18,%esp 10e5c2: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e5c5: 85 d2 test %edx,%edx 10e5c7: 75 08 jne 10e5d1 <_Objects_Id_to_name+0x15> 10e5c9: a1 f8 a7 12 00 mov 0x12a7f8,%eax 10e5ce: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10e5d1: 89 d0 mov %edx,%eax 10e5d3: c1 e8 18 shr $0x18,%eax 10e5d6: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10e5d9: 8d 48 ff lea -0x1(%eax),%ecx 10e5dc: 83 f9 03 cmp $0x3,%ecx 10e5df: 77 3b ja 10e61c <_Objects_Id_to_name+0x60> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e5e1: 8b 04 85 0c a7 12 00 mov 0x12a70c(,%eax,4),%eax 10e5e8: 85 c0 test %eax,%eax 10e5ea: 74 30 je 10e61c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e5ec: 89 d1 mov %edx,%ecx 10e5ee: c1 e9 1b shr $0x1b,%ecx 10e5f1: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e5f4: 85 c0 test %eax,%eax 10e5f6: 74 24 je 10e61c <_Objects_Id_to_name+0x60><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e5f8: 51 push %ecx 10e5f9: 8d 4d f4 lea -0xc(%ebp),%ecx 10e5fc: 51 push %ecx 10e5fd: 52 push %edx 10e5fe: 50 push %eax 10e5ff: e8 50 ff ff ff call 10e554 <_Objects_Get> if ( !the_object ) 10e604: 83 c4 10 add $0x10,%esp 10e607: 85 c0 test %eax,%eax 10e609: 74 11 je 10e61c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e60b: 8b 50 0c mov 0xc(%eax),%edx 10e60e: 8b 45 0c mov 0xc(%ebp),%eax 10e611: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e613: e8 ec 07 00 00 call 10ee04 <_Thread_Enable_dispatch> 10e618: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e61a: c9 leave 10e61b: c3 ret if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e61c: b8 03 00 00 00 mov $0x3,%eax } 10e621: c9 leave 10e622: c3 ret =============================================================================== 0010d390 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d390: 55 push %ebp 10d391: 89 e5 mov %esp,%ebp 10d393: 57 push %edi 10d394: 56 push %esi 10d395: 53 push %ebx 10d396: 83 ec 0c sub $0xc,%esp 10d399: 8b 45 08 mov 0x8(%ebp),%eax 10d39c: 8b 55 0c mov 0xc(%ebp),%edx 10d39f: 8b 5d 10 mov 0x10(%ebp),%ebx 10d3a2: 8b 75 20 mov 0x20(%ebp),%esi 10d3a5: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10d3a9: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d3ab: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d3af: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d3b2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d3b9: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d3c0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d3c7: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10d3cd: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10d3d3: 8b 3c 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edi 10d3da: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10d3dd: 8b 7d 14 mov 0x14(%ebp),%edi 10d3e0: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10d3e3: 89 f9 mov %edi,%ecx 10d3e5: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d3e8: 8b 4d 14 mov 0x14(%ebp),%ecx 10d3eb: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d3f1: 85 ff test %edi,%edi 10d3f3: 74 04 je 10d3f9 <_Objects_Initialize_information+0x69> 10d3f5: 85 c9 test %ecx,%ecx 10d3f7: 74 6a je 10d463 <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d3f9: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10d3fd: c7 40 1c a4 6f 12 00 movl $0x126fa4,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10d404: c1 e2 18 shl $0x18,%edx 10d407: 81 ca 00 00 01 00 or $0x10000,%edx 10d40d: c1 e3 1b shl $0x1b,%ebx 10d410: 09 da or %ebx,%edx 10d412: 31 db xor %ebx,%ebx 10d414: 85 c9 test %ecx,%ecx 10d416: 0f 95 c3 setne %bl 10d419: 09 da or %ebx,%edx 10d41b: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d41e: f7 c6 03 00 00 00 test $0x3,%esi 10d424: 75 26 jne 10d44c <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d426: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d42a: 8d 50 24 lea 0x24(%eax),%edx 10d42d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d430: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d437: 8d 50 20 lea 0x20(%eax),%edx 10d43a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d43d: 85 c9 test %ecx,%ecx 10d43f: 75 13 jne 10d454 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d441: 8d 65 f4 lea -0xc(%ebp),%esp 10d444: 5b pop %ebx 10d445: 5e pop %esi 10d446: 5f pop %edi 10d447: c9 leave 10d448: c3 ret 10d449: 8d 76 00 lea 0x0(%esi),%esi * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10d44c: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10d44f: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10d452: eb d2 jmp 10d426 <_Objects_Initialize_information+0x96><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d454: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d457: 8d 65 f4 lea -0xc(%ebp),%esp 10d45a: 5b pop %ebx 10d45b: 5e pop %esi 10d45c: 5f pop %edi 10d45d: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d45e: e9 b9 fa ff ff jmp 10cf1c <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d463: 50 push %eax 10d464: 6a 14 push $0x14 10d466: 6a 01 push $0x1 10d468: 6a 00 push $0x0 10d46a: e8 71 f9 ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 0010d480 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d480: 55 push %ebp 10d481: 89 e5 mov %esp,%ebp 10d483: 57 push %edi 10d484: 56 push %esi 10d485: 53 push %ebx 10d486: 8b 45 08 mov 0x8(%ebp),%eax 10d489: 8b 4d 0c mov 0xc(%ebp),%ecx 10d48c: 8b 55 10 mov 0x10(%ebp),%edx 10d48f: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d492: 85 ff test %edi,%edi 10d494: 74 56 je 10d4ec <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d496: 85 c9 test %ecx,%ecx 10d498: 74 08 je 10d4a2 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d49a: 8b 70 10 mov 0x10(%eax),%esi 10d49d: 66 85 f6 test %si,%si 10d4a0: 75 0a jne 10d4ac <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4a2: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d4a7: 5b pop %ebx 10d4a8: 5e pop %esi 10d4a9: 5f pop %edi 10d4aa: c9 leave 10d4ab: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4ac: 85 d2 test %edx,%edx 10d4ae: 75 20 jne 10d4d0 <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4b0: 0f b7 f6 movzwl %si,%esi 10d4b3: 8b 58 1c mov 0x1c(%eax),%ebx 10d4b6: b8 01 00 00 00 mov $0x1,%eax 10d4bb: 90 nop the_object = information->local_table[ index ]; 10d4bc: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d4bf: 85 d2 test %edx,%edx 10d4c1: 74 05 je 10d4c8 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d4c3: 39 4a 0c cmp %ecx,0xc(%edx) 10d4c6: 74 18 je 10d4e0 <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4c8: 40 inc %eax 10d4c9: 39 c6 cmp %eax,%esi 10d4cb: 73 ef jae 10d4bc <_Objects_Name_to_id_u32+0x3c> 10d4cd: eb d3 jmp 10d4a2 <_Objects_Name_to_id_u32+0x22> 10d4cf: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4d0: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d4d6: 74 d8 je 10d4b0 <_Objects_Name_to_id_u32+0x30> 10d4d8: 4a dec %edx 10d4d9: 75 c7 jne 10d4a2 <_Objects_Name_to_id_u32+0x22> 10d4db: eb d3 jmp 10d4b0 <_Objects_Name_to_id_u32+0x30> 10d4dd: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10d4e0: 8b 42 08 mov 0x8(%edx),%eax 10d4e3: 89 07 mov %eax,(%edi) 10d4e5: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d4e7: 5b pop %ebx 10d4e8: 5e pop %esi 10d4e9: 5f pop %edi 10d4ea: c9 leave 10d4eb: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d4ec: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d4f1: 5b pop %ebx 10d4f2: 5e pop %esi 10d4f3: 5f pop %edi 10d4f4: c9 leave 10d4f5: c3 ret =============================================================================== 0010f2e0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10f2e0: 55 push %ebp 10f2e1: 89 e5 mov %esp,%ebp 10f2e3: 53 push %ebx 10f2e4: 83 ec 0c sub $0xc,%esp 10f2e7: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10f2ea: 8b 45 08 mov 0x8(%ebp),%eax 10f2ed: 0f b7 40 38 movzwl 0x38(%eax),%eax 10f2f1: 50 push %eax 10f2f2: 53 push %ebx 10f2f3: e8 f0 79 00 00 call 116ce8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f2f8: 0f be 0b movsbl (%ebx),%ecx 10f2fb: c1 e1 18 shl $0x18,%ecx 10f2fe: 83 c4 10 add $0x10,%esp 10f301: 83 f8 01 cmp $0x1,%eax 10f304: 76 32 jbe 10f338 <_Objects_Set_name+0x58> 10f306: 0f be 53 01 movsbl 0x1(%ebx),%edx 10f30a: c1 e2 10 shl $0x10,%edx 10f30d: 09 ca or %ecx,%edx 10f30f: 83 f8 02 cmp $0x2,%eax 10f312: 74 2c je 10f340 <_Objects_Set_name+0x60> 10f314: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10f318: c1 e1 08 shl $0x8,%ecx 10f31b: 09 d1 or %edx,%ecx 10f31d: 83 f8 03 cmp $0x3,%eax 10f320: 74 37 je 10f359 <_Objects_Set_name+0x79> 10f322: 0f be 43 03 movsbl 0x3(%ebx),%eax 10f326: 09 c1 or %eax,%ecx 10f328: 8b 55 0c mov 0xc(%ebp),%edx 10f32b: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f32e: b0 01 mov $0x1,%al 10f330: 8b 5d fc mov -0x4(%ebp),%ebx 10f333: c9 leave 10f334: c3 ret 10f335: 8d 76 00 lea 0x0(%esi),%esi d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f338: 89 ca mov %ecx,%edx 10f33a: 81 ca 00 00 20 00 or $0x200000,%edx 10f340: 89 d1 mov %edx,%ecx 10f342: 80 cd 20 or $0x20,%ch 10f345: b8 20 00 00 00 mov $0x20,%eax 10f34a: 09 c1 or %eax,%ecx 10f34c: 8b 55 0c mov 0xc(%ebp),%edx 10f34f: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f352: b0 01 mov $0x1,%al 10f354: 8b 5d fc mov -0x4(%ebp),%ebx 10f357: c9 leave 10f358: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f359: b0 20 mov $0x20,%al 10f35b: eb c9 jmp 10f326 <_Objects_Set_name+0x46> =============================================================================== 0010d4f8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d4f8: 55 push %ebp 10d4f9: 89 e5 mov %esp,%ebp 10d4fb: 57 push %edi 10d4fc: 56 push %esi 10d4fd: 53 push %ebx 10d4fe: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10d501: 8b 45 08 mov 0x8(%ebp),%eax 10d504: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d508: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d50c: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d510: 29 d8 sub %ebx,%eax 10d512: 31 d2 xor %edx,%edx 10d514: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d516: 85 c0 test %eax,%eax 10d518: 74 21 je 10d53b <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d51a: 8b 55 08 mov 0x8(%ebp),%edx 10d51d: 8b 7a 30 mov 0x30(%edx),%edi 10d520: 3b 0f cmp (%edi),%ecx 10d522: 74 1f je 10d543 <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d524: 31 d2 xor %edx,%edx 10d526: eb 0e jmp 10d536 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d528: 01 cb add %ecx,%ebx 10d52a: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d531: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d534: 74 12 je 10d548 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d536: 42 inc %edx 10d537: 39 d0 cmp %edx,%eax 10d539: 77 ed ja 10d528 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d53b: 8d 65 f4 lea -0xc(%ebp),%esp 10d53e: 5b pop %ebx 10d53f: 5e pop %esi 10d540: 5f pop %edi 10d541: c9 leave 10d542: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d543: 31 f6 xor %esi,%esi 10d545: 8d 76 00 lea 0x0(%esi),%esi information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10d548: 8b 55 08 mov 0x8(%ebp),%edx 10d54b: 8b 42 20 mov 0x20(%edx),%eax 10d54e: 89 75 e4 mov %esi,-0x1c(%ebp) 10d551: eb 07 jmp 10d55a <_Objects_Shrink_information+0x62> 10d553: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d554: 85 ff test %edi,%edi 10d556: 74 2c je 10d584 <_Objects_Shrink_information+0x8c> 10d558: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d55a: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d55e: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d560: 39 da cmp %ebx,%edx 10d562: 72 f0 jb 10d554 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d564: 8b 75 08 mov 0x8(%ebp),%esi 10d567: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d56b: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d56e: 39 ca cmp %ecx,%edx 10d570: 73 e2 jae 10d554 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d572: 83 ec 0c sub $0xc,%esp 10d575: 50 push %eax 10d576: e8 1d f0 ff ff call 10c598 <_Chain_Extract> 10d57b: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d57e: 85 ff test %edi,%edi 10d580: 75 d6 jne 10d558 <_Objects_Shrink_information+0x60> 10d582: 66 90 xchg %ax,%ax 10d584: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d587: 83 ec 0c sub $0xc,%esp 10d58a: 8b 55 08 mov 0x8(%ebp),%edx 10d58d: 8b 42 34 mov 0x34(%edx),%eax 10d590: ff 34 30 pushl (%eax,%esi,1) 10d593: e8 30 17 00 00 call 10ecc8 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d598: 8b 55 08 mov 0x8(%ebp),%edx 10d59b: 8b 42 34 mov 0x34(%edx),%eax 10d59e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d5a5: 8b 42 30 mov 0x30(%edx),%eax 10d5a8: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d5af: 8b 42 14 mov 0x14(%edx),%eax 10d5b2: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d5b6: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d5b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d5bc: 5b pop %ebx 10d5bd: 5e pop %esi 10d5be: 5f pop %edi 10d5bf: c9 leave 10d5c0: c3 ret =============================================================================== 00110d88 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110d88: 55 push %ebp 110d89: 89 e5 mov %esp,%ebp 110d8b: 56 push %esi 110d8c: 53 push %ebx 110d8d: 8b 5d 08 mov 0x8(%ebp),%ebx 110d90: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110d93: 85 db test %ebx,%ebx 110d95: 74 35 je 110dcc <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110d97: 85 f6 test %esi,%esi 110d99: 74 31 je 110dcc <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110d9b: 83 ec 0c sub $0xc,%esp 110d9e: ff 35 90 eb 12 00 pushl 0x12eb90 110da4: e8 4b e5 ff ff call 10f2f4 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110da9: 5a pop %edx 110daa: 59 pop %ecx 110dab: 56 push %esi 110dac: 53 push %ebx 110dad: e8 9e 45 00 00 call 115350 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110db2: 58 pop %eax 110db3: ff 35 90 eb 12 00 pushl 0x12eb90 110db9: e8 7e e5 ff ff call 10f33c <_API_Mutex_Unlock> 110dbe: b0 01 mov $0x1,%al return true; 110dc0: 83 c4 10 add $0x10,%esp } 110dc3: 8d 65 f8 lea -0x8(%ebp),%esp 110dc6: 5b pop %ebx 110dc7: 5e pop %esi 110dc8: c9 leave 110dc9: c3 ret 110dca: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 110dcc: 31 c0 xor %eax,%eax } 110dce: 8d 65 f8 lea -0x8(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: c9 leave 110dd4: c3 ret =============================================================================== 00110e2c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110e2c: 55 push %ebp 110e2d: 89 e5 mov %esp,%ebp 110e2f: 56 push %esi 110e30: 53 push %ebx 110e31: 83 ec 10 sub $0x10,%esp 110e34: 8b 5d 08 mov 0x8(%ebp),%ebx 110e37: 8b 75 0c mov 0xc(%ebp),%esi 110e3a: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110e3d: 8b 15 d8 ea 12 00 mov 0x12ead8,%edx 110e43: 85 d2 test %edx,%edx 110e45: 74 19 je 110e60 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110e47: 0f b6 c0 movzbl %al,%eax 110e4a: 89 45 10 mov %eax,0x10(%ebp) 110e4d: 89 75 0c mov %esi,0xc(%ebp) 110e50: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110e53: 8d 65 f8 lea -0x8(%ebp),%esp 110e56: 5b pop %ebx 110e57: 5e pop %esi 110e58: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110e59: e9 1e f2 ff ff jmp 11007c <_Heap_Walk> 110e5e: 66 90 xchg %ax,%ax * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110e60: 83 ec 0c sub $0xc,%esp 110e63: ff 35 90 eb 12 00 pushl 0x12eb90 110e69: 88 45 f4 mov %al,-0xc(%ebp) 110e6c: e8 83 e4 ff ff call 10f2f4 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110e71: 83 c4 0c add $0xc,%esp 110e74: 8a 45 f4 mov -0xc(%ebp),%al 110e77: 0f b6 c0 movzbl %al,%eax 110e7a: 50 push %eax 110e7b: 56 push %esi 110e7c: 53 push %ebx 110e7d: e8 fa f1 ff ff call 11007c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110e82: 5a pop %edx 110e83: ff 35 90 eb 12 00 pushl 0x12eb90 110e89: 88 45 f4 mov %al,-0xc(%ebp) 110e8c: e8 ab e4 ff ff call 10f33c <_API_Mutex_Unlock> 110e91: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110e94: 8a 45 f4 mov -0xc(%ebp),%al 110e97: 8d 65 f8 lea -0x8(%ebp),%esp 110e9a: 5b pop %ebx 110e9b: 5e pop %esi 110e9c: c9 leave 110e9d: c3 ret =============================================================================== 00111364 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 111364: 55 push %ebp 111365: 89 e5 mov %esp,%ebp 111367: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 11136a: a1 60 32 12 00 mov 0x123260,%eax 11136f: 85 c0 test %eax,%eax 111371: 74 05 je 111378 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 111373: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 111374: ff e0 jmp *%eax 111376: 66 90 xchg %ax,%ax } 111378: c9 leave 111379: c3 ret =============================================================================== 0010c074 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c074: 55 push %ebp 10c075: 89 e5 mov %esp,%ebp 10c077: 57 push %edi 10c078: 56 push %esi 10c079: 53 push %ebx 10c07a: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10c07d: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c083: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c089: 85 db test %ebx,%ebx 10c08b: 74 46 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c08d: 85 ff test %edi,%edi 10c08f: 74 42 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c091: 31 f6 xor %esi,%esi 10c093: 90 nop return_value = rtems_task_create( 10c094: 83 ec 08 sub $0x8,%esp 10c097: 8d 45 e4 lea -0x1c(%ebp),%eax 10c09a: 50 push %eax 10c09b: ff 73 0c pushl 0xc(%ebx) 10c09e: ff 73 14 pushl 0x14(%ebx) 10c0a1: ff 73 04 pushl 0x4(%ebx) 10c0a4: ff 73 08 pushl 0x8(%ebx) 10c0a7: ff 33 pushl (%ebx) 10c0a9: e8 96 fd ff ff call 10be44 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ae: 83 c4 20 add $0x20,%esp 10c0b1: 85 c0 test %eax,%eax 10c0b3: 75 26 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0b5: 51 push %ecx 10c0b6: ff 73 18 pushl 0x18(%ebx) 10c0b9: ff 73 10 pushl 0x10(%ebx) 10c0bc: ff 75 e4 pushl -0x1c(%ebp) 10c0bf: e8 24 00 00 00 call 10c0e8 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c0c4: 83 c4 10 add $0x10,%esp 10c0c7: 85 c0 test %eax,%eax 10c0c9: 75 10 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0cb: 46 inc %esi 10c0cc: 83 c3 1c add $0x1c,%ebx 10c0cf: 39 f7 cmp %esi,%edi 10c0d1: 77 c1 ja 10c094 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10c0d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d6: 5b pop %ebx 10c0d7: 5e pop %esi 10c0d8: 5f pop %edi 10c0d9: c9 leave 10c0da: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10c0db: 52 push %edx 10c0dc: 50 push %eax 10c0dd: 6a 01 push $0x1 10c0df: 6a 01 push $0x1 10c0e1: e8 fa 0c 00 00 call 10cde0 <_Internal_error_Occurred> =============================================================================== 001113c0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1113c0: 55 push %ebp 1113c1: 89 e5 mov %esp,%ebp 1113c3: 57 push %edi 1113c4: 56 push %esi 1113c5: 53 push %ebx 1113c6: 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 ]; 1113c9: 8b 45 08 mov 0x8(%ebp),%eax 1113cc: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1113d2: 85 db test %ebx,%ebx 1113d4: 74 45 je 11141b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1113d6: 9c pushf 1113d7: fa cli 1113d8: 58 pop %eax signal_set = asr->signals_posted; 1113d9: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1113dc: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1113e3: 50 push %eax 1113e4: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1113e5: 85 f6 test %esi,%esi 1113e7: 74 32 je 11141b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 1113e9: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1113ec: 50 push %eax 1113ed: 8d 7d e4 lea -0x1c(%ebp),%edi 1113f0: 57 push %edi 1113f1: 68 ff ff 00 00 push $0xffff 1113f6: ff 73 10 pushl 0x10(%ebx) 1113f9: e8 52 25 00 00 call 113950 (*asr->handler)( signal_set ); 1113fe: 89 34 24 mov %esi,(%esp) 111401: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111404: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111407: 83 c4 0c add $0xc,%esp 11140a: 57 push %edi 11140b: 68 ff ff 00 00 push $0xffff 111410: ff 75 e4 pushl -0x1c(%ebp) 111413: e8 38 25 00 00 call 113950 111418: 83 c4 10 add $0x10,%esp } 11141b: 8d 65 f4 lea -0xc(%ebp),%esp 11141e: 5b pop %ebx 11141f: 5e pop %esi 111420: 5f pop %edi 111421: c9 leave 111422: c3 ret =============================================================================== 0011131c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11131f: 8b 45 08 mov 0x8(%ebp),%eax 111322: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111328: 85 c0 test %eax,%eax 11132a: 74 13 je 11133f <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 11132c: 8b 50 04 mov 0x4(%eax),%edx 11132f: 8b 0a mov (%edx),%ecx 111331: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111334: 8b 48 08 mov 0x8(%eax),%ecx 111337: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111339: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 11133b: 85 c0 test %eax,%eax 11133d: 75 ed jne 11132c <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 11133f: 8b 45 0c mov 0xc(%ebp),%eax 111342: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111348: 85 c0 test %eax,%eax 11134a: 74 13 je 11135f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 11134c: 8b 50 04 mov 0x4(%eax),%edx 11134f: 8b 0a mov (%edx),%ecx 111351: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 111354: 8b 48 0c mov 0xc(%eax),%ecx 111357: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111359: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 11135b: 85 c0 test %eax,%eax 11135d: 75 ed jne 11134c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11135f: c9 leave 111360: c3 ret =============================================================================== 0010ca48 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10ca48: 55 push %ebp 10ca49: 89 e5 mov %esp,%ebp 10ca4b: 57 push %edi 10ca4c: 56 push %esi 10ca4d: 53 push %ebx 10ca4e: 83 ec 28 sub $0x28,%esp 10ca51: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10ca54: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 10ca57: 8d 7d e0 lea -0x20(%ebp),%edi 10ca5a: 57 push %edi 10ca5b: e8 34 18 00 00 call 10e294 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 10ca60: 8b 45 e0 mov -0x20(%ebp),%eax 10ca63: 8b 55 e4 mov -0x1c(%ebp),%edx 10ca66: 89 43 4c mov %eax,0x4c(%ebx) 10ca69: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 10ca6c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10ca72: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10ca78: 89 43 44 mov %eax,0x44(%ebx) 10ca7b: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10ca7e: 83 c4 10 add $0x10,%esp 10ca81: 3b 35 38 a5 12 00 cmp 0x12a538,%esi 10ca87: 74 0b je 10ca94 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10ca89: 8d 65 f4 lea -0xc(%ebp),%esp 10ca8c: 5b pop %ebx 10ca8d: 5e pop %esi 10ca8e: 5f pop %edi 10ca8f: c9 leave 10ca90: c3 ret 10ca91: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ca94: 51 push %ecx 10ca95: 8d 75 d8 lea -0x28(%ebp),%esi 10ca98: 56 push %esi 10ca99: 57 push %edi 10ca9a: 68 40 a5 12 00 push $0x12a540 10ca9f: e8 74 38 00 00 call 110318 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10caa4: 58 pop %eax 10caa5: 5a pop %edx 10caa6: 56 push %esi 10caa7: 83 c3 44 add $0x44,%ebx 10caaa: 53 push %ebx 10caab: e8 64 37 00 00 call 110214 <_Timespec_Add_to> 10cab0: 83 c4 10 add $0x10,%esp } #endif } 10cab3: 8d 65 f4 lea -0xc(%ebp),%esp 10cab6: 5b pop %ebx 10cab7: 5e pop %esi 10cab8: 5f pop %edi 10cab9: c9 leave 10caba: c3 ret =============================================================================== 0010d09c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10d09c: 55 push %ebp 10d09d: 89 e5 mov %esp,%ebp 10d09f: 83 ec 2c sub $0x2c,%esp 10d0a2: 8d 45 f4 lea -0xc(%ebp),%eax 10d0a5: 50 push %eax 10d0a6: ff 75 08 pushl 0x8(%ebp) 10d0a9: 68 80 a3 12 00 push $0x12a380 10d0ae: e8 19 1c 00 00 call 10eccc <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d0b3: 83 c4 10 add $0x10,%esp 10d0b6: 8b 55 f4 mov -0xc(%ebp),%edx 10d0b9: 85 d2 test %edx,%edx 10d0bb: 75 29 jne 10d0e6 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10d0bd: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10d0c0: f6 42 11 40 testb $0x40,0x11(%edx) 10d0c4: 74 08 je 10d0ce <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 10d0c6: 8b 4a 20 mov 0x20(%edx),%ecx 10d0c9: 3b 48 08 cmp 0x8(%eax),%ecx 10d0cc: 74 4e je 10d11c <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10d0ce: 83 78 38 01 cmpl $0x1,0x38(%eax) 10d0d2: 74 14 je 10d0e8 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10d0d4: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d0db: a1 78 a4 12 00 mov 0x12a478,%eax 10d0e0: 48 dec %eax 10d0e1: a3 78 a4 12 00 mov %eax,0x12a478 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10d0e6: c9 leave 10d0e7: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10d0e8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10d0ef: 83 ec 0c sub $0xc,%esp 10d0f2: 50 push %eax 10d0f3: 89 45 e4 mov %eax,-0x1c(%ebp) 10d0f6: e8 4d f9 ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d0fb: 8b 45 e4 mov -0x1c(%ebp),%eax 10d0fe: 8b 50 3c mov 0x3c(%eax),%edx 10d101: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10d104: 5a pop %edx 10d105: 59 pop %ecx 10d106: 83 c0 10 add $0x10,%eax 10d109: 50 push %eax 10d10a: 68 58 a5 12 00 push $0x12a558 10d10f: e8 d4 34 00 00 call 1105e8 <_Watchdog_Insert> 10d114: 83 c4 10 add $0x10,%esp 10d117: eb c2 jmp 10d0db <_Rate_monotonic_Timeout+0x3f> 10d119: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d11c: 83 ec 08 sub $0x8,%esp 10d11f: 68 f8 ff 03 10 push $0x1003fff8 10d124: 52 push %edx 10d125: 89 45 e4 mov %eax,-0x1c(%ebp) 10d128: e8 3f 20 00 00 call 10f16c <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10d12d: 8b 45 e4 mov -0x1c(%ebp),%eax 10d130: 89 04 24 mov %eax,(%esp) 10d133: eb c1 jmp 10d0f6 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010cb54 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10cb54: 55 push %ebp 10cb55: 89 e5 mov %esp,%ebp 10cb57: 57 push %edi 10cb58: 56 push %esi 10cb59: 53 push %ebx 10cb5a: 83 ec 1c sub $0x1c,%esp 10cb5d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10cb60: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10cb63: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10cb67: 0f 84 bf 00 00 00 je 10cc2c <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10cb6d: 52 push %edx 10cb6e: 8d 7d e0 lea -0x20(%ebp),%edi 10cb71: 57 push %edi 10cb72: 8d 75 d8 lea -0x28(%ebp),%esi 10cb75: 56 push %esi 10cb76: 53 push %ebx 10cb77: e8 40 ff ff ff call 10cabc <_Rate_monotonic_Get_status> if (!valid_status) 10cb7c: 83 c4 10 add $0x10,%esp 10cb7f: 84 c0 test %al,%al 10cb81: 75 09 jne 10cb8c <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10cb83: 8d 65 f4 lea -0xc(%ebp),%esp 10cb86: 5b pop %ebx 10cb87: 5e pop %esi 10cb88: 5f pop %edi 10cb89: c9 leave 10cb8a: c3 ret 10cb8b: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10cb8c: 83 ec 08 sub $0x8,%esp 10cb8f: 57 push %edi 10cb90: 8d 43 6c lea 0x6c(%ebx),%eax 10cb93: 50 push %eax 10cb94: e8 7b 36 00 00 call 110214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10cb99: 59 pop %ecx 10cb9a: 58 pop %eax 10cb9b: 8d 43 5c lea 0x5c(%ebx),%eax 10cb9e: 50 push %eax 10cb9f: 57 push %edi 10cba0: e8 4f 37 00 00 call 1102f4 <_Timespec_Less_than> 10cba5: 83 c4 10 add $0x10,%esp 10cba8: 84 c0 test %al,%al 10cbaa: 74 0c je 10cbb8 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10cbac: 8b 45 e0 mov -0x20(%ebp),%eax 10cbaf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbb2: 89 43 5c mov %eax,0x5c(%ebx) 10cbb5: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10cbb8: 83 ec 08 sub $0x8,%esp 10cbbb: 8d 43 64 lea 0x64(%ebx),%eax 10cbbe: 50 push %eax 10cbbf: 57 push %edi 10cbc0: e8 0b 37 00 00 call 1102d0 <_Timespec_Greater_than> 10cbc5: 83 c4 10 add $0x10,%esp 10cbc8: 84 c0 test %al,%al 10cbca: 74 0c je 10cbd8 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10cbcc: 8b 45 e0 mov -0x20(%ebp),%eax 10cbcf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbd2: 89 43 64 mov %eax,0x64(%ebx) 10cbd5: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 10cbd8: 83 ec 08 sub $0x8,%esp 10cbdb: 56 push %esi 10cbdc: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10cbe2: 50 push %eax 10cbe3: e8 2c 36 00 00 call 110214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10cbe8: 58 pop %eax 10cbe9: 5a pop %edx 10cbea: 8d 43 74 lea 0x74(%ebx),%eax 10cbed: 50 push %eax 10cbee: 56 push %esi 10cbef: e8 00 37 00 00 call 1102f4 <_Timespec_Less_than> 10cbf4: 83 c4 10 add $0x10,%esp 10cbf7: 84 c0 test %al,%al 10cbf9: 75 39 jne 10cc34 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10cbfb: 83 ec 08 sub $0x8,%esp 10cbfe: 8d 43 7c lea 0x7c(%ebx),%eax 10cc01: 50 push %eax 10cc02: 56 push %esi 10cc03: e8 c8 36 00 00 call 1102d0 <_Timespec_Greater_than> 10cc08: 83 c4 10 add $0x10,%esp 10cc0b: 84 c0 test %al,%al 10cc0d: 0f 84 70 ff ff ff je 10cb83 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10cc13: 8b 45 d8 mov -0x28(%ebp),%eax 10cc16: 8b 55 dc mov -0x24(%ebp),%edx 10cc19: 89 43 7c mov %eax,0x7c(%ebx) 10cc1c: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10cc22: 8d 65 f4 lea -0xc(%ebp),%esp 10cc25: 5b pop %ebx 10cc26: 5e pop %esi 10cc27: 5f pop %edi 10cc28: c9 leave 10cc29: c3 ret 10cc2a: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10cc2c: ff 43 58 incl 0x58(%ebx) 10cc2f: e9 39 ff ff ff jmp 10cb6d <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 10cc34: 8b 45 d8 mov -0x28(%ebp),%eax 10cc37: 8b 55 dc mov -0x24(%ebp),%edx 10cc3a: 89 43 74 mov %eax,0x74(%ebx) 10cc3d: 89 53 78 mov %edx,0x78(%ebx) 10cc40: eb b9 jmp 10cbfb <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010dfbc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10dfbc: 55 push %ebp 10dfbd: 89 e5 mov %esp,%ebp 10dfbf: 53 push %ebx 10dfc0: 83 ec 04 sub $0x4,%esp 10dfc3: 8b 5d 08 mov 0x8(%ebp),%ebx 10dfc6: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10dfcb: 40 inc %eax 10dfcc: a3 d8 b7 12 00 mov %eax,0x12b7d8 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dfd1: a1 6c b8 12 00 mov 0x12b86c,%eax if ( time->tv_sec < seconds ) 10dfd6: 8b 13 mov (%ebx),%edx 10dfd8: 39 d0 cmp %edx,%eax 10dfda: 7f 34 jg 10e010 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10dfdc: 51 push %ecx 10dfdd: 29 c2 sub %eax,%edx 10dfdf: 52 push %edx 10dfe0: 6a 00 push $0x0 10dfe2: 68 ac b8 12 00 push $0x12b8ac 10dfe7: e8 44 24 00 00 call 110430 <_Watchdog_Adjust> 10dfec: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10dfef: 8b 03 mov (%ebx),%eax 10dff1: a3 6c b8 12 00 mov %eax,0x12b86c 10dff6: 8b 43 04 mov 0x4(%ebx),%eax 10dff9: a3 70 b8 12 00 mov %eax,0x12b870 _TOD_Is_set = true; 10dffe: c6 05 ec b7 12 00 01 movb $0x1,0x12b7ec _TOD_Activate(); _Thread_Enable_dispatch(); } 10e005: 8b 5d fc mov -0x4(%ebp),%ebx 10e008: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e009: e9 76 12 00 00 jmp 10f284 <_Thread_Enable_dispatch> 10e00e: 66 90 xchg %ax,%ax 10e010: 51 push %ecx 10e011: 29 d0 sub %edx,%eax 10e013: 50 push %eax 10e014: 6a 01 push $0x1 10e016: 68 ac b8 12 00 push $0x12b8ac 10e01b: e8 10 24 00 00 call 110430 <_Watchdog_Adjust> 10e020: 83 c4 10 add $0x10,%esp 10e023: eb ca jmp 10dfef <_TOD_Set+0x33> =============================================================================== 0010ca40 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ca40: 55 push %ebp 10ca41: 89 e5 mov %esp,%ebp 10ca43: 53 push %ebx 10ca44: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10ca47: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ca4e: a1 2c 32 12 00 mov 0x12322c,%eax 10ca53: 8d 04 80 lea (%eax,%eax,4),%eax 10ca56: 8d 04 80 lea (%eax,%eax,4),%eax 10ca59: 8d 04 80 lea (%eax,%eax,4),%eax 10ca5c: c1 e0 03 shl $0x3,%eax 10ca5f: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ca62: a1 c4 74 12 00 mov 0x1274c4,%eax 10ca67: 40 inc %eax 10ca68: a3 c4 74 12 00 mov %eax,0x1274c4 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ca6d: 8d 5d f0 lea -0x10(%ebp),%ebx 10ca70: 53 push %ebx 10ca71: 68 d8 73 12 00 push $0x1273d8 10ca76: e8 e9 1c 00 00 call 10e764 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10ca7b: 58 pop %eax 10ca7c: 5a pop %edx 10ca7d: 53 push %ebx 10ca7e: 68 ec 73 12 00 push $0x1273ec 10ca83: e8 dc 1c 00 00 call 10e764 <_Timespec_Add_to> 10ca88: 89 c3 mov %eax,%ebx while ( seconds ) { 10ca8a: 83 c4 10 add $0x10,%esp 10ca8d: 85 c0 test %eax,%eax 10ca8f: 74 16 je 10caa7 <_TOD_Tickle_ticks+0x67> 10ca91: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ca94: 83 ec 0c sub $0xc,%esp 10ca97: 68 2c 74 12 00 push $0x12742c 10ca9c: e8 73 21 00 00 call 10ec14 <_Watchdog_Tickle> 10caa1: 83 c4 10 add $0x10,%esp 10caa4: 4b dec %ebx 10caa5: 75 ed jne 10ca94 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10caa7: 8b 5d fc mov -0x4(%ebp),%ebx 10caaa: c9 leave 10caab: c3 ret =============================================================================== 0010c7c4 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c7c4: 55 push %ebp 10c7c5: 89 e5 mov %esp,%ebp 10c7c7: 56 push %esi 10c7c8: 53 push %ebx 10c7c9: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c7cc: 8b 72 08 mov 0x8(%edx),%esi 10c7cf: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c7d0: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c7d2: 89 c3 mov %eax,%ebx 10c7d4: 83 e3 03 and $0x3,%ebx 10c7d7: 74 67 je 10c840 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c7d9: 8b 4a 04 mov 0x4(%edx),%ecx 10c7dc: 0f b7 8c 09 c0 41 12 movzwl 0x1241c0(%ecx,%ecx,1),%ecx 10c7e3: 00 10c7e4: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c7e7: 0f b7 8c 1b f4 41 12 movzwl 0x1241f4(%ebx,%ebx,1),%ecx 10c7ee: 00 10c7ef: 2d c4 07 00 00 sub $0x7c4,%eax 10c7f4: c1 e8 02 shr $0x2,%eax 10c7f7: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c7fa: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c7fd: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c800: 8d 04 98 lea (%eax,%ebx,4),%eax 10c803: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c805: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c807: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c80a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c80d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c810: c1 e0 02 shl $0x2,%eax 10c813: 29 c8 sub %ecx,%eax 10c815: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c818: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c81b: 8b 4a 0c mov 0xc(%edx),%ecx 10c81e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c821: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c824: c1 e1 02 shl $0x2,%ecx 10c827: 03 4a 10 add 0x10(%edx),%ecx 10c82a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c82d: 8d 14 92 lea (%edx,%edx,4),%edx 10c830: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c837: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c83a: 5b pop %ebx 10c83b: 5e pop %esi 10c83c: c9 leave 10c83d: c3 ret 10c83e: 66 90 xchg %ax,%ax time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c840: 8b 4a 04 mov 0x4(%edx),%ecx 10c843: 0f b7 8c 09 da 41 12 movzwl 0x1241da(%ecx,%ecx,1),%ecx 10c84a: 00 10c84b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c84e: eb 97 jmp 10c7e7 <_TOD_To_seconds+0x23> =============================================================================== 0010c850 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 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(); 10c857: 8b 1d 4c 72 12 00 mov 0x12724c,%ebx if ((!the_tod) || 10c85d: 85 c9 test %ecx,%ecx 10c85f: 74 53 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c861: b8 40 42 0f 00 mov $0xf4240,%eax 10c866: 31 d2 xor %edx,%edx 10c868: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c86a: 3b 41 18 cmp 0x18(%ecx),%eax 10c86d: 76 45 jbe 10c8b4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c86f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c873: 77 3f ja 10c8b4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c875: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c879: 77 39 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c87b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c87f: 77 33 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c881: 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) || 10c884: 85 c0 test %eax,%eax 10c886: 74 2c je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c888: 83 f8 0c cmp $0xc,%eax 10c88b: 77 27 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c88d: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c88f: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c895: 76 1d jbe 10c8b4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c897: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c89a: 85 c9 test %ecx,%ecx 10c89c: 74 16 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c89e: 83 e2 03 and $0x3,%edx 10c8a1: 75 16 jne 10c8b9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8a3: 8b 04 85 34 42 12 00 mov 0x124234(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8aa: 39 c8 cmp %ecx,%eax 10c8ac: 0f 93 c0 setae %al 10c8af: eb 05 jmp 10c8b6 <_TOD_Validate+0x66> 10c8b1: 8d 76 00 lea 0x0(%esi),%esi 10c8b4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8b6: 5b pop %ebx 10c8b7: c9 leave 10c8b8: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c8b9: 8b 04 85 00 42 12 00 mov 0x124200(,%eax,4),%eax 10c8c0: eb e8 jmp 10c8aa <_TOD_Validate+0x5a> =============================================================================== 0010d688 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d688: 55 push %ebp 10d689: 89 e5 mov %esp,%ebp 10d68b: 57 push %edi 10d68c: 56 push %esi 10d68d: 53 push %ebx 10d68e: 83 ec 28 sub $0x28,%esp 10d691: 8b 5d 08 mov 0x8(%ebp),%ebx 10d694: 8b 75 0c mov 0xc(%ebp),%esi 10d697: 8a 45 10 mov 0x10(%ebp),%al 10d69a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d69d: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10d6a0: 53 push %ebx 10d6a1: e8 56 0e 00 00 call 10e4fc <_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 ) 10d6a6: 83 c4 10 add $0x10,%esp 10d6a9: 39 73 14 cmp %esi,0x14(%ebx) 10d6ac: 74 0d je 10d6bb <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d6ae: 83 ec 08 sub $0x8,%esp 10d6b1: 56 push %esi 10d6b2: 53 push %ebx 10d6b3: e8 fc 0c 00 00 call 10e3b4 <_Thread_Set_priority> 10d6b8: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d6bb: 9c pushf 10d6bc: fa cli 10d6bd: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d6be: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d6c1: 83 f8 04 cmp $0x4,%eax 10d6c4: 74 26 je 10d6ec <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d6c6: 83 e7 04 and $0x4,%edi 10d6c9: 74 15 je 10d6e0 <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d6cb: 52 push %edx 10d6cc: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d6cd: a9 e0 be 03 00 test $0x3bee0,%eax 10d6d2: 0f 85 bc 00 00 00 jne 10d794 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10d6db: 5b pop %ebx 10d6dc: 5e pop %esi 10d6dd: 5f pop %edi 10d6de: c9 leave 10d6df: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d6e0: 89 c1 mov %eax,%ecx 10d6e2: 83 e1 fb and $0xfffffffb,%ecx 10d6e5: 89 4b 10 mov %ecx,0x10(%ebx) 10d6e8: eb e1 jmp 10d6cb <_Thread_Change_priority+0x43> 10d6ea: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d6ec: 83 e7 04 and $0x4,%edi 10d6ef: 75 45 jne 10d736 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d6f1: 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; 10d6f8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d6fe: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d705: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d708: 66 a1 0c 74 12 00 mov 0x12740c,%ax 10d70e: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d714: 66 a3 0c 74 12 00 mov %ax,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d71a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d71e: 0f 84 88 00 00 00 je 10d7ac <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d724: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d72a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d72d: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d72f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d731: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d733: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d736: 52 push %edx 10d737: 9d popf 10d738: 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 ); 10d739: 66 8b 1d 0c 74 12 00 mov 0x12740c,%bx 10d740: 31 c0 xor %eax,%eax 10d742: 89 c1 mov %eax,%ecx 10d744: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d748: 0f b7 c9 movzwl %cx,%ecx 10d74b: 66 8b 9c 09 a0 74 12 mov 0x1274a0(%ecx,%ecx,1),%bx 10d752: 00 10d753: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d757: c1 e1 04 shl $0x4,%ecx 10d75a: 0f b7 c0 movzwl %ax,%eax 10d75d: 8d 04 01 lea (%ecx,%eax,1),%eax 10d760: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d763: a1 20 73 12 00 mov 0x127320,%eax 10d768: 8b 04 88 mov (%eax,%ecx,4),%eax 10d76b: a3 e8 73 12 00 mov %eax,0x1273e8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d770: 8b 0d 18 74 12 00 mov 0x127418,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d776: 39 c8 cmp %ecx,%eax 10d778: 74 0d je 10d787 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d77a: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d77e: 74 07 je 10d787 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d780: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10d787: 52 push %edx 10d788: 9d popf } 10d789: 8d 65 f4 lea -0xc(%ebp),%esp 10d78c: 5b pop %ebx 10d78d: 5e pop %esi 10d78e: 5f pop %edi 10d78f: c9 leave 10d790: c3 ret 10d791: 8d 76 00 lea 0x0(%esi),%esi /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10d794: 89 5d 0c mov %ebx,0xc(%ebp) 10d797: 8b 43 44 mov 0x44(%ebx),%eax 10d79a: 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 ); } 10d79d: 8d 65 f4 lea -0xc(%ebp),%esp 10d7a0: 5b pop %ebx 10d7a1: 5e pop %esi 10d7a2: 5f pop %edi 10d7a3: 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 ); 10d7a4: e9 73 0b 00 00 jmp 10e31c <_Thread_queue_Requeue> 10d7a9: 8d 76 00 lea 0x0(%esi),%esi _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d7ac: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d7b2: 8d 48 04 lea 0x4(%eax),%ecx 10d7b5: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d7b7: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d7ba: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d7bd: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d7bf: 89 4b 04 mov %ecx,0x4(%ebx) 10d7c2: e9 6f ff ff ff jmp 10d736 <_Thread_Change_priority+0xae> =============================================================================== 0010d7c8 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d7c8: 55 push %ebp 10d7c9: 89 e5 mov %esp,%ebp 10d7cb: 53 push %ebx 10d7cc: 8b 45 08 mov 0x8(%ebp),%eax 10d7cf: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d7d2: 9c pushf 10d7d3: fa cli 10d7d4: 5b pop %ebx current_state = the_thread->current_state; 10d7d5: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d7d8: 85 ca test %ecx,%edx 10d7da: 74 70 je 10d84c <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d7dc: f7 d2 not %edx 10d7de: 21 ca and %ecx,%edx current_state = 10d7e0: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d7e3: 85 d2 test %edx,%edx 10d7e5: 75 65 jne 10d84c <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d7e7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d7ed: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d7f4: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d7f7: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10d7fe: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d804: 66 89 15 0c 74 12 00 mov %dx,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d80b: 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); 10d811: 8d 4a 04 lea 0x4(%edx),%ecx 10d814: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d816: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d819: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d81c: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d81e: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d821: 53 push %ebx 10d822: 9d popf 10d823: 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 ) { 10d824: 8b 50 14 mov 0x14(%eax),%edx 10d827: 8b 0d e8 73 12 00 mov 0x1273e8,%ecx 10d82d: 3b 51 14 cmp 0x14(%ecx),%edx 10d830: 73 1a jae 10d84c <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d832: a3 e8 73 12 00 mov %eax,0x1273e8 if ( _Thread_Executing->is_preemptible || 10d837: a1 18 74 12 00 mov 0x127418,%eax 10d83c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d840: 74 12 je 10d854 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d842: c6 05 28 74 12 00 01 movb $0x1,0x127428 10d849: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d84c: 53 push %ebx 10d84d: 9d popf } 10d84e: 5b pop %ebx 10d84f: c9 leave 10d850: c3 ret 10d851: 8d 76 00 lea 0x0(%esi),%esi * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d854: 85 d2 test %edx,%edx 10d856: 74 ea je 10d842 <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d858: eb f2 jmp 10d84c <_Thread_Clear_state+0x84> =============================================================================== 0010d85c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d85c: 55 push %ebp 10d85d: 89 e5 mov %esp,%ebp 10d85f: 56 push %esi 10d860: 53 push %ebx 10d861: 8b 75 08 mov 0x8(%ebp),%esi 10d864: 8b 5d 0c mov 0xc(%ebp),%ebx 10d867: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d86b: 8b 46 1c mov 0x1c(%esi),%eax 10d86e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d875: a1 58 73 12 00 mov 0x127358,%eax 10d87a: 48 dec %eax 10d87b: a3 58 73 12 00 mov %eax,0x127358 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d880: 83 ec 0c sub $0xc,%esp 10d883: 53 push %ebx 10d884: e8 27 11 00 00 call 10e9b0 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d889: a1 58 73 12 00 mov 0x127358,%eax 10d88e: 40 inc %eax 10d88f: a3 58 73 12 00 mov %eax,0x127358 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d894: 59 pop %ecx 10d895: 58 pop %eax 10d896: 53 push %ebx 10d897: 56 push %esi 10d898: e8 57 f6 ff ff call 10cef4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d89d: 58 pop %eax 10d89e: 5a pop %edx 10d89f: 6a 01 push $0x1 10d8a1: 53 push %ebx 10d8a2: e8 79 0b 00 00 call 10e420 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d8a7: 89 1c 24 mov %ebx,(%esp) 10d8aa: e8 c5 09 00 00 call 10e274 <_Thread_queue_Extract_with_proxy> 10d8af: 83 c4 10 add $0x10,%esp 10d8b2: 84 c0 test %al,%al 10d8b4: 75 06 jne 10d8bc <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d8b6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d8ba: 74 68 je 10d924 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d8bc: 3b 1d e0 73 12 00 cmp 0x1273e0,%ebx 10d8c2: 74 74 je 10d938 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d8c4: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d8cb: 00 00 00 if ( the_thread->Start.fp_context ) 10d8ce: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d8d4: 85 c0 test %eax,%eax 10d8d6: 74 0c je 10d8e4 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d8d8: 83 ec 0c sub $0xc,%esp 10d8db: 50 push %eax 10d8dc: e8 e7 13 00 00 call 10ecc8 <_Workspace_Free> 10d8e1: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d8e4: 83 ec 0c sub $0xc,%esp 10d8e7: 53 push %ebx 10d8e8: e8 e7 0c 00 00 call 10e5d4 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d8ed: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d8f4: 00 00 00 if ( the_thread->extensions ) 10d8f7: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d8fd: 83 c4 10 add $0x10,%esp 10d900: 85 c0 test %eax,%eax 10d902: 74 0c je 10d910 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d904: 83 ec 0c sub $0xc,%esp 10d907: 50 push %eax 10d908: e8 bb 13 00 00 call 10ecc8 <_Workspace_Free> 10d90d: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d910: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d917: 00 00 00 } 10d91a: 8d 65 f8 lea -0x8(%ebp),%esp 10d91d: 5b pop %ebx 10d91e: 5e pop %esi 10d91f: c9 leave 10d920: c3 ret 10d921: 8d 76 00 lea 0x0(%esi),%esi */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d924: 83 ec 0c sub $0xc,%esp 10d927: 8d 43 48 lea 0x48(%ebx),%eax 10d92a: 50 push %eax 10d92b: e8 78 12 00 00 call 10eba8 <_Watchdog_Remove> 10d930: 83 c4 10 add $0x10,%esp 10d933: eb 87 jmp 10d8bc <_Thread_Close+0x60> 10d935: 8d 76 00 lea 0x0(%esi),%esi */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d938: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10d93f: 00 00 00 10d942: eb 80 jmp 10d8c4 <_Thread_Close+0x68> =============================================================================== 0010d9d8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d9d8: 55 push %ebp 10d9d9: 89 e5 mov %esp,%ebp 10d9db: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d9de: 8d 45 f4 lea -0xc(%ebp),%eax 10d9e1: 50 push %eax 10d9e2: ff 75 08 pushl 0x8(%ebp) 10d9e5: e8 aa 01 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10d9ea: 83 c4 10 add $0x10,%esp 10d9ed: 8b 55 f4 mov -0xc(%ebp),%edx 10d9f0: 85 d2 test %edx,%edx 10d9f2: 75 1c jne 10da10 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d9f4: 83 ec 08 sub $0x8,%esp 10d9f7: 68 18 00 00 10 push $0x10000018 10d9fc: 50 push %eax 10d9fd: e8 c6 fd ff ff call 10d7c8 <_Thread_Clear_state> 10da02: a1 58 73 12 00 mov 0x127358,%eax 10da07: 48 dec %eax 10da08: a3 58 73 12 00 mov %eax,0x127358 10da0d: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10da10: c9 leave 10da11: c3 ret =============================================================================== 0010da14 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10da14: 55 push %ebp 10da15: 89 e5 mov %esp,%ebp 10da17: 57 push %edi 10da18: 56 push %esi 10da19: 53 push %ebx 10da1a: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10da1d: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10da23: 9c pushf 10da24: fa cli 10da25: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10da26: 8a 15 28 74 12 00 mov 0x127428,%dl 10da2c: 84 d2 test %dl,%dl 10da2e: 0f 84 10 01 00 00 je 10db44 <_Thread_Dispatch+0x130> 10da34: 8d 7d d8 lea -0x28(%ebp),%edi 10da37: e9 d1 00 00 00 jmp 10db0d <_Thread_Dispatch+0xf9> executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10da3c: 50 push %eax 10da3d: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10da3e: 83 ec 0c sub $0xc,%esp 10da41: 8d 45 e0 lea -0x20(%ebp),%eax 10da44: 50 push %eax 10da45: e8 4e 3e 00 00 call 111898 <_TOD_Get_uptime> _Timestamp_Subtract( 10da4a: 83 c4 0c add $0xc,%esp 10da4d: 57 push %edi 10da4e: 8d 45 e0 lea -0x20(%ebp),%eax 10da51: 50 push %eax 10da52: 68 20 74 12 00 push $0x127420 10da57: e8 44 0d 00 00 call 10e7a0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10da5c: 5a pop %edx 10da5d: 59 pop %ecx 10da5e: 57 push %edi 10da5f: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10da65: 50 push %eax 10da66: e8 f9 0c 00 00 call 10e764 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10da6b: 8b 45 e0 mov -0x20(%ebp),%eax 10da6e: 8b 55 e4 mov -0x1c(%ebp),%edx 10da71: a3 20 74 12 00 mov %eax,0x127420 10da76: 89 15 24 74 12 00 mov %edx,0x127424 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10da7c: a1 e4 73 12 00 mov 0x1273e4,%eax 10da81: 83 c4 10 add $0x10,%esp 10da84: 85 c0 test %eax,%eax 10da86: 74 10 je 10da98 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10da88: 8b 10 mov (%eax),%edx 10da8a: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10da90: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10da96: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10da98: 83 ec 08 sub $0x8,%esp 10da9b: 56 push %esi 10da9c: 53 push %ebx 10da9d: e8 8e 0f 00 00 call 10ea30 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10daa2: 59 pop %ecx 10daa3: 58 pop %eax 10daa4: 81 c6 d0 00 00 00 add $0xd0,%esi 10daaa: 56 push %esi 10daab: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10dab1: 50 push %eax 10dab2: e8 79 12 00 00 call 10ed30 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dab7: 83 c4 10 add $0x10,%esp 10daba: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10dac0: 85 d2 test %edx,%edx 10dac2: 74 36 je 10dafa <_Thread_Dispatch+0xe6> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10dac4: a1 e0 73 12 00 mov 0x1273e0,%eax 10dac9: 39 c3 cmp %eax,%ebx 10dacb: 74 2d je 10dafa <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dacd: 85 c0 test %eax,%eax 10dacf: 74 11 je 10dae2 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10dad1: 83 ec 0c sub $0xc,%esp 10dad4: 05 e8 00 00 00 add $0xe8,%eax 10dad9: 50 push %eax 10dada: e8 85 12 00 00 call 10ed64 <_CPU_Context_save_fp> 10dadf: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dae2: 83 ec 0c sub $0xc,%esp 10dae5: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10daeb: 50 push %eax 10daec: e8 7d 12 00 00 call 10ed6e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10daf1: 89 1d e0 73 12 00 mov %ebx,0x1273e0 10daf7: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10dafa: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10db00: 9c pushf 10db01: fa cli 10db02: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10db03: 8a 15 28 74 12 00 mov 0x127428,%dl 10db09: 84 d2 test %dl,%dl 10db0b: 74 37 je 10db44 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10db0d: 8b 35 e8 73 12 00 mov 0x1273e8,%esi _Thread_Dispatch_disable_level = 1; 10db13: c7 05 58 73 12 00 01 movl $0x1,0x127358 10db1a: 00 00 00 _Context_Switch_necessary = false; 10db1d: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = heir; 10db24: 89 35 18 74 12 00 mov %esi,0x127418 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 10db2a: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10db2e: 0f 85 08 ff ff ff jne 10da3c <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10db34: 8b 15 24 73 12 00 mov 0x127324,%edx 10db3a: 89 56 78 mov %edx,0x78(%esi) 10db3d: e9 fa fe ff ff jmp 10da3c <_Thread_Dispatch+0x28> 10db42: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10db44: c7 05 58 73 12 00 00 movl $0x0,0x127358 10db4b: 00 00 00 _ISR_Enable( level ); 10db4e: 50 push %eax 10db4f: 9d popf if ( _Thread_Do_post_task_switch_extension || 10db50: a1 fc 73 12 00 mov 0x1273fc,%eax 10db55: 85 c0 test %eax,%eax 10db57: 75 06 jne 10db5f <_Thread_Dispatch+0x14b><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10db59: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10db5d: 74 09 je 10db68 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10db5f: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10db63: e8 ec e8 ff ff call 10c454 <_API_extensions_Run_postswitch> } } 10db68: 8d 65 f4 lea -0xc(%ebp),%esp 10db6b: 5b pop %ebx 10db6c: 5e pop %esi 10db6d: 5f pop %edi 10db6e: c9 leave 10db6f: c3 ret =============================================================================== 00113c0c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 113c0c: 55 push %ebp 113c0d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 113c0f: a1 18 74 12 00 mov 0x127418,%eax if ( !_States_Is_ready( executing->current_state ) || 113c14: 8b 50 10 mov 0x10(%eax),%edx 113c17: 85 d2 test %edx,%edx 113c19: 75 0e jne 113c29 <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 113c1b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 113c21: 74 11 je 113c34 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 113c23: 80 78 75 00 cmpb $0x0,0x75(%eax) 113c27: 74 0b je 113c34 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 113c29: c6 05 28 74 12 00 01 movb $0x1,0x127428 113c30: b0 01 mov $0x1,%al return true; } return false; } 113c32: c9 leave 113c33: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 113c34: 31 c0 xor %eax,%eax } return false; } 113c36: c9 leave 113c37: c3 ret =============================================================================== 0010db94 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10db94: 55 push %ebp 10db95: 89 e5 mov %esp,%ebp 10db97: 53 push %ebx 10db98: 83 ec 04 sub $0x4,%esp 10db9b: 8b 45 08 mov 0x8(%ebp),%eax 10db9e: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10dba1: 85 c0 test %eax,%eax 10dba3: 74 4b je 10dbf0 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10dba5: 89 c2 mov %eax,%edx 10dba7: c1 ea 18 shr $0x18,%edx 10dbaa: 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 ) 10dbad: 8d 5a ff lea -0x1(%edx),%ebx 10dbb0: 83 fb 03 cmp $0x3,%ebx 10dbb3: 77 2b ja 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dbb5: 89 c3 mov %eax,%ebx 10dbb7: c1 eb 1b shr $0x1b,%ebx 10dbba: 4b dec %ebx 10dbbb: 75 23 jne 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dbbd: 8b 14 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edx if ( !api_information ) { 10dbc4: 85 d2 test %edx,%edx 10dbc6: 74 18 je 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dbc8: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dbcb: 85 d2 test %edx,%edx 10dbcd: 74 11 je 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dbcf: 53 push %ebx 10dbd0: 51 push %ecx 10dbd1: 50 push %eax 10dbd2: 52 push %edx 10dbd3: e8 50 f7 ff ff call 10d328 <_Objects_Get> 10dbd8: 83 c4 10 add $0x10,%esp done: return tp; } 10dbdb: 8b 5d fc mov -0x4(%ebp),%ebx 10dbde: c9 leave 10dbdf: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dbe0: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dbe6: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dbe8: 8b 5d fc mov -0x4(%ebp),%ebx 10dbeb: c9 leave 10dbec: c3 ret 10dbed: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dbf0: a1 58 73 12 00 mov 0x127358,%eax 10dbf5: 40 inc %eax 10dbf6: a3 58 73 12 00 mov %eax,0x127358 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10dbfb: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dc01: a1 18 74 12 00 mov 0x127418,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc06: 8b 5d fc mov -0x4(%ebp),%ebx 10dc09: c9 leave 10dc0a: c3 ret =============================================================================== 00113c38 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 113c38: 55 push %ebp 113c39: 89 e5 mov %esp,%ebp 113c3b: 53 push %ebx 113c3c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 113c3f: 8b 1d 18 74 12 00 mov 0x127418,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 113c45: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 113c4b: 85 c0 test %eax,%eax 113c4d: 74 79 je 113cc8 <_Thread_Handler+0x90> 113c4f: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 113c50: a0 b4 6f 12 00 mov 0x126fb4,%al 113c55: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 113c58: c6 05 b4 6f 12 00 01 movb $0x1,0x126fb4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 113c5f: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 113c65: 85 d2 test %edx,%edx 113c67: 74 24 je 113c8d <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 113c69: a1 e0 73 12 00 mov 0x1273e0,%eax 113c6e: 39 c3 cmp %eax,%ebx 113c70: 74 1b je 113c8d <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 113c72: 85 c0 test %eax,%eax 113c74: 74 11 je 113c87 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 113c76: 83 ec 0c sub $0xc,%esp 113c79: 05 e8 00 00 00 add $0xe8,%eax 113c7e: 50 push %eax 113c7f: e8 e0 b0 ff ff call 10ed64 <_CPU_Context_save_fp> 113c84: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 113c87: 89 1d e0 73 12 00 mov %ebx,0x1273e0 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 113c8d: 83 ec 0c sub $0xc,%esp 113c90: 53 push %ebx 113c91: e8 0a ac ff ff call 10e8a0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 113c96: e8 d5 9e ff ff call 10db70 <_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) */ { 113c9b: 83 c4 10 add $0x10,%esp 113c9e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 113ca2: 74 28 je 113ccc <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113ca4: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113caa: 85 c0 test %eax,%eax 113cac: 74 2d je 113cdb <_Thread_Handler+0xa3> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 113cae: 83 ec 0c sub $0xc,%esp 113cb1: 53 push %ebx 113cb2: e8 25 ac ff ff call 10e8dc <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113cb7: 83 c4 0c add $0xc,%esp 113cba: 6a 06 push $0x6 113cbc: 6a 01 push $0x1 113cbe: 6a 00 push $0x0 113cc0: e8 1b 91 ff ff call 10cde0 <_Internal_error_Occurred> 113cc5: 8d 76 00 lea 0x0(%esi),%esi * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 113cc8: fb sti 113cc9: eb 85 jmp 113c50 <_Thread_Handler+0x18> 113ccb: 90 nop * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 113ccc: e8 bf bf 00 00 call 11fc90 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cd1: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cd7: 85 c0 test %eax,%eax 113cd9: 75 d3 jne 113cae <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113cdb: 83 ec 0c sub $0xc,%esp 113cde: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 113ce4: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113cea: 89 43 28 mov %eax,0x28(%ebx) 113ced: 83 c4 10 add $0x10,%esp 113cf0: eb bc jmp 113cae <_Thread_Handler+0x76> =============================================================================== 0010de74 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10de74: 55 push %ebp 10de75: 89 e5 mov %esp,%ebp 10de77: 53 push %ebx 10de78: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10de7b: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10de80: 8b 15 28 32 12 00 mov 0x123228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10de86: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10de8c: 85 db test %ebx,%ebx 10de8e: 0f 94 c3 sete %bl 10de91: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10de97: 85 c9 test %ecx,%ecx 10de99: 0f 94 c1 sete %cl 10de9c: 38 cb cmp %cl,%bl 10de9e: 0f 85 9d 00 00 00 jne 10df41 <_Thread_Handler_initialization+0xcd><== NEVER TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10dea4: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = NULL; 10deab: c7 05 18 74 12 00 00 movl $0x0,0x127418 10deb2: 00 00 00 _Thread_Heir = NULL; 10deb5: c7 05 e8 73 12 00 00 movl $0x0,0x1273e8 10debc: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10debf: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10dec6: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10dec9: c7 05 fc 73 12 00 00 movl $0x0,0x1273fc 10ded0: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10ded3: 89 15 f8 73 12 00 mov %edx,0x1273f8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10ded9: a3 24 73 12 00 mov %eax,0x127324 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10dede: 83 ec 0c sub $0xc,%esp 10dee1: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10dee8: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10deec: c1 e0 02 shl $0x2,%eax 10deef: 50 push %eax 10def0: e8 8b 0d 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10def5: a3 20 73 12 00 mov %eax,0x127320 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10defa: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10df01: 31 d2 xor %edx,%edx 10df03: 83 c4 10 add $0x10,%esp 10df06: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df08: 8d 48 04 lea 0x4(%eax),%ecx 10df0b: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10df0d: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10df14: 89 40 08 mov %eax,0x8(%eax) 10df17: 42 inc %edx 10df18: 83 c0 0c add $0xc,%eax 10df1b: 39 da cmp %ebx,%edx 10df1d: 76 e9 jbe 10df08 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10df1f: 50 push %eax 10df20: 6a 08 push $0x8 10df22: 6a 00 push $0x0 10df24: 68 04 01 00 00 push $0x104 10df29: 6a 01 push $0x1 10df2b: 6a 01 push $0x1 10df2d: 6a 01 push $0x1 10df2f: 68 e0 74 12 00 push $0x1274e0 10df34: e8 57 f4 ff ff call 10d390 <_Objects_Initialize_information> 10df39: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10df3c: 8b 5d fc mov -0x4(%ebp),%ebx 10df3f: c9 leave 10df40: c3 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10df41: 52 push %edx 10df42: 6a 0f push $0xf 10df44: 6a 01 push $0x1 10df46: 6a 00 push $0x0 10df48: e8 93 ee ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 0010dc0c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dc0c: 55 push %ebp 10dc0d: 89 e5 mov %esp,%ebp 10dc0f: 57 push %edi 10dc10: 56 push %esi 10dc11: 53 push %ebx 10dc12: 83 ec 24 sub $0x24,%esp 10dc15: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc18: 8b 75 14 mov 0x14(%ebp),%esi 10dc1b: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10dc1f: 8a 45 20 mov 0x20(%ebp),%al 10dc22: 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; 10dc25: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dc2c: 00 00 00 10dc2f: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dc36: 00 00 00 10dc39: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dc40: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dc43: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10dc4a: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10dc4d: 56 push %esi 10dc4e: 53 push %ebx 10dc4f: e8 1c 09 00 00 call 10e570 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10dc54: 83 c4 10 add $0x10,%esp 10dc57: 85 c0 test %eax,%eax 10dc59: 0f 84 8d 01 00 00 je 10ddec <_Thread_Initialize+0x1e0> 10dc5f: 39 c6 cmp %eax,%esi 10dc61: 0f 87 85 01 00 00 ja 10ddec <_Thread_Initialize+0x1e0><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dc67: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10dc6d: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10dc73: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10dc79: 89 f8 mov %edi,%eax 10dc7b: 84 c0 test %al,%al 10dc7d: 0f 85 81 01 00 00 jne 10de04 <_Thread_Initialize+0x1f8> 10dc83: 31 c0 xor %eax,%eax 10dc85: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10dc8c: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10dc92: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dc98: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dc9f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dca6: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dcad: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dcb4: a1 f8 73 12 00 mov 0x1273f8,%eax 10dcb9: 85 c0 test %eax,%eax 10dcbb: 0f 85 5f 01 00 00 jne 10de20 <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10dcc1: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dcc8: 00 00 00 10dccb: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10dccd: 8a 45 e7 mov -0x19(%ebp),%al 10dcd0: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10dcd6: 8b 45 24 mov 0x24(%ebp),%eax 10dcd9: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10dcdf: 8b 45 28 mov 0x28(%ebp),%eax 10dce2: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10dce8: 8b 45 2c mov 0x2c(%ebp),%eax 10dceb: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10dcf1: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10dcf8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10dcff: 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; 10dd06: 8b 45 1c mov 0x1c(%ebp),%eax 10dd09: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10dd0c: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10dd12: 83 ec 08 sub $0x8,%esp 10dd15: 50 push %eax 10dd16: 53 push %ebx 10dd17: e8 98 06 00 00 call 10e3b4 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10dd1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10dd23: 00 00 00 10dd26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10dd2d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10dd30: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10dd34: 8b 45 08 mov 0x8(%ebp),%eax 10dd37: 8b 40 1c mov 0x1c(%eax),%eax 10dd3a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10dd3d: 8b 45 30 mov 0x30(%ebp),%eax 10dd40: 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 ); 10dd43: 89 1c 24 mov %ebx,(%esp) 10dd46: e8 1d 0c 00 00 call 10e968 <_User_extensions_Thread_create> if ( extension_status ) 10dd4b: 83 c4 10 add $0x10,%esp 10dd4e: 84 c0 test %al,%al 10dd50: 0f 85 a2 00 00 00 jne 10ddf8 <_Thread_Initialize+0x1ec> return true; failed: if ( the_thread->libc_reent ) 10dd56: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10dd5c: 85 c0 test %eax,%eax 10dd5e: 74 0c je 10dd6c <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10dd60: 83 ec 0c sub $0xc,%esp 10dd63: 50 push %eax 10dd64: e8 5f 0f 00 00 call 10ecc8 <_Workspace_Free> 10dd69: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd6c: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10dd72: 85 c0 test %eax,%eax 10dd74: 74 0c je 10dd82 <_Thread_Initialize+0x176> _Workspace_Free( the_thread->API_Extensions[i] ); 10dd76: 83 ec 0c sub $0xc,%esp 10dd79: 50 push %eax 10dd7a: e8 49 0f 00 00 call 10ecc8 <_Workspace_Free> 10dd7f: 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] ) 10dd82: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10dd88: 85 c0 test %eax,%eax 10dd8a: 74 0c je 10dd98 <_Thread_Initialize+0x18c><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dd8c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd8f: 50 push %eax <== NOT EXECUTED 10dd90: e8 33 0f 00 00 call 10ecc8 <_Workspace_Free> <== NOT EXECUTED 10dd95: 83 c4 10 add $0x10,%esp <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd98: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10dd9e: 85 c0 test %eax,%eax 10dda0: 74 0c je 10ddae <_Thread_Initialize+0x1a2><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dda2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dda5: 50 push %eax <== NOT EXECUTED 10dda6: e8 1d 0f 00 00 call 10ecc8 <_Workspace_Free> <== NOT EXECUTED 10ddab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10ddae: 85 ff test %edi,%edi 10ddb0: 74 0c je 10ddbe <_Thread_Initialize+0x1b2> (void) _Workspace_Free( extensions_area ); 10ddb2: 83 ec 0c sub $0xc,%esp 10ddb5: 57 push %edi 10ddb6: e8 0d 0f 00 00 call 10ecc8 <_Workspace_Free> 10ddbb: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10ddbe: 8b 45 e0 mov -0x20(%ebp),%eax 10ddc1: 85 c0 test %eax,%eax 10ddc3: 74 0e je 10ddd3 <_Thread_Initialize+0x1c7> (void) _Workspace_Free( fp_area ); 10ddc5: 83 ec 0c sub $0xc,%esp 10ddc8: ff 75 e0 pushl -0x20(%ebp) 10ddcb: e8 f8 0e 00 00 call 10ecc8 <_Workspace_Free> 10ddd0: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ddd3: 83 ec 0c sub $0xc,%esp 10ddd6: 53 push %ebx 10ddd7: e8 f8 07 00 00 call 10e5d4 <_Thread_Stack_Free> 10dddc: 31 c0 xor %eax,%eax return false; 10ddde: 83 c4 10 add $0x10,%esp } 10dde1: 8d 65 f4 lea -0xc(%ebp),%esp 10dde4: 5b pop %ebx 10dde5: 5e pop %esi 10dde6: 5f pop %edi 10dde7: c9 leave 10dde8: c3 ret 10dde9: 8d 76 00 lea 0x0(%esi),%esi if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10ddec: 31 c0 xor %eax,%eax } 10ddee: 8d 65 f4 lea -0xc(%ebp),%esp 10ddf1: 5b pop %ebx 10ddf2: 5e pop %esi 10ddf3: 5f pop %edi 10ddf4: c9 leave 10ddf5: c3 ret 10ddf6: 66 90 xchg %ax,%ax * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10ddf8: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10ddfa: 8d 65 f4 lea -0xc(%ebp),%esp 10ddfd: 5b pop %ebx 10ddfe: 5e pop %esi 10ddff: 5f pop %edi 10de00: c9 leave 10de01: c3 ret 10de02: 66 90 xchg %ax,%ax /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10de04: 83 ec 0c sub $0xc,%esp 10de07: 6a 6c push $0x6c 10de09: e8 9e 0e 00 00 call 10ecac <_Workspace_Allocate> 10de0e: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10de11: 83 c4 10 add $0x10,%esp 10de14: 85 c0 test %eax,%eax 10de16: 74 55 je 10de6d <_Thread_Initialize+0x261> 10de18: 8b 45 e0 mov -0x20(%ebp),%eax 10de1b: e9 6c fe ff ff jmp 10dc8c <_Thread_Initialize+0x80> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10de20: 83 ec 0c sub $0xc,%esp 10de23: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10de2a: 50 push %eax 10de2b: e8 7c 0e 00 00 call 10ecac <_Workspace_Allocate> 10de30: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10de32: 83 c4 10 add $0x10,%esp 10de35: 85 c0 test %eax,%eax 10de37: 0f 84 19 ff ff ff je 10dd56 <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10de3d: 89 c1 mov %eax,%ecx 10de3f: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10de45: 8b 35 f8 73 12 00 mov 0x1273f8,%esi 10de4b: 31 d2 xor %edx,%edx 10de4d: 31 c0 xor %eax,%eax 10de4f: eb 09 jmp 10de5a <_Thread_Initialize+0x24e> 10de51: 8d 76 00 lea 0x0(%esi),%esi 10de54: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10de5a: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10de61: 40 inc %eax 10de62: 89 c2 mov %eax,%edx 10de64: 39 c6 cmp %eax,%esi 10de66: 73 ec jae 10de54 <_Thread_Initialize+0x248> 10de68: e9 60 fe ff ff jmp 10dccd <_Thread_Initialize+0xc1> * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10de6d: 31 ff xor %edi,%edi 10de6f: e9 e2 fe ff ff jmp 10dd56 <_Thread_Initialize+0x14a> =============================================================================== 00112bdc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 112bdc: 55 push %ebp 112bdd: 89 e5 mov %esp,%ebp 112bdf: 53 push %ebx 112be0: 83 ec 10 sub $0x10,%esp 112be3: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 112be6: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 112bed: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 112bf3: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 112bf6: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 112bfc: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 112bff: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 112c05: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 112c0b: 8b 45 0c mov 0xc(%ebp),%eax 112c0e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112c14: 8b 45 10 mov 0x10(%ebp),%eax 112c17: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112c1d: 53 push %ebx 112c1e: e8 79 c1 ff ff call 10ed9c <_Thread_queue_Extract_with_proxy> 112c23: 83 c4 10 add $0x10,%esp 112c26: 84 c0 test %al,%al 112c28: 75 06 jne 112c30 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112c2a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112c2e: 74 28 je 112c58 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112c30: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 112c36: 39 43 14 cmp %eax,0x14(%ebx) 112c39: 74 15 je 112c50 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112c3b: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c3e: 89 45 0c mov %eax,0xc(%ebp) 112c41: 89 5d 08 mov %ebx,0x8(%ebp) } } 112c44: 8b 5d fc mov -0x4(%ebp),%ebx 112c47: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c48: e9 1b c3 ff ff jmp 10ef68 <_Thread_Set_priority> 112c4d: 8d 76 00 lea 0x0(%esi),%esi } } 112c50: 8b 5d fc mov -0x4(%ebp),%ebx 112c53: c9 leave 112c54: c3 ret 112c55: 8d 76 00 lea 0x0(%esi),%esi the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 112c58: 83 ec 0c sub $0xc,%esp 112c5b: 8d 43 48 lea 0x48(%ebx),%eax 112c5e: 50 push %eax 112c5f: e8 38 cb ff ff call 10f79c <_Watchdog_Remove> 112c64: 83 c4 10 add $0x10,%esp 112c67: eb c7 jmp 112c30 <_Thread_Reset+0x54> =============================================================================== 00111f54 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111f54: 55 push %ebp 111f55: 89 e5 mov %esp,%ebp 111f57: 56 push %esi 111f58: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111f59: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 111f5e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111f64: 9c pushf 111f65: fa cli 111f66: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111f67: 8b 1a mov (%edx),%ebx 111f69: 3b 5a 08 cmp 0x8(%edx),%ebx 111f6c: 74 3e je 111fac <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111f6e: 8b 30 mov (%eax),%esi previous = the_node->previous; 111f70: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111f73: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111f76: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111f78: 8d 5a 04 lea 0x4(%edx),%ebx 111f7b: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111f7d: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111f80: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111f83: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111f85: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 111f88: 51 push %ecx 111f89: 9d popf 111f8a: fa cli if ( _Thread_Is_heir( executing ) ) 111f8b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111f91: 74 0d je 111fa0 <_Thread_Reset_timeslice+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 111f93: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 111f9a: 51 push %ecx 111f9b: 9d popf } 111f9c: 5b pop %ebx 111f9d: 5e pop %esi 111f9e: c9 leave 111f9f: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 111fa0: 8b 02 mov (%edx),%eax 111fa2: a3 e8 73 12 00 mov %eax,0x1273e8 111fa7: eb ea jmp 111f93 <_Thread_Reset_timeslice+0x3f> 111fa9: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 111fac: 51 push %ecx 111fad: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 111fae: 5b pop %ebx 111faf: 5e pop %esi 111fb0: c9 leave 111fb1: c3 ret =============================================================================== 00111738 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111738: 55 push %ebp 111739: 89 e5 mov %esp,%ebp 11173b: 53 push %ebx 11173c: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11173f: 9c pushf 111740: fa cli 111741: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 111742: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111745: f6 c2 02 test $0x2,%dl 111748: 74 6e je 1117b8 <_Thread_Resume+0x80> <== NEVER TAKEN 11174a: 83 e2 fd and $0xfffffffd,%edx current_state = 11174d: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111750: 85 d2 test %edx,%edx 111752: 75 64 jne 1117b8 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111754: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11175a: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111761: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111764: 66 8b 15 4c b9 12 00 mov 0x12b94c,%dx 11176b: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111771: 66 89 15 4c b9 12 00 mov %dx,0x12b94c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111778: 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); 11177e: 8d 5a 04 lea 0x4(%edx),%ebx 111781: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111783: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111786: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111789: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11178b: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11178e: 51 push %ecx 11178f: 9d popf 111790: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111791: 8b 50 14 mov 0x14(%eax),%edx 111794: 8b 1d 28 b9 12 00 mov 0x12b928,%ebx 11179a: 3b 53 14 cmp 0x14(%ebx),%edx 11179d: 73 19 jae 1117b8 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11179f: a3 28 b9 12 00 mov %eax,0x12b928 if ( _Thread_Executing->is_preemptible || 1117a4: a1 58 b9 12 00 mov 0x12b958,%eax 1117a9: 80 78 75 00 cmpb $0x0,0x75(%eax) 1117ad: 74 11 je 1117c0 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1117af: c6 05 68 b9 12 00 01 movb $0x1,0x12b968 1117b6: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1117b8: 51 push %ecx 1117b9: 9d popf } 1117ba: 5b pop %ebx 1117bb: c9 leave 1117bc: c3 ret 1117bd: 8d 76 00 lea 0x0(%esi),%esi _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1117c0: 85 d2 test %edx,%edx 1117c2: 74 eb je 1117af <_Thread_Resume+0x77> <== NEVER TAKEN 1117c4: eb f2 jmp 1117b8 <_Thread_Resume+0x80> =============================================================================== 0010e420 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e420: 55 push %ebp 10e421: 89 e5 mov %esp,%ebp 10e423: 56 push %esi 10e424: 53 push %ebx 10e425: 8b 45 08 mov 0x8(%ebp),%eax 10e428: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e42b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e431: 9c pushf 10e432: fa cli 10e433: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e434: 8b 58 10 mov 0x10(%eax),%ebx 10e437: 85 db test %ebx,%ebx 10e439: 75 2d jne 10e468 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e43b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e43e: 8b 1a mov (%edx),%ebx 10e440: 3b 5a 08 cmp 0x8(%edx),%ebx 10e443: 74 3b je 10e480 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e445: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e447: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e44a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e44d: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e44f: 51 push %ecx 10e450: 9d popf 10e451: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e452: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e458: 74 62 je 10e4bc <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e45a: 3b 05 18 74 12 00 cmp 0x127418,%eax 10e460: 74 12 je 10e474 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e462: 51 push %ecx 10e463: 9d popf } 10e464: 5b pop %ebx 10e465: 5e pop %esi 10e466: c9 leave 10e467: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e468: 09 f3 or %esi,%ebx 10e46a: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e46d: 51 push %ecx 10e46e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e46f: 5b pop %ebx 10e470: 5e pop %esi 10e471: c9 leave 10e472: c3 ret 10e473: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e474: c6 05 28 74 12 00 01 movb $0x1,0x127428 10e47b: eb e5 jmp 10e462 <_Thread_Set_state+0x42> 10e47d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e480: 8d 5a 04 lea 0x4(%edx),%ebx 10e483: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e485: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e48c: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e48f: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e495: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e49c: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10e49f: 66 83 3a 00 cmpw $0x0,(%edx) 10e4a3: 75 aa jne 10e44f <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e4a5: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10e4ac: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e4b2: 66 89 15 0c 74 12 00 mov %dx,0x12740c 10e4b9: eb 94 jmp 10e44f <_Thread_Set_state+0x2f> 10e4bb: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e4bc: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 10e4c3: 31 d2 xor %edx,%edx 10e4c5: 89 d3 mov %edx,%ebx 10e4c7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e4cb: 0f b7 db movzwl %bx,%ebx 10e4ce: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 10e4d5: 00 10e4d6: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e4da: c1 e3 04 shl $0x4,%ebx 10e4dd: 0f b7 d2 movzwl %dx,%edx 10e4e0: 8d 14 13 lea (%ebx,%edx,1),%edx 10e4e3: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e4e6: 8b 15 20 73 12 00 mov 0x127320,%edx 10e4ec: 8b 14 9a mov (%edx,%ebx,4),%edx 10e4ef: 89 15 e8 73 12 00 mov %edx,0x1273e8 10e4f5: e9 60 ff ff ff jmp 10e45a <_Thread_Set_state+0x3a> =============================================================================== 0010e570 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e570: 55 push %ebp 10e571: 89 e5 mov %esp,%ebp 10e573: 53 push %ebx 10e574: 83 ec 04 sub $0x4,%esp 10e577: a1 10 32 12 00 mov 0x123210,%eax 10e57c: 8b 5d 0c mov 0xc(%ebp),%ebx 10e57f: 39 c3 cmp %eax,%ebx 10e581: 73 02 jae 10e585 <_Thread_Stack_Allocate+0x15> 10e583: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10e585: a1 40 32 12 00 mov 0x123240,%eax 10e58a: 85 c0 test %eax,%eax 10e58c: 74 32 je 10e5c0 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e58e: 83 ec 0c sub $0xc,%esp 10e591: 53 push %ebx 10e592: ff d0 call *%eax 10e594: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e597: 85 c0 test %eax,%eax 10e599: 74 11 je 10e5ac <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e59b: 8b 55 08 mov 0x8(%ebp),%edx 10e59e: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5a4: 89 d8 mov %ebx,%eax 10e5a6: 8b 5d fc mov -0x4(%ebp),%ebx 10e5a9: c9 leave 10e5aa: c3 ret 10e5ab: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e5ac: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5ae: 8b 55 08 mov 0x8(%ebp),%edx 10e5b1: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5b7: 89 d8 mov %ebx,%eax 10e5b9: 8b 5d fc mov -0x4(%ebp),%ebx 10e5bc: c9 leave 10e5bd: c3 ret 10e5be: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e5c0: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10e5c3: 83 ec 0c sub $0xc,%esp 10e5c6: 53 push %ebx 10e5c7: e8 e0 06 00 00 call 10ecac <_Workspace_Allocate> 10e5cc: 83 c4 10 add $0x10,%esp 10e5cf: eb c6 jmp 10e597 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e5d4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e5d4: 55 push %ebp 10e5d5: 89 e5 mov %esp,%ebp 10e5d7: 83 ec 08 sub $0x8,%esp 10e5da: 8b 55 08 mov 0x8(%ebp),%edx * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10e5dd: a1 44 32 12 00 mov 0x123244,%eax 10e5e2: 85 c0 test %eax,%eax 10e5e4: 74 0e je 10e5f4 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e5e6: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e5ec: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e5ef: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e5f0: ff e0 jmp *%eax 10e5f2: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e5f4: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e5fa: 89 45 08 mov %eax,0x8(%ebp) } 10e5fd: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e5fe: e9 c5 06 00 00 jmp 10ecc8 <_Workspace_Free> =============================================================================== 00111fb4 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111fb4: 55 push %ebp 111fb5: 89 e5 mov %esp,%ebp 111fb7: 56 push %esi 111fb8: 53 push %ebx 111fb9: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111fbc: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111fc2: 9c pushf 111fc3: fa cli 111fc4: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111fc5: 8b 58 10 mov 0x10(%eax),%ebx 111fc8: 85 db test %ebx,%ebx 111fca: 75 34 jne 112000 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111fcc: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111fd3: 8b 1a mov (%edx),%ebx 111fd5: 3b 5a 08 cmp 0x8(%edx),%ebx 111fd8: 74 3e je 112018 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111fda: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111fdc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 111fdf: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 111fe2: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 111fe4: 51 push %ecx 111fe5: 9d popf 111fe6: fa cli if ( _Thread_Is_heir( the_thread ) ) 111fe7: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111fed: 74 65 je 112054 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 111fef: 3b 05 18 74 12 00 cmp 0x127418,%eax 111ff5: 74 15 je 11200c <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111ff7: 51 push %ecx 111ff8: 9d popf } 111ff9: 5b pop %ebx 111ffa: 5e pop %esi 111ffb: c9 leave 111ffc: c3 ret 111ffd: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 112000: 83 cb 02 or $0x2,%ebx 112003: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 112006: 51 push %ecx 112007: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 112008: 5b pop %ebx 112009: 5e pop %esi 11200a: c9 leave 11200b: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 11200c: c6 05 28 74 12 00 01 movb $0x1,0x127428 112013: eb e2 jmp 111ff7 <_Thread_Suspend+0x43> 112015: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 112018: 8d 5a 04 lea 0x4(%edx),%ebx 11201b: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 11201d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 112024: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 112027: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11202d: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 112034: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 112037: 66 83 3a 00 cmpw $0x0,(%edx) 11203b: 75 a7 jne 111fe4 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 11203d: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 112044: 23 90 98 00 00 00 and 0x98(%eax),%edx 11204a: 66 89 15 0c 74 12 00 mov %dx,0x12740c 112051: eb 91 jmp 111fe4 <_Thread_Suspend+0x30> 112053: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 112054: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 11205b: 31 d2 xor %edx,%edx 11205d: 89 d3 mov %edx,%ebx 11205f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112063: 0f b7 db movzwl %bx,%ebx 112066: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 11206d: 00 11206e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112072: c1 e3 04 shl $0x4,%ebx 112075: 0f b7 d2 movzwl %dx,%edx 112078: 8d 14 13 lea (%ebx,%edx,1),%edx 11207b: 8d 1c 52 lea (%edx,%edx,2),%ebx 11207e: 8b 15 20 73 12 00 mov 0x127320,%edx 112084: 8b 14 9a mov (%edx,%ebx,4),%edx 112087: 89 15 e8 73 12 00 mov %edx,0x1273e8 11208d: e9 5d ff ff ff jmp 111fef <_Thread_Suspend+0x3b> =============================================================================== 0010e700 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e700: 55 push %ebp 10e701: 89 e5 mov %esp,%ebp 10e703: 56 push %esi 10e704: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e705: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 10e70a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e710: 9c pushf 10e711: fa cli 10e712: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e713: 8b 1a mov (%edx),%ebx 10e715: 3b 5a 08 cmp 0x8(%edx),%ebx 10e718: 74 3e je 10e758 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e71a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e71c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e71f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e722: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e724: 8d 5a 04 lea 0x4(%edx),%ebx 10e727: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e729: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e72c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e72f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e731: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e734: 51 push %ecx 10e735: 9d popf 10e736: fa cli if ( _Thread_Is_heir( executing ) ) 10e737: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e73d: 74 0d je 10e74c <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e73f: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10e746: 51 push %ecx 10e747: 9d popf } 10e748: 5b pop %ebx 10e749: 5e pop %esi 10e74a: c9 leave 10e74b: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e74c: 8b 02 mov (%edx),%eax 10e74e: a3 e8 73 12 00 mov %eax,0x1273e8 10e753: eb ea jmp 10e73f <_Thread_Yield_processor+0x3f> 10e755: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e758: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e75e: 75 df jne 10e73f <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e760: eb e4 jmp 10e746 <_Thread_Yield_processor+0x46> =============================================================================== 0010df9c <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10df9c: 55 push %ebp 10df9d: 89 e5 mov %esp,%ebp 10df9f: 57 push %edi 10dfa0: 56 push %esi 10dfa1: 53 push %ebx 10dfa2: 83 ec 1c sub $0x1c,%esp 10dfa5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10dfa8: 9c pushf 10dfa9: fa cli 10dfaa: 58 pop %eax 10dfab: 89 f2 mov %esi,%edx 10dfad: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dfaf: 8d 5a 04 lea 0x4(%edx),%ebx 10dfb2: 39 1a cmp %ebx,(%edx) 10dfb4: 75 1a jne 10dfd0 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dfb6: 41 inc %ecx 10dfb7: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dfba: 83 f9 04 cmp $0x4,%ecx 10dfbd: 75 f0 jne 10dfaf <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dfbf: 50 push %eax 10dfc0: 9d popf 10dfc1: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dfc3: 89 d8 mov %ebx,%eax 10dfc5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfc8: 5b pop %ebx 10dfc9: 5e pop %esi 10dfca: 5f pop %edi 10dfcb: c9 leave 10dfcc: c3 ret 10dfcd: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10dfd0: 8d 14 49 lea (%ecx,%ecx,2),%edx 10dfd3: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dfd6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10dfdd: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dfe0: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dfe2: 8b 73 04 mov 0x4(%ebx),%esi 10dfe5: 8d 7b 3c lea 0x3c(%ebx),%edi 10dfe8: 39 fa cmp %edi,%edx 10dfea: 74 76 je 10e062 <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10dfec: 8b 7b 40 mov 0x40(%ebx),%edi 10dfef: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10dff2: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10dff4: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10dff6: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10dff9: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10dffb: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dffe: 8b 4b 38 mov 0x38(%ebx),%ecx 10e001: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e004: 74 14 je 10e01a <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e006: 8d 4a 38 lea 0x38(%edx),%ecx 10e009: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e00c: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e00f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e012: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e015: 83 c2 3c add $0x3c,%edx 10e018: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e01a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e01e: 74 18 je 10e038 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e020: 50 push %eax 10e021: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e022: 83 ec 08 sub $0x8,%esp 10e025: 68 f8 ff 03 10 push $0x1003fff8 10e02a: 53 push %ebx 10e02b: e8 98 f7 ff ff call 10d7c8 <_Thread_Clear_state> 10e030: 83 c4 10 add $0x10,%esp 10e033: eb 8e jmp 10dfc3 <_Thread_queue_Dequeue_priority+0x27> 10e035: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e038: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e03f: 50 push %eax 10e040: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e041: 83 ec 0c sub $0xc,%esp 10e044: 8d 43 48 lea 0x48(%ebx),%eax 10e047: 50 push %eax 10e048: e8 5b 0b 00 00 call 10eba8 <_Watchdog_Remove> 10e04d: 58 pop %eax 10e04e: 5a pop %edx 10e04f: 68 f8 ff 03 10 push $0x1003fff8 10e054: 53 push %ebx 10e055: e8 6e f7 ff ff call 10d7c8 <_Thread_Clear_state> 10e05a: 83 c4 10 add $0x10,%esp 10e05d: e9 61 ff ff ff jmp 10dfc3 <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10e062: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e064: 89 71 04 mov %esi,0x4(%ecx) 10e067: eb b1 jmp 10e01a <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 00111d38 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 111d38: 55 push %ebp 111d39: 89 e5 mov %esp,%ebp 111d3b: 56 push %esi 111d3c: 53 push %ebx 111d3d: 8b 55 08 mov 0x8(%ebp),%edx 111d40: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111d43: 9c pushf 111d44: fa cli 111d45: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111d46: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111d49: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111d50: 83 f8 01 cmp $0x1,%eax 111d53: 74 0b je 111d60 <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 111d55: 8b 55 10 mov 0x10(%ebp),%edx 111d58: 89 0a mov %ecx,(%edx) return sync_state; } 111d5a: 5b pop %ebx 111d5b: 5e pop %esi 111d5c: c9 leave 111d5d: c3 ret 111d5e: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111d60: 8d 72 04 lea 0x4(%edx),%esi 111d63: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111d65: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111d68: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111d6b: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111d6d: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 111d70: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111d73: 51 push %ecx 111d74: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111d75: 5b pop %ebx 111d76: 5e pop %esi 111d77: c9 leave 111d78: c3 ret =============================================================================== 0010e104 <_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 ) { 10e104: 55 push %ebp 10e105: 89 e5 mov %esp,%ebp 10e107: 57 push %edi 10e108: 56 push %esi 10e109: 53 push %ebx 10e10a: 83 ec 08 sub $0x8,%esp 10e10d: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e110: 8d 47 3c lea 0x3c(%edi),%eax 10e113: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e116: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e11d: 8d 47 38 lea 0x38(%edi),%eax 10e120: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10e123: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e126: 89 d0 mov %edx,%eax 10e128: c1 e8 06 shr $0x6,%eax 10e12b: 8d 04 40 lea (%eax,%eax,2),%eax 10e12e: 8b 4d 08 mov 0x8(%ebp),%ecx 10e131: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e134: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e137: f6 c2 20 test $0x20,%dl 10e13a: 75 60 jne 10e19c <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e13c: 8d 46 04 lea 0x4(%esi),%eax 10e13f: 89 75 f0 mov %esi,-0x10(%ebp) 10e142: 89 7d ec mov %edi,-0x14(%ebp) 10e145: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e147: 9c pushf 10e148: fa cli 10e149: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e14a: 8b 4d f0 mov -0x10(%ebp),%ecx 10e14d: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e14f: 39 f8 cmp %edi,%eax 10e151: 75 17 jne 10e16a <_Thread_queue_Enqueue_priority+0x66> 10e153: e9 09 01 00 00 jmp 10e261 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e158: 56 push %esi 10e159: 9d popf 10e15a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e15b: 85 58 10 test %ebx,0x10(%eax) 10e15e: 0f 84 a8 00 00 00 je 10e20c <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e164: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e166: 39 f8 cmp %edi,%eax 10e168: 74 07 je 10e171 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e16a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e16d: 39 ca cmp %ecx,%edx 10e16f: 77 e7 ja 10e158 <_Thread_queue_Enqueue_priority+0x54> 10e171: 89 4d f0 mov %ecx,-0x10(%ebp) 10e174: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e177: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e179: 8b 4d 08 mov 0x8(%ebp),%ecx 10e17c: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e180: 0f 84 8e 00 00 00 je 10e214 <_Thread_queue_Enqueue_priority+0x110> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10e186: 8b 45 10 mov 0x10(%ebp),%eax 10e189: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e18b: 8b 55 08 mov 0x8(%ebp),%edx 10e18e: 8b 42 30 mov 0x30(%edx),%eax } 10e191: 83 c4 08 add $0x8,%esp 10e194: 5b pop %ebx 10e195: 5e pop %esi 10e196: 5f pop %edi 10e197: c9 leave 10e198: c3 ret 10e199: 8d 76 00 lea 0x0(%esi),%esi 10e19c: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10e19f: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10e1a6: 41 inc %ecx _ISR_Disable( level ); 10e1a7: 9c pushf 10e1a8: fa cli 10e1a9: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e1aa: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1ad: 39 f0 cmp %esi,%eax 10e1af: 75 12 jne 10e1c3 <_Thread_queue_Enqueue_priority+0xbf> 10e1b1: eb 17 jmp 10e1ca <_Thread_queue_Enqueue_priority+0xc6> 10e1b3: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e1b4: 57 push %edi 10e1b5: 9d popf 10e1b6: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e1b7: 85 58 10 test %ebx,0x10(%eax) 10e1ba: 74 4c je 10e208 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e1bc: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1bf: 39 f0 cmp %esi,%eax 10e1c1: 74 07 je 10e1ca <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e1c3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e1c6: 39 ca cmp %ecx,%edx 10e1c8: 72 ea jb 10e1b4 <_Thread_queue_Enqueue_priority+0xb0> 10e1ca: 89 fe mov %edi,%esi 10e1cc: 89 4d ec mov %ecx,-0x14(%ebp) 10e1cf: 8b 7d f0 mov -0x10(%ebp),%edi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1d2: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e1d4: 8b 4d 08 mov 0x8(%ebp),%ecx 10e1d7: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e1db: 75 a9 jne 10e186 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e1dd: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e1e4: 3b 55 ec cmp -0x14(%ebp),%edx 10e1e7: 74 56 je 10e23f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e1e9: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e1eb: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e1ed: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e1f0: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e1f2: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e1f5: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e1f8: 56 push %esi 10e1f9: 9d popf 10e1fa: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e1ff: 83 c4 08 add $0x8,%esp 10e202: 5b pop %ebx 10e203: 5e pop %esi 10e204: 5f pop %edi 10e205: c9 leave 10e206: c3 ret 10e207: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e208: 57 push %edi 10e209: 9d popf goto restart_reverse_search; 10e20a: eb 93 jmp 10e19f <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e20c: 56 push %esi <== NOT EXECUTED 10e20d: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e20e: e9 34 ff ff ff jmp 10e147 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e213: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e214: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e21b: 3b 55 f0 cmp -0x10(%ebp),%edx 10e21e: 74 1f je 10e23f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e220: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e223: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e225: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e228: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e22a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e22d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e230: 56 push %esi 10e231: 9d popf 10e232: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e237: 83 c4 08 add $0x8,%esp 10e23a: 5b pop %ebx 10e23b: 5e pop %esi 10e23c: 5f pop %edi 10e23d: c9 leave 10e23e: c3 ret 10e23f: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10e242: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e245: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e247: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e24a: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e24c: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e24f: 8b 45 08 mov 0x8(%ebp),%eax 10e252: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e255: 53 push %ebx 10e256: 9d popf 10e257: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e25c: e9 30 ff ff ff jmp 10e191 <_Thread_queue_Enqueue_priority+0x8d> 10e261: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e264: 89 f3 mov %esi,%ebx 10e266: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e26d: e9 07 ff ff ff jmp 10e179 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00111d7c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111d7c: 55 push %ebp 111d7d: 89 e5 mov %esp,%ebp 111d7f: 83 ec 08 sub $0x8,%esp 111d82: 8b 45 08 mov 0x8(%ebp),%eax 111d85: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 111d88: 83 78 34 01 cmpl $0x1,0x34(%eax) 111d8c: 74 0e je 111d9c <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 111d8e: 89 55 0c mov %edx,0xc(%ebp) 111d91: 89 45 08 mov %eax,0x8(%ebp) } 111d94: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 111d95: e9 5a 1f 00 00 jmp 113cf4 <_Thread_queue_Extract_fifo> 111d9a: 66 90 xchg %ax,%ax /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 111d9c: 51 push %ecx 111d9d: 6a 00 push $0x0 111d9f: 52 push %edx 111da0: 50 push %eax 111da1: e8 06 00 00 00 call 111dac <_Thread_queue_Extract_priority_helper> 111da6: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111da9: c9 leave 111daa: c3 ret =============================================================================== 00113cf4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 113cf4: 55 push %ebp 113cf5: 89 e5 mov %esp,%ebp 113cf7: 53 push %ebx 113cf8: 83 ec 04 sub $0x4,%esp 113cfb: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 113cfe: 9c pushf 113cff: fa cli 113d00: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 113d01: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 113d08: 74 2e je 113d38 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 113d0a: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 113d0c: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 113d0f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 113d12: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 113d14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 113d1b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 113d1f: 74 1f je 113d40 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 113d21: 50 push %eax 113d22: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 113d23: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 113d2a: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d2d: 8b 5d fc mov -0x4(%ebp),%ebx 113d30: c9 leave 113d31: e9 92 9a ff ff jmp 10d7c8 <_Thread_Clear_state> 113d36: 66 90 xchg %ax,%ax ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 113d38: 50 push %eax 113d39: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d3a: 8b 5d fc mov -0x4(%ebp),%ebx 113d3d: c9 leave 113d3e: c3 ret 113d3f: 90 nop 113d40: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 113d47: 50 push %eax 113d48: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 113d49: 83 ec 0c sub $0xc,%esp 113d4c: 8d 43 48 lea 0x48(%ebx),%eax 113d4f: 50 push %eax 113d50: e8 53 ae ff ff call 10eba8 <_Watchdog_Remove> 113d55: 83 c4 10 add $0x10,%esp 113d58: eb c9 jmp 113d23 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00111dac <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 111dac: 55 push %ebp 111dad: 89 e5 mov %esp,%ebp 111daf: 57 push %edi 111db0: 56 push %esi 111db1: 53 push %ebx 111db2: 83 ec 1c sub $0x1c,%esp 111db5: 8b 5d 0c mov 0xc(%ebp),%ebx 111db8: 8a 45 10 mov 0x10(%ebp),%al 111dbb: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 111dbe: 9c pushf 111dbf: fa cli 111dc0: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111dc3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111dca: 74 6c je 111e38 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111dcc: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 111dce: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111dd1: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111dd4: 8d 73 3c lea 0x3c(%ebx),%esi 111dd7: 39 f0 cmp %esi,%eax 111dd9: 74 69 je 111e44 <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 111ddb: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 111dde: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 111de0: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 111de2: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111de5: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111de7: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111dea: 8b 53 38 mov 0x38(%ebx),%edx 111ded: 3b 53 40 cmp 0x40(%ebx),%edx 111df0: 74 11 je 111e03 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 111df2: 8d 50 38 lea 0x38(%eax),%edx 111df5: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111df8: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111dfb: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 111dfe: 83 c0 3c add $0x3c,%eax 111e01: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 111e03: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111e07: 75 23 jne 111e2c <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111e09: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111e0d: 74 3d je 111e4c <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 111e0f: ff 75 e4 pushl -0x1c(%ebp) 111e12: 9d popf 111e13: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111e1a: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e1d: 8d 65 f4 lea -0xc(%ebp),%esp 111e20: 5b pop %ebx 111e21: 5e pop %esi 111e22: 5f pop %edi 111e23: c9 leave 111e24: e9 9f b9 ff ff jmp 10d7c8 <_Thread_Clear_state> 111e29: 8d 76 00 lea 0x0(%esi),%esi /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 111e2c: ff 75 e4 pushl -0x1c(%ebp) 111e2f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e30: 8d 65 f4 lea -0xc(%ebp),%esp 111e33: 5b pop %ebx 111e34: 5e pop %esi 111e35: 5f pop %edi 111e36: c9 leave 111e37: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111e38: ff 75 e4 pushl -0x1c(%ebp) 111e3b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e3c: 8d 65 f4 lea -0xc(%ebp),%esp 111e3f: 5b pop %ebx 111e40: 5e pop %esi 111e41: 5f pop %edi 111e42: c9 leave 111e43: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 111e44: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111e46: 89 4a 04 mov %ecx,0x4(%edx) 111e49: eb b8 jmp 111e03 <_Thread_queue_Extract_priority_helper+0x57> 111e4b: 90 nop 111e4c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111e53: ff 75 e4 pushl -0x1c(%ebp) 111e56: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111e57: 83 ec 0c sub $0xc,%esp 111e5a: 8d 43 48 lea 0x48(%ebx),%eax 111e5d: 50 push %eax 111e5e: e8 45 cd ff ff call 10eba8 <_Watchdog_Remove> 111e63: 83 c4 10 add $0x10,%esp 111e66: eb ab jmp 111e13 <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e274 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e274: 55 push %ebp 10e275: 89 e5 mov %esp,%ebp 10e277: 83 ec 08 sub $0x8,%esp 10e27a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e27d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e284: 75 06 jne 10e28c <_Thread_queue_Extract_with_proxy+0x18> 10e286: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e288: c9 leave 10e289: c3 ret 10e28a: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e28c: 83 ec 08 sub $0x8,%esp 10e28f: 50 push %eax 10e290: ff 70 44 pushl 0x44(%eax) 10e293: e8 e4 3a 00 00 call 111d7c <_Thread_queue_Extract> 10e298: b0 01 mov $0x1,%al return true; 10e29a: 83 c4 10 add $0x10,%esp } return false; } 10e29d: c9 leave 10e29e: c3 ret =============================================================================== 0012049c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 12049c: 55 push %ebp 12049d: 89 e5 mov %esp,%ebp 12049f: 83 ec 08 sub $0x8,%esp 1204a2: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 1204a5: 83 78 34 01 cmpl $0x1,0x34(%eax) 1204a9: 74 0d je 1204b8 <_Thread_queue_First+0x1c> 1204ab: ba b8 20 12 00 mov $0x1220b8,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1204b0: 89 45 08 mov %eax,0x8(%ebp) } 1204b3: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1204b4: ff e2 jmp *%edx 1204b6: 66 90 xchg %ax,%ax Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 1204b8: ba c4 04 12 00 mov $0x1204c4,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1204bd: 89 45 08 mov %eax,0x8(%ebp) } 1204c0: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 1204c1: ff e2 jmp *%edx =============================================================================== 001220b8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1220b8: 55 push %ebp 1220b9: 89 e5 mov %esp,%ebp 1220bb: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1220be: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1220c0: 83 c2 04 add $0x4,%edx 1220c3: 39 d0 cmp %edx,%eax 1220c5: 74 05 je 1220cc <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1220c7: c9 leave 1220c8: c3 ret 1220c9: 8d 76 00 lea 0x0(%esi),%esi 1220cc: 31 c0 xor %eax,%eax 1220ce: c9 leave 1220cf: c3 ret =============================================================================== 0010e2a0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e2a0: 55 push %ebp 10e2a1: 89 e5 mov %esp,%ebp 10e2a3: 56 push %esi 10e2a4: 53 push %ebx 10e2a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10e2a8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2ab: eb 06 jmp 10e2b3 <_Thread_queue_Flush+0x13> 10e2ad: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10e2b0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2b3: 83 ec 0c sub $0xc,%esp 10e2b6: 53 push %ebx 10e2b7: e8 94 fc ff ff call 10df50 <_Thread_queue_Dequeue> 10e2bc: 83 c4 10 add $0x10,%esp 10e2bf: 85 c0 test %eax,%eax 10e2c1: 75 ed jne 10e2b0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e2c3: 8d 65 f8 lea -0x8(%ebp),%esp 10e2c6: 5b pop %ebx 10e2c7: 5e pop %esi 10e2c8: c9 leave 10e2c9: c3 ret =============================================================================== 00111e68 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111e68: 55 push %ebp 111e69: 89 e5 mov %esp,%ebp 111e6b: 83 ec 08 sub $0x8,%esp 111e6e: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111e71: 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 && 111e74: 8b 4a 30 mov 0x30(%edx),%ecx 111e77: 85 c9 test %ecx,%ecx 111e79: 74 08 je 111e83 <_Thread_queue_Process_timeout+0x1b> 111e7b: 3b 05 18 74 12 00 cmp 0x127418,%eax 111e81: 74 19 je 111e9c <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111e83: 8b 52 3c mov 0x3c(%edx),%edx 111e86: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111e89: 83 ec 08 sub $0x8,%esp 111e8c: 50 push %eax 111e8d: ff 70 44 pushl 0x44(%eax) 111e90: e8 e7 fe ff ff call 111d7c <_Thread_queue_Extract> 111e95: 83 c4 10 add $0x10,%esp } } 111e98: c9 leave 111e99: c3 ret 111e9a: 66 90 xchg %ax,%ax * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 111e9c: 83 f9 03 cmp $0x3,%ecx 111e9f: 74 f7 je 111e98 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111ea1: 8b 4a 3c mov 0x3c(%edx),%ecx 111ea4: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111ea7: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 111eae: c9 leave 111eaf: c3 ret =============================================================================== 0010e31c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e31c: 55 push %ebp 10e31d: 89 e5 mov %esp,%ebp 10e31f: 57 push %edi 10e320: 56 push %esi 10e321: 53 push %ebx 10e322: 83 ec 1c sub $0x1c,%esp 10e325: 8b 75 08 mov 0x8(%ebp),%esi 10e328: 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 ) 10e32b: 85 f6 test %esi,%esi 10e32d: 74 06 je 10e335 <_Thread_queue_Requeue+0x19><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10e32f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e333: 74 0b je 10e340 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10e335: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e338: 5b pop %ebx <== NOT EXECUTED 10e339: 5e pop %esi <== NOT EXECUTED 10e33a: 5f pop %edi <== NOT EXECUTED 10e33b: c9 leave <== NOT EXECUTED 10e33c: c3 ret <== NOT EXECUTED 10e33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10e340: 9c pushf 10e341: fa cli 10e342: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e343: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e34a: 75 0c jne 10e358 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10e34c: 53 push %ebx 10e34d: 9d popf } } 10e34e: 8d 65 f4 lea -0xc(%ebp),%esp 10e351: 5b pop %ebx 10e352: 5e pop %esi 10e353: 5f pop %edi 10e354: c9 leave 10e355: c3 ret 10e356: 66 90 xchg %ax,%ax 10e358: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10e35f: 50 push %eax 10e360: 6a 01 push $0x1 10e362: 57 push %edi 10e363: 56 push %esi 10e364: e8 43 3a 00 00 call 111dac <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e369: 83 c4 0c add $0xc,%esp 10e36c: 8d 45 e4 lea -0x1c(%ebp),%eax 10e36f: 50 push %eax 10e370: 57 push %edi 10e371: 56 push %esi 10e372: e8 8d fd ff ff call 10e104 <_Thread_queue_Enqueue_priority> 10e377: 83 c4 10 add $0x10,%esp 10e37a: eb d0 jmp 10e34c <_Thread_queue_Requeue+0x30> =============================================================================== 0010e37c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e37c: 55 push %ebp 10e37d: 89 e5 mov %esp,%ebp 10e37f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e382: 8d 45 f4 lea -0xc(%ebp),%eax 10e385: 50 push %eax 10e386: ff 75 08 pushl 0x8(%ebp) 10e389: e8 06 f8 ff ff call 10db94 <_Thread_Get> switch ( location ) { 10e38e: 83 c4 10 add $0x10,%esp 10e391: 8b 55 f4 mov -0xc(%ebp),%edx 10e394: 85 d2 test %edx,%edx 10e396: 75 17 jne 10e3af <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e398: 83 ec 0c sub $0xc,%esp 10e39b: 50 push %eax 10e39c: e8 c7 3a 00 00 call 111e68 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3a1: a1 58 73 12 00 mov 0x127358,%eax 10e3a6: 48 dec %eax 10e3a7: a3 58 73 12 00 mov %eax,0x127358 10e3ac: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e3af: c9 leave 10e3b0: c3 ret =============================================================================== 0011982c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11982c: 55 push %ebp 11982d: 89 e5 mov %esp,%ebp 11982f: 57 push %edi 119830: 56 push %esi 119831: 53 push %ebx 119832: 83 ec 4c sub $0x4c,%esp 119835: 8b 5d 08 mov 0x8(%ebp),%ebx 119838: 8d 45 e0 lea -0x20(%ebp),%eax 11983b: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11983e: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 119841: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119848: 8d 4d dc lea -0x24(%ebp),%ecx 11984b: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11984e: 8d 7d d0 lea -0x30(%ebp),%edi 119851: 8d 45 d4 lea -0x2c(%ebp),%eax 119854: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119857: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 11985a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 119861: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119864: 8d 73 30 lea 0x30(%ebx),%esi /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119867: 8d 4b 68 lea 0x68(%ebx),%ecx 11986a: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 11986d: 8d 43 08 lea 0x8(%ebx),%eax 119870: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 119873: 8d 53 40 lea 0x40(%ebx),%edx 119876: 89 55 c0 mov %edx,-0x40(%ebp) 119879: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 11987c: 8d 4d dc lea -0x24(%ebp),%ecx 11987f: 89 4b 78 mov %ecx,0x78(%ebx) 119882: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 119884: a1 44 2d 14 00 mov 0x142d44,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119889: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 11988c: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988f: 51 push %ecx 119890: 57 push %edi 119891: 29 d0 sub %edx,%eax 119893: 50 push %eax 119894: 56 push %esi 119895: e8 e2 3a 00 00 call 11d37c <_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(); 11989a: a1 6c 2c 14 00 mov 0x142c6c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989f: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 1198a2: 83 c4 10 add $0x10,%esp 1198a5: 39 d0 cmp %edx,%eax 1198a7: 77 63 ja 11990c <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 1198a9: 72 7d jb 119928 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198ab: 89 43 74 mov %eax,0x74(%ebx) 1198ae: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1198b0: 8b 43 78 mov 0x78(%ebx),%eax 1198b3: 83 ec 0c sub $0xc,%esp 1198b6: 50 push %eax 1198b7: e8 50 08 00 00 call 11a10c <_Chain_Get> if ( timer == NULL ) { 1198bc: 83 c4 10 add $0x10,%esp 1198bf: 85 c0 test %eax,%eax 1198c1: 74 35 je 1198f8 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1198c3: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1198c6: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1198c9: 74 19 je 1198e4 <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1198cb: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1198ce: 75 e0 jne 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198d0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198d3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198d6: 50 push %eax <== NOT EXECUTED 1198d7: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1198da: e8 35 3b 00 00 call 11d414 <_Watchdog_Insert> <== NOT EXECUTED 1198df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198e2: eb cc jmp 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1198e4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198e7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198ea: 50 push %eax <== NOT EXECUTED 1198eb: 56 push %esi <== NOT EXECUTED 1198ec: e8 23 3b 00 00 call 11d414 <_Watchdog_Insert> <== NOT EXECUTED 1198f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198f4: eb ba jmp 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED 1198f6: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 1198f8: 9c pushf 1198f9: fa cli 1198fa: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198fb: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fe: 3b 55 dc cmp -0x24(%ebp),%edx 119901: 74 41 je 119944 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 119903: 50 push %eax <== NOT EXECUTED 119904: 9d popf <== NOT EXECUTED 119905: e9 7a ff ff ff jmp 119884 <_Timer_server_Body+0x58><== NOT EXECUTED 11990a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11990c: 51 push %ecx 11990d: 57 push %edi 11990e: 89 c1 mov %eax,%ecx 119910: 29 d1 sub %edx,%ecx 119912: 51 push %ecx 119913: ff 75 c4 pushl -0x3c(%ebp) 119916: 89 45 b8 mov %eax,-0x48(%ebp) 119919: e8 5e 3a 00 00 call 11d37c <_Watchdog_Adjust_to_chain> 11991e: 83 c4 10 add $0x10,%esp 119921: 8b 45 b8 mov -0x48(%ebp),%eax 119924: eb 85 jmp 1198ab <_Timer_server_Body+0x7f> 119926: 66 90 xchg %ax,%ax /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 119928: 51 push %ecx 119929: 29 c2 sub %eax,%edx 11992b: 52 push %edx 11992c: 6a 01 push $0x1 11992e: ff 75 c4 pushl -0x3c(%ebp) 119931: 89 45 b8 mov %eax,-0x48(%ebp) 119934: e8 cb 39 00 00 call 11d304 <_Watchdog_Adjust> 119939: 83 c4 10 add $0x10,%esp 11993c: 8b 45 b8 mov -0x48(%ebp),%eax 11993f: e9 67 ff ff ff jmp 1198ab <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119944: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11994b: 50 push %eax 11994c: 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 ) ) { 11994d: 8b 4d b0 mov -0x50(%ebp),%ecx 119950: 3b 4d d0 cmp -0x30(%ebp),%ecx 119953: 75 23 jne 119978 <_Timer_server_Body+0x14c> 119955: eb 33 jmp 11998a <_Timer_server_Body+0x15e> 119957: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119958: 8b 10 mov (%eax),%edx the_chain->first = new_first; 11995a: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11995d: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 119960: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119967: 51 push %ecx 119968: 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 ); 119969: 83 ec 08 sub $0x8,%esp 11996c: ff 70 24 pushl 0x24(%eax) 11996f: ff 70 20 pushl 0x20(%eax) 119972: ff 50 1c call *0x1c(%eax) } 119975: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 119978: 9c pushf 119979: fa cli 11997a: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11997b: 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)) 11997e: 39 45 b0 cmp %eax,-0x50(%ebp) 119981: 75 d5 jne 119958 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 119983: 51 push %ecx 119984: 9d popf 119985: e9 f2 fe ff ff jmp 11987c <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11998a: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998e: a1 d8 2b 14 00 mov 0x142bd8,%eax 119993: 40 inc %eax 119994: a3 d8 2b 14 00 mov %eax,0x142bd8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119999: 83 ec 08 sub $0x8,%esp 11999c: 6a 08 push $0x8 11999e: ff 33 pushl (%ebx) 1199a0: e8 a7 31 00 00 call 11cb4c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a5: 89 d8 mov %ebx,%eax 1199a7: e8 e0 fd ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199ac: 89 d8 mov %ebx,%eax 1199ae: e8 29 fe ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199b3: e8 9c 27 00 00 call 11c154 <_Thread_Enable_dispatch> ts->active = true; 1199b8: 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 ); 1199bc: 58 pop %eax 1199bd: ff 75 bc pushl -0x44(%ebp) 1199c0: e8 87 3b 00 00 call 11d54c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c5: 59 pop %ecx 1199c6: ff 75 c0 pushl -0x40(%ebp) 1199c9: e8 7e 3b 00 00 call 11d54c <_Watchdog_Remove> 1199ce: 83 c4 10 add $0x10,%esp 1199d1: e9 a6 fe ff ff jmp 11987c <_Timer_server_Body+0x50> =============================================================================== 001199d8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d8: 55 push %ebp 1199d9: 89 e5 mov %esp,%ebp 1199db: 57 push %edi 1199dc: 56 push %esi 1199dd: 53 push %ebx 1199de: 83 ec 2c sub $0x2c,%esp 1199e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e4: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e7: 8b 53 78 mov 0x78(%ebx),%edx 1199ea: 85 d2 test %edx,%edx 1199ec: 74 16 je 119a04 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1199ee: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1199f1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1199f4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1199f7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199fa: 5b pop %ebx <== NOT EXECUTED 1199fb: 5e pop %esi <== NOT EXECUTED 1199fc: 5f pop %edi <== NOT EXECUTED 1199fd: 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 ); 1199fe: e9 cd 06 00 00 jmp 11a0d0 <_Chain_Append> <== NOT EXECUTED 119a03: 90 nop <== NOT EXECUTED 119a04: 8b 15 d8 2b 14 00 mov 0x142bd8,%edx 119a0a: 42 inc %edx 119a0b: 89 15 d8 2b 14 00 mov %edx,0x142bd8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a11: 8b 50 38 mov 0x38(%eax),%edx 119a14: 83 fa 01 cmp $0x1,%edx 119a17: 74 77 je 119a90 <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 119a19: 83 fa 03 cmp $0x3,%edx 119a1c: 74 0e je 119a2c <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 119a1e: 8d 65 f4 lea -0xc(%ebp),%esp 119a21: 5b pop %ebx 119a22: 5e pop %esi 119a23: 5f pop %edi 119a24: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a25: e9 2a 27 00 00 jmp 11c154 <_Thread_Enable_dispatch> 119a2a: 66 90 xchg %ax,%ax } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a2c: 9c pushf 119a2d: fa cli 119a2e: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a31: 8b 0d 6c 2c 14 00 mov 0x142c6c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a37: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a3a: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a3d: 8d 7b 6c lea 0x6c(%ebx),%edi 119a40: 39 fa cmp %edi,%edx 119a42: 74 22 je 119a66 <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119a44: 8b 7a 10 mov 0x10(%edx),%edi 119a47: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a4a: 39 f1 cmp %esi,%ecx 119a4c: 0f 86 9e 00 00 00 jbe 119af0 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a52: 89 cf mov %ecx,%edi 119a54: 29 f7 sub %esi,%edi 119a56: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a58: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a5b: 0f 87 9b 00 00 00 ja 119afc <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a61: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119a63: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a66: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a69: ff 75 e4 pushl -0x1c(%ebp) 119a6c: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a6d: 83 ec 08 sub $0x8,%esp 119a70: 83 c0 10 add $0x10,%eax 119a73: 50 push %eax 119a74: 8d 43 68 lea 0x68(%ebx),%eax 119a77: 50 push %eax 119a78: e8 97 39 00 00 call 11d414 <_Watchdog_Insert> if ( !ts->active ) { 119a7d: 8a 43 7c mov 0x7c(%ebx),%al 119a80: 83 c4 10 add $0x10,%esp 119a83: 84 c0 test %al,%al 119a85: 75 97 jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a87: 89 d8 mov %ebx,%eax 119a89: e8 4e fd ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> 119a8e: eb 8e jmp 119a1e <_Timer_server_Schedule_operation_method+0x46> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a90: 9c pushf 119a91: fa cli 119a92: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a95: 8b 0d 44 2d 14 00 mov 0x142d44,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a9b: 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)); 119a9e: 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; 119aa1: 8d 7b 34 lea 0x34(%ebx),%edi 119aa4: 39 fa cmp %edi,%edx 119aa6: 74 12 je 119aba <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa8: 89 cf mov %ecx,%edi 119aaa: 29 f7 sub %esi,%edi 119aac: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aae: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119ab1: 39 fe cmp %edi,%esi 119ab3: 72 37 jb 119aec <_Timer_server_Schedule_operation_method+0x114> 119ab5: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab7: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119aba: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119abd: ff 75 e4 pushl -0x1c(%ebp) 119ac0: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119ac1: 83 ec 08 sub $0x8,%esp 119ac4: 83 c0 10 add $0x10,%eax 119ac7: 50 push %eax 119ac8: 8d 43 30 lea 0x30(%ebx),%eax 119acb: 50 push %eax 119acc: e8 43 39 00 00 call 11d414 <_Watchdog_Insert> if ( !ts->active ) { 119ad1: 8a 43 7c mov 0x7c(%ebx),%al 119ad4: 83 c4 10 add $0x10,%esp 119ad7: 84 c0 test %al,%al 119ad9: 0f 85 3f ff ff ff jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adf: 89 d8 mov %ebx,%eax 119ae1: e8 a6 fc ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> 119ae6: e9 33 ff ff ff jmp 119a1e <_Timer_server_Schedule_operation_method+0x46> 119aeb: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119aec: 29 f7 sub %esi,%edi 119aee: eb c7 jmp 119ab7 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119af0: 8b 7d d4 mov -0x2c(%ebp),%edi 119af3: 01 f7 add %esi,%edi delta_interval += delta; 119af5: 29 cf sub %ecx,%edi 119af7: e9 67 ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119afc: 8b 7d d4 mov -0x2c(%ebp),%edi 119aff: 29 f7 sub %esi,%edi 119b01: e9 5d ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 0010f3cc <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10f3cc: 55 push %ebp 10f3cd: 89 e5 mov %esp,%ebp 10f3cf: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10f3d2: 85 c0 test %eax,%eax 10f3d4: 74 1a je 10f3f0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10f3d6: 8b 10 mov (%eax),%edx 10f3d8: 85 d2 test %edx,%edx 10f3da: 78 14 js 10f3f0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10f3dc: 8b 40 04 mov 0x4(%eax),%eax 10f3df: 85 c0 test %eax,%eax 10f3e1: 78 0d js 10f3f0 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10f3e3: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10f3e8: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10f3eb: c9 leave 10f3ec: c3 ret 10f3ed: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 10f3f0: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10f3f2: c9 leave 10f3f3: c3 ret =============================================================================== 0010f430 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10f430: 55 push %ebp 10f431: 89 e5 mov %esp,%ebp 10f433: 56 push %esi 10f434: 53 push %ebx 10f435: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10f438: 8b 33 mov (%ebx),%esi 10f43a: 85 f6 test %esi,%esi 10f43c: 75 07 jne 10f445 <_Timespec_To_ticks+0x15> 10f43e: 8b 43 04 mov 0x4(%ebx),%eax 10f441: 85 c0 test %eax,%eax 10f443: 74 37 je 10f47c <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10f445: e8 c6 31 00 00 call 112610 10f44a: 89 c1 mov %eax,%ecx 10f44c: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10f44f: a1 2c 52 12 00 mov 0x12522c,%eax 10f454: 8d 04 80 lea (%eax,%eax,4),%eax 10f457: 8d 04 80 lea (%eax,%eax,4),%eax 10f45a: 8d 34 80 lea (%eax,%eax,4),%esi 10f45d: c1 e6 03 shl $0x3,%esi 10f460: 8b 43 04 mov 0x4(%ebx),%eax 10f463: 31 d2 xor %edx,%edx 10f465: f7 f6 div %esi if (ticks) 10f467: 01 c8 add %ecx,%eax 10f469: 74 05 je 10f470 <_Timespec_To_ticks+0x40> return ticks; return 1; } 10f46b: 5b pop %ebx 10f46c: 5e pop %esi 10f46d: c9 leave 10f46e: c3 ret 10f46f: 90 nop ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 10f470: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 10f475: 5b pop %ebx 10f476: 5e pop %esi 10f477: c9 leave 10f478: c3 ret 10f479: 8d 76 00 lea 0x0(%esi),%esi const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10f47c: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10f47e: 5b pop %ebx 10f47f: 5e pop %esi 10f480: c9 leave 10f481: c3 ret =============================================================================== 0010e918 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e918: 55 push %ebp 10e919: 89 e5 mov %esp,%ebp 10e91b: 57 push %edi 10e91c: 56 push %esi 10e91d: 53 push %ebx 10e91e: 83 ec 1c sub $0x1c,%esp 10e921: 8b 75 08 mov 0x8(%ebp),%esi 10e924: 8b 7d 10 mov 0x10(%ebp),%edi 10e927: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e92a: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e930: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e936: 74 25 je 10e95d <_User_extensions_Fatal+0x45><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e938: 0f b6 c0 movzbl %al,%eax 10e93b: 89 45 e4 mov %eax,-0x1c(%ebp) 10e93e: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e940: 8b 43 30 mov 0x30(%ebx),%eax 10e943: 85 c0 test %eax,%eax 10e945: 74 0b je 10e952 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e947: 52 push %edx 10e948: 57 push %edi 10e949: ff 75 e4 pushl -0x1c(%ebp) 10e94c: 56 push %esi 10e94d: ff d0 call *%eax 10e94f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e952: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e955: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e95b: 75 e3 jne 10e940 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e95d: 8d 65 f4 lea -0xc(%ebp),%esp 10e960: 5b pop %ebx 10e961: 5e pop %esi 10e962: 5f pop %edi 10e963: c9 leave 10e964: c3 ret =============================================================================== 0010e7dc <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e7dc: 55 push %ebp 10e7dd: 89 e5 mov %esp,%ebp 10e7df: 57 push %edi 10e7e0: 56 push %esi 10e7e1: 53 push %ebx 10e7e2: 83 ec 1c sub $0x1c,%esp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 10e7e5: a1 58 32 12 00 mov 0x123258,%eax 10e7ea: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e7ed: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e7f3: c7 05 ac 75 12 00 b0 movl $0x1275b0,0x1275ac 10e7fa: 75 12 00 the_chain->permanent_null = NULL; 10e7fd: c7 05 b0 75 12 00 00 movl $0x0,0x1275b0 10e804: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e807: c7 05 b4 75 12 00 ac movl $0x1275ac,0x1275b4 10e80e: 75 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e811: c7 05 5c 73 12 00 60 movl $0x127360,0x12735c 10e818: 73 12 00 the_chain->permanent_null = NULL; 10e81b: c7 05 60 73 12 00 00 movl $0x0,0x127360 10e822: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e825: c7 05 64 73 12 00 5c movl $0x12735c,0x127364 10e82c: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e82f: 85 f6 test %esi,%esi 10e831: 74 64 je 10e897 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e833: 89 c2 mov %eax,%edx 10e835: 8d 04 40 lea (%eax,%eax,2),%eax 10e838: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e83b: c1 e1 02 shl $0x2,%ecx 10e83e: 83 ec 0c sub $0xc,%esp 10e841: 51 push %ecx 10e842: 89 4d d8 mov %ecx,-0x28(%ebp) 10e845: e8 36 04 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10e84a: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e84c: 31 c0 xor %eax,%eax 10e84e: 8b 4d d8 mov -0x28(%ebp),%ecx 10e851: 89 df mov %ebx,%edi 10e853: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e855: 83 c4 10 add $0x10,%esp 10e858: 8b 45 dc mov -0x24(%ebp),%eax 10e85b: 85 c0 test %eax,%eax 10e85d: 74 38 je 10e897 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e85f: 89 75 e4 mov %esi,-0x1c(%ebp) 10e862: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e869: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e86c: 8d 7b 14 lea 0x14(%ebx),%edi 10e86f: 8b 75 e4 mov -0x1c(%ebp),%esi 10e872: b9 08 00 00 00 mov $0x8,%ecx 10e877: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e879: 83 ec 0c sub $0xc,%esp 10e87c: 53 push %ebx 10e87d: e8 12 38 00 00 call 112094 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e882: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e885: ff 45 e0 incl -0x20(%ebp) 10e888: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e88c: 83 c4 10 add $0x10,%esp 10e88f: 8b 45 e0 mov -0x20(%ebp),%eax 10e892: 39 45 dc cmp %eax,-0x24(%ebp) 10e895: 77 d5 ja 10e86c <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e897: 8d 65 f4 lea -0xc(%ebp),%esp 10e89a: 5b pop %ebx 10e89b: 5e pop %esi 10e89c: 5f pop %edi 10e89d: c9 leave 10e89e: c3 ret =============================================================================== 0010fe50 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10fe50: 55 push %ebp 10fe51: 89 e5 mov %esp,%ebp 10fe53: 53 push %ebx 10fe54: 83 ec 10 sub $0x10,%esp 10fe57: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10fe5a: 53 push %ebx 10fe5b: e8 a4 da ff ff call 10d904 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10fe60: 83 c4 10 add $0x10,%esp 10fe63: 8b 43 24 mov 0x24(%ebx),%eax 10fe66: 85 c0 test %eax,%eax 10fe68: 74 12 je 10fe7c <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10fe6a: 83 c3 08 add $0x8,%ebx 10fe6d: 89 5d 08 mov %ebx,0x8(%ebp) } 10fe70: 8b 5d fc mov -0x4(%ebp),%ebx 10fe73: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10fe74: e9 8b da ff ff jmp 10d904 <_Chain_Extract> 10fe79: 8d 76 00 lea 0x0(%esi),%esi } 10fe7c: 8b 5d fc mov -0x4(%ebp),%ebx 10fe7f: c9 leave 10fe80: c3 ret =============================================================================== 0010e8a0 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e8a0: 55 push %ebp 10e8a1: 89 e5 mov %esp,%ebp 10e8a3: 56 push %esi 10e8a4: 53 push %ebx 10e8a5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8a8: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e8ae: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8b4: 74 1c je 10e8d2 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e8b6: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e8b8: 8b 43 28 mov 0x28(%ebx),%eax 10e8bb: 85 c0 test %eax,%eax 10e8bd: 74 09 je 10e8c8 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e8bf: 83 ec 0c sub $0xc,%esp 10e8c2: 56 push %esi 10e8c3: ff d0 call *%eax 10e8c5: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e8c8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8ca: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8d0: 75 e6 jne 10e8b8 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e8d2: 8d 65 f8 lea -0x8(%ebp),%esp 10e8d5: 5b pop %ebx 10e8d6: 5e pop %esi 10e8d7: c9 leave 10e8d8: c3 ret =============================================================================== 0010e968 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e968: 55 push %ebp 10e969: 89 e5 mov %esp,%ebp 10e96b: 56 push %esi 10e96c: 53 push %ebx 10e96d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e970: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e976: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e97c: 74 26 je 10e9a4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e97e: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e980: 8b 43 14 mov 0x14(%ebx),%eax 10e983: 85 c0 test %eax,%eax 10e985: 74 13 je 10e99a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e987: 83 ec 08 sub $0x8,%esp 10e98a: 56 push %esi 10e98b: ff 35 18 74 12 00 pushl 0x127418 10e991: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e993: 83 c4 10 add $0x10,%esp 10e996: 84 c0 test %al,%al 10e998: 74 0c je 10e9a6 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e99a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e99c: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e9a2: 75 dc jne 10e980 <_User_extensions_Thread_create+0x18> 10e9a4: b0 01 mov $0x1,%al return false; } } return true; } 10e9a6: 8d 65 f8 lea -0x8(%ebp),%esp 10e9a9: 5b pop %ebx 10e9aa: 5e pop %esi 10e9ab: c9 leave 10e9ac: c3 ret =============================================================================== 0010e9b0 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e9b0: 55 push %ebp 10e9b1: 89 e5 mov %esp,%ebp 10e9b3: 56 push %esi 10e9b4: 53 push %ebx 10e9b5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9b8: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e9be: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9c4: 74 23 je 10e9e9 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e9c6: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e9c8: 8b 43 20 mov 0x20(%ebx),%eax 10e9cb: 85 c0 test %eax,%eax 10e9cd: 74 0f je 10e9de <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e9cf: 83 ec 08 sub $0x8,%esp 10e9d2: 56 push %esi 10e9d3: ff 35 18 74 12 00 pushl 0x127418 10e9d9: ff d0 call *%eax 10e9db: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e9de: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9e1: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9e7: 75 df jne 10e9c8 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e9e9: 8d 65 f8 lea -0x8(%ebp),%esp 10e9ec: 5b pop %ebx 10e9ed: 5e pop %esi 10e9ee: c9 leave 10e9ef: c3 ret =============================================================================== 0010e8dc <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e8dc: 55 push %ebp 10e8dd: 89 e5 mov %esp,%ebp 10e8df: 56 push %esi 10e8e0: 53 push %ebx 10e8e1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e8e4: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e8ea: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e8f0: 74 1d je 10e90f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e8f2: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e8f4: 8b 43 2c mov 0x2c(%ebx),%eax 10e8f7: 85 c0 test %eax,%eax 10e8f9: 74 09 je 10e904 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e8fb: 83 ec 0c sub $0xc,%esp 10e8fe: 56 push %esi 10e8ff: ff d0 call *%eax 10e901: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e904: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e907: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e90d: 75 e5 jne 10e8f4 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e90f: 8d 65 f8 lea -0x8(%ebp),%esp 10e912: 5b pop %ebx 10e913: 5e pop %esi 10e914: c9 leave 10e915: c3 ret =============================================================================== 0010f5a4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f5a4: 55 push %ebp 10f5a5: 89 e5 mov %esp,%ebp 10f5a7: 56 push %esi 10f5a8: 53 push %ebx 10f5a9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5ac: 8b 1d 0c 96 12 00 mov 0x12960c,%ebx 10f5b2: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5b8: 74 22 je 10f5dc <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f5ba: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10f5bc: 8b 43 1c mov 0x1c(%ebx),%eax 10f5bf: 85 c0 test %eax,%eax 10f5c1: 74 0f je 10f5d2 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f5c3: 83 ec 08 sub $0x8,%esp 10f5c6: 56 push %esi 10f5c7: ff 35 78 94 12 00 pushl 0x129478 10f5cd: ff d0 call *%eax 10f5cf: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f5d2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5d4: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5da: 75 e0 jne 10f5bc <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10f5df: 5b pop %ebx 10f5e0: 5e pop %esi 10f5e1: c9 leave 10f5e2: c3 ret =============================================================================== 0010e9f0 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e9f0: 55 push %ebp 10e9f1: 89 e5 mov %esp,%ebp 10e9f3: 56 push %esi 10e9f4: 53 push %ebx 10e9f5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e9f8: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e9fe: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea04: 74 22 je 10ea28 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10ea06: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10ea08: 8b 43 18 mov 0x18(%ebx),%eax 10ea0b: 85 c0 test %eax,%eax 10ea0d: 74 0f je 10ea1e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10ea0f: 83 ec 08 sub $0x8,%esp 10ea12: 56 push %esi 10ea13: ff 35 18 74 12 00 pushl 0x127418 10ea19: ff d0 call *%eax 10ea1b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10ea1e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea20: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea26: 75 e0 jne 10ea08 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10ea28: 8d 65 f8 lea -0x8(%ebp),%esp 10ea2b: 5b pop %ebx 10ea2c: 5e pop %esi 10ea2d: c9 leave 10ea2e: c3 ret =============================================================================== 0010ea30 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10ea30: 55 push %ebp 10ea31: 89 e5 mov %esp,%ebp 10ea33: 57 push %edi 10ea34: 56 push %esi 10ea35: 53 push %ebx 10ea36: 83 ec 0c sub $0xc,%esp 10ea39: 8b 7d 08 mov 0x8(%ebp),%edi 10ea3c: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea3f: 8b 1d 5c 73 12 00 mov 0x12735c,%ebx 10ea45: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea4b: 74 18 je 10ea65 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ea4d: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10ea50: 83 ec 08 sub $0x8,%esp 10ea53: 56 push %esi 10ea54: 57 push %edi 10ea55: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10ea58: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea5a: 83 c4 10 add $0x10,%esp 10ea5d: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea63: 75 eb jne 10ea50 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ea65: 8d 65 f4 lea -0xc(%ebp),%esp 10ea68: 5b pop %ebx 10ea69: 5e pop %esi 10ea6a: 5f pop %edi 10ea6b: c9 leave 10ea6c: c3 ret =============================================================================== 00110430 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110430: 55 push %ebp 110431: 89 e5 mov %esp,%ebp 110433: 57 push %edi 110434: 56 push %esi 110435: 53 push %ebx 110436: 83 ec 1c sub $0x1c,%esp 110439: 8b 75 08 mov 0x8(%ebp),%esi 11043c: 8b 4d 0c mov 0xc(%ebp),%ecx 11043f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110442: 9c pushf 110443: fa cli 110444: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110445: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110447: 8d 7e 04 lea 0x4(%esi),%edi 11044a: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 11044d: 39 fa cmp %edi,%edx 11044f: 74 3d je 11048e <_Watchdog_Adjust+0x5e> switch ( direction ) { 110451: 85 c9 test %ecx,%ecx 110453: 75 43 jne 110498 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110455: 85 db test %ebx,%ebx 110457: 74 35 je 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110459: 8b 7a 10 mov 0x10(%edx),%edi 11045c: 39 fb cmp %edi,%ebx 11045e: 73 0f jae 11046f <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110460: eb 3e jmp 1104a0 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110462: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110464: 29 fb sub %edi,%ebx 110466: 74 26 je 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110468: 8b 7a 10 mov 0x10(%edx),%edi 11046b: 39 df cmp %ebx,%edi 11046d: 77 31 ja 1104a0 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 11046f: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 110476: 50 push %eax 110477: 9d popf _Watchdog_Tickle( header ); 110478: 83 ec 0c sub $0xc,%esp 11047b: 56 push %esi 11047c: e8 cb 01 00 00 call 11064c <_Watchdog_Tickle> _ISR_Disable( level ); 110481: 9c pushf 110482: fa cli 110483: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110484: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 110486: 83 c4 10 add $0x10,%esp 110489: 39 55 e4 cmp %edx,-0x1c(%ebp) 11048c: 75 d6 jne 110464 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 11048e: 50 push %eax 11048f: 9d popf } 110490: 8d 65 f4 lea -0xc(%ebp),%esp 110493: 5b pop %ebx 110494: 5e pop %esi 110495: 5f pop %edi 110496: c9 leave 110497: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 110498: 49 dec %ecx 110499: 75 f3 jne 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 11049b: 01 5a 10 add %ebx,0x10(%edx) break; 11049e: eb ee jmp 11048e <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 1104a0: 29 df sub %ebx,%edi 1104a2: 89 7a 10 mov %edi,0x10(%edx) break; 1104a5: eb e7 jmp 11048e <_Watchdog_Adjust+0x5e> =============================================================================== 0011d37c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d37c: 55 push %ebp 11d37d: 89 e5 mov %esp,%ebp 11d37f: 57 push %edi 11d380: 56 push %esi 11d381: 53 push %ebx 11d382: 83 ec 0c sub $0xc,%esp 11d385: 8b 75 08 mov 0x8(%ebp),%esi 11d388: 8b 55 0c mov 0xc(%ebp),%edx 11d38b: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d38e: 85 d2 test %edx,%edx 11d390: 74 63 je 11d3f5 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d392: 9c pushf 11d393: fa cli 11d394: 8f 45 ec popl -0x14(%ebp) 11d397: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d399: 8d 4e 04 lea 0x4(%esi),%ecx 11d39c: 89 4d f0 mov %ecx,-0x10(%ebp) 11d39f: 8d 7b 04 lea 0x4(%ebx),%edi 11d3a2: 89 55 e8 mov %edx,-0x18(%ebp) 11d3a5: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d3a8: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3ab: 74 44 je 11d3f1 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11d3ad: 8b 50 10 mov 0x10(%eax),%edx 11d3b0: 3b 55 e8 cmp -0x18(%ebp),%edx 11d3b3: 77 57 ja 11d40c <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11d3b5: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d3b8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d3bf: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d3c0: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d3c2: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d3c5: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d3c8: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d3ca: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d3cc: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d3cf: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d3d2: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d3d4: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d3d7: ff 75 ec pushl -0x14(%ebp) 11d3da: 9d popf 11d3db: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d3dc: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d3de: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3e1: 74 1d je 11d400 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d3e3: 8b 50 10 mov 0x10(%eax),%edx 11d3e6: 85 d2 test %edx,%edx 11d3e8: 74 d6 je 11d3c0 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3ea: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3ed: 85 c9 test %ecx,%ecx 11d3ef: 75 b7 jne 11d3a8 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d3f1: ff 75 ec pushl -0x14(%ebp) 11d3f4: 9d popf } 11d3f5: 83 c4 0c add $0xc,%esp 11d3f8: 5b pop %ebx 11d3f9: 5e pop %esi 11d3fa: 5f pop %edi 11d3fb: c9 leave 11d3fc: c3 ret 11d3fd: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d400: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d403: 8b 4d e8 mov -0x18(%ebp),%ecx 11d406: 85 c9 test %ecx,%ecx 11d408: 75 9e jne 11d3a8 <_Watchdog_Adjust_to_chain+0x2c> 11d40a: eb e5 jmp 11d3f1 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11d40c: 2b 55 e8 sub -0x18(%ebp),%edx 11d40f: 89 50 10 mov %edx,0x10(%eax) break; 11d412: eb dd jmp 11d3f1 <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ea70 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ea70: 55 push %ebp 10ea71: 89 e5 mov %esp,%ebp 10ea73: 57 push %edi 10ea74: 56 push %esi 10ea75: 53 push %ebx 10ea76: 83 ec 04 sub $0x4,%esp 10ea79: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10ea7c: 8b 3d f4 73 12 00 mov 0x1273f4,%edi _ISR_Disable( level ); 10ea82: 9c pushf 10ea83: fa cli 10ea84: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10ea87: 8b 43 08 mov 0x8(%ebx),%eax 10ea8a: 85 c0 test %eax,%eax 10ea8c: 0f 85 9e 00 00 00 jne 10eb30 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10ea92: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10ea99: a1 c0 74 12 00 mov 0x1274c0,%eax 10ea9e: 40 inc %eax 10ea9f: a3 c0 74 12 00 mov %eax,0x1274c0 restart: delta_interval = the_watchdog->initial; 10eaa4: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10eaa7: 8b 4d 08 mov 0x8(%ebp),%ecx 10eaaa: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eaac: 85 c0 test %eax,%eax 10eaae: 74 5d je 10eb0d <_Watchdog_Insert+0x9d> 10eab0: 8b 32 mov (%edx),%esi 10eab2: 85 f6 test %esi,%esi 10eab4: 74 57 je 10eb0d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10eab6: 8b 4a 10 mov 0x10(%edx),%ecx 10eab9: 39 c8 cmp %ecx,%eax 10eabb: 73 22 jae 10eadf <_Watchdog_Insert+0x6f> 10eabd: eb 49 jmp 10eb08 <_Watchdog_Insert+0x98> 10eabf: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10eac0: 8b 35 14 74 12 00 mov 0x127414,%esi 10eac6: 39 f7 cmp %esi,%edi 10eac8: 72 72 jb 10eb3c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10eaca: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10eacc: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eace: 85 c0 test %eax,%eax 10ead0: 74 3b je 10eb0d <_Watchdog_Insert+0x9d> 10ead2: 8b 0a mov (%edx),%ecx 10ead4: 85 c9 test %ecx,%ecx 10ead6: 74 35 je 10eb0d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10ead8: 8b 4a 10 mov 0x10(%edx),%ecx 10eadb: 39 c1 cmp %eax,%ecx 10eadd: 77 29 ja 10eb08 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10eadf: ff 75 f0 pushl -0x10(%ebp) 10eae2: 9d popf 10eae3: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10eae4: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10eae8: 74 d6 je 10eac0 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10eaea: 89 3d 14 74 12 00 mov %edi,0x127414 _Watchdog_Sync_count--; 10eaf0: a1 c0 74 12 00 mov 0x1274c0,%eax 10eaf5: 48 dec %eax 10eaf6: a3 c0 74 12 00 mov %eax,0x1274c0 _ISR_Enable( level ); 10eafb: ff 75 f0 pushl -0x10(%ebp) 10eafe: 9d popf } 10eaff: 58 pop %eax 10eb00: 5b pop %ebx 10eb01: 5e pop %esi 10eb02: 5f pop %edi 10eb03: c9 leave 10eb04: c3 ret 10eb05: 8d 76 00 lea 0x0(%esi),%esi if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10eb08: 29 c1 sub %eax,%ecx 10eb0a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10eb0d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10eb14: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10eb17: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10eb1a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10eb1d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10eb1f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10eb21: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10eb23: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10eb26: a1 c4 74 12 00 mov 0x1274c4,%eax 10eb2b: 89 43 14 mov %eax,0x14(%ebx) 10eb2e: eb ba jmp 10eaea <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10eb30: ff 75 f0 pushl -0x10(%ebp) 10eb33: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10eb34: 58 pop %eax 10eb35: 5b pop %ebx 10eb36: 5e pop %esi 10eb37: 5f pop %edi 10eb38: c9 leave 10eb39: c3 ret 10eb3a: 66 90 xchg %ax,%ax if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10eb3c: 89 3d 14 74 12 00 mov %edi,0x127414 goto restart; 10eb42: e9 5d ff ff ff jmp 10eaa4 <_Watchdog_Insert+0x34> =============================================================================== 0010eba8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10eba8: 55 push %ebp 10eba9: 89 e5 mov %esp,%ebp 10ebab: 56 push %esi 10ebac: 53 push %ebx 10ebad: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ebb0: 9c pushf 10ebb1: fa cli 10ebb2: 59 pop %ecx previous_state = the_watchdog->state; 10ebb3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ebb6: 83 f8 01 cmp $0x1,%eax 10ebb9: 74 4d je 10ec08 <_Watchdog_Remove+0x60> 10ebbb: 73 0f jae 10ebcc <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ebbd: 8b 1d c4 74 12 00 mov 0x1274c4,%ebx 10ebc3: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ebc6: 51 push %ecx 10ebc7: 9d popf return( previous_state ); } 10ebc8: 5b pop %ebx 10ebc9: 5e pop %esi 10ebca: c9 leave 10ebcb: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ebcc: 83 f8 03 cmp $0x3,%eax 10ebcf: 77 ec ja 10ebbd <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ebd1: 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 ); 10ebd8: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ebda: 8b 33 mov (%ebx),%esi 10ebdc: 85 f6 test %esi,%esi 10ebde: 74 06 je 10ebe6 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ebe0: 8b 72 10 mov 0x10(%edx),%esi 10ebe3: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ebe6: 8b 35 c0 74 12 00 mov 0x1274c0,%esi 10ebec: 85 f6 test %esi,%esi 10ebee: 74 0c je 10ebfc <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ebf0: 8b 35 f4 73 12 00 mov 0x1273f4,%esi 10ebf6: 89 35 14 74 12 00 mov %esi,0x127414 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ebfc: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ebff: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ec02: 89 1e mov %ebx,(%esi) 10ec04: eb b7 jmp 10ebbd <_Watchdog_Remove+0x15> 10ec06: 66 90 xchg %ax,%ax /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10ec08: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ec0f: eb ac jmp 10ebbd <_Watchdog_Remove+0x15> =============================================================================== 00110034 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 110034: 55 push %ebp 110035: 89 e5 mov %esp,%ebp 110037: 57 push %edi 110038: 56 push %esi 110039: 53 push %ebx 11003a: 83 ec 2c sub $0x2c,%esp 11003d: 8b 55 08 mov 0x8(%ebp),%edx 110040: 8b 45 0c mov 0xc(%ebp),%eax printk( 110043: 8b 78 24 mov 0x24(%eax),%edi 110046: 8b 70 20 mov 0x20(%eax),%esi 110049: 8b 58 1c mov 0x1c(%eax),%ebx 11004c: 8b 48 0c mov 0xc(%eax),%ecx 11004f: 89 4d d4 mov %ecx,-0x2c(%ebp) 110052: 8b 48 10 mov 0x10(%eax),%ecx 110055: 89 4d e0 mov %ecx,-0x20(%ebp) 110058: 85 d2 test %edx,%edx 11005a: 74 2c je 110088 <_Watchdog_Report+0x54> 11005c: b9 03 34 12 00 mov $0x123403,%ecx 110061: 83 ec 0c sub $0xc,%esp 110064: 57 push %edi 110065: 56 push %esi 110066: 53 push %ebx 110067: 50 push %eax 110068: ff 75 d4 pushl -0x2c(%ebp) 11006b: ff 75 e0 pushl -0x20(%ebp) 11006e: 51 push %ecx 11006f: 52 push %edx 110070: 68 06 3e 12 00 push $0x123e06 110075: e8 1e 9f ff ff call 109f98 11007a: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 11007d: 8d 65 f4 lea -0xc(%ebp),%esp 110080: 5b pop %ebx 110081: 5e pop %esi 110082: 5f pop %edi 110083: c9 leave 110084: c3 ret 110085: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 110088: b9 55 3c 12 00 mov $0x123c55,%ecx 11008d: 89 ca mov %ecx,%edx 11008f: eb d0 jmp 110061 <_Watchdog_Report+0x2d> =============================================================================== 0010ffc4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10ffc4: 55 push %ebp 10ffc5: 89 e5 mov %esp,%ebp 10ffc7: 57 push %edi 10ffc8: 56 push %esi 10ffc9: 53 push %ebx 10ffca: 83 ec 20 sub $0x20,%esp 10ffcd: 8b 7d 08 mov 0x8(%ebp),%edi 10ffd0: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10ffd3: 9c pushf 10ffd4: fa cli 10ffd5: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10ffd8: 56 push %esi 10ffd9: 57 push %edi 10ffda: 68 d0 3d 12 00 push $0x123dd0 10ffdf: e8 b4 9f ff ff call 109f98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ffe4: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ffe6: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10ffe9: 83 c4 10 add $0x10,%esp 10ffec: 39 f3 cmp %esi,%ebx 10ffee: 74 31 je 110021 <_Watchdog_Report_chain+0x5d><== NEVER TAKEN node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fff0: 83 ec 08 sub $0x8,%esp 10fff3: 53 push %ebx 10fff4: 6a 00 push $0x0 10fff6: e8 39 00 00 00 call 110034 <_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 ) 10fffb: 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 ; 10fffd: 83 c4 10 add $0x10,%esp 110000: 39 f3 cmp %esi,%ebx 110002: 75 ec jne 10fff0 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 110004: 83 ec 08 sub $0x8,%esp 110007: 57 push %edi 110008: 68 e7 3d 12 00 push $0x123de7 11000d: e8 86 9f ff ff call 109f98 110012: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 110015: ff 75 e4 pushl -0x1c(%ebp) 110018: 9d popf } 110019: 8d 65 f4 lea -0xc(%ebp),%esp 11001c: 5b pop %ebx 11001d: 5e pop %esi 11001e: 5f pop %edi 11001f: c9 leave 110020: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110021: 83 ec 0c sub $0xc,%esp 110024: 68 f6 3d 12 00 push $0x123df6 110029: e8 6a 9f ff ff call 109f98 11002e: 83 c4 10 add $0x10,%esp 110031: eb e2 jmp 110015 <_Watchdog_Report_chain+0x51> =============================================================================== 0010ec14 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ec14: 55 push %ebp 10ec15: 89 e5 mov %esp,%ebp 10ec17: 57 push %edi 10ec18: 56 push %esi 10ec19: 53 push %ebx 10ec1a: 83 ec 1c sub $0x1c,%esp 10ec1d: 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 ); 10ec20: 9c pushf 10ec21: fa cli 10ec22: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ec23: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec25: 8d 47 04 lea 0x4(%edi),%eax 10ec28: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ec2b: 39 c3 cmp %eax,%ebx 10ec2d: 74 11 je 10ec40 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10ec2f: 8b 43 10 mov 0x10(%ebx),%eax 10ec32: 85 c0 test %eax,%eax 10ec34: 74 34 je 10ec6a <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10ec36: 48 dec %eax 10ec37: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ec3a: 85 c0 test %eax,%eax 10ec3c: 74 2c je 10ec6a <_Watchdog_Tickle+0x56> 10ec3e: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10ec40: 56 push %esi 10ec41: 9d popf } 10ec42: 8d 65 f4 lea -0xc(%ebp),%esp 10ec45: 5b pop %ebx 10ec46: 5e pop %esi 10ec47: 5f pop %edi 10ec48: c9 leave 10ec49: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ec4a: 83 ec 08 sub $0x8,%esp 10ec4d: ff 73 24 pushl 0x24(%ebx) 10ec50: ff 73 20 pushl 0x20(%ebx) 10ec53: ff 53 1c call *0x1c(%ebx) 10ec56: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ec59: 9c pushf 10ec5a: fa cli 10ec5b: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ec5c: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ec5e: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10ec61: 74 dd je 10ec40 <_Watchdog_Tickle+0x2c> 10ec63: 8b 43 10 mov 0x10(%ebx),%eax 10ec66: 85 c0 test %eax,%eax 10ec68: 75 d6 jne 10ec40 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ec6a: 83 ec 0c sub $0xc,%esp 10ec6d: 53 push %ebx 10ec6e: e8 35 ff ff ff call 10eba8 <_Watchdog_Remove> _ISR_Enable( level ); 10ec73: 56 push %esi 10ec74: 9d popf switch( watchdog_state ) { 10ec75: 83 c4 10 add $0x10,%esp 10ec78: 83 f8 02 cmp $0x2,%eax 10ec7b: 75 dc jne 10ec59 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10ec7d: eb cb jmp 10ec4a <_Watchdog_Tickle+0x36> =============================================================================== 0010ece0 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ece0: 55 push %ebp 10ece1: 89 e5 mov %esp,%ebp 10ece3: 57 push %edi 10ece4: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ece5: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10eceb: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10ecf1: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10ecf8: 75 1e jne 10ed18 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ecfa: 6a 04 push $0x4 10ecfc: 52 push %edx 10ecfd: 53 push %ebx 10ecfe: 68 80 73 12 00 push $0x127380 10ed03: e8 b4 dd ff ff call 10cabc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ed08: 83 c4 10 add $0x10,%esp 10ed0b: 85 c0 test %eax,%eax 10ed0d: 74 13 je 10ed22 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ed0f: 8d 65 f8 lea -0x8(%ebp),%esp 10ed12: 5b pop %ebx 10ed13: 5f pop %edi 10ed14: c9 leave 10ed15: c3 ret 10ed16: 66 90 xchg %ax,%ax uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10ed18: 31 c0 xor %eax,%eax 10ed1a: 89 df mov %ebx,%edi 10ed1c: 89 d1 mov %edx,%ecx 10ed1e: f3 aa rep stos %al,%es:(%edi) 10ed20: eb d8 jmp 10ecfa <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ed22: 52 push %edx 10ed23: 6a 03 push $0x3 10ed25: 6a 01 push $0x1 10ed27: 6a 00 push $0x0 10ed29: e8 b2 e0 ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 001249b8 <__kill>: #endif int __kill( pid_t pid, int sig ) { 1249b8: 55 push %ebp <== NOT EXECUTED 1249b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249bb: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249bd: c9 leave <== NOT EXECUTED 1249be: c3 ret <== NOT EXECUTED =============================================================================== 0011f5d4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11f5d4: 55 push %ebp 11f5d5: 89 e5 mov %esp,%ebp 11f5d7: 83 ec 08 sub $0x8,%esp 11f5da: e8 be 06 00 00 call 11fc9d <_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(); 11f5df: e8 88 ff ff ff call 11f56c rtems_shutdown_executive(status); 11f5e4: 83 ec 0c sub $0xc,%esp 11f5e7: ff 75 08 pushl 0x8(%ebp) 11f5ea: e8 fd 00 00 00 call 11f6ec 11f5ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11f5f2: eb fe jmp 11f5f2 <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0010912c <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 10912c: 55 push %ebp <== NOT EXECUTED 10912d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10912f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109132: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 109135: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 109138: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 10913b: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 10913e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 109141: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109144: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 109145: e9 4a fe ff ff jmp 108f94 <== NOT EXECUTED =============================================================================== 00124988 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 124988: 55 push %ebp <== NOT EXECUTED 124989: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 12498b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 124990: c9 leave <== NOT EXECUTED 124991: c3 ret <== NOT EXECUTED =============================================================================== 00108664 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 108664: 55 push %ebp <== NOT EXECUTED 108665: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108667: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10866a: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10866b: e9 90 ff ff ff jmp 108600 <== NOT EXECUTED =============================================================================== 001249b0 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 1249b0: 55 push %ebp <== NOT EXECUTED 1249b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249b3: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249b5: c9 leave <== NOT EXECUTED 1249b6: c3 ret <== NOT EXECUTED =============================================================================== 0010988c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 10988c: 55 push %ebp <== NOT EXECUTED 10988d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10988f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109892: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 109895: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 109898: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10989b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10989e: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 10989f: e9 30 fe ff ff jmp 1096d4 <== NOT EXECUTED =============================================================================== 0011f6b4 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11f6b4: 55 push %ebp <== NOT EXECUTED 11f6b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11f6b7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11f6ba: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11f6bd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11f6c0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11f6c3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11f6c6: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11f6c7: e9 48 00 00 00 jmp 11f714 <== NOT EXECUTED =============================================================================== 0010bf60 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10bf60: 55 push %ebp 10bf61: 89 e5 mov %esp,%ebp 10bf63: 57 push %edi 10bf64: 56 push %esi 10bf65: 53 push %ebx 10bf66: 83 ec 78 sub $0x78,%esp 10bf69: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10bf6c: 53 push %ebx 10bf6d: e8 4a e9 ff ff call 10a8bc if ( old_parent_pathlen == 0 ) 10bf72: 83 c4 10 add $0x10,%esp 10bf75: 85 c0 test %eax,%eax 10bf77: 0f 85 b7 01 00 00 jne 10c134 <_rename_r+0x1d4> <== NEVER TAKEN rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10bf7d: 56 push %esi 10bf7e: 8d 45 b8 lea -0x48(%ebp),%eax 10bf81: 89 45 94 mov %eax,-0x6c(%ebp) 10bf84: 50 push %eax 10bf85: 8d 45 e4 lea -0x1c(%ebp),%eax 10bf88: 50 push %eax 10bf89: 53 push %ebx 10bf8a: e8 a1 05 00 00 call 10c530 10bf8f: 31 d2 xor %edx,%edx 10bf91: c6 45 93 00 movb $0x0,-0x6d(%ebp) 10bf95: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10bf98: 8d 7d cc lea -0x34(%ebp),%edi 10bf9b: b9 05 00 00 00 mov $0x5,%ecx 10bfa0: 8b 75 94 mov -0x6c(%ebp),%esi 10bfa3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10bfa5: 01 d3 add %edx,%ebx 10bfa7: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10bfaa: be ff ff ff ff mov $0xffffffff,%esi 10bfaf: 89 f1 mov %esi,%ecx 10bfb1: 89 df mov %ebx,%edi 10bfb3: 31 c0 xor %eax,%eax 10bfb5: f2 ae repnz scas %es:(%edi),%al 10bfb7: f7 d1 not %ecx 10bfb9: 49 dec %ecx 10bfba: 83 ec 08 sub $0x8,%esp 10bfbd: 51 push %ecx 10bfbe: 53 push %ebx 10bfbf: e8 a8 e8 ff ff call 10a86c 10bfc4: 01 c3 add %eax,%ebx 10bfc6: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10bfc9: 89 f1 mov %esi,%ecx 10bfcb: 89 df mov %ebx,%edi 10bfcd: 31 c0 xor %eax,%eax 10bfcf: f2 ae repnz scas %es:(%edi),%al 10bfd1: 89 ce mov %ecx,%esi 10bfd3: f7 d6 not %esi 10bfd5: 4e dec %esi 10bfd6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10bfdd: 8d 7d cc lea -0x34(%ebp),%edi 10bfe0: 57 push %edi 10bfe1: 6a 00 push $0x0 10bfe3: 56 push %esi 10bfe4: 53 push %ebx 10bfe5: e8 1a e9 ff ff call 10a904 0, &old_loc, false ); if ( result != 0 ) { 10bfea: 83 c4 20 add $0x20,%esp 10bfed: 85 c0 test %eax,%eax 10bfef: 0f 85 23 01 00 00 jne 10c118 <_rename_r+0x1b8> <== NEVER TAKEN /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10bff5: 51 push %ecx 10bff6: 8d 5d a4 lea -0x5c(%ebp),%ebx 10bff9: 53 push %ebx 10bffa: 8d 45 e4 lea -0x1c(%ebp),%eax 10bffd: 50 push %eax 10bffe: ff 75 10 pushl 0x10(%ebp) 10c001: e8 2a 05 00 00 call 10c530 if ( !new_parent_loc.ops->evalformake_h ) { 10c006: 8b 45 b0 mov -0x50(%ebp),%eax 10c009: 8b 40 04 mov 0x4(%eax),%eax 10c00c: 83 c4 10 add $0x10,%esp 10c00f: 85 c0 test %eax,%eax 10c011: 0f 84 b5 01 00 00 je 10c1cc <_rename_r+0x26c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10c017: 52 push %edx 10c018: 8d 55 e0 lea -0x20(%ebp),%edx 10c01b: 52 push %edx 10c01c: 53 push %ebx 10c01d: 8b 55 10 mov 0x10(%ebp),%edx 10c020: 03 55 e4 add -0x1c(%ebp),%edx 10c023: 52 push %edx 10c024: ff d0 call *%eax if ( result != 0 ) { 10c026: 83 c4 10 add $0x10,%esp 10c029: 85 c0 test %eax,%eax 10c02b: 0f 85 2f 01 00 00 jne 10c160 <_rename_r+0x200> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 10c031: 8b 45 c8 mov -0x38(%ebp),%eax 10c034: 3b 45 b4 cmp -0x4c(%ebp),%eax 10c037: 75 77 jne 10c0b0 <_rename_r+0x150> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 10c039: 8b 55 b0 mov -0x50(%ebp),%edx 10c03c: 8b 42 40 mov 0x40(%edx),%eax 10c03f: 85 c0 test %eax,%eax 10c041: 0f 84 75 01 00 00 je 10c1bc <_rename_r+0x25c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10c047: ff 75 e0 pushl -0x20(%ebp) 10c04a: 53 push %ebx 10c04b: 57 push %edi 10c04c: ff 75 94 pushl -0x6c(%ebp) 10c04f: ff d0 call *%eax 10c051: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &new_parent_loc ); 10c053: 8b 45 b0 mov -0x50(%ebp),%eax 10c056: 83 c4 10 add $0x10,%esp 10c059: 85 c0 test %eax,%eax 10c05b: 74 10 je 10c06d <_rename_r+0x10d> <== NEVER TAKEN 10c05d: 8b 40 1c mov 0x1c(%eax),%eax 10c060: 85 c0 test %eax,%eax 10c062: 74 09 je 10c06d <_rename_r+0x10d> <== NEVER TAKEN 10c064: 83 ec 0c sub $0xc,%esp 10c067: 53 push %ebx 10c068: ff d0 call *%eax 10c06a: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c06d: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c071: 74 19 je 10c08c <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); 10c073: 8b 45 c4 mov -0x3c(%ebp),%eax 10c076: 85 c0 test %eax,%eax 10c078: 74 12 je 10c08c <_rename_r+0x12c> <== NEVER TAKEN 10c07a: 8b 40 1c mov 0x1c(%eax),%eax 10c07d: 85 c0 test %eax,%eax 10c07f: 74 0b je 10c08c <_rename_r+0x12c> <== NEVER TAKEN 10c081: 83 ec 0c sub $0xc,%esp 10c084: ff 75 94 pushl -0x6c(%ebp) 10c087: ff d0 call *%eax 10c089: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c08c: 8b 45 d8 mov -0x28(%ebp),%eax 10c08f: 85 c0 test %eax,%eax 10c091: 74 10 je 10c0a3 <_rename_r+0x143> <== NEVER TAKEN 10c093: 8b 40 1c mov 0x1c(%eax),%eax 10c096: 85 c0 test %eax,%eax 10c098: 74 09 je 10c0a3 <_rename_r+0x143> <== NEVER TAKEN 10c09a: 83 ec 0c sub $0xc,%esp 10c09d: 57 push %edi 10c09e: ff d0 call *%eax 10c0a0: 83 c4 10 add $0x10,%esp return result; } 10c0a3: 89 f0 mov %esi,%eax 10c0a5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a8: 5b pop %ebx 10c0a9: 5e pop %esi 10c0aa: 5f pop %edi 10c0ab: c9 leave 10c0ac: c3 ret 10c0ad: 8d 76 00 lea 0x0(%esi),%esi * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 10c0b0: 8b 45 b0 mov -0x50(%ebp),%eax 10c0b3: 85 c0 test %eax,%eax 10c0b5: 74 10 je 10c0c7 <_rename_r+0x167> <== NEVER TAKEN 10c0b7: 8b 40 1c mov 0x1c(%eax),%eax 10c0ba: 85 c0 test %eax,%eax 10c0bc: 74 09 je 10c0c7 <_rename_r+0x167> <== NEVER TAKEN 10c0be: 83 ec 0c sub $0xc,%esp 10c0c1: 53 push %ebx 10c0c2: ff d0 call *%eax 10c0c4: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c0c7: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c0cb: 74 19 je 10c0e6 <_rename_r+0x186> rtems_filesystem_freenode( &old_parent_loc ); 10c0cd: 8b 45 c4 mov -0x3c(%ebp),%eax 10c0d0: 85 c0 test %eax,%eax 10c0d2: 74 12 je 10c0e6 <_rename_r+0x186> <== NEVER TAKEN 10c0d4: 8b 40 1c mov 0x1c(%eax),%eax 10c0d7: 85 c0 test %eax,%eax 10c0d9: 74 0b je 10c0e6 <_rename_r+0x186> <== NEVER TAKEN 10c0db: 83 ec 0c sub $0xc,%esp 10c0de: ff 75 94 pushl -0x6c(%ebp) 10c0e1: ff d0 call *%eax 10c0e3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c0e6: 8b 45 d8 mov -0x28(%ebp),%eax 10c0e9: 85 c0 test %eax,%eax 10c0eb: 74 10 je 10c0fd <_rename_r+0x19d> <== NEVER TAKEN 10c0ed: 8b 40 1c mov 0x1c(%eax),%eax 10c0f0: 85 c0 test %eax,%eax 10c0f2: 74 09 je 10c0fd <_rename_r+0x19d> <== NEVER TAKEN 10c0f4: 83 ec 0c sub $0xc,%esp 10c0f7: 57 push %edi 10c0f8: ff d0 call *%eax 10c0fa: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10c0fd: e8 da ad 00 00 call 116edc <__errno> 10c102: c7 00 12 00 00 00 movl $0x12,(%eax) 10c108: be ff ff ff ff mov $0xffffffff,%esi if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c10d: 89 f0 mov %esi,%eax 10c10f: 8d 65 f4 lea -0xc(%ebp),%esp 10c112: 5b pop %ebx 10c113: 5e pop %esi 10c114: 5f pop %edi 10c115: c9 leave 10c116: c3 ret 10c117: 90 nop name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 10c118: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c11c: 0f 85 f5 00 00 00 jne 10c217 <_rename_r+0x2b7> <== ALWAYS TAKEN result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 10c122: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED return result; } 10c127: 89 f0 mov %esi,%eax <== NOT EXECUTED 10c129: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c12c: 5b pop %ebx <== NOT EXECUTED 10c12d: 5e pop %esi <== NOT EXECUTED 10c12e: 5f pop %edi <== NOT EXECUTED 10c12f: c9 leave <== NOT EXECUTED 10c130: c3 ret <== NOT EXECUTED 10c131: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 10c134: 83 ec 0c sub $0xc,%esp 10c137: 6a 00 push $0x0 10c139: 8d 4d b8 lea -0x48(%ebp),%ecx 10c13c: 89 4d 94 mov %ecx,-0x6c(%ebp) 10c13f: 51 push %ecx 10c140: 6a 02 push $0x2 10c142: 50 push %eax 10c143: 53 push %ebx 10c144: 89 45 8c mov %eax,-0x74(%ebp) 10c147: e8 8c e8 ff ff call 10a9d8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10c14c: 83 c4 20 add $0x20,%esp 10c14f: 85 c0 test %eax,%eax 10c151: 8b 55 8c mov -0x74(%ebp),%edx 10c154: 75 cc jne 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c156: c6 45 93 01 movb $0x1,-0x6d(%ebp) 10c15a: e9 39 fe ff ff jmp 10bf98 <_rename_r+0x38> 10c15f: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 10c160: 8b 45 b0 mov -0x50(%ebp),%eax 10c163: 85 c0 test %eax,%eax 10c165: 74 10 je 10c177 <_rename_r+0x217> <== NEVER TAKEN 10c167: 8b 40 1c mov 0x1c(%eax),%eax 10c16a: 85 c0 test %eax,%eax 10c16c: 74 09 je 10c177 <_rename_r+0x217> <== NEVER TAKEN 10c16e: 83 ec 0c sub $0xc,%esp 10c171: 53 push %ebx 10c172: ff d0 call *%eax 10c174: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c177: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c17b: 74 19 je 10c196 <_rename_r+0x236> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c17d: 8b 45 c4 mov -0x3c(%ebp),%eax 10c180: 85 c0 test %eax,%eax 10c182: 74 12 je 10c196 <_rename_r+0x236> <== NEVER TAKEN 10c184: 8b 40 1c mov 0x1c(%eax),%eax 10c187: 85 c0 test %eax,%eax 10c189: 74 0b je 10c196 <_rename_r+0x236> <== NEVER TAKEN 10c18b: 83 ec 0c sub $0xc,%esp 10c18e: ff 75 94 pushl -0x6c(%ebp) 10c191: ff d0 call *%eax 10c193: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c196: 8b 45 d8 mov -0x28(%ebp),%eax 10c199: 85 c0 test %eax,%eax 10c19b: 74 85 je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c19d: 8b 40 1c mov 0x1c(%eax),%eax 10c1a0: 85 c0 test %eax,%eax 10c1a2: 0f 84 7a ff ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c1a8: 83 ec 0c sub $0xc,%esp 10c1ab: 57 push %edi 10c1ac: ff d0 call *%eax 10c1ae: 83 ce ff or $0xffffffff,%esi 10c1b1: 83 c4 10 add $0x10,%esp 10c1b4: e9 ea fe ff ff jmp 10c0a3 <_rename_r+0x143> 10c1b9: 8d 76 00 lea 0x0(%esi),%esi rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 10c1bc: 8b 42 1c mov 0x1c(%edx),%eax 10c1bf: 85 c0 test %eax,%eax 10c1c1: 74 09 je 10c1cc <_rename_r+0x26c> <== NEVER TAKEN 10c1c3: 83 ec 0c sub $0xc,%esp 10c1c6: 53 push %ebx 10c1c7: ff d0 call *%eax 10c1c9: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c1cc: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c1d0: 74 19 je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c1d2: 8b 45 c4 mov -0x3c(%ebp),%eax 10c1d5: 85 c0 test %eax,%eax 10c1d7: 74 12 je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN 10c1d9: 8b 40 1c mov 0x1c(%eax),%eax 10c1dc: 85 c0 test %eax,%eax 10c1de: 74 0b je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN 10c1e0: 83 ec 0c sub $0xc,%esp 10c1e3: ff 75 94 pushl -0x6c(%ebp) 10c1e6: ff d0 call *%eax 10c1e8: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c1eb: 8b 45 d8 mov -0x28(%ebp),%eax 10c1ee: 85 c0 test %eax,%eax 10c1f0: 74 10 je 10c202 <_rename_r+0x2a2> <== NEVER TAKEN 10c1f2: 8b 40 1c mov 0x1c(%eax),%eax 10c1f5: 85 c0 test %eax,%eax 10c1f7: 74 09 je 10c202 <_rename_r+0x2a2> <== NEVER TAKEN 10c1f9: 83 ec 0c sub $0xc,%esp 10c1fc: 57 push %edi 10c1fd: ff d0 call *%eax 10c1ff: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c202: e8 d5 ac 00 00 call 116edc <__errno> 10c207: c7 00 86 00 00 00 movl $0x86,(%eax) 10c20d: be ff ff ff ff mov $0xffffffff,%esi 10c212: e9 8c fe ff ff jmp 10c0a3 <_rename_r+0x143> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 10c217: 8b 45 c4 mov -0x3c(%ebp),%eax 10c21a: 85 c0 test %eax,%eax 10c21c: 0f 84 00 ff ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c222: 8b 40 1c mov 0x1c(%eax),%eax 10c225: 85 c0 test %eax,%eax 10c227: 0f 84 f5 fe ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c22d: 83 ec 0c sub $0xc,%esp 10c230: ff 75 94 pushl -0x6c(%ebp) 10c233: ff d0 call *%eax 10c235: 83 ce ff or $0xffffffff,%esi 10c238: 83 c4 10 add $0x10,%esp 10c23b: e9 63 fe ff ff jmp 10c0a3 <_rename_r+0x143> =============================================================================== 0010a670 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10a670: 55 push %ebp <== NOT EXECUTED 10a671: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a673: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a676: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10a679: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10a67c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10a67f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10a682: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10a683: e9 18 ff ff ff jmp 10a5a0 <== NOT EXECUTED =============================================================================== 0011392c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 11392c: 55 push %ebp <== NOT EXECUTED 11392d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11392f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 113932: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 113935: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 113938: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 113939: e9 fa fd ff ff jmp 113738 <== NOT EXECUTED =============================================================================== 00109bf4 : int access( const char *path, int amode ) { 109bf4: 55 push %ebp 109bf5: 89 e5 mov %esp,%ebp 109bf7: 53 push %ebx 109bf8: 83 ec 5c sub $0x5c,%esp 109bfb: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 109bfe: 8d 45 b0 lea -0x50(%ebp),%eax 109c01: 50 push %eax 109c02: ff 75 08 pushl 0x8(%ebp) 109c05: e8 f2 19 00 00 call 10b5fc 109c0a: 83 c4 10 add $0x10,%esp 109c0d: 85 c0 test %eax,%eax 109c0f: 75 1f jne 109c30 return -1; if ( amode & R_OK ) { 109c11: f6 c3 04 test $0x4,%bl 109c14: 75 12 jne 109c28 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 109c16: f6 c3 02 test $0x2,%bl 109c19: 75 29 jne 109c44 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 109c1b: 83 e3 01 and $0x1,%ebx 109c1e: 75 1c jne 109c3c if ( !( statbuf.st_mode & S_IEXEC ) ) 109c20: 31 c0 xor %eax,%eax return -1; } return 0; } 109c22: 8b 5d fc mov -0x4(%ebp),%ebx 109c25: c9 leave 109c26: c3 ret 109c27: 90 nop if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 109c28: f6 45 bd 01 testb $0x1,-0x43(%ebp) 109c2c: 75 e8 jne 109c16 109c2e: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109c30: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 109c35: 8b 5d fc mov -0x4(%ebp),%ebx 109c38: c9 leave 109c39: c3 ret 109c3a: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109c3c: f6 45 bc 40 testb $0x40,-0x44(%ebp) 109c40: 75 de jne 109c20 109c42: eb ec jmp 109c30 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 109c44: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) 109c48: 78 d1 js 109c1b 109c4a: eb e4 jmp 109c30 =============================================================================== 0010836c : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10836c: 55 push %ebp 10836d: 89 e5 mov %esp,%ebp 10836f: 57 push %edi 108370: 53 push %ebx 108371: 8b 5d 0c mov 0xc(%ebp),%ebx 108374: ff 05 14 72 12 00 incl 0x127214 length = nelem * elsize; 10837a: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10837e: 83 ec 0c sub $0xc,%esp 108381: 53 push %ebx 108382: e8 d5 04 00 00 call 10885c 108387: 89 c2 mov %eax,%edx if ( cptr ) 108389: 83 c4 10 add $0x10,%esp 10838c: 85 c0 test %eax,%eax 10838e: 74 08 je 108398 <== NEVER TAKEN memset( cptr, '\0', length ); 108390: 31 c0 xor %eax,%eax 108392: 89 d7 mov %edx,%edi 108394: 89 d9 mov %ebx,%ecx 108396: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 108398: ff 0d 04 72 12 00 decl 0x127204 return cptr; } 10839e: 89 d0 mov %edx,%eax 1083a0: 8d 65 f8 lea -0x8(%ebp),%esp 1083a3: 5b pop %ebx 1083a4: 5f pop %edi 1083a5: c9 leave 1083a6: c3 ret =============================================================================== 00111480 : #include int chdir( const char *pathname ) { 111480: 55 push %ebp 111481: 89 e5 mov %esp,%ebp 111483: 57 push %edi 111484: 56 push %esi 111485: 83 ec 20 sub $0x20,%esp 111488: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 11148b: 85 d2 test %edx,%edx 11148d: 0f 84 9d 00 00 00 je 111530 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 111493: 31 c0 xor %eax,%eax 111495: b9 ff ff ff ff mov $0xffffffff,%ecx 11149a: 89 d7 mov %edx,%edi 11149c: f2 ae repnz scas %es:(%edi),%al 11149e: f7 d1 not %ecx 1114a0: 49 dec %ecx 1114a1: 83 ec 0c sub $0xc,%esp 1114a4: 6a 01 push $0x1 1114a6: 8d 75 e4 lea -0x1c(%ebp),%esi 1114a9: 56 push %esi 1114aa: 6a 01 push $0x1 1114ac: 51 push %ecx 1114ad: 52 push %edx 1114ae: e8 dd 73 ff ff call 108890 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1114b3: 83 c4 20 add $0x20,%esp 1114b6: 85 c0 test %eax,%eax 1114b8: 75 6a jne 111524 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 1114ba: 8b 55 f0 mov -0x10(%ebp),%edx 1114bd: 8b 42 10 mov 0x10(%edx),%eax 1114c0: 85 c0 test %eax,%eax 1114c2: 74 45 je 111509 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1114c4: 83 ec 0c sub $0xc,%esp 1114c7: 56 push %esi 1114c8: ff d0 call *%eax 1114ca: 83 c4 10 add $0x10,%esp 1114cd: 48 dec %eax 1114ce: 75 78 jne 111548 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 1114d0: 8b 3d 44 65 12 00 mov 0x126544,%edi 1114d6: 8b 47 10 mov 0x10(%edi),%eax 1114d9: 85 c0 test %eax,%eax 1114db: 74 19 je 1114f6 <== NEVER TAKEN 1114dd: 8b 40 1c mov 0x1c(%eax),%eax 1114e0: 85 c0 test %eax,%eax 1114e2: 74 12 je 1114f6 <== NEVER TAKEN 1114e4: 83 ec 0c sub $0xc,%esp 1114e7: 83 c7 04 add $0x4,%edi 1114ea: 57 push %edi 1114eb: ff d0 call *%eax 1114ed: 8b 3d 44 65 12 00 mov 0x126544,%edi 1114f3: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 1114f6: 83 c7 04 add $0x4,%edi 1114f9: b9 05 00 00 00 mov $0x5,%ecx 1114fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 111500: 31 c0 xor %eax,%eax return 0; } 111502: 8d 65 f8 lea -0x8(%ebp),%esp 111505: 5e pop %esi 111506: 5f pop %edi 111507: c9 leave 111508: c3 ret /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 111509: 8b 42 1c mov 0x1c(%edx),%eax 11150c: 85 c0 test %eax,%eax <== NOT EXECUTED 11150e: 74 09 je 111519 <== NOT EXECUTED 111510: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111513: 56 push %esi <== NOT EXECUTED 111514: ff d0 call *%eax <== NOT EXECUTED 111516: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 111519: e8 8e 31 00 00 call 1146ac <__errno> <== NOT EXECUTED 11151e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 111524: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 111529: 8d 65 f8 lea -0x8(%ebp),%esp 11152c: 5e pop %esi 11152d: 5f pop %edi 11152e: c9 leave 11152f: c3 ret { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 111530: e8 77 31 00 00 call 1146ac <__errno> 111535: c7 00 0e 00 00 00 movl $0xe,(%eax) 11153b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 111540: 8d 65 f8 lea -0x8(%ebp),%esp 111543: 5e pop %esi 111544: 5f pop %edi 111545: c9 leave 111546: c3 ret 111547: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 111548: 8b 45 f0 mov -0x10(%ebp),%eax 11154b: 85 c0 test %eax,%eax 11154d: 74 10 je 11155f <== NEVER TAKEN 11154f: 8b 40 1c mov 0x1c(%eax),%eax 111552: 85 c0 test %eax,%eax 111554: 74 09 je 11155f <== NEVER TAKEN 111556: 83 ec 0c sub $0xc,%esp 111559: 56 push %esi 11155a: ff d0 call *%eax 11155c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 11155f: e8 48 31 00 00 call 1146ac <__errno> 111564: c7 00 14 00 00 00 movl $0x14,(%eax) 11156a: b8 ff ff ff ff mov $0xffffffff,%eax 11156f: eb 91 jmp 111502 =============================================================================== 00109ea4 : int chmod( const char *path, mode_t mode ) { 109ea4: 55 push %ebp 109ea5: 89 e5 mov %esp,%ebp 109ea7: 57 push %edi 109ea8: 56 push %esi 109ea9: 53 push %ebx 109eaa: 83 ec 38 sub $0x38,%esp 109ead: 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 ); 109eb0: 31 c0 xor %eax,%eax 109eb2: b9 ff ff ff ff mov $0xffffffff,%ecx 109eb7: 89 d7 mov %edx,%edi 109eb9: f2 ae repnz scas %es:(%edi),%al 109ebb: f7 d1 not %ecx 109ebd: 49 dec %ecx 109ebe: 6a 01 push $0x1 109ec0: 8d 5d d4 lea -0x2c(%ebp),%ebx 109ec3: 53 push %ebx 109ec4: 6a 00 push $0x0 109ec6: 51 push %ecx 109ec7: 52 push %edx 109ec8: e8 af 02 00 00 call 10a17c if ( status != 0 ) 109ecd: 83 c4 20 add $0x20,%esp 109ed0: 85 c0 test %eax,%eax 109ed2: 75 60 jne 109f34 return -1; if ( !loc.handlers ){ 109ed4: 8b 45 dc mov -0x24(%ebp),%eax 109ed7: 85 c0 test %eax,%eax 109ed9: 74 36 je 109f11 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 109edb: 8b 40 1c mov 0x1c(%eax),%eax 109ede: 85 c0 test %eax,%eax 109ee0: 74 62 je 109f44 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 109ee2: 83 ec 08 sub $0x8,%esp 109ee5: ff 75 0c pushl 0xc(%ebp) 109ee8: 53 push %ebx 109ee9: ff d0 call *%eax 109eeb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 109eed: 8b 45 e0 mov -0x20(%ebp),%eax 109ef0: 83 c4 10 add $0x10,%esp 109ef3: 85 c0 test %eax,%eax 109ef5: 74 10 je 109f07 <== NEVER TAKEN 109ef7: 8b 40 1c mov 0x1c(%eax),%eax 109efa: 85 c0 test %eax,%eax 109efc: 74 09 je 109f07 <== NEVER TAKEN 109efe: 83 ec 0c sub $0xc,%esp 109f01: 53 push %ebx 109f02: ff d0 call *%eax 109f04: 83 c4 10 add $0x10,%esp return result; } 109f07: 89 f0 mov %esi,%eax 109f09: 8d 65 f4 lea -0xc(%ebp),%esp 109f0c: 5b pop %ebx 109f0d: 5e pop %esi 109f0e: 5f pop %edi 109f0f: c9 leave 109f10: c3 ret status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 109f11: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f14: 85 c0 test %eax,%eax <== NOT EXECUTED 109f16: 74 10 je 109f28 <== NOT EXECUTED 109f18: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109f1b: 85 c0 test %eax,%eax <== NOT EXECUTED 109f1d: 74 09 je 109f28 <== NOT EXECUTED 109f1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f22: 53 push %ebx <== NOT EXECUTED 109f23: ff d0 call *%eax <== NOT EXECUTED 109f25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 109f28: e8 73 c7 00 00 call 1166a0 <__errno> <== NOT EXECUTED 109f2d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109f33: 90 nop <== NOT EXECUTED 109f34: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 109f39: 89 f0 mov %esi,%eax 109f3b: 8d 65 f4 lea -0xc(%ebp),%esp 109f3e: 5b pop %ebx 109f3f: 5e pop %esi 109f40: 5f pop %edi 109f41: c9 leave 109f42: c3 ret 109f43: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 109f44: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f47: 85 c0 test %eax,%eax <== NOT EXECUTED 109f49: 74 10 je 109f5b <== NOT EXECUTED 109f4b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109f4e: 85 c0 test %eax,%eax <== NOT EXECUTED 109f50: 74 09 je 109f5b <== NOT EXECUTED 109f52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f55: 53 push %ebx <== NOT EXECUTED 109f56: ff d0 call *%eax <== NOT EXECUTED 109f58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109f5b: e8 40 c7 00 00 call 1166a0 <__errno> <== NOT EXECUTED 109f60: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109f66: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 109f6b: eb 9a jmp 109f07 <== NOT EXECUTED =============================================================================== 00109f70 : int chown( const char *path, uid_t owner, gid_t group ) { 109f70: 55 push %ebp 109f71: 89 e5 mov %esp,%ebp 109f73: 57 push %edi 109f74: 56 push %esi 109f75: 53 push %ebx 109f76: 83 ec 38 sub $0x38,%esp 109f79: 8b 55 08 mov 0x8(%ebp),%edx 109f7c: 8b 75 0c mov 0xc(%ebp),%esi 109f7f: 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 ) ) 109f82: 31 c0 xor %eax,%eax 109f84: b9 ff ff ff ff mov $0xffffffff,%ecx 109f89: 89 d7 mov %edx,%edi 109f8b: f2 ae repnz scas %es:(%edi),%al 109f8d: f7 d1 not %ecx 109f8f: 49 dec %ecx 109f90: 6a 01 push $0x1 109f92: 8d 7d d4 lea -0x2c(%ebp),%edi 109f95: 57 push %edi 109f96: 6a 00 push $0x0 109f98: 51 push %ecx 109f99: 52 push %edx 109f9a: e8 dd 01 00 00 call 10a17c 109f9f: 83 c4 20 add $0x20,%esp 109fa2: 85 c0 test %eax,%eax 109fa4: 75 5a jne 10a000 <== NEVER TAKEN return -1; if ( !loc.ops->chown_h ) { 109fa6: 8b 55 e0 mov -0x20(%ebp),%edx 109fa9: 8b 42 18 mov 0x18(%edx),%eax 109fac: 85 c0 test %eax,%eax 109fae: 74 34 je 109fe4 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 109fb0: 52 push %edx 109fb1: 0f b7 db movzwl %bx,%ebx 109fb4: 53 push %ebx 109fb5: 0f b7 f6 movzwl %si,%esi 109fb8: 56 push %esi 109fb9: 57 push %edi 109fba: ff d0 call *%eax 109fbc: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 109fbe: 8b 45 e0 mov -0x20(%ebp),%eax 109fc1: 83 c4 10 add $0x10,%esp 109fc4: 85 c0 test %eax,%eax 109fc6: 74 10 je 109fd8 <== NEVER TAKEN 109fc8: 8b 40 1c mov 0x1c(%eax),%eax 109fcb: 85 c0 test %eax,%eax 109fcd: 74 09 je 109fd8 <== NEVER TAKEN 109fcf: 83 ec 0c sub $0xc,%esp 109fd2: 57 push %edi 109fd3: ff d0 call *%eax 109fd5: 83 c4 10 add $0x10,%esp return result; } 109fd8: 89 d8 mov %ebx,%eax 109fda: 8d 65 f4 lea -0xc(%ebp),%esp 109fdd: 5b pop %ebx 109fde: 5e pop %esi 109fdf: 5f pop %edi 109fe0: c9 leave 109fe1: c3 ret 109fe2: 66 90 xchg %ax,%ax if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 109fe4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 109fe7: 85 c0 test %eax,%eax <== NOT EXECUTED 109fe9: 74 09 je 109ff4 <== NOT EXECUTED 109feb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109fee: 57 push %edi <== NOT EXECUTED 109fef: ff d0 call *%eax <== NOT EXECUTED 109ff1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109ff4: e8 a7 c6 00 00 call 1166a0 <__errno> <== NOT EXECUTED 109ff9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109fff: 90 nop <== NOT EXECUTED 10a000: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 10a005: 89 d8 mov %ebx,%eax 10a007: 8d 65 f4 lea -0xc(%ebp),%esp 10a00a: 5b pop %ebx 10a00b: 5e pop %esi 10a00c: 5f pop %edi 10a00d: c9 leave 10a00e: c3 ret =============================================================================== 001085d8 : #include int chroot( const char *pathname ) { 1085d8: 55 push %ebp 1085d9: 89 e5 mov %esp,%ebp 1085db: 57 push %edi 1085dc: 56 push %esi 1085dd: 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) { 1085e0: 81 3d 44 65 12 00 80 cmpl $0x128780,0x126544 1085e7: 87 12 00 1085ea: 74 6c je 108658 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 1085ec: 83 ec 0c sub $0xc,%esp 1085ef: ff 75 08 pushl 0x8(%ebp) 1085f2: e8 89 8e 00 00 call 111480 if (result) { 1085f7: 83 c4 10 add $0x10,%esp 1085fa: 85 c0 test %eax,%eax 1085fc: 75 7e jne 10867c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1085fe: 83 ec 0c sub $0xc,%esp 108601: 6a 00 push $0x0 108603: 8d 75 e4 lea -0x1c(%ebp),%esi 108606: 56 push %esi 108607: 6a 00 push $0x0 108609: 6a 01 push $0x1 10860b: 68 91 25 12 00 push $0x122591 108610: e8 7b 02 00 00 call 108890 108615: 83 c4 20 add $0x20,%esp 108618: 85 c0 test %eax,%eax 10861a: 75 60 jne 10867c <== 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); 10861c: 8b 3d 44 65 12 00 mov 0x126544,%edi 108622: 8b 47 24 mov 0x24(%edi),%eax 108625: 85 c0 test %eax,%eax 108627: 74 19 je 108642 <== NEVER TAKEN 108629: 8b 40 1c mov 0x1c(%eax),%eax 10862c: 85 c0 test %eax,%eax 10862e: 74 12 je 108642 <== NEVER TAKEN 108630: 83 ec 0c sub $0xc,%esp 108633: 83 c7 18 add $0x18,%edi 108636: 57 push %edi 108637: ff d0 call *%eax 108639: 8b 3d 44 65 12 00 mov 0x126544,%edi 10863f: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 108642: 83 c7 18 add $0x18,%edi 108645: b9 05 00 00 00 mov $0x5,%ecx 10864a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10864c: 31 c0 xor %eax,%eax return 0; } 10864e: 8d 65 f8 lea -0x8(%ebp),%esp 108651: 5e pop %esi 108652: 5f pop %edi 108653: c9 leave 108654: c3 ret 108655: 8d 76 00 lea 0x0(%esi),%esi int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 108658: e8 07 14 00 00 call 109a64 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 10865d: 81 3d 44 65 12 00 80 cmpl $0x128780,0x126544 108664: 87 12 00 108667: 75 83 jne 1085ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108669: e8 3e c0 00 00 call 1146ac <__errno> <== NOT EXECUTED 10866e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108674: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108677: eb d5 jmp 10864e <== NOT EXECUTED 108679: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 10867c: e8 2b c0 00 00 call 1146ac <__errno> <== NOT EXECUTED 108681: 89 c6 mov %eax,%esi <== NOT EXECUTED 108683: e8 24 c0 00 00 call 1146ac <__errno> <== NOT EXECUTED 108688: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10868a: 89 06 mov %eax,(%esi) <== NOT EXECUTED 10868c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108691: eb bb jmp 10864e <== NOT EXECUTED =============================================================================== 00110928 : #include int close( int fd ) { 110928: 55 push %ebp 110929: 89 e5 mov %esp,%ebp 11092b: 56 push %esi 11092c: 53 push %ebx 11092d: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 110930: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 110936: 73 58 jae 110990 iop = rtems_libio_iop(fd); 110938: c1 e3 06 shl $0x6,%ebx 11093b: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 110941: f6 43 15 01 testb $0x1,0x15(%ebx) 110945: 74 49 je 110990 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110947: 8b 43 3c mov 0x3c(%ebx),%eax 11094a: 8b 40 04 mov 0x4(%eax),%eax 11094d: 85 c0 test %eax,%eax 11094f: 74 3b je 11098c <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 110951: 83 ec 0c sub $0xc,%esp 110954: 53 push %ebx 110955: ff d0 call *%eax 110957: 89 c6 mov %eax,%esi 110959: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 11095c: 8b 43 24 mov 0x24(%ebx),%eax 11095f: 85 c0 test %eax,%eax 110961: 74 13 je 110976 <== NEVER TAKEN 110963: 8b 40 1c mov 0x1c(%eax),%eax 110966: 85 c0 test %eax,%eax 110968: 74 0c je 110976 11096a: 83 ec 0c sub $0xc,%esp 11096d: 8d 53 18 lea 0x18(%ebx),%edx 110970: 52 push %edx 110971: ff d0 call *%eax 110973: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 110976: 83 ec 0c sub $0xc,%esp 110979: 53 push %ebx 11097a: e8 09 02 00 00 call 110b88 return rc; 11097f: 83 c4 10 add $0x10,%esp } 110982: 89 f0 mov %esi,%eax 110984: 8d 65 f8 lea -0x8(%ebp),%esp 110987: 5b pop %ebx 110988: 5e pop %esi 110989: c9 leave 11098a: c3 ret 11098b: 90 nop rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 11098c: 31 f6 xor %esi,%esi 11098e: eb cc jmp 11095c <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 110990: e8 87 34 00 00 call 113e1c <__errno> 110995: c7 00 09 00 00 00 movl $0x9,(%eax) 11099b: be ff ff ff ff mov $0xffffffff,%esi 1109a0: eb e0 jmp 110982 =============================================================================== 0010eec0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10eec0: 55 push %ebp 10eec1: 89 e5 mov %esp,%ebp 10eec3: 83 ec 1c sub $0x1c,%esp 10eec6: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 10eec9: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10eecc: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10eecf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10eed6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10eedd: 8d 55 ec lea -0x14(%ebp),%edx 10eee0: 52 push %edx 10eee1: ff 70 0c pushl 0xc(%eax) 10eee4: ff 70 08 pushl 0x8(%eax) 10eee7: e8 d0 0b 00 00 call 10fabc np->major, np->minor, (void *) &args ); if ( status ) { 10eeec: 83 c4 10 add $0x10,%esp 10eeef: 85 c0 test %eax,%eax 10eef1: 75 05 jne 10eef8 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 10eef3: c9 leave 10eef4: c3 ret 10eef5: 8d 76 00 lea 0x0(%esi),%esi np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10eef8: 83 ec 0c sub $0xc,%esp 10eefb: 50 push %eax <== NOT EXECUTED 10eefc: e8 e7 00 00 00 call 10efe8 <== NOT EXECUTED 10ef01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10ef04: c9 leave <== NOT EXECUTED 10ef05: c3 ret <== NOT EXECUTED =============================================================================== 0010ef18 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10ef18: 55 push %ebp 10ef19: 89 e5 mov %esp,%ebp 10ef1b: 57 push %edi 10ef1c: 56 push %esi 10ef1d: 53 push %ebx 10ef1e: 83 ec 1c sub $0x1c,%esp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10ef21: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10ef28: 0f 85 96 00 00 00 jne 10efc4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ef2e: 8b 45 14 mov 0x14(%ebp),%eax 10ef31: 8b 00 mov (%eax),%eax 10ef33: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ef36: 85 c0 test %eax,%eax 10ef38: 0f 84 98 00 00 00 je 10efd6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ef3e: 8b 15 50 f1 11 00 mov 0x11f150,%edx 10ef44: 89 55 e0 mov %edx,-0x20(%ebp) 10ef47: 85 d2 test %edx,%edx 10ef49: 74 38 je 10ef83 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10ef4b: 31 c0 xor %eax,%eax 10ef4d: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10ef4f: 8d 04 80 lea (%eax,%eax,4),%eax 10ef52: 8b 55 e4 mov -0x1c(%ebp),%edx 10ef55: 8d 3c 82 lea (%edx,%eax,4),%edi 10ef58: 8b 37 mov (%edi),%esi 10ef5a: 85 f6 test %esi,%esi 10ef5c: 74 1d je 10ef7b continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10ef5e: 50 push %eax 10ef5f: ff 75 0c pushl 0xc(%ebp) 10ef62: 56 push %esi 10ef63: ff 75 08 pushl 0x8(%ebp) 10ef66: e8 41 25 00 00 call 1114ac 10ef6b: 83 c4 10 add $0x10,%esp 10ef6e: 85 c0 test %eax,%eax 10ef70: 75 09 jne 10ef7b <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10ef72: 8b 45 0c mov 0xc(%ebp),%eax 10ef75: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10ef79: 74 21 je 10ef9c <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ef7b: 43 inc %ebx 10ef7c: 89 d8 mov %ebx,%eax 10ef7e: 39 5d e0 cmp %ebx,-0x20(%ebp) 10ef81: 77 cc ja 10ef4f pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10ef83: e8 6c 19 00 00 call 1108f4 <__errno> 10ef88: c7 00 02 00 00 00 movl $0x2,(%eax) 10ef8e: b8 ff ff ff ff mov $0xffffffff,%eax } 10ef93: 8d 65 f4 lea -0xc(%ebp),%esp 10ef96: 5b pop %ebx 10ef97: 5e pop %esi 10ef98: 5f pop %edi 10ef99: c9 leave 10ef9a: c3 ret 10ef9b: 90 nop if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10ef9c: 8b 55 14 mov 0x14(%ebp),%edx 10ef9f: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10efa1: c7 42 08 80 10 12 00 movl $0x121080,0x8(%edx) pathloc->ops = &devFS_ops; 10efa8: c7 42 0c 20 10 12 00 movl $0x121020,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10efaf: a1 d8 10 12 00 mov 0x1210d8,%eax 10efb4: 8b 40 28 mov 0x28(%eax),%eax 10efb7: 89 42 10 mov %eax,0x10(%edx) 10efba: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10efbc: 8d 65 f4 lea -0xc(%ebp),%esp 10efbf: 5b pop %ebx 10efc0: 5e pop %esi 10efc1: 5f pop %edi 10efc2: c9 leave 10efc3: c3 ret int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10efc4: e8 2b 19 00 00 call 1108f4 <__errno> <== NOT EXECUTED 10efc9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10efcf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10efd4: eb e6 jmp 10efbc <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10efd6: e8 19 19 00 00 call 1108f4 <__errno> <== NOT EXECUTED 10efdb: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10efe1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10efe4: eb d6 jmp 10efbc <== NOT EXECUTED =============================================================================== 00107b8c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 107b8c: 55 push %ebp 107b8d: 89 e5 mov %esp,%ebp 107b8f: 57 push %edi 107b90: 53 push %ebx 107b91: 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( 107b94: 83 ec 0c sub $0xc,%esp 107b97: a1 50 f1 11 00 mov 0x11f150,%eax 107b9c: 8d 04 80 lea (%eax,%eax,4),%eax 107b9f: c1 e0 02 shl $0x2,%eax 107ba2: 50 push %eax 107ba3: e8 88 6e 00 00 call 10ea30 <_Workspace_Allocate> 107ba8: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107baa: 83 c4 10 add $0x10,%esp 107bad: 85 c0 test %eax,%eax 107baf: 74 2b je 107bdc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107bb1: a1 50 f1 11 00 mov 0x11f150,%eax 107bb6: 8d 0c 80 lea (%eax,%eax,4),%ecx 107bb9: c1 e1 02 shl $0x2,%ecx 107bbc: 31 c0 xor %eax,%eax 107bbe: 89 d7 mov %edx,%edi 107bc0: 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; 107bc2: c7 43 24 80 10 12 00 movl $0x121080,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107bc9: c7 43 28 20 10 12 00 movl $0x121020,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107bd0: 89 53 1c mov %edx,0x1c(%ebx) 107bd3: 31 c0 xor %eax,%eax return 0; } 107bd5: 8d 65 f8 lea -0x8(%ebp),%esp 107bd8: 5b pop %ebx 107bd9: 5f pop %edi 107bda: c9 leave 107bdb: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107bdc: e8 13 8d 00 00 call 1108f4 <__errno> 107be1: c7 00 0c 00 00 00 movl $0xc,(%eax) 107be7: b8 ff ff ff ff mov $0xffffffff,%eax 107bec: eb e7 jmp 107bd5 =============================================================================== 00107d48 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107d48: 55 push %ebp 107d49: 89 e5 mov %esp,%ebp 107d4b: 83 ec 1c sub $0x1c,%esp 107d4e: 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; 107d51: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107d54: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107d57: 8b 55 0c mov 0xc(%ebp),%edx 107d5a: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107d5d: 8b 55 10 mov 0x10(%ebp),%edx 107d60: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107d63: 8d 55 e8 lea -0x18(%ebp),%edx 107d66: 52 push %edx 107d67: ff 70 0c pushl 0xc(%eax) 107d6a: ff 70 08 pushl 0x8(%eax) 107d6d: e8 46 42 00 00 call 10bfb8 np->major, np->minor, (void *) &args ); if ( status ) 107d72: 83 c4 10 add $0x10,%esp 107d75: 85 c0 test %eax,%eax 107d77: 75 07 jne 107d80 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107d79: 8b 45 f4 mov -0xc(%ebp),%eax } 107d7c: c9 leave 107d7d: c3 ret 107d7e: 66 90 xchg %ax,%ax np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d83: 50 push %eax <== NOT EXECUTED 107d84: e8 5f 72 00 00 call 10efe8 <== NOT EXECUTED 107d89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107d8c: c9 leave <== NOT EXECUTED 107d8d: c3 ret <== NOT EXECUTED =============================================================================== 00107bf0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107bf0: 55 push %ebp 107bf1: 89 e5 mov %esp,%ebp 107bf3: 57 push %edi 107bf4: 56 push %esi 107bf5: 53 push %ebx 107bf6: 83 ec 1c sub $0x1c,%esp 107bf9: 8b 7d 08 mov 0x8(%ebp),%edi 107bfc: 8b 4d 10 mov 0x10(%ebp),%ecx 107bff: 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') && 107c02: 80 3f 64 cmpb $0x64,(%edi) 107c05: 0f 84 dd 00 00 00 je 107ce8 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107c0b: 8b 45 0c mov 0xc(%ebp),%eax 107c0e: 25 00 f0 00 00 and $0xf000,%eax 107c13: 3d 00 60 00 00 cmp $0x6000,%eax 107c18: 74 0b je 107c25 <== NEVER TAKEN 107c1a: 3d 00 20 00 00 cmp $0x2000,%eax 107c1f: 0f 85 e3 00 00 00 jne 107d08 <== NEVER TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c25: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c28: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 107c2b: 8b 45 18 mov 0x18(%ebp),%eax 107c2e: 8b 30 mov (%eax),%esi if (!device_name_table) 107c30: 85 f6 test %esi,%esi 107c32: 0f 84 f2 00 00 00 je 107d2a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c38: 8b 15 50 f1 11 00 mov 0x11f150,%edx 107c3e: 85 d2 test %edx,%edx 107c40: 0f 84 d4 00 00 00 je 107d1a <== NEVER TAKEN rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107c46: 31 c0 xor %eax,%eax 107c48: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107c4f: 31 db xor %ebx,%ebx 107c51: 89 7d e4 mov %edi,-0x1c(%ebp) 107c54: 89 d7 mov %edx,%edi 107c56: eb 1a jmp 107c72 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107c58: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107c5b: 50 push %eax <== NOT EXECUTED 107c5c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107c5f: e8 1c 97 00 00 call 111380 <== NOT EXECUTED 107c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c67: 85 c0 test %eax,%eax <== NOT EXECUTED 107c69: 74 65 je 107cd0 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c6b: 43 inc %ebx <== NOT EXECUTED 107c6c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107c6e: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107c70: 73 16 jae 107c88 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107c72: 8d 04 80 lea (%eax,%eax,4),%eax 107c75: 8b 04 86 mov (%esi,%eax,4),%eax 107c78: 85 c0 test %eax,%eax 107c7a: 75 dc jne 107c58 <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107c7c: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c7f: 43 inc %ebx 107c80: 89 d8 mov %ebx,%eax 107c82: 39 fb cmp %edi,%ebx 107c84: 72 ec jb 107c72 107c86: 66 90 xchg %ax,%ax 107c88: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 107c8b: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107c8f: 0f 84 85 00 00 00 je 107d1a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107c95: 9c pushf 107c96: fa cli 107c97: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107c98: 8b 55 e0 mov -0x20(%ebp),%edx 107c9b: 8d 04 92 lea (%edx,%edx,4),%eax 107c9e: 8d 14 86 lea (%esi,%eax,4),%edx 107ca1: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107ca3: 31 c0 xor %eax,%eax 107ca5: b9 ff ff ff ff mov $0xffffffff,%ecx 107caa: f2 ae repnz scas %es:(%edi),%al 107cac: f7 d1 not %ecx 107cae: 49 dec %ecx 107caf: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107cb2: 8b 45 d8 mov -0x28(%ebp),%eax 107cb5: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107cb8: 8b 45 dc mov -0x24(%ebp),%eax 107cbb: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107cbe: 8b 45 0c mov 0xc(%ebp),%eax 107cc1: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107cc4: 53 push %ebx 107cc5: 9d popf 107cc6: 31 c0 xor %eax,%eax return 0; } 107cc8: 8d 65 f4 lea -0xc(%ebp),%esp 107ccb: 5b pop %ebx 107ccc: 5e pop %esi 107ccd: 5f pop %edi 107cce: c9 leave 107ccf: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107cd0: e8 1f 8c 00 00 call 1108f4 <__errno> <== NOT EXECUTED 107cd5: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107cdb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107ce0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107ce3: 5b pop %ebx <== NOT EXECUTED 107ce4: 5e pop %esi <== NOT EXECUTED 107ce5: 5f pop %edi <== NOT EXECUTED 107ce6: c9 leave <== NOT EXECUTED 107ce7: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107ce8: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107cec: 0f 85 19 ff ff ff jne 107c0b <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107cf2: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107cf6: 0f 85 0f ff ff ff jne 107c0b <== NEVER TAKEN 107cfc: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107d00: 0f 85 05 ff ff ff jne 107c0b 107d06: eb be jmp 107cc6 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107d08: e8 e7 8b 00 00 call 1108f4 <__errno> <== NOT EXECUTED 107d0d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d18: eb ae jmp 107cc8 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d1a: e8 d5 8b 00 00 call 1108f4 <__errno> <== NOT EXECUTED 107d1f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d25: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d28: eb 9e jmp 107cc8 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107d2a: e8 c5 8b 00 00 call 1108f4 <__errno> <== NOT EXECUTED 107d2f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107d35: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d38: eb 8e jmp 107cc8 <== NOT EXECUTED =============================================================================== 00107d90 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107d90: 55 push %ebp 107d91: 89 e5 mov %esp,%ebp 107d93: 83 ec 1c sub $0x1c,%esp 107d96: 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; 107d99: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107d9c: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107d9f: 8b 40 14 mov 0x14(%eax),%eax 107da2: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107da5: 8b 45 14 mov 0x14(%ebp),%eax 107da8: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107dab: 8d 45 ec lea -0x14(%ebp),%eax 107dae: 50 push %eax 107daf: ff 72 0c pushl 0xc(%edx) 107db2: ff 72 08 pushl 0x8(%edx) 107db5: e8 12 43 00 00 call 10c0cc np->major, np->minor, (void *) &args ); if ( status ) 107dba: 83 c4 10 add $0x10,%esp 107dbd: 85 c0 test %eax,%eax 107dbf: 75 03 jne 107dc4 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 107dc1: c9 leave 107dc2: c3 ret 107dc3: 90 nop np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107dc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107dc7: 50 push %eax <== NOT EXECUTED 107dc8: e8 1b 72 00 00 call 10efe8 <== NOT EXECUTED 107dcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107dd0: c9 leave <== NOT EXECUTED 107dd1: c3 ret <== NOT EXECUTED =============================================================================== 00107dd4 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107dd4: 55 push %ebp <== NOT EXECUTED 107dd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dd7: 53 push %ebx <== NOT EXECUTED 107dd8: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107ddb: 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; 107dde: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107de1: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107de4: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107de7: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107dea: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107ded: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107df0: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107df3: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107df6: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107df9: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107dfc: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107dff: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107e02: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107e09: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107e0c: 50 push %eax <== NOT EXECUTED 107e0d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107e10: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107e13: e8 00 43 00 00 call 10c118 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107e18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107e1b: 85 c0 test %eax,%eax <== NOT EXECUTED 107e1d: 75 09 jne 107e28 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e1f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e22: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e25: c9 leave <== NOT EXECUTED 107e26: c3 ret <== NOT EXECUTED 107e27: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e28: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e2b: 50 push %eax <== NOT EXECUTED 107e2c: e8 b7 71 00 00 call 10efe8 <== NOT EXECUTED 107e31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e34: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e37: c9 leave <== NOT EXECUTED 107e38: c3 ret <== NOT EXECUTED =============================================================================== 00107e3c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107e3c: 55 push %ebp 107e3d: 89 e5 mov %esp,%ebp 107e3f: 53 push %ebx 107e40: 83 ec 04 sub $0x4,%esp 107e43: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107e46: 8b 45 08 mov 0x8(%ebp),%eax 107e49: 8b 00 mov (%eax),%eax if (!the_dev) 107e4b: 85 c0 test %eax,%eax 107e4d: 74 18 je 107e67 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107e4f: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107e52: 8b 58 08 mov 0x8(%eax),%ebx 107e55: 89 5a 18 mov %ebx,0x18(%edx) 107e58: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107e5b: 8b 40 10 mov 0x10(%eax),%eax 107e5e: 89 42 0c mov %eax,0xc(%edx) 107e61: 31 c0 xor %eax,%eax return 0; } 107e63: 5a pop %edx 107e64: 5b pop %ebx 107e65: c9 leave 107e66: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107e67: e8 88 8a 00 00 call 1108f4 <__errno> <== NOT EXECUTED 107e6c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107e72: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e77: eb ea jmp 107e63 <== NOT EXECUTED =============================================================================== 00107e7c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107e7c: 55 push %ebp 107e7d: 89 e5 mov %esp,%ebp 107e7f: 53 push %ebx 107e80: 83 ec 28 sub $0x28,%esp 107e83: 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; 107e86: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107e89: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107e8c: 8b 48 0c mov 0xc(%eax),%ecx 107e8f: 8b 58 10 mov 0x10(%eax),%ebx 107e92: 89 4d e0 mov %ecx,-0x20(%ebp) 107e95: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107e98: 8b 4d 0c mov 0xc(%ebp),%ecx 107e9b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107e9e: 8b 4d 10 mov 0x10(%ebp),%ecx 107ea1: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107ea4: 8b 40 14 mov 0x14(%eax),%eax 107ea7: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107eaa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107eb1: 8d 45 dc lea -0x24(%ebp),%eax 107eb4: 50 push %eax 107eb5: ff 72 0c pushl 0xc(%edx) 107eb8: ff 72 08 pushl 0x8(%edx) 107ebb: e8 a4 42 00 00 call 10c164 np->major, np->minor, (void *) &args ); if ( status ) 107ec0: 83 c4 10 add $0x10,%esp 107ec3: 85 c0 test %eax,%eax 107ec5: 75 09 jne 107ed0 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107ec7: 8b 45 f4 mov -0xc(%ebp),%eax } 107eca: 8b 5d fc mov -0x4(%ebp),%ebx 107ecd: c9 leave 107ece: c3 ret 107ecf: 90 nop np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ed0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ed3: 50 push %eax <== NOT EXECUTED 107ed4: e8 0f 71 00 00 call 10efe8 <== NOT EXECUTED 107ed9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107edc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107edf: c9 leave <== NOT EXECUTED 107ee0: c3 ret <== NOT EXECUTED =============================================================================== 001131dc : */ int device_close( rtems_libio_t *iop ) { 1131dc: 55 push %ebp 1131dd: 89 e5 mov %esp,%ebp 1131df: 83 ec 1c sub $0x1c,%esp 1131e2: 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; 1131e5: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 1131e8: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 1131eb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 1131f2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 1131f9: 8d 55 ec lea -0x14(%ebp),%edx 1131fc: 52 push %edx 1131fd: ff 70 54 pushl 0x54(%eax) 113200: ff 70 50 pushl 0x50(%eax) 113203: e8 88 08 00 00 call 113a90 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 113208: 83 c4 10 add $0x10,%esp 11320b: 85 c0 test %eax,%eax 11320d: 75 05 jne 113214 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 11320f: c9 leave 113210: c3 ret 113211: 8d 76 00 lea 0x0(%esi),%esi the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 113214: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113217: 50 push %eax <== NOT EXECUTED 113218: e8 3f 0b 00 00 call 113d5c <== NOT EXECUTED 11321d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 113220: c9 leave <== NOT EXECUTED 113221: c3 ret <== NOT EXECUTED =============================================================================== 001130c4 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1130c4: 55 push %ebp 1130c5: 89 e5 mov %esp,%ebp 1130c7: 83 ec 1c sub $0x1c,%esp 1130ca: 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; 1130cd: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 1130d0: 8b 55 0c mov 0xc(%ebp),%edx 1130d3: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1130d6: 8b 55 10 mov 0x10(%ebp),%edx 1130d9: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 1130dc: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 1130df: 8d 55 e8 lea -0x18(%ebp),%edx 1130e2: 52 push %edx 1130e3: ff 70 54 pushl 0x54(%eax) 1130e6: ff 70 50 pushl 0x50(%eax) 1130e9: e8 ee 09 00 00 call 113adc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1130ee: 83 c4 10 add $0x10,%esp 1130f1: 85 c0 test %eax,%eax 1130f3: 75 07 jne 1130fc <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 1130f5: 8b 45 f4 mov -0xc(%ebp),%eax } 1130f8: c9 leave 1130f9: c3 ret 1130fa: 66 90 xchg %ax,%ax the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1130fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1130ff: 50 push %eax <== NOT EXECUTED 113100: e8 57 0c 00 00 call 113d5c <== NOT EXECUTED 113105: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 113108: c9 leave <== NOT EXECUTED 113109: c3 ret <== NOT EXECUTED =============================================================================== 00113224 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113224: 55 push %ebp 113225: 89 e5 mov %esp,%ebp 113227: 83 ec 1c sub $0x1c,%esp 11322a: 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; 11322d: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113230: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 113233: 8b 40 14 mov 0x14(%eax),%eax 113236: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 113239: 8b 45 14 mov 0x14(%ebp),%eax 11323c: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 11323f: 8d 45 ec lea -0x14(%ebp),%eax 113242: 50 push %eax 113243: ff 72 54 pushl 0x54(%edx) 113246: ff 72 50 pushl 0x50(%edx) 113249: e8 da 08 00 00 call 113b28 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 11324e: 83 c4 10 add $0x10,%esp 113251: 85 c0 test %eax,%eax 113253: 75 03 jne 113258 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 113255: c9 leave 113256: c3 ret 113257: 90 nop the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113258: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11325b: 50 push %eax <== NOT EXECUTED 11325c: e8 fb 0a 00 00 call 113d5c <== NOT EXECUTED 113261: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 113264: c9 leave <== NOT EXECUTED 113265: c3 ret <== NOT EXECUTED =============================================================================== 00113174 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113174: 55 push %ebp <== NOT EXECUTED 113175: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113177: 53 push %ebx <== NOT EXECUTED 113178: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 11317b: 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; 11317e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 113181: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 113184: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 113187: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 11318a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 11318d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 113190: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 113193: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 113196: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 113199: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 11319c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 11319f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 1131a2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 1131a9: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 1131ac: 50 push %eax <== NOT EXECUTED 1131ad: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 1131b0: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 1131b3: e8 bc 09 00 00 call 113b74 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1131b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1131bb: 85 c0 test %eax,%eax <== NOT EXECUTED 1131bd: 75 09 jne 1131c8 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1131bf: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1131c2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1131c5: c9 leave <== NOT EXECUTED 1131c6: c3 ret <== NOT EXECUTED 1131c7: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 1131c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1131cb: 50 push %eax <== NOT EXECUTED 1131cc: e8 8b 0b 00 00 call 113d5c <== NOT EXECUTED 1131d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 1131d4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1131d7: c9 leave <== NOT EXECUTED 1131d8: c3 ret <== NOT EXECUTED =============================================================================== 0011310c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 11310c: 55 push %ebp 11310d: 89 e5 mov %esp,%ebp 11310f: 53 push %ebx 113110: 83 ec 28 sub $0x28,%esp 113113: 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; 113116: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113119: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 11311c: 8b 48 0c mov 0xc(%eax),%ecx 11311f: 8b 58 10 mov 0x10(%eax),%ebx 113122: 89 4d e0 mov %ecx,-0x20(%ebp) 113125: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 113128: 8b 4d 0c mov 0xc(%ebp),%ecx 11312b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 11312e: 8b 4d 10 mov 0x10(%ebp),%ecx 113131: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 113134: 8b 40 14 mov 0x14(%eax),%eax 113137: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 11313a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 113141: 8d 45 dc lea -0x24(%ebp),%eax 113144: 50 push %eax 113145: ff 72 54 pushl 0x54(%edx) 113148: ff 72 50 pushl 0x50(%edx) 11314b: e8 70 0a 00 00 call 113bc0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113150: 83 c4 10 add $0x10,%esp 113153: 85 c0 test %eax,%eax 113155: 75 09 jne 113160 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 113157: 8b 45 f4 mov -0xc(%ebp),%eax } 11315a: 8b 5d fc mov -0x4(%ebp),%ebx 11315d: c9 leave 11315e: c3 ret 11315f: 90 nop the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113160: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113163: 50 push %eax <== NOT EXECUTED 113164: e8 f3 0b 00 00 call 113d5c <== NOT EXECUTED 113169: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 11316c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11316f: c9 leave <== NOT EXECUTED 113170: c3 ret <== NOT EXECUTED =============================================================================== 0010a2c4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10a2c4: 55 push %ebp 10a2c5: 89 e5 mov %esp,%ebp 10a2c7: 53 push %ebx 10a2c8: 83 ec 04 sub $0x4,%esp 10a2cb: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10a2cd: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10a2d3: 85 d2 test %edx,%edx 10a2d5: 74 4d je 10a324 rtems_interrupt_disable (level); 10a2d7: 9c pushf 10a2d8: fa cli 10a2d9: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10a2da: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a2e0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a2e6: 39 d1 cmp %edx,%ecx 10a2e8: 74 38 je 10a322 10a2ea: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 10a2ec: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10a2f3: 00 00 00 rtems_interrupt_enable (level); 10a2f6: 50 push %eax 10a2f7: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10a2f8: 50 push %eax 10a2f9: 6a 00 push $0x0 10a2fb: 6a 00 push $0x0 10a2fd: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a303: e8 a0 19 00 00 call 10bca8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a308: 83 c4 10 add $0x10,%esp 10a30b: 85 c0 test %eax,%eax 10a30d: 75 1a jne 10a329 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 10a30f: 9c pushf 10a310: fa cli 10a311: 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) { 10a312: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a318: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a31e: 39 d1 cmp %edx,%ecx 10a320: 75 ca jne 10a2ec <== NEVER TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 10a322: 50 push %eax 10a323: 9d popf } } 10a324: 8b 5d fc mov -0x4(%ebp),%ebx 10a327: c9 leave 10a328: c3 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a329: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a32c: 50 push %eax <== NOT EXECUTED 10a32d: e8 ae 1f 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 00108d58 : int dup2( int fildes, int fildes2 ) { 108d58: 55 push %ebp 108d59: 89 e5 mov %esp,%ebp 108d5b: 57 push %edi 108d5c: 56 push %esi 108d5d: 53 push %ebx 108d5e: 83 ec 64 sub $0x64,%esp 108d61: 8b 75 08 mov 0x8(%ebp),%esi 108d64: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108d67: 8d 5d a0 lea -0x60(%ebp),%ebx 108d6a: 53 push %ebx 108d6b: 56 push %esi 108d6c: e8 87 05 00 00 call 1092f8 if ( status == -1 ) 108d71: 83 c4 10 add $0x10,%esp 108d74: 40 inc %eax 108d75: 75 0d jne 108d84 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d77: b8 ff ff ff ff mov $0xffffffff,%eax } 108d7c: 8d 65 f4 lea -0xc(%ebp),%esp 108d7f: 5b pop %ebx 108d80: 5e pop %esi 108d81: 5f pop %edi 108d82: c9 leave 108d83: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108d84: 83 ec 08 sub $0x8,%esp 108d87: 53 push %ebx 108d88: 57 push %edi 108d89: e8 6a 05 00 00 call 1092f8 if ( status == -1 ) 108d8e: 83 c4 10 add $0x10,%esp 108d91: 40 inc %eax 108d92: 74 e3 je 108d77 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d94: 50 push %eax 108d95: 57 push %edi 108d96: 6a 00 push $0x0 <== NOT EXECUTED 108d98: 56 push %esi <== NOT EXECUTED 108d99: e8 f6 01 00 00 call 108f94 <== NOT EXECUTED 108d9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108da1: eb d9 jmp 108d7c <== NOT EXECUTED =============================================================================== 00109e38 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109e38: 55 push %ebp <== NOT EXECUTED 109e39: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e3b: 53 push %ebx <== NOT EXECUTED 109e3c: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109e3f: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 109e43: 74 1b je 109e60 <== NOT EXECUTED 109e45: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 109e48: 8b 1d c4 50 12 00 mov 0x1250c4,%ebx <== NOT EXECUTED 109e4e: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 109e53: 74 0b je 109e60 <== NOT EXECUTED 109e55: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109e57: 74 07 je 109e60 <== NOT EXECUTED 109e59: 3c 0a cmp $0xa,%al <== NOT EXECUTED 109e5b: 75 13 jne 109e70 <== NOT EXECUTED 109e5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109e60: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109e63: e8 94 fe ff ff call 109cfc <== NOT EXECUTED } } 109e68: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109e6b: c9 leave <== NOT EXECUTED 109e6c: c3 ret <== NOT EXECUTED 109e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109e70: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 109e74: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 109e77: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 109e7a: 50 push %eax <== NOT EXECUTED 109e7b: 52 push %edx <== NOT EXECUTED 109e7c: 6a 02 push $0x2 <== NOT EXECUTED 109e7e: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 109e81: 50 push %eax <== NOT EXECUTED 109e82: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 109e85: e8 3e fd ff ff call 109bc8 <== NOT EXECUTED tty->column += 2; 109e8a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109e8d: 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')) { 109e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 109e94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109e97: c9 leave <== NOT EXECUTED 109e98: c3 ret <== NOT EXECUTED =============================================================================== 00108730 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 108730: 55 push %ebp <== NOT EXECUTED 108731: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108733: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 108736: a1 a4 91 12 00 mov 0x1291a4,%eax <== NOT EXECUTED 10873b: 85 c0 test %eax,%eax <== NOT EXECUTED 10873d: 74 0c je 10874b <== NOT EXECUTED fclose(group_fp); 10873f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108742: 50 push %eax <== NOT EXECUTED 108743: e8 e0 c1 00 00 call 114928 <== NOT EXECUTED 108748: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10874b: c9 leave <== NOT EXECUTED 10874c: c3 ret <== NOT EXECUTED =============================================================================== 00108750 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 108750: 55 push %ebp <== NOT EXECUTED 108751: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108753: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 108756: a1 a4 90 12 00 mov 0x1290a4,%eax <== NOT EXECUTED 10875b: 85 c0 test %eax,%eax <== NOT EXECUTED 10875d: 74 0c je 10876b <== NOT EXECUTED fclose(passwd_fp); 10875f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108762: 50 push %eax <== NOT EXECUTED 108763: e8 c0 c1 00 00 call 114928 <== NOT EXECUTED 108768: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10876b: c9 leave <== NOT EXECUTED 10876c: c3 ret <== NOT EXECUTED =============================================================================== 00109e9c : * 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) { 109e9c: 55 push %ebp <== NOT EXECUTED 109e9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e9f: 57 push %edi <== NOT EXECUTED 109ea0: 56 push %esi <== NOT EXECUTED 109ea1: 53 push %ebx <== NOT EXECUTED 109ea2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109ea5: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109ea7: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109ea9: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109eac: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109eae: 0f 84 84 00 00 00 je 109f38 <== NOT EXECUTED return; if (lineFlag) { 109eb4: 85 d2 test %edx,%edx <== NOT EXECUTED 109eb6: 0f 85 84 00 00 00 jne 109f40 <== NOT EXECUTED 109ebc: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109ebf: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109ec2: eb 1d jmp 109ee1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109ec4: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109ec7: 0f 85 37 01 00 00 jne 10a004 <== NOT EXECUTED 109ecd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109ed0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109ed3: 85 d2 test %edx,%edx <== NOT EXECUTED 109ed5: 74 61 je 109f38 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 109ed7: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 109eda: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109edc: 74 5a je 109f38 <== NOT EXECUTED 109ede: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 109ee1: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109ee4: 49 dec %ecx <== NOT EXECUTED 109ee5: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 109ee8: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 109eeb: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109eee: 74 e0 je 109ed0 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109ef0: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 109ef3: 85 f6 test %esi,%esi <== NOT EXECUTED 109ef5: 75 09 jne 109f00 <== NOT EXECUTED 109ef7: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109efa: 0f 84 f0 00 00 00 je 109ff0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109f00: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109f02: 74 58 je 109f5c <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f04: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f07: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 109f0a: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 109f0f: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f13: 75 af jne 109ec4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109f15: 51 push %ecx <== NOT EXECUTED 109f16: 53 push %ebx <== NOT EXECUTED 109f17: 6a 03 push $0x3 <== NOT EXECUTED 109f19: 68 52 17 12 00 push $0x121752 <== NOT EXECUTED 109f1e: e8 a5 fc ff ff call 109bc8 <== NOT EXECUTED if (tty->column) 109f23: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109f26: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f29: 85 c0 test %eax,%eax <== NOT EXECUTED 109f2b: 74 a3 je 109ed0 <== NOT EXECUTED tty->column--; 109f2d: 48 dec %eax <== NOT EXECUTED 109f2e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 109f31: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f34: 85 d2 test %edx,%edx <== NOT EXECUTED 109f36: 75 9f jne 109ed7 <== NOT EXECUTED break; } } 109f38: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f3b: 5b pop %ebx <== NOT EXECUTED 109f3c: 5e pop %esi <== NOT EXECUTED 109f3d: 5f pop %edi <== NOT EXECUTED 109f3e: c9 leave <== NOT EXECUTED 109f3f: c3 ret <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109f40: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109f43: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109f46: 0f 84 94 00 00 00 je 109fe0 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109f4c: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109f4f: 0f 84 eb 00 00 00 je 10a040 <== NOT EXECUTED 109f55: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109f58: eb 87 jmp 109ee1 <== NOT EXECUTED 109f5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109f5c: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f5f: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f61: 74 46 je 109fa9 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109f63: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 109f68: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 109f6b: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 109f6d: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 109f73: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109f76: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 109f79: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 109f7c: eb 10 jmp 109f8e <== NOT EXECUTED 109f7e: 66 90 xchg %ax,%ax <== NOT EXECUTED 109f80: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109f83: 85 d2 test %edx,%edx <== NOT EXECUTED 109f85: 74 03 je 109f8a <== NOT EXECUTED col += 2; 109f87: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f8a: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109f8c: 74 18 je 109fa6 <== NOT EXECUTED c = tty->cbuf[i++]; 109f8e: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 109f91: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 109f92: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 109f95: 74 41 je 109fd8 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 109f97: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109f9a: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109f9f: 75 df jne 109f80 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109fa1: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fa2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109fa4: 75 e8 jne 109f8e <== NOT EXECUTED 109fa6: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109fa9: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 109fac: 0f 8d 1e ff ff ff jge 109ed0 <== NOT EXECUTED 109fb2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 109fb4: 50 push %eax <== NOT EXECUTED 109fb5: 53 push %ebx <== NOT EXECUTED 109fb6: 6a 01 push $0x1 <== NOT EXECUTED 109fb8: 68 54 17 12 00 push $0x121754 <== NOT EXECUTED 109fbd: e8 06 fc ff ff call 109bc8 <== NOT EXECUTED tty->column--; 109fc2: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109fc5: 48 dec %eax <== NOT EXECUTED 109fc6: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109fc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109fcc: 39 c6 cmp %eax,%esi <== NOT EXECUTED 109fce: 7c e4 jl 109fb4 <== NOT EXECUTED 109fd0: e9 fb fe ff ff jmp 109ed0 <== NOT EXECUTED 109fd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 109fd8: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 109fdb: 46 inc %esi <== NOT EXECUTED 109fdc: eb ac jmp 109f8a <== NOT EXECUTED 109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109fe0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109fe7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109fea: 5b pop %ebx <== NOT EXECUTED 109feb: 5e pop %esi <== NOT EXECUTED 109fec: 5f pop %edi <== NOT EXECUTED 109fed: c9 leave <== NOT EXECUTED 109fee: c3 ret <== NOT EXECUTED 109fef: 90 nop <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 109ff0: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 109ff4: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 109ff6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ff9: 5b pop %ebx <== NOT EXECUTED 109ffa: 5e pop %esi <== NOT EXECUTED 109ffb: 5f pop %edi <== NOT EXECUTED 109ffc: 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); 109ffd: e9 36 fe ff ff jmp 109e38 <== NOT EXECUTED 10a002: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 10a004: 57 push %edi <== NOT EXECUTED 10a005: 53 push %ebx <== NOT EXECUTED 10a006: 6a 03 push $0x3 <== NOT EXECUTED 10a008: 68 52 17 12 00 push $0x121752 <== NOT EXECUTED 10a00d: e8 b6 fb ff ff call 109bc8 <== NOT EXECUTED if (tty->column) 10a012: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a015: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a018: 85 c0 test %eax,%eax <== NOT EXECUTED 10a01a: 74 04 je 10a020 <== NOT EXECUTED tty->column--; 10a01c: 48 dec %eax <== NOT EXECUTED 10a01d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 10a020: a1 c4 50 12 00 mov 0x1250c4,%eax <== NOT EXECUTED 10a025: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 10a029: 0f 84 e6 fe ff ff je 109f15 <== NOT EXECUTED 10a02f: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 10a033: 0f 85 dc fe ff ff jne 109f15 <== NOT EXECUTED 10a039: e9 92 fe ff ff jmp 109ed0 <== NOT EXECUTED 10a03e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 10a040: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 10a047: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 10a04b: 89 da mov %ebx,%edx <== NOT EXECUTED 10a04d: e8 e6 fd ff ff call 109e38 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 10a052: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 10a056: 0f 84 dc fe ff ff je 109f38 <== NOT EXECUTED echo ('\n', tty); 10a05c: 89 da mov %ebx,%edx <== NOT EXECUTED 10a05e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a063: eb 91 jmp 109ff6 <== NOT EXECUTED =============================================================================== 00108f94 : int fcntl( int fd, int cmd, ... ) { 108f94: 55 push %ebp 108f95: 89 e5 mov %esp,%ebp 108f97: 57 push %edi 108f98: 56 push %esi 108f99: 53 push %ebx 108f9a: 83 ec 1c sub $0x1c,%esp 108f9d: 8b 5d 08 mov 0x8(%ebp),%ebx 108fa0: 8b 55 0c mov 0xc(%ebp),%edx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 108fa3: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 108fa6: 8b 35 4c 51 12 00 mov 0x12514c,%esi 108fac: 39 f3 cmp %esi,%ebx 108fae: 0f 83 3c 01 00 00 jae 1090f0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108fb4: a1 e0 91 12 00 mov 0x1291e0,%eax 108fb9: c1 e3 06 shl $0x6,%ebx 108fbc: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108fbf: 8b 4b 14 mov 0x14(%ebx),%ecx 108fc2: f6 c5 01 test $0x1,%ch 108fc5: 0f 84 25 01 00 00 je 1090f0 <== NEVER TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108fcb: 83 fa 09 cmp $0x9,%edx 108fce: 76 14 jbe 108fe4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 108fd0: e8 c3 bf 00 00 call 114f98 <__errno> 108fd5: c7 00 16 00 00 00 movl $0x16,(%eax) 108fdb: be ff ff ff ff mov $0xffffffff,%esi 108fe0: eb 1a jmp 108ffc 108fe2: 66 90 xchg %ax,%ax /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108fe4: ff 24 95 d0 32 12 00 jmp *0x1232d0(,%edx,4) 108feb: 90 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 108fec: e8 a7 bf 00 00 call 114f98 <__errno> 108ff1: c7 00 86 00 00 00 movl $0x86,(%eax) 108ff7: be ff ff ff ff mov $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 108ffc: 89 f0 mov %esi,%eax 108ffe: 8d 65 f4 lea -0xc(%ebp),%esp 109001: 5b pop %ebx 109002: 5e pop %esi 109003: 5f pop %edi 109004: c9 leave 109005: c3 ret 109006: 66 90 xchg %ax,%ax case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 109008: 83 ec 0c sub $0xc,%esp 10900b: ff 37 pushl (%edi) 10900d: 89 55 e0 mov %edx,-0x20(%ebp) 109010: e8 03 07 00 00 call 109718 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 109015: 25 01 02 00 00 and $0x201,%eax 10901a: 8b 4b 14 mov 0x14(%ebx),%ecx 10901d: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 109023: 09 c8 or %ecx,%eax 109025: 89 43 14 mov %eax,0x14(%ebx) 109028: 31 f6 xor %esi,%esi 10902a: 83 c4 10 add $0x10,%esp 10902d: 8b 55 e0 mov -0x20(%ebp),%edx * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 109030: 8b 43 3c mov 0x3c(%ebx),%eax 109033: 8b 40 30 mov 0x30(%eax),%eax 109036: 85 c0 test %eax,%eax 109038: 74 c2 je 108ffc <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 10903a: 83 ec 08 sub $0x8,%esp 10903d: 53 push %ebx 10903e: 52 push %edx 10903f: ff d0 call *%eax 109041: 89 c3 mov %eax,%ebx if (err) { 109043: 83 c4 10 add $0x10,%esp 109046: 85 c0 test %eax,%eax 109048: 74 b2 je 108ffc <== ALWAYS TAKEN errno = err; 10904a: e8 49 bf 00 00 call 114f98 <__errno> <== NOT EXECUTED 10904f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 109051: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 109056: 89 f0 mov %esi,%eax <== NOT EXECUTED 109058: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10905b: 5b pop %ebx <== NOT EXECUTED 10905c: 5e pop %esi <== NOT EXECUTED 10905d: 5f pop %edi <== NOT EXECUTED 10905e: c9 leave <== NOT EXECUTED 10905f: c3 ret <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 109060: 83 ec 0c sub $0xc,%esp 109063: 51 push %ecx 109064: 89 55 e0 mov %edx,-0x20(%ebp) 109067: e8 c0 04 00 00 call 10952c 10906c: 89 c6 mov %eax,%esi 10906e: 83 c4 10 add $0x10,%esp 109071: 8b 55 e0 mov -0x20(%ebp),%edx /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 109074: 85 f6 test %esi,%esi 109076: 79 b8 jns 109030 <== ALWAYS TAKEN 109078: eb 82 jmp 108ffc <== NOT EXECUTED 10907a: 66 90 xchg %ax,%ax <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 10907c: 8b 07 mov (%edi),%eax 10907e: 85 c0 test %eax,%eax 109080: 74 52 je 1090d4 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 109082: 80 cd 08 or $0x8,%ch 109085: 89 4b 14 mov %ecx,0x14(%ebx) 109088: 31 f6 xor %esi,%esi 10908a: eb a4 jmp 109030 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 10908c: 89 ce mov %ecx,%esi 10908e: c1 ee 0b shr $0xb,%esi 109091: 83 e6 01 and $0x1,%esi 109094: eb 9a jmp 109030 109096: 66 90 xchg %ax,%ax * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 109098: 8b 3f mov (%edi),%edi if ( fd2 ) 10909a: 85 ff test %edi,%edi 10909c: 74 6a je 109108 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 10909e: 39 fe cmp %edi,%esi <== NOT EXECUTED 1090a0: 77 42 ja 1090e4 <== NOT EXECUTED 1090a2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1090a9: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 1090ab: 8b 73 3c mov 0x3c(%ebx),%esi 1090ae: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 1090b1: 8b 73 38 mov 0x38(%ebx),%esi 1090b4: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 1090b7: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 1090ba: 83 c7 18 add $0x18,%edi 1090bd: 8d 73 18 lea 0x18(%ebx),%esi 1090c0: b9 05 00 00 00 mov $0x5,%ecx 1090c5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 1090c7: 8b 75 e4 mov -0x1c(%ebp),%esi 1090ca: 29 c6 sub %eax,%esi 1090cc: c1 fe 06 sar $0x6,%esi 1090cf: eb a3 jmp 109074 1090d1: 8d 76 00 lea 0x0(%esi),%esi */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 1090d4: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 1090d7: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 1090da: 31 f6 xor %esi,%esi <== NOT EXECUTED 1090dc: e9 4f ff ff ff jmp 109030 <== NOT EXECUTED 1090e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 1090e4: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 1090e7: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 1090ea: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1090ed: eb bc jmp 1090ab <== NOT EXECUTED 1090ef: 90 nop <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1090f0: e8 a3 be 00 00 call 114f98 <__errno> <== NOT EXECUTED 1090f5: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1090fb: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 109100: e9 f7 fe ff ff jmp 108ffc <== NOT EXECUTED 109105: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 109108: 89 55 e0 mov %edx,-0x20(%ebp) 10910b: e8 7c 05 00 00 call 10968c 109110: 89 c7 mov %eax,%edi if ( diop == 0 ) { 109112: 85 c0 test %eax,%eax 109114: 8b 55 e0 mov -0x20(%ebp),%edx 109117: 0f 84 34 ff ff ff je 109051 <== NEVER TAKEN 10911d: 89 45 e4 mov %eax,-0x1c(%ebp) 109120: a1 e0 91 12 00 mov 0x1291e0,%eax 109125: 8b 4b 14 mov 0x14(%ebx),%ecx 109128: eb 81 jmp 1090ab =============================================================================== 0010914c : #include int fdatasync( int fd ) { 10914c: 55 push %ebp 10914d: 89 e5 mov %esp,%ebp 10914f: 83 ec 08 sub $0x8,%esp 109152: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 109155: 3b 05 4c 51 12 00 cmp 0x12514c,%eax 10915b: 73 27 jae 109184 iop = rtems_libio_iop( fd ); 10915d: c1 e0 06 shl $0x6,%eax 109160: 03 05 e0 91 12 00 add 0x1291e0,%eax rtems_libio_check_is_open(iop); 109166: 8b 50 14 mov 0x14(%eax),%edx 109169: f6 c6 01 test $0x1,%dh 10916c: 74 16 je 109184 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10916e: 83 e2 04 and $0x4,%edx 109171: 74 25 je 109198 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 109173: 8b 50 3c mov 0x3c(%eax),%edx 109176: 8b 52 2c mov 0x2c(%edx),%edx 109179: 85 d2 test %edx,%edx 10917b: 74 28 je 1091a5 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 10917d: 89 45 08 mov %eax,0x8(%ebp) } 109180: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 109181: ff e2 jmp *%edx 109183: 90 nop { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 109184: e8 0f be 00 00 call 114f98 <__errno> 109189: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 10918f: b8 ff ff ff ff mov $0xffffffff,%eax 109194: c9 leave 109195: c3 ret 109196: 66 90 xchg %ax,%ax rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 109198: e8 fb bd 00 00 call 114f98 <__errno> 10919d: c7 00 16 00 00 00 movl $0x16,(%eax) 1091a3: eb ea jmp 10918f /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1091a5: e8 ee bd 00 00 call 114f98 <__errno> 1091aa: c7 00 86 00 00 00 movl $0x86,(%eax) 1091b0: eb dd jmp 10918f =============================================================================== 0010f6a8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f6a8: 55 push %ebp 10f6a9: 89 e5 mov %esp,%ebp 10f6ab: 57 push %edi 10f6ac: 56 push %esi 10f6ad: 53 push %ebx 10f6ae: 83 ec 30 sub $0x30,%esp 10f6b1: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f6b4: 6a 00 push $0x0 10f6b6: 6a 00 push $0x0 10f6b8: ff 35 a8 6f 12 00 pushl 0x126fa8 10f6be: e8 e5 c5 ff ff call 10bca8 10f6c3: 83 c4 10 add $0x10,%esp 10f6c6: 85 c0 test %eax,%eax 10f6c8: 74 12 je 10f6dc <== NEVER TAKEN 10f6ca: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 10f6cf: 89 f8 mov %edi,%eax 10f6d1: 8d 65 f4 lea -0xc(%ebp),%esp 10f6d4: 5b pop %ebx 10f6d5: 5e pop %esi 10f6d6: 5f pop %edi 10f6d7: c9 leave 10f6d8: c3 ret 10f6d9: 8d 76 00 lea 0x0(%esi),%esi if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10f6dc: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 10f6de: 85 db test %ebx,%ebx <== NOT EXECUTED 10f6e0: 74 7a je 10f75c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f6e2: 52 push %edx <== NOT EXECUTED 10f6e3: 6a 00 push $0x0 <== NOT EXECUTED 10f6e5: 6a 00 push $0x0 <== NOT EXECUTED 10f6e7: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f6ea: e8 b9 c5 ff ff call 10bca8 <== NOT EXECUTED 10f6ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f6f2: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f6f5: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f6f7: f7 d7 not %edi <== NOT EXECUTED 10f6f9: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f6fc: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10f6fe: 85 c0 test %eax,%eax <== NOT EXECUTED 10f700: 0f 84 72 02 00 00 je 10f978 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f706: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f709: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f70f: e8 90 c6 ff ff call 10bda4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f714: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f717: 85 ff test %edi,%edi <== NOT EXECUTED 10f719: 75 b4 jne 10f6cf <== NOT EXECUTED return err; pipe = *pipep; 10f71b: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f71d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f720: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10f723: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f726: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f729: 0f 84 d1 01 00 00 je 10f900 <== NOT EXECUTED 10f72f: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f732: 0f 84 88 01 00 00 je 10f8c0 <== NOT EXECUTED 10f738: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f73b: 0f 84 f7 00 00 00 je 10f838 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 10f741: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f744: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f747: e8 58 c6 ff ff call 10bda4 <== NOT EXECUTED 10f74c: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 10f74e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 10f751: 89 f8 mov %edi,%eax <== NOT EXECUTED 10f753: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f756: 5b pop %ebx <== NOT EXECUTED 10f757: 5e pop %esi <== NOT EXECUTED 10f758: 5f pop %edi <== NOT EXECUTED 10f759: c9 leave <== NOT EXECUTED 10f75a: c3 ret <== NOT EXECUTED 10f75b: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f75c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f75f: 6a 34 push $0x34 <== NOT EXECUTED 10f761: e8 f6 90 ff ff call 10885c <== NOT EXECUTED 10f766: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f768: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED if (pipe == NULL) 10f76b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f76e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f770: 0f 84 06 03 00 00 je 10fa7c <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f776: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 10f77b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f77d: 89 df mov %ebx,%edi <== NOT EXECUTED 10f77f: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f781: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f788: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f78b: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f790: e8 c7 90 ff ff call 10885c <== NOT EXECUTED 10f795: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f797: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f79a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f79c: 0f 84 cc 02 00 00 je 10fa6e <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f7a2: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f7a5: 50 push %eax <== NOT EXECUTED 10f7a6: 6a 00 push $0x0 <== NOT EXECUTED 10f7a8: 6a 00 push $0x0 <== NOT EXECUTED 10f7aa: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f7b1: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f7b6: 50 push %eax <== NOT EXECUTED 10f7b7: e8 d4 17 00 00 call 110f90 <== NOT EXECUTED 10f7bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7bf: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7c1: 0f 85 97 02 00 00 jne 10fa5e <== 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( 10f7c7: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f7ca: 50 push %eax <== NOT EXECUTED 10f7cb: 6a 00 push $0x0 <== NOT EXECUTED 10f7cd: 6a 00 push $0x0 <== NOT EXECUTED 10f7cf: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f7d6: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f7db: 50 push %eax <== NOT EXECUTED 10f7dc: e8 af 17 00 00 call 110f90 <== NOT EXECUTED 10f7e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7e4: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7e6: 0f 85 61 02 00 00 jne 10fa4d <== 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( 10f7ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7ef: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f7f2: 50 push %eax <== NOT EXECUTED 10f7f3: 6a 00 push $0x0 <== NOT EXECUTED 10f7f5: 6a 10 push $0x10 <== NOT EXECUTED 10f7f7: 6a 01 push $0x1 <== NOT EXECUTED 10f7f9: 0f be 05 48 50 12 00 movsbl 0x125048,%eax <== NOT EXECUTED 10f800: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f805: 50 push %eax <== NOT EXECUTED 10f806: e8 25 c2 ff ff call 10ba30 <== NOT EXECUTED 10f80b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f80e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f810: 0f 85 26 02 00 00 jne 10fa3c <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f816: a0 48 50 12 00 mov 0x125048,%al <== NOT EXECUTED 10f81b: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f81e: 88 15 48 50 12 00 mov %dl,0x125048 <== NOT EXECUTED 10f824: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f826: 0f 85 b6 fe ff ff jne 10f6e2 <== NOT EXECUTED c = 'a'; 10f82c: c6 05 48 50 12 00 61 movb $0x61,0x125048 <== NOT EXECUTED 10f833: e9 aa fe ff ff jmp 10f6e2 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f838: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f83b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f83e: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f841: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f844: 85 c0 test %eax,%eax <== NOT EXECUTED 10f846: 0f 84 90 01 00 00 je 10f9dc <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 10f84c: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED 10f84f: 85 ff test %edi,%edi <== NOT EXECUTED 10f851: 0f 85 ea fe ff ff jne 10f741 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10f857: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f85a: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f85e: 0f 85 dd fe ff ff jne 10f741 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10f864: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 10f867: eb 20 jmp 10f889 <== NOT EXECUTED 10f869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10f86c: 50 push %eax <== NOT EXECUTED 10f86d: 6a 00 push $0x0 <== NOT EXECUTED 10f86f: 6a 00 push $0x0 <== NOT EXECUTED 10f871: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f874: e8 2f c4 ff ff call 10bca8 <== NOT EXECUTED 10f879: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f87c: 85 c0 test %eax,%eax <== NOT EXECUTED 10f87e: 75 27 jne 10f8a7 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10f880: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 10f883: 0f 85 b8 fe ff ff jne 10f741 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f889: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f88c: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f88f: e8 10 c5 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f894: 5a pop %edx <== NOT EXECUTED 10f895: 59 pop %ecx <== NOT EXECUTED 10f896: 6a 00 push $0x0 <== NOT EXECUTED 10f898: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f89b: e8 cc 18 00 00 call 11116c <== NOT EXECUTED 10f8a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8a3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8a5: 74 c5 je 10f86c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 10f8a7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10f8ac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f8af: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f8b2: 56 push %esi <== NOT EXECUTED 10f8b3: e8 dc fc ff ff call 10f594 <== NOT EXECUTED return err; 10f8b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8bb: e9 0f fe ff ff jmp 10f6cf <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f8c0: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f8c3: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f8c6: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f8c9: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10f8cc: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8ce: 0f 84 38 01 00 00 je 10fa0c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 10f8d4: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f8d7: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f8da: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f8dd: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f8e0: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8e2: 0f 85 59 fe ff ff jne 10f741 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f8e8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f8eb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f8ee: 50 push %eax <== NOT EXECUTED 10f8ef: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f8f2: e8 11 18 00 00 call 111108 <== NOT EXECUTED 10f8f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8fa: e9 42 fe ff ff jmp 10f741 <== NOT EXECUTED 10f8ff: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10f900: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10f903: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f906: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f909: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10f90c: 85 c0 test %eax,%eax <== NOT EXECUTED 10f90e: 0f 84 e0 00 00 00 je 10f9f4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f914: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 10f917: 85 ff test %edi,%edi <== NOT EXECUTED 10f919: 0f 85 22 fe ff ff jne 10f741 <== NOT EXECUTED 10f91f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f922: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10f926: 0f 85 f8 00 00 00 jne 10fa24 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10f92c: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10f92f: eb 24 jmp 10f955 <== NOT EXECUTED 10f931: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10f934: 50 push %eax <== NOT EXECUTED 10f935: 6a 00 push $0x0 <== NOT EXECUTED 10f937: 6a 00 push $0x0 <== NOT EXECUTED 10f939: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f93c: e8 67 c3 ff ff call 10bca8 <== NOT EXECUTED 10f941: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f944: 85 c0 test %eax,%eax <== NOT EXECUTED 10f946: 0f 85 5b ff ff ff jne 10f8a7 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10f94c: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 10f94f: 0f 85 ec fd ff ff jne 10f741 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 10f955: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f958: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f95b: e8 44 c4 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f960: 5a pop %edx <== NOT EXECUTED 10f961: 59 pop %ecx <== NOT EXECUTED 10f962: 6a 00 push $0x0 <== NOT EXECUTED 10f964: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f967: e8 00 18 00 00 call 11116c <== NOT EXECUTED 10f96c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f96f: 85 c0 test %eax,%eax <== NOT EXECUTED 10f971: 74 c1 je 10f934 <== NOT EXECUTED 10f973: e9 2f ff ff ff jmp 10f8a7 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 10f978: 85 ff test %edi,%edi <== NOT EXECUTED 10f97a: 75 18 jne 10f994 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 10f97c: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f97e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f981: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f987: e8 18 c4 ff ff call 10bda4 <== NOT EXECUTED 10f98c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f98f: e9 87 fd ff ff jmp 10f71b <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10f994: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f997: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f99a: e8 d9 16 00 00 call 111078 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f99f: 59 pop %ecx <== NOT EXECUTED 10f9a0: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9a3: e8 d0 16 00 00 call 111078 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f9a8: 5a pop %edx <== NOT EXECUTED 10f9a9: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f9ac: e8 53 c2 ff ff call 10bc04 <== NOT EXECUTED free(pipe->Buffer); 10f9b1: 58 pop %eax <== NOT EXECUTED 10f9b2: ff 33 pushl (%ebx) <== NOT EXECUTED 10f9b4: e8 cb 8b ff ff call 108584 <== NOT EXECUTED free(pipe); 10f9b9: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f9bc: e8 c3 8b ff ff call 108584 <== NOT EXECUTED 10f9c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f9c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f9c7: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f9cd: e8 d2 c3 ff ff call 10bda4 <== NOT EXECUTED 10f9d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9d5: e9 f5 fc ff ff jmp 10f6cf <== NOT EXECUTED 10f9da: 66 90 xchg %ax,%ax <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10f9dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f9df: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f9e2: 50 push %eax <== NOT EXECUTED 10f9e3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9e6: e8 1d 17 00 00 call 111108 <== NOT EXECUTED 10f9eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9ee: e9 59 fe ff ff jmp 10f84c <== NOT EXECUTED 10f9f3: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 10f9f4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f9f7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f9fa: 50 push %eax <== NOT EXECUTED 10f9fb: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f9fe: e8 05 17 00 00 call 111108 <== NOT EXECUTED 10fa03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa06: e9 09 ff ff ff jmp 10f914 <== NOT EXECUTED 10fa0b: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fa0c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fa0f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fa12: 50 push %eax <== NOT EXECUTED 10fa13: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fa16: e8 ed 16 00 00 call 111108 <== NOT EXECUTED 10fa1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa1e: e9 b1 fe ff ff jmp 10f8d4 <== NOT EXECUTED 10fa23: 90 nop <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 10fa24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa27: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa2a: e8 75 c3 ff ff call 10bda4 <== NOT EXECUTED 10fa2f: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED err = -ENXIO; goto out_error; 10fa34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa37: e9 70 fe ff ff jmp 10f8ac <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10fa3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa3f: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fa42: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 10fa45: e8 2e 16 00 00 call 111078 <== NOT EXECUTED 10fa4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10fa4d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa50: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10fa53: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 10fa56: e8 1d 16 00 00 call 111078 <== NOT EXECUTED 10fa5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10fa5e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa61: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fa64: ff 30 pushl (%eax) <== NOT EXECUTED 10fa66: e8 19 8b ff ff call 108584 <== NOT EXECUTED 10fa6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10fa6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa71: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10fa74: e8 0b 8b ff ff call 108584 <== NOT EXECUTED 10fa79: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa7c: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10fa81: e9 3e ff ff ff jmp 10f9c4 <== NOT EXECUTED =============================================================================== 00110ca4 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 110ca4: 55 push %ebp 110ca5: 89 e5 mov %esp,%ebp 110ca7: 56 push %esi 110ca8: 53 push %ebx 110ca9: 8b 75 08 mov 0x8(%ebp),%esi 110cac: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 110caf: 83 ec 08 sub $0x8,%esp 110cb2: ff 33 pushl (%ebx) 110cb4: ff 36 pushl (%esi) 110cb6: e8 29 3c 00 00 call 1148e4 110cbb: 83 c4 10 add $0x10,%esp 110cbe: 85 c0 test %eax,%eax 110cc0: 75 12 jne 110cd4 return false; } else { fa->mount_h = entry->mount_h; 110cc2: 8b 46 04 mov 0x4(%esi),%eax 110cc5: 89 43 04 mov %eax,0x4(%ebx) 110cc8: b0 01 mov $0x1,%al return true; } } 110cca: 8d 65 f8 lea -0x8(%ebp),%esp 110ccd: 5b pop %ebx 110cce: 5e pop %esi 110ccf: c9 leave 110cd0: c3 ret 110cd1: 8d 76 00 lea 0x0(%esi),%esi static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 110cd4: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 110cd6: 8d 65 f8 lea -0x8(%ebp),%esp 110cd9: 5b pop %ebx 110cda: 5e pop %esi 110cdb: c9 leave 110cdc: c3 ret =============================================================================== 001091b4 : long fpathconf( int fd, int name ) { 1091b4: 55 push %ebp 1091b5: 89 e5 mov %esp,%ebp 1091b7: 83 ec 08 sub $0x8,%esp 1091ba: 8b 45 08 mov 0x8(%ebp),%eax 1091bd: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 1091c0: 3b 05 4c 51 12 00 cmp 0x12514c,%eax 1091c6: 0f 83 9c 00 00 00 jae 109268 iop = rtems_libio_iop(fd); 1091cc: c1 e0 06 shl $0x6,%eax 1091cf: 03 05 e0 91 12 00 add 0x1291e0,%eax rtems_libio_check_is_open(iop); 1091d5: 8b 48 14 mov 0x14(%eax),%ecx 1091d8: f6 c5 01 test $0x1,%ch 1091db: 0f 84 87 00 00 00 je 109268 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 1091e1: 83 e1 02 and $0x2,%ecx 1091e4: 74 08 je 1091ee <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1091e6: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1091e9: 83 fa 0b cmp $0xb,%edx 1091ec: 76 12 jbe 109200 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1091ee: e8 a5 bd 00 00 call 114f98 <__errno> 1091f3: c7 00 16 00 00 00 movl $0x16,(%eax) 1091f9: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 1091fe: c9 leave 1091ff: c3 ret * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 109200: ff 24 95 f8 32 12 00 jmp *0x1232f8(,%edx,4) 109207: 90 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 109208: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10920b: c9 leave 10920c: c3 ret 10920d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 109210: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109213: c9 leave 109214: c3 ret 109215: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 109218: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10921b: c9 leave 10921c: c3 ret 10921d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 109220: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109223: c9 leave 109224: c3 ret 109225: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 109228: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10922b: c9 leave 10922c: c3 ret 10922d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 109230: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109233: c9 leave 109234: c3 ret 109235: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 109238: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10923b: c9 leave 10923c: c3 ret 10923d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 109240: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109243: c9 leave 109244: c3 ret 109245: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 109248: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10924b: c9 leave 10924c: c3 ret 10924d: 8d 76 00 lea 0x0(%esi),%esi switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 109250: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109253: c9 leave 109254: c3 ret 109255: 8d 76 00 lea 0x0(%esi),%esi the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 109258: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10925b: c9 leave 10925c: c3 ret 10925d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 109260: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109263: c9 leave 109264: c3 ret 109265: 8d 76 00 lea 0x0(%esi),%esi rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 109268: e8 2b bd 00 00 call 114f98 <__errno> 10926d: c7 00 09 00 00 00 movl $0x9,(%eax) 109273: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109278: c9 leave 109279: c3 ret =============================================================================== 00108584 : void free( void *ptr ) { MSBUMP(free_calls, 1); 108584: 55 push %ebp 108585: 89 e5 mov %esp,%ebp 108587: 53 push %ebx 108588: 83 ec 04 sub $0x4,%esp 10858b: 8b 5d 08 mov 0x8(%ebp),%ebx 10858e: ff 05 0c 72 12 00 incl 0x12720c if ( !ptr ) 108594: 85 db test %ebx,%ebx 108596: 74 4b je 1085e3 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108598: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 10859f: 74 47 je 1085e8 <== ALWAYS TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1085a1: a1 e8 55 12 00 mov 0x1255e8,%eax 1085a6: 85 c0 test %eax,%eax 1085a8: 74 0a je 1085b4 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 1085aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1085ad: 53 push %ebx <== NOT EXECUTED 1085ae: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 1085b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1085b4: 83 ec 08 sub $0x8,%esp 1085b7: 53 push %ebx 1085b8: ff 35 58 31 12 00 pushl 0x123158 1085be: e8 39 50 00 00 call 10d5fc <_Protected_heap_Free> 1085c3: 83 c4 10 add $0x10,%esp 1085c6: 84 c0 test %al,%al 1085c8: 75 19 jne 1085e3 <== 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 1085ca: a1 58 31 12 00 mov 0x123158,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1085cf: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1085d2: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 1085d5: 53 push %ebx <== NOT EXECUTED 1085d6: 68 d0 16 12 00 push $0x1216d0 <== NOT EXECUTED 1085db: e8 d8 0d 00 00 call 1093b8 <== NOT EXECUTED 1085e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1085e3: 8b 5d fc mov -0x4(%ebp),%ebx 1085e6: c9 leave 1085e7: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1085e8: e8 3f 01 00 00 call 10872c 1085ed: 84 c0 test %al,%al 1085ef: 75 b0 jne 1085a1 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1085f1: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1085f4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1085f7: 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); 1085f8: e9 6f 01 00 00 jmp 10876c <== NOT EXECUTED =============================================================================== 00109970 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 109970: 55 push %ebp <== NOT EXECUTED 109971: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109973: 53 push %ebx <== NOT EXECUTED 109974: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 109977: 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 10997a: 81 fb 80 87 12 00 cmp $0x128780,%ebx <== NOT EXECUTED 109980: 74 42 je 1099c4 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 109982: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 109985: 85 c0 test %eax,%eax <== NOT EXECUTED 109987: 74 13 je 10999c <== NOT EXECUTED 109989: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10998c: 85 c0 test %eax,%eax <== NOT EXECUTED 10998e: 74 0c je 10999c <== NOT EXECUTED 109990: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109993: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 109996: 52 push %edx <== NOT EXECUTED 109997: ff d0 call *%eax <== NOT EXECUTED 109999: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 10999c: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10999f: 85 c0 test %eax,%eax <== NOT EXECUTED 1099a1: 74 13 je 1099b6 <== NOT EXECUTED 1099a3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1099a6: 85 c0 test %eax,%eax <== NOT EXECUTED 1099a8: 74 0c je 1099b6 <== NOT EXECUTED 1099aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1099ad: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 1099b0: 52 push %edx <== NOT EXECUTED 1099b1: ff d0 call *%eax <== NOT EXECUTED 1099b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 1099b6: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1099b9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1099bc: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1099bd: e9 3e ef ff ff jmp 108900 <== NOT EXECUTED 1099c2: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 1099c4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1099c7: c9 leave <== NOT EXECUTED 1099c8: c3 ret <== NOT EXECUTED =============================================================================== 0011f374 : int fstat( int fd, struct stat *sbuf ) { 11f374: 55 push %ebp 11f375: 89 e5 mov %esp,%ebp 11f377: 57 push %edi 11f378: 53 push %ebx 11f379: 8b 55 08 mov 0x8(%ebp),%edx 11f37c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11f37f: 85 db test %ebx,%ebx 11f381: 74 66 je 11f3e9 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11f383: 3b 15 4c 31 12 00 cmp 0x12314c,%edx 11f389: 73 3d jae 11f3c8 11f38b: c1 e2 06 shl $0x6,%edx 11f38e: 03 15 e0 71 12 00 add 0x1271e0,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11f394: f6 42 15 01 testb $0x1,0x15(%edx) 11f398: 74 2e je 11f3c8 <== NEVER TAKEN if ( !iop->handlers ) 11f39a: 8b 42 3c mov 0x3c(%edx),%eax 11f39d: 85 c0 test %eax,%eax 11f39f: 74 27 je 11f3c8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 11f3a1: 8b 40 18 mov 0x18(%eax),%eax 11f3a4: 85 c0 test %eax,%eax 11f3a6: 74 34 je 11f3dc <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11f3a8: b9 48 00 00 00 mov $0x48,%ecx 11f3ad: 31 c0 xor %eax,%eax 11f3af: 89 df mov %ebx,%edi 11f3b1: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11f3b3: 8b 42 3c mov 0x3c(%edx),%eax 11f3b6: 89 5d 0c mov %ebx,0xc(%ebp) 11f3b9: 83 c2 18 add $0x18,%edx 11f3bc: 89 55 08 mov %edx,0x8(%ebp) 11f3bf: 8b 40 18 mov 0x18(%eax),%eax } 11f3c2: 5b pop %ebx 11f3c3: 5f pop %edi 11f3c4: 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 ); 11f3c5: ff e0 jmp *%eax 11f3c7: 90 nop iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 11f3c8: e8 4f 4a ff ff call 113e1c <__errno> 11f3cd: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 11f3d3: b8 ff ff ff ff mov $0xffffffff,%eax 11f3d8: 5b pop %ebx 11f3d9: 5f pop %edi 11f3da: c9 leave 11f3db: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f3dc: e8 3b 4a ff ff call 113e1c <__errno> <== NOT EXECUTED 11f3e1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f3e7: eb ea jmp 11f3d3 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11f3e9: e8 2e 4a ff ff call 113e1c <__errno> 11f3ee: c7 00 0e 00 00 00 movl $0xe,(%eax) 11f3f4: eb dd jmp 11f3d3 =============================================================================== 00109394 : #include int fsync( int fd ) { 109394: 55 push %ebp 109395: 89 e5 mov %esp,%ebp 109397: 83 ec 08 sub $0x8,%esp 10939a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 10939d: 3b 05 4c 51 12 00 cmp 0x12514c,%eax 1093a3: 73 2b jae 1093d0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 1093a5: c1 e0 06 shl $0x6,%eax 1093a8: 03 05 e0 91 12 00 add 0x1291e0,%eax rtems_libio_check_is_open(iop); 1093ae: 8b 50 14 mov 0x14(%eax),%edx 1093b1: f6 c6 01 test $0x1,%dh 1093b4: 74 1a je 1093d0 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1093b6: 83 e2 04 and $0x4,%edx 1093b9: 74 29 je 1093e4 /* * Now process the fsync(). */ if ( !iop->handlers ) 1093bb: 8b 50 3c mov 0x3c(%eax),%edx 1093be: 85 d2 test %edx,%edx 1093c0: 74 0e je 1093d0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 1093c2: 8b 52 28 mov 0x28(%edx),%edx 1093c5: 85 d2 test %edx,%edx 1093c7: 74 28 je 1093f1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1093c9: 89 45 08 mov %eax,0x8(%ebp) } 1093cc: 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 ); 1093cd: ff e2 jmp *%edx 1093cf: 90 nop /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 1093d0: e8 c3 bb 00 00 call 114f98 <__errno> <== NOT EXECUTED 1093d5: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 1093db: b8 ff ff ff ff mov $0xffffffff,%eax 1093e0: c9 leave 1093e1: c3 ret 1093e2: 66 90 xchg %ax,%ax rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1093e4: e8 af bb 00 00 call 114f98 <__errno> 1093e9: c7 00 16 00 00 00 movl $0x16,(%eax) 1093ef: eb ea jmp 1093db if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1093f1: e8 a2 bb 00 00 call 114f98 <__errno> 1093f6: c7 00 86 00 00 00 movl $0x86,(%eax) 1093fc: eb dd jmp 1093db =============================================================================== 001109b8 : int ftruncate( int fd, off_t length ) { 1109b8: 55 push %ebp 1109b9: 89 e5 mov %esp,%ebp 1109bb: 57 push %edi 1109bc: 56 push %esi 1109bd: 53 push %ebx 1109be: 83 ec 3c sub $0x3c,%esp 1109c1: 8b 5d 08 mov 0x8(%ebp),%ebx 1109c4: 8b 45 0c mov 0xc(%ebp),%eax 1109c7: 8b 55 10 mov 0x10(%ebp),%edx 1109ca: 89 45 c0 mov %eax,-0x40(%ebp) 1109cd: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 1109d0: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 1109d6: 73 5c jae 110a34 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 1109d8: c1 e3 06 shl $0x6,%ebx 1109db: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 1109e1: f6 43 15 01 testb $0x1,0x15(%ebx) 1109e5: 74 4d je 110a34 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 1109e7: 8d 45 d4 lea -0x2c(%ebp),%eax 1109ea: 8d 73 18 lea 0x18(%ebx),%esi 1109ed: b9 05 00 00 00 mov $0x5,%ecx 1109f2: 89 c7 mov %eax,%edi 1109f4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 1109f6: 8b 55 e0 mov -0x20(%ebp),%edx 1109f9: 8b 52 10 mov 0x10(%edx),%edx 1109fc: 85 d2 test %edx,%edx 1109fe: 74 5c je 110a5c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 110a00: 83 ec 0c sub $0xc,%esp 110a03: 50 push %eax 110a04: ff d2 call *%edx 110a06: 83 c4 10 add $0x10,%esp 110a09: 48 dec %eax 110a0a: 74 62 je 110a6e rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110a0c: f6 43 14 04 testb $0x4,0x14(%ebx) 110a10: 74 36 je 110a48 <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 110a12: 8b 43 3c mov 0x3c(%ebx),%eax 110a15: 8b 40 20 mov 0x20(%eax),%eax 110a18: 85 c0 test %eax,%eax 110a1a: 74 40 je 110a5c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 110a1c: 52 push %edx 110a1d: ff 75 c4 pushl -0x3c(%ebp) 110a20: ff 75 c0 pushl -0x40(%ebp) 110a23: 53 push %ebx 110a24: ff d0 call *%eax 110a26: 83 c4 10 add $0x10,%esp } 110a29: 8d 65 f4 lea -0xc(%ebp),%esp 110a2c: 5b pop %ebx 110a2d: 5e pop %esi 110a2e: 5f pop %edi 110a2f: c9 leave 110a30: c3 ret 110a31: 8d 76 00 lea 0x0(%esi),%esi rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 110a34: e8 e3 33 00 00 call 113e1c <__errno> <== NOT EXECUTED 110a39: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 110a3f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110a44: eb e3 jmp 110a29 <== NOT EXECUTED 110a46: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110a48: e8 cf 33 00 00 call 113e1c <__errno> <== NOT EXECUTED 110a4d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110a53: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110a58: eb cf jmp 110a29 <== NOT EXECUTED 110a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 110a5c: e8 bb 33 00 00 call 113e1c <__errno> <== NOT EXECUTED 110a61: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110a67: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110a6c: eb bb jmp 110a29 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 110a6e: e8 a9 33 00 00 call 113e1c <__errno> 110a73: c7 00 15 00 00 00 movl $0x15,(%eax) 110a79: b8 ff ff ff ff mov $0xffffffff,%eax 110a7e: eb a9 jmp 110a29 =============================================================================== 00120f18 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 120f18: 55 push %ebp 120f19: 89 e5 mov %esp,%ebp 120f1b: 57 push %edi 120f1c: 56 push %esi 120f1d: 53 push %ebx 120f1e: 83 ec 2c sub $0x2c,%esp 120f21: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 120f24: 3b 1d 4c 61 12 00 cmp 0x12614c,%ebx 120f2a: 72 48 jb 120f74 <== ALWAYS TAKEN 120f2c: 31 db xor %ebx,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 120f2e: 8d 45 d4 lea -0x2c(%ebp),%eax 120f31: 8d 73 18 lea 0x18(%ebx),%esi 120f34: b9 05 00 00 00 mov $0x5,%ecx 120f39: 89 c7 mov %eax,%edi 120f3b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 120f3d: 8b 55 e0 mov -0x20(%ebp),%edx 120f40: 8b 52 10 mov 0x10(%edx),%edx 120f43: 85 d2 test %edx,%edx 120f45: 74 4d je 120f94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 120f47: 83 ec 0c sub $0xc,%esp 120f4a: 50 push %eax 120f4b: ff d2 call *%edx 120f4d: 83 c4 10 add $0x10,%esp 120f50: 48 dec %eax 120f51: 75 2d jne 120f80 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 120f53: 8b 43 3c mov 0x3c(%ebx),%eax 120f56: 8b 40 08 mov 0x8(%eax),%eax 120f59: 85 c0 test %eax,%eax 120f5b: 74 37 je 120f94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 120f5d: 52 push %edx 120f5e: ff 75 10 pushl 0x10(%ebp) 120f61: ff 75 0c pushl 0xc(%ebp) 120f64: 53 push %ebx 120f65: ff d0 call *%eax 120f67: 83 c4 10 add $0x10,%esp } 120f6a: 8d 65 f4 lea -0xc(%ebp),%esp 120f6d: 5b pop %ebx 120f6e: 5e pop %esi 120f6f: 5f pop %edi 120f70: c9 leave 120f71: c3 ret 120f72: 66 90 xchg %ax,%ax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 120f74: c1 e3 06 shl $0x6,%ebx 120f77: 03 1d 20 a3 12 00 add 0x12a320,%ebx 120f7d: eb af jmp 120f2e 120f7f: 90 nop loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 120f80: e8 d3 40 ff ff call 115058 <__errno> 120f85: c7 00 14 00 00 00 movl $0x14,(%eax) 120f8b: b8 ff ff ff ff mov $0xffffffff,%eax 120f90: eb d8 jmp 120f6a 120f92: 66 90 xchg %ax,%ax * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 120f94: e8 bf 40 ff ff call 115058 <__errno> <== NOT EXECUTED 120f99: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 120f9f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120fa4: eb c4 jmp 120f6a <== NOT EXECUTED =============================================================================== 00108ca4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108ca4: 55 push %ebp 108ca5: 89 e5 mov %esp,%ebp 108ca7: 57 push %edi 108ca8: 56 push %esi 108ca9: 53 push %ebx 108caa: 83 ec 1c sub $0x1c,%esp 108cad: 89 c3 mov %eax,%ebx 108caf: 89 55 e4 mov %edx,-0x1c(%ebp) 108cb2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108cb4: e8 af fe ff ff call 108b68 if ((fp = fopen("/etc/group", "r")) == NULL) { 108cb9: 83 ec 08 sub $0x8,%esp 108cbc: 68 03 17 12 00 push $0x121703 108cc1: 68 b9 2b 12 00 push $0x122bb9 108cc6: e8 c1 c2 00 00 call 114f8c 108ccb: 89 c7 mov %eax,%edi 108ccd: 83 c4 10 add $0x10,%esp 108cd0: 85 c0 test %eax,%eax 108cd2: 75 22 jne 108cf6 <== ALWAYS TAKEN 108cd4: e9 8b 00 00 00 jmp 108d64 <== NOT EXECUTED 108cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 108cdc: 83 ec 08 sub $0x8,%esp 108cdf: 53 push %ebx 108ce0: ff 36 pushl (%esi) 108ce2: e8 41 d0 00 00 call 115d28 108ce7: 83 c4 10 add $0x10,%esp 108cea: 85 c0 test %eax,%eax 108cec: 0f 94 c0 sete %al 108cef: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108cf2: 85 c0 test %eax,%eax 108cf4: 75 2e jne 108d24 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 108cf6: 83 ec 0c sub $0xc,%esp 108cf9: ff 75 0c pushl 0xc(%ebp) 108cfc: 8b 4d 08 mov 0x8(%ebp),%ecx 108cff: 89 f2 mov %esi,%edx 108d01: 89 f8 mov %edi,%eax 108d03: e8 d4 fb ff ff call 1088dc 108d08: 83 c4 10 add $0x10,%esp 108d0b: 85 c0 test %eax,%eax 108d0d: 74 31 je 108d40 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 108d0f: 85 db test %ebx,%ebx 108d11: 75 c9 jne 108cdc <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108d13: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 108d17: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 108d1a: 0f 94 c0 sete %al <== NOT EXECUTED 108d1d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 108d20: 85 c0 test %eax,%eax <== NOT EXECUTED 108d22: 74 d2 je 108cf6 <== NOT EXECUTED fclose(fp); 108d24: 83 ec 0c sub $0xc,%esp 108d27: 57 push %edi 108d28: e8 fb bb 00 00 call 114928 *result = grp; 108d2d: 8b 45 10 mov 0x10(%ebp),%eax 108d30: 89 30 mov %esi,(%eax) 108d32: 31 c0 xor %eax,%eax return 0; 108d34: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 108d37: 8d 65 f4 lea -0xc(%ebp),%esp 108d3a: 5b pop %ebx 108d3b: 5e pop %esi 108d3c: 5f pop %edi 108d3d: c9 leave 108d3e: c3 ret 108d3f: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 108d40: e8 97 ba 00 00 call 1147dc <__errno> <== NOT EXECUTED 108d45: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 108d4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d4e: 57 push %edi <== NOT EXECUTED 108d4f: e8 d4 bb 00 00 call 114928 <== NOT EXECUTED 108d54: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108d59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 108d5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5f: 5b pop %ebx <== NOT EXECUTED 108d60: 5e pop %esi <== NOT EXECUTED 108d61: 5f pop %edi <== NOT EXECUTED 108d62: c9 leave <== NOT EXECUTED 108d63: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 108d64: e8 73 ba 00 00 call 1147dc <__errno> <== NOT EXECUTED 108d69: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108d6f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 108d72: eb c3 jmp 108d37 <== NOT EXECUTED =============================================================================== 001089f4 : return NULL; return p; } struct group *getgrent(void) { 1089f4: 55 push %ebp <== NOT EXECUTED 1089f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1089f7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 1089fa: a1 a4 91 12 00 mov 0x1291a4,%eax <== NOT EXECUTED 1089ff: 85 c0 test %eax,%eax <== NOT EXECUTED 108a01: 75 05 jne 108a08 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108a03: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 108a05: c9 leave <== NOT EXECUTED 108a06: c3 ret <== NOT EXECUTED 108a07: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108a08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a0b: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108a10: b9 c0 91 12 00 mov $0x1291c0,%ecx <== NOT EXECUTED 108a15: ba 88 92 12 00 mov $0x129288,%edx <== NOT EXECUTED 108a1a: e8 bd fe ff ff call 1088dc <== NOT EXECUTED 108a1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a22: 85 c0 test %eax,%eax <== NOT EXECUTED 108a24: 74 dd je 108a03 <== NOT EXECUTED 108a26: b8 88 92 12 00 mov $0x129288,%eax <== NOT EXECUTED return NULL; return &grent; } 108a2b: c9 leave <== NOT EXECUTED 108a2c: c3 ret <== NOT EXECUTED =============================================================================== 00108da0 : } struct group *getgrgid( gid_t gid ) { 108da0: 55 push %ebp <== NOT EXECUTED 108da1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108da3: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108da6: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108da9: 50 push %eax <== NOT EXECUTED 108daa: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108daf: 68 c0 91 12 00 push $0x1291c0 <== NOT EXECUTED 108db4: 68 88 92 12 00 push $0x129288 <== NOT EXECUTED 108db9: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 108dbd: 50 push %eax <== NOT EXECUTED 108dbe: e8 b1 ff ff ff call 108d74 <== NOT EXECUTED 108dc3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 108dc6: 85 c0 test %eax,%eax <== NOT EXECUTED 108dc8: 75 06 jne 108dd0 <== NOT EXECUTED return NULL; return p; 108dca: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 108dcd: c9 leave <== NOT EXECUTED 108dce: c3 ret <== NOT EXECUTED 108dcf: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108dd0: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 108dd2: c9 leave <== NOT EXECUTED 108dd3: c3 ret <== NOT EXECUTED =============================================================================== 00108d74 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108d74: 55 push %ebp <== NOT EXECUTED 108d75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108d77: 53 push %ebx <== NOT EXECUTED 108d78: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 108d7b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 108d7e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 108d81: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 108d85: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 108d88: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 108d8b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 108d8e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 108d91: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108d94: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108d96: 5b pop %ebx <== NOT EXECUTED 108d97: 5b pop %ebx <== NOT EXECUTED 108d98: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 108d99: e9 06 ff ff ff jmp 108ca4 <== NOT EXECUTED =============================================================================== 00108e00 : } struct group *getgrnam( const char *name ) { 108e00: 55 push %ebp 108e01: 89 e5 mov %esp,%ebp 108e03: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e06: 8d 45 f4 lea -0xc(%ebp),%eax 108e09: 50 push %eax 108e0a: 68 c8 00 00 00 push $0xc8 108e0f: 68 c0 91 12 00 push $0x1291c0 108e14: 68 88 92 12 00 push $0x129288 108e19: ff 75 08 pushl 0x8(%ebp) 108e1c: e8 b3 ff ff ff call 108dd4 108e21: 83 c4 20 add $0x20,%esp 108e24: 85 c0 test %eax,%eax 108e26: 75 08 jne 108e30 <== NEVER TAKEN return NULL; return p; 108e28: 8b 45 f4 mov -0xc(%ebp),%eax } 108e2b: c9 leave 108e2c: c3 ret 108e2d: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e30: 31 c0 xor %eax,%eax return NULL; return p; } 108e32: c9 leave <== NOT EXECUTED 108e33: c3 ret <== NOT EXECUTED =============================================================================== 0012497c : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 12497c: 55 push %ebp <== NOT EXECUTED 12497d: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 12497f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 124984: c9 leave <== NOT EXECUTED 124985: c3 ret <== NOT EXECUTED =============================================================================== 00108e70 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108e70: 55 push %ebp 108e71: 89 e5 mov %esp,%ebp 108e73: 57 push %edi 108e74: 56 push %esi 108e75: 53 push %ebx 108e76: 83 ec 1c sub $0x1c,%esp 108e79: 89 c3 mov %eax,%ebx 108e7b: 89 55 e4 mov %edx,-0x1c(%ebp) 108e7e: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108e80: e8 e3 fc ff ff call 108b68 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 108e85: 83 ec 08 sub $0x8,%esp 108e88: 68 03 17 12 00 push $0x121703 108e8d: 68 ad 2b 12 00 push $0x122bad 108e92: e8 f5 c0 00 00 call 114f8c 108e97: 89 c7 mov %eax,%edi 108e99: 83 c4 10 add $0x10,%esp 108e9c: 85 c0 test %eax,%eax 108e9e: 75 22 jne 108ec2 <== ALWAYS TAKEN 108ea0: e9 8b 00 00 00 jmp 108f30 <== NOT EXECUTED 108ea5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 108ea8: 83 ec 08 sub $0x8,%esp 108eab: 53 push %ebx 108eac: ff 36 pushl (%esi) 108eae: e8 75 ce 00 00 call 115d28 108eb3: 83 c4 10 add $0x10,%esp 108eb6: 85 c0 test %eax,%eax 108eb8: 0f 94 c0 sete %al 108ebb: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 108ebe: 85 c0 test %eax,%eax 108ec0: 75 2e jne 108ef0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 108ec2: 83 ec 0c sub $0xc,%esp 108ec5: ff 75 0c pushl 0xc(%ebp) 108ec8: 8b 4d 08 mov 0x8(%ebp),%ecx 108ecb: 89 f2 mov %esi,%edx 108ecd: 89 f8 mov %edi,%eax 108ecf: e8 5c fb ff ff call 108a30 108ed4: 83 c4 10 add $0x10,%esp 108ed7: 85 c0 test %eax,%eax 108ed9: 74 31 je 108f0c <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 108edb: 85 db test %ebx,%ebx 108edd: 75 c9 jne 108ea8 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 108edf: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 108ee3: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 108ee6: 0f 94 c0 sete %al <== NOT EXECUTED 108ee9: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 108eec: 85 c0 test %eax,%eax <== NOT EXECUTED 108eee: 74 d2 je 108ec2 <== NOT EXECUTED fclose(fp); 108ef0: 83 ec 0c sub $0xc,%esp 108ef3: 57 push %edi 108ef4: e8 2f ba 00 00 call 114928 *result = pwd; 108ef9: 8b 45 10 mov 0x10(%ebp),%eax 108efc: 89 30 mov %esi,(%eax) 108efe: 31 c0 xor %eax,%eax return 0; 108f00: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 108f03: 8d 65 f4 lea -0xc(%ebp),%esp 108f06: 5b pop %ebx 108f07: 5e pop %esi 108f08: 5f pop %edi 108f09: c9 leave 108f0a: c3 ret 108f0b: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 108f0c: e8 cb b8 00 00 call 1147dc <__errno> <== NOT EXECUTED 108f11: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 108f17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f1a: 57 push %edi <== NOT EXECUTED 108f1b: e8 08 ba 00 00 call 114928 <== NOT EXECUTED 108f20: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108f25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 108f28: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108f2b: 5b pop %ebx <== NOT EXECUTED 108f2c: 5e pop %esi <== NOT EXECUTED 108f2d: 5f pop %edi <== NOT EXECUTED 108f2e: c9 leave <== NOT EXECUTED 108f2f: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 108f30: e8 a7 b8 00 00 call 1147dc <__errno> <== NOT EXECUTED 108f35: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108f3b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 108f3e: eb c3 jmp 108f03 <== NOT EXECUTED =============================================================================== 00108b2c : return NULL; return p; } struct passwd *getpwent(void) { 108b2c: 55 push %ebp <== NOT EXECUTED 108b2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108b2f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 108b32: a1 a4 90 12 00 mov 0x1290a4,%eax <== NOT EXECUTED 108b37: 85 c0 test %eax,%eax <== NOT EXECUTED 108b39: 75 05 jne 108b40 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108b3b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 108b3d: c9 leave <== NOT EXECUTED 108b3e: c3 ret <== NOT EXECUTED 108b3f: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b43: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108b48: b9 c0 90 12 00 mov $0x1290c0,%ecx <== NOT EXECUTED 108b4d: ba 88 91 12 00 mov $0x129188,%edx <== NOT EXECUTED 108b52: e8 d9 fe ff ff call 108a30 <== NOT EXECUTED 108b57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b5a: 85 c0 test %eax,%eax <== NOT EXECUTED 108b5c: 74 dd je 108b3b <== NOT EXECUTED 108b5e: b8 88 91 12 00 mov $0x129188,%eax <== NOT EXECUTED return NULL; return &pwent; } 108b63: c9 leave <== NOT EXECUTED 108b64: c3 ret <== NOT EXECUTED =============================================================================== 00108fcc : } struct passwd *getpwnam( const char *name ) { 108fcc: 55 push %ebp 108fcd: 89 e5 mov %esp,%ebp 108fcf: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108fd2: 8d 45 f4 lea -0xc(%ebp),%eax 108fd5: 50 push %eax 108fd6: 68 c8 00 00 00 push $0xc8 108fdb: 68 c0 90 12 00 push $0x1290c0 108fe0: 68 88 91 12 00 push $0x129188 108fe5: ff 75 08 pushl 0x8(%ebp) 108fe8: e8 b3 ff ff ff call 108fa0 108fed: 83 c4 20 add $0x20,%esp 108ff0: 85 c0 test %eax,%eax 108ff2: 75 08 jne 108ffc <== NEVER TAKEN return NULL; return p; 108ff4: 8b 45 f4 mov -0xc(%ebp),%eax } 108ff7: c9 leave 108ff8: c3 ret 108ff9: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108ffc: 31 c0 xor %eax,%eax return NULL; return p; } 108ffe: c9 leave <== NOT EXECUTED 108fff: c3 ret <== NOT EXECUTED =============================================================================== 00108f6c : } struct passwd *getpwuid( uid_t uid ) { 108f6c: 55 push %ebp <== NOT EXECUTED 108f6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f6f: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108f72: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108f75: 50 push %eax <== NOT EXECUTED 108f76: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108f7b: 68 c0 90 12 00 push $0x1290c0 <== NOT EXECUTED 108f80: 68 88 91 12 00 push $0x129188 <== NOT EXECUTED 108f85: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 108f89: 50 push %eax <== NOT EXECUTED 108f8a: e8 b1 ff ff ff call 108f40 <== NOT EXECUTED 108f8f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 108f92: 85 c0 test %eax,%eax <== NOT EXECUTED 108f94: 75 06 jne 108f9c <== NOT EXECUTED return NULL; return p; 108f96: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 108f99: c9 leave <== NOT EXECUTED 108f9a: c3 ret <== NOT EXECUTED 108f9b: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108f9c: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 108f9e: c9 leave <== NOT EXECUTED 108f9f: c3 ret <== NOT EXECUTED =============================================================================== 00108f40 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108f40: 55 push %ebp <== NOT EXECUTED 108f41: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f43: 53 push %ebx <== NOT EXECUTED 108f44: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 108f47: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 108f4a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 108f4d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 108f51: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 108f54: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 108f57: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 108f5a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 108f5d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108f60: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108f62: 5b pop %ebx <== NOT EXECUTED 108f63: 5b pop %ebx <== NOT EXECUTED 108f64: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 108f65: e9 06 ff ff ff jmp 108e70 <== NOT EXECUTED =============================================================================== 00108600 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 108600: 55 push %ebp 108601: 89 e5 mov %esp,%ebp 108603: 56 push %esi 108604: 53 push %ebx 108605: 83 ec 20 sub $0x20,%esp 108608: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10860b: 85 db test %ebx,%ebx 10860d: 74 42 je 108651 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10860f: 9c pushf 108610: fa cli 108611: 5e pop %esi _TOD_Get( &now ); 108612: 83 ec 0c sub $0xc,%esp 108615: 8d 45 f0 lea -0x10(%ebp),%eax 108618: 50 push %eax 108619: e8 96 43 00 00 call 10c9b4 <_TOD_Get> _ISR_Enable(level); 10861e: 56 push %esi 10861f: 9d popf useconds = (suseconds_t)now.tv_nsec; 108620: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 108623: 8b 45 f0 mov -0x10(%ebp),%eax 108626: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 108628: be d3 4d 62 10 mov $0x10624dd3,%esi 10862d: 89 c8 mov %ecx,%eax 10862f: f7 ee imul %esi 108631: 89 45 e0 mov %eax,-0x20(%ebp) 108634: 89 55 e4 mov %edx,-0x1c(%ebp) 108637: 8b 75 e4 mov -0x1c(%ebp),%esi 10863a: c1 fe 06 sar $0x6,%esi 10863d: 89 c8 mov %ecx,%eax 10863f: 99 cltd 108640: 29 d6 sub %edx,%esi 108642: 89 73 04 mov %esi,0x4(%ebx) 108645: 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; 108647: 83 c4 10 add $0x10,%esp } 10864a: 8d 65 f8 lea -0x8(%ebp),%esp 10864d: 5b pop %ebx 10864e: 5e pop %esi 10864f: c9 leave 108650: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 108651: e8 c6 b7 00 00 call 113e1c <__errno> <== NOT EXECUTED 108656: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10865c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108661: eb e7 jmp 10864a <== NOT EXECUTED =============================================================================== 00113268 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113268: 55 push %ebp 113269: 89 e5 mov %esp,%ebp 11326b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 11326e: 8b 50 38 mov 0x38(%eax),%edx 113271: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 113275: 74 09 je 113280 <== ALWAYS TAKEN 113277: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 11327c: c9 leave <== NOT EXECUTED 11327d: c3 ret <== NOT EXECUTED 11327e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 113280: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 113287: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11328e: 31 c0 xor %eax,%eax return 0; } 113290: c9 leave 113291: c3 ret =============================================================================== 001134a0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1134a0: 55 push %ebp 1134a1: 89 e5 mov %esp,%ebp 1134a3: 57 push %edi 1134a4: 56 push %esi 1134a5: 53 push %ebx 1134a6: 81 ec 4c 01 00 00 sub $0x14c,%esp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 1134ac: 8b 55 08 mov 0x8(%ebp),%edx 1134af: 8b 42 38 mov 0x38(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1134b2: 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; 1134b5: 83 c0 54 add $0x54,%eax 1134b8: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 1134be: 39 c3 cmp %eax,%ebx 1134c0: 0f 84 2a 01 00 00 je 1135f0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 1134c6: 8b 45 08 mov 0x8(%ebp),%eax 1134c9: 8b 40 0c mov 0xc(%eax),%eax 1134cc: 89 85 d0 fe ff ff mov %eax,-0x130(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 1134d2: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 1134d7: 8b 45 10 mov 0x10(%ebp),%eax 1134da: f7 e2 mul %edx 1134dc: c1 ea 08 shr $0x8,%edx 1134df: 89 d0 mov %edx,%eax 1134e1: c1 e0 04 shl $0x4,%eax 1134e4: c1 e2 08 shl $0x8,%edx 1134e7: 8d 14 10 lea (%eax,%edx,1),%edx 1134ea: 03 95 d0 fe ff ff add -0x130(%ebp),%edx 1134f0: 89 95 d4 fe ff ff mov %edx,-0x12c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 1134f6: 85 d2 test %edx,%edx 1134f8: 0f 8e f2 00 00 00 jle 1135f0 <== NEVER TAKEN 1134fe: 31 d2 xor %edx,%edx 113500: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 113507: 00 00 00 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 11350a: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 113510: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 113516: eb 20 jmp 113538 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 113518: 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( 11351a: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 113520: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 113526: 0f 8d b4 00 00 00 jge 1135e0 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 11352c: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 113532: 0f 84 a8 00 00 00 je 1135e0 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 113538: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 11353e: 7f d8 jg 113518 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 113540: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 113546: 89 d0 mov %edx,%eax 113548: c1 f8 1f sar $0x1f,%eax 11354b: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 113551: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 113558: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 11355a: 8b 43 38 mov 0x38(%ebx),%eax 11355d: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 113563: 8d 73 0c lea 0xc(%ebx),%esi 113566: 31 c0 xor %eax,%eax 113568: b9 ff ff ff ff mov $0xffffffff,%ecx 11356d: 89 f7 mov %esi,%edi 11356f: f2 ae repnz scas %es:(%edi),%al 113571: f7 d1 not %ecx 113573: 49 dec %ecx 113574: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 11357b: 83 ec 08 sub $0x8,%esp 11357e: 56 push %esi 11357f: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 113585: 50 push %eax 113586: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 11358c: e8 ab 13 00 00 call 11493c memcpy( 113591: 8b 45 0c mov 0xc(%ebp),%eax 113594: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 11359a: b9 44 00 00 00 mov $0x44,%ecx 11359f: 89 c7 mov %eax,%edi 1135a1: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 1135a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 1135a9: 8b 45 08 mov 0x8(%ebp),%eax 1135ac: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 1135b3: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 1135b7: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 1135be: 01 00 00 1135c1: 83 c4 10 add $0x10,%esp 1135c4: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 1135ca: 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( 1135cc: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 1135d2: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 1135d8: 0f 8c 4e ff ff ff jl 11352c <== NEVER TAKEN 1135de: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 1135e0: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 1135e6: 8d 65 f4 lea -0xc(%ebp),%esp 1135e9: 5b pop %ebx 1135ea: 5e pop %esi 1135eb: 5f pop %edi 1135ec: c9 leave 1135ed: c3 ret 1135ee: 66 90 xchg %ax,%ax /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 1135f0: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 1135f7: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 1135fa: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 113600: 8d 65 f4 lea -0xc(%ebp),%esp 113603: 5b pop %ebx 113604: 5e pop %esi 113605: 5f pop %edi 113606: c9 leave 113607: c3 ret =============================================================================== 001133c4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1133c4: 55 push %ebp 1133c5: 89 e5 mov %esp,%ebp 1133c7: 56 push %esi 1133c8: 53 push %ebx 1133c9: 83 ec 10 sub $0x10,%esp 1133cc: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1133cf: 8b 1e mov (%esi),%ebx 1133d1: 8d 43 54 lea 0x54(%ebx),%eax 1133d4: 39 43 50 cmp %eax,0x50(%ebx) 1133d7: 0f 85 8f 00 00 00 jne 11346c /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 1133dd: 8b 46 10 mov 0x10(%esi),%eax 1133e0: 3b 58 1c cmp 0x1c(%eax),%ebx 1133e3: 0f 84 97 00 00 00 je 113480 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 1133e9: 8b 43 5c mov 0x5c(%ebx),%eax 1133ec: 85 c0 test %eax,%eax 1133ee: 0f 85 8c 00 00 00 jne 113480 <== NEVER TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1133f4: 8b 4b 08 mov 0x8(%ebx),%ecx 1133f7: 85 c9 test %ecx,%ecx 1133f9: 74 13 je 11340e 1133fb: 83 ec 0c sub $0xc,%esp 1133fe: 53 push %ebx 1133ff: e8 94 91 ff ff call 10c598 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 113404: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11340b: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11340e: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 113412: 83 ec 08 sub $0x8,%esp 113415: 6a 00 push $0x0 113417: 8d 45 f0 lea -0x10(%ebp),%eax 11341a: 50 push %eax 11341b: e8 e0 51 ff ff call 108600 113420: 8b 45 f0 mov -0x10(%ebp),%eax 113423: 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) ) { 113426: 89 1c 24 mov %ebx,(%esp) 113429: e8 92 d6 ff ff call 110ac0 11342e: 83 c4 10 add $0x10,%esp 113431: 85 c0 test %eax,%eax 113433: 75 2b jne 113460 113435: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 11343a: 75 24 jne 113460 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 11343c: a1 24 50 12 00 mov 0x125024,%eax 113441: 8b 50 04 mov 0x4(%eax),%edx 113444: 3b 16 cmp (%esi),%edx 113446: 74 4c je 113494 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 113448: 83 ec 0c sub $0xc,%esp 11344b: 53 push %ebx 11344c: e8 33 51 ff ff call 108584 113451: 31 c0 xor %eax,%eax 113453: 83 c4 10 add $0x10,%esp } return 0; } 113456: 8d 65 f8 lea -0x8(%ebp),%esp 113459: 5b pop %ebx 11345a: 5e pop %esi 11345b: c9 leave 11345c: c3 ret 11345d: 8d 76 00 lea 0x0(%esi),%esi /* * Free memory associated with a memory file. */ free( the_jnode ); 113460: 31 c0 xor %eax,%eax } return 0; } 113462: 8d 65 f8 lea -0x8(%ebp),%esp 113465: 5b pop %ebx 113466: 5e pop %esi 113467: c9 leave 113468: c3 ret 113469: 8d 76 00 lea 0x0(%esi),%esi /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 11346c: e8 ab 09 00 00 call 113e1c <__errno> 113471: c7 00 5a 00 00 00 movl $0x5a,(%eax) 113477: b8 ff ff ff ff mov $0xffffffff,%eax 11347c: eb e4 jmp 113462 11347e: 66 90 xchg %ax,%ax /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 113480: e8 97 09 00 00 call 113e1c <__errno> 113485: c7 00 10 00 00 00 movl $0x10,(%eax) 11348b: b8 ff ff ff ff mov $0xffffffff,%eax 113490: eb d0 jmp 113462 113492: 66 90 xchg %ax,%ax /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 113494: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 11349b: eb ab jmp 113448 <== NOT EXECUTED =============================================================================== 00108b68 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 108b68: 55 push %ebp 108b69: 89 e5 mov %esp,%ebp 108b6b: 53 push %ebx 108b6c: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 108b6f: 80 3d a0 90 12 00 00 cmpb $0x0,0x1290a0 108b76: 74 08 je 108b80 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108b78: 8b 5d fc mov -0x4(%ebp),%ebx 108b7b: c9 leave 108b7c: c3 ret 108b7d: 8d 76 00 lea 0x0(%esi),%esi FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 108b80: c6 05 a0 90 12 00 01 movb $0x1,0x1290a0 mkdir("/etc", 0777); 108b87: 83 ec 08 sub $0x8,%esp 108b8a: 68 ff 01 00 00 push $0x1ff 108b8f: 68 a8 2b 12 00 push $0x122ba8 108b94: e8 83 07 00 00 call 10931c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 108b99: 59 pop %ecx 108b9a: 5b pop %ebx 108b9b: 68 03 17 12 00 push $0x121703 108ba0: 68 ad 2b 12 00 push $0x122bad 108ba5: e8 e2 c3 00 00 call 114f8c 108baa: 83 c4 10 add $0x10,%esp 108bad: 85 c0 test %eax,%eax 108baf: 74 77 je 108c28 <== ALWAYS TAKEN fclose(fp); 108bb1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bb4: 50 push %eax <== NOT EXECUTED 108bb5: e8 6e bd 00 00 call 114928 <== NOT EXECUTED 108bba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108bbd: 83 ec 08 sub $0x8,%esp 108bc0: 68 03 17 12 00 push $0x121703 108bc5: 68 b9 2b 12 00 push $0x122bb9 108bca: e8 bd c3 00 00 call 114f8c 108bcf: 83 c4 10 add $0x10,%esp 108bd2: 85 c0 test %eax,%eax 108bd4: 74 12 je 108be8 <== ALWAYS TAKEN fclose(fp); 108bd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bd9: 50 push %eax <== NOT EXECUTED 108bda: e8 49 bd 00 00 call 114928 <== NOT EXECUTED 108bdf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108be2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108be5: c9 leave <== NOT EXECUTED 108be6: c3 ret <== NOT EXECUTED 108be7: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108be8: 83 ec 08 sub $0x8,%esp 108beb: 68 d4 15 12 00 push $0x1215d4 108bf0: 68 b9 2b 12 00 push $0x122bb9 108bf5: e8 92 c3 00 00 call 114f8c 108bfa: 89 c3 mov %eax,%ebx 108bfc: 83 c4 10 add $0x10,%esp 108bff: 85 c0 test %eax,%eax 108c01: 0f 84 71 ff ff ff je 108b78 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108c07: 50 push %eax 108c08: 6a 2a push $0x2a 108c0a: 6a 01 push $0x1 108c0c: 68 2c 2c 12 00 push $0x122c2c 108c11: e8 6e cb 00 00 call 115784 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108c16: 89 1c 24 mov %ebx,(%esp) 108c19: e8 0a bd 00 00 call 114928 108c1e: 83 c4 10 add $0x10,%esp 108c21: e9 52 ff ff ff jmp 108b78 108c26: 66 90 xchg %ax,%ax * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 108c28: 83 ec 08 sub $0x8,%esp 108c2b: 68 d4 15 12 00 push $0x1215d4 108c30: 68 ad 2b 12 00 push $0x122bad 108c35: e8 52 c3 00 00 call 114f8c 108c3a: 89 c3 mov %eax,%ebx 108c3c: 83 c4 10 add $0x10,%esp 108c3f: 85 c0 test %eax,%eax 108c41: 0f 84 76 ff ff ff je 108bbd <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108c47: 50 push %eax 108c48: 6a 66 push $0x66 108c4a: 6a 01 push $0x1 108c4c: 68 c4 2b 12 00 push $0x122bc4 108c51: e8 2e cb 00 00 call 115784 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 108c56: 89 1c 24 mov %ebx,(%esp) 108c59: e8 ca bc 00 00 call 114928 108c5e: 83 c4 10 add $0x10,%esp 108c61: e9 57 ff ff ff jmp 108bbd =============================================================================== 0010b818 : int ioctl( int fd, ioctl_command_t command, ... ) { 10b818: 55 push %ebp 10b819: 89 e5 mov %esp,%ebp 10b81b: 83 ec 08 sub $0x8,%esp 10b81e: 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 ); 10b821: 3b 05 4c 71 12 00 cmp 0x12714c,%eax 10b827: 73 2f jae 10b858 iop = rtems_libio_iop( fd ); 10b829: c1 e0 06 shl $0x6,%eax 10b82c: 03 05 00 b3 12 00 add 0x12b300,%eax rtems_libio_check_is_open(iop); 10b832: f6 40 15 01 testb $0x1,0x15(%eax) 10b836: 74 20 je 10b858 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b838: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b83b: 8b 50 3c mov 0x3c(%eax),%edx 10b83e: 85 d2 test %edx,%edx 10b840: 74 16 je 10b858 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b842: 8b 52 10 mov 0x10(%edx),%edx 10b845: 85 d2 test %edx,%edx 10b847: 74 21 je 10b86a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b849: 83 ec 04 sub $0x4,%esp 10b84c: 51 push %ecx 10b84d: ff 75 0c pushl 0xc(%ebp) 10b850: 50 push %eax 10b851: ff d2 call *%edx return rc; 10b853: 83 c4 10 add $0x10,%esp } 10b856: c9 leave 10b857: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b858: e8 d3 c3 00 00 call 117c30 <__errno> 10b85d: c7 00 09 00 00 00 movl $0x9,(%eax) 10b863: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b868: c9 leave 10b869: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b86a: e8 c1 c3 00 00 call 117c30 <__errno> <== NOT EXECUTED 10b86f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b875: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b87a: c9 leave <== NOT EXECUTED 10b87b: c3 ret <== NOT EXECUTED =============================================================================== 0010a068 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 10a068: 55 push %ebp <== NOT EXECUTED 10a069: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a06b: 56 push %esi <== NOT EXECUTED 10a06c: 53 push %ebx <== NOT EXECUTED 10a06d: 89 d6 mov %edx,%esi <== NOT EXECUTED 10a06f: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10a071: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10a074: a8 20 test $0x20,%al <== NOT EXECUTED 10a076: 74 03 je 10a07b <== NOT EXECUTED c &= 0x7f; 10a078: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 10a07b: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10a07e: 74 18 je 10a098 <== NOT EXECUTED c = tolower (c); 10a080: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 10a083: 8b 15 c4 50 12 00 mov 0x1250c4,%edx <== NOT EXECUTED 10a089: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 10a08e: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10a091: 4a dec %edx <== NOT EXECUTED 10a092: 0f 84 98 00 00 00 je 10a130 <== NOT EXECUTED if (c == '\r') { 10a098: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 10a09b: 74 33 je 10a0d0 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a09d: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a0a0: 0f 84 82 00 00 00 je 10a128 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a0a6: 84 db test %bl,%bl <== NOT EXECUTED 10a0a8: 75 3a jne 10a0e4 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 10a0aa: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a0ad: 8b 15 14 50 12 00 mov 0x125014,%edx <== NOT EXECUTED 10a0b3: 4a dec %edx <== NOT EXECUTED 10a0b4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a0b6: 7d 1c jge 10a0d4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a0b8: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 10a0bc: 75 7a jne 10a138 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a0be: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a0c1: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a0c4: 40 inc %eax <== NOT EXECUTED 10a0c5: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a0c8: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a0ca: 5b pop %ebx <== NOT EXECUTED 10a0cb: 5e pop %esi <== NOT EXECUTED 10a0cc: c9 leave <== NOT EXECUTED 10a0cd: c3 ret <== NOT EXECUTED 10a0ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 10a0d0: 84 c0 test %al,%al <== NOT EXECUTED 10a0d2: 79 08 jns 10a0dc <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a0d4: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a0d6: 5b pop %ebx <== NOT EXECUTED 10a0d7: 5e pop %esi <== NOT EXECUTED 10a0d8: c9 leave <== NOT EXECUTED 10a0d9: c3 ret <== NOT EXECUTED 10a0da: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 10a0dc: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a0df: 74 03 je 10a0e4 <== NOT EXECUTED 10a0e1: b3 0a mov $0xa,%bl <== NOT EXECUTED 10a0e3: 90 nop <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a0e4: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 10a0e7: a8 02 test $0x2,%al <== NOT EXECUTED 10a0e9: 74 bf je 10a0aa <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 10a0eb: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 10a0ee: 0f 84 a0 00 00 00 je 10a194 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10a0f4: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 10a0f7: 74 5f je 10a158 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 10a0f9: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 10a0fc: 74 20 je 10a11e <== NOT EXECUTED return 1; } else if (c == '\n') { 10a0fe: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a101: 74 69 je 10a16c <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 10a103: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 10a106: 74 05 je 10a10d <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 10a108: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 10a10b: 75 9d jne 10a0aa <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a10d: a8 08 test $0x8,%al <== NOT EXECUTED 10a10f: 75 3b jne 10a14c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a111: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a114: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a117: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a11a: 40 inc %eax <== NOT EXECUTED 10a11b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a11e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a123: eb a5 jmp 10a0ca <== NOT EXECUTED 10a125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a128: a8 40 test $0x40,%al <== NOT EXECUTED 10a12a: 74 b8 je 10a0e4 <== NOT EXECUTED 10a12c: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a12e: eb b4 jmp 10a0e4 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a130: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 10a133: e9 60 ff ff ff jmp 10a098 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a138: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a13b: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a13d: e8 f6 fc ff ff call 109e38 <== NOT EXECUTED 10a142: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a145: e9 74 ff ff ff jmp 10a0be <== NOT EXECUTED 10a14a: 66 90 xchg %ax,%ax <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a14c: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a14f: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a151: e8 e2 fc ff ff call 109e38 <== NOT EXECUTED 10a156: eb b9 jmp 10a111 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 10a158: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 10a15d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a15f: e8 38 fd ff ff call 109e9c <== NOT EXECUTED 10a164: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a166: e9 5f ff ff ff jmp 10a0ca <== NOT EXECUTED 10a16b: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10a16c: a8 48 test $0x48,%al <== NOT EXECUTED 10a16e: 74 0c je 10a17c <== NOT EXECUTED echo (c, tty); 10a170: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a172: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a177: e8 bc fc ff ff call 109e38 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 10a17c: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a17f: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a182: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 10a186: 40 inc %eax <== NOT EXECUTED 10a187: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a18a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a18f: e9 36 ff ff ff jmp 10a0ca <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a194: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a196: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a198: e8 ff fc ff ff call 109e9c <== NOT EXECUTED 10a19d: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a19f: e9 26 ff ff ff jmp 10a0ca <== NOT EXECUTED =============================================================================== 001249a8 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 1249a8: 55 push %ebp <== NOT EXECUTED 1249a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1249ab: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249ad: c9 leave <== NOT EXECUTED 1249ae: c3 ret <== NOT EXECUTED =============================================================================== 0011f56c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11f56c: 55 push %ebp 11f56d: 89 e5 mov %esp,%ebp 11f56f: 53 push %ebx 11f570: 83 ec 04 sub $0x4,%esp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 11f573: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 11f57a: 74 08 je 11f584 */ fclose (stdin); fclose (stdout); fclose (stderr); } 11f57c: 8b 5d fc mov -0x4(%ebp),%ebx 11f57f: c9 leave 11f580: c3 ret 11f581: 8d 76 00 lea 0x0(%esi),%esi /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11f584: 8b 1d e0 23 12 00 mov 0x1223e0,%ebx 11f58a: 39 1d e0 50 12 00 cmp %ebx,0x1250e0 11f590: 74 12 je 11f5a4 _wrapup_reent(_global_impure_ptr); 11f592: 83 ec 0c sub $0xc,%esp 11f595: 53 push %ebx 11f596: e8 f5 04 00 00 call 11fa90 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 11f59b: 89 1d e0 50 12 00 mov %ebx,0x1250e0 11f5a1: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11f5a4: 83 ec 0c sub $0xc,%esp 11f5a7: ff 73 04 pushl 0x4(%ebx) 11f5aa: e8 b9 49 ff ff call 113f68 fclose (stdout); 11f5af: 5a pop %edx 11f5b0: a1 e0 50 12 00 mov 0x1250e0,%eax 11f5b5: ff 70 08 pushl 0x8(%eax) 11f5b8: e8 ab 49 ff ff call 113f68 fclose (stderr); 11f5bd: 58 pop %eax 11f5be: a1 e0 50 12 00 mov 0x1250e0,%eax 11f5c3: ff 70 0c pushl 0xc(%eax) 11f5c6: e8 9d 49 ff ff call 113f68 11f5cb: 83 c4 10 add $0x10,%esp } 11f5ce: 8b 5d fc mov -0x4(%ebp),%ebx 11f5d1: c9 leave 11f5d2: c3 ret =============================================================================== 001096d4 : int link( const char *existing, const char *new ) { 1096d4: 55 push %ebp 1096d5: 89 e5 mov %esp,%ebp 1096d7: 57 push %edi 1096d8: 56 push %esi 1096d9: 53 push %ebx 1096da: 83 ec 48 sub $0x48,%esp 1096dd: 8b 55 08 mov 0x8(%ebp),%edx 1096e0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 1096e3: 31 c0 xor %eax,%eax 1096e5: b9 ff ff ff ff mov $0xffffffff,%ecx 1096ea: 89 d7 mov %edx,%edi 1096ec: f2 ae repnz scas %es:(%edi),%al 1096ee: f7 d1 not %ecx 1096f0: 49 dec %ecx 1096f1: 6a 01 push $0x1 1096f3: 8d 75 cc lea -0x34(%ebp),%esi 1096f6: 56 push %esi 1096f7: 6a 00 push $0x0 1096f9: 51 push %ecx 1096fa: 52 push %edx 1096fb: e8 98 fb ff ff call 109298 0, &existing_loc, true ); if ( result != 0 ) 109700: 83 c4 20 add $0x20,%esp 109703: 85 c0 test %eax,%eax 109705: 74 11 je 109718 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 109707: bb ff ff ff ff mov $0xffffffff,%ebx rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10970c: 89 d8 mov %ebx,%eax 10970e: 8d 65 f4 lea -0xc(%ebp),%esp 109711: 5b pop %ebx 109712: 5e pop %esi 109713: 5f pop %edi 109714: c9 leave 109715: c3 ret 109716: 66 90 xchg %ax,%ax /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 109718: 57 push %edi 109719: 8d 7d b8 lea -0x48(%ebp),%edi 10971c: 57 push %edi 10971d: 8d 45 e4 lea -0x1c(%ebp),%eax 109720: 50 push %eax 109721: 53 push %ebx 109722: e8 09 0f 00 00 call 10a630 if ( !parent_loc.ops->evalformake_h ) { 109727: 8b 45 c4 mov -0x3c(%ebp),%eax 10972a: 8b 40 04 mov 0x4(%eax),%eax 10972d: 83 c4 10 add $0x10,%esp 109730: 85 c0 test %eax,%eax 109732: 0f 84 e8 00 00 00 je 109820 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 109738: 51 push %ecx 109739: 8d 55 e0 lea -0x20(%ebp),%edx 10973c: 52 push %edx 10973d: 57 push %edi 10973e: 03 5d e4 add -0x1c(%ebp),%ebx 109741: 53 push %ebx 109742: ff d0 call *%eax 109744: 89 c3 mov %eax,%ebx if ( result != 0 ) { 109746: 83 c4 10 add $0x10,%esp 109749: 85 c0 test %eax,%eax 10974b: 0f 85 a7 00 00 00 jne 1097f8 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 109751: 8b 45 c8 mov -0x38(%ebp),%eax 109754: 3b 45 dc cmp -0x24(%ebp),%eax 109757: 75 5b jne 1097b4 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 109759: 8b 55 c4 mov -0x3c(%ebp),%edx 10975c: 8b 42 08 mov 0x8(%edx),%eax 10975f: 85 c0 test %eax,%eax 109761: 0f 84 e0 00 00 00 je 109847 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 109767: 52 push %edx 109768: ff 75 e0 pushl -0x20(%ebp) 10976b: 57 push %edi 10976c: 56 push %esi 10976d: ff d0 call *%eax 10976f: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &existing_loc ); 109771: 8b 45 d8 mov -0x28(%ebp),%eax 109774: 83 c4 10 add $0x10,%esp 109777: 85 c0 test %eax,%eax 109779: 74 10 je 10978b <== NEVER TAKEN 10977b: 8b 40 1c mov 0x1c(%eax),%eax 10977e: 85 c0 test %eax,%eax 109780: 74 09 je 10978b <== NEVER TAKEN 109782: 83 ec 0c sub $0xc,%esp 109785: 56 push %esi 109786: ff d0 call *%eax 109788: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 10978b: 8b 45 c4 mov -0x3c(%ebp),%eax 10978e: 85 c0 test %eax,%eax 109790: 0f 84 76 ff ff ff je 10970c <== NEVER TAKEN 109796: 8b 40 1c mov 0x1c(%eax),%eax 109799: 85 c0 test %eax,%eax 10979b: 0f 84 6b ff ff ff je 10970c <== NEVER TAKEN 1097a1: 83 ec 0c sub $0xc,%esp 1097a4: 57 push %edi 1097a5: ff d0 call *%eax 1097a7: 83 c4 10 add $0x10,%esp return result; } 1097aa: 89 d8 mov %ebx,%eax 1097ac: 8d 65 f4 lea -0xc(%ebp),%esp 1097af: 5b pop %ebx 1097b0: 5e pop %esi 1097b1: 5f pop %edi 1097b2: c9 leave 1097b3: c3 ret * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 1097b4: 8b 45 d8 mov -0x28(%ebp),%eax 1097b7: 85 c0 test %eax,%eax 1097b9: 74 10 je 1097cb <== NEVER TAKEN 1097bb: 8b 40 1c mov 0x1c(%eax),%eax 1097be: 85 c0 test %eax,%eax 1097c0: 74 09 je 1097cb <== NEVER TAKEN 1097c2: 83 ec 0c sub $0xc,%esp 1097c5: 56 push %esi 1097c6: ff d0 call *%eax 1097c8: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 1097cb: 8b 45 c4 mov -0x3c(%ebp),%eax 1097ce: 85 c0 test %eax,%eax 1097d0: 74 10 je 1097e2 <== NEVER TAKEN 1097d2: 8b 40 1c mov 0x1c(%eax),%eax 1097d5: 85 c0 test %eax,%eax 1097d7: 74 09 je 1097e2 <== NEVER TAKEN 1097d9: 83 ec 0c sub $0xc,%esp 1097dc: 57 push %edi 1097dd: ff d0 call *%eax 1097df: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 1097e2: e8 71 b8 00 00 call 115058 <__errno> 1097e7: c7 00 12 00 00 00 movl $0x12,(%eax) 1097ed: bb ff ff ff ff mov $0xffffffff,%ebx 1097f2: e9 15 ff ff ff jmp 10970c 1097f7: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 1097f8: 8b 45 d8 mov -0x28(%ebp),%eax 1097fb: 85 c0 test %eax,%eax 1097fd: 74 10 je 10980f <== NEVER TAKEN 1097ff: 8b 40 1c mov 0x1c(%eax),%eax 109802: 85 c0 test %eax,%eax 109804: 74 09 je 10980f <== NEVER TAKEN 109806: 83 ec 0c sub $0xc,%esp 109809: 56 push %esi 10980a: ff d0 call *%eax 10980c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 10980f: e8 44 b8 00 00 call 115058 <__errno> 109814: 89 18 mov %ebx,(%eax) 109816: bb ff ff ff ff mov $0xffffffff,%ebx 10981b: e9 ec fe ff ff jmp 10970c */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 109820: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 109823: 85 c0 test %eax,%eax <== NOT EXECUTED 109825: 74 10 je 109837 <== NOT EXECUTED 109827: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10982a: 85 c0 test %eax,%eax <== NOT EXECUTED 10982c: 74 09 je 109837 <== NOT EXECUTED 10982e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109831: 56 push %esi <== NOT EXECUTED 109832: ff d0 call *%eax <== NOT EXECUTED 109834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109837: e8 1c b8 00 00 call 115058 <__errno> <== NOT EXECUTED 10983c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109842: e9 c0 fe ff ff jmp 109707 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 109847: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 10984a: 85 c0 test %eax,%eax <== NOT EXECUTED 10984c: 74 13 je 109861 <== NOT EXECUTED 10984e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109851: 85 c0 test %eax,%eax <== NOT EXECUTED 109853: 74 0c je 109861 <== NOT EXECUTED 109855: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109858: 56 push %esi <== NOT EXECUTED 109859: ff d0 call *%eax <== NOT EXECUTED 10985b: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 10985e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 109861: 85 d2 test %edx,%edx <== NOT EXECUTED 109863: 74 10 je 109875 <== NOT EXECUTED 109865: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 109868: 85 c0 test %eax,%eax <== NOT EXECUTED 10986a: 74 09 je 109875 <== NOT EXECUTED 10986c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10986f: 57 push %edi <== NOT EXECUTED 109870: ff d0 call *%eax <== NOT EXECUTED 109872: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109875: e8 de b7 00 00 call 115058 <__errno> <== NOT EXECUTED 10987a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109880: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 109885: e9 82 fe ff ff jmp 10970c <== NOT EXECUTED =============================================================================== 0011f424 : off_t lseek( int fd, off_t offset, int whence ) { 11f424: 55 push %ebp 11f425: 89 e5 mov %esp,%ebp 11f427: 57 push %edi 11f428: 56 push %esi 11f429: 53 push %ebx 11f42a: 83 ec 2c sub $0x2c,%esp 11f42d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f430: 8b 75 0c mov 0xc(%ebp),%esi 11f433: 8b 7d 10 mov 0x10(%ebp),%edi 11f436: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11f439: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11f43f: 0f 83 b7 00 00 00 jae 11f4fc <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11f445: c1 e3 06 shl $0x6,%ebx 11f448: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open(iop); 11f44e: f6 43 15 01 testb $0x1,0x15(%ebx) 11f452: 0f 84 a4 00 00 00 je 11f4fc <== NEVER TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11f458: 8b 53 3c mov 0x3c(%ebx),%edx 11f45b: 89 55 d4 mov %edx,-0x2c(%ebp) 11f45e: 8b 52 14 mov 0x14(%edx),%edx 11f461: 85 d2 test %edx,%edx 11f463: 0f 84 aa 00 00 00 je 11f513 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11f469: 8b 53 0c mov 0xc(%ebx),%edx 11f46c: 8b 4b 10 mov 0x10(%ebx),%ecx 11f46f: 89 55 e0 mov %edx,-0x20(%ebp) 11f472: 89 4d e4 mov %ecx,-0x1c(%ebp) switch ( whence ) { 11f475: 83 f8 01 cmp $0x1,%eax 11f478: 74 6e je 11f4e8 11f47a: 83 f8 02 cmp $0x2,%eax 11f47d: 74 35 je 11f4b4 11f47f: 85 c0 test %eax,%eax 11f481: 75 45 jne 11f4c8 case SEEK_SET: iop->offset = offset; 11f483: 89 73 0c mov %esi,0xc(%ebx) 11f486: 89 7b 10 mov %edi,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11f489: 50 push %eax 11f48a: 57 push %edi 11f48b: 56 push %esi 11f48c: 53 push %ebx 11f48d: 8b 4d d4 mov -0x2c(%ebp),%ecx 11f490: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 11f493: 83 c4 10 add $0x10,%esp 11f496: 89 c1 mov %eax,%ecx 11f498: 21 d1 and %edx,%ecx 11f49a: 41 inc %ecx 11f49b: 75 0c jne 11f4a9 iop->offset = old_offset; 11f49d: 8b 75 e0 mov -0x20(%ebp),%esi 11f4a0: 8b 7d e4 mov -0x1c(%ebp),%edi 11f4a3: 89 73 0c mov %esi,0xc(%ebx) 11f4a6: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11f4a9: 8d 65 f4 lea -0xc(%ebp),%esp 11f4ac: 5b pop %ebx 11f4ad: 5e pop %esi 11f4ae: 5f pop %edi 11f4af: c9 leave 11f4b0: c3 ret 11f4b1: 8d 76 00 lea 0x0(%esi),%esi case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11f4b4: 89 f2 mov %esi,%edx 11f4b6: 89 f9 mov %edi,%ecx 11f4b8: 03 53 04 add 0x4(%ebx),%edx 11f4bb: 13 4b 08 adc 0x8(%ebx),%ecx 11f4be: 89 53 0c mov %edx,0xc(%ebx) 11f4c1: 89 4b 10 mov %ecx,0x10(%ebx) break; 11f4c4: eb c3 jmp 11f489 11f4c6: 66 90 xchg %ax,%ax default: rtems_set_errno_and_return_minus_one( EINVAL ); 11f4c8: e8 4f 49 ff ff call 113e1c <__errno> 11f4cd: c7 00 16 00 00 00 movl $0x16,(%eax) 11f4d3: b8 ff ff ff ff mov $0xffffffff,%eax 11f4d8: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11f4dd: 8d 65 f4 lea -0xc(%ebp),%esp 11f4e0: 5b pop %ebx 11f4e1: 5e pop %esi 11f4e2: 5f pop %edi 11f4e3: c9 leave 11f4e4: c3 ret 11f4e5: 8d 76 00 lea 0x0(%esi),%esi case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11f4e8: 8b 55 e0 mov -0x20(%ebp),%edx 11f4eb: 8b 4d e4 mov -0x1c(%ebp),%ecx 11f4ee: 01 f2 add %esi,%edx 11f4f0: 11 f9 adc %edi,%ecx 11f4f2: 89 53 0c mov %edx,0xc(%ebx) 11f4f5: 89 4b 10 mov %ecx,0x10(%ebx) break; 11f4f8: eb 8f jmp 11f489 11f4fa: 66 90 xchg %ax,%ax off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11f4fc: e8 1b 49 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f501: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11f507: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f50c: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11f511: eb 96 jmp 11f4a9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f513: e8 04 49 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f518: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f51e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f523: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11f528: e9 7c ff ff ff jmp 11f4a9 <== NOT EXECUTED =============================================================================== 0010885c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10885c: 55 push %ebp 10885d: 89 e5 mov %esp,%ebp 10885f: 57 push %edi 108860: 56 push %esi 108861: 53 push %ebx 108862: 83 ec 0c sub $0xc,%esp 108865: 8b 75 08 mov 0x8(%ebp),%esi 108868: ff 05 04 72 12 00 incl 0x127204 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10886e: e8 11 ff ff ff call 108784 /* * Validate the parameters */ if ( !size ) 108873: 85 f6 test %esi,%esi 108875: 74 65 je 1088dc <== 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()) && 108877: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 10887e: 74 50 je 1088d0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108880: 6a 00 push $0x0 108882: 6a 00 push $0x0 108884: 56 push %esi 108885: ff 35 58 31 12 00 pushl 0x123158 10888b: e8 34 4d 00 00 call 10d5c4 <_Protected_heap_Allocate_aligned_with_boundary> 108890: 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 ) { 108892: 83 c4 10 add $0x10,%esp 108895: 85 c0 test %eax,%eax 108897: 74 5b je 1088f4 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 108899: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10889b: a1 f0 55 12 00 mov 0x1255f0,%eax 1088a0: 85 c0 test %eax,%eax 1088a2: 74 0a je 1088ae <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1088a4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1088a7: 56 push %esi <== NOT EXECUTED 1088a8: 57 push %edi <== NOT EXECUTED 1088a9: ff d0 call *%eax <== NOT EXECUTED 1088ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1088ae: a1 e8 55 12 00 mov 0x1255e8,%eax 1088b3: 85 c0 test %eax,%eax 1088b5: 74 31 je 1088e8 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1088b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088ba: 57 push %edi <== NOT EXECUTED 1088bb: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1088be: 89 fb mov %edi,%ebx <== NOT EXECUTED 1088c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088c3: 89 d8 mov %ebx,%eax 1088c5: 8d 65 f4 lea -0xc(%ebp),%esp 1088c8: 5b pop %ebx 1088c9: 5e pop %esi 1088ca: 5f pop %edi 1088cb: c9 leave 1088cc: c3 ret 1088cd: 8d 76 00 lea 0x0(%esi),%esi return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1088d0: e8 57 fe ff ff call 10872c 1088d5: 84 c0 test %al,%al 1088d7: 75 a7 jne 108880 <== ALWAYS TAKEN 1088d9: 8d 76 00 lea 0x0(%esi),%esi /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1088dc: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088de: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1088e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1088e3: 5b pop %ebx <== NOT EXECUTED 1088e4: 5e pop %esi <== NOT EXECUTED 1088e5: 5f pop %edi <== NOT EXECUTED 1088e6: c9 leave <== NOT EXECUTED 1088e7: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1088e8: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088ea: 89 d8 mov %ebx,%eax 1088ec: 8d 65 f4 lea -0xc(%ebp),%esp 1088ef: 5b pop %ebx 1088f0: 5e pop %esi 1088f1: 5f pop %edi 1088f2: c9 leave 1088f3: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1088f4: a1 ec 55 12 00 mov 0x1255ec,%eax 1088f9: 85 c0 test %eax,%eax 1088fb: 74 10 je 10890d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1088fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108900: 56 push %esi <== NOT EXECUTED 108901: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 108904: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 108906: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108909: 85 c0 test %eax,%eax <== NOT EXECUTED 10890b: 75 8e jne 10889b <== NOT EXECUTED errno = ENOMEM; 10890d: e8 0a b5 00 00 call 113e1c <__errno> 108912: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 108918: eb a9 jmp 1088c3 =============================================================================== 0010876c : } void malloc_deferred_free( void *pointer ) { 10876c: 55 push %ebp <== NOT EXECUTED 10876d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10876f: 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 ); 108772: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108775: 68 ec 71 12 00 push $0x1271ec <== NOT EXECUTED 10877a: e8 f5 3d 00 00 call 10c574 <_Chain_Append> <== NOT EXECUTED 10877f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 108782: c9 leave <== NOT EXECUTED 108783: c3 ret <== NOT EXECUTED =============================================================================== 00108784 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 108784: 55 push %ebp 108785: 89 e5 mov %esp,%ebp 108787: 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) 10878a: eb 0c jmp 108798 free(to_be_freed); 10878c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10878f: 50 push %eax <== NOT EXECUTED 108790: e8 ef fd ff ff call 108584 <== NOT EXECUTED 108795: 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 ); 108798: 83 ec 0c sub $0xc,%esp 10879b: 68 ec 71 12 00 push $0x1271ec 1087a0: e8 0b 3e 00 00 call 10c5b0 <_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) 1087a5: 83 c4 10 add $0x10,%esp 1087a8: 85 c0 test %eax,%eax 1087aa: 75 e0 jne 10878c <== NEVER TAKEN free(to_be_freed); } 1087ac: c9 leave 1087ad: c3 ret =============================================================================== 0010872c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 10872c: 55 push %ebp 10872d: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 10872f: a1 58 73 12 00 mov 0x127358,%eax 108734: 85 c0 test %eax,%eax 108736: 75 0c jne 108744 <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 108738: a1 f4 73 12 00 mov 0x1273f4,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 10873d: 85 c0 test %eax,%eax 10873f: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 108742: c9 leave 108743: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 108744: 31 c0 xor %eax,%eax if ( _ISR_Nest_level > 0 ) return false; return true; } 108746: c9 leave <== NOT EXECUTED 108747: c3 ret <== NOT EXECUTED =============================================================================== 001120f4 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 1120f4: 55 push %ebp 1120f5: 89 e5 mov %esp,%ebp 1120f7: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 1120fa: ff 35 98 6e 12 00 pushl 0x126e98 112100: 6a 01 push $0x1 112102: e8 65 62 ff ff call 10836c if ( memory ) 112107: 83 c4 10 add $0x10,%esp 11210a: 85 c0 test %eax,%eax 11210c: 74 06 je 112114 <== NEVER TAKEN memfile_blocks_allocated++; 11210e: ff 05 ac 6f 12 00 incl 0x126fac return memory; } 112114: c9 leave 112115: c3 ret =============================================================================== 00112568 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 112568: 55 push %ebp 112569: 89 e5 mov %esp,%ebp 11256b: 53 push %ebx 11256c: 83 ec 10 sub $0x10,%esp 11256f: 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) ) { 112572: 53 push %ebx 112573: e8 48 e5 ff ff call 110ac0 112578: 83 c4 10 add $0x10,%esp 11257b: 85 c0 test %eax,%eax 11257d: 75 2f jne 1125ae 11257f: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 112584: 75 28 jne 1125ae <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 112586: a1 24 50 12 00 mov 0x125024,%eax 11258b: 39 58 04 cmp %ebx,0x4(%eax) 11258e: 74 28 je 1125b8 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 112590: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 112594: 74 0c je 1125a2 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 112596: 83 ec 0c sub $0xc,%esp 112599: 53 push %ebx 11259a: e8 21 fe ff ff call 1123c0 11259f: 83 c4 10 add $0x10,%esp free( the_jnode ); 1125a2: 83 ec 0c sub $0xc,%esp 1125a5: 53 push %ebx 1125a6: e8 d9 5f ff ff call 108584 1125ab: 83 c4 10 add $0x10,%esp } return 0; } 1125ae: 31 c0 xor %eax,%eax 1125b0: 8b 5d fc mov -0x4(%ebp),%ebx 1125b3: c9 leave 1125b4: c3 ret 1125b5: 8d 76 00 lea 0x0(%esi),%esi /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 1125b8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1125bf: eb cf jmp 112590 <== NOT EXECUTED =============================================================================== 001122f8 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 1122f8: 55 push %ebp 1122f9: 89 e5 mov %esp,%ebp 1122fb: 57 push %edi 1122fc: 56 push %esi 1122fd: 53 push %ebx 1122fe: 83 ec 0c sub $0xc,%esp 112301: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 112304: 8b 45 08 mov 0x8(%ebp),%eax 112307: 85 c0 test %eax,%eax 112309: 74 4e je 112359 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11230b: 8b 45 08 mov 0x8(%ebp),%eax 11230e: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 112314: 31 db xor %ebx,%ebx 112316: 66 90 xchg %ax,%ax if ( b[i] ) { 112318: 8b 04 9e mov (%esi,%ebx,4),%eax 11231b: 85 c0 test %eax,%eax 11231d: 74 13 je 112332 memfile_free_block( b[i] ); 11231f: 83 ec 0c sub $0xc,%esp 112322: 50 push %eax 112323: e8 b0 fd ff ff call 1120d8 b[i] = 0; 112328: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 11232f: 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 112337: 8b 45 08 mov 0x8(%ebp),%eax 11233a: 8b 30 mov (%eax),%esi /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 11233c: 83 ec 0c sub $0xc,%esp 11233f: 56 push %esi 112340: e8 93 fd ff ff call 1120d8 *block_table = 0; 112345: 8b 45 08 mov 0x8(%ebp),%eax 112348: c7 00 00 00 00 00 movl $0x0,(%eax) 11234e: 83 c4 10 add $0x10,%esp } 112351: 8d 65 f4 lea -0xc(%ebp),%esp 112354: 5b pop %ebx 112355: 5e pop %esi 112356: 5f pop %edi 112357: c9 leave 112358: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 112359: 68 6a 1e 12 00 push $0x121e6a <== NOT EXECUTED 11235e: 68 a0 1f 12 00 push $0x121fa0 <== NOT EXECUTED 112363: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 112368: 68 8c 1e 12 00 push $0x121e8c <== NOT EXECUTED 11236d: e8 d2 5e ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 0011281c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 11281c: 55 push %ebp 11281d: 89 e5 mov %esp,%ebp 11281f: 53 push %ebx 112820: 83 ec 14 sub $0x14,%esp 112823: 8b 4d 08 mov 0x8(%ebp),%ecx 112826: 8b 45 0c mov 0xc(%ebp),%eax 112829: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 11282c: 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 ) 11282f: 39 53 54 cmp %edx,0x54(%ebx) 112832: 7f 19 jg 11284d <== NEVER TAKEN 112834: 7d 12 jge 112848 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 112836: 51 push %ecx <== NOT EXECUTED 112837: 52 push %edx <== NOT EXECUTED 112838: 50 push %eax <== NOT EXECUTED 112839: 53 push %ebx <== NOT EXECUTED 11283a: e8 79 fe ff ff call 1126b8 <== NOT EXECUTED 11283f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 112842: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 112845: c9 leave <== NOT EXECUTED 112846: c3 ret <== NOT EXECUTED 112847: 90 nop <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 112848: 39 43 50 cmp %eax,0x50(%ebx) 11284b: 72 e9 jb 112836 <== NEVER TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 11284d: 89 43 50 mov %eax,0x50(%ebx) 112850: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 112853: 89 41 04 mov %eax,0x4(%ecx) 112856: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 112859: 83 ec 08 sub $0x8,%esp 11285c: 6a 00 push $0x0 11285e: 8d 45 f0 lea -0x10(%ebp),%eax 112861: 50 push %eax 112862: e8 99 5d ff ff call 108600 112867: 8b 45 f0 mov -0x10(%ebp),%eax 11286a: 89 43 40 mov %eax,0x40(%ebx) 11286d: 31 c0 xor %eax,%eax return 0; 11286f: 83 c4 10 add $0x10,%esp } 112872: 8b 5d fc mov -0x4(%ebp),%ebx 112875: c9 leave 112876: c3 ret =============================================================================== 00112878 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 112878: 55 push %ebp 112879: 89 e5 mov %esp,%ebp 11287b: 57 push %edi 11287c: 56 push %esi 11287d: 53 push %ebx 11287e: 83 ec 0c sub $0xc,%esp 112881: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 112884: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 112887: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 11288b: 74 2f je 1128bc <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 11288d: 57 push %edi 11288e: ff 73 10 pushl 0x10(%ebx) 112891: ff 73 0c pushl 0xc(%ebx) 112894: 56 push %esi 112895: e8 1e fe ff ff call 1126b8 11289a: 83 c4 10 add $0x10,%esp 11289d: 85 c0 test %eax,%eax 11289f: 75 4d jne 1128ee <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 1128a1: 8b 46 50 mov 0x50(%esi),%eax 1128a4: 8b 56 54 mov 0x54(%esi),%edx 1128a7: 89 43 04 mov %eax,0x4(%ebx) 1128aa: 89 53 08 mov %edx,0x8(%ebx) 1128ad: 8b 43 0c mov 0xc(%ebx),%eax 1128b0: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 1128b3: 8d 65 f4 lea -0xc(%ebp),%esp 1128b6: 5b pop %ebx 1128b7: 5e pop %esi 1128b8: 5f pop %edi 1128b9: c9 leave 1128ba: c3 ret 1128bb: 90 nop IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 1128bc: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 1128bf: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 1128c2: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 1128c5: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 1128c8: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1128ca: 7f 14 jg 1128e0 <== NOT EXECUTED 1128cc: 7d 0e jge 1128dc <== NOT EXECUTED 1128ce: 89 f8 mov %edi,%eax <== NOT EXECUTED 1128d0: 89 ca mov %ecx,%edx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 1128d2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1128d5: 5b pop %ebx <== NOT EXECUTED 1128d6: 5e pop %esi <== NOT EXECUTED 1128d7: 5f pop %edi <== NOT EXECUTED 1128d8: c9 leave <== NOT EXECUTED 1128d9: c3 ret <== NOT EXECUTED 1128da: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 1128dc: 39 c7 cmp %eax,%edi <== NOT EXECUTED 1128de: 76 ee jbe 1128ce <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1128e0: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 1128e3: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 1128e6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1128e9: 5b pop %ebx <== NOT EXECUTED 1128ea: 5e pop %esi <== NOT EXECUTED 1128eb: 5f pop %edi <== NOT EXECUTED 1128ec: c9 leave <== NOT EXECUTED 1128ed: c3 ret <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 1128ee: e8 29 15 00 00 call 113e1c <__errno> <== NOT EXECUTED 1128f3: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1128f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1128fe: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 112903: eb ae jmp 1128b3 <== NOT EXECUTED =============================================================================== 00112b94 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 112b94: 55 push %ebp 112b95: 89 e5 mov %esp,%ebp 112b97: 56 push %esi 112b98: 53 push %ebx 112b99: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 112b9c: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 112b9f: 8b 43 14 mov 0x14(%ebx),%eax 112ba2: a9 04 02 00 00 test $0x204,%eax 112ba7: 74 06 je 112baf && (the_jnode->type == IMFS_LINEAR_FILE)) { 112ba9: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 112bad: 74 2d je 112bdc <== NEVER TAKEN the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 112baf: 8b 56 50 mov 0x50(%esi),%edx 112bb2: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 112bb5: f6 c4 02 test $0x2,%ah 112bb8: 75 12 jne 112bcc iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 112bba: 89 53 04 mov %edx,0x4(%ebx) 112bbd: 89 4b 08 mov %ecx,0x8(%ebx) 112bc0: 31 c0 xor %eax,%eax return 0; } 112bc2: 8d 65 f8 lea -0x8(%ebp),%esp 112bc5: 5b pop %ebx 112bc6: 5e pop %esi 112bc7: c9 leave 112bc8: c3 ret 112bc9: 8d 76 00 lea 0x0(%esi),%esi if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 112bcc: 89 53 0c mov %edx,0xc(%ebx) 112bcf: 89 4b 10 mov %ecx,0x10(%ebx) 112bd2: 8b 56 50 mov 0x50(%esi),%edx 112bd5: 8b 4e 54 mov 0x54(%esi),%ecx 112bd8: eb e0 jmp 112bba 112bda: 66 90 xchg %ax,%ax /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 112bdc: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 112bdf: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 112be2: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 112be9: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 112bf0: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 112bf7: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 112bfe: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 112c05: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 112c0c: 85 c0 test %eax,%eax <== NOT EXECUTED 112c0e: 75 09 jne 112c19 <== NOT EXECUTED 112c10: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 112c13: 31 d2 xor %edx,%edx <== NOT EXECUTED 112c15: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 112c17: eb 9c jmp 112bb5 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 112c19: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112c1c: 50 push %eax <== NOT EXECUTED 112c1d: 52 push %edx <== NOT EXECUTED 112c1e: 6a 00 push $0x0 <== NOT EXECUTED 112c20: 6a 00 push $0x0 <== NOT EXECUTED 112c22: 56 push %esi <== NOT EXECUTED 112c23: e8 e0 fc ff ff call 112908 <== 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) 112c28: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 112c2b: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 112c2e: 74 92 je 112bc2 <== NOT EXECUTED 112c30: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 112c33: e9 77 ff ff ff jmp 112baf <== NOT EXECUTED =============================================================================== 001125c4 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1125c4: 55 push %ebp 1125c5: 89 e5 mov %esp,%ebp 1125c7: 53 push %ebx 1125c8: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1125cb: 8b 45 0c mov 0xc(%ebp),%eax 1125ce: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1125d0: 8b 4b 08 mov 0x8(%ebx),%ecx 1125d3: 85 c9 test %ecx,%ecx 1125d5: 74 13 je 1125ea <== NEVER TAKEN 1125d7: 83 ec 0c sub $0xc,%esp 1125da: 53 push %ebx 1125db: e8 b8 9f ff ff call 10c598 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1125e0: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1125e7: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 1125ea: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 1125ee: 83 ec 08 sub $0x8,%esp 1125f1: 6a 00 push $0x0 1125f3: 8d 45 f0 lea -0x10(%ebp),%eax 1125f6: 50 push %eax 1125f7: e8 04 60 ff ff call 108600 1125fc: 8b 45 f0 mov -0x10(%ebp),%eax 1125ff: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 112602: 89 1c 24 mov %ebx,(%esp) 112605: e8 5e ff ff ff call 112568 } 11260a: 8b 5d fc mov -0x4(%ebp),%ebx 11260d: c9 leave 11260e: c3 ret =============================================================================== 00108938 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 108938: 55 push %ebp 108939: 89 e5 mov %esp,%ebp 10893b: 57 push %edi 10893c: 56 push %esi 10893d: 53 push %ebx 10893e: 83 ec 3c sub $0x3c,%esp 108941: 8b 7d 08 mov 0x8(%ebp),%edi 108944: 8b 75 0c mov 0xc(%ebp),%esi 108947: 8b 45 10 mov 0x10(%ebp),%eax 10894a: 8b 55 14 mov 0x14(%ebp),%edx 10894d: 89 45 c0 mov %eax,-0x40(%ebp) 108950: 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) ) ) 108953: f7 c6 00 f0 00 00 test $0xf000,%esi 108959: 0f 84 9d 00 00 00 je 1089fc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 10895f: 51 push %ecx 108960: 8d 5d cc lea -0x34(%ebp),%ebx 108963: 53 push %ebx 108964: 8d 45 e4 lea -0x1c(%ebp),%eax 108967: 50 push %eax 108968: 57 push %edi 108969: e8 62 0a 00 00 call 1093d0 if ( !temp_loc.ops->evalformake_h ) { 10896e: 8b 45 d8 mov -0x28(%ebp),%eax 108971: 8b 40 04 mov 0x4(%eax),%eax 108974: 83 c4 10 add $0x10,%esp 108977: 85 c0 test %eax,%eax 108979: 74 65 je 1089e0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 10897b: 52 push %edx 10897c: 8d 55 e0 lea -0x20(%ebp),%edx 10897f: 52 push %edx 108980: 53 push %ebx 108981: 03 7d e4 add -0x1c(%ebp),%edi 108984: 57 push %edi 108985: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108987: 83 c4 10 add $0x10,%esp 10898a: 85 c0 test %eax,%eax 10898c: 75 5d jne 1089eb return -1; if ( !temp_loc.ops->mknod_h ) { 10898e: 8b 55 d8 mov -0x28(%ebp),%edx 108991: 8b 42 14 mov 0x14(%edx),%eax 108994: 85 c0 test %eax,%eax 108996: 74 36 je 1089ce <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 108998: 83 ec 0c sub $0xc,%esp 10899b: 53 push %ebx 10899c: ff 75 c4 pushl -0x3c(%ebp) 10899f: ff 75 c0 pushl -0x40(%ebp) 1089a2: 56 push %esi 1089a3: ff 75 e0 pushl -0x20(%ebp) 1089a6: ff d0 call *%eax 1089a8: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 1089aa: 8b 45 d8 mov -0x28(%ebp),%eax 1089ad: 83 c4 20 add $0x20,%esp 1089b0: 85 c0 test %eax,%eax 1089b2: 74 10 je 1089c4 <== NEVER TAKEN 1089b4: 8b 40 1c mov 0x1c(%eax),%eax 1089b7: 85 c0 test %eax,%eax 1089b9: 74 09 je 1089c4 1089bb: 83 ec 0c sub $0xc,%esp 1089be: 53 push %ebx 1089bf: ff d0 call *%eax 1089c1: 83 c4 10 add $0x10,%esp return result; } 1089c4: 89 f0 mov %esi,%eax 1089c6: 8d 65 f4 lea -0xc(%ebp),%esp 1089c9: 5b pop %ebx 1089ca: 5e pop %esi 1089cb: 5f pop %edi 1089cc: c9 leave 1089cd: c3 ret ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 1089ce: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1089d1: 85 c0 test %eax,%eax <== NOT EXECUTED 1089d3: 74 0b je 1089e0 <== NOT EXECUTED 1089d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1089d8: 53 push %ebx <== NOT EXECUTED 1089d9: ff d0 call *%eax <== NOT EXECUTED 1089db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1089de: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1089e0: e8 37 b4 00 00 call 113e1c <__errno> <== NOT EXECUTED 1089e5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1089eb: be ff ff ff ff mov $0xffffffff,%esi result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 1089f0: 89 f0 mov %esi,%eax 1089f2: 8d 65 f4 lea -0xc(%ebp),%esp 1089f5: 5b pop %ebx 1089f6: 5e pop %esi 1089f7: 5f pop %edi 1089f8: c9 leave 1089f9: c3 ret 1089fa: 66 90 xchg %ax,%ax int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1089fc: e8 1b b4 00 00 call 113e1c <__errno> <== NOT EXECUTED 108a01: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108a07: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108a0c: eb b6 jmp 1089c4 <== NOT EXECUTED =============================================================================== 00108a94 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108a94: 55 push %ebp 108a95: 89 e5 mov %esp,%ebp 108a97: 57 push %edi 108a98: 56 push %esi 108a99: 53 push %ebx 108a9a: 83 ec 4c sub $0x4c,%esp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108a9d: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108aa1: 0f 87 61 02 00 00 ja 108d08 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 108aa7: 83 ec 0c sub $0xc,%esp 108aaa: ff 75 10 pushl 0x10(%ebp) 108aad: e8 86 83 00 00 call 110e38 108ab2: 89 45 c0 mov %eax,-0x40(%ebp) if ( !mount_h ) 108ab5: 83 c4 10 add $0x10,%esp 108ab8: 85 c0 test %eax,%eax 108aba: 0f 84 48 02 00 00 je 108d08 { 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; 108ac0: 8b 5d 0c mov 0xc(%ebp),%ebx 108ac3: 85 db test %ebx,%ebx const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108ac5: 0f 95 45 bf setne -0x41(%ebp) 108ac9: 0f 84 25 02 00 00 je 108cf4 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 108acf: 31 c0 xor %eax,%eax 108ad1: b9 ff ff ff ff mov $0xffffffff,%ecx 108ad6: 8b 7d 0c mov 0xc(%ebp),%edi 108ad9: f2 ae repnz scas %es:(%edi),%al 108adb: f7 d1 not %ecx 108add: 49 dec %ecx 108ade: 89 4d b8 mov %ecx,-0x48(%ebp) 108ae1: 8b 45 0c mov 0xc(%ebp),%eax 108ae4: 89 45 b4 mov %eax,-0x4c(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 108ae7: ba ff ff ff ff mov $0xffffffff,%edx 108aec: 31 c0 xor %eax,%eax 108aee: 89 d1 mov %edx,%ecx 108af0: 8b 7d 10 mov 0x10(%ebp),%edi 108af3: f2 ae repnz scas %es:(%edi),%al 108af5: f7 d1 not %ecx 108af7: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108afa: 8b 4d 08 mov 0x8(%ebp),%ecx 108afd: 85 c9 test %ecx,%ecx 108aff: 0f 84 e7 01 00 00 je 108cec 108b05: 89 d1 mov %edx,%ecx 108b07: 8b 7d 08 mov 0x8(%ebp),%edi 108b0a: f2 ae repnz scas %es:(%edi),%al 108b0c: 89 ce mov %ecx,%esi 108b0e: f7 d6 not %esi size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 108b10: 83 ec 08 sub $0x8,%esp 108b13: 8b 4d b8 mov -0x48(%ebp),%ecx 108b16: 8b 55 c4 mov -0x3c(%ebp),%edx 108b19: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 108b1d: 01 f0 add %esi,%eax 108b1f: 50 push %eax 108b20: 6a 01 push $0x1 108b22: e8 45 f8 ff ff call 10836c 108b27: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 108b29: 83 c4 10 add $0x10,%esp 108b2c: 85 c0 test %eax,%eax 108b2e: 0f 84 a0 01 00 00 je 108cd4 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 108b34: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 108b37: 83 ec 08 sub $0x8,%esp 108b3a: ff 75 10 pushl 0x10(%ebp) 108b3d: 57 push %edi 108b3e: e8 f9 bd 00 00 call 11493c mt_entry->type = str; 108b43: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 108b46: 03 7d c4 add -0x3c(%ebp),%edi if ( source_or_null != NULL ) { 108b49: 83 c4 10 add $0x10,%esp 108b4c: 8b 45 08 mov 0x8(%ebp),%eax 108b4f: 85 c0 test %eax,%eax 108b51: 74 14 je 108b67 strcpy( str, source_or_null ); 108b53: 83 ec 08 sub $0x8,%esp 108b56: ff 75 08 pushl 0x8(%ebp) 108b59: 57 push %edi 108b5a: e8 dd bd 00 00 call 11493c mt_entry->dev = str; 108b5f: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 108b62: 01 f7 add %esi,%edi 108b64: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 108b67: 83 ec 08 sub $0x8,%esp 108b6a: ff 75 b4 pushl -0x4c(%ebp) 108b6d: 57 push %edi 108b6e: e8 c9 bd 00 00 call 11493c mt_entry->target = str; 108b73: 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; 108b76: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108b79: 8b 45 14 mov 0x14(%ebp),%eax 108b7c: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 108b7f: 8d 7b 38 lea 0x38(%ebx),%edi 108b82: be 20 17 12 00 mov $0x121720,%esi 108b87: b9 0c 00 00 00 mov $0xc,%ecx 108b8c: 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 ) { 108b8e: 83 c4 10 add $0x10,%esp 108b91: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108b95: 75 7d jne 108c14 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108b97: 81 3d 04 50 12 00 08 cmpl $0x125008,0x125004 108b9e: 50 12 00 108ba1: 0f 85 a9 01 00 00 jne 108d50 <== NEVER TAKEN 108ba7: 31 f6 xor %esi,%esi * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 108ba9: 83 ec 08 sub $0x8,%esp 108bac: ff 75 18 pushl 0x18(%ebp) 108baf: 53 push %ebx 108bb0: ff 55 c0 call *-0x40(%ebp) 108bb3: 83 c4 10 add $0x10,%esp 108bb6: 85 c0 test %eax,%eax 108bb8: 0f 85 62 01 00 00 jne 108d20 <== NEVER TAKEN rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 108bbe: 56 push %esi 108bbf: 6a 00 push $0x0 108bc1: 6a 00 push $0x0 108bc3: ff 35 e8 71 12 00 pushl 0x1271e8 108bc9: e8 da 30 00 00 call 10bca8 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108bce: 5a pop %edx 108bcf: 59 pop %ecx 108bd0: 53 push %ebx 108bd1: 68 04 50 12 00 push $0x125004 108bd6: e8 99 39 00 00 call 10c574 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108bdb: 58 pop %eax 108bdc: ff 35 e8 71 12 00 pushl 0x1271e8 108be2: e8 bd 31 00 00 call 10bda4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108be7: 83 c4 10 add $0x10,%esp 108bea: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108bee: 74 0c je 108bfc rtems_filesystem_root = mt_entry->mt_fs_root; 108bf0: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108bf2: 8d 65 f4 lea -0xc(%ebp),%esp 108bf5: 5b pop %ebx 108bf6: 5e pop %esi 108bf7: 5f pop %edi 108bf8: c9 leave 108bf9: c3 ret 108bfa: 66 90 xchg %ax,%ax rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 108bfc: 8b 3d 24 50 12 00 mov 0x125024,%edi 108c02: 83 c7 18 add $0x18,%edi 108c05: 8d 73 1c lea 0x1c(%ebx),%esi 108c08: b9 05 00 00 00 mov $0x5,%ecx 108c0d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108c0f: eb df jmp 108bf0 108c11: 8d 76 00 lea 0x0(%esi),%esi * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 108c14: 83 ec 0c sub $0xc,%esp 108c17: 6a 01 push $0x1 108c19: 8d 75 d4 lea -0x2c(%ebp),%esi 108c1c: 56 push %esi 108c1d: 6a 07 push $0x7 108c1f: ff 75 b8 pushl -0x48(%ebp) 108c22: ff 75 0c pushl 0xc(%ebp) 108c25: e8 ea f8 ff ff call 108514 108c2a: 83 c4 20 add $0x20,%esp 108c2d: 40 inc %eax 108c2e: 0f 84 27 01 00 00 je 108d5b <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 108c34: 8b 45 e0 mov -0x20(%ebp),%eax 108c37: 8b 40 10 mov 0x10(%eax),%eax 108c3a: 85 c0 test %eax,%eax 108c3c: 0f 84 52 01 00 00 je 108d94 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 108c42: 83 ec 0c sub $0xc,%esp 108c45: 56 push %esi 108c46: ff d0 call *%eax 108c48: 83 c4 10 add $0x10,%esp 108c4b: 48 dec %eax 108c4c: 0f 85 22 01 00 00 jne 108d74 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 108c52: 83 ec 08 sub $0x8,%esp 108c55: ff 75 d4 pushl -0x2c(%ebp) 108c58: 68 10 8a 10 00 push $0x108a10 108c5d: e8 c2 fd ff ff call 108a24 108c62: 83 c4 10 add $0x10,%esp 108c65: 84 c0 test %al,%al 108c67: 0f 85 17 01 00 00 jne 108d84 * 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; 108c6d: 8b 45 d4 mov -0x2c(%ebp),%eax 108c70: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108c73: 8b 45 dc mov -0x24(%ebp),%eax 108c76: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 108c79: 8b 45 e0 mov -0x20(%ebp),%eax 108c7c: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108c7f: 8b 55 e4 mov -0x1c(%ebp),%edx 108c82: 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 ){ 108c85: 8b 40 20 mov 0x20(%eax),%eax 108c88: 85 c0 test %eax,%eax 108c8a: 0f 84 04 01 00 00 je 108d94 <== NEVER TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 108c90: 83 ec 0c sub $0xc,%esp 108c93: 53 push %ebx 108c94: ff d0 call *%eax 108c96: 83 c4 10 add $0x10,%esp 108c99: 85 c0 test %eax,%eax 108c9b: 0f 84 08 ff ff ff je 108ba9 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 108ca1: 83 ec 0c sub $0xc,%esp 108ca4: 53 push %ebx 108ca5: e8 da f8 ff ff call 108584 108caa: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108cad: 8b 46 0c mov 0xc(%esi),%eax 108cb0: 85 c0 test %eax,%eax 108cb2: 0f 84 8f 00 00 00 je 108d47 <== NEVER TAKEN 108cb8: 8b 40 1c mov 0x1c(%eax),%eax 108cbb: 85 c0 test %eax,%eax 108cbd: 0f 84 84 00 00 00 je 108d47 <== NEVER TAKEN 108cc3: 83 ec 0c sub $0xc,%esp 108cc6: 56 push %esi 108cc7: ff d0 call *%eax 108cc9: 83 c8 ff or $0xffffffff,%eax 108ccc: 83 c4 10 add $0x10,%esp 108ccf: e9 1e ff ff ff jmp 108bf2 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108cd4: e8 43 b1 00 00 call 113e1c <__errno> <== NOT EXECUTED 108cd9: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108cdf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108ce4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108ce7: 5b pop %ebx <== NOT EXECUTED 108ce8: 5e pop %esi <== NOT EXECUTED 108ce9: 5f pop %edi <== NOT EXECUTED 108cea: c9 leave <== NOT EXECUTED 108ceb: c3 ret <== NOT EXECUTED ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108cec: 31 f6 xor %esi,%esi 108cee: e9 1d fe ff ff jmp 108b10 108cf3: 90 nop const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108cf4: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp) 108cfb: c7 45 b4 c7 16 12 00 movl $0x1216c7,-0x4c(%ebp) 108d02: e9 e0 fd ff ff jmp 108ae7 108d07: 90 nop /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 108d08: e8 0f b1 00 00 call 113e1c <__errno> 108d0d: c7 00 16 00 00 00 movl $0x16,(%eax) 108d13: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d18: 8d 65 f4 lea -0xc(%ebp),%esp 108d1b: 5b pop %ebx 108d1c: 5e pop %esi 108d1d: 5f pop %edi 108d1e: c9 leave 108d1f: c3 ret if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 108d20: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108d23: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 108d26: 85 c0 test %eax,%eax <== NOT EXECUTED 108d28: 74 09 je 108d33 <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 108d2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d2d: 53 push %ebx <== NOT EXECUTED 108d2e: ff d0 call *%eax <== NOT EXECUTED 108d30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108d33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d36: 53 push %ebx <== NOT EXECUTED 108d37: e8 48 f8 ff ff call 108584 <== NOT EXECUTED if ( loc_to_free ) 108d3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d3f: 85 f6 test %esi,%esi <== NOT EXECUTED 108d41: 0f 85 66 ff ff ff jne 108cad <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 108d47: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108d4a: e9 a3 fe ff ff jmp 108bf2 <== NOT EXECUTED 108d4f: 90 nop <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 108d50: e8 c7 b0 00 00 call 113e1c <__errno> <== NOT EXECUTED 108d55: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108d5b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d5e: 53 push %ebx <== NOT EXECUTED 108d5f: e8 20 f8 ff ff call 108584 <== NOT EXECUTED 108d64: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108d69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d6c: e9 81 fe ff ff jmp 108bf2 <== NOT EXECUTED 108d71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108d74: e8 a3 b0 00 00 call 113e1c <__errno> 108d79: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 108d7f: e9 1d ff ff ff jmp 108ca1 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 108d84: e8 93 b0 00 00 call 113e1c <__errno> 108d89: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 108d8f: e9 0d ff ff ff jmp 108ca1 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 108d94: e8 83 b0 00 00 call 113e1c <__errno> <== NOT EXECUTED 108d99: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 108d9f: e9 fd fe ff ff jmp 108ca1 <== NOT EXECUTED =============================================================================== 00108e78 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108e78: 55 push %ebp 108e79: 89 e5 mov %esp,%ebp 108e7b: 57 push %edi 108e7c: 56 push %esi 108e7d: 53 push %ebx 108e7e: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 108e81: a1 e4 73 12 00 mov 0x1273e4,%eax 108e86: 85 c0 test %eax,%eax 108e88: 0f 84 52 02 00 00 je 1090e0 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 108e8e: 83 ec 0c sub $0xc,%esp 108e91: 68 24 04 00 00 push $0x424 108e96: e8 11 5e 00 00 call 10ecac <_Workspace_Allocate> 108e9b: 89 c2 mov %eax,%edx #endif if (ptr) { 108e9d: 83 c4 10 add $0x10,%esp 108ea0: 85 c0 test %eax,%eax 108ea2: 0f 84 2c 02 00 00 je 1090d4 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 108ea8: c7 00 00 00 00 00 movl $0x0,(%eax) 108eae: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 108eb4: 89 58 04 mov %ebx,0x4(%eax) 108eb7: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 108ebd: 89 42 08 mov %eax,0x8(%edx) 108ec0: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 108ec6: 89 42 0c mov %eax,0xc(%edx) 108ec9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 108ed0: 8d 72 14 lea 0x14(%edx),%esi 108ed3: 31 c0 xor %eax,%eax 108ed5: b9 19 00 00 00 mov $0x19,%ecx 108eda: 89 f7 mov %esi,%edi 108edc: f3 aa rep stos %al,%es:(%edi) 108ede: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 108ee5: c7 42 34 4a 14 12 00 movl $0x12144a,0x34(%edx) 108eec: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 108ef3: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 108efa: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 108f01: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 108f08: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 108f0f: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108f16: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 108f1d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108f24: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 108f2b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 108f32: c6 42 60 00 movb $0x0,0x60(%edx) 108f36: 8d 72 7c lea 0x7c(%edx),%esi 108f39: b1 24 mov $0x24,%cl 108f3b: 89 f7 mov %esi,%edi 108f3d: f3 aa rep stos %al,%es:(%edi) 108f3f: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108f46: 00 00 00 108f49: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 108f50: 00 00 00 108f53: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 108f5a: 00 00 00 108f5d: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108f64: 0e 33 108f66: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 108f6d: cd ab 108f6f: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108f76: 34 12 108f78: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 108f7f: 6d e6 108f81: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108f88: ec de 108f8a: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 108f91: 05 00 108f93: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 108f9a: 0b 00 108f9c: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 108fa3: 00 00 00 108fa6: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 108fad: 00 00 00 108fb0: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 108fb7: 00 00 00 108fba: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 108fc1: 00 00 00 108fc4: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 108fcb: 00 00 00 108fce: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 108fd5: 00 00 00 108fd8: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 108fdf: 00 00 00 108fe2: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 108fe9: 00 00 00 108fec: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 108ff3: 00 00 00 108ff6: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 108ffd: 00 00 00 109000: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 109007: 00 00 00 10900a: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 109011: 00 00 00 109014: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 10901b: 00 00 00 10901e: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 109025: 00 00 00 109028: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 10902f: 00 00 00 109032: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 109039: 00 00 00 10903c: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 109043: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 10904a: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 109051: 00 00 00 109054: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 10905b: 00 00 00 10905e: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 109065: 00 00 00 109068: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 10906f: 00 00 00 109072: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 109079: 00 00 00 10907c: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 109083: 00 00 00 109086: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 10908d: 00 00 00 109090: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 109097: 00 00 00 10909a: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 1090a1: 00 00 00 1090a4: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 1090ab: 00 00 00 1090ae: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 1090b5: 00 00 00 1090b8: 66 b9 38 01 mov $0x138,%cx 1090bc: 89 df mov %ebx,%edi 1090be: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 1090c0: 8b 45 0c mov 0xc(%ebp),%eax 1090c3: 89 90 ec 00 00 00 mov %edx,0xec(%eax) 1090c9: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 1090cb: 8d 65 f4 lea -0xc(%ebp),%esp 1090ce: 5b pop %ebx 1090cf: 5e pop %esi 1090d0: 5f pop %edi 1090d1: c9 leave 1090d2: c3 ret 1090d3: 90 nop * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 1090d4: 31 c0 xor %eax,%eax creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 1090d6: 8d 65 f4 lea -0xc(%ebp),%esp 1090d9: 5b pop %ebx 1090da: 5e pop %esi 1090db: 5f pop %edi 1090dc: c9 leave 1090dd: c3 ret 1090de: 66 90 xchg %ax,%ax { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 1090e0: a1 e0 23 12 00 mov 0x1223e0,%eax 1090e5: a3 e0 50 12 00 mov %eax,0x1250e0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 1090ea: c7 05 e4 73 12 00 e0 movl $0x1250e0,0x1273e4 1090f1: 50 12 00 1090f4: e9 95 fd ff ff jmp 108e8e =============================================================================== 00108dac : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108dac: 55 push %ebp 108dad: 89 e5 mov %esp,%ebp 108daf: 57 push %edi 108db0: 56 push %esi 108db1: 53 push %ebx 108db2: 83 ec 0c sub $0xc,%esp 108db5: 8b 7d 08 mov 0x8(%ebp),%edi 108db8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108dbb: 39 df cmp %ebx,%edi 108dbd: 74 55 je 108e14 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 108dbf: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108dc5: 85 f6 test %esi,%esi 108dc7: 74 21 je 108dea <== NEVER TAKEN 108dc9: 3b 35 e0 23 12 00 cmp 0x1223e0,%esi 108dcf: 74 19 je 108dea _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 108dd1: 83 ec 08 sub $0x8,%esp 108dd4: 68 1c 8e 10 00 push $0x108e1c 108dd9: 56 push %esi 108dda: e8 ed b7 00 00 call 1145cc <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108ddf: 89 34 24 mov %esi,(%esp) 108de2: e8 e1 5e 00 00 call 10ecc8 <_Workspace_Free> 108de7: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108dea: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 108df1: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108df4: 39 df cmp %ebx,%edi 108df6: 74 08 je 108e00 _REENT = 0; } } 108df8: 8d 65 f4 lea -0xc(%ebp),%esp 108dfb: 5b pop %ebx 108dfc: 5e pop %esi 108dfd: 5f pop %edi 108dfe: c9 leave 108dff: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108e00: c7 05 e0 50 12 00 00 movl $0x0,0x1250e0 108e07: 00 00 00 } } 108e0a: 8d 65 f4 lea -0xc(%ebp),%esp 108e0d: 5b pop %ebx 108e0e: 5e pop %esi 108e0f: 5f pop %edi 108e10: c9 leave 108e11: c3 ret 108e12: 66 90 xchg %ax,%ax /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108e14: 8b 35 e0 50 12 00 mov 0x1250e0,%esi 108e1a: eb a9 jmp 108dc5 =============================================================================== 00108e1c : */ int newlib_free_buffers( FILE *fp ) { 108e1c: 55 push %ebp 108e1d: 89 e5 mov %esp,%ebp 108e1f: 53 push %ebx 108e20: 83 ec 10 sub $0x10,%esp 108e23: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108e26: 53 push %ebx 108e27: e8 a8 b3 00 00 call 1141d4 108e2c: 83 c4 10 add $0x10,%esp 108e2f: 83 f8 02 cmp $0x2,%eax 108e32: 76 14 jbe 108e48 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108e34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e37: 53 push %ebx <== NOT EXECUTED 108e38: e8 2b b1 00 00 call 113f68 <== NOT EXECUTED 108e3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 108e40: 31 c0 xor %eax,%eax 108e42: 8b 5d fc mov -0x4(%ebp),%ebx 108e45: c9 leave 108e46: c3 ret 108e47: 90 nop { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108e48: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 108e4c: 79 f2 jns 108e40 <== ALWAYS TAKEN free( fp->_bf._base ); 108e4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e51: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108e54: e8 2b f7 ff ff call 108584 <== NOT EXECUTED fp->_flags &= ~__SMBF; 108e59: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 108e5f: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108e65: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 108e6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 108e6f: 31 c0 xor %eax,%eax <== NOT EXECUTED 108e71: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108e74: c9 leave <== NOT EXECUTED 108e75: c3 ret <== NOT EXECUTED =============================================================================== 00108780 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 108780: 55 push %ebp 108781: 89 e5 mov %esp,%ebp 108783: 53 push %ebx 108784: 83 ec 04 sub $0x4,%esp 108787: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 10878a: 80 3d 18 a1 12 00 00 cmpb $0x0,0x12a118 108791: 74 09 je 10879c NULL_major = major; } return RTEMS_SUCCESSFUL; } 108793: 31 c0 xor %eax,%eax 108795: 8b 5d fc mov -0x4(%ebp),%ebx 108798: c9 leave 108799: c3 ret 10879a: 66 90 xchg %ax,%ax ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 10879c: c6 05 18 a1 12 00 01 movb $0x1,0x12a118 status = rtems_io_register_name( 1087a3: 50 push %eax 1087a4: 6a 00 push $0x0 1087a6: 53 push %ebx 1087a7: 68 f3 2e 12 00 push $0x122ef3 1087ac: e8 3b 06 00 00 call 108dec "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1087b1: 83 c4 10 add $0x10,%esp 1087b4: 85 c0 test %eax,%eax 1087b6: 75 0d jne 1087c5 <== NEVER TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 1087b8: 89 1d a0 a4 12 00 mov %ebx,0x12a4a0 } return RTEMS_SUCCESSFUL; } 1087be: 31 c0 xor %eax,%eax 1087c0: 8b 5d fc mov -0x4(%ebp),%ebx 1087c3: c9 leave 1087c4: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1087c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087c8: 50 push %eax <== NOT EXECUTED 1087c9: e8 3a 49 00 00 call 10d108 <== NOT EXECUTED =============================================================================== 00108764 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 108764: 55 push %ebp 108765: 89 e5 mov %esp,%ebp 108767: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10876a: 85 c0 test %eax,%eax 10876c: 74 06 je 108774 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 10876e: 8b 50 10 mov 0x10(%eax),%edx 108771: 89 50 18 mov %edx,0x18(%eax) return NULL_SUCCESSFUL; } 108774: 31 c0 xor %eax,%eax 108776: c9 leave 108777: c3 ret =============================================================================== 0010915c : int open( const char *pathname, int flags, ... ) { 10915c: 55 push %ebp 10915d: 89 e5 mov %esp,%ebp 10915f: 57 push %edi 109160: 56 push %esi 109161: 53 push %ebx 109162: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 109165: 8b 45 0c mov 0xc(%ebp),%eax 109168: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 109169: 89 c6 mov %eax,%esi 10916b: 83 e6 01 and $0x1,%esi 10916e: f7 de neg %esi 109170: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 109173: a8 02 test $0x2,%al 109175: 74 03 je 10917a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 109177: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 10917a: 8b 45 10 mov 0x10(%ebp),%eax 10917d: 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(); 109180: e8 5b 7a 00 00 call 110be0 109185: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 109187: 85 c0 test %eax,%eax 109189: 0f 84 bd 00 00 00 je 10924c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 10918f: b9 ff ff ff ff mov $0xffffffff,%ecx 109194: 8b 7d 08 mov 0x8(%ebp),%edi 109197: 31 c0 xor %eax,%eax 109199: f2 ae repnz scas %es:(%edi),%al 10919b: f7 d1 not %ecx 10919d: 49 dec %ecx 10919e: 83 ec 0c sub $0xc,%esp 1091a1: 6a 01 push $0x1 1091a3: 8d 45 d4 lea -0x2c(%ebp),%eax 1091a6: 89 45 b4 mov %eax,-0x4c(%ebp) 1091a9: 50 push %eax 1091aa: 56 push %esi 1091ab: 51 push %ecx 1091ac: ff 75 08 pushl 0x8(%ebp) 1091af: e8 60 f3 ff ff call 108514 1091b4: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1091b6: 83 c4 20 add $0x20,%esp 1091b9: 83 f8 ff cmp $0xffffffff,%eax 1091bc: 0f 84 f2 00 00 00 je 1092b4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1091c2: 8b 45 0c mov 0xc(%ebp),%eax 1091c5: 25 00 0a 00 00 and $0xa00,%eax 1091ca: 3d 00 0a 00 00 cmp $0xa00,%eax 1091cf: 0f 84 8b 00 00 00 je 109260 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1091d5: 8b 45 dc mov -0x24(%ebp),%eax 1091d8: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 1091db: 8b 45 d4 mov -0x2c(%ebp),%eax 1091de: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 1091e1: 8b 73 14 mov 0x14(%ebx),%esi 1091e4: 83 ec 0c sub $0xc,%esp 1091e7: ff 75 0c pushl 0xc(%ebp) 1091ea: e8 7d 7a 00 00 call 110c6c 1091ef: 09 f0 or %esi,%eax 1091f1: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 1091f4: 8d 7b 18 lea 0x18(%ebx),%edi 1091f7: b9 05 00 00 00 mov $0x5,%ecx 1091fc: 8b 75 b4 mov -0x4c(%ebp),%esi 1091ff: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 109201: 8b 43 3c mov 0x3c(%ebx),%eax 109204: 83 c4 10 add $0x10,%esp 109207: 85 c0 test %eax,%eax 109209: 0f 84 99 00 00 00 je 1092a8 <== NEVER TAKEN 10920f: 8b 00 mov (%eax),%eax 109211: 85 c0 test %eax,%eax 109213: 0f 84 8f 00 00 00 je 1092a8 <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 109219: ff 75 c4 pushl -0x3c(%ebp) 10921c: ff 75 0c pushl 0xc(%ebp) 10921f: ff 75 08 pushl 0x8(%ebp) 109222: 53 push %ebx 109223: ff d0 call *%eax if ( rc ) { 109225: 83 c4 10 add $0x10,%esp 109228: 85 c0 test %eax,%eax 10922a: 75 6c jne 109298 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 10922c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 109233: 0f 85 93 00 00 00 jne 1092cc if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 109239: 89 d8 mov %ebx,%eax 10923b: 2b 05 e0 71 12 00 sub 0x1271e0,%eax 109241: c1 f8 06 sar $0x6,%eax } 109244: 8d 65 f4 lea -0xc(%ebp),%esp 109247: 5b pop %ebx 109248: 5e pop %esi 109249: 5f pop %edi 10924a: c9 leave 10924b: c3 ret * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 10924c: be 17 00 00 00 mov $0x17,%esi if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 109251: e8 c6 ab 00 00 call 113e1c <__errno> 109256: 89 30 mov %esi,(%eax) 109258: b8 ff ff ff ff mov $0xffffffff,%eax 10925d: eb e5 jmp 109244 10925f: 90 nop if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 109260: 8d 7d d4 lea -0x2c(%ebp),%edi 109263: be 11 00 00 00 mov $0x11,%esi done: va_end(ap); if ( rc ) { if ( iop ) 109268: 85 db test %ebx,%ebx 10926a: 74 0c je 109278 <== NEVER TAKEN rtems_libio_free( iop ); 10926c: 83 ec 0c sub $0xc,%esp 10926f: 53 push %ebx 109270: e8 13 79 00 00 call 110b88 109275: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 109278: 85 ff test %edi,%edi 10927a: 74 d5 je 109251 rtems_filesystem_freenode( loc_to_free ); 10927c: 8b 47 0c mov 0xc(%edi),%eax 10927f: 85 c0 test %eax,%eax 109281: 74 ce je 109251 <== NEVER TAKEN 109283: 8b 40 1c mov 0x1c(%eax),%eax 109286: 85 c0 test %eax,%eax 109288: 74 c7 je 109251 <== NEVER TAKEN 10928a: 83 ec 0c sub $0xc,%esp 10928d: 57 push %edi 10928e: ff d0 call *%eax 109290: 83 c4 10 add $0x10,%esp 109293: eb bc jmp 109251 109295: 8d 76 00 lea 0x0(%esi),%esi goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 109298: e8 7f ab 00 00 call 113e1c <__errno> 10929d: 8b 30 mov (%eax),%esi 10929f: 8d 7d d4 lea -0x2c(%ebp),%edi */ done: va_end(ap); if ( rc ) { 1092a2: 85 f6 test %esi,%esi 1092a4: 74 93 je 109239 <== NEVER TAKEN 1092a6: eb c0 jmp 109268 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1092a8: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 1092ab: be 86 00 00 00 mov $0x86,%esi <== NOT EXECUTED 1092b0: eb b6 jmp 109268 <== NOT EXECUTED 1092b2: 66 90 xchg %ax,%ax <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1092b4: e8 63 ab 00 00 call 113e1c <__errno> 1092b9: 83 38 02 cmpl $0x2,(%eax) 1092bc: 74 5e je 10931c } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 1092be: e8 59 ab 00 00 call 113e1c <__errno> 1092c3: 8b 30 mov (%eax),%esi 1092c5: 31 ff xor %edi,%edi goto done; 1092c7: eb d9 jmp 1092a2 1092c9: 8d 76 00 lea 0x0(%esi),%esi /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 1092cc: 52 push %edx 1092cd: 6a 00 push $0x0 1092cf: 6a 00 push $0x0 1092d1: 89 d8 mov %ebx,%eax 1092d3: 2b 05 e0 71 12 00 sub 0x1271e0,%eax 1092d9: c1 f8 06 sar $0x6,%eax 1092dc: 50 push %eax 1092dd: e8 d6 76 00 00 call 1109b8 1092e2: 89 c6 mov %eax,%esi if ( rc ) { 1092e4: 83 c4 10 add $0x10,%esp 1092e7: 85 c0 test %eax,%eax 1092e9: 0f 84 4a ff ff ff je 109239 <== ALWAYS TAKEN if(errno) rc = errno; 1092ef: e8 28 ab 00 00 call 113e1c <__errno> <== NOT EXECUTED 1092f4: 8b 00 mov (%eax),%eax <== NOT EXECUTED 1092f6: 85 c0 test %eax,%eax <== NOT EXECUTED 1092f8: 0f 85 8b 00 00 00 jne 109389 <== NOT EXECUTED close( iop - rtems_libio_iops ); 1092fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109301: 2b 1d e0 71 12 00 sub 0x1271e0,%ebx <== NOT EXECUTED 109307: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 10930a: 53 push %ebx <== NOT EXECUTED 10930b: e8 18 76 00 00 call 110928 <== NOT EXECUTED 109310: 31 ff xor %edi,%edi <== NOT EXECUTED 109312: 31 db xor %ebx,%ebx <== NOT EXECUTED 109314: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109317: eb 89 jmp 1092a2 <== NOT EXECUTED 109319: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 10931c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 109323: 75 0f jne 109334 109325: 31 ff xor %edi,%edi 109327: be 02 00 00 00 mov $0x2,%esi 10932c: e9 37 ff ff ff jmp 109268 109331: 8d 76 00 lea 0x0(%esi),%esi rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 109334: 6a 00 push $0x0 109336: 6a 00 push $0x0 109338: 8b 45 c4 mov -0x3c(%ebp),%eax 10933b: 80 cc 80 or $0x80,%ah 10933e: 50 push %eax 10933f: ff 75 08 pushl 0x8(%ebp) 109342: e8 f1 f5 ff ff call 108938 if ( rc ) { 109347: 83 c4 10 add $0x10,%esp 10934a: 85 c0 test %eax,%eax 10934c: 0f 85 6c ff ff ff jne 1092be <== NEVER TAKEN rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 109352: 89 f1 mov %esi,%ecx 109354: 8b 7d 08 mov 0x8(%ebp),%edi 109357: 31 c0 xor %eax,%eax 109359: f2 ae repnz scas %es:(%edi),%al 10935b: f7 d1 not %ecx 10935d: 49 dec %ecx 10935e: 83 ec 0c sub $0xc,%esp 109361: 6a 01 push $0x1 109363: 8d 45 d4 lea -0x2c(%ebp),%eax 109366: 50 push %eax 109367: 6a 00 push $0x0 109369: 51 push %ecx 10936a: ff 75 08 pushl 0x8(%ebp) 10936d: e8 a2 f1 ff ff call 108514 if ( status != 0 ) { /* The file did not exist */ 109372: 83 c4 20 add $0x20,%esp 109375: 85 c0 test %eax,%eax 109377: 0f 84 58 fe ff ff je 1091d5 <== ALWAYS TAKEN 10937d: 31 ff xor %edi,%edi <== NOT EXECUTED 10937f: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED 109384: e9 df fe ff ff jmp 109268 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 109389: e8 8e aa 00 00 call 113e1c <__errno> <== NOT EXECUTED 10938e: 8b 30 mov (%eax),%esi <== NOT EXECUTED 109390: e9 69 ff ff ff jmp 1092fe <== NOT EXECUTED =============================================================================== 001090fc : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1090fc: 55 push %ebp 1090fd: 89 e5 mov %esp,%ebp 1090ff: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 109102: 6a 00 push $0x0 109104: 6a 00 push $0x0 109106: 68 64 fe 11 00 push $0x11fe64 10910b: e8 4c 00 00 00 call 10915c 109110: 83 c4 10 add $0x10,%esp 109113: 40 inc %eax 109114: 74 2a je 109140 /* * 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) 109116: 52 push %edx 109117: 6a 00 push $0x0 109119: 6a 01 push $0x1 10911b: 68 64 fe 11 00 push $0x11fe64 109120: e8 37 00 00 00 call 10915c 109125: 83 c4 10 add $0x10,%esp 109128: 40 inc %eax 109129: 74 24 je 10914f <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 10912b: 50 push %eax 10912c: 6a 00 push $0x0 10912e: 6a 01 push $0x1 109130: 68 64 fe 11 00 push $0x11fe64 109135: e8 22 00 00 00 call 10915c 10913a: 83 c4 10 add $0x10,%esp 10913d: 40 inc %eax 10913e: 74 02 je 109142 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 109140: c9 leave 109141: c3 ret */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 109142: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109145: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 10914a: e8 91 31 00 00 call 10c2e0 <== NOT EXECUTED /* * 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) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 10914f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109152: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 109157: e8 84 31 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 00109cfc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109cfc: 55 push %ebp 109cfd: 89 e5 mov %esp,%ebp 109cff: 56 push %esi 109d00: 53 push %ebx 109d01: 83 ec 10 sub $0x10,%esp 109d04: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 109d07: 8b 4a 34 mov 0x34(%edx),%ecx 109d0a: f6 c1 01 test $0x1,%cl 109d0d: 74 31 je 109d40 <== NEVER TAKEN switch (c) { 109d0f: 3c 09 cmp $0x9,%al 109d11: 0f 84 b1 00 00 00 je 109dc8 109d17: 76 3f jbe 109d58 <== NEVER TAKEN 109d19: 3c 0a cmp $0xa,%al 109d1b: 74 4f je 109d6c 109d1d: 3c 0d cmp $0xd,%al 109d1f: 74 7f je 109da0 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109d21: 83 e1 02 and $0x2,%ecx 109d24: 0f 85 c6 00 00 00 jne 109df0 <== NEVER TAKEN 109d2a: 8b 0d c4 50 12 00 mov 0x1250c4,%ecx c = toupper(c); if (!iscntrl(c)) 109d30: 0f b6 c0 movzbl %al,%eax 109d33: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109d38: 75 06 jne 109d40 <== NEVER TAKEN tty->column++; 109d3a: ff 42 28 incl 0x28(%edx) 109d3d: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109d40: 50 push %eax 109d41: 52 push %edx 109d42: 6a 01 push $0x1 109d44: 8d 45 f4 lea -0xc(%ebp),%eax 109d47: 50 push %eax 109d48: e8 7b fe ff ff call 109bc8 109d4d: 83 c4 10 add $0x10,%esp } 109d50: 8d 65 f8 lea -0x8(%ebp),%esp 109d53: 5b pop %ebx 109d54: 5e pop %esi 109d55: c9 leave 109d56: c3 ret 109d57: 90 nop oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109d58: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109d5a: 75 c5 jne 109d21 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109d5c: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109d5f: 85 c0 test %eax,%eax <== NOT EXECUTED 109d61: 7e dd jle 109d40 <== NOT EXECUTED tty->column--; 109d63: 48 dec %eax <== NOT EXECUTED 109d64: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109d67: eb d7 jmp 109d40 <== NOT EXECUTED 109d69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 109d6c: f6 c1 20 test $0x20,%cl 109d6f: 74 07 je 109d78 <== ALWAYS TAKEN tty->column = 0; 109d71: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109d78: 83 e1 04 and $0x4,%ecx 109d7b: 74 c3 je 109d40 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109d7d: 56 push %esi 109d7e: 52 push %edx 109d7f: 6a 01 push $0x1 109d81: 68 50 17 12 00 push $0x121750 109d86: 89 55 f0 mov %edx,-0x10(%ebp) 109d89: e8 3a fe ff ff call 109bc8 tty->column = 0; 109d8e: 8b 55 f0 mov -0x10(%ebp),%edx 109d91: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109d98: 83 c4 10 add $0x10,%esp 109d9b: eb a3 jmp 109d40 109d9d: 8d 76 00 lea 0x0(%esi),%esi } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109da0: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 109da3: 74 07 je 109dac <== NOT EXECUTED 109da5: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED 109da8: 85 db test %ebx,%ebx <== NOT EXECUTED 109daa: 74 a4 je 109d50 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109dac: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109daf: 74 09 je 109dba <== NOT EXECUTED c = '\n'; 109db1: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109db5: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109db8: 74 86 je 109d40 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109dba: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109dc1: e9 7a ff ff ff jmp 109d40 <== NOT EXECUTED 109dc6: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109dc8: 8b 5a 28 mov 0x28(%edx),%ebx 109dcb: 89 de mov %ebx,%esi 109dcd: 83 e6 07 and $0x7,%esi 109dd0: b8 08 00 00 00 mov $0x8,%eax 109dd5: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109dd7: 81 e1 00 18 00 00 and $0x1800,%ecx 109ddd: 81 f9 00 18 00 00 cmp $0x1800,%ecx 109de3: 74 37 je 109e1c <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109de5: 01 d8 add %ebx,%eax <== NOT EXECUTED 109de7: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109dea: e9 51 ff ff ff jmp 109d40 <== NOT EXECUTED 109def: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109df0: 8b 0d c4 50 12 00 mov 0x1250c4,%ecx <== NOT EXECUTED 109df6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109df9: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109dfe: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109e01: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 109e04: 74 0e je 109e14 <== NOT EXECUTED 109e06: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109e08: 88 d8 mov %bl,%al <== NOT EXECUTED 109e0a: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109e0d: e9 1e ff ff ff jmp 109d30 <== NOT EXECUTED 109e12: 66 90 xchg %ax,%ax <== NOT EXECUTED 109e14: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 109e17: eb ef jmp 109e08 <== NOT EXECUTED 109e19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 109e1c: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109e1f: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 109e22: 51 push %ecx 109e23: 52 push %edx 109e24: 50 push %eax 109e25: 68 5c 13 12 00 push $0x12135c 109e2a: e8 99 fd ff ff call 109bc8 return; 109e2f: 83 c4 10 add $0x10,%esp 109e32: e9 19 ff ff ff jmp 109d50 =============================================================================== 0010a510 : long pathconf( const char *path, int name ) { 10a510: 55 push %ebp 10a511: 89 e5 mov %esp,%ebp 10a513: 56 push %esi 10a514: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a515: 83 ec 08 sub $0x8,%esp 10a518: 6a 00 push $0x0 10a51a: ff 75 08 pushl 0x8(%ebp) 10a51d: e8 92 fd ff ff call 10a2b4 10a522: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a524: 83 c4 10 add $0x10,%esp 10a527: 83 f8 ff cmp $0xffffffff,%eax 10a52a: 74 24 je 10a550 return -1; status = fpathconf( fd, name ); 10a52c: 83 ec 08 sub $0x8,%esp 10a52f: ff 75 0c pushl 0xc(%ebp) 10a532: 50 push %eax 10a533: e8 7c ec ff ff call 1091b4 10a538: 89 c6 mov %eax,%esi (void) close( fd ); 10a53a: 89 1c 24 mov %ebx,(%esp) 10a53d: e8 86 e7 ff ff call 108cc8 return status; 10a542: 83 c4 10 add $0x10,%esp } 10a545: 89 f0 mov %esi,%eax 10a547: 8d 65 f8 lea -0x8(%ebp),%esp 10a54a: 5b pop %ebx 10a54b: 5e pop %esi 10a54c: c9 leave 10a54d: c3 ret 10a54e: 66 90 xchg %ax,%ax { int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) 10a550: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a555: 89 f0 mov %esi,%eax 10a557: 8d 65 f8 lea -0x8(%ebp),%esp 10a55a: 5b pop %ebx 10a55b: 5e pop %esi 10a55c: c9 leave 10a55d: c3 ret =============================================================================== 00112f38 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 112f38: 55 push %ebp 112f39: 89 e5 mov %esp,%ebp 112f3b: 57 push %edi 112f3c: 56 push %esi 112f3d: 53 push %ebx 112f3e: 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) 112f41: 6a 01 push $0x1 112f43: 8d 5d c4 lea -0x3c(%ebp),%ebx 112f46: 53 push %ebx 112f47: 6a 07 push $0x7 112f49: 6a 03 push $0x3 112f4b: 68 01 20 12 00 push $0x122001 112f50: e8 bf 55 ff ff call 108514 112f55: 83 c4 20 add $0x20,%esp 112f58: 85 c0 test %eax,%eax 112f5a: 0f 85 e0 00 00 00 jne 113040 <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 112f60: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 112f63: 85 c0 test %eax,%eax <== NOT EXECUTED 112f65: 74 10 je 112f77 <== NOT EXECUTED 112f67: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 112f6a: 85 c0 test %eax,%eax <== NOT EXECUTED 112f6c: 74 09 je 112f77 <== NOT EXECUTED 112f6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112f71: 53 push %ebx <== NOT EXECUTED 112f72: ff d0 call *%eax <== NOT EXECUTED 112f74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 112f77: 8d 5d d9 lea -0x27(%ebp),%ebx 112f7a: be 06 20 12 00 mov $0x122006,%esi 112f7f: b9 0a 00 00 00 mov $0xa,%ecx 112f84: 89 df mov %ebx,%edi 112f86: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 112f88: 0f b7 05 b0 6f 12 00 movzwl 0x126fb0,%eax 112f8f: 8d 50 01 lea 0x1(%eax),%edx 112f92: 66 89 15 b0 6f 12 00 mov %dx,0x126fb0 112f99: 51 push %ecx 112f9a: 50 push %eax 112f9b: 68 11 20 12 00 push $0x122011 112fa0: 8d 45 e3 lea -0x1d(%ebp),%eax 112fa3: 50 push %eax 112fa4: e8 b3 17 00 00 call 11475c /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 112fa9: 58 pop %eax 112faa: 5a pop %edx 112fab: 68 80 01 00 00 push $0x180 112fb0: 53 push %ebx 112fb1: e8 66 07 00 00 call 11371c 112fb6: 83 c4 10 add $0x10,%esp 112fb9: 85 c0 test %eax,%eax 112fbb: 75 6f jne 11302c <== NEVER TAKEN 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); 112fbd: 83 ec 08 sub $0x8,%esp 112fc0: 68 00 40 00 00 push $0x4000 112fc5: 53 push %ebx 112fc6: e8 91 61 ff ff call 10915c 112fcb: 8b 55 08 mov 0x8(%ebp),%edx 112fce: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 112fd0: 83 c4 10 add $0x10,%esp 112fd3: 85 c0 test %eax,%eax 112fd5: 0f 88 a1 00 00 00 js 11307c <== ALWAYS TAKEN the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 112fdb: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 112fe1: 0f 82 85 00 00 00 jb 11306c 112fe7: 31 c0 xor %eax,%eax iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 112fe9: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 112fed: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112ff0: 6a 01 push $0x1 <== NOT EXECUTED 112ff2: 53 push %ebx <== NOT EXECUTED 112ff3: e8 64 61 ff ff call 10915c <== NOT EXECUTED 112ff8: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 112ffb: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 112ffe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113001: 85 c0 test %eax,%eax <== NOT EXECUTED 113003: 0f 88 8b 00 00 00 js 113094 <== NOT EXECUTED 113009: 31 f6 xor %esi,%esi <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 11300b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11300e: 53 push %ebx <== NOT EXECUTED 11300f: e8 24 07 00 00 call 113738 <== NOT EXECUTED 113014: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 113017: e8 00 0e 00 00 call 113e1c <__errno> 11301c: 89 30 mov %esi,(%eax) } 11301e: b8 ff ff ff ff mov $0xffffffff,%eax 113023: 8d 65 f4 lea -0xc(%ebp),%esp 113026: 5b pop %ebx 113027: 5e pop %esi 113028: 5f pop %edi 113029: c9 leave 11302a: c3 ret 11302b: 90 nop memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 11302c: e8 eb 0d 00 00 call 113e1c <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 113031: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113036: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113039: 5b pop %ebx <== NOT EXECUTED 11303a: 5e pop %esi <== NOT EXECUTED 11303b: 5f pop %edi <== NOT EXECUTED 11303c: c9 leave <== NOT EXECUTED 11303d: c3 ret <== NOT EXECUTED 11303e: 66 90 xchg %ax,%ax <== NOT EXECUTED 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) != 0) { if (errno != ENOENT) 113040: e8 d7 0d 00 00 call 113e1c <__errno> 113045: 83 38 02 cmpl $0x2,(%eax) 113048: 75 e7 jne 113031 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 11304a: 83 ec 08 sub $0x8,%esp 11304d: 68 ff 03 00 00 push $0x3ff 113052: 68 01 20 12 00 push $0x122001 113057: e8 c0 58 ff ff call 10891c 11305c: 83 c4 10 add $0x10,%esp 11305f: 85 c0 test %eax,%eax 113061: 0f 84 10 ff ff ff je 112f77 <== ALWAYS TAKEN 113067: eb c8 jmp 113031 113069: 8d 76 00 lea 0x0(%esi),%esi the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 11306c: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 11306f: 03 05 e0 71 12 00 add 0x1271e0,%eax <== NOT EXECUTED 113075: e9 6f ff ff ff jmp 112fe9 <== NOT EXECUTED 11307a: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 11307c: e8 9b 0d 00 00 call 113e1c <__errno> 113081: 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); 113083: 83 ec 0c sub $0xc,%esp 113086: 53 push %ebx 113087: e8 ac 06 00 00 call 113738 11308c: 83 c4 10 add $0x10,%esp 11308f: eb 86 jmp 113017 113091: 8d 76 00 lea 0x0(%esi),%esi iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 113094: e8 83 0d 00 00 call 113e1c <__errno> <== NOT EXECUTED 113099: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 11309b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11309e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1130a1: ff 30 pushl (%eax) <== NOT EXECUTED 1130a3: e8 80 d8 ff ff call 110928 <== NOT EXECUTED 1130a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1130ab: e9 5b ff ff ff jmp 11300b <== NOT EXECUTED =============================================================================== 0010f190 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10f190: 55 push %ebp <== NOT EXECUTED 10f191: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f193: 56 push %esi <== NOT EXECUTED 10f194: 53 push %ebx <== NOT EXECUTED 10f195: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 10f198: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED if (cmd == FIONREAD) { 10f19b: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10f1a2: 74 0c je 10f1b0 <== NOT EXECUTED 10f1a4: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 10f1a9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f1ac: 5b pop %ebx <== NOT EXECUTED 10f1ad: 5e pop %esi <== NOT EXECUTED 10f1ae: c9 leave <== NOT EXECUTED 10f1af: c3 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 10f1b0: 85 db test %ebx,%ebx <== NOT EXECUTED 10f1b2: 75 07 jne 10f1bb <== NOT EXECUTED 10f1b4: b8 f2 ff ff ff mov $0xfffffff2,%eax <== NOT EXECUTED 10f1b9: eb ee jmp 10f1a9 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10f1bb: 52 push %edx <== NOT EXECUTED 10f1bc: 6a 00 push $0x0 <== NOT EXECUTED 10f1be: 6a 00 push $0x0 <== NOT EXECUTED 10f1c0: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f1c3: e8 e0 ca ff ff call 10bca8 <== NOT EXECUTED 10f1c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f1cb: 85 c0 test %eax,%eax <== NOT EXECUTED 10f1cd: 74 07 je 10f1d6 <== NOT EXECUTED 10f1cf: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10f1d4: eb d3 jmp 10f1a9 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 10f1d6: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 10f1d9: 89 03 mov %eax,(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f1db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f1de: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f1e1: e8 be cb ff ff call 10bda4 <== NOT EXECUTED 10f1e6: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10f1e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f1eb: eb bc jmp 10f1a9 <== NOT EXECUTED =============================================================================== 0010f130 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10f130: 55 push %ebp <== NOT EXECUTED 10f131: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10f133: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10f138: c9 leave <== NOT EXECUTED 10f139: c3 ret <== NOT EXECUTED =============================================================================== 0010f3d4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f3d4: 55 push %ebp <== NOT EXECUTED 10f3d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f3d7: 57 push %edi <== NOT EXECUTED 10f3d8: 56 push %esi <== NOT EXECUTED 10f3d9: 53 push %ebx <== NOT EXECUTED 10f3da: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10f3dd: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f3e0: 6a 00 push $0x0 <== NOT EXECUTED 10f3e2: 6a 00 push $0x0 <== NOT EXECUTED 10f3e4: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f3e7: e8 bc c8 ff ff call 10bca8 <== NOT EXECUTED 10f3ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3ef: 85 c0 test %eax,%eax <== NOT EXECUTED 10f3f1: 0f 85 b1 00 00 00 jne 10f4a8 <== NOT EXECUTED return -EINTR; while (read < count) { 10f3f7: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f3fa: 85 ff test %edi,%edi <== NOT EXECUTED 10f3fc: 0f 84 82 01 00 00 je 10f584 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 10f402: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 10f409: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f410: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10f413: 85 d2 test %edx,%edx <== NOT EXECUTED 10f415: 0f 85 a1 00 00 00 jne 10f4bc <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 10f41b: 8b 73 14 mov 0x14(%ebx),%esi <== NOT EXECUTED 10f41e: 85 f6 test %esi,%esi <== NOT EXECUTED 10f420: 0f 84 06 01 00 00 je 10f52c <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10f426: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f429: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f42d: 0f 85 01 01 00 00 jne 10f534 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f433: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f436: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f439: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f43c: e8 63 c9 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f441: 5a pop %edx <== NOT EXECUTED 10f442: 59 pop %ecx <== NOT EXECUTED 10f443: 6a 00 push $0x0 <== NOT EXECUTED 10f445: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f448: e8 1f 1d 00 00 call 11116c <== NOT EXECUTED 10f44d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f450: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f453: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f455: f7 d6 not %esi <== NOT EXECUTED 10f457: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f45a: 6a 00 push $0x0 <== NOT EXECUTED 10f45c: 6a 00 push $0x0 <== NOT EXECUTED 10f45e: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f461: e8 42 c8 ff ff call 10bca8 <== NOT EXECUTED 10f466: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f469: 85 c0 test %eax,%eax <== NOT EXECUTED 10f46b: 0f 85 cf 00 00 00 jne 10f540 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f471: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10f474: 85 f6 test %esi,%esi <== NOT EXECUTED 10f476: 74 98 je 10f410 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f478: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f47b: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f47e: e8 21 c9 ff ff call 10bda4 <== NOT EXECUTED 10f483: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10f486: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 10f489: 85 ff test %edi,%edi <== NOT EXECUTED 10f48b: 7e 0b jle 10f498 <== NOT EXECUTED return read; return ret; } 10f48d: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f490: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f493: 5b pop %ebx <== NOT EXECUTED 10f494: 5e pop %esi <== NOT EXECUTED 10f495: 5f pop %edi <== NOT EXECUTED 10f496: c9 leave <== NOT EXECUTED 10f497: c3 ret <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 10f498: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10f49b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f49e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f4a1: 5b pop %ebx <== NOT EXECUTED 10f4a2: 5e pop %esi <== NOT EXECUTED 10f4a3: 5f pop %edi <== NOT EXECUTED 10f4a4: c9 leave <== NOT EXECUTED 10f4a5: c3 ret <== NOT EXECUTED 10f4a6: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f4a8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 10f4af: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f4b2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f4b5: 5b pop %ebx <== NOT EXECUTED 10f4b6: 5e pop %esi <== NOT EXECUTED 10f4b7: 5f pop %edi <== NOT EXECUTED 10f4b8: c9 leave <== NOT EXECUTED 10f4b9: c3 ret <== NOT EXECUTED 10f4ba: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f4bc: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f4bf: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10f4c2: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 10f4c5: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10f4c7: 76 03 jbe 10f4cc <== NOT EXECUTED 10f4c9: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10f4cc: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10f4cf: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10f4d2: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f4d4: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 10f4d7: 7f 71 jg 10f54a <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f4d9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f4dc: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 10f4df: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f4e1: 89 c7 mov %eax,%edi <== NOT EXECUTED 10f4e3: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f4e6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10f4e8: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f4eb: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10f4ee: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f4f0: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10f4f3: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10f4f6: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f4f9: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 10f4fc: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f4ff: 85 c0 test %eax,%eax <== NOT EXECUTED 10f501: 75 07 jne 10f50a <== NOT EXECUTED pipe->Start = 0; 10f503: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10f50a: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 10f50d: 85 c0 test %eax,%eax <== NOT EXECUTED 10f50f: 75 5f jne 10f570 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 10f511: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f514: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f517: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f51a: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10f51d: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f520: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10f523: 0f 82 e7 fe ff ff jb 10f410 <== NOT EXECUTED 10f529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f52c: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f52e: e9 45 ff ff ff jmp 10f478 <== NOT EXECUTED 10f533: 90 nop <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 10f534: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f539: e9 3a ff ff ff jmp 10f478 <== NOT EXECUTED 10f53e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f540: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f545: e9 3c ff ff ff jmp 10f486 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10f54a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f54d: 03 55 d0 add -0x30(%ebp),%edx <== NOT EXECUTED 10f550: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f552: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f554: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f556: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f558: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 10f55b: 01 c2 add %eax,%edx <== NOT EXECUTED 10f55d: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10f560: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f563: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f565: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10f567: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f569: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 10f56b: e9 78 ff ff ff jmp 10f4e8 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 10f570: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f573: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f576: 50 push %eax <== NOT EXECUTED 10f577: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f57a: e8 89 1b 00 00 call 111108 <== NOT EXECUTED 10f57f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f582: eb 8d jmp 10f511 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f584: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f58b: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f58d: e9 e6 fe ff ff jmp 10f478 <== NOT EXECUTED =============================================================================== 0010f594 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f594: 55 push %ebp <== NOT EXECUTED 10f595: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f597: 57 push %edi <== NOT EXECUTED 10f598: 56 push %esi <== NOT EXECUTED 10f599: 53 push %ebx <== NOT EXECUTED 10f59a: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10f59d: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10f5a0: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10f5a2: 6a 00 push $0x0 <== NOT EXECUTED 10f5a4: 6a 00 push $0x0 <== NOT EXECUTED 10f5a6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f5a9: e8 fa c6 ff ff call 10bca8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10f5ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5b1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5b3: 0f 85 e3 00 00 00 jne 10f69c <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10f5b9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f5bc: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10f5bf: 89 c6 mov %eax,%esi <== NOT EXECUTED 10f5c1: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10f5c4: a8 02 test $0x2,%al <== NOT EXECUTED 10f5c6: 74 03 je 10f5cb <== NOT EXECUTED pipe->Readers --; 10f5c8: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10f5cb: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10f5d1: 75 69 jne 10f63c <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10f5d3: 51 push %ecx <== NOT EXECUTED 10f5d4: 6a 00 push $0x0 <== NOT EXECUTED 10f5d6: 6a 00 push $0x0 <== NOT EXECUTED 10f5d8: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f5de: e8 c5 c6 ff ff call 10bca8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10f5e3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5e6: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5e8: 0f 85 ae 00 00 00 jne 10f69c <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 10f5ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f5f1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f5f4: e8 ab c7 ff ff call 10bda4 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10f5f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5fc: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED 10f5ff: 85 d2 test %edx,%edx <== NOT EXECUTED 10f601: 74 41 je 10f644 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10f603: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f606: 85 c0 test %eax,%eax <== NOT EXECUTED 10f608: 75 17 jne 10f621 <== NOT EXECUTED 10f60a: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10f60d: 74 12 je 10f621 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f60f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f612: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f615: 50 push %eax <== NOT EXECUTED 10f616: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f619: e8 ea 1a 00 00 call 111108 <== NOT EXECUTED 10f61e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10f621: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f624: ff 35 a8 6f 12 00 pushl 0x126fa8 <== NOT EXECUTED 10f62a: e8 75 c7 ff ff call 10bda4 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10f62f: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f631: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f634: 5b pop %ebx <== NOT EXECUTED 10f635: 5e pop %esi <== NOT EXECUTED 10f636: 5f pop %edi <== NOT EXECUTED 10f637: c9 leave <== NOT EXECUTED 10f638: c3 ret <== NOT EXECUTED 10f639: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 10f63c: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED 10f63f: eb 92 jmp 10f5d3 <== NOT EXECUTED 10f641: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 10f644: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f647: 85 c0 test %eax,%eax <== NOT EXECUTED 10f649: 74 19 je 10f664 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f64b: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10f64e: 74 d1 je 10f621 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10f650: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f653: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f656: 50 push %eax <== NOT EXECUTED 10f657: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f65a: e8 a9 1a 00 00 call 111108 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f65f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f662: eb bd jmp 10f621 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10f664: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f667: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f66a: e8 09 1a 00 00 call 111078 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f66f: 5e pop %esi <== NOT EXECUTED 10f670: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f673: e8 00 1a 00 00 call 111078 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f678: 59 pop %ecx <== NOT EXECUTED 10f679: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f67c: e8 83 c5 ff ff call 10bc04 <== NOT EXECUTED free(pipe->Buffer); 10f681: 5a pop %edx <== NOT EXECUTED 10f682: ff 33 pushl (%ebx) <== NOT EXECUTED 10f684: e8 fb 8e ff ff call 108584 <== NOT EXECUTED free(pipe); 10f689: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f68c: e8 f3 8e ff ff call 108584 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 10f691: 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) { 10f697: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f69a: eb 85 jmp 10f621 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 10f69c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f69f: 50 push %eax <== NOT EXECUTED 10f6a0: e8 3b cc ff ff call 10c2e0 <== NOT EXECUTED =============================================================================== 0010f1f0 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10f1f0: 55 push %ebp <== NOT EXECUTED 10f1f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f1f3: 57 push %edi <== NOT EXECUTED 10f1f4: 56 push %esi <== NOT EXECUTED 10f1f5: 53 push %ebx <== NOT EXECUTED 10f1f6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10f1f9: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 10f1fc: 85 f6 test %esi,%esi <== NOT EXECUTED 10f1fe: 75 0c jne 10f20c <== NOT EXECUTED 10f200: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 10f202: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f204: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f207: 5b pop %ebx <== NOT EXECUTED 10f208: 5e pop %esi <== NOT EXECUTED 10f209: 5f pop %edi <== NOT EXECUTED 10f20a: c9 leave <== NOT EXECUTED 10f20b: c3 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 10f20c: 53 push %ebx <== NOT EXECUTED 10f20d: 6a 00 push $0x0 <== NOT EXECUTED 10f20f: 6a 00 push $0x0 <== NOT EXECUTED 10f211: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f214: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 10f217: e8 8c ca ff ff call 10bca8 <== NOT EXECUTED 10f21c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f21f: 85 c0 test %eax,%eax <== NOT EXECUTED 10f221: 0f 85 1d 01 00 00 jne 10f344 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10f227: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f22a: 8b 48 10 mov 0x10(%eax),%ecx <== NOT EXECUTED 10f22d: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10f22f: 0f 84 4b 01 00 00 je 10f380 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10f235: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED 10f238: 39 4d 10 cmp %ecx,0x10(%ebp) <== NOT EXECUTED 10f23b: 0f 87 35 01 00 00 ja 10f376 <== NOT EXECUTED 10f241: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f244: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 10f24b: 31 db xor %ebx,%ebx <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 10f24d: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED 10f250: 8b 5d 08 mov 0x8(%ebp),%ebx <== 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) { 10f253: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f256: 89 ca mov %ecx,%edx <== NOT EXECUTED 10f258: 29 c2 sub %eax,%edx <== NOT EXECUTED 10f25a: 39 fa cmp %edi,%edx <== NOT EXECUTED 10f25c: 73 6f jae 10f2cd <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 10f25e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f261: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f265: 0f 85 28 01 00 00 jne 10f393 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10f26b: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f26e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f271: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f274: e8 2b cb ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f279: 58 pop %eax <== NOT EXECUTED 10f27a: 5a pop %edx <== NOT EXECUTED 10f27b: 6a 00 push $0x0 <== NOT EXECUTED 10f27d: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f280: e8 e7 1e 00 00 call 11116c <== NOT EXECUTED 10f285: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f288: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f28b: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f28d: f7 d6 not %esi <== NOT EXECUTED 10f28f: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f292: 6a 00 push $0x0 <== NOT EXECUTED 10f294: 6a 00 push $0x0 <== NOT EXECUTED 10f296: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f299: e8 0a ca ff ff call 10bca8 <== NOT EXECUTED 10f29e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f2a1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2a3: 0f 85 e0 00 00 00 jne 10f389 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10f2a9: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10f2ac: 85 f6 test %esi,%esi <== NOT EXECUTED 10f2ae: 0f 85 e9 00 00 00 jne 10f39d <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10f2b4: 8b 73 10 mov 0x10(%ebx),%esi <== NOT EXECUTED 10f2b7: 85 f6 test %esi,%esi <== NOT EXECUTED 10f2b9: 0f 84 8f 00 00 00 je 10f34e <== NOT EXECUTED 10f2bf: 8b 4b 04 mov 0x4(%ebx),%ecx <== 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) { 10f2c2: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f2c5: 89 ca mov %ecx,%edx <== NOT EXECUTED 10f2c7: 29 c2 sub %eax,%edx <== NOT EXECUTED 10f2c9: 39 fa cmp %edi,%edx <== NOT EXECUTED 10f2cb: 72 91 jb 10f25e <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10f2cd: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 10f2d0: 2b 75 d0 sub -0x30(%ebp),%esi <== NOT EXECUTED 10f2d3: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 10f2d6: 39 f2 cmp %esi,%edx <== NOT EXECUTED 10f2d8: 76 03 jbe 10f2dd <== NOT EXECUTED 10f2da: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10f2dd: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10f2e0: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f2e2: f7 f1 div %ecx <== NOT EXECUTED 10f2e4: 89 c8 mov %ecx,%eax <== NOT EXECUTED 10f2e6: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f2e8: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 10f2eb: 0f 8e b1 00 00 00 jle 10f3a2 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10f2f1: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f2f3: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f2f6: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 10f2f9: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f2fb: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f2fd: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10f2ff: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10f301: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f304: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f306: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 10f309: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f30c: 01 c6 add %eax,%esi <== NOT EXECUTED 10f30e: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f310: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 10f312: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f315: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10f318: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10f31c: 0f 85 94 00 00 00 jne 10f3b6 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 10f322: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f325: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f328: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f32b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10f32e: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 10f331: 0f 86 95 00 00 00 jbe 10f3cc <== NOT EXECUTED 10f337: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED 10f33a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10f33f: e9 0f ff ff ff jmp 10f253 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 10f344: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 10f349: e9 b4 fe ff ff jmp 10f202 <== NOT EXECUTED 10f34e: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f351: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10f356: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f359: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f35c: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 10f35f: e8 40 ca ff ff call 10bda4 <== NOT EXECUTED 10f364: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 10f367: 85 db test %ebx,%ebx <== NOT EXECUTED 10f369: 0f 8f 93 fe ff ff jg 10f202 <== NOT EXECUTED 10f36f: 89 f3 mov %esi,%ebx <== NOT EXECUTED 10f371: e9 8c fe ff ff jmp 10f202 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f376: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10f37b: e9 c4 fe ff ff jmp 10f244 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f380: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10f385: 31 db xor %ebx,%ebx <== NOT EXECUTED 10f387: eb cd jmp 10f356 <== NOT EXECUTED 10f389: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f38c: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f391: eb d4 jmp 10f367 <== NOT EXECUTED 10f393: 8b 5d d4 mov -0x2c(%ebp),%ebx <== 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) { if (LIBIO_NODELAY(iop)) { 10f396: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f39b: eb b9 jmp 10f356 <== NOT EXECUTED 10f39d: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 10f3a0: eb b4 jmp 10f356 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10f3a2: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f3a4: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f3a7: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 10f3aa: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f3ac: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f3af: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 10f3b1: e9 5c ff ff ff jmp 10f312 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 10f3b6: 51 push %ecx <== NOT EXECUTED 10f3b7: 51 push %ecx <== NOT EXECUTED 10f3b8: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f3bb: 50 push %eax <== NOT EXECUTED 10f3bc: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f3bf: e8 44 1d 00 00 call 111108 <== NOT EXECUTED 10f3c4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3c7: e9 56 ff ff ff jmp 10f322 <== NOT EXECUTED 10f3cc: 89 c3 mov %eax,%ebx <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f3ce: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f3d0: eb 84 jmp 10f356 <== NOT EXECUTED =============================================================================== 0010bd98 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10bd98: 55 push %ebp 10bd99: 89 e5 mov %esp,%ebp 10bd9b: 53 push %ebx 10bd9c: 83 ec 04 sub $0x4,%esp 10bd9f: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10bda2: ff 05 88 e9 12 00 incl 0x12e988 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10bda8: 8d 50 ff lea -0x1(%eax),%edx 10bdab: 85 c2 test %eax,%edx 10bdad: 75 05 jne 10bdb4 <== NEVER TAKEN 10bdaf: 83 f8 03 cmp $0x3,%eax 10bdb2: 77 0c ja 10bdc0 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10bdb4: b8 16 00 00 00 mov $0x16,%eax 10bdb9: 5a pop %edx 10bdba: 5b pop %ebx 10bdbb: c9 leave 10bdbc: c3 ret 10bdbd: 8d 76 00 lea 0x0(%esi),%esi 10bdc0: 59 pop %ecx 10bdc1: 5b pop %ebx 10bdc2: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10bdc3: e9 20 01 00 00 jmp 10bee8 =============================================================================== 001094c0 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 1094c0: 55 push %ebp 1094c1: 89 e5 mov %esp,%ebp 1094c3: 53 push %ebx 1094c4: 83 ec 04 sub $0x4,%esp 1094c7: 8b 5d 08 mov 0x8(%ebp),%ebx const char *p = s; for (p=s ; *p ; p++ ) 1094ca: 8a 03 mov (%ebx),%al 1094cc: 84 c0 test %al,%al 1094ce: 74 17 je 1094e7 <== NEVER TAKEN BSP_output_char(*p); 1094d0: 83 ec 0c sub $0xc,%esp 1094d3: 0f be c0 movsbl %al,%eax 1094d6: 50 push %eax 1094d7: ff 15 44 32 12 00 call *0x123244 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 1094dd: 43 inc %ebx 1094de: 8a 03 mov (%ebx),%al 1094e0: 83 c4 10 add $0x10,%esp 1094e3: 84 c0 test %al,%al 1094e5: 75 e9 jne 1094d0 BSP_output_char(*p); BSP_output_char('\n'); 1094e7: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp) 1094ee: a1 44 32 12 00 mov 0x123244,%eax } 1094f3: 8b 5d fc mov -0x4(%ebp),%ebx 1094f6: c9 leave { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 1094f7: ff e0 jmp *%eax =============================================================================== 0011f5f4 : ssize_t read( int fd, void *buffer, size_t count ) { 11f5f4: 55 push %ebp 11f5f5: 89 e5 mov %esp,%ebp 11f5f7: 53 push %ebx 11f5f8: 83 ec 04 sub $0x4,%esp 11f5fb: 8b 5d 08 mov 0x8(%ebp),%ebx 11f5fe: 8b 45 0c mov 0xc(%ebp),%eax 11f601: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11f604: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11f60a: 73 50 jae 11f65c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11f60c: c1 e3 06 shl $0x6,%ebx 11f60f: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open( iop ); 11f615: 8b 4b 14 mov 0x14(%ebx),%ecx 11f618: f6 c5 01 test $0x1,%ch 11f61b: 74 3f je 11f65c rtems_libio_check_buffer( buffer ); 11f61d: 85 c0 test %eax,%eax 11f61f: 74 4f je 11f670 <== NEVER TAKEN rtems_libio_check_count( count ); 11f621: 85 d2 test %edx,%edx 11f623: 74 2f je 11f654 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11f625: 83 e1 02 and $0x2,%ecx 11f628: 74 46 je 11f670 <== NEVER TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 11f62a: 8b 4b 3c mov 0x3c(%ebx),%ecx 11f62d: 8b 49 08 mov 0x8(%ecx),%ecx 11f630: 85 c9 test %ecx,%ecx 11f632: 74 4e je 11f682 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 11f634: 83 ec 04 sub $0x4,%esp 11f637: 52 push %edx 11f638: 50 push %eax 11f639: 53 push %ebx 11f63a: ff d1 call *%ecx if ( rc > 0 ) 11f63c: 83 c4 10 add $0x10,%esp 11f63f: 85 c0 test %eax,%eax 11f641: 7e 0b jle 11f64e iop->offset += rc; 11f643: 89 c1 mov %eax,%ecx 11f645: c1 f9 1f sar $0x1f,%ecx 11f648: 01 43 0c add %eax,0xc(%ebx) 11f64b: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11f64e: 8b 5d fc mov -0x4(%ebp),%ebx 11f651: c9 leave 11f652: c3 ret 11f653: 90 nop rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 11f654: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11f656: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11f659: c9 leave <== NOT EXECUTED 11f65a: c3 ret <== NOT EXECUTED 11f65b: 90 nop <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11f65c: e8 bb 47 ff ff call 113e1c <__errno> 11f661: c7 00 09 00 00 00 movl $0x9,(%eax) 11f667: b8 ff ff ff ff mov $0xffffffff,%eax 11f66c: eb e0 jmp 11f64e 11f66e: 66 90 xchg %ax,%ax rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11f670: e8 a7 47 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f675: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11f67b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f680: eb cc jmp 11f64e <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f682: e8 95 47 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f687: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f68d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f692: eb ba jmp 11f64e <== NOT EXECUTED =============================================================================== 0010b2c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10b2c4: 55 push %ebp 10b2c5: 89 e5 mov %esp,%ebp 10b2c7: 57 push %edi 10b2c8: 56 push %esi 10b2c9: 53 push %ebx 10b2ca: 83 ec 2c sub $0x2c,%esp 10b2cd: 8b 55 08 mov 0x8(%ebp),%edx 10b2d0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10b2d3: 85 db test %ebx,%ebx 10b2d5: 0f 84 ad 00 00 00 je 10b388 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10b2db: 31 c0 xor %eax,%eax 10b2dd: b9 ff ff ff ff mov $0xffffffff,%ecx 10b2e2: 89 d7 mov %edx,%edi 10b2e4: f2 ae repnz scas %es:(%edi),%al 10b2e6: f7 d1 not %ecx 10b2e8: 49 dec %ecx 10b2e9: 83 ec 0c sub $0xc,%esp 10b2ec: 6a 00 push $0x0 10b2ee: 8d 75 d4 lea -0x2c(%ebp),%esi 10b2f1: 56 push %esi 10b2f2: 6a 00 push $0x0 10b2f4: 51 push %ecx 10b2f5: 52 push %edx 10b2f6: e8 81 ee ff ff call 10a17c 0, &loc, false ); if ( result != 0 ) 10b2fb: 83 c4 20 add $0x20,%esp 10b2fe: 85 c0 test %eax,%eax 10b300: 75 76 jne 10b378 <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 10b302: 8b 55 e0 mov -0x20(%ebp),%edx 10b305: 8b 42 10 mov 0x10(%edx),%eax 10b308: 85 c0 test %eax,%eax 10b30a: 74 4e je 10b35a <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10b30c: 83 ec 0c sub $0xc,%esp 10b30f: 56 push %esi 10b310: ff d0 call *%eax 10b312: 83 c4 10 add $0x10,%esp 10b315: 83 f8 04 cmp $0x4,%eax 10b318: 0f 85 86 00 00 00 jne 10b3a4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 10b31e: 8b 55 e0 mov -0x20(%ebp),%edx 10b321: 8b 42 3c mov 0x3c(%edx),%eax 10b324: 85 c0 test %eax,%eax 10b326: 0f 84 a1 00 00 00 je 10b3cd <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10b32c: 52 push %edx 10b32d: ff 75 10 pushl 0x10(%ebp) 10b330: 53 push %ebx 10b331: 56 push %esi 10b332: ff d0 call *%eax 10b334: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 10b336: 8b 45 e0 mov -0x20(%ebp),%eax 10b339: 83 c4 10 add $0x10,%esp 10b33c: 85 c0 test %eax,%eax 10b33e: 74 10 je 10b350 <== NEVER TAKEN 10b340: 8b 40 1c mov 0x1c(%eax),%eax 10b343: 85 c0 test %eax,%eax 10b345: 74 09 je 10b350 <== NEVER TAKEN 10b347: 83 ec 0c sub $0xc,%esp 10b34a: 56 push %esi 10b34b: ff d0 call *%eax 10b34d: 83 c4 10 add $0x10,%esp return result; } 10b350: 89 d8 mov %ebx,%eax 10b352: 8d 65 f4 lea -0xc(%ebp),%esp 10b355: 5b pop %ebx 10b356: 5e pop %esi 10b357: 5f pop %edi 10b358: c9 leave 10b359: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 10b35a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b35d: 85 c0 test %eax,%eax <== NOT EXECUTED 10b35f: 74 09 je 10b36a <== NOT EXECUTED 10b361: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b364: 56 push %esi <== NOT EXECUTED 10b365: ff d0 call *%eax <== NOT EXECUTED 10b367: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b36a: e8 31 b3 00 00 call 1166a0 <__errno> <== NOT EXECUTED 10b36f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10b378: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b37d: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b37f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b382: 5b pop %ebx <== NOT EXECUTED 10b383: 5e pop %esi <== NOT EXECUTED 10b384: 5f pop %edi <== NOT EXECUTED 10b385: c9 leave <== NOT EXECUTED 10b386: c3 ret <== NOT EXECUTED 10b387: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10b388: e8 13 b3 00 00 call 1166a0 <__errno> <== NOT EXECUTED 10b38d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10b393: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b398: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b39a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b39d: 5b pop %ebx <== NOT EXECUTED 10b39e: 5e pop %esi <== NOT EXECUTED 10b39f: 5f pop %edi <== NOT EXECUTED 10b3a0: c9 leave <== NOT EXECUTED 10b3a1: c3 ret <== NOT EXECUTED 10b3a2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 10b3a4: 8b 45 e0 mov -0x20(%ebp),%eax 10b3a7: 85 c0 test %eax,%eax 10b3a9: 74 10 je 10b3bb <== NEVER TAKEN 10b3ab: 8b 40 1c mov 0x1c(%eax),%eax 10b3ae: 85 c0 test %eax,%eax 10b3b0: 74 09 je 10b3bb <== NEVER TAKEN 10b3b2: 83 ec 0c sub $0xc,%esp 10b3b5: 56 push %esi 10b3b6: ff d0 call *%eax 10b3b8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 10b3bb: e8 e0 b2 00 00 call 1166a0 <__errno> 10b3c0: c7 00 16 00 00 00 movl $0x16,(%eax) 10b3c6: bb ff ff ff ff mov $0xffffffff,%ebx 10b3cb: eb 83 jmp 10b350 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 10b3cd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b3d0: 85 c0 test %eax,%eax <== NOT EXECUTED 10b3d2: 74 09 je 10b3dd <== NOT EXECUTED 10b3d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b3d7: 56 push %esi <== NOT EXECUTED 10b3d8: ff d0 call *%eax <== NOT EXECUTED 10b3da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b3dd: e8 be b2 00 00 call 1166a0 <__errno> <== NOT EXECUTED 10b3e2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b3e8: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10b3ed: e9 5e ff ff ff jmp 10b350 <== NOT EXECUTED =============================================================================== 00109e80 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109e80: 55 push %ebp 109e81: 89 e5 mov %esp,%ebp 109e83: 57 push %edi 109e84: 56 push %esi 109e85: 53 push %ebx 109e86: 83 ec 1c sub $0x1c,%esp 109e89: 8b 75 08 mov 0x8(%ebp),%esi 109e8c: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109e8f: 3b 35 8c 61 12 00 cmp 0x12618c,%esi 109e95: 0f 83 03 01 00 00 jae 109f9e <== NEVER TAKEN iop = rtems_libio_iop( fd ); 109e9b: c1 e6 06 shl $0x6,%esi 109e9e: 03 35 20 aa 12 00 add 0x12aa20,%esi rtems_libio_check_is_open( iop ); 109ea4: 8b 46 14 mov 0x14(%esi),%eax 109ea7: f6 c4 01 test $0x1,%ah 109eaa: 0f 84 ee 00 00 00 je 109f9e <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109eb0: a8 02 test $0x2,%al 109eb2: 0f 84 b4 00 00 00 je 109f6c <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109eb8: 85 db test %ebx,%ebx 109eba: 0f 84 ac 00 00 00 je 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109ec0: 8b 7d 10 mov 0x10(%ebp),%edi 109ec3: 85 ff test %edi,%edi 109ec5: 0f 8e a1 00 00 00 jle 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109ecb: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109ed2: 0f 8f 94 00 00 00 jg 109f6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 109ed8: 8b 46 3c mov 0x3c(%esi),%eax 109edb: 8b 40 08 mov 0x8(%eax),%eax 109ede: 89 45 e0 mov %eax,-0x20(%ebp) 109ee1: 85 c0 test %eax,%eax 109ee3: 0f 84 c9 00 00 00 je 109fb2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 109ee9: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109eed: 31 c0 xor %eax,%eax 109eef: 31 d2 xor %edx,%edx 109ef1: eb 03 jmp 109ef6 109ef3: 90 nop * 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++ ) { 109ef4: 89 fa mov %edi,%edx ssize_t old; if ( !iov[v].iov_base ) 109ef6: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109ef9: 85 c9 test %ecx,%ecx 109efb: 74 6f je 109f6c if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109efd: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109f01: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109f04: 39 d7 cmp %edx,%edi 109f06: 7c 64 jl 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109f08: 85 c9 test %ecx,%ecx 109f0a: 74 04 je 109f10 <== NEVER TAKEN 109f0c: c6 45 e4 00 movb $0x0,-0x1c(%ebp) * 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++ ) { 109f10: 40 inc %eax 109f11: 39 45 10 cmp %eax,0x10(%ebp) 109f14: 7f de jg 109ef4 <== ALWAYS TAKEN /* * 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 ) { 109f16: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) <== NOT EXECUTED 109f1a: 75 70 jne 109f8c <== NOT EXECUTED 109f1c: 31 ff xor %edi,%edi <== NOT EXECUTED 109f1e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 109f25: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f28: eb 24 jmp 109f4e <== NOT EXECUTED 109f2a: 66 90 xchg %ax,%ax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109f2c: 74 0e je 109f3c <== NOT EXECUTED iop->offset += bytes; 109f2e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 109f30: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 109f33: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 109f36: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 109f39: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 109f3c: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax <== NOT EXECUTED 109f40: 75 3c jne 109f7e <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f42: 47 inc %edi <== NOT EXECUTED 109f43: 39 7d 10 cmp %edi,0x10(%ebp) <== NOT EXECUTED 109f46: 7e 36 jle 109f7e <== NOT EXECUTED 109f48: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 109f4b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 109f4e: 52 push %edx <== NOT EXECUTED 109f4f: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) <== NOT EXECUTED 109f53: ff 34 fb pushl (%ebx,%edi,8) <== NOT EXECUTED 109f56: 56 push %esi <== NOT EXECUTED 109f57: ff d0 call *%eax <== NOT EXECUTED if ( bytes < 0 ) 109f59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f5c: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 109f5f: 7d cb jge 109f2c <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f61: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109f68: eb 14 jmp 109f7e <== NOT EXECUTED 109f6a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109f6c: e8 a3 ab 00 00 call 114b14 <__errno> 109f71: c7 00 16 00 00 00 movl $0x16,(%eax) 109f77: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109f7e: 8b 45 e4 mov -0x1c(%ebp),%eax 109f81: 8d 65 f4 lea -0xc(%ebp),%esp 109f84: 5b pop %ebx 109f85: 5e pop %esi 109f86: 5f pop %edi 109f87: c9 leave 109f88: c3 ret 109f89: 8d 76 00 lea 0x0(%esi),%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 ) { 109f8c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 109f93: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109f96: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f99: 5b pop %ebx <== NOT EXECUTED 109f9a: 5e pop %esi <== NOT EXECUTED 109f9b: 5f pop %edi <== NOT EXECUTED 109f9c: c9 leave <== NOT EXECUTED 109f9d: c3 ret <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 109f9e: e8 71 ab 00 00 call 114b14 <__errno> <== NOT EXECUTED 109fa3: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109fa9: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109fb0: eb cc jmp 109f7e <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 109fb2: e8 5d ab 00 00 call 114b14 <__errno> <== NOT EXECUTED 109fb7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109fbd: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109fc4: eb b8 jmp 109f7e <== NOT EXECUTED =============================================================================== 0011f714 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 11f714: 55 push %ebp 11f715: 89 e5 mov %esp,%ebp 11f717: 57 push %edi 11f718: 56 push %esi 11f719: 53 push %ebx 11f71a: 83 ec 2c sub $0x2c,%esp 11f71d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f720: 8b 75 0c mov 0xc(%ebp),%esi 11f723: ff 05 10 72 12 00 incl 0x127210 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11f729: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 11f730: 74 72 je 11f7a4 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11f732: 85 db test %ebx,%ebx 11f734: 74 5e je 11f794 return malloc( size ); if ( !size ) { 11f736: 85 f6 test %esi,%esi 11f738: 74 3a je 11f774 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11f73a: 52 push %edx 11f73b: 8d 45 e4 lea -0x1c(%ebp),%eax 11f73e: 50 push %eax 11f73f: 53 push %ebx 11f740: ff 35 58 31 12 00 pushl 0x123158 11f746: e8 59 01 00 00 call 11f8a4 <_Protected_heap_Get_block_size> 11f74b: 83 c4 10 add $0x10,%esp 11f74e: 84 c0 test %al,%al 11f750: 74 32 je 11f784 #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 ) ) { 11f752: 50 push %eax 11f753: 56 push %esi 11f754: 53 push %ebx 11f755: ff 35 58 31 12 00 pushl 0x123158 11f75b: e8 7c 01 00 00 call 11f8dc <_Protected_heap_Resize_block> 11f760: 83 c4 10 add $0x10,%esp 11f763: 84 c0 test %al,%al 11f765: 74 5d je 11f7c4 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11f767: 89 d8 mov %ebx,%eax 11f769: 8d 65 f4 lea -0xc(%ebp),%esp 11f76c: 5b pop %ebx 11f76d: 5e pop %esi 11f76e: 5f pop %edi 11f76f: c9 leave 11f770: c3 ret 11f771: 8d 76 00 lea 0x0(%esi),%esi */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11f774: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11f777: 53 push %ebx <== NOT EXECUTED 11f778: e8 07 8e fe ff call 108584 <== NOT EXECUTED 11f77d: 31 db xor %ebx,%ebx <== NOT EXECUTED return (void *) 0; 11f77f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11f782: eb e3 jmp 11f767 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11f784: e8 93 46 ff ff call 113e1c <__errno> 11f789: c7 00 16 00 00 00 movl $0x16,(%eax) 11f78f: 31 db xor %ebx,%ebx return (void *) 0; 11f791: eb d4 jmp 11f767 11f793: 90 nop /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11f794: 83 ec 0c sub $0xc,%esp 11f797: 56 push %esi 11f798: e8 bf 90 fe ff call 10885c 11f79d: 89 c3 mov %eax,%ebx 11f79f: 83 c4 10 add $0x10,%esp 11f7a2: eb c3 jmp 11f767 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 11f7a4: a1 58 73 12 00 mov 0x127358,%eax 11f7a9: 85 c0 test %eax,%eax 11f7ab: 74 04 je 11f7b1 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11f7ad: 31 db xor %ebx,%ebx 11f7af: eb b6 jmp 11f767 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11f7b1: a1 f4 73 12 00 mov 0x1273f4,%eax 11f7b6: 85 c0 test %eax,%eax 11f7b8: 0f 84 74 ff ff ff je 11f732 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 11f7be: 31 db xor %ebx,%ebx 11f7c0: eb a5 jmp 11f767 <== NOT EXECUTED 11f7c2: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ); 11f7c4: 83 ec 0c sub $0xc,%esp 11f7c7: 56 push %esi 11f7c8: e8 8f 90 fe ff call 10885c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11f7cd: ff 0d 04 72 12 00 decl 0x127204 if ( !new_area ) { 11f7d3: 83 c4 10 add $0x10,%esp 11f7d6: 85 c0 test %eax,%eax 11f7d8: 74 d3 je 11f7ad return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11f7da: 8b 55 e4 mov -0x1c(%ebp),%edx 11f7dd: 89 f1 mov %esi,%ecx 11f7df: 39 d6 cmp %edx,%esi 11f7e1: 76 02 jbe 11f7e5 <== NEVER TAKEN 11f7e3: 89 d1 mov %edx,%ecx 11f7e5: 89 c7 mov %eax,%edi 11f7e7: 89 de mov %ebx,%esi 11f7e9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11f7eb: 83 ec 0c sub $0xc,%esp 11f7ee: 53 push %ebx 11f7ef: 89 45 d4 mov %eax,-0x2c(%ebp) 11f7f2: e8 8d 8d fe ff call 108584 11f7f7: 8b 45 d4 mov -0x2c(%ebp),%eax 11f7fa: 89 c3 mov %eax,%ebx return new_area; 11f7fc: 83 c4 10 add $0x10,%esp 11f7ff: e9 63 ff ff ff jmp 11f767 =============================================================================== 0010c240 : #include int rmdir( const char *pathname ) { 10c240: 55 push %ebp 10c241: 89 e5 mov %esp,%ebp 10c243: 57 push %edi 10c244: 56 push %esi 10c245: 53 push %ebx 10c246: 83 ec 58 sub $0x58,%esp 10c249: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 10c24c: 53 push %ebx 10c24d: e8 6a e6 ff ff call 10a8bc if ( parentpathlen == 0 ) 10c252: 83 c4 10 add $0x10,%esp 10c255: 85 c0 test %eax,%eax 10c257: 0f 85 2f 01 00 00 jne 10c38c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10c25d: 50 push %eax 10c25e: 8d 45 d0 lea -0x30(%ebp),%eax 10c261: 89 45 b4 mov %eax,-0x4c(%ebp) 10c264: 50 push %eax 10c265: 8d 45 e4 lea -0x1c(%ebp),%eax 10c268: 50 push %eax 10c269: 53 push %ebx 10c26a: e8 c1 02 00 00 call 10c530 10c26f: 31 d2 xor %edx,%edx 10c271: c6 45 b3 00 movb $0x0,-0x4d(%ebp) 10c275: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10c278: 8d 7d bc lea -0x44(%ebp),%edi 10c27b: b9 05 00 00 00 mov $0x5,%ecx 10c280: 8b 75 b4 mov -0x4c(%ebp),%esi 10c283: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10c285: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10c287: be ff ff ff ff mov $0xffffffff,%esi 10c28c: 89 f1 mov %esi,%ecx 10c28e: 89 df mov %ebx,%edi 10c290: 31 c0 xor %eax,%eax 10c292: f2 ae repnz scas %es:(%edi),%al 10c294: f7 d1 not %ecx 10c296: 49 dec %ecx 10c297: 83 ec 08 sub $0x8,%esp 10c29a: 51 push %ecx 10c29b: 53 push %ebx 10c29c: e8 cb e5 ff ff call 10a86c 10c2a1: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10c2a3: 89 f1 mov %esi,%ecx 10c2a5: 89 df mov %ebx,%edi 10c2a7: 31 c0 xor %eax,%eax 10c2a9: f2 ae repnz scas %es:(%edi),%al 10c2ab: f7 d1 not %ecx 10c2ad: 49 dec %ecx 10c2ae: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c2b5: 8d 75 bc lea -0x44(%ebp),%esi 10c2b8: 56 push %esi 10c2b9: 6a 00 push $0x0 10c2bb: 51 push %ecx 10c2bc: 53 push %ebx 10c2bd: e8 42 e6 ff ff call 10a904 0, &loc, false ); if ( result != 0 ) { 10c2c2: 83 c4 20 add $0x20,%esp 10c2c5: 85 c0 test %eax,%eax 10c2c7: 0f 85 fb 00 00 00 jne 10c3c8 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10c2cd: 8b 55 c8 mov -0x38(%ebp),%edx 10c2d0: 8b 42 10 mov 0x10(%edx),%eax 10c2d3: 85 c0 test %eax,%eax 10c2d5: 0f 84 61 01 00 00 je 10c43c <== NEVER TAKEN 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 ){ 10c2db: 83 ec 0c sub $0xc,%esp 10c2de: 56 push %esi 10c2df: ff d0 call *%eax 10c2e1: 83 c4 10 add $0x10,%esp 10c2e4: 48 dec %eax 10c2e5: 75 5d jne 10c344 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10c2e7: 8b 45 c4 mov -0x3c(%ebp),%eax 10c2ea: 8b 40 34 mov 0x34(%eax),%eax 10c2ed: 85 c0 test %eax,%eax 10c2ef: 0f 84 fb 00 00 00 je 10c3f0 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10c2f5: 83 ec 08 sub $0x8,%esp 10c2f8: 56 push %esi 10c2f9: ff 75 b4 pushl -0x4c(%ebp) 10c2fc: ff d0 call *%eax 10c2fe: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 10c300: 8b 45 c8 mov -0x38(%ebp),%eax 10c303: 83 c4 10 add $0x10,%esp 10c306: 85 c0 test %eax,%eax 10c308: 74 10 je 10c31a <== NEVER TAKEN 10c30a: 8b 40 1c mov 0x1c(%eax),%eax 10c30d: 85 c0 test %eax,%eax 10c30f: 74 09 je 10c31a <== NEVER TAKEN 10c311: 83 ec 0c sub $0xc,%esp 10c314: 56 push %esi 10c315: ff d0 call *%eax 10c317: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10c31a: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c31e: 74 19 je 10c339 rtems_filesystem_freenode( &parentloc ); 10c320: 8b 45 dc mov -0x24(%ebp),%eax 10c323: 85 c0 test %eax,%eax 10c325: 74 12 je 10c339 <== NEVER TAKEN 10c327: 8b 40 1c mov 0x1c(%eax),%eax 10c32a: 85 c0 test %eax,%eax 10c32c: 74 0b je 10c339 <== NEVER TAKEN 10c32e: 83 ec 0c sub $0xc,%esp 10c331: ff 75 b4 pushl -0x4c(%ebp) 10c334: ff d0 call *%eax 10c336: 83 c4 10 add $0x10,%esp return result; } 10c339: 89 d8 mov %ebx,%eax 10c33b: 8d 65 f4 lea -0xc(%ebp),%esp 10c33e: 5b pop %ebx 10c33f: 5e pop %esi 10c340: 5f pop %edi 10c341: c9 leave 10c342: c3 ret 10c343: 90 nop rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 10c344: 8b 45 c8 mov -0x38(%ebp),%eax 10c347: 85 c0 test %eax,%eax 10c349: 74 10 je 10c35b <== NEVER TAKEN 10c34b: 8b 40 1c mov 0x1c(%eax),%eax 10c34e: 85 c0 test %eax,%eax 10c350: 74 09 je 10c35b <== NEVER TAKEN 10c352: 83 ec 0c sub $0xc,%esp 10c355: 56 push %esi 10c356: ff d0 call *%eax 10c358: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10c35b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c35f: 74 19 je 10c37a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10c361: 8b 45 dc mov -0x24(%ebp),%eax 10c364: 85 c0 test %eax,%eax 10c366: 74 12 je 10c37a <== NEVER TAKEN 10c368: 8b 40 1c mov 0x1c(%eax),%eax 10c36b: 85 c0 test %eax,%eax 10c36d: 74 0b je 10c37a <== NEVER TAKEN 10c36f: 83 ec 0c sub $0xc,%esp 10c372: ff 75 b4 pushl -0x4c(%ebp) 10c375: ff d0 call *%eax 10c377: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10c37a: e8 5d ab 00 00 call 116edc <__errno> 10c37f: c7 00 14 00 00 00 movl $0x14,(%eax) 10c385: bb ff ff ff ff mov $0xffffffff,%ebx 10c38a: eb ad jmp 10c339 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10c38c: 89 c2 mov %eax,%edx 10c38e: 83 ec 0c sub $0xc,%esp 10c391: 6a 00 push $0x0 10c393: 8d 45 d0 lea -0x30(%ebp),%eax 10c396: 89 45 b4 mov %eax,-0x4c(%ebp) 10c399: 50 push %eax 10c39a: 6a 02 push $0x2 10c39c: 52 push %edx 10c39d: 53 push %ebx 10c39e: 89 55 ac mov %edx,-0x54(%ebp) 10c3a1: e8 32 e6 ff ff call 10a9d8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10c3a6: 83 c4 20 add $0x20,%esp 10c3a9: 85 c0 test %eax,%eax 10c3ab: 8b 55 ac mov -0x54(%ebp),%edx 10c3ae: 75 0c jne 10c3bc <== NEVER TAKEN 10c3b0: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10c3b4: e9 bf fe ff ff jmp 10c278 10c3b9: 8d 76 00 lea 0x0(%esi),%esi result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10c3bc: bb ff ff ff ff mov $0xffffffff,%ebx 10c3c1: e9 73 ff ff ff jmp 10c339 10c3c6: 66 90 xchg %ax,%ax name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 10c3c8: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c3cc: 74 ee je 10c3bc <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10c3ce: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10c3d1: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3d3: 74 e7 je 10c3bc <== NOT EXECUTED 10c3d5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c3d8: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3da: 74 e0 je 10c3bc <== NOT EXECUTED 10c3dc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c3df: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10c3e2: ff d0 call *%eax <== NOT EXECUTED 10c3e4: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 10c3e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c3ea: e9 4a ff ff ff jmp 10c339 <== NOT EXECUTED 10c3ef: 90 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 10c3f0: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 10c3f3: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3f5: 74 10 je 10c407 <== NOT EXECUTED 10c3f7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c3fa: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3fc: 74 09 je 10c407 <== NOT EXECUTED 10c3fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c401: 56 push %esi <== NOT EXECUTED 10c402: ff d0 call *%eax <== NOT EXECUTED 10c404: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10c407: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 10c40b: 74 19 je 10c426 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10c40d: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10c410: 85 c0 test %eax,%eax <== NOT EXECUTED 10c412: 74 12 je 10c426 <== NOT EXECUTED 10c414: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c417: 85 c0 test %eax,%eax <== NOT EXECUTED 10c419: 74 0b je 10c426 <== NOT EXECUTED 10c41b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c41e: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10c421: ff d0 call *%eax <== NOT EXECUTED 10c423: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c426: e8 b1 aa 00 00 call 116edc <__errno> <== NOT EXECUTED 10c42b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c431: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10c436: e9 fe fe ff ff jmp 10c339 <== NOT EXECUTED 10c43b: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 10c43c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10c43f: 85 c0 test %eax,%eax <== NOT EXECUTED 10c441: 75 bb jne 10c3fe <== NOT EXECUTED 10c443: eb c2 jmp 10c407 <== NOT EXECUTED =============================================================================== 00113654 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 113654: 55 push %ebp 113655: 89 e5 mov %esp,%ebp 113657: 57 push %edi 113658: 56 push %esi 113659: 53 push %ebx 11365a: 83 ec 1c sub $0x1c,%esp 11365d: 8b 7d 0c mov 0xc(%ebp),%edi 113660: 31 f6 xor %esi,%esi 113662: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 113669: bb 01 00 00 00 mov $0x1,%ebx 11366e: eb 08 jmp 113678 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 113670: d1 e3 shl %ebx 113672: 46 inc %esi 113673: 83 fe 20 cmp $0x20,%esi 113676: 74 1e je 113696 if (b & remote_value) 113678: 85 fb test %edi,%ebx 11367a: 74 f4 je 113670 local_value |= rtems_assoc_local_by_remote(ap, b); 11367c: 83 ec 08 sub $0x8,%esp 11367f: 53 push %ebx 113680: ff 75 08 pushl 0x8(%ebp) 113683: e8 1c 00 00 00 call 1136a4 113688: 09 45 e4 or %eax,-0x1c(%ebp) 11368b: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 11368e: d1 e3 shl %ebx 113690: 46 inc %esi 113691: 83 fe 20 cmp $0x20,%esi 113694: 75 e2 jne 113678 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 113696: 8b 45 e4 mov -0x1c(%ebp),%eax 113699: 8d 65 f4 lea -0xc(%ebp),%esp 11369c: 5b pop %ebx 11369d: 5e pop %esi 11369e: 5f pop %edi 11369f: c9 leave 1136a0: c3 ret =============================================================================== 00118b2c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 118b2c: 55 push %ebp <== NOT EXECUTED 118b2d: 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; } 118b2f: b8 00 c4 12 00 mov $0x12c400,%eax <== NOT EXECUTED 118b34: c9 leave <== NOT EXECUTED 118b35: c3 ret <== NOT EXECUTED =============================================================================== 00115ba8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 115ba8: 55 push %ebp 115ba9: 89 e5 mov %esp,%ebp 115bab: 53 push %ebx 115bac: 83 ec 0c sub $0xc,%esp 115baf: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 115bb2: 53 push %ebx 115bb3: ff 75 08 pushl 0x8(%ebp) 115bb6: e8 1d 00 00 00 call 115bd8 if (nap) 115bbb: 83 c4 10 add $0x10,%esp 115bbe: 85 c0 test %eax,%eax 115bc0: 74 0a je 115bcc <== NEVER TAKEN return nap->name; 115bc2: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 115bc4: 8b 5d fc mov -0x4(%ebp),%ebx 115bc7: c9 leave 115bc8: c3 ret 115bc9: 8d 76 00 lea 0x0(%esi),%esi nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 115bcc: 89 5d 08 mov %ebx,0x8(%ebp) } 115bcf: 8b 5d fc mov -0x4(%ebp),%ebx 115bd2: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 115bd3: e9 54 2f 00 00 jmp 118b2c =============================================================================== 00113dac : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113dac: 55 push %ebp 113dad: 89 e5 mov %esp,%ebp 113daf: 57 push %edi 113db0: 56 push %esi 113db1: 53 push %ebx 113db2: 8b 45 08 mov 0x8(%ebp),%eax 113db5: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 113db8: 8b 30 mov (%eax),%esi 113dba: 85 f6 test %esi,%esi 113dbc: 74 3e je 113dfc <== NEVER TAKEN 113dbe: bf 16 20 12 00 mov $0x122016,%edi 113dc3: b9 0a 00 00 00 mov $0xa,%ecx 113dc8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 113dca: 74 18 je 113de4 <== NEVER TAKEN 113dcc: 31 c9 xor %ecx,%ecx 113dce: eb 09 jmp 113dd9 default_ap = ap++; for ( ; ap->name; ap++) 113dd0: 83 c0 0c add $0xc,%eax 113dd3: 8b 18 mov (%eax),%ebx 113dd5: 85 db test %ebx,%ebx 113dd7: 74 1b je 113df4 if (ap->local_value == local_value) 113dd9: 39 50 04 cmp %edx,0x4(%eax) 113ddc: 75 f2 jne 113dd0 return ap; return default_ap; } 113dde: 5b pop %ebx 113ddf: 5e pop %esi 113de0: 5f pop %edi 113de1: c9 leave 113de2: c3 ret 113de3: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 113de4: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 113de7: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 113dea: 85 f6 test %esi,%esi <== NOT EXECUTED 113dec: 74 f0 je 113dde <== NOT EXECUTED 113dee: 89 c1 mov %eax,%ecx <== NOT EXECUTED 113df0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 113df2: eb e5 jmp 113dd9 <== NOT EXECUTED 113df4: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 113df6: 5b pop %ebx 113df7: 5e pop %esi 113df8: 5f pop %edi 113df9: c9 leave 113dfa: c3 ret 113dfb: 90 nop uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 113dfc: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 113dfe: 5b pop %ebx <== NOT EXECUTED 113dff: 5e pop %esi <== NOT EXECUTED 113e00: 5f pop %edi <== NOT EXECUTED 113e01: c9 leave <== NOT EXECUTED 113e02: c3 ret <== NOT EXECUTED =============================================================================== 001136c4 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 1136c4: 55 push %ebp 1136c5: 89 e5 mov %esp,%ebp 1136c7: 57 push %edi 1136c8: 56 push %esi 1136c9: 53 push %ebx 1136ca: 8b 45 08 mov 0x8(%ebp),%eax 1136cd: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1136d0: 8b 30 mov (%eax),%esi 1136d2: 85 f6 test %esi,%esi 1136d4: 74 3e je 113714 <== NEVER TAKEN 1136d6: bf 16 20 12 00 mov $0x122016,%edi 1136db: b9 0a 00 00 00 mov $0xa,%ecx 1136e0: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1136e2: 74 18 je 1136fc <== NEVER TAKEN 1136e4: 31 c9 xor %ecx,%ecx 1136e6: eb 09 jmp 1136f1 default_ap = ap++; for ( ; ap->name; ap++) 1136e8: 83 c0 0c add $0xc,%eax 1136eb: 8b 18 mov (%eax),%ebx 1136ed: 85 db test %ebx,%ebx 1136ef: 74 1b je 11370c if (ap->remote_value == remote_value) 1136f1: 39 50 08 cmp %edx,0x8(%eax) 1136f4: 75 f2 jne 1136e8 return ap; return default_ap; } 1136f6: 5b pop %ebx 1136f7: 5e pop %esi 1136f8: 5f pop %edi 1136f9: c9 leave 1136fa: c3 ret 1136fb: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 1136fc: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 1136ff: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 113702: 85 f6 test %esi,%esi <== NOT EXECUTED 113704: 74 f0 je 1136f6 <== NOT EXECUTED 113706: 89 c1 mov %eax,%ecx <== NOT EXECUTED 113708: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11370a: eb e5 jmp 1136f1 <== NOT EXECUTED 11370c: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 11370e: 5b pop %ebx 11370f: 5e pop %esi 113710: 5f pop %edi 113711: c9 leave 113712: c3 ret 113713: 90 nop uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 113714: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 113716: 5b pop %ebx <== NOT EXECUTED 113717: 5e pop %esi <== NOT EXECUTED 113718: 5f pop %edi <== NOT EXECUTED 113719: c9 leave <== NOT EXECUTED 11371a: c3 ret <== NOT EXECUTED =============================================================================== 00113d8c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 113d8c: 55 push %ebp <== NOT EXECUTED 113d8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113d8f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 113d92: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 113d95: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 113d98: e8 0f 00 00 00 call 113dac <== NOT EXECUTED if (nap) 113d9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113da0: 85 c0 test %eax,%eax <== NOT EXECUTED 113da2: 74 03 je 113da7 <== NOT EXECUTED return nap->remote_value; 113da4: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED return 0; } 113da7: c9 leave <== NOT EXECUTED 113da8: c3 ret <== NOT EXECUTED =============================================================================== 00110f90 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 110f90: 55 push %ebp 110f91: 89 e5 mov %esp,%ebp 110f93: 57 push %edi 110f94: 56 push %esi 110f95: 53 push %ebx 110f96: 83 ec 2c sub $0x2c,%esp 110f99: 8b 5d 08 mov 0x8(%ebp),%ebx 110f9c: 8b 7d 0c mov 0xc(%ebp),%edi 110f9f: 8b 45 10 mov 0x10(%ebp),%eax 110fa2: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 110fa5: 85 db test %ebx,%ebx 110fa7: 0f 84 87 00 00 00 je 111034 return RTEMS_INVALID_NAME; if ( !id ) 110fad: 85 f6 test %esi,%esi 110faf: 0f 84 bb 00 00 00 je 111070 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 110fb5: f7 c7 10 00 00 00 test $0x10,%edi 110fbb: 0f 84 83 00 00 00 je 111044 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 110fc1: 85 c0 test %eax,%eax 110fc3: 0f 84 87 00 00 00 je 111050 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 110fc9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 110fd0: 89 45 e4 mov %eax,-0x1c(%ebp) 110fd3: a1 58 73 12 00 mov 0x127358,%eax 110fd8: 40 inc %eax 110fd9: a3 58 73 12 00 mov %eax,0x127358 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 110fde: 83 ec 0c sub $0xc,%esp 110fe1: 68 20 76 12 00 push $0x127620 110fe6: e8 8d be ff ff call 10ce78 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 110feb: 83 c4 10 add $0x10,%esp 110fee: 85 c0 test %eax,%eax 110ff0: 74 6a je 11105c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 110ff2: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 110ff5: 83 ec 08 sub $0x8,%esp 110ff8: 8d 55 e0 lea -0x20(%ebp),%edx 110ffb: 52 push %edx 110ffc: 8d 50 14 lea 0x14(%eax),%edx 110fff: 52 push %edx 111000: 89 45 d4 mov %eax,-0x2c(%ebp) 111003: e8 5c 06 00 00 call 111664 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111008: 8b 45 d4 mov -0x2c(%ebp),%eax 11100b: 8b 50 08 mov 0x8(%eax),%edx 11100e: 0f b7 fa movzwl %dx,%edi 111011: 8b 0d 3c 76 12 00 mov 0x12763c,%ecx 111017: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11101a: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 11101d: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11101f: e8 4c cb ff ff call 10db70 <_Thread_Enable_dispatch> 111024: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111026: 83 c4 10 add $0x10,%esp } 111029: 8d 65 f4 lea -0xc(%ebp),%esp 11102c: 5b pop %ebx 11102d: 5e pop %esi 11102e: 5f pop %edi 11102f: c9 leave 111030: c3 ret 111031: 8d 76 00 lea 0x0(%esi),%esi ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111034: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111039: 8d 65 f4 lea -0xc(%ebp),%esp 11103c: 5b pop %ebx 11103d: 5e pop %esi 11103e: 5f pop %edi 11103f: c9 leave 111040: c3 ret 111041: 8d 76 00 lea 0x0(%esi),%esi if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 111044: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11104b: eb 83 jmp 110fd0 11104d: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 111050: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111052: 8d 65 f4 lea -0xc(%ebp),%esp 111055: 5b pop %ebx 111056: 5e pop %esi 111057: 5f pop %edi 111058: c9 leave 111059: c3 ret 11105a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 11105c: e8 0f cb ff ff call 10db70 <_Thread_Enable_dispatch> 111061: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111066: 8d 65 f4 lea -0xc(%ebp),%esp 111069: 5b pop %ebx 11106a: 5e pop %esi 11106b: 5f pop %edi 11106c: c9 leave 11106d: c3 ret 11106e: 66 90 xchg %ax,%ax CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 111070: b8 09 00 00 00 mov $0x9,%eax 111075: eb b2 jmp 111029 =============================================================================== 00108098 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 108098: 55 push %ebp 108099: 89 e5 mov %esp,%ebp 10809b: 57 push %edi 10809c: 56 push %esi 10809d: 53 push %ebx 10809e: 83 ec 1c sub $0x1c,%esp 1080a1: 8b 45 08 mov 0x8(%ebp),%eax 1080a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1080a7: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1080aa: 85 c0 test %eax,%eax 1080ac: 75 0e jne 1080bc int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 1080c0: 85 f6 test %esi,%esi 1080c2: 74 ea je 1080ae return NULL; value[0] = '\0'; 1080c4: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 1080c7: 83 ec 0c sub $0xc,%esp 1080ca: 50 push %eax 1080cb: e8 48 00 00 00 call 108118 if ( !p ) 1080d0: 83 c4 10 add $0x10,%esp 1080d3: 85 c0 test %eax,%eax 1080d5: 74 d7 je 1080ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 1080dd: 4e dec %esi 1080de: 89 75 e4 mov %esi,-0x1c(%ebp) 1080e1: 74 cd je 1080b0 <== NEVER TAKEN 1080e3: 31 f6 xor %esi,%esi 1080e5: 31 d2 xor %edx,%edx 1080e7: 31 ff xor %edi,%edi 1080e9: eb 24 jmp 10810f 1080eb: 90 nop if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 1080ec: f7 c7 01 00 00 00 test $0x1,%edi 1080f2: 75 05 jne 1080f9 <== NEVER TAKEN 1080f4: 80 f9 20 cmp $0x20,%cl 1080f7: 74 b7 je 1080b0 <== NEVER TAKEN break; value[i++] = *p++; 1080f9: 88 0c 33 mov %cl,(%ebx,%esi,1) 1080fc: 42 inc %edx 1080fd: 89 d6 mov %edx,%esi value[i] = '\0'; 1080ff: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 10810a: 3b 55 e4 cmp -0x1c(%ebp),%edx 10810d: 73 a1 jae 1080b0 <== NEVER TAKEN if ( *p == '\"' ) { 10810f: 80 f9 22 cmp $0x22,%cl 108112: 75 d8 jne 1080ec <== ALWAYS TAKEN quotes++; 108114: 47 inc %edi <== NOT EXECUTED 108115: eb e2 jmp 1080f9 <== NOT EXECUTED =============================================================================== 00108118 : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 83 ec 08 sub $0x8,%esp 10811e: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 108121: 85 c0 test %eax,%eax 108123: 75 07 jne 10812c if ( !bsp_boot_cmdline ) return NULL; p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; 108125: 31 c0 xor %eax,%eax } 108127: c9 leave 108128: c3 ret 108129: 8d 76 00 lea 0x0(%esi),%esi const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 10812c: 8b 15 d8 86 12 00 mov 0x1286d8,%edx 108132: 85 d2 test %edx,%edx 108134: 74 ef je 108125 return NULL; p = strstr(bsp_boot_cmdline, name); 108136: 83 ec 08 sub $0x8,%esp 108139: 50 push %eax 10813a: 52 push %edx 10813b: e8 04 d4 00 00 call 115544 108140: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 108143: c9 leave 108144: c3 ret =============================================================================== 00108148 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 108148: 55 push %ebp 108149: 89 e5 mov %esp,%ebp 10814b: 57 push %edi 10814c: 53 push %ebx 10814d: 8b 7d 08 mov 0x8(%ebp),%edi 108150: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 108153: 50 push %eax 108154: ff 75 10 pushl 0x10(%ebp) 108157: 53 push %ebx 108158: 57 push %edi 108159: e8 3a ff ff ff call 108098 10815e: 89 c2 mov %eax,%edx if ( !p ) 108160: 83 c4 10 add $0x10,%esp 108163: 85 c0 test %eax,%eax 108165: 75 0d jne 108174 <== ALWAYS TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 108167: 31 db xor %ebx,%ebx } 108169: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10816b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10816e: 5b pop %ebx <== NOT EXECUTED 10816f: 5f pop %edi <== NOT EXECUTED 108170: c9 leave <== NOT EXECUTED 108171: c3 ret <== NOT EXECUTED 108172: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 108174: 31 c0 xor %eax,%eax 108176: b9 ff ff ff ff mov $0xffffffff,%ecx 10817b: f2 ae repnz scas %es:(%edi),%al 10817d: f7 d1 not %ecx 10817f: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 108183: 80 38 3d cmpb $0x3d,(%eax) 108186: 75 df jne 108167 <== NEVER TAKEN return NULL; rhs++; 108188: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 10818b: 8a 50 01 mov 0x1(%eax),%dl 10818e: 80 fa 22 cmp $0x22,%dl 108191: 74 2d je 1081c0 <== NEVER TAKEN rhs++; for ( d=value ; *rhs ; ) 108193: 84 d2 test %dl,%dl 108195: 74 31 je 1081c8 <== ALWAYS TAKEN 108197: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *d++ = *rhs++; 10819c: 88 10 mov %dl,(%eax) <== NOT EXECUTED 10819e: 40 inc %eax <== NOT EXECUTED 10819f: 41 inc %ecx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1081a0: 8a 11 mov (%ecx),%dl <== NOT EXECUTED 1081a2: 84 d2 test %dl,%dl <== NOT EXECUTED 1081a4: 75 f6 jne 10819c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 1081a6: 8d 50 ff lea -0x1(%eax),%edx 1081a9: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 1081ad: 74 02 je 1081b1 <== NEVER TAKEN 1081af: 89 c2 mov %eax,%edx d--; *d = '\0'; 1081b1: c6 02 00 movb $0x0,(%edx) return value; } 1081b4: 89 d8 mov %ebx,%eax 1081b6: 8d 65 f8 lea -0x8(%ebp),%esp 1081b9: 5b pop %ebx 1081ba: 5f pop %edi 1081bb: c9 leave 1081bc: c3 ret 1081bd: 8d 76 00 lea 0x0(%esi),%esi if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 1081c0: 8d 48 02 lea 0x2(%eax),%ecx <== NOT EXECUTED 1081c3: 8a 50 02 mov 0x2(%eax),%dl <== NOT EXECUTED 1081c6: eb cb jmp 108193 <== NOT EXECUTED for ( d=value ; *rhs ; ) 1081c8: 89 d8 mov %ebx,%eax 1081ca: eb da jmp 1081a6 =============================================================================== 00116318 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 116318: 55 push %ebp 116319: 89 e5 mov %esp,%ebp 11631b: 53 push %ebx 11631c: 83 ec 04 sub $0x4,%esp 11631f: 8b 45 08 mov 0x8(%ebp),%eax 116322: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 116325: 85 db test %ebx,%ebx 116327: 74 3b je 116364 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 116329: 85 c0 test %eax,%eax 11632b: 74 2b je 116358 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 11632d: 83 f8 01 cmp $0x1,%eax 116330: 74 3e je 116370 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 116332: 83 f8 02 cmp $0x2,%eax 116335: 74 45 je 11637c *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 116337: 83 f8 03 cmp $0x3,%eax 11633a: 74 4c je 116388 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 11633c: 83 f8 04 cmp $0x4,%eax 11633f: 74 0b je 11634c 116341: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 116346: 5a pop %edx 116347: 5b pop %ebx 116348: c9 leave 116349: c3 ret 11634a: 66 90 xchg %ax,%ax *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 11634c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 11634f: 59 pop %ecx 116350: 5b pop %ebx 116351: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 116352: e9 49 01 00 00 jmp 1164a0 116357: 90 nop { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 116358: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 11635b: 58 pop %eax 11635c: 5b pop %ebx 11635d: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 11635e: e9 7d 00 00 00 jmp 1163e0 116363: 90 nop rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 116364: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 116369: 5a pop %edx 11636a: 5b pop %ebx 11636b: c9 leave 11636c: c3 ret 11636d: 8d 76 00 lea 0x0(%esi),%esi if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 116370: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 116373: 5b pop %ebx 116374: 5b pop %ebx 116375: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 116376: e9 19 00 00 00 jmp 116394 11637b: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 11637c: e8 53 00 00 00 call 1163d4 116381: 89 03 mov %eax,(%ebx) 116383: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116385: eb bf jmp 116346 116387: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 116388: e8 33 00 00 00 call 1163c0 11638d: 89 03 mov %eax,(%ebx) 11638f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116391: eb b3 jmp 116346 =============================================================================== 0010c628 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10c628: 55 push %ebp 10c629: 89 e5 mov %esp,%ebp 10c62b: 56 push %esi 10c62c: 53 push %ebx 10c62d: 83 ec 50 sub $0x50,%esp 10c630: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c633: 85 db test %ebx,%ebx 10c635: 0f 84 a1 00 00 00 je 10c6dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c63b: 80 3d ec b7 12 00 00 cmpb $0x0,0x12b7ec 10c642: 75 0c jne 10c650 10c644: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10c649: 8d 65 f8 lea -0x8(%ebp),%esp 10c64c: 5b pop %ebx 10c64d: 5e pop %esi 10c64e: c9 leave 10c64f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10c650: 9c pushf 10c651: fa cli 10c652: 5e pop %esi _TOD_Get( &now ); 10c653: 83 ec 0c sub $0xc,%esp 10c656: 8d 45 e8 lea -0x18(%ebp),%eax 10c659: 50 push %eax 10c65a: e8 79 18 00 00 call 10ded8 <_TOD_Get> _ISR_Enable(level); 10c65f: 56 push %esi 10c660: 9d popf useconds = (suseconds_t)now.tv_nsec; 10c661: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10c664: 8b 45 e8 mov -0x18(%ebp),%eax 10c667: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10c66a: be d3 4d 62 10 mov $0x10624dd3,%esi 10c66f: 89 c8 mov %ecx,%eax 10c671: f7 ee imul %esi 10c673: 89 45 b0 mov %eax,-0x50(%ebp) 10c676: 89 55 b4 mov %edx,-0x4c(%ebp) 10c679: 8b 75 b4 mov -0x4c(%ebp),%esi 10c67c: c1 fe 06 sar $0x6,%esi 10c67f: 89 c8 mov %ecx,%eax 10c681: 99 cltd 10c682: 29 d6 sub %edx,%esi 10c684: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10c687: 58 pop %eax 10c688: 5a pop %edx 10c689: 8d 45 c4 lea -0x3c(%ebp),%eax 10c68c: 50 push %eax 10c68d: 8d 45 f0 lea -0x10(%ebp),%eax 10c690: 50 push %eax 10c691: e8 0e 97 00 00 call 115da4 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10c696: 8b 45 d8 mov -0x28(%ebp),%eax 10c699: 05 6c 07 00 00 add $0x76c,%eax 10c69e: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10c6a0: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6a3: 40 inc %eax 10c6a4: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10c6a7: 8b 45 d0 mov -0x30(%ebp),%eax 10c6aa: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10c6ad: 8b 45 cc mov -0x34(%ebp),%eax 10c6b0: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10c6b3: 8b 45 c8 mov -0x38(%ebp),%eax 10c6b6: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10c6b9: 8b 45 c4 mov -0x3c(%ebp),%eax 10c6bc: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10c6bf: 8b 45 f4 mov -0xc(%ebp),%eax 10c6c2: 31 d2 xor %edx,%edx 10c6c4: f7 35 4c 72 12 00 divl 0x12724c 10c6ca: 89 43 18 mov %eax,0x18(%ebx) 10c6cd: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10c6cf: 83 c4 10 add $0x10,%esp } 10c6d2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6d5: 5b pop %ebx 10c6d6: 5e pop %esi 10c6d7: c9 leave 10c6d8: c3 ret 10c6d9: 8d 76 00 lea 0x0(%esi),%esi { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c6dc: b8 09 00 00 00 mov $0x9,%eax 10c6e1: e9 63 ff ff ff jmp 10c649 =============================================================================== 001164a0 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 1164a0: 55 push %ebp 1164a1: 89 e5 mov %esp,%ebp 1164a3: 56 push %esi 1164a4: 53 push %ebx 1164a5: 83 ec 20 sub $0x20,%esp 1164a8: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 1164ab: 85 db test %ebx,%ebx 1164ad: 74 59 je 116508 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 1164af: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 1164b6: 75 0c jne 1164c4 1164b8: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 1164bd: 8d 65 f8 lea -0x8(%ebp),%esp 1164c0: 5b pop %ebx 1164c1: 5e pop %esi 1164c2: c9 leave 1164c3: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 1164c4: 9c pushf 1164c5: fa cli 1164c6: 5e pop %esi _TOD_Get( &now ); 1164c7: 83 ec 0c sub $0xc,%esp 1164ca: 8d 45 f0 lea -0x10(%ebp),%eax 1164cd: 50 push %eax 1164ce: e8 2d 43 00 00 call 11a800 <_TOD_Get> _ISR_Enable(level); 1164d3: 56 push %esi 1164d4: 9d popf useconds = (suseconds_t)now.tv_nsec; 1164d5: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1164d8: 8b 45 f0 mov -0x10(%ebp),%eax 1164db: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 1164dd: be d3 4d 62 10 mov $0x10624dd3,%esi 1164e2: 89 c8 mov %ecx,%eax 1164e4: f7 ee imul %esi 1164e6: 89 45 e0 mov %eax,-0x20(%ebp) 1164e9: 89 55 e4 mov %edx,-0x1c(%ebp) 1164ec: 8b 75 e4 mov -0x1c(%ebp),%esi 1164ef: c1 fe 06 sar $0x6,%esi 1164f2: 89 c8 mov %ecx,%eax 1164f4: 99 cltd 1164f5: 29 d6 sub %edx,%esi 1164f7: 89 73 04 mov %esi,0x4(%ebx) 1164fa: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 1164fc: 83 c4 10 add $0x10,%esp } 1164ff: 8d 65 f8 lea -0x8(%ebp),%esp 116502: 5b pop %ebx 116503: 5e pop %esi 116504: c9 leave 116505: c3 ret 116506: 66 90 xchg %ax,%ax rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 116508: b8 09 00 00 00 mov $0x9,%eax 11650d: eb ae jmp 1164bd =============================================================================== 0010b7c4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b7c4: 55 push %ebp 10b7c5: 89 e5 mov %esp,%ebp 10b7c7: 83 ec 08 sub $0x8,%esp 10b7ca: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b7cd: 85 c0 test %eax,%eax 10b7cf: 74 13 je 10b7e4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b7d1: 83 ec 0c sub $0xc,%esp 10b7d4: 50 push %eax 10b7d5: e8 9e 15 00 00 call 10cd78 <_TOD_Get_uptime_as_timespec> 10b7da: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7dc: 83 c4 10 add $0x10,%esp } 10b7df: c9 leave 10b7e0: c3 ret 10b7e1: 8d 76 00 lea 0x0(%esi),%esi */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 10b7e4: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b7e6: c9 leave 10b7e7: c3 ret =============================================================================== 0010c700 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c700: 55 push %ebp 10c701: 89 e5 mov %esp,%ebp 10c703: 53 push %ebx 10c704: 83 ec 14 sub $0x14,%esp 10c707: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c70a: 85 db test %ebx,%ebx 10c70c: 74 66 je 10c774 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c70e: 83 ec 0c sub $0xc,%esp 10c711: 53 push %ebx 10c712: e8 39 01 00 00 call 10c850 <_TOD_Validate> 10c717: 83 c4 10 add $0x10,%esp 10c71a: 84 c0 test %al,%al 10c71c: 75 0a jne 10c728 10c71e: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c723: 8b 5d fc mov -0x4(%ebp),%ebx 10c726: c9 leave 10c727: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c728: 83 ec 0c sub $0xc,%esp 10c72b: 53 push %ebx 10c72c: e8 93 00 00 00 call 10c7c4 <_TOD_To_seconds> 10c731: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c734: 8b 43 18 mov 0x18(%ebx),%eax 10c737: 0f af 05 4c 72 12 00 imul 0x12724c,%eax 10c73e: 8d 04 80 lea (%eax,%eax,4),%eax 10c741: 8d 04 80 lea (%eax,%eax,4),%eax 10c744: 8d 04 80 lea (%eax,%eax,4),%eax 10c747: c1 e0 03 shl $0x3,%eax 10c74a: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c74d: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10c752: 40 inc %eax 10c753: a3 d8 b7 12 00 mov %eax,0x12b7d8 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c758: 8d 45 f0 lea -0x10(%ebp),%eax 10c75b: 89 04 24 mov %eax,(%esp) 10c75e: e8 59 18 00 00 call 10dfbc <_TOD_Set> _Thread_Enable_dispatch(); 10c763: e8 1c 2b 00 00 call 10f284 <_Thread_Enable_dispatch> 10c768: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c76a: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c76d: 8b 5d fc mov -0x4(%ebp),%ebx 10c770: c9 leave 10c771: c3 ret 10c772: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c774: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c779: 8b 5d fc mov -0x4(%ebp),%ebx 10c77c: c9 leave 10c77d: c3 ret =============================================================================== 0010b5d0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b5d0: 55 push %ebp 10b5d1: 89 e5 mov %esp,%ebp 10b5d3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b5d6: e8 65 14 00 00 call 10ca40 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b5db: 83 ec 0c sub $0xc,%esp 10b5de: 68 38 74 12 00 push $0x127438 10b5e3: e8 2c 36 00 00 call 10ec14 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b5e8: e8 d3 30 00 00 call 10e6c0 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b5ed: a0 28 74 12 00 mov 0x127428,%al if ( _Thread_Is_context_switch_necessary() && 10b5f2: 83 c4 10 add $0x10,%esp 10b5f5: 84 c0 test %al,%al 10b5f7: 74 09 je 10b602 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b5f9: a1 58 73 12 00 mov 0x127358,%eax 10b5fe: 85 c0 test %eax,%eax 10b600: 74 06 je 10b608 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b602: 31 c0 xor %eax,%eax 10b604: c9 leave 10b605: c3 ret 10b606: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b608: e8 07 24 00 00 call 10da14 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b60d: 31 c0 xor %eax,%eax 10b60f: c9 leave 10b610: c3 ret =============================================================================== 001087cc : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1087cc: 55 push %ebp 1087cd: 89 e5 mov %esp,%ebp 1087cf: 57 push %edi 1087d0: 56 push %esi 1087d1: 53 push %ebx 1087d2: 83 ec 6c sub $0x6c,%esp 1087d5: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1087d8: 8b 45 0c mov 0xc(%ebp),%eax 1087db: 85 c0 test %eax,%eax 1087dd: 0f 84 5f 01 00 00 je 108942 <== 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 ); 1087e3: 83 ec 0c sub $0xc,%esp 1087e6: 8d 45 d8 lea -0x28(%ebp),%eax 1087e9: 50 push %eax 1087ea: e8 41 57 00 00 call 10df30 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1087ef: 83 c4 0c add $0xc,%esp 1087f2: 8d 55 d0 lea -0x30(%ebp),%edx 1087f5: 52 push %edx 1087f6: 8d 4d d8 lea -0x28(%ebp),%ecx 1087f9: 51 push %ecx 1087fa: 68 cc ba 12 00 push $0x12bacc 1087ff: e8 20 79 00 00 call 110124 <_Timespec_Subtract> } } } #endif (*print)( 108804: 5b pop %ebx 108805: 5e pop %esi 108806: 68 94 39 12 00 push $0x123994 10880b: 57 push %edi 10880c: ff 55 0c call *0xc(%ebp) 10880f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 108816: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 108819: 8b 5d a4 mov -0x5c(%ebp),%ebx 10881c: 8b 04 9d ac b7 12 00 mov 0x12b7ac(,%ebx,4),%eax 108823: 85 c0 test %eax,%eax 108825: 0f 84 ed 00 00 00 je 108918 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10882b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10882e: 85 f6 test %esi,%esi 108830: 0f 84 e2 00 00 00 je 108918 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108836: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10883b: 0f 84 d7 00 00 00 je 108918 <== NEVER TAKEN 108841: bb 01 00 00 00 mov $0x1,%ebx if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108846: 89 5d 94 mov %ebx,-0x6c(%ebp) 108849: eb 4b jmp 108896 10884b: 90 nop }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 10884c: 8d 5d e0 lea -0x20(%ebp),%ebx 10884f: 53 push %ebx 108850: 8d 45 e4 lea -0x1c(%ebp),%eax 108853: 50 push %eax 108854: 8d 55 d0 lea -0x30(%ebp),%edx 108857: 52 push %edx 108858: 8d 4d c8 lea -0x38(%ebp),%ecx 10885b: 51 push %ecx 10885c: e8 ef 77 00 00 call 110050 <_Timespec_Divide> /* * Print the information */ (*print)( context, 108861: 58 pop %eax 108862: 5a pop %edx 108863: ff 75 e0 pushl -0x20(%ebp) 108866: ff 75 e4 pushl -0x1c(%ebp) 108869: ba d3 4d 62 10 mov $0x10624dd3,%edx 10886e: 8b 45 cc mov -0x34(%ebp),%eax 108871: f7 e2 mul %edx 108873: c1 ea 06 shr $0x6,%edx 108876: 52 push %edx 108877: ff 75 c8 pushl -0x38(%ebp) 10887a: 68 07 3c 12 00 push $0x123c07 10887f: 57 push %edi 108880: ff 55 0c call *0xc(%ebp) 108883: 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++ ) { 108886: ff 45 94 incl -0x6c(%ebp) 108889: 0f b7 46 10 movzwl 0x10(%esi),%eax 10888d: 3b 45 94 cmp -0x6c(%ebp),%eax 108890: 0f 82 82 00 00 00 jb 108918 the_thread = (Thread_Control *)information->local_table[ i ]; 108896: 8b 46 1c mov 0x1c(%esi),%eax 108899: 8b 4d 94 mov -0x6c(%ebp),%ecx 10889c: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 10889f: 85 d2 test %edx,%edx 1088a1: 74 e3 je 108886 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1088a3: 51 push %ecx 1088a4: 8d 5d b3 lea -0x4d(%ebp),%ebx 1088a7: 53 push %ebx 1088a8: 6a 0d push $0xd 1088aa: ff 72 08 pushl 0x8(%edx) 1088ad: 89 55 a0 mov %edx,-0x60(%ebp) 1088b0: e8 2b 44 00 00 call 10cce0 (*print)( 1088b5: 53 push %ebx 1088b6: 8b 55 a0 mov -0x60(%ebp),%edx 1088b9: ff 72 08 pushl 0x8(%edx) 1088bc: 68 f4 3b 12 00 push $0x123bf4 1088c1: 57 push %edi 1088c2: 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; 1088c5: 8b 55 a0 mov -0x60(%ebp),%edx 1088c8: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1088ce: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1088d4: 89 4d c8 mov %ecx,-0x38(%ebp) 1088d7: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1088da: 83 c4 20 add $0x20,%esp 1088dd: a1 98 b8 12 00 mov 0x12b898,%eax 1088e2: 8b 40 08 mov 0x8(%eax),%eax 1088e5: 3b 42 08 cmp 0x8(%edx),%eax 1088e8: 0f 85 5e ff ff ff jne 10884c Timestamp_Control used; _Timestamp_Subtract( 1088ee: 52 push %edx 1088ef: 8d 5d c0 lea -0x40(%ebp),%ebx 1088f2: 53 push %ebx 1088f3: 8d 45 d8 lea -0x28(%ebp),%eax 1088f6: 50 push %eax 1088f7: 68 a0 b8 12 00 push $0x12b8a0 1088fc: e8 23 78 00 00 call 110124 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108901: 59 pop %ecx 108902: 58 pop %eax 108903: 53 push %ebx 108904: 8d 4d c8 lea -0x38(%ebp),%ecx 108907: 51 push %ecx 108908: e8 07 77 00 00 call 110014 <_Timespec_Add_to> 10890d: 83 c4 10 add $0x10,%esp 108910: e9 37 ff ff ff jmp 10884c 108915: 8d 76 00 lea 0x0(%esi),%esi "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108918: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10891b: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 10891f: 0f 85 f4 fe ff ff jne 108819 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108925: ba d3 4d 62 10 mov $0x10624dd3,%edx 10892a: 8b 45 d4 mov -0x2c(%ebp),%eax 10892d: f7 e2 mul %edx 10892f: c1 ea 06 shr $0x6,%edx 108932: 52 push %edx 108933: ff 75 d0 pushl -0x30(%ebp) 108936: 68 08 3b 12 00 push $0x123b08 10893b: 57 push %edi 10893c: ff 55 0c call *0xc(%ebp) 10893f: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 108942: 8d 65 f4 lea -0xc(%ebp),%esp 108945: 5b pop %ebx 108946: 5e pop %esi 108947: 5f pop %edi 108948: c9 leave 108949: c3 ret =============================================================================== 00113d5c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 113d5c: 55 push %ebp <== NOT EXECUTED 113d5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113d5f: 53 push %ebx <== NOT EXECUTED 113d60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 113d63: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 113d66: 68 a0 20 12 00 push $0x1220a0 <== NOT EXECUTED 113d6b: e8 1c 00 00 00 call 113d8c <== NOT EXECUTED 113d70: 89 c3 mov %eax,%ebx <== NOT EXECUTED 113d72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113d75: 85 c0 test %eax,%eax <== NOT EXECUTED 113d77: 74 07 je 113d80 <== NOT EXECUTED { errno = rc; 113d79: e8 9e 00 00 00 call 113e1c <__errno> <== NOT EXECUTED 113d7e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 113d80: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113d85: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113d88: c9 leave <== NOT EXECUTED 113d89: c3 ret <== NOT EXECUTED =============================================================================== 0010cde4 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10cde4: 55 push %ebp <== NOT EXECUTED 10cde5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cde7: 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( 10cdea: 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); 10cded: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10cdf0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10cdf3: e8 34 fe ff ff call 10cc2c <== NOT EXECUTED va_end(arglist); return chars_written; } 10cdf8: c9 leave <== NOT EXECUTED 10cdf9: c3 ret <== NOT EXECUTED =============================================================================== 0010b798 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 53 push %ebx 10b79c: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b79f: 8d 45 f4 lea -0xc(%ebp),%eax 10b7a2: 50 push %eax 10b7a3: ff 75 08 pushl 0x8(%ebp) 10b7a6: e8 e9 23 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10b7ab: 83 c4 10 add $0x10,%esp 10b7ae: 8b 55 f4 mov -0xc(%ebp),%edx 10b7b1: 85 d2 test %edx,%edx 10b7b3: 75 2b jne 10b7e0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b7b5: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b7bb: 9c pushf 10b7bc: fa cli 10b7bd: 59 pop %ecx *the_event_set |= the_new_events; 10b7be: 8b 5d 0c mov 0xc(%ebp),%ebx 10b7c1: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b7c3: 51 push %ecx 10b7c4: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b7c5: 83 ec 0c sub $0xc,%esp 10b7c8: 50 push %eax 10b7c9: e8 1e 00 00 00 call 10b7ec <_Event_Surrender> _Thread_Enable_dispatch(); 10b7ce: e8 9d 23 00 00 call 10db70 <_Thread_Enable_dispatch> 10b7d3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7d5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b7db: c9 leave 10b7dc: c3 ret 10b7dd: 8d 76 00 lea 0x0(%esi),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b7e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e5: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e8: c9 leave 10b7e9: c3 ret =============================================================================== 0010d738 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d738: 55 push %ebp 10d739: 89 e5 mov %esp,%ebp 10d73b: 57 push %edi 10d73c: 56 push %esi 10d73d: 53 push %ebx 10d73e: 83 ec 1c sub $0x1c,%esp 10d741: 8b 75 0c mov 0xc(%ebp),%esi 10d744: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d747: 85 db test %ebx,%ebx 10d749: 0f 84 85 00 00 00 je 10d7d4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d74f: 8b 45 08 mov 0x8(%ebp),%eax 10d752: 85 c0 test %eax,%eax 10d754: 75 0e jne 10d764 10d756: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d75b: 8d 65 f4 lea -0xc(%ebp),%esp 10d75e: 5b pop %ebx 10d75f: 5e pop %esi 10d760: 5f pop %edi 10d761: c9 leave 10d762: c3 ret 10d763: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d764: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10d769: 40 inc %eax 10d76a: a3 d8 b7 12 00 mov %eax,0x12b7d8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d76f: 83 ec 0c sub $0xc,%esp 10d772: 68 60 ba 12 00 push $0x12ba60 10d777: e8 4c 0d 00 00 call 10e4c8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d77c: 83 c4 10 add $0x10,%esp 10d77f: 85 c0 test %eax,%eax 10d781: 74 45 je 10d7c8 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d783: 8d 78 24 lea 0x24(%eax),%edi 10d786: b9 08 00 00 00 mov $0x8,%ecx 10d78b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d78d: 83 ec 0c sub $0xc,%esp 10d790: 8d 50 10 lea 0x10(%eax),%edx 10d793: 52 push %edx 10d794: 89 45 e4 mov %eax,-0x1c(%ebp) 10d797: e8 c4 29 00 00 call 110160 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d79c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d79f: 8b 50 08 mov 0x8(%eax),%edx 10d7a2: 0f b7 f2 movzwl %dx,%esi 10d7a5: 8b 0d 7c ba 12 00 mov 0x12ba7c,%ecx 10d7ab: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d7ae: 8b 4d 08 mov 0x8(%ebp),%ecx 10d7b1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d7b4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d7b6: e8 c9 1a 00 00 call 10f284 <_Thread_Enable_dispatch> 10d7bb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d7bd: 83 c4 10 add $0x10,%esp } 10d7c0: 8d 65 f4 lea -0xc(%ebp),%esp 10d7c3: 5b pop %ebx 10d7c4: 5e pop %esi 10d7c5: 5f pop %edi 10d7c6: c9 leave 10d7c7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d7c8: e8 b7 1a 00 00 call 10f284 <_Thread_Enable_dispatch> 10d7cd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10d7d2: eb 87 jmp 10d75b rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 10d7d4: b8 09 00 00 00 mov $0x9,%eax 10d7d9: eb 80 jmp 10d75b =============================================================================== 0010d5bc : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d5bc: 55 push %ebp 10d5bd: 89 e5 mov %esp,%ebp 10d5bf: 53 push %ebx 10d5c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 10d5c3: 8d 45 f4 lea -0xc(%ebp),%eax 10d5c6: 50 push %eax 10d5c7: ff 75 08 pushl 0x8(%ebp) 10d5ca: 68 40 aa 12 00 push $0x12aa40 10d5cf: e8 2c 11 00 00 call 10e700 <_Objects_Get> 10d5d4: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d5d6: 83 c4 10 add $0x10,%esp 10d5d9: 8b 55 f4 mov -0xc(%ebp),%edx 10d5dc: 85 d2 test %edx,%edx 10d5de: 75 38 jne 10d618 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d5e0: 83 ec 0c sub $0xc,%esp 10d5e3: 8d 40 10 lea 0x10(%eax),%eax 10d5e6: 50 push %eax 10d5e7: e8 64 28 00 00 call 10fe50 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d5ec: 59 pop %ecx 10d5ed: 58 pop %eax 10d5ee: 53 push %ebx 10d5ef: 68 40 aa 12 00 push $0x12aa40 10d5f4: e8 d3 0c 00 00 call 10e2cc <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d5f9: 58 pop %eax 10d5fa: 5a pop %edx 10d5fb: 53 push %ebx 10d5fc: 68 40 aa 12 00 push $0x12aa40 10d601: e8 ca 0f 00 00 call 10e5d0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d606: e8 3d 19 00 00 call 10ef48 <_Thread_Enable_dispatch> 10d60b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d60d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d610: 8b 5d fc mov -0x4(%ebp),%ebx 10d613: c9 leave 10d614: c3 ret 10d615: 8d 76 00 lea 0x0(%esi),%esi { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d618: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d61d: 8b 5d fc mov -0x4(%ebp),%ebx 10d620: c9 leave 10d621: c3 ret =============================================================================== 001083f8 : } int rtems_filesystem_dirname( const char *pathname ) { 1083f8: 55 push %ebp 1083f9: 89 e5 mov %esp,%ebp 1083fb: 57 push %edi 1083fc: 56 push %esi 1083fd: 53 push %ebx 1083fe: 83 ec 0c sub $0xc,%esp 108401: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 108404: 31 c0 xor %eax,%eax 108406: b9 ff ff ff ff mov $0xffffffff,%ecx 10840b: 89 d7 mov %edx,%edi 10840d: f2 ae repnz scas %es:(%edi),%al 10840f: f7 d1 not %ecx while ( len ) { 108411: 89 cb mov %ecx,%ebx 108413: 4b dec %ebx 108414: 74 20 je 108436 <== NEVER TAKEN 108416: 8d 34 1a lea (%edx,%ebx,1),%esi 108419: eb 06 jmp 108421 10841b: 90 nop len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 10841c: 4e dec %esi const char *pathname ) { int len = strlen( pathname ); while ( len ) { 10841d: 85 db test %ebx,%ebx 10841f: 74 15 je 108436 len--; 108421: 4b dec %ebx if ( rtems_filesystem_is_separator( pathname[len] ) ) 108422: 83 ec 0c sub $0xc,%esp 108425: 0f be 46 ff movsbl -0x1(%esi),%eax 108429: 50 push %eax 10842a: e8 05 10 00 00 call 109434 10842f: 83 c4 10 add $0x10,%esp 108432: 85 c0 test %eax,%eax 108434: 74 e6 je 10841c break; } return len; } 108436: 89 d8 mov %ebx,%eax 108438: 8d 65 f4 lea -0xc(%ebp),%esp 10843b: 5b pop %ebx 10843c: 5e pop %esi 10843d: 5f pop %edi 10843e: c9 leave 10843f: c3 ret =============================================================================== 00108514 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 108514: 55 push %ebp 108515: 89 e5 mov %esp,%ebp 108517: 56 push %esi 108518: 53 push %ebx 108519: 83 ec 10 sub $0x10,%esp 10851c: 8b 5d 08 mov 0x8(%ebp),%ebx 10851f: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 108522: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 108529: 85 db test %ebx,%ebx 10852b: 74 45 je 108572 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 10852d: 85 f6 test %esi,%esi 10852f: 74 2f je 108560 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 108531: 51 push %ecx 108532: 56 push %esi 108533: 8d 45 f4 lea -0xc(%ebp),%eax 108536: 50 push %eax 108537: 53 push %ebx 108538: e8 93 0e 00 00 call 1093d0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 10853d: 8b 45 f4 mov -0xc(%ebp),%eax 108540: 5a pop %edx 108541: ff 75 18 pushl 0x18(%ebp) 108544: 56 push %esi 108545: ff 75 10 pushl 0x10(%ebp) 108548: 8b 55 0c mov 0xc(%ebp),%edx 10854b: 29 c2 sub %eax,%edx 10854d: 52 push %edx 10854e: 01 c3 add %eax,%ebx 108550: 53 push %ebx 108551: e8 ea fe ff ff call 108440 108556: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 108559: 8d 65 f8 lea -0x8(%ebp),%esp 10855c: 5b pop %ebx 10855d: 5e pop %esi 10855e: c9 leave 10855f: c3 ret if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 108560: e8 b7 b8 00 00 call 113e1c <__errno> <== NOT EXECUTED 108565: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10856b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108570: eb e7 jmp 108559 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 108572: e8 a5 b8 00 00 call 113e1c <__errno> <== NOT EXECUTED 108577: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10857d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108582: eb d5 jmp 108559 <== NOT EXECUTED =============================================================================== 00108440 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 108440: 55 push %ebp 108441: 89 e5 mov %esp,%ebp 108443: 57 push %edi 108444: 56 push %esi 108445: 53 push %ebx 108446: 83 ec 1c sub $0x1c,%esp 108449: 8b 45 08 mov 0x8(%ebp),%eax 10844c: 8b 4d 0c mov 0xc(%ebp),%ecx 10844f: 8b 7d 10 mov 0x10(%ebp),%edi 108452: 8b 5d 14 mov 0x14(%ebp),%ebx 108455: 8b 55 18 mov 0x18(%ebp),%edx 108458: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 10845b: 85 c0 test %eax,%eax 10845d: 0f 84 8c 00 00 00 je 1084ef <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 108463: 85 db test %ebx,%ebx 108465: 0f 84 96 00 00 00 je 108501 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 10846b: 8b 53 0c mov 0xc(%ebx),%edx 10846e: 8b 12 mov (%edx),%edx 108470: 85 d2 test %edx,%edx 108472: 74 69 je 1084dd <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 108474: 53 push %ebx 108475: 57 push %edi 108476: 51 push %ecx 108477: 50 push %eax 108478: ff d2 call *%edx 10847a: 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 ) { 10847c: 83 c4 10 add $0x10,%esp 10847f: 85 c0 test %eax,%eax 108481: 75 25 jne 1084a8 108483: 8b 45 e4 mov -0x1c(%ebp),%eax 108486: 85 c0 test %eax,%eax 108488: 74 1e je 1084a8 if ( !pathloc->ops->node_type_h ){ 10848a: 8b 53 0c mov 0xc(%ebx),%edx 10848d: 8b 42 10 mov 0x10(%edx),%eax 108490: 85 c0 test %eax,%eax 108492: 74 39 je 1084cd <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 108494: 83 ec 0c sub $0xc,%esp 108497: 53 push %ebx 108498: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 10849a: 83 e8 03 sub $0x3,%eax 10849d: 83 c4 10 add $0x10,%esp 1084a0: 83 f8 01 cmp $0x1,%eax 1084a3: 76 0f jbe 1084b4 1084a5: 8d 76 00 lea 0x0(%esi),%esi result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 1084a8: 89 f0 mov %esi,%eax 1084aa: 8d 65 f4 lea -0xc(%ebp),%esp 1084ad: 5b pop %ebx 1084ae: 5e pop %esi 1084af: 5f pop %edi 1084b0: c9 leave 1084b1: c3 ret 1084b2: 66 90 xchg %ax,%ax type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1084b4: 8b 53 0c mov 0xc(%ebx),%edx 1084b7: 8b 42 34 mov 0x34(%edx),%eax 1084ba: 85 c0 test %eax,%eax 1084bc: 74 0f je 1084cd <== NEVER TAKEN * 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 ); 1084be: 89 7d 0c mov %edi,0xc(%ebp) 1084c1: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 1084c4: 8d 65 f4 lea -0xc(%ebp),%esp 1084c7: 5b pop %ebx 1084c8: 5e pop %esi 1084c9: 5f pop %edi 1084ca: 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 ); 1084cb: ff e0 jmp *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 1084cd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1084d0: 85 c0 test %eax,%eax <== NOT EXECUTED 1084d2: 74 09 je 1084dd <== NOT EXECUTED 1084d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1084d7: 53 push %ebx <== NOT EXECUTED 1084d8: ff d0 call *%eax <== NOT EXECUTED 1084da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1084dd: e8 3a b9 00 00 call 113e1c <__errno> <== NOT EXECUTED 1084e2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1084e8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1084ed: eb b9 jmp 1084a8 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 1084ef: e8 28 b9 00 00 call 113e1c <__errno> <== NOT EXECUTED 1084f4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1084fa: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1084ff: eb a7 jmp 1084a8 <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 108501: e8 16 b9 00 00 call 113e1c <__errno> <== NOT EXECUTED 108506: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10850c: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108511: eb 95 jmp 1084a8 <== NOT EXECUTED =============================================================================== 00110e38 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 110e38: 55 push %ebp 110e39: 89 e5 mov %esp,%ebp 110e3b: 83 ec 18 sub $0x18,%esp 110e3e: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { .type = type, .mount_h = NULL }; 110e41: 89 45 f0 mov %eax,-0x10(%ebp) 110e44: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if ( type != NULL ) { 110e4b: 85 c0 test %eax,%eax 110e4d: 74 17 je 110e66 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 110e4f: 83 ec 08 sub $0x8,%esp 110e52: 8d 45 f0 lea -0x10(%ebp),%eax 110e55: 50 push %eax 110e56: 68 a4 0c 11 00 push $0x110ca4 110e5b: e8 34 ff ff ff call 110d94 110e60: 8b 45 f4 mov -0xc(%ebp),%eax 110e63: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 110e66: c9 leave 110e67: c3 ret =============================================================================== 00110f3c : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 110f3c: 55 push %ebp 110f3d: 89 e5 mov %esp,%ebp 110f3f: 57 push %edi 110f40: 56 push %esi 110f41: 53 push %ebx 110f42: 83 ec 18 sub $0x18,%esp 110f45: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 110f48: 8b 45 08 mov 0x8(%ebp),%eax 110f4b: 0f be 00 movsbl (%eax),%eax 110f4e: 50 push %eax 110f4f: e8 e0 84 ff ff call 109434 110f54: 83 c4 10 add $0x10,%esp 110f57: 85 c0 test %eax,%eax 110f59: 75 11 jne 110f6c *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 110f5b: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 110f61: 8d 65 f4 lea -0xc(%ebp),%esp 110f64: 5b pop %ebx 110f65: 5e pop %esi 110f66: 5f pop %edi 110f67: c9 leave 110f68: c3 ret 110f69: 8d 76 00 lea 0x0(%esi),%esi void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { if (rtems_filesystem_is_separator(path[0])) { *loc = rtems_filesystem_root; 110f6c: 8b 35 24 50 12 00 mov 0x125024,%esi 110f72: 83 c6 18 add $0x18,%esi 110f75: b9 05 00 00 00 mov $0x5,%ecx 110f7a: 8b 7d 10 mov 0x10(%ebp),%edi 110f7d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 110f7f: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 110f85: 8d 65 f4 lea -0xc(%ebp),%esp 110f88: 5b pop %ebx 110f89: 5e pop %esi 110f8a: 5f pop %edi 110f8b: c9 leave 110f8c: c3 ret =============================================================================== 00108284 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 108284: 55 push %ebp 108285: 89 e5 mov %esp,%ebp 108287: 57 push %edi 108288: 56 push %esi 108289: 53 push %ebx 10828a: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 10828d: a1 24 50 12 00 mov 0x125024,%eax 108292: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 108299: a1 40 fd 11 00 mov 0x11fd40,%eax 10829e: 85 c0 test %eax,%eax 1082a0: 0f 84 9f 00 00 00 je 108345 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1082a6: a1 54 31 12 00 mov 0x123154,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1082ab: 83 ec 0c sub $0xc,%esp 1082ae: 6a 00 push $0x0 1082b0: ff 70 04 pushl 0x4(%eax) 1082b3: ff 30 pushl (%eax) 1082b5: ff 70 0c pushl 0xc(%eax) 1082b8: ff 70 08 pushl 0x8(%eax) 1082bb: e8 d4 07 00 00 call 108a94 if ( status == -1 ) 1082c0: 83 c4 20 add $0x20,%esp 1082c3: 40 inc %eax 1082c4: 0f 84 95 00 00 00 je 10835f <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1082ca: a1 24 50 12 00 mov 0x125024,%eax 1082cf: 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); 1082d5: 83 ec 0c sub $0xc,%esp 1082d8: 6a 00 push $0x0 1082da: 8d 5d d4 lea -0x2c(%ebp),%ebx 1082dd: 53 push %ebx 1082de: 6a 00 push $0x0 1082e0: 6a 01 push $0x1 1082e2: 68 c7 16 12 00 push $0x1216c7 1082e7: e8 28 02 00 00 call 108514 rtems_filesystem_root = loc; 1082ec: 8b 3d 24 50 12 00 mov 0x125024,%edi 1082f2: 83 c7 18 add $0x18,%edi 1082f5: b9 05 00 00 00 mov $0x5,%ecx 1082fa: 89 de mov %ebx,%esi 1082fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1082fe: 83 c4 14 add $0x14,%esp 108301: 6a 00 push $0x0 108303: 53 push %ebx 108304: 6a 00 push $0x0 108306: 6a 01 push $0x1 108308: 68 c7 16 12 00 push $0x1216c7 10830d: e8 02 02 00 00 call 108514 rtems_filesystem_current = loc; 108312: 8b 3d 24 50 12 00 mov 0x125024,%edi 108318: 83 c7 04 add $0x4,%edi 10831b: b9 05 00 00 00 mov $0x5,%ecx 108320: 89 de mov %ebx,%esi 108322: 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); 108324: 83 c4 18 add $0x18,%esp 108327: 68 ff 01 00 00 push $0x1ff 10832c: 68 c9 16 12 00 push $0x1216c9 108331: e8 e6 05 00 00 call 10891c if ( status != 0 ) 108336: 83 c4 10 add $0x10,%esp 108339: 85 c0 test %eax,%eax 10833b: 75 15 jne 108352 <== NEVER TAKEN * 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. */ } 10833d: 8d 65 f4 lea -0xc(%ebp),%esp 108340: 5b pop %ebx 108341: 5e pop %esi 108342: 5f pop %edi 108343: c9 leave 108344: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 108345: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108348: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 10834d: e8 8e 3f 00 00 call 10c2e0 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 108352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108355: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 10835a: e8 81 3f 00 00 call 10c2e0 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 10835f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108362: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 108367: e8 74 3f 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 00110d94 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 110d94: 55 push %ebp 110d95: 89 e5 mov %esp,%ebp 110d97: 57 push %edi 110d98: 56 push %esi 110d99: 53 push %ebx 110d9a: 83 ec 1c sub $0x1c,%esp 110d9d: 8b 75 08 mov 0x8(%ebp),%esi 110da0: 8b 7d 0c mov 0xc(%ebp),%edi const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 110da3: 8b 15 20 fd 11 00 mov 0x11fd20,%edx 110da9: 85 d2 test %edx,%edx 110dab: 74 24 je 110dd1 <== NEVER TAKEN 110dad: bb 20 fd 11 00 mov $0x11fd20,%ebx 110db2: eb 04 jmp 110db8 110db4: 84 d2 test %dl,%dl <== NOT EXECUTED 110db6: 75 70 jne 110e28 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); 110db8: 83 ec 08 sub $0x8,%esp 110dbb: 57 push %edi 110dbc: 53 push %ebx 110dbd: ff d6 call *%esi 110dbf: 88 c2 mov %al,%dl ++table_entry; 110dc1: 83 c3 08 add $0x8,%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 ) { 110dc4: 83 c4 10 add $0x10,%esp 110dc7: 8b 03 mov (%ebx),%eax 110dc9: 85 c0 test %eax,%eax 110dcb: 75 e7 jne 110db4 <== NEVER TAKEN stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 110dcd: 84 d2 test %dl,%dl 110dcf: 75 57 jne 110e28 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 ); 110dd1: 51 push %ecx 110dd2: 6a 00 push $0x0 110dd4: 6a 00 push $0x0 110dd6: ff 35 e8 71 12 00 pushl 0x1271e8 110ddc: e8 c7 ae ff ff call 10bca8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 110de1: 8b 1d 4c 50 12 00 mov 0x12504c,%ebx rtems_libio_lock(); for ( 110de7: 83 c4 10 add $0x10,%esp 110dea: 81 fb 50 50 12 00 cmp $0x125050,%ebx 110df0: 75 06 jne 110df8 110df2: eb 3e jmp 110e32 110df4: 84 c0 test %al,%al 110df6: 75 19 jne 110e11 !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 ); 110df8: 83 ec 08 sub $0x8,%esp 110dfb: 57 push %edi 110dfc: 8d 43 08 lea 0x8(%ebx),%eax 110dff: 50 push %eax 110e00: ff d6 call *%esi 110e02: 88 c2 mov %al,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 110e04: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 110e06: 83 c4 10 add $0x10,%esp 110e09: 81 fb 50 50 12 00 cmp $0x125050,%ebx 110e0f: 75 e3 jne 110df4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110e11: 83 ec 0c sub $0xc,%esp 110e14: ff 35 e8 71 12 00 pushl 0x1271e8 110e1a: 88 55 e4 mov %dl,-0x1c(%ebp) 110e1d: e8 82 af ff ff call 10bda4 110e22: 83 c4 10 add $0x10,%esp 110e25: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 110e28: 88 d0 mov %dl,%al 110e2a: 8d 65 f4 lea -0xc(%ebp),%esp 110e2d: 5b pop %ebx 110e2e: 5e pop %esi 110e2f: 5f pop %edi 110e30: c9 leave 110e31: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 110e32: 31 d2 xor %edx,%edx 110e34: eb db jmp 110e11 =============================================================================== 00108a24 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 108a24: 55 push %ebp 108a25: 89 e5 mov %esp,%ebp 108a27: 57 push %edi 108a28: 56 push %esi 108a29: 53 push %ebx 108a2a: 83 ec 20 sub $0x20,%esp 108a2d: 8b 7d 08 mov 0x8(%ebp),%edi 108a30: 8b 75 0c mov 0xc(%ebp),%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 ); 108a33: 6a 00 push $0x0 108a35: 6a 00 push $0x0 108a37: ff 35 e8 71 12 00 pushl 0x1271e8 108a3d: e8 66 32 00 00 call 10bca8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 108a42: 8b 1d 04 50 12 00 mov 0x125004,%ebx rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a48: 83 c4 10 add $0x10,%esp 108a4b: 81 fb 08 50 12 00 cmp $0x125008,%ebx 108a51: 75 09 jne 108a5c <== ALWAYS TAKEN 108a53: eb 3b jmp 108a90 <== NOT EXECUTED 108a55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 108a58: 84 c0 test %al,%al 108a5a: 75 16 jne 108a72 <== NEVER TAKEN 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 ); 108a5c: 83 ec 08 sub $0x8,%esp 108a5f: 56 push %esi 108a60: 53 push %ebx 108a61: ff d7 call *%edi 108a63: 88 c2 mov %al,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 108a65: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a67: 83 c4 10 add $0x10,%esp 108a6a: 81 fb 08 50 12 00 cmp $0x125008,%ebx 108a70: 75 e6 jne 108a58 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108a72: 83 ec 0c sub $0xc,%esp 108a75: ff 35 e8 71 12 00 pushl 0x1271e8 108a7b: 88 55 e4 mov %dl,-0x1c(%ebp) 108a7e: e8 21 33 00 00 call 10bda4 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108a83: 8a 55 e4 mov -0x1c(%ebp),%dl 108a86: 88 d0 mov %dl,%al 108a88: 8d 65 f4 lea -0xc(%ebp),%esp 108a8b: 5b pop %ebx 108a8c: 5e pop %esi 108a8d: 5f pop %edi 108a8e: c9 leave 108a8f: c3 ret { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a90: 31 d2 xor %edx,%edx <== NOT EXECUTED 108a92: eb de jmp 108a72 <== NOT EXECUTED =============================================================================== 001083a8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 1083a8: 55 push %ebp 1083a9: 89 e5 mov %esp,%ebp 1083ab: 57 push %edi 1083ac: 56 push %esi 1083ad: 53 push %ebx 1083ae: 83 ec 0c sub $0xc,%esp 1083b1: 8b 75 08 mov 0x8(%ebp),%esi 1083b4: 8b 7d 0c mov 0xc(%ebp),%edi /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1083b7: 8a 06 mov (%esi),%al 1083b9: 84 c0 test %al,%al 1083bb: 74 34 je 1083f1 <== NEVER TAKEN 1083bd: 85 ff test %edi,%edi 1083bf: 74 30 je 1083f1 <== NEVER TAKEN 1083c1: 31 db xor %ebx,%ebx 1083c3: eb 0f jmp 1083d4 1083c5: 8d 76 00 lea 0x0(%esi),%esi { pathname++; pathnamelen--; stripped++; 1083c8: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1083c9: 8a 04 1e mov (%esi,%ebx,1),%al 1083cc: 84 c0 test %al,%al 1083ce: 74 17 je 1083e7 <== NEVER TAKEN 1083d0: 39 df cmp %ebx,%edi 1083d2: 74 13 je 1083e7 <== NEVER TAKEN 1083d4: 83 ec 0c sub $0xc,%esp 1083d7: 0f be c0 movsbl %al,%eax 1083da: 50 push %eax 1083db: e8 54 10 00 00 call 109434 1083e0: 83 c4 10 add $0x10,%esp 1083e3: 85 c0 test %eax,%eax 1083e5: 75 e1 jne 1083c8 pathname++; pathnamelen--; stripped++; } return stripped; } 1083e7: 89 d8 mov %ebx,%eax 1083e9: 8d 65 f4 lea -0xc(%ebp),%esp 1083ec: 5b pop %ebx 1083ed: 5e pop %esi 1083ee: 5f pop %edi 1083ef: c9 leave 1083f0: c3 ret { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1083f1: 31 db xor %ebx,%ebx 1083f3: eb f2 jmp 1083e7 <== NOT EXECUTED =============================================================================== 00110e68 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 110e68: 55 push %ebp 110e69: 89 e5 mov %esp,%ebp 110e6b: 57 push %edi 110e6c: 56 push %esi 110e6d: 53 push %ebx 110e6e: 83 ec 18 sub $0x18,%esp 110e71: 8b 5d 08 mov 0x8(%ebp),%ebx size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 110e74: 31 c0 xor %eax,%eax 110e76: b9 ff ff ff ff mov $0xffffffff,%ecx 110e7b: 89 df mov %ebx,%edi 110e7d: f2 ae repnz scas %es:(%edi),%al 110e7f: f7 d1 not %ecx filesystem_node *fsn = malloc( fsn_size ); 110e81: 83 c1 10 add $0x10,%ecx 110e84: 51 push %ecx 110e85: e8 d2 79 ff ff call 10885c 110e8a: 89 c6 mov %eax,%esi char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 110e8c: 83 c4 10 add $0x10,%esp 110e8f: 85 c0 test %eax,%eax 110e91: 0f 84 92 00 00 00 je 110f29 <== NEVER TAKEN 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 ); 110e97: 8d 78 10 lea 0x10(%eax),%edi if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 110e9a: 83 ec 08 sub $0x8,%esp 110e9d: 53 push %ebx 110e9e: 57 push %edi 110e9f: e8 98 3a 00 00 call 11493c fsn->entry.type = type_storage; 110ea4: 89 7e 08 mov %edi,0x8(%esi) fsn->entry.mount_h = mount_h; 110ea7: 8b 45 0c mov 0xc(%ebp),%eax 110eaa: 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 ); 110ead: 83 c4 0c add $0xc,%esp 110eb0: 6a 00 push $0x0 110eb2: 6a 00 push $0x0 110eb4: ff 35 e8 71 12 00 pushl 0x1271e8 110eba: e8 e9 ad ff ff call 10bca8 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 110ebf: 89 1c 24 mov %ebx,(%esp) 110ec2: e8 71 ff ff ff call 110e38 110ec7: 83 c4 10 add $0x10,%esp 110eca: 85 c0 test %eax,%eax 110ecc: 75 2a jne 110ef8 <== 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 ); 110ece: 83 ec 08 sub $0x8,%esp 110ed1: 56 push %esi 110ed2: 68 4c 50 12 00 push $0x12504c 110ed7: e8 98 b6 ff ff call 10c574 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110edc: 59 pop %ecx 110edd: ff 35 e8 71 12 00 pushl 0x1271e8 110ee3: e8 bc ae ff ff call 10bda4 110ee8: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 110eea: 83 c4 10 add $0x10,%esp } 110eed: 8d 65 f4 lea -0xc(%ebp),%esp 110ef0: 5b pop %ebx 110ef1: 5e pop %esi 110ef2: 5f pop %edi 110ef3: c9 leave 110ef4: c3 ret 110ef5: 8d 76 00 lea 0x0(%esi),%esi 110ef8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110efb: ff 35 e8 71 12 00 pushl 0x1271e8 <== NOT EXECUTED 110f01: e8 9e ae ff ff call 10bda4 <== NOT EXECUTED rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 110f06: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 110f09: e8 76 76 ff ff call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 110f0e: e8 09 2f 00 00 call 113e1c <__errno> <== NOT EXECUTED 110f13: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110f19: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110f1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_libio_unlock(); return 0; } 110f21: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 110f24: 5b pop %ebx <== NOT EXECUTED 110f25: 5e pop %esi <== NOT EXECUTED 110f26: 5f pop %edi <== NOT EXECUTED 110f27: c9 leave <== NOT EXECUTED 110f28: c3 ret <== NOT EXECUTED size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 110f29: e8 ee 2e 00 00 call 113e1c <__errno> <== NOT EXECUTED 110f2e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 110f34: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110f39: eb b2 jmp 110eed <== NOT EXECUTED =============================================================================== 00110ce0 : int rtems_filesystem_unregister( const char *type ) { 110ce0: 55 push %ebp <== NOT EXECUTED 110ce1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110ce3: 56 push %esi <== NOT EXECUTED 110ce4: 53 push %ebx <== NOT EXECUTED 110ce5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 110ce8: 85 f6 test %esi,%esi <== NOT EXECUTED 110cea: 0f 84 94 00 00 00 je 110d84 <== 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 ); 110cf0: 52 push %edx <== NOT EXECUTED 110cf1: 6a 00 push $0x0 <== NOT EXECUTED 110cf3: 6a 00 push $0x0 <== NOT EXECUTED 110cf5: ff 35 e8 71 12 00 pushl 0x1271e8 <== NOT EXECUTED 110cfb: e8 a8 af ff ff call 10bca8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 110d00: 8b 1d 4c 50 12 00 mov 0x12504c,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 110d06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d09: 81 fb 50 50 12 00 cmp $0x125050,%ebx <== NOT EXECUTED 110d0f: 75 0d jne 110d1e <== NOT EXECUTED 110d11: eb 49 jmp 110d5c <== NOT EXECUTED 110d13: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 110d14: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED 110d16: 81 fb 50 50 12 00 cmp $0x125050,%ebx <== NOT EXECUTED 110d1c: 74 3e je 110d5c <== 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 ) { 110d1e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110d21: 56 push %esi <== NOT EXECUTED 110d22: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 110d25: e8 ba 3b 00 00 call 1148e4 <== NOT EXECUTED 110d2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d2d: 85 c0 test %eax,%eax <== NOT EXECUTED 110d2f: 75 e3 jne 110d14 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110d31: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d34: 53 push %ebx <== NOT EXECUTED 110d35: e8 5e b8 ff ff call 10c598 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( node ); free( fsn ); 110d3a: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 110d3d: e8 42 78 ff ff call 108584 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110d42: 58 pop %eax <== NOT EXECUTED 110d43: ff 35 e8 71 12 00 pushl 0x1271e8 <== NOT EXECUTED 110d49: e8 56 b0 ff ff call 10bda4 <== NOT EXECUTED 110d4e: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_libio_unlock(); return 0; 110d50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 110d53: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110d56: 5b pop %ebx <== NOT EXECUTED 110d57: 5e pop %esi <== NOT EXECUTED 110d58: c9 leave <== NOT EXECUTED 110d59: c3 ret <== NOT EXECUTED 110d5a: 66 90 xchg %ax,%ax <== NOT EXECUTED 110d5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d5f: ff 35 e8 71 12 00 pushl 0x1271e8 <== NOT EXECUTED 110d65: e8 3a b0 ff ff call 10bda4 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 110d6a: e8 ad 30 00 00 call 113e1c <__errno> <== NOT EXECUTED 110d6f: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED 110d75: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110d7a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110d7d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110d80: 5b pop %ebx <== NOT EXECUTED 110d81: 5e pop %esi <== NOT EXECUTED 110d82: c9 leave <== NOT EXECUTED 110d83: c3 ret <== NOT EXECUTED ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 110d84: e8 93 30 00 00 call 113e1c <__errno> <== NOT EXECUTED 110d89: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110d8f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110d92: eb e9 jmp 110d7d <== NOT EXECUTED =============================================================================== 00113a90 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113a90: 55 push %ebp 113a91: 89 e5 mov %esp,%ebp 113a93: 56 push %esi 113a94: 53 push %ebx 113a95: 8b 45 08 mov 0x8(%ebp),%eax 113a98: 8b 4d 0c mov 0xc(%ebp),%ecx 113a9b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113a9e: 39 05 00 77 12 00 cmp %eax,0x127700 113aa4: 76 22 jbe 113ac8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 113aa6: 8d 34 40 lea (%eax,%eax,2),%esi 113aa9: 8b 15 04 77 12 00 mov 0x127704,%edx 113aaf: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ab3: 85 d2 test %edx,%edx 113ab5: 74 1d je 113ad4 113ab7: 89 5d 10 mov %ebx,0x10(%ebp) 113aba: 89 4d 0c mov %ecx,0xc(%ebp) 113abd: 89 45 08 mov %eax,0x8(%ebp) } 113ac0: 5b pop %ebx 113ac1: 5e pop %esi 113ac2: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ac3: ff e2 jmp *%edx 113ac5: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113ac8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113acd: 5b pop %ebx 113ace: 5e pop %esi 113acf: c9 leave 113ad0: c3 ret 113ad1: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ad4: 31 c0 xor %eax,%eax } 113ad6: 5b pop %ebx 113ad7: 5e pop %esi 113ad8: c9 leave 113ad9: c3 ret =============================================================================== 00113adc : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113adc: 55 push %ebp 113add: 89 e5 mov %esp,%ebp 113adf: 56 push %esi 113ae0: 53 push %ebx 113ae1: 8b 45 08 mov 0x8(%ebp),%eax 113ae4: 8b 4d 0c mov 0xc(%ebp),%ecx 113ae7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113aea: 39 05 00 77 12 00 cmp %eax,0x127700 113af0: 76 22 jbe 113b14 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 113af2: 8d 34 40 lea (%eax,%eax,2),%esi 113af5: 8b 15 04 77 12 00 mov 0x127704,%edx 113afb: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113aff: 85 d2 test %edx,%edx 113b01: 74 1d je 113b20 113b03: 89 5d 10 mov %ebx,0x10(%ebp) 113b06: 89 4d 0c mov %ecx,0xc(%ebp) 113b09: 89 45 08 mov %eax,0x8(%ebp) } 113b0c: 5b pop %ebx 113b0d: 5e pop %esi 113b0e: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b0f: ff e2 jmp *%edx 113b11: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b14: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113b19: 5b pop %ebx 113b1a: 5e pop %esi 113b1b: c9 leave 113b1c: c3 ret 113b1d: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b20: 31 c0 xor %eax,%eax } 113b22: 5b pop %ebx 113b23: 5e pop %esi 113b24: c9 leave 113b25: c3 ret =============================================================================== 001115dc : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1115dc: 55 push %ebp 1115dd: 89 e5 mov %esp,%ebp 1115df: 56 push %esi 1115e0: 53 push %ebx 1115e1: 8b 45 08 mov 0x8(%ebp),%eax 1115e4: 8b 4d 0c mov 0xc(%ebp),%ecx 1115e7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1115ea: 39 05 00 77 12 00 cmp %eax,0x127700 1115f0: 76 1e jbe 111610 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 1115f2: 8d 34 40 lea (%eax,%eax,2),%esi 1115f5: 8b 15 04 77 12 00 mov 0x127704,%edx 1115fb: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1115fe: 85 d2 test %edx,%edx 111600: 74 1a je 11161c 111602: 89 5d 10 mov %ebx,0x10(%ebp) 111605: 89 4d 0c mov %ecx,0xc(%ebp) 111608: 89 45 08 mov %eax,0x8(%ebp) } 11160b: 5b pop %ebx 11160c: 5e pop %esi 11160d: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11160e: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111610: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111615: 5b pop %ebx 111616: 5e pop %esi 111617: c9 leave 111618: c3 ret 111619: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11161c: 31 c0 xor %eax,%eax } 11161e: 5b pop %ebx 11161f: 5e pop %esi 111620: c9 leave 111621: c3 ret =============================================================================== 00108118 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 108118: 55 push %ebp <== NOT EXECUTED 108119: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10811b: 57 push %edi <== NOT EXECUTED 10811c: 56 push %esi <== NOT EXECUTED 10811d: 53 push %ebx <== NOT EXECUTED 10811e: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 108121: 8b 75 08 mov 0x8(%ebp),%esi <== 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 ); 108124: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 108129: 89 f7 mov %esi,%edi <== NOT EXECUTED 10812b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10812d: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10812f: f7 d1 not %ecx <== NOT EXECUTED 108131: 49 dec %ecx <== NOT EXECUTED 108132: 6a 01 push $0x1 <== NOT EXECUTED 108134: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 108137: 53 push %ebx <== NOT EXECUTED 108138: 6a 00 push $0x0 <== NOT EXECUTED 10813a: 51 push %ecx <== NOT EXECUTED 10813b: 56 push %esi <== NOT EXECUTED 10813c: e8 d3 03 00 00 call 108514 <== NOT EXECUTED 108141: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 108143: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 108146: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 108149: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 10814c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10814f: 85 c0 test %eax,%eax <== NOT EXECUTED 108151: 74 41 je 108194 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 108153: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108156: 53 push %ebx <== NOT EXECUTED 108157: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 10815a: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 10815c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10815f: 85 ff test %edi,%edi <== NOT EXECUTED 108161: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 108164: 74 56 je 1081bc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 108166: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108169: 85 c0 test %eax,%eax <== NOT EXECUTED 10816b: 0f 84 93 00 00 00 je 108204 <== NOT EXECUTED 108171: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108174: 85 c0 test %eax,%eax <== NOT EXECUTED 108176: 0f 84 88 00 00 00 je 108204 <== NOT EXECUTED 10817c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10817f: 53 push %ebx <== NOT EXECUTED 108180: ff d0 call *%eax <== NOT EXECUTED 108182: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 108187: 83 c4 10 add $0x10,%esp <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 10818a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10818d: 5b pop %ebx <== NOT EXECUTED 10818e: 5e pop %esi <== NOT EXECUTED 10818f: 5f pop %edi <== NOT EXECUTED 108190: c9 leave <== NOT EXECUTED 108191: c3 ret <== NOT EXECUTED 108192: 66 90 xchg %ax,%ax <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 108194: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 108197: 85 c0 test %eax,%eax <== NOT EXECUTED 108199: 74 09 je 1081a4 <== NOT EXECUTED 10819b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10819e: 53 push %ebx <== NOT EXECUTED 10819f: ff d0 call *%eax <== NOT EXECUTED 1081a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1081a4: e8 73 bc 00 00 call 113e1c <__errno> <== NOT EXECUTED 1081a9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1081af: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 1081b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1081b7: 5b pop %ebx <== NOT EXECUTED 1081b8: 5e pop %esi <== NOT EXECUTED 1081b9: 5f pop %edi <== NOT EXECUTED 1081ba: c9 leave <== NOT EXECUTED 1081bb: c3 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 1081bc: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 1081bf: 75 a5 jne 108166 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1081c1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1081c4: 89 31 mov %esi,(%ecx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 1081c6: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 1081cb: 89 f7 mov %esi,%edi <== NOT EXECUTED 1081cd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1081cf: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1081d1: f7 d1 not %ecx <== NOT EXECUTED 1081d3: 49 dec %ecx <== NOT EXECUTED 1081d4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1081d7: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1081da: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED 1081dd: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1081e0: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 1081e3: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED 1081e6: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1081e9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1081ec: 85 c0 test %eax,%eax <== NOT EXECUTED 1081ee: 74 21 je 108211 <== NOT EXECUTED 1081f0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1081f3: 85 c0 test %eax,%eax <== NOT EXECUTED 1081f5: 74 1a je 108211 <== NOT EXECUTED 1081f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081fa: 53 push %ebx <== NOT EXECUTED 1081fb: ff d0 call *%eax <== NOT EXECUTED 1081fd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1081ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108202: eb 86 jmp 10818a <== NOT EXECUTED 108204: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108209: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10820c: 5b pop %ebx <== NOT EXECUTED 10820d: 5e pop %esi <== NOT EXECUTED 10820e: 5f pop %edi <== NOT EXECUTED 10820f: c9 leave <== NOT EXECUTED 108210: c3 ret <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 108211: 31 c0 xor %eax,%eax <== NOT EXECUTED 108213: e9 72 ff ff ff jmp 10818a <== NOT EXECUTED =============================================================================== 00113b28 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b28: 55 push %ebp 113b29: 89 e5 mov %esp,%ebp 113b2b: 56 push %esi 113b2c: 53 push %ebx 113b2d: 8b 45 08 mov 0x8(%ebp),%eax 113b30: 8b 4d 0c mov 0xc(%ebp),%ecx 113b33: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b36: 39 05 00 77 12 00 cmp %eax,0x127700 113b3c: 76 22 jbe 113b60 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 113b3e: 8d 34 40 lea (%eax,%eax,2),%esi 113b41: 8b 15 04 77 12 00 mov 0x127704,%edx 113b47: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b4b: 85 d2 test %edx,%edx 113b4d: 74 1d je 113b6c 113b4f: 89 5d 10 mov %ebx,0x10(%ebp) 113b52: 89 4d 0c mov %ecx,0xc(%ebp) 113b55: 89 45 08 mov %eax,0x8(%ebp) } 113b58: 5b pop %ebx 113b59: 5e pop %esi 113b5a: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b5b: ff e2 jmp *%edx 113b5d: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b60: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113b65: 5b pop %ebx 113b66: 5e pop %esi 113b67: c9 leave 113b68: c3 ret 113b69: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b6c: 31 c0 xor %eax,%eax } 113b6e: 5b pop %ebx 113b6f: 5e pop %esi 113b70: c9 leave 113b71: c3 ret =============================================================================== 00113b74 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b74: 55 push %ebp 113b75: 89 e5 mov %esp,%ebp 113b77: 56 push %esi 113b78: 53 push %ebx 113b79: 8b 45 08 mov 0x8(%ebp),%eax 113b7c: 8b 4d 0c mov 0xc(%ebp),%ecx 113b7f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b82: 39 05 00 77 12 00 cmp %eax,0x127700 113b88: 76 22 jbe 113bac return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 113b8a: 8d 34 40 lea (%eax,%eax,2),%esi 113b8d: 8b 15 04 77 12 00 mov 0x127704,%edx 113b93: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b97: 85 d2 test %edx,%edx 113b99: 74 1d je 113bb8 113b9b: 89 5d 10 mov %ebx,0x10(%ebp) 113b9e: 89 4d 0c mov %ecx,0xc(%ebp) 113ba1: 89 45 08 mov %eax,0x8(%ebp) } 113ba4: 5b pop %ebx 113ba5: 5e pop %esi 113ba6: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ba7: ff e2 jmp *%edx 113ba9: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bac: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113bb1: 5b pop %ebx 113bb2: 5e pop %esi 113bb3: c9 leave 113bb4: c3 ret 113bb5: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113bb8: 31 c0 xor %eax,%eax } 113bba: 5b pop %ebx 113bbb: 5e pop %esi 113bbc: c9 leave 113bbd: c3 ret =============================================================================== 0010d518 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 10d518: 55 push %ebp 10d519: 89 e5 mov %esp,%ebp 10d51b: 57 push %edi 10d51c: 56 push %esi 10d51d: 53 push %ebx 10d51e: 83 ec 0c sub $0xc,%esp 10d521: 8b 5d 08 mov 0x8(%ebp),%ebx 10d524: 8b 75 0c mov 0xc(%ebp),%esi 10d527: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d52a: a1 20 b8 12 00 mov 0x12b820,%eax if ( rtems_interrupt_is_in_progress() ) 10d52f: 8b 0d 14 b5 12 00 mov 0x12b514,%ecx 10d535: 85 c9 test %ecx,%ecx 10d537: 0f 85 ab 00 00 00 jne 10d5e8 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d53d: 85 d2 test %edx,%edx 10d53f: 0f 84 e3 00 00 00 je 10d628 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d545: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d547: 85 f6 test %esi,%esi 10d549: 0f 84 d9 00 00 00 je 10d628 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d54f: 8b 3e mov (%esi),%edi 10d551: 85 ff test %edi,%edi 10d553: 0f 84 c3 00 00 00 je 10d61c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d559: 39 d8 cmp %ebx,%eax 10d55b: 76 7b jbe 10d5d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d55d: a1 78 b4 12 00 mov 0x12b478,%eax 10d562: 40 inc %eax 10d563: a3 78 b4 12 00 mov %eax,0x12b478 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d568: 85 db test %ebx,%ebx 10d56a: 0f 85 88 00 00 00 jne 10d5f8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d570: 8b 0d 20 b8 12 00 mov 0x12b820,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d576: 85 c9 test %ecx,%ecx 10d578: 0f 84 b7 00 00 00 je 10d635 <== NEVER TAKEN 10d57e: 8b 3d 24 b8 12 00 mov 0x12b824,%edi 10d584: 89 f8 mov %edi,%eax 10d586: eb 08 jmp 10d590 10d588: 43 inc %ebx 10d589: 83 c0 18 add $0x18,%eax 10d58c: 39 d9 cmp %ebx,%ecx 10d58e: 76 0b jbe 10d59b static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d590: 83 38 00 cmpl $0x0,(%eax) 10d593: 75 f3 jne 10d588 10d595: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d599: 75 ed jne 10d588 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d59b: 89 1a mov %ebx,(%edx) if ( m != n ) 10d59d: 39 d9 cmp %ebx,%ecx 10d59f: 0f 84 97 00 00 00 je 10d63c 10d5a5: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5a8: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d5ab: b9 06 00 00 00 mov $0x6,%ecx 10d5b0: 89 c7 mov %eax,%edi 10d5b2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d5b4: e8 37 19 00 00 call 10eef0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d5b9: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d5c0: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d5c7: 89 5d 08 mov %ebx,0x8(%ebp) } 10d5ca: 83 c4 0c add $0xc,%esp 10d5cd: 5b pop %ebx 10d5ce: 5e pop %esi 10d5cf: 5f pop %edi 10d5d0: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d5d1: e9 ba 7d 00 00 jmp 115390 10d5d6: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d5d8: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d5dd: 83 c4 0c add $0xc,%esp 10d5e0: 5b pop %ebx 10d5e1: 5e pop %esi 10d5e2: 5f pop %edi 10d5e3: c9 leave 10d5e4: c3 ret 10d5e5: 8d 76 00 lea 0x0(%esi),%esi rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d5e8: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d5ed: 83 c4 0c add $0xc,%esp 10d5f0: 5b pop %ebx 10d5f1: 5e pop %esi 10d5f2: 5f pop %edi 10d5f3: c9 leave 10d5f4: c3 ret 10d5f5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10d5f8: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5fb: c1 e0 03 shl $0x3,%eax 10d5fe: 03 05 24 b8 12 00 add 0x12b824,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d604: 8b 38 mov (%eax),%edi 10d606: 85 ff test %edi,%edi 10d608: 74 3e je 10d648 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10d60a: e8 e1 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d60f: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d614: 83 c4 0c add $0xc,%esp 10d617: 5b pop %ebx 10d618: 5e pop %esi 10d619: 5f pop %edi 10d61a: c9 leave 10d61b: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d61c: 8b 4e 04 mov 0x4(%esi),%ecx 10d61f: 85 c9 test %ecx,%ecx 10d621: 0f 85 32 ff ff ff jne 10d559 10d627: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d628: b8 09 00 00 00 mov $0x9,%eax } 10d62d: 83 c4 0c add $0xc,%esp 10d630: 5b pop %ebx 10d631: 5e pop %esi 10d632: 5f pop %edi 10d633: c9 leave 10d634: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d635: c7 02 00 00 00 00 movl $0x0,(%edx) 10d63b: 90 nop if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10d63c: e8 af 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d641: b8 05 00 00 00 mov $0x5,%eax return sc; 10d646: eb 95 jmp 10d5dd static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d648: 8b 48 04 mov 0x4(%eax),%ecx 10d64b: 85 c9 test %ecx,%ecx 10d64d: 75 bb jne 10d60a if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d64f: 89 1a mov %ebx,(%edx) 10d651: e9 55 ff ff ff jmp 10d5ab =============================================================================== 0010d658 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d658: 55 push %ebp 10d659: 89 e5 mov %esp,%ebp 10d65b: 57 push %edi 10d65c: 83 ec 04 sub $0x4,%esp 10d65f: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d662: 8b 15 14 b5 12 00 mov 0x12b514,%edx 10d668: 85 d2 test %edx,%edx 10d66a: 75 44 jne 10d6b0 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d66c: 39 05 20 b8 12 00 cmp %eax,0x12b820 10d672: 77 0c ja 10d680 10d674: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d679: 5a pop %edx 10d67a: 5f pop %edi 10d67b: c9 leave 10d67c: c3 ret 10d67d: 8d 76 00 lea 0x0(%esi),%esi 10d680: 8b 15 78 b4 12 00 mov 0x12b478,%edx 10d686: 42 inc %edx 10d687: 89 15 78 b4 12 00 mov %edx,0x12b478 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d68d: 8d 14 40 lea (%eax,%eax,2),%edx 10d690: c1 e2 03 shl $0x3,%edx 10d693: 03 15 24 b8 12 00 add 0x12b824,%edx 10d699: b9 18 00 00 00 mov $0x18,%ecx 10d69e: 31 c0 xor %eax,%eax 10d6a0: 89 d7 mov %edx,%edi 10d6a2: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d6a4: e8 47 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d6a9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6ab: 5a pop %edx 10d6ac: 5f pop %edi 10d6ad: c9 leave 10d6ae: c3 ret 10d6af: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d6b0: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6b5: 5a pop %edx 10d6b6: 5f pop %edi 10d6b7: c9 leave 10d6b8: c3 ret =============================================================================== 00113bc0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113bc0: 55 push %ebp 113bc1: 89 e5 mov %esp,%ebp 113bc3: 56 push %esi 113bc4: 53 push %ebx 113bc5: 8b 45 08 mov 0x8(%ebp),%eax 113bc8: 8b 4d 0c mov 0xc(%ebp),%ecx 113bcb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bce: 39 05 00 77 12 00 cmp %eax,0x127700 113bd4: 76 22 jbe 113bf8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 113bd6: 8d 34 40 lea (%eax,%eax,2),%esi 113bd9: 8b 15 04 77 12 00 mov 0x127704,%edx 113bdf: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113be3: 85 d2 test %edx,%edx 113be5: 74 1d je 113c04 113be7: 89 5d 10 mov %ebx,0x10(%ebp) 113bea: 89 4d 0c mov %ecx,0xc(%ebp) 113bed: 89 45 08 mov %eax,0x8(%ebp) } 113bf0: 5b pop %ebx 113bf1: 5e pop %esi 113bf2: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113bf3: ff e2 jmp *%edx 113bf5: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bf8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113bfd: 5b pop %ebx 113bfe: 5e pop %esi 113bff: c9 leave 113c00: c3 ret 113c01: 8d 76 00 lea 0x0(%esi),%esi if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113c04: 31 c0 xor %eax,%eax } 113c06: 5b pop %ebx 113c07: 5e pop %esi 113c08: c9 leave 113c09: c3 ret =============================================================================== 0010e460 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 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 1c sub $0x1c,%esp 10e469: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10e46c: 85 ff test %edi,%edi 10e46e: 74 4d je 10e4bd <== NEVER TAKEN 10e470: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10e477: 8b 55 e4 mov -0x1c(%ebp),%edx 10e47a: 8b 04 95 ac b7 12 00 mov 0x12b7ac(,%edx,4),%eax 10e481: 85 c0 test %eax,%eax 10e483: 74 2f je 10e4b4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10e485: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10e488: 85 f6 test %esi,%esi 10e48a: 74 28 je 10e4b4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e48c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10e491: 74 21 je 10e4b4 <== NEVER TAKEN 10e493: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10e498: 8b 46 1c mov 0x1c(%esi),%eax 10e49b: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10e49e: 85 c0 test %eax,%eax 10e4a0: 74 09 je 10e4ab <== NEVER TAKEN continue; (*routine)(the_thread); 10e4a2: 83 ec 0c sub $0xc,%esp 10e4a5: 50 push %eax 10e4a6: ff d7 call *%edi 10e4a8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e4ab: 43 inc %ebx 10e4ac: 0f b7 46 10 movzwl 0x10(%esi),%eax 10e4b0: 39 d8 cmp %ebx,%eax 10e4b2: 73 e4 jae 10e498 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10e4b4: ff 45 e4 incl -0x1c(%ebp) 10e4b7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10e4bb: 75 ba jne 10e477 (*routine)(the_thread); } } } 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 =============================================================================== 00110be0 : * 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 ) { 110be0: 55 push %ebp 110be1: 89 e5 mov %esp,%ebp 110be3: 57 push %edi 110be4: 53 push %ebx 110be5: 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 ); 110be8: 6a 00 push $0x0 110bea: 6a 00 push $0x0 110bec: ff 35 e8 71 12 00 pushl 0x1271e8 110bf2: e8 b1 b0 ff ff call 10bca8 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 110bf7: a1 e4 71 12 00 mov 0x1271e4,%eax 110bfc: 83 c4 10 add $0x10,%esp 110bff: 85 c0 test %eax,%eax 110c01: 75 19 jne 110c1c next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 110c03: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110c05: 83 ec 0c sub $0xc,%esp 110c08: ff 35 e8 71 12 00 pushl 0x1271e8 110c0e: e8 91 b1 ff ff call 10bda4 iop = 0; done: rtems_libio_unlock(); return iop; } 110c13: 89 d8 mov %ebx,%eax 110c15: 8d 65 f8 lea -0x8(%ebp),%esp 110c18: 5b pop %ebx 110c19: 5f pop %edi 110c1a: c9 leave 110c1b: c3 ret rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 110c1c: 83 ec 0c sub $0xc,%esp 110c1f: 8d 55 f4 lea -0xc(%ebp),%edx 110c22: 52 push %edx 110c23: 6a 00 push $0x0 110c25: 6a 54 push $0x54 110c27: 6a 01 push $0x1 110c29: 2b 05 e0 71 12 00 sub 0x1271e0,%eax 110c2f: c1 f8 06 sar $0x6,%eax 110c32: 0d 00 49 42 4c or $0x4c424900,%eax 110c37: 50 push %eax 110c38: e8 f3 ad ff ff call 10ba30 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 110c3d: 83 c4 20 add $0x20,%esp 110c40: 85 c0 test %eax,%eax 110c42: 75 bf jne 110c03 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 110c44: 8b 1d e4 71 12 00 mov 0x1271e4,%ebx next = iop->data1; 110c4a: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 110c4d: b9 40 00 00 00 mov $0x40,%ecx 110c52: 89 df mov %ebx,%edi 110c54: f3 aa rep stos %al,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 110c56: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 110c5d: 8b 45 f4 mov -0xc(%ebp),%eax 110c60: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 110c63: 89 15 e4 71 12 00 mov %edx,0x1271e4 goto done; 110c69: eb 9a jmp 110c05 =============================================================================== 00110b88 : */ void rtems_libio_free( rtems_libio_t *iop ) { 110b88: 55 push %ebp 110b89: 89 e5 mov %esp,%ebp 110b8b: 53 push %ebx 110b8c: 83 ec 08 sub $0x8,%esp 110b8f: 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 ); 110b92: 6a 00 push $0x0 110b94: 6a 00 push $0x0 110b96: ff 35 e8 71 12 00 pushl 0x1271e8 110b9c: e8 07 b1 ff ff call 10bca8 rtems_libio_lock(); if (iop->sem) 110ba1: 8b 43 2c mov 0x2c(%ebx),%eax 110ba4: 83 c4 10 add $0x10,%esp 110ba7: 85 c0 test %eax,%eax 110ba9: 74 0c je 110bb7 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 110bab: 83 ec 0c sub $0xc,%esp 110bae: 50 push %eax 110baf: e8 50 b0 ff ff call 10bc04 110bb4: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 110bb7: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 110bbe: a1 e4 71 12 00 mov 0x1271e4,%eax 110bc3: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 110bc6: 89 1d e4 71 12 00 mov %ebx,0x1271e4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110bcc: a1 e8 71 12 00 mov 0x1271e8,%eax 110bd1: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 110bd4: 8b 5d fc mov -0x4(%ebp),%ebx 110bd7: c9 leave 110bd8: e9 c7 b1 ff ff jmp 10bda4 =============================================================================== 00108688 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 108688: 55 push %ebp 108689: 89 e5 mov %esp,%ebp 10868b: 53 push %ebx 10868c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10868f: a1 4c 31 12 00 mov 0x12314c,%eax 108694: 85 c0 test %eax,%eax 108696: 74 4d je 1086e5 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 108698: 83 ec 08 sub $0x8,%esp 10869b: 6a 40 push $0x40 10869d: 50 push %eax 10869e: e8 c9 fc ff ff call 10836c 1086a3: 89 c2 mov %eax,%edx 1086a5: a3 e0 71 12 00 mov %eax,0x1271e0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1086aa: 83 c4 10 add $0x10,%esp 1086ad: 85 c0 test %eax,%eax 1086af: 74 71 je 108722 <== NEVER TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1086b1: a3 e4 71 12 00 mov %eax,0x1271e4 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1086b6: 8b 1d 4c 31 12 00 mov 0x12314c,%ebx 1086bc: 83 fb 01 cmp $0x1,%ebx 1086bf: 76 1d jbe 1086de <== NEVER TAKEN 1086c1: 8d 50 40 lea 0x40(%eax),%edx 1086c4: b9 01 00 00 00 mov $0x1,%ecx 1086c9: 8d 76 00 lea 0x0(%esi),%esi iop->data1 = iop + 1; 1086cc: 89 52 f4 mov %edx,-0xc(%edx) 1086cf: 83 c2 40 add $0x40,%edx 1086d2: 41 inc %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++) 1086d3: 39 d9 cmp %ebx,%ecx 1086d5: 75 f5 jne 1086cc 1086d7: c1 e1 06 shl $0x6,%ecx 1086da: 8d 54 01 c0 lea -0x40(%ecx,%eax,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 1086de: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1086e5: 83 ec 0c sub $0xc,%esp 1086e8: 68 e8 71 12 00 push $0x1271e8 1086ed: 6a 00 push $0x0 1086ef: 6a 54 push $0x54 1086f1: 6a 01 push $0x1 1086f3: 68 4f 49 42 4c push $0x4c42494f 1086f8: e8 33 33 00 00 call 10ba30 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1086fd: 83 c4 20 add $0x20,%esp 108700: 85 c0 test %eax,%eax 108702: 75 15 jne 108719 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 108704: a1 48 31 12 00 mov 0x123148,%eax 108709: 85 c0 test %eax,%eax 10870b: 74 07 je 108714 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 10870d: 8b 5d fc mov -0x4(%ebp),%ebx 108710: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 108711: ff e0 jmp *%eax 108713: 90 nop } 108714: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108717: c9 leave <== NOT EXECUTED 108718: c3 ret <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 108719: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10871c: 50 push %eax <== NOT EXECUTED 10871d: e8 be 3b 00 00 call 10c2e0 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 108722: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108725: 6a 1a push $0x1a <== NOT EXECUTED 108727: e8 b4 3b 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 00110ac0 : */ int rtems_libio_is_file_open( void *node_access ) { 110ac0: 55 push %ebp 110ac1: 89 e5 mov %esp,%ebp 110ac3: 53 push %ebx 110ac4: 83 ec 08 sub $0x8,%esp 110ac7: 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 ); 110aca: 6a 00 push $0x0 110acc: 6a 00 push $0x0 110ace: ff 35 e8 71 12 00 pushl 0x1271e8 110ad4: e8 cf b1 ff ff call 10bca8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110ad9: a1 e0 71 12 00 mov 0x1271e0,%eax 110ade: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 110ae4: 83 c4 10 add $0x10,%esp 110ae7: 85 c9 test %ecx,%ecx 110ae9: 74 18 je 110b03 <== NEVER TAKEN 110aeb: 31 d2 xor %edx,%edx 110aed: eb 04 jmp 110af3 110aef: 90 nop 110af0: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 110af3: f6 40 15 01 testb $0x1,0x15(%eax) 110af7: 74 05 je 110afe /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 110af9: 39 58 18 cmp %ebx,0x18(%eax) 110afc: 74 1e je 110b1c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110afe: 42 inc %edx 110aff: 39 ca cmp %ecx,%edx 110b01: 72 ed jb 110af0 110b03: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110b05: 83 ec 0c sub $0xc,%esp 110b08: ff 35 e8 71 12 00 pushl 0x1271e8 110b0e: e8 91 b2 ff ff call 10bda4 } rtems_libio_unlock(); return result; } 110b13: 89 d8 mov %ebx,%eax 110b15: 8b 5d fc mov -0x4(%ebp),%ebx 110b18: c9 leave 110b19: c3 ret 110b1a: 66 90 xchg %ax,%ax /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110b1c: bb 01 00 00 00 mov $0x1,%ebx 110b21: eb e2 jmp 110b05 =============================================================================== 00110b24 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 110b24: 55 push %ebp 110b25: 89 e5 mov %esp,%ebp 110b27: 53 push %ebx 110b28: 83 ec 08 sub $0x8,%esp 110b2b: 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 ); 110b2e: 6a 00 push $0x0 110b30: 6a 00 push $0x0 110b32: ff 35 e8 71 12 00 pushl 0x1271e8 110b38: e8 6b b1 ff ff call 10bca8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110b3d: a1 e0 71 12 00 mov 0x1271e0,%eax 110b42: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 110b48: 83 c4 10 add $0x10,%esp 110b4b: 85 c9 test %ecx,%ecx 110b4d: 74 18 je 110b67 <== NEVER TAKEN 110b4f: 31 d2 xor %edx,%edx 110b51: eb 04 jmp 110b57 110b53: 90 nop 110b54: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 110b57: f6 40 15 01 testb $0x1,0x15(%eax) 110b5b: 74 05 je 110b62 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 110b5d: 39 58 28 cmp %ebx,0x28(%eax) 110b60: 74 1e je 110b80 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110b62: 42 inc %edx 110b63: 39 ca cmp %ecx,%edx 110b65: 72 ed jb 110b54 110b67: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110b69: 83 ec 0c sub $0xc,%esp 110b6c: ff 35 e8 71 12 00 pushl 0x1271e8 110b72: e8 2d b2 ff ff call 10bda4 } rtems_libio_unlock(); return result; } 110b77: 89 d8 mov %ebx,%eax 110b79: 8b 5d fc mov -0x4(%ebp),%ebx 110b7c: c9 leave 110b7d: c3 ret 110b7e: 66 90 xchg %ax,%ax /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110b80: bb 01 00 00 00 mov $0x1,%ebx 110b85: eb e2 jmp 110b69 =============================================================================== 00109a64 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 109a64: 55 push %ebp 109a65: 89 e5 mov %esp,%ebp 109a67: 57 push %edi 109a68: 56 push %esi 109a69: 53 push %ebx 109a6a: 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); 109a6d: 8d 45 e4 lea -0x1c(%ebp),%eax 109a70: 50 push %eax 109a71: 6a 00 push $0x0 109a73: 6a 00 push $0x0 109a75: e8 22 2e 00 00 call 10c89c if (sc != RTEMS_SUCCESSFUL) return sc; 109a7a: 83 c4 10 add $0x10,%esp 109a7d: 85 c0 test %eax,%eax 109a7f: 75 75 jne 109af6 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 109a81: 8b 1d 44 65 12 00 mov 0x126544,%ebx 109a87: 81 fb 80 87 12 00 cmp $0x128780,%ebx 109a8d: 74 71 je 109b00 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 109a8f: be 80 87 12 00 mov $0x128780,%esi 109a94: b9 12 00 00 00 mov $0x12,%ecx 109a99: 89 df mov %ebx,%edi 109a9b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 109a9d: 8b 45 e4 mov -0x1c(%ebp),%eax 109aa0: 89 03 mov %eax,(%ebx) * 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); 109aa2: 83 ec 0c sub $0xc,%esp 109aa5: 6a 00 push $0x0 109aa7: 8d 5d d0 lea -0x30(%ebp),%ebx 109aaa: 53 push %ebx 109aab: 6a 00 push $0x0 109aad: 6a 01 push $0x1 109aaf: 68 27 1f 12 00 push $0x121f27 109ab4: e8 d7 ed ff ff call 108890 rtems_filesystem_root = loc; 109ab9: 8b 3d 44 65 12 00 mov 0x126544,%edi 109abf: 83 c7 18 add $0x18,%edi 109ac2: b9 05 00 00 00 mov $0x5,%ecx 109ac7: 89 de mov %ebx,%esi 109ac9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 109acb: 83 c4 14 add $0x14,%esp 109ace: 6a 00 push $0x0 109ad0: 53 push %ebx 109ad1: 6a 00 push $0x0 109ad3: 6a 01 push $0x1 109ad5: 68 27 1f 12 00 push $0x121f27 109ada: e8 b1 ed ff ff call 108890 rtems_filesystem_current = loc; 109adf: 8b 3d 44 65 12 00 mov 0x126544,%edi 109ae5: 83 c7 04 add $0x4,%edi 109ae8: b9 05 00 00 00 mov $0x5,%ecx 109aed: 89 de mov %ebx,%esi 109aef: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 109af1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109af3: 83 c4 20 add $0x20,%esp } 109af6: 8d 65 f4 lea -0xc(%ebp),%esp 109af9: 5b pop %ebx 109afa: 5e pop %esi 109afb: 5f pop %edi 109afc: c9 leave 109afd: c3 ret 109afe: 66 90 xchg %ax,%ax sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 109b00: 83 ec 0c sub $0xc,%esp 109b03: 6a 48 push $0x48 109b05: e8 f2 f2 ff ff call 108dfc 109b0a: 89 c3 mov %eax,%ebx if (!tmp) 109b0c: 83 c4 10 add $0x10,%esp 109b0f: 85 c0 test %eax,%eax 109b11: 74 25 je 109b38 <== NEVER TAKEN #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); 109b13: 51 push %ecx 109b14: 68 70 99 10 00 push $0x109970 109b19: 68 44 65 12 00 push $0x126544 109b1e: 6a 00 push $0x0 109b20: e8 a3 2e 00 00 call 10c9c8 if (sc != RTEMS_SUCCESSFUL) { 109b25: 83 c4 10 add $0x10,%esp 109b28: 85 c0 test %eax,%eax 109b2a: 75 14 jne 109b40 <== NEVER TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 109b2c: 89 1d 44 65 12 00 mov %ebx,0x126544 109b32: e9 58 ff ff ff jmp 109a8f 109b37: 90 nop if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 109b38: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 109b3d: eb b7 jmp 109af6 <== NOT EXECUTED 109b3f: 90 nop <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 109b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109b43: 53 push %ebx <== NOT EXECUTED 109b44: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 109b47: e8 b4 ed ff ff call 108900 <== NOT EXECUTED return sc; 109b4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b4f: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 109b52: eb a2 jmp 109af6 <== NOT EXECUTED =============================================================================== 001099cc : * 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) { 1099cc: 55 push %ebp <== NOT EXECUTED 1099cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1099cf: 53 push %ebx <== NOT EXECUTED 1099d0: 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); 1099d3: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 1099d6: 50 push %eax <== NOT EXECUTED 1099d7: 6a 00 push $0x0 <== NOT EXECUTED 1099d9: 6a 00 push $0x0 <== NOT EXECUTED 1099db: e8 bc 2e 00 00 call 10c89c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1099e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1099e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1099e5: 75 30 jne 109a17 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1099e7: 8b 1d 44 65 12 00 mov 0x126544,%ebx <== NOT EXECUTED 1099ed: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 1099ef: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 1099f2: 74 28 je 109a1c <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 1099f4: 52 push %edx <== NOT EXECUTED 1099f5: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 1099f8: 50 push %eax <== NOT EXECUTED 1099f9: 68 44 65 12 00 push $0x126544 <== NOT EXECUTED 1099fe: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109a01: e8 12 31 00 00 call 10cb18 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 109a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a09: 85 c0 test %eax,%eax <== NOT EXECUTED 109a0b: 74 33 je 109a40 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 109a0d: c7 05 44 65 12 00 80 movl $0x128780,0x126544 <== NOT EXECUTED 109a14: 87 12 00 return sc; } 109a17: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109a1a: c9 leave <== NOT EXECUTED 109a1b: c3 ret <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* 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); 109a1c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109a1f: 68 44 65 12 00 push $0x126544 <== NOT EXECUTED 109a24: 6a 00 push $0x0 <== NOT EXECUTED 109a26: e8 61 30 00 00 call 10ca8c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 109a2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a2e: 85 c0 test %eax,%eax <== NOT EXECUTED 109a30: 75 e5 jne 109a17 <== NOT EXECUTED free_user_env(tmp); 109a32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109a35: 53 push %ebx <== NOT EXECUTED 109a36: e8 35 ff ff ff call 109970 <== NOT EXECUTED 109a3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a3e: eb b4 jmp 1099f4 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 109a40: 50 push %eax <== NOT EXECUTED 109a41: 68 70 99 10 00 push $0x109970 <== NOT EXECUTED 109a46: 68 44 65 12 00 push $0x126544 <== NOT EXECUTED 109a4b: 6a 00 push $0x0 <== NOT EXECUTED 109a4d: e8 76 2f 00 00 call 10c9c8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 109a52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a55: 85 c0 test %eax,%eax <== NOT EXECUTED 109a57: 75 b4 jne 109a0d <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 109a59: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 109a5c: 89 15 44 65 12 00 mov %edx,0x126544 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 109a62: eb b3 jmp 109a17 <== NOT EXECUTED =============================================================================== 00110a80 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 110a80: 55 push %ebp 110a81: 89 e5 mov %esp,%ebp 110a83: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 110a86: 89 d0 mov %edx,%eax 110a88: 83 e0 06 and $0x6,%eax 110a8b: 83 f8 06 cmp $0x6,%eax 110a8e: 74 2c je 110abc <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 110a90: f6 c2 02 test $0x2,%dl 110a93: 75 23 jne 110ab8 <== ALWAYS TAKEN 110a95: 89 d0 mov %edx,%eax <== NOT EXECUTED 110a97: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 110a9a: 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 ) { 110a9d: f6 c2 01 test $0x1,%dl 110aa0: 74 03 je 110aa5 fcntl_flags |= O_NONBLOCK; 110aa2: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 110aa5: f6 c6 02 test $0x2,%dh 110aa8: 74 03 je 110aad fcntl_flags |= O_APPEND; 110aaa: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 110aad: 80 e6 04 and $0x4,%dh 110ab0: 74 03 je 110ab5 fcntl_flags |= O_CREAT; 110ab2: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 110ab5: c9 leave 110ab6: c3 ret 110ab7: 90 nop { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 110ab8: 31 c0 xor %eax,%eax 110aba: eb e1 jmp 110a9d uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 110abc: b0 02 mov $0x2,%al <== NOT EXECUTED 110abe: eb dd jmp 110a9d <== NOT EXECUTED =============================================================================== 00114acc : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 114acc: 55 push %ebp 114acd: 89 e5 mov %esp,%ebp 114acf: 53 push %ebx 114ad0: 83 ec 14 sub $0x14,%esp 114ad3: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 114ad6: 85 db test %ebx,%ebx 114ad8: 74 5b je 114b35 return EINVAL; *pointer = NULL; 114ada: 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()) && 114ae0: 83 3d 40 b6 12 00 03 cmpl $0x3,0x12b640 114ae7: 74 43 je 114b2c <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 114ae9: e8 3e 4b ff ff call 10962c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 114aee: 6a 00 push $0x0 114af0: ff 75 0c pushl 0xc(%ebp) 114af3: ff 75 10 pushl 0x10(%ebp) 114af6: ff 35 58 71 12 00 pushl 0x127158 114afc: e8 c3 9d ff ff call 10e8c4 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 114b01: 83 c4 10 add $0x10,%esp 114b04: 85 c0 test %eax,%eax 114b06: 74 38 je 114b40 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 114b08: 8b 15 48 96 12 00 mov 0x129648,%edx 114b0e: 85 d2 test %edx,%edx 114b10: 74 10 je 114b22 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 114b12: 83 ec 0c sub $0xc,%esp 114b15: 53 push %ebx 114b16: 89 45 f4 mov %eax,-0xc(%ebp) 114b19: ff 52 04 call *0x4(%edx) <== NOT EXECUTED 114b1c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114b1f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 114b22: 89 03 mov %eax,(%ebx) 114b24: 31 c0 xor %eax,%eax return 0; } 114b26: 8b 5d fc mov -0x4(%ebp),%ebx 114b29: c9 leave 114b2a: c3 ret 114b2b: 90 nop *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 114b2c: e8 a3 4a ff ff call 1095d4 114b31: 84 c0 test %al,%al 114b33: 75 b4 jne 114ae9 <== ALWAYS TAKEN if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 114b35: b8 16 00 00 00 mov $0x16,%eax } 114b3a: 8b 5d fc mov -0x4(%ebp),%ebx 114b3d: c9 leave 114b3e: c3 ret 114b3f: 90 nop return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 114b40: b0 0c mov $0xc,%al 114b42: eb e2 jmp 114b26 =============================================================================== 00116c78 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116c78: 55 push %ebp 116c79: 89 e5 mov %esp,%ebp 116c7b: 57 push %edi 116c7c: 56 push %esi 116c7d: 53 push %ebx 116c7e: 83 ec 1c sub $0x1c,%esp 116c81: 8b 7d 08 mov 0x8(%ebp),%edi 116c84: 8b 5d 0c mov 0xc(%ebp),%ebx 116c87: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 116c8a: 85 db test %ebx,%ebx 116c8c: 74 62 je 116cf0 return RTEMS_INVALID_ADDRESS; if ( !count ) 116c8e: 85 f6 test %esi,%esi 116c90: 74 5e je 116cf0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116c92: 51 push %ecx 116c93: 8d 45 e4 lea -0x1c(%ebp),%eax 116c96: 50 push %eax 116c97: 57 push %edi 116c98: 68 00 2f 14 00 push $0x142f00 116c9d: e8 02 4c 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116ca2: 83 c4 10 add $0x10,%esp 116ca5: 8b 55 e4 mov -0x1c(%ebp),%edx 116ca8: 85 d2 test %edx,%edx 116caa: 74 10 je 116cbc 116cac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cb1: 8d 65 f4 lea -0xc(%ebp),%esp 116cb4: 5b pop %ebx 116cb5: 5e pop %esi 116cb6: 5f pop %edi 116cb7: c9 leave 116cb8: c3 ret 116cb9: 8d 76 00 lea 0x0(%esi),%esi the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 116cbc: 83 ec 08 sub $0x8,%esp 116cbf: 56 push %esi 116cc0: 6a 00 push $0x0 116cc2: 57 push %edi 116cc3: ff 75 10 pushl 0x10(%ebp) 116cc6: 53 push %ebx 116cc7: 83 c0 14 add $0x14,%eax 116cca: 50 push %eax 116ccb: e8 a0 34 00 00 call 11a170 <_CORE_message_queue_Broadcast> 116cd0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 116cd2: 83 c4 20 add $0x20,%esp 116cd5: e8 7a 54 00 00 call 11c154 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 116cda: 83 ec 0c sub $0xc,%esp 116cdd: 53 push %ebx 116cde: e8 69 03 00 00 call 11704c <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 116ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ce6: 8d 65 f4 lea -0xc(%ebp),%esp 116ce9: 5b pop %ebx 116cea: 5e pop %esi 116ceb: 5f pop %edi 116cec: c9 leave 116ced: c3 ret 116cee: 66 90 xchg %ax,%ax #endif count ); _Thread_Enable_dispatch(); return 116cf0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cf5: 8d 65 f4 lea -0xc(%ebp),%esp 116cf8: 5b pop %ebx 116cf9: 5e pop %esi 116cfa: 5f pop %edi 116cfb: c9 leave 116cfc: c3 ret =============================================================================== 0011418c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 11418c: 55 push %ebp 11418d: 89 e5 mov %esp,%ebp 11418f: 57 push %edi 114190: 56 push %esi 114191: 53 push %ebx 114192: 83 ec 2c sub $0x2c,%esp 114195: 8b 5d 08 mov 0x8(%ebp),%ebx 114198: 8b 75 0c mov 0xc(%ebp),%esi 11419b: 8b 4d 10 mov 0x10(%ebp),%ecx 11419e: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1141a1: 85 db test %ebx,%ebx 1141a3: 74 2f je 1141d4 return RTEMS_INVALID_NAME; if ( !id ) 1141a5: 85 ff test %edi,%edi 1141a7: 0f 84 a3 00 00 00 je 114250 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141ad: 85 f6 test %esi,%esi 1141af: 74 13 je 1141c4 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1141b1: 85 c9 test %ecx,%ecx 1141b3: 75 2f jne 1141e4 1141b5: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141ba: 8d 65 f4 lea -0xc(%ebp),%esp 1141bd: 5b pop %ebx 1141be: 5e pop %esi 1141bf: 5f pop %edi 1141c0: c9 leave 1141c1: c3 ret 1141c2: 66 90 xchg %ax,%ax if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141c4: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141c9: 8d 65 f4 lea -0xc(%ebp),%esp 1141cc: 5b pop %ebx 1141cd: 5e pop %esi 1141ce: 5f pop %edi 1141cf: c9 leave 1141d0: c3 ret 1141d1: 8d 76 00 lea 0x0(%esi),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1141d4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141d9: 8d 65 f4 lea -0xc(%ebp),%esp 1141dc: 5b pop %ebx 1141dd: 5e pop %esi 1141de: 5f pop %edi 1141df: c9 leave 1141e0: c3 ret 1141e1: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1141e4: a1 18 18 13 00 mov 0x131818,%eax 1141e9: 40 inc %eax 1141ea: a3 18 18 13 00 mov %eax,0x131818 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1141ef: 89 4d d4 mov %ecx,-0x2c(%ebp) 1141f2: e8 69 5f 00 00 call 11a160 <_Message_queue_Allocate> 1141f7: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1141f9: 85 c0 test %eax,%eax 1141fb: 8b 4d d4 mov -0x2c(%ebp),%ecx 1141fe: 74 7c je 11427c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 114200: 8b 45 14 mov 0x14(%ebp),%eax 114203: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 114206: a8 04 test $0x4,%al 114208: 0f 95 c0 setne %al 11420b: 0f b6 c0 movzbl %al,%eax 11420e: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 114211: 51 push %ecx 114212: 56 push %esi 114213: 8d 45 e4 lea -0x1c(%ebp),%eax 114216: 50 push %eax 114217: 8d 42 14 lea 0x14(%edx),%eax 11421a: 50 push %eax 11421b: 89 55 d4 mov %edx,-0x2c(%ebp) 11421e: e8 a5 10 00 00 call 1152c8 <_CORE_message_queue_Initialize> 114223: 83 c4 10 add $0x10,%esp 114226: 84 c0 test %al,%al 114228: 8b 55 d4 mov -0x2c(%ebp),%edx 11422b: 75 2f jne 11425c */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11422d: 83 ec 08 sub $0x8,%esp 114230: 52 push %edx 114231: 68 40 1b 13 00 push $0x131b40 114236: e8 39 1e 00 00 call 116074 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11423b: e8 2c 28 00 00 call 116a6c <_Thread_Enable_dispatch> 114240: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 114245: 83 c4 10 add $0x10,%esp 114248: e9 6d ff ff ff jmp 1141ba 11424d: 8d 76 00 lea 0x0(%esi),%esi #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 114250: b8 09 00 00 00 mov $0x9,%eax 114255: e9 60 ff ff ff jmp 1141ba 11425a: 66 90 xchg %ax,%ax #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11425c: 8b 42 08 mov 0x8(%edx),%eax 11425f: 0f b7 f0 movzwl %ax,%esi 114262: 8b 0d 5c 1b 13 00 mov 0x131b5c,%ecx 114268: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11426b: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11426e: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 114270: e8 f7 27 00 00 call 116a6c <_Thread_Enable_dispatch> 114275: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114277: e9 3e ff ff ff jmp 1141ba _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 11427c: e8 eb 27 00 00 call 116a6c <_Thread_Enable_dispatch> 114281: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114286: e9 2f ff ff ff jmp 1141ba =============================================================================== 00116e00 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116e00: 55 push %ebp 116e01: 89 e5 mov %esp,%ebp 116e03: 53 push %ebx 116e04: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e07: 8d 45 f4 lea -0xc(%ebp),%eax 116e0a: 50 push %eax 116e0b: ff 75 08 pushl 0x8(%ebp) 116e0e: 68 00 2f 14 00 push $0x142f00 116e13: e8 8c 4a 00 00 call 11b8a4 <_Objects_Get> 116e18: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e1a: 83 c4 10 add $0x10,%esp 116e1d: 8b 4d f4 mov -0xc(%ebp),%ecx 116e20: 85 c9 test %ecx,%ecx 116e22: 75 3c jne 116e60 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116e24: 83 ec 08 sub $0x8,%esp 116e27: 50 push %eax 116e28: 68 00 2f 14 00 push $0x142f00 116e2d: e8 02 46 00 00 call 11b434 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116e32: 83 c4 0c add $0xc,%esp 116e35: 6a 05 push $0x5 116e37: 6a 00 push $0x0 116e39: 8d 43 14 lea 0x14(%ebx),%eax 116e3c: 50 push %eax 116e3d: e8 b2 33 00 00 call 11a1f4 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 116e42: 58 pop %eax 116e43: 5a pop %edx 116e44: 53 push %ebx 116e45: 68 00 2f 14 00 push $0x142f00 116e4a: e8 e9 48 00 00 call 11b738 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 116e4f: e8 00 53 00 00 call 11c154 <_Thread_Enable_dispatch> 116e54: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116e56: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e59: 8b 5d fc mov -0x4(%ebp),%ebx 116e5c: c9 leave 116e5d: c3 ret 116e5e: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e60: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e65: 8b 5d fc mov -0x4(%ebp),%ebx 116e68: c9 leave 116e69: c3 ret =============================================================================== 00116e6c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 53 push %ebx 116e70: 83 ec 14 sub $0x14,%esp 116e73: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116e76: 85 db test %ebx,%ebx 116e78: 74 46 je 116ec0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e7a: 51 push %ecx 116e7b: 8d 45 f4 lea -0xc(%ebp),%eax 116e7e: 50 push %eax 116e7f: ff 75 08 pushl 0x8(%ebp) 116e82: 68 00 2f 14 00 push $0x142f00 116e87: e8 18 4a 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e8c: 83 c4 10 add $0x10,%esp 116e8f: 8b 55 f4 mov -0xc(%ebp),%edx 116e92: 85 d2 test %edx,%edx 116e94: 74 0a je 116ea0 116e96: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e9b: 8b 5d fc mov -0x4(%ebp),%ebx 116e9e: c9 leave 116e9f: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 116ea0: 83 ec 0c sub $0xc,%esp 116ea3: 83 c0 14 add $0x14,%eax 116ea6: 50 push %eax 116ea7: e8 84 33 00 00 call 11a230 <_CORE_message_queue_Flush> 116eac: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116eae: e8 a1 52 00 00 call 11c154 <_Thread_Enable_dispatch> 116eb3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116eb5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116eb8: 8b 5d fc mov -0x4(%ebp),%ebx 116ebb: c9 leave 116ebc: c3 ret 116ebd: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ec0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ec5: 8b 5d fc mov -0x4(%ebp),%ebx 116ec8: c9 leave 116ec9: c3 ret =============================================================================== 00116ecc : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116ecc: 55 push %ebp 116ecd: 89 e5 mov %esp,%ebp 116ecf: 53 push %ebx 116ed0: 83 ec 14 sub $0x14,%esp 116ed3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ed6: 85 db test %ebx,%ebx 116ed8: 74 3a je 116f14 116eda: 51 push %ecx 116edb: 8d 45 f4 lea -0xc(%ebp),%eax 116ede: 50 push %eax 116edf: ff 75 08 pushl 0x8(%ebp) 116ee2: 68 00 2f 14 00 push $0x142f00 116ee7: e8 b8 49 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116eec: 83 c4 10 add $0x10,%esp 116eef: 8b 55 f4 mov -0xc(%ebp),%edx 116ef2: 85 d2 test %edx,%edx 116ef4: 74 0a je 116f00 116ef6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116efb: 8b 5d fc mov -0x4(%ebp),%ebx 116efe: c9 leave 116eff: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 116f00: 8b 40 5c mov 0x5c(%eax),%eax 116f03: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116f05: e8 4a 52 00 00 call 11c154 <_Thread_Enable_dispatch> 116f0a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f0c: 8b 5d fc mov -0x4(%ebp),%ebx 116f0f: c9 leave 116f10: c3 ret 116f11: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116f14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f19: 8b 5d fc mov -0x4(%ebp),%ebx 116f1c: c9 leave 116f1d: c3 ret =============================================================================== 001142b0 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1142b0: 55 push %ebp 1142b1: 89 e5 mov %esp,%ebp 1142b3: 56 push %esi 1142b4: 53 push %ebx 1142b5: 83 ec 10 sub $0x10,%esp 1142b8: 8b 5d 0c mov 0xc(%ebp),%ebx 1142bb: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1142be: 85 db test %ebx,%ebx 1142c0: 74 6e je 114330 return RTEMS_INVALID_ADDRESS; if ( !size ) 1142c2: 85 f6 test %esi,%esi 1142c4: 74 6a je 114330 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1142c6: 51 push %ecx 1142c7: 8d 45 f4 lea -0xc(%ebp),%eax 1142ca: 50 push %eax 1142cb: ff 75 08 pushl 0x8(%ebp) 1142ce: 68 40 1b 13 00 push $0x131b40 1142d3: e8 cc 1e 00 00 call 1161a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1142d8: 83 c4 10 add $0x10,%esp 1142db: 8b 55 f4 mov -0xc(%ebp),%edx 1142de: 85 d2 test %edx,%edx 1142e0: 75 42 jne 114324 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1142e2: 83 ec 08 sub $0x8,%esp 1142e5: ff 75 18 pushl 0x18(%ebp) 1142e8: 8b 55 14 mov 0x14(%ebp),%edx 1142eb: 83 e2 01 and $0x1,%edx 1142ee: 83 f2 01 xor $0x1,%edx 1142f1: 52 push %edx 1142f2: 56 push %esi 1142f3: 53 push %ebx 1142f4: ff 70 08 pushl 0x8(%eax) 1142f7: 83 c0 14 add $0x14,%eax 1142fa: 50 push %eax 1142fb: e8 78 10 00 00 call 115378 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 114300: 83 c4 20 add $0x20,%esp 114303: e8 64 27 00 00 call 116a6c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 114308: 83 ec 0c sub $0xc,%esp 11430b: a1 d8 18 13 00 mov 0x1318d8,%eax 114310: ff 70 34 pushl 0x34(%eax) 114313: e8 a0 00 00 00 call 1143b8 <_Message_queue_Translate_core_message_queue_return_code> 114318: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11431b: 8d 65 f8 lea -0x8(%ebp),%esp 11431e: 5b pop %ebx 11431f: 5e pop %esi 114320: c9 leave 114321: c3 ret 114322: 66 90 xchg %ax,%ax if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114324: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114329: 8d 65 f8 lea -0x8(%ebp),%esp 11432c: 5b pop %ebx 11432d: 5e pop %esi 11432e: c9 leave 11432f: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 114330: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114335: 8d 65 f8 lea -0x8(%ebp),%esp 114338: 5b pop %ebx 114339: 5e pop %esi 11433a: c9 leave 11433b: c3 ret =============================================================================== 0010b9a4 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b9a4: 55 push %ebp 10b9a5: 89 e5 mov %esp,%ebp 10b9a7: 56 push %esi 10b9a8: 53 push %ebx 10b9a9: 83 ec 10 sub $0x10,%esp 10b9ac: 8b 75 08 mov 0x8(%ebp),%esi 10b9af: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b9b2: 85 db test %ebx,%ebx 10b9b4: 74 5e je 10ba14 <== NEVER TAKEN RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b9b6: 51 push %ecx 10b9b7: 8d 45 f4 lea -0xc(%ebp),%eax 10b9ba: 50 push %eax 10b9bb: 56 push %esi 10b9bc: 68 80 76 12 00 push $0x127680 10b9c1: e8 62 19 00 00 call 10d328 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b9c6: 83 c4 10 add $0x10,%esp 10b9c9: 8b 55 f4 mov -0xc(%ebp),%edx 10b9cc: 85 d2 test %edx,%edx 10b9ce: 74 0c je 10b9dc 10b9d0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9d5: 8d 65 f8 lea -0x8(%ebp),%esp 10b9d8: 5b pop %ebx 10b9d9: 5e pop %esi 10b9da: c9 leave 10b9db: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b9dc: 6a 00 push $0x0 10b9de: 6a 00 push $0x0 10b9e0: 68 ff ff ff 7f push $0x7fffffff 10b9e5: 6a 00 push $0x0 10b9e7: 56 push %esi 10b9e8: ff 75 10 pushl 0x10(%ebp) 10b9eb: 53 push %ebx 10b9ec: 83 c0 14 add $0x14,%eax 10b9ef: 50 push %eax 10b9f0: e8 df 0b 00 00 call 10c5d4 <_CORE_message_queue_Submit> 10b9f5: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b9f7: 83 c4 20 add $0x20,%esp 10b9fa: e8 71 21 00 00 call 10db70 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 10b9ff: 83 ec 0c sub $0xc,%esp 10ba02: 53 push %ebx 10ba03: e8 18 00 00 00 call 10ba20 <_Message_queue_Translate_core_message_queue_return_code> 10ba08: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba0b: 8d 65 f8 lea -0x8(%ebp),%esp 10ba0e: 5b pop %ebx 10ba0f: 5e pop %esi 10ba10: c9 leave 10ba11: c3 ret 10ba12: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10ba14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba19: 8d 65 f8 lea -0x8(%ebp),%esp 10ba1c: 5b pop %ebx 10ba1d: 5e pop %esi 10ba1e: c9 leave 10ba1f: c3 ret =============================================================================== 0011705c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11705c: 55 push %ebp 11705d: 89 e5 mov %esp,%ebp 11705f: 56 push %esi 117060: 53 push %ebx 117061: 83 ec 10 sub $0x10,%esp 117064: 8b 75 08 mov 0x8(%ebp),%esi 117067: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11706a: 85 db test %ebx,%ebx 11706c: 74 5e je 1170cc 11706e: 51 push %ecx 11706f: 8d 45 f4 lea -0xc(%ebp),%eax 117072: 50 push %eax 117073: 56 push %esi 117074: 68 00 2f 14 00 push $0x142f00 117079: e8 26 48 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11707e: 83 c4 10 add $0x10,%esp 117081: 8b 55 f4 mov -0xc(%ebp),%edx 117084: 85 d2 test %edx,%edx 117086: 74 0c je 117094 117088: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11708d: 8d 65 f8 lea -0x8(%ebp),%esp 117090: 5b pop %ebx 117091: 5e pop %esi 117092: c9 leave 117093: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 117094: 6a 00 push $0x0 117096: 6a 00 push $0x0 117098: 68 00 00 00 80 push $0x80000000 11709d: 6a 00 push $0x0 11709f: 56 push %esi 1170a0: ff 75 10 pushl 0x10(%ebp) 1170a3: 53 push %ebx 1170a4: 83 c0 14 add $0x14,%eax 1170a7: 50 push %eax 1170a8: e8 73 33 00 00 call 11a420 <_CORE_message_queue_Submit> 1170ad: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1170af: 83 c4 20 add $0x20,%esp 1170b2: e8 9d 50 00 00 call 11c154 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 1170b7: 83 ec 0c sub $0xc,%esp 1170ba: 53 push %ebx 1170bb: e8 8c ff ff ff call 11704c <_Message_queue_Translate_core_message_queue_return_code> 1170c0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170c3: 8d 65 f8 lea -0x8(%ebp),%esp 1170c6: 5b pop %ebx 1170c7: 5e pop %esi 1170c8: c9 leave 1170c9: c3 ret 1170ca: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1170cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170d1: 8d 65 f8 lea -0x8(%ebp),%esp 1170d4: 5b pop %ebx 1170d5: 5e pop %esi 1170d6: c9 leave 1170d7: c3 ret =============================================================================== 0010d434 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10d434: 55 push %ebp 10d435: 89 e5 mov %esp,%ebp 10d437: 83 ec 08 sub $0x8,%esp 10d43a: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10d43d: 83 f8 01 cmp $0x1,%eax 10d440: 74 2a je 10d46c api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10d442: 83 f8 02 cmp $0x2,%eax 10d445: 74 09 je 10d450 10d447: b8 47 4b 12 00 mov $0x124b47,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10d44c: c9 leave 10d44d: c3 ret 10d44e: 66 90 xchg %ax,%ax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10d450: b8 80 90 12 00 mov $0x129080,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10d455: 83 ec 08 sub $0x8,%esp 10d458: ff 75 0c pushl 0xc(%ebp) 10d45b: 50 push %eax 10d45c: e8 67 53 00 00 call 1127c8 if ( class_assoc ) 10d461: 83 c4 10 add $0x10,%esp 10d464: 85 c0 test %eax,%eax 10d466: 74 0c je 10d474 return class_assoc->name; 10d468: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d46a: c9 leave 10d46b: c3 ret ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10d46c: b8 60 90 12 00 mov $0x129060,%eax 10d471: eb e2 jmp 10d455 10d473: 90 nop api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10d474: b8 4f 4b 12 00 mov $0x124b4f,%eax return class_assoc->name; return "BAD CLASS"; } 10d479: c9 leave 10d47a: c3 ret =============================================================================== 0010d47c : }; const char *rtems_object_get_api_name( int api ) { 10d47c: 55 push %ebp 10d47d: 89 e5 mov %esp,%ebp 10d47f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10d482: ff 75 08 pushl 0x8(%ebp) 10d485: 68 00 91 12 00 push $0x129100 10d48a: e8 39 53 00 00 call 1127c8 if ( api_assoc ) 10d48f: 83 c4 10 add $0x10,%esp 10d492: 85 c0 test %eax,%eax 10d494: 74 06 je 10d49c return api_assoc->name; 10d496: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d498: c9 leave 10d499: c3 ret 10d49a: 66 90 xchg %ax,%ax ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) 10d49c: b8 4f 4b 12 00 mov $0x124b4f,%eax return api_assoc->name; return "BAD CLASS"; } 10d4a1: c9 leave 10d4a2: c3 ret =============================================================================== 0010d4e4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10d4e4: 55 push %ebp 10d4e5: 89 e5 mov %esp,%ebp 10d4e7: 57 push %edi 10d4e8: 56 push %esi 10d4e9: 53 push %ebx 10d4ea: 83 ec 0c sub $0xc,%esp 10d4ed: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d4f0: 85 db test %ebx,%ebx 10d4f2: 74 5c je 10d550 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10d4f4: 83 ec 08 sub $0x8,%esp 10d4f7: ff 75 0c pushl 0xc(%ebp) 10d4fa: ff 75 08 pushl 0x8(%ebp) 10d4fd: e8 42 1a 00 00 call 10ef44 <_Objects_Get_information> if ( !obj_info ) 10d502: 83 c4 10 add $0x10,%esp 10d505: 85 c0 test %eax,%eax 10d507: 74 57 je 10d560 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10d509: 8b 50 08 mov 0x8(%eax),%edx 10d50c: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10d50e: 8b 50 0c mov 0xc(%eax),%edx 10d511: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10d514: 8a 50 12 mov 0x12(%eax),%dl 10d517: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10d51a: 0f b7 70 10 movzwl 0x10(%eax),%esi 10d51e: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d521: 85 f6 test %esi,%esi 10d523: 74 3f je 10d564 <== NEVER TAKEN 10d525: 8b 78 1c mov 0x1c(%eax),%edi 10d528: b9 01 00 00 00 mov $0x1,%ecx 10d52d: b8 01 00 00 00 mov $0x1,%eax 10d532: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10d534: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10d538: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d53b: 40 inc %eax 10d53c: 89 c1 mov %eax,%ecx 10d53e: 39 c6 cmp %eax,%esi 10d540: 73 f2 jae 10d534 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10d542: 89 53 10 mov %edx,0x10(%ebx) 10d545: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10d547: 8d 65 f4 lea -0xc(%ebp),%esp 10d54a: 5b pop %ebx 10d54b: 5e pop %esi 10d54c: 5f pop %edi 10d54d: c9 leave 10d54e: c3 ret 10d54f: 90 nop int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d550: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10d555: 8d 65 f4 lea -0xc(%ebp),%esp 10d558: 5b pop %ebx 10d559: 5e pop %esi 10d55a: 5f pop %edi 10d55b: c9 leave 10d55c: c3 ret 10d55d: 8d 76 00 lea 0x0(%esi),%esi */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10d560: b0 0a mov $0xa,%al 10d562: eb e3 jmp 10d547 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d564: 31 d2 xor %edx,%edx 10d566: eb da jmp 10d542 <== NOT EXECUTED =============================================================================== 0010cb10 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10cb10: 55 push %ebp 10cb11: 89 e5 mov %esp,%ebp 10cb13: 53 push %ebx 10cb14: 83 ec 14 sub $0x14,%esp 10cb17: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb1a: 85 db test %ebx,%ebx 10cb1c: 74 26 je 10cb44 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10cb1e: 83 ec 08 sub $0x8,%esp 10cb21: 8d 45 f4 lea -0xc(%ebp),%eax 10cb24: 50 push %eax 10cb25: ff 75 08 pushl 0x8(%ebp) 10cb28: e8 8f 1a 00 00 call 10e5bc <_Objects_Id_to_name> *name = name_u.name_u32; 10cb2d: 8b 55 f4 mov -0xc(%ebp),%edx 10cb30: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10cb32: 8b 04 85 8c 36 12 00 mov 0x12368c(,%eax,4),%eax 10cb39: 83 c4 10 add $0x10,%esp } 10cb3c: 8b 5d fc mov -0x4(%ebp),%ebx 10cb3f: c9 leave 10cb40: c3 ret 10cb41: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb44: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10cb49: 8b 5d fc mov -0x4(%ebp),%ebx 10cb4c: c9 leave 10cb4d: c3 ret =============================================================================== 0010d5c0 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d5c0: 55 push %ebp 10d5c1: 89 e5 mov %esp,%ebp 10d5c3: 57 push %edi 10d5c4: 56 push %esi 10d5c5: 53 push %ebx 10d5c6: 83 ec 1c sub $0x1c,%esp 10d5c9: 8b 75 08 mov 0x8(%ebp),%esi 10d5cc: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d5cf: 85 ff test %edi,%edi 10d5d1: 74 61 je 10d634 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d5d3: 85 f6 test %esi,%esi 10d5d5: 74 35 je 10d60c information = _Objects_Get_information_id( tmpId ); 10d5d7: 83 ec 0c sub $0xc,%esp 10d5da: 56 push %esi 10d5db: e8 44 19 00 00 call 10ef24 <_Objects_Get_information_id> 10d5e0: 89 c3 mov %eax,%ebx if ( !information ) 10d5e2: 83 c4 10 add $0x10,%esp 10d5e5: 85 c0 test %eax,%eax 10d5e7: 74 16 je 10d5ff return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d5e9: 50 push %eax 10d5ea: 8d 45 e4 lea -0x1c(%ebp),%eax 10d5ed: 50 push %eax 10d5ee: 56 push %esi 10d5ef: 53 push %ebx 10d5f0: e8 b3 1a 00 00 call 10f0a8 <_Objects_Get> switch ( location ) { 10d5f5: 83 c4 10 add $0x10,%esp 10d5f8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d5fb: 85 c9 test %ecx,%ecx 10d5fd: 74 19 je 10d618 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10d5ff: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d604: 8d 65 f4 lea -0xc(%ebp),%esp 10d607: 5b pop %ebx 10d608: 5e pop %esi 10d609: 5f pop %edi 10d60a: c9 leave 10d60b: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d60c: a1 58 b5 12 00 mov 0x12b558,%eax 10d611: 8b 70 08 mov 0x8(%eax),%esi 10d614: eb c1 jmp 10d5d7 10d616: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d618: 52 push %edx 10d619: 57 push %edi 10d61a: 50 push %eax 10d61b: 53 push %ebx 10d61c: e8 bf 1c 00 00 call 10f2e0 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d621: e8 b2 23 00 00 call 10f9d8 <_Thread_Enable_dispatch> 10d626: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d628: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d62b: 8d 65 f4 lea -0xc(%ebp),%esp 10d62e: 5b pop %ebx 10d62f: 5e pop %esi 10d630: 5f pop %edi 10d631: c9 leave 10d632: c3 ret 10d633: 90 nop Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d634: b8 09 00 00 00 mov $0x9,%eax 10d639: eb c9 jmp 10d604 =============================================================================== 0010cdcc : void rtems_panic( const char *printf_format, ... ) { 10cdcc: 55 push %ebp <== NOT EXECUTED 10cdcd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cdcf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10cdd2: 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); 10cdd5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10cdd8: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10cddd: e8 4a fe ff ff call 10cc2c <== NOT EXECUTED va_end(arglist); } 10cde2: c9 leave <== NOT EXECUTED 10cde3: c3 ret <== NOT EXECUTED =============================================================================== 001170d8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1170d8: 55 push %ebp 1170d9: 89 e5 mov %esp,%ebp 1170db: 57 push %edi 1170dc: 56 push %esi 1170dd: 53 push %ebx 1170de: 83 ec 1c sub $0x1c,%esp 1170e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1170e4: 8b 75 0c mov 0xc(%ebp),%esi 1170e7: 8b 55 10 mov 0x10(%ebp),%edx 1170ea: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1170ed: 85 db test %ebx,%ebx 1170ef: 74 47 je 117138 return RTEMS_INVALID_NAME; if ( !starting_address ) 1170f1: 85 f6 test %esi,%esi 1170f3: 74 23 je 117118 return RTEMS_INVALID_ADDRESS; if ( !id ) 1170f5: 8b 45 1c mov 0x1c(%ebp),%eax 1170f8: 85 c0 test %eax,%eax 1170fa: 74 1c je 117118 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1170fc: 85 d2 test %edx,%edx 1170fe: 74 28 je 117128 117100: 85 ff test %edi,%edi 117102: 74 24 je 117128 117104: 39 fa cmp %edi,%edx 117106: 72 20 jb 117128 117108: f7 c7 03 00 00 00 test $0x3,%edi 11710e: 75 18 jne 117128 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 117110: f7 c6 03 00 00 00 test $0x3,%esi 117116: 74 30 je 117148 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117118: b8 09 00 00 00 mov $0x9,%eax } 11711d: 8d 65 f4 lea -0xc(%ebp),%esp 117120: 5b pop %ebx 117121: 5e pop %esi 117122: 5f pop %edi 117123: c9 leave 117124: c3 ret 117125: 8d 76 00 lea 0x0(%esi),%esi 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117128: b8 08 00 00 00 mov $0x8,%eax } 11712d: 8d 65 f4 lea -0xc(%ebp),%esp 117130: 5b pop %ebx 117131: 5e pop %esi 117132: 5f pop %edi 117133: c9 leave 117134: c3 ret 117135: 8d 76 00 lea 0x0(%esi),%esi rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 117138: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11713d: 8d 65 f4 lea -0xc(%ebp),%esp 117140: 5b pop %ebx 117141: 5e pop %esi 117142: 5f pop %edi 117143: c9 leave 117144: c3 ret 117145: 8d 76 00 lea 0x0(%esi),%esi 117148: a1 d8 2b 14 00 mov 0x142bd8,%eax 11714d: 40 inc %eax 11714e: a3 d8 2b 14 00 mov %eax,0x142bd8 * 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 ); 117153: 83 ec 0c sub $0xc,%esp 117156: 68 60 2a 14 00 push $0x142a60 11715b: 89 55 e0 mov %edx,-0x20(%ebp) 11715e: e8 55 42 00 00 call 11b3b8 <_Objects_Allocate> 117163: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 117166: 83 c4 10 add $0x10,%esp 117169: 85 c0 test %eax,%eax 11716b: 8b 55 e0 mov -0x20(%ebp),%edx 11716e: 74 58 je 1171c8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 117170: 8b 45 e4 mov -0x1c(%ebp),%eax 117173: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 117176: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 117179: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11717c: 8b 4d 18 mov 0x18(%ebp),%ecx 11717f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 117182: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 117189: 57 push %edi 11718a: 89 d0 mov %edx,%eax 11718c: 31 d2 xor %edx,%edx 11718e: f7 f7 div %edi 117190: 50 push %eax 117191: 56 push %esi 117192: 8b 45 e4 mov -0x1c(%ebp),%eax 117195: 83 c0 24 add $0x24,%eax 117198: 50 push %eax 117199: e8 92 2f 00 00 call 11a130 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11719e: 8b 7d e4 mov -0x1c(%ebp),%edi 1171a1: 8b 47 08 mov 0x8(%edi),%eax 1171a4: 0f b7 f0 movzwl %ax,%esi 1171a7: 8b 15 7c 2a 14 00 mov 0x142a7c,%edx 1171ad: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1171b0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1171b3: 8b 55 1c mov 0x1c(%ebp),%edx 1171b6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1171b8: e8 97 4f 00 00 call 11c154 <_Thread_Enable_dispatch> 1171bd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1171bf: 83 c4 10 add $0x10,%esp 1171c2: e9 66 ff ff ff jmp 11712d 1171c7: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1171c8: e8 87 4f 00 00 call 11c154 <_Thread_Enable_dispatch> 1171cd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1171d2: e9 56 ff ff ff jmp 11712d =============================================================================== 00117244 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 117244: 55 push %ebp 117245: 89 e5 mov %esp,%ebp 117247: 56 push %esi 117248: 53 push %ebx 117249: 83 ec 20 sub $0x20,%esp 11724c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11724f: 85 db test %ebx,%ebx 117251: 74 59 je 1172ac RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 117253: 52 push %edx 117254: 8d 45 f4 lea -0xc(%ebp),%eax 117257: 50 push %eax 117258: ff 75 08 pushl 0x8(%ebp) 11725b: 68 60 2a 14 00 push $0x142a60 117260: e8 3f 46 00 00 call 11b8a4 <_Objects_Get> 117265: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117267: 83 c4 10 add $0x10,%esp 11726a: 8b 45 f4 mov -0xc(%ebp),%eax 11726d: 85 c0 test %eax,%eax 11726f: 75 2f jne 1172a0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 117271: 83 ec 0c sub $0xc,%esp 117274: 8d 46 24 lea 0x24(%esi),%eax 117277: 50 push %eax 117278: e8 8f 2e 00 00 call 11a10c <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11727d: 83 c4 10 add $0x10,%esp 117280: 85 c0 test %eax,%eax 117282: 74 34 je 1172b8 the_partition->number_of_used_blocks += 1; 117284: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 117287: 89 45 e4 mov %eax,-0x1c(%ebp) 11728a: e8 c5 4e 00 00 call 11c154 <_Thread_Enable_dispatch> *buffer = the_buffer; 11728f: 8b 45 e4 mov -0x1c(%ebp),%eax 117292: 89 03 mov %eax,(%ebx) 117294: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117296: 8d 65 f8 lea -0x8(%ebp),%esp 117299: 5b pop %ebx 11729a: 5e pop %esi 11729b: c9 leave 11729c: c3 ret 11729d: 8d 76 00 lea 0x0(%esi),%esi if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1172a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172a5: 8d 65 f8 lea -0x8(%ebp),%esp 1172a8: 5b pop %ebx 1172a9: 5e pop %esi 1172aa: c9 leave 1172ab: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1172ac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172b1: 8d 65 f8 lea -0x8(%ebp),%esp 1172b4: 5b pop %ebx 1172b5: 5e pop %esi 1172b6: c9 leave 1172b7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1172b8: e8 97 4e 00 00 call 11c154 <_Thread_Enable_dispatch> 1172bd: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1172c2: eb e1 jmp 1172a5 =============================================================================== 001172e8 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1172e8: 55 push %ebp 1172e9: 89 e5 mov %esp,%ebp 1172eb: 56 push %esi 1172ec: 53 push %ebx 1172ed: 83 ec 14 sub $0x14,%esp 1172f0: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1172f3: 8d 45 f4 lea -0xc(%ebp),%eax 1172f6: 50 push %eax 1172f7: ff 75 08 pushl 0x8(%ebp) 1172fa: 68 60 2a 14 00 push $0x142a60 1172ff: e8 a0 45 00 00 call 11b8a4 <_Objects_Get> 117304: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117306: 83 c4 10 add $0x10,%esp 117309: 8b 45 f4 mov -0xc(%ebp),%eax 11730c: 85 c0 test %eax,%eax 11730e: 74 0c je 11731c 117310: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117315: 8d 65 f8 lea -0x8(%ebp),%esp 117318: 5b pop %ebx 117319: 5e pop %esi 11731a: c9 leave 11731b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 11731c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11731f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 117322: 39 c6 cmp %eax,%esi 117324: 72 3a jb 117360 117326: 8d 14 10 lea (%eax,%edx,1),%edx 117329: 39 d6 cmp %edx,%esi 11732b: 77 33 ja 117360 <== NEVER TAKEN return ( 11732d: 89 f2 mov %esi,%edx 11732f: 29 c2 sub %eax,%edx 117331: 89 d0 mov %edx,%eax 117333: 31 d2 xor %edx,%edx 117335: f7 73 18 divl 0x18(%ebx) 117338: 85 d2 test %edx,%edx 11733a: 75 24 jne 117360 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11733c: 83 ec 08 sub $0x8,%esp 11733f: 56 push %esi 117340: 8d 43 24 lea 0x24(%ebx),%eax 117343: 50 push %eax 117344: e8 87 2d 00 00 call 11a0d0 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 117349: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11734c: e8 03 4e 00 00 call 11c154 <_Thread_Enable_dispatch> 117351: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117353: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117356: 8d 65 f8 lea -0x8(%ebp),%esp 117359: 5b pop %ebx 11735a: 5e pop %esi 11735b: c9 leave 11735c: c3 ret 11735d: 8d 76 00 lea 0x0(%esi),%esi _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117360: e8 ef 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 117365: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11736a: 8d 65 f8 lea -0x8(%ebp),%esp 11736d: 5b pop %ebx 11736e: 5e pop %esi 11736f: c9 leave 117370: c3 ret =============================================================================== 0010f13c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10f13c: 55 push %ebp 10f13d: 89 e5 mov %esp,%ebp 10f13f: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10f142: 80 3d e4 55 12 00 00 cmpb $0x0,0x1255e4 10f149: 74 09 je 10f154 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 10f14b: a1 a8 6f 12 00 mov 0x126fa8,%eax <== NOT EXECUTED 10f150: 85 c0 test %eax,%eax <== NOT EXECUTED 10f152: 74 04 je 10f158 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 10f154: c9 leave 10f155: c3 ret 10f156: 66 90 xchg %ax,%ax if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 10f158: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f15b: 68 a8 6f 12 00 push $0x126fa8 <== NOT EXECUTED 10f160: 6a 00 push $0x0 <== NOT EXECUTED 10f162: 6a 54 push $0x54 <== NOT EXECUTED 10f164: 6a 01 push $0x1 <== NOT EXECUTED 10f166: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10f16b: e8 c0 c8 ff ff call 10ba30 <== 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) 10f170: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f173: 85 c0 test %eax,%eax <== NOT EXECUTED 10f175: 75 0d jne 10f184 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10f177: e8 30 c4 ff ff call 10b5ac <== NOT EXECUTED rtems_pipe_no = now; 10f17c: 66 a3 b0 6f 12 00 mov %ax,0x126fb0 <== NOT EXECUTED } 10f182: c9 leave <== NOT EXECUTED 10f183: c3 ret <== NOT EXECUTED sc = rtems_semaphore_create( 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) rtems_fatal_error_occurred (sc); 10f184: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f187: 50 push %eax <== NOT EXECUTED 10f188: e8 53 d1 ff ff call 10c2e0 <== NOT EXECUTED =============================================================================== 00116710 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 116710: 55 push %ebp 116711: 89 e5 mov %esp,%ebp 116713: 57 push %edi 116714: 56 push %esi 116715: 53 push %ebx 116716: 83 ec 1c sub $0x1c,%esp 116719: 8b 5d 08 mov 0x8(%ebp),%ebx 11671c: 8b 55 0c mov 0xc(%ebp),%edx 11671f: 8b 7d 10 mov 0x10(%ebp),%edi 116722: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116725: 85 db test %ebx,%ebx 116727: 74 1b je 116744 return RTEMS_INVALID_NAME; if ( !id ) 116729: 85 f6 test %esi,%esi 11672b: 74 08 je 116735 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 11672d: 89 f8 mov %edi,%eax 11672f: 09 d0 or %edx,%eax 116731: a8 03 test $0x3,%al 116733: 74 1f je 116754 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116735: b8 09 00 00 00 mov $0x9,%eax } 11673a: 8d 65 f4 lea -0xc(%ebp),%esp 11673d: 5b pop %ebx 11673e: 5e pop %esi 11673f: 5f pop %edi 116740: c9 leave 116741: c3 ret 116742: 66 90 xchg %ax,%ax rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116744: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116749: 8d 65 f4 lea -0xc(%ebp),%esp 11674c: 5b pop %ebx 11674d: 5e pop %esi 11674e: 5f pop %edi 11674f: c9 leave 116750: c3 ret 116751: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116754: a1 d8 2b 14 00 mov 0x142bd8,%eax 116759: 40 inc %eax 11675a: a3 d8 2b 14 00 mov %eax,0x142bd8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 11675f: 83 ec 0c sub $0xc,%esp 116762: 68 20 2a 14 00 push $0x142a20 116767: 89 55 e4 mov %edx,-0x1c(%ebp) 11676a: e8 49 4c 00 00 call 11b3b8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 11676f: 83 c4 10 add $0x10,%esp 116772: 85 c0 test %eax,%eax 116774: 8b 55 e4 mov -0x1c(%ebp),%edx 116777: 74 33 je 1167ac _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 116779: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 11677c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11677f: 8b 55 14 mov 0x14(%ebp),%edx 116782: 4a dec %edx 116783: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116786: 8b 50 08 mov 0x8(%eax),%edx 116789: 0f b7 fa movzwl %dx,%edi 11678c: 8b 0d 3c 2a 14 00 mov 0x142a3c,%ecx 116792: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116795: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 116798: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11679a: e8 b5 59 00 00 call 11c154 <_Thread_Enable_dispatch> 11679f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1167a1: 8d 65 f4 lea -0xc(%ebp),%esp 1167a4: 5b pop %ebx 1167a5: 5e pop %esi 1167a6: 5f pop %edi 1167a7: c9 leave 1167a8: c3 ret 1167a9: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 1167ac: e8 a3 59 00 00 call 11c154 <_Thread_Enable_dispatch> 1167b1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1167b6: eb 82 jmp 11673a =============================================================================== 001167b8 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 1167b8: 55 push %ebp 1167b9: 89 e5 mov %esp,%ebp 1167bb: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 1167be: 8d 45 f4 lea -0xc(%ebp),%eax 1167c1: 50 push %eax 1167c2: ff 75 08 pushl 0x8(%ebp) 1167c5: 68 20 2a 14 00 push $0x142a20 1167ca: e8 d5 50 00 00 call 11b8a4 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1167cf: 83 c4 10 add $0x10,%esp 1167d2: 8b 4d f4 mov -0xc(%ebp),%ecx 1167d5: 85 c9 test %ecx,%ecx 1167d7: 75 2f jne 116808 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 1167d9: 83 ec 08 sub $0x8,%esp 1167dc: 50 push %eax 1167dd: 68 20 2a 14 00 push $0x142a20 1167e2: 89 45 e4 mov %eax,-0x1c(%ebp) 1167e5: e8 4a 4c 00 00 call 11b434 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 1167ea: 58 pop %eax 1167eb: 5a pop %edx 1167ec: 8b 45 e4 mov -0x1c(%ebp),%eax 1167ef: 50 push %eax 1167f0: 68 20 2a 14 00 push $0x142a20 1167f5: e8 3e 4f 00 00 call 11b738 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 1167fa: e8 55 59 00 00 call 11c154 <_Thread_Enable_dispatch> 1167ff: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116801: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116804: c9 leave 116805: c3 ret 116806: 66 90 xchg %ax,%ax { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116808: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11680d: c9 leave 11680e: c3 ret =============================================================================== 00116810 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116810: 55 push %ebp 116811: 89 e5 mov %esp,%ebp 116813: 56 push %esi 116814: 53 push %ebx 116815: 83 ec 10 sub $0x10,%esp 116818: 8b 75 0c mov 0xc(%ebp),%esi 11681b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 11681e: 85 db test %ebx,%ebx 116820: 74 4e je 116870 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 116822: 51 push %ecx 116823: 8d 45 f4 lea -0xc(%ebp),%eax 116826: 50 push %eax 116827: ff 75 08 pushl 0x8(%ebp) 11682a: 68 20 2a 14 00 push $0x142a20 11682f: e8 70 50 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116834: 83 c4 10 add $0x10,%esp 116837: 8b 55 f4 mov -0xc(%ebp),%edx 11683a: 85 d2 test %edx,%edx 11683c: 74 0e je 11684c 11683e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116843: 8d 65 f8 lea -0x8(%ebp),%esp 116846: 5b pop %ebx 116847: 5e pop %esi 116848: c9 leave 116849: c3 ret 11684a: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 11684c: 89 f2 mov %esi,%edx 11684e: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 116851: 3b 50 18 cmp 0x18(%eax),%edx 116854: 77 16 ja 11686c *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 116856: 03 50 10 add 0x10(%eax),%edx 116859: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 11685b: e8 f4 58 00 00 call 11c154 <_Thread_Enable_dispatch> 116860: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116862: 8d 65 f8 lea -0x8(%ebp),%esp 116865: 5b pop %ebx 116866: 5e pop %esi 116867: c9 leave 116868: c3 ret 116869: 8d 76 00 lea 0x0(%esi),%esi the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 11686c: 89 33 mov %esi,(%ebx) 11686e: eb eb jmp 11685b { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116870: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116875: 8d 65 f8 lea -0x8(%ebp),%esp 116878: 5b pop %ebx 116879: 5e pop %esi 11687a: c9 leave 11687b: c3 ret =============================================================================== 001168a0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1168a0: 55 push %ebp 1168a1: 89 e5 mov %esp,%ebp 1168a3: 56 push %esi 1168a4: 53 push %ebx 1168a5: 83 ec 10 sub $0x10,%esp 1168a8: 8b 75 0c mov 0xc(%ebp),%esi 1168ab: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1168ae: 85 db test %ebx,%ebx 1168b0: 74 4e je 116900 1168b2: 51 push %ecx 1168b3: 8d 45 f4 lea -0xc(%ebp),%eax 1168b6: 50 push %eax 1168b7: ff 75 08 pushl 0x8(%ebp) 1168ba: 68 20 2a 14 00 push $0x142a20 1168bf: e8 e0 4f 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1168c4: 83 c4 10 add $0x10,%esp 1168c7: 8b 55 f4 mov -0xc(%ebp),%edx 1168ca: 85 d2 test %edx,%edx 1168cc: 74 0e je 1168dc 1168ce: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168d3: 8d 65 f8 lea -0x8(%ebp),%esp 1168d6: 5b pop %ebx 1168d7: 5e pop %esi 1168d8: c9 leave 1168d9: c3 ret 1168da: 66 90 xchg %ax,%ax the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 1168dc: 89 f2 mov %esi,%edx 1168de: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 1168e1: 3b 50 18 cmp 0x18(%eax),%edx 1168e4: 77 16 ja 1168fc *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 1168e6: 03 50 14 add 0x14(%eax),%edx 1168e9: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 1168eb: e8 64 58 00 00 call 11c154 <_Thread_Enable_dispatch> 1168f0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168f2: 8d 65 f8 lea -0x8(%ebp),%esp 1168f5: 5b pop %ebx 1168f6: 5e pop %esi 1168f7: c9 leave 1168f8: c3 ret 1168f9: 8d 76 00 lea 0x0(%esi),%esi switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 1168fc: 89 33 mov %esi,(%ebx) 1168fe: eb eb jmp 1168eb { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116900: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116905: 8d 65 f8 lea -0x8(%ebp),%esp 116908: 5b pop %ebx 116909: 5e pop %esi 11690a: c9 leave 11690b: c3 ret =============================================================================== 00117374 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 117374: 55 push %ebp 117375: 89 e5 mov %esp,%ebp 117377: 53 push %ebx 117378: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 11737b: 8d 45 f4 lea -0xc(%ebp),%eax 11737e: 50 push %eax 11737f: ff 75 08 pushl 0x8(%ebp) 117382: 68 a0 2a 14 00 push $0x142aa0 117387: e8 18 45 00 00 call 11b8a4 <_Objects_Get> 11738c: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 11738e: 83 c4 10 add $0x10,%esp 117391: 8b 45 f4 mov -0xc(%ebp),%eax 117394: 85 c0 test %eax,%eax 117396: 74 0c je 1173a4 117398: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11739d: 8b 5d fc mov -0x4(%ebp),%ebx 1173a0: c9 leave 1173a1: c3 ret 1173a2: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1173a4: 8b 43 40 mov 0x40(%ebx),%eax 1173a7: 3b 05 98 2c 14 00 cmp 0x142c98,%eax 1173ad: 74 11 je 1173c0 _Thread_Enable_dispatch(); 1173af: e8 a0 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 1173b4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1173b9: 8b 5d fc mov -0x4(%ebp),%ebx 1173bc: c9 leave 1173bd: c3 ret 1173be: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 1173c0: 83 ec 0c sub $0xc,%esp 1173c3: 8d 43 10 lea 0x10(%ebx),%eax 1173c6: 50 push %eax 1173c7: e8 80 61 00 00 call 11d54c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1173cc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1173d3: e8 7c 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 1173d8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1173da: 83 c4 10 add $0x10,%esp 1173dd: eb be jmp 11739d =============================================================================== 0010c930 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c930: 55 push %ebp 10c931: 89 e5 mov %esp,%ebp 10c933: 57 push %edi 10c934: 56 push %esi 10c935: 53 push %ebx 10c936: 83 ec 1c sub $0x1c,%esp 10c939: 8b 5d 08 mov 0x8(%ebp),%ebx 10c93c: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c93f: 85 db test %ebx,%ebx 10c941: 0f 84 a9 00 00 00 je 10c9f0 return RTEMS_INVALID_NAME; if ( !id ) 10c947: 85 f6 test %esi,%esi 10c949: 0f 84 c5 00 00 00 je 10ca14 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c94f: a1 78 a4 12 00 mov 0x12a478,%eax 10c954: 40 inc %eax 10c955: a3 78 a4 12 00 mov %eax,0x12a478 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10c95a: 83 ec 0c sub $0xc,%esp 10c95d: 68 80 a3 12 00 push $0x12a380 10c962: e8 f1 1d 00 00 call 10e758 <_Objects_Allocate> 10c967: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c969: 83 c4 10 add $0x10,%esp 10c96c: 85 c0 test %eax,%eax 10c96e: 0f 84 8c 00 00 00 je 10ca00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c974: a1 38 a5 12 00 mov 0x12a538,%eax 10c979: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c97c: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c983: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c98a: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c991: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c998: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10c99f: 8d 42 54 lea 0x54(%edx),%eax 10c9a2: 89 45 e4 mov %eax,-0x1c(%ebp) 10c9a5: b9 38 00 00 00 mov $0x38,%ecx 10c9aa: 31 c0 xor %eax,%eax 10c9ac: 8b 7d e4 mov -0x1c(%ebp),%edi 10c9af: f3 aa rep stos %al,%es:(%edi) 10c9b1: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c9b8: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c9bf: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c9c6: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c9cd: 8b 42 08 mov 0x8(%edx),%eax 10c9d0: 0f b7 f8 movzwl %ax,%edi 10c9d3: 8b 0d 9c a3 12 00 mov 0x12a39c,%ecx 10c9d9: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c9dc: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c9df: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c9e1: e8 2e 2b 00 00 call 10f514 <_Thread_Enable_dispatch> 10c9e6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c9e8: 8d 65 f4 lea -0xc(%ebp),%esp 10c9eb: 5b pop %ebx 10c9ec: 5e pop %esi 10c9ed: 5f pop %edi 10c9ee: c9 leave 10c9ef: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c9f0: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c9f8: 5b pop %ebx 10c9f9: 5e pop %esi 10c9fa: 5f pop %edi 10c9fb: c9 leave 10c9fc: c3 ret 10c9fd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10ca00: e8 0f 2b 00 00 call 10f514 <_Thread_Enable_dispatch> 10ca05: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca0a: 8d 65 f4 lea -0xc(%ebp),%esp 10ca0d: 5b pop %ebx 10ca0e: 5e pop %esi 10ca0f: 5f pop %edi 10ca10: c9 leave 10ca11: c3 ret 10ca12: 66 90 xchg %ax,%ax Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10ca14: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca19: 8d 65 f4 lea -0xc(%ebp),%esp 10ca1c: 5b pop %ebx 10ca1d: 5e pop %esi 10ca1e: 5f pop %edi 10ca1f: c9 leave 10ca20: c3 ret =============================================================================== 00112f24 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 112f24: 55 push %ebp 112f25: 89 e5 mov %esp,%ebp 112f27: 53 push %ebx 112f28: 83 ec 24 sub $0x24,%esp 112f2b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 112f2e: 85 db test %ebx,%ebx 112f30: 0f 84 92 00 00 00 je 112fc8 112f36: 50 push %eax 112f37: 8d 45 f4 lea -0xc(%ebp),%eax 112f3a: 50 push %eax 112f3b: ff 75 08 pushl 0x8(%ebp) 112f3e: 68 80 a3 12 00 push $0x12a380 112f43: e8 84 bd ff ff call 10eccc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 112f48: 83 c4 10 add $0x10,%esp 112f4b: 8b 4d f4 mov -0xc(%ebp),%ecx 112f4e: 85 c9 test %ecx,%ecx 112f50: 74 0a je 112f5c 112f52: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f57: 8b 5d fc mov -0x4(%ebp),%ebx 112f5a: c9 leave 112f5b: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 112f5c: 8b 50 40 mov 0x40(%eax),%edx 112f5f: 8b 52 08 mov 0x8(%edx),%edx 112f62: 89 13 mov %edx,(%ebx) status->state = the_period->state; 112f64: 8b 50 38 mov 0x38(%eax),%edx 112f67: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 112f6a: 85 d2 test %edx,%edx 112f6c: 75 2a jne 112f98 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 112f6e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112f75: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 112f7c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 112f83: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 112f8a: e8 85 c5 ff ff call 10f514 <_Thread_Enable_dispatch> 112f8f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f91: 8b 5d fc mov -0x4(%ebp),%ebx 112f94: c9 leave 112f95: c3 ret 112f96: 66 90 xchg %ax,%ax /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 112f98: 52 push %edx 112f99: 8d 55 ec lea -0x14(%ebp),%edx 112f9c: 52 push %edx 112f9d: 8d 55 e4 lea -0x1c(%ebp),%edx 112fa0: 52 push %edx 112fa1: 50 push %eax 112fa2: e8 15 9b ff ff call 10cabc <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 112fa7: 83 c4 10 add $0x10,%esp 112faa: 84 c0 test %al,%al 112fac: 74 26 je 112fd4 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 112fae: 8b 45 e4 mov -0x1c(%ebp),%eax 112fb1: 8b 55 e8 mov -0x18(%ebp),%edx 112fb4: 89 43 08 mov %eax,0x8(%ebx) 112fb7: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 112fba: 8b 45 ec mov -0x14(%ebp),%eax 112fbd: 8b 55 f0 mov -0x10(%ebp),%edx 112fc0: 89 43 10 mov %eax,0x10(%ebx) 112fc3: 89 53 14 mov %edx,0x14(%ebx) 112fc6: eb c2 jmp 112f8a Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 112fc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112fcd: 8b 5d fc mov -0x4(%ebp),%ebx 112fd0: c9 leave 112fd1: c3 ret 112fd2: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 112fd4: e8 3b c5 ff ff call 10f514 <_Thread_Enable_dispatch> 112fd9: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 112fde: e9 74 ff ff ff jmp 112f57 =============================================================================== 0010cc44 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10cc44: 55 push %ebp 10cc45: 89 e5 mov %esp,%ebp 10cc47: 57 push %edi 10cc48: 56 push %esi 10cc49: 53 push %ebx 10cc4a: 83 ec 30 sub $0x30,%esp 10cc4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cc50: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10cc53: 8d 45 e4 lea -0x1c(%ebp),%eax 10cc56: 50 push %eax 10cc57: 53 push %ebx 10cc58: 68 80 a3 12 00 push $0x12a380 10cc5d: e8 6a 20 00 00 call 10eccc <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10cc62: 83 c4 10 add $0x10,%esp 10cc65: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc68: 85 ff test %edi,%edi 10cc6a: 74 10 je 10cc7c the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 10cc6c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc71: 8d 65 f4 lea -0xc(%ebp),%esp 10cc74: 5b pop %ebx 10cc75: 5e pop %esi 10cc76: 5f pop %edi 10cc77: c9 leave 10cc78: c3 ret 10cc79: 8d 76 00 lea 0x0(%esi),%esi the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10cc7c: 8b 50 40 mov 0x40(%eax),%edx 10cc7f: 3b 15 38 a5 12 00 cmp 0x12a538,%edx 10cc85: 74 15 je 10cc9c _Thread_Enable_dispatch(); 10cc87: e8 88 28 00 00 call 10f514 <_Thread_Enable_dispatch> 10cc8c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc91: 8d 65 f4 lea -0xc(%ebp),%esp 10cc94: 5b pop %ebx 10cc95: 5e pop %esi 10cc96: 5f pop %edi 10cc97: c9 leave 10cc98: c3 ret 10cc99: 8d 76 00 lea 0x0(%esi),%esi if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10cc9c: 85 f6 test %esi,%esi 10cc9e: 0f 84 b0 00 00 00 je 10cd54 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10cca4: 9c pushf 10cca5: fa cli 10cca6: 5f pop %edi switch ( the_period->state ) { 10cca7: 8b 50 38 mov 0x38(%eax),%edx 10ccaa: 83 fa 02 cmp $0x2,%edx 10ccad: 0f 84 bd 00 00 00 je 10cd70 10ccb3: 83 fa 04 cmp $0x4,%edx 10ccb6: 74 5c je 10cd14 10ccb8: 85 d2 test %edx,%edx 10ccba: 75 b0 jne 10cc6c <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10ccbc: 57 push %edi 10ccbd: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10ccbe: 83 ec 0c sub $0xc,%esp 10ccc1: 50 push %eax 10ccc2: 89 45 d4 mov %eax,-0x2c(%ebp) 10ccc5: e8 7e fd ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10ccca: 8b 45 d4 mov -0x2c(%ebp),%eax 10cccd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ccd4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10ccdb: c7 40 2c 9c d0 10 00 movl $0x10d09c,0x2c(%eax) the_watchdog->id = id; 10cce2: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10cce5: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10ccec: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ccef: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ccf2: 5a pop %edx 10ccf3: 59 pop %ecx 10ccf4: 83 c0 10 add $0x10,%eax 10ccf7: 50 push %eax 10ccf8: 68 58 a5 12 00 push $0x12a558 10ccfd: e8 e6 38 00 00 call 1105e8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd02: e8 0d 28 00 00 call 10f514 <_Thread_Enable_dispatch> 10cd07: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cd09: 83 c4 10 add $0x10,%esp 10cd0c: e9 60 ff ff ff jmp 10cc71 10cd11: 8d 76 00 lea 0x0(%esi),%esi case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10cd14: 83 ec 0c sub $0xc,%esp 10cd17: 50 push %eax 10cd18: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd1b: e8 34 fe ff ff call 10cb54 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10cd20: 57 push %edi 10cd21: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10cd22: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd25: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10cd2c: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cd2f: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cd32: 59 pop %ecx 10cd33: 5b pop %ebx 10cd34: 83 c0 10 add $0x10,%eax 10cd37: 50 push %eax 10cd38: 68 58 a5 12 00 push $0x12a558 10cd3d: e8 a6 38 00 00 call 1105e8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd42: e8 cd 27 00 00 call 10f514 <_Thread_Enable_dispatch> 10cd47: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 10cd4c: 83 c4 10 add $0x10,%esp 10cd4f: e9 1d ff ff ff jmp 10cc71 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10cd54: 8b 40 38 mov 0x38(%eax),%eax 10cd57: 83 f8 04 cmp $0x4,%eax 10cd5a: 76 74 jbe 10cdd0 <== ALWAYS TAKEN 10cd5c: 31 c0 xor %eax,%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10cd5e: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd61: e8 ae 27 00 00 call 10f514 <_Thread_Enable_dispatch> return( return_value ); 10cd66: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd69: e9 03 ff ff ff jmp 10cc71 10cd6e: 66 90 xchg %ax,%ax case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10cd70: 83 ec 0c sub $0xc,%esp 10cd73: 50 push %eax 10cd74: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd77: e8 d8 fd ff ff call 10cb54 <_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; 10cd7c: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd7f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10cd86: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10cd89: 57 push %edi 10cd8a: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10cd8b: 8b 15 38 a5 12 00 mov 0x12a538,%edx 10cd91: 8b 48 08 mov 0x8(%eax),%ecx 10cd94: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10cd97: 5e pop %esi 10cd98: 5f pop %edi 10cd99: 68 00 40 00 00 push $0x4000 10cd9e: 52 push %edx 10cd9f: 89 45 d4 mov %eax,-0x2c(%ebp) 10cda2: e8 49 30 00 00 call 10fdf0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10cda7: 9c pushf 10cda8: fa cli 10cda9: 59 pop %ecx local_state = the_period->state; 10cdaa: 8b 45 d4 mov -0x2c(%ebp),%eax 10cdad: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10cdb0: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10cdb7: 51 push %ecx 10cdb8: 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 ) 10cdb9: 83 c4 10 add $0x10,%esp 10cdbc: 83 fa 03 cmp $0x3,%edx 10cdbf: 74 18 je 10cdd9 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10cdc1: e8 4e 27 00 00 call 10f514 <_Thread_Enable_dispatch> 10cdc6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cdc8: e9 a4 fe ff ff jmp 10cc71 10cdcd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10cdd0: 8b 04 85 28 3b 12 00 mov 0x123b28(,%eax,4),%eax 10cdd7: eb 85 jmp 10cd5e /* * 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 ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10cdd9: 83 ec 08 sub $0x8,%esp 10cddc: 68 00 40 00 00 push $0x4000 10cde1: ff 35 38 a5 12 00 pushl 0x12a538 10cde7: e8 80 23 00 00 call 10f16c <_Thread_Clear_state> 10cdec: 83 c4 10 add $0x10,%esp 10cdef: eb d0 jmp 10cdc1 =============================================================================== 0010cdf4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10cdf4: 55 push %ebp 10cdf5: 89 e5 mov %esp,%ebp 10cdf7: 57 push %edi 10cdf8: 56 push %esi 10cdf9: 53 push %ebx 10cdfa: 83 ec 7c sub $0x7c,%esp 10cdfd: 8b 7d 08 mov 0x8(%ebp),%edi 10ce00: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10ce03: 85 f6 test %esi,%esi 10ce05: 0f 84 bd 00 00 00 je 10cec8 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10ce0b: 83 ec 08 sub $0x8,%esp 10ce0e: 68 3c 3b 12 00 push $0x123b3c 10ce13: 57 push %edi 10ce14: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10ce16: 59 pop %ecx 10ce17: 5b pop %ebx 10ce18: 68 74 3b 12 00 push $0x123b74 10ce1d: 57 push %edi 10ce1e: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 10ce20: 58 pop %eax 10ce21: 5a pop %edx 10ce22: 68 98 3b 12 00 push $0x123b98 10ce27: 57 push %edi 10ce28: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10ce2a: 59 pop %ecx 10ce2b: 5b pop %ebx 10ce2c: 68 bc 3b 12 00 push $0x123bbc 10ce31: 57 push %edi 10ce32: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10ce34: 58 pop %eax 10ce35: 5a pop %edx 10ce36: 68 08 3c 12 00 push $0x123c08 10ce3b: 57 push %edi 10ce3c: ff d6 call *%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 ; 10ce3e: 8b 1d 88 a3 12 00 mov 0x12a388,%ebx 10ce44: 83 c4 10 add $0x10,%esp 10ce47: 3b 1d 8c a3 12 00 cmp 0x12a38c,%ebx 10ce4d: 77 79 ja 10cec8 <== NEVER TAKEN 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); 10ce4f: 89 75 84 mov %esi,-0x7c(%ebp) 10ce52: eb 09 jmp 10ce5d * 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++ ) { 10ce54: 43 inc %ebx /* * 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 ; 10ce55: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10ce5b: 72 6b jb 10cec8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10ce5d: 83 ec 08 sub $0x8,%esp 10ce60: 8d 45 88 lea -0x78(%ebp),%eax 10ce63: 50 push %eax 10ce64: 53 push %ebx 10ce65: e8 0e 60 00 00 call 112e78 if ( status != RTEMS_SUCCESSFUL ) 10ce6a: 83 c4 10 add $0x10,%esp 10ce6d: 85 c0 test %eax,%eax 10ce6f: 75 e3 jne 10ce54 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10ce71: 83 ec 08 sub $0x8,%esp 10ce74: 8d 55 c0 lea -0x40(%ebp),%edx 10ce77: 52 push %edx 10ce78: 53 push %ebx 10ce79: e8 a6 60 00 00 call 112f24 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10ce7e: 83 c4 0c add $0xc,%esp 10ce81: 8d 45 e3 lea -0x1d(%ebp),%eax 10ce84: 50 push %eax 10ce85: 6a 05 push $0x5 10ce87: ff 75 c0 pushl -0x40(%ebp) 10ce8a: e8 a9 02 00 00 call 10d138 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10ce8f: 59 pop %ecx 10ce90: 5e pop %esi 10ce91: ff 75 8c pushl -0x74(%ebp) 10ce94: ff 75 88 pushl -0x78(%ebp) 10ce97: 8d 55 e3 lea -0x1d(%ebp),%edx 10ce9a: 52 push %edx 10ce9b: 53 push %ebx 10ce9c: 68 5a 3b 12 00 push $0x123b5a 10cea1: 57 push %edi 10cea2: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10cea5: 8b 45 88 mov -0x78(%ebp),%eax 10cea8: 83 c4 20 add $0x20,%esp 10ceab: 85 c0 test %eax,%eax 10cead: 75 21 jne 10ced0 (*print)( context, "\n" ); 10ceaf: 83 ec 08 sub $0x8,%esp 10ceb2: 68 fd 1c 12 00 push $0x121cfd 10ceb7: 57 push %edi 10ceb8: ff 55 84 call *-0x7c(%ebp) continue; 10cebb: 83 c4 10 add $0x10,%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++ ) { 10cebe: 43 inc %ebx /* * 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 ; 10cebf: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10cec5: 73 96 jae 10ce5d <== ALWAYS TAKEN 10cec7: 90 nop the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10cec8: 8d 65 f4 lea -0xc(%ebp),%esp 10cecb: 5b pop %ebx 10cecc: 5e pop %esi 10cecd: 5f pop %edi 10cece: c9 leave 10cecf: c3 ret 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 ); 10ced0: 52 push %edx 10ced1: 8d 55 d8 lea -0x28(%ebp),%edx 10ced4: 52 push %edx 10ced5: 50 push %eax 10ced6: 8d 45 a0 lea -0x60(%ebp),%eax 10ced9: 50 push %eax 10ceda: e8 71 33 00 00 call 110250 <_Timespec_Divide_by_integer> (*print)( context, 10cedf: 8b 4d dc mov -0x24(%ebp),%ecx 10cee2: be d3 4d 62 10 mov $0x10624dd3,%esi 10cee7: 89 c8 mov %ecx,%eax 10cee9: f7 ee imul %esi 10ceeb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cef1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cef7: c1 f8 06 sar $0x6,%eax 10cefa: c1 f9 1f sar $0x1f,%ecx 10cefd: 29 c8 sub %ecx,%eax 10ceff: 50 push %eax 10cf00: ff 75 d8 pushl -0x28(%ebp) 10cf03: 8b 4d 9c mov -0x64(%ebp),%ecx 10cf06: 89 c8 mov %ecx,%eax 10cf08: f7 ee imul %esi 10cf0a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf10: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf16: c1 f8 06 sar $0x6,%eax 10cf19: c1 f9 1f sar $0x1f,%ecx 10cf1c: 29 c8 sub %ecx,%eax 10cf1e: 50 push %eax 10cf1f: ff 75 98 pushl -0x68(%ebp) 10cf22: 8b 4d 94 mov -0x6c(%ebp),%ecx 10cf25: 89 c8 mov %ecx,%eax 10cf27: f7 ee imul %esi 10cf29: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cf2f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf35: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf3b: c1 f8 06 sar $0x6,%eax 10cf3e: c1 f9 1f sar $0x1f,%ecx 10cf41: 29 c8 sub %ecx,%eax 10cf43: 50 push %eax 10cf44: ff 75 90 pushl -0x70(%ebp) 10cf47: 68 54 3c 12 00 push $0x123c54 10cf4c: 57 push %edi 10cf4d: ff 55 84 call *-0x7c(%ebp) 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); 10cf50: 83 c4 2c add $0x2c,%esp 10cf53: 8d 55 d8 lea -0x28(%ebp),%edx 10cf56: 52 push %edx 10cf57: ff 75 88 pushl -0x78(%ebp) 10cf5a: 8d 45 b8 lea -0x48(%ebp),%eax 10cf5d: 50 push %eax 10cf5e: e8 ed 32 00 00 call 110250 <_Timespec_Divide_by_integer> (*print)( context, 10cf63: 8b 4d dc mov -0x24(%ebp),%ecx 10cf66: 89 c8 mov %ecx,%eax 10cf68: f7 ee imul %esi 10cf6a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf70: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf76: c1 f8 06 sar $0x6,%eax 10cf79: c1 f9 1f sar $0x1f,%ecx 10cf7c: 29 c8 sub %ecx,%eax 10cf7e: 50 push %eax 10cf7f: ff 75 d8 pushl -0x28(%ebp) 10cf82: 8b 4d b4 mov -0x4c(%ebp),%ecx 10cf85: 89 c8 mov %ecx,%eax 10cf87: f7 ee imul %esi 10cf89: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf8f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf95: c1 f8 06 sar $0x6,%eax 10cf98: c1 f9 1f sar $0x1f,%ecx 10cf9b: 29 c8 sub %ecx,%eax 10cf9d: 50 push %eax 10cf9e: ff 75 b0 pushl -0x50(%ebp) 10cfa1: 8b 4d ac mov -0x54(%ebp),%ecx 10cfa4: 89 c8 mov %ecx,%eax 10cfa6: f7 ee imul %esi 10cfa8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cfae: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cfb4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 10cfba: c1 fe 06 sar $0x6,%esi 10cfbd: 89 c8 mov %ecx,%eax 10cfbf: 99 cltd 10cfc0: 29 d6 sub %edx,%esi 10cfc2: 56 push %esi 10cfc3: ff 75 a8 pushl -0x58(%ebp) 10cfc6: 68 74 3c 12 00 push $0x123c74 10cfcb: 57 push %edi 10cfcc: ff 55 84 call *-0x7c(%ebp) 10cfcf: 83 c4 30 add $0x30,%esp 10cfd2: e9 7d fe ff ff jmp 10ce54 =============================================================================== 0010cff0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10cff0: 55 push %ebp 10cff1: 89 e5 mov %esp,%ebp 10cff3: 53 push %ebx 10cff4: 83 ec 04 sub $0x4,%esp 10cff7: a1 78 a4 12 00 mov 0x12a478,%eax 10cffc: 40 inc %eax 10cffd: a3 78 a4 12 00 mov %eax,0x12a478 /* * Cycle through all possible ids and try to reset 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 ; 10d002: 8b 1d 88 a3 12 00 mov 0x12a388,%ebx 10d008: 3b 1d 8c a3 12 00 cmp 0x12a38c,%ebx 10d00e: 77 15 ja 10d025 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10d010: 83 ec 0c sub $0xc,%esp 10d013: 53 push %ebx 10d014: e8 17 00 00 00 call 10d030 * Cycle through all possible ids and try to reset 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++ ) { 10d019: 43 inc %ebx /* * Cycle through all possible ids and try to reset 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 ; 10d01a: 83 c4 10 add $0x10,%esp 10d01d: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10d023: 73 eb jae 10d010 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10d025: 8b 5d fc mov -0x4(%ebp),%ebx 10d028: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10d029: e9 e6 24 00 00 jmp 10f514 <_Thread_Enable_dispatch> =============================================================================== 0010d030 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10d030: 55 push %ebp 10d031: 89 e5 mov %esp,%ebp 10d033: 57 push %edi 10d034: 53 push %ebx 10d035: 83 ec 14 sub $0x14,%esp 10d038: 8d 45 f4 lea -0xc(%ebp),%eax 10d03b: 50 push %eax 10d03c: ff 75 08 pushl 0x8(%ebp) 10d03f: 68 80 a3 12 00 push $0x12a380 10d044: e8 83 1c 00 00 call 10eccc <_Objects_Get> 10d049: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d04b: 83 c4 10 add $0x10,%esp 10d04e: 8b 45 f4 mov -0xc(%ebp),%eax 10d051: 85 c0 test %eax,%eax 10d053: 75 3b jne 10d090 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10d055: 8d 5a 54 lea 0x54(%edx),%ebx 10d058: b9 38 00 00 00 mov $0x38,%ecx 10d05d: 31 c0 xor %eax,%eax 10d05f: 89 df mov %ebx,%edi 10d061: f3 aa rep stos %al,%es:(%edi) 10d063: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10d06a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10d071: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10d078: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10d07f: e8 90 24 00 00 call 10f514 <_Thread_Enable_dispatch> 10d084: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d086: 8d 65 f8 lea -0x8(%ebp),%esp 10d089: 5b pop %ebx 10d08a: 5f pop %edi 10d08b: c9 leave 10d08c: c3 ret 10d08d: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d090: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d095: 8d 65 f8 lea -0x8(%ebp),%esp 10d098: 5b pop %ebx 10d099: 5f pop %edi 10d09a: c9 leave 10d09b: c3 ret =============================================================================== 00117b18 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117b18: 55 push %ebp 117b19: 89 e5 mov %esp,%ebp 117b1b: 57 push %edi 117b1c: 56 push %esi 117b1d: 53 push %ebx 117b1e: 83 ec 1c sub $0x1c,%esp 117b21: 8b 75 08 mov 0x8(%ebp),%esi 117b24: 8b 5d 0c mov 0xc(%ebp),%ebx 117b27: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117b2a: 85 f6 test %esi,%esi 117b2c: 0f 84 92 00 00 00 je 117bc4 return RTEMS_INVALID_NAME; if ( !starting_address ) 117b32: 85 db test %ebx,%ebx 117b34: 74 09 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !id ) 117b36: 85 ff test %edi,%edi 117b38: 74 05 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117b3a: f6 c3 03 test $0x3,%bl 117b3d: 74 0d je 117b4c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 117b3f: b8 09 00 00 00 mov $0x9,%eax } 117b44: 8d 65 f4 lea -0xc(%ebp),%esp 117b47: 5b pop %ebx 117b48: 5e pop %esi 117b49: 5f pop %edi 117b4a: c9 leave 117b4b: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117b4c: 83 ec 0c sub $0xc,%esp 117b4f: ff 35 90 2c 14 00 pushl 0x142c90 117b55: e8 fe 24 00 00 call 11a058 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 117b5a: c7 04 24 e0 2a 14 00 movl $0x142ae0,(%esp) 117b61: e8 52 38 00 00 call 11b3b8 <_Objects_Allocate> 117b66: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 117b68: 83 c4 10 add $0x10,%esp 117b6b: 85 c0 test %eax,%eax 117b6d: 74 65 je 117bd4 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117b6f: ff 75 14 pushl 0x14(%ebp) 117b72: ff 75 10 pushl 0x10(%ebp) 117b75: 53 push %ebx 117b76: 8d 40 68 lea 0x68(%eax),%eax 117b79: 50 push %eax 117b7a: 89 55 e4 mov %edx,-0x1c(%ebp) 117b7d: e8 1a 33 00 00 call 11ae9c <_Heap_Initialize> 117b82: 8b 55 e4 mov -0x1c(%ebp),%edx 117b85: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 117b88: 83 c4 10 add $0x10,%esp 117b8b: 85 c0 test %eax,%eax 117b8d: 75 4d jne 117bdc */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117b8f: 83 ec 08 sub $0x8,%esp 117b92: 52 push %edx 117b93: 68 e0 2a 14 00 push $0x142ae0 117b98: e8 9b 3b 00 00 call 11b738 <_Objects_Free> 117b9d: b8 08 00 00 00 mov $0x8,%eax 117ba2: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 117ba5: 83 ec 0c sub $0xc,%esp 117ba8: ff 35 90 2c 14 00 pushl 0x142c90 117bae: 89 45 e4 mov %eax,-0x1c(%ebp) 117bb1: e8 ea 24 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117bb6: 83 c4 10 add $0x10,%esp 117bb9: 8b 45 e4 mov -0x1c(%ebp),%eax } 117bbc: 8d 65 f4 lea -0xc(%ebp),%esp 117bbf: 5b pop %ebx 117bc0: 5e pop %esi 117bc1: 5f pop %edi 117bc2: c9 leave 117bc3: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117bc4: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117bc9: 8d 65 f4 lea -0xc(%ebp),%esp 117bcc: 5b pop %ebx 117bcd: 5e pop %esi 117bce: 5f pop %edi 117bcf: c9 leave 117bd0: c3 ret 117bd1: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 117bd4: b8 05 00 00 00 mov $0x5,%eax 117bd9: eb ca jmp 117ba5 117bdb: 90 nop return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117bdc: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117bdf: 8b 45 10 mov 0x10(%ebp),%eax 117be2: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 117be5: 8b 45 14 mov 0x14(%ebp),%eax 117be8: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117beb: 8b 45 18 mov 0x18(%ebp),%eax 117bee: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117bf1: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117bf8: 6a 06 push $0x6 117bfa: 6a 40 push $0x40 117bfc: 8b 45 18 mov 0x18(%ebp),%eax 117bff: c1 e8 02 shr $0x2,%eax 117c02: 83 e0 01 and $0x1,%eax 117c05: 50 push %eax 117c06: 8d 42 10 lea 0x10(%edx),%eax 117c09: 50 push %eax 117c0a: 89 55 e4 mov %edx,-0x1c(%ebp) 117c0d: e8 ca 4c 00 00 call 11c8dc <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117c12: 8b 55 e4 mov -0x1c(%ebp),%edx 117c15: 8b 42 08 mov 0x8(%edx),%eax 117c18: 0f b7 d8 movzwl %ax,%ebx 117c1b: 8b 0d fc 2a 14 00 mov 0x142afc,%ecx 117c21: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 117c24: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 117c27: 89 07 mov %eax,(%edi) 117c29: 31 c0 xor %eax,%eax 117c2b: 83 c4 10 add $0x10,%esp 117c2e: e9 72 ff ff ff jmp 117ba5 =============================================================================== 00117c34 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117c34: 55 push %ebp 117c35: 89 e5 mov %esp,%ebp 117c37: 53 push %ebx 117c38: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117c3b: ff 35 90 2c 14 00 pushl 0x142c90 117c41: e8 12 24 00 00 call 11a058 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117c46: 83 c4 0c add $0xc,%esp 117c49: 8d 45 f4 lea -0xc(%ebp),%eax 117c4c: 50 push %eax 117c4d: ff 75 08 pushl 0x8(%ebp) 117c50: 68 e0 2a 14 00 push $0x142ae0 117c55: e8 0e 3c 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117c5a: 83 c4 10 add $0x10,%esp 117c5d: 8b 5d f4 mov -0xc(%ebp),%ebx 117c60: 85 db test %ebx,%ebx 117c62: 74 1c je 117c80 117c64: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117c69: 83 ec 0c sub $0xc,%esp 117c6c: ff 35 90 2c 14 00 pushl 0x142c90 117c72: e8 29 24 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; } 117c77: 89 d8 mov %ebx,%eax 117c79: 8b 5d fc mov -0x4(%ebp),%ebx 117c7c: c9 leave 117c7d: c3 ret 117c7e: 66 90 xchg %ax,%ax the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 117c80: 8b 48 64 mov 0x64(%eax),%ecx 117c83: 85 c9 test %ecx,%ecx 117c85: 74 09 je 117c90 117c87: bb 0c 00 00 00 mov $0xc,%ebx 117c8c: eb db jmp 117c69 117c8e: 66 90 xchg %ax,%ax return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 117c90: 83 ec 08 sub $0x8,%esp 117c93: 50 push %eax 117c94: 68 e0 2a 14 00 push $0x142ae0 117c99: 89 45 e4 mov %eax,-0x1c(%ebp) 117c9c: e8 93 37 00 00 call 11b434 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117ca1: 58 pop %eax 117ca2: 5a pop %edx 117ca3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ca6: 50 push %eax 117ca7: 68 e0 2a 14 00 push $0x142ae0 117cac: e8 87 3a 00 00 call 11b738 <_Objects_Free> 117cb1: 31 db xor %ebx,%ebx 117cb3: 83 c4 10 add $0x10,%esp 117cb6: eb b1 jmp 117c69 =============================================================================== 00117cb8 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117cb8: 55 push %ebp 117cb9: 89 e5 mov %esp,%ebp 117cbb: 56 push %esi 117cbc: 53 push %ebx 117cbd: 83 ec 10 sub $0x10,%esp 117cc0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117cc3: 85 db test %ebx,%ebx 117cc5: 74 71 je 117d38 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117cc7: 83 ec 0c sub $0xc,%esp 117cca: ff 35 90 2c 14 00 pushl 0x142c90 117cd0: e8 83 23 00 00 call 11a058 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117cd5: 83 c4 0c add $0xc,%esp 117cd8: 8d 45 f0 lea -0x10(%ebp),%eax 117cdb: 50 push %eax 117cdc: ff 75 08 pushl 0x8(%ebp) 117cdf: 68 e0 2a 14 00 push $0x142ae0 117ce4: e8 7f 3b 00 00 call 11b868 <_Objects_Get_no_protection> 117ce9: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 117ceb: 83 c4 10 add $0x10,%esp 117cee: 8b 45 f0 mov -0x10(%ebp),%eax 117cf1: 85 c0 test %eax,%eax 117cf3: 74 1f je 117d14 117cf5: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117cfa: 83 ec 0c sub $0xc,%esp 117cfd: ff 35 90 2c 14 00 pushl 0x142c90 117d03: e8 98 23 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117d08: 83 c4 10 add $0x10,%esp } 117d0b: 89 d8 mov %ebx,%eax 117d0d: 8d 65 f8 lea -0x8(%ebp),%esp 117d10: 5b pop %ebx 117d11: 5e pop %esi 117d12: c9 leave 117d13: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 117d14: 8d 45 f4 lea -0xc(%ebp),%eax 117d17: 50 push %eax 117d18: ff 75 10 pushl 0x10(%ebp) 117d1b: 53 push %ebx 117d1c: 8d 46 68 lea 0x68(%esi),%eax 117d1f: 50 push %eax 117d20: e8 7f 2e 00 00 call 11aba4 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 117d25: 83 c4 10 add $0x10,%esp 117d28: 85 c0 test %eax,%eax 117d2a: 74 18 je 117d44 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d2c: 48 dec %eax 117d2d: 74 25 je 117d54 117d2f: bb 18 00 00 00 mov $0x18,%ebx 117d34: eb c4 jmp 117cfa 117d36: 66 90 xchg %ax,%ax Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117d38: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117d3a: 89 d8 mov %ebx,%eax 117d3c: 8d 65 f8 lea -0x8(%ebp),%esp 117d3f: 5b pop %ebx 117d40: 5e pop %esi 117d41: c9 leave 117d42: c3 ret 117d43: 90 nop length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 117d44: 8b 45 f4 mov -0xc(%ebp),%eax 117d47: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117d4a: 01 46 5c add %eax,0x5c(%esi) 117d4d: 31 db xor %ebx,%ebx 117d4f: eb a9 jmp 117cfa 117d51: 8d 76 00 lea 0x0(%esi),%esi return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d54: bb 09 00 00 00 mov $0x9,%ebx 117d59: eb 9f jmp 117cfa =============================================================================== 00117d5c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117d5c: 55 push %ebp 117d5d: 89 e5 mov %esp,%ebp 117d5f: 53 push %ebx 117d60: 83 ec 14 sub $0x14,%esp 117d63: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117d66: 85 db test %ebx,%ebx 117d68: 74 76 je 117de0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117d6a: 83 ec 0c sub $0xc,%esp 117d6d: ff 35 90 2c 14 00 pushl 0x142c90 117d73: e8 e0 22 00 00 call 11a058 <_API_Mutex_Lock> 117d78: 83 c4 0c add $0xc,%esp 117d7b: 8d 45 f4 lea -0xc(%ebp),%eax 117d7e: 50 push %eax 117d7f: ff 75 08 pushl 0x8(%ebp) 117d82: 68 e0 2a 14 00 push $0x142ae0 117d87: e8 dc 3a 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117d8c: 83 c4 10 add $0x10,%esp 117d8f: 8b 55 f4 mov -0xc(%ebp),%edx 117d92: 85 d2 test %edx,%edx 117d94: 74 1e je 117db4 117d96: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117d9b: 83 ec 0c sub $0xc,%esp 117d9e: ff 35 90 2c 14 00 pushl 0x142c90 117da4: e8 f7 22 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117da9: 83 c4 10 add $0x10,%esp } 117dac: 89 d8 mov %ebx,%eax 117dae: 8b 5d fc mov -0x4(%ebp),%ebx 117db1: c9 leave 117db2: c3 ret 117db3: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 117db4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117dbb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117dc2: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117dc9: 83 ec 08 sub $0x8,%esp 117dcc: 53 push %ebx 117dcd: 83 c0 68 add $0x68,%eax 117dd0: 50 push %eax 117dd1: e8 de 2f 00 00 call 11adb4 <_Heap_Get_free_information> 117dd6: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117dd8: 83 c4 10 add $0x10,%esp 117ddb: eb be jmp 117d9b 117ddd: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117de0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117de2: 89 d8 mov %ebx,%eax 117de4: 8b 5d fc mov -0x4(%ebp),%ebx 117de7: c9 leave 117de8: c3 ret =============================================================================== 00117e64 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117e64: 55 push %ebp 117e65: 89 e5 mov %esp,%ebp 117e67: 57 push %edi 117e68: 56 push %esi 117e69: 53 push %ebx 117e6a: 83 ec 2c sub $0x2c,%esp 117e6d: 8b 75 0c mov 0xc(%ebp),%esi 117e70: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117e73: 85 db test %ebx,%ebx 117e75: 0f 84 a1 00 00 00 je 117f1c return RTEMS_INVALID_ADDRESS; *segment = NULL; 117e7b: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117e81: 85 f6 test %esi,%esi 117e83: 75 0f jne 117e94 117e85: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117e8a: 8d 65 f4 lea -0xc(%ebp),%esp 117e8d: 5b pop %ebx 117e8e: 5e pop %esi 117e8f: 5f pop %edi 117e90: c9 leave 117e91: c3 ret 117e92: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117e94: 83 ec 0c sub $0xc,%esp 117e97: ff 35 90 2c 14 00 pushl 0x142c90 117e9d: e8 b6 21 00 00 call 11a058 <_API_Mutex_Lock> executing = _Thread_Executing; 117ea2: a1 98 2c 14 00 mov 0x142c98,%eax 117ea7: 89 45 d4 mov %eax,-0x2c(%ebp) 117eaa: 83 c4 0c add $0xc,%esp 117ead: 8d 45 e4 lea -0x1c(%ebp),%eax 117eb0: 50 push %eax 117eb1: ff 75 08 pushl 0x8(%ebp) 117eb4: 68 e0 2a 14 00 push $0x142ae0 117eb9: e8 aa 39 00 00 call 11b868 <_Objects_Get_no_protection> 117ebe: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117ec0: 83 c4 10 add $0x10,%esp 117ec3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ec6: 85 c0 test %eax,%eax 117ec8: 75 2a jne 117ef4 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117eca: 3b 77 5c cmp 0x5c(%edi),%esi 117ecd: 76 2d jbe 117efc 117ecf: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117ed4: 83 ec 0c sub $0xc,%esp 117ed7: ff 35 90 2c 14 00 pushl 0x142c90 117edd: 89 45 d0 mov %eax,-0x30(%ebp) 117ee0: e8 bb 21 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117ee5: 83 c4 10 add $0x10,%esp 117ee8: 8b 45 d0 mov -0x30(%ebp),%eax } 117eeb: 8d 65 f4 lea -0xc(%ebp),%esp 117eee: 5b pop %ebx 117eef: 5e pop %esi 117ef0: 5f pop %edi 117ef1: c9 leave 117ef2: c3 ret 117ef3: 90 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 117ef4: b8 04 00 00 00 mov $0x4,%eax 117ef9: eb d9 jmp 117ed4 117efb: 90 nop * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 117efc: 6a 00 push $0x0 117efe: 6a 00 push $0x0 117f00: 56 push %esi 117f01: 8d 47 68 lea 0x68(%edi),%eax 117f04: 50 push %eax 117f05: e8 e6 2a 00 00 call 11a9f0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117f0a: 83 c4 10 add $0x10,%esp 117f0d: 85 c0 test %eax,%eax 117f0f: 74 17 je 117f28 the_region->number_of_used_blocks += 1; 117f11: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117f14: 89 03 mov %eax,(%ebx) 117f16: 31 c0 xor %eax,%eax 117f18: eb ba jmp 117ed4 117f1a: 66 90 xchg %ax,%ax Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117f1c: b8 09 00 00 00 mov $0x9,%eax 117f21: e9 64 ff ff ff jmp 117e8a 117f26: 66 90 xchg %ax,%ax if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 117f28: f6 45 10 01 testb $0x1,0x10(%ebp) 117f2c: 74 07 je 117f35 117f2e: b8 0d 00 00 00 mov $0xd,%eax 117f33: eb 9f jmp 117ed4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117f35: a1 d8 2b 14 00 mov 0x142bd8,%eax 117f3a: 40 inc %eax 117f3b: a3 d8 2b 14 00 mov %eax,0x142bd8 * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 117f40: 83 ec 0c sub $0xc,%esp 117f43: ff 35 90 2c 14 00 pushl 0x142c90 117f49: e8 52 21 00 00 call 11a0a0 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117f4e: 8d 47 10 lea 0x10(%edi),%eax 117f51: 8b 55 d4 mov -0x2c(%ebp),%edx 117f54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117f57: 8b 4d 08 mov 0x8(%ebp),%ecx 117f5a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117f5d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117f60: 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; 117f63: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 117f6a: 83 c4 0c add $0xc,%esp 117f6d: 68 8c c9 11 00 push $0x11c98c 117f72: ff 75 14 pushl 0x14(%ebp) 117f75: 50 push %eax 117f76: e8 01 47 00 00 call 11c67c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117f7b: e8 d4 41 00 00 call 11c154 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117f80: 8b 55 d4 mov -0x2c(%ebp),%edx 117f83: 8b 42 34 mov 0x34(%edx),%eax 117f86: 83 c4 10 add $0x10,%esp 117f89: e9 fc fe ff ff jmp 117e8a =============================================================================== 00117f90 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117f90: 55 push %ebp 117f91: 89 e5 mov %esp,%ebp 117f93: 56 push %esi 117f94: 53 push %ebx 117f95: 83 ec 20 sub $0x20,%esp 117f98: 8b 5d 0c mov 0xc(%ebp),%ebx 117f9b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117f9e: 85 db test %ebx,%ebx 117fa0: 74 72 je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 117fa2: 85 f6 test %esi,%esi 117fa4: 74 6e je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117fa6: 83 ec 0c sub $0xc,%esp 117fa9: ff 35 90 2c 14 00 pushl 0x142c90 117faf: e8 a4 20 00 00 call 11a058 <_API_Mutex_Lock> 117fb4: 83 c4 0c add $0xc,%esp 117fb7: 8d 45 f4 lea -0xc(%ebp),%eax 117fba: 50 push %eax 117fbb: ff 75 08 pushl 0x8(%ebp) 117fbe: 68 e0 2a 14 00 push $0x142ae0 117fc3: e8 a0 38 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117fc8: 83 c4 10 add $0x10,%esp 117fcb: 8b 55 f4 mov -0xc(%ebp),%edx 117fce: 85 d2 test %edx,%edx 117fd0: 75 36 jne 118008 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117fd2: 52 push %edx 117fd3: 56 push %esi 117fd4: 53 push %ebx 117fd5: 83 c0 68 add $0x68,%eax 117fd8: 50 push %eax 117fd9: e8 ee 32 00 00 call 11b2cc <_Heap_Size_of_alloc_area> 117fde: 83 c4 10 add $0x10,%esp 117fe1: 84 c0 test %al,%al 117fe3: 74 3b je 118020 <== NEVER TAKEN 117fe5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117fe7: 83 ec 0c sub $0xc,%esp 117fea: ff 35 90 2c 14 00 pushl 0x142c90 117ff0: 89 45 e4 mov %eax,-0x1c(%ebp) 117ff3: e8 a8 20 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117ff8: 83 c4 10 add $0x10,%esp 117ffb: 8b 45 e4 mov -0x1c(%ebp),%eax } 117ffe: 8d 65 f8 lea -0x8(%ebp),%esp 118001: 5b pop %ebx 118002: 5e pop %esi 118003: c9 leave 118004: c3 ret 118005: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 118008: 4a dec %edx 118009: 75 da jne 117fe5 <== NEVER TAKEN 11800b: b8 04 00 00 00 mov $0x4,%eax 118010: eb d5 jmp 117fe7 118012: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118014: b8 09 00 00 00 mov $0x9,%eax } 118019: 8d 65 f8 lea -0x8(%ebp),%esp 11801c: 5b pop %ebx 11801d: 5e pop %esi 11801e: c9 leave 11801f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 118020: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 118025: eb c0 jmp 117fe7 <== NOT EXECUTED =============================================================================== 0011804c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11804c: 55 push %ebp 11804d: 89 e5 mov %esp,%ebp 11804f: 56 push %esi 118050: 53 push %ebx 118051: 83 ec 20 sub $0x20,%esp 118054: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 118057: 85 db test %ebx,%ebx 118059: 0f 84 a5 00 00 00 je 118104 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11805f: 83 ec 0c sub $0xc,%esp 118062: ff 35 90 2c 14 00 pushl 0x142c90 118068: e8 eb 1f 00 00 call 11a058 <_API_Mutex_Lock> 11806d: 83 c4 0c add $0xc,%esp 118070: 8d 45 f0 lea -0x10(%ebp),%eax 118073: 50 push %eax 118074: ff 75 08 pushl 0x8(%ebp) 118077: 68 e0 2a 14 00 push $0x142ae0 11807c: e8 e7 37 00 00 call 11b868 <_Objects_Get_no_protection> 118081: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 118083: 83 c4 10 add $0x10,%esp 118086: 8b 45 f0 mov -0x10(%ebp),%eax 118089: 85 c0 test %eax,%eax 11808b: 74 1f je 1180ac default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11808d: 83 ec 0c sub $0xc,%esp 118090: ff 35 90 2c 14 00 pushl 0x142c90 118096: e8 05 20 00 00 call 11a0a0 <_API_Mutex_Unlock> 11809b: b8 04 00 00 00 mov $0x4,%eax return return_status; 1180a0: 83 c4 10 add $0x10,%esp } 1180a3: 8d 65 f8 lea -0x8(%ebp),%esp 1180a6: 5b pop %ebx 1180a7: 5e pop %esi 1180a8: c9 leave 1180a9: c3 ret 1180aa: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1180ac: 83 ec 0c sub $0xc,%esp 1180af: 8d 45 f4 lea -0xc(%ebp),%eax 1180b2: 50 push %eax 1180b3: 8d 45 ec lea -0x14(%ebp),%eax 1180b6: 50 push %eax 1180b7: ff 75 10 pushl 0x10(%ebp) 1180ba: ff 75 0c pushl 0xc(%ebp) 1180bd: 8d 46 68 lea 0x68(%esi),%eax 1180c0: 50 push %eax 1180c1: e8 fa 30 00 00 call 11b1c0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1180c6: 8b 55 ec mov -0x14(%ebp),%edx 1180c9: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1180cb: 83 c4 20 add $0x20,%esp 1180ce: 85 c0 test %eax,%eax 1180d0: 75 16 jne 1180e8 _Region_Process_queue( the_region ); /* unlocks allocator */ 1180d2: 83 ec 0c sub $0xc,%esp 1180d5: 56 push %esi 1180d6: e8 19 7c 00 00 call 11fcf4 <_Region_Process_queue> 1180db: 31 c0 xor %eax,%eax 1180dd: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1180e0: 8d 65 f8 lea -0x8(%ebp),%esp 1180e3: 5b pop %ebx 1180e4: 5e pop %esi 1180e5: c9 leave 1180e6: c3 ret 1180e7: 90 nop _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1180e8: 83 ec 0c sub $0xc,%esp 1180eb: ff 35 90 2c 14 00 pushl 0x142c90 1180f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1180f4: e8 a7 1f 00 00 call 11a0a0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1180f9: 83 c4 10 add $0x10,%esp 1180fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1180ff: 83 f8 01 cmp $0x1,%eax 118102: 74 0c je 118110 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118104: b8 09 00 00 00 mov $0x9,%eax } 118109: 8d 65 f8 lea -0x8(%ebp),%esp 11810c: 5b pop %ebx 11810d: 5e pop %esi 11810e: c9 leave 11810f: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 118110: b0 0d mov $0xd,%al 118112: eb 8f jmp 1180a3 =============================================================================== 00118114 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 118114: 55 push %ebp 118115: 89 e5 mov %esp,%ebp 118117: 53 push %ebx 118118: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11811b: ff 35 90 2c 14 00 pushl 0x142c90 118121: e8 32 1f 00 00 call 11a058 <_API_Mutex_Lock> 118126: 83 c4 0c add $0xc,%esp 118129: 8d 45 f4 lea -0xc(%ebp),%eax 11812c: 50 push %eax 11812d: ff 75 08 pushl 0x8(%ebp) 118130: 68 e0 2a 14 00 push $0x142ae0 118135: e8 2e 37 00 00 call 11b868 <_Objects_Get_no_protection> 11813a: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11813c: 83 c4 10 add $0x10,%esp 11813f: 8b 45 f4 mov -0xc(%ebp),%eax 118142: 85 c0 test %eax,%eax 118144: 74 1e je 118164 118146: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11814b: 83 ec 0c sub $0xc,%esp 11814e: ff 35 90 2c 14 00 pushl 0x142c90 118154: e8 47 1f 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 118159: 83 c4 10 add $0x10,%esp } 11815c: 89 d8 mov %ebx,%eax 11815e: 8b 5d fc mov -0x4(%ebp),%ebx 118161: c9 leave 118162: c3 ret 118163: 90 nop RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 118164: 83 ec 08 sub $0x8,%esp 118167: ff 75 0c pushl 0xc(%ebp) 11816a: 8d 43 68 lea 0x68(%ebx),%eax 11816d: 50 push %eax 11816e: e8 d1 2a 00 00 call 11ac44 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 118173: 83 c4 10 add $0x10,%esp 118176: 84 c0 test %al,%al 118178: 75 0a jne 118184 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11817a: bb 09 00 00 00 mov $0x9,%ebx 11817f: eb ca jmp 11814b 118181: 8d 76 00 lea 0x0(%esi),%esi _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 118184: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 118187: 83 ec 0c sub $0xc,%esp 11818a: 53 push %ebx 11818b: e8 64 7b 00 00 call 11fcf4 <_Region_Process_queue> 118190: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 118192: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 118195: 89 d8 mov %ebx,%eax 118197: 8b 5d fc mov -0x4(%ebp),%ebx 11819a: c9 leave 11819b: c3 ret =============================================================================== 0010ba30 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10ba30: 55 push %ebp 10ba31: 89 e5 mov %esp,%ebp 10ba33: 57 push %edi 10ba34: 56 push %esi 10ba35: 53 push %ebx 10ba36: 83 ec 3c sub $0x3c,%esp 10ba39: 8b 75 08 mov 0x8(%ebp),%esi 10ba3c: 8b 5d 10 mov 0x10(%ebp),%ebx 10ba3f: 8b 7d 18 mov 0x18(%ebp),%edi 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 ) ) 10ba42: 85 f6 test %esi,%esi 10ba44: 74 4a je 10ba90 return RTEMS_INVALID_NAME; if ( !id ) 10ba46: 85 ff test %edi,%edi 10ba48: 0f 84 f6 00 00 00 je 10bb44 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10ba4e: 89 da mov %ebx,%edx 10ba50: 81 e2 c0 00 00 00 and $0xc0,%edx 10ba56: 74 48 je 10baa0 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba58: 89 d8 mov %ebx,%eax 10ba5a: 83 e0 30 and $0x30,%eax 10ba5d: 83 f8 10 cmp $0x10,%eax 10ba60: 74 0e je 10ba70 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ba62: b8 0b 00 00 00 mov $0xb,%eax } 10ba67: 8d 65 f4 lea -0xc(%ebp),%esp 10ba6a: 5b pop %ebx 10ba6b: 5e pop %esi 10ba6c: 5f pop %edi 10ba6d: c9 leave 10ba6e: c3 ret 10ba6f: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba70: f6 c3 04 test $0x4,%bl 10ba73: 74 ed je 10ba62 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10ba75: 81 fa c0 00 00 00 cmp $0xc0,%edx 10ba7b: 74 e5 je 10ba62 10ba7d: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10ba82: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10ba86: 76 1f jbe 10baa7 10ba88: b8 0a 00 00 00 mov $0xa,%eax 10ba8d: eb d8 jmp 10ba67 10ba8f: 90 nop 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 ) ) 10ba90: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ba95: 8d 65 f4 lea -0xc(%ebp),%esp 10ba98: 5b pop %ebx 10ba99: 5e pop %esi 10ba9a: 5f pop %edi 10ba9b: c9 leave 10ba9c: c3 ret 10ba9d: 8d 76 00 lea 0x0(%esi),%esi if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10baa0: 89 d9 mov %ebx,%ecx 10baa2: 83 e1 30 and $0x30,%ecx 10baa5: 75 db jne 10ba82 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10baa7: a1 58 73 12 00 mov 0x127358,%eax 10baac: 40 inc %eax 10baad: a3 58 73 12 00 mov %eax,0x127358 * 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 ); 10bab2: 83 ec 0c sub $0xc,%esp 10bab5: 68 a0 72 12 00 push $0x1272a0 10baba: 89 4d c4 mov %ecx,-0x3c(%ebp) 10babd: e8 b6 13 00 00 call 10ce78 <_Objects_Allocate> 10bac2: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10bac4: 83 c4 10 add $0x10,%esp 10bac7: 85 c0 test %eax,%eax 10bac9: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bacc: 0f 84 ba 00 00 00 je 10bb8c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10bad2: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10bad5: 85 c9 test %ecx,%ecx 10bad7: 74 77 je 10bb50 /* * 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; 10bad9: 31 c0 xor %eax,%eax 10badb: f6 c3 04 test $0x4,%bl 10bade: 0f 95 c0 setne %al 10bae1: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10bae4: 83 f9 10 cmp $0x10,%ecx 10bae7: 0f 84 ae 00 00 00 je 10bb9b the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10baed: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10baf4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10baf8: 50 push %eax 10baf9: 31 c0 xor %eax,%eax 10bafb: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10baff: 0f 94 c0 sete %al 10bb02: 50 push %eax 10bb03: 8d 45 d0 lea -0x30(%ebp),%eax 10bb06: 50 push %eax 10bb07: 8d 42 14 lea 0x14(%edx),%eax 10bb0a: 50 push %eax 10bb0b: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb0e: e8 7d 0b 00 00 call 10c690 <_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 ) { 10bb13: 83 c4 10 add $0x10,%esp 10bb16: 83 f8 06 cmp $0x6,%eax 10bb19: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb1c: 0f 84 a9 00 00 00 je 10bbcb <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bb22: 8b 42 08 mov 0x8(%edx),%eax 10bb25: 0f b7 d8 movzwl %ax,%ebx 10bb28: 8b 0d bc 72 12 00 mov 0x1272bc,%ecx 10bb2e: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bb31: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10bb34: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10bb36: e8 35 20 00 00 call 10db70 <_Thread_Enable_dispatch> 10bb3b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bb3d: e9 25 ff ff ff jmp 10ba67 10bb42: 66 90 xchg %ax,%ax CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bb44: b8 09 00 00 00 mov $0x9,%eax 10bb49: e9 19 ff ff ff jmp 10ba67 10bb4e: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10bb50: 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; 10bb57: 31 c0 xor %eax,%eax 10bb59: f6 c3 04 test $0x4,%bl 10bb5c: 0f 95 c0 setne %al 10bb5f: 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; 10bb62: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10bb69: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10bb70: 51 push %ecx 10bb71: ff 75 0c pushl 0xc(%ebp) 10bb74: 8d 45 e0 lea -0x20(%ebp),%eax 10bb77: 50 push %eax 10bb78: 8d 42 14 lea 0x14(%edx),%eax 10bb7b: 50 push %eax 10bb7c: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb7f: e8 b0 0d 00 00 call 10c934 <_CORE_semaphore_Initialize> 10bb84: 83 c4 10 add $0x10,%esp 10bb87: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb8a: eb 96 jmp 10bb22 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10bb8c: e8 df 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bb91: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bb96: e9 cc fe ff ff jmp 10ba67 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10bb9b: 8b 45 14 mov 0x14(%ebp),%eax 10bb9e: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bba1: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10bba8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10bbac: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10bbb0: 0f 85 42 ff ff ff jne 10baf8 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10bbb6: f6 c3 40 test $0x40,%bl 10bbb9: 74 30 je 10bbeb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bbbb: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbc2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbc6: e9 2d ff ff ff jmp 10baf8 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bbcb: 83 ec 08 sub $0x8,%esp 10bbce: 52 push %edx 10bbcf: 68 a0 72 12 00 push $0x1272a0 10bbd4: e8 1f 16 00 00 call 10d1f8 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10bbd9: e8 92 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bbde: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10bbe3: 83 c4 10 add $0x10,%esp 10bbe6: e9 7c fe ff ff jmp 10ba67 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10bbeb: 84 db test %bl,%bl 10bbed: 0f 89 05 ff ff ff jns 10baf8 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10bbf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbfa: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbfe: e9 f5 fe ff ff jmp 10baf8 =============================================================================== 0010bc04 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 53 push %ebx 10bc08: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bc0b: 8d 45 f4 lea -0xc(%ebp),%eax 10bc0e: 50 push %eax 10bc0f: ff 75 08 pushl 0x8(%ebp) 10bc12: 68 a0 72 12 00 push $0x1272a0 10bc17: e8 0c 17 00 00 call 10d328 <_Objects_Get> 10bc1c: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bc1e: 83 c4 10 add $0x10,%esp 10bc21: 8b 4d f4 mov -0xc(%ebp),%ecx 10bc24: 85 c9 test %ecx,%ecx 10bc26: 74 0c je 10bc34 10bc28: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc2d: 8b 5d fc mov -0x4(%ebp),%ebx 10bc30: c9 leave 10bc31: c3 ret 10bc32: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10bc34: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10bc37: 83 e0 30 and $0x30,%eax 10bc3a: 74 58 je 10bc94 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10bc3c: 8b 53 64 mov 0x64(%ebx),%edx 10bc3f: 85 d2 test %edx,%edx 10bc41: 75 15 jne 10bc58 10bc43: 83 f8 20 cmp $0x20,%eax 10bc46: 74 10 je 10bc58 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10bc48: e8 23 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bc4d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc52: 8b 5d fc mov -0x4(%ebp),%ebx 10bc55: c9 leave 10bc56: c3 ret 10bc57: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10bc58: 50 push %eax 10bc59: 6a 04 push $0x4 10bc5b: 6a 00 push $0x0 10bc5d: 8d 43 14 lea 0x14(%ebx),%eax 10bc60: 50 push %eax 10bc61: e8 1e 0a 00 00 call 10c684 <_CORE_mutex_Flush> 10bc66: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10bc69: 83 ec 08 sub $0x8,%esp 10bc6c: 53 push %ebx 10bc6d: 68 a0 72 12 00 push $0x1272a0 10bc72: e8 7d 12 00 00 call 10cef4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bc77: 58 pop %eax 10bc78: 5a pop %edx 10bc79: 53 push %ebx 10bc7a: 68 a0 72 12 00 push $0x1272a0 10bc7f: e8 74 15 00 00 call 10d1f8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10bc84: e8 e7 1e 00 00 call 10db70 <_Thread_Enable_dispatch> 10bc89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bc8b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc8e: 8b 5d fc mov -0x4(%ebp),%ebx 10bc91: c9 leave 10bc92: c3 ret 10bc93: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10bc94: 51 push %ecx 10bc95: 6a 02 push $0x2 10bc97: 6a 00 push $0x0 10bc99: 8d 43 14 lea 0x14(%ebx),%eax 10bc9c: 50 push %eax 10bc9d: e8 86 0c 00 00 call 10c928 <_CORE_semaphore_Flush> 10bca2: 83 c4 10 add $0x10,%esp 10bca5: eb c2 jmp 10bc69 =============================================================================== 0010bca8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10bca8: 55 push %ebp 10bca9: 89 e5 mov %esp,%ebp 10bcab: 57 push %edi 10bcac: 56 push %esi 10bcad: 53 push %ebx 10bcae: 83 ec 1c sub $0x1c,%esp 10bcb1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcb4: 8b 75 0c mov 0xc(%ebp),%esi 10bcb7: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10bcba: 8d 45 e0 lea -0x20(%ebp),%eax 10bcbd: 50 push %eax 10bcbe: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcc1: 50 push %eax 10bcc2: 53 push %ebx 10bcc3: 68 a0 72 12 00 push $0x1272a0 10bcc8: e8 03 16 00 00 call 10d2d0 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10bccd: 83 c4 10 add $0x10,%esp 10bcd0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bcd3: 85 c9 test %ecx,%ecx 10bcd5: 74 0d je 10bce4 10bcd7: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10bcdc: 8d 65 f4 lea -0xc(%ebp),%esp 10bcdf: 5b pop %ebx 10bce0: 5e pop %esi 10bce1: 5f pop %edi 10bce2: c9 leave 10bce3: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10bce4: f6 40 10 30 testb $0x30,0x10(%eax) 10bce8: 74 36 je 10bd20 _CORE_mutex_Seize( 10bcea: 83 ec 0c sub $0xc,%esp 10bced: ff 75 e0 pushl -0x20(%ebp) 10bcf0: 57 push %edi 10bcf1: 83 e6 01 and $0x1,%esi 10bcf4: 83 f6 01 xor $0x1,%esi 10bcf7: 56 push %esi 10bcf8: 53 push %ebx 10bcf9: 83 c0 14 add $0x14,%eax 10bcfc: 50 push %eax 10bcfd: e8 86 0a 00 00 call 10c788 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10bd02: 83 c4 14 add $0x14,%esp 10bd05: a1 18 74 12 00 mov 0x127418,%eax 10bd0a: ff 70 34 pushl 0x34(%eax) 10bd0d: e8 12 01 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10bd12: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd15: 8d 65 f4 lea -0xc(%ebp),%esp 10bd18: 5b pop %ebx 10bd19: 5e pop %esi 10bd1a: 5f pop %edi 10bd1b: c9 leave 10bd1c: c3 ret 10bd1d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10bd20: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10bd26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10bd2d: 8b 48 5c mov 0x5c(%eax),%ecx 10bd30: 85 c9 test %ecx,%ecx 10bd32: 75 2c jne 10bd60 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10bd34: 83 e6 01 and $0x1,%esi 10bd37: 74 33 je 10bd6c _ISR_Enable( *level_p ); 10bd39: ff 75 e0 pushl -0x20(%ebp) 10bd3c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10bd3d: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10bd44: 83 ec 0c sub $0xc,%esp 10bd47: a1 18 74 12 00 mov 0x127418,%eax 10bd4c: ff 70 34 pushl 0x34(%eax) 10bd4f: e8 e0 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> 10bd54: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd57: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5a: 5b pop %ebx 10bd5b: 5e pop %esi 10bd5c: 5f pop %edi 10bd5d: c9 leave 10bd5e: c3 ret 10bd5f: 90 nop /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10bd60: 49 dec %ecx 10bd61: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10bd64: ff 75 e0 pushl -0x20(%ebp) 10bd67: 9d popf 10bd68: eb da jmp 10bd44 10bd6a: 66 90 xchg %ax,%ax 10bd6c: 8b 0d 58 73 12 00 mov 0x127358,%ecx 10bd72: 41 inc %ecx 10bd73: 89 0d 58 73 12 00 mov %ecx,0x127358 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; 10bd79: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10bd80: 83 c0 14 add $0x14,%eax 10bd83: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10bd86: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10bd89: ff 75 e0 pushl -0x20(%ebp) 10bd8c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10bd8d: 52 push %edx 10bd8e: 68 7c e3 10 00 push $0x10e37c 10bd93: 57 push %edi 10bd94: 50 push %eax 10bd95: e8 d2 22 00 00 call 10e06c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10bd9a: e8 d1 1d 00 00 call 10db70 <_Thread_Enable_dispatch> 10bd9f: 83 c4 10 add $0x10,%esp 10bda2: eb a0 jmp 10bd44 =============================================================================== 0010bda4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10bda4: 55 push %ebp 10bda5: 89 e5 mov %esp,%ebp 10bda7: 53 push %ebx 10bda8: 83 ec 18 sub $0x18,%esp 10bdab: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bdae: 8d 45 f4 lea -0xc(%ebp),%eax 10bdb1: 50 push %eax 10bdb2: 53 push %ebx 10bdb3: 68 a0 72 12 00 push $0x1272a0 10bdb8: e8 6b 15 00 00 call 10d328 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bdbd: 83 c4 10 add $0x10,%esp 10bdc0: 8b 55 f4 mov -0xc(%ebp),%edx 10bdc3: 85 d2 test %edx,%edx 10bdc5: 74 0d je 10bdd4 10bdc7: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdcc: 8b 5d fc mov -0x4(%ebp),%ebx 10bdcf: c9 leave 10bdd0: c3 ret 10bdd1: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10bdd4: f6 40 10 30 testb $0x30,0x10(%eax) 10bdd8: 75 26 jne 10be00 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10bdda: 52 push %edx 10bddb: 6a 00 push $0x0 10bddd: 53 push %ebx 10bdde: 83 c0 14 add $0x14,%eax 10bde1: 50 push %eax 10bde2: e8 8d 0b 00 00 call 10c974 <_CORE_semaphore_Surrender> 10bde7: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10bde9: e8 82 1d 00 00 call 10db70 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10bdee: 89 1c 24 mov %ebx,(%esp) 10bdf1: e8 3e 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10bdf6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdf9: 8b 5d fc mov -0x4(%ebp),%ebx 10bdfc: c9 leave 10bdfd: c3 ret 10bdfe: 66 90 xchg %ax,%ax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10be00: 51 push %ecx 10be01: 6a 00 push $0x0 10be03: 53 push %ebx 10be04: 83 c0 14 add $0x14,%eax 10be07: 50 push %eax 10be08: e8 1b 0a 00 00 call 10c828 <_CORE_mutex_Surrender> 10be0d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10be0f: e8 5c 1d 00 00 call 10db70 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10be14: 89 1c 24 mov %ebx,(%esp) 10be17: e8 08 00 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10be1c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be1f: 8b 5d fc mov -0x4(%ebp),%ebx 10be22: c9 leave 10be23: c3 ret =============================================================================== 00118670 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 118670: 55 push %ebp 118671: 89 e5 mov %esp,%ebp 118673: 53 push %ebx 118674: 83 ec 14 sub $0x14,%esp 118677: 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 ) 11867a: 85 db test %ebx,%ebx 11867c: 75 0a jne 118688 11867e: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118683: 8b 5d fc mov -0x4(%ebp),%ebx 118686: c9 leave 118687: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 118688: 83 ec 08 sub $0x8,%esp 11868b: 8d 45 f4 lea -0xc(%ebp),%eax 11868e: 50 push %eax 11868f: ff 75 08 pushl 0x8(%ebp) 118692: e8 0d 3b 00 00 call 11c1a4 <_Thread_Get> switch ( location ) { 118697: 83 c4 10 add $0x10,%esp 11869a: 8b 55 f4 mov -0xc(%ebp),%edx 11869d: 85 d2 test %edx,%edx 11869f: 74 0b je 1186ac 1186a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a6: 8b 5d fc mov -0x4(%ebp),%ebx 1186a9: c9 leave 1186aa: c3 ret 1186ab: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1186ac: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; 1186b2: 8b 4a 0c mov 0xc(%edx),%ecx 1186b5: 85 c9 test %ecx,%ecx 1186b7: 74 43 je 1186fc if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1186b9: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1186bd: 74 29 je 1186e8 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186bf: 9c pushf 1186c0: fa cli 1186c1: 59 pop %ecx *signal_set |= signals; 1186c2: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1186c5: 51 push %ecx 1186c6: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1186c7: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1186cb: 8b 15 74 2c 14 00 mov 0x142c74,%edx 1186d1: 85 d2 test %edx,%edx 1186d3: 74 1b je 1186f0 1186d5: 3b 05 98 2c 14 00 cmp 0x142c98,%eax 1186db: 75 13 jne 1186f0 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1186dd: c6 05 48 2d 14 00 01 movb $0x1,0x142d48 1186e4: eb 0a jmp 1186f0 1186e6: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186e8: 9c pushf 1186e9: fa cli 1186ea: 58 pop %eax *signal_set |= signals; 1186eb: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1186ee: 50 push %eax 1186ef: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1186f0: e8 5f 3a 00 00 call 11c154 <_Thread_Enable_dispatch> 1186f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f7: 8b 5d fc mov -0x4(%ebp),%ebx 1186fa: c9 leave 1186fb: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1186fc: e8 53 3a 00 00 call 11c154 <_Thread_Enable_dispatch> 118701: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 118706: e9 78 ff ff ff jmp 118683 =============================================================================== 00107bec : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 107bec: 55 push %ebp 107bed: 89 e5 mov %esp,%ebp 107bef: 57 push %edi 107bf0: 56 push %esi 107bf1: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 107bf4: 8b 50 08 mov 0x8(%eax),%edx 107bf7: 85 d2 test %edx,%edx 107bf9: 74 15 je 107c10 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 107bfb: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 107c01: 83 c7 08 add $0x8,%edi 107c04: be 20 85 12 00 mov $0x128520,%esi 107c09: b9 04 00 00 00 mov $0x4,%ecx 107c0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107c10: 5e pop %esi 107c11: 5f pop %edi 107c12: c9 leave 107c13: c3 ret =============================================================================== 00108004 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 108004: 55 push %ebp 108005: 89 e5 mov %esp,%ebp 108007: 57 push %edi 108008: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10800b: e8 94 ff ff ff call 107fa4 if (the_thread) 108010: 85 ff test %edi,%edi 108012: 74 12 je 108026 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 108014: 8b 8f c0 00 00 00 mov 0xc0(%edi),%ecx 10801a: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx 108020: b0 a5 mov $0xa5,%al 108022: 89 d7 mov %edx,%edi 108024: f3 aa rep stos %al,%es:(%edi) return true; } 108026: b0 01 mov $0x1,%al 108028: 5f pop %edi 108029: c9 leave 10802a: c3 ret =============================================================================== 00107ed4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 107ed4: 55 push %ebp 107ed5: 89 e5 mov %esp,%ebp 107ed7: 57 push %edi 107ed8: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107ed9: a1 78 87 12 00 mov 0x128778,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107ede: 8b b0 c4 00 00 00 mov 0xc4(%eax),%esi 107ee4: 39 f5 cmp %esi,%ebp 107ee6: 73 48 jae 107f30 <== ALWAYS TAKEN 107ee8: 31 c0 xor %eax,%eax /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107eea: 8b 0d c0 81 12 00 mov 0x1281c0,%ecx 107ef0: 85 c9 test %ecx,%ecx 107ef2: 75 28 jne 107f1c <== ALWAYS TAKEN 107ef4: b2 01 mov $0x1,%dl <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 107ef6: 84 c0 test %al,%al 107ef8: 74 04 je 107efe <== NEVER TAKEN 107efa: 84 d2 test %dl,%dl 107efc: 75 42 jne 107f40 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 107efe: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107f01: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f04: 52 push %edx <== NOT EXECUTED 107f05: ff 35 78 87 12 00 pushl 0x128778 <== NOT EXECUTED 107f0b: e8 08 ff ff ff call 107e18 <== NOT EXECUTED 107f10: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 107f12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107f15: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107f18: 5e pop %esi <== NOT EXECUTED 107f19: 5f pop %edi <== NOT EXECUTED 107f1a: c9 leave <== NOT EXECUTED 107f1b: c3 ret <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 107f1c: 83 c6 08 add $0x8,%esi 107f1f: bf 20 85 12 00 mov $0x128520,%edi 107f24: b9 10 00 00 00 mov $0x10,%ecx 107f29: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f2b: 0f 94 c2 sete %dl 107f2e: eb c6 jmp 107ef6 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 107f30: 8b 90 c0 00 00 00 mov 0xc0(%eax),%edx 107f36: 8d 04 16 lea (%esi,%edx,1),%eax 107f39: 39 c5 cmp %eax,%ebp 107f3b: 0f 96 c0 setbe %al 107f3e: eb aa jmp 107eea } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 107f40: 31 c0 xor %eax,%eax /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 107f42: 8d 65 f8 lea -0x8(%ebp),%esp 107f45: 5e pop %esi 107f46: 5f pop %edi 107f47: c9 leave 107f48: c3 ret =============================================================================== 00107e00 : void rtems_stack_checker_report_usage( void ) { 107e00: 55 push %ebp <== NOT EXECUTED 107e01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e03: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 107e06: 68 00 98 10 00 push $0x109800 <== NOT EXECUTED 107e0b: 6a 00 push $0x0 <== NOT EXECUTED 107e0d: e8 8a ff ff ff call 107d9c <== NOT EXECUTED 107e12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107e15: c9 leave <== NOT EXECUTED 107e16: c3 ret <== NOT EXECUTED =============================================================================== 00107d9c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107d9c: 55 push %ebp <== NOT EXECUTED 107d9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107d9f: 56 push %esi <== NOT EXECUTED 107da0: 53 push %ebx <== NOT EXECUTED 107da1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107da4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 107da7: 89 35 c4 81 12 00 mov %esi,0x1281c4 <== NOT EXECUTED print_handler = print; 107dad: 89 1d c8 81 12 00 mov %ebx,0x1281c8 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 107db3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107db6: 68 23 1b 12 00 push $0x121b23 <== NOT EXECUTED 107dbb: 56 push %esi <== NOT EXECUTED 107dbc: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107dbe: 58 pop %eax <== NOT EXECUTED 107dbf: 5a pop %edx <== NOT EXECUTED 107dc0: 68 a4 1b 12 00 push $0x121ba4 <== NOT EXECUTED 107dc5: 56 push %esi <== NOT EXECUTED 107dc6: 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 ); 107dc8: c7 04 24 4c 7c 10 00 movl $0x107c4c,(%esp) <== NOT EXECUTED 107dcf: e8 b4 54 00 00 call 10d288 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 107dd4: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 107ddb: e8 6c fe ff ff call 107c4c <== NOT EXECUTED print_context = NULL; 107de0: c7 05 c4 81 12 00 00 movl $0x0,0x1281c4 <== NOT EXECUTED 107de7: 00 00 00 print_handler = NULL; 107dea: c7 05 c8 81 12 00 00 movl $0x0,0x1281c8 <== NOT EXECUTED 107df1: 00 00 00 107df4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107df7: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107dfa: 5b pop %ebx <== NOT EXECUTED 107dfb: 5e pop %esi <== NOT EXECUTED 107dfc: c9 leave <== NOT EXECUTED 107dfd: c3 ret <== NOT EXECUTED =============================================================================== 00107f4c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 107f4c: 55 push %ebp 107f4d: 89 e5 mov %esp,%ebp 107f4f: 57 push %edi 107f50: 56 push %esi 107f51: 8b 45 08 mov 0x8(%ebp),%eax 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; 107f54: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 107f5a: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107f5d: 39 d5 cmp %edx,%ebp 107f5f: 72 0a jb 107f6b <== NEVER TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 107f61: 03 90 c0 00 00 00 add 0xc0(%eax),%edx 107f67: 39 d5 cmp %edx,%ebp 107f69: 76 21 jbe 107f8c <== ALWAYS TAKEN /* * 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, 107f6b: bf 20 85 12 00 mov $0x128520,%edi <== NOT EXECUTED 107f70: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 107f75: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 107f77: 0f 94 c2 sete %dl <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 107f7a: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f7d: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 107f80: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 107f83: 5e pop %esi <== NOT EXECUTED 107f84: 5f pop %edi <== NOT EXECUTED 107f85: 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 ); 107f86: e9 8d fe ff ff jmp 107e18 <== NOT EXECUTED 107f8b: 90 nop <== NOT EXECUTED /* * 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, 107f8c: bf 20 85 12 00 mov $0x128520,%edi 107f91: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107f96: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f98: 74 06 je 107fa0 <== ALWAYS TAKEN 107f9a: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f9c: eb dc jmp 107f7a <== NOT EXECUTED 107f9e: 66 90 xchg %ax,%ax <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); } } 107fa0: 5e pop %esi 107fa1: 5f pop %edi 107fa2: c9 leave 107fa3: c3 ret =============================================================================== 00110d10 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 110d10: 55 push %ebp 110d11: 89 e5 mov %esp,%ebp 110d13: 57 push %edi 110d14: 56 push %esi 110d15: 53 push %ebx 110d16: 83 ec 2c sub $0x2c,%esp 110d19: 8b 75 08 mov 0x8(%ebp),%esi 110d1c: 8b 5d 0c mov 0xc(%ebp),%ebx 110d1f: 8b 7d 10 mov 0x10(%ebp),%edi double result; char *end; if ( !n ) 110d22: 85 db test %ebx,%ebx 110d24: 0f 84 ae 00 00 00 je 110dd8 return RTEMS_INVALID_ADDRESS; errno = 0; 110d2a: e8 01 21 00 00 call 112e30 <__errno> 110d2f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110d35: c7 03 00 00 00 00 movl $0x0,(%ebx) 110d3b: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtod( s, &end ); 110d42: 83 ec 08 sub $0x8,%esp 110d45: 8d 45 e4 lea -0x1c(%ebp),%eax 110d48: 50 push %eax 110d49: 56 push %esi 110d4a: e8 59 4b 00 00 call 1158a8 if ( endptr ) 110d4f: 83 c4 10 add $0x10,%esp 110d52: 85 ff test %edi,%edi 110d54: 74 05 je 110d5b *endptr = end; 110d56: 8b 45 e4 mov -0x1c(%ebp),%eax 110d59: 89 07 mov %eax,(%edi) if ( end == s ) 110d5b: 39 75 e4 cmp %esi,-0x1c(%ebp) 110d5e: 74 68 je 110dc8 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110d60: dd 5d c8 fstpl -0x38(%ebp) 110d63: e8 c8 20 00 00 call 112e30 <__errno> 110d68: 83 38 22 cmpl $0x22,(%eax) 110d6b: dd 45 c8 fldl -0x38(%ebp) 110d6e: 74 0c je 110d7c (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 110d70: dd 1b fstpl (%ebx) 110d72: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110d74: 8d 65 f4 lea -0xc(%ebp),%esp 110d77: 5b pop %ebx 110d78: 5e pop %esi 110d79: 5f pop %edi 110d7a: c9 leave 110d7b: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110d7c: d9 ee fldz 110d7e: d9 c9 fxch %st(1) 110d80: dd e1 fucom %st(1) 110d82: df e0 fnstsw %ax 110d84: dd d9 fstp %st(1) 110d86: 80 e4 45 and $0x45,%ah 110d89: 80 fc 40 cmp $0x40,%ah 110d8c: 74 26 je 110db4 <== NEVER TAKEN 110d8e: dd 05 b0 47 12 00 fldl 0x1247b0 110d94: d9 c9 fxch %st(1) 110d96: dd e1 fucom %st(1) 110d98: df e0 fnstsw %ax 110d9a: dd d9 fstp %st(1) 110d9c: f6 c4 45 test $0x45,%ah 110d9f: 74 17 je 110db8 <== ALWAYS TAKEN 110da1: dd 05 b8 47 12 00 fldl 0x1247b8 <== NOT EXECUTED 110da7: dd e9 fucomp %st(1) <== NOT EXECUTED 110da9: df e0 fnstsw %ax <== NOT EXECUTED 110dab: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 110dae: 75 c0 jne 110d70 <== NOT EXECUTED 110db0: dd d8 fstp %st(0) <== NOT EXECUTED 110db2: eb 06 jmp 110dba <== NOT EXECUTED 110db4: dd d8 fstp %st(0) <== NOT EXECUTED 110db6: eb 02 jmp 110dba <== NOT EXECUTED 110db8: dd d8 fstp %st(0) (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 110dba: b8 0a 00 00 00 mov $0xa,%eax } 110dbf: 8d 65 f4 lea -0xc(%ebp),%esp 110dc2: 5b pop %ebx 110dc3: 5e pop %esi 110dc4: 5f pop %edi 110dc5: c9 leave 110dc6: c3 ret 110dc7: 90 nop 110dc8: dd d8 fstp %st(0) result = strtod( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 110dca: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110dcf: 8d 65 f4 lea -0xc(%ebp),%esp 110dd2: 5b pop %ebx 110dd3: 5e pop %esi 110dd4: 5f pop %edi 110dd5: c9 leave 110dd6: c3 ret 110dd7: 90 nop ) { double result; char *end; if ( !n ) 110dd8: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110ddd: 8d 65 f4 lea -0xc(%ebp),%esp 110de0: 5b pop %ebx 110de1: 5e pop %esi 110de2: 5f pop %edi 110de3: c9 leave 110de4: c3 ret =============================================================================== 00110de8 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 110de8: 55 push %ebp 110de9: 89 e5 mov %esp,%ebp 110deb: 57 push %edi 110dec: 56 push %esi 110ded: 53 push %ebx 110dee: 83 ec 2c sub $0x2c,%esp 110df1: 8b 75 08 mov 0x8(%ebp),%esi 110df4: 8b 5d 0c mov 0xc(%ebp),%ebx 110df7: 8b 7d 10 mov 0x10(%ebp),%edi float result; char *end; if ( !n ) 110dfa: 85 db test %ebx,%ebx 110dfc: 0f 84 aa 00 00 00 je 110eac return RTEMS_INVALID_ADDRESS; errno = 0; 110e02: e8 29 20 00 00 call 112e30 <__errno> 110e07: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110e0d: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtof( s, &end ); 110e13: 83 ec 08 sub $0x8,%esp 110e16: 8d 45 e4 lea -0x1c(%ebp),%eax 110e19: 50 push %eax 110e1a: 56 push %esi 110e1b: e8 44 4a 00 00 call 115864 if ( endptr ) 110e20: 83 c4 10 add $0x10,%esp 110e23: 85 ff test %edi,%edi 110e25: 74 05 je 110e2c *endptr = end; 110e27: 8b 45 e4 mov -0x1c(%ebp),%eax 110e2a: 89 07 mov %eax,(%edi) if ( end == s ) 110e2c: 39 75 e4 cmp %esi,-0x1c(%ebp) 110e2f: 74 6b je 110e9c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110e31: d9 5d c8 fstps -0x38(%ebp) 110e34: e8 f7 1f 00 00 call 112e30 <__errno> 110e39: 83 38 22 cmpl $0x22,(%eax) 110e3c: d9 45 c8 flds -0x38(%ebp) 110e3f: 74 0f je 110e50 (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 110e41: d9 1b fstps (%ebx) 110e43: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110e45: 8d 65 f4 lea -0xc(%ebp),%esp 110e48: 5b pop %ebx 110e49: 5e pop %esi 110e4a: 5f pop %edi 110e4b: c9 leave 110e4c: c3 ret 110e4d: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110e50: d9 ee fldz 110e52: d9 c9 fxch %st(1) 110e54: dd e1 fucom %st(1) 110e56: df e0 fnstsw %ax 110e58: dd d9 fstp %st(1) 110e5a: 80 e4 45 and $0x45,%ah 110e5d: 80 fc 40 cmp $0x40,%ah 110e60: 74 26 je 110e88 <== NEVER TAKEN 110e62: d9 05 c0 47 12 00 flds 0x1247c0 110e68: d9 c9 fxch %st(1) 110e6a: dd e1 fucom %st(1) 110e6c: df e0 fnstsw %ax 110e6e: dd d9 fstp %st(1) 110e70: f6 c4 45 test $0x45,%ah 110e73: 74 17 je 110e8c <== ALWAYS TAKEN 110e75: d9 05 c4 47 12 00 flds 0x1247c4 <== NOT EXECUTED 110e7b: dd e9 fucomp %st(1) <== NOT EXECUTED 110e7d: df e0 fnstsw %ax <== NOT EXECUTED 110e7f: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 110e82: 75 bd jne 110e41 <== NOT EXECUTED 110e84: dd d8 fstp %st(0) <== NOT EXECUTED 110e86: eb 06 jmp 110e8e <== NOT EXECUTED 110e88: dd d8 fstp %st(0) <== NOT EXECUTED 110e8a: eb 02 jmp 110e8e <== NOT EXECUTED 110e8c: dd d8 fstp %st(0) (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 110e8e: b8 0a 00 00 00 mov $0xa,%eax } 110e93: 8d 65 f4 lea -0xc(%ebp),%esp 110e96: 5b pop %ebx 110e97: 5e pop %esi 110e98: 5f pop %edi 110e99: c9 leave 110e9a: c3 ret 110e9b: 90 nop 110e9c: dd d8 fstp %st(0) result = strtof( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 110e9e: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110ea3: 8d 65 f4 lea -0xc(%ebp),%esp 110ea6: 5b pop %ebx 110ea7: 5e pop %esi 110ea8: 5f pop %edi 110ea9: c9 leave 110eaa: c3 ret 110eab: 90 nop ) { float result; char *end; if ( !n ) 110eac: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110eb1: 8d 65 f4 lea -0xc(%ebp),%esp 110eb4: 5b pop %ebx 110eb5: 5e pop %esi 110eb6: 5f pop %edi 110eb7: c9 leave 110eb8: c3 ret =============================================================================== 00110ebc : const char *s, int *n, char **endptr, int base ) { 110ebc: 55 push %ebp 110ebd: 89 e5 mov %esp,%ebp 110ebf: 57 push %edi 110ec0: 56 push %esi 110ec1: 53 push %ebx 110ec2: 83 ec 2c sub $0x2c,%esp 110ec5: 8b 75 08 mov 0x8(%ebp),%esi 110ec8: 8b 5d 0c mov 0xc(%ebp),%ebx 110ecb: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 110ece: 85 db test %ebx,%ebx 110ed0: 0f 84 82 00 00 00 je 110f58 return RTEMS_INVALID_ADDRESS; errno = 0; 110ed6: e8 55 1f 00 00 call 112e30 <__errno> 110edb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110ee1: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 110ee7: 50 push %eax 110ee8: ff 75 14 pushl 0x14(%ebp) 110eeb: 8d 45 e4 lea -0x1c(%ebp),%eax 110eee: 50 push %eax 110eef: 56 push %esi 110ef0: e8 4f 4b 00 00 call 115a44 110ef5: 89 c2 mov %eax,%edx if ( endptr ) 110ef7: 83 c4 10 add $0x10,%esp 110efa: 85 ff test %edi,%edi 110efc: 74 05 je 110f03 *endptr = end; 110efe: 8b 45 e4 mov -0x1c(%ebp),%eax 110f01: 89 07 mov %eax,(%edi) if ( end == s ) 110f03: 39 75 e4 cmp %esi,-0x1c(%ebp) 110f06: 74 40 je 110f48 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110f08: 89 55 d4 mov %edx,-0x2c(%ebp) 110f0b: e8 20 1f 00 00 call 112e30 <__errno> 110f10: 83 38 22 cmpl $0x22,(%eax) 110f13: 8b 55 d4 mov -0x2c(%ebp),%edx 110f16: 74 0c je 110f24 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 110f18: 89 13 mov %edx,(%ebx) 110f1a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110f1c: 8d 65 f4 lea -0xc(%ebp),%esp 110f1f: 5b pop %ebx 110f20: 5e pop %esi 110f21: 5f pop %edi 110f22: c9 leave 110f23: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110f24: 85 d2 test %edx,%edx 110f26: 74 10 je 110f38 <== NEVER TAKEN 110f28: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 110f2e: 74 08 je 110f38 <== ALWAYS TAKEN 110f30: 81 fa 00 00 00 80 cmp $0x80000000,%edx <== NOT EXECUTED 110f36: 75 e0 jne 110f18 <== NOT EXECUTED } #endif *n = result; return RTEMS_SUCCESSFUL; 110f38: b8 0a 00 00 00 mov $0xa,%eax } 110f3d: 8d 65 f4 lea -0xc(%ebp),%esp 110f40: 5b pop %ebx 110f41: 5e pop %esi 110f42: 5f pop %edi 110f43: c9 leave 110f44: c3 ret 110f45: 8d 76 00 lea 0x0(%esi),%esi result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 110f48: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110f4d: 8d 65 f4 lea -0xc(%ebp),%esp 110f50: 5b pop %ebx 110f51: 5e pop %esi 110f52: 5f pop %edi 110f53: c9 leave 110f54: c3 ret 110f55: 8d 76 00 lea 0x0(%esi),%esi ) { long result; char *end; if ( !n ) 110f58: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 110f5d: 8d 65 f4 lea -0xc(%ebp),%esp 110f60: 5b pop %ebx 110f61: 5e pop %esi 110f62: 5f pop %edi 110f63: c9 leave 110f64: c3 ret =============================================================================== 00111030 : const char *s, long *n, char **endptr, int base ) { 111030: 55 push %ebp 111031: 89 e5 mov %esp,%ebp 111033: 57 push %edi 111034: 56 push %esi 111035: 53 push %ebx 111036: 83 ec 2c sub $0x2c,%esp 111039: 8b 75 08 mov 0x8(%ebp),%esi 11103c: 8b 5d 0c mov 0xc(%ebp),%ebx 11103f: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 111042: 85 db test %ebx,%ebx 111044: 0f 84 82 00 00 00 je 1110cc return RTEMS_INVALID_ADDRESS; errno = 0; 11104a: e8 e1 1d 00 00 call 112e30 <__errno> 11104f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111055: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 11105b: 50 push %eax 11105c: ff 75 14 pushl 0x14(%ebp) 11105f: 8d 45 e4 lea -0x1c(%ebp),%eax 111062: 50 push %eax 111063: 56 push %esi 111064: e8 db 49 00 00 call 115a44 111069: 89 c2 mov %eax,%edx if ( endptr ) 11106b: 83 c4 10 add $0x10,%esp 11106e: 85 ff test %edi,%edi 111070: 74 05 je 111077 *endptr = end; 111072: 8b 45 e4 mov -0x1c(%ebp),%eax 111075: 89 07 mov %eax,(%edi) if ( end == s ) 111077: 39 75 e4 cmp %esi,-0x1c(%ebp) 11107a: 74 40 je 1110bc return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11107c: 89 55 d4 mov %edx,-0x2c(%ebp) 11107f: e8 ac 1d 00 00 call 112e30 <__errno> 111084: 83 38 22 cmpl $0x22,(%eax) 111087: 8b 55 d4 mov -0x2c(%ebp),%edx 11108a: 74 0c je 111098 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 11108c: 89 13 mov %edx,(%ebx) 11108e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111090: 8d 65 f4 lea -0xc(%ebp),%esp 111093: 5b pop %ebx 111094: 5e pop %esi 111095: 5f pop %edi 111096: c9 leave 111097: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111098: 85 d2 test %edx,%edx 11109a: 74 10 je 1110ac <== NEVER TAKEN 11109c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 1110a2: 74 08 je 1110ac 1110a4: 81 fa 00 00 00 80 cmp $0x80000000,%edx 1110aa: 75 e0 jne 11108c <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 1110ac: b8 0a 00 00 00 mov $0xa,%eax } 1110b1: 8d 65 f4 lea -0xc(%ebp),%esp 1110b4: 5b pop %ebx 1110b5: 5e pop %esi 1110b6: 5f pop %edi 1110b7: c9 leave 1110b8: c3 ret 1110b9: 8d 76 00 lea 0x0(%esi),%esi result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 1110bc: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1110c1: 8d 65 f4 lea -0xc(%ebp),%esp 1110c4: 5b pop %ebx 1110c5: 5e pop %esi 1110c6: 5f pop %edi 1110c7: c9 leave 1110c8: c3 ret 1110c9: 8d 76 00 lea 0x0(%esi),%esi ) { long result; char *end; if ( !n ) 1110cc: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1110d1: 8d 65 f4 lea -0xc(%ebp),%esp 1110d4: 5b pop %ebx 1110d5: 5e pop %esi 1110d6: 5f pop %edi 1110d7: c9 leave 1110d8: c3 ret =============================================================================== 00110f68 : const char *s, long long *n, char **endptr, int base ) { 110f68: 55 push %ebp 110f69: 89 e5 mov %esp,%ebp 110f6b: 57 push %edi 110f6c: 56 push %esi 110f6d: 53 push %ebx 110f6e: 83 ec 2c sub $0x2c,%esp 110f71: 8b 75 08 mov 0x8(%ebp),%esi 110f74: 8b 5d 0c mov 0xc(%ebp),%ebx long long result; char *end; if ( !n ) 110f77: 85 db test %ebx,%ebx 110f79: 0f 84 a1 00 00 00 je 111020 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 110f7f: e8 ac 1e 00 00 call 112e30 <__errno> 110f84: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110f8a: c7 03 00 00 00 00 movl $0x0,(%ebx) 110f90: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoll( s, &end, base ); 110f97: 52 push %edx 110f98: ff 75 14 pushl 0x14(%ebp) 110f9b: 8d 45 e4 lea -0x1c(%ebp),%eax 110f9e: 50 push %eax 110f9f: 56 push %esi 110fa0: e8 bb 4a 00 00 call 115a60 110fa5: 89 c7 mov %eax,%edi if ( endptr ) 110fa7: 83 c4 10 add $0x10,%esp 110faa: 8b 45 10 mov 0x10(%ebp),%eax 110fad: 85 c0 test %eax,%eax 110faf: 74 08 je 110fb9 *endptr = end; 110fb1: 8b 45 e4 mov -0x1c(%ebp),%eax 110fb4: 8b 4d 10 mov 0x10(%ebp),%ecx 110fb7: 89 01 mov %eax,(%ecx) if ( end == s ) 110fb9: 39 75 e4 cmp %esi,-0x1c(%ebp) 110fbc: 74 52 je 111010 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110fbe: 89 55 d4 mov %edx,-0x2c(%ebp) 110fc1: e8 6a 1e 00 00 call 112e30 <__errno> 110fc6: 83 38 22 cmpl $0x22,(%eax) 110fc9: 8b 55 d4 mov -0x2c(%ebp),%edx 110fcc: 74 12 je 110fe0 (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 110fce: 89 3b mov %edi,(%ebx) 110fd0: 89 53 04 mov %edx,0x4(%ebx) 110fd3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110fd5: 8d 65 f4 lea -0xc(%ebp),%esp 110fd8: 5b pop %ebx 110fd9: 5e pop %esi 110fda: 5f pop %edi 110fdb: c9 leave 110fdc: c3 ret 110fdd: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110fe0: 89 d0 mov %edx,%eax 110fe2: 09 f8 or %edi,%eax 110fe4: 74 1a je 111000 <== NEVER TAKEN 110fe6: 89 d1 mov %edx,%ecx 110fe8: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 110fee: 89 f8 mov %edi,%eax 110ff0: f7 d0 not %eax 110ff2: 09 c1 or %eax,%ecx 110ff4: 74 0a je 111000 <== NEVER TAKEN 110ff6: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 110ffc: 09 f8 or %edi,%eax 110ffe: 75 ce jne 110fce (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 111000: b8 0a 00 00 00 mov $0xa,%eax } 111005: 8d 65 f4 lea -0xc(%ebp),%esp 111008: 5b pop %ebx 111009: 5e pop %esi 11100a: 5f pop %edi 11100b: c9 leave 11100c: c3 ret 11100d: 8d 76 00 lea 0x0(%esi),%esi result = strtoll( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111010: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111015: 8d 65 f4 lea -0xc(%ebp),%esp 111018: 5b pop %ebx 111019: 5e pop %esi 11101a: 5f pop %edi 11101b: c9 leave 11101c: c3 ret 11101d: 8d 76 00 lea 0x0(%esi),%esi ) { long long result; char *end; if ( !n ) 111020: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111025: 8d 65 f4 lea -0xc(%ebp),%esp 111028: 5b pop %ebx 111029: 5e pop %esi 11102a: 5f pop %edi 11102b: c9 leave 11102c: c3 ret =============================================================================== 001110f4 : const char *s, unsigned char *n, char **endptr, int base ) { 1110f4: 55 push %ebp 1110f5: 89 e5 mov %esp,%ebp 1110f7: 57 push %edi 1110f8: 56 push %esi 1110f9: 53 push %ebx 1110fa: 83 ec 2c sub $0x2c,%esp 1110fd: 8b 75 08 mov 0x8(%ebp),%esi 111100: 8b 5d 0c mov 0xc(%ebp),%ebx 111103: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 111106: 85 db test %ebx,%ebx 111108: 0f 84 8e 00 00 00 je 11119c return RTEMS_INVALID_ADDRESS; errno = 0; 11110e: e8 1d 1d 00 00 call 112e30 <__errno> 111113: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111119: c6 03 00 movb $0x0,(%ebx) result = strtoul( s, &end, base ); 11111c: 50 push %eax 11111d: ff 75 14 pushl 0x14(%ebp) 111120: 8d 45 e4 lea -0x1c(%ebp),%eax 111123: 50 push %eax 111124: 56 push %esi 111125: e8 96 4d 00 00 call 115ec0 11112a: 89 c2 mov %eax,%edx if ( endptr ) 11112c: 83 c4 10 add $0x10,%esp 11112f: 85 ff test %edi,%edi 111131: 74 05 je 111138 *endptr = end; 111133: 8b 45 e4 mov -0x1c(%ebp),%eax 111136: 89 07 mov %eax,(%edi) if ( end == s ) 111138: 39 75 e4 cmp %esi,-0x1c(%ebp) 11113b: 74 4f je 11118c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11113d: 89 55 d4 mov %edx,-0x2c(%ebp) 111140: e8 eb 1c 00 00 call 112e30 <__errno> 111145: 83 38 22 cmpl $0x22,(%eax) 111148: 8b 55 d4 mov -0x2c(%ebp),%edx 11114b: 74 17 je 111164 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 11114d: 81 fa ff 00 00 00 cmp $0xff,%edx 111153: 77 1f ja 111174 <== NEVER TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 111155: 88 13 mov %dl,(%ebx) 111157: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111159: 8d 65 f4 lea -0xc(%ebp),%esp 11115c: 5b pop %ebx 11115d: 5e pop %esi 11115e: 5f pop %edi 11115f: c9 leave 111160: c3 ret 111161: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111164: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED 111167: 83 f8 fd cmp $0xfffffffd,%eax <== NOT EXECUTED 11116a: 77 13 ja 11117f <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 11116c: 81 fa ff 00 00 00 cmp $0xff,%edx <== NOT EXECUTED 111172: 76 e1 jbe 111155 <== NOT EXECUTED errno = ERANGE; 111174: e8 b7 1c 00 00 call 112e30 <__errno> <== NOT EXECUTED 111179: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED 11117f: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 111184: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111187: 5b pop %ebx <== NOT EXECUTED 111188: 5e pop %esi <== NOT EXECUTED 111189: 5f pop %edi <== NOT EXECUTED 11118a: c9 leave <== NOT EXECUTED 11118b: c3 ret <== NOT EXECUTED result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 11118c: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 111191: 8d 65 f4 lea -0xc(%ebp),%esp 111194: 5b pop %ebx 111195: 5e pop %esi 111196: 5f pop %edi 111197: c9 leave 111198: c3 ret 111199: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 11119c: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 1111a1: 8d 65 f4 lea -0xc(%ebp),%esp 1111a4: 5b pop %ebx 1111a5: 5e pop %esi 1111a6: 5f pop %edi 1111a7: c9 leave 1111a8: c3 ret =============================================================================== 001111ac : const char *s, unsigned int *n, char **endptr, int base ) { 1111ac: 55 push %ebp 1111ad: 89 e5 mov %esp,%ebp 1111af: 57 push %edi 1111b0: 56 push %esi 1111b1: 53 push %ebx 1111b2: 83 ec 2c sub $0x2c,%esp 1111b5: 8b 75 08 mov 0x8(%ebp),%esi 1111b8: 8b 5d 0c mov 0xc(%ebp),%ebx 1111bb: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 1111be: 85 db test %ebx,%ebx 1111c0: 74 76 je 111238 return RTEMS_INVALID_ADDRESS; errno = 0; 1111c2: e8 69 1c 00 00 call 112e30 <__errno> 1111c7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1111cd: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 1111d3: 50 push %eax 1111d4: ff 75 14 pushl 0x14(%ebp) 1111d7: 8d 45 e4 lea -0x1c(%ebp),%eax 1111da: 50 push %eax 1111db: 56 push %esi 1111dc: e8 df 4c 00 00 call 115ec0 1111e1: 89 c2 mov %eax,%edx if ( endptr ) 1111e3: 83 c4 10 add $0x10,%esp 1111e6: 85 ff test %edi,%edi 1111e8: 74 05 je 1111ef *endptr = end; 1111ea: 8b 45 e4 mov -0x1c(%ebp),%eax 1111ed: 89 07 mov %eax,(%edi) if ( end == s ) 1111ef: 39 75 e4 cmp %esi,-0x1c(%ebp) 1111f2: 74 34 je 111228 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1111f4: 89 55 d4 mov %edx,-0x2c(%ebp) 1111f7: e8 34 1c 00 00 call 112e30 <__errno> 1111fc: 83 38 22 cmpl $0x22,(%eax) 1111ff: 8b 55 d4 mov -0x2c(%ebp),%edx 111202: 74 0c je 111210 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 111204: 89 13 mov %edx,(%ebx) 111206: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111208: 8d 65 f4 lea -0xc(%ebp),%esp 11120b: 5b pop %ebx 11120c: 5e pop %esi 11120d: 5f pop %edi 11120e: c9 leave 11120f: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111210: 8d 42 ff lea -0x1(%edx),%eax 111213: 83 f8 fd cmp $0xfffffffd,%eax 111216: 76 ec jbe 111204 <== NEVER TAKEN 111218: b8 0a 00 00 00 mov $0xa,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11121d: 8d 65 f4 lea -0xc(%ebp),%esp 111220: 5b pop %ebx 111221: 5e pop %esi 111222: 5f pop %edi 111223: c9 leave 111224: c3 ret 111225: 8d 76 00 lea 0x0(%esi),%esi result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111228: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11122d: 8d 65 f4 lea -0xc(%ebp),%esp 111230: 5b pop %ebx 111231: 5e pop %esi 111232: 5f pop %edi 111233: c9 leave 111234: c3 ret 111235: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 111238: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11123d: 8d 65 f4 lea -0xc(%ebp),%esp 111240: 5b pop %ebx 111241: 5e pop %esi 111242: 5f pop %edi 111243: c9 leave 111244: c3 ret =============================================================================== 00111308 : const char *s, unsigned long *n, char **endptr, int base ) { 111308: 55 push %ebp 111309: 89 e5 mov %esp,%ebp 11130b: 57 push %edi 11130c: 56 push %esi 11130d: 53 push %ebx 11130e: 83 ec 2c sub $0x2c,%esp 111311: 8b 75 08 mov 0x8(%ebp),%esi 111314: 8b 5d 0c mov 0xc(%ebp),%ebx 111317: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 11131a: 85 db test %ebx,%ebx 11131c: 74 76 je 111394 return RTEMS_INVALID_ADDRESS; errno = 0; 11131e: e8 0d 1b 00 00 call 112e30 <__errno> 111323: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111329: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 11132f: 50 push %eax 111330: ff 75 14 pushl 0x14(%ebp) 111333: 8d 45 e4 lea -0x1c(%ebp),%eax 111336: 50 push %eax 111337: 56 push %esi 111338: e8 83 4b 00 00 call 115ec0 11133d: 89 c2 mov %eax,%edx if ( endptr ) 11133f: 83 c4 10 add $0x10,%esp 111342: 85 ff test %edi,%edi 111344: 74 05 je 11134b *endptr = end; 111346: 8b 45 e4 mov -0x1c(%ebp),%eax 111349: 89 07 mov %eax,(%edi) if ( end == s ) 11134b: 39 75 e4 cmp %esi,-0x1c(%ebp) 11134e: 74 34 je 111384 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111350: 89 55 d4 mov %edx,-0x2c(%ebp) 111353: e8 d8 1a 00 00 call 112e30 <__errno> 111358: 83 38 22 cmpl $0x22,(%eax) 11135b: 8b 55 d4 mov -0x2c(%ebp),%edx 11135e: 74 0c je 11136c (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 111360: 89 13 mov %edx,(%ebx) 111362: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111364: 8d 65 f4 lea -0xc(%ebp),%esp 111367: 5b pop %ebx 111368: 5e pop %esi 111369: 5f pop %edi 11136a: c9 leave 11136b: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11136c: 8d 42 ff lea -0x1(%edx),%eax 11136f: 83 f8 fd cmp $0xfffffffd,%eax 111372: 76 ec jbe 111360 <== NEVER TAKEN 111374: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111379: 8d 65 f4 lea -0xc(%ebp),%esp 11137c: 5b pop %ebx 11137d: 5e pop %esi 11137e: 5f pop %edi 11137f: c9 leave 111380: c3 ret 111381: 8d 76 00 lea 0x0(%esi),%esi result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111384: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111389: 8d 65 f4 lea -0xc(%ebp),%esp 11138c: 5b pop %ebx 11138d: 5e pop %esi 11138e: 5f pop %edi 11138f: c9 leave 111390: c3 ret 111391: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 111394: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111399: 8d 65 f4 lea -0xc(%ebp),%esp 11139c: 5b pop %ebx 11139d: 5e pop %esi 11139e: 5f pop %edi 11139f: c9 leave 1113a0: c3 ret =============================================================================== 00111248 : const char *s, unsigned long long *n, char **endptr, int base ) { 111248: 55 push %ebp 111249: 89 e5 mov %esp,%ebp 11124b: 57 push %edi 11124c: 56 push %esi 11124d: 53 push %ebx 11124e: 83 ec 2c sub $0x2c,%esp 111251: 8b 75 08 mov 0x8(%ebp),%esi 111254: 8b 5d 0c mov 0xc(%ebp),%ebx 111257: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long long result; char *end; if ( !n ) 11125a: 85 db test %ebx,%ebx 11125c: 0f 84 96 00 00 00 je 1112f8 return RTEMS_INVALID_ADDRESS; errno = 0; 111262: e8 c9 1b 00 00 call 112e30 <__errno> 111267: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11126d: c7 03 00 00 00 00 movl $0x0,(%ebx) 111273: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoull( s, &end, base ); 11127a: 50 push %eax 11127b: ff 75 14 pushl 0x14(%ebp) 11127e: 8d 45 e4 lea -0x1c(%ebp),%eax 111281: 50 push %eax 111282: 56 push %esi 111283: e8 54 4c 00 00 call 115edc 111288: 89 d1 mov %edx,%ecx 11128a: 89 c2 mov %eax,%edx if ( endptr ) 11128c: 83 c4 10 add $0x10,%esp 11128f: 85 ff test %edi,%edi 111291: 74 05 je 111298 *endptr = end; 111293: 8b 45 e4 mov -0x1c(%ebp),%eax 111296: 89 07 mov %eax,(%edi) if ( end == s ) 111298: 39 75 e4 cmp %esi,-0x1c(%ebp) 11129b: 74 4b je 1112e8 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11129d: 89 55 d4 mov %edx,-0x2c(%ebp) 1112a0: 89 4d d0 mov %ecx,-0x30(%ebp) 1112a3: e8 88 1b 00 00 call 112e30 <__errno> 1112a8: 83 38 22 cmpl $0x22,(%eax) 1112ab: 8b 55 d4 mov -0x2c(%ebp),%edx 1112ae: 8b 4d d0 mov -0x30(%ebp),%ecx 1112b1: 74 11 je 1112c4 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 1112b3: 89 13 mov %edx,(%ebx) 1112b5: 89 4b 04 mov %ecx,0x4(%ebx) 1112b8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1112ba: 8d 65 f4 lea -0xc(%ebp),%esp 1112bd: 5b pop %ebx 1112be: 5e pop %esi 1112bf: 5f pop %edi 1112c0: c9 leave 1112c1: c3 ret 1112c2: 66 90 xchg %ax,%ax *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1112c4: 89 d6 mov %edx,%esi 1112c6: 89 cf mov %ecx,%edi 1112c8: 83 c6 ff add $0xffffffff,%esi 1112cb: 83 d7 ff adc $0xffffffff,%edi 1112ce: 83 ff ff cmp $0xffffffff,%edi 1112d1: 72 e0 jb 1112b3 <== NEVER TAKEN 1112d3: 83 fe fd cmp $0xfffffffd,%esi 1112d6: 76 db jbe 1112b3 <== NEVER TAKEN 1112d8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1112dd: 8d 65 f4 lea -0xc(%ebp),%esp 1112e0: 5b pop %ebx 1112e1: 5e pop %esi 1112e2: 5f pop %edi 1112e3: c9 leave 1112e4: c3 ret 1112e5: 8d 76 00 lea 0x0(%esi),%esi result = strtoull( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 1112e8: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1112ed: 8d 65 f4 lea -0xc(%ebp),%esp 1112f0: 5b pop %ebx 1112f1: 5e pop %esi 1112f2: 5f pop %edi 1112f3: c9 leave 1112f4: c3 ret 1112f5: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long long result; char *end; if ( !n ) 1112f8: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1112fd: 8d 65 f4 lea -0xc(%ebp),%esp 111300: 5b pop %ebx 111301: 5e pop %esi 111302: 5f pop %edi 111303: c9 leave 111304: c3 ret =============================================================================== 0010be44 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10be44: 55 push %ebp 10be45: 89 e5 mov %esp,%ebp 10be47: 57 push %edi 10be48: 56 push %esi 10be49: 53 push %ebx 10be4a: 83 ec 1c sub $0x1c,%esp 10be4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be50: 8b 4d 0c mov 0xc(%ebp),%ecx 10be53: 8b 7d 18 mov 0x18(%ebp),%edi 10be56: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10be59: 85 f6 test %esi,%esi 10be5b: 0f 84 37 01 00 00 je 10bf98 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10be61: 85 db test %ebx,%ebx 10be63: 0f 84 cb 00 00 00 je 10bf34 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10be69: 66 85 ff test %di,%di 10be6c: 78 1d js 10be8b */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10be6e: 85 c9 test %ecx,%ecx 10be70: 75 0e jne 10be80 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10be72: b8 13 00 00 00 mov $0x13,%eax } 10be77: 8d 65 f4 lea -0xc(%ebp),%esp 10be7a: 5b pop %ebx 10be7b: 5e pop %esi 10be7c: 5f pop %edi 10be7d: c9 leave 10be7e: c3 ret 10be7f: 90 nop 10be80: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10be87: 39 c1 cmp %eax,%ecx 10be89: 77 e7 ja 10be72 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10be8b: 83 ec 0c sub $0xc,%esp 10be8e: ff 35 10 74 12 00 pushl 0x127410 10be94: 89 4d e4 mov %ecx,-0x1c(%ebp) 10be97: e8 60 06 00 00 call 10c4fc <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10be9c: c7 04 24 e0 72 12 00 movl $0x1272e0,(%esp) 10bea3: e8 d0 0f 00 00 call 10ce78 <_Objects_Allocate> 10bea8: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10beaa: 83 c4 10 add $0x10,%esp 10bead: 85 c0 test %eax,%eax 10beaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 10beb2: 0f 84 c0 00 00 00 je 10bf78 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10beb8: 50 push %eax 10beb9: 53 push %ebx 10beba: 8b 45 14 mov 0x14(%ebp),%eax 10bebd: 83 e0 01 and $0x1,%eax 10bec0: 50 push %eax 10bec1: 6a 00 push $0x0 10bec3: 8b 45 14 mov 0x14(%ebp),%eax 10bec6: c1 e8 09 shr $0x9,%eax 10bec9: 83 e0 01 and $0x1,%eax 10becc: 50 push %eax 10becd: 8b 45 14 mov 0x14(%ebp),%eax 10bed0: c1 e8 08 shr $0x8,%eax 10bed3: 83 f0 01 xor $0x1,%eax 10bed6: 83 e0 01 and $0x1,%eax 10bed9: 50 push %eax 10beda: 51 push %ecx 10bedb: 83 e7 01 and $0x1,%edi 10bede: 57 push %edi 10bedf: ff 75 10 pushl 0x10(%ebp) 10bee2: 6a 00 push $0x0 10bee4: 52 push %edx 10bee5: 68 e0 72 12 00 push $0x1272e0 10beea: 89 55 e4 mov %edx,-0x1c(%ebp) 10beed: e8 1a 1d 00 00 call 10dc0c <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10bef2: 83 c4 30 add $0x30,%esp 10bef5: 84 c0 test %al,%al 10bef7: 8b 55 e4 mov -0x1c(%ebp),%edx 10befa: 74 48 je 10bf44 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10befc: 8b 8a f0 00 00 00 mov 0xf0(%edx),%ecx 10bf02: 8b 45 14 mov 0x14(%ebp),%eax 10bf05: c1 e8 0a shr $0xa,%eax 10bf08: 83 f0 01 xor $0x1,%eax 10bf0b: 83 e0 01 and $0x1,%eax 10bf0e: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10bf11: 8b 42 08 mov 0x8(%edx),%eax 10bf14: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10bf16: 83 ec 0c sub $0xc,%esp 10bf19: ff 35 10 74 12 00 pushl 0x127410 10bf1f: e8 20 06 00 00 call 10c544 <_API_Mutex_Unlock> 10bf24: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf26: 83 c4 10 add $0x10,%esp } 10bf29: 8d 65 f4 lea -0xc(%ebp),%esp 10bf2c: 5b pop %ebx 10bf2d: 5e pop %esi 10bf2e: 5f pop %edi 10bf2f: c9 leave 10bf30: c3 ret 10bf31: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10bf34: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf39: 8d 65 f4 lea -0xc(%ebp),%esp 10bf3c: 5b pop %ebx 10bf3d: 5e pop %esi 10bf3e: 5f pop %edi 10bf3f: c9 leave 10bf40: c3 ret 10bf41: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10bf44: 83 ec 0c sub $0xc,%esp 10bf47: ff 72 08 pushl 0x8(%edx) 10bf4a: e8 19 13 00 00 call 10d268 <_Objects_Get_information_id> 10bf4f: 5a pop %edx 10bf50: 59 pop %ecx 10bf51: 8b 55 e4 mov -0x1c(%ebp),%edx 10bf54: 52 push %edx 10bf55: 50 push %eax 10bf56: e8 9d 12 00 00 call 10d1f8 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10bf5b: 58 pop %eax 10bf5c: ff 35 10 74 12 00 pushl 0x127410 10bf62: e8 dd 05 00 00 call 10c544 <_API_Mutex_Unlock> 10bf67: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10bf6c: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bf72: 5b pop %ebx 10bf73: 5e pop %esi 10bf74: 5f pop %edi 10bf75: c9 leave 10bf76: c3 ret 10bf77: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10bf78: 83 ec 0c sub $0xc,%esp 10bf7b: ff 35 10 74 12 00 pushl 0x127410 10bf81: e8 be 05 00 00 call 10c544 <_API_Mutex_Unlock> 10bf86: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bf8b: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf8e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf91: 5b pop %ebx 10bf92: 5e pop %esi 10bf93: 5f pop %edi 10bf94: c9 leave 10bf95: c3 ret 10bf96: 66 90 xchg %ax,%ax Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10bf98: b8 09 00 00 00 mov $0x9,%eax 10bf9d: e9 d5 fe ff ff jmp 10be77 =============================================================================== 0010bfa4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10bfa4: 55 push %ebp 10bfa5: 89 e5 mov %esp,%ebp 10bfa7: 53 push %ebx 10bfa8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10bfab: ff 35 10 74 12 00 pushl 0x127410 10bfb1: e8 46 05 00 00 call 10c4fc <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10bfb6: 5a pop %edx 10bfb7: 59 pop %ecx 10bfb8: 8d 45 f4 lea -0xc(%ebp),%eax 10bfbb: 50 push %eax 10bfbc: ff 75 08 pushl 0x8(%ebp) 10bfbf: e8 d0 1b 00 00 call 10db94 <_Thread_Get> 10bfc4: 89 c3 mov %eax,%ebx switch ( location ) { 10bfc6: 83 c4 10 add $0x10,%esp 10bfc9: 8b 45 f4 mov -0xc(%ebp),%eax 10bfcc: 85 c0 test %eax,%eax 10bfce: 75 44 jne 10c014 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10bfd0: 83 ec 0c sub $0xc,%esp 10bfd3: ff 73 08 pushl 0x8(%ebx) 10bfd6: e8 8d 12 00 00 call 10d268 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10bfdb: 5a pop %edx 10bfdc: 59 pop %ecx 10bfdd: 53 push %ebx 10bfde: 50 push %eax 10bfdf: e8 78 18 00 00 call 10d85c <_Thread_Close> 10bfe4: 58 pop %eax 10bfe5: ff 73 08 pushl 0x8(%ebx) 10bfe8: e8 7b 12 00 00 call 10d268 <_Objects_Get_information_id> 10bfed: 5a pop %edx 10bfee: 59 pop %ecx 10bfef: 53 push %ebx 10bff0: 50 push %eax 10bff1: e8 02 12 00 00 call 10d1f8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10bff6: 58 pop %eax 10bff7: ff 35 10 74 12 00 pushl 0x127410 10bffd: e8 42 05 00 00 call 10c544 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10c002: e8 69 1b 00 00 call 10db70 <_Thread_Enable_dispatch> 10c007: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c009: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10c00c: 8b 5d fc mov -0x4(%ebp),%ebx 10c00f: c9 leave 10c010: c3 ret 10c011: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10c014: 83 ec 0c sub $0xc,%esp 10c017: ff 35 10 74 12 00 pushl 0x127410 10c01d: e8 22 05 00 00 call 10c544 <_API_Mutex_Unlock> 10c022: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10c027: 83 c4 10 add $0x10,%esp } 10c02a: 8b 5d fc mov -0x4(%ebp),%ebx 10c02d: c9 leave 10c02e: c3 ret =============================================================================== 0010dac0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10dac0: 55 push %ebp 10dac1: 89 e5 mov %esp,%ebp 10dac3: 56 push %esi 10dac4: 53 push %ebx 10dac5: 83 ec 10 sub $0x10,%esp 10dac8: 8b 45 08 mov 0x8(%ebp),%eax 10dacb: 8b 75 0c mov 0xc(%ebp),%esi 10dace: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10dad1: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10dad8: 74 6e je 10db48 return RTEMS_NOT_CONFIGURED; if ( !note ) 10dada: 85 db test %ebx,%ebx 10dadc: 74 7e je 10db5c /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10dade: 83 fe 0f cmp $0xf,%esi 10dae1: 77 3d ja 10db20 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dae3: 85 c0 test %eax,%eax 10dae5: 74 45 je 10db2c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dae7: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10daed: 3b 42 08 cmp 0x8(%edx),%eax 10daf0: 74 40 je 10db32 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10daf2: 83 ec 08 sub $0x8,%esp 10daf5: 8d 55 f4 lea -0xc(%ebp),%edx 10daf8: 52 push %edx 10daf9: 50 push %eax 10dafa: e8 b9 1e 00 00 call 10f9b8 <_Thread_Get> switch ( location ) { 10daff: 83 c4 10 add $0x10,%esp 10db02: 8b 55 f4 mov -0xc(%ebp),%edx 10db05: 85 d2 test %edx,%edx 10db07: 75 4b jne 10db54 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db09: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10db0f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db13: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10db15: e8 7a 1e 00 00 call 10f994 <_Thread_Enable_dispatch> 10db1a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10db1c: eb 07 jmp 10db25 10db1e: 66 90 xchg %ax,%ax /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10db20: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db25: 8d 65 f8 lea -0x8(%ebp),%esp 10db28: 5b pop %ebx 10db29: 5e pop %esi 10db2a: c9 leave 10db2b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db2c: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db32: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10db38: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db3c: 89 03 mov %eax,(%ebx) 10db3e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db40: 8d 65 f8 lea -0x8(%ebp),%esp 10db43: 5b pop %ebx 10db44: 5e pop %esi 10db45: c9 leave 10db46: c3 ret 10db47: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10db48: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db4d: 8d 65 f8 lea -0x8(%ebp),%esp 10db50: 5b pop %ebx 10db51: 5e pop %esi 10db52: c9 leave 10db53: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10db54: b8 04 00 00 00 mov $0x4,%eax 10db59: eb ca jmp 10db25 10db5b: 90 nop RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10db5c: b8 09 00 00 00 mov $0x9,%eax 10db61: eb c2 jmp 10db25 =============================================================================== 00118a54 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118a54: 55 push %ebp 118a55: 89 e5 mov %esp,%ebp 118a57: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118a5a: 8d 45 f4 lea -0xc(%ebp),%eax 118a5d: 50 push %eax 118a5e: ff 75 08 pushl 0x8(%ebp) 118a61: e8 3e 37 00 00 call 11c1a4 <_Thread_Get> switch ( location ) { 118a66: 83 c4 10 add $0x10,%esp 118a69: 8b 55 f4 mov -0xc(%ebp),%edx 118a6c: 85 d2 test %edx,%edx 118a6e: 74 08 je 118a78 118a70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a75: c9 leave 118a76: c3 ret 118a77: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118a78: f6 40 10 02 testb $0x2,0x10(%eax) 118a7c: 74 0e je 118a8c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118a7e: e8 d1 36 00 00 call 11c154 <_Thread_Enable_dispatch> 118a83: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a88: c9 leave 118a89: c3 ret 118a8a: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 118a8c: e8 c3 36 00 00 call 11c154 <_Thread_Enable_dispatch> 118a91: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: c9 leave 118a94: c3 ret =============================================================================== 00113950 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 113950: 55 push %ebp 113951: 89 e5 mov %esp,%ebp 113953: 57 push %edi 113954: 56 push %esi 113955: 53 push %ebx 113956: 83 ec 1c sub $0x1c,%esp 113959: 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 ) 11395c: 85 c9 test %ecx,%ecx 11395e: 0f 84 1c 01 00 00 je 113a80 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 113964: 8b 1d 18 74 12 00 mov 0x127418,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11396a: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 113970: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 113974: 19 f6 sbb %esi,%esi 113976: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 11397c: 8b 53 7c mov 0x7c(%ebx),%edx 11397f: 85 d2 test %edx,%edx 113981: 0f 85 b5 00 00 00 jne 113a3c if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113987: 80 7f 08 01 cmpb $0x1,0x8(%edi) 11398b: 19 d2 sbb %edx,%edx 11398d: 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(); 113993: 89 55 e4 mov %edx,-0x1c(%ebp) 113996: 89 4d e0 mov %ecx,-0x20(%ebp) 113999: e8 7e b5 ff ff call 10ef1c <_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; 11399e: 8b 55 e4 mov -0x1c(%ebp),%edx 1139a1: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1139a3: 09 f0 or %esi,%eax 1139a5: 8b 4d e0 mov -0x20(%ebp),%ecx 1139a8: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1139aa: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1139b1: 74 0f je 1139c2 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1139b3: 8b 45 08 mov 0x8(%ebp),%eax 1139b6: c1 e8 08 shr $0x8,%eax 1139b9: 83 f0 01 xor $0x1,%eax 1139bc: 83 e0 01 and $0x1,%eax 1139bf: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1139c2: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1139c9: 74 18 je 1139e3 if ( _Modes_Is_timeslice(mode_set) ) { 1139cb: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1139d2: 74 74 je 113a48 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1139d4: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1139db: a1 24 73 12 00 mov 0x127324,%eax 1139e0: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1139e3: f6 45 0c 01 testb $0x1,0xc(%ebp) 1139e7: 74 07 je 1139f0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1139e9: f6 45 08 01 testb $0x1,0x8(%ebp) 1139ed: 74 69 je 113a58 1139ef: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1139f0: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1139f7: 74 2c je 113a25 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1139f9: 8b 45 08 mov 0x8(%ebp),%eax 1139fc: c1 e8 0a shr $0xa,%eax 1139ff: 83 f0 01 xor $0x1,%eax 113a02: 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; 113a05: 38 47 08 cmp %al,0x8(%edi) 113a08: 74 1b je 113a25 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; 113a0a: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 113a0d: 9c pushf 113a0e: fa cli 113a0f: 58 pop %eax _signals = information->signals_pending; 113a10: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 113a13: 8b 4f 14 mov 0x14(%edi),%ecx 113a16: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 113a19: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 113a1c: 50 push %eax 113a1d: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113a1e: 8b 47 14 mov 0x14(%edi),%eax 113a21: 85 c0 test %eax,%eax 113a23: 75 53 jne 113a78 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; 113a25: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 113a27: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 113a2e: 74 2c je 113a5c <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 113a30: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a32: 83 c4 1c add $0x1c,%esp 113a35: 5b pop %ebx 113a36: 5e pop %esi 113a37: 5f pop %edi 113a38: c9 leave 113a39: c3 ret 113a3a: 66 90 xchg %ax,%ax old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 113a3c: 81 ce 00 02 00 00 or $0x200,%esi 113a42: e9 40 ff ff ff jmp 113987 113a47: 90 nop if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 113a48: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 113a4f: f6 45 0c 01 testb $0x1,0xc(%ebp) 113a53: 74 9b je 1139f0 113a55: eb 92 jmp 1139e9 113a57: 90 nop 113a58: fb sti 113a59: eb 95 jmp 1139f0 113a5b: 90 nop } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 113a5c: e8 ab 01 00 00 call 113c0c <_Thread_Evaluate_mode> 113a61: 84 c0 test %al,%al 113a63: 75 04 jne 113a69 113a65: 84 db test %bl,%bl 113a67: 74 c7 je 113a30 _Thread_Dispatch(); 113a69: e8 a6 9f ff ff call 10da14 <_Thread_Dispatch> 113a6e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a70: 83 c4 1c add $0x1c,%esp 113a73: 5b pop %ebx 113a74: 5e pop %esi 113a75: 5f pop %edi 113a76: c9 leave 113a77: c3 ret 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; 113a78: c6 43 74 01 movb $0x1,0x74(%ebx) 113a7c: b3 01 mov $0x1,%bl 113a7e: eb a7 jmp 113a27 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 113a80: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 113a85: 83 c4 1c add $0x1c,%esp 113a88: 5b pop %ebx 113a89: 5e pop %esi 113a8a: 5f pop %edi 113a8b: c9 leave 113a8c: c3 ret =============================================================================== 0010f2f0 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f2f0: 55 push %ebp 10f2f1: 89 e5 mov %esp,%ebp 10f2f3: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f2f6: 8d 45 f4 lea -0xc(%ebp),%eax 10f2f9: 50 push %eax 10f2fa: ff 75 08 pushl 0x8(%ebp) 10f2fd: e8 16 1c 00 00 call 110f18 <_Thread_Get> switch ( location ) { 10f302: 83 c4 10 add $0x10,%esp 10f305: 8b 55 f4 mov -0xc(%ebp),%edx 10f308: 85 d2 test %edx,%edx 10f30a: 74 08 je 10f314 10f30c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f311: c9 leave 10f312: c3 ret 10f313: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f314: f6 40 10 02 testb $0x2,0x10(%eax) 10f318: 75 0e jne 10f328 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f31a: e8 a9 1b 00 00 call 110ec8 <_Thread_Enable_dispatch> 10f31f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f324: c9 leave 10f325: c3 ret 10f326: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10f328: 83 ec 08 sub $0x8,%esp 10f32b: 6a 01 push $0x1 10f32d: 50 push %eax 10f32e: e8 05 24 00 00 call 111738 <_Thread_Resume> _Thread_Enable_dispatch(); 10f333: e8 90 1b 00 00 call 110ec8 <_Thread_Enable_dispatch> 10f338: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f33a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f33d: c9 leave 10f33e: c3 ret =============================================================================== 0010dc38 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 56 push %esi 10dc3c: 53 push %ebx 10dc3d: 83 ec 10 sub $0x10,%esp 10dc40: 8b 45 08 mov 0x8(%ebp),%eax 10dc43: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc46: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10dc49: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10dc50: 74 66 je 10dcb8 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10dc52: 83 fb 0f cmp $0xf,%ebx 10dc55: 77 39 ja 10dc90 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc57: 85 c0 test %eax,%eax 10dc59: 74 41 je 10dc9c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dc5b: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc61: 3b 42 08 cmp 0x8(%edx),%eax 10dc64: 74 3c je 10dca2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10dc66: 83 ec 08 sub $0x8,%esp 10dc69: 8d 55 f4 lea -0xc(%ebp),%edx 10dc6c: 52 push %edx 10dc6d: 50 push %eax 10dc6e: e8 45 1d 00 00 call 10f9b8 <_Thread_Get> switch ( location ) { 10dc73: 83 c4 10 add $0x10,%esp 10dc76: 8b 55 f4 mov -0xc(%ebp),%edx 10dc79: 85 d2 test %edx,%edx 10dc7b: 75 47 jne 10dcc4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dc7d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10dc83: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10dc87: e8 08 1d 00 00 call 10f994 <_Thread_Enable_dispatch> 10dc8c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10dc8e: eb 05 jmp 10dc95 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10dc90: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dc95: 8d 65 f8 lea -0x8(%ebp),%esp 10dc98: 5b pop %ebx 10dc99: 5e pop %esi 10dc9a: c9 leave 10dc9b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc9c: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dca2: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10dca8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10dcac: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcae: 8d 65 f8 lea -0x8(%ebp),%esp 10dcb1: 5b pop %ebx 10dcb2: 5e pop %esi 10dcb3: c9 leave 10dcb4: c3 ret 10dcb5: 8d 76 00 lea 0x0(%esi),%esi { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10dcb8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcbd: 8d 65 f8 lea -0x8(%ebp),%esp 10dcc0: 5b pop %ebx 10dcc1: 5e pop %esi 10dcc2: c9 leave 10dcc3: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10dcc4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcc9: 8d 65 f8 lea -0x8(%ebp),%esp 10dccc: 5b pop %ebx 10dccd: 5e pop %esi 10dcce: c9 leave 10dccf: c3 ret =============================================================================== 0010ffac : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ffac: 55 push %ebp 10ffad: 89 e5 mov %esp,%ebp 10ffaf: 56 push %esi 10ffb0: 53 push %ebx 10ffb1: 83 ec 10 sub $0x10,%esp 10ffb4: 8b 5d 0c mov 0xc(%ebp),%ebx 10ffb7: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ffba: 85 db test %ebx,%ebx 10ffbc: 74 0b je 10ffc9 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ffbe: 0f b6 05 14 72 12 00 movzbl 0x127214,%eax 10ffc5: 39 c3 cmp %eax,%ebx 10ffc7: 77 5f ja 110028 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10ffc9: 85 f6 test %esi,%esi 10ffcb: 74 67 je 110034 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ffcd: 83 ec 08 sub $0x8,%esp 10ffd0: 8d 45 f4 lea -0xc(%ebp),%eax 10ffd3: 50 push %eax 10ffd4: ff 75 08 pushl 0x8(%ebp) 10ffd7: e8 6c 1d 00 00 call 111d48 <_Thread_Get> switch ( location ) { 10ffdc: 83 c4 10 add $0x10,%esp 10ffdf: 8b 55 f4 mov -0xc(%ebp),%edx 10ffe2: 85 d2 test %edx,%edx 10ffe4: 75 36 jne 11001c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10ffe6: 8b 50 14 mov 0x14(%eax),%edx 10ffe9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10ffeb: 85 db test %ebx,%ebx 10ffed: 74 1c je 11000b the_thread->real_priority = new_priority; 10ffef: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fff2: 8b 48 1c mov 0x1c(%eax),%ecx 10fff5: 85 c9 test %ecx,%ecx 10fff7: 74 05 je 10fffe the_thread->current_priority > new_priority ) 10fff9: 3b 58 14 cmp 0x14(%eax),%ebx 10fffc: 73 0d jae 11000b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10fffe: 52 push %edx 10ffff: 6a 00 push $0x0 110001: 53 push %ebx 110002: 50 push %eax 110003: e8 08 18 00 00 call 111810 <_Thread_Change_priority> 110008: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 11000b: e8 e8 1c 00 00 call 111cf8 <_Thread_Enable_dispatch> 110010: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110012: 8d 65 f8 lea -0x8(%ebp),%esp 110015: 5b pop %ebx 110016: 5e pop %esi 110017: c9 leave 110018: c3 ret 110019: 8d 76 00 lea 0x0(%esi),%esi if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 11001c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110021: 8d 65 f8 lea -0x8(%ebp),%esp 110024: 5b pop %ebx 110025: 5e pop %esi 110026: c9 leave 110027: c3 ret 110028: b8 13 00 00 00 mov $0x13,%eax 11002d: 8d 65 f8 lea -0x8(%ebp),%esp 110030: 5b pop %ebx 110031: 5e pop %esi 110032: c9 leave 110033: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 110034: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110039: 8d 65 f8 lea -0x8(%ebp),%esp 11003c: 5b pop %ebx 11003d: 5e pop %esi 11003e: c9 leave 11003f: c3 ret =============================================================================== 0010c0e8 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 4e je 10c144 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10c0f6: 83 ec 08 sub $0x8,%esp 10c0f9: 8d 45 f4 lea -0xc(%ebp),%eax 10c0fc: 50 push %eax 10c0fd: ff 75 08 pushl 0x8(%ebp) 10c100: e8 8f 1a 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10c105: 83 c4 10 add $0x10,%esp 10c108: 8b 55 f4 mov -0xc(%ebp),%edx 10c10b: 85 d2 test %edx,%edx 10c10d: 75 29 jne 10c138 case OBJECTS_LOCAL: if ( _Thread_Start( 10c10f: 83 ec 0c sub $0xc,%esp 10c112: ff 75 10 pushl 0x10(%ebp) 10c115: 6a 00 push $0x0 10c117: 53 push %ebx 10c118: 6a 00 push $0x0 10c11a: 50 push %eax 10c11b: e8 40 25 00 00 call 10e660 <_Thread_Start> 10c120: 83 c4 20 add $0x20,%esp 10c123: 84 c0 test %al,%al 10c125: 75 29 jne 10c150 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c127: e8 44 1a 00 00 call 10db70 <_Thread_Enable_dispatch> 10c12c: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c131: 8b 5d fc mov -0x4(%ebp),%ebx 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c13d: 8b 5d fc mov -0x4(%ebp),%ebx 10c140: c9 leave 10c141: c3 ret 10c142: 66 90 xchg %ax,%ax ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c144: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c149: 8b 5d fc mov -0x4(%ebp),%ebx 10c14c: c9 leave 10c14d: c3 ret 10c14e: 66 90 xchg %ax,%ax switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c150: e8 1b 1a 00 00 call 10db70 <_Thread_Enable_dispatch> 10c155: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c157: 8b 5d fc mov -0x4(%ebp),%ebx 10c15a: c9 leave 10c15b: c3 ret =============================================================================== 00111508 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 111508: 55 push %ebp 111509: 89 e5 mov %esp,%ebp 11150b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11150e: 8d 45 f4 lea -0xc(%ebp),%eax 111511: 50 push %eax 111512: ff 75 08 pushl 0x8(%ebp) 111515: e8 7a c6 ff ff call 10db94 <_Thread_Get> switch ( location ) { 11151a: 83 c4 10 add $0x10,%esp 11151d: 8b 55 f4 mov -0xc(%ebp),%edx 111520: 85 d2 test %edx,%edx 111522: 74 08 je 11152c 111524: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111529: c9 leave 11152a: c3 ret 11152b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 11152c: f6 40 10 02 testb $0x2,0x10(%eax) 111530: 74 0e je 111540 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 111532: e8 39 c6 ff ff call 10db70 <_Thread_Enable_dispatch> 111537: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11153c: c9 leave 11153d: c3 ret 11153e: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 111540: 83 ec 0c sub $0xc,%esp 111543: 50 push %eax 111544: e8 6b 0a 00 00 call 111fb4 <_Thread_Suspend> _Thread_Enable_dispatch(); 111549: e8 22 c6 ff ff call 10db70 <_Thread_Enable_dispatch> 11154e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111550: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111553: c9 leave 111554: c3 ret =============================================================================== 0010c9c8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c9c8: 55 push %ebp 10c9c9: 89 e5 mov %esp,%ebp 10c9cb: 57 push %edi 10c9cc: 56 push %esi 10c9cd: 53 push %ebx 10c9ce: 83 ec 1c sub $0x1c,%esp 10c9d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c9d4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c9d7: 85 db test %ebx,%ebx 10c9d9: 0f 84 9d 00 00 00 je 10ca7c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c9df: 83 ec 08 sub $0x8,%esp 10c9e2: 8d 45 e4 lea -0x1c(%ebp),%eax 10c9e5: 50 push %eax 10c9e6: ff 75 08 pushl 0x8(%ebp) 10c9e9: e8 2a 1c 00 00 call 10e618 <_Thread_Get> 10c9ee: 89 c6 mov %eax,%esi switch (location) { 10c9f0: 83 c4 10 add $0x10,%esp 10c9f3: 8b 45 e4 mov -0x1c(%ebp),%eax 10c9f6: 85 c0 test %eax,%eax 10c9f8: 74 0e je 10ca08 10c9fa: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c9ff: 8d 65 f4 lea -0xc(%ebp),%esp 10ca02: 5b pop %ebx 10ca03: 5e pop %esi 10ca04: 5f pop %edi 10ca05: c9 leave 10ca06: c3 ret 10ca07: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10ca08: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 10ca0e: 85 c0 test %eax,%eax 10ca10: 75 44 jne 10ca56 10ca12: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10ca14: 83 ec 0c sub $0xc,%esp 10ca17: 6a 14 push $0x14 10ca19: e8 12 2d 00 00 call 10f730 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10ca1e: 83 c4 10 add $0x10,%esp 10ca21: 85 c0 test %eax,%eax 10ca23: 74 4b je 10ca70 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10ca25: 8b 13 mov (%ebx),%edx 10ca27: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10ca2a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10ca2d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10ca30: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 10ca36: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10ca38: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 10ca3e: e8 b1 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca43: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca45: 8d 65 f4 lea -0xc(%ebp),%esp 10ca48: 5b pop %ebx 10ca49: 5e pop %esi 10ca4a: 5f pop %edi 10ca4b: c9 leave 10ca4c: c3 ret 10ca4d: 8d 76 00 lea 0x0(%esi),%esi if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10ca50: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 10ca52: 85 c0 test %eax,%eax 10ca54: 74 be je 10ca14 if (tvp->ptr == ptr) { 10ca56: 39 58 04 cmp %ebx,0x4(%eax) 10ca59: 75 f5 jne 10ca50 tvp->dtor = dtor; 10ca5b: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10ca5e: e8 91 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca63: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca65: 8d 65 f4 lea -0xc(%ebp),%esp 10ca68: 5b pop %ebx 10ca69: 5e pop %esi 10ca6a: 5f pop %edi 10ca6b: c9 leave 10ca6c: c3 ret 10ca6d: 8d 76 00 lea 0x0(%esi),%esi * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 10ca70: e8 7f 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca75: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 10ca7a: eb 83 jmp 10c9ff { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10ca7c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca81: 8d 65 f4 lea -0xc(%ebp),%esp 10ca84: 5b pop %ebx 10ca85: 5e pop %esi 10ca86: 5f pop %edi 10ca87: c9 leave 10ca88: c3 ret =============================================================================== 0010ca8c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10ca8c: 55 push %ebp 10ca8d: 89 e5 mov %esp,%ebp 10ca8f: 53 push %ebx 10ca90: 83 ec 14 sub $0x14,%esp 10ca93: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10ca96: 85 db test %ebx,%ebx 10ca98: 74 4c je 10cae6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10ca9a: 83 ec 08 sub $0x8,%esp 10ca9d: 8d 45 f4 lea -0xc(%ebp),%eax 10caa0: 50 push %eax 10caa1: ff 75 08 pushl 0x8(%ebp) 10caa4: e8 6f 1b 00 00 call 10e618 <_Thread_Get> switch (location) { 10caa9: 83 c4 10 add $0x10,%esp 10caac: 8b 55 f4 mov -0xc(%ebp),%edx 10caaf: 85 d2 test %edx,%edx 10cab1: 74 0d je 10cac0 10cab3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cab8: 8b 5d fc mov -0x4(%ebp),%ebx 10cabb: c9 leave 10cabc: c3 ret 10cabd: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10cac0: 8b 90 00 01 00 00 mov 0x100(%eax),%edx while (tvp) { 10cac6: 85 d2 test %edx,%edx 10cac8: 74 17 je 10cae1 if (tvp->ptr == ptr) { 10caca: 39 5a 04 cmp %ebx,0x4(%edx) 10cacd: 75 0a jne 10cad9 10cacf: eb 3c jmp 10cb0d 10cad1: 8d 76 00 lea 0x0(%esi),%esi 10cad4: 39 5a 04 cmp %ebx,0x4(%edx) 10cad7: 74 17 je 10caf0 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cad9: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10cadb: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10cadd: 85 d2 test %edx,%edx 10cadf: 75 f3 jne 10cad4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cae1: e8 0e 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cae6: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caeb: 8b 5d fc mov -0x4(%ebp),%ebx 10caee: c9 leave 10caef: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10caf0: 8b 1a mov (%edx),%ebx 10caf2: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10caf4: 83 ec 08 sub $0x8,%esp 10caf7: 52 push %edx 10caf8: 50 push %eax 10caf9: e8 a2 00 00 00 call 10cba0 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10cafe: e8 f1 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb03: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cb05: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb08: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0b: c9 leave 10cb0c: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10cb0d: 8b 0a mov (%edx),%ecx 10cb0f: 89 88 00 01 00 00 mov %ecx,0x100(%eax) 10cb15: eb dd jmp 10caf4 =============================================================================== 0010cb18 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10cb18: 55 push %ebp 10cb19: 89 e5 mov %esp,%ebp 10cb1b: 56 push %esi 10cb1c: 53 push %ebx 10cb1d: 83 ec 10 sub $0x10,%esp 10cb20: 8b 5d 0c mov 0xc(%ebp),%ebx 10cb23: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10cb26: 85 db test %ebx,%ebx 10cb28: 74 56 je 10cb80 return RTEMS_INVALID_ADDRESS; if ( !result ) 10cb2a: 85 f6 test %esi,%esi 10cb2c: 74 52 je 10cb80 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10cb2e: 83 ec 08 sub $0x8,%esp 10cb31: 8d 45 f4 lea -0xc(%ebp),%eax 10cb34: 50 push %eax 10cb35: ff 75 08 pushl 0x8(%ebp) 10cb38: e8 db 1a 00 00 call 10e618 <_Thread_Get> switch (location) { 10cb3d: 83 c4 10 add $0x10,%esp 10cb40: 8b 55 f4 mov -0xc(%ebp),%edx 10cb43: 85 d2 test %edx,%edx 10cb45: 75 2d jne 10cb74 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10cb47: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10cb4d: 85 c0 test %eax,%eax 10cb4f: 75 09 jne 10cb5a 10cb51: eb 39 jmp 10cb8c 10cb53: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10cb54: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 10cb56: 85 c0 test %eax,%eax 10cb58: 74 32 je 10cb8c <== NEVER TAKEN if (tvp->ptr == ptr) { 10cb5a: 39 58 04 cmp %ebx,0x4(%eax) 10cb5d: 75 f5 jne 10cb54 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10cb5f: 8b 40 0c mov 0xc(%eax),%eax 10cb62: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10cb64: e8 8b 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb69: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb6b: 8d 65 f8 lea -0x8(%ebp),%esp 10cb6e: 5b pop %ebx 10cb6f: 5e pop %esi 10cb70: c9 leave 10cb71: c3 ret 10cb72: 66 90 xchg %ax,%ax if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 10cb74: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb79: 8d 65 f8 lea -0x8(%ebp),%esp 10cb7c: 5b pop %ebx 10cb7d: 5e pop %esi 10cb7e: c9 leave 10cb7f: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 10cb80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb85: 8d 65 f8 lea -0x8(%ebp),%esp 10cb88: 5b pop %ebx 10cb89: 5e pop %esi 10cb8a: c9 leave 10cb8b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cb8c: e8 63 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb91: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb96: 8d 65 f8 lea -0x8(%ebp),%esp 10cb99: 5b pop %ebx 10cb9a: 5e pop %esi 10cb9b: c9 leave 10cb9c: c3 ret =============================================================================== 0010cf88 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10cf88: 55 push %ebp 10cf89: 89 e5 mov %esp,%ebp 10cf8b: 53 push %ebx 10cf8c: 83 ec 14 sub $0x14,%esp 10cf8f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10cf92: 80 3d 4c a8 12 00 00 cmpb $0x0,0x12a84c 10cf99: 0f 84 a9 00 00 00 je 10d048 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10cf9f: 85 db test %ebx,%ebx 10cfa1: 0f 84 ad 00 00 00 je 10d054 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10cfa7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10cfae: 83 ec 0c sub $0xc,%esp 10cfb1: 53 push %ebx 10cfb2: e8 d9 f3 ff ff call 10c390 <_TOD_Validate> 10cfb7: 83 c4 10 add $0x10,%esp 10cfba: 84 c0 test %al,%al 10cfbc: 75 0a jne 10cfc8 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cfbe: b8 14 00 00 00 mov $0x14,%eax } 10cfc3: 8b 5d fc mov -0x4(%ebp),%ebx 10cfc6: c9 leave 10cfc7: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10cfc8: 83 ec 0c sub $0xc,%esp 10cfcb: 53 push %ebx 10cfcc: e8 33 f3 ff ff call 10c304 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10cfd1: 83 c4 10 add $0x10,%esp 10cfd4: 3b 05 cc a8 12 00 cmp 0x12a8cc,%eax 10cfda: 76 e2 jbe 10cfbe 10cfdc: 8b 15 38 a8 12 00 mov 0x12a838,%edx 10cfe2: 42 inc %edx 10cfe3: 89 15 38 a8 12 00 mov %edx,0x12a838 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10cfe9: 83 ec 08 sub $0x8,%esp 10cfec: 6a 10 push $0x10 10cfee: ff 35 f8 a8 12 00 pushl 0x12a8f8 10cff4: 89 45 f4 mov %eax,-0xc(%ebp) 10cff7: e8 3c 23 00 00 call 10f338 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10cffc: 8b 15 f8 a8 12 00 mov 0x12a8f8,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10d002: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d005: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10d00c: c7 42 64 f0 e8 10 00 movl $0x10e8f0,0x64(%edx) the_watchdog->id = id; 10d013: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10d016: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d01d: 8b 45 f4 mov -0xc(%ebp),%eax 10d020: 2b 05 cc a8 12 00 sub 0x12a8cc,%eax 10d026: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10d029: 58 pop %eax 10d02a: 59 pop %ecx 10d02b: 83 c2 48 add $0x48,%edx 10d02e: 52 push %edx 10d02f: 68 0c a9 12 00 push $0x12a90c 10d034: e8 c7 29 00 00 call 10fa00 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10d039: e8 4a 1a 00 00 call 10ea88 <_Thread_Enable_dispatch> 10d03e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d040: 83 c4 10 add $0x10,%esp 10d043: e9 7b ff ff ff jmp 10cfc3 rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10d048: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d04d: 8b 5d fc mov -0x4(%ebp),%ebx 10d050: c9 leave 10d051: c3 ret 10d052: 66 90 xchg %ax,%ax Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10d054: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d059: 8b 5d fc mov -0x4(%ebp),%ebx 10d05c: c9 leave 10d05d: c3 ret =============================================================================== 0010a738 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a738: 55 push %ebp 10a739: 89 e5 mov %esp,%ebp 10a73b: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a73e: 83 f8 09 cmp $0x9,%eax 10a741: 0f 84 f1 00 00 00 je 10a838 <== NEVER TAKEN 10a747: 7e 37 jle 10a780 <== ALWAYS TAKEN 10a749: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED 10a74c: 0f 84 f6 00 00 00 je 10a848 <== NOT EXECUTED 10a752: 7e 5c jle 10a7b0 <== NOT EXECUTED 10a754: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED 10a759: 0f 84 01 01 00 00 je 10a860 <== NOT EXECUTED 10a75f: 0f 8e 97 00 00 00 jle 10a7fc <== NOT EXECUTED 10a765: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED 10a76a: 0f 84 e0 00 00 00 je 10a850 <== NOT EXECUTED 10a770: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED 10a775: 75 51 jne 10a7c8 <== 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; 10a777: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a77c: c9 leave <== NOT EXECUTED 10a77d: c3 ret <== NOT EXECUTED 10a77e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a780: 83 f8 04 cmp $0x4,%eax 10a783: 0f 84 b7 00 00 00 je 10a840 <== NEVER TAKEN 10a789: 7f 45 jg 10a7d0 <== NEVER TAKEN 10a78b: 83 f8 01 cmp $0x1,%eax 10a78e: 0f 84 8c 00 00 00 je 10a820 <== NEVER TAKEN 10a794: 0f 8e de 00 00 00 jle 10a878 <== ALWAYS TAKEN 10a79a: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10a79d: 0f 84 c5 00 00 00 je 10a868 <== NOT EXECUTED 10a7a3: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10a7a6: 75 20 jne 10a7c8 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a7a8: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7ad: c9 leave <== NOT EXECUTED 10a7ae: c3 ret <== NOT EXECUTED 10a7af: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7b0: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED 10a7b3: 0f 84 9f 00 00 00 je 10a858 <== NOT EXECUTED 10a7b9: 7c 39 jl 10a7f4 <== NOT EXECUTED 10a7bb: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED 10a7be: 74 50 je 10a810 <== NOT EXECUTED 10a7c0: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED 10a7c3: 74 62 je 10a827 <== NOT EXECUTED 10a7c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 10a7c8: b8 ff ff ff ff mov $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 10a7cd: c9 leave 10a7ce: c3 ret 10a7cf: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7d0: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10a7d3: 74 43 je 10a818 <== NOT EXECUTED 10a7d5: 7c 15 jl 10a7ec <== NOT EXECUTED 10a7d7: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED 10a7da: 0f 84 90 00 00 00 je 10a870 <== NOT EXECUTED 10a7e0: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED 10a7e3: 75 e3 jne 10a7c8 <== 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; 10a7e5: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7ea: c9 leave <== NOT EXECUTED 10a7eb: c3 ret <== NOT EXECUTED switch (termios_baud) { 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; 10a7ec: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7f1: c9 leave <== NOT EXECUTED 10a7f2: c3 ret <== NOT EXECUTED 10a7f3: 90 nop <== 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; 10a7f4: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7f9: c9 leave <== NOT EXECUTED 10a7fa: c3 ret <== NOT EXECUTED 10a7fb: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7fc: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED 10a7ff: 74 2f je 10a830 <== NOT EXECUTED 10a801: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED 10a806: 75 c0 jne 10a7c8 <== 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; 10a808: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a80d: c9 leave <== NOT EXECUTED 10a80e: c3 ret <== NOT EXECUTED 10a80f: 90 nop <== 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; 10a810: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a815: c9 leave <== NOT EXECUTED 10a816: c3 ret <== NOT EXECUTED 10a817: 90 nop <== 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; 10a818: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a81d: c9 leave <== NOT EXECUTED 10a81e: c3 ret <== NOT EXECUTED 10a81f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a820: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a825: c9 leave <== NOT EXECUTED 10a826: c3 ret <== 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; 10a827: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a82c: c9 leave <== NOT EXECUTED 10a82d: c3 ret <== NOT EXECUTED 10a82e: 66 90 xchg %ax,%ax <== 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; 10a830: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a835: c9 leave <== NOT EXECUTED 10a836: c3 ret <== NOT EXECUTED 10a837: 90 nop <== NOT EXECUTED 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; 10a838: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a83d: c9 leave <== NOT EXECUTED 10a83e: c3 ret <== NOT EXECUTED 10a83f: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10a840: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a845: c9 leave <== NOT EXECUTED 10a846: c3 ret <== NOT EXECUTED 10a847: 90 nop <== 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; 10a848: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a84d: c9 leave <== NOT EXECUTED 10a84e: c3 ret <== NOT EXECUTED 10a84f: 90 nop <== 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; 10a850: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a855: c9 leave <== NOT EXECUTED 10a856: c3 ret <== NOT EXECUTED 10a857: 90 nop <== 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; 10a858: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a85d: c9 leave <== NOT EXECUTED 10a85e: c3 ret <== NOT EXECUTED 10a85f: 90 nop <== 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; 10a860: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a865: c9 leave <== NOT EXECUTED 10a866: c3 ret <== NOT EXECUTED 10a867: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a868: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a86d: c9 leave <== NOT EXECUTED 10a86e: c3 ret <== NOT EXECUTED 10a86f: 90 nop <== 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; 10a870: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a875: c9 leave <== NOT EXECUTED 10a876: c3 ret <== NOT EXECUTED 10a877: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a878: 85 c0 test %eax,%eax 10a87a: 0f 85 48 ff ff ff jne 10a7c8 <== ALWAYS TAKEN 10a880: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a882: c9 leave <== NOT EXECUTED 10a883: c3 ret <== NOT EXECUTED =============================================================================== 00109454 : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 109454: 55 push %ebp 109455: 89 e5 mov %esp,%ebp 109457: 8b 45 08 mov 0x8(%ebp),%eax int32_t baud; switch (termios_baud) { 10945a: 83 f8 09 cmp $0x9,%eax 10945d: 0f 84 f1 00 00 00 je 109554 109463: 7e 37 jle 10949c 109465: 83 f8 0e cmp $0xe,%eax 109468: 0f 84 f6 00 00 00 je 109564 10946e: 7e 5c jle 1094cc 109470: 3d 02 10 00 00 cmp $0x1002,%eax 109475: 0f 84 01 01 00 00 je 10957c 10947b: 0f 8e 97 00 00 00 jle 109518 109481: 3d 03 10 00 00 cmp $0x1003,%eax 109486: 0f 84 e0 00 00 00 je 10956c 10948c: 3d 04 10 00 00 cmp $0x1004,%eax 109491: 75 51 jne 1094e4 <== NEVER TAKEN case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 109493: b8 00 08 07 00 mov $0x70800,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109498: c9 leave 109499: c3 ret 10949a: 66 90 xchg %ax,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 10949c: 83 f8 04 cmp $0x4,%eax 10949f: 0f 84 b7 00 00 00 je 10955c 1094a5: 7f 45 jg 1094ec 1094a7: 83 f8 01 cmp $0x1,%eax 1094aa: 0f 84 8c 00 00 00 je 10953c 1094b0: 0f 8e de 00 00 00 jle 109594 1094b6: 83 f8 02 cmp $0x2,%eax 1094b9: 0f 84 c5 00 00 00 je 109584 1094bf: 83 f8 03 cmp $0x3,%eax 1094c2: 75 20 jne 1094e4 <== NEVER TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 1094c4: b8 6e 00 00 00 mov $0x6e,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 1094c9: c9 leave 1094ca: c3 ret 1094cb: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 1094cc: 83 f8 0b cmp $0xb,%eax 1094cf: 0f 84 9f 00 00 00 je 109574 1094d5: 7c 39 jl 109510 1094d7: 83 f8 0c cmp $0xc,%eax 1094da: 74 50 je 10952c 1094dc: 83 f8 0d cmp $0xd,%eax 1094df: 74 62 je 109543 <== ALWAYS TAKEN 1094e1: 8d 76 00 lea 0x0(%esi),%esi case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 1094e4: b8 ff ff ff ff mov $0xffffffff,%eax default: baud = -1; break; } return baud; } 1094e9: c9 leave 1094ea: c3 ret 1094eb: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 1094ec: 83 f8 06 cmp $0x6,%eax 1094ef: 74 43 je 109534 1094f1: 7c 15 jl 109508 1094f3: 83 f8 07 cmp $0x7,%eax 1094f6: 0f 84 90 00 00 00 je 10958c 1094fc: 83 f8 08 cmp $0x8,%eax 1094ff: 75 e3 jne 1094e4 <== NEVER TAKEN case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 109501: b8 58 02 00 00 mov $0x258,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109506: c9 leave 109507: c3 ret switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 109508: b8 96 00 00 00 mov $0x96,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 10950d: c9 leave 10950e: c3 ret 10950f: 90 nop case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 109510: b8 08 07 00 00 mov $0x708,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109515: c9 leave 109516: c3 ret 109517: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109518: 83 f8 0f cmp $0xf,%eax 10951b: 74 2f je 10954c 10951d: 3d 01 10 00 00 cmp $0x1001,%eax 109522: 75 c0 jne 1094e4 <== NEVER TAKEN case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 109524: b8 00 e1 00 00 mov $0xe100,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109529: c9 leave 10952a: c3 ret 10952b: 90 nop case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 10952c: b8 c0 12 00 00 mov $0x12c0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109531: c9 leave 109532: c3 ret 109533: 90 nop case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 109534: b8 c8 00 00 00 mov $0xc8,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109539: c9 leave 10953a: c3 ret 10953b: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 10953c: b8 32 00 00 00 mov $0x32,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109541: c9 leave 109542: c3 ret case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 109543: b8 80 25 00 00 mov $0x2580,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109548: c9 leave 109549: c3 ret 10954a: 66 90 xchg %ax,%ax case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 10954c: b8 00 96 00 00 mov $0x9600,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109551: c9 leave 109552: c3 ret 109553: 90 nop case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 109554: b8 b0 04 00 00 mov $0x4b0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109559: c9 leave 10955a: c3 ret 10955b: 90 nop switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 10955c: b8 86 00 00 00 mov $0x86,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109561: c9 leave 109562: c3 ret 109563: 90 nop case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 109564: b8 00 4b 00 00 mov $0x4b00,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109569: c9 leave 10956a: c3 ret 10956b: 90 nop case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 10956c: b8 00 84 03 00 mov $0x38400,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109571: c9 leave 109572: c3 ret 109573: 90 nop case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 109574: b8 60 09 00 00 mov $0x960,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109579: c9 leave 10957a: c3 ret 10957b: 90 nop case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 10957c: b8 00 c2 01 00 mov $0x1c200,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109581: c9 leave 109582: c3 ret 109583: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109584: b8 4b 00 00 00 mov $0x4b,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109589: c9 leave 10958a: c3 ret 10958b: 90 nop case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 10958c: b8 2c 01 00 00 mov $0x12c,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109591: c9 leave 109592: c3 ret 109593: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109594: 85 c0 test %eax,%eax 109596: 0f 85 48 ff ff ff jne 1094e4 10959c: 31 c0 xor %eax,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 10959e: c9 leave 10959f: c3 ret =============================================================================== 001095dc : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 1095dc: 55 push %ebp <== NOT EXECUTED 1095dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 1095df: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1095e2: a3 14 50 12 00 mov %eax,0x125014 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 1095e7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1095ea: a3 18 50 12 00 mov %eax,0x125018 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 1095ef: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1095f2: a3 1c 50 12 00 mov %eax,0x12501c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 1095f7: 31 c0 xor %eax,%eax <== NOT EXECUTED 1095f9: c9 leave <== NOT EXECUTED 1095fa: c3 ret <== NOT EXECUTED =============================================================================== 0010aa98 : } } rtems_status_code rtems_termios_close (void *arg) { 10aa98: 55 push %ebp 10aa99: 89 e5 mov %esp,%ebp 10aa9b: 56 push %esi 10aa9c: 53 push %ebx 10aa9d: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10aaa0: 8b 06 mov (%esi),%eax 10aaa2: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10aaa5: 50 push %eax 10aaa6: 6a 00 push $0x0 10aaa8: 6a 00 push $0x0 10aaaa: ff 35 2c 72 12 00 pushl 0x12722c 10aab0: e8 f3 11 00 00 call 10bca8 if (sc != RTEMS_SUCCESSFUL) 10aab5: 83 c4 10 add $0x10,%esp 10aab8: 85 c0 test %eax,%eax 10aaba: 0f 85 92 01 00 00 jne 10ac52 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10aac0: 8b 43 08 mov 0x8(%ebx),%eax 10aac3: 48 dec %eax 10aac4: 89 43 08 mov %eax,0x8(%ebx) 10aac7: 85 c0 test %eax,%eax 10aac9: 0f 85 bf 00 00 00 jne 10ab8e if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10aacf: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10aad5: c1 e0 05 shl $0x5,%eax 10aad8: 8b 80 a4 6e 12 00 mov 0x126ea4(%eax),%eax 10aade: 85 c0 test %eax,%eax 10aae0: 0f 84 12 01 00 00 je 10abf8 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10aae6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aae9: 53 push %ebx <== NOT EXECUTED 10aaea: ff d0 call *%eax <== NOT EXECUTED 10aaec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 10aaef: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED 10aaf6: 0f 84 24 01 00 00 je 10ac20 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 10aafc: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10ab02: 85 c0 test %eax,%eax 10ab04: 74 0d je 10ab13 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10ab06: 52 push %edx 10ab07: 56 push %esi 10ab08: ff 73 10 pushl 0x10(%ebx) 10ab0b: ff 73 0c pushl 0xc(%ebx) 10ab0e: ff d0 call *%eax 10ab10: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10ab13: 8b 03 mov (%ebx),%eax 10ab15: 85 c0 test %eax,%eax 10ab17: 0f 84 9b 00 00 00 je 10abb8 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 10ab1d: 8b 53 04 mov 0x4(%ebx),%edx 10ab20: 89 50 04 mov %edx,0x4(%eax) } if (tty->back == NULL) { 10ab23: 8b 53 04 mov 0x4(%ebx),%edx 10ab26: 85 d2 test %edx,%edx 10ab28: 0f 84 ae 00 00 00 je 10abdc <== ALWAYS TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 10ab2e: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 10ab30: 83 ec 0c sub $0xc,%esp 10ab33: ff 73 14 pushl 0x14(%ebx) 10ab36: e8 c9 10 00 00 call 10bc04 rtems_semaphore_delete (tty->osem); 10ab3b: 58 pop %eax 10ab3c: ff 73 18 pushl 0x18(%ebx) 10ab3f: e8 c0 10 00 00 call 10bc04 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10ab44: 5e pop %esi 10ab45: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10ab4b: e8 b4 10 00 00 call 10bc04 if ((tty->device.pollRead == NULL) || 10ab50: 83 c4 10 add $0x10,%esp 10ab53: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx 10ab59: 85 c9 test %ecx,%ecx 10ab5b: 74 4b je 10aba8 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 10ab5d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10ab64: 74 42 je 10aba8 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10ab66: 83 ec 0c sub $0xc,%esp 10ab69: ff 73 58 pushl 0x58(%ebx) 10ab6c: e8 13 da ff ff call 108584 free (tty->rawOutBuf.theBuf); 10ab71: 5a pop %edx 10ab72: ff 73 7c pushl 0x7c(%ebx) 10ab75: e8 0a da ff ff call 108584 free (tty->cbuf); 10ab7a: 58 pop %eax 10ab7b: ff 73 1c pushl 0x1c(%ebx) 10ab7e: e8 01 da ff ff call 108584 free (tty); 10ab83: 89 1c 24 mov %ebx,(%esp) 10ab86: e8 f9 d9 ff ff call 108584 10ab8b: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10ab8e: 83 ec 0c sub $0xc,%esp 10ab91: ff 35 2c 72 12 00 pushl 0x12722c 10ab97: e8 08 12 00 00 call 10bda4 return RTEMS_SUCCESSFUL; } 10ab9c: 31 c0 xor %eax,%eax 10ab9e: 8d 65 f8 lea -0x8(%ebp),%esp 10aba1: 5b pop %ebx 10aba2: 5e pop %esi 10aba3: c9 leave 10aba4: c3 ret 10aba5: 8d 76 00 lea 0x0(%esi),%esi rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 10aba8: 83 ec 0c sub $0xc,%esp 10abab: ff 73 68 pushl 0x68(%ebx) 10abae: e8 51 10 00 00 call 10bc04 10abb3: 83 c4 10 add $0x10,%esp 10abb6: eb ae jmp 10ab66 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 10abb8: 8b 43 04 mov 0x4(%ebx),%eax 10abbb: a3 30 72 12 00 mov %eax,0x127230 if ( rtems_termios_ttyTail != NULL ) { 10abc0: 85 c0 test %eax,%eax 10abc2: 0f 84 94 00 00 00 je 10ac5c <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 10abc8: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10abce: 8b 03 mov (%ebx),%eax <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 10abd0: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED 10abd3: 85 d2 test %edx,%edx <== NOT EXECUTED 10abd5: 0f 85 53 ff ff ff jne 10ab2e <== NOT EXECUTED 10abdb: 90 nop <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 10abdc: a3 34 72 12 00 mov %eax,0x127234 if ( rtems_termios_ttyHead != NULL ) { 10abe1: 85 c0 test %eax,%eax 10abe3: 0f 84 47 ff ff ff je 10ab30 <== NEVER TAKEN rtems_termios_ttyHead->back = NULL; 10abe9: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10abf0: e9 3b ff ff ff jmp 10ab30 10abf5: 8d 76 00 lea 0x0(%esi),%esi } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10abf8: 51 push %ecx 10abf9: 6a 00 push $0x0 10abfb: 6a 00 push $0x0 10abfd: ff 73 18 pushl 0x18(%ebx) 10ac00: e8 a3 10 00 00 call 10bca8 if (sc != RTEMS_SUCCESSFUL) { 10ac05: 83 c4 10 add $0x10,%esp 10ac08: 85 c0 test %eax,%eax 10ac0a: 75 46 jne 10ac52 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10ac0c: 89 d8 mov %ebx,%eax 10ac0e: e8 b1 f6 ff ff call 10a2c4 } if (tty->device.outputUsesInterrupts 10ac13: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10ac1a: 0f 85 dc fe ff ff jne 10aafc <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10ac20: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ac23: 6a 01 push $0x1 <== NOT EXECUTED 10ac25: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10ac2b: e8 68 0b 00 00 call 10b798 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10ac30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ac33: 85 c0 test %eax,%eax <== NOT EXECUTED 10ac35: 75 1b jne 10ac52 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 10ac37: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ac3a: 6a 01 push $0x1 <== NOT EXECUTED 10ac3c: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10ac42: e8 51 0b 00 00 call 10b798 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10ac47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ac4a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ac4c: 0f 84 aa fe ff ff je 10aafc <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10ac52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ac55: 50 push %eax <== NOT EXECUTED 10ac56: e8 85 16 00 00 call 10c2e0 <== NOT EXECUTED 10ac5b: 90 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 10ac5c: c7 05 34 72 12 00 00 movl $0x0,0x127234 10ac63: 00 00 00 10ac66: e9 c5 fe ff ff jmp 10ab30 =============================================================================== 00109850 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 109850: 55 push %ebp 109851: 89 e5 mov %esp,%ebp 109853: 83 ec 08 sub $0x8,%esp 109856: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 109859: 8b 55 0c mov 0xc(%ebp),%edx 10985c: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109862: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 109869: 74 2d je 109898 <== NEVER TAKEN TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 10986b: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 109872: 74 0c je 109880 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 109874: 89 45 08 mov %eax,0x8(%ebp) } } 109877: 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); 109878: e9 9b fd ff ff jmp 109618 10987d: 8d 76 00 lea 0x0(%esi),%esi } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109880: 8b 15 54 6f 12 00 mov 0x126f54,%edx <== NOT EXECUTED 109886: 85 d2 test %edx,%edx <== NOT EXECUTED 109888: 74 09 je 109893 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10988a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10988d: 50 push %eax <== NOT EXECUTED 10988e: ff d2 call *%edx <== NOT EXECUTED 109890: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 109893: 31 c0 xor %eax,%eax <== NOT EXECUTED 109895: c9 leave <== NOT EXECUTED 109896: c3 ret <== NOT EXECUTED 109897: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 109898: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10989b: 6a 02 push $0x2 <== NOT EXECUTED 10989d: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 1098a3: e8 f0 1e 00 00 call 10b798 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 1098a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1098ab: 85 c0 test %eax,%eax <== NOT EXECUTED 1098ad: 74 e4 je 109893 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 1098af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098b2: 50 push %eax <== NOT EXECUTED 1098b3: e8 28 2a 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 001098b8 : * 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) { 1098b8: 55 push %ebp <== NOT EXECUTED 1098b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1098bb: 57 push %edi <== NOT EXECUTED 1098bc: 56 push %esi <== NOT EXECUTED 1098bd: 53 push %ebx <== NOT EXECUTED 1098be: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1098c1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1098c4: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 1098c7: 8b 7d 10 mov 0x10(%ebp),%edi <== 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) { 1098ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1098d0: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1098d3: 8b 80 b0 6e 12 00 mov 0x126eb0(%eax),%eax <== NOT EXECUTED 1098d9: 85 c0 test %eax,%eax <== NOT EXECUTED 1098db: 0f 84 8b 00 00 00 je 10996c <== NOT EXECUTED while (len--) { 1098e1: 85 ff test %edi,%edi <== NOT EXECUTED 1098e3: 74 2e je 109913 <== NOT EXECUTED 1098e5: 31 d2 xor %edx,%edx <== NOT EXECUTED 1098e7: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1098ea: 89 f7 mov %esi,%edi <== NOT EXECUTED 1098ec: 89 d6 mov %edx,%esi <== NOT EXECUTED 1098ee: eb 0f jmp 1098ff <== NOT EXECUTED 1098f0: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1098f6: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1098f9: 8b 80 b0 6e 12 00 mov 0x126eb0(%eax),%eax <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1098ff: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109902: 53 push %ebx <== NOT EXECUTED 109903: 0f be 14 37 movsbl (%edi,%esi,1),%edx <== NOT EXECUTED 109907: 52 push %edx <== NOT EXECUTED 109908: ff d0 call *%eax <== NOT EXECUTED 10990a: 46 inc %esi <== 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--) { 10990b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10990e: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED 109911: 75 dd jne 1098f0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109913: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx <== NOT EXECUTED 109919: 85 d2 test %edx,%edx <== NOT EXECUTED 10991b: 75 3b jne 109958 <== NOT EXECUTED 10991d: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 109923: 85 c0 test %eax,%eax <== NOT EXECUTED 109925: 74 31 je 109958 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109927: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10992a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109930: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109933: 52 push %edx <== NOT EXECUTED 109934: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109936: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10993d: 00 00 00 109940: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 109947: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10994a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10994d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109950: 5b pop %ebx <== NOT EXECUTED 109951: 5e pop %esi <== NOT EXECUTED 109952: 5f pop %edi <== NOT EXECUTED 109953: c9 leave <== NOT EXECUTED 109954: c3 ret <== NOT EXECUTED 109955: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109958: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } 10995f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109962: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109965: 5b pop %ebx <== NOT EXECUTED 109966: 5e pop %esi <== NOT EXECUTED 109967: 5f pop %edi <== NOT EXECUTED 109968: c9 leave <== NOT EXECUTED 109969: c3 ret <== NOT EXECUTED 10996a: 66 90 xchg %ax,%ax <== 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, 10996c: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10996f: 89 45 cc mov %eax,-0x34(%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); 109972: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109975: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 109978: c6 45 db 00 movb $0x0,-0x25(%ebp) <== NOT EXECUTED 10997c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109983: 85 ff test %edi,%edi <== NOT EXECUTED 109985: 0f 84 0b 01 00 00 je 109a96 <== NOT EXECUTED 10998b: 90 nop <== NOT EXECUTED c = *buf++; 10998c: 8a 06 mov (%esi),%al <== NOT EXECUTED 10998e: 88 45 e4 mov %al,-0x1c(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 109991: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109997: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10999a: 74 1c je 1099b8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10999c: 0f be 45 e4 movsbl -0x1c(%ebp),%eax <== NOT EXECUTED 1099a0: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 1099a4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1099a6: 0f 84 0c 01 00 00 je 109ab8 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 1099ac: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 1099b0: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1099b2: 0f 84 54 01 00 00 je 109b0c <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 1099b8: 80 7d db 00 cmpb $0x0,-0x25(%ebp) <== NOT EXECUTED 1099bc: 0f 85 11 01 00 00 jne 109ad3 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1099c2: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1099c5: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1099c8: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1099cb: 40 inc %eax <== NOT EXECUTED 1099cc: 31 d2 xor %edx,%edx <== NOT EXECUTED 1099ce: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED 1099d1: 89 d1 mov %edx,%ecx <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1099d3: 9c pushf <== NOT EXECUTED 1099d4: fa cli <== NOT EXECUTED 1099d5: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1099d8: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1099db: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 1099de: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1099e1: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1099e4: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1099e7: 2b 45 c4 sub -0x3c(%ebp),%eax <== NOT EXECUTED 1099ea: 01 c8 add %ecx,%eax <== NOT EXECUTED 1099ec: 31 d2 xor %edx,%edx <== NOT EXECUTED 1099ee: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 1099f1: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 1099f7: 76 47 jbe 109a40 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 1099f9: 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) 1099ff: a8 01 test $0x1,%al <== NOT EXECUTED 109a01: 75 3d jne 109a40 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 109a03: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a09: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 109a0c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 109a12: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a18: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 109a1d: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 109a22: 0f 84 27 01 00 00 je 109b4f <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 109a28: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a2e: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 109a33: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 109a38: 0f 84 55 01 00 00 je 109b93 <== NOT EXECUTED 109a3e: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 109a40: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 109a43: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 109a44: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109a47: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 109a49: 0f 84 b5 00 00 00 je 109b04 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 109a4f: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 109a52: 8a 55 e4 mov -0x1c(%ebp),%dl <== NOT EXECUTED 109a55: 88 14 08 mov %dl,(%eax,%ecx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 109a58: 89 4b 60 mov %ecx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109a5b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax <== NOT EXECUTED 109a61: 85 c0 test %eax,%eax <== NOT EXECUTED 109a63: 75 27 jne 109a8c <== NOT EXECUTED 109a65: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 109a6b: 85 c0 test %eax,%eax <== NOT EXECUTED 109a6d: 74 1d je 109a8c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109a6f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109a72: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109a78: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109a7b: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109a7d: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 109a84: 00 00 00 109a87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a8a: 66 90 xchg %ax,%ax <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109a8c: 46 inc %esi <== NOT EXECUTED 109a8d: 4f dec %edi <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109a8e: 85 ff test %edi,%edi <== NOT EXECUTED 109a90: 0f 85 f6 fe ff ff jne 10998c <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 109a96: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109a99: 01 43 78 add %eax,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 109a9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109a9f: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109aa2: e8 fd 22 00 00 call 10bda4 <== NOT EXECUTED return dropped; 109aa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109aaa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109aad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ab0: 5b pop %ebx <== NOT EXECUTED 109ab1: 5e pop %esi <== NOT EXECUTED 109ab2: 5f pop %edi <== NOT EXECUTED 109ab3: c9 leave <== NOT EXECUTED 109ab4: c3 ret <== NOT EXECUTED 109ab5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 109ab8: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109abc: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109abe: 74 7e je 109b3e <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109ac0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109ac6: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 109ac9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109acf: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 109ad3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109ad9: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 109adc: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 109adf: 75 ab jne 109a8c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109ae1: 9c pushf <== NOT EXECUTED 109ae2: fa cli <== NOT EXECUTED 109ae3: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109ae4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109aea: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 109aed: 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) { 109af3: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109af9: 85 c0 test %eax,%eax <== NOT EXECUTED 109afb: 75 20 jne 109b1d <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 109afd: 52 push %edx <== NOT EXECUTED 109afe: 9d popf <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109aff: 46 inc %esi <== NOT EXECUTED 109b00: 4f dec %edi <== NOT EXECUTED 109b01: eb 8b jmp 109a8e <== NOT EXECUTED 109b03: 90 nop <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 109b04: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109b07: 46 inc %esi <== NOT EXECUTED 109b08: 4f dec %edi <== NOT EXECUTED 109b09: eb 83 jmp 109a8e <== NOT EXECUTED 109b0b: 90 nop <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 109b0c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b12: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 109b15: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109b1b: eb b2 jmp 109acf <== NOT EXECUTED 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, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 109b1d: 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, 109b23: 51 push %ecx <== NOT EXECUTED 109b24: 6a 01 push $0x1 <== NOT EXECUTED 109b26: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109b29: 50 push %eax <== NOT EXECUTED 109b2a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109b2d: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 109b30: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109b36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b39: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 109b3c: eb bf jmp 109afd <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 109b3e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b44: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 109b47: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109b4d: eb 80 jmp 109acf <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 109b4f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b55: a8 20 test $0x20,%al <== NOT EXECUTED 109b57: 75 0e jne 109b67 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 109b59: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109b5f: 85 c0 test %eax,%eax <== NOT EXECUTED 109b61: 0f 85 d9 fe ff ff jne 109a40 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 109b67: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b6d: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 109b70: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 109b76: 52 push %edx <== NOT EXECUTED 109b77: 6a 01 push $0x1 <== NOT EXECUTED 109b79: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 109b7c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109b7f: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109b82: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109b88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b8b: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109b8e: e9 ad fe ff ff jmp 109a40 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 109b93: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b99: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109b9c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 109ba2: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 109ba8: 85 c0 test %eax,%eax <== NOT EXECUTED 109baa: 0f 84 90 fe ff ff je 109a40 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109bb0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109bb3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109bb6: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109bb9: ff d0 call *%eax <== NOT EXECUTED 109bbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109bbe: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109bc1: e9 7a fe ff ff jmp 109a40 <== NOT EXECUTED =============================================================================== 001095a0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 1095a0: 55 push %ebp 1095a1: 89 e5 mov %esp,%ebp 1095a3: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 1095a6: a1 2c 72 12 00 mov 0x12722c,%eax 1095ab: 85 c0 test %eax,%eax 1095ad: 74 05 je 1095b4 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 1095af: c9 leave 1095b0: c3 ret 1095b1: 8d 76 00 lea 0x0(%esi),%esi /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 1095b4: 83 ec 0c sub $0xc,%esp 1095b7: 68 2c 72 12 00 push $0x12722c 1095bc: 6a 00 push $0x0 1095be: 6a 54 push $0x54 1095c0: 6a 01 push $0x1 1095c2: 68 69 6d 52 54 push $0x54526d69 1095c7: e8 64 24 00 00 call 10ba30 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) 1095cc: 83 c4 20 add $0x20,%esp 1095cf: 85 c0 test %eax,%eax 1095d1: 74 dc je 1095af <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 1095d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095d6: 50 push %eax <== NOT EXECUTED 1095d7: e8 04 2d 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 0010a680 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 10a680: 55 push %ebp 10a681: 89 e5 mov %esp,%ebp 10a683: 57 push %edi 10a684: 56 push %esi 10a685: 53 push %ebx 10a686: 83 ec 20 sub $0x20,%esp 10a689: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a68c: 8b 03 mov (%ebx),%eax 10a68e: 8b 40 34 mov 0x34(%eax),%eax 10a691: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10a694: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 10a697: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a69e: 6a 00 push $0x0 10a6a0: 6a 00 push $0x0 10a6a2: ff 70 18 pushl 0x18(%eax) 10a6a5: e8 fe 15 00 00 call 10bca8 10a6aa: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 10a6ad: 83 c4 10 add $0x10,%esp 10a6b0: 85 c0 test %eax,%eax 10a6b2: 75 24 jne 10a6d8 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 10a6b4: 8b 43 04 mov 0x4(%ebx),%eax 10a6b7: 83 f8 04 cmp $0x4,%eax 10a6ba: 74 74 je 10a730 <== NEVER TAKEN 10a6bc: 77 2a ja 10a6e8 <== NEVER TAKEN 10a6be: 83 f8 02 cmp $0x2,%eax 10a6c1: 0f 84 a1 00 00 00 je 10a768 10a6c7: 0f 86 3b 02 00 00 jbe 10a908 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 10a6cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6d0: e8 ef fb ff ff call 10a2c4 break; 10a6d5: eb 6d jmp 10a744 10a6d7: 90 nop rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; 10a6d8: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 10a6db: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a6de: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a6e1: 5b pop %ebx <== NOT EXECUTED 10a6e2: 5e pop %esi <== NOT EXECUTED 10a6e3: 5f pop %edi <== NOT EXECUTED 10a6e4: c9 leave <== NOT EXECUTED 10a6e5: c3 ret <== NOT EXECUTED 10a6e6: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 10a6e8: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 10a6ed: 0f 84 ed 01 00 00 je 10a8e0 <== NOT EXECUTED 10a6f3: 0f 87 2f 02 00 00 ja 10a928 <== NOT EXECUTED 10a6f9: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 10a6fc: 0f 84 aa 02 00 00 je 10a9ac <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a702: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a705: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a70b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a70e: 8b 80 b8 6e 12 00 mov 0x126eb8(%eax),%eax <== NOT EXECUTED 10a714: 85 c0 test %eax,%eax <== NOT EXECUTED 10a716: 0f 84 ac 02 00 00 je 10a9c8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 10a71c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a71f: 53 push %ebx <== NOT EXECUTED 10a720: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10a723: ff d0 call *%eax <== NOT EXECUTED 10a725: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a728: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a72b: eb 17 jmp 10a744 <== NOT EXECUTED 10a72d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 10a730: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a732: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a735: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a738: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED 10a73e: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 10a744: 83 ec 0c sub $0xc,%esp 10a747: 8b 45 e4 mov -0x1c(%ebp),%eax 10a74a: ff 70 18 pushl 0x18(%eax) 10a74d: e8 52 16 00 00 call 10bda4 args->ioctl_return = sc; 10a752: 8b 55 e0 mov -0x20(%ebp),%edx 10a755: 89 53 0c mov %edx,0xc(%ebx) return sc; 10a758: 83 c4 10 add $0x10,%esp } 10a75b: 8b 45 e0 mov -0x20(%ebp),%eax 10a75e: 8d 65 f4 lea -0xc(%ebp),%esp 10a761: 5b pop %ebx 10a762: 5e pop %esi 10a763: 5f pop %edi 10a764: c9 leave 10a765: c3 ret 10a766: 66 90 xchg %ax,%ax case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 10a768: 8b 73 08 mov 0x8(%ebx),%esi 10a76b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a76e: 83 c1 30 add $0x30,%ecx 10a771: 89 4d dc mov %ecx,-0x24(%ebp) 10a774: b9 09 00 00 00 mov $0x9,%ecx 10a779: 8b 7d dc mov -0x24(%ebp),%edi 10a77c: 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) && 10a77e: 8b 55 e4 mov -0x1c(%ebp),%edx 10a781: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a787: f6 c4 02 test $0x2,%ah 10a78a: 74 44 je 10a7d0 10a78c: f6 42 31 04 testb $0x4,0x31(%edx) 10a790: 75 3e jne 10a7d0 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 10a792: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a798: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 10a79d: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 10a7a3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a7a9: a8 20 test $0x20,%al <== NOT EXECUTED 10a7ab: 74 23 je 10a7d0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10a7ad: 9c pushf <== NOT EXECUTED 10a7ae: fa cli <== NOT EXECUTED 10a7af: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a7b0: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a7b6: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a7b9: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 10a7bf: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 10a7c5: 85 ff test %edi,%edi <== NOT EXECUTED 10a7c7: 0f 85 ab 02 00 00 jne 10aa78 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 10a7cd: 56 push %esi <== NOT EXECUTED 10a7ce: 9d popf <== NOT EXECUTED 10a7cf: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 10a7d0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a7d3: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 10a7d9: f6 c4 04 test $0x4,%ah 10a7dc: 74 24 je 10a802 <== ALWAYS TAKEN 10a7de: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED 10a7e2: 75 1e jne 10a802 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 10a7e4: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a7ea: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 10a7ed: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 10a7f3: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a7f9: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10a7fc: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 10a802: 8b 55 e4 mov -0x1c(%ebp),%edx 10a805: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a80b: f6 c4 01 test $0x1,%ah 10a80e: 74 4b je 10a85b <== ALWAYS TAKEN 10a810: 8b 7a 38 mov 0x38(%edx),%edi <== NOT EXECUTED 10a813: 85 ff test %edi,%edi <== NOT EXECUTED 10a815: 0f 88 09 02 00 00 js 10aa24 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 10a81b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a821: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 10a824: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 10a82a: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a830: a8 04 test $0x4,%al <== NOT EXECUTED 10a832: 74 15 je 10a849 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 10a834: 8b 82 b0 00 00 00 mov 0xb0(%edx),%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) && 10a83a: 85 c0 test %eax,%eax <== NOT EXECUTED 10a83c: 74 0b je 10a849 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 10a83e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a841: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a844: ff d0 call *%eax <== NOT EXECUTED 10a846: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10a849: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a84c: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a852: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a855: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== 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) { 10a85b: 8b 45 e4 mov -0x1c(%ebp),%eax 10a85e: 8b 70 38 mov 0x38(%eax),%esi 10a861: 85 f6 test %esi,%esi 10a863: 0f 88 bb 01 00 00 js 10aa24 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 10a869: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a86c: 8b 41 30 mov 0x30(%ecx),%eax 10a86f: f6 c4 10 test $0x10,%ah 10a872: 74 0f je 10a883 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 10a874: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10a87a: 80 ce 04 or $0x4,%dh <== NOT EXECUTED 10a87d: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10a883: f6 c4 04 test $0x4,%ah 10a886: 74 12 je 10a89a <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 10a888: 8b 55 e4 mov -0x1c(%ebp),%edx 10a88b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a891: 80 cc 02 or $0x2,%ah 10a894: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) 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) { 10a89a: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a89d: f6 41 3c 02 testb $0x2,0x3c(%ecx) 10a8a1: 0f 84 2d 01 00 00 je 10a9d4 <== NEVER TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a8a7: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a8ae: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a8b5: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 10a8bc: 8b 55 e4 mov -0x1c(%ebp),%edx 10a8bf: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 10a8c5: 85 c0 test %eax,%eax 10a8c7: 0f 84 77 fe ff ff je 10a744 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 10a8cd: 83 ec 08 sub $0x8,%esp 10a8d0: ff 75 dc pushl -0x24(%ebp) 10a8d3: ff 72 10 pushl 0x10(%edx) 10a8d6: ff d0 call *%eax 10a8d8: 83 c4 10 add $0x10,%esp 10a8db: e9 64 fe ff ff jmp 10a744 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 10a8e0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a8e3: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 10a8e6: 89 d1 mov %edx,%ecx <== NOT EXECUTED 10a8e8: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10a8eb: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a8ed: 0f 88 25 01 00 00 js 10aa18 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 10a8f3: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 10a8f6: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a8f9: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 10a8fc: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10a8ff: 89 02 mov %eax,(%edx) <== NOT EXECUTED 10a901: e9 3e fe ff ff jmp 10a744 <== NOT EXECUTED 10a906: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 10a908: 48 dec %eax 10a909: 0f 85 f3 fd ff ff jne 10a702 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10a90f: 8b 43 08 mov 0x8(%ebx),%eax 10a912: 8b 75 e4 mov -0x1c(%ebp),%esi 10a915: 83 c6 30 add $0x30,%esi 10a918: b9 09 00 00 00 mov $0x9,%ecx 10a91d: 89 c7 mov %eax,%edi 10a91f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10a921: e9 1e fe ff ff jmp 10a744 10a926: 66 90 xchg %ax,%ax sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 10a928: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 10a92d: 74 69 je 10a998 <== NOT EXECUTED 10a92f: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 10a934: 0f 85 c8 fd ff ff jne 10a702 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a93a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a93d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a943: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a946: 8b 80 a4 6e 12 00 mov 0x126ea4(%eax),%eax <== NOT EXECUTED 10a94c: 85 c0 test %eax,%eax <== NOT EXECUTED 10a94e: 74 0c je 10a95c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a950: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a953: 52 push %edx <== NOT EXECUTED 10a954: ff d0 call *%eax <== NOT EXECUTED 10a956: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a959: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 10a95c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a95f: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10a961: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a964: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 10a96a: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) <== NOT EXECUTED 10a971: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10a974: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a977: 8b 80 a0 6e 12 00 mov 0x126ea0(%eax),%eax <== NOT EXECUTED 10a97d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a97f: 0f 84 bf fd ff ff je 10a744 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 10a985: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a988: 51 push %ecx <== NOT EXECUTED 10a989: ff d0 call *%eax <== NOT EXECUTED 10a98b: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a98e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a991: e9 ae fd ff ff jmp 10a744 <== NOT EXECUTED 10a996: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 10a998: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a99b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a99e: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx <== NOT EXECUTED 10a9a4: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 10a9a6: e9 99 fd ff ff jmp 10a744 <== NOT EXECUTED 10a9ab: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 10a9ac: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a9ae: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a9b1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a9b4: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED 10a9ba: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED break; 10a9c0: e9 7f fd ff ff jmp 10a744 <== NOT EXECUTED 10a9c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a9c8: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 10a9cf: e9 70 fd ff ff jmp 10a744 <== NOT EXECUTED 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; 10a9d4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a9d7: 0f b6 70 46 movzbl 0x46(%eax),%esi <== NOT EXECUTED 10a9db: e8 b8 0b 00 00 call 10b598 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 10a9e0: 0f af c6 imul %esi,%eax <== NOT EXECUTED 10a9e3: ba cd cc cc cc mov $0xcccccccd,%edx <== NOT EXECUTED 10a9e8: f7 e2 mul %edx <== NOT EXECUTED 10a9ea: c1 ea 03 shr $0x3,%edx <== NOT EXECUTED 10a9ed: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a9f0: 89 51 54 mov %edx,0x54(%ecx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 10a9f3: 80 79 46 00 cmpb $0x0,0x46(%ecx) <== NOT EXECUTED 10a9f7: 74 42 je 10aa3b <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a9f9: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10aa00: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 10aa03: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED 10aa07: 74 55 je 10aa5e <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10aa09: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED 10aa10: e9 a7 fe ff ff jmp 10a8bc <== NOT EXECUTED 10aa15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 10aa18: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 10aa1b: 01 d0 add %edx,%eax <== NOT EXECUTED 10aa1d: e9 d1 fe ff ff jmp 10a8f3 <== NOT EXECUTED 10aa22: 66 90 xchg %ax,%ax <== 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) { tty->flow_ctrl |= FL_MDRTS; 10aa24: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10aa27: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10aa2d: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 10aa30: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 10aa36: e9 2e fe ff ff jmp 10a869 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 10aa3b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10aa3e: 80 7a 47 00 cmpb $0x0,0x47(%edx) <== NOT EXECUTED 10aa42: 74 25 je 10aa69 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10aa44: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10aa4b: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10aa52: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 10aa59: e9 5e fe ff ff jmp 10a8bc <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 10aa5e: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10aa61: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED 10aa64: e9 53 fe ff ff jmp 10a8bc <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 10aa69: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10aa6c: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) <== NOT EXECUTED 10aa73: e9 44 fe ff ff jmp 10a8bc <== NOT EXECUTED 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, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 10aa78: 8b 82 84 00 00 00 mov 0x84(%edx),%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, 10aa7e: 51 push %ecx <== NOT EXECUTED 10aa7f: 6a 01 push $0x1 <== NOT EXECUTED 10aa81: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 10aa84: 50 push %eax <== NOT EXECUTED 10aa85: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10aa88: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 10aa8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa91: e9 37 fd ff ff jmp 10a7cd <== NOT EXECUTED =============================================================================== 0010aa0c : #include int rtems_termios_number_to_baud( int32_t baud ) { 10aa0c: 55 push %ebp 10aa0d: 89 e5 mov %esp,%ebp 10aa0f: 8b 45 08 mov 0x8(%ebp),%eax int termios_baud; switch (baud) { 10aa12: 3d b0 04 00 00 cmp $0x4b0,%eax 10aa17: 0f 84 47 01 00 00 je 10ab64 10aa1d: 7e 3d jle 10aa5c 10aa1f: 3d 00 4b 00 00 cmp $0x4b00,%eax 10aa24: 0f 84 4a 01 00 00 je 10ab74 10aa2a: 7e 64 jle 10aa90 10aa2c: 3d 00 c2 01 00 cmp $0x1c200,%eax 10aa31: 0f 84 15 01 00 00 je 10ab4c 10aa37: 0f 8e af 00 00 00 jle 10aaec 10aa3d: 3d 00 84 03 00 cmp $0x38400,%eax 10aa42: 0f 84 fc 00 00 00 je 10ab44 10aa48: 3d 00 08 07 00 cmp $0x70800,%eax 10aa4d: 0f 85 89 00 00 00 jne 10aadc <== NEVER TAKEN case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 10aa53: b8 04 10 00 00 mov $0x1004,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa58: c9 leave 10aa59: c3 ret 10aa5a: 66 90 xchg %ax,%ax int32_t baud ) { int termios_baud; switch (baud) { 10aa5c: 3d 86 00 00 00 cmp $0x86,%eax 10aa61: 0f 84 05 01 00 00 je 10ab6c 10aa67: 7e 4f jle 10aab8 10aa69: 3d c8 00 00 00 cmp $0xc8,%eax 10aa6e: 0f 84 b8 00 00 00 je 10ab2c 10aa74: 7e 5e jle 10aad4 10aa76: 3d 2c 01 00 00 cmp $0x12c,%eax 10aa7b: 0f 84 9b 00 00 00 je 10ab1c 10aa81: 3d 58 02 00 00 cmp $0x258,%eax 10aa86: 75 54 jne 10aadc <== NEVER TAKEN case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 10aa88: b8 08 00 00 00 mov $0x8,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa8d: c9 leave 10aa8e: c3 ret 10aa8f: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10aa90: 3d 60 09 00 00 cmp $0x960,%eax 10aa95: 0f 84 c1 00 00 00 je 10ab5c 10aa9b: 7e 67 jle 10ab04 10aa9d: 3d c0 12 00 00 cmp $0x12c0,%eax 10aaa2: 0f 84 8c 00 00 00 je 10ab34 10aaa8: 3d 80 25 00 00 cmp $0x2580,%eax 10aaad: 75 2d jne 10aadc case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 10aaaf: b8 0d 00 00 00 mov $0xd,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aab4: c9 leave 10aab5: c3 ret 10aab6: 66 90 xchg %ax,%ax int32_t baud ) { int termios_baud; switch (baud) { 10aab8: 83 f8 32 cmp $0x32,%eax 10aabb: 74 7f je 10ab3c 10aabd: 7e 25 jle 10aae4 10aabf: 83 f8 4b cmp $0x4b,%eax 10aac2: 0f 84 8c 00 00 00 je 10ab54 10aac8: 83 f8 6e cmp $0x6e,%eax 10aacb: 75 0f jne 10aadc <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 10aacd: b8 03 00 00 00 mov $0x3,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aad2: c9 leave 10aad3: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10aad4: 3d 96 00 00 00 cmp $0x96,%eax 10aad9: 74 39 je 10ab14 <== ALWAYS TAKEN 10aadb: 90 nop case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 10aadc: b8 ff ff ff ff mov $0xffffffff,%eax default: termios_baud = -1; break; } return termios_baud; } 10aae1: c9 leave 10aae2: c3 ret 10aae3: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10aae4: 85 c0 test %eax,%eax 10aae6: 75 f4 jne 10aadc 10aae8: 31 c0 xor %eax,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aaea: c9 leave 10aaeb: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10aaec: 3d 00 96 00 00 cmp $0x9600,%eax 10aaf1: 74 31 je 10ab24 10aaf3: 3d 00 e1 00 00 cmp $0xe100,%eax 10aaf8: 75 e2 jne 10aadc <== NEVER TAKEN case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 10aafa: b8 01 10 00 00 mov $0x1001,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aaff: c9 leave 10ab00: c3 ret 10ab01: 8d 76 00 lea 0x0(%esi),%esi int32_t baud ) { int termios_baud; switch (baud) { 10ab04: 3d 08 07 00 00 cmp $0x708,%eax 10ab09: 75 d1 jne 10aadc <== NEVER TAKEN case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 10ab0b: b8 0a 00 00 00 mov $0xa,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab10: c9 leave 10ab11: c3 ret 10ab12: 66 90 xchg %ax,%ax switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 10ab14: b8 05 00 00 00 mov $0x5,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab19: c9 leave 10ab1a: c3 ret 10ab1b: 90 nop case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 10ab1c: b8 07 00 00 00 mov $0x7,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab21: c9 leave 10ab22: c3 ret 10ab23: 90 nop case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 10ab24: b8 0f 00 00 00 mov $0xf,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab29: c9 leave 10ab2a: c3 ret 10ab2b: 90 nop case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 10ab2c: b8 06 00 00 00 mov $0x6,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab31: c9 leave 10ab32: c3 ret 10ab33: 90 nop case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 10ab34: b8 0c 00 00 00 mov $0xc,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab39: c9 leave 10ab3a: c3 ret 10ab3b: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10ab3c: b8 01 00 00 00 mov $0x1,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab41: c9 leave 10ab42: c3 ret 10ab43: 90 nop case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 10ab44: b8 03 10 00 00 mov $0x1003,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab49: c9 leave 10ab4a: c3 ret 10ab4b: 90 nop case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 10ab4c: b8 02 10 00 00 mov $0x1002,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab51: c9 leave 10ab52: c3 ret 10ab53: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10ab54: b8 02 00 00 00 mov $0x2,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab59: c9 leave 10ab5a: c3 ret 10ab5b: 90 nop case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 10ab5c: b8 0b 00 00 00 mov $0xb,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab61: c9 leave 10ab62: c3 ret 10ab63: 90 nop case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 10ab64: b8 09 00 00 00 mov $0x9,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab69: c9 leave 10ab6a: c3 ret 10ab6b: 90 nop switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 10ab6c: b8 04 00 00 00 mov $0x4,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab71: c9 leave 10ab72: c3 ret 10ab73: 90 nop case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 10ab74: b8 0e 00 00 00 mov $0xe,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab79: c9 leave 10ab7a: c3 ret =============================================================================== 0010ac6c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10ac6c: 55 push %ebp 10ac6d: 89 e5 mov %esp,%ebp 10ac6f: 57 push %edi 10ac70: 56 push %esi 10ac71: 53 push %ebx 10ac72: 83 ec 20 sub $0x20,%esp 10ac75: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 10ac78: 6a 00 push $0x0 10ac7a: 6a 00 push $0x0 10ac7c: ff 35 2c 72 12 00 pushl 0x12722c 10ac82: 89 55 dc mov %edx,-0x24(%ebp) 10ac85: e8 1e 10 00 00 call 10bca8 10ac8a: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10ac8d: 83 c4 10 add $0x10,%esp 10ac90: 85 c0 test %eax,%eax 10ac92: 8b 55 dc mov -0x24(%ebp),%edx 10ac95: 75 6f jne 10ad06 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10ac97: 8b 1d 34 72 12 00 mov 0x127234,%ebx 10ac9d: 85 db test %ebx,%ebx 10ac9f: 0f 84 a7 00 00 00 je 10ad4c 10aca5: 8b 45 0c mov 0xc(%ebp),%eax 10aca8: eb 0c jmp 10acb6 10acaa: 66 90 xchg %ax,%ax 10acac: 8b 1b mov (%ebx),%ebx 10acae: 85 db test %ebx,%ebx 10acb0: 0f 84 96 00 00 00 je 10ad4c <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 10acb6: 39 53 0c cmp %edx,0xc(%ebx) 10acb9: 75 f1 jne 10acac 10acbb: 39 43 10 cmp %eax,0x10(%ebx) 10acbe: 75 ec jne 10acac <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 10acc0: 8b 4d 10 mov 0x10(%ebp),%ecx 10acc3: 8b 01 mov (%ecx),%eax 10acc5: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 10acc8: 8b 43 08 mov 0x8(%ebx),%eax 10accb: 8d 48 01 lea 0x1(%eax),%ecx 10acce: 89 4b 08 mov %ecx,0x8(%ebx) 10acd1: 85 c0 test %eax,%eax 10acd3: 75 20 jne 10acf5 if (tty->device.firstOpen) 10acd5: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10acdb: 85 c0 test %eax,%eax 10acdd: 74 0d je 10acec (*tty->device.firstOpen)(major, minor, arg); 10acdf: 56 push %esi 10ace0: ff 75 10 pushl 0x10(%ebp) 10ace3: ff 75 0c pushl 0xc(%ebp) 10ace6: 52 push %edx 10ace7: ff d0 call *%eax 10ace9: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10acec: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10acf3: 74 1c je 10ad11 <== NEVER TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10acf5: 83 ec 0c sub $0xc,%esp 10acf8: ff 35 2c 72 12 00 pushl 0x12722c 10acfe: e8 a1 10 00 00 call 10bda4 return RTEMS_SUCCESSFUL; 10ad03: 83 c4 10 add $0x10,%esp } 10ad06: 8b 45 e4 mov -0x1c(%ebp),%eax 10ad09: 8d 65 f4 lea -0xc(%ebp),%esp 10ad0c: 5b pop %ebx 10ad0d: 5e pop %esi 10ad0e: 5f pop %edi 10ad0f: c9 leave 10ad10: c3 ret (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 10ad11: 51 push %ecx <== NOT EXECUTED 10ad12: 53 push %ebx <== NOT EXECUTED 10ad13: 68 80 b1 10 00 push $0x10b180 <== NOT EXECUTED 10ad18: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10ad1e: e8 c5 13 00 00 call 10c0e8 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10ad23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ad26: 85 c0 test %eax,%eax <== NOT EXECUTED 10ad28: 0f 85 3e 03 00 00 jne 10b06c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 10ad2e: 52 push %edx <== NOT EXECUTED 10ad2f: 53 push %ebx <== NOT EXECUTED 10ad30: 68 14 b1 10 00 push $0x10b114 <== NOT EXECUTED 10ad35: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10ad3b: e8 a8 13 00 00 call 10c0e8 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10ad40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ad43: 85 c0 test %eax,%eax <== NOT EXECUTED 10ad45: 74 ae je 10acf5 <== NOT EXECUTED 10ad47: e9 20 03 00 00 jmp 10b06c <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10ad4c: 83 ec 08 sub $0x8,%esp 10ad4f: 68 e8 00 00 00 push $0xe8 10ad54: 6a 01 push $0x1 10ad56: 89 55 dc mov %edx,-0x24(%ebp) 10ad59: e8 0e d6 ff ff call 10836c 10ad5e: 89 45 e0 mov %eax,-0x20(%ebp) 10ad61: 89 c3 mov %eax,%ebx if (tty == NULL) { 10ad63: 83 c4 10 add $0x10,%esp 10ad66: 85 c0 test %eax,%eax 10ad68: 8b 55 dc mov -0x24(%ebp),%edx 10ad6b: 0f 84 79 02 00 00 je 10afea <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10ad71: a1 18 50 12 00 mov 0x125018,%eax 10ad76: 8b 4d e0 mov -0x20(%ebp),%ecx 10ad79: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 10ad7c: 8b 41 64 mov 0x64(%ecx),%eax 10ad7f: 83 ec 0c sub $0xc,%esp 10ad82: 50 push %eax 10ad83: 89 55 dc mov %edx,-0x24(%ebp) 10ad86: e8 d1 da ff ff call 10885c 10ad8b: 8b 75 e0 mov -0x20(%ebp),%esi 10ad8e: 89 46 58 mov %eax,0x58(%esi) if (tty->rawInBuf.theBuf == NULL) { 10ad91: 83 c4 10 add $0x10,%esp 10ad94: 85 c0 test %eax,%eax 10ad96: 8b 55 dc mov -0x24(%ebp),%edx 10ad99: 0f 84 68 02 00 00 je 10b007 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10ad9f: a1 1c 50 12 00 mov 0x12501c,%eax 10ada4: 8b 4d e0 mov -0x20(%ebp),%ecx 10ada7: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 10adad: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10adb3: 83 ec 0c sub $0xc,%esp 10adb6: 50 push %eax 10adb7: 89 55 dc mov %edx,-0x24(%ebp) 10adba: e8 9d da ff ff call 10885c 10adbf: 8b 75 e0 mov -0x20(%ebp),%esi 10adc2: 89 46 7c mov %eax,0x7c(%esi) if (tty->rawOutBuf.theBuf == NULL) { 10adc5: 83 c4 10 add $0x10,%esp 10adc8: 85 c0 test %eax,%eax 10adca: 8b 55 dc mov -0x24(%ebp),%edx 10adcd: 0f 84 58 02 00 00 je 10b02b <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 10add3: 83 ec 0c sub $0xc,%esp 10add6: ff 35 14 50 12 00 pushl 0x125014 10addc: 89 55 dc mov %edx,-0x24(%ebp) 10addf: e8 78 da ff ff call 10885c 10ade4: 8b 4d e0 mov -0x20(%ebp),%ecx 10ade7: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10adea: 83 c4 10 add $0x10,%esp 10aded: 85 c0 test %eax,%eax 10adef: 8b 55 dc mov -0x24(%ebp),%edx 10adf2: 0f 84 7d 02 00 00 je 10b075 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10adf8: 8b 45 e0 mov -0x20(%ebp),%eax 10adfb: c7 80 d4 00 00 00 00 movl $0x0,0xd4(%eax) 10ae02: 00 00 00 tty->tty_snd.sw_arg = NULL; 10ae05: c7 80 d8 00 00 00 00 movl $0x0,0xd8(%eax) 10ae0c: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10ae0f: c7 80 dc 00 00 00 00 movl $0x0,0xdc(%eax) 10ae16: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10ae19: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) 10ae20: 00 00 00 tty->tty_rcvwakeup = 0; 10ae23: c7 80 e4 00 00 00 00 movl $0x0,0xe4(%eax) 10ae2a: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10ae2d: a1 34 72 12 00 mov 0x127234,%eax 10ae32: 8b 4d e0 mov -0x20(%ebp),%ecx 10ae35: 89 01 mov %eax,(%ecx) tty->back = NULL; 10ae37: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) if (rtems_termios_ttyHead != NULL) 10ae3e: 85 c0 test %eax,%eax 10ae40: 74 03 je 10ae45 rtems_termios_ttyHead->back = tty; 10ae42: 89 48 04 mov %ecx,0x4(%eax) rtems_termios_ttyHead = tty; 10ae45: 8b 75 e0 mov -0x20(%ebp),%esi 10ae48: 89 35 34 72 12 00 mov %esi,0x127234 if (rtems_termios_ttyTail == NULL) 10ae4e: 8b 3d 30 72 12 00 mov 0x127230,%edi 10ae54: 85 ff test %edi,%edi 10ae56: 0f 84 ac 02 00 00 je 10b108 rtems_termios_ttyTail = tty; tty->minor = minor; 10ae5c: 8b 4d 0c mov 0xc(%ebp),%ecx 10ae5f: 8b 45 e0 mov -0x20(%ebp),%eax 10ae62: 89 48 10 mov %ecx,0x10(%eax) tty->major = major; 10ae65: 89 50 0c mov %edx,0xc(%eax) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 10ae68: 83 ec 0c sub $0xc,%esp 10ae6b: 83 c0 14 add $0x14,%eax 10ae6e: 50 push %eax 10ae6f: 6a 00 push $0x0 10ae71: 6a 54 push $0x54 10ae73: 6a 01 push $0x1 10ae75: 0f be 05 20 50 12 00 movsbl 0x125020,%eax 10ae7c: 0d 00 69 52 54 or $0x54526900,%eax 10ae81: 50 push %eax 10ae82: 89 55 dc mov %edx,-0x24(%ebp) 10ae85: e8 a6 0b 00 00 call 10ba30 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) 10ae8a: 83 c4 20 add $0x20,%esp 10ae8d: 85 c0 test %eax,%eax 10ae8f: 8b 55 dc mov -0x24(%ebp),%edx 10ae92: 0f 85 d4 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10ae98: 83 ec 0c sub $0xc,%esp 10ae9b: 8b 45 e0 mov -0x20(%ebp),%eax 10ae9e: 83 c0 18 add $0x18,%eax 10aea1: 50 push %eax 10aea2: 6a 00 push $0x0 10aea4: 6a 54 push $0x54 10aea6: 6a 01 push $0x1 10aea8: 0f be 05 20 50 12 00 movsbl 0x125020,%eax 10aeaf: 0d 00 6f 52 54 or $0x54526f00,%eax 10aeb4: 50 push %eax 10aeb5: 89 55 dc mov %edx,-0x24(%ebp) 10aeb8: e8 73 0b 00 00 call 10ba30 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) 10aebd: 83 c4 20 add $0x20,%esp 10aec0: 85 c0 test %eax,%eax 10aec2: 8b 55 dc mov -0x24(%ebp),%edx 10aec5: 0f 85 a1 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10aecb: 83 ec 0c sub $0xc,%esp 10aece: 8b 45 e0 mov -0x20(%ebp),%eax 10aed1: 05 8c 00 00 00 add $0x8c,%eax 10aed6: 50 push %eax 10aed7: 6a 00 push $0x0 10aed9: 6a 20 push $0x20 10aedb: 6a 00 push $0x0 10aedd: 0f be 05 20 50 12 00 movsbl 0x125020,%eax 10aee4: 0d 00 78 52 54 or $0x54527800,%eax 10aee9: 50 push %eax 10aeea: 89 55 dc mov %edx,-0x24(%ebp) 10aeed: e8 3e 0b 00 00 call 10ba30 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10aef2: 83 c4 20 add $0x20,%esp 10aef5: 85 c0 test %eax,%eax 10aef7: 8b 55 dc mov -0x24(%ebp),%edx 10aefa: 0f 85 6c 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10af00: 8b 75 e0 mov -0x20(%ebp),%esi 10af03: c7 86 94 00 00 00 00 movl $0x0,0x94(%esi) 10af0a: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10af0d: 89 f7 mov %esi,%edi 10af0f: 81 c7 98 00 00 00 add $0x98,%edi 10af15: b9 08 00 00 00 mov $0x8,%ecx 10af1a: 8b 75 14 mov 0x14(%ebp),%esi 10af1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10af1f: 8b 45 e0 mov -0x20(%ebp),%eax 10af22: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10af29: 0f 84 63 01 00 00 je 10b092 <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10af2f: 8b 4d e0 mov -0x20(%ebp),%ecx 10af32: 8b b9 a0 00 00 00 mov 0xa0(%ecx),%edi 10af38: 85 ff test %edi,%edi 10af3a: 0f 84 f9 00 00 00 je 10b039 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 10af40: 83 b9 b4 00 00 00 02 cmpl $0x2,0xb4(%ecx) 10af47: 0f 84 ec 00 00 00 je 10b039 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 10af4d: 8b 75 e0 mov -0x20(%ebp),%esi 10af50: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10af57: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 10af5e: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 10af65: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi) tty->termios.c_cc[VINTR] = '\003'; 10af6c: c6 46 41 03 movb $0x3,0x41(%esi) tty->termios.c_cc[VQUIT] = '\034'; 10af70: c6 46 42 1c movb $0x1c,0x42(%esi) tty->termios.c_cc[VERASE] = '\177'; 10af74: c6 46 43 7f movb $0x7f,0x43(%esi) tty->termios.c_cc[VKILL] = '\025'; 10af78: c6 46 44 15 movb $0x15,0x44(%esi) tty->termios.c_cc[VEOF] = '\004'; 10af7c: c6 46 45 04 movb $0x4,0x45(%esi) tty->termios.c_cc[VEOL] = '\000'; 10af80: c6 46 4c 00 movb $0x0,0x4c(%esi) tty->termios.c_cc[VEOL2] = '\000'; 10af84: c6 46 51 00 movb $0x0,0x51(%esi) tty->termios.c_cc[VSTART] = '\021'; 10af88: c6 46 49 11 movb $0x11,0x49(%esi) tty->termios.c_cc[VSTOP] = '\023'; 10af8c: c6 46 4a 13 movb $0x13,0x4a(%esi) tty->termios.c_cc[VSUSP] = '\032'; 10af90: c6 46 4b 1a movb $0x1a,0x4b(%esi) tty->termios.c_cc[VREPRINT] = '\022'; 10af94: c6 46 4d 12 movb $0x12,0x4d(%esi) tty->termios.c_cc[VDISCARD] = '\017'; 10af98: c6 46 4e 0f movb $0xf,0x4e(%esi) tty->termios.c_cc[VWERASE] = '\027'; 10af9c: c6 46 4f 17 movb $0x17,0x4f(%esi) tty->termios.c_cc[VLNEXT] = '\026'; 10afa0: c6 46 50 16 movb $0x16,0x50(%esi) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 10afa4: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi) 10afab: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 10afae: 8b 46 64 mov 0x64(%esi),%eax 10afb1: d1 e8 shr %eax 10afb3: 89 86 bc 00 00 00 mov %eax,0xbc(%esi) tty->highwater = tty->rawInBuf.Size * 3/4; 10afb9: 8b 46 64 mov 0x64(%esi),%eax 10afbc: 8d 04 40 lea (%eax,%eax,2),%eax 10afbf: c1 e8 02 shr $0x2,%eax 10afc2: 89 86 c0 00 00 00 mov %eax,0xc0(%esi) /* * Bump name characer */ if (c++ == 'z') 10afc8: a0 20 50 12 00 mov 0x125020,%al 10afcd: 8d 48 01 lea 0x1(%eax),%ecx 10afd0: 88 0d 20 50 12 00 mov %cl,0x125020 10afd6: 3c 7a cmp $0x7a,%al 10afd8: 0f 85 e2 fc ff ff jne 10acc0 <== ALWAYS TAKEN c = 'a'; 10afde: c6 05 20 50 12 00 61 movb $0x61,0x125020 <== NOT EXECUTED 10afe5: e9 d6 fc ff ff jmp 10acc0 <== NOT EXECUTED /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10afea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10afed: ff 35 2c 72 12 00 pushl 0x12722c <== NOT EXECUTED 10aff3: e8 ac 0d 00 00 call 10bda4 <== NOT EXECUTED 10aff8: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10afff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b002: e9 ff fc ff ff jmp 10ad06 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 10b007: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); free(tty); 10b00a: 56 push %esi <== NOT EXECUTED 10b00b: e8 74 d5 ff ff call 108584 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10b010: 59 pop %ecx <== NOT EXECUTED 10b011: ff 35 2c 72 12 00 pushl 0x12722c <== NOT EXECUTED 10b017: e8 88 0d 00 00 call 10bda4 <== NOT EXECUTED 10b01c: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10b023: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b026: e9 db fc ff ff jmp 10ad06 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 10b02b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b02e: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10b031: e8 4e d5 ff ff call 108584 <== NOT EXECUTED free(tty); 10b036: 5b pop %ebx <== NOT EXECUTED 10b037: eb d1 jmp 10b00a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10b039: 83 ec 0c sub $0xc,%esp 10b03c: 8b 45 e0 mov -0x20(%ebp),%eax 10b03f: 83 c0 68 add $0x68,%eax 10b042: 50 push %eax 10b043: 6a 00 push $0x0 10b045: 6a 24 push $0x24 10b047: 6a 00 push $0x0 10b049: 0f be 05 20 50 12 00 movsbl 0x125020,%eax 10b050: 0d 00 72 52 54 or $0x54527200,%eax 10b055: 50 push %eax 10b056: 89 55 dc mov %edx,-0x24(%ebp) 10b059: e8 d2 09 00 00 call 10ba30 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10b05e: 83 c4 20 add $0x20,%esp 10b061: 85 c0 test %eax,%eax 10b063: 8b 55 dc mov -0x24(%ebp),%edx 10b066: 0f 84 e1 fe ff ff je 10af4d <== ALWAYS TAKEN sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10b06c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b06f: 50 push %eax <== NOT EXECUTED 10b070: e8 6b 12 00 00 call 10c2e0 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 10b075: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b078: ff 71 7c pushl 0x7c(%ecx) <== NOT EXECUTED 10b07b: e8 04 d5 ff ff call 108584 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10b080: 5a pop %edx <== NOT EXECUTED 10b081: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 10b084: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10b087: e8 f8 d4 ff ff call 108584 <== NOT EXECUTED free(tty); 10b08c: 58 pop %eax <== NOT EXECUTED 10b08d: e9 78 ff ff ff jmp 10b00a <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 10b092: 51 push %ecx <== NOT EXECUTED 10b093: 51 push %ecx <== NOT EXECUTED 10b094: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED 10b099: 50 push %eax <== NOT EXECUTED 10b09a: 6a 00 push $0x0 <== NOT EXECUTED 10b09c: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10b0a1: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10b0a6: 6a 0a push $0xa <== NOT EXECUTED 10b0a8: 0f be 05 20 50 12 00 movsbl 0x125020,%eax <== NOT EXECUTED 10b0af: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 10b0b4: 50 push %eax <== NOT EXECUTED 10b0b5: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10b0b8: e8 87 0d 00 00 call 10be44 <== 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) 10b0bd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b0c0: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0c2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10b0c5: 75 a5 jne 10b06c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10b0c7: 50 push %eax <== NOT EXECUTED 10b0c8: 50 push %eax <== NOT EXECUTED 10b0c9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10b0cc: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED 10b0d1: 50 push %eax <== NOT EXECUTED 10b0d2: 6a 00 push $0x0 <== NOT EXECUTED 10b0d4: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10b0d9: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10b0de: 6a 09 push $0x9 <== NOT EXECUTED 10b0e0: 0f be 05 20 50 12 00 movsbl 0x125020,%eax <== NOT EXECUTED 10b0e7: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 10b0ec: 50 push %eax <== NOT EXECUTED 10b0ed: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10b0f0: e8 4f 0d 00 00 call 10be44 <== 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) 10b0f5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b0f8: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0fa: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10b0fd: 0f 84 2c fe ff ff je 10af2f <== NOT EXECUTED 10b103: e9 64 ff ff ff jmp 10b06c <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 10b108: 89 35 30 72 12 00 mov %esi,0x127230 10b10e: e9 49 fd ff ff jmp 10ae5c =============================================================================== 00109bc8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109bc8: 55 push %ebp 109bc9: 89 e5 mov %esp,%ebp 109bcb: 57 push %edi 109bcc: 56 push %esi 109bcd: 53 push %ebx 109bce: 83 ec 1c sub $0x1c,%esp 109bd1: 8b 45 08 mov 0x8(%ebp),%eax 109bd4: 8b 55 0c mov 0xc(%ebp),%edx 109bd7: 89 55 e4 mov %edx,-0x1c(%ebp) 109bda: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109bdd: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109bdf: 8b bb b4 00 00 00 mov 0xb4(%ebx),%edi 109be5: 85 ff test %edi,%edi 109be7: 0f 84 eb 00 00 00 je 109cd8 <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109bed: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109bf3: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 109bf6: 8b 4d e4 mov -0x1c(%ebp),%ecx 109bf9: 85 c9 test %ecx,%ecx 109bfb: 0f 84 cf 00 00 00 je 109cd0 <== NEVER TAKEN 109c01: 8d 76 00 lea 0x0(%esi),%esi * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 109c04: 8b 45 e0 mov -0x20(%ebp),%eax 109c07: 40 inc %eax 109c08: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109c0e: 31 d2 xor %edx,%edx 109c10: f7 f1 div %ecx 109c12: 89 55 dc mov %edx,-0x24(%ebp) 109c15: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109c18: 9c pushf 109c19: fa cli 109c1a: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109c1b: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109c21: 3b 55 e0 cmp -0x20(%ebp),%edx 109c24: 75 3e jne 109c64 109c26: 89 f8 mov %edi,%eax 109c28: 89 f7 mov %esi,%edi 109c2a: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109c2c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109c33: 00 00 00 rtems_interrupt_enable (level); 109c36: 50 push %eax 109c37: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109c38: 52 push %edx 109c39: 6a 00 push $0x0 109c3b: 6a 00 push $0x0 109c3d: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109c43: e8 60 20 00 00 call 10bca8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109c48: 83 c4 10 add $0x10,%esp 109c4b: 85 c0 test %eax,%eax 109c4d: 0f 85 a0 00 00 00 jne 109cf3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109c53: 9c pushf 109c54: fa cli 109c55: 58 pop %eax * 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) { 109c56: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109c5c: 39 f2 cmp %esi,%edx 109c5e: 74 cc je 109c2c <== NEVER TAKEN 109c60: 89 fe mov %edi,%esi 109c62: 89 c7 mov %eax,%edi RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109c64: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109c6a: 8b 4b 7c mov 0x7c(%ebx),%ecx 109c6d: 8a 16 mov (%esi),%dl 109c6f: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 109c72: 8b 45 dc mov -0x24(%ebp),%eax 109c75: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109c7b: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 109c81: 85 c0 test %eax,%eax 109c83: 75 23 jne 109ca8 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109c85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109c8b: a8 10 test $0x10,%al 109c8d: 74 26 je 109cb5 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 109c8f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109c95: 83 c8 20 or $0x20,%eax 109c98: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109c9e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109ca5: 00 00 00 } rtems_interrupt_enable (level); 109ca8: 57 push %edi 109ca9: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109caa: ff 4d e4 decl -0x1c(%ebp) 109cad: 74 21 je 109cd0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109caf: 46 inc %esi 109cb0: e9 4f ff ff ff jmp 109c04 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, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 109cb5: 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, 109cbb: 51 push %ecx 109cbc: 6a 01 push $0x1 109cbe: 03 43 7c add 0x7c(%ebx),%eax 109cc1: 50 push %eax 109cc2: ff 73 10 pushl 0x10(%ebx) 109cc5: ff 93 a4 00 00 00 call *0xa4(%ebx) 109ccb: 83 c4 10 add $0x10,%esp 109cce: eb ce jmp 109c9e tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109cd0: 8d 65 f4 lea -0xc(%ebp),%esp 109cd3: 5b pop %ebx 109cd4: 5e pop %esi 109cd5: 5f pop %edi 109cd6: c9 leave 109cd7: c3 ret 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); 109cd8: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED 109cdb: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 109cde: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 109ce1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 109ce4: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109cea: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ced: 5b pop %ebx <== NOT EXECUTED 109cee: 5e pop %esi <== NOT EXECUTED 109cef: 5f pop %edi <== NOT EXECUTED 109cf0: 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); 109cf1: ff e0 jmp *%eax <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 109cf3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cf6: 50 push %eax <== NOT EXECUTED 109cf7: e8 e4 25 00 00 call 10c2e0 <== NOT EXECUTED =============================================================================== 0010a334 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10a334: 55 push %ebp <== NOT EXECUTED 10a335: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a337: 57 push %edi <== NOT EXECUTED 10a338: 56 push %esi <== NOT EXECUTED 10a339: 53 push %ebx <== NOT EXECUTED 10a33a: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a33d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10a340: 8b 02 mov (%edx),%eax <== NOT EXECUTED 10a342: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 10a345: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED 10a348: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 10a34b: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED 10a34e: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a351: 6a 00 push $0x0 <== NOT EXECUTED 10a353: 6a 00 push $0x0 <== NOT EXECUTED 10a355: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a358: e8 4b 19 00 00 call 10bca8 <== NOT EXECUTED 10a35d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10a360: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a363: 85 c0 test %eax,%eax <== NOT EXECUTED 10a365: 75 35 jne 10a39c <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 10a367: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10a36d: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a370: 8b 80 a8 6e 12 00 mov 0x126ea8(%eax),%eax <== NOT EXECUTED 10a376: 85 c0 test %eax,%eax <== NOT EXECUTED 10a378: 74 2e je 10a3a8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 10a37a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a37d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10a380: 53 push %ebx <== NOT EXECUTED 10a381: ff d0 call *%eax <== NOT EXECUTED 10a383: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 10a386: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10a38d: 00 00 00 rtems_semaphore_release (tty->isem); 10a390: 59 pop %ecx <== NOT EXECUTED 10a391: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a394: e8 0b 1a 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a399: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 10a39c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a39f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a3a2: 5b pop %ebx <== NOT EXECUTED 10a3a3: 5e pop %esi <== NOT EXECUTED 10a3a4: 5f pop %edi <== NOT EXECUTED 10a3a5: c9 leave <== NOT EXECUTED 10a3a6: c3 ret <== NOT EXECUTED 10a3a7: 90 nop <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 10a3a8: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10a3ab: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a3ae: 74 5f je 10a40f <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a3b0: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10a3b3: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10a3b5: 74 29 je 10a3e0 <== NOT EXECUTED 10a3b7: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10a3ba: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a3bd: 7d 21 jge 10a3e0 <== NOT EXECUTED 10a3bf: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 10a3c2: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED 10a3c5: eb 06 jmp 10a3cd <== NOT EXECUTED 10a3c7: 90 nop <== NOT EXECUTED 10a3c8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a3cb: 7e 10 jle 10a3dd <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 10a3cd: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 10a3d0: 8a 0c 06 mov (%esi,%eax,1),%cl <== NOT EXECUTED 10a3d3: 88 0a mov %cl,(%edx) <== NOT EXECUTED 10a3d5: 42 inc %edx <== NOT EXECUTED 10a3d6: 40 inc %eax <== NOT EXECUTED 10a3d7: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a3da: 4f dec %edi <== NOT EXECUTED 10a3db: 75 eb jne 10a3c8 <== NOT EXECUTED 10a3dd: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10a3e0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10a3e3: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 10a3e6: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED 10a3e9: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 10a3ec: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10a3f3: 00 00 00 rtems_semaphore_release (tty->isem); 10a3f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3f9: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a3fc: e8 a3 19 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a401: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a404: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a407: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a40a: 5b pop %ebx <== NOT EXECUTED 10a40b: 5e pop %esi <== NOT EXECUTED 10a40c: 5f pop %edi <== NOT EXECUTED 10a40d: c9 leave <== NOT EXECUTED 10a40e: c3 ret <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10a40f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 10a416: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 10a41d: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a420: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 10a423: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 10a429: 85 c0 test %eax,%eax <== NOT EXECUTED 10a42b: 74 0e je 10a43b <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 10a42d: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED 10a433: 85 d2 test %edx,%edx <== NOT EXECUTED 10a435: 0f 84 82 01 00 00 je 10a5bd <== 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; 10a43b: 8b 73 74 mov 0x74(%ebx),%esi <== 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, 10a43e: 8d 53 49 lea 0x49(%ebx),%edx <== NOT EXECUTED 10a441: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10a444: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) <== NOT EXECUTED 10a44b: 90 nop <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a44c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a44f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a452: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a454: 0f 84 06 01 00 00 je 10a560 <== NOT EXECUTED 10a45a: a1 14 50 12 00 mov 0x125014,%eax <== NOT EXECUTED 10a45f: 48 dec %eax <== NOT EXECUTED 10a460: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a463: 7f 3c jg 10a4a1 <== NOT EXECUTED 10a465: e9 f6 00 00 00 jmp 10a560 <== NOT EXECUTED 10a46a: 66 90 xchg %ax,%ax <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 10a46c: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a46f: 89 da mov %ebx,%edx <== NOT EXECUTED 10a471: e8 2e fd ff ff call 10a1a4 <== NOT EXECUTED 10a476: 85 c0 test %eax,%eax <== NOT EXECUTED 10a478: 74 07 je 10a481 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a47a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a481: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a484: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a487: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a48a: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a48c: 0f 84 ce 00 00 00 je 10a560 <== NOT EXECUTED 10a492: a1 14 50 12 00 mov 0x125014,%eax <== NOT EXECUTED 10a497: 48 dec %eax <== NOT EXECUTED 10a498: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a49b: 0f 8d bf 00 00 00 jge 10a560 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 10a4a1: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 10a4a4: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 10a4a7: 40 inc %eax <== NOT EXECUTED 10a4a8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a4aa: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 10a4ac: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10a4af: 8a 0c 10 mov (%eax,%edx,1),%cl <== NOT EXECUTED tty->rawInBuf.Head = newHead; 10a4b2: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a4b5: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a4b8: 8b 7b 64 mov 0x64(%ebx),%edi <== NOT EXECUTED 10a4bb: 8b 73 64 mov 0x64(%ebx),%esi <== NOT EXECUTED 10a4be: 8d 04 07 lea (%edi,%eax,1),%eax <== NOT EXECUTED 10a4c1: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a4c3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a4c5: f7 f6 div %esi <== NOT EXECUTED 10a4c7: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 10a4cd: 73 5d jae 10a52c <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10a4cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4d5: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 10a4d8: 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)) 10a4de: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4e4: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 10a4e9: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 10a4ee: 0f 84 94 00 00 00 je 10a588 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10a4f4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4fa: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a4fd: 74 2d je 10a52c <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 10a4ff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a505: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a508: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10a50e: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10a514: 85 c0 test %eax,%eax <== NOT EXECUTED 10a516: 74 14 je 10a52c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10a518: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a51b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a51e: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a521: ff d0 call *%eax <== NOT EXECUTED 10a523: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a526: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 10a52c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 10a530: 0f 85 36 ff ff ff jne 10a46c <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 10a536: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a539: 89 da mov %ebx,%edx <== NOT EXECUTED 10a53b: e8 64 fc ff ff call 10a1a4 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a540: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 10a544: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a547: 0f 8d 2d ff ff ff jge 10a47a <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a54d: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a550: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a553: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a556: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a558: 0f 85 34 ff ff ff jne 10a492 <== NOT EXECUTED 10a55e: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 10a560: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a563: 85 c0 test %eax,%eax <== NOT EXECUTED 10a565: 0f 84 45 fe ff ff je 10a3b0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 10a56b: 57 push %edi <== NOT EXECUTED 10a56c: 56 push %esi <== NOT EXECUTED 10a56d: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 10a570: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10a573: e8 30 17 00 00 call 10bca8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 10a578: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a57b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a57d: 0f 84 c9 fe ff ff je 10a44c <== NOT EXECUTED 10a583: e9 28 fe ff ff jmp 10a3b0 <== 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)) 10a588: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi <== NOT EXECUTED 10a58e: 85 f6 test %esi,%esi <== NOT EXECUTED 10a590: 74 0e je 10a5a0 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 10a592: 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)) 10a598: a8 20 test $0x20,%al <== NOT EXECUTED 10a59a: 0f 84 54 ff ff ff je 10a4f4 <== 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, 10a5a0: 52 push %edx <== NOT EXECUTED 10a5a1: 6a 01 push $0x1 <== NOT EXECUTED 10a5a3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a5a6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a5a9: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a5ac: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a5b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5b5: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a5b8: e9 6f ff ff ff jmp 10a52c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a5bd: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 10a5c1: 75 1d jne 10a5e0 <== NOT EXECUTED 10a5c3: eb 39 jmp 10a5fe <== NOT EXECUTED 10a5c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 10a5c8: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a5cb: 89 da mov %ebx,%edx <== NOT EXECUTED 10a5cd: e8 d2 fb ff ff call 10a1a4 <== NOT EXECUTED 10a5d2: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5d4: 0f 85 d6 fd ff ff jne 10a3b0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a5da: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a5e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5e3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a5e6: ff d0 call *%eax <== NOT EXECUTED if (n < 0) { 10a5e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5eb: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5ed: 79 d9 jns 10a5c8 <== NOT EXECUTED rtems_task_wake_after (1); 10a5ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5f2: 6a 01 push $0x1 <== NOT EXECUTED 10a5f4: e8 63 1b 00 00 call 10c15c <== NOT EXECUTED 10a5f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5fc: eb dc jmp 10a5da <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10a5fe: e8 a9 0f 00 00 call 10b5ac <== NOT EXECUTED 10a603: 89 c6 mov %eax,%esi <== NOT EXECUTED 10a605: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a608: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a60b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a60e: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 10a614: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a617: 85 c0 test %eax,%eax <== NOT EXECUTED 10a619: 78 25 js 10a640 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 10a61b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a61e: 89 da mov %ebx,%edx <== NOT EXECUTED 10a620: e8 7f fb ff ff call 10a1a4 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a625: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 10a628: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 10a62b: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 10a62e: 0f 8d 7c fd ff ff jge 10a3b0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 10a634: 84 c0 test %al,%al <== NOT EXECUTED 10a636: 74 d0 je 10a608 <== NOT EXECUTED 10a638: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a63c: 74 ca je 10a608 <== NOT EXECUTED 10a63e: eb be jmp 10a5fe <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 10a640: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10a644: 74 1d je 10a663 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 10a646: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a64a: 74 08 je 10a654 <== NOT EXECUTED 10a64c: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10a64f: 85 ff test %edi,%edi <== NOT EXECUTED 10a651: 75 1a jne 10a66d <== NOT EXECUTED 10a653: 90 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 10a654: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a657: 6a 01 push $0x1 <== NOT EXECUTED 10a659: e8 fe 1a 00 00 call 10c15c <== NOT EXECUTED 10a65e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a661: eb a5 jmp 10a608 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 10a663: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a667: 0f 84 43 fd ff ff je 10a3b0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10a66d: e8 3a 0f 00 00 call 10b5ac <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 10a672: 29 f0 sub %esi,%eax <== NOT EXECUTED 10a674: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 10a677: 76 db jbe 10a654 <== NOT EXECUTED 10a679: e9 32 fd ff ff jmp 10a3b0 <== NOT EXECUTED =============================================================================== 00109618 : * 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) { 109618: 55 push %ebp 109619: 89 e5 mov %esp,%ebp 10961b: 57 push %edi 10961c: 56 push %esi 10961d: 53 push %ebx 10961e: 83 ec 0c sub $0xc,%esp 109621: 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)) 109624: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10962a: 25 03 04 00 00 and $0x403,%eax 10962f: 3d 01 04 00 00 cmp $0x401,%eax 109634: 0f 84 86 01 00 00 je 1097c0 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 10963a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109640: 83 e0 03 and $0x3,%eax 109643: 83 f8 02 cmp $0x2,%eax 109646: 0f 84 b0 01 00 00 je 1097fc <== NEVER TAKEN rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 10964c: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109652: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 109658: 39 c2 cmp %eax,%edx 10965a: 0f 84 b0 00 00 00 je 109710 <== NEVER TAKEN rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 109660: 9c pushf 109661: fa cli 109662: 58 pop %eax len = tty->t_dqlen; 109663: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 109669: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 109670: 00 00 00 rtems_interrupt_enable(level); 109673: 50 push %eax 109674: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 109675: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10967b: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 109681: 8d 04 01 lea (%ecx,%eax,1),%eax 109684: 31 d2 xor %edx,%edx 109686: f7 f7 div %edi 109688: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 10968a: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 109690: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 109697: 0f 84 e7 00 00 00 je 109784 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 10969d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1096a3: 39 f0 cmp %esi,%eax 1096a5: 0f 84 81 00 00 00 je 10972c if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 1096ab: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1096b1: 25 10 02 00 00 and $0x210,%eax 1096b6: 3d 10 02 00 00 cmp $0x210,%eax 1096bb: 0f 84 db 00 00 00 je 10979c <== NEVER TAKEN } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1096c1: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1096c7: 39 c6 cmp %eax,%esi 1096c9: 0f 87 95 00 00 00 ja 109764 nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 1096cf: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 1096d5: 29 f7 sub %esi,%edi /* 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)) { 1096d7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1096dd: f6 c4 06 test $0x6,%ah 1096e0: 0f 84 95 00 00 00 je 10977b <== ALWAYS TAKEN 1096e6: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1096eb: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 1096f0: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 1096f7: 00 00 00 (*tty->device.write)(tty->minor, 1096fa: 52 push %edx 1096fb: 50 push %eax 1096fc: 8b 43 7c mov 0x7c(%ebx),%eax 1096ff: 01 f0 add %esi,%eax 109701: 50 push %eax 109702: ff 73 10 pushl 0x10(%ebx) 109705: ff 93 a4 00 00 00 call *0xa4(%ebx) 10970b: 83 c4 10 add $0x10,%esp 10970e: eb 44 jmp 109754 else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 109710: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 109717: 0f 84 1b 01 00 00 je 109838 <== NOT EXECUTED 10971d: 31 ff xor %edi,%edi <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10971f: 89 f8 mov %edi,%eax <== NOT EXECUTED 109721: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109724: 5b pop %ebx <== NOT EXECUTED 109725: 5e pop %esi <== NOT EXECUTED 109726: 5f pop %edi <== NOT EXECUTED 109727: c9 leave <== NOT EXECUTED 109728: c3 ret <== NOT EXECUTED 109729: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10972c: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109733: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 109736: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 10973c: 85 c0 test %eax,%eax 10973e: 74 7a je 1097ba <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 109740: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109743: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 109749: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10974c: 52 push %edx <== NOT EXECUTED 10974d: ff d0 call *%eax <== NOT EXECUTED 10974f: 31 ff xor %edi,%edi <== NOT EXECUTED 109751: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 109754: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 10975a: 89 f8 mov %edi,%eax 10975c: 8d 65 f4 lea -0xc(%ebp),%esp 10975f: 5b pop %ebx 109760: 5e pop %esi 109761: 5f pop %edi 109762: c9 leave 109763: c3 ret else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 109764: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 10976a: 29 f7 sub %esi,%edi else nToSend = tty->rawOutBuf.Head - newTail; /* 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)) { 10976c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109772: f6 c4 06 test $0x6,%ah 109775: 0f 85 6b ff ff ff jne 1096e6 <== NEVER TAKEN 10977b: 89 f8 mov %edi,%eax 10977d: e9 6e ff ff ff jmp 1096f0 109782: 66 90 xchg %ax,%ax tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109784: 83 ec 0c sub $0xc,%esp 109787: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10978d: e8 12 26 00 00 call 10bda4 109792: 83 c4 10 add $0x10,%esp 109795: e9 03 ff ff ff jmp 10969d 10979a: 66 90 xchg %ax,%ax /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 10979c: 9c pushf <== NOT EXECUTED 10979d: fa cli <== NOT EXECUTED 10979e: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10979f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1097a5: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1097a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1097ae: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1097b5: 00 00 00 rtems_interrupt_enable(level); 1097b8: 52 push %edx <== NOT EXECUTED 1097b9: 9d popf <== NOT EXECUTED 1097ba: 31 ff xor %edi,%edi 1097bc: eb 96 jmp 109754 1097be: 66 90 xchg %ax,%ax /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1097c0: 56 push %esi <== NOT EXECUTED 1097c1: 6a 01 push $0x1 <== NOT EXECUTED 1097c3: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 1097c6: 50 push %eax <== NOT EXECUTED 1097c7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1097ca: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 1097d0: 9c pushf <== NOT EXECUTED 1097d1: fa cli <== NOT EXECUTED 1097d2: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1097d3: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1097d9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1097df: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1097e2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1097e8: 52 push %edx <== NOT EXECUTED 1097e9: 9d popf <== NOT EXECUTED 1097ea: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1097ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 1097f2: 89 f8 mov %edi,%eax <== NOT EXECUTED 1097f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1097f7: 5b pop %ebx <== NOT EXECUTED 1097f8: 5e pop %esi <== NOT EXECUTED 1097f9: 5f pop %edi <== NOT EXECUTED 1097fa: c9 leave <== NOT EXECUTED 1097fb: c3 ret <== NOT EXECUTED * 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, 1097fc: 51 push %ecx <== NOT EXECUTED 1097fd: 6a 01 push $0x1 <== NOT EXECUTED 1097ff: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 109802: 50 push %eax <== NOT EXECUTED 109803: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109806: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 10980c: 9c pushf <== NOT EXECUTED 10980d: fa cli <== NOT EXECUTED 10980e: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10980f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 109815: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10981b: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10981e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 109824: 52 push %edx <== NOT EXECUTED 109825: 9d popf <== NOT EXECUTED 109826: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10982b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10982e: 89 f8 mov %edi,%eax <== NOT EXECUTED 109830: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109833: 5b pop %ebx <== NOT EXECUTED 109834: 5e pop %esi <== NOT EXECUTED 109835: 5f pop %edi <== NOT EXECUTED 109836: c9 leave <== NOT EXECUTED 109837: c3 ret <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109838: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10983b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 109841: e8 5e 25 00 00 call 10bda4 <== NOT EXECUTED 109846: 31 ff xor %edi,%edi <== NOT EXECUTED 109848: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10984b: e9 cf fe ff ff jmp 10971f <== NOT EXECUTED =============================================================================== 0010b180 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10b180: 55 push %ebp <== NOT EXECUTED 10b181: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b183: 57 push %edi <== NOT EXECUTED 10b184: 56 push %esi <== NOT EXECUTED 10b185: 53 push %ebx <== NOT EXECUTED 10b186: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b189: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b18c: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10b18f: 8d 7d e7 lea -0x19(%ebp),%edi <== NOT EXECUTED 10b192: 66 90 xchg %ax,%ax <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 10b194: 56 push %esi <== NOT EXECUTED 10b195: 6a 00 push $0x0 <== NOT EXECUTED 10b197: 6a 02 push $0x2 <== NOT EXECUTED 10b199: 6a 03 push $0x3 <== NOT EXECUTED 10b19b: e8 74 04 00 00 call 10b614 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10b1a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1a3: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 10b1a7: 75 27 jne 10b1d0 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 10b1a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b1ac: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10b1af: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10b1b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1b8: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10b1bb: 74 d7 je 10b194 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 10b1bd: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 10b1c0: 50 push %eax <== NOT EXECUTED 10b1c1: 6a 01 push $0x1 <== NOT EXECUTED 10b1c3: 57 push %edi <== NOT EXECUTED 10b1c4: 53 push %ebx <== NOT EXECUTED 10b1c5: e8 ee e6 ff ff call 1098b8 <== NOT EXECUTED 10b1ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1cd: eb c5 jmp 10b194 <== NOT EXECUTED 10b1cf: 90 nop <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; 10b1d0: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10b1d7: 00 00 00 rtems_task_delete(RTEMS_SELF); 10b1da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b1dd: 6a 00 push $0x0 <== NOT EXECUTED 10b1df: e8 c0 0d 00 00 call 10bfa4 <== NOT EXECUTED 10b1e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1e7: eb ab jmp 10b194 <== NOT EXECUTED =============================================================================== 001095fc : * 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) { 1095fc: 55 push %ebp <== NOT EXECUTED 1095fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1095ff: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 109602: 6a 02 push $0x2 <== NOT EXECUTED 109604: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 109607: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 10960d: e8 86 21 00 00 call 10b798 <== NOT EXECUTED 109612: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109615: c9 leave <== NOT EXECUTED 109616: c3 ret <== NOT EXECUTED =============================================================================== 0010b114 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10b114: 55 push %ebp <== NOT EXECUTED 10b115: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b117: 56 push %esi <== NOT EXECUTED 10b118: 53 push %ebx <== NOT EXECUTED 10b119: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10b11c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b11f: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 10b122: 66 90 xchg %ax,%ax <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 10b124: 56 push %esi <== NOT EXECUTED 10b125: 6a 00 push $0x0 <== NOT EXECUTED 10b127: 6a 02 push $0x2 <== NOT EXECUTED 10b129: 6a 03 push $0x3 <== NOT EXECUTED 10b12b: e8 e4 04 00 00 call 10b614 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10b130: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b133: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 10b137: 75 2b jne 10b164 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10b139: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10b13f: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10b142: 8b 80 b4 6e 12 00 mov 0x126eb4(%eax),%eax <== NOT EXECUTED 10b148: 85 c0 test %eax,%eax <== NOT EXECUTED 10b14a: 74 09 je 10b155 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10b14c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b14f: 53 push %ebx <== NOT EXECUTED 10b150: ff d0 call *%eax <== NOT EXECUTED 10b152: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10b155: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b158: 53 push %ebx <== NOT EXECUTED 10b159: e8 ba e4 ff ff call 109618 <== NOT EXECUTED 10b15e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b161: eb c1 jmp 10b124 <== NOT EXECUTED 10b163: 90 nop <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 10b164: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10b16b: 00 00 00 rtems_task_delete(RTEMS_SELF); 10b16e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b171: 6a 00 push $0x0 <== NOT EXECUTED 10b173: e8 2c 0e 00 00 call 10bfa4 <== NOT EXECUTED 10b178: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b17b: eb a7 jmp 10b124 <== NOT EXECUTED =============================================================================== 0010a1f8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10a1f8: 55 push %ebp 10a1f9: 89 e5 mov %esp,%ebp 10a1fb: 57 push %edi 10a1fc: 56 push %esi 10a1fd: 53 push %ebx 10a1fe: 83 ec 20 sub $0x20,%esp 10a201: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a204: 8b 07 mov (%edi),%eax 10a206: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a209: 6a 00 push $0x0 10a20b: 6a 00 push $0x0 10a20d: ff 76 18 pushl 0x18(%esi) 10a210: e8 93 1a 00 00 call 10bca8 10a215: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a218: 83 c4 10 add $0x10,%esp 10a21b: 85 c0 test %eax,%eax 10a21d: 75 29 jne 10a248 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 10a21f: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10a225: c1 e0 05 shl $0x5,%eax 10a228: 8b 80 ac 6e 12 00 mov 0x126eac(%eax),%eax 10a22e: 85 c0 test %eax,%eax 10a230: 74 22 je 10a254 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10a232: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a235: 57 push %edi <== NOT EXECUTED 10a236: 56 push %esi <== NOT EXECUTED 10a237: ff d0 call *%eax <== NOT EXECUTED 10a239: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 10a23c: 5f pop %edi <== NOT EXECUTED 10a23d: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED 10a240: e8 5f 1b 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a245: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 10a248: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a24b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a24e: 5b pop %ebx <== NOT EXECUTED 10a24f: 5e pop %esi <== NOT EXECUTED 10a250: 5f pop %edi <== NOT EXECUTED 10a251: c9 leave <== NOT EXECUTED 10a252: c3 ret <== NOT EXECUTED 10a253: 90 nop <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 10a254: f6 46 34 01 testb $0x1,0x34(%esi) 10a258: 74 4e je 10a2a8 <== NEVER TAKEN uint32_t count = args->count; 10a25a: 8b 47 10 mov 0x10(%edi),%eax 10a25d: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10a260: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10a263: 8b 5d e0 mov -0x20(%ebp),%ebx 10a266: 85 db test %ebx,%ebx 10a268: 74 56 je 10a2c0 <== NEVER TAKEN 10a26a: 31 db xor %ebx,%ebx 10a26c: 89 7d dc mov %edi,-0x24(%ebp) 10a26f: 89 c7 mov %eax,%edi 10a271: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 10a274: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 10a278: 89 f2 mov %esi,%edx 10a27a: e8 7d fa ff ff call 109cfc 10a27f: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a280: 3b 5d e0 cmp -0x20(%ebp),%ebx 10a283: 75 ef jne 10a274 10a285: 8b 7d dc mov -0x24(%ebp),%edi 10a288: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 10a28b: 89 47 18 mov %eax,0x18(%edi) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 10a28e: 83 ec 0c sub $0xc,%esp 10a291: ff 76 18 pushl 0x18(%esi) 10a294: e8 0b 1b 00 00 call 10bda4 return sc; 10a299: 83 c4 10 add $0x10,%esp } 10a29c: 8b 45 e4 mov -0x1c(%ebp),%eax 10a29f: 8d 65 f4 lea -0xc(%ebp),%esp 10a2a2: 5b pop %ebx 10a2a3: 5e pop %esi 10a2a4: 5f pop %edi 10a2a5: c9 leave 10a2a6: c3 ret 10a2a7: 90 nop while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 10a2a8: 51 push %ecx <== NOT EXECUTED 10a2a9: 56 push %esi <== NOT EXECUTED 10a2aa: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 10a2ad: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10a2b0: e8 13 f9 ff ff call 109bc8 <== NOT EXECUTED args->bytes_moved = args->count; 10a2b5: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 10a2b8: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 10a2bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a2be: eb ce jmp 10a28e <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a2c0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a2c2: eb c7 jmp 10a28b <== NOT EXECUTED =============================================================================== 00118fc0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118fc0: 55 push %ebp 118fc1: 89 e5 mov %esp,%ebp 118fc3: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 118fc6: 8d 45 f4 lea -0xc(%ebp),%eax 118fc9: 50 push %eax 118fca: ff 75 08 pushl 0x8(%ebp) 118fcd: 68 40 2f 14 00 push $0x142f40 118fd2: e8 cd 28 00 00 call 11b8a4 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118fd7: 83 c4 10 add $0x10,%esp 118fda: 8b 55 f4 mov -0xc(%ebp),%edx 118fdd: 85 d2 test %edx,%edx 118fdf: 74 07 je 118fe8 118fe1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118fe6: c9 leave 118fe7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118fe8: 83 78 38 04 cmpl $0x4,0x38(%eax) 118fec: 74 0f je 118ffd <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118fee: 83 ec 0c sub $0xc,%esp 118ff1: 83 c0 10 add $0x10,%eax 118ff4: 50 push %eax 118ff5: e8 52 45 00 00 call 11d54c <_Watchdog_Remove> 118ffa: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118ffd: e8 52 31 00 00 call 11c154 <_Thread_Enable_dispatch> 119002: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119004: c9 leave 119005: c3 ret =============================================================================== 00119008 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 119008: 55 push %ebp 119009: 89 e5 mov %esp,%ebp 11900b: 57 push %edi 11900c: 56 push %esi 11900d: 53 push %ebx 11900e: 83 ec 0c sub $0xc,%esp 119011: 8b 5d 08 mov 0x8(%ebp),%ebx 119014: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119017: 85 db test %ebx,%ebx 119019: 74 6d je 119088 return RTEMS_INVALID_NAME; if ( !id ) 11901b: 85 f6 test %esi,%esi 11901d: 0f 84 89 00 00 00 je 1190ac 119023: a1 d8 2b 14 00 mov 0x142bd8,%eax 119028: 40 inc %eax 119029: a3 d8 2b 14 00 mov %eax,0x142bd8 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 11902e: 83 ec 0c sub $0xc,%esp 119031: 68 40 2f 14 00 push $0x142f40 119036: e8 7d 23 00 00 call 11b3b8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 11903b: 83 c4 10 add $0x10,%esp 11903e: 85 c0 test %eax,%eax 119040: 74 56 je 119098 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 119042: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119049: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 119050: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 119057: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 11905e: 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; 119065: 8b 50 08 mov 0x8(%eax),%edx 119068: 0f b7 fa movzwl %dx,%edi 11906b: 8b 0d 5c 2f 14 00 mov 0x142f5c,%ecx 119071: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 119074: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 119077: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 119079: e8 d6 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11907e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 119080: 8d 65 f4 lea -0xc(%ebp),%esp 119083: 5b pop %ebx 119084: 5e pop %esi 119085: 5f pop %edi 119086: c9 leave 119087: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119088: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11908d: 8d 65 f4 lea -0xc(%ebp),%esp 119090: 5b pop %ebx 119091: 5e pop %esi 119092: 5f pop %edi 119093: c9 leave 119094: c3 ret 119095: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 119098: e8 b7 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11909d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1190a2: 8d 65 f4 lea -0xc(%ebp),%esp 1190a5: 5b pop %ebx 1190a6: 5e pop %esi 1190a7: 5f pop %edi 1190a8: c9 leave 1190a9: c3 ret 1190aa: 66 90 xchg %ax,%ax Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1190ac: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1190b1: 8d 65 f4 lea -0xc(%ebp),%esp 1190b4: 5b pop %ebx 1190b5: 5e pop %esi 1190b6: 5f pop %edi 1190b7: c9 leave 1190b8: c3 ret =============================================================================== 001190bc : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1190bc: 55 push %ebp 1190bd: 89 e5 mov %esp,%ebp 1190bf: 53 push %ebx 1190c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 1190c3: 8d 45 f4 lea -0xc(%ebp),%eax 1190c6: 50 push %eax 1190c7: ff 75 08 pushl 0x8(%ebp) 1190ca: 68 40 2f 14 00 push $0x142f40 1190cf: e8 d0 27 00 00 call 11b8a4 <_Objects_Get> 1190d4: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1190d6: 83 c4 10 add $0x10,%esp 1190d9: 8b 4d f4 mov -0xc(%ebp),%ecx 1190dc: 85 c9 test %ecx,%ecx 1190de: 75 38 jne 119118 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1190e0: 83 ec 08 sub $0x8,%esp 1190e3: 50 push %eax 1190e4: 68 40 2f 14 00 push $0x142f40 1190e9: e8 46 23 00 00 call 11b434 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1190ee: 8d 43 10 lea 0x10(%ebx),%eax 1190f1: 89 04 24 mov %eax,(%esp) 1190f4: e8 53 44 00 00 call 11d54c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1190f9: 58 pop %eax 1190fa: 5a pop %edx 1190fb: 53 push %ebx 1190fc: 68 40 2f 14 00 push $0x142f40 119101: e8 32 26 00 00 call 11b738 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 119106: e8 49 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11910b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11910d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119110: 8b 5d fc mov -0x4(%ebp),%ebx 119113: c9 leave 119114: c3 ret 119115: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119118: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11911d: 8b 5d fc mov -0x4(%ebp),%ebx 119120: c9 leave 119121: c3 ret =============================================================================== 00119124 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119124: 55 push %ebp 119125: 89 e5 mov %esp,%ebp 119127: 57 push %edi 119128: 56 push %esi 119129: 53 push %ebx 11912a: 83 ec 2c sub $0x2c,%esp 11912d: 8b 5d 0c mov 0xc(%ebp),%ebx 119130: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 119133: 85 db test %ebx,%ebx 119135: 0f 84 99 00 00 00 je 1191d4 return RTEMS_INVALID_NUMBER; if ( !routine ) 11913b: 85 f6 test %esi,%esi 11913d: 0f 84 b1 00 00 00 je 1191f4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 119143: 57 push %edi 119144: 8d 45 e4 lea -0x1c(%ebp),%eax 119147: 50 push %eax 119148: ff 75 08 pushl 0x8(%ebp) 11914b: 68 40 2f 14 00 push $0x142f40 119150: e8 4f 27 00 00 call 11b8a4 <_Objects_Get> 119155: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119157: 83 c4 10 add $0x10,%esp 11915a: 8b 4d e4 mov -0x1c(%ebp),%ecx 11915d: 85 c9 test %ecx,%ecx 11915f: 74 0f je 119170 119161: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119166: 8d 65 f4 lea -0xc(%ebp),%esp 119169: 5b pop %ebx 11916a: 5e pop %esi 11916b: 5f pop %edi 11916c: c9 leave 11916d: c3 ret 11916e: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119170: 8d 50 10 lea 0x10(%eax),%edx 119173: 83 ec 0c sub $0xc,%esp 119176: 52 push %edx 119177: 89 55 d4 mov %edx,-0x2c(%ebp) 11917a: e8 cd 43 00 00 call 11d54c <_Watchdog_Remove> _ISR_Disable( level ); 11917f: 9c pushf 119180: fa cli 119181: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 119182: 83 c4 10 add $0x10,%esp 119185: 8b 57 18 mov 0x18(%edi),%edx 119188: 85 d2 test %edx,%edx 11918a: 8b 55 d4 mov -0x2c(%ebp),%edx 11918d: 75 55 jne 1191e4 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 11918f: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119196: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 11919d: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 1191a0: 8b 4d 08 mov 0x8(%ebp),%ecx 1191a3: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 1191a6: 8b 4d 14 mov 0x14(%ebp),%ecx 1191a9: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 1191ac: 50 push %eax 1191ad: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1191ae: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1191b1: 83 ec 08 sub $0x8,%esp 1191b4: 52 push %edx 1191b5: 68 b8 2c 14 00 push $0x142cb8 1191ba: e8 55 42 00 00 call 11d414 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 1191bf: e8 90 2f 00 00 call 11c154 <_Thread_Enable_dispatch> 1191c4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191c6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191c9: 8d 65 f4 lea -0xc(%ebp),%esp 1191cc: 5b pop %ebx 1191cd: 5e pop %esi 1191ce: 5f pop %edi 1191cf: c9 leave 1191d0: c3 ret 1191d1: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 1191d4: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191d9: 8d 65 f4 lea -0xc(%ebp),%esp 1191dc: 5b pop %ebx 1191dd: 5e pop %esi 1191de: 5f pop %edi 1191df: c9 leave 1191e0: c3 ret 1191e1: 8d 76 00 lea 0x0(%esi),%esi * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 1191e4: 50 push %eax 1191e5: 9d popf _Thread_Enable_dispatch(); 1191e6: e8 69 2f 00 00 call 11c154 <_Thread_Enable_dispatch> 1191eb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191ed: e9 74 ff ff ff jmp 119166 1191f2: 66 90 xchg %ax,%ax ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 1191f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191f9: 8d 65 f4 lea -0xc(%ebp),%esp 1191fc: 5b pop %ebx 1191fd: 5e pop %esi 1191fe: 5f pop %edi 1191ff: c9 leave 119200: c3 ret =============================================================================== 00119204 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 119204: 55 push %ebp 119205: 89 e5 mov %esp,%ebp 119207: 57 push %edi 119208: 56 push %esi 119209: 53 push %ebx 11920a: 83 ec 2c sub $0x2c,%esp 11920d: 8b 75 08 mov 0x8(%ebp),%esi 119210: 8b 7d 0c mov 0xc(%ebp),%edi 119213: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 119216: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 11921d: 75 0d jne 11922c 11921f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119224: 8d 65 f4 lea -0xc(%ebp),%esp 119227: 5b pop %ebx 119228: 5e pop %esi 119229: 5f pop %edi 11922a: c9 leave 11922b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11922c: 83 ec 0c sub $0xc,%esp 11922f: 57 push %edi 119230: e8 67 d4 ff ff call 11669c <_TOD_Validate> 119235: 83 c4 10 add $0x10,%esp 119238: 84 c0 test %al,%al 11923a: 74 1e je 11925a return RTEMS_INVALID_CLOCK; if ( !routine ) 11923c: 85 db test %ebx,%ebx 11923e: 0f 84 a4 00 00 00 je 1192e8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 119244: 83 ec 0c sub $0xc,%esp 119247: 57 push %edi 119248: e8 c3 d3 ff ff call 116610 <_TOD_To_seconds> 11924d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11924f: 83 c4 10 add $0x10,%esp 119252: 3b 05 6c 2c 14 00 cmp 0x142c6c,%eax 119258: 77 0e ja 119268 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11925a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11925f: 8d 65 f4 lea -0xc(%ebp),%esp 119262: 5b pop %ebx 119263: 5e pop %esi 119264: 5f pop %edi 119265: c9 leave 119266: c3 ret 119267: 90 nop 119268: 50 push %eax 119269: 8d 45 e4 lea -0x1c(%ebp),%eax 11926c: 50 push %eax 11926d: 56 push %esi 11926e: 68 40 2f 14 00 push $0x142f40 119273: e8 2c 26 00 00 call 11b8a4 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119278: 83 c4 10 add $0x10,%esp 11927b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11927e: 85 c9 test %ecx,%ecx 119280: 75 5a jne 1192dc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119282: 8d 48 10 lea 0x10(%eax),%ecx 119285: 83 ec 0c sub $0xc,%esp 119288: 51 push %ecx 119289: 89 45 d4 mov %eax,-0x2c(%ebp) 11928c: 89 4d d0 mov %ecx,-0x30(%ebp) 11928f: e8 b8 42 00 00 call 11d54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 119294: 8b 55 d4 mov -0x2c(%ebp),%edx 119297: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11929e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1192a5: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 1192a8: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 1192ab: 8b 45 14 mov 0x14(%ebp),%eax 1192ae: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1192b1: 2b 3d 6c 2c 14 00 sub 0x142c6c,%edi 1192b7: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1192ba: 58 pop %eax 1192bb: 5a pop %edx 1192bc: 8b 4d d0 mov -0x30(%ebp),%ecx 1192bf: 51 push %ecx 1192c0: 68 ac 2c 14 00 push $0x142cac 1192c5: e8 4a 41 00 00 call 11d414 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1192ca: e8 85 2e 00 00 call 11c154 <_Thread_Enable_dispatch> 1192cf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1192d1: 83 c4 10 add $0x10,%esp 1192d4: e9 4b ff ff ff jmp 119224 1192d9: 8d 76 00 lea 0x0(%esi),%esi seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1192dc: b8 04 00 00 00 mov $0x4,%eax 1192e1: e9 3e ff ff ff jmp 119224 1192e6: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1192e8: b8 09 00 00 00 mov $0x9,%eax 1192ed: e9 32 ff ff ff jmp 119224 =============================================================================== 00119604 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119604: 55 push %ebp 119605: 89 e5 mov %esp,%ebp 119607: 56 push %esi 119608: 53 push %ebx 119609: 83 ec 10 sub $0x10,%esp 11960c: 8b 45 08 mov 0x8(%ebp),%eax 11960f: 85 c0 test %eax,%eax 119611: 75 0d jne 119620 if (status) { initialized = false; } #endif return status; 119613: b8 13 00 00 00 mov $0x13,%eax } 119618: 8d 65 f8 lea -0x8(%ebp),%esp 11961b: 5b pop %ebx 11961c: 5e pop %esi 11961d: c9 leave 11961e: c3 ret 11961f: 90 nop 119620: 0f b6 15 74 a6 13 00 movzbl 0x13a674,%edx 119627: 39 d0 cmp %edx,%eax 119629: 76 35 jbe 119660 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 11962b: 40 inc %eax 11962c: 75 e5 jne 119613 11962e: 31 f6 xor %esi,%esi 119630: 8b 15 d8 2b 14 00 mov 0x142bd8,%edx 119636: 42 inc %edx 119637: 89 15 d8 2b 14 00 mov %edx,0x142bd8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11963d: 8a 1d 60 e4 13 00 mov 0x13e460,%bl initialized = true; 119643: c6 05 60 e4 13 00 01 movb $0x1,0x13e460 _Thread_Enable_dispatch(); 11964a: e8 05 2b 00 00 call 11c154 <_Thread_Enable_dispatch> if ( tmpInitialized ) 11964f: 84 db test %bl,%bl 119651: 74 11 je 119664 119653: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 119658: 8d 65 f8 lea -0x8(%ebp),%esp 11965b: 5b pop %ebx 11965c: 5e pop %esi 11965d: c9 leave 11965e: c3 ret 11965f: 90 nop 119660: 89 c6 mov %eax,%esi 119662: eb cc jmp 119630 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 119664: 83 ec 08 sub $0x8,%esp 119667: 8d 45 f4 lea -0xc(%ebp),%eax 11966a: 50 push %eax 11966b: 8b 45 10 mov 0x10(%ebp),%eax 11966e: 80 cc 80 or $0x80,%ah 119671: 50 push %eax 119672: 68 00 01 00 00 push $0x100 119677: ff 75 0c pushl 0xc(%ebp) 11967a: 56 push %esi 11967b: 68 45 4d 49 54 push $0x54494d45 119680: e8 87 f0 ff ff call 11870c /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 119685: 83 c4 20 add $0x20,%esp 119688: 85 c0 test %eax,%eax 11968a: 74 10 je 11969c initialized = false; 11968c: c6 05 60 e4 13 00 00 movb $0x0,0x13e460 initialized = false; } #endif return status; } 119693: 8d 65 f8 lea -0x8(%ebp),%esp 119696: 5b pop %ebx 119697: 5e pop %esi 119698: c9 leave 119699: c3 ret 11969a: 66 90 xchg %ax,%ax * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 11969c: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 11969f: 0f b7 c8 movzwl %ax,%ecx 1196a2: 8b 15 7c 2b 14 00 mov 0x142b7c,%edx 1196a8: 8b 14 8a mov (%edx,%ecx,4),%edx 1196ab: 89 15 80 e4 13 00 mov %edx,0x13e480 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196b1: c7 05 b0 e4 13 00 b4 movl $0x13e4b4,0x13e4b0 1196b8: e4 13 00 the_chain->permanent_null = NULL; 1196bb: c7 05 b4 e4 13 00 00 movl $0x0,0x13e4b4 1196c2: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196c5: c7 05 b8 e4 13 00 b0 movl $0x13e4b0,0x13e4b8 1196cc: e4 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196cf: c7 05 e8 e4 13 00 ec movl $0x13e4ec,0x13e4e8 1196d6: e4 13 00 the_chain->permanent_null = NULL; 1196d9: c7 05 ec e4 13 00 00 movl $0x0,0x13e4ec 1196e0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196e3: c7 05 f0 e4 13 00 e8 movl $0x13e4e8,0x13e4f0 1196ea: e4 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1196ed: c7 05 90 e4 13 00 00 movl $0x0,0x13e490 1196f4: 00 00 00 the_watchdog->routine = routine; 1196f7: c7 05 a4 e4 13 00 bc movl $0x11bfbc,0x13e4a4 1196fe: bf 11 00 the_watchdog->id = id; 119701: a3 a8 e4 13 00 mov %eax,0x13e4a8 the_watchdog->user_data = user_data; 119706: c7 05 ac e4 13 00 00 movl $0x0,0x13e4ac 11970d: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119710: c7 05 c8 e4 13 00 00 movl $0x0,0x13e4c8 119717: 00 00 00 the_watchdog->routine = routine; 11971a: c7 05 dc e4 13 00 bc movl $0x11bfbc,0x13e4dc 119721: bf 11 00 the_watchdog->id = id; 119724: a3 e0 e4 13 00 mov %eax,0x13e4e0 the_watchdog->user_data = user_data; 119729: c7 05 e4 e4 13 00 00 movl $0x0,0x13e4e4 119730: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 119733: c7 05 84 e4 13 00 d8 movl $0x1199d8,0x13e484 11973a: 99 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 11973d: 8b 15 44 2d 14 00 mov 0x142d44,%edx 119743: 89 15 bc e4 13 00 mov %edx,0x13e4bc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119749: 8b 15 6c 2c 14 00 mov 0x142c6c,%edx 11974f: 89 15 f4 e4 13 00 mov %edx,0x13e4f4 ts->insert_chain = NULL; 119755: c7 05 f8 e4 13 00 00 movl $0x0,0x13e4f8 11975c: 00 00 00 ts->active = false; 11975f: c6 05 fc e4 13 00 00 movb $0x0,0x13e4fc /* * The default timer server is now available. */ _Timer_server = ts; 119766: c7 05 80 2f 14 00 80 movl $0x13e480,0x142f80 11976d: e4 13 00 /* * Start the timer server */ status = rtems_task_start( 119770: 52 push %edx 119771: 68 80 e4 13 00 push $0x13e480 119776: 68 2c 98 11 00 push $0x11982c 11977b: 50 push %eax 11977c: e8 23 f6 ff ff call 118da4 if (status) { initialized = false; } #endif return status; 119781: 83 c4 10 add $0x10,%esp 119784: e9 8f fe ff ff jmp 119618 =============================================================================== 0011937c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 11937c: 55 push %ebp 11937d: 89 e5 mov %esp,%ebp 11937f: 56 push %esi 119380: 53 push %ebx 119381: 83 ec 24 sub $0x24,%esp 119384: 8d 45 f4 lea -0xc(%ebp),%eax 119387: 50 push %eax 119388: ff 75 08 pushl 0x8(%ebp) 11938b: 68 40 2f 14 00 push $0x142f40 119390: e8 0f 25 00 00 call 11b8a4 <_Objects_Get> 119395: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119397: 83 c4 10 add $0x10,%esp 11939a: 8b 45 f4 mov -0xc(%ebp),%eax 11939d: 85 c0 test %eax,%eax 11939f: 74 0f je 1193b0 1193a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193a6: 8d 65 f8 lea -0x8(%ebp),%esp 1193a9: 5b pop %ebx 1193aa: 5e pop %esi 1193ab: c9 leave 1193ac: c3 ret 1193ad: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 1193b0: 8b 43 38 mov 0x38(%ebx),%eax 1193b3: 85 c0 test %eax,%eax 1193b5: 74 1d je 1193d4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1193b7: 48 dec %eax 1193b8: 74 3a je 1193f4 1193ba: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 1193bf: 89 45 e4 mov %eax,-0x1c(%ebp) 1193c2: e8 8d 2d 00 00 call 11c154 <_Thread_Enable_dispatch> 1193c7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193ca: 8d 65 f8 lea -0x8(%ebp),%esp 1193cd: 5b pop %ebx 1193ce: 5e pop %esi 1193cf: c9 leave 1193d0: c3 ret 1193d1: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 1193d4: 83 c3 10 add $0x10,%ebx 1193d7: 83 ec 0c sub $0xc,%esp 1193da: 53 push %ebx 1193db: e8 6c 41 00 00 call 11d54c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1193e0: 59 pop %ecx 1193e1: 5e pop %esi 1193e2: 53 push %ebx 1193e3: 68 b8 2c 14 00 push $0x142cb8 1193e8: e8 27 40 00 00 call 11d414 <_Watchdog_Insert> 1193ed: 31 c0 xor %eax,%eax 1193ef: 83 c4 10 add $0x10,%esp 1193f2: eb cb jmp 1193bf } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1193f4: 8b 35 80 2f 14 00 mov 0x142f80,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1193fa: 83 ec 0c sub $0xc,%esp 1193fd: 8d 43 10 lea 0x10(%ebx),%eax 119400: 50 push %eax 119401: e8 46 41 00 00 call 11d54c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 119406: 58 pop %eax 119407: 5a pop %edx 119408: 53 push %ebx 119409: 56 push %esi 11940a: ff 56 04 call *0x4(%esi) 11940d: 31 c0 xor %eax,%eax 11940f: 83 c4 10 add $0x10,%esp 119412: eb ab jmp 1193bf =============================================================================== 00119414 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119414: 55 push %ebp 119415: 89 e5 mov %esp,%ebp 119417: 57 push %edi 119418: 56 push %esi 119419: 53 push %ebx 11941a: 83 ec 2c sub $0x2c,%esp 11941d: 8b 7d 0c mov 0xc(%ebp),%edi 119420: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 119423: 8b 1d 80 2f 14 00 mov 0x142f80,%ebx if ( !timer_server ) 119429: 85 db test %ebx,%ebx 11942b: 0f 84 9f 00 00 00 je 1194d0 return RTEMS_INCORRECT_STATE; if ( !routine ) 119431: 85 f6 test %esi,%esi 119433: 0f 84 a3 00 00 00 je 1194dc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 119439: 85 ff test %edi,%edi 11943b: 75 0f jne 11944c 11943d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119442: 8d 65 f4 lea -0xc(%ebp),%esp 119445: 5b pop %ebx 119446: 5e pop %esi 119447: 5f pop %edi 119448: c9 leave 119449: c3 ret 11944a: 66 90 xchg %ax,%ax 11944c: 52 push %edx 11944d: 8d 45 e4 lea -0x1c(%ebp),%eax 119450: 50 push %eax 119451: ff 75 08 pushl 0x8(%ebp) 119454: 68 40 2f 14 00 push $0x142f40 119459: e8 46 24 00 00 call 11b8a4 <_Objects_Get> 11945e: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119460: 83 c4 10 add $0x10,%esp 119463: 8b 45 e4 mov -0x1c(%ebp),%eax 119466: 85 c0 test %eax,%eax 119468: 75 56 jne 1194c0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11946a: 83 ec 0c sub $0xc,%esp 11946d: 8d 42 10 lea 0x10(%edx),%eax 119470: 50 push %eax 119471: 89 55 d4 mov %edx,-0x2c(%ebp) 119474: e8 d3 40 00 00 call 11d54c <_Watchdog_Remove> _ISR_Disable( level ); 119479: 9c pushf 11947a: fa cli 11947b: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 11947c: 83 c4 10 add $0x10,%esp 11947f: 8b 55 d4 mov -0x2c(%ebp),%edx 119482: 8b 4a 18 mov 0x18(%edx),%ecx 119485: 85 c9 test %ecx,%ecx 119487: 75 5f jne 1194e8 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 119489: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119490: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 119497: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11949a: 8b 4d 08 mov 0x8(%ebp),%ecx 11949d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 1194a0: 8b 4d 14 mov 0x14(%ebp),%ecx 1194a3: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1194a6: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1194a9: 50 push %eax 1194aa: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1194ab: 83 ec 08 sub $0x8,%esp 1194ae: 52 push %edx 1194af: 53 push %ebx 1194b0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1194b3: e8 9c 2c 00 00 call 11c154 <_Thread_Enable_dispatch> 1194b8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194ba: 83 c4 10 add $0x10,%esp 1194bd: eb 83 jmp 119442 1194bf: 90 nop if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1194c0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1194c5: 8d 65 f4 lea -0xc(%ebp),%esp 1194c8: 5b pop %ebx 1194c9: 5e pop %esi 1194ca: 5f pop %edi 1194cb: c9 leave 1194cc: c3 ret 1194cd: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1194d0: b8 0e 00 00 00 mov $0xe,%eax 1194d5: e9 68 ff ff ff jmp 119442 1194da: 66 90 xchg %ax,%ax return RTEMS_INCORRECT_STATE; if ( !routine ) 1194dc: b8 09 00 00 00 mov $0x9,%eax 1194e1: e9 5c ff ff ff jmp 119442 1194e6: 66 90 xchg %ax,%ax * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 1194e8: 50 push %eax 1194e9: 9d popf _Thread_Enable_dispatch(); 1194ea: e8 65 2c 00 00 call 11c154 <_Thread_Enable_dispatch> 1194ef: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194f1: e9 4c ff ff ff jmp 119442 =============================================================================== 001194f8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1194f8: 55 push %ebp 1194f9: 89 e5 mov %esp,%ebp 1194fb: 57 push %edi 1194fc: 56 push %esi 1194fd: 53 push %ebx 1194fe: 83 ec 2c sub $0x2c,%esp 119501: 8b 7d 0c mov 0xc(%ebp),%edi 119504: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 119507: 8b 1d 80 2f 14 00 mov 0x142f80,%ebx if ( !timer_server ) 11950d: 85 db test %ebx,%ebx 11950f: 0f 84 d7 00 00 00 je 1195ec return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 119515: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 11951c: 0f 84 aa 00 00 00 je 1195cc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 119522: 85 f6 test %esi,%esi 119524: 0f 84 b2 00 00 00 je 1195dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 11952a: 83 ec 0c sub $0xc,%esp 11952d: 57 push %edi 11952e: e8 69 d1 ff ff call 11669c <_TOD_Validate> 119533: 83 c4 10 add $0x10,%esp 119536: 84 c0 test %al,%al 119538: 75 0e jne 119548 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11953a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11953f: 8d 65 f4 lea -0xc(%ebp),%esp 119542: 5b pop %ebx 119543: 5e pop %esi 119544: 5f pop %edi 119545: c9 leave 119546: c3 ret 119547: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 119548: 83 ec 0c sub $0xc,%esp 11954b: 57 push %edi 11954c: e8 bf d0 ff ff call 116610 <_TOD_To_seconds> 119551: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 119553: 83 c4 10 add $0x10,%esp 119556: 3b 05 6c 2c 14 00 cmp 0x142c6c,%eax 11955c: 76 dc jbe 11953a 11955e: 52 push %edx 11955f: 8d 45 e4 lea -0x1c(%ebp),%eax 119562: 50 push %eax 119563: ff 75 08 pushl 0x8(%ebp) 119566: 68 40 2f 14 00 push $0x142f40 11956b: e8 34 23 00 00 call 11b8a4 <_Objects_Get> 119570: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119572: 83 c4 10 add $0x10,%esp 119575: 8b 45 e4 mov -0x1c(%ebp),%eax 119578: 85 c0 test %eax,%eax 11957a: 75 7c jne 1195f8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11957c: 83 ec 0c sub $0xc,%esp 11957f: 8d 42 10 lea 0x10(%edx),%eax 119582: 50 push %eax 119583: 89 55 d4 mov %edx,-0x2c(%ebp) 119586: e8 c1 3f 00 00 call 11d54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11958b: 8b 55 d4 mov -0x2c(%ebp),%edx 11958e: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119595: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11959c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11959f: 8b 45 08 mov 0x8(%ebp),%eax 1195a2: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1195a5: 8b 45 14 mov 0x14(%ebp),%eax 1195a8: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 1195ab: 2b 3d 6c 2c 14 00 sub 0x142c6c,%edi 1195b1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1195b4: 58 pop %eax 1195b5: 59 pop %ecx 1195b6: 52 push %edx 1195b7: 53 push %ebx 1195b8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1195bb: e8 94 2b 00 00 call 11c154 <_Thread_Enable_dispatch> 1195c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1195c2: 83 c4 10 add $0x10,%esp 1195c5: e9 75 ff ff ff jmp 11953f 1195ca: 66 90 xchg %ax,%ax Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1195cc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1195d4: 5b pop %ebx <== NOT EXECUTED 1195d5: 5e pop %esi <== NOT EXECUTED 1195d6: 5f pop %edi <== NOT EXECUTED 1195d7: c9 leave <== NOT EXECUTED 1195d8: c3 ret <== NOT EXECUTED 1195d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1195dc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195e1: 8d 65 f4 lea -0xc(%ebp),%esp 1195e4: 5b pop %ebx 1195e5: 5e pop %esi 1195e6: 5f pop %edi 1195e7: c9 leave 1195e8: c3 ret 1195e9: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1195ec: b8 0e 00 00 00 mov $0xe,%eax 1195f1: e9 49 ff ff ff jmp 11953f 1195f6: 66 90 xchg %ax,%ax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1195f8: b8 04 00 00 00 mov $0x4,%eax 1195fd: e9 3d ff ff ff jmp 11953f =============================================================================== 0010cc2c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10cc2c: 55 push %ebp <== NOT EXECUTED 10cc2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cc2f: 57 push %edi <== NOT EXECUTED 10cc30: 56 push %esi <== NOT EXECUTED 10cc31: 53 push %ebx <== NOT EXECUTED 10cc32: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10cc35: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10cc37: 89 d6 mov %edx,%esi <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10cc39: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10cc3e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10cc41: 74 2b je 10cc6e <== NOT EXECUTED { if (rtems_panic_in_progress++) 10cc43: 8b 15 60 e6 12 00 mov 0x12e660,%edx <== NOT EXECUTED 10cc49: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED 10cc4c: a3 60 e6 12 00 mov %eax,0x12e660 <== NOT EXECUTED 10cc51: 85 d2 test %edx,%edx <== NOT EXECUTED 10cc53: 74 10 je 10cc65 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cc55: a1 d8 e7 12 00 mov 0x12e7d8,%eax <== NOT EXECUTED 10cc5a: 40 inc %eax <== NOT EXECUTED 10cc5b: a3 d8 e7 12 00 mov %eax,0x12e7d8 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10cc60: a1 60 e6 12 00 mov 0x12e660,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10cc65: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10cc68: 0f 8f e6 00 00 00 jg 10cd54 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10cc6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cc71: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cc76: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10cc79: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cc7c: e8 db c5 00 00 call 11925c <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10cc81: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cc83: 25 ff ff ff 8f and $0x8fffffff,%eax <== NOT EXECUTED 10cc88: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10cc8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cc8e: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10cc94: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cc97: 0f 85 d7 00 00 00 jne 10cd74 <== NOT EXECUTED 10cc9d: 31 ff xor %edi,%edi <== 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); 10cc9f: 52 push %edx <== NOT EXECUTED 10cca0: 51 push %ecx <== NOT EXECUTED 10cca1: 56 push %esi <== NOT EXECUTED 10cca2: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cca7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccaa: e8 95 20 01 00 call 11ed44 <== NOT EXECUTED 10ccaf: 89 c6 mov %eax,%esi <== NOT EXECUTED if (status) 10ccb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccb4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10ccb7: 85 c0 test %eax,%eax <== NOT EXECUTED 10ccb9: 0f 85 c9 00 00 00 jne 10cd88 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 10ccbf: 83 ff 00 cmp $0x0,%edi <== NOT EXECUTED 10ccc2: 74 30 je 10ccf4 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10ccc4: 7e 15 jle 10ccdb <== NOT EXECUTED 10ccc6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccc9: 57 push %edi <== NOT EXECUTED 10ccca: e8 51 d0 00 00 call 119d20 <== NOT EXECUTED 10cccf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccd2: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10ccd5: 0f 85 d9 00 00 00 jne 10cdb4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10ccdb: 51 push %ecx <== NOT EXECUTED 10ccdc: 57 push %edi <== NOT EXECUTED 10ccdd: 68 69 70 12 00 push $0x127069 <== NOT EXECUTED 10cce2: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cce7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccea: e8 b5 c8 00 00 call 1195a4 <== NOT EXECUTED 10ccef: 01 c6 add %eax,%esi <== NOT EXECUTED 10ccf1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10ccf4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ccf7: 68 4b 63 12 00 push $0x12634b <== NOT EXECUTED 10ccfc: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cd01: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cd04: e8 9b c8 00 00 call 1195a4 <== NOT EXECUTED 10cd09: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED (void) fflush(stderr); 10cd0c: 5a pop %edx <== NOT EXECUTED 10cd0d: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cd12: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cd15: e8 42 c5 00 00 call 11925c <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10cd1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cd1d: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10cd23: 74 1f je 10cd44 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 10cd25: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cd28: 85 c0 test %eax,%eax <== NOT EXECUTED 10cd2a: 74 34 je 10cd60 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10cd2c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cd2f: 68 7d 70 12 00 push $0x12707d <== NOT EXECUTED 10cd34: 6a 00 push $0x0 <== NOT EXECUTED 10cd36: e8 a9 00 00 00 call 10cde4 <== NOT EXECUTED _exit(local_errno); 10cd3b: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 10cd3e: e8 1d 0b 00 00 call 10d860 <_exit> <== NOT EXECUTED 10cd43: 90 nop <== 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"); 10cd44: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cd47: 01 f0 add %esi,%eax <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 10cd49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cd4c: 5b pop %ebx <== NOT EXECUTED 10cd4d: 5e pop %esi <== NOT EXECUTED 10cd4e: 5f pop %edi <== NOT EXECUTED 10cd4f: c9 leave <== NOT EXECUTED 10cd50: c3 ret <== NOT EXECUTED 10cd51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 10cd54: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10cd56: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cd59: 5b pop %ebx <== NOT EXECUTED 10cd5a: 5e pop %esi <== NOT EXECUTED 10cd5b: 5f pop %edi <== NOT EXECUTED 10cd5c: c9 leave <== NOT EXECUTED 10cd5d: c3 ret <== NOT EXECUTED 10cd5e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 10cd60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cd63: 68 92 70 12 00 push $0x127092 <== NOT EXECUTED 10cd68: 6a 00 push $0x0 <== NOT EXECUTED 10cd6a: e8 75 00 00 00 call 10cde4 <== NOT EXECUTED abort(); 10cd6f: e8 38 c1 00 00 call 118eac <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 10cd74: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cd77: e8 64 c1 00 00 call 118ee0 <__errno> <== NOT EXECUTED 10cd7c: 8b 38 mov (%eax),%edi <== NOT EXECUTED 10cd7e: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cd81: e9 19 ff ff ff jmp 10cc9f <== NOT EXECUTED 10cd86: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10cd88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cd8b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10cd8e: e8 81 fe ff ff call 10cc14 <== NOT EXECUTED 10cd93: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cd96: 50 push %eax <== NOT EXECUTED 10cd97: 68 4e 70 12 00 push $0x12704e <== NOT EXECUTED 10cd9c: a1 40 c4 12 00 mov 0x12c440,%eax <== NOT EXECUTED 10cda1: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cda4: e8 fb c7 00 00 call 1195a4 <== NOT EXECUTED 10cda9: 01 c6 add %eax,%esi <== NOT EXECUTED 10cdab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cdae: e9 0c ff ff ff jmp 10ccbf <== NOT EXECUTED 10cdb3: 90 nop <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10cdb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cdb7: 57 push %edi <== NOT EXECUTED 10cdb8: e8 63 cf 00 00 call 119d20 <== NOT EXECUTED 10cdbd: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cdc0: 50 push %eax <== NOT EXECUTED 10cdc1: 68 5c 70 12 00 push $0x12705c <== NOT EXECUTED 10cdc6: e9 17 ff ff ff jmp 10cce2 <== NOT EXECUTED =============================================================================== 00108770 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 108770: 55 push %ebp 108771: 89 e5 mov %esp,%ebp 108773: 57 push %edi 108774: 56 push %esi 108775: 53 push %ebx 108776: 83 ec 1c sub $0x1c,%esp 108779: 89 c6 mov %eax,%esi 10877b: 89 55 e0 mov %edx,-0x20(%ebp) 10877e: 31 ff xor %edi,%edi 108780: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 108787: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 108789: 8b 46 04 mov 0x4(%esi),%eax 10878c: 48 dec %eax 10878d: 89 46 04 mov %eax,0x4(%esi) 108790: 85 c0 test %eax,%eax 108792: 78 52 js 1087e6 <== NEVER TAKEN 108794: 8b 06 mov (%esi),%eax 108796: 0f b6 08 movzbl (%eax),%ecx 108799: 40 inc %eax 10879a: 89 06 mov %eax,(%esi) if (c == ':') 10879c: 83 f9 3a cmp $0x3a,%ecx 10879f: 74 5f je 108800 break; if (sign == 0) { 1087a1: 85 ff test %edi,%edi 1087a3: 75 0e jne 1087b3 <== NEVER TAKEN if (c == '-') { 1087a5: 83 f9 2d cmp $0x2d,%ecx 1087a8: 0f 84 8a 00 00 00 je 108838 <== NEVER TAKEN sign = -1; limit++; continue; 1087ae: bf 01 00 00 00 mov $0x1,%edi } sign = 1; } if (!isdigit(c)) 1087b3: a1 c4 72 12 00 mov 0x1272c4,%eax 1087b8: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1087bd: 74 6d je 10882c <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 1087bf: b8 cd cc cc cc mov $0xcccccccd,%eax 1087c4: f7 65 e4 mull -0x1c(%ebp) 1087c7: c1 ea 03 shr $0x3,%edx 1087ca: 39 d3 cmp %edx,%ebx 1087cc: 77 5e ja 10882c <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1087ce: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 1087d1: 39 d3 cmp %edx,%ebx 1087d3: 74 47 je 10881c <== NEVER TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1087d5: 8d 04 9b lea (%ebx,%ebx,4),%eax 1087d8: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1087db: 8b 46 04 mov 0x4(%esi),%eax 1087de: 48 dec %eax 1087df: 89 46 04 mov %eax,0x4(%esi) 1087e2: 85 c0 test %eax,%eax 1087e4: 79 ae jns 108794 <== ALWAYS TAKEN 1087e6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1087e9: 56 push %esi <== NOT EXECUTED 1087ea: ff 35 e0 72 12 00 pushl 0x1272e0 <== NOT EXECUTED 1087f0: e8 3b d3 00 00 call 115b30 <__srget_r> <== NOT EXECUTED 1087f5: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1087f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 1087fa: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 1087fd: 75 a2 jne 1087a1 <== NOT EXECUTED 1087ff: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 108800: 85 ff test %edi,%edi 108802: 74 28 je 10882c <== NEVER TAKEN return 0; *val = i * sign; 108804: 0f af df imul %edi,%ebx 108807: 8b 45 e0 mov -0x20(%ebp),%eax 10880a: 89 18 mov %ebx,(%eax) 10880c: b8 01 00 00 00 mov $0x1,%eax return 1; } 108811: 8d 65 f4 lea -0xc(%ebp),%esp 108814: 5b pop %ebx 108815: 5e pop %esi 108816: 5f pop %edi 108817: c9 leave 108818: c3 ret 108819: 8d 76 00 lea 0x0(%esi),%esi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 10881c: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED 10881f: d1 e0 shl %eax <== NOT EXECUTED 108821: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108824: 29 c2 sub %eax,%edx <== NOT EXECUTED 108826: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 108828: 76 ab jbe 1087d5 <== NOT EXECUTED 10882a: 66 90 xchg %ax,%ax <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 10882c: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10882e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108831: 5b pop %ebx <== NOT EXECUTED 108832: 5e pop %esi <== NOT EXECUTED 108833: 5f pop %edi <== NOT EXECUTED 108834: c9 leave <== NOT EXECUTED 108835: c3 ret <== NOT EXECUTED 108836: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 108838: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 10883b: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED continue; 108840: e9 44 ff ff ff jmp 108789 <== NOT EXECUTED =============================================================================== 00108848 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 108848: 55 push %ebp 108849: 89 e5 mov %esp,%ebp 10884b: 57 push %edi 10884c: 56 push %esi 10884d: 53 push %ebx 10884e: 83 ec 0c sub $0xc,%esp 108851: 89 c3 mov %eax,%ebx 108853: 89 ce mov %ecx,%esi 108855: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 108858: 8b 01 mov (%ecx),%eax 10885a: 89 02 mov %eax,(%edx) 10885c: eb 26 jmp 108884 10885e: 66 90 xchg %ax,%ax for (;;) { c = getc(fp); 108860: 8b 13 mov (%ebx),%edx 108862: 0f b6 02 movzbl (%edx),%eax 108865: 42 inc %edx 108866: 89 13 mov %edx,(%ebx) if (c == ':') { 108868: 83 f8 3a cmp $0x3a,%eax 10886b: 74 3b je 1088a8 if (nlFlag) return 0; break; } if (c == '\n') { 10886d: 83 f8 0a cmp $0xa,%eax 108870: 74 56 je 1088c8 if (!nlFlag) return 0; break; } if (c == EOF) 108872: 83 f8 ff cmp $0xffffffff,%eax 108875: 74 59 je 1088d0 <== NEVER TAKEN return 0; if (*nleft < 2) 108877: 83 3f 01 cmpl $0x1,(%edi) 10887a: 76 54 jbe 1088d0 <== NEVER TAKEN return 0; **bufp = c; 10887c: 8b 16 mov (%esi),%edx 10887e: 88 02 mov %al,(%edx) ++(*bufp); 108880: ff 06 incl (%esi) --(*nleft); 108882: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 108884: 8b 43 04 mov 0x4(%ebx),%eax 108887: 48 dec %eax 108888: 89 43 04 mov %eax,0x4(%ebx) 10888b: 85 c0 test %eax,%eax 10888d: 79 d1 jns 108860 10888f: 83 ec 08 sub $0x8,%esp 108892: 53 push %ebx 108893: ff 35 e0 72 12 00 pushl 0x1272e0 108899: e8 92 d2 00 00 call 115b30 <__srget_r> 10889e: 83 c4 10 add $0x10,%esp if (c == ':') { 1088a1: 83 f8 3a cmp $0x3a,%eax 1088a4: 75 c7 jne 10886d <== ALWAYS TAKEN 1088a6: 66 90 xchg %ax,%ax if (nlFlag) 1088a8: 8b 55 0c mov 0xc(%ebp),%edx 1088ab: 85 d2 test %edx,%edx 1088ad: 75 21 jne 1088d0 <== NEVER TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 1088af: 8b 06 mov (%esi),%eax 1088b1: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1088b4: ff 06 incl (%esi) --(*nleft); 1088b6: ff 0f decl (%edi) 1088b8: b8 01 00 00 00 mov $0x1,%eax return 1; } 1088bd: 8d 65 f4 lea -0xc(%ebp),%esp 1088c0: 5b pop %ebx 1088c1: 5e pop %esi 1088c2: 5f pop %edi 1088c3: c9 leave 1088c4: c3 ret 1088c5: 8d 76 00 lea 0x0(%esi),%esi if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1088c8: 8b 45 0c mov 0xc(%ebp),%eax 1088cb: 85 c0 test %eax,%eax 1088cd: 75 e0 jne 1088af <== ALWAYS TAKEN 1088cf: 90 nop --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 1088d0: 31 c0 xor %eax,%eax } 1088d2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1088d5: 5b pop %ebx <== NOT EXECUTED 1088d6: 5e pop %esi <== NOT EXECUTED 1088d7: 5f pop %edi <== NOT EXECUTED 1088d8: c9 leave <== NOT EXECUTED 1088d9: c3 ret <== NOT EXECUTED =============================================================================== 001088dc : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1088dc: 55 push %ebp 1088dd: 89 e5 mov %esp,%ebp 1088df: 57 push %edi 1088e0: 56 push %esi 1088e1: 53 push %ebx 1088e2: 83 ec 34 sub $0x34,%esp 1088e5: 89 c6 mov %eax,%esi 1088e7: 89 d3 mov %edx,%ebx 1088e9: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1088ec: 8d 7d d4 lea -0x2c(%ebp),%edi 1088ef: 6a 00 push $0x0 1088f1: 8d 45 08 lea 0x8(%ebp),%eax 1088f4: 50 push %eax 1088f5: 89 f9 mov %edi,%ecx 1088f7: 89 f0 mov %esi,%eax 1088f9: e8 4a ff ff ff call 108848 1088fe: 83 c4 10 add $0x10,%esp 108901: 85 c0 test %eax,%eax 108903: 75 0b jne 108910 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 108905: 31 c0 xor %eax,%eax } 108907: 8d 65 f4 lea -0xc(%ebp),%esp 10890a: 5b pop %ebx 10890b: 5e pop %esi 10890c: 5f pop %edi 10890d: c9 leave 10890e: c3 ret 10890f: 90 nop int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 108910: 83 ec 08 sub $0x8,%esp 108913: 8d 53 04 lea 0x4(%ebx),%edx 108916: 6a 00 push $0x0 108918: 8d 45 08 lea 0x8(%ebp),%eax 10891b: 50 push %eax 10891c: 89 f9 mov %edi,%ecx 10891e: 89 f0 mov %esi,%eax 108920: e8 23 ff ff ff call 108848 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108925: 83 c4 10 add $0x10,%esp 108928: 85 c0 test %eax,%eax 10892a: 74 d9 je 108905 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 10892c: 8d 55 e4 lea -0x1c(%ebp),%edx 10892f: 89 f0 mov %esi,%eax 108931: e8 3a fe ff ff call 108770 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108936: 85 c0 test %eax,%eax 108938: 74 cb je 108905 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 10893a: 83 ec 08 sub $0x8,%esp 10893d: 8d 55 e0 lea -0x20(%ebp),%edx 108940: 6a 01 push $0x1 108942: 8d 45 08 lea 0x8(%ebp),%eax 108945: 50 push %eax 108946: 89 f9 mov %edi,%ecx 108948: 89 f0 mov %esi,%eax 10894a: e8 f9 fe ff ff call 108848 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 10894f: 83 c4 10 add $0x10,%esp 108952: 85 c0 test %eax,%eax 108954: 74 af je 108905 <== 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; 108956: 8b 45 e4 mov -0x1c(%ebp),%eax 108959: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10895d: 8b 75 e0 mov -0x20(%ebp),%esi 108960: 8a 06 mov (%esi),%al 108962: 84 c0 test %al,%al 108964: 74 7d je 1089e3 <== NEVER TAKEN 108966: 89 f2 mov %esi,%edx 108968: b9 01 00 00 00 mov $0x1,%ecx 10896d: eb 08 jmp 108977 10896f: 90 nop 108970: 42 inc %edx 108971: 8a 02 mov (%edx),%al 108973: 84 c0 test %al,%al 108975: 74 09 je 108980 if(*cp == ',') 108977: 3c 2c cmp $0x2c,%al 108979: 75 f5 jne 108970 <== ALWAYS TAKEN memcount++; 10897b: 41 inc %ecx <== NOT EXECUTED 10897c: eb f2 jmp 108970 <== NOT EXECUTED 10897e: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108980: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 108987: 39 45 08 cmp %eax,0x8(%ebp) 10898a: 0f 82 75 ff ff ff jb 108905 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 108990: 8b 45 d4 mov -0x2c(%ebp),%eax 108993: 83 c0 0f add $0xf,%eax 108996: 83 e0 f0 and $0xfffffff0,%eax 108999: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 10899c: 89 30 mov %esi,(%eax) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10899e: 8b 45 e0 mov -0x20(%ebp),%eax 1089a1: 8a 10 mov (%eax),%dl 1089a3: 84 d2 test %dl,%dl 1089a5: 74 43 je 1089ea <== NEVER TAKEN 1089a7: 40 inc %eax 1089a8: b9 01 00 00 00 mov $0x1,%ecx 1089ad: eb 08 jmp 1089b7 1089af: 90 nop 1089b0: 8a 10 mov (%eax),%dl 1089b2: 40 inc %eax 1089b3: 84 d2 test %dl,%dl 1089b5: 74 15 je 1089cc if(*cp == ',') { 1089b7: 80 fa 2c cmp $0x2c,%dl 1089ba: 75 f4 jne 1089b0 <== ALWAYS TAKEN *cp = '\0'; 1089bc: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 1089c0: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 1089c3: 89 04 8a mov %eax,(%edx,%ecx,4) <== NOT EXECUTED 1089c6: 41 inc %ecx <== NOT EXECUTED 1089c7: eb e7 jmp 1089b0 <== NOT EXECUTED 1089c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089cc: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1089cf: 8b 43 0c mov 0xc(%ebx),%eax 1089d2: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1) 1089d9: b8 01 00 00 00 mov $0x1,%eax return 1; 1089de: e9 24 ff ff ff jmp 108907 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089e3: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 1089e8: eb 9d jmp 108987 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089ea: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 1089ef: eb de jmp 1089cf <== NOT EXECUTED =============================================================================== 00108a30 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 108a30: 55 push %ebp 108a31: 89 e5 mov %esp,%ebp 108a33: 57 push %edi 108a34: 56 push %esi 108a35: 53 push %ebx 108a36: 83 ec 34 sub $0x34,%esp 108a39: 89 c6 mov %eax,%esi 108a3b: 89 d3 mov %edx,%ebx 108a3d: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a40: 8d 7d d4 lea -0x2c(%ebp),%edi 108a43: 6a 00 push $0x0 108a45: 8d 45 08 lea 0x8(%ebp),%eax 108a48: 50 push %eax 108a49: 89 f9 mov %edi,%ecx 108a4b: 89 f0 mov %esi,%eax 108a4d: e8 f6 fd ff ff call 108848 108a52: 83 c4 10 add $0x10,%esp 108a55: 85 c0 test %eax,%eax 108a57: 75 0b jne 108a64 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 108a59: 31 c0 xor %eax,%eax } 108a5b: 8d 65 f4 lea -0xc(%ebp),%esp 108a5e: 5b pop %ebx 108a5f: 5e pop %esi 108a60: 5f pop %edi 108a61: c9 leave 108a62: c3 ret 108a63: 90 nop ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 108a64: 83 ec 08 sub $0x8,%esp 108a67: 8d 53 04 lea 0x4(%ebx),%edx 108a6a: 6a 00 push $0x0 108a6c: 8d 45 08 lea 0x8(%ebp),%eax 108a6f: 50 push %eax 108a70: 89 f9 mov %edi,%ecx 108a72: 89 f0 mov %esi,%eax 108a74: e8 cf fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a79: 83 c4 10 add $0x10,%esp 108a7c: 85 c0 test %eax,%eax 108a7e: 74 d9 je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 108a80: 8d 55 e4 lea -0x1c(%ebp),%edx 108a83: 89 f0 mov %esi,%eax 108a85: e8 e6 fc ff ff call 108770 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a8a: 85 c0 test %eax,%eax 108a8c: 74 cb je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 108a8e: 8d 55 e0 lea -0x20(%ebp),%edx 108a91: 89 f0 mov %esi,%eax 108a93: e8 d8 fc ff ff call 108770 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a98: 85 c0 test %eax,%eax 108a9a: 74 bd je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 108a9c: 83 ec 08 sub $0x8,%esp 108a9f: 8d 53 0c lea 0xc(%ebx),%edx 108aa2: 6a 00 push $0x0 108aa4: 8d 45 08 lea 0x8(%ebp),%eax 108aa7: 50 push %eax 108aa8: 89 f9 mov %edi,%ecx 108aaa: 89 f0 mov %esi,%eax 108aac: e8 97 fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108ab1: 83 c4 10 add $0x10,%esp 108ab4: 85 c0 test %eax,%eax 108ab6: 74 a1 je 108a59 <== 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) 108ab8: 83 ec 08 sub $0x8,%esp 108abb: 8d 53 10 lea 0x10(%ebx),%edx 108abe: 6a 00 push $0x0 108ac0: 8d 45 08 lea 0x8(%ebp),%eax 108ac3: 50 push %eax 108ac4: 89 f9 mov %edi,%ecx 108ac6: 89 f0 mov %esi,%eax 108ac8: e8 7b fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108acd: 83 c4 10 add $0x10,%esp 108ad0: 85 c0 test %eax,%eax 108ad2: 74 85 je 108a59 <== 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) 108ad4: 83 ec 08 sub $0x8,%esp 108ad7: 8d 53 14 lea 0x14(%ebx),%edx 108ada: 6a 00 push $0x0 108adc: 8d 45 08 lea 0x8(%ebp),%eax 108adf: 50 push %eax 108ae0: 89 f9 mov %edi,%ecx 108ae2: 89 f0 mov %esi,%eax 108ae4: e8 5f fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108ae9: 83 c4 10 add $0x10,%esp 108aec: 85 c0 test %eax,%eax 108aee: 0f 84 65 ff ff ff je 108a59 <== 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)) 108af4: 83 ec 08 sub $0x8,%esp 108af7: 8d 53 18 lea 0x18(%ebx),%edx 108afa: 6a 01 push $0x1 108afc: 8d 45 08 lea 0x8(%ebp),%eax 108aff: 50 push %eax 108b00: 89 f9 mov %edi,%ecx 108b02: 89 f0 mov %esi,%eax 108b04: e8 3f fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108b09: 83 c4 10 add $0x10,%esp 108b0c: 85 c0 test %eax,%eax 108b0e: 0f 84 45 ff ff ff je 108a59 <== 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; 108b14: 8b 45 e4 mov -0x1c(%ebp),%eax 108b17: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 108b1b: 8b 45 e0 mov -0x20(%ebp),%eax 108b1e: 66 89 43 0a mov %ax,0xa(%ebx) 108b22: b8 01 00 00 00 mov $0x1,%eax return 1; 108b27: e9 2f ff ff ff jmp 108a5b =============================================================================== 00108c68 : return NULL; return &grent; } void setgrent(void) { 108c68: 55 push %ebp <== NOT EXECUTED 108c69: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c6b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 108c6e: e8 f5 fe ff ff call 108b68 <== NOT EXECUTED if (group_fp != NULL) 108c73: a1 a4 91 12 00 mov 0x1291a4,%eax <== NOT EXECUTED 108c78: 85 c0 test %eax,%eax <== NOT EXECUTED 108c7a: 74 0c je 108c88 <== NOT EXECUTED fclose(group_fp); 108c7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108c7f: 50 push %eax <== NOT EXECUTED 108c80: e8 a3 bc 00 00 call 114928 <== NOT EXECUTED 108c85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 108c88: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108c8b: 68 03 17 12 00 push $0x121703 <== NOT EXECUTED 108c90: 68 b9 2b 12 00 push $0x122bb9 <== NOT EXECUTED 108c95: e8 f2 c2 00 00 call 114f8c <== NOT EXECUTED 108c9a: a3 a4 91 12 00 mov %eax,0x1291a4 <== NOT EXECUTED 108c9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108ca2: c9 leave <== NOT EXECUTED 108ca3: c3 ret <== NOT EXECUTED =============================================================================== 00108e34 : return NULL; return &pwent; } void setpwent(void) { 108e34: 55 push %ebp <== NOT EXECUTED 108e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e37: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 108e3a: e8 29 fd ff ff call 108b68 <== NOT EXECUTED if (passwd_fp != NULL) 108e3f: a1 a4 90 12 00 mov 0x1290a4,%eax <== NOT EXECUTED 108e44: 85 c0 test %eax,%eax <== NOT EXECUTED 108e46: 74 0c je 108e54 <== NOT EXECUTED fclose(passwd_fp); 108e48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e4b: 50 push %eax <== NOT EXECUTED 108e4c: e8 d7 ba 00 00 call 114928 <== NOT EXECUTED 108e51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 108e54: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108e57: 68 03 17 12 00 push $0x121703 <== NOT EXECUTED 108e5c: 68 ad 2b 12 00 push $0x122bad <== NOT EXECUTED 108e61: e8 26 c1 00 00 call 114f8c <== NOT EXECUTED 108e66: a3 a4 90 12 00 mov %eax,0x1290a4 <== NOT EXECUTED 108e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108e6e: c9 leave <== NOT EXECUTED 108e6f: c3 ret <== NOT EXECUTED =============================================================================== 0010a1a4 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 10a1a4: 55 push %ebp <== NOT EXECUTED 10a1a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a1a7: 56 push %esi <== NOT EXECUTED 10a1a8: 53 push %ebx <== NOT EXECUTED 10a1a9: 89 d3 mov %edx,%ebx <== NOT EXECUTED 10a1ab: 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)) { 10a1ad: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 10a1b4: 75 12 jne 10a1c8 <== 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); 10a1b6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a1b9: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 10a1bb: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a1be: 5b pop %ebx <== NOT EXECUTED 10a1bf: 5e pop %esi <== NOT EXECUTED 10a1c0: 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); 10a1c1: e9 a2 fe ff ff jmp 10a068 <== NOT EXECUTED 10a1c6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a1c8: 52 push %edx <== NOT EXECUTED 10a1c9: 6a 00 push $0x0 <== NOT EXECUTED 10a1cb: 6a 00 push $0x0 <== NOT EXECUTED 10a1cd: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 10a1d0: e8 d3 1a 00 00 call 10bca8 <== NOT EXECUTED i = iproc (c, tty); 10a1d5: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1d7: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 10a1da: 89 da mov %ebx,%edx <== NOT EXECUTED 10a1dc: e8 87 fe ff ff call 10a068 <== NOT EXECUTED 10a1e1: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 10a1e3: 58 pop %eax <== NOT EXECUTED 10a1e4: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 10a1e7: e8 b8 1b 00 00 call 10bda4 <== NOT EXECUTED 10a1ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 10a1ef: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1f1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a1f4: 5b pop %ebx <== NOT EXECUTED 10a1f5: 5e pop %esi <== NOT EXECUTED 10a1f6: c9 leave <== NOT EXECUTED 10a1f7: c3 ret <== NOT EXECUTED =============================================================================== 0010a5a0 : int _STAT_NAME( const char *path, struct stat *buf ) { 10a5a0: 55 push %ebp 10a5a1: 89 e5 mov %esp,%ebp 10a5a3: 57 push %edi 10a5a4: 56 push %esi 10a5a5: 53 push %ebx 10a5a6: 83 ec 2c sub $0x2c,%esp 10a5a9: 8b 55 08 mov 0x8(%ebp),%edx 10a5ac: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10a5af: 85 f6 test %esi,%esi 10a5b1: 0f 84 9d 00 00 00 je 10a654 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10a5b7: b9 ff ff ff ff mov $0xffffffff,%ecx 10a5bc: 89 d7 mov %edx,%edi 10a5be: 31 c0 xor %eax,%eax 10a5c0: f2 ae repnz scas %es:(%edi),%al 10a5c2: f7 d1 not %ecx 10a5c4: 49 dec %ecx 10a5c5: 83 ec 0c sub $0xc,%esp 10a5c8: 6a 01 push $0x1 10a5ca: 8d 5d d4 lea -0x2c(%ebp),%ebx 10a5cd: 53 push %ebx 10a5ce: 6a 00 push $0x0 10a5d0: 51 push %ecx 10a5d1: 52 push %edx 10a5d2: e8 4d e9 ff ff call 108f24 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10a5d7: 83 c4 20 add $0x20,%esp 10a5da: 85 c0 test %eax,%eax 10a5dc: 75 66 jne 10a644 return -1; if ( !loc.handlers->fstat_h ){ 10a5de: 8b 55 dc mov -0x24(%ebp),%edx 10a5e1: 8b 42 18 mov 0x18(%edx),%eax 10a5e4: 85 c0 test %eax,%eax 10a5e6: 74 39 je 10a621 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 10a5e8: b9 48 00 00 00 mov $0x48,%ecx 10a5ed: 89 f7 mov %esi,%edi 10a5ef: 31 c0 xor %eax,%eax 10a5f1: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10a5f3: 83 ec 08 sub $0x8,%esp 10a5f6: 56 push %esi 10a5f7: 53 push %ebx 10a5f8: ff 52 18 call *0x18(%edx) 10a5fb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10a5fd: 8b 45 e0 mov -0x20(%ebp),%eax 10a600: 83 c4 10 add $0x10,%esp 10a603: 85 c0 test %eax,%eax 10a605: 74 10 je 10a617 <== NEVER TAKEN 10a607: 8b 40 1c mov 0x1c(%eax),%eax 10a60a: 85 c0 test %eax,%eax 10a60c: 74 09 je 10a617 <== NEVER TAKEN 10a60e: 83 ec 0c sub $0xc,%esp 10a611: 53 push %ebx 10a612: ff d0 call *%eax 10a614: 83 c4 10 add $0x10,%esp return status; } 10a617: 89 f0 mov %esi,%eax 10a619: 8d 65 f4 lea -0xc(%ebp),%esp 10a61c: 5b pop %ebx 10a61d: 5e pop %esi 10a61e: 5f pop %edi 10a61f: c9 leave 10a620: c3 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 10a621: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a624: 85 c0 test %eax,%eax <== NOT EXECUTED 10a626: 74 10 je 10a638 <== NOT EXECUTED 10a628: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10a62b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a62d: 74 09 je 10a638 <== NOT EXECUTED 10a62f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a632: 53 push %ebx <== NOT EXECUTED 10a633: ff d0 call *%eax <== NOT EXECUTED 10a635: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a638: e8 5b a9 00 00 call 114f98 <__errno> <== NOT EXECUTED 10a63d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a643: 90 nop <== NOT EXECUTED 10a644: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a649: 89 f0 mov %esi,%eax 10a64b: 8d 65 f4 lea -0xc(%ebp),%esp 10a64e: 5b pop %ebx 10a64f: 5e pop %esi 10a650: 5f pop %edi 10a651: c9 leave 10a652: c3 ret 10a653: 90 nop /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 10a654: e8 3f a9 00 00 call 114f98 <__errno> 10a659: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a65f: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a664: 89 f0 mov %esi,%eax 10a666: 8d 65 f4 lea -0xc(%ebp),%esp 10a669: 5b pop %ebx 10a66a: 5e pop %esi 10a66b: 5f pop %edi 10a66c: c9 leave 10a66d: c3 ret =============================================================================== 0010a6b4 : int symlink( const char *actualpath, const char *sympath ) { 10a6b4: 55 push %ebp 10a6b5: 89 e5 mov %esp,%ebp 10a6b7: 56 push %esi 10a6b8: 53 push %ebx 10a6b9: 83 ec 24 sub $0x24,%esp 10a6bc: 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 ); 10a6bf: 8d 5d dc lea -0x24(%ebp),%ebx 10a6c2: 53 push %ebx 10a6c3: 8d 45 f4 lea -0xc(%ebp),%eax 10a6c6: 50 push %eax 10a6c7: 56 push %esi 10a6c8: e8 63 ff ff ff call 10a630 if ( !loc.ops->evalformake_h ) { 10a6cd: 8b 45 e8 mov -0x18(%ebp),%eax 10a6d0: 8b 40 04 mov 0x4(%eax),%eax 10a6d3: 83 c4 10 add $0x10,%esp 10a6d6: 85 c0 test %eax,%eax 10a6d8: 74 5e je 10a738 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 10a6da: 51 push %ecx 10a6db: 8d 55 f0 lea -0x10(%ebp),%edx 10a6de: 52 push %edx 10a6df: 53 push %ebx 10a6e0: 03 75 f4 add -0xc(%ebp),%esi 10a6e3: 56 push %esi 10a6e4: ff d0 call *%eax if ( result != 0 ) 10a6e6: 83 c4 10 add $0x10,%esp 10a6e9: 85 c0 test %eax,%eax 10a6eb: 75 56 jne 10a743 return -1; if ( !loc.ops->symlink_h ) { 10a6ed: 8b 55 e8 mov -0x18(%ebp),%edx 10a6f0: 8b 42 38 mov 0x38(%edx),%eax 10a6f3: 85 c0 test %eax,%eax 10a6f5: 74 2f je 10a726 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 10a6f7: 52 push %edx 10a6f8: ff 75 f0 pushl -0x10(%ebp) 10a6fb: ff 75 08 pushl 0x8(%ebp) 10a6fe: 53 push %ebx 10a6ff: ff d0 call *%eax 10a701: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10a703: 8b 45 e8 mov -0x18(%ebp),%eax 10a706: 83 c4 10 add $0x10,%esp 10a709: 85 c0 test %eax,%eax 10a70b: 74 10 je 10a71d <== NEVER TAKEN 10a70d: 8b 40 1c mov 0x1c(%eax),%eax 10a710: 85 c0 test %eax,%eax 10a712: 74 09 je 10a71d <== NEVER TAKEN 10a714: 83 ec 0c sub $0xc,%esp 10a717: 53 push %ebx 10a718: ff d0 call *%eax 10a71a: 83 c4 10 add $0x10,%esp return result; } 10a71d: 89 f0 mov %esi,%eax 10a71f: 8d 65 f8 lea -0x8(%ebp),%esp 10a722: 5b pop %ebx 10a723: 5e pop %esi 10a724: c9 leave 10a725: c3 ret result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 10a726: 8b 42 1c mov 0x1c(%edx),%eax 10a729: 85 c0 test %eax,%eax <== NOT EXECUTED 10a72b: 74 0b je 10a738 <== NOT EXECUTED 10a72d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a730: 53 push %ebx <== NOT EXECUTED 10a731: ff d0 call *%eax <== NOT EXECUTED 10a733: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a736: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a738: e8 1b a9 00 00 call 115058 <__errno> <== NOT EXECUTED 10a73d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a743: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 10a748: 89 f0 mov %esi,%eax 10a74a: 8d 65 f8 lea -0x8(%ebp),%esp 10a74d: 5b pop %ebx 10a74e: 5e pop %esi 10a74f: c9 leave 10a750: c3 ret =============================================================================== 0010a70c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a70c: 55 push %ebp 10a70d: 89 e5 mov %esp,%ebp 10a70f: 53 push %ebx 10a710: 83 ec 04 sub $0x4,%esp 10a713: 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; 10a716: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx if ( this_reent ) { 10a71c: 85 d2 test %edx,%edx 10a71e: 74 33 je 10a753 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 10a720: 8b 0d 18 94 12 00 mov 0x129418,%ecx 10a726: 8b 99 ec 00 00 00 mov 0xec(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a72c: 89 91 ec 00 00 00 mov %edx,0xec(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a732: 83 ec 08 sub $0x8,%esp 10a735: 68 80 a7 10 00 push $0x10a780 10a73a: ff b0 ec 00 00 00 pushl 0xec(%eax) 10a740: e8 67 b7 00 00 call 115eac <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a745: a1 18 94 12 00 mov 0x129418,%eax 10a74a: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 10a750: 83 c4 10 add $0x10,%esp } } 10a753: 8b 5d fc mov -0x4(%ebp),%ebx 10a756: c9 leave 10a757: c3 ret =============================================================================== 0010a6e0 : int tcsetattr( int fd, int opt, struct termios *tp ) { 10a6e0: 55 push %ebp 10a6e1: 89 e5 mov %esp,%ebp 10a6e3: 56 push %esi 10a6e4: 53 push %ebx 10a6e5: 8b 5d 08 mov 0x8(%ebp),%ebx 10a6e8: 8b 45 0c mov 0xc(%ebp),%eax 10a6eb: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10a6ee: 85 c0 test %eax,%eax 10a6f0: 74 2c je 10a71e <== ALWAYS TAKEN 10a6f2: 48 dec %eax 10a6f3: 74 17 je 10a70c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a6f5: e8 2a ac 00 00 call 115324 <__errno> <== NOT EXECUTED 10a6fa: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 10a700: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10a705: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a708: 5b pop %ebx <== NOT EXECUTED 10a709: 5e pop %esi <== NOT EXECUTED 10a70a: c9 leave <== NOT EXECUTED 10a70b: c3 ret <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 10a70c: 50 push %eax <== NOT EXECUTED 10a70d: 6a 00 push $0x0 <== NOT EXECUTED 10a70f: 6a 03 push $0x3 <== NOT EXECUTED 10a711: 53 push %ebx <== NOT EXECUTED 10a712: e8 29 7b 00 00 call 112240 <== NOT EXECUTED 10a717: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a71a: 85 c0 test %eax,%eax <== NOT EXECUTED 10a71c: 78 e2 js 10a700 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a71e: 89 75 10 mov %esi,0x10(%ebp) 10a721: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 10a728: 89 5d 08 mov %ebx,0x8(%ebp) } } 10a72b: 8d 65 f8 lea -0x8(%ebp),%esp 10a72e: 5b pop %ebx 10a72f: 5e pop %esi 10a730: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a731: e9 0a 7b 00 00 jmp 112240 =============================================================================== 00113738 : #include int unlink( const char *path ) { 113738: 55 push %ebp 113739: 89 e5 mov %esp,%ebp 11373b: 57 push %edi 11373c: 56 push %esi 11373d: 53 push %ebx 11373e: 83 ec 58 sub $0x58,%esp 113741: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 113744: 53 push %ebx 113745: e8 ae 4c ff ff call 1083f8 if ( parentpathlen == 0 ) 11374a: 83 c4 10 add $0x10,%esp 11374d: 85 c0 test %eax,%eax 11374f: 0f 85 eb 00 00 00 jne 113840 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 113755: 50 push %eax 113756: 8d 45 d0 lea -0x30(%ebp),%eax 113759: 89 45 b4 mov %eax,-0x4c(%ebp) 11375c: 50 push %eax 11375d: 8d 45 e4 lea -0x1c(%ebp),%eax 113760: 50 push %eax 113761: 53 push %ebx 113762: e8 69 5c ff ff call 1093d0 113767: 31 d2 xor %edx,%edx 113769: c6 45 b3 00 movb $0x0,-0x4d(%ebp) 11376d: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 113770: 8d 7d bc lea -0x44(%ebp),%edi 113773: b9 05 00 00 00 mov $0x5,%ecx 113778: 8b 75 b4 mov -0x4c(%ebp),%esi 11377b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 11377d: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 11377f: be ff ff ff ff mov $0xffffffff,%esi 113784: 89 f1 mov %esi,%ecx 113786: 89 df mov %ebx,%edi 113788: 31 c0 xor %eax,%eax 11378a: f2 ae repnz scas %es:(%edi),%al 11378c: f7 d1 not %ecx 11378e: 49 dec %ecx 11378f: 83 ec 08 sub $0x8,%esp 113792: 51 push %ecx 113793: 53 push %ebx 113794: e8 0f 4c ff ff call 1083a8 113799: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 11379b: 89 f1 mov %esi,%ecx 11379d: 89 df mov %ebx,%edi 11379f: 31 c0 xor %eax,%eax 1137a1: f2 ae repnz scas %es:(%edi),%al 1137a3: f7 d1 not %ecx 1137a5: 49 dec %ecx 1137a6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 1137ad: 8d 75 bc lea -0x44(%ebp),%esi 1137b0: 56 push %esi 1137b1: 6a 00 push $0x0 1137b3: 51 push %ecx 1137b4: 53 push %ebx 1137b5: e8 86 4c ff ff call 108440 0, &loc, false ); if ( result != 0 ) { 1137ba: 83 c4 20 add $0x20,%esp 1137bd: 85 c0 test %eax,%eax 1137bf: 0f 85 b3 00 00 00 jne 113878 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 1137c5: 8b 55 c8 mov -0x38(%ebp),%edx 1137c8: 8b 42 10 mov 0x10(%edx),%eax 1137cb: 85 c0 test %eax,%eax 1137cd: 0f 84 c9 00 00 00 je 11389c <== NEVER TAKEN 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 ) { 1137d3: 83 ec 0c sub $0xc,%esp 1137d6: 56 push %esi 1137d7: ff d0 call *%eax 1137d9: 83 c4 10 add $0x10,%esp 1137dc: 48 dec %eax 1137dd: 0f 84 fd 00 00 00 je 1138e0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 1137e3: 8b 55 c8 mov -0x38(%ebp),%edx 1137e6: 8b 42 0c mov 0xc(%edx),%eax 1137e9: 85 c0 test %eax,%eax 1137eb: 0f 84 ab 00 00 00 je 11389c <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 1137f1: 83 ec 08 sub $0x8,%esp 1137f4: 56 push %esi 1137f5: ff 75 b4 pushl -0x4c(%ebp) 1137f8: ff d0 call *%eax 1137fa: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 1137fc: 8b 45 c8 mov -0x38(%ebp),%eax 1137ff: 83 c4 10 add $0x10,%esp 113802: 85 c0 test %eax,%eax 113804: 74 10 je 113816 <== NEVER TAKEN 113806: 8b 40 1c mov 0x1c(%eax),%eax 113809: 85 c0 test %eax,%eax 11380b: 74 09 je 113816 <== NEVER TAKEN 11380d: 83 ec 0c sub $0xc,%esp 113810: 56 push %esi 113811: ff d0 call *%eax 113813: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 113816: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 11381a: 74 19 je 113835 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 11381c: 8b 45 dc mov -0x24(%ebp),%eax 11381f: 85 c0 test %eax,%eax 113821: 74 12 je 113835 <== NEVER TAKEN 113823: 8b 40 1c mov 0x1c(%eax),%eax 113826: 85 c0 test %eax,%eax 113828: 74 0b je 113835 <== NEVER TAKEN 11382a: 83 ec 0c sub $0xc,%esp 11382d: ff 75 b4 pushl -0x4c(%ebp) 113830: ff d0 call *%eax 113832: 83 c4 10 add $0x10,%esp return result; } 113835: 89 d8 mov %ebx,%eax 113837: 8d 65 f4 lea -0xc(%ebp),%esp 11383a: 5b pop %ebx 11383b: 5e pop %esi 11383c: 5f pop %edi 11383d: c9 leave 11383e: c3 ret 11383f: 90 nop parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 113840: 89 c2 mov %eax,%edx 113842: 83 ec 0c sub $0xc,%esp 113845: 6a 00 push $0x0 113847: 8d 45 d0 lea -0x30(%ebp),%eax 11384a: 89 45 b4 mov %eax,-0x4c(%ebp) 11384d: 50 push %eax 11384e: 6a 02 push $0x2 113850: 52 push %edx 113851: 53 push %ebx 113852: 89 55 ac mov %edx,-0x54(%ebp) 113855: e8 ba 4c ff ff call 108514 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 11385a: 83 c4 20 add $0x20,%esp 11385d: 85 c0 test %eax,%eax 11385f: 8b 55 ac mov -0x54(%ebp),%edx 113862: 75 0c jne 113870 <== NEVER TAKEN 113864: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 113868: e9 03 ff ff ff jmp 113770 11386d: 8d 76 00 lea 0x0(%esi),%esi result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 113870: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 113875: eb be jmp 113835 <== NOT EXECUTED 113877: 90 nop <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 113878: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 11387c: 74 f2 je 113870 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 11387e: 8b 45 dc mov -0x24(%ebp),%eax 113881: 85 c0 test %eax,%eax 113883: 74 eb je 113870 <== NEVER TAKEN 113885: 8b 40 1c mov 0x1c(%eax),%eax 113888: 85 c0 test %eax,%eax 11388a: 74 e4 je 113870 <== NEVER TAKEN 11388c: 83 ec 0c sub $0xc,%esp 11388f: ff 75 b4 pushl -0x4c(%ebp) 113892: ff d0 call *%eax 113894: 83 cb ff or $0xffffffff,%ebx 113897: 83 c4 10 add $0x10,%esp 11389a: eb 99 jmp 113835 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 11389c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 11389f: 85 c0 test %eax,%eax <== NOT EXECUTED 1138a1: 74 09 je 1138ac <== NOT EXECUTED 1138a3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1138a6: 56 push %esi <== NOT EXECUTED 1138a7: ff d0 call *%eax <== NOT EXECUTED 1138a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 1138ac: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 1138b0: 74 19 je 1138cb <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 1138b2: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1138b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1138b7: 74 12 je 1138cb <== NOT EXECUTED 1138b9: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1138bc: 85 c0 test %eax,%eax <== NOT EXECUTED 1138be: 74 0b je 1138cb <== NOT EXECUTED 1138c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1138c3: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 1138c6: ff d0 call *%eax <== NOT EXECUTED 1138c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1138cb: e8 4c 05 00 00 call 113e1c <__errno> <== NOT EXECUTED 1138d0: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1138d6: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 1138db: e9 55 ff ff ff jmp 113835 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 1138e0: 8b 45 c8 mov -0x38(%ebp),%eax 1138e3: 85 c0 test %eax,%eax 1138e5: 74 10 je 1138f7 <== NEVER TAKEN 1138e7: 8b 40 1c mov 0x1c(%eax),%eax 1138ea: 85 c0 test %eax,%eax 1138ec: 74 09 je 1138f7 <== NEVER TAKEN 1138ee: 83 ec 0c sub $0xc,%esp 1138f1: 56 push %esi 1138f2: ff d0 call *%eax 1138f4: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 1138f7: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1138fb: 74 19 je 113916 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 1138fd: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 113900: 85 c0 test %eax,%eax <== NOT EXECUTED 113902: 74 12 je 113916 <== NOT EXECUTED 113904: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 113907: 85 c0 test %eax,%eax <== NOT EXECUTED 113909: 74 0b je 113916 <== NOT EXECUTED 11390b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11390e: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 113911: ff d0 call *%eax <== NOT EXECUTED 113913: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 113916: e8 01 05 00 00 call 113e1c <__errno> 11391b: c7 00 15 00 00 00 movl $0x15,(%eax) 113921: bb ff ff ff ff mov $0xffffffff,%ebx 113926: e9 0a ff ff ff jmp 113835 =============================================================================== 0010e5d0 : */ int unmount( const char *path ) { 10e5d0: 55 push %ebp 10e5d1: 89 e5 mov %esp,%ebp 10e5d3: 57 push %edi 10e5d4: 56 push %esi 10e5d5: 53 push %ebx 10e5d6: 83 ec 38 sub $0x38,%esp 10e5d9: 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 ) ) 10e5dc: 31 c0 xor %eax,%eax 10e5de: b9 ff ff ff ff mov $0xffffffff,%ecx 10e5e3: 89 d7 mov %edx,%edi 10e5e5: f2 ae repnz scas %es:(%edi),%al 10e5e7: f7 d1 not %ecx 10e5e9: 49 dec %ecx 10e5ea: 6a 01 push $0x1 10e5ec: 8d 75 d4 lea -0x2c(%ebp),%esi 10e5ef: 56 push %esi 10e5f0: 6a 00 push $0x0 10e5f2: 51 push %ecx 10e5f3: 52 push %edx 10e5f4: e8 df c3 ff ff call 10a9d8 10e5f9: 83 c4 20 add $0x20,%esp 10e5fc: 85 c0 test %eax,%eax 10e5fe: 0f 85 8f 00 00 00 jne 10e693 return -1; mt_entry = loc.mt_entry; 10e604: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10e607: 8b 43 1c mov 0x1c(%ebx),%eax 10e60a: 3b 45 d4 cmp -0x2c(%ebp),%eax 10e60d: 0f 85 f9 00 00 00 jne 10e70c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10e613: 8b 45 e0 mov -0x20(%ebp),%eax 10e616: 85 c0 test %eax,%eax 10e618: 74 10 je 10e62a <== NEVER TAKEN 10e61a: 8b 40 1c mov 0x1c(%eax),%eax 10e61d: 85 c0 test %eax,%eax 10e61f: 74 09 je 10e62a <== NEVER TAKEN 10e621: 83 ec 0c sub $0xc,%esp 10e624: 56 push %esi 10e625: ff d0 call *%eax 10e627: 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; 10e62a: 8b 43 14 mov 0x14(%ebx),%eax 10e62d: 8b 70 28 mov 0x28(%eax),%esi 10e630: 85 f6 test %esi,%esi 10e632: 0f 84 3c 01 00 00 je 10e774 <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10e638: 8b 43 28 mov 0x28(%ebx),%eax 10e63b: 8b 48 2c mov 0x2c(%eax),%ecx 10e63e: 85 c9 test %ecx,%ecx 10e640: 0f 84 2e 01 00 00 je 10e774 <== NEVER TAKEN * 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 ) 10e646: a1 0c bc 12 00 mov 0x12bc0c,%eax 10e64b: 39 58 14 cmp %ebx,0x14(%eax) 10e64e: 0f 84 e8 00 00 00 je 10e73c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10e654: 83 ec 08 sub $0x8,%esp 10e657: ff 73 2c pushl 0x2c(%ebx) 10e65a: 68 bc e5 10 00 push $0x10e5bc 10e65f: e8 90 ce ff ff call 10b4f4 10e664: 83 c4 10 add $0x10,%esp 10e667: 84 c0 test %al,%al 10e669: 0f 85 cd 00 00 00 jne 10e73c * 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 ) 10e66f: 83 ec 0c sub $0xc,%esp 10e672: 53 push %ebx 10e673: e8 1c c6 ff ff call 10ac94 10e678: 83 c4 10 add $0x10,%esp 10e67b: 48 dec %eax 10e67c: 0f 84 ba 00 00 00 je 10e73c * 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 ) 10e682: 83 ec 0c sub $0xc,%esp 10e685: 8b 43 14 mov 0x14(%ebx),%eax 10e688: 53 push %ebx 10e689: ff 50 28 call *0x28(%eax) 10e68c: 83 c4 10 add $0x10,%esp 10e68f: 85 c0 test %eax,%eax 10e691: 74 0d je 10e6a0 <== ALWAYS TAKEN */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 10e693: b8 ff ff ff ff mov $0xffffffff,%eax } 10e698: 8d 65 f4 lea -0xc(%ebp),%esp 10e69b: 5b pop %ebx 10e69c: 5e pop %esi 10e69d: 5f pop %edi 10e69e: c9 leave 10e69f: c3 ret * 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){ 10e6a0: 83 ec 0c sub $0xc,%esp 10e6a3: 8b 43 28 mov 0x28(%ebx),%eax 10e6a6: 53 push %ebx 10e6a7: ff 50 2c call *0x2c(%eax) 10e6aa: 83 c4 10 add $0x10,%esp 10e6ad: 85 c0 test %eax,%eax 10e6af: 0f 85 9f 00 00 00 jne 10e754 <== NEVER TAKEN rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10e6b5: 52 push %edx 10e6b6: 6a 00 push $0x0 10e6b8: 6a 00 push $0x0 10e6ba: ff 35 e8 e6 12 00 pushl 0x12e6e8 10e6c0: e8 a3 0d 00 00 call 10f468 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10e6c5: 89 1c 24 mov %ebx,(%esp) 10e6c8: e8 47 16 00 00 call 10fd14 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10e6cd: 58 pop %eax 10e6ce: ff 35 e8 e6 12 00 pushl 0x12e6e8 10e6d4: e8 8b 0e 00 00 call 10f564 /* * 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 ); 10e6d9: 8b 43 14 mov 0x14(%ebx),%eax 10e6dc: 83 c4 10 add $0x10,%esp 10e6df: 85 c0 test %eax,%eax 10e6e1: 74 13 je 10e6f6 <== NEVER TAKEN 10e6e3: 8b 40 1c mov 0x1c(%eax),%eax 10e6e6: 85 c0 test %eax,%eax 10e6e8: 74 0c je 10e6f6 <== NEVER TAKEN 10e6ea: 83 ec 0c sub $0xc,%esp 10e6ed: 8d 53 08 lea 0x8(%ebx),%edx 10e6f0: 52 push %edx 10e6f1: ff d0 call *%eax 10e6f3: 83 c4 10 add $0x10,%esp free( mt_entry ); 10e6f6: 83 ec 0c sub $0xc,%esp 10e6f9: 53 push %ebx 10e6fa: e8 49 c3 ff ff call 10aa48 10e6ff: 31 c0 xor %eax,%eax return 0; 10e701: 83 c4 10 add $0x10,%esp } 10e704: 8d 65 f4 lea -0xc(%ebp),%esp 10e707: 5b pop %ebx 10e708: 5e pop %esi 10e709: 5f pop %edi 10e70a: c9 leave 10e70b: c3 ret /* * 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 ); 10e70c: 8b 45 e0 mov -0x20(%ebp),%eax 10e70f: 85 c0 test %eax,%eax 10e711: 74 10 je 10e723 <== NEVER TAKEN 10e713: 8b 40 1c mov 0x1c(%eax),%eax 10e716: 85 c0 test %eax,%eax 10e718: 74 09 je 10e723 <== NEVER TAKEN 10e71a: 83 ec 0c sub $0xc,%esp 10e71d: 56 push %esi 10e71e: ff d0 call *%eax 10e720: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10e723: e8 b4 87 00 00 call 116edc <__errno> 10e728: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e72e: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10e733: 8d 65 f4 lea -0xc(%ebp),%esp 10e736: 5b pop %ebx 10e737: 5e pop %esi 10e738: 5f pop %edi 10e739: c9 leave 10e73a: c3 ret 10e73b: 90 nop * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 10e73c: e8 9b 87 00 00 call 116edc <__errno> 10e741: c7 00 10 00 00 00 movl $0x10,(%eax) 10e747: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10e74c: 8d 65 f4 lea -0xc(%ebp),%esp 10e74f: 5b pop %ebx 10e750: 5e pop %esi 10e751: 5f pop %edi 10e752: c9 leave 10e753: c3 ret * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10e754: 83 ec 0c sub $0xc,%esp 10e757: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10e75a: 53 push %ebx <== NOT EXECUTED 10e75b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10e75e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e761: 85 c0 test %eax,%eax <== NOT EXECUTED 10e763: 0f 84 2a ff ff ff je 10e693 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10e769: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e76c: 6a 00 push $0x0 <== NOT EXECUTED 10e76e: e8 e9 12 00 00 call 10fa5c <== NOT EXECUTED 10e773: 90 nop <== NOT EXECUTED 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 ); 10e774: e8 63 87 00 00 call 116edc <__errno> <== NOT EXECUTED 10e779: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e77f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10e784: e9 0f ff ff ff jmp 10e698 <== NOT EXECUTED =============================================================================== 0010c554 : int utime( const char *path, const struct utimbuf *times ) { 10c554: 55 push %ebp 10c555: 89 e5 mov %esp,%ebp 10c557: 57 push %edi 10c558: 56 push %esi 10c559: 53 push %ebx 10c55a: 83 ec 38 sub $0x38,%esp 10c55d: 8b 55 08 mov 0x8(%ebp),%edx 10c560: 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 ) ) 10c563: 31 c0 xor %eax,%eax 10c565: b9 ff ff ff ff mov $0xffffffff,%ecx 10c56a: 89 d7 mov %edx,%edi 10c56c: f2 ae repnz scas %es:(%edi),%al 10c56e: f7 d1 not %ecx 10c570: 49 dec %ecx 10c571: 6a 01 push $0x1 10c573: 8d 75 d4 lea -0x2c(%ebp),%esi 10c576: 56 push %esi 10c577: 6a 00 push $0x0 10c579: 51 push %ecx 10c57a: 52 push %edx 10c57b: e8 a4 c9 ff ff call 108f24 10c580: 83 c4 20 add $0x20,%esp 10c583: 85 c0 test %eax,%eax 10c585: 75 55 jne 10c5dc return -1; if ( !temp_loc.ops->utime_h ){ 10c587: 8b 55 e0 mov -0x20(%ebp),%edx 10c58a: 8b 42 30 mov 0x30(%edx),%eax 10c58d: 85 c0 test %eax,%eax 10c58f: 74 2f je 10c5c0 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10c591: 52 push %edx 10c592: ff 73 04 pushl 0x4(%ebx) 10c595: ff 33 pushl (%ebx) 10c597: 56 push %esi 10c598: ff d0 call *%eax 10c59a: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 10c59c: 8b 45 e0 mov -0x20(%ebp),%eax 10c59f: 83 c4 10 add $0x10,%esp 10c5a2: 85 c0 test %eax,%eax 10c5a4: 74 10 je 10c5b6 <== NEVER TAKEN 10c5a6: 8b 40 1c mov 0x1c(%eax),%eax 10c5a9: 85 c0 test %eax,%eax 10c5ab: 74 09 je 10c5b6 <== NEVER TAKEN 10c5ad: 83 ec 0c sub $0xc,%esp 10c5b0: 56 push %esi 10c5b1: ff d0 call *%eax 10c5b3: 83 c4 10 add $0x10,%esp return result; } 10c5b6: 89 d8 mov %ebx,%eax 10c5b8: 8d 65 f4 lea -0xc(%ebp),%esp 10c5bb: 5b pop %ebx 10c5bc: 5e pop %esi 10c5bd: 5f pop %edi 10c5be: c9 leave 10c5bf: c3 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 10c5c0: 8b 42 1c mov 0x1c(%edx),%eax 10c5c3: 85 c0 test %eax,%eax 10c5c5: 74 09 je 10c5d0 10c5c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c5ca: 56 push %esi <== NOT EXECUTED 10c5cb: ff d0 call *%eax <== NOT EXECUTED 10c5cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c5d0: e8 c3 89 00 00 call 114f98 <__errno> <== NOT EXECUTED 10c5d5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c5db: 90 nop <== NOT EXECUTED 10c5dc: bb ff ff ff ff mov $0xffffffff,%ebx result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 10c5e1: 89 d8 mov %ebx,%eax 10c5e3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5e6: 5b pop %ebx 10c5e7: 5e pop %esi 10c5e8: 5f pop %edi 10c5e9: c9 leave 10c5ea: c3 ret =============================================================================== 0010b1ec : */ void vprintk( const char *fmt, va_list ap ) { 10b1ec: 55 push %ebp 10b1ed: 89 e5 mov %esp,%ebp 10b1ef: 57 push %edi 10b1f0: 56 push %esi 10b1f1: 53 push %ebx 10b1f2: 83 ec 4c sub $0x4c,%esp 10b1f5: 8b 75 08 mov 0x8(%ebp),%esi 10b1f8: 8b 7d 0c mov 0xc(%ebp),%edi for (; *fmt != '\0'; fmt++) { 10b1fb: 8a 06 mov (%esi),%al 10b1fd: 84 c0 test %al,%al 10b1ff: 75 28 jne 10b229 <== ALWAYS TAKEN 10b201: e9 d1 01 00 00 jmp 10b3d7 <== NOT EXECUTED 10b206: 66 90 xchg %ax,%ax <== NOT EXECUTED bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 10b208: 83 ec 0c sub $0xc,%esp 10b20b: 0f be c0 movsbl %al,%eax 10b20e: 50 push %eax 10b20f: ff 15 84 32 12 00 call *0x123284 10b215: 89 7d bc mov %edi,-0x44(%ebp) continue; 10b218: 83 c4 10 add $0x10,%esp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10b21b: 46 inc %esi 10b21c: 8a 06 mov (%esi),%al 10b21e: 84 c0 test %al,%al 10b220: 0f 84 b1 01 00 00 je 10b3d7 10b226: 8b 7d bc mov -0x44(%ebp),%edi bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10b229: 3c 25 cmp $0x25,%al 10b22b: 75 db jne 10b208 BSP_output_char(*fmt); continue; } fmt++; 10b22d: 46 inc %esi if (*fmt == '0' ) { 10b22e: 8a 0e mov (%esi),%cl 10b230: 80 f9 30 cmp $0x30,%cl 10b233: 0f 84 b7 01 00 00 je 10b3f0 10b239: b2 20 mov $0x20,%dl lead = '0'; fmt++; } if (*fmt == '-' ) { 10b23b: 80 f9 2d cmp $0x2d,%cl 10b23e: 0f 84 ba 01 00 00 je 10b3fe 10b244: c6 45 c4 00 movb $0x0,-0x3c(%ebp) minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10b248: 8d 41 d0 lea -0x30(%ecx),%eax 10b24b: 3c 09 cmp $0x9,%al 10b24d: 0f 87 bd 01 00 00 ja 10b410 10b253: 31 db xor %ebx,%ebx 10b255: 8d 76 00 lea 0x0(%esi),%esi width *= 10; width += ((unsigned) *fmt - '0'); 10b258: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b25b: 0f be c9 movsbl %cl,%ecx 10b25e: 8d 5c 41 d0 lea -0x30(%ecx,%eax,2),%ebx fmt++; 10b262: 46 inc %esi } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10b263: 8a 0e mov (%esi),%cl 10b265: 8d 41 d0 lea -0x30(%ecx),%eax 10b268: 3c 09 cmp $0x9,%al 10b26a: 76 ec jbe 10b258 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10b26c: 80 f9 6c cmp $0x6c,%cl 10b26f: 0f 84 a7 01 00 00 je 10b41c lflag = true; c = *++fmt; } if ( c == 'c' ) { 10b275: 80 f9 63 cmp $0x63,%cl 10b278: 0f 84 aa 01 00 00 je 10b428 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 10b27e: 80 f9 73 cmp $0x73,%cl 10b281: 0f 84 bd 01 00 00 je 10b444 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10b287: 80 f9 6f cmp $0x6f,%cl 10b28a: 0f 84 50 01 00 00 je 10b3e0 <== NEVER TAKEN 10b290: 80 f9 4f cmp $0x4f,%cl 10b293: 0f 84 47 01 00 00 je 10b3e0 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 10b299: 80 f9 69 cmp $0x69,%cl 10b29c: 74 56 je 10b2f4 10b29e: 80 f9 49 cmp $0x49,%cl 10b2a1: 74 51 je 10b2f4 10b2a3: 80 f9 64 cmp $0x64,%cl 10b2a6: 74 4c je 10b2f4 10b2a8: 80 f9 44 cmp $0x44,%cl 10b2ab: 74 47 je 10b2f4 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 10b2ad: 80 f9 75 cmp $0x75,%cl 10b2b0: 0f 84 62 02 00 00 je 10b518 10b2b6: 80 f9 55 cmp $0x55,%cl 10b2b9: 0f 84 59 02 00 00 je 10b518 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 10b2bf: 80 f9 78 cmp $0x78,%cl 10b2c2: 0f 84 97 02 00 00 je 10b55f 10b2c8: 80 f9 58 cmp $0x58,%cl 10b2cb: 0f 84 8e 02 00 00 je 10b55f base = 16; sign = false; } else if ( c == 'p' ) { 10b2d1: 80 f9 70 cmp $0x70,%cl 10b2d4: 0f 84 a8 02 00 00 je 10b582 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 10b2da: 83 ec 0c sub $0xc,%esp 10b2dd: 0f be c9 movsbl %cl,%ecx 10b2e0: 51 push %ecx 10b2e1: ff 15 84 32 12 00 call *0x123284 10b2e7: 89 7d bc mov %edi,-0x44(%ebp) continue; 10b2ea: 83 c4 10 add $0x10,%esp 10b2ed: e9 29 ff ff ff jmp 10b21b 10b2f2: 66 90 xchg %ax,%ax 10b2f4: b1 01 mov $0x1,%cl 10b2f6: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) } printNum( 10b2fd: 0f be d2 movsbl %dl,%edx 10b300: 89 55 b4 mov %edx,-0x4c(%ebp) lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 10b303: 8d 47 04 lea 0x4(%edi),%eax 10b306: 89 45 bc mov %eax,-0x44(%ebp) } else { BSP_output_char(c); continue; } printNum( 10b309: 8b 3f mov (%edi),%edi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 10b30b: 84 c9 test %cl,%cl 10b30d: 74 08 je 10b317 10b30f: 85 ff test %edi,%edi 10b311: 0f 88 0f 02 00 00 js 10b526 BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; 10b317: 89 7d c0 mov %edi,-0x40(%ebp) } count = 0; while ((n = unsigned_num / base) > 0) { 10b31a: 8b 45 c0 mov -0x40(%ebp),%eax 10b31d: 31 d2 xor %edx,%edx 10b31f: f7 75 b8 divl -0x48(%ebp) 10b322: 89 c1 mov %eax,%ecx 10b324: 85 c0 test %eax,%eax 10b326: 0f 84 25 02 00 00 je 10b551 10b32c: 8a 45 b8 mov -0x48(%ebp),%al 10b32f: 88 45 c4 mov %al,-0x3c(%ebp) 10b332: 31 ff xor %edi,%edi 10b334: 89 5d b0 mov %ebx,-0x50(%ebp) 10b337: 8b 55 c0 mov -0x40(%ebp),%edx 10b33a: 8b 5d b8 mov -0x48(%ebp),%ebx 10b33d: eb 05 jmp 10b344 10b33f: 90 nop 10b340: 89 ca mov %ecx,%edx 10b342: 89 c1 mov %eax,%ecx toPrint[count++] = (char) (unsigned_num - (n * base)); 10b344: 8a 45 c4 mov -0x3c(%ebp),%al 10b347: f6 e1 mul %cl 10b349: 28 c2 sub %al,%dl 10b34b: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1) 10b34f: 47 inc %edi } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10b350: 89 c8 mov %ecx,%eax 10b352: 31 d2 xor %edx,%edx 10b354: f7 f3 div %ebx 10b356: 85 c0 test %eax,%eax 10b358: 75 e6 jne 10b340 10b35a: 8b 5d b0 mov -0x50(%ebp),%ebx 10b35d: 8d 47 01 lea 0x1(%edi),%eax 10b360: 89 45 c4 mov %eax,-0x3c(%ebp) 10b363: 89 4d c0 mov %ecx,-0x40(%ebp) toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10b366: 8a 45 c0 mov -0x40(%ebp),%al 10b369: 88 44 3d d4 mov %al,-0x2c(%ebp,%edi,1) for (n=maxwidth ; n > count; n-- ) 10b36d: 3b 5d c4 cmp -0x3c(%ebp),%ebx 10b370: 76 1f jbe 10b391 10b372: 8b 7d c4 mov -0x3c(%ebp),%edi 10b375: 89 75 c0 mov %esi,-0x40(%ebp) 10b378: 8b 75 b4 mov -0x4c(%ebp),%esi 10b37b: 90 nop BSP_output_char(lead); 10b37c: 83 ec 0c sub $0xc,%esp 10b37f: 56 push %esi 10b380: ff 15 84 32 12 00 call *0x123284 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 10b386: 4b dec %ebx 10b387: 83 c4 10 add $0x10,%esp 10b38a: 39 fb cmp %edi,%ebx 10b38c: 77 ee ja 10b37c 10b38e: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(lead); for (n = 0; n < count; n++) { 10b391: 8b 45 c4 mov -0x3c(%ebp),%eax 10b394: 85 c0 test %eax,%eax 10b396: 0f 84 7f fe ff ff je 10b21b <== NEVER TAKEN 10b39c: 8b 45 c4 mov -0x3c(%ebp),%eax 10b39f: 8d 7c 05 d3 lea -0x2d(%ebp,%eax,1),%edi 10b3a3: 31 db xor %ebx,%ebx 10b3a5: 89 75 c0 mov %esi,-0x40(%ebp) 10b3a8: 89 c6 mov %eax,%esi 10b3aa: 66 90 xchg %ax,%ax BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 10b3ac: 83 ec 0c sub $0xc,%esp 10b3af: 0f be 07 movsbl (%edi),%eax 10b3b2: 0f be 80 56 17 12 00 movsbl 0x121756(%eax),%eax 10b3b9: 50 push %eax 10b3ba: ff 15 84 32 12 00 call *0x123284 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 10b3c0: 43 inc %ebx 10b3c1: 4f dec %edi 10b3c2: 83 c4 10 add $0x10,%esp 10b3c5: 39 f3 cmp %esi,%ebx 10b3c7: 72 e3 jb 10b3ac 10b3c9: 8b 75 c0 mov -0x40(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10b3cc: 46 inc %esi 10b3cd: 8a 06 mov (%esi),%al 10b3cf: 84 c0 test %al,%al 10b3d1: 0f 85 4f fe ff ff jne 10b226 <== ALWAYS TAKEN sign, width, lead ); } } 10b3d7: 8d 65 f4 lea -0xc(%ebp),%esp 10b3da: 5b pop %ebx 10b3db: 5e pop %esi 10b3dc: 5f pop %edi 10b3dd: c9 leave 10b3de: c3 ret 10b3df: 90 nop base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b3e0: 31 c9 xor %ecx,%ecx 10b3e2: c7 45 b8 08 00 00 00 movl $0x8,-0x48(%ebp) 10b3e9: e9 0f ff ff ff jmp 10b2fd 10b3ee: 66 90 xchg %ax,%ax continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 10b3f0: 46 inc %esi 10b3f1: 8a 0e mov (%esi),%cl 10b3f3: b2 30 mov $0x30,%dl } if (*fmt == '-' ) { 10b3f5: 80 f9 2d cmp $0x2d,%cl 10b3f8: 0f 85 46 fe ff ff jne 10b244 <== ALWAYS TAKEN minus = true; fmt++; 10b3fe: 46 inc %esi 10b3ff: 8a 0e mov (%esi),%cl 10b401: c6 45 c4 01 movb $0x1,-0x3c(%ebp) } while (*fmt >= '0' && *fmt <= '9' ) { 10b405: 8d 41 d0 lea -0x30(%ecx),%eax 10b408: 3c 09 cmp $0x9,%al 10b40a: 0f 86 43 fe ff ff jbe 10b253 <== ALWAYS TAKEN 10b410: 31 db xor %ebx,%ebx width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10b412: 80 f9 6c cmp $0x6c,%cl 10b415: 0f 85 5a fe ff ff jne 10b275 10b41b: 90 nop lflag = true; c = *++fmt; 10b41c: 46 inc %esi 10b41d: 8a 0e mov (%esi),%cl } if ( c == 'c' ) { 10b41f: 80 f9 63 cmp $0x63,%cl 10b422: 0f 85 56 fe ff ff jne 10b27e <== ALWAYS TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 10b428: 8d 47 04 lea 0x4(%edi),%eax 10b42b: 89 45 bc mov %eax,-0x44(%ebp) BSP_output_char(chr); 10b42e: 83 ec 0c sub $0xc,%esp 10b431: 0f be 07 movsbl (%edi),%eax 10b434: 50 push %eax 10b435: ff 15 84 32 12 00 call *0x123284 continue; 10b43b: 83 c4 10 add $0x10,%esp 10b43e: e9 d8 fd ff ff jmp 10b21b 10b443: 90 nop } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 10b444: 8d 47 04 lea 0x4(%edi),%eax 10b447: 89 45 bc mov %eax,-0x44(%ebp) 10b44a: 8b 07 mov (%edi),%eax if ( str == NULL ) { 10b44c: 85 c0 test %eax,%eax 10b44e: 0f 84 19 01 00 00 je 10b56d str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10b454: 80 38 00 cmpb $0x0,(%eax) 10b457: 0f 84 1e 01 00 00 je 10b57b 10b45d: 31 ff xor %edi,%edi 10b45f: 90 nop 10b460: 47 inc %edi 10b461: 80 3c 38 00 cmpb $0x0,(%eax,%edi,1) 10b465: 75 f9 jne 10b460 ; /* leading spaces */ if ( !minus ) 10b467: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10b46b: 75 30 jne 10b49d for ( i=len ; i 10b471: 89 fa mov %edi,%edx 10b473: 89 7d c0 mov %edi,-0x40(%ebp) 10b476: 89 c7 mov %eax,%edi 10b478: 89 75 b8 mov %esi,-0x48(%ebp) 10b47b: 89 de mov %ebx,%esi 10b47d: 89 d3 mov %edx,%ebx 10b47f: 90 nop BSP_output_char(' '); 10b480: 83 ec 0c sub $0xc,%esp 10b483: 6a 20 push $0x20 10b485: ff 15 84 32 12 00 call *0x123284 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 10b493: 89 f3 mov %esi,%ebx 10b495: 89 f8 mov %edi,%eax 10b497: 8b 7d c0 mov -0x40(%ebp),%edi 10b49a: 8b 75 b8 mov -0x48(%ebp),%esi BSP_output_char(' '); /* no width option */ if (width == 0) { 10b49d: 85 db test %ebx,%ebx 10b49f: 75 06 jne 10b4a7 width = len; } /* output the string */ for ( i=0 ; i 10b4a5: 89 fb mov %edi,%ebx 10b4a7: 8a 10 mov (%eax),%dl 10b4a9: 84 d2 test %dl,%dl 10b4ab: 74 3f je 10b4ec <== NEVER TAKEN BSP_output_char(*str); 10b4ad: 83 ec 0c sub $0xc,%esp 10b4b0: 0f be d2 movsbl %dl,%edx 10b4b3: 52 push %edx 10b4b4: 89 45 ac mov %eax,-0x54(%ebp) 10b4b7: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10b4cd: 8d 76 00 lea 0x0(%esi),%esi BSP_output_char(*str); 10b4d0: 83 ec 0c sub $0xc,%esp 10b4d3: 0f be d2 movsbl %dl,%edx 10b4d6: 52 push %edx 10b4d7: ff 15 84 32 12 00 call *0x123284 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10b4e7: 89 f3 mov %esi,%ebx 10b4e9: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10b4ec: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10b4f0: 0f 84 25 fd ff ff je 10b21b for ( i=len ; i 10b4fe: 66 90 xchg %ax,%ax BSP_output_char(' '); 10b500: 83 ec 0c sub $0xc,%esp 10b503: 6a 20 push $0x20 10b505: ff 15 84 32 12 00 call *0x123284 for ( i=0 ; i 10b513: e9 03 fd ff ff jmp 10b21b base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b518: 31 c9 xor %ecx,%ecx 10b51a: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) 10b521: e9 d7 fd ff ff jmp 10b2fd unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 10b526: 83 ec 0c sub $0xc,%esp 10b529: 6a 2d push $0x2d 10b52b: ff 15 84 32 12 00 call *0x123284 unsigned_num = (unsigned long) -num; 10b531: f7 df neg %edi 10b533: 89 7d c0 mov %edi,-0x40(%ebp) if (maxwidth) maxwidth--; 10b536: 83 c4 10 add $0x10,%esp 10b539: 83 fb 01 cmp $0x1,%ebx 10b53c: 83 d3 ff adc $0xffffffff,%ebx } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10b53f: 8b 45 c0 mov -0x40(%ebp),%eax 10b542: 31 d2 xor %edx,%edx 10b544: f7 75 b8 divl -0x48(%ebp) 10b547: 89 c1 mov %eax,%ecx 10b549: 85 c0 test %eax,%eax 10b54b: 0f 85 db fd ff ff jne 10b32c <== ALWAYS TAKEN 10b551: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 10b558: 31 ff xor %edi,%edi 10b55a: e9 07 fe ff ff jmp 10b366 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b55f: 31 c9 xor %ecx,%ecx 10b561: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10b568: e9 90 fd ff ff jmp 10b2fd unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 10b56d: b8 55 17 12 00 mov $0x121755,%eax str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10b572: 80 38 00 cmpb $0x0,(%eax) 10b575: 0f 85 e2 fe ff ff jne 10b45d <== NEVER TAKEN 10b57b: 31 ff xor %edi,%edi 10b57d: e9 e5 fe ff ff jmp 10b467 } else { BSP_output_char(c); continue; } printNum( 10b582: 0f be d2 movsbl %dl,%edx 10b585: 89 55 b4 mov %edx,-0x4c(%ebp) 10b588: 31 c9 xor %ecx,%ecx 10b58a: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10b591: e9 6d fd ff ff jmp 10b303 =============================================================================== 0011f804 : ssize_t write( int fd, const void *buffer, size_t count ) { 11f804: 55 push %ebp 11f805: 89 e5 mov %esp,%ebp 11f807: 53 push %ebx 11f808: 83 ec 04 sub $0x4,%esp 11f80b: 8b 5d 08 mov 0x8(%ebp),%ebx 11f80e: 8b 45 0c mov 0xc(%ebp),%eax 11f811: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11f814: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx 11f81a: 73 50 jae 11f86c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11f81c: c1 e3 06 shl $0x6,%ebx 11f81f: 03 1d e0 71 12 00 add 0x1271e0,%ebx rtems_libio_check_is_open( iop ); 11f825: 8b 4b 14 mov 0x14(%ebx),%ecx 11f828: f6 c5 01 test $0x1,%ch 11f82b: 74 3f je 11f86c <== NEVER TAKEN rtems_libio_check_buffer( buffer ); 11f82d: 85 c0 test %eax,%eax 11f82f: 74 4f je 11f880 <== NEVER TAKEN rtems_libio_check_count( count ); 11f831: 85 d2 test %edx,%edx 11f833: 74 2f je 11f864 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11f835: 83 e1 04 and $0x4,%ecx 11f838: 74 46 je 11f880 <== NEVER TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 11f83a: 8b 4b 3c mov 0x3c(%ebx),%ecx 11f83d: 8b 49 0c mov 0xc(%ecx),%ecx 11f840: 85 c9 test %ecx,%ecx 11f842: 74 4e je 11f892 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 11f844: 83 ec 04 sub $0x4,%esp 11f847: 52 push %edx 11f848: 50 push %eax 11f849: 53 push %ebx 11f84a: ff d1 call *%ecx if ( rc > 0 ) 11f84c: 83 c4 10 add $0x10,%esp 11f84f: 85 c0 test %eax,%eax 11f851: 7e 0b jle 11f85e <== NEVER TAKEN iop->offset += rc; 11f853: 89 c1 mov %eax,%ecx 11f855: c1 f9 1f sar $0x1f,%ecx 11f858: 01 43 0c add %eax,0xc(%ebx) 11f85b: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11f85e: 8b 5d fc mov -0x4(%ebp),%ebx 11f861: c9 leave 11f862: c3 ret 11f863: 90 nop rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 11f864: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11f866: 8b 5d fc mov -0x4(%ebp),%ebx 11f869: c9 leave 11f86a: c3 ret 11f86b: 90 nop ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11f86c: e8 ab 45 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f871: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11f877: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f87c: eb e0 jmp 11f85e <== NOT EXECUTED 11f87e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 11f880: e8 97 45 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f885: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11f88b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f890: eb cc jmp 11f85e <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 11f892: e8 85 45 ff ff call 113e1c <__errno> <== NOT EXECUTED 11f897: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11f89d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11f8a2: eb ba jmp 11f85e <== NOT EXECUTED =============================================================================== 0010c398 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10c398: 55 push %ebp 10c399: 89 e5 mov %esp,%ebp 10c39b: 57 push %edi 10c39c: 56 push %esi 10c39d: 53 push %ebx 10c39e: 83 ec 3c sub $0x3c,%esp 10c3a1: 8b 45 08 mov 0x8(%ebp),%eax 10c3a4: 8b 5d 0c mov 0xc(%ebp),%ebx 10c3a7: 8b 7d 10 mov 0x10(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10c3aa: 3b 05 8c 61 12 00 cmp 0x12618c,%eax 10c3b0: 0f 83 f2 00 00 00 jae 10c4a8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10c3b6: c1 e0 06 shl $0x6,%eax 10c3b9: 8b 15 20 aa 12 00 mov 0x12aa20,%edx 10c3bf: 01 d0 add %edx,%eax 10c3c1: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_libio_check_is_open( iop ); 10c3c4: 8b 40 14 mov 0x14(%eax),%eax 10c3c7: f6 c4 01 test $0x1,%ah 10c3ca: 0f 84 d8 00 00 00 je 10c4a8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10c3d0: a8 04 test $0x4,%al 10c3d2: 74 7c je 10c450 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10c3d4: 85 db test %ebx,%ebx 10c3d6: 74 78 je 10c450 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10c3d8: 85 ff test %edi,%edi 10c3da: 7e 74 jle 10c450 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10c3dc: 81 ff 00 04 00 00 cmp $0x400,%edi 10c3e2: 7f 6c jg 10c450 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10c3e4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c3e7: 8b 42 3c mov 0x3c(%edx),%eax 10c3ea: 8b 48 0c mov 0xc(%eax),%ecx 10c3ed: 85 c9 test %ecx,%ecx 10c3ef: 0f 84 c5 00 00 00 je 10c4ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c3f5: be 01 00 00 00 mov $0x1,%esi 10c3fa: 31 c0 xor %eax,%eax 10c3fc: 31 c9 xor %ecx,%ecx 10c3fe: eb 02 jmp 10c402 * 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++ ) { 10c400: 89 d1 mov %edx,%ecx if ( !iov[v].iov_base ) 10c402: 8b 14 c3 mov (%ebx,%eax,8),%edx 10c405: 85 d2 test %edx,%edx 10c407: 74 47 je 10c450 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 ) 10c409: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx 10c40d: 85 d2 test %edx,%edx 10c40f: 74 02 je 10c413 <== NEVER TAKEN 10c411: 31 f6 xor %esi,%esi all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10c413: 8d 14 11 lea (%ecx,%edx,1),%edx if ( total < old || total > SSIZE_MAX ) 10c416: 39 d1 cmp %edx,%ecx 10c418: 7f 36 jg 10c450 10c41a: 81 fa ff 7f 00 00 cmp $0x7fff,%edx 10c420: 7f 2e jg 10c450 <== NEVER TAKEN * 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++ ) { 10c422: 40 inc %eax 10c423: 39 c7 cmp %eax,%edi 10c425: 7f d9 jg 10c400 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c427: 89 f1 mov %esi,%ecx 10c429: 84 c9 test %cl,%cl 10c42b: 75 3d jne 10c46a <== NEVER TAKEN 10c42d: 31 f6 xor %esi,%esi 10c42f: 31 d2 xor %edx,%edx 10c431: 89 55 c0 mov %edx,-0x40(%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 ) 10c434: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax 10c438: 85 c0 test %eax,%eax 10c43a: 75 32 jne 10c46e <== ALWAYS TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10c43c: 46 inc %esi 10c43d: 39 f7 cmp %esi,%edi 10c43f: 7f f3 jg 10c434 10c441: 8b 55 c0 mov -0x40(%ebp),%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c444: 89 d0 mov %edx,%eax 10c446: 8d 65 f4 lea -0xc(%ebp),%esp 10c449: 5b pop %ebx 10c44a: 5e pop %esi 10c44b: 5f pop %edi 10c44c: c9 leave 10c44d: c3 ret 10c44e: 66 90 xchg %ax,%ax /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c450: e8 bf 86 00 00 call 114b14 <__errno> 10c455: c7 00 16 00 00 00 movl $0x16,(%eax) 10c45b: ba ff ff ff ff mov $0xffffffff,%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c460: 89 d0 mov %edx,%eax 10c462: 8d 65 f4 lea -0xc(%ebp),%esp 10c465: 5b pop %ebx 10c466: 5e pop %esi 10c467: 5f pop %edi 10c468: c9 leave 10c469: c3 ret } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c46a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c46c: eb f2 jmp 10c460 <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10c46e: 52 push %edx 10c46f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c472: 8b 51 3c mov 0x3c(%ecx),%edx 10c475: 50 push %eax 10c476: ff 34 f3 pushl (%ebx,%esi,8) 10c479: 51 push %ecx 10c47a: ff 52 0c call *0xc(%edx) 10c47d: 89 45 c4 mov %eax,-0x3c(%ebp) if ( bytes < 0 ) 10c480: 83 c4 10 add $0x10,%esp 10c483: 83 f8 00 cmp $0x0,%eax 10c486: 7c 42 jl 10c4ca <== NEVER TAKEN return -1; if ( bytes > 0 ) { 10c488: 74 13 je 10c49d <== NEVER TAKEN iop->offset += bytes; 10c48a: 8b 45 c4 mov -0x3c(%ebp),%eax 10c48d: 99 cltd 10c48e: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c491: 01 41 0c add %eax,0xc(%ecx) 10c494: 11 51 10 adc %edx,0x10(%ecx) total += bytes; 10c497: 8b 45 c4 mov -0x3c(%ebp),%eax 10c49a: 01 45 c0 add %eax,-0x40(%ebp) } if (bytes != iov[ v ].iov_len) 10c49d: 8b 55 c4 mov -0x3c(%ebp),%edx 10c4a0: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx 10c4a4: 74 96 je 10c43c <== ALWAYS TAKEN 10c4a6: eb 99 jmp 10c441 <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 10c4a8: e8 67 86 00 00 call 114b14 <__errno> 10c4ad: c7 00 09 00 00 00 movl $0x9,(%eax) 10c4b3: ba ff ff ff ff mov $0xffffffff,%edx 10c4b8: eb a6 jmp 10c460 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c4ba: e8 55 86 00 00 call 114b14 <__errno> <== NOT EXECUTED 10c4bf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c4c5: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c4c8: eb 96 jmp 10c460 <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 10c4ca: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c4cd: eb 91 jmp 10c460 <== NOT EXECUTED