=============================================================================== 0010fe58 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10fe58: 55 push %ebp 10fe59: 89 e5 mov %esp,%ebp 10fe5b: 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; 10fe5e: 8b 50 10 mov 0x10(%eax),%edx 10fe61: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10fe64: 8b 10 mov (%eax),%edx 10fe66: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10fe6a: 77 12 ja 10fe7e <== NEVER TAKEN 10fe6c: 8b 52 4c mov 0x4c(%edx),%edx 10fe6f: ff 24 95 34 2f 12 00 jmp *0x122f34(,%edx,4) 10fe76: 66 90 xchg %ax,%ax case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10fe78: 8b 51 0c mov 0xc(%ecx),%edx 10fe7b: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fe7e: 31 c0 xor %eax,%eax 10fe80: c9 leave 10fe81: c3 ret 10fe82: 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; 10fe84: 8b 51 08 mov 0x8(%ecx),%edx 10fe87: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fe8a: 31 c0 xor %eax,%eax 10fe8c: c9 leave 10fe8d: c3 ret 10fe8e: 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; 10fe90: c7 40 08 00 31 12 00 movl $0x123100,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fe97: 31 c0 xor %eax,%eax 10fe99: c9 leave 10fe9a: c3 ret 10fe9b: 90 nop break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10fe9c: c7 40 08 c0 2f 12 00 movl $0x122fc0,0x8(%eax) break; } return 0; } 10fea3: 31 c0 xor %eax,%eax 10fea5: c9 leave 10fea6: c3 ret 10fea7: 90 nop switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10fea8: c7 40 08 80 30 12 00 movl $0x123080,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10feaf: 31 c0 xor %eax,%eax 10feb1: c9 leave 10feb2: c3 ret =============================================================================== 0010fca8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10fca8: 55 push %ebp 10fca9: 89 e5 mov %esp,%ebp 10fcab: 53 push %ebx 10fcac: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10fcaf: 6a 64 push $0x64 10fcb1: 6a 01 push $0x1 10fcb3: e8 14 87 ff ff call 1083cc 10fcb8: 89 c3 mov %eax,%ebx if ( !node ) 10fcba: 83 c4 10 add $0x10,%esp 10fcbd: 85 c0 test %eax,%eax 10fcbf: 74 4f je 10fd10 <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10fcc1: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10fcc7: 8b 45 08 mov 0x8(%ebp),%eax 10fcca: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10fccd: 51 push %ecx 10fcce: 6a 20 push $0x20 10fcd0: ff 75 0c pushl 0xc(%ebp) 10fcd3: 8d 43 0c lea 0xc(%ebx),%eax 10fcd6: 50 push %eax 10fcd7: e8 70 60 00 00 call 115d4c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10fcdc: 8b 45 10 mov 0x10(%ebp),%eax 10fcdf: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 10fce2: e8 3d 11 00 00 call 110e24 10fce7: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 10fceb: e8 24 11 00 00 call 110e14 10fcf0: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10fcf4: 58 pop %eax 10fcf5: 5a pop %edx 10fcf6: 6a 00 push $0x0 10fcf8: 8d 45 f0 lea -0x10(%ebp),%eax 10fcfb: 50 push %eax 10fcfc: e8 5f 89 ff ff call 108660 node->stat_atime = (time_t) tv.tv_sec; 10fd01: 8b 45 f0 mov -0x10(%ebp),%eax 10fd04: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10fd07: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10fd0a: 89 43 48 mov %eax,0x48(%ebx) return node; 10fd0d: 83 c4 10 add $0x10,%esp } 10fd10: 89 d8 mov %ebx,%eax 10fd12: 8b 5d fc mov -0x4(%ebp),%ebx 10fd15: c9 leave 10fd16: c3 ret =============================================================================== 0010fc44 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10fc44: 55 push %ebp 10fc45: 89 e5 mov %esp,%ebp 10fc47: 57 push %edi 10fc48: 56 push %esi 10fc49: 53 push %ebx 10fc4a: 83 ec 1c sub $0x1c,%esp 10fc4d: 8b 7d 0c mov 0xc(%ebp),%edi 10fc50: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 10fc53: 8b 45 08 mov 0x8(%ebp),%eax 10fc56: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10fc58: e8 c7 11 00 00 call 110e24 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10fc5d: 66 3b 43 3c cmp 0x3c(%ebx),%ax 10fc61: 74 05 je 10fc68 <== ALWAYS TAKEN 10fc63: 66 85 c0 test %ax,%ax <== NOT EXECUTED 10fc66: 75 2c jne 10fc94 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 10fc68: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10fc6c: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10fc70: 83 ec 08 sub $0x8,%esp 10fc73: 6a 00 push $0x0 10fc75: 8d 45 e0 lea -0x20(%ebp),%eax 10fc78: 50 push %eax 10fc79: e8 e2 89 ff ff call 108660 10fc7e: 8b 45 e0 mov -0x20(%ebp),%eax 10fc81: 89 43 48 mov %eax,0x48(%ebx) 10fc84: 31 c0 xor %eax,%eax return 0; 10fc86: 83 c4 10 add $0x10,%esp } 10fc89: 8d 65 f4 lea -0xc(%ebp),%esp 10fc8c: 5b pop %ebx 10fc8d: 5e pop %esi 10fc8e: 5f pop %edi 10fc8f: c9 leave 10fc90: c3 ret 10fc91: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10fc94: e8 6b 54 00 00 call 115104 <__errno> <== NOT EXECUTED 10fc99: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10fc9f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10fca4: eb e3 jmp 10fc89 <== NOT EXECUTED =============================================================================== 0010fd4c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10fd4c: 55 push %ebp 10fd4d: 89 e5 mov %esp,%ebp 10fd4f: 57 push %edi 10fd50: 56 push %esi 10fd51: 53 push %ebx 10fd52: 83 ec 1c sub $0x1c,%esp 10fd55: 8b 5d 08 mov 0x8(%ebp),%ebx 10fd58: 8b 75 0c mov 0xc(%ebp),%esi 10fd5b: 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 ) 10fd5e: 85 db test %ebx,%ebx 10fd60: 75 0a jne 10fd6c <== ALWAYS TAKEN 10fd62: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10fd64: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fd67: 5b pop %ebx <== NOT EXECUTED 10fd68: 5e pop %esi <== NOT EXECUTED 10fd69: 5f pop %edi <== NOT EXECUTED 10fd6a: c9 leave <== NOT EXECUTED 10fd6b: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10fd6c: 50 push %eax 10fd6d: a1 24 70 12 00 mov 0x127024,%eax 10fd72: 8b 40 2c mov 0x2c(%eax),%eax 10fd75: f7 d0 not %eax 10fd77: 23 45 14 and 0x14(%ebp),%eax 10fd7a: 50 push %eax 10fd7b: ff 75 10 pushl 0x10(%ebp) 10fd7e: 56 push %esi 10fd7f: e8 24 ff ff ff call 10fca8 if ( !node ) 10fd84: 83 c4 10 add $0x10,%esp 10fd87: 85 c0 test %eax,%eax 10fd89: 74 d9 je 10fd64 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10fd8b: 83 fe 07 cmp $0x7,%esi 10fd8e: 76 18 jbe 10fda8 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 10fd90: 68 7a 28 12 00 push $0x12287a <== NOT EXECUTED 10fd95: 68 20 2f 12 00 push $0x122f20 <== NOT EXECUTED 10fd9a: 6a 5c push $0x5c <== NOT EXECUTED 10fd9c: 68 b0 2e 12 00 push $0x122eb0 <== NOT EXECUTED 10fda1: e8 fe 84 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED 10fda6: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 10fda8: ff 24 b5 00 2f 12 00 jmp *0x122f00(,%esi,4) 10fdaf: 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; 10fdb0: 8b 17 mov (%edi),%edx 10fdb2: 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; 10fdb5: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 10fdb7: 8b 4b 10 mov 0x10(%ebx),%ecx 10fdba: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10fdbd: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10fdc0: 8b 4b 04 mov 0x4(%ebx),%ecx 10fdc3: 41 inc %ecx 10fdc4: 89 4b 04 mov %ecx,0x4(%ebx) 10fdc7: 89 48 38 mov %ecx,0x38(%eax) 10fdca: 83 ec 08 sub $0x8,%esp 10fdcd: 50 push %eax 10fdce: 83 c2 50 add $0x50,%edx 10fdd1: 52 push %edx 10fdd2: 89 45 e4 mov %eax,-0x1c(%ebp) 10fdd5: e8 fa c7 ff ff call 10c5d4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10fdda: 83 c4 10 add $0x10,%esp 10fddd: 8b 45 e4 mov -0x1c(%ebp),%eax } 10fde0: 8d 65 f4 lea -0xc(%ebp),%esp 10fde3: 5b pop %ebx 10fde4: 5e pop %esi 10fde5: 5f pop %edi 10fde6: c9 leave 10fde7: 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; 10fde8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10fdef: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10fdf6: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10fdfd: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10fe04: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10fe0b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10fe12: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10fe19: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10fe20: eb 93 jmp 10fdb5 10fe22: 66 90 xchg %ax,%ax case IMFS_FIFO: node->info.fifo.pipe = NULL; 10fe24: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10fe2b: eb 88 jmp 10fdb5 10fe2d: 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; 10fe30: 8b 17 mov (%edi),%edx 10fe32: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10fe35: 8b 57 04 mov 0x4(%edi),%edx 10fe38: 89 50 54 mov %edx,0x54(%eax) break; 10fe3b: e9 75 ff ff ff jmp 10fdb5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fe40: 8d 50 54 lea 0x54(%eax),%edx 10fe43: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fe46: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fe4d: 8d 50 50 lea 0x50(%eax),%edx 10fe50: 89 50 58 mov %edx,0x58(%eax) 10fe53: e9 5d ff ff ff jmp 10fdb5 =============================================================================== 0010fd18 : IMFS_jnode_t *IMFS_create_root_node(void) { 10fd18: 55 push %ebp 10fd19: 89 e5 mov %esp,%ebp 10fd1b: 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) ); 10fd1e: 68 ed 41 00 00 push $0x41ed 10fd23: 68 35 2b 12 00 push $0x122b35 10fd28: 6a 01 push $0x1 10fd2a: e8 79 ff ff ff call 10fca8 if ( !node ) 10fd2f: 83 c4 10 add $0x10,%esp 10fd32: 85 c0 test %eax,%eax 10fd34: 74 13 je 10fd49 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fd36: 8d 50 54 lea 0x54(%eax),%edx 10fd39: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fd3c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fd43: 8d 50 50 lea 0x50(%eax),%edx 10fd46: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10fd49: c9 leave 10fd4a: c3 ret =============================================================================== 00109d64 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 109d64: 55 push %ebp 109d65: 89 e5 mov %esp,%ebp 109d67: 57 push %edi 109d68: 56 push %esi 109d69: 53 push %ebx 109d6a: 83 ec 1c sub $0x1c,%esp 109d6d: 8b 45 08 mov 0x8(%ebp),%eax 109d70: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109d73: 85 c0 test %eax,%eax 109d75: 74 7a je 109df1 <== NEVER TAKEN assert( level >= 0 ); 109d77: 85 f6 test %esi,%esi 109d79: 0f 88 a4 00 00 00 js 109e23 <== NEVER TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 109d7f: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109d83: 0f 85 81 00 00 00 jne 109e0a <== NEVER TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109d89: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 109d8c: 83 c0 54 add $0x54,%eax 109d8f: 89 45 e4 mov %eax,-0x1c(%ebp) 109d92: 39 c7 cmp %eax,%edi 109d94: 74 41 je 109dd7 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109d96: 8d 46 01 lea 0x1(%esi),%eax 109d99: 89 45 e0 mov %eax,-0x20(%ebp) for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 109d9c: 31 db xor %ebx,%ebx 109d9e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109da0: a1 e0 d3 12 00 mov 0x12d3e0,%eax 109da5: ff 70 08 pushl 0x8(%eax) 109da8: 6a 04 push $0x4 109daa: 6a 01 push $0x1 109dac: 68 d5 7e 12 00 push $0x127ed5 109db1: e8 7e fb 00 00 call 119934 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 109db6: 43 inc %ebx 109db7: 83 c4 10 add $0x10,%esp 109dba: 39 de cmp %ebx,%esi 109dbc: 7d e2 jge 109da0 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 109dbe: 83 ec 0c sub $0xc,%esp 109dc1: 57 push %edi 109dc2: e8 f5 fd ff ff call 109bbc if ( the_jnode->type == IMFS_DIRECTORY ) 109dc7: 83 c4 10 add $0x10,%esp 109dca: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109dce: 74 10 je 109de0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 109dd0: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109dd2: 3b 7d e4 cmp -0x1c(%ebp),%edi 109dd5: 75 c5 jne 109d9c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109dd7: 8d 65 f4 lea -0xc(%ebp),%esp 109dda: 5b pop %ebx 109ddb: 5e pop %esi 109ddc: 5f pop %edi 109ddd: c9 leave 109dde: c3 ret 109ddf: 90 nop for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 109de0: 83 ec 08 sub $0x8,%esp 109de3: ff 75 e0 pushl -0x20(%ebp) 109de6: 57 push %edi 109de7: e8 78 ff ff ff call 109d64 109dec: 83 c4 10 add $0x10,%esp 109def: eb df jmp 109dd0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109df1: 68 bc 7e 12 00 push $0x127ebc <== NOT EXECUTED 109df6: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED 109dfb: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109e00: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109e05: e8 92 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 109e0a: 68 48 7f 12 00 push $0x127f48 <== NOT EXECUTED 109e0f: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED 109e14: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 109e19: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109e1e: e8 79 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 109e23: 68 ca 7e 12 00 push $0x127eca <== NOT EXECUTED 109e28: 68 04 80 12 00 push $0x128004 <== NOT EXECUTED 109e2d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 109e32: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109e37: e8 60 07 00 00 call 10a59c <__assert_func> <== NOT EXECUTED =============================================================================== 00110018 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 110018: 55 push %ebp 110019: 89 e5 mov %esp,%ebp 11001b: 57 push %edi 11001c: 56 push %esi 11001d: 53 push %ebx 11001e: 83 ec 4c sub $0x4c,%esp IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 110021: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 110028: 0f 85 0b 03 00 00 jne 110339 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 11002e: 8b 45 14 mov 0x14(%ebp),%eax 110031: 8b 38 mov (%eax),%edi 110033: 31 db xor %ebx,%ebx * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 110035: 8d 55 e4 lea -0x1c(%ebp),%edx 110038: 52 push %edx 110039: 8d 4d c3 lea -0x3d(%ebp),%ecx 11003c: 51 push %ecx 11003d: ff 75 0c pushl 0xc(%ebp) 110040: 8b 45 08 mov 0x8(%ebp),%eax 110043: 01 d8 add %ebx,%eax 110045: 50 push %eax 110046: e8 39 0a 00 00 call 110a84 11004b: 89 c6 mov %eax,%esi pathnamelen -= len; 11004d: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 110050: 8b 4d 14 mov 0x14(%ebp),%ecx 110053: 8b 01 mov (%ecx),%eax 110055: 83 c4 10 add $0x10,%esp 110058: 85 c0 test %eax,%eax 11005a: 0f 84 14 02 00 00 je 110274 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 110060: 29 55 0c sub %edx,0xc(%ebp) i += len; 110063: 01 d3 add %edx,%ebx rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 110065: 85 f6 test %esi,%esi 110067: 75 47 jne 1100b0 * 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 ) { 110069: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 11006d: 0f 84 9d 01 00 00 je 110210 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 110073: 83 ec 0c sub $0xc,%esp 110076: ff 75 14 pushl 0x14(%ebp) 110079: e8 da fd ff ff call 10fe58 11007e: 89 c6 mov %eax,%esi 110080: 59 pop %ecx 110081: 5b pop %ebx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 110082: ff 75 10 pushl 0x10(%ebp) 110085: ff 75 14 pushl 0x14(%ebp) 110088: e8 27 fe ff ff call 10feb4 11008d: 83 c4 10 add $0x10,%esp 110090: 85 c0 test %eax,%eax 110092: 0f 85 d4 00 00 00 jne 11016c rtems_set_errno_and_return_minus_one( EACCES ); 110098: e8 67 50 00 00 call 115104 <__errno> 11009d: c7 00 0d 00 00 00 movl $0xd,(%eax) 1100a3: be ff ff ff ff mov $0xffffffff,%esi 1100a8: e9 bf 00 00 00 jmp 11016c 1100ad: 8d 76 00 lea 0x0(%esi),%esi /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 1100b0: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 1100b4: 0f 84 be 00 00 00 je 110178 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 1100ba: 89 c7 mov %eax,%edi switch( type ) { 1100bc: 83 fe 03 cmp $0x3,%esi 1100bf: 74 1b je 1100dc 1100c1: 83 fe 04 cmp $0x4,%esi 1100c4: 0f 84 92 00 00 00 je 11015c 1100ca: 83 fe 02 cmp $0x2,%esi 1100cd: 74 59 je 110128 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 1100cf: 83 fe 04 cmp $0x4,%esi 1100d2: 0f 85 5d ff ff ff jne 110035 <== ALWAYS TAKEN 1100d8: eb 8f jmp 110069 <== NOT EXECUTED 1100da: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 1100dc: 8b 40 4c mov 0x4c(%eax),%eax 1100df: 83 f8 03 cmp $0x3,%eax 1100e2: 0f 84 68 01 00 00 je 110250 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 1100e8: 83 f8 04 cmp $0x4,%eax 1100eb: 0f 84 ef 01 00 00 je 1102e0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 1100f1: 48 dec %eax 1100f2: 0f 85 d3 01 00 00 jne 1102cb /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 1100f8: 83 ec 08 sub $0x8,%esp 1100fb: 8d 45 c3 lea -0x3d(%ebp),%eax 1100fe: 50 push %eax 1100ff: 57 push %edi 110100: e8 ef 08 00 00 call 1109f4 110105: 89 c7 mov %eax,%edi if ( !node ) 110107: 83 c4 10 add $0x10,%esp 11010a: 85 c0 test %eax,%eax 11010c: 0f 84 62 01 00 00 je 110274 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 110112: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 110116: 0f 84 80 00 00 00 je 11019c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 11011c: 8b 4d 14 mov 0x14(%ebp),%ecx 11011f: 89 39 mov %edi,(%ecx) break; 110121: e9 0f ff ff ff jmp 110035 110126: 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 ) 110128: 8b 15 24 70 12 00 mov 0x127024,%edx 11012e: 39 42 18 cmp %eax,0x18(%edx) 110131: 0f 84 fe fe ff ff je 110035 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 110137: 8b 4d 14 mov 0x14(%ebp),%ecx 11013a: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 11013d: 39 42 1c cmp %eax,0x1c(%edx) 110140: 0f 84 bf 01 00 00 je 110305 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 110146: 8b 78 08 mov 0x8(%eax),%edi 110149: 85 ff test %edi,%edi 11014b: 0f 84 23 01 00 00 je 110274 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 110151: 8b 45 14 mov 0x14(%ebp),%eax 110154: 89 38 mov %edi,(%eax) break; 110156: e9 da fe ff ff jmp 110035 11015b: 90 nop case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 11015c: e8 a3 4f 00 00 call 115104 <__errno> 110161: c7 00 5b 00 00 00 movl $0x5b,(%eax) 110167: be ff ff ff ff mov $0xffffffff,%esi if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 11016c: 89 f0 mov %esi,%eax 11016e: 8d 65 f4 lea -0xc(%ebp),%esp 110171: 5b pop %ebx 110172: 5e pop %esi 110173: 5f pop %edi 110174: c9 leave 110175: c3 ret 110176: 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 ) ) 110178: 83 ec 08 sub $0x8,%esp 11017b: 6a 01 push $0x1 11017d: ff 75 14 pushl 0x14(%ebp) 110180: e8 2f fd ff ff call 10feb4 110185: 83 c4 10 add $0x10,%esp 110188: 85 c0 test %eax,%eax 11018a: 0f 84 08 ff ff ff je 110098 110190: 8b 55 14 mov 0x14(%ebp),%edx 110193: 8b 02 mov (%edx),%eax 110195: e9 20 ff ff ff jmp 1100ba 11019a: 66 90 xchg %ax,%ax * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 11019c: 8b 70 5c mov 0x5c(%eax),%esi 11019f: 85 f6 test %esi,%esi 1101a1: 0f 84 75 ff ff ff je 11011c 1101a7: 8b 75 08 mov 0x8(%ebp),%esi 1101aa: 01 de add %ebx,%esi 1101ac: 89 45 b0 mov %eax,-0x50(%ebp) 1101af: 8b 7d 0c mov 0xc(%ebp),%edi 1101b2: eb 15 jmp 1101c9 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 1101b4: 8a 06 mov (%esi),%al 1101b6: 84 c0 test %al,%al 1101b8: 0f 84 ce 00 00 00 je 11028c 1101be: 46 inc %esi 1101bf: 85 ff test %edi,%edi 1101c1: 0f 84 f9 00 00 00 je 1102c0 <== NEVER TAKEN ++(*index); 1101c7: 43 inc %ebx --(*len); 1101c8: 4f dec %edi 1101c9: 89 75 b4 mov %esi,-0x4c(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 1101cc: 83 ec 0c sub $0xc,%esp 1101cf: 0f be 06 movsbl (%esi),%eax 1101d2: 50 push %eax 1101d3: e8 d4 92 ff ff call 1094ac 1101d8: 83 c4 10 add $0x10,%esp 1101db: 85 c0 test %eax,%eax 1101dd: 75 d5 jne 1101b4 1101df: 89 7d 0c mov %edi,0xc(%ebp) 1101e2: 8b 7d b0 mov -0x50(%ebp),%edi 1101e5: 8b 55 b4 mov -0x4c(%ebp),%edx 1101e8: 8a 02 mov (%edx),%al * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 1101ea: 3c 2e cmp $0x2e,%al 1101ec: 0f 85 a0 00 00 00 jne 110292 1101f2: 8b 4d 08 mov 0x8(%ebp),%ecx 1101f5: 80 7c 19 01 2e cmpb $0x2e,0x1(%ecx,%ebx,1) 1101fa: 0f 85 92 00 00 00 jne 110292 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 110200: 83 c3 02 add $0x2,%ebx pathnamelen -= 2; 110203: 83 6d 0c 02 subl $0x2,0xc(%ebp) node = node->Parent; 110207: 8b 7f 08 mov 0x8(%edi),%edi 11020a: e9 0d ff ff ff jmp 11011c 11020f: 90 nop * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 110210: 8b 70 5c mov 0x5c(%eax),%esi 110213: 85 f6 test %esi,%esi 110215: 0f 84 58 fe ff ff je 110073 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 11021b: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED 11021e: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 110223: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 110226: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 110228: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 11022b: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 11022e: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED 110231: 51 push %ecx <== NOT EXECUTED 110232: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 110235: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 110238: 01 d1 add %edx,%ecx <== NOT EXECUTED 11023a: 51 push %ecx <== NOT EXECUTED 11023b: 29 d3 sub %edx,%ebx <== NOT EXECUTED 11023d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 110240: 01 da add %ebx,%edx <== NOT EXECUTED 110242: 52 push %edx <== NOT EXECUTED 110243: ff 10 call *(%eax) <== NOT EXECUTED 110245: 89 c6 mov %eax,%esi <== NOT EXECUTED 110247: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11024a: e9 1d ff ff ff jmp 11016c <== NOT EXECUTED 11024f: 90 nop <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 110250: 83 ec 08 sub $0x8,%esp 110253: 6a 00 push $0x0 110255: ff 75 14 pushl 0x14(%ebp) 110258: e8 c3 fc ff ff call 10ff20 node = pathloc->node_access; 11025d: 8b 55 14 mov 0x14(%ebp),%edx 110260: 8b 3a mov (%edx),%edi if ( !node ) 110262: 83 c4 10 add $0x10,%esp 110265: 85 ff test %edi,%edi 110267: 74 62 je 1102cb <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 110269: 8b 47 4c mov 0x4c(%edi),%eax 11026c: e9 80 fe ff ff jmp 1100f1 110271: 8d 76 00 lea 0x0(%esi),%esi */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 110274: e8 8b 4e 00 00 call 115104 <__errno> 110279: c7 00 02 00 00 00 movl $0x2,(%eax) 11027f: be ff ff ff ff mov $0xffffffff,%esi 110284: e9 e3 fe ff ff jmp 11016c 110289: 8d 76 00 lea 0x0(%esi),%esi 11028c: 89 7d 0c mov %edi,0xc(%ebp) 11028f: 8b 7d b0 mov -0x50(%ebp),%edi * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 110292: 8b 77 5c mov 0x5c(%edi),%esi 110295: 83 c6 1c add $0x1c,%esi 110298: b9 05 00 00 00 mov $0x5,%ecx 11029d: 8b 7d 14 mov 0x14(%ebp),%edi 1102a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i], 1102a2: 8b 55 14 mov 0x14(%ebp),%edx 1102a5: 8b 42 0c mov 0xc(%edx),%eax 1102a8: 52 push %edx 1102a9: ff 75 10 pushl 0x10(%ebp) 1102ac: ff 75 0c pushl 0xc(%ebp) 1102af: ff 75 b4 pushl -0x4c(%ebp) 1102b2: ff 10 call *(%eax) 1102b4: 89 c6 mov %eax,%esi 1102b6: 83 c4 10 add $0x10,%esp 1102b9: e9 ae fe ff ff jmp 11016c 1102be: 66 90 xchg %ax,%ax 1102c0: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED 1102c3: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED 1102c6: e9 1f ff ff ff jmp 1101ea <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1102cb: e8 34 4e 00 00 call 115104 <__errno> 1102d0: c7 00 14 00 00 00 movl $0x14,(%eax) 1102d6: be ff ff ff ff mov $0xffffffff,%esi 1102db: e9 8c fe ff ff jmp 11016c if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 1102e0: 83 ec 08 sub $0x8,%esp 1102e3: 6a 00 push $0x0 1102e5: ff 75 14 pushl 0x14(%ebp) 1102e8: e8 8f fc ff ff call 10ff7c 1102ed: 89 c6 mov %eax,%esi node = pathloc->node_access; 1102ef: 8b 4d 14 mov 0x14(%ebp),%ecx 1102f2: 8b 39 mov (%ecx),%edi if ( result == -1 ) 1102f4: 83 c4 10 add $0x10,%esp 1102f7: 83 f8 ff cmp $0xffffffff,%eax 1102fa: 0f 85 69 ff ff ff jne 110269 <== ALWAYS TAKEN 110300: e9 67 fe ff ff jmp 11016c <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 110305: 8d 72 08 lea 0x8(%edx),%esi 110308: b9 05 00 00 00 mov $0x5,%ecx 11030d: 8b 7d 14 mov 0x14(%ebp),%edi 110310: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 110312: 8b 55 e4 mov -0x1c(%ebp),%edx 110315: 8b 4d 14 mov 0x14(%ebp),%ecx 110318: 8b 41 0c mov 0xc(%ecx),%eax 11031b: 51 push %ecx 11031c: ff 75 10 pushl 0x10(%ebp) 11031f: 8b 4d 0c mov 0xc(%ebp),%ecx 110322: 01 d1 add %edx,%ecx 110324: 51 push %ecx 110325: 29 d3 sub %edx,%ebx 110327: 8b 55 08 mov 0x8(%ebp),%edx 11032a: 01 da add %ebx,%edx 11032c: 52 push %edx 11032d: ff 10 call *(%eax) 11032f: 89 c6 mov %eax,%esi 110331: 83 c4 10 add $0x10,%esp 110334: e9 33 fe ff ff jmp 11016c char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 110339: 68 7a 28 12 00 push $0x12287a <== NOT EXECUTED 11033e: 68 54 2f 12 00 push $0x122f54 <== NOT EXECUTED 110343: 68 08 02 00 00 push $0x208 <== NOT EXECUTED 110348: 68 64 2f 12 00 push $0x122f64 <== NOT EXECUTED 11034d: e8 52 7f ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00110400 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 110400: 55 push %ebp 110401: 89 e5 mov %esp,%ebp 110403: 57 push %edi 110404: 56 push %esi 110405: 53 push %ebx 110406: 83 ec 4c sub $0x4c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 110409: 8b 45 0c mov 0xc(%ebp),%eax 11040c: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 11040e: 31 c0 xor %eax,%eax 110410: b9 ff ff ff ff mov $0xffffffff,%ecx 110415: 8b 7d 08 mov 0x8(%ebp),%edi 110418: f2 ae repnz scas %es:(%edi),%al 11041a: f7 d1 not %ecx 11041c: 8d 71 ff lea -0x1(%ecx),%esi 11041f: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 110426: 8d 55 e4 lea -0x1c(%ebp),%edx 110429: 52 push %edx 11042a: 8d 4d c3 lea -0x3d(%ebp),%ecx 11042d: 51 push %ecx 11042e: 56 push %esi 11042f: 8b 45 08 mov 0x8(%ebp),%eax 110432: 03 45 b4 add -0x4c(%ebp),%eax 110435: 50 push %eax 110436: e8 49 06 00 00 call 110a84 11043b: 89 c7 mov %eax,%edi pathlen -= len; 11043d: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 110440: 8b 4d 0c mov 0xc(%ebp),%ecx 110443: 8b 01 mov (%ecx),%eax 110445: 83 c4 10 add $0x10,%esp 110448: 85 c0 test %eax,%eax 11044a: 0f 84 e8 00 00 00 je 110538 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 110450: 85 ff test %edi,%edi 110452: 75 1c jne 110470 pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 110454: e8 ab 4c 00 00 call 115104 <__errno> 110459: c7 00 11 00 00 00 movl $0x11,(%eax) 11045f: 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; } 110464: 89 d8 mov %ebx,%eax 110466: 8d 65 f4 lea -0xc(%ebp),%esp 110469: 5b pop %ebx 11046a: 5e pop %esi 11046b: 5f pop %edi 11046c: c9 leave 11046d: c3 ret 11046e: 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 ) 110470: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110474: 0f 84 d6 00 00 00 je 110550 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 11047a: 29 d6 sub %edx,%esi i += len; 11047c: 01 55 b4 add %edx,-0x4c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 11047f: 89 c3 mov %eax,%ebx switch( type ) { 110481: 83 ff 02 cmp $0x2,%edi 110484: 0f 84 86 00 00 00 je 110510 11048a: 76 24 jbe 1104b0 11048c: 83 ff 03 cmp $0x3,%edi 11048f: 74 2b je 1104bc 110491: 83 ff 04 cmp $0x4,%edi 110494: 75 90 jne 110426 <== 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 ); 110496: e8 69 4c 00 00 call 115104 <__errno> 11049b: c7 00 5b 00 00 00 movl $0x5b,(%eax) 1104a1: 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; } 1104a6: 89 d8 mov %ebx,%eax 1104a8: 8d 65 f4 lea -0xc(%ebp),%esp 1104ab: 5b pop %ebx 1104ac: 5e pop %esi 1104ad: 5f pop %edi 1104ae: c9 leave 1104af: c3 ret if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 1104b0: 85 ff test %edi,%edi 1104b2: 74 a0 je 110454 <== NEVER TAKEN 1104b4: e9 6d ff ff ff jmp 110426 1104b9: 8d 76 00 lea 0x0(%esi),%esi case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 1104bc: 8b 40 4c mov 0x4c(%eax),%eax 1104bf: 83 f8 03 cmp $0x3,%eax 1104c2: 0f 84 fd 01 00 00 je 1106c5 <== NEVER TAKEN result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 1104c8: 83 f8 04 cmp $0x4,%eax 1104cb: 0f 84 13 02 00 00 je 1106e4 <== NEVER TAKEN if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 1104d1: 85 db test %ebx,%ebx 1104d3: 0f 84 d7 01 00 00 je 1106b0 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 1104d9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1104dd: 0f 85 cd 01 00 00 jne 1106b0 <== NEVER TAKEN /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 1104e3: 83 ec 08 sub $0x8,%esp 1104e6: 8d 4d c3 lea -0x3d(%ebp),%ecx 1104e9: 51 push %ecx 1104ea: 53 push %ebx 1104eb: e8 04 05 00 00 call 1109f4 1104f0: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 1104f2: 83 c4 10 add $0x10,%esp 1104f5: 85 c0 test %eax,%eax 1104f7: 0f 84 eb 00 00 00 je 1105e8 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 1104fd: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 110501: 74 75 je 110578 i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 110503: 8b 4d 0c mov 0xc(%ebp),%ecx 110506: 89 19 mov %ebx,(%ecx) 110508: e9 19 ff ff ff jmp 110426 11050d: 8d 76 00 lea 0x0(%esi),%esi case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 110510: 8b 15 24 70 12 00 mov 0x127024,%edx 110516: 39 42 18 cmp %eax,0x18(%edx) 110519: 0f 84 07 ff ff ff je 110426 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 11051f: 8b 4d 0c mov 0xc(%ebp),%ecx 110522: 8b 51 10 mov 0x10(%ecx),%edx 110525: 39 42 1c cmp %eax,0x1c(%edx) 110528: 0f 84 d5 01 00 00 je 110703 } else { *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 11052e: 8b 58 08 mov 0x8(%eax),%ebx 110531: 85 db test %ebx,%ebx 110533: 75 ce jne 110503 110535: 8d 76 00 lea 0x0(%esi),%esi * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 110538: e8 c7 4b 00 00 call 115104 <__errno> 11053d: c7 00 02 00 00 00 movl $0x2,(%eax) 110543: bb ff ff ff ff mov $0xffffffff,%ebx 110548: e9 17 ff ff ff jmp 110464 11054d: 8d 76 00 lea 0x0(%esi),%esi * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 110550: 83 ec 08 sub $0x8,%esp 110553: 6a 01 push $0x1 110555: ff 75 0c pushl 0xc(%ebp) 110558: 89 55 a8 mov %edx,-0x58(%ebp) 11055b: e8 54 f9 ff ff call 10feb4 110560: 83 c4 10 add $0x10,%esp 110563: 85 c0 test %eax,%eax 110565: 8b 55 a8 mov -0x58(%ebp),%edx 110568: 0f 84 2d 01 00 00 je 11069b <== NEVER TAKEN 11056e: 8b 4d 0c mov 0xc(%ebp),%ecx 110571: 8b 01 mov (%ecx),%eax 110573: e9 02 ff ff ff jmp 11047a */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 110578: 8b 40 5c mov 0x5c(%eax),%eax 11057b: 85 c0 test %eax,%eax 11057d: 74 84 je 110503 11057f: 8b 7d 08 mov 0x8(%ebp),%edi 110582: 03 7d b4 add -0x4c(%ebp),%edi 110585: 89 5d ac mov %ebx,-0x54(%ebp) 110588: 8b 5d b4 mov -0x4c(%ebp),%ebx 11058b: eb 18 jmp 1105a5 11058d: 8d 76 00 lea 0x0(%esi),%esi const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 110590: 8a 07 mov (%edi),%al 110592: 84 c0 test %al,%al 110594: 0f 84 92 00 00 00 je 11062c <== NEVER TAKEN 11059a: 47 inc %edi 11059b: 85 f6 test %esi,%esi 11059d: 0f 84 b9 00 00 00 je 11065c <== NEVER TAKEN ++(*index); 1105a3: 43 inc %ebx --(*len); 1105a4: 4e dec %esi 1105a5: 89 7d b0 mov %edi,-0x50(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 1105a8: 83 ec 0c sub $0xc,%esp 1105ab: 0f be 07 movsbl (%edi),%eax 1105ae: 50 push %eax 1105af: e8 f8 8e ff ff call 1094ac 1105b4: 83 c4 10 add $0x10,%esp 1105b7: 85 c0 test %eax,%eax 1105b9: 75 d5 jne 110590 1105bb: 89 5d b4 mov %ebx,-0x4c(%ebp) 1105be: 8b 5d ac mov -0x54(%ebp),%ebx 1105c1: 8b 55 b0 mov -0x50(%ebp),%edx 1105c4: 8a 02 mov (%edx),%al if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { 1105c6: 3c 2e cmp $0x2e,%al 1105c8: 75 65 jne 11062f 1105ca: 8b 45 08 mov 0x8(%ebp),%eax 1105cd: 8b 4d b4 mov -0x4c(%ebp),%ecx 1105d0: 80 7c 08 01 2e cmpb $0x2e,0x1(%eax,%ecx,1) 1105d5: 75 58 jne 11062f <== NEVER TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 1105d7: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathlen -= 2; 1105db: 83 ee 02 sub $0x2,%esi node = node->Parent; 1105de: 8b 5b 08 mov 0x8(%ebx),%ebx 1105e1: e9 1d ff ff ff jmp 110503 1105e6: 66 90 xchg %ax,%ax case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 1105e8: 8b 45 b4 mov -0x4c(%ebp),%eax 1105eb: 2b 45 e4 sub -0x1c(%ebp),%eax 1105ee: 03 45 08 add 0x8(%ebp),%eax 1105f1: 8b 55 10 mov 0x10(%ebp),%edx 1105f4: 89 02 mov %eax,(%edx) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 1105f6: 8b 55 08 mov 0x8(%ebp),%edx 1105f9: 8b 4d b4 mov -0x4c(%ebp),%ecx 1105fc: 8a 04 0a mov (%edx,%ecx,1),%al 1105ff: 84 c0 test %al,%al 110601: 74 65 je 110668 110603: 89 d3 mov %edx,%ebx 110605: 01 cb add %ecx,%ebx 110607: eb 0b jmp 110614 110609: 8d 76 00 lea 0x0(%esi),%esi 11060c: 8a 43 01 mov 0x1(%ebx),%al 11060f: 43 inc %ebx 110610: 84 c0 test %al,%al 110612: 74 54 je 110668 if ( !IMFS_is_separator( path[ i ] ) ) 110614: 83 ec 0c sub $0xc,%esp 110617: 0f be c0 movsbl %al,%eax 11061a: 50 push %eax 11061b: e8 8c 8e ff ff call 1094ac 110620: 83 c4 10 add $0x10,%esp 110623: 85 c0 test %eax,%eax 110625: 75 e5 jne 11060c 110627: e9 0c ff ff ff jmp 110538 11062c: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 11062f: 8b 73 5c mov 0x5c(%ebx),%esi 110632: 83 c6 1c add $0x1c,%esi 110635: b9 05 00 00 00 mov $0x5,%ecx 11063a: 8b 7d 0c mov 0xc(%ebp),%edi 11063d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i], 11063f: 57 push %edi 110640: 8b 55 0c mov 0xc(%ebp),%edx 110643: 8b 42 0c mov 0xc(%edx),%eax 110646: ff 75 10 pushl 0x10(%ebp) 110649: 52 push %edx 11064a: ff 75 b0 pushl -0x50(%ebp) 11064d: ff 50 04 call *0x4(%eax) 110650: 89 c3 mov %eax,%ebx 110652: 83 c4 10 add $0x10,%esp 110655: e9 0a fe ff ff jmp 110464 11065a: 66 90 xchg %ax,%ax 11065c: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED 11065f: 8b 5d ac mov -0x54(%ebp),%ebx <== NOT EXECUTED 110662: e9 5f ff ff ff jmp 1105c6 <== NOT EXECUTED 110667: 90 nop <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 110668: 83 ec 0c sub $0xc,%esp 11066b: ff 75 0c pushl 0xc(%ebp) 11066e: e8 e5 f7 ff ff call 10fe58 110673: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 110675: 8b 4d 0c mov 0xc(%ebp),%ecx 110678: 8b 01 mov (%ecx),%eax 11067a: 83 c4 10 add $0x10,%esp 11067d: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 110681: 75 2d jne 1106b0 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 110683: 83 ec 08 sub $0x8,%esp 110686: 6a 03 push $0x3 110688: ff 75 0c pushl 0xc(%ebp) 11068b: e8 24 f8 ff ff call 10feb4 110690: 83 c4 10 add $0x10,%esp 110693: 85 c0 test %eax,%eax 110695: 0f 85 c9 fd ff ff jne 110464 rtems_set_errno_and_return_minus_one( EACCES ); 11069b: e8 64 4a 00 00 call 115104 <__errno> 1106a0: c7 00 0d 00 00 00 movl $0xd,(%eax) 1106a6: bb ff ff ff ff mov $0xffffffff,%ebx 1106ab: e9 b4 fd ff ff jmp 110464 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1106b0: e8 4f 4a 00 00 call 115104 <__errno> 1106b5: c7 00 14 00 00 00 movl $0x14,(%eax) 1106bb: bb ff ff ff ff mov $0xffffffff,%ebx 1106c0: e9 9f fd ff ff jmp 110464 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 1106c5: 83 ec 08 sub $0x8,%esp 1106c8: 6a 00 push $0x0 1106ca: ff 75 0c pushl 0xc(%ebp) 1106cd: e8 82 fc ff ff call 110354 if ( result == -1 ) 1106d2: 83 c4 10 add $0x10,%esp 1106d5: 83 f8 ff cmp $0xffffffff,%eax 1106d8: 74 58 je 110732 <== NEVER TAKEN 1106da: 8b 45 0c mov 0xc(%ebp),%eax 1106dd: 8b 18 mov (%eax),%ebx 1106df: e9 ed fd ff ff jmp 1104d1 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 1106e4: 83 ec 08 sub $0x8,%esp 1106e7: 6a 00 push $0x0 1106e9: ff 75 0c pushl 0xc(%ebp) 1106ec: e8 63 fc ff ff call 110354 if ( result == -1 ) 1106f1: 83 c4 10 add $0x10,%esp 1106f4: 83 f8 ff cmp $0xffffffff,%eax 1106f7: 74 39 je 110732 <== NEVER TAKEN 1106f9: 8b 55 0c mov 0xc(%ebp),%edx 1106fc: 8b 1a mov (%edx),%ebx 1106fe: e9 ce fd ff ff jmp 1104d1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 110703: 8d 72 08 lea 0x8(%edx),%esi 110706: b9 05 00 00 00 mov $0x5,%ecx 11070b: 8b 7d 0c mov 0xc(%ebp),%edi 11070e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 110710: 52 push %edx 110711: 8b 55 0c mov 0xc(%ebp),%edx 110714: 8b 42 0c mov 0xc(%edx),%eax 110717: ff 75 10 pushl 0x10(%ebp) 11071a: 52 push %edx 11071b: 8b 55 b4 mov -0x4c(%ebp),%edx 11071e: 2b 55 e4 sub -0x1c(%ebp),%edx 110721: 03 55 08 add 0x8(%ebp),%edx 110724: 52 push %edx 110725: ff 50 04 call *0x4(%eax) 110728: 89 c3 mov %eax,%ebx 11072a: 83 c4 10 add $0x10,%esp 11072d: e9 32 fd ff ff jmp 110464 110732: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110734: e9 2b fd ff ff jmp 110464 <== NOT EXECUTED =============================================================================== 0010ff20 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ff20: 55 push %ebp 10ff21: 89 e5 mov %esp,%ebp 10ff23: 53 push %ebx 10ff24: 83 ec 04 sub $0x4,%esp 10ff27: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ff2a: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10ff2c: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10ff30: 75 3c jne 10ff6e <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10ff32: 8b 40 50 mov 0x50(%eax),%eax 10ff35: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10ff37: 83 ec 0c sub $0xc,%esp 10ff3a: 53 push %ebx 10ff3b: e8 18 ff ff ff call 10fe58 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ff40: 58 pop %eax 10ff41: 5a pop %edx 10ff42: ff 75 0c pushl 0xc(%ebp) 10ff45: 53 push %ebx 10ff46: e8 69 ff ff ff call 10feb4 10ff4b: 83 c4 10 add $0x10,%esp 10ff4e: 85 c0 test %eax,%eax 10ff50: 74 0a je 10ff5c <== NEVER TAKEN 10ff52: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ff54: 8b 5d fc mov -0x4(%ebp),%ebx 10ff57: c9 leave 10ff58: c3 ret 10ff59: 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 ); 10ff5c: e8 a3 51 00 00 call 115104 <__errno> <== NOT EXECUTED 10ff61: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ff67: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ff6c: eb e6 jmp 10ff54 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ff6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff71: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ff76: e8 7d c3 ff ff call 10c2f8 <== NOT EXECUTED =============================================================================== 00110354 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 110354: 55 push %ebp 110355: 89 e5 mov %esp,%ebp 110357: 57 push %edi 110358: 56 push %esi 110359: 53 push %ebx 11035a: 83 ec 0c sub $0xc,%esp 11035d: 8b 75 08 mov 0x8(%ebp),%esi 110360: 8b 7d 0c mov 0xc(%ebp),%edi 110363: 8b 15 24 70 12 00 mov 0x127024,%edx 110369: eb 0e jmp 110379 11036b: 90 nop */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 11036c: 83 f8 04 cmp $0x4,%eax 11036f: 74 53 je 1103c4 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 110371: 83 e8 03 sub $0x3,%eax 110374: 83 f8 01 cmp $0x1,%eax 110377: 77 3a ja 1103b3 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 110379: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 11037b: 8b 42 30 mov 0x30(%edx),%eax 11037e: 40 inc %eax 11037f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 110383: 66 83 f8 05 cmp $0x5,%ax 110387: 77 57 ja 1103e0 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 110389: 8b 43 4c mov 0x4c(%ebx),%eax 11038c: 83 f8 03 cmp $0x3,%eax 11038f: 75 db jne 11036c result = IMFS_evaluate_hard_link( node, flags ); 110391: 83 ec 08 sub $0x8,%esp 110394: 57 push %edi 110395: 56 push %esi 110396: e8 85 fb ff ff call 10ff20 11039b: 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 ) ) ); 11039e: 85 c0 test %eax,%eax 1103a0: 75 33 jne 1103d5 <== NEVER TAKEN 1103a2: 8b 43 4c mov 0x4c(%ebx),%eax 1103a5: 8b 15 24 70 12 00 mov 0x127024,%edx 1103ab: 83 e8 03 sub $0x3,%eax 1103ae: 83 f8 01 cmp $0x1,%eax 1103b1: 76 c6 jbe 110379 <== ALWAYS TAKEN 1103b3: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 1103b5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 1103bb: 8d 65 f4 lea -0xc(%ebp),%esp 1103be: 5b pop %ebx 1103bf: 5e pop %esi 1103c0: 5f pop %edi 1103c1: c9 leave 1103c2: c3 ret 1103c3: 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 ); 1103c4: 83 ec 08 sub $0x8,%esp 1103c7: 57 push %edi 1103c8: 56 push %esi 1103c9: e8 ae fb ff ff call 10ff7c 1103ce: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 1103d1: 85 c0 test %eax,%eax 1103d3: 74 cd je 1103a2 1103d5: 8b 15 24 70 12 00 mov 0x127024,%edx 1103db: eb d8 jmp 1103b5 1103dd: 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; 1103e0: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 1103e6: e8 19 4d 00 00 call 115104 <__errno> 1103eb: c7 00 5c 00 00 00 movl $0x5c,(%eax) 1103f1: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 1103f6: 8d 65 f4 lea -0xc(%ebp),%esp 1103f9: 5b pop %ebx 1103fa: 5e pop %esi 1103fb: 5f pop %edi 1103fc: c9 leave 1103fd: c3 ret =============================================================================== 0010feb4 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10feb4: 55 push %ebp 10feb5: 89 e5 mov %esp,%ebp 10feb7: 57 push %edi 10feb8: 56 push %esi 10feb9: 53 push %ebx 10feba: 83 ec 0c sub $0xc,%esp 10febd: 8b 75 0c mov 0xc(%ebp),%esi uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10fec0: f7 c6 f8 ff ff ff test $0xfffffff8,%esi 10fec6: 75 44 jne 10ff0c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 10fec8: 8b 45 08 mov 0x8(%ebp),%eax 10fecb: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10fecd: e8 52 0f 00 00 call 110e24 10fed2: 89 c7 mov %eax,%edi st_gid = getegid(); 10fed4: e8 3b 0f 00 00 call 110e14 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10fed9: 66 3b 7b 3c cmp 0x3c(%ebx),%di 10fedd: 74 1d je 10fefc flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10fedf: 66 3b 43 3e cmp 0x3e(%ebx),%ax 10fee3: 74 1f je 10ff04 <== ALWAYS TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10fee5: 8b 43 30 mov 0x30(%ebx),%eax 10fee8: 21 f0 and %esi,%eax 10feea: 39 c6 cmp %eax,%esi 10feec: 0f 94 c0 sete %al 10feef: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10fef2: 83 c4 0c add $0xc,%esp 10fef5: 5b pop %ebx 10fef6: 5e pop %esi 10fef7: 5f pop %edi 10fef8: c9 leave 10fef9: c3 ret 10fefa: 66 90 xchg %ax,%ax */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10fefc: c1 e6 06 shl $0x6,%esi 10feff: eb e4 jmp 10fee5 10ff01: 8d 76 00 lea 0x0(%esi),%esi else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10ff04: c1 e6 03 shl $0x3,%esi 10ff07: eb dc jmp 10fee5 10ff09: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10ff0c: e8 f3 51 00 00 call 115104 <__errno> <== NOT EXECUTED 10ff11: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10ff17: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ff1c: eb d4 jmp 10fef2 <== NOT EXECUTED =============================================================================== 0010ff7c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ff7c: 55 push %ebp 10ff7d: 89 e5 mov %esp,%ebp 10ff7f: 57 push %edi 10ff80: 56 push %esi 10ff81: 53 push %ebx 10ff82: 83 ec 1c sub $0x1c,%esp 10ff85: 8b 5d 08 mov 0x8(%ebp),%ebx 10ff88: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10ff8b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10ff8d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10ff91: 75 78 jne 11000b <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10ff93: 8b 47 08 mov 0x8(%edi),%eax 10ff96: 85 c0 test %eax,%eax 10ff98: 74 64 je 10fffe <== 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; 10ff9a: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10ff9c: 52 push %edx 10ff9d: 53 push %ebx 10ff9e: 8d 45 e4 lea -0x1c(%ebp),%eax 10ffa1: 50 push %eax 10ffa2: ff 77 50 pushl 0x50(%edi) 10ffa5: e8 5e 13 00 00 call 111308 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10ffaa: 8b 57 50 mov 0x50(%edi),%edx 10ffad: 03 55 e4 add -0x1c(%ebp),%edx 10ffb0: 31 c0 xor %eax,%eax 10ffb2: b9 ff ff ff ff mov $0xffffffff,%ecx 10ffb7: 89 d7 mov %edx,%edi 10ffb9: f2 ae repnz scas %es:(%edi),%al 10ffbb: f7 d1 not %ecx 10ffbd: 49 dec %ecx 10ffbe: 53 push %ebx 10ffbf: 56 push %esi 10ffc0: 51 push %ecx 10ffc1: 52 push %edx 10ffc2: e8 51 00 00 00 call 110018 10ffc7: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10ffc9: 83 c4 14 add $0x14,%esp 10ffcc: 53 push %ebx 10ffcd: e8 86 fe ff ff call 10fe58 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ffd2: 59 pop %ecx 10ffd3: 58 pop %eax 10ffd4: 56 push %esi 10ffd5: 53 push %ebx 10ffd6: e8 d9 fe ff ff call 10feb4 10ffdb: 83 c4 10 add $0x10,%esp 10ffde: 85 c0 test %eax,%eax 10ffe0: 74 0a je 10ffec <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ffe2: 89 f8 mov %edi,%eax 10ffe4: 8d 65 f4 lea -0xc(%ebp),%esp 10ffe7: 5b pop %ebx 10ffe8: 5e pop %esi 10ffe9: 5f pop %edi 10ffea: c9 leave 10ffeb: 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 ); 10ffec: e8 13 51 00 00 call 115104 <__errno> <== NOT EXECUTED 10fff1: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10fff7: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10fffc: eb e4 jmp 10ffe2 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10fffe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110001: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 110006: e8 ed c2 ff ff call 10c2f8 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 11000b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11000e: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 110013: e8 e0 c2 ff ff call 10c2f8 <== NOT EXECUTED =============================================================================== 00114014 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 114014: 55 push %ebp 114015: 89 e5 mov %esp,%ebp 114017: 53 push %ebx 114018: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 11401b: 8b 45 08 mov 0x8(%ebp),%eax 11401e: 8b 18 mov (%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 114020: e8 ff cd ff ff call 110e24 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 114025: 66 3b 43 3c cmp 0x3c(%ebx),%ax 114029: 74 05 je 114030 <== ALWAYS TAKEN 11402b: 66 85 c0 test %ax,%ax <== NOT EXECUTED 11402e: 75 34 jne 114064 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 114030: 8b 45 0c mov 0xc(%ebp),%eax 114033: 25 ff 0f 00 00 and $0xfff,%eax 114038: 8b 53 30 mov 0x30(%ebx),%edx 11403b: 81 e2 00 f0 ff ff and $0xfffff000,%edx 114041: 09 d0 or %edx,%eax 114043: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 114046: 83 ec 08 sub $0x8,%esp 114049: 6a 00 push $0x0 11404b: 8d 45 f0 lea -0x10(%ebp),%eax 11404e: 50 push %eax 11404f: e8 0c 46 ff ff call 108660 114054: 8b 45 f0 mov -0x10(%ebp),%eax 114057: 89 43 48 mov %eax,0x48(%ebx) 11405a: 31 c0 xor %eax,%eax return 0; 11405c: 83 c4 10 add $0x10,%esp } 11405f: 8b 5d fc mov -0x4(%ebp),%ebx 114062: c9 leave 114063: c3 ret */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 114064: e8 9b 10 00 00 call 115104 <__errno> <== NOT EXECUTED 114069: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 11406f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 114074: eb e9 jmp 11405f <== NOT EXECUTED =============================================================================== 001108b0 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 1108b0: 55 push %ebp <== NOT EXECUTED 1108b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1108b3: 57 push %edi <== NOT EXECUTED 1108b4: 56 push %esi <== NOT EXECUTED 1108b5: 53 push %ebx <== NOT EXECUTED 1108b6: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 1108b9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1108bc: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 1108bf: 53 push %ebx <== NOT EXECUTED 1108c0: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 1108c3: 50 push %eax <== NOT EXECUTED 1108c4: e8 47 ee ff ff call 10f710 <== NOT EXECUTED 1108c9: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 1108cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1108ce: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 1108d1: 74 0d je 1108e0 <== 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); 1108d3: 7c 37 jl 11090c <== NOT EXECUTED } 1108d5: 89 f0 mov %esi,%eax <== NOT EXECUTED 1108d7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1108da: 5b pop %ebx <== NOT EXECUTED 1108db: 5e pop %esi <== NOT EXECUTED 1108dc: 5f pop %edi <== NOT EXECUTED 1108dd: c9 leave <== NOT EXECUTED 1108de: c3 ret <== NOT EXECUTED 1108df: 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; 1108e0: 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) 1108e7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1108ea: 57 push %edi <== NOT EXECUTED 1108eb: e8 9c 05 00 00 call 110e8c <== NOT EXECUTED 1108f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1108f3: 85 c0 test %eax,%eax <== NOT EXECUTED 1108f5: 75 de jne 1108d5 <== NOT EXECUTED 1108f7: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 1108fc: 75 d7 jne 1108d5 <== NOT EXECUTED free(jnode); 1108fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110901: 57 push %edi <== NOT EXECUTED 110902: e8 dd 7c ff ff call 1085e4 <== NOT EXECUTED 110907: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11090a: eb c9 jmp 1108d5 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 11090c: e8 f3 47 00 00 call 115104 <__errno> <== NOT EXECUTED 110911: f7 de neg %esi <== NOT EXECUTED 110913: 89 30 mov %esi,(%eax) <== NOT EXECUTED 110915: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 11091a: eb b9 jmp 1108d5 <== NOT EXECUTED =============================================================================== 00110780 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 110780: 55 push %ebp <== NOT EXECUTED 110781: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110783: 53 push %ebx <== NOT EXECUTED 110784: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 110787: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11078a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 11078d: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 110790: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 110796: 74 1c je 1107b4 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 110798: 50 push %eax <== NOT EXECUTED 110799: 51 push %ecx <== NOT EXECUTED 11079a: 52 push %edx <== NOT EXECUTED 11079b: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 11079e: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 1107a1: e8 4a eb ff ff call 10f2f0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 1107a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1107a9: 85 c0 test %eax,%eax <== NOT EXECUTED 1107ab: 78 3e js 1107eb <== NOT EXECUTED } 1107ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1107b0: c9 leave <== NOT EXECUTED 1107b1: c3 ret <== NOT EXECUTED 1107b2: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 1107b4: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1107b6: 74 20 je 1107d8 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 1107b8: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 1107ba: 85 d2 test %edx,%edx <== NOT EXECUTED 1107bc: 74 0e je 1107cc <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 1107be: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 1107c2: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 1107c4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1107c7: c9 leave <== NOT EXECUTED 1107c8: c3 ret <== NOT EXECUTED 1107c9: 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; 1107cc: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 1107d0: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 1107d2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1107d5: c9 leave <== NOT EXECUTED 1107d6: c3 ret <== NOT EXECUTED 1107d7: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 1107d8: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 1107dd: e8 22 49 00 00 call 115104 <__errno> <== NOT EXECUTED 1107e2: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1107e4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1107e9: eb c2 jmp 1107ad <== NOT EXECUTED 1107eb: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1107ed: f7 db neg %ebx <== NOT EXECUTED 1107ef: eb ec jmp 1107dd <== NOT EXECUTED =============================================================================== 0011073c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 11073c: 55 push %ebp <== NOT EXECUTED 11073d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11073f: 53 push %ebx <== NOT EXECUTED 110740: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 110743: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 110746: 50 push %eax <== NOT EXECUTED 110747: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 11074a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 11074d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110750: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 110753: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 110756: e8 35 eb ff ff call 10f290 <== NOT EXECUTED 11075b: 89 c3 mov %eax,%ebx <== NOT EXECUTED 11075d: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 11075e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 110761: 85 d2 test %edx,%edx <== NOT EXECUTED 110763: 78 05 js 11076a <== NOT EXECUTED } 110765: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110768: c9 leave <== NOT EXECUTED 110769: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 11076a: e8 95 49 00 00 call 115104 <__errno> <== NOT EXECUTED 11076f: f7 db neg %ebx <== NOT EXECUTED 110771: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 110773: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110778: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11077d: eb e6 jmp 110765 <== NOT EXECUTED =============================================================================== 0011091c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11091c: 55 push %ebp 11091d: 89 e5 mov %esp,%ebp 11091f: 53 push %ebx 110920: 83 ec 0c sub $0xc,%esp 110923: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 110926: 50 push %eax 110927: 8b 40 38 mov 0x38(%eax),%eax 11092a: 83 c0 50 add $0x50,%eax 11092d: 50 push %eax 11092e: e8 f1 ee ff ff call 10f824 110933: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 110935: 83 c4 10 add $0x10,%esp 110938: 85 c0 test %eax,%eax 11093a: 78 07 js 110943 <== ALWAYS TAKEN } 11093c: 89 d8 mov %ebx,%eax 11093e: 8b 5d fc mov -0x4(%ebp),%ebx 110941: c9 leave 110942: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 110943: e8 bc 47 00 00 call 115104 <__errno> 110948: f7 db neg %ebx 11094a: 89 18 mov %ebx,(%eax) 11094c: bb ff ff ff ff mov $0xffffffff,%ebx 110951: eb e9 jmp 11093c =============================================================================== 00110854 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 110854: 55 push %ebp <== NOT EXECUTED 110855: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110857: 56 push %esi <== NOT EXECUTED 110858: 53 push %ebx <== NOT EXECUTED 110859: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 11085c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 11085f: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 110862: 50 push %eax <== NOT EXECUTED 110863: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 110866: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110869: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 11086c: e8 df ea ff ff call 10f350 <== NOT EXECUTED 110871: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 110873: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110876: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110879: 7e 21 jle 11089c <== NOT EXECUTED IMFS_update_atime(jnode); 11087b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11087e: 6a 00 push $0x0 <== NOT EXECUTED 110880: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 110883: 50 push %eax <== NOT EXECUTED 110884: e8 d7 7d ff ff call 108660 <== NOT EXECUTED 110889: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 11088c: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 11088f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 110892: 89 d8 mov %ebx,%eax <== NOT EXECUTED 110894: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110897: 5b pop %ebx <== NOT EXECUTED 110898: 5e pop %esi <== NOT EXECUTED 110899: c9 leave <== NOT EXECUTED 11089a: c3 ret <== NOT EXECUTED 11089b: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 11089c: 74 f4 je 110892 <== NOT EXECUTED 11089e: e8 61 48 00 00 call 115104 <__errno> <== NOT EXECUTED 1108a3: f7 db neg %ebx <== NOT EXECUTED 1108a5: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 1108a7: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 1108ac: eb e4 jmp 110892 <== NOT EXECUTED =============================================================================== 001107f4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 1107f4: 55 push %ebp <== NOT EXECUTED 1107f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1107f7: 56 push %esi <== NOT EXECUTED 1107f8: 53 push %ebx <== NOT EXECUTED 1107f9: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1107fc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1107ff: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 110802: 50 push %eax <== NOT EXECUTED 110803: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 110806: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110809: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 11080c: e8 ff ec ff ff call 10f510 <== NOT EXECUTED 110811: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 110813: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110816: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110819: 7e 25 jle 110840 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 11081b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11081e: 6a 00 push $0x0 <== NOT EXECUTED 110820: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 110823: 50 push %eax <== NOT EXECUTED 110824: e8 37 7e ff ff call 108660 <== NOT EXECUTED 110829: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 11082c: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 11082f: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 110832: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 110835: 89 f0 mov %esi,%eax <== NOT EXECUTED 110837: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11083a: 5b pop %ebx <== NOT EXECUTED 11083b: 5e pop %esi <== NOT EXECUTED 11083c: c9 leave <== NOT EXECUTED 11083d: c3 ret <== NOT EXECUTED 11083e: 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); 110840: 74 f3 je 110835 <== NOT EXECUTED 110842: e8 bd 48 00 00 call 115104 <__errno> <== NOT EXECUTED 110847: f7 de neg %esi <== NOT EXECUTED 110849: 89 30 mov %esi,(%eax) <== NOT EXECUTED 11084b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 110850: eb e3 jmp 110835 <== NOT EXECUTED =============================================================================== 001109f4 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 1109f4: 55 push %ebp 1109f5: 89 e5 mov %esp,%ebp 1109f7: 57 push %edi 1109f8: 56 push %esi 1109f9: 53 push %ebx 1109fa: 83 ec 0c sub $0xc,%esp 1109fd: 8b 45 08 mov 0x8(%ebp),%eax 110a00: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 110a03: 85 c0 test %eax,%eax 110a05: 74 67 je 110a6e <== NEVER TAKEN if ( !name ) 110a07: 85 db test %ebx,%ebx 110a09: 74 2d je 110a38 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 110a0b: bf 57 30 12 00 mov $0x123057,%edi 110a10: b9 02 00 00 00 mov $0x2,%ecx 110a15: 89 de mov %ebx,%esi 110a17: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110a19: 74 13 je 110a2e <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 110a1b: bf 59 30 12 00 mov $0x123059,%edi 110a20: b9 03 00 00 00 mov $0x3,%ecx 110a25: 89 de mov %ebx,%esi 110a27: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110a29: 75 19 jne 110a44 <== ALWAYS TAKEN return directory->Parent; 110a2b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 110a2e: 8d 65 f4 lea -0xc(%ebp),%esp 110a31: 5b pop %ebx 110a32: 5e pop %esi 110a33: 5f pop %edi 110a34: c9 leave 110a35: c3 ret 110a36: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110a38: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 110a3a: 8d 65 f4 lea -0xc(%ebp),%esp 110a3d: 5b pop %ebx 110a3e: 5e pop %esi 110a3f: 5f pop %edi 110a40: c9 leave 110a41: c3 ret 110a42: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110a44: 8b 70 50 mov 0x50(%eax),%esi 110a47: 8d 78 54 lea 0x54(%eax),%edi 110a4a: 39 fe cmp %edi,%esi 110a4c: 75 08 jne 110a56 110a4e: eb e8 jmp 110a38 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 110a50: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 110a52: 39 fe cmp %edi,%esi 110a54: 74 e2 je 110a38 !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 ) ) 110a56: 8d 46 0c lea 0xc(%esi),%eax 110a59: 83 ec 08 sub $0x8,%esp 110a5c: 50 push %eax 110a5d: 53 push %ebx 110a5e: e8 69 51 00 00 call 115bcc 110a63: 83 c4 10 add $0x10,%esp 110a66: 85 c0 test %eax,%eax 110a68: 75 e6 jne 110a50 110a6a: 89 f0 mov %esi,%eax 110a6c: eb c0 jmp 110a2e /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 110a6e: 68 f8 2f 12 00 push $0x122ff8 <== NOT EXECUTED 110a73: 68 5c 30 12 00 push $0x12305c <== NOT EXECUTED 110a78: 6a 2a push $0x2a <== NOT EXECUTED 110a7a: 68 04 30 12 00 push $0x123004 <== NOT EXECUTED 110a7f: e8 20 78 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 0011095c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 11095c: 55 push %ebp 11095d: 89 e5 mov %esp,%ebp 11095f: 57 push %edi 110960: 56 push %esi 110961: 53 push %ebx 110962: 83 ec 3c sub $0x3c,%esp 110965: 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; 110968: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 11096b: 8d 55 d4 lea -0x2c(%ebp),%edx 11096e: 89 55 c4 mov %edx,-0x3c(%ebp) 110971: 8d 70 1c lea 0x1c(%eax),%esi 110974: b9 05 00 00 00 mov $0x5,%ecx 110979: 89 d7 mov %edx,%edi 11097b: 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; 11097d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 110984: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 110987: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 11098a: 83 ec 0c sub $0xc,%esp 11098d: 8d 45 d4 lea -0x2c(%ebp),%eax 110990: 50 push %eax 110991: e8 c2 f4 ff ff call 10fe58 if ( jnode->type != IMFS_DIRECTORY ) { 110996: 83 c4 10 add $0x10,%esp 110999: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 11099d: 75 2d jne 1109cc */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11099f: 8d 43 54 lea 0x54(%ebx),%eax 1109a2: 39 43 50 cmp %eax,0x50(%ebx) 1109a5: 74 3e je 1109e5 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 1109a7: 85 db test %ebx,%ebx 1109a9: 74 15 je 1109c0 if ( jnode->type == IMFS_DIRECTORY ) { 1109ab: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 1109af: 75 d3 jne 110984 <== NEVER TAKEN 1109b1: 8d 43 54 lea 0x54(%ebx),%eax 1109b4: 39 43 50 cmp %eax,0x50(%ebx) 1109b7: 74 cb je 110984 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 1109b9: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 1109bc: 85 db test %ebx,%ebx 1109be: 75 c4 jne 110984 <== ALWAYS TAKEN 1109c0: 31 c0 xor %eax,%eax return 0; } 1109c2: 8d 65 f4 lea -0xc(%ebp),%esp 1109c5: 5b pop %ebx 1109c6: 5e pop %esi 1109c7: 5f pop %edi 1109c8: c9 leave 1109c9: c3 ret 1109ca: 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 ); 1109cc: 83 ec 08 sub $0x8,%esp 1109cf: 8d 55 d4 lea -0x2c(%ebp),%edx 1109d2: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1109d3: 6a 00 push $0x0 1109d5: e8 7a 76 ff ff call 108054 if (result != 0) 1109da: 83 c4 10 add $0x10,%esp 1109dd: 85 c0 test %eax,%eax 1109df: 75 0d jne 1109ee <== NEVER TAKEN 1109e1: 89 f3 mov %esi,%ebx 1109e3: eb c2 jmp 1109a7 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 1109e5: 83 ec 08 sub $0x8,%esp 1109e8: 8d 45 d4 lea -0x2c(%ebp),%eax 1109eb: 50 push %eax 1109ec: eb e5 jmp 1109d3 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 1109ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1109f1: eb cf jmp 1109c2 <== NOT EXECUTED =============================================================================== 00110a84 : const char *path, int pathlen, char *token, int *token_len ) { 110a84: 55 push %ebp 110a85: 89 e5 mov %esp,%ebp 110a87: 57 push %edi 110a88: 56 push %esi 110a89: 53 push %ebx 110a8a: 83 ec 1c sub $0x1c,%esp 110a8d: 8b 7d 08 mov 0x8(%ebp),%edi 110a90: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 110a93: 8a 17 mov (%edi),%dl 110a95: 31 f6 xor %esi,%esi 110a97: 89 7d e4 mov %edi,-0x1c(%ebp) 110a9a: 89 df mov %ebx,%edi 110a9c: 88 d3 mov %dl,%bl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 110a9e: eb 07 jmp 110aa7 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 110aa0: 46 inc %esi 110aa1: 8b 45 e4 mov -0x1c(%ebp),%eax 110aa4: 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) ) { 110aa7: 83 ec 0c sub $0xc,%esp 110aaa: 0f be c3 movsbl %bl,%eax 110aad: 50 push %eax 110aae: e8 f9 89 ff ff call 1094ac 110ab3: 83 c4 10 add $0x10,%esp 110ab6: 85 c0 test %eax,%eax 110ab8: 75 1a jne 110ad4 110aba: 3b 75 0c cmp 0xc(%ebp),%esi 110abd: 7d 15 jge 110ad4 token[i] = c; 110abf: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 110ac2: 83 fe 20 cmp $0x20,%esi 110ac5: 75 d9 jne 110aa0 110ac7: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 110acc: 8d 65 f4 lea -0xc(%ebp),%esp 110acf: 5b pop %ebx 110ad0: 5e pop %esi 110ad1: 5f pop %edi 110ad2: c9 leave 110ad3: c3 ret 110ad4: 88 da mov %bl,%dl 110ad6: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 110ad8: 85 f6 test %esi,%esi 110ada: 75 14 jne 110af0 token[i] = c; 110adc: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 110ade: 84 d2 test %dl,%dl 110ae0: 74 07 je 110ae9 110ae2: 8b 45 0c mov 0xc(%ebp),%eax 110ae5: 85 c0 test %eax,%eax 110ae7: 75 63 jne 110b4c type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 110ae9: 31 c0 xor %eax,%eax 110aeb: eb 68 jmp 110b55 110aed: 8d 76 00 lea 0x0(%esi),%esi i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 110af0: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 110af5: 74 04 je 110afb <== NEVER TAKEN token[i] = '\0'; 110af7: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 110afb: 8b 45 14 mov 0x14(%ebp),%eax 110afe: 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 ) 110b00: bf 73 30 12 00 mov $0x123073,%edi 110b05: b9 03 00 00 00 mov $0x3,%ecx 110b0a: 89 de mov %ebx,%esi 110b0c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110b0e: 75 10 jne 110b20 110b10: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 110b15: 8d 65 f4 lea -0xc(%ebp),%esp 110b18: 5b pop %ebx 110b19: 5e pop %esi 110b1a: 5f pop %edi 110b1b: c9 leave 110b1c: c3 ret 110b1d: 8d 76 00 lea 0x0(%esi),%esi */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 110b20: bf 74 30 12 00 mov $0x123074,%edi 110b25: b9 02 00 00 00 mov $0x2,%ecx 110b2a: 89 de mov %ebx,%esi 110b2c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 110b2e: 0f 97 c0 seta %al 110b31: 0f 92 c2 setb %dl 110b34: 28 d0 sub %dl,%al 110b36: 0f be c0 movsbl %al,%eax 110b39: 83 f8 01 cmp $0x1,%eax 110b3c: 19 c0 sbb %eax,%eax 110b3e: 83 e0 fe and $0xfffffffe,%eax 110b41: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 110b44: 8d 65 f4 lea -0xc(%ebp),%esp 110b47: 5b pop %ebx 110b48: 5e pop %esi 110b49: 5f pop %edi 110b4a: c9 leave 110b4b: c3 ret */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 110b4c: b8 01 00 00 00 mov $0x1,%eax 110b51: 66 be 01 00 mov $0x1,%si /* * Set token_len to the number of characters copied. */ *token_len = i; 110b55: 8b 55 14 mov 0x14(%ebp),%edx 110b58: 89 32 mov %esi,(%edx) 110b5a: e9 6d ff ff ff jmp 110acc =============================================================================== 00107c7c : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 107c7c: 55 push %ebp 107c7d: 89 e5 mov %esp,%ebp 107c7f: 57 push %edi 107c80: 56 push %esi 107c81: 53 push %ebx 107c82: 83 ec 0c sub $0xc,%esp 107c85: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 107c88: 8b 0d 50 51 12 00 mov 0x125150,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107c8e: 83 f9 10 cmp $0x10,%ecx 107c91: 74 18 je 107cab <== NEVER TAKEN 107c93: 31 d2 xor %edx,%edx 107c95: b8 20 00 00 00 mov $0x20,%eax 107c9a: 39 c1 cmp %eax,%ecx 107c9c: 74 0d je 107cab 107c9e: d1 e0 shl %eax 107ca0: 42 inc %edx 107ca1: 83 fa 05 cmp $0x5,%edx 107ca4: 75 f4 jne 107c9a <== ALWAYS TAKEN 107ca6: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 107cab: 89 0d 38 8f 12 00 mov %ecx,0x128f38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 107cb1: e8 62 80 00 00 call 10fd18 107cb6: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 107cb9: 8b 45 14 mov 0x14(%ebp),%eax 107cbc: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107cbf: 8b 45 0c mov 0xc(%ebp),%eax 107cc2: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107cc5: 8d 7b 38 lea 0x38(%ebx),%edi 107cc8: be 80 2e 12 00 mov $0x122e80,%esi 107ccd: b9 0c 00 00 00 mov $0xc,%ecx 107cd2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107cd4: 83 ec 08 sub $0x8,%esp 107cd7: 6a 10 push $0x10 107cd9: 6a 01 push $0x1 107cdb: e8 ec 06 00 00 call 1083cc if ( !fs_info ) { 107ce0: 83 c4 10 add $0x10,%esp 107ce3: 85 c0 test %eax,%eax 107ce5: 74 3e je 107d25 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 107ce7: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 107cea: 8b 15 3c 8f 12 00 mov 0x128f3c,%edx 107cf0: 89 10 mov %edx,(%eax) 107cf2: 42 inc %edx 107cf3: 89 15 3c 8f 12 00 mov %edx,0x128f3c fs_info->ino_count = 1; 107cf9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 107d00: 8b 55 10 mov 0x10(%ebp),%edx 107d03: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 107d06: 8b 55 14 mov 0x14(%ebp),%edx 107d09: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 107d0c: 8b 43 1c mov 0x1c(%ebx),%eax 107d0f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 107d16: e8 81 75 00 00 call 10f29c 107d1b: 31 c0 xor %eax,%eax return 0; } 107d1d: 8d 65 f4 lea -0xc(%ebp),%esp 107d20: 5b pop %ebx 107d21: 5e pop %esi 107d22: 5f pop %edi 107d23: c9 leave 107d24: c3 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 107d25: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d28: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 107d2b: e8 b4 08 00 00 call 1085e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107d30: e8 cf d3 00 00 call 115104 <__errno> <== NOT EXECUTED 107d35: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d43: eb d8 jmp 107d1d <== NOT EXECUTED =============================================================================== 00107d48 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107d48: 55 push %ebp 107d49: 89 e5 mov %esp,%ebp 107d4b: 57 push %edi 107d4c: 53 push %ebx 107d4d: 83 ec 50 sub $0x50,%esp 107d50: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 107d53: 8b 45 08 mov 0x8(%ebp),%eax 107d56: 8b 00 mov (%eax),%eax 107d58: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107d5b: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107d60: 77 66 ja 107dc8 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107d62: 31 c0 xor %eax,%eax 107d64: b9 ff ff ff ff mov $0xffffffff,%ecx 107d69: 89 d7 mov %edx,%edi 107d6b: f2 ae repnz scas %es:(%edi),%al 107d6d: f7 d1 not %ecx 107d6f: 49 dec %ecx 107d70: 8d 45 f4 lea -0xc(%ebp),%eax 107d73: 50 push %eax 107d74: 8d 5d b7 lea -0x49(%ebp),%ebx 107d77: 53 push %ebx 107d78: 51 push %ecx 107d79: 52 push %edx 107d7a: e8 05 8d 00 00 call 110a84 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107d7f: 8d 45 d8 lea -0x28(%ebp),%eax 107d82: 89 04 24 mov %eax,(%esp) 107d85: 68 ff a1 00 00 push $0xa1ff 107d8a: 53 push %ebx 107d8b: 6a 03 push $0x3 107d8d: ff 75 0c pushl 0xc(%ebp) 107d90: e8 b7 7f 00 00 call 10fd4c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107d95: 83 c4 20 add $0x20,%esp 107d98: 85 c0 test %eax,%eax 107d9a: 74 3e je 107dda <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107d9c: 8b 45 d8 mov -0x28(%ebp),%eax 107d9f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107da3: 83 ec 08 sub $0x8,%esp 107da6: 6a 00 push $0x0 107da8: 8d 45 ec lea -0x14(%ebp),%eax 107dab: 50 push %eax 107dac: e8 af 08 00 00 call 108660 107db1: 8b 55 ec mov -0x14(%ebp),%edx 107db4: 8b 45 d8 mov -0x28(%ebp),%eax 107db7: 89 50 48 mov %edx,0x48(%eax) 107dba: 31 c0 xor %eax,%eax return 0; 107dbc: 83 c4 10 add $0x10,%esp } 107dbf: 8d 65 f8 lea -0x8(%ebp),%esp 107dc2: 5b pop %ebx 107dc3: 5f pop %edi 107dc4: c9 leave 107dc5: c3 ret 107dc6: 66 90 xchg %ax,%ax /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 107dc8: e8 37 d3 00 00 call 115104 <__errno> 107dcd: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107dd3: b8 ff ff ff ff mov $0xffffffff,%eax 107dd8: eb e5 jmp 107dbf ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107dda: e8 25 d3 00 00 call 115104 <__errno> <== NOT EXECUTED 107ddf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107de5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107dea: eb d3 jmp 107dbf <== NOT EXECUTED =============================================================================== 0011304c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 11304c: 55 push %ebp 11304d: 89 e5 mov %esp,%ebp 11304f: 53 push %ebx 113050: 83 ec 04 sub $0x4,%esp 113053: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 113056: 85 c0 test %eax,%eax 113058: 74 50 je 1130aa <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11305a: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11305e: 75 31 jne 113091 <== 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 ); 113060: 52 push %edx 113061: 6a 01 push $0x1 113063: ff 75 0c pushl 0xc(%ebp) 113066: 50 push %eax 113067: e8 b8 fa ff ff call 112b24 11306c: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 11306e: 83 c4 10 add $0x10,%esp 113071: 8b 00 mov (%eax),%eax 113073: 85 c0 test %eax,%eax 113075: 74 09 je 113080 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 113077: 31 c0 xor %eax,%eax return 0; } 113079: 8b 5d fc mov -0x4(%ebp),%ebx 11307c: c9 leave 11307d: c3 ret 11307e: 66 90 xchg %ax,%ax #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 113080: e8 7b fa ff ff call 112b00 if ( !memory ) 113085: 85 c0 test %eax,%eax 113087: 74 04 je 11308d <== NEVER TAKEN return 1; *block_entry_ptr = memory; 113089: 89 03 mov %eax,(%ebx) 11308b: eb ea jmp 113077 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 11308d: b0 01 mov $0x1,%al <== NOT EXECUTED 11308f: eb e8 jmp 113079 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113091: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED 113096: 68 87 35 12 00 push $0x123587 <== NOT EXECUTED 11309b: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 1130a0: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1130a5: e8 fa 51 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 1130aa: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 1130af: 68 87 35 12 00 push $0x123587 <== NOT EXECUTED 1130b4: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 1130b9: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1130be: e8 e1 51 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 001130c4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1130c4: 55 push %ebp 1130c5: 89 e5 mov %esp,%ebp 1130c7: 57 push %edi 1130c8: 56 push %esi 1130c9: 53 push %ebx 1130ca: 83 ec 2c sub $0x2c,%esp 1130cd: 8b 5d 08 mov 0x8(%ebp),%ebx 1130d0: 8b 45 0c mov 0xc(%ebp),%eax 1130d3: 8b 55 10 mov 0x10(%ebp),%edx 1130d6: 89 45 d8 mov %eax,-0x28(%ebp) 1130d9: 89 55 dc mov %edx,-0x24(%ebp) /* * Perform internal consistency checks */ assert( the_jnode ); 1130dc: 85 db test %ebx,%ebx 1130de: 0f 84 29 01 00 00 je 11320d <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1130e4: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1130e8: 0f 85 06 01 00 00 jne 1131f4 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 1130ee: a1 38 8f 12 00 mov 0x128f38,%eax 1130f3: 89 c1 mov %eax,%ecx 1130f5: c1 e9 02 shr $0x2,%ecx 1130f8: 8d 51 01 lea 0x1(%ecx),%edx 1130fb: 0f af d1 imul %ecx,%edx 1130fe: 42 inc %edx 1130ff: 0f af d1 imul %ecx,%edx 113102: 4a dec %edx 113103: 0f af d0 imul %eax,%edx 113106: 31 c9 xor %ecx,%ecx 113108: 3b 4d dc cmp -0x24(%ebp),%ecx 11310b: 7f 1c jg 113129 <== NEVER TAKEN 11310d: 7d 15 jge 113124 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11310f: e8 f0 1f 00 00 call 115104 <__errno> <== NOT EXECUTED 113114: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11311a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11311f: e9 9e 00 00 00 jmp 1131c2 <== 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 ) 113124: 3b 55 d8 cmp -0x28(%ebp),%edx 113127: 76 e6 jbe 11310f <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 113129: 8b 53 50 mov 0x50(%ebx),%edx 11312c: 8b 4b 54 mov 0x54(%ebx),%ecx 11312f: 89 55 e0 mov %edx,-0x20(%ebp) 113132: 89 4d e4 mov %ecx,-0x1c(%ebp) 113135: 39 4d dc cmp %ecx,-0x24(%ebp) 113138: 0f 8e 8e 00 00 00 jle 1131cc <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 11313e: 89 45 d0 mov %eax,-0x30(%ebp) 113141: 89 c1 mov %eax,%ecx 113143: c1 f9 1f sar $0x1f,%ecx 113146: 89 4d d4 mov %ecx,-0x2c(%ebp) 113149: ff 75 d4 pushl -0x2c(%ebp) 11314c: ff 75 d0 pushl -0x30(%ebp) 11314f: ff 75 dc pushl -0x24(%ebp) 113152: ff 75 d8 pushl -0x28(%ebp) 113155: e8 e2 cf 00 00 call 12013c <__divdi3> 11315a: 83 c4 10 add $0x10,%esp 11315d: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 11315f: ff 75 d4 pushl -0x2c(%ebp) 113162: ff 75 d0 pushl -0x30(%ebp) 113165: ff 75 e4 pushl -0x1c(%ebp) 113168: ff 75 e0 pushl -0x20(%ebp) 11316b: e8 cc cf 00 00 call 12013c <__divdi3> 113170: 83 c4 10 add $0x10,%esp 113173: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 113176: 39 c6 cmp %eax,%esi 113178: 72 6a jb 1131e4 <== NEVER TAKEN 11317a: 89 c7 mov %eax,%edi 11317c: eb 07 jmp 113185 11317e: 66 90 xchg %ax,%ax 113180: 47 inc %edi 113181: 39 fe cmp %edi,%esi 113183: 72 5f jb 1131e4 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 113185: 83 ec 08 sub $0x8,%esp 113188: 57 push %edi 113189: 53 push %ebx 11318a: e8 bd fe ff ff call 11304c 11318f: 83 c4 10 add $0x10,%esp 113192: 85 c0 test %eax,%eax 113194: 74 ea je 113180 <== ALWAYS TAKEN for ( ; block>=old_blocks ; block-- ) { 113196: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 113199: 77 17 ja 1131b2 <== NOT EXECUTED 11319b: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 11319e: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 1131a0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1131a3: 57 push %edi <== NOT EXECUTED 1131a4: 53 push %ebx <== NOT EXECUTED 1131a5: e8 d6 fb ff ff call 112d80 <== 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-- ) { 1131aa: 4f dec %edi <== NOT EXECUTED 1131ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1131ae: 39 fe cmp %edi,%esi <== NOT EXECUTED 1131b0: 76 ee jbe 1131a0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1131b2: e8 4d 1f 00 00 call 115104 <__errno> <== NOT EXECUTED 1131b7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1131bd: 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; } 1131c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1131c5: 5b pop %ebx <== NOT EXECUTED 1131c6: 5e pop %esi <== NOT EXECUTED 1131c7: 5f pop %edi <== NOT EXECUTED 1131c8: c9 leave <== NOT EXECUTED 1131c9: c3 ret <== NOT EXECUTED 1131ca: 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 ) 1131cc: 7c 09 jl 1131d7 <== NEVER TAKEN 1131ce: 39 55 d8 cmp %edx,-0x28(%ebp) 1131d1: 0f 87 67 ff ff ff ja 11313e /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1131d7: 31 c0 xor %eax,%eax return 0; } 1131d9: 8d 65 f4 lea -0xc(%ebp),%esp 1131dc: 5b pop %ebx 1131dd: 5e pop %esi 1131de: 5f pop %edi 1131df: c9 leave 1131e0: c3 ret 1131e1: 8d 76 00 lea 0x0(%esi),%esi /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1131e4: 8b 45 d8 mov -0x28(%ebp),%eax 1131e7: 8b 55 dc mov -0x24(%ebp),%edx 1131ea: 89 43 50 mov %eax,0x50(%ebx) 1131ed: 89 53 54 mov %edx,0x54(%ebx) 1131f0: 31 c0 xor %eax,%eax 1131f2: eb e5 jmp 1131d9 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1131f4: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED 1131f9: 68 9d 35 12 00 push $0x12359d <== NOT EXECUTED 1131fe: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 113203: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113208: e8 97 50 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 11320d: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 113212: 68 9d 35 12 00 push $0x12359d <== NOT EXECUTED 113217: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 11321c: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113221: e8 7e 50 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00112b24 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 112b24: 55 push %ebp 112b25: 89 e5 mov %esp,%ebp 112b27: 57 push %edi 112b28: 56 push %esi 112b29: 53 push %ebx 112b2a: 83 ec 1c sub $0x1c,%esp 112b2d: 8b 5d 08 mov 0x8(%ebp),%ebx 112b30: 8b 7d 0c mov 0xc(%ebp),%edi 112b33: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 112b36: 85 db test %ebx,%ebx 112b38: 0f 84 59 01 00 00 je 112c97 <== NEVER TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112b3e: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 112b42: 0f 85 68 01 00 00 jne 112cb0 <== NEVER TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 112b48: 8b 0d 38 8f 12 00 mov 0x128f38,%ecx 112b4e: c1 e9 02 shr $0x2,%ecx 112b51: 8d 41 ff lea -0x1(%ecx),%eax 112b54: 39 c7 cmp %eax,%edi 112b56: 76 44 jbe 112b9c <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 112b58: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 112b5b: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 112b5e: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 112b61: 39 d7 cmp %edx,%edi <== NOT EXECUTED 112b63: 77 57 ja 112bbc <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 112b65: 89 f8 mov %edi,%eax <== NOT EXECUTED 112b67: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 112b69: 31 d2 xor %edx,%edx <== NOT EXECUTED 112b6b: f7 f1 div %ecx <== NOT EXECUTED 112b6d: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 112b6f: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 112b72: 85 f6 test %esi,%esi <== NOT EXECUTED 112b74: 0f 84 96 00 00 00 je 112c10 <== NOT EXECUTED if ( !p ) { 112b7a: 85 c0 test %eax,%eax <== NOT EXECUTED 112b7c: 0f 84 dd 00 00 00 je 112c5f <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 112b82: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112b85: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 112b87: 85 c0 test %eax,%eax <== NOT EXECUTED 112b89: 0f 84 ba 00 00 00 je 112c49 <== 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 ]; 112b8f: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112b92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112b95: 5b pop %ebx <== NOT EXECUTED 112b96: 5e pop %esi <== NOT EXECUTED 112b97: 5f pop %edi <== NOT EXECUTED 112b98: c9 leave <== NOT EXECUTED 112b99: c3 ret <== NOT EXECUTED 112b9a: 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; 112b9c: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 112b9f: 85 f6 test %esi,%esi 112ba1: 0f 84 85 00 00 00 je 112c2c if ( !p ) { 112ba7: 85 c0 test %eax,%eax 112ba9: 0f 84 89 00 00 00 je 112c38 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 112baf: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 112bb2: 8d 65 f4 lea -0xc(%ebp),%esp 112bb5: 5b pop %ebx 112bb6: 5e pop %esi 112bb7: 5f pop %edi 112bb8: c9 leave 112bb9: c3 ret 112bba: 66 90 xchg %ax,%ax #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 112bbc: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 112bbf: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 112bc2: 4a dec %edx <== NOT EXECUTED 112bc3: 39 d7 cmp %edx,%edi <== NOT EXECUTED 112bc5: 77 59 ja 112c20 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 112bc7: 29 c7 sub %eax,%edi <== NOT EXECUTED 112bc9: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 112bcb: 31 d2 xor %edx,%edx <== NOT EXECUTED 112bcd: f7 f1 div %ecx <== NOT EXECUTED 112bcf: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 112bd1: 31 d2 xor %edx,%edx <== NOT EXECUTED 112bd3: f7 f1 div %ecx <== NOT EXECUTED 112bd5: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 112bd7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 112bda: 85 f6 test %esi,%esi <== NOT EXECUTED 112bdc: 0f 84 9a 00 00 00 je 112c7c <== NOT EXECUTED if ( !p ) { 112be2: 85 c0 test %eax,%eax <== NOT EXECUTED 112be4: 0f 84 df 00 00 00 je 112cc9 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 112bea: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112bed: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 112bef: 85 c0 test %eax,%eax <== NOT EXECUTED 112bf1: 0f 84 f3 00 00 00 je 112cea <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 112bf7: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 112bfa: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 112bfc: 85 c0 test %eax,%eax <== NOT EXECUTED 112bfe: 75 af jne 112baf <== NOT EXECUTED p2 = memfile_alloc_block(); 112c00: e8 fb fe ff ff call 112b00 <== NOT EXECUTED if ( !p2 ) 112c05: 85 c0 test %eax,%eax <== NOT EXECUTED 112c07: 74 17 je 112c20 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 112c09: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112c0b: eb a2 jmp 112baf <== NOT EXECUTED 112c0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 112c10: 85 c0 test %eax,%eax <== NOT EXECUTED 112c12: 74 0c je 112c20 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 112c14: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 112c17: 85 c0 test %eax,%eax <== NOT EXECUTED 112c19: 0f 85 70 ff ff ff jne 112b8f <== NOT EXECUTED 112c1f: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c20: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112c22: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112c25: 5b pop %ebx <== NOT EXECUTED 112c26: 5e pop %esi <== NOT EXECUTED 112c27: 5f pop %edi <== NOT EXECUTED 112c28: c9 leave <== NOT EXECUTED 112c29: c3 ret <== NOT EXECUTED 112c2a: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 112c2c: 85 c0 test %eax,%eax 112c2e: 0f 85 7b ff ff ff jne 112baf <== ALWAYS TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c34: 31 c0 xor %eax,%eax 112c36: eb ea jmp 112c22 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112c38: e8 c3 fe ff ff call 112b00 if ( !p ) 112c3d: 85 c0 test %eax,%eax 112c3f: 74 df je 112c20 <== NEVER TAKEN return 0; info->indirect = p; 112c41: 89 43 58 mov %eax,0x58(%ebx) 112c44: e9 66 ff ff ff jmp 112baf info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112c49: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112c4c: e8 af fe ff ff call 112b00 <== NOT EXECUTED if ( !p1 ) 112c51: 85 c0 test %eax,%eax <== NOT EXECUTED 112c53: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112c56: 74 c8 je 112c20 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 112c58: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112c5a: e9 30 ff ff ff jmp 112b8f <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112c5f: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112c62: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 112c65: e8 96 fe ff ff call 112b00 <== NOT EXECUTED if ( !p ) 112c6a: 85 c0 test %eax,%eax <== NOT EXECUTED 112c6c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112c6f: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112c72: 74 ac je 112c20 <== NOT EXECUTED return 0; info->doubly_indirect = p; 112c74: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 112c77: e9 06 ff ff ff jmp 112b82 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 112c7c: 85 c0 test %eax,%eax <== NOT EXECUTED 112c7e: 74 a0 je 112c20 <== 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 ]; 112c80: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p1 ) 112c83: 85 c0 test %eax,%eax <== NOT EXECUTED 112c85: 74 99 je 112c20 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 112c87: 8b 14 90 mov (%eax,%edx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c8a: 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 ) 112c8d: 85 d2 test %edx,%edx <== NOT EXECUTED 112c8f: 0f 85 fd fe ff ff jne 112b92 <== NOT EXECUTED 112c95: eb 89 jmp 112c20 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112c97: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 112c9c: 68 f8 34 12 00 push $0x1234f8 <== NOT EXECUTED 112ca1: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 112ca6: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112cab: e8 f4 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112cb0: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED 112cb5: 68 f8 34 12 00 push $0x1234f8 <== NOT EXECUTED 112cba: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 112cbf: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112cc4: e8 db 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112cc9: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112ccc: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 112ccf: e8 2c fe ff ff call 112b00 <== NOT EXECUTED if ( !p ) 112cd4: 85 c0 test %eax,%eax <== NOT EXECUTED 112cd6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112cd9: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112cdc: 0f 84 3e ff ff ff je 112c20 <== NOT EXECUTED return 0; info->triply_indirect = p; 112ce2: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 112ce5: e9 00 ff ff ff jmp 112bea <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112cea: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112ced: e8 0e fe ff ff call 112b00 <== NOT EXECUTED if ( !p1 ) 112cf2: 85 c0 test %eax,%eax <== NOT EXECUTED 112cf4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112cf7: 0f 84 23 ff ff ff je 112c20 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 112cfd: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112cff: e9 f3 fe ff ff jmp 112bf7 <== NOT EXECUTED =============================================================================== 00113644 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 113644: 55 push %ebp 113645: 89 e5 mov %esp,%ebp 113647: 57 push %edi 113648: 56 push %esi 113649: 53 push %ebx 11364a: 83 ec 4c sub $0x4c,%esp 11364d: 8b 75 0c mov 0xc(%ebp),%esi 113650: 8b 7d 10 mov 0x10(%ebp),%edi 113653: 8b 45 18 mov 0x18(%ebp),%eax /* * Perform internal consistency checks */ assert( the_jnode ); 113656: 8b 55 08 mov 0x8(%ebp),%edx 113659: 85 d2 test %edx,%edx 11365b: 0f 84 8e 02 00 00 je 1138ef <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 113661: 8b 4d 08 mov 0x8(%ebp),%ecx 113664: 8b 51 4c mov 0x4c(%ecx),%edx 113667: 8d 4a fb lea -0x5(%edx),%ecx 11366a: 83 f9 01 cmp $0x1,%ecx 11366d: 0f 87 63 02 00 00 ja 1138d6 <== NEVER TAKEN /* * Error checks on arguments */ assert( dest ); 113673: 8b 5d 14 mov 0x14(%ebp),%ebx 113676: 85 db test %ebx,%ebx 113678: 0f 84 26 02 00 00 je 1138a4 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 11367e: 85 c0 test %eax,%eax 113680: 0f 84 f0 01 00 00 je 113876 <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 113686: 83 fa 06 cmp $0x6,%edx 113689: 0f 84 5d 01 00 00 je 1137ec <== 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; 11368f: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 113691: 8b 4d 08 mov 0x8(%ebp),%ecx 113694: 8b 49 50 mov 0x50(%ecx),%ecx 113697: 89 4d cc mov %ecx,-0x34(%ebp) 11369a: 8d 1c 30 lea (%eax,%esi,1),%ebx 11369d: 89 5d d0 mov %ebx,-0x30(%ebp) 1136a0: 31 c9 xor %ecx,%ecx 1136a2: 8b 5d 08 mov 0x8(%ebp),%ebx 1136a5: 3b 4b 54 cmp 0x54(%ebx),%ecx 1136a8: 0f 8e e2 00 00 00 jle 113790 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 1136ae: 8b 5d cc mov -0x34(%ebp),%ebx 1136b1: 29 d3 sub %edx,%ebx 1136b3: 89 5d cc mov %ebx,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1136b6: a1 38 8f 12 00 mov 0x128f38,%eax 1136bb: 89 45 d0 mov %eax,-0x30(%ebp) 1136be: 99 cltd 1136bf: 89 d3 mov %edx,%ebx 1136c1: 52 push %edx 1136c2: 50 push %eax 1136c3: 57 push %edi 1136c4: 56 push %esi 1136c5: 89 45 c0 mov %eax,-0x40(%ebp) 1136c8: e8 bf cb 00 00 call 12028c <__moddi3> 1136cd: 83 c4 10 add $0x10,%esp 1136d0: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1136d3: 8b 4d c0 mov -0x40(%ebp),%ecx 1136d6: 53 push %ebx 1136d7: 51 push %ecx 1136d8: 57 push %edi 1136d9: 56 push %esi 1136da: e8 5d ca 00 00 call 12013c <__divdi3> 1136df: 83 c4 10 add $0x10,%esp 1136e2: 89 c3 mov %eax,%ebx if ( start_offset ) { 1136e4: 8b 4d c8 mov -0x38(%ebp),%ecx 1136e7: 85 c9 test %ecx,%ecx 1136e9: 0f 85 b1 00 00 00 jne 1137a0 1136ef: 8b 55 14 mov 0x14(%ebp),%edx 1136f2: 89 55 c8 mov %edx,-0x38(%ebp) 1136f5: 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 ) { 1136fc: 8b 55 d0 mov -0x30(%ebp),%edx 1136ff: 39 55 cc cmp %edx,-0x34(%ebp) 113702: 72 39 jb 11373d block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113704: 50 push %eax 113705: 6a 00 push $0x0 113707: 53 push %ebx 113708: ff 75 08 pushl 0x8(%ebp) 11370b: e8 14 f4 ff ff call 112b24 assert( block_ptr ); 113710: 83 c4 10 add $0x10,%esp 113713: 85 c0 test %eax,%eax 113715: 0f 84 70 01 00 00 je 11388b <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 11371b: 8b 30 mov (%eax),%esi 11371d: 8b 7d c8 mov -0x38(%ebp),%edi 113720: 8b 4d d0 mov -0x30(%ebp),%ecx 113723: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 113725: 89 7d c8 mov %edi,-0x38(%ebp) block++; 113728: 43 inc %ebx my_length -= to_copy; 113729: 8b 4d d0 mov -0x30(%ebp),%ecx 11372c: 29 4d cc sub %ecx,-0x34(%ebp) copied += to_copy; 11372f: 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 ) { 113732: 8b 7d cc mov -0x34(%ebp),%edi 113735: 39 3d 38 8f 12 00 cmp %edi,0x128f38 11373b: 76 c7 jbe 113704 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 11373d: 8b 7d cc mov -0x34(%ebp),%edi 113740: 85 ff test %edi,%edi 113742: 74 27 je 11376b block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113744: 56 push %esi 113745: 6a 00 push $0x0 113747: 53 push %ebx 113748: ff 75 08 pushl 0x8(%ebp) 11374b: e8 d4 f3 ff ff call 112b24 assert( block_ptr ); 113750: 83 c4 10 add $0x10,%esp 113753: 85 c0 test %eax,%eax 113755: 0f 84 62 01 00 00 je 1138bd <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 11375b: 8b 30 mov (%eax),%esi 11375d: 8b 7d c8 mov -0x38(%ebp),%edi 113760: 8b 4d cc mov -0x34(%ebp),%ecx 113763: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 113765: 8b 45 cc mov -0x34(%ebp),%eax 113768: 01 45 c4 add %eax,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 11376b: 83 ec 08 sub $0x8,%esp 11376e: 6a 00 push $0x0 113770: 8d 45 e0 lea -0x20(%ebp),%eax 113773: 50 push %eax 113774: e8 e7 4e ff ff call 108660 113779: 8b 45 e0 mov -0x20(%ebp),%eax 11377c: 8b 55 08 mov 0x8(%ebp),%edx 11377f: 89 42 40 mov %eax,0x40(%edx) return copied; 113782: 8b 45 c4 mov -0x3c(%ebp),%eax 113785: 83 c4 10 add $0x10,%esp } 113788: 8d 65 f4 lea -0xc(%ebp),%esp 11378b: 5b pop %ebx 11378c: 5e pop %esi 11378d: 5f pop %edi 11378e: c9 leave 11378f: 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 ) 113790: 0f 8d ba 00 00 00 jge 113850 <== ALWAYS TAKEN 113796: 89 45 cc mov %eax,-0x34(%ebp) 113799: e9 18 ff ff ff jmp 1136b6 11379e: 66 90 xchg %ax,%ax block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1137a0: 52 push %edx 1137a1: 6a 00 push $0x0 1137a3: 53 push %ebx 1137a4: ff 75 08 pushl 0x8(%ebp) 1137a7: e8 78 f3 ff ff call 112b24 assert( block_ptr ); 1137ac: 83 c4 10 add $0x10,%esp 1137af: 85 c0 test %eax,%eax 1137b1: 0f 84 51 01 00 00 je 113908 <== 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; 1137b7: 8b 4d d0 mov -0x30(%ebp),%ecx 1137ba: 2b 4d c8 sub -0x38(%ebp),%ecx 1137bd: 8b 55 cc mov -0x34(%ebp),%edx 1137c0: 39 ca cmp %ecx,%edx 1137c2: 0f 87 9c 00 00 00 ja 113864 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 ); 1137c8: 8b 75 c8 mov -0x38(%ebp),%esi 1137cb: 03 30 add (%eax),%esi dest += to_copy; 1137cd: 8b 7d 14 mov 0x14(%ebp),%edi 1137d0: 89 d1 mov %edx,%ecx 1137d2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1137d4: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1137d7: 43 inc %ebx my_length -= to_copy; 1137d8: 29 55 cc sub %edx,-0x34(%ebp) 1137db: a1 38 8f 12 00 mov 0x128f38,%eax 1137e0: 89 45 d0 mov %eax,-0x30(%ebp) 1137e3: 89 55 c4 mov %edx,-0x3c(%ebp) 1137e6: e9 11 ff ff ff jmp 1136fc 1137eb: 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; 1137ec: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1137ef: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED 1137f2: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1137f5: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1137f8: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED 1137fb: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED 1137fe: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 113801: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED 113804: 29 f2 sub %esi,%edx <== NOT EXECUTED 113806: 19 f9 sbb %edi,%ecx <== NOT EXECUTED 113808: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 11380b: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 11380e: 31 db xor %ebx,%ebx <== NOT EXECUTED 113810: 39 cb cmp %ecx,%ebx <== NOT EXECUTED 113812: 7e 58 jle 11386c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 113814: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 113817: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 113819: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED 11381c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 11381f: 89 d1 mov %edx,%ecx <== NOT EXECUTED 113821: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 113823: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 113826: 6a 00 push $0x0 <== NOT EXECUTED 113828: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 11382b: 50 push %eax <== NOT EXECUTED 11382c: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 11382f: e8 2c 4e ff ff call 108660 <== NOT EXECUTED 113834: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 113837: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 11383a: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 11383d: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 113840: 89 d0 mov %edx,%eax <== NOT EXECUTED 113842: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 113845: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113848: 5b pop %ebx <== NOT EXECUTED 113849: 5e pop %esi <== NOT EXECUTED 11384a: 5f pop %edi <== NOT EXECUTED 11384b: c9 leave <== NOT EXECUTED 11384c: c3 ret <== NOT EXECUTED 11384d: 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 ) 113850: 8b 4d cc mov -0x34(%ebp),%ecx 113853: 39 4d d0 cmp %ecx,-0x30(%ebp) 113856: 0f 87 52 fe ff ff ja 1136ae 11385c: e9 35 ff ff ff jmp 113796 113861: 8d 76 00 lea 0x0(%esi),%esi */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 113864: 89 ca mov %ecx,%edx 113866: e9 5d ff ff ff jmp 1137c8 11386b: 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)) 11386c: 7c 04 jl 113872 <== NOT EXECUTED 11386e: 39 d0 cmp %edx,%eax <== NOT EXECUTED 113870: 77 a2 ja 113814 <== NOT EXECUTED 113872: 89 c2 mov %eax,%edx <== NOT EXECUTED 113874: eb a3 jmp 113819 <== 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 ); 113876: e8 89 18 00 00 call 115104 <__errno> <== NOT EXECUTED 11387b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113881: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113886: e9 fd fe ff ff jmp 113788 <== 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 ); 11388b: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 113890: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 113895: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 11389a: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 11389f: e8 00 4a ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1138a4: 68 33 34 12 00 push $0x123433 <== NOT EXECUTED 1138a9: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 1138ae: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1138b3: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1138b8: e8 e7 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1138bd: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 1138c2: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 1138c7: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 1138cc: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1138d1: e8 ce 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 1138d6: 68 ac 34 12 00 push $0x1234ac <== NOT EXECUTED 1138db: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 1138e0: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1138e5: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1138ea: e8 b5 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1138ef: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 1138f4: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 1138f9: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 1138fe: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113903: e8 9c 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113908: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 11390d: 68 2a 35 12 00 push $0x12352a <== NOT EXECUTED 113912: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 113917: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 11391c: e8 83 49 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00112dcc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 112dcc: 55 push %ebp 112dcd: 89 e5 mov %esp,%ebp 112dcf: 57 push %edi 112dd0: 56 push %esi 112dd1: 53 push %ebx 112dd2: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 112dd5: 8b 55 08 mov 0x8(%ebp),%edx 112dd8: 85 d2 test %edx,%edx 112dda: 0f 84 61 01 00 00 je 112f41 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112de0: 8b 45 08 mov 0x8(%ebp),%eax 112de3: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 112de7: 0f 85 6d 01 00 00 jne 112f5a <== 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; 112ded: 8b 3d 38 8f 12 00 mov 0x128f38,%edi 112df3: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 112df6: 8b 55 08 mov 0x8(%ebp),%edx 112df9: 8b 42 58 mov 0x58(%edx),%eax 112dfc: 85 c0 test %eax,%eax 112dfe: 74 12 je 112e12 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 112e00: 83 ec 08 sub $0x8,%esp 112e03: 57 push %edi 112e04: 89 d0 mov %edx,%eax 112e06: 83 c0 58 add $0x58,%eax 112e09: 50 push %eax 112e0a: e8 f5 fe ff ff call 112d04 112e0f: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 112e12: 8b 4d 08 mov 0x8(%ebp),%ecx 112e15: 8b 51 5c mov 0x5c(%ecx),%edx 112e18: 85 d2 test %edx,%edx 112e1a: 74 57 je 112e73 <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED 112e28: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 112e2a: 31 db xor %ebx,%ebx <== NOT EXECUTED 112e2c: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 112e2f: eb 06 jmp 112e37 <== NOT EXECUTED 112e31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 112e34: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 112e37: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 112e3a: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 112e3e: 74 14 je 112e54 <== NOT EXECUTED memfile_free_blocks_in_table( 112e40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e43: 57 push %edi <== NOT EXECUTED 112e44: 01 ca add %ecx,%edx <== NOT EXECUTED 112e46: 52 push %edx <== NOT EXECUTED 112e47: e8 b8 fe ff ff call 112d04 <== NOT EXECUTED 112e4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112e4f: a1 38 8f 12 00 mov 0x128f38,%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 ); 112e60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e63: 57 push %edi <== NOT EXECUTED 112e64: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112e67: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 112e6a: 50 push %eax <== NOT EXECUTED 112e6b: e8 94 fe ff ff call 112d04 <== NOT EXECUTED 112e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 112e73: 8b 45 08 mov 0x8(%ebp),%eax 112e76: 8b 50 60 mov 0x60(%eax),%edx 112e79: 85 d2 test %edx,%edx 112e7b: 0f 84 b6 00 00 00 je 112f37 <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 112e91: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112e93: 85 f6 test %esi,%esi <== NOT EXECUTED 112e95: 0f 84 89 00 00 00 je 112f24 <== NOT EXECUTED 112e9b: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 112ea2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 112ea9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 112eb3: 31 d2 xor %edx,%edx <== NOT EXECUTED 112eb5: 31 db xor %ebx,%ebx <== NOT EXECUTED 112eb7: 90 nop <== NOT EXECUTED if ( p[j] ) { 112eb8: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112ebb: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 112ebe: 85 c9 test %ecx,%ecx <== NOT EXECUTED 112ec0: 74 15 je 112ed7 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 112ec2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112ec5: 57 push %edi <== NOT EXECUTED 112ec6: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 112ec9: 52 push %edx <== NOT EXECUTED 112eca: e8 35 fe ff ff call 112d04 <== NOT EXECUTED 112ecf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ed2: a1 38 8f 12 00 mov 0x128f38,%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( 112ee3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112ee6: 57 push %edi <== NOT EXECUTED 112ee7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 112eea: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112eed: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 112ef0: 50 push %eax <== NOT EXECUTED 112ef1: e8 0e fe ff ff call 112d04 <== 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 */ 112f0b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112f0e: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112f11: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 112f14: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112f17: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 112f1a: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112f1d: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112f20: 85 f6 test %esi,%esi <== NOT EXECUTED 112f22: 75 88 jne 112eac <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 112f24: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112f27: 57 push %edi <== NOT EXECUTED 112f28: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112f2b: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 112f2e: 50 push %eax <== NOT EXECUTED 112f2f: e8 d0 fd ff ff call 112d04 <== NOT EXECUTED 112f34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 112f37: 31 c0 xor %eax,%eax 112f39: 8d 65 f4 lea -0xc(%ebp),%esp 112f3c: 5b pop %ebx 112f3d: 5e pop %esi 112f3e: 5f pop %edi 112f3f: c9 leave 112f40: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 112f41: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 112f46: 68 3c 35 12 00 push $0x12353c <== NOT EXECUTED 112f4b: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 112f50: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112f55: e8 4a 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112f5a: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED 112f5f: 68 3c 35 12 00 push $0x12353c <== NOT EXECUTED 112f64: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 112f69: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112f6e: e8 31 53 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00112d80 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 112d80: 55 push %ebp <== NOT EXECUTED 112d81: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112d83: 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 ); 112d86: 6a 00 push $0x0 <== NOT EXECUTED 112d88: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 112d8b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112d8e: e8 91 fd ff ff call 112b24 <== NOT EXECUTED assert( block_ptr ); 112d93: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112d96: 85 c0 test %eax,%eax <== NOT EXECUTED 112d98: 74 18 je 112db2 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 112d9a: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 112d9c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 112da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112da5: 52 push %edx <== NOT EXECUTED 112da6: e8 39 fd ff ff call 112ae4 <== NOT EXECUTED } return 1; } 112dab: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 112db0: c9 leave <== NOT EXECUTED 112db1: 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 ); 112db2: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 112db7: 68 6d 35 12 00 push $0x12356d <== NOT EXECUTED 112dbc: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 112dc1: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112dc6: e8 d9 54 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00113314 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 113314: 55 push %ebp 113315: 89 e5 mov %esp,%ebp 113317: 57 push %edi 113318: 56 push %esi 113319: 53 push %ebx 11331a: 83 ec 3c sub $0x3c,%esp 11331d: 8b 5d 0c mov 0xc(%ebp),%ebx 113320: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 113323: 8b 4d 08 mov 0x8(%ebp),%ecx 113326: 85 c9 test %ecx,%ecx 113328: 0f 84 d8 01 00 00 je 113506 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11332e: 8b 45 08 mov 0x8(%ebp),%eax 113331: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 113335: 0f 85 b2 01 00 00 jne 1134ed <== NEVER TAKEN /* * Error check arguments */ assert( source ); 11333b: 8b 55 14 mov 0x14(%ebp),%edx 11333e: 85 d2 test %edx,%edx 113340: 0f 84 d9 01 00 00 je 11351f <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 113346: 8b 45 18 mov 0x18(%ebp),%eax 113349: 85 c0 test %eax,%eax 11334b: 0f 84 6c 01 00 00 je 1134bd <== 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 ) { 113351: 8b 45 18 mov 0x18(%ebp),%eax 113354: 01 d8 add %ebx,%eax 113356: 31 d2 xor %edx,%edx 113358: 8b 4d 08 mov 0x8(%ebp),%ecx 11335b: 3b 51 54 cmp 0x54(%ecx),%edx 11335e: 7c 10 jl 113370 <== NEVER TAKEN 113360: 0f 8f 26 01 00 00 jg 11348c <== NEVER TAKEN 113366: 3b 41 50 cmp 0x50(%ecx),%eax 113369: 0f 87 1d 01 00 00 ja 11348c <== ALWAYS TAKEN 11336f: 90 nop /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 113370: a1 38 8f 12 00 mov 0x128f38,%eax 113375: 89 45 d4 mov %eax,-0x2c(%ebp) 113378: 99 cltd 113379: 89 45 c8 mov %eax,-0x38(%ebp) 11337c: 89 55 cc mov %edx,-0x34(%ebp) 11337f: 52 push %edx 113380: 50 push %eax 113381: 56 push %esi 113382: 53 push %ebx 113383: e8 04 cf 00 00 call 12028c <__moddi3> 113388: 83 c4 10 add $0x10,%esp 11338b: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11338d: ff 75 cc pushl -0x34(%ebp) 113390: ff 75 c8 pushl -0x38(%ebp) 113393: 56 push %esi 113394: 53 push %ebx 113395: e8 a2 cd 00 00 call 12013c <__divdi3> 11339a: 83 c4 10 add $0x10,%esp 11339d: 89 c3 mov %eax,%ebx if ( start_offset ) { 11339f: 85 ff test %edi,%edi 1133a1: 0f 85 a1 00 00 00 jne 113448 1133a7: 8b 75 14 mov 0x14(%ebp),%esi 1133aa: 8b 55 18 mov 0x18(%ebp),%edx 1133ad: 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 ) { 1133b4: 3b 55 d4 cmp -0x2c(%ebp),%edx 1133b7: 72 3b jb 1133f4 1133b9: 8d 76 00 lea 0x0(%esi),%esi block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1133bc: 51 push %ecx 1133bd: 6a 00 push $0x0 1133bf: 53 push %ebx 1133c0: ff 75 08 pushl 0x8(%ebp) 1133c3: 89 55 c4 mov %edx,-0x3c(%ebp) 1133c6: e8 59 f7 ff ff call 112b24 assert( block_ptr ); 1133cb: 83 c4 10 add $0x10,%esp 1133ce: 85 c0 test %eax,%eax 1133d0: 8b 55 c4 mov -0x3c(%ebp),%edx 1133d3: 0f 84 fb 00 00 00 je 1134d4 <== 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 ); 1133d9: 8b 00 mov (%eax),%eax src += to_copy; 1133db: 89 c7 mov %eax,%edi 1133dd: 8b 4d d4 mov -0x2c(%ebp),%ecx 1133e0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1133e2: 43 inc %ebx my_length -= to_copy; 1133e3: 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( 1133e6: 8b 4d d4 mov -0x2c(%ebp),%ecx 1133e9: 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 ) { 1133ec: 39 15 38 8f 12 00 cmp %edx,0x128f38 1133f2: 76 c8 jbe 1133bc */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 1133f4: 85 d2 test %edx,%edx 1133f6: 74 28 je 113420 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1133f8: 50 push %eax 1133f9: 6a 00 push $0x0 1133fb: 53 push %ebx 1133fc: ff 75 08 pushl 0x8(%ebp) 1133ff: 89 55 c4 mov %edx,-0x3c(%ebp) 113402: e8 1d f7 ff ff call 112b24 assert( block_ptr ); 113407: 83 c4 10 add $0x10,%esp 11340a: 85 c0 test %eax,%eax 11340c: 8b 55 c4 mov -0x3c(%ebp),%edx 11340f: 0f 84 23 01 00 00 je 113538 <== 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 ); 113415: 8b 00 mov (%eax),%eax 113417: 89 c7 mov %eax,%edi 113419: 89 d1 mov %edx,%ecx 11341b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 11341d: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 113420: 83 ec 08 sub $0x8,%esp 113423: 6a 00 push $0x0 113425: 8d 45 e0 lea -0x20(%ebp),%eax 113428: 50 push %eax 113429: e8 32 52 ff ff call 108660 11342e: 8b 45 e0 mov -0x20(%ebp),%eax 113431: 8b 55 08 mov 0x8(%ebp),%edx 113434: 89 42 44 mov %eax,0x44(%edx) 113437: 89 42 48 mov %eax,0x48(%edx) return copied; 11343a: 83 c4 10 add $0x10,%esp } 11343d: 8b 45 c8 mov -0x38(%ebp),%eax 113440: 8d 65 f4 lea -0xc(%ebp),%esp 113443: 5b pop %ebx 113444: 5e pop %esi 113445: 5f pop %edi 113446: c9 leave 113447: 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 ); 113448: 56 push %esi 113449: 6a 00 push $0x0 11344b: 50 push %eax 11344c: ff 75 08 pushl 0x8(%ebp) 11344f: e8 d0 f6 ff ff call 112b24 assert( block_ptr ); 113454: 83 c4 10 add $0x10,%esp 113457: 85 c0 test %eax,%eax 113459: 0f 84 f2 00 00 00 je 113551 <== 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; 11345f: 8b 55 d4 mov -0x2c(%ebp),%edx 113462: 29 fa sub %edi,%edx 113464: 89 55 c8 mov %edx,-0x38(%ebp) 113467: 8b 4d 18 mov 0x18(%ebp),%ecx 11346a: 39 ca cmp %ecx,%edx 11346c: 77 4a ja 1134b8 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 ); 11346e: 03 38 add (%eax),%edi src += to_copy; 113470: 8b 75 14 mov 0x14(%ebp),%esi 113473: 8b 4d c8 mov -0x38(%ebp),%ecx 113476: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113478: 43 inc %ebx my_length -= to_copy; 113479: 8b 55 18 mov 0x18(%ebp),%edx 11347c: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 11347f: a1 38 8f 12 00 mov 0x128f38,%eax 113484: 89 45 d4 mov %eax,-0x2c(%ebp) 113487: e9 28 ff ff ff jmp 1133b4 * 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 ); 11348c: 57 push %edi 11348d: 52 push %edx 11348e: 50 push %eax 11348f: ff 75 08 pushl 0x8(%ebp) 113492: e8 2d fc ff ff call 1130c4 if ( status ) 113497: 83 c4 10 add $0x10,%esp 11349a: 85 c0 test %eax,%eax 11349c: 0f 84 ce fe ff ff je 113370 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 1134a2: e8 5d 1c 00 00 call 115104 <__errno> <== NOT EXECUTED 1134a7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1134ad: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 1134b4: eb 87 jmp 11343d <== NOT EXECUTED 1134b6: 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; 1134b8: 89 4d c8 mov %ecx,-0x38(%ebp) 1134bb: eb b1 jmp 11346e * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 1134bd: e8 42 1c 00 00 call 115104 <__errno> <== NOT EXECUTED 1134c2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1134c8: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 1134cf: e9 69 ff ff ff jmp 11343d <== 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 ); 1134d4: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 1134d9: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 1134de: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 1134e3: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 1134e8: e8 b7 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1134ed: 68 88 34 12 00 push $0x123488 <== NOT EXECUTED 1134f2: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 1134f7: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 1134fc: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113501: e8 9e 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 113506: 68 0c 34 12 00 push $0x12340c <== NOT EXECUTED 11350b: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 113510: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 113515: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 11351a: e8 85 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 11351f: 68 2c 34 12 00 push $0x12342c <== NOT EXECUTED 113524: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 113529: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 11352e: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113533: e8 6c 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113538: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 11353d: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 113542: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 113547: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 11354c: e8 53 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113551: 68 22 34 12 00 push $0x123422 <== NOT EXECUTED 113556: 68 17 35 12 00 push $0x123517 <== NOT EXECUTED 11355b: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 113560: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 113565: e8 3a 4d ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00107dec : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 107dec: 55 push %ebp 107ded: 89 e5 mov %esp,%ebp 107def: 57 push %edi 107df0: 56 push %esi 107df1: 53 push %ebx 107df2: 83 ec 5c sub $0x5c,%esp 107df5: 8b 55 08 mov 0x8(%ebp),%edx 107df8: 8b 5d 0c mov 0xc(%ebp),%ebx 107dfb: 8b 75 10 mov 0x10(%ebp),%esi 107dfe: 8b 45 14 mov 0x14(%ebp),%eax 107e01: 89 45 a4 mov %eax,-0x5c(%ebp) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 107e04: 31 c0 xor %eax,%eax 107e06: b9 ff ff ff ff mov $0xffffffff,%ecx 107e0b: 89 d7 mov %edx,%edi 107e0d: f2 ae repnz scas %es:(%edi),%al 107e0f: f7 d1 not %ecx 107e11: 49 dec %ecx 107e12: 8d 45 e4 lea -0x1c(%ebp),%eax 107e15: 50 push %eax 107e16: 8d 7d af lea -0x51(%ebp),%edi 107e19: 57 push %edi 107e1a: 51 push %ecx 107e1b: 52 push %edx 107e1c: e8 63 8c 00 00 call 110a84 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 107e21: 89 d8 mov %ebx,%eax 107e23: 25 00 f0 00 00 and $0xf000,%eax 107e28: 83 c4 10 add $0x10,%esp 107e2b: 3d 00 40 00 00 cmp $0x4000,%eax 107e30: 74 5e je 107e90 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e32: 3d 00 80 00 00 cmp $0x8000,%eax 107e37: 74 4f je 107e88 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e39: 3d 00 60 00 00 cmp $0x6000,%eax 107e3e: 74 38 je 107e78 107e40: 3d 00 20 00 00 cmp $0x2000,%eax 107e45: 74 31 je 107e78 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 107e47: 3d 00 10 00 00 cmp $0x1000,%eax 107e4c: 75 4a jne 107e98 <== NEVER TAKEN 107e4e: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107e53: 83 ec 0c sub $0xc,%esp 107e56: 8d 45 d0 lea -0x30(%ebp),%eax 107e59: 50 push %eax 107e5a: 53 push %ebx 107e5b: 57 push %edi 107e5c: 52 push %edx 107e5d: ff 75 18 pushl 0x18(%ebp) 107e60: e8 e7 7e 00 00 call 10fd4c new_name, mode, &info ); if ( !new_node ) 107e65: 83 c4 20 add $0x20,%esp 107e68: 85 c0 test %eax,%eax 107e6a: 74 3e je 107eaa <== NEVER TAKEN 107e6c: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 107e6e: 8d 65 f4 lea -0xc(%ebp),%esp 107e71: 5b pop %ebx 107e72: 5e pop %esi 107e73: 5f pop %edi 107e74: c9 leave 107e75: c3 ret 107e76: 66 90 xchg %ax,%ax type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 107e78: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107e7b: 8b 45 a4 mov -0x5c(%ebp),%eax 107e7e: 89 45 d4 mov %eax,-0x2c(%ebp) 107e81: ba 02 00 00 00 mov $0x2,%edx */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e86: eb cb jmp 107e53 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e88: ba 05 00 00 00 mov $0x5,%edx 107e8d: eb c4 jmp 107e53 107e8f: 90 nop rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 107e90: ba 01 00 00 00 mov $0x1,%edx 107e95: eb bc jmp 107e53 107e97: 90 nop 107e98: e8 67 d2 00 00 call 115104 <__errno> <== NOT EXECUTED 107e9d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ea3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ea8: eb c4 jmp 107e6e <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107eaa: e8 55 d2 00 00 call 115104 <__errno> <== NOT EXECUTED 107eaf: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107eb5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107eba: eb b2 jmp 107e6e <== NOT EXECUTED =============================================================================== 00107ebc : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107ebc: 55 push %ebp 107ebd: 89 e5 mov %esp,%ebp 107ebf: 83 ec 08 sub $0x8,%esp 107ec2: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107ec5: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107ec8: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107ecc: 75 0a jne 107ed8 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107ece: 89 50 5c mov %edx,0x5c(%eax) 107ed1: 31 c0 xor %eax,%eax return 0; } 107ed3: c9 leave 107ed4: c3 ret 107ed5: 8d 76 00 lea 0x0(%esi),%esi /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107ed8: e8 27 d2 00 00 call 115104 <__errno> <== NOT EXECUTED 107edd: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107ee3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107ee8: c9 leave <== NOT EXECUTED 107ee9: c3 ret <== NOT EXECUTED =============================================================================== 00109bbc : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109bbc: 55 push %ebp 109bbd: 89 e5 mov %esp,%ebp 109bbf: 53 push %ebx 109bc0: 83 ec 04 sub $0x4,%esp 109bc3: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109bc6: 85 db test %ebx,%ebx 109bc8: 0f 84 7f 01 00 00 je 109d4d <== NEVER TAKEN fprintf(stdout, "%s", the_jnode->name ); 109bce: 83 ec 08 sub $0x8,%esp 109bd1: a1 e0 d3 12 00 mov 0x12d3e0,%eax 109bd6: ff 70 08 pushl 0x8(%eax) 109bd9: 8d 43 0c lea 0xc(%ebx),%eax 109bdc: 50 push %eax 109bdd: e8 1a f1 00 00 call 118cfc switch( the_jnode->type ) { 109be2: 8b 43 4c mov 0x4c(%ebx),%eax 109be5: 83 c4 10 add $0x10,%esp 109be8: 83 f8 07 cmp $0x7,%eax 109beb: 76 2b jbe 109c18 <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109bed: 52 push %edx <== NOT EXECUTED 109bee: 50 push %eax <== NOT EXECUTED 109bef: 68 ae 7e 12 00 push $0x127eae <== NOT EXECUTED 109bf4: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED 109bf9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109bfc: e8 d3 ef 00 00 call 118bd4 <== NOT EXECUTED assert(0); 109c01: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED 109c06: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED 109c0b: 6a 6c push $0x6c <== NOT EXECUTED 109c0d: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109c12: e8 85 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED 109c17: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109c18: ff 24 85 e4 7f 12 00 jmp *0x127fe4(,%eax,4) 109c1f: 90 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 109c20: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED 109c25: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c28: 6a 12 push $0x12 <== NOT EXECUTED 109c2a: 6a 01 push $0x1 <== NOT EXECUTED 109c2c: 68 9b 7e 12 00 push $0x127e9b <== NOT EXECUTED 109c31: e8 fe fc 00 00 call 119934 <== NOT EXECUTED assert(0); 109c36: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED 109c3b: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED 109c40: 6a 67 push $0x67 <== NOT EXECUTED 109c42: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109c47: e8 50 09 00 00 call 10a59c <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 109c4c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 109c4f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 109c52: 68 6c 7e 12 00 push $0x127e6c <== NOT EXECUTED 109c57: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED 109c5c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c5f: e8 70 ef 00 00 call 118bd4 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 109c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c67: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp) <== NOT EXECUTED } 109c6e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109c71: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c72: e9 19 09 01 00 jmp 11a590 <== NOT EXECUTED 109c77: 90 nop <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 109c78: 51 push %ecx 109c79: ff 73 50 pushl 0x50(%ebx) 109c7c: 68 7b 7e 12 00 push $0x127e7b 109c81: a1 e0 d3 12 00 mov 0x12d3e0,%eax 109c86: ff 70 08 pushl 0x8(%eax) 109c89: e8 46 ef 00 00 call 118bd4 (uint32_t)the_jnode->info.file.size ); #endif break; 109c8e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c91: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp) } 109c98: 8b 5d fc mov -0x4(%ebp),%ebx 109c9b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c9c: e9 ef 08 01 00 jmp 11a590 109ca1: 8d 76 00 lea 0x0(%esi),%esi fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 109ca4: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED 109ca9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cac: 6a 13 push $0x13 <== NOT EXECUTED 109cae: 6a 01 push $0x1 <== NOT EXECUTED 109cb0: 68 87 7e 12 00 push $0x127e87 <== NOT EXECUTED 109cb5: e8 7a fc 00 00 call 119934 <== NOT EXECUTED assert(0); 109cba: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED 109cbf: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED 109cc4: 6a 62 push $0x62 <== NOT EXECUTED 109cc6: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109ccb: e8 cc 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109cd0: a1 e0 d3 12 00 mov 0x12d3e0,%eax <== NOT EXECUTED 109cd5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cd8: 6a 13 push $0x13 <== NOT EXECUTED 109cda: 6a 01 push $0x1 <== NOT EXECUTED 109cdc: 68 87 7e 12 00 push $0x127e87 <== NOT EXECUTED 109ce1: e8 4e fc 00 00 call 119934 <== NOT EXECUTED assert(0); 109ce6: 68 df 57 12 00 push $0x1257df <== NOT EXECUTED 109ceb: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED 109cf0: 6a 5d push $0x5d <== NOT EXECUTED 109cf2: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109cf7: e8 a0 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 109cfc: ff 73 54 pushl 0x54(%ebx) 109cff: ff 73 50 pushl 0x50(%ebx) 109d02: 68 59 7e 12 00 push $0x127e59 109d07: a1 e0 d3 12 00 mov 0x12d3e0,%eax 109d0c: ff 70 08 pushl 0x8(%eax) 109d0f: e8 c0 ee 00 00 call 118bd4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109d14: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d17: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp) } 109d1e: 8b 5d fc mov -0x4(%ebp),%ebx 109d21: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d22: e9 69 08 01 00 jmp 11a590 109d27: 90 nop assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109d28: 83 ec 08 sub $0x8,%esp 109d2b: a1 e0 d3 12 00 mov 0x12d3e0,%eax 109d30: ff 70 08 pushl 0x8(%eax) 109d33: 6a 2f push $0x2f 109d35: e8 d6 ee 00 00 call 118c10 break; 109d3a: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d3d: c7 45 08 95 82 12 00 movl $0x128295,0x8(%ebp) } 109d44: 8b 5d fc mov -0x4(%ebp),%ebx 109d47: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d48: e9 43 08 01 00 jmp 11a590 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 109d4d: 68 4f 7e 12 00 push $0x127e4f <== NOT EXECUTED 109d52: 68 18 80 12 00 push $0x128018 <== NOT EXECUTED 109d57: 6a 38 push $0x38 <== NOT EXECUTED 109d59: 68 f8 7e 12 00 push $0x127ef8 <== NOT EXECUTED 109d5e: e8 39 08 00 00 call 10a59c <__assert_func> <== NOT EXECUTED =============================================================================== 00107efc : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107efc: 55 push %ebp 107efd: 89 e5 mov %esp,%ebp 107eff: 57 push %edi 107f00: 56 push %esi 107f01: 53 push %ebx 107f02: 83 ec 0c sub $0xc,%esp 107f05: 8b 7d 0c mov 0xc(%ebp),%edi 107f08: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 107f0b: 8b 45 08 mov 0x8(%ebp),%eax 107f0e: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 107f10: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 107f14: 75 36 jne 107f4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f16: 85 f6 test %esi,%esi 107f18: 74 2e je 107f48 <== NEVER TAKEN 107f1a: 8b 43 50 mov 0x50(%ebx),%eax 107f1d: 8a 10 mov (%eax),%dl 107f1f: 84 d2 test %dl,%dl 107f21: 74 25 je 107f48 <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107f23: 31 c9 xor %ecx,%ecx 107f25: 31 c0 xor %eax,%eax 107f27: eb 0d jmp 107f36 107f29: 8d 76 00 lea 0x0(%esi),%esi for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f2c: 8b 53 50 mov 0x50(%ebx),%edx 107f2f: 8a 14 02 mov (%edx,%eax,1),%dl 107f32: 84 d2 test %dl,%dl 107f34: 74 0a je 107f40 buf[i] = node->info.sym_link.name[i]; 107f36: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f39: 40 inc %eax 107f3a: 89 c1 mov %eax,%ecx 107f3c: 39 c6 cmp %eax,%esi 107f3e: 77 ec ja 107f2c buf[i] = node->info.sym_link.name[i]; return i; } 107f40: 83 c4 0c add $0xc,%esp 107f43: 5b pop %ebx 107f44: 5e pop %esi 107f45: 5f pop %edi 107f46: c9 leave 107f47: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107f48: 31 c0 xor %eax,%eax 107f4a: eb f4 jmp 107f40 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107f4c: e8 b3 d1 00 00 call 115104 <__errno> <== NOT EXECUTED 107f51: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107f57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107f5c: eb e2 jmp 107f40 <== NOT EXECUTED =============================================================================== 00107f60 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 107f60: 55 push %ebp 107f61: 89 e5 mov %esp,%ebp 107f63: 53 push %ebx 107f64: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107f67: 8b 45 0c mov 0xc(%ebp),%eax 107f6a: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107f6c: 6a 20 push $0x20 107f6e: ff 75 14 pushl 0x14(%ebp) 107f71: 8d 43 0c lea 0xc(%ebx),%eax 107f74: 50 push %eax 107f75: e8 d2 dd 00 00 call 115d4c if ( the_jnode->Parent != NULL ) 107f7a: 83 c4 10 add $0x10,%esp 107f7d: 8b 4b 08 mov 0x8(%ebx),%ecx 107f80: 85 c9 test %ecx,%ecx 107f82: 74 0c je 107f90 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107f84: 83 ec 0c sub $0xc,%esp 107f87: 53 push %ebx 107f88: e8 6b 46 00 00 call 10c5f8 <_Chain_Extract> 107f8d: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107f90: 8b 45 10 mov 0x10(%ebp),%eax 107f93: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107f95: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107f98: 83 ec 08 sub $0x8,%esp 107f9b: 53 push %ebx 107f9c: 83 c0 50 add $0x50,%eax 107f9f: 50 push %eax 107fa0: e8 2f 46 00 00 call 10c5d4 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107fa5: 58 pop %eax 107fa6: 5a pop %edx 107fa7: 6a 00 push $0x0 107fa9: 8d 45 f0 lea -0x10(%ebp),%eax 107fac: 50 push %eax 107fad: e8 ae 06 00 00 call 108660 107fb2: 8b 45 f0 mov -0x10(%ebp),%eax 107fb5: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107fb8: 31 c0 xor %eax,%eax 107fba: 8b 5d fc mov -0x4(%ebp),%ebx 107fbd: c9 leave 107fbe: c3 ret =============================================================================== 00110b60 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110b60: 55 push %ebp 110b61: 89 e5 mov %esp,%ebp 110b63: 56 push %esi 110b64: 53 push %ebx 110b65: 83 ec 10 sub $0x10,%esp 110b68: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110b6b: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 110b6d: 8b 43 08 mov 0x8(%ebx),%eax 110b70: 85 c0 test %eax,%eax 110b72: 74 13 je 110b87 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110b74: 83 ec 0c sub $0xc,%esp 110b77: 53 push %ebx 110b78: e8 7b ba ff ff call 10c5f8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 110b7d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110b84: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110b87: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110b8b: 83 ec 08 sub $0x8,%esp 110b8e: 6a 00 push $0x0 110b90: 8d 45 f0 lea -0x10(%ebp),%eax 110b93: 50 push %eax 110b94: e8 c7 7a ff ff call 108660 110b99: 8b 45 f0 mov -0x10(%ebp),%eax 110b9c: 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) ) { 110b9f: 89 1c 24 mov %ebx,(%esp) 110ba2: e8 e5 02 00 00 call 110e8c 110ba7: 83 c4 10 add $0x10,%esp 110baa: 85 c0 test %eax,%eax 110bac: 75 25 jne 110bd3 <== NEVER TAKEN 110bae: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 110bb3: 75 1e jne 110bd3 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 110bb5: a1 24 70 12 00 mov 0x127024,%eax 110bba: 8b 50 04 mov 0x4(%eax),%edx 110bbd: 3b 16 cmp (%esi),%edx 110bbf: 74 33 je 110bf4 <== NEVER TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 110bc1: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 110bc5: 74 15 je 110bdc if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 110bc7: 83 ec 0c sub $0xc,%esp 110bca: 53 push %ebx 110bcb: e8 14 7a ff ff call 1085e4 110bd0: 83 c4 10 add $0x10,%esp } return 0; } 110bd3: 31 c0 xor %eax,%eax 110bd5: 8d 65 f8 lea -0x8(%ebp),%esp 110bd8: 5b pop %ebx 110bd9: 5e pop %esi 110bda: c9 leave 110bdb: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 110bdc: 8b 43 50 mov 0x50(%ebx),%eax 110bdf: 85 c0 test %eax,%eax 110be1: 74 e4 je 110bc7 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 110be3: 83 ec 0c sub $0xc,%esp 110be6: 50 push %eax 110be7: e8 f8 79 ff ff call 1085e4 110bec: 83 c4 10 add $0x10,%esp 110bef: eb d6 jmp 110bc7 110bf1: 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; 110bf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 110bfb: eb c4 jmp 110bc1 <== NOT EXECUTED =============================================================================== 00110c00 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 110c00: 55 push %ebp 110c01: 89 e5 mov %esp,%ebp 110c03: 56 push %esi 110c04: 53 push %ebx 110c05: 8b 4d 08 mov 0x8(%ebp),%ecx 110c08: 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; 110c0b: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 110c0d: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 110c11: 76 15 jbe 110c28 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 110c13: e8 ec 44 00 00 call 115104 <__errno> <== NOT EXECUTED 110c18: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110c1e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 110c23: 5b pop %ebx <== NOT EXECUTED 110c24: 5e pop %esi <== NOT EXECUTED 110c25: c9 leave <== NOT EXECUTED 110c26: c3 ret <== NOT EXECUTED 110c27: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 110c28: 8b 5a 4c mov 0x4c(%edx),%ebx 110c2b: ff 24 9d 78 31 12 00 jmp *0x123178(,%ebx,4) 110c32: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 110c34: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 110c3b: 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 ); 110c42: 8b 49 10 mov 0x10(%ecx),%ecx 110c45: 8b 49 34 mov 0x34(%ecx),%ecx 110c48: 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 = 110c4a: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 110c50: 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; 110c53: 8b 4a 30 mov 0x30(%edx),%ecx 110c56: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 110c59: 8b 4a 34 mov 0x34(%edx),%ecx 110c5c: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 110c60: 8b 4a 38 mov 0x38(%edx),%ecx 110c63: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 110c66: 8b 4a 3c mov 0x3c(%edx),%ecx 110c69: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 110c6d: 66 8b 4a 3e mov 0x3e(%edx),%cx 110c71: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 110c75: 8b 4a 40 mov 0x40(%edx),%ecx 110c78: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 110c7b: 8b 4a 44 mov 0x44(%edx),%ecx 110c7e: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 110c81: 8b 52 48 mov 0x48(%edx),%edx 110c84: 89 50 38 mov %edx,0x38(%eax) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 110c87: 8b 15 50 51 12 00 mov 0x125150,%edx 110c8d: 89 50 40 mov %edx,0x40(%eax) 110c90: 31 c0 xor %eax,%eax return 0; } 110c92: 5b pop %ebx 110c93: 5e pop %esi 110c94: c9 leave 110c95: c3 ret 110c96: 66 90 xchg %ax,%ax switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 110c98: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 110c9b: 8b 72 50 mov 0x50(%edx),%esi 110c9e: 89 70 18 mov %esi,0x18(%eax) 110ca1: 89 58 1c mov %ebx,0x1c(%eax) break; 110ca4: eb 9c jmp 110c42 110ca6: 66 90 xchg %ax,%ax case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 110ca8: 8b 5a 50 mov 0x50(%edx),%ebx 110cab: 8b 72 54 mov 0x54(%edx),%esi 110cae: 89 58 20 mov %ebx,0x20(%eax) 110cb1: 89 70 24 mov %esi,0x24(%eax) break; 110cb4: eb 8c jmp 110c42 =============================================================================== 00107fc0 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107fc0: 55 push %ebp 107fc1: 89 e5 mov %esp,%ebp 107fc3: 57 push %edi 107fc4: 53 push %ebx 107fc5: 83 ec 40 sub $0x40,%esp 107fc8: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 107fcb: 31 c0 xor %eax,%eax 107fcd: b9 ff ff ff ff mov $0xffffffff,%ecx 107fd2: 89 d7 mov %edx,%edi 107fd4: f2 ae repnz scas %es:(%edi),%al 107fd6: f7 d1 not %ecx 107fd8: 49 dec %ecx 107fd9: 8d 45 f4 lea -0xc(%ebp),%eax 107fdc: 50 push %eax 107fdd: 8d 5d bf lea -0x41(%ebp),%ebx 107fe0: 53 push %ebx 107fe1: 51 push %ecx 107fe2: 52 push %edx 107fe3: e8 9c 8a 00 00 call 110a84 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107fe8: 58 pop %eax 107fe9: ff 75 0c pushl 0xc(%ebp) 107fec: e8 83 dc 00 00 call 115c74 107ff1: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107ff4: 83 c4 10 add $0x10,%esp 107ff7: 85 c0 test %eax,%eax 107ff9: 74 27 je 108022 <== NEVER TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107ffb: 83 ec 0c sub $0xc,%esp 107ffe: 8d 45 e0 lea -0x20(%ebp),%eax 108001: 50 push %eax 108002: 68 ff a1 00 00 push $0xa1ff 108007: 53 push %ebx 108008: 6a 04 push $0x4 10800a: ff 75 08 pushl 0x8(%ebp) 10800d: e8 3a 7d 00 00 call 10fd4c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 108012: 83 c4 20 add $0x20,%esp 108015: 85 c0 test %eax,%eax 108017: 74 1b je 108034 <== NEVER TAKEN 108019: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 10801b: 8d 65 f8 lea -0x8(%ebp),%esp 10801e: 5b pop %ebx 10801f: 5f pop %edi 108020: c9 leave 108021: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 108022: e8 dd d0 00 00 call 115104 <__errno> <== NOT EXECUTED 108027: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10802d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108032: eb e7 jmp 10801b <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 108034: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108037: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10803a: e8 a5 05 00 00 call 1085e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 10803f: e8 c0 d0 00 00 call 115104 <__errno> <== NOT EXECUTED 108044: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10804a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10804f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108052: eb c7 jmp 10801b <== NOT EXECUTED =============================================================================== 00108054 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 108054: 55 push %ebp 108055: 89 e5 mov %esp,%ebp 108057: 57 push %edi 108058: 56 push %esi 108059: 53 push %ebx 10805a: 83 ec 3c sub $0x3c,%esp 10805d: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 108060: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108062: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108066: 74 18 je 108080 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108068: 83 ec 08 sub $0x8,%esp 10806b: 8b 43 08 mov 0x8(%ebx),%eax 10806e: 53 push %ebx 10806f: ff 75 08 pushl 0x8(%ebp) 108072: ff 50 34 call *0x34(%eax) return result; 108075: 83 c4 10 add $0x10,%esp } 108078: 8d 65 f4 lea -0xc(%ebp),%esp 10807b: 5b pop %ebx 10807c: 5e pop %esi 10807d: 5f pop %edi 10807e: c9 leave 10807f: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108080: 8b 42 50 mov 0x50(%edx),%eax 108083: 85 c0 test %eax,%eax 108085: 74 79 je 108100 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108087: 8d 7d cc lea -0x34(%ebp),%edi 10808a: b9 05 00 00 00 mov $0x5,%ecx 10808f: 89 de mov %ebx,%esi 108091: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108093: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108096: 83 ec 0c sub $0xc,%esp 108099: 8d 75 cc lea -0x34(%ebp),%esi 10809c: 56 push %esi 10809d: 89 55 c4 mov %edx,-0x3c(%ebp) 1080a0: e8 b3 7d 00 00 call 10fe58 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 1080a5: 8b 55 c4 mov -0x3c(%ebp),%edx 1080a8: 8b 42 50 mov 0x50(%edx),%eax 1080ab: 8b 48 34 mov 0x34(%eax),%ecx 1080ae: 83 c4 10 add $0x10,%esp 1080b1: 66 83 f9 01 cmp $0x1,%cx 1080b5: 74 27 je 1080de if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 1080b7: 49 dec %ecx 1080b8: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 1080bc: 83 ec 08 sub $0x8,%esp 1080bf: 6a 00 push $0x0 1080c1: 8d 45 e0 lea -0x20(%ebp),%eax 1080c4: 50 push %eax 1080c5: 89 55 c4 mov %edx,-0x3c(%ebp) 1080c8: e8 93 05 00 00 call 108660 1080cd: 8b 55 c4 mov -0x3c(%ebp),%edx 1080d0: 8b 42 50 mov 0x50(%edx),%eax 1080d3: 8b 55 e0 mov -0x20(%ebp),%edx 1080d6: 89 50 48 mov %edx,0x48(%eax) 1080d9: 83 c4 10 add $0x10,%esp 1080dc: eb 8a jmp 108068 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1080de: 83 ec 08 sub $0x8,%esp 1080e1: 56 push %esi 1080e2: ff 75 08 pushl 0x8(%ebp) 1080e5: 8b 45 d4 mov -0x2c(%ebp),%eax 1080e8: ff 50 34 call *0x34(%eax) if ( result != 0 ) 1080eb: 83 c4 10 add $0x10,%esp 1080ee: 85 c0 test %eax,%eax 1080f0: 0f 84 72 ff ff ff je 108068 1080f6: b8 ff ff ff ff mov $0xffffffff,%eax 1080fb: e9 78 ff ff ff jmp 108078 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 108100: e8 ff cf 00 00 call 115104 <__errno> <== NOT EXECUTED 108105: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10810b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108110: e9 63 ff ff ff jmp 108078 <== NOT EXECUTED =============================================================================== 00108118 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10811e: 8b 45 08 mov 0x8(%ebp),%eax 108121: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 108124: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108128: 75 12 jne 10813c <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 10812a: 8b 50 5c mov 0x5c(%eax),%edx 10812d: 85 d2 test %edx,%edx 10812f: 74 1d je 10814e <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 108131: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 108138: 31 c0 xor %eax,%eax return 0; } 10813a: c9 leave 10813b: c3 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10813c: e8 c3 cf 00 00 call 115104 <__errno> <== NOT EXECUTED 108141: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 108147: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 10814c: c9 leave <== NOT EXECUTED 10814d: c3 ret <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10814e: e8 b1 cf 00 00 call 115104 <__errno> <== NOT EXECUTED 108153: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108159: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 10815e: c9 leave <== NOT EXECUTED 10815f: c3 ret <== NOT EXECUTED =============================================================================== 00108810 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 108810: 55 push %ebp 108811: 89 e5 mov %esp,%ebp 108813: 57 push %edi 108814: 56 push %esi 108815: 53 push %ebx 108816: 83 ec 0c sub $0xc,%esp 108819: 8b 5d 08 mov 0x8(%ebp),%ebx 10881c: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10881f: a1 48 76 12 00 mov 0x127648,%eax 108824: 85 c0 test %eax,%eax 108826: 74 02 je 10882a (*rtems_malloc_statistics_helpers->initialize)(); 108828: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 10882a: e8 79 ff ff ff call 1087a8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10882f: a1 4c 76 12 00 mov 0x12764c,%eax 108834: 85 c0 test %eax,%eax 108836: 74 13 je 10884b <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 108838: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10883b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10883e: 53 push %ebx <== NOT EXECUTED 10883f: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 108841: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 108844: 29 c6 sub %eax,%esi <== NOT EXECUTED 108846: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108848: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 10884b: 80 3d 45 76 12 00 00 cmpb $0x0,0x127645 108852: 75 1f jne 108873 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 108854: 80 3d 48 52 12 00 00 cmpb $0x0,0x125248 10885b: 75 3f jne 10889c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 10885d: 6a 04 push $0x4 10885f: 56 push %esi 108860: 53 push %ebx 108861: ff 35 58 51 12 00 pushl 0x125158 108867: e8 20 43 00 00 call 10cb8c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 10886c: 83 c4 10 add $0x10,%esp 10886f: 85 c0 test %eax,%eax 108871: 74 3c je 1088af <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 108873: 8b 1d a0 92 12 00 mov 0x1292a0,%ebx 108879: 83 ec 0c sub $0xc,%esp 10887c: ff 35 58 51 12 00 pushl 0x125158 108882: e8 a5 4e 00 00 call 10d72c <_Protected_heap_Get_size> 108887: 8d 1c 18 lea (%eax,%ebx,1),%ebx 10888a: 89 1d a0 92 12 00 mov %ebx,0x1292a0 108890: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 108893: 8d 65 f4 lea -0xc(%ebp),%esp 108896: 5b pop %ebx 108897: 5e pop %esi 108898: 5f pop %edi 108899: c9 leave 10889a: c3 ret 10889b: 90 nop if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 10889c: 31 c0 xor %eax,%eax 10889e: 89 df mov %ebx,%edi 1088a0: 89 f1 mov %esi,%ecx 1088a2: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 1088a4: 80 3d 45 76 12 00 00 cmpb $0x0,0x127645 1088ab: 74 b0 je 10885d <== ALWAYS TAKEN 1088ad: eb c4 jmp 108873 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1088af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088b2: 6a 1a push $0x1a <== NOT EXECUTED 1088b4: e8 3f 3a 00 00 call 10c2f8 <== NOT EXECUTED =============================================================================== 0010cda8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10cda8: 55 push %ebp <== NOT EXECUTED 10cda9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cdab: 57 push %edi <== NOT EXECUTED 10cdac: 56 push %esi <== NOT EXECUTED 10cdad: 53 push %ebx <== NOT EXECUTED 10cdae: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10cdb1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10cdb4: 85 db test %ebx,%ebx <== NOT EXECUTED 10cdb6: 0f 84 c5 00 00 00 je 10ce81 <== NOT EXECUTED return; if ( !print_handler ) 10cdbc: a1 d4 20 17 00 mov 0x1720d4,%eax <== NOT EXECUTED 10cdc1: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10cdc4: 85 c0 test %eax,%eax <== NOT EXECUTED 10cdc6: 0f 84 b5 00 00 00 je 10ce81 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10cdcc: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10cdcf: 0f 84 d7 00 00 00 je 10ceac <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10cdd5: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10cddb: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED 10cde1: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10cde4: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10cde7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 10cdea: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10cded: 8b 3e mov (%esi),%edi <== NOT EXECUTED 10cdef: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10cdf2: 57 push %edi <== NOT EXECUTED 10cdf3: 50 push %eax <== NOT EXECUTED 10cdf4: e8 77 ff ff ff call 10cd70 <== NOT EXECUTED if ( high_water_mark ) 10cdf9: 59 pop %ecx <== NOT EXECUTED 10cdfa: 5a pop %edx <== NOT EXECUTED 10cdfb: 85 c0 test %eax,%eax <== NOT EXECUTED 10cdfd: 0f 84 c9 00 00 00 je 10cecc <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10ce03: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10ce06: 01 fa add %edi,%edx <== NOT EXECUTED 10ce08: 29 c2 sub %eax,%edx <== NOT EXECUTED 10ce0a: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 10ce0d: 85 db test %ebx,%ebx <== NOT EXECUTED 10ce0f: 0f 84 c7 00 00 00 je 10cedc <== NOT EXECUTED (*print_handler)( 10ce15: 52 push %edx <== NOT EXECUTED 10ce16: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10ce19: 50 push %eax <== NOT EXECUTED 10ce1a: 6a 05 push $0x5 <== NOT EXECUTED 10ce1c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10ce1f: e8 f4 5d 00 00 call 112c18 <== NOT EXECUTED 10ce24: 50 push %eax <== NOT EXECUTED 10ce25: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10ce28: 68 2c 09 16 00 push $0x16092c <== NOT EXECUTED 10ce2d: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED 10ce33: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10ce36: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 10ce39: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10ce3c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ce3f: 57 push %edi <== NOT EXECUTED 10ce40: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10ce43: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10ce45: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10ce49: 52 push %edx <== NOT EXECUTED 10ce4a: 50 push %eax <== NOT EXECUTED 10ce4b: 68 47 09 16 00 push $0x160947 <== NOT EXECUTED 10ce50: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED 10ce56: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10ce5c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10ce5f: 8b 1d cc 20 17 00 mov 0x1720cc,%ebx <== NOT EXECUTED 10ce65: 85 db test %ebx,%ebx <== NOT EXECUTED 10ce67: 74 23 je 10ce8c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10ce69: 51 push %ecx <== NOT EXECUTED 10ce6a: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10ce6d: 68 72 09 16 00 push $0x160972 <== NOT EXECUTED 10ce72: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED 10ce78: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED 10ce7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10ce81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10ce84: 5b pop %ebx <== NOT EXECUTED 10ce85: 5e pop %esi <== NOT EXECUTED 10ce86: 5f pop %edi <== NOT EXECUTED 10ce87: c9 leave <== NOT EXECUTED 10ce88: c3 ret <== NOT EXECUTED 10ce89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10ce8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ce8f: 68 65 09 16 00 push $0x160965 <== NOT EXECUTED 10ce94: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED 10ce9a: ff 15 d4 20 17 00 call *0x1720d4 <== NOT EXECUTED 10cea0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 10cea3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cea6: 5b pop %ebx <== NOT EXECUTED 10cea7: 5e pop %esi <== NOT EXECUTED 10cea8: 5f pop %edi <== NOT EXECUTED 10cea9: c9 leave <== NOT EXECUTED 10ceaa: c3 ret <== NOT EXECUTED 10ceab: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 10ceac: 8b 0d d4 4d 17 00 mov 0x174dd4,%ecx <== NOT EXECUTED 10ceb2: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10ceb4: 74 cb je 10ce81 <== NOT EXECUTED 10ceb6: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10cebd: 31 db xor %ebx,%ebx <== NOT EXECUTED 10cebf: be d0 4d 17 00 mov $0x174dd0,%esi <== NOT EXECUTED 10cec4: e9 1b ff ff ff jmp 10cde4 <== NOT EXECUTED 10cec9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 10cecc: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 10ced3: 85 db test %ebx,%ebx <== NOT EXECUTED 10ced5: 0f 85 3a ff ff ff jne 10ce15 <== NOT EXECUTED 10cedb: 90 nop <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 10cedc: 50 push %eax <== NOT EXECUTED 10cedd: 6a ff push $0xffffffff <== NOT EXECUTED 10cedf: 68 39 09 16 00 push $0x160939 <== NOT EXECUTED 10cee4: ff 35 d0 20 17 00 pushl 0x1720d0 <== NOT EXECUTED 10ceea: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10ceed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cef0: e9 44 ff ff ff jmp 10ce39 <== NOT EXECUTED =============================================================================== 0010d100 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10d100: 55 push %ebp 10d101: 89 e5 mov %esp,%ebp 10d103: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 10d104: 8b 3d cc 20 17 00 mov 0x1720cc,%edi 10d10a: 85 ff test %edi,%edi 10d10c: 75 4d jne 10d15b 10d10e: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 10d110: 89 c2 mov %eax,%edx 10d112: 83 e2 03 and $0x3,%edx 10d115: 8b 14 95 b0 0a 16 00 mov 0x160ab0(,%edx,4),%edx 10d11c: 89 14 85 c0 4d 17 00 mov %edx,0x174dc0(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10d123: 40 inc %eax 10d124: 83 f8 04 cmp $0x4,%eax 10d127: 75 e7 jne 10d110 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 10d129: 8b 15 68 4f 17 00 mov 0x174f68,%edx 10d12f: 85 d2 test %edx,%edx 10d131: 74 1e je 10d151 <== NEVER TAKEN 10d133: 8b 0d 28 4f 17 00 mov 0x174f28,%ecx 10d139: 85 c9 test %ecx,%ecx 10d13b: 74 14 je 10d151 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10d13d: 89 15 d4 4d 17 00 mov %edx,0x174dd4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10d143: 29 d1 sub %edx,%ecx 10d145: 89 0d d0 4d 17 00 mov %ecx,0x174dd0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10d14b: b0 a5 mov $0xa5,%al 10d14d: 89 d7 mov %edx,%edi 10d14f: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10d151: c7 05 cc 20 17 00 01 movl $0x1,0x1720cc 10d158: 00 00 00 } 10d15b: 5f pop %edi 10d15c: c9 leave 10d15d: c3 ret =============================================================================== 0010cd70 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10cd70: 55 push %ebp <== NOT EXECUTED 10cd71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cd73: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10cd76: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 10cd79: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10cd7c: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10cd7f: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10cd82: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10cd84: 73 1d jae 10cda3 <== NOT EXECUTED if (*base != U32_PATTERN) 10cd86: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 10cd8d: 74 0d je 10cd9c <== NOT EXECUTED 10cd8f: eb 14 jmp 10cda5 <== NOT EXECUTED 10cd91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cd94: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10cd9a: 75 09 jne 10cda5 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 10cd9c: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10cd9f: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10cda1: 77 f1 ja 10cd94 <== NOT EXECUTED 10cda3: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10cda5: c9 leave <== NOT EXECUTED 10cda6: c3 ret <== NOT EXECUTED =============================================================================== 0010cf74 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 10cf74: 55 push %ebp <== NOT EXECUTED 10cf75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cf77: 56 push %esi <== NOT EXECUTED 10cf78: 53 push %ebx <== NOT EXECUTED 10cf79: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10cf7c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10cf7f: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10cf82: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10cf88: 68 8f 09 16 00 push $0x16098f <== NOT EXECUTED 10cf8d: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10cf90: e8 17 2b 00 00 call 10faac <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 10cf95: 58 pop %eax <== NOT EXECUTED 10cf96: 5a pop %edx <== NOT EXECUTED 10cf97: 53 push %ebx <== NOT EXECUTED 10cf98: 68 9f 09 16 00 push $0x16099f <== NOT EXECUTED 10cf9d: e8 0a 2b 00 00 call 10faac <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10cfa2: 5a pop %edx <== NOT EXECUTED 10cfa3: 59 pop %ecx <== NOT EXECUTED 10cfa4: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10cfa7: 68 bc 09 16 00 push $0x1609bc <== NOT EXECUTED 10cfac: e8 fb 2a 00 00 call 10faac <== NOT EXECUTED printk( 10cfb1: 59 pop %ecx <== NOT EXECUTED 10cfb2: 58 pop %eax <== NOT EXECUTED 10cfb3: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10cfb6: 68 ce 09 16 00 push $0x1609ce <== NOT EXECUTED 10cfbb: e8 ec 2a 00 00 call 10faac <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 10cfc0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cfc3: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10cfc6: 50 push %eax <== NOT EXECUTED 10cfc7: 6a 20 push $0x20 <== NOT EXECUTED 10cfc9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10cfcc: e8 47 5c 00 00 call 112c18 <== NOT EXECUTED 10cfd1: 59 pop %ecx <== NOT EXECUTED 10cfd2: 5a pop %edx <== NOT EXECUTED 10cfd3: 50 push %eax <== NOT EXECUTED 10cfd4: 68 e2 09 16 00 push $0x1609e2 <== NOT EXECUTED 10cfd9: e8 ce 2a 00 00 call 10faac <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10cfde: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 10cfe4: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED 10cfea: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10cfed: 53 push %ebx <== NOT EXECUTED 10cfee: 51 push %ecx <== NOT EXECUTED 10cfef: 50 push %eax <== NOT EXECUTED 10cff0: 68 44 0a 16 00 push $0x160a44 <== NOT EXECUTED 10cff5: e8 b2 2a 00 00 call 10faac <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 10cffa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10cffd: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10d000: 84 d2 test %dl,%dl <== NOT EXECUTED 10d002: 74 10 je 10d014 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10d004: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d007: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10d00c: e8 2f 66 00 00 call 113640 <== NOT EXECUTED 10d011: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10d014: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10d017: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10d01a: 56 push %esi <== NOT EXECUTED 10d01b: 50 push %eax <== NOT EXECUTED 10d01c: 6a 10 push $0x10 <== NOT EXECUTED 10d01e: 68 78 0a 16 00 push $0x160a78 <== NOT EXECUTED 10d023: e8 84 2a 00 00 call 10faac <== NOT EXECUTED 10d028: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d02b: eb d7 jmp 10d004 <== NOT EXECUTED =============================================================================== 001470a4 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 1470a4: 55 push %ebp <== NOT EXECUTED 1470a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1470a7: 57 push %edi <== NOT EXECUTED 1470a8: 56 push %esi <== NOT EXECUTED 1470a9: 53 push %ebx <== NOT EXECUTED 1470aa: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED 1470ad: 89 45 b8 mov %eax,-0x48(%ebp) <== NOT EXECUTED 1470b0: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED 1470b3: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED 1470b6: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 1470b9: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 1470bc: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 1470bf: e8 00 fc ff ff call 146cc4 <== NOT EXECUTED if (rc > 0) 1470c4: 85 c0 test %eax,%eax <== NOT EXECUTED 1470c6: 7e 08 jle 1470d0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 1470c8: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED 1470cb: 5b pop %ebx <== NOT EXECUTED 1470cc: 5e pop %esi <== NOT EXECUTED 1470cd: 5f pop %edi <== NOT EXECUTED 1470ce: c9 leave <== NOT EXECUTED 1470cf: c3 ret <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 1470d0: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED 1470d3: 8b 10 mov (%eax),%edx <== NOT EXECUTED end_bit = test_bit + (window * direction); 1470d5: 89 de mov %ebx,%esi <== NOT EXECUTED 1470d7: c1 e6 0b shl $0xb,%esi <== NOT EXECUTED if (end_bit < 0) 1470da: 01 d6 add %edx,%esi <== NOT EXECUTED 1470dc: 0f 88 cf 01 00 00 js 1472b1 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 1470e2: 8b 4d b8 mov -0x48(%ebp),%ecx <== NOT EXECUTED 1470e5: 8b 41 0c mov 0xc(%ecx),%eax <== NOT EXECUTED 1470e8: 39 c6 cmp %eax,%esi <== NOT EXECUTED 1470ea: 0f 83 94 01 00 00 jae 147284 <== NOT EXECUTED end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); 1470f0: 89 d7 mov %edx,%edi <== NOT EXECUTED 1470f2: c1 ff 05 sar $0x5,%edi <== NOT EXECUTED 1470f5: 89 7d c8 mov %edi,-0x38(%ebp) <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); 1470f8: 89 d7 mov %edx,%edi <== NOT EXECUTED 1470fa: 83 e7 1f and $0x1f,%edi <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 1470fd: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 147100: 83 e1 1f and $0x1f,%ecx <== NOT EXECUTED search_bits = &control->search_bits[search_index]; 147103: 89 d0 mov %edx,%eax <== NOT EXECUTED 147105: c1 f8 0a sar $0xa,%eax <== NOT EXECUTED 147108: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 14710b: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED 14710e: 8b 45 b8 mov -0x48(%ebp),%eax <== NOT EXECUTED 147111: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 147114: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED map_bits = &map[map_index]; 147117: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 14711a: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 14711d: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 147120: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 147123: 01 45 cc add %eax,-0x34(%ebp) <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 147126: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax <== NOT EXECUTED 14712d: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 147130: 89 d8 mov %ebx,%eax <== NOT EXECUTED 147132: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 147135: 89 45 a8 mov %eax,-0x58(%ebp) <== NOT EXECUTED 147138: 89 f8 mov %edi,%eax <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 14713a: 8b 7d b4 mov -0x4c(%ebp),%edi <== NOT EXECUTED 14713d: 8b 3f mov (%edi),%edi <== NOT EXECUTED 14713f: 89 7d bc mov %edi,-0x44(%ebp) <== NOT EXECUTED 147142: 85 ff test %edi,%edi <== NOT EXECUTED 147144: 0f 84 a6 00 00 00 je 1471f0 <== NOT EXECUTED 14714a: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 14714d: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 147150: 01 d9 add %ebx,%ecx <== NOT EXECUTED 147152: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 147155: 83 c1 1f add $0x1f,%ecx <== NOT EXECUTED 147158: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 14715b: 83 7d d0 1f cmpl $0x1f,-0x30(%ebp) <== NOT EXECUTED 14715f: 0f 87 b6 00 00 00 ja 14721b <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 147165: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 14716a: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 14716d: d3 e7 shl %cl,%edi <== NOT EXECUTED 14716f: 89 7d c0 mov %edi,-0x40(%ebp) <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 147172: 8b 4d bc mov -0x44(%ebp),%ecx <== NOT EXECUTED 147175: 85 cf test %ecx,%edi <== NOT EXECUTED 147177: 74 4b je 1471c4 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 147179: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 14717c: 8b 3f mov (%edi),%edi <== NOT EXECUTED 14717e: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 147181: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 147186: 88 c1 mov %al,%cl <== NOT EXECUTED 147188: d3 e7 shl %cl,%edi <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 14718a: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED 14718d: 0f 85 b9 00 00 00 jne 14724c <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); return 0; } if (test_bit == end_bit) 147193: 39 d6 cmp %edx,%esi <== NOT EXECUTED 147195: 74 2d je 1471c4 <== NOT EXECUTED 147197: 8d 0c 18 lea (%eax,%ebx,1),%ecx <== NOT EXECUTED 14719a: 8d 04 1a lea (%edx,%ebx,1),%eax <== NOT EXECUTED 14719d: eb 1f jmp 1471be <== NOT EXECUTED 14719f: 90 nop <== NOT EXECUTED 1471a0: 89 c2 mov %eax,%edx <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 1471a2: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1471a7: d3 e7 shl %cl,%edi <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 1471a9: 85 7d d4 test %edi,-0x2c(%ebp) <== NOT EXECUTED 1471ac: 0f 85 9a 00 00 00 jne 14724c <== NOT EXECUTED *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 1471b2: 01 d9 add %ebx,%ecx <== NOT EXECUTED 1471b4: 01 d8 add %ebx,%eax <== NOT EXECUTED return 0; } if (test_bit == end_bit) 1471b6: 89 c2 mov %eax,%edx <== NOT EXECUTED 1471b8: 29 da sub %ebx,%edx <== NOT EXECUTED 1471ba: 39 d6 cmp %edx,%esi <== NOT EXECUTED 1471bc: 74 06 je 1471c4 <== NOT EXECUTED { /* * Find the clear bit in the map. Update the search map and map if * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) 1471be: 83 f9 1f cmp $0x1f,%ecx <== NOT EXECUTED 1471c1: 76 dd jbe 1471a0 <== NOT EXECUTED 1471c3: 90 nop <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 1471c4: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 1471c7: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 1471ca: 01 5d c8 add %ebx,-0x38(%ebp) <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 1471cd: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED 1471d0: 7e 66 jle 147238 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 1471d2: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 1471d5: 83 ea 1f sub $0x1f,%edx <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 1471d8: 39 d6 cmp %edx,%esi <== NOT EXECUTED 1471da: 0f 8e df 00 00 00 jle 1472bf <== NOT EXECUTED 1471e0: 31 c0 xor %eax,%eax <== NOT EXECUTED 1471e2: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED 1471e5: 8b 7d a8 mov -0x58(%ebp),%edi <== NOT EXECUTED 1471e8: 01 7d c4 add %edi,-0x3c(%ebp) <== NOT EXECUTED 1471eb: e9 6b ff ff ff jmp 14715b <== NOT EXECUTED * * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); 1471f0: 83 e2 e0 and $0xffffffe0,%edx <== NOT EXECUTED if (direction > 0) 1471f3: 85 db test %ebx,%ebx <== NOT EXECUTED 1471f5: 0f 8e a1 00 00 00 jle 14729c <== NOT EXECUTED { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 1471fb: bf 20 00 00 00 mov $0x20,%edi <== NOT EXECUTED 147200: 29 cf sub %ecx,%edi <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 147202: 89 f8 mov %edi,%eax <== NOT EXECUTED 147204: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 147207: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 14720a: 31 c0 xor %eax,%eax <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 14720c: 0f af fb imul %ebx,%edi <== NOT EXECUTED 14720f: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 147212: 8d 0c b9 lea (%ecx,%edi,4),%ecx <== NOT EXECUTED 147215: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED map_index += direction * bits_skipped; 147218: 01 7d c8 add %edi,-0x38(%ebp) <== NOT EXECUTED } search_bits += direction; 14721b: 8b 7d b0 mov -0x50(%ebp),%edi <== NOT EXECUTED 14721e: 01 7d b4 add %edi,-0x4c(%ebp) <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 147221: 83 fb 00 cmp $0x0,%ebx <== NOT EXECUTED 147224: 7e 66 jle 14728c <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 147226: 39 d6 cmp %edx,%esi <== NOT EXECUTED 147228: 0f 8c 8a 00 00 00 jl 1472b8 <== NOT EXECUTED 14722e: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 147230: e9 05 ff ff ff jmp 14713a <== NOT EXECUTED 147235: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 147238: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 14723b: 74 08 je 147245 <== NOT EXECUTED 14723d: 39 d6 cmp %edx,%esi <== NOT EXECUTED 14723f: 0f 8d 87 00 00 00 jge 1472cc <== NOT EXECUTED 147245: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 14724a: eb 96 jmp 1471e2 <== NOT EXECUTED */ static rtems_rfs_bitmap_element rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_element bits) { return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 14724c: f7 d7 not %edi <== NOT EXECUTED 14724e: 23 7d d4 and -0x2c(%ebp),%edi <== NOT EXECUTED while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); 147251: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 147254: 89 38 mov %edi,(%eax) <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 147256: 85 ff test %edi,%edi <== NOT EXECUTED 147258: 75 0a jne 147264 <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 14725a: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED 14725d: f7 d0 not %eax <== NOT EXECUTED 14725f: 8b 4d b4 mov -0x4c(%ebp),%ecx <== NOT EXECUTED 147262: 21 01 and %eax,(%ecx) <== NOT EXECUTED 1 << search_offset); control->free--; 147264: 8b 7d b8 mov -0x48(%ebp),%edi <== NOT EXECUTED 147267: ff 4f 10 decl 0x10(%edi) <== NOT EXECUTED *bit = test_bit; 14726a: 8b 45 a4 mov -0x5c(%ebp),%eax <== NOT EXECUTED 14726d: 89 10 mov %edx,(%eax) <== NOT EXECUTED *found = true; 14726f: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 147272: c6 02 01 movb $0x1,(%edx) <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 147275: 8b 07 mov (%edi),%eax <== NOT EXECUTED 147277: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED 14727a: 31 c0 xor %eax,%eax <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); return 0; } 14727c: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED 14727f: 5b pop %ebx <== NOT EXECUTED 147280: 5e pop %esi <== NOT EXECUTED 147281: 5f pop %edi <== NOT EXECUTED 147282: c9 leave <== NOT EXECUTED 147283: c3 ret <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; 147284: 8d 70 ff lea -0x1(%eax),%esi <== NOT EXECUTED 147287: e9 64 fe ff ff jmp 1470f0 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 14728c: 74 2a je 1472b8 <== NOT EXECUTED 14728e: 39 d6 cmp %edx,%esi <== NOT EXECUTED 147290: 7f 26 jg 1472b8 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 147292: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED 147297: e9 9e fe ff ff jmp 14713a <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); map_offset = 0; } else { bits_skipped = search_offset + 1; 14729c: 8d 79 01 lea 0x1(%ecx),%edi <== NOT EXECUTED /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 14729f: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 1472a2: f7 d1 not %ecx <== NOT EXECUTED 1472a4: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 1472a7: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 1472ac: e9 5b ff ff ff jmp 14720c <== NOT EXECUTED * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; end_bit = test_bit + (window * direction); if (end_bit < 0) 1472b1: 31 f6 xor %esi,%esi <== NOT EXECUTED 1472b3: e9 38 fe ff ff jmp 1470f0 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 1472b8: 31 c0 xor %eax,%eax <== NOT EXECUTED 1472ba: e9 09 fe ff ff jmp 1470c8 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 1472bf: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 1472c2: 01 4d b4 add %ecx,-0x4c(%ebp) <== NOT EXECUTED 1472c5: 31 c0 xor %eax,%eax <== NOT EXECUTED 1472c7: e9 5a ff ff ff jmp 147226 <== NOT EXECUTED 1472cc: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 1472cf: 01 45 b4 add %eax,-0x4c(%ebp) <== NOT EXECUTED 1472d2: b8 1f 00 00 00 mov $0x1f,%eax <== NOT EXECUTED 1472d7: eb b5 jmp 14728e <== NOT EXECUTED =============================================================================== 0010c488 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c488: 55 push %ebp 10c489: 89 e5 mov %esp,%ebp 10c48b: 53 push %ebx 10c48c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c48f: 8b 1d 58 96 12 00 mov 0x129658,%ebx 10c495: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx 10c49b: 74 10 je 10c4ad <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c49d: 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)(); 10c4a0: 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 ) { 10c4a3: 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 ; 10c4a5: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx 10c4ab: 75 f3 jne 10c4a0 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10c4ad: 58 pop %eax 10c4ae: 5b pop %ebx 10c4af: c9 leave 10c4b0: c3 ret =============================================================================== 0010c4b4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c4b4: 55 push %ebp 10c4b5: 89 e5 mov %esp,%ebp 10c4b7: 53 push %ebx 10c4b8: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c4bb: 8b 1d 58 96 12 00 mov 0x129658,%ebx 10c4c1: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx 10c4c7: 74 1c je 10c4e5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c4c9: 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 ); 10c4cc: 83 ec 0c sub $0xc,%esp 10c4cf: ff 35 b8 94 12 00 pushl 0x1294b8 10c4d5: 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 ) { 10c4d8: 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 ; 10c4da: 83 c4 10 add $0x10,%esp 10c4dd: 81 fb 5c 96 12 00 cmp $0x12965c,%ebx 10c4e3: 75 e7 jne 10c4cc <_API_extensions_Run_postswitch+0x18> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c4e5: 8b 5d fc mov -0x4(%ebp),%ebx 10c4e8: c9 leave 10c4e9: c3 ret =============================================================================== 00100200 <_Barrier_Manager_initialization>: #include #include #include void _Barrier_Manager_initialization(void) { 100200: 55 push %ebp 100201: 89 e5 mov %esp,%ebp } 100203: c9 leave 100204: c3 ret =============================================================================== 0010e7ac <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e7ac: 55 push %ebp 10e7ad: 89 e5 mov %esp,%ebp 10e7af: 57 push %edi 10e7b0: 56 push %esi 10e7b1: 53 push %ebx 10e7b2: 83 ec 1c sub $0x1c,%esp 10e7b5: 8b 5d 08 mov 0x8(%ebp),%ebx 10e7b8: 8b 7d 0c mov 0xc(%ebp),%edi 10e7bb: 8b 4d 14 mov 0x14(%ebp),%ecx 10e7be: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e7c1: 8b 35 98 c4 12 00 mov 0x12c498,%esi * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e7c7: 9c pushf 10e7c8: fa cli 10e7c9: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e7cc: 8b 43 44 mov 0x44(%ebx),%eax 10e7cf: 85 c0 test %eax,%eax 10e7d1: 75 1d jne 10e7f0 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e7d3: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e7da: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e7dd: ff 75 e4 pushl -0x1c(%ebp) 10e7e0: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e7e1: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e7e8: 8d 65 f4 lea -0xc(%ebp),%esp 10e7eb: 5b pop %ebx 10e7ec: 5e pop %esi 10e7ed: 5f pop %edi 10e7ee: c9 leave 10e7ef: c3 ret * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 10e7f0: 48 dec %eax 10e7f1: 74 51 je 10e844 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e7f3: 84 d2 test %dl,%dl 10e7f5: 75 15 jne 10e80c <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e7f7: ff 75 e4 pushl -0x1c(%ebp) 10e7fa: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e7fb: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e802: 8d 65 f4 lea -0xc(%ebp),%esp 10e805: 5b pop %ebx 10e806: 5e pop %esi 10e807: 5f pop %edi 10e808: c9 leave 10e809: c3 ret 10e80a: 66 90 xchg %ax,%ax 10e80c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10e813: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e816: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e819: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e820: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e827: ff 75 e4 pushl -0x1c(%ebp) 10e82a: 9d popf _Thread_queue_Enqueue_with_handler( 10e82b: c7 45 10 b0 e9 10 00 movl $0x10e9b0,0x10(%ebp) 10e832: 89 4d 0c mov %ecx,0xc(%ebp) 10e835: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e838: 8d 65 f4 lea -0xc(%ebp),%esp 10e83b: 5b pop %ebx 10e83c: 5e pop %esi 10e83d: 5f pop %edi 10e83e: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10e83f: e9 7c 19 00 00 jmp 1101c0 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e844: 83 ec 0c sub $0xc,%esp 10e847: 53 push %ebx 10e848: 88 55 e0 mov %dl,-0x20(%ebp) 10e84b: 89 4d dc mov %ecx,-0x24(%ebp) 10e84e: e8 81 1c 00 00 call 1104d4 <_Thread_queue_First> if ( !waiter ) { 10e853: 83 c4 10 add $0x10,%esp 10e856: 85 c0 test %eax,%eax 10e858: 8a 55 e0 mov -0x20(%ebp),%dl 10e85b: 8b 4d dc mov -0x24(%ebp),%ecx 10e85e: 75 93 jne 10e7f3 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10e860: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e863: ff 75 e4 pushl -0x1c(%ebp) 10e866: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e867: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e86e: e9 75 ff ff ff jmp 10e7e8 <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010e874 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e874: 55 push %ebp 10e875: 89 e5 mov %esp,%ebp 10e877: 57 push %edi 10e878: 56 push %esi 10e879: 53 push %ebx 10e87a: 83 ec 0c sub $0xc,%esp 10e87d: 8b 45 08 mov 0x8(%ebp),%eax 10e880: 8b 7d 0c mov 0xc(%ebp),%edi 10e883: 8b 75 14 mov 0x14(%ebp),%esi 10e886: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e889: 8b 15 98 c4 12 00 mov 0x12c498,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e88f: 9c pushf 10e890: fa cli 10e891: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e892: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e896: 75 18 jne 10e8b0 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e898: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e89f: 51 push %ecx 10e8a0: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e8a1: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e8a8: 83 c4 0c add $0xc,%esp 10e8ab: 5b pop %ebx 10e8ac: 5e pop %esi 10e8ad: 5f pop %edi 10e8ae: c9 leave 10e8af: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e8b0: 84 db test %bl,%bl 10e8b2: 75 14 jne 10e8c8 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e8b4: 51 push %ecx 10e8b5: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e8b6: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e8bd: 83 c4 0c add $0xc,%esp 10e8c0: 5b pop %ebx 10e8c1: 5e pop %esi 10e8c2: 5f pop %edi 10e8c3: c9 leave 10e8c4: c3 ret 10e8c5: 8d 76 00 lea 0x0(%esi),%esi 10e8c8: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10e8cf: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e8d2: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e8d5: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e8dc: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e8e3: 51 push %ecx 10e8e4: 9d popf _Thread_queue_Enqueue_with_handler( 10e8e5: c7 45 10 b0 e9 10 00 movl $0x10e9b0,0x10(%ebp) 10e8ec: 89 75 0c mov %esi,0xc(%ebp) 10e8ef: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e8f2: 83 c4 0c add $0xc,%esp 10e8f5: 5b pop %ebx 10e8f6: 5e pop %esi 10e8f7: 5f pop %edi 10e8f8: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10e8f9: e9 c2 18 00 00 jmp 1101c0 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010e900 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e900: 55 push %ebp 10e901: 89 e5 mov %esp,%ebp 10e903: 53 push %ebx 10e904: 83 ec 04 sub $0x4,%esp 10e907: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e90a: 8b 0d 98 c4 12 00 mov 0x12c498,%ecx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e910: 9c pushf 10e911: fa cli 10e912: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e913: 8b 43 44 mov 0x44(%ebx),%eax 10e916: 85 c0 test %eax,%eax 10e918: 74 7a je 10e994 <_CORE_RWLock_Release+0x94> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10e91a: 48 dec %eax 10e91b: 74 63 je 10e980 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e91d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10e924: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e92b: 52 push %edx 10e92c: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e92d: 83 ec 0c sub $0xc,%esp 10e930: 53 push %ebx 10e931: e8 6e 17 00 00 call 1100a4 <_Thread_queue_Dequeue> if ( next ) { 10e936: 83 c4 10 add $0x10,%esp 10e939: 85 c0 test %eax,%eax 10e93b: 74 39 je 10e976 <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e93d: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e941: 74 61 je 10e9a4 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e943: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e946: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e94d: eb 17 jmp 10e966 <_CORE_RWLock_Release+0x66> 10e94f: 90 nop * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10e950: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e954: 74 20 je 10e976 <_CORE_RWLock_Release+0x76><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e956: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e959: 83 ec 08 sub $0x8,%esp 10e95c: 50 push %eax 10e95d: 53 push %ebx 10e95e: e8 65 1a 00 00 call 1103c8 <_Thread_queue_Extract> } 10e963: 83 c4 10 add $0x10,%esp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e966: 83 ec 0c sub $0xc,%esp 10e969: 53 push %ebx 10e96a: e8 65 1b 00 00 call 1104d4 <_Thread_queue_First> if ( !next || 10e96f: 83 c4 10 add $0x10,%esp 10e972: 85 c0 test %eax,%eax 10e974: 75 da jne 10e950 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e976: 31 c0 xor %eax,%eax 10e978: 8b 5d fc mov -0x4(%ebp),%ebx 10e97b: c9 leave 10e97c: c3 ret 10e97d: 8d 76 00 lea 0x0(%esi),%esi _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 10e980: 8b 43 48 mov 0x48(%ebx),%eax 10e983: 48 dec %eax 10e984: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e987: 85 c0 test %eax,%eax 10e989: 74 92 je 10e91d <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e98b: 52 push %edx 10e98c: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e98d: 31 c0 xor %eax,%eax 10e98f: 8b 5d fc mov -0x4(%ebp),%ebx 10e992: c9 leave 10e993: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e994: 52 push %edx 10e995: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e996: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e99d: 31 c0 xor %eax,%eax 10e99f: 8b 5d fc mov -0x4(%ebp),%ebx 10e9a2: c9 leave 10e9a3: c3 ret next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e9a4: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e9ab: eb c9 jmp 10e976 <_CORE_RWLock_Release+0x76> =============================================================================== 0010e9b0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e9b0: 55 push %ebp 10e9b1: 89 e5 mov %esp,%ebp 10e9b3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e9b6: 8d 45 f4 lea -0xc(%ebp),%eax 10e9b9: 50 push %eax 10e9ba: ff 75 08 pushl 0x8(%ebp) 10e9bd: e8 ea 12 00 00 call 10fcac <_Thread_Get> switch ( location ) { 10e9c2: 83 c4 10 add $0x10,%esp 10e9c5: 8b 55 f4 mov -0xc(%ebp),%edx 10e9c8: 85 d2 test %edx,%edx 10e9ca: 75 17 jne 10e9e3 <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e9cc: 83 ec 0c sub $0xc,%esp 10e9cf: 50 push %eax 10e9d0: e8 cf 1b 00 00 call 1105a4 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e9d5: a1 d8 c3 12 00 mov 0x12c3d8,%eax 10e9da: 48 dec %eax 10e9db: a3 d8 c3 12 00 mov %eax,0x12c3d8 10e9e0: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e9e3: c9 leave 10e9e4: c3 ret =============================================================================== 0011a190 <_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 ) { 11a190: 55 push %ebp 11a191: 89 e5 mov %esp,%ebp 11a193: 57 push %edi 11a194: 56 push %esi 11a195: 53 push %ebx 11a196: 83 ec 1c sub $0x1c,%esp 11a199: 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 ) { 11a19c: 8b 45 10 mov 0x10(%ebp),%eax 11a19f: 39 43 4c cmp %eax,0x4c(%ebx) 11a1a2: 72 60 jb 11a204 <_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 ) { 11a1a4: 8b 43 48 mov 0x48(%ebx),%eax 11a1a7: 85 c0 test %eax,%eax 11a1a9: 75 45 jne 11a1f0 <_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))) { 11a1ab: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a1b2: eb 18 jmp 11a1cc <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a1b4: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a1b7: 8b 42 2c mov 0x2c(%edx),%eax 11a1ba: 89 c7 mov %eax,%edi 11a1bc: 8b 75 0c mov 0xc(%ebp),%esi 11a1bf: 8b 4d 10 mov 0x10(%ebp),%ecx 11a1c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a1c4: 8b 42 28 mov 0x28(%edx),%eax 11a1c7: 8b 55 10 mov 0x10(%ebp),%edx 11a1ca: 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))) { 11a1cc: 83 ec 0c sub $0xc,%esp 11a1cf: 53 push %ebx 11a1d0: e8 ef 24 00 00 call 11c6c4 <_Thread_queue_Dequeue> 11a1d5: 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 = 11a1d7: 83 c4 10 add $0x10,%esp 11a1da: 85 c0 test %eax,%eax 11a1dc: 75 d6 jne 11a1b4 <_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; 11a1de: 8b 55 e4 mov -0x1c(%ebp),%edx 11a1e1: 8b 45 1c mov 0x1c(%ebp),%eax 11a1e4: 89 10 mov %edx,(%eax) 11a1e6: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1e8: 8d 65 f4 lea -0xc(%ebp),%esp 11a1eb: 5b pop %ebx 11a1ec: 5e pop %esi 11a1ed: 5f pop %edi 11a1ee: c9 leave 11a1ef: 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; 11a1f0: 8b 55 1c mov 0x1c(%ebp),%edx 11a1f3: c7 02 00 00 00 00 movl $0x0,(%edx) 11a1f9: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1fb: 8d 65 f4 lea -0xc(%ebp),%esp 11a1fe: 5b pop %ebx 11a1ff: 5e pop %esi 11a200: 5f pop %edi 11a201: c9 leave 11a202: c3 ret 11a203: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a204: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a209: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a20c: 5b pop %ebx <== NOT EXECUTED 11a20d: 5e pop %esi <== NOT EXECUTED 11a20e: 5f pop %edi <== NOT EXECUTED 11a20f: c9 leave <== NOT EXECUTED 11a210: c3 ret <== NOT EXECUTED =============================================================================== 00115300 <_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 ) { 115300: 55 push %ebp 115301: 89 e5 mov %esp,%ebp 115303: 57 push %edi 115304: 56 push %esi 115305: 53 push %ebx 115306: 83 ec 0c sub $0xc,%esp 115309: 8b 5d 08 mov 0x8(%ebp),%ebx 11530c: 8b 75 10 mov 0x10(%ebp),%esi 11530f: 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; 115312: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 115315: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 11531c: 89 43 4c mov %eax,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 11531f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 115326: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 11532d: a8 03 test $0x3,%al 11532f: 75 1b jne 11534c <_CORE_message_queue_Initialize+0x4c> 115331: 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)); 115333: 8d 7a 14 lea 0x14(%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 * 115336: 89 f8 mov %edi,%eax 115338: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11533b: 39 d0 cmp %edx,%eax 11533d: 73 25 jae 115364 <_CORE_message_queue_Initialize+0x64><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11533f: 31 c0 xor %eax,%eax } 115341: 8d 65 f4 lea -0xc(%ebp),%esp 115344: 5b pop %ebx 115345: 5e pop %esi 115346: 5f pop %edi 115347: c9 leave 115348: c3 ret 115349: 8d 76 00 lea 0x0(%esi),%esi * 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); 11534c: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 11534f: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 115352: 39 d0 cmp %edx,%eax 115354: 77 e9 ja 11533f <_CORE_message_queue_Initialize+0x3f><== 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)); 115356: 8d 7a 14 lea 0x14(%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 * 115359: 89 f8 mov %edi,%eax 11535b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11535e: 39 d0 cmp %edx,%eax 115360: 72 dd jb 11533f <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN 115362: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 115364: 83 ec 0c sub $0xc,%esp 115367: 50 push %eax 115368: e8 03 2a 00 00 call 117d70 <_Workspace_Allocate> 11536d: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115370: 83 c4 10 add $0x10,%esp 115373: 85 c0 test %eax,%eax 115375: 74 c8 je 11533f <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 115377: 57 push %edi 115378: 56 push %esi 115379: 50 push %eax 11537a: 8d 43 68 lea 0x68(%ebx),%eax 11537d: 50 push %eax 11537e: e8 dd 5c 00 00 call 11b060 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 115383: 8d 43 54 lea 0x54(%ebx),%eax 115386: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 115389: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 115390: 8d 43 50 lea 0x50(%ebx),%eax 115393: 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( 115396: 6a 06 push $0x6 115398: 68 80 00 00 00 push $0x80 11539d: 8b 45 0c mov 0xc(%ebp),%eax 1153a0: 83 38 01 cmpl $0x1,(%eax) 1153a3: 0f 94 c0 sete %al 1153a6: 0f b6 c0 movzbl %al,%eax 1153a9: 50 push %eax 1153aa: 53 push %ebx 1153ab: e8 b8 1f 00 00 call 117368 <_Thread_queue_Initialize> 1153b0: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1153b2: 83 c4 20 add $0x20,%esp } 1153b5: 8d 65 f4 lea -0xc(%ebp),%esp 1153b8: 5b pop %ebx 1153b9: 5e pop %esi 1153ba: 5f pop %edi 1153bb: c9 leave 1153bc: c3 ret =============================================================================== 001120cc <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 1120cc: 55 push %ebp 1120cd: 89 e5 mov %esp,%ebp 1120cf: 56 push %esi 1120d0: 53 push %ebx 1120d1: 8b 45 08 mov 0x8(%ebp),%eax 1120d4: 8b 55 0c mov 0xc(%ebp),%edx 1120d7: 8b 4d 10 mov 0x10(%ebp),%ecx CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 1120da: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 1120dd: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 1120e3: 74 53 je 112138 <_CORE_message_queue_Insert_message+0x6c> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 1120e5: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 1120eb: 74 6f je 11215c <_CORE_message_queue_Insert_message+0x90> Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 1120ed: 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; 1120f0: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 1120f3: 39 f3 cmp %esi,%ebx 1120f5: 74 05 je 1120fc <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 1120f7: 3b 4b 08 cmp 0x8(%ebx),%ecx 1120fa: 7d 2c jge 112128 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 1120fc: 9c pushf 1120fd: fa cli 1120fe: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1120ff: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 112102: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 112105: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 112108: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 11210a: 89 11 mov %edx,(%ecx) the_node->next = before_node; 11210c: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 11210e: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 112111: 56 push %esi 112112: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 112113: 8b 50 60 mov 0x60(%eax),%edx 112116: 85 d2 test %edx,%edx 112118: 74 3d je 112157 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 11211a: 8b 40 64 mov 0x64(%eax),%eax 11211d: 89 45 08 mov %eax,0x8(%ebp) #endif } 112120: 5b pop %ebx 112121: 5e pop %esi 112122: c9 leave * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 112123: ff e2 jmp *%edx 112125: 8d 76 00 lea 0x0(%esi),%esi this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 112128: 8b 1b mov (%ebx),%ebx int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 11212a: 39 f3 cmp %esi,%ebx 11212c: 74 ce je 1120fc <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 11212e: 3b 4b 08 cmp 0x8(%ebx),%ecx 112131: 7c c9 jl 1120fc <_CORE_message_queue_Insert_message+0x30> 112133: eb f3 jmp 112128 <_CORE_message_queue_Insert_message+0x5c> 112135: 8d 76 00 lea 0x0(%esi),%esi else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 112138: 9c pushf 112139: fa cli 11213a: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11213b: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11213e: 8d 48 54 lea 0x54(%eax),%ecx 112141: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 112143: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 112146: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 112149: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 11214b: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 11214e: 53 push %ebx 11214f: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 112150: 8b 50 60 mov 0x60(%eax),%edx 112153: 85 d2 test %edx,%edx 112155: 75 c3 jne 11211a <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 112157: 5b pop %ebx 112158: 5e pop %esi 112159: c9 leave 11215a: c3 ret 11215b: 90 nop SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 11215c: 9c pushf 11215d: fa cli 11215e: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11215f: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 112162: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 112165: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 112168: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 11216b: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11216e: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 112170: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 112173: 53 push %ebx 112174: 9d popf 112175: eb 9c jmp 112113 <_CORE_message_queue_Insert_message+0x47> =============================================================================== 001153c0 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1153c0: 55 push %ebp 1153c1: 89 e5 mov %esp,%ebp 1153c3: 57 push %edi 1153c4: 56 push %esi 1153c5: 53 push %ebx 1153c6: 83 ec 2c sub $0x2c,%esp 1153c9: 8b 55 08 mov 0x8(%ebp),%edx 1153cc: 8b 45 0c mov 0xc(%ebp),%eax 1153cf: 89 45 dc mov %eax,-0x24(%ebp) 1153d2: 8b 4d 10 mov 0x10(%ebp),%ecx 1153d5: 89 4d e0 mov %ecx,-0x20(%ebp) 1153d8: 8b 45 14 mov 0x14(%ebp),%eax 1153db: 8b 5d 1c mov 0x1c(%ebp),%ebx 1153de: 89 5d d8 mov %ebx,-0x28(%ebp) 1153e1: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1153e5: 8b 0d b8 30 13 00 mov 0x1330b8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1153eb: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 1153f2: 9c pushf 1153f3: fa cli 1153f4: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1153f7: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1153fa: 8d 72 54 lea 0x54(%edx),%esi 1153fd: 39 f3 cmp %esi,%ebx 1153ff: 74 7b je 11547c <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 115401: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 115403: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 115406: 8d 72 50 lea 0x50(%edx),%esi 115409: 89 71 04 mov %esi,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 11540c: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 11540f: ff 75 e4 pushl -0x1c(%ebp) 115412: 9d popf *size_p = the_message->Contents.size; 115413: 8b 4b 0c mov 0xc(%ebx),%ecx 115416: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 115418: 8b 73 08 mov 0x8(%ebx),%esi 11541b: 8b 0d b8 30 13 00 mov 0x1330b8,%ecx 115421: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 115424: 8d 4b 10 lea 0x10(%ebx),%ecx 115427: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11542a: 8b 08 mov (%eax),%ecx 11542c: 8b 7d e0 mov -0x20(%ebp),%edi 11542f: 8b 75 e4 mov -0x1c(%ebp),%esi 115432: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 115434: 83 ec 0c sub $0xc,%esp 115437: 52 push %edx 115438: 89 55 d4 mov %edx,-0x2c(%ebp) 11543b: e8 ac 1b 00 00 call 116fec <_Thread_queue_Dequeue> if ( !the_thread ) { 115440: 83 c4 10 add $0x10,%esp 115443: 85 c0 test %eax,%eax 115445: 8b 55 d4 mov -0x2c(%ebp),%edx 115448: 0f 84 86 00 00 00 je 1154d4 <_CORE_message_queue_Seize+0x114> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 11544e: 8b 48 24 mov 0x24(%eax),%ecx 115451: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 115454: 8b 48 30 mov 0x30(%eax),%ecx 115457: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11545a: 8b 70 2c mov 0x2c(%eax),%esi 11545d: 8b 7d e4 mov -0x1c(%ebp),%edi 115460: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 115462: 8b 43 08 mov 0x8(%ebx),%eax 115465: 89 45 10 mov %eax,0x10(%ebp) 115468: 89 5d 0c mov %ebx,0xc(%ebp) 11546b: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 11546e: 8d 65 f4 lea -0xc(%ebp),%esp 115471: 5b pop %ebx 115472: 5e pop %esi 115473: 5f pop %edi 115474: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 115475: e9 0e 5d 00 00 jmp 11b188 <_CORE_message_queue_Insert_message> 11547a: 66 90 xchg %ax,%ax return; } #endif } if ( !wait ) { 11547c: 89 fb mov %edi,%ebx 11547e: 84 db test %bl,%bl 115480: 75 16 jne 115498 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 115482: ff 75 e4 pushl -0x1c(%ebp) 115485: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 115486: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 11548d: 8d 65 f4 lea -0xc(%ebp),%esp 115490: 5b pop %ebx 115491: 5e pop %esi 115492: 5f pop %edi 115493: c9 leave 115494: c3 ret 115495: 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; 115498: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 11549f: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 1154a2: 8b 5d dc mov -0x24(%ebp),%ebx 1154a5: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 1154a8: 8b 5d e0 mov -0x20(%ebp),%ebx 1154ab: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 1154ae: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1154b1: ff 75 e4 pushl -0x1c(%ebp) 1154b4: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1154b5: c7 45 10 18 74 11 00 movl $0x117418,0x10(%ebp) 1154bc: 8b 45 d8 mov -0x28(%ebp),%eax 1154bf: 89 45 0c mov %eax,0xc(%ebp) 1154c2: 89 55 08 mov %edx,0x8(%ebp) } 1154c5: 8d 65 f4 lea -0xc(%ebp),%esp 1154c8: 5b pop %ebx 1154c9: 5e pop %esi 1154ca: 5f pop %edi 1154cb: c9 leave executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1154cc: e9 37 1c 00 00 jmp 117108 <_Thread_queue_Enqueue_with_handler> 1154d1: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 1154d4: 89 5d 0c mov %ebx,0xc(%ebp) 1154d7: 83 c2 68 add $0x68,%edx 1154da: 89 55 08 mov %edx,0x8(%ebp) } 1154dd: 8d 65 f4 lea -0xc(%ebp),%esp 1154e0: 5b pop %ebx 1154e1: 5e pop %esi 1154e2: 5f pop %edi 1154e3: c9 leave 1154e4: e9 97 fd ff ff jmp 115280 <_Chain_Append> =============================================================================== 0010c634 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c634: 55 push %ebp 10c635: 89 e5 mov %esp,%ebp 10c637: 57 push %edi 10c638: 56 push %esi 10c639: 53 push %ebx 10c63a: 83 ec 0c sub $0xc,%esp 10c63d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c640: 0f b6 75 20 movzbl 0x20(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c644: 8b 45 10 mov 0x10(%ebp),%eax 10c647: 39 43 4c cmp %eax,0x4c(%ebx) 10c64a: 0f 82 84 00 00 00 jb 10c6d4 <_CORE_message_queue_Submit+0xa0> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c650: 8b 7b 48 mov 0x48(%ebx),%edi 10c653: 85 ff test %edi,%edi 10c655: 74 45 je 10c69c <_CORE_message_queue_Submit+0x68> 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 *) 10c657: 83 ec 0c sub $0xc,%esp 10c65a: 8d 43 68 lea 0x68(%ebx),%eax 10c65d: 50 push %eax 10c65e: e8 ad ff ff ff call 10c610 <_Chain_Get> 10c663: 89 c2 mov %eax,%edx * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { 10c665: 83 c4 10 add $0x10,%esp 10c668: 85 c0 test %eax,%eax 10c66a: 74 78 je 10c6e4 <_CORE_message_queue_Submit+0xb0> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c66c: 8d 40 10 lea 0x10(%eax),%eax 10c66f: 89 c7 mov %eax,%edi 10c671: 8b 75 0c mov 0xc(%ebp),%esi 10c674: 8b 4d 10 mov 0x10(%ebp),%ecx 10c677: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c679: 8b 4d 10 mov 0x10(%ebp),%ecx 10c67c: 89 4a 0c mov %ecx,0xc(%edx) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 10c67f: 8b 45 1c mov 0x1c(%ebp),%eax 10c682: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c685: 51 push %ecx 10c686: 50 push %eax 10c687: 52 push %edx 10c688: 53 push %ebx 10c689: e8 3e 5a 00 00 call 1120cc <_CORE_message_queue_Insert_message> 10c68e: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c690: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c693: 8d 65 f4 lea -0xc(%ebp),%esp 10c696: 5b pop %ebx 10c697: 5e pop %esi 10c698: 5f pop %edi 10c699: c9 leave 10c69a: c3 ret 10c69b: 90 nop /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c69c: 83 ec 0c sub $0xc,%esp 10c69f: 53 push %ebx 10c6a0: e8 e3 19 00 00 call 10e088 <_Thread_queue_Dequeue> 10c6a5: 89 c2 mov %eax,%edx if ( the_thread ) { 10c6a7: 83 c4 10 add $0x10,%esp 10c6aa: 85 c0 test %eax,%eax 10c6ac: 74 a9 je 10c657 <_CORE_message_queue_Submit+0x23> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c6ae: 8b 40 2c mov 0x2c(%eax),%eax 10c6b1: 89 c7 mov %eax,%edi 10c6b3: 8b 75 0c mov 0xc(%ebp),%esi 10c6b6: 8b 4d 10 mov 0x10(%ebp),%ecx 10c6b9: 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; 10c6bb: 8b 42 28 mov 0x28(%edx),%eax 10c6be: 8b 4d 10 mov 0x10(%ebp),%ecx 10c6c1: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c6c3: 8b 45 1c mov 0x1c(%ebp),%eax 10c6c6: 89 42 24 mov %eax,0x24(%edx) 10c6c9: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c6cb: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi 10c6d0: 5f pop %edi 10c6d1: c9 leave 10c6d2: c3 ret 10c6d3: 90 nop ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c6d4: 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 } 10c6d9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6dc: 5b pop %ebx 10c6dd: 5e pop %esi 10c6de: 5f pop %edi 10c6df: c9 leave 10c6e0: c3 ret 10c6e1: 8d 76 00 lea 0x0(%esi),%esi /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10c6e4: 89 f2 mov %esi,%edx 10c6e6: 84 d2 test %dl,%dl 10c6e8: 74 12 je 10c6fc <_CORE_message_queue_Submit+0xc8> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10c6ea: a1 94 94 12 00 mov 0x129494,%eax 10c6ef: 85 c0 test %eax,%eax 10c6f1: 74 11 je 10c704 <_CORE_message_queue_Submit+0xd0> 10c6f3: b8 03 00 00 00 mov $0x3,%eax 10c6f8: eb 99 jmp 10c693 <_CORE_message_queue_Submit+0x5f> 10c6fa: 66 90 xchg %ax,%ax /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10c6fc: b8 02 00 00 00 mov $0x2,%eax 10c701: eb 90 jmp 10c693 <_CORE_message_queue_Submit+0x5f> 10c703: 90 nop * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10c704: a1 b8 94 12 00 mov 0x1294b8,%eax ISR_Level level; _ISR_Disable( level ); 10c709: 9c pushf 10c70a: fa cli 10c70b: 59 pop %ecx 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; 10c70c: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10c713: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c716: 8b 55 14 mov 0x14(%ebp),%edx 10c719: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c71c: 8b 55 0c mov 0xc(%ebp),%edx 10c71f: 89 50 2c mov %edx,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c722: 8b 55 10 mov 0x10(%ebp),%edx 10c725: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c728: 8b 55 1c mov 0x1c(%ebp),%edx 10c72b: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c72e: 51 push %ecx 10c72f: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c730: 50 push %eax 10c731: 68 b4 e4 10 00 push $0x10e4b4 10c736: ff 75 24 pushl 0x24(%ebp) 10c739: 53 push %ebx 10c73a: e8 65 1a 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler> 10c73f: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c744: 83 c4 10 add $0x10,%esp 10c747: e9 47 ff ff ff jmp 10c693 <_CORE_message_queue_Submit+0x5f> =============================================================================== 0010c758 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c758: 55 push %ebp 10c759: 89 e5 mov %esp,%ebp 10c75b: 57 push %edi 10c75c: 56 push %esi 10c75d: 53 push %ebx 10c75e: 83 ec 0c sub $0xc,%esp 10c761: 8b 45 08 mov 0x8(%ebp),%eax 10c764: 8b 5d 0c mov 0xc(%ebp),%ebx 10c767: 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; 10c76a: 8d 78 40 lea 0x40(%eax),%edi 10c76d: b9 04 00 00 00 mov $0x4,%ecx 10c772: 89 de mov %ebx,%esi 10c774: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c776: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c779: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c780: 85 d2 test %edx,%edx 10c782: 75 30 jne 10c7b4 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c784: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c78b: 8b 15 b8 94 12 00 mov 0x1294b8,%edx 10c791: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c794: 8b 4a 08 mov 0x8(%edx),%ecx 10c797: 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; 10c79a: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c79d: 83 f9 02 cmp $0x2,%ecx 10c7a0: 74 05 je 10c7a7 <_CORE_mutex_Initialize+0x4f> 10c7a2: 83 f9 03 cmp $0x3,%ecx 10c7a5: 75 22 jne 10c7c9 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c7a7: 8b 4a 14 mov 0x14(%edx),%ecx 10c7aa: 3b 48 4c cmp 0x4c(%eax),%ecx 10c7ad: 72 41 jb 10c7f0 <_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++; 10c7af: ff 42 1c incl 0x1c(%edx) 10c7b2: eb 15 jmp 10c7c9 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c7b4: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c7bb: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c7c2: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c7c9: 6a 05 push $0x5 10c7cb: 68 00 04 00 00 push $0x400 10c7d0: 31 d2 xor %edx,%edx 10c7d2: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c7d6: 0f 95 c2 setne %dl 10c7d9: 52 push %edx 10c7da: 50 push %eax 10c7db: e8 24 1c 00 00 call 10e404 <_Thread_queue_Initialize> 10c7e0: 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; 10c7e2: 83 c4 10 add $0x10,%esp } 10c7e5: 8d 65 f4 lea -0xc(%ebp),%esp 10c7e8: 5b pop %ebx 10c7e9: 5e pop %esi 10c7ea: 5f pop %edi 10c7eb: c9 leave 10c7ec: c3 ret 10c7ed: 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 ) 10c7f0: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c7f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c7f8: 5b pop %ebx 10c7f9: 5e pop %esi 10c7fa: 5f pop %edi 10c7fb: c9 leave 10c7fc: c3 ret =============================================================================== 0010c850 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 83 ec 14 sub $0x14,%esp 10c857: 8b 5d 08 mov 0x8(%ebp),%ebx 10c85a: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c85d: a1 f8 93 12 00 mov 0x1293f8,%eax 10c862: 85 c0 test %eax,%eax 10c864: 74 04 je 10c86a <_CORE_mutex_Seize+0x1a> 10c866: 84 d2 test %dl,%dl 10c868: 75 36 jne 10c8a0 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c86a: 83 ec 08 sub $0x8,%esp 10c86d: 8d 45 18 lea 0x18(%ebp),%eax 10c870: 50 push %eax 10c871: 53 push %ebx 10c872: 88 55 f4 mov %dl,-0xc(%ebp) 10c875: e8 fe 58 00 00 call 112178 <_CORE_mutex_Seize_interrupt_trylock> 10c87a: 83 c4 10 add $0x10,%esp 10c87d: 85 c0 test %eax,%eax 10c87f: 8a 55 f4 mov -0xc(%ebp),%dl 10c882: 74 14 je 10c898 <_CORE_mutex_Seize+0x48> 10c884: 84 d2 test %dl,%dl 10c886: 75 30 jne 10c8b8 <_CORE_mutex_Seize+0x68> 10c888: ff 75 18 pushl 0x18(%ebp) 10c88b: 9d popf 10c88c: a1 b8 94 12 00 mov 0x1294b8,%eax 10c891: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c898: 8b 5d fc mov -0x4(%ebp),%ebx 10c89b: c9 leave 10c89c: c3 ret 10c89d: 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 ); 10c8a0: 83 3d c0 95 12 00 01 cmpl $0x1,0x1295c0 10c8a7: 76 c1 jbe 10c86a <_CORE_mutex_Seize+0x1a> 10c8a9: 53 push %ebx 10c8aa: 6a 13 push $0x13 10c8ac: 6a 00 push $0x0 10c8ae: 6a 00 push $0x0 10c8b0: e8 fb 05 00 00 call 10ceb0 <_Internal_error_Occurred> 10c8b5: 8d 76 00 lea 0x0(%esi),%esi 10c8b8: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c8bf: a1 b8 94 12 00 mov 0x1294b8,%eax 10c8c4: 89 58 44 mov %ebx,0x44(%eax) 10c8c7: 8b 55 0c mov 0xc(%ebp),%edx 10c8ca: 89 50 20 mov %edx,0x20(%eax) 10c8cd: a1 f8 93 12 00 mov 0x1293f8,%eax 10c8d2: 40 inc %eax 10c8d3: a3 f8 93 12 00 mov %eax,0x1293f8 10c8d8: ff 75 18 pushl 0x18(%ebp) 10c8db: 9d popf 10c8dc: 83 ec 08 sub $0x8,%esp 10c8df: ff 75 14 pushl 0x14(%ebp) 10c8e2: 53 push %ebx 10c8e3: e8 18 ff ff ff call 10c800 <_CORE_mutex_Seize_interrupt_blocking> 10c8e8: 83 c4 10 add $0x10,%esp } 10c8eb: 8b 5d fc mov -0x4(%ebp),%ebx 10c8ee: c9 leave 10c8ef: c3 ret =============================================================================== 00112178 <_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 ) { 112178: 55 push %ebp 112179: 89 e5 mov %esp,%ebp 11217b: 56 push %esi 11217c: 53 push %ebx 11217d: 8b 45 08 mov 0x8(%ebp),%eax 112180: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 112183: 8b 15 b8 94 12 00 mov 0x1294b8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 112189: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 112190: 8b 58 50 mov 0x50(%eax),%ebx 112193: 85 db test %ebx,%ebx 112195: 74 31 je 1121c8 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 112197: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11219e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1121a1: 8b 5a 08 mov 0x8(%edx),%ebx 1121a4: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1121a7: 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; 1121ae: 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 ) || 1121b1: 83 fb 02 cmp $0x2,%ebx 1121b4: 74 26 je 1121dc <_CORE_mutex_Seize_interrupt_trylock+0x64> 1121b6: 83 fb 03 cmp $0x3,%ebx 1121b9: 74 35 je 1121f0 <_CORE_mutex_Seize_interrupt_trylock+0x78> */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); 1121bb: ff 31 pushl (%ecx) 1121bd: 9d popf 1121be: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1121c0: 8d 65 f8 lea -0x8(%ebp),%esp 1121c3: 5b pop %ebx 1121c4: 5e pop %esi 1121c5: c9 leave 1121c6: c3 ret 1121c7: 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 ) ) { 1121c8: 3b 50 5c cmp 0x5c(%eax),%edx 1121cb: 74 17 je 1121e4 <_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 ); 1121cd: b8 01 00 00 00 mov $0x1,%eax 1121d2: 8d 65 f8 lea -0x8(%ebp),%esp 1121d5: 5b pop %ebx 1121d6: 5e pop %esi 1121d7: c9 leave 1121d8: c3 ret 1121d9: 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++; 1121dc: ff 42 1c incl 0x1c(%edx) 1121df: eb da jmp 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43> 1121e1: 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 ) { 1121e4: 8b 58 40 mov 0x40(%eax),%ebx 1121e7: 85 db test %ebx,%ebx 1121e9: 75 3d jne 112228 <_CORE_mutex_Seize_interrupt_trylock+0xb0> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 1121eb: ff 40 54 incl 0x54(%eax) 1121ee: eb cb jmp 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 1121f0: 8b 5a 1c mov 0x1c(%edx),%ebx 1121f3: 8d 73 01 lea 0x1(%ebx),%esi 1121f6: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 1121f9: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 1121fc: 39 70 4c cmp %esi,0x4c(%eax) 1121ff: 74 ba je 1121bb <_CORE_mutex_Seize_interrupt_trylock+0x43> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 112201: 72 39 jb 11223c <_CORE_mutex_Seize_interrupt_trylock+0xc4> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 112203: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 11220a: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 112211: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 112218: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11221b: ff 31 pushl (%ecx) 11221d: 9d popf 11221e: 31 c0 xor %eax,%eax 112220: 8d 65 f8 lea -0x8(%ebp),%esp 112223: 5b pop %ebx 112224: 5e pop %esi 112225: c9 leave 112226: c3 ret 112227: 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 ) { 112228: 4b dec %ebx 112229: 75 a2 jne 1121cd <_CORE_mutex_Seize_interrupt_trylock+0x55> 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; 11222b: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 112232: ff 31 pushl (%ecx) 112234: 9d popf 112235: 31 c0 xor %eax,%eax 112237: eb 99 jmp 1121d2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 112239: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11223c: 8b 15 f8 93 12 00 mov 0x1293f8,%edx 112242: 42 inc %edx 112243: 89 15 f8 93 12 00 mov %edx,0x1293f8 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 112249: ff 31 pushl (%ecx) 11224b: 9d popf _Thread_Change_priority( 11224c: 52 push %edx 11224d: 6a 00 push $0x0 11224f: ff 70 4c pushl 0x4c(%eax) 112252: ff 70 5c pushl 0x5c(%eax) 112255: e8 2a b5 ff ff call 10d784 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 11225a: e8 0d ba ff ff call 10dc6c <_Thread_Enable_dispatch> 11225f: 31 c0 xor %eax,%eax 112261: 83 c4 10 add $0x10,%esp 112264: e9 69 ff ff ff jmp 1121d2 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c8f0 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c8f0: 55 push %ebp 10c8f1: 89 e5 mov %esp,%ebp 10c8f3: 53 push %ebx 10c8f4: 83 ec 04 sub $0x4,%esp 10c8f7: 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; 10c8fa: 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 ) { 10c8fd: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c901: 74 15 je 10c918 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c903: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax 10c909: 74 0d je 10c918 <_CORE_mutex_Surrender+0x28> 10c90b: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c910: 8b 5d fc mov -0x4(%ebp),%ebx 10c913: c9 leave 10c914: c3 ret 10c915: 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 ) 10c918: 8b 53 54 mov 0x54(%ebx),%edx 10c91b: 85 d2 test %edx,%edx 10c91d: 74 65 je 10c984 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c91f: 4a dec %edx 10c920: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c923: 85 d2 test %edx,%edx 10c925: 75 5d jne 10c984 <_CORE_mutex_Surrender+0x94> 10c927: 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 ) || 10c92a: 83 fa 02 cmp $0x2,%edx 10c92d: 0f 84 99 00 00 00 je 10c9cc <_CORE_mutex_Surrender+0xdc> 10c933: 83 fa 03 cmp $0x3,%edx 10c936: 0f 84 90 00 00 00 je 10c9cc <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c93c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c943: 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 ) || 10c94a: 83 fa 02 cmp $0x2,%edx 10c94d: 74 5d je 10c9ac <_CORE_mutex_Surrender+0xbc> 10c94f: 83 fa 03 cmp $0x3,%edx 10c952: 74 58 je 10c9ac <_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 ) ) ) { 10c954: 83 ec 0c sub $0xc,%esp 10c957: 53 push %ebx 10c958: e8 2b 17 00 00 call 10e088 <_Thread_queue_Dequeue> 10c95d: 83 c4 10 add $0x10,%esp 10c960: 85 c0 test %eax,%eax 10c962: 74 7c je 10c9e0 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c964: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c967: 8b 50 08 mov 0x8(%eax),%edx 10c96a: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c96d: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c974: 8b 53 48 mov 0x48(%ebx),%edx 10c977: 83 fa 02 cmp $0x2,%edx 10c97a: 74 58 je 10c9d4 <_CORE_mutex_Surrender+0xe4> 10c97c: 83 fa 03 cmp $0x3,%edx 10c97f: 74 0b je 10c98c <_CORE_mutex_Surrender+0x9c> 10c981: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c984: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c986: 8b 5d fc mov -0x4(%ebp),%ebx 10c989: c9 leave 10c98a: c3 ret 10c98b: 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++; 10c98c: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c98f: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c992: 3b 50 14 cmp 0x14(%eax),%edx 10c995: 73 ed jae 10c984 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c997: 51 push %ecx 10c998: 6a 00 push $0x0 10c99a: 52 push %edx 10c99b: 50 push %eax 10c99c: e8 e3 0d 00 00 call 10d784 <_Thread_Change_priority> 10c9a1: 31 c0 xor %eax,%eax 10c9a3: 83 c4 10 add $0x10,%esp 10c9a6: e9 65 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20> 10c9ab: 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 && 10c9ac: 8b 50 1c mov 0x1c(%eax),%edx 10c9af: 85 d2 test %edx,%edx 10c9b1: 75 a1 jne 10c954 <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c9b3: 8b 50 18 mov 0x18(%eax),%edx 10c9b6: 3b 50 14 cmp 0x14(%eax),%edx 10c9b9: 74 99 je 10c954 <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c9bb: 51 push %ecx 10c9bc: 6a 01 push $0x1 10c9be: 52 push %edx 10c9bf: 50 push %eax 10c9c0: e8 bf 0d 00 00 call 10d784 <_Thread_Change_priority> 10c9c5: 83 c4 10 add $0x10,%esp 10c9c8: eb 8a jmp 10c954 <_CORE_mutex_Surrender+0x64> 10c9ca: 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--; 10c9cc: ff 48 1c decl 0x1c(%eax) 10c9cf: e9 68 ff ff ff jmp 10c93c <_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++; 10c9d4: ff 40 1c incl 0x1c(%eax) 10c9d7: 31 c0 xor %eax,%eax break; 10c9d9: e9 32 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20> 10c9de: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c9e0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c9e7: 31 c0 xor %eax,%eax 10c9e9: e9 22 ff ff ff jmp 10c910 <_CORE_mutex_Surrender+0x20> =============================================================================== 001133d4 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 1133d4: 55 push %ebp 1133d5: 89 e5 mov %esp,%ebp 1133d7: 57 push %edi 1133d8: 56 push %esi 1133d9: 53 push %ebx 1133da: 83 ec 1c sub $0x1c,%esp 1133dd: 8b 45 08 mov 0x8(%ebp),%eax 1133e0: 8b 7d 0c mov 0xc(%ebp),%edi 1133e3: 8b 75 14 mov 0x14(%ebp),%esi 1133e6: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 1133e9: 8b 15 f8 94 12 00 mov 0x1294f8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 1133ef: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 1133f6: 9c pushf 1133f7: fa cli 1133f8: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 1133fb: 8b 48 48 mov 0x48(%eax),%ecx 1133fe: 85 c9 test %ecx,%ecx 113400: 75 46 jne 113448 <_CORE_semaphore_Seize+0x74> /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 113402: 84 db test %bl,%bl 113404: 75 16 jne 11341c <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 113406: ff 75 e4 pushl -0x1c(%ebp) 113409: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 11340a: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 113411: 83 c4 1c add $0x1c,%esp 113414: 5b pop %ebx 113415: 5e pop %esi 113416: 5f pop %edi 113417: c9 leave 113418: c3 ret 113419: 8d 76 00 lea 0x0(%esi),%esi 11341c: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 113423: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 113426: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 113429: ff 75 e4 pushl -0x1c(%ebp) 11342c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 11342d: c7 45 10 1c f1 10 00 movl $0x10f11c,0x10(%ebp) 113434: 89 75 0c mov %esi,0xc(%ebp) 113437: 89 45 08 mov %eax,0x8(%ebp) } 11343a: 83 c4 1c add $0x1c,%esp 11343d: 5b pop %ebx 11343e: 5e pop %esi 11343f: 5f pop %edi 113440: c9 leave */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 113441: e9 c6 b9 ff ff jmp 10ee0c <_Thread_queue_Enqueue_with_handler> 113446: 66 90 xchg %ax,%ax executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 113448: 49 dec %ecx 113449: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 11344c: ff 75 e4 pushl -0x1c(%ebp) 11344f: 9d popf _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 113450: 83 c4 1c add $0x1c,%esp 113453: 5b pop %ebx 113454: 5e pop %esi 113455: 5f pop %edi 113456: c9 leave 113457: c3 ret =============================================================================== 0010ca3c <_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 ) { 10ca3c: 55 push %ebp 10ca3d: 89 e5 mov %esp,%ebp 10ca3f: 53 push %ebx 10ca40: 83 ec 10 sub $0x10,%esp 10ca43: 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)) ) { 10ca46: 53 push %ebx 10ca47: e8 3c 16 00 00 call 10e088 <_Thread_queue_Dequeue> 10ca4c: 83 c4 10 add $0x10,%esp 10ca4f: 85 c0 test %eax,%eax 10ca51: 74 09 je 10ca5c <_CORE_semaphore_Surrender+0x20> 10ca53: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10ca55: 8b 5d fc mov -0x4(%ebp),%ebx 10ca58: c9 leave 10ca59: c3 ret 10ca5a: 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 ); 10ca5c: 9c pushf 10ca5d: fa cli 10ca5e: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10ca5f: 8b 43 48 mov 0x48(%ebx),%eax 10ca62: 3b 43 40 cmp 0x40(%ebx),%eax 10ca65: 72 0d jb 10ca74 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10ca67: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10ca6c: 52 push %edx 10ca6d: 9d popf } return status; } 10ca6e: 8b 5d fc mov -0x4(%ebp),%ebx 10ca71: c9 leave 10ca72: c3 ret 10ca73: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10ca74: 40 inc %eax 10ca75: 89 43 48 mov %eax,0x48(%ebx) 10ca78: 31 c0 xor %eax,%eax 10ca7a: eb f0 jmp 10ca6c <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010d414 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10d414: 55 push %ebp 10d415: 89 e5 mov %esp,%ebp 10d417: 56 push %esi 10d418: 53 push %ebx 10d419: 8b 5d 08 mov 0x8(%ebp),%ebx 10d41c: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10d41f: 9c pushf 10d420: fa cli 10d421: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10d422: 8b 53 04 mov 0x4(%ebx),%edx 10d425: 4a dec %edx 10d426: 74 60 je 10d488 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10d428: 8b 53 08 mov 0x8(%ebx),%edx 10d42b: 42 inc %edx 10d42c: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10d42f: 8b 53 04 mov 0x4(%ebx),%edx 10d432: 85 d2 test %edx,%edx 10d434: 74 22 je 10d458 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10d436: 84 c9 test %cl,%cl 10d438: 74 39 je 10d473 <_CORE_spinlock_Wait+0x5f> 10d43a: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10d43c: 50 push %eax 10d43d: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10d43e: e8 4d 12 00 00 call 10e690 <_Thread_Enable_dispatch> 10d443: a1 78 a8 12 00 mov 0x12a878,%eax 10d448: 40 inc %eax 10d449: a3 78 a8 12 00 mov %eax,0x12a878 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10d44e: 9c pushf 10d44f: fa cli 10d450: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10d451: 8b 53 04 mov 0x4(%ebx),%edx 10d454: 85 d2 test %edx,%edx 10d456: 75 e4 jne 10d43c <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10d458: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10d45f: 8b 15 38 a9 12 00 mov 0x12a938,%edx 10d465: 8b 52 08 mov 0x8(%edx),%edx 10d468: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10d46b: 50 push %eax 10d46c: 9d popf 10d46d: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10d46f: 5b pop %ebx 10d470: 5e pop %esi 10d471: c9 leave 10d472: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10d473: 8b 53 08 mov 0x8(%ebx),%edx 10d476: 4a dec %edx 10d477: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10d47a: 50 push %eax 10d47b: 9d popf 10d47c: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10d481: 5b pop %ebx 10d482: 5e pop %esi 10d483: c9 leave 10d484: c3 ret 10d485: 8d 76 00 lea 0x0(%esi),%esi Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10d488: 8b 73 0c mov 0xc(%ebx),%esi 10d48b: 8b 15 38 a9 12 00 mov 0x12a938,%edx 10d491: 3b 72 08 cmp 0x8(%edx),%esi 10d494: 75 92 jne 10d428 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10d496: 50 push %eax 10d497: 9d popf 10d498: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10d49d: eb d0 jmp 10d46f <_CORE_spinlock_Wait+0x5b> =============================================================================== 00111fa4 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111fa4: 55 push %ebp 111fa5: 89 e5 mov %esp,%ebp 111fa7: 57 push %edi 111fa8: 56 push %esi 111fa9: 53 push %ebx 111faa: 8b 7d 08 mov 0x8(%ebp),%edi 111fad: 8b 4d 10 mov 0x10(%ebp),%ecx 111fb0: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 111fb3: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111fb5: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 111fbc: 85 c9 test %ecx,%ecx 111fbe: 74 17 je 111fd7 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 111fc0: 8b 45 0c mov 0xc(%ebp),%eax 111fc3: eb 05 jmp 111fca <_Chain_Initialize+0x26> 111fc5: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111fc8: 89 d8 mov %ebx,%eax current->next = next; 111fca: 89 02 mov %eax,(%edx) next->previous = current; 111fcc: 89 50 04 mov %edx,0x4(%eax) 111fcf: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 111fd2: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 111fd4: 49 dec %ecx 111fd5: 75 f1 jne 111fc8 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 111fd7: 8d 47 04 lea 0x4(%edi),%eax 111fda: 89 02 mov %eax,(%edx) the_chain->last = current; 111fdc: 89 57 08 mov %edx,0x8(%edi) } 111fdf: 5b pop %ebx 111fe0: 5e pop %esi 111fe1: 5f pop %edi 111fe2: c9 leave 111fe3: c3 ret =============================================================================== 00100208 <_Dual_ported_memory_Manager_initialization>: #include #include #include void _Dual_ported_memory_Manager_initialization(void) { 100208: 55 push %ebp 100209: 89 e5 mov %esp,%ebp } 10020b: c9 leave 10020c: c3 ret =============================================================================== 00100210 <_Event_Manager_initialization>: #include #include #include void _Event_Manager_initialization(void) { 100210: 55 push %ebp 100211: 89 e5 mov %esp,%ebp } 100213: c9 leave 100214: c3 ret =============================================================================== 0010b6bc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b6bc: 55 push %ebp 10b6bd: 89 e5 mov %esp,%ebp 10b6bf: 57 push %edi 10b6c0: 56 push %esi 10b6c1: 53 push %ebx 10b6c2: 83 ec 2c sub $0x2c,%esp 10b6c5: 8b 45 08 mov 0x8(%ebp),%eax 10b6c8: 8b 4d 0c mov 0xc(%ebp),%ecx 10b6cb: 8b 55 10 mov 0x10(%ebp),%edx 10b6ce: 89 55 dc mov %edx,-0x24(%ebp) 10b6d1: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b6d4: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b6da: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b6e1: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10b6e7: 9c pushf 10b6e8: fa cli 10b6e9: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b6ec: 8b 16 mov (%esi),%edx 10b6ee: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6f1: 21 c2 and %eax,%edx 10b6f3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6f6: 74 0d je 10b705 <_Event_Seize+0x49> 10b6f8: 39 d0 cmp %edx,%eax 10b6fa: 0f 84 84 00 00 00 je 10b784 <_Event_Seize+0xc8> 10b700: f6 c1 02 test $0x2,%cl 10b703: 75 7f jne 10b784 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b705: f6 c1 01 test $0x1,%cl 10b708: 75 62 jne 10b76c <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b70a: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b70d: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b710: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b713: c7 05 00 9e 12 00 01 movl $0x1,0x129e00 10b71a: 00 00 00 _ISR_Enable( level ); 10b71d: ff 75 e0 pushl -0x20(%ebp) 10b720: 9d popf if ( ticks ) { 10b721: 8b 45 dc mov -0x24(%ebp),%eax 10b724: 85 c0 test %eax,%eax 10b726: 0f 85 80 00 00 00 jne 10b7ac <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b72c: 83 ec 08 sub $0x8,%esp 10b72f: 68 00 01 00 00 push $0x100 10b734: 53 push %ebx 10b735: e8 1e 2e 00 00 call 10e558 <_Thread_Set_state> _ISR_Disable( level ); 10b73a: 9c pushf 10b73b: fa cli 10b73c: 5a pop %edx sync_state = _Event_Sync_state; 10b73d: a1 00 9e 12 00 mov 0x129e00,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b742: c7 05 00 9e 12 00 00 movl $0x0,0x129e00 10b749: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b74c: 83 c4 10 add $0x10,%esp 10b74f: 83 f8 01 cmp $0x1,%eax 10b752: 74 4c je 10b7a0 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b754: 89 55 10 mov %edx,0x10(%ebp) 10b757: 89 5d 0c mov %ebx,0xc(%ebp) 10b75a: 89 45 08 mov %eax,0x8(%ebp) } 10b75d: 8d 65 f4 lea -0xc(%ebp),%esp 10b760: 5b pop %ebx 10b761: 5e pop %esi 10b762: 5f pop %edi 10b763: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b764: e9 cf 1f 00 00 jmp 10d738 <_Thread_blocking_operation_Cancel> 10b769: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b76c: ff 75 e0 pushl -0x20(%ebp) 10b76f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b770: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b777: 8b 55 e4 mov -0x1c(%ebp),%edx 10b77a: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b77c: 8d 65 f4 lea -0xc(%ebp),%esp 10b77f: 5b pop %ebx 10b780: 5e pop %esi 10b781: 5f pop %edi 10b782: c9 leave 10b783: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b784: 8b 45 e4 mov -0x1c(%ebp),%eax 10b787: f7 d0 not %eax 10b789: 23 45 d4 and -0x2c(%ebp),%eax 10b78c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b78e: ff 75 e0 pushl -0x20(%ebp) 10b791: 9d popf *event_out = seized_events; 10b792: 8b 45 e4 mov -0x1c(%ebp),%eax 10b795: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b797: 8d 65 f4 lea -0xc(%ebp),%esp 10b79a: 5b pop %ebx 10b79b: 5e pop %esi 10b79c: 5f pop %edi 10b79d: c9 leave 10b79e: c3 ret 10b79f: 90 nop _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b7a0: 52 push %edx 10b7a1: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b7a2: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a5: 5b pop %ebx 10b7a6: 5e pop %esi 10b7a7: 5f pop %edi 10b7a8: c9 leave 10b7a9: c3 ret 10b7aa: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b7ac: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b7af: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b7b6: c7 43 64 4c b9 10 00 movl $0x10b94c,0x64(%ebx) the_watchdog->id = id; 10b7bd: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b7c0: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b7c7: 8b 45 dc mov -0x24(%ebp),%eax 10b7ca: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b7cd: 83 ec 08 sub $0x8,%esp 10b7d0: 8d 43 48 lea 0x48(%ebx),%eax 10b7d3: 50 push %eax 10b7d4: 68 d8 94 12 00 push $0x1294d8 10b7d9: e8 02 34 00 00 call 10ebe0 <_Watchdog_Insert> 10b7de: 83 c4 10 add $0x10,%esp 10b7e1: e9 46 ff ff ff jmp 10b72c <_Event_Seize+0x70> =============================================================================== 0010b83c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b83c: 55 push %ebp 10b83d: 89 e5 mov %esp,%ebp 10b83f: 57 push %edi 10b840: 56 push %esi 10b841: 53 push %ebx 10b842: 83 ec 1c sub $0x1c,%esp 10b845: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b848: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b84e: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b851: 9c pushf 10b852: fa cli 10b853: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b856: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b858: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b85b: 89 c7 mov %eax,%edi 10b85d: 21 d7 and %edx,%edi 10b85f: 89 7d e0 mov %edi,-0x20(%ebp) 10b862: 0f 84 ac 00 00 00 je 10b914 <_Event_Surrender+0xd8> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b868: 8b 3d 94 94 12 00 mov 0x129494,%edi 10b86e: 85 ff test %edi,%edi 10b870: 74 08 je 10b87a <_Event_Surrender+0x3e> 10b872: 3b 1d b8 94 12 00 cmp 0x1294b8,%ebx 10b878: 74 5a je 10b8d4 <_Event_Surrender+0x98> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b87a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b87e: 0f 84 90 00 00 00 je 10b914 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b884: 3b 45 e0 cmp -0x20(%ebp),%eax 10b887: 74 09 je 10b892 <_Event_Surrender+0x56> 10b889: 83 e6 02 and $0x2,%esi 10b88c: 0f 84 82 00 00 00 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b892: 8b 45 e0 mov -0x20(%ebp),%eax 10b895: f7 d0 not %eax 10b897: 21 d0 and %edx,%eax 10b899: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b89b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8a2: 8b 43 28 mov 0x28(%ebx),%eax 10b8a5: 8b 7d e0 mov -0x20(%ebp),%edi 10b8a8: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b8aa: ff 75 e4 pushl -0x1c(%ebp) 10b8ad: 9d popf 10b8ae: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b8af: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b8b3: 74 6b je 10b920 <_Event_Surrender+0xe4> _ISR_Enable( level ); 10b8b5: ff 75 e4 pushl -0x1c(%ebp) 10b8b8: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b8b9: 83 ec 08 sub $0x8,%esp 10b8bc: 68 f8 ff 03 10 push $0x1003fff8 10b8c1: 53 push %ebx 10b8c2: e8 fd 1f 00 00 call 10d8c4 <_Thread_Clear_state> 10b8c7: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b8ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b8cd: 5b pop %ebx 10b8ce: 5e pop %esi 10b8cf: 5f pop %edi 10b8d0: c9 leave 10b8d1: c3 ret 10b8d2: 66 90 xchg %ax,%ax * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b8d4: 8b 3d 00 9e 12 00 mov 0x129e00,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8da: 83 ff 02 cmp $0x2,%edi 10b8dd: 74 09 je 10b8e8 <_Event_Surrender+0xac> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8df: 8b 3d 00 9e 12 00 mov 0x129e00,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8e5: 4f dec %edi 10b8e6: 75 92 jne 10b87a <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b8e8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8eb: 74 05 je 10b8f2 <_Event_Surrender+0xb6> 10b8ed: 83 e6 02 and $0x2,%esi 10b8f0: 74 22 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8f2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8f5: f7 d0 not %eax 10b8f7: 21 d0 and %edx,%eax 10b8f9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b902: 8b 43 28 mov 0x28(%ebx),%eax 10b905: 8b 55 e0 mov -0x20(%ebp),%edx 10b908: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b90a: c7 05 00 9e 12 00 03 movl $0x3,0x129e00 10b911: 00 00 00 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b914: ff 75 e4 pushl -0x1c(%ebp) 10b917: 9d popf } 10b918: 8d 65 f4 lea -0xc(%ebp),%esp 10b91b: 5b pop %ebx 10b91c: 5e pop %esi 10b91d: 5f pop %edi 10b91e: c9 leave 10b91f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b920: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b927: ff 75 e4 pushl -0x1c(%ebp) 10b92a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b92b: 83 ec 0c sub $0xc,%esp 10b92e: 8d 43 48 lea 0x48(%ebx),%eax 10b931: 50 push %eax 10b932: e8 d1 33 00 00 call 10ed08 <_Watchdog_Remove> 10b937: 58 pop %eax 10b938: 5a pop %edx 10b939: 68 f8 ff 03 10 push $0x1003fff8 10b93e: 53 push %ebx 10b93f: e8 80 1f 00 00 call 10d8c4 <_Thread_Clear_state> 10b944: 83 c4 10 add $0x10,%esp 10b947: eb cf jmp 10b918 <_Event_Surrender+0xdc> =============================================================================== 0010b94c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b94c: 55 push %ebp 10b94d: 89 e5 mov %esp,%ebp 10b94f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b952: 8d 45 f4 lea -0xc(%ebp),%eax 10b955: 50 push %eax 10b956: ff 75 08 pushl 0x8(%ebp) 10b959: e8 32 23 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10b95e: 83 c4 10 add $0x10,%esp 10b961: 8b 55 f4 mov -0xc(%ebp),%edx 10b964: 85 d2 test %edx,%edx 10b966: 75 37 jne 10b99f <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b968: 9c pushf 10b969: fa cli 10b96a: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b96b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b972: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax 10b978: 74 2a je 10b9a4 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b97a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b981: 52 push %edx 10b982: 9d popf 10b983: 83 ec 08 sub $0x8,%esp 10b986: 68 f8 ff 03 10 push $0x1003fff8 10b98b: 50 push %eax 10b98c: e8 33 1f 00 00 call 10d8c4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b991: a1 f8 93 12 00 mov 0x1293f8,%eax 10b996: 48 dec %eax 10b997: a3 f8 93 12 00 mov %eax,0x1293f8 10b99c: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b99f: c9 leave 10b9a0: c3 ret 10b9a1: 8d 76 00 lea 0x0(%esi),%esi } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b9a4: 8b 0d 00 9e 12 00 mov 0x129e00,%ecx 10b9aa: 49 dec %ecx 10b9ab: 75 cd jne 10b97a <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b9ad: c7 05 00 9e 12 00 02 movl $0x2,0x129e00 10b9b4: 00 00 00 10b9b7: eb c1 jmp 10b97a <_Event_Timeout+0x2e> =============================================================================== 00100248 <_Extension_Manager_initialization>: #include #include #include void _Extension_Manager_initialization(void) { 100248: 55 push %ebp 100249: 89 e5 mov %esp,%ebp } 10024b: c9 leave 10024c: c3 ret =============================================================================== 001122c4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 1122c4: 55 push %ebp 1122c5: 89 e5 mov %esp,%ebp 1122c7: 57 push %edi 1122c8: 56 push %esi 1122c9: 53 push %ebx 1122ca: 83 ec 2c sub $0x2c,%esp 1122cd: 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; 1122d0: 8b 45 08 mov 0x8(%ebp),%eax 1122d3: 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; 1122d6: 8b 50 10 mov 0x10(%eax),%edx 1122d9: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 1122dc: 89 f8 mov %edi,%eax 1122de: 83 c0 04 add $0x4,%eax 1122e1: 89 45 e0 mov %eax,-0x20(%ebp) 1122e4: 0f 82 5a 01 00 00 jb 112444 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 1122ea: 8b 75 14 mov 0x14(%ebp),%esi 1122ed: 85 f6 test %esi,%esi 1122ef: 0f 85 48 01 00 00 jne 11243d <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1122f5: 39 4d 08 cmp %ecx,0x8(%ebp) 1122f8: 0f 84 50 01 00 00 je 11244e <_Heap_Allocate_aligned_with_boundary+0x18a> 1122fe: 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; 112305: 8b 55 d4 mov -0x2c(%ebp),%edx 112308: 83 c2 07 add $0x7,%edx 11230b: 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; 11230e: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 112315: 29 7d d8 sub %edi,-0x28(%ebp) 112318: eb 19 jmp 112333 <_Heap_Allocate_aligned_with_boundary+0x6f> 11231a: 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; 11231c: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 11231f: 85 db test %ebx,%ebx 112321: 0f 85 e9 00 00 00 jne 112410 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 112327: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11232a: 39 4d 08 cmp %ecx,0x8(%ebp) 11232d: 0f 84 25 01 00 00 je 112458 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 112333: 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 ) { 112336: 8b 59 04 mov 0x4(%ecx),%ebx 112339: 39 5d e0 cmp %ebx,-0x20(%ebp) 11233c: 73 e9 jae 112327 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 11233e: 8b 55 10 mov 0x10(%ebp),%edx 112341: 85 d2 test %edx,%edx 112343: 74 d7 je 11231c <_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; 112345: 8b 45 08 mov 0x8(%ebp),%eax 112348: 8b 40 14 mov 0x14(%eax),%eax 11234b: 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; 11234e: 83 e3 fe and $0xfffffffe,%ebx 112351: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 112354: 8d 51 08 lea 0x8(%ecx),%edx 112357: 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; 11235a: 8b 75 c8 mov -0x38(%ebp),%esi 11235d: 29 c6 sub %eax,%esi 11235f: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 112361: 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); 112364: 89 d8 mov %ebx,%eax 112366: 31 d2 xor %edx,%edx 112368: f7 75 10 divl 0x10(%ebp) 11236b: 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 ) { 11236d: 39 de cmp %ebx,%esi 11236f: 73 0b jae 11237c <_Heap_Allocate_aligned_with_boundary+0xb8> 112371: 89 f0 mov %esi,%eax 112373: 31 d2 xor %edx,%edx 112375: f7 75 10 divl 0x10(%ebp) 112378: 89 f3 mov %esi,%ebx 11237a: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11237c: 8b 45 14 mov 0x14(%ebp),%eax 11237f: 85 c0 test %eax,%eax 112381: 74 59 je 1123dc <_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; 112383: 8d 34 3b lea (%ebx,%edi,1),%esi 112386: 89 f0 mov %esi,%eax 112388: 31 d2 xor %edx,%edx 11238a: f7 75 14 divl 0x14(%ebp) 11238d: 89 f0 mov %esi,%eax 11238f: 29 d0 sub %edx,%eax 112391: 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 ) { 112393: 39 c3 cmp %eax,%ebx 112395: 73 45 jae 1123dc <_Heap_Allocate_aligned_with_boundary+0x118> 112397: 39 c6 cmp %eax,%esi 112399: 76 41 jbe 1123dc <_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; 11239b: 8b 45 cc mov -0x34(%ebp),%eax 11239e: 01 f8 add %edi,%eax 1123a0: 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 ) { 1123a3: 39 d0 cmp %edx,%eax 1123a5: 77 80 ja 112327 <_Heap_Allocate_aligned_with_boundary+0x63> 1123a7: 89 ce mov %ecx,%esi 1123a9: eb 0e jmp 1123b9 <_Heap_Allocate_aligned_with_boundary+0xf5> 1123ab: 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 ) { 1123ac: 39 c1 cmp %eax,%ecx 1123ae: 76 2a jbe 1123da <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 1123b0: 39 55 dc cmp %edx,-0x24(%ebp) 1123b3: 0f 87 a3 00 00 00 ja 11245c <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 1123b9: 89 d3 mov %edx,%ebx 1123bb: 29 fb sub %edi,%ebx 1123bd: 89 d8 mov %ebx,%eax 1123bf: 31 d2 xor %edx,%edx 1123c1: f7 75 10 divl 0x10(%ebp) 1123c4: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 1123c6: 8d 0c 3b lea (%ebx,%edi,1),%ecx 1123c9: 89 c8 mov %ecx,%eax 1123cb: 31 d2 xor %edx,%edx 1123cd: f7 75 14 divl 0x14(%ebp) 1123d0: 89 c8 mov %ecx,%eax 1123d2: 29 d0 sub %edx,%eax 1123d4: 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 ) { 1123d6: 39 c3 cmp %eax,%ebx 1123d8: 72 d2 jb 1123ac <_Heap_Allocate_aligned_with_boundary+0xe8> 1123da: 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 ) { 1123dc: 39 5d cc cmp %ebx,-0x34(%ebp) 1123df: 0f 87 42 ff ff ff ja 112327 <_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; 1123e5: be f8 ff ff ff mov $0xfffffff8,%esi 1123ea: 29 ce sub %ecx,%esi 1123ec: 01 de add %ebx,%esi 1123ee: 89 d8 mov %ebx,%eax 1123f0: 31 d2 xor %edx,%edx 1123f2: f7 75 d4 divl -0x2c(%ebp) 1123f5: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1123f7: 39 75 d0 cmp %esi,-0x30(%ebp) 1123fa: 0f 86 1f ff ff ff jbe 11231f <_Heap_Allocate_aligned_with_boundary+0x5b> 112400: 85 f6 test %esi,%esi 112402: 0f 85 1f ff ff ff jne 112327 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 112408: 85 db test %ebx,%ebx 11240a: 0f 84 17 ff ff ff je 112327 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 112410: 8b 55 e4 mov -0x1c(%ebp),%edx 112413: 8b 45 08 mov 0x8(%ebp),%eax 112416: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 112419: 57 push %edi 11241a: 53 push %ebx 11241b: 51 push %ecx 11241c: 50 push %eax 11241d: e8 9e a9 ff ff call 10cdc0 <_Heap_Block_allocate> 112422: 89 d8 mov %ebx,%eax 112424: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 112427: 8b 4d e4 mov -0x1c(%ebp),%ecx 11242a: 8b 55 08 mov 0x8(%ebp),%edx 11242d: 39 4a 44 cmp %ecx,0x44(%edx) 112430: 73 14 jae 112446 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 112432: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 112435: 8d 65 f4 lea -0xc(%ebp),%esp 112438: 5b pop %ebx 112439: 5e pop %esi 11243a: 5f pop %edi 11243b: c9 leave 11243c: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 11243d: 3b 7d 14 cmp 0x14(%ebp),%edi 112440: 76 21 jbe 112463 <_Heap_Allocate_aligned_with_boundary+0x19f> 112442: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 112444: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 112446: 8d 65 f4 lea -0xc(%ebp),%esp 112449: 5b pop %ebx 11244a: 5e pop %esi 11244b: 5f pop %edi 11244c: c9 leave 11244d: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11244e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 112455: 8d 76 00 lea 0x0(%esi),%esi 112458: 31 c0 xor %eax,%eax 11245a: eb cb jmp 112427 <_Heap_Allocate_aligned_with_boundary+0x163> 11245c: 89 f1 mov %esi,%ecx <== NOT EXECUTED 11245e: e9 c4 fe ff ff jmp 112327 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 112463: 8b 5d 10 mov 0x10(%ebp),%ebx 112466: 85 db test %ebx,%ebx 112468: 0f 85 87 fe ff ff jne 1122f5 <_Heap_Allocate_aligned_with_boundary+0x31> 11246e: 89 55 10 mov %edx,0x10(%ebp) 112471: e9 7f fe ff ff jmp 1122f5 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010cdc0 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10cdc0: 55 push %ebp 10cdc1: 89 e5 mov %esp,%ebp 10cdc3: 57 push %edi 10cdc4: 56 push %esi 10cdc5: 53 push %ebx 10cdc6: 83 ec 10 sub $0x10,%esp 10cdc9: 8b 75 08 mov 0x8(%ebp),%esi 10cdcc: 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; 10cdcf: 89 5d ec mov %ebx,-0x14(%ebp) 10cdd2: 8b 7d 10 mov 0x10(%ebp),%edi 10cdd5: 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; 10cdd8: 89 f8 mov %edi,%eax 10cdda: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cddc: 8b 53 04 mov 0x4(%ebx),%edx 10cddf: 83 e2 fe and $0xfffffffe,%edx 10cde2: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cde7: 0f 85 8b 00 00 00 jne 10ce78 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cded: 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; 10cdf0: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cdf3: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cdf6: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cdf9: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cdfc: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cdff: 8b 53 04 mov 0x4(%ebx),%edx 10ce02: 83 e2 fe and $0xfffffffe,%edx 10ce05: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10ce08: 8b 56 10 mov 0x10(%esi),%edx 10ce0b: 89 55 e4 mov %edx,-0x1c(%ebp) 10ce0e: 39 d0 cmp %edx,%eax 10ce10: 72 72 jb 10ce84 <_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; 10ce12: 8b 43 04 mov 0x4(%ebx),%eax 10ce15: 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 ) 10ce18: 8b 45 10 mov 0x10(%ebp),%eax 10ce1b: 31 d2 xor %edx,%edx 10ce1d: f7 75 e4 divl -0x1c(%ebp) 10ce20: 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; 10ce22: 89 f8 mov %edi,%eax 10ce24: 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; 10ce26: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10ce29: f6 43 04 01 testb $0x1,0x4(%ebx) 10ce2d: 75 69 jne 10ce98 <_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); 10ce2f: 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; 10ce31: 8b 53 04 mov 0x4(%ebx),%edx 10ce34: 83 e2 fe and $0xfffffffe,%edx 10ce37: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ce39: 89 c2 mov %eax,%edx 10ce3b: 83 ca 01 or $0x1,%edx 10ce3e: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10ce41: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10ce43: 8b 45 f0 mov -0x10(%ebp),%eax 10ce46: 83 e0 fe and $0xfffffffe,%eax 10ce49: 03 45 ec add -0x14(%ebp),%eax 10ce4c: 29 f8 sub %edi,%eax 10ce4e: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10ce51: ff 75 14 pushl 0x14(%ebp) 10ce54: 51 push %ecx 10ce55: 57 push %edi 10ce56: 56 push %esi 10ce57: e8 80 fe ff ff call 10ccdc <_Heap_Block_split> 10ce5c: 89 fb mov %edi,%ebx 10ce5e: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10ce61: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10ce64: 39 46 34 cmp %eax,0x34(%esi) 10ce67: 76 03 jbe 10ce6c <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10ce69: 89 46 34 mov %eax,0x34(%esi) } return block; } 10ce6c: 89 d8 mov %ebx,%eax 10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp 10ce71: 5b pop %ebx 10ce72: 5e pop %esi 10ce73: 5f pop %edi 10ce74: c9 leave 10ce75: c3 ret 10ce76: 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 ); 10ce78: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10ce7a: 8b 56 10 mov 0x10(%esi),%edx 10ce7d: 89 55 e4 mov %edx,-0x1c(%ebp) 10ce80: 39 d0 cmp %edx,%eax 10ce82: 73 8e jae 10ce12 <_Heap_Block_allocate+0x52><== NEVER TAKEN Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10ce84: 03 45 14 add 0x14(%ebp),%eax 10ce87: 50 push %eax 10ce88: 51 push %ecx 10ce89: 53 push %ebx 10ce8a: 56 push %esi 10ce8b: e8 4c fe ff ff call 10ccdc <_Heap_Block_split> 10ce90: 83 c4 10 add $0x10,%esp 10ce93: eb cc jmp 10ce61 <_Heap_Block_allocate+0xa1> 10ce95: 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; 10ce98: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10ce9b: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10ce9e: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cea1: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cea4: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cea7: ff 46 38 incl 0x38(%esi) 10ceaa: 89 d9 mov %ebx,%ecx 10ceac: eb 8b jmp 10ce39 <_Heap_Block_allocate+0x79> =============================================================================== 0010ccdc <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10ccdc: 55 push %ebp 10ccdd: 89 e5 mov %esp,%ebp 10ccdf: 57 push %edi 10cce0: 56 push %esi 10cce1: 53 push %ebx 10cce2: 83 ec 14 sub $0x14,%esp 10cce5: 8b 4d 08 mov 0x8(%ebp),%ecx 10cce8: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cceb: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10ccee: 8b 41 14 mov 0x14(%ecx),%eax 10ccf1: 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; 10ccf4: 8b 43 04 mov 0x4(%ebx),%eax 10ccf7: 89 45 e4 mov %eax,-0x1c(%ebp) 10ccfa: 89 c6 mov %eax,%esi 10ccfc: 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; 10ccff: 8b 55 e8 mov -0x18(%ebp),%edx 10cd02: 83 ea 08 sub $0x8,%edx 10cd05: 8b 45 14 mov 0x14(%ebp),%eax 10cd08: 39 d0 cmp %edx,%eax 10cd0a: 73 02 jae 10cd0e <_Heap_Block_split+0x32> 10cd0c: 89 d0 mov %edx,%eax 10cd0e: 83 c0 08 add $0x8,%eax 10cd11: 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; 10cd14: 31 d2 xor %edx,%edx 10cd16: f7 f7 div %edi if ( remainder != 0 ) { 10cd18: 85 d2 test %edx,%edx 10cd1a: 75 70 jne 10cd8c <_Heap_Block_split+0xb0> 10cd1c: 8b 7d f0 mov -0x10(%ebp),%edi 10cd1f: 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); 10cd22: 8d 04 33 lea (%ebx,%esi,1),%eax 10cd25: 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 ) { 10cd28: 8d 56 04 lea 0x4(%esi),%edx 10cd2b: 2b 55 f0 sub -0x10(%ebp),%edx 10cd2e: 8b 7d e8 mov -0x18(%ebp),%edi 10cd31: 83 c7 04 add $0x4,%edi 10cd34: 39 fa cmp %edi,%edx 10cd36: 72 60 jb 10cd98 <_Heap_Block_split+0xbc> 10cd38: 8b 55 ec mov -0x14(%ebp),%edx 10cd3b: 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; 10cd3d: 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; 10cd40: 8b 7d e4 mov -0x1c(%ebp),%edi 10cd43: 83 e7 01 and $0x1,%edi 10cd46: 0b 7d ec or -0x14(%ebp),%edi 10cd49: 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; 10cd4c: 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; 10cd4f: 8b 58 04 mov 0x4(%eax),%ebx 10cd52: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cd55: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cd5a: 75 4c jne 10cda8 <_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; 10cd5c: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10cd5f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10cd62: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10cd65: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10cd68: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10cd6b: 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; 10cd6e: 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); 10cd70: 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; 10cd73: 89 f1 mov %esi,%ecx 10cd75: 83 c9 01 or $0x1,%ecx 10cd78: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10cd7b: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10cd7d: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10cd81: 83 c4 14 add $0x14,%esp 10cd84: 5b pop %ebx 10cd85: 5e pop %esi 10cd86: 5f pop %edi 10cd87: c9 leave 10cd88: c3 ret 10cd89: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10cd8c: 03 7d f0 add -0x10(%ebp),%edi 10cd8f: 29 d7 sub %edx,%edi 10cd91: 89 7d ec mov %edi,-0x14(%ebp) 10cd94: eb 8c jmp 10cd22 <_Heap_Block_split+0x46> 10cd96: 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; 10cd98: 8b 45 e0 mov -0x20(%ebp),%eax 10cd9b: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cd9f: 83 c4 14 add $0x14,%esp 10cda2: 5b pop %ebx 10cda3: 5e pop %esi 10cda4: 5f pop %edi 10cda5: c9 leave 10cda6: c3 ret 10cda7: 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; 10cda8: 8b 7d 10 mov 0x10(%ebp),%edi 10cdab: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10cdae: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10cdb1: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cdb4: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cdb7: 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; 10cdba: ff 41 38 incl 0x38(%ecx) 10cdbd: eb b4 jmp 10cd73 <_Heap_Block_split+0x97> =============================================================================== 00115c2c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115c2c: 55 push %ebp 115c2d: 89 e5 mov %esp,%ebp 115c2f: 56 push %esi 115c30: 53 push %ebx 115c31: 8b 4d 08 mov 0x8(%ebp),%ecx 115c34: 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; 115c37: 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; 115c3a: 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; 115c3d: 3b 41 18 cmp 0x18(%ecx),%eax 115c40: 73 3a jae 115c7c <_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 ) { 115c42: 39 d0 cmp %edx,%eax 115c44: 74 0e je 115c54 <_Heap_Extend+0x28> 115c46: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c4b: 8d 65 f8 lea -0x8(%ebp),%esp 115c4e: 5b pop %ebx 115c4f: 5e pop %esi 115c50: c9 leave 115c51: c3 ret 115c52: 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; 115c54: 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; 115c57: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 115c5a: 29 d8 sub %ebx,%eax 115c5c: 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); 115c5f: 89 f0 mov %esi,%eax 115c61: 31 d2 xor %edx,%edx 115c63: f7 71 10 divl 0x10(%ecx) 115c66: 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; 115c68: 8b 45 14 mov 0x14(%ebp),%eax 115c6b: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 115c6d: 39 71 14 cmp %esi,0x14(%ecx) 115c70: 76 1a jbe 115c8c <_Heap_Extend+0x60> <== ALWAYS TAKEN 115c72: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c74: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 115c77: 5b pop %ebx <== NOT EXECUTED 115c78: 5e pop %esi <== NOT EXECUTED 115c79: c9 leave <== NOT EXECUTED 115c7a: c3 ret <== NOT EXECUTED 115c7b: 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 ) { 115c7c: 39 d0 cmp %edx,%eax 115c7e: 73 c2 jae 115c42 <_Heap_Extend+0x16> 115c80: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c85: 8d 65 f8 lea -0x8(%ebp),%esp 115c88: 5b pop %ebx 115c89: 5e pop %esi 115c8a: c9 leave 115c8b: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 115c8c: 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; 115c8f: 8b 43 04 mov 0x4(%ebx),%eax 115c92: 83 e0 01 and $0x1,%eax 115c95: 09 f0 or %esi,%eax 115c97: 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 = 115c9a: 8b 41 20 mov 0x20(%ecx),%eax 115c9d: 29 d0 sub %edx,%eax 115c9f: 83 c8 01 or $0x1,%eax 115ca2: 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; 115ca5: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 115ca8: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 115cab: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 115cae: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 115cb1: 83 ec 08 sub $0x8,%esp 115cb4: 83 c3 08 add $0x8,%ebx 115cb7: 53 push %ebx 115cb8: 51 push %ecx 115cb9: e8 e6 9e ff ff call 10fba4 <_Heap_Free> 115cbe: 31 c0 xor %eax,%eax 115cc0: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 115cc3: 8d 65 f8 lea -0x8(%ebp),%esp 115cc6: 5b pop %ebx 115cc7: 5e pop %esi 115cc8: c9 leave 115cc9: c3 ret =============================================================================== 00112478 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 112478: 55 push %ebp 112479: 89 e5 mov %esp,%ebp 11247b: 57 push %edi 11247c: 56 push %esi 11247d: 53 push %ebx 11247e: 83 ec 18 sub $0x18,%esp 112481: 8b 5d 08 mov 0x8(%ebp),%ebx 112484: 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 ) 112487: 8d 48 f8 lea -0x8(%eax),%ecx 11248a: 31 d2 xor %edx,%edx 11248c: f7 73 10 divl 0x10(%ebx) 11248f: 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; 112491: 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 112494: 39 c1 cmp %eax,%ecx 112496: 72 07 jb 11249f <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 112498: 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 11249b: 39 f1 cmp %esi,%ecx 11249d: 76 0d jbe 1124ac <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 11249f: 31 c0 xor %eax,%eax } 1124a1: 83 c4 18 add $0x18,%esp 1124a4: 5b pop %ebx 1124a5: 5e pop %esi 1124a6: 5f pop %edi 1124a7: c9 leave 1124a8: c3 ret 1124a9: 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; 1124ac: 8b 51 04 mov 0x4(%ecx),%edx 1124af: 89 55 f0 mov %edx,-0x10(%ebp) 1124b2: 83 e2 fe and $0xfffffffe,%edx 1124b5: 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); 1124b8: 01 ca add %ecx,%edx 1124ba: 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 1124bd: 39 d0 cmp %edx,%eax 1124bf: 77 de ja 11249f <_Heap_Free+0x27> <== NEVER TAKEN 1124c1: 39 d6 cmp %edx,%esi 1124c3: 72 da jb 11249f <_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; 1124c5: 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 ) ) { 1124c8: f7 c7 01 00 00 00 test $0x1,%edi 1124ce: 74 cf je 11249f <_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; 1124d0: 83 e7 fe and $0xfffffffe,%edi 1124d3: 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 1124d6: 39 d6 cmp %edx,%esi 1124d8: 0f 84 e2 00 00 00 je 1125c0 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 1124de: 8b 55 dc mov -0x24(%ebp),%edx 1124e1: 8b 7d e8 mov -0x18(%ebp),%edi 1124e4: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 1124e8: 89 7d e0 mov %edi,-0x20(%ebp) 1124eb: 8a 55 e0 mov -0x20(%ebp),%dl 1124ee: 83 e2 01 and $0x1,%edx 1124f1: 88 55 e7 mov %dl,-0x19(%ebp) 1124f4: 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 ) ) { 1124f8: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1124fc: 75 46 jne 112544 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 1124fe: 8b 39 mov (%ecx),%edi 112500: 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); 112503: 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 112505: 39 c8 cmp %ecx,%eax 112507: 77 96 ja 11249f <_Heap_Free+0x27> <== NEVER TAKEN 112509: 39 ce cmp %ecx,%esi 11250b: 72 92 jb 11249f <_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) ) { 11250d: f6 41 04 01 testb $0x1,0x4(%ecx) 112511: 74 8c je 11249f <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 112513: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 112517: 0f 84 af 00 00 00 je 1125cc <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 11251d: 8b 45 ec mov -0x14(%ebp),%eax 112520: 03 45 e8 add -0x18(%ebp),%eax 112523: 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; 112525: 8b 55 dc mov -0x24(%ebp),%edx 112528: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 11252b: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 11252e: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 112531: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 112534: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 112537: 89 c2 mov %eax,%edx 112539: 83 ca 01 or $0x1,%edx 11253c: 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; 11253f: 89 04 01 mov %eax,(%ecx,%eax,1) 112542: eb 2c jmp 112570 <_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 */ 112544: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 112548: 74 3e je 112588 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 11254a: 8b 7d e8 mov -0x18(%ebp),%edi 11254d: 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; 112550: 8b 75 dc mov -0x24(%ebp),%esi 112553: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 112556: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 112559: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 11255c: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 11255f: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 112562: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 112565: 89 f8 mov %edi,%eax 112567: 83 c8 01 or $0x1,%eax 11256a: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 11256d: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 112570: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 112573: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 112576: 8b 55 ec mov -0x14(%ebp),%edx 112579: 01 53 30 add %edx,0x30(%ebx) 11257c: b0 01 mov $0x1,%al return( true ); } 11257e: 83 c4 18 add $0x18,%esp 112581: 5b pop %ebx 112582: 5e pop %esi 112583: 5f pop %edi 112584: c9 leave 112585: c3 ret 112586: 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; 112588: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 11258b: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 11258e: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 112591: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 112594: 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; 112597: 8b 45 ec mov -0x14(%ebp),%eax 11259a: 83 c8 01 or $0x1,%eax 11259d: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1125a0: 8b 7d dc mov -0x24(%ebp),%edi 1125a3: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 1125a7: 8b 45 ec mov -0x14(%ebp),%eax 1125aa: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 1125ac: 8b 43 38 mov 0x38(%ebx),%eax 1125af: 40 inc %eax 1125b0: 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; 1125b3: 3b 43 3c cmp 0x3c(%ebx),%eax 1125b6: 76 b8 jbe 112570 <_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; 1125b8: 89 43 3c mov %eax,0x3c(%ebx) 1125bb: eb b3 jmp 112570 <_Heap_Free+0xf8> 1125bd: 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 1125c0: c6 45 e7 00 movb $0x0,-0x19(%ebp) 1125c4: e9 2f ff ff ff jmp 1124f8 <_Heap_Free+0x80> 1125c9: 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; 1125cc: 8b 45 ec mov -0x14(%ebp),%eax 1125cf: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1125d2: 89 c6 mov %eax,%esi 1125d4: 83 ce 01 or $0x1,%esi 1125d7: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1125da: 8b 55 dc mov -0x24(%ebp),%edx 1125dd: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 1125e1: 89 02 mov %eax,(%edx) 1125e3: eb 8b jmp 112570 <_Heap_Free+0xf8> =============================================================================== 00131dfc <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 131dfc: 55 push %ebp 131dfd: 89 e5 mov %esp,%ebp 131dff: 57 push %edi 131e00: 56 push %esi 131e01: 53 push %ebx 131e02: 8b 7d 08 mov 0x8(%ebp),%edi 131e05: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 131e08: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 131e0e: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 131e15: 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; 131e1c: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 131e1f: 39 d7 cmp %edx,%edi 131e21: 74 2a je 131e4d <_Heap_Get_free_information+0x51><== NEVER TAKEN 131e23: bb 01 00 00 00 mov $0x1,%ebx 131e28: 31 c9 xor %ecx,%ecx 131e2a: eb 02 jmp 131e2e <_Heap_Get_free_information+0x32> 131e2c: 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; 131e2e: 8b 42 04 mov 0x4(%edx),%eax 131e31: 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; 131e34: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 131e36: 39 46 04 cmp %eax,0x4(%esi) 131e39: 73 03 jae 131e3e <_Heap_Get_free_information+0x42> info->largest = the_size; 131e3b: 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) 131e3e: 8b 52 08 mov 0x8(%edx),%edx 131e41: 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); 131e44: 39 d7 cmp %edx,%edi 131e46: 75 e4 jne 131e2c <_Heap_Get_free_information+0x30> 131e48: 89 1e mov %ebx,(%esi) 131e4a: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 131e4d: 5b pop %ebx 131e4e: 5e pop %esi 131e4f: 5f pop %edi 131e50: c9 leave 131e51: c3 ret =============================================================================== 00145104 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 145104: 55 push %ebp 145105: 89 e5 mov %esp,%ebp 145107: 57 push %edi 145108: 56 push %esi 145109: 53 push %ebx 14510a: 83 ec 04 sub $0x4,%esp 14510d: 8b 45 08 mov 0x8(%ebp),%eax 145110: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 145113: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 145116: 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; 145119: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 14511f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 145126: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 14512d: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 145134: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 14513b: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 145142: 39 fb cmp %edi,%ebx 145144: 74 45 je 14518b <_Heap_Get_information+0x87><== NEVER TAKEN 145146: 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; 145149: 8d 46 0c lea 0xc(%esi),%eax 14514c: 89 45 f0 mov %eax,-0x10(%ebp) 14514f: eb 16 jmp 145167 <_Heap_Get_information+0x63> 145151: 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) ) 145154: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 145156: ff 00 incl (%eax) info->total += the_size; 145158: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 14515b: 39 50 04 cmp %edx,0x4(%eax) 14515e: 73 03 jae 145163 <_Heap_Get_information+0x5f> info->largest = the_size; 145160: 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 ) { 145163: 39 df cmp %ebx,%edi 145165: 74 15 je 14517c <_Heap_Get_information+0x78> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 145167: 89 ca mov %ecx,%edx 145169: 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); 14516c: 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; 14516e: 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) ) 145171: f6 c1 01 test $0x1,%cl 145174: 74 de je 145154 <_Heap_Get_information+0x50> 145176: 8b 45 f0 mov -0x10(%ebp),%eax 145179: eb db jmp 145156 <_Heap_Get_information+0x52> 14517b: 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 ) { 14517c: 8b 46 14 mov 0x14(%esi),%eax 14517f: 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; 145182: 89 46 14 mov %eax,0x14(%esi) } 145185: 58 pop %eax 145186: 5b pop %ebx 145187: 5e pop %esi 145188: 5f pop %edi 145189: c9 leave 14518a: 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 ) { 14518b: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 145190: eb f0 jmp 145182 <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 00120c04 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 120c04: 55 push %ebp 120c05: 89 e5 mov %esp,%ebp 120c07: 57 push %edi 120c08: 56 push %esi 120c09: 53 push %ebx 120c0a: 83 ec 2c sub $0x2c,%esp 120c0d: 8b 5d 08 mov 0x8(%ebp),%ebx 120c10: 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 ) 120c13: 8d 4e f8 lea -0x8(%esi),%ecx 120c16: 89 f0 mov %esi,%eax 120c18: 31 d2 xor %edx,%edx 120c1a: f7 73 10 divl 0x10(%ebx) 120c1d: 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; 120c1f: 8b 45 14 mov 0x14(%ebp),%eax 120c22: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 120c28: 8b 55 18 mov 0x18(%ebp),%edx 120c2b: 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 120c31: 39 4b 20 cmp %ecx,0x20(%ebx) 120c34: 76 0e jbe 120c44 <_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; 120c36: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120c3b: 8d 65 f4 lea -0xc(%ebp),%esp 120c3e: 5b pop %ebx 120c3f: 5e pop %esi 120c40: 5f pop %edi 120c41: c9 leave 120c42: c3 ret 120c43: 90 nop 120c44: 39 4b 24 cmp %ecx,0x24(%ebx) 120c47: 72 ed jb 120c36 <_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; 120c49: 8b 41 04 mov 0x4(%ecx),%eax 120c4c: 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; 120c4f: 8d 3c 01 lea (%ecx,%eax,1),%edi 120c52: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 120c55: 89 fa mov %edi,%edx 120c57: 29 f2 sub %esi,%edx 120c59: 83 c2 04 add $0x4,%edx 120c5c: 89 55 dc mov %edx,-0x24(%ebp) 120c5f: 8b 57 04 mov 0x4(%edi),%edx 120c62: 83 e2 fe and $0xfffffffe,%edx 120c65: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 120c68: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 120c6c: 83 e2 01 and $0x1,%edx 120c6f: 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; 120c72: 8b 55 dc mov -0x24(%ebp),%edx 120c75: 8b 7d 14 mov 0x14(%ebp),%edi 120c78: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 120c7a: 8a 55 e0 mov -0x20(%ebp),%dl 120c7d: 80 f2 01 xor $0x1,%dl 120c80: 88 55 e0 mov %dl,-0x20(%ebp) 120c83: 75 17 jne 120c9c <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 120c85: 8b 55 dc mov -0x24(%ebp),%edx 120c88: 39 55 10 cmp %edx,0x10(%ebp) 120c8b: 76 20 jbe 120cad <_Heap_Resize_block+0xa9> 120c8d: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120c92: 8d 65 f4 lea -0xc(%ebp),%esp 120c95: 5b pop %ebx 120c96: 5e pop %esi 120c97: 5f pop %edi 120c98: c9 leave 120c99: c3 ret 120c9a: 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; 120c9c: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 120c9f: 8b 7d d0 mov -0x30(%ebp),%edi 120ca2: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 120ca5: 8b 55 dc mov -0x24(%ebp),%edx 120ca8: 39 55 10 cmp %edx,0x10(%ebp) 120cab: 77 e0 ja 120c8d <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 120cad: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 120cb1: 74 31 je 120ce4 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 120cb3: 8b 79 04 mov 0x4(%ecx),%edi 120cb6: 83 e7 01 and $0x1,%edi 120cb9: 09 c7 or %eax,%edi 120cbb: 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; 120cbe: 8b 7d d4 mov -0x2c(%ebp),%edi 120cc1: 8b 7f 08 mov 0x8(%edi),%edi 120cc4: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 120cc7: 8b 55 d4 mov -0x2c(%ebp),%edx 120cca: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 120ccd: 8b 55 e4 mov -0x1c(%ebp),%edx 120cd0: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 120cd3: 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; 120cd6: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 120cdb: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 120cde: 8b 7d d0 mov -0x30(%ebp),%edi 120ce1: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 120ce4: ff 75 10 pushl 0x10(%ebp) 120ce7: 56 push %esi 120ce8: 51 push %ecx 120ce9: 53 push %ebx 120cea: e8 d1 c0 fe ff call 10cdc0 <_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; 120cef: 8b 50 04 mov 0x4(%eax),%edx 120cf2: 83 e2 fe and $0xfffffffe,%edx 120cf5: 29 f0 sub %esi,%eax 120cf7: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 120cfb: 8b 55 18 mov 0x18(%ebp),%edx 120cfe: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 120d00: ff 43 54 incl 0x54(%ebx) 120d03: 31 c0 xor %eax,%eax 120d05: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120d08: 8d 65 f4 lea -0xc(%ebp),%esp 120d0b: 5b pop %ebx 120d0c: 5e pop %esi 120d0d: 5f pop %edi 120d0e: c9 leave 120d0f: c3 ret =============================================================================== 00120d10 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 120d10: 55 push %ebp 120d11: 89 e5 mov %esp,%ebp 120d13: 56 push %esi 120d14: 53 push %ebx 120d15: 8b 5d 08 mov 0x8(%ebp),%ebx 120d18: 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 ) 120d1b: 8d 4e f8 lea -0x8(%esi),%ecx 120d1e: 89 f0 mov %esi,%eax 120d20: 31 d2 xor %edx,%edx 120d22: f7 73 10 divl 0x10(%ebx) 120d25: 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; 120d27: 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 120d2a: 39 c1 cmp %eax,%ecx 120d2c: 72 07 jb 120d35 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 120d2e: 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 120d31: 39 d1 cmp %edx,%ecx 120d33: 76 07 jbe 120d3c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 120d35: 31 c0 xor %eax,%eax } 120d37: 5b pop %ebx 120d38: 5e pop %esi 120d39: c9 leave 120d3a: c3 ret 120d3b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 120d3c: 8b 59 04 mov 0x4(%ecx),%ebx 120d3f: 83 e3 fe and $0xfffffffe,%ebx 120d42: 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 120d44: 39 c8 cmp %ecx,%eax 120d46: 77 ed ja 120d35 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 120d48: 39 ca cmp %ecx,%edx 120d4a: 72 e9 jb 120d35 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 120d4c: f6 41 04 01 testb $0x1,0x4(%ecx) 120d50: 74 e3 je 120d35 <_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; 120d52: 29 f1 sub %esi,%ecx 120d54: 8d 51 04 lea 0x4(%ecx),%edx 120d57: 8b 45 10 mov 0x10(%ebp),%eax 120d5a: 89 10 mov %edx,(%eax) 120d5c: b0 01 mov $0x1,%al return true; } 120d5e: 5b pop %ebx 120d5f: 5e pop %esi 120d60: c9 leave 120d61: c3 ret =============================================================================== 0010d900 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d900: 55 push %ebp 10d901: 89 e5 mov %esp,%ebp 10d903: 57 push %edi 10d904: 56 push %esi 10d905: 53 push %ebx 10d906: 83 ec 3c sub $0x3c,%esp 10d909: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d90c: 8b 43 10 mov 0x10(%ebx),%eax 10d90f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d912: 8b 53 14 mov 0x14(%ebx),%edx 10d915: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d918: 8b 43 24 mov 0x24(%ebx),%eax 10d91b: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d91e: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d921: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d925: 75 1d jne 10d944 <_Heap_Walk+0x44> 10d927: c7 45 e4 f8 d8 10 00 movl $0x10d8f8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d92e: 83 3d c0 be 12 00 03 cmpl $0x3,0x12bec0 10d935: 74 1d je 10d954 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d937: b0 01 mov $0x1,%al block = next_block; } return true; } 10d939: 8d 65 f4 lea -0xc(%ebp),%esp 10d93c: 5b pop %ebx 10d93d: 5e pop %esi 10d93e: 5f pop %edi 10d93f: c9 leave 10d940: c3 ret 10d941: 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; 10d944: c7 45 e4 c8 dc 10 00 movl $0x10dcc8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d94b: 83 3d c0 be 12 00 03 cmpl $0x3,0x12bec0 10d952: 75 e3 jne 10d937 <_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)( 10d954: 52 push %edx 10d955: ff 73 0c pushl 0xc(%ebx) 10d958: ff 73 08 pushl 0x8(%ebx) 10d95b: ff 75 d8 pushl -0x28(%ebp) 10d95e: 56 push %esi 10d95f: ff 73 1c pushl 0x1c(%ebx) 10d962: ff 73 18 pushl 0x18(%ebx) 10d965: ff 75 dc pushl -0x24(%ebp) 10d968: ff 75 e0 pushl -0x20(%ebp) 10d96b: 68 b0 3d 12 00 push $0x123db0 10d970: 6a 00 push $0x0 10d972: ff 75 0c pushl 0xc(%ebp) 10d975: 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 ) { 10d978: 83 c4 30 add $0x30,%esp 10d97b: 8b 45 e0 mov -0x20(%ebp),%eax 10d97e: 85 c0 test %eax,%eax 10d980: 0f 84 b2 00 00 00 je 10da38 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d986: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d98a: 0f 85 b0 00 00 00 jne 10da40 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d990: 8b 45 dc mov -0x24(%ebp),%eax 10d993: 31 d2 xor %edx,%edx 10d995: f7 75 e0 divl -0x20(%ebp) 10d998: 85 d2 test %edx,%edx 10d99a: 0f 85 ac 00 00 00 jne 10da4c <_Heap_Walk+0x14c> ); return false; } if ( 10d9a0: 8d 46 08 lea 0x8(%esi),%eax 10d9a3: 31 d2 xor %edx,%edx 10d9a5: f7 75 e0 divl -0x20(%ebp) 10d9a8: 85 d2 test %edx,%edx 10d9aa: 0f 85 a8 00 00 00 jne 10da58 <_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; 10d9b0: 8b 56 04 mov 0x4(%esi),%edx 10d9b3: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d9b6: 83 e2 01 and $0x1,%edx 10d9b9: 0f 84 a1 00 00 00 je 10da60 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d9bf: 8b 06 mov (%esi),%eax 10d9c1: 39 45 e0 cmp %eax,-0x20(%ebp) 10d9c4: 75 4e jne 10da14 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d9c6: 8b 55 d8 mov -0x28(%ebp),%edx 10d9c9: 8b 42 04 mov 0x4(%edx),%eax 10d9cc: 83 e0 fe and $0xfffffffe,%eax 10d9cf: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d9d4: 0f 84 bd 02 00 00 je 10dc97 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d9da: 8b 43 10 mov 0x10(%ebx),%eax 10d9dd: 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; 10d9e0: 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 ) { 10d9e3: 39 cb cmp %ecx,%ebx 10d9e5: 0f 84 09 01 00 00 je 10daf4 <_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; 10d9eb: 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 10d9ee: 39 cf cmp %ecx,%edi 10d9f0: 76 76 jbe 10da68 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10d9f2: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d9f4: 51 push %ecx 10d9f5: 68 f8 3e 12 00 push $0x123ef8 10d9fa: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d9fc: 6a 01 push $0x1 10d9fe: ff 75 0c pushl 0xc(%ebp) 10da01: ff 55 e4 call *-0x1c(%ebp) 10da04: 31 c0 xor %eax,%eax 10da06: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10da09: 8d 65 f4 lea -0xc(%ebp),%esp 10da0c: 5b pop %ebx 10da0d: 5e pop %esi 10da0e: 5f pop %edi 10da0f: c9 leave 10da10: c3 ret 10da11: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10da14: 83 ec 0c sub $0xc,%esp 10da17: ff 75 e0 pushl -0x20(%ebp) 10da1a: 50 push %eax 10da1b: 68 cc 3e 12 00 push $0x123ecc return false; } if ( free_block->prev != prev_block ) { (*printer)( 10da20: 6a 01 push $0x1 10da22: ff 75 0c pushl 0xc(%ebp) 10da25: ff 55 e4 call *-0x1c(%ebp) 10da28: 31 c0 xor %eax,%eax 10da2a: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10da2d: 8d 65 f4 lea -0xc(%ebp),%esp 10da30: 5b pop %ebx 10da31: 5e pop %esi 10da32: 5f pop %edi 10da33: c9 leave 10da34: c3 ret 10da35: 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" ); 10da38: 57 push %edi 10da39: 68 27 41 12 00 push $0x124127 10da3e: eb bc jmp 10d9fc <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10da40: ff 75 e0 pushl -0x20(%ebp) 10da43: 68 3a 41 12 00 push $0x12413a 10da48: eb b2 jmp 10d9fc <_Heap_Walk+0xfc> 10da4a: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10da4c: ff 75 dc pushl -0x24(%ebp) 10da4f: 68 44 3e 12 00 push $0x123e44 10da54: eb a6 jmp 10d9fc <_Heap_Walk+0xfc> 10da56: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10da58: 56 push %esi 10da59: 68 68 3e 12 00 push $0x123e68 10da5e: eb 9c jmp 10d9fc <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10da60: 56 push %esi 10da61: 68 9c 3e 12 00 push $0x123e9c 10da66: eb 94 jmp 10d9fc <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10da68: 8b 53 24 mov 0x24(%ebx),%edx 10da6b: 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 10da6e: 39 d1 cmp %edx,%ecx 10da70: 77 82 ja 10d9f4 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da72: 8d 41 08 lea 0x8(%ecx),%eax 10da75: 31 d2 xor %edx,%edx 10da77: f7 75 d4 divl -0x2c(%ebp) 10da7a: 85 d2 test %edx,%edx 10da7c: 0f 85 20 02 00 00 jne 10dca2 <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10da82: 8b 41 04 mov 0x4(%ecx),%eax 10da85: 83 e0 fe and $0xfffffffe,%eax 10da88: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10da8d: 0f 85 29 02 00 00 jne 10dcbc <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10da93: 8b 41 0c mov 0xc(%ecx),%eax 10da96: 39 d8 cmp %ebx,%eax 10da98: 0f 85 0f 02 00 00 jne 10dcad <_Heap_Walk+0x3ad> <== NEVER TAKEN 10da9e: 89 75 c8 mov %esi,-0x38(%ebp) 10daa1: 89 c6 mov %eax,%esi 10daa3: 89 5d c4 mov %ebx,-0x3c(%ebp) 10daa6: eb 3d jmp 10dae5 <_Heap_Walk+0x1e5> 10daa8: 39 cf cmp %ecx,%edi 10daaa: 0f 87 44 ff ff ff ja 10d9f4 <_Heap_Walk+0xf4> 10dab0: 3b 4d d0 cmp -0x30(%ebp),%ecx 10dab3: 0f 87 3b ff ff ff ja 10d9f4 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10dab9: 8d 41 08 lea 0x8(%ecx),%eax 10dabc: 31 d2 xor %edx,%edx 10dabe: f7 75 d4 divl -0x2c(%ebp) 10dac1: 85 d2 test %edx,%edx 10dac3: 0f 85 d9 01 00 00 jne 10dca2 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10dac9: 8b 41 04 mov 0x4(%ecx),%eax 10dacc: 83 e0 fe and $0xfffffffe,%eax 10dacf: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10dad4: 0f 85 e2 01 00 00 jne 10dcbc <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10dada: 8b 41 0c mov 0xc(%ecx),%eax 10dadd: 39 d8 cmp %ebx,%eax 10dadf: 0f 85 c8 01 00 00 jne 10dcad <_Heap_Walk+0x3ad> (*printer)( 10dae5: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10dae7: 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 ) { 10daea: 39 ce cmp %ecx,%esi 10daec: 75 ba jne 10daa8 <_Heap_Walk+0x1a8> 10daee: 8b 75 c8 mov -0x38(%ebp),%esi 10daf1: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10daf4: 39 75 d8 cmp %esi,-0x28(%ebp) 10daf7: 0f 84 3a fe ff ff je 10d937 <_Heap_Walk+0x37> <== NEVER TAKEN 10dafd: 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; 10db00: 89 c1 mov %eax,%ecx 10db02: 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); 10db05: 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 ) { 10db08: a8 01 test $0x1,%al 10db0a: 74 30 je 10db3c <_Heap_Walk+0x23c> (*printer)( 10db0c: 83 ec 0c sub $0xc,%esp 10db0f: 51 push %ecx 10db10: 56 push %esi 10db11: 68 89 41 12 00 push $0x124189 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10db16: 6a 00 push $0x0 10db18: ff 75 0c pushl 0xc(%ebp) 10db1b: 89 4d c0 mov %ecx,-0x40(%ebp) 10db1e: ff 55 e4 call *-0x1c(%ebp) 10db21: 83 c4 20 add $0x20,%esp 10db24: 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 10db27: 39 7b 20 cmp %edi,0x20(%ebx) 10db2a: 76 20 jbe 10db4c <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10db2c: 83 ec 0c sub $0xc,%esp 10db2f: 57 push %edi 10db30: 56 push %esi 10db31: 68 a4 3f 12 00 push $0x123fa4 10db36: e9 e5 fe ff ff jmp 10da20 <_Heap_Walk+0x120> 10db3b: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10db3c: 83 ec 08 sub $0x8,%esp 10db3f: ff 36 pushl (%esi) 10db41: 51 push %ecx 10db42: 56 push %esi 10db43: 68 7c 3f 12 00 push $0x123f7c 10db48: eb cc jmp 10db16 <_Heap_Walk+0x216> 10db4a: 66 90 xchg %ax,%ax 10db4c: 39 7b 24 cmp %edi,0x24(%ebx) 10db4f: 72 db jb 10db2c <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10db51: 89 c8 mov %ecx,%eax 10db53: 31 d2 xor %edx,%edx 10db55: f7 75 e0 divl -0x20(%ebp) 10db58: 85 d2 test %edx,%edx 10db5a: 0f 85 02 01 00 00 jne 10dc62 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10db60: 39 4d dc cmp %ecx,-0x24(%ebp) 10db63: 0f 87 0b 01 00 00 ja 10dc74 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10db69: 39 fe cmp %edi,%esi 10db6b: 0f 83 17 01 00 00 jae 10dc88 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10db71: f6 47 04 01 testb $0x1,0x4(%edi) 10db75: 0f 85 91 00 00 00 jne 10dc0c <_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; 10db7b: 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; 10db7e: 8b 46 04 mov 0x4(%esi),%eax 10db81: 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; 10db84: 83 e0 fe and $0xfffffffe,%eax 10db87: 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); 10db8a: 01 f0 add %esi,%eax 10db8c: 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)( 10db8f: 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; 10db92: 39 53 0c cmp %edx,0xc(%ebx) 10db95: 0f 84 99 00 00 00 je 10dc34 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10db9b: 39 da cmp %ebx,%edx 10db9d: 0f 84 a9 00 00 00 je 10dc4c <_Heap_Walk+0x34c> 10dba3: c7 45 c8 f5 3c 12 00 movl $0x123cf5,-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)( 10dbaa: 8b 46 0c mov 0xc(%esi),%eax 10dbad: 39 c1 cmp %eax,%ecx 10dbaf: 74 7b je 10dc2c <_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)" : ""), 10dbb1: 39 d8 cmp %ebx,%eax 10dbb3: 0f 84 9f 00 00 00 je 10dc58 <_Heap_Walk+0x358> 10dbb9: b9 f5 3c 12 00 mov $0x123cf5,%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)( 10dbbe: ff 75 c8 pushl -0x38(%ebp) 10dbc1: 52 push %edx 10dbc2: 51 push %ecx 10dbc3: 50 push %eax 10dbc4: 56 push %esi 10dbc5: 68 64 40 12 00 push $0x124064 10dbca: 6a 00 push $0x0 10dbcc: ff 75 0c pushl 0xc(%ebp) 10dbcf: 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 ) { 10dbd2: 8b 55 d0 mov -0x30(%ebp),%edx 10dbd5: 8b 02 mov (%edx),%eax 10dbd7: 83 c4 20 add $0x20,%esp 10dbda: 39 45 d4 cmp %eax,-0x2c(%ebp) 10dbdd: 74 11 je 10dbf0 <_Heap_Walk+0x2f0> (*printer)( 10dbdf: 51 push %ecx 10dbe0: 52 push %edx 10dbe1: 50 push %eax 10dbe2: ff 75 d4 pushl -0x2c(%ebp) 10dbe5: 56 push %esi 10dbe6: 68 90 40 12 00 push $0x124090 10dbeb: e9 30 fe ff ff jmp 10da20 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10dbf0: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10dbf4: 74 4a je 10dc40 <_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; 10dbf6: 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 ) { 10dbf9: 39 d8 cmp %ebx,%eax 10dbfb: 75 0a jne 10dc07 <_Heap_Walk+0x307> <== ALWAYS TAKEN 10dbfd: eb 21 jmp 10dc20 <_Heap_Walk+0x320> <== NOT EXECUTED 10dbff: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10dc00: 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 ) { 10dc03: 39 d8 cmp %ebx,%eax 10dc05: 74 19 je 10dc20 <_Heap_Walk+0x320> if ( free_block == block ) { 10dc07: 39 f0 cmp %esi,%eax 10dc09: 75 f5 jne 10dc00 <_Heap_Walk+0x300> 10dc0b: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10dc0c: 39 7d d8 cmp %edi,-0x28(%ebp) 10dc0f: 0f 84 22 fd ff ff je 10d937 <_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 ) { 10dc15: 8b 47 04 mov 0x4(%edi),%eax 10dc18: 89 fe mov %edi,%esi 10dc1a: e9 e1 fe ff ff jmp 10db00 <_Heap_Walk+0x200> 10dc1f: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10dc20: 56 push %esi 10dc21: 68 fc 40 12 00 push $0x1240fc 10dc26: e9 d1 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc> 10dc2b: 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)( 10dc2c: b9 b4 41 12 00 mov $0x1241b4,%ecx 10dc31: eb 8b jmp 10dbbe <_Heap_Walk+0x2be> 10dc33: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10dc34: c7 45 c8 a0 41 12 00 movl $0x1241a0,-0x38(%ebp) 10dc3b: e9 6a ff ff ff jmp 10dbaa <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10dc40: 56 push %esi 10dc41: 68 cc 40 12 00 push $0x1240cc 10dc46: e9 b1 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc> 10dc4b: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dc4c: c7 45 c8 aa 41 12 00 movl $0x1241aa,-0x38(%ebp) 10dc53: e9 52 ff ff ff jmp 10dbaa <_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)" : ""), 10dc58: b9 bf 41 12 00 mov $0x1241bf,%ecx 10dc5d: e9 5c ff ff ff jmp 10dbbe <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dc62: 83 ec 0c sub $0xc,%esp 10dc65: 51 push %ecx 10dc66: 56 push %esi 10dc67: 68 d4 3f 12 00 push $0x123fd4 10dc6c: e9 af fd ff ff jmp 10da20 <_Heap_Walk+0x120> 10dc71: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dc74: 83 ec 08 sub $0x8,%esp 10dc77: ff 75 dc pushl -0x24(%ebp) 10dc7a: 51 push %ecx 10dc7b: 56 push %esi 10dc7c: 68 04 40 12 00 push $0x124004 10dc81: e9 9a fd ff ff jmp 10da20 <_Heap_Walk+0x120> 10dc86: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dc88: 83 ec 0c sub $0xc,%esp 10dc8b: 57 push %edi 10dc8c: 56 push %esi 10dc8d: 68 30 40 12 00 push $0x124030 10dc92: e9 89 fd ff ff jmp 10da20 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dc97: 53 push %ebx 10dc98: 68 58 41 12 00 push $0x124158 10dc9d: e9 5a fd ff ff jmp 10d9fc <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dca2: 51 push %ecx 10dca3: 68 18 3f 12 00 push $0x123f18 10dca8: e9 4f fd ff ff jmp 10d9fc <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dcad: 83 ec 0c sub $0xc,%esp 10dcb0: 50 push %eax 10dcb1: 51 push %ecx 10dcb2: 68 48 3f 12 00 push $0x123f48 10dcb7: e9 64 fd ff ff jmp 10da20 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dcbc: 51 push %ecx 10dcbd: 68 6d 41 12 00 push $0x12416d 10dcc2: e9 35 fd ff ff jmp 10d9fc <_Heap_Walk+0xfc> =============================================================================== 0010c30c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c30c: 55 push %ebp 10c30d: 89 e5 mov %esp,%ebp 10c30f: 53 push %ebx 10c310: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c313: 8b 15 60 9e 12 00 mov 0x129e60,%edx 10c319: 85 d2 test %edx,%edx 10c31b: 74 1a je 10c337 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c31d: 31 db xor %ebx,%ebx 10c31f: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c320: 50 push %eax 10c321: 6a 00 push $0x0 10c323: 6a 00 push $0x0 10c325: 53 push %ebx 10c326: e8 31 5c 00 00 call 111f5c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c32b: 43 inc %ebx 10c32c: 83 c4 10 add $0x10,%esp 10c32f: 39 1d 60 9e 12 00 cmp %ebx,0x129e60 10c335: 77 e9 ja 10c320 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c337: 8b 5d fc mov -0x4(%ebp),%ebx 10c33a: c9 leave 10c33b: c3 ret =============================================================================== 0010c33c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c33c: 55 push %ebp 10c33d: 89 e5 mov %esp,%ebp 10c33f: 57 push %edi 10c340: 56 push %esi 10c341: 53 push %ebx 10c342: 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; 10c345: 8b 1d 54 52 12 00 mov 0x125254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c34b: a1 50 52 12 00 mov 0x125250,%eax 10c350: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c353: 8b 35 4c 52 12 00 mov 0x12524c,%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 ) 10c359: 39 f0 cmp %esi,%eax 10c35b: 72 17 jb 10c374 <_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; 10c35d: 89 1d 64 9e 12 00 mov %ebx,0x129e64 _IO_Number_of_drivers = number_of_drivers; 10c363: 8b 45 e4 mov -0x1c(%ebp),%eax 10c366: a3 60 9e 12 00 mov %eax,0x129e60 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c36b: 8d 65 f4 lea -0xc(%ebp),%esp 10c36e: 5b pop %ebx 10c36f: 5e pop %esi 10c370: 5f pop %edi 10c371: c9 leave 10c372: c3 ret 10c373: 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 *) 10c374: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c377: c1 e1 03 shl $0x3,%ecx 10c37a: 83 ec 0c sub $0xc,%esp 10c37d: 51 push %ecx 10c37e: 89 4d dc mov %ecx,-0x24(%ebp) 10c381: e8 5a 2a 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error> 10c386: 89 c2 mov %eax,%edx 10c388: a3 64 9e 12 00 mov %eax,0x129e64 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c38d: 89 35 60 9e 12 00 mov %esi,0x129e60 memset( 10c393: 31 c0 xor %eax,%eax 10c395: 8b 4d dc mov -0x24(%ebp),%ecx 10c398: 89 d7 mov %edx,%edi 10c39a: 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++ ) 10c39c: 83 c4 10 add $0x10,%esp 10c39f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c3a2: 85 c9 test %ecx,%ecx 10c3a4: 74 c5 je 10c36b <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c3a6: a1 64 9e 12 00 mov 0x129e64,%eax 10c3ab: 89 45 e0 mov %eax,-0x20(%ebp) 10c3ae: 31 c0 xor %eax,%eax 10c3b0: 31 d2 xor %edx,%edx 10c3b2: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c3b4: 8b 7d e0 mov -0x20(%ebp),%edi 10c3b7: 01 c7 add %eax,%edi 10c3b9: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3bc: b9 06 00 00 00 mov $0x6,%ecx 10c3c1: 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++ ) 10c3c3: 42 inc %edx 10c3c4: 83 c0 18 add $0x18,%eax 10c3c7: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3ca: 77 e8 ja 10c3b4 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3cc: 8d 65 f4 lea -0xc(%ebp),%esp 10c3cf: 5b pop %ebx 10c3d0: 5e pop %esi 10c3d1: 5f pop %edi 10c3d2: c9 leave 10c3d3: c3 ret =============================================================================== 0010ceb0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10ceb0: 55 push %ebp 10ceb1: 89 e5 mov %esp,%ebp 10ceb3: 53 push %ebx 10ceb4: 83 ec 08 sub $0x8,%esp 10ceb7: 8b 45 08 mov 0x8(%ebp),%eax 10ceba: 8b 55 0c mov 0xc(%ebp),%edx 10cebd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10cec0: a3 a0 94 12 00 mov %eax,0x1294a0 _Internal_errors_What_happened.is_internal = is_internal; 10cec5: 88 15 a4 94 12 00 mov %dl,0x1294a4 _Internal_errors_What_happened.the_error = the_error; 10cecb: 89 1d a8 94 12 00 mov %ebx,0x1294a8 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ced1: 53 push %ebx 10ced2: 0f b6 d2 movzbl %dl,%edx 10ced5: 52 push %edx 10ced6: 50 push %eax 10ced7: e8 ac 1b 00 00 call 10ea88 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10cedc: c7 05 c0 95 12 00 05 movl $0x5,0x1295c0 <== NOT EXECUTED 10cee3: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10cee6: fa cli <== NOT EXECUTED 10cee7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cee9: f4 hlt <== NOT EXECUTED 10ceea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ceed: eb fe jmp 10ceed <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00100218 <_Message_queue_Manager_initialization>: #include #include #include void _Message_queue_Manager_initialization(void) { 100218: 55 push %ebp 100219: 89 e5 mov %esp,%ebp } 10021b: c9 leave 10021c: c3 ret =============================================================================== 001125e8 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 1125e8: 55 push %ebp 1125e9: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 1125eb: 8b 45 08 mov 0x8(%ebp),%eax 1125ee: 48 dec %eax 1125ef: 83 f8 03 cmp $0x3,%eax 1125f2: 77 0c ja 112600 <_Objects_API_maximum_class+0x18> 1125f4: 8b 04 85 fc 33 12 00 mov 0x1233fc(,%eax,4),%eax 1125fb: c9 leave 1125fc: c3 ret 1125fd: 8d 76 00 lea 0x0(%esi),%esi 112600: 31 c0 xor %eax,%eax 112602: c9 leave 112603: c3 ret =============================================================================== 0010cf48 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10cf48: 55 push %ebp 10cf49: 89 e5 mov %esp,%ebp 10cf4b: 56 push %esi 10cf4c: 53 push %ebx 10cf4d: 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 ) 10cf50: 8b 43 18 mov 0x18(%ebx),%eax 10cf53: 85 c0 test %eax,%eax 10cf55: 75 0d jne 10cf64 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10cf57: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10cf59: 89 c8 mov %ecx,%eax 10cf5b: 8d 65 f8 lea -0x8(%ebp),%esp 10cf5e: 5b pop %ebx 10cf5f: 5e pop %esi 10cf60: c9 leave 10cf61: c3 ret 10cf62: 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 ); 10cf64: 8d 73 20 lea 0x20(%ebx),%esi 10cf67: 83 ec 0c sub $0xc,%esp 10cf6a: 56 push %esi 10cf6b: e8 a0 f6 ff ff call 10c610 <_Chain_Get> 10cf70: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cf72: 83 c4 10 add $0x10,%esp 10cf75: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cf79: 74 de je 10cf59 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10cf7b: 85 c0 test %eax,%eax 10cf7d: 74 29 je 10cfa8 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10cf7f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10cf83: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10cf87: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10cf89: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cf8d: 31 d2 xor %edx,%edx 10cf8f: f7 f6 div %esi 10cf91: c1 e0 02 shl $0x2,%eax 10cf94: 03 43 30 add 0x30(%ebx),%eax 10cf97: ff 08 decl (%eax) information->inactive--; 10cf99: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cf9d: 89 c8 mov %ecx,%eax 10cf9f: 8d 65 f8 lea -0x8(%ebp),%esp 10cfa2: 5b pop %ebx 10cfa3: 5e pop %esi 10cfa4: c9 leave 10cfa5: c3 ret 10cfa6: 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 ); 10cfa8: 83 ec 0c sub $0xc,%esp 10cfab: 53 push %ebx 10cfac: e8 3b 00 00 00 call 10cfec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cfb1: 89 34 24 mov %esi,(%esp) 10cfb4: e8 57 f6 ff ff call 10c610 <_Chain_Get> 10cfb9: 89 c1 mov %eax,%ecx } if ( the_object ) { 10cfbb: 83 c4 10 add $0x10,%esp 10cfbe: 85 c0 test %eax,%eax 10cfc0: 74 97 je 10cf59 <_Objects_Allocate+0x11> 10cfc2: eb bb jmp 10cf7f <_Objects_Allocate+0x37> =============================================================================== 0010cfec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cfec: 55 push %ebp 10cfed: 89 e5 mov %esp,%ebp 10cfef: 57 push %edi 10cff0: 56 push %esi 10cff1: 53 push %ebx 10cff2: 83 ec 4c sub $0x4c,%esp 10cff5: 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 ); 10cff8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cffc: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cfff: 8b 4b 34 mov 0x34(%ebx),%ecx 10d002: 85 c9 test %ecx,%ecx 10d004: 0f 84 72 02 00 00 je 10d27c <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10d00a: 8b 7b 10 mov 0x10(%ebx),%edi 10d00d: 66 89 7d d4 mov %di,-0x2c(%ebp) 10d011: 8b 7b 14 mov 0x14(%ebx),%edi 10d014: 31 d2 xor %edx,%edx 10d016: 8b 45 d4 mov -0x2c(%ebp),%eax 10d019: 66 f7 f7 div %di 10d01c: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10d01f: 85 f6 test %esi,%esi 10d021: 0f 84 6c 02 00 00 je 10d293 <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10d027: 8b 01 mov (%ecx),%eax 10d029: 85 c0 test %eax,%eax 10d02b: 0f 84 72 02 00 00 je 10d2a3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10d031: 0f b7 ff movzwl %di,%edi 10d034: 8b 55 d0 mov -0x30(%ebp),%edx 10d037: 89 55 cc mov %edx,-0x34(%ebp) 10d03a: 31 d2 xor %edx,%edx 10d03c: 8b 45 cc mov -0x34(%ebp),%eax 10d03f: eb 09 jmp 10d04a <_Objects_Extend_information+0x5e> 10d041: 8d 76 00 lea 0x0(%esi),%esi 10d044: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10d048: 74 07 je 10d051 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10d04a: 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++ ) { 10d04c: 42 inc %edx 10d04d: 39 d6 cmp %edx,%esi 10d04f: 77 f3 ja 10d044 <_Objects_Extend_information+0x58> 10d051: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10d054: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d058: 01 f8 add %edi,%eax 10d05a: 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 ) { 10d05d: 3d ff ff 00 00 cmp $0xffff,%eax 10d062: 0f 87 b1 01 00 00 ja 10d219 <_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; 10d068: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10d06c: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10d070: 0f 85 ae 01 00 00 jne 10d224 <_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 ); 10d076: 83 ec 0c sub $0xc,%esp 10d079: 57 push %edi 10d07a: 89 55 b4 mov %edx,-0x4c(%ebp) 10d07d: e8 5e 1d 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error> 10d082: 89 45 c4 mov %eax,-0x3c(%ebp) 10d085: 83 c4 10 add $0x10,%esp 10d088: 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 ) { 10d08b: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d08f: 39 45 cc cmp %eax,-0x34(%ebp) 10d092: 0f 82 fe 00 00 00 jb 10d196 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10d098: 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 ); 10d09b: 83 ec 0c sub $0xc,%esp 10d09e: 8d 04 7f lea (%edi,%edi,2),%eax 10d0a1: 03 45 d4 add -0x2c(%ebp),%eax 10d0a4: 03 45 d0 add -0x30(%ebp),%eax 10d0a7: c1 e0 02 shl $0x2,%eax 10d0aa: 50 push %eax 10d0ab: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0ae: e8 59 1d 00 00 call 10ee0c <_Workspace_Allocate> 10d0b3: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10d0b6: 83 c4 10 add $0x10,%esp 10d0b9: 85 c0 test %eax,%eax 10d0bb: 8b 55 b4 mov -0x4c(%ebp),%edx 10d0be: 0f 84 ef 01 00 00 je 10d2b3 <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10d0c4: 8b 45 c8 mov -0x38(%ebp),%eax 10d0c7: 8d 04 b8 lea (%eax,%edi,4),%eax 10d0ca: 89 45 b8 mov %eax,-0x48(%ebp) 10d0cd: 8b 4d c8 mov -0x38(%ebp),%ecx 10d0d0: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d0d3: 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 ) { 10d0d6: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d0da: 39 45 d0 cmp %eax,-0x30(%ebp) 10d0dd: 0f 82 60 01 00 00 jb 10d243 <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d0e3: 8b 45 d0 mov -0x30(%ebp),%eax 10d0e6: 85 c0 test %eax,%eax 10d0e8: 74 16 je 10d100 <_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, 10d0ea: 31 c0 xor %eax,%eax 10d0ec: 8b 4d bc mov -0x44(%ebp),%ecx 10d0ef: 8b 7d d0 mov -0x30(%ebp),%edi 10d0f2: 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; 10d0f4: 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++ ) { 10d0fb: 40 inc %eax 10d0fc: 39 c7 cmp %eax,%edi 10d0fe: 77 f4 ja 10d0f4 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d100: c1 e6 02 shl $0x2,%esi 10d103: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d106: 8b 45 c8 mov -0x38(%ebp),%eax 10d109: 8b 7d c0 mov -0x40(%ebp),%edi 10d10c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d113: 8b 4d b8 mov -0x48(%ebp),%ecx 10d116: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d11d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d121: 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 ; 10d124: 39 75 cc cmp %esi,-0x34(%ebp) 10d127: 73 19 jae 10d142 <_Objects_Extend_information+0x156><== NEVER TAKEN 10d129: 8b 7d cc mov -0x34(%ebp),%edi 10d12c: 8b 45 bc mov -0x44(%ebp),%eax 10d12f: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d132: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d134: 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++ ) { 10d13a: 40 inc %eax 10d13b: 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 ; 10d13e: 39 c6 cmp %eax,%esi 10d140: 77 f2 ja 10d134 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d142: 9c pushf 10d143: fa cli 10d144: 5f pop %edi old_tables = information->object_blocks; 10d145: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d148: 8b 45 c8 mov -0x38(%ebp),%eax 10d14b: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d14e: 8b 45 b8 mov -0x48(%ebp),%eax 10d151: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d154: 8b 45 bc mov -0x44(%ebp),%eax 10d157: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d15a: 8b 45 d4 mov -0x2c(%ebp),%eax 10d15d: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d161: 8b 33 mov (%ebx),%esi 10d163: c1 e6 18 shl $0x18,%esi 10d166: 81 ce 00 00 01 00 or $0x10000,%esi 10d16c: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d170: c1 e0 1b shl $0x1b,%eax 10d173: 09 c6 or %eax,%esi 10d175: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d179: 09 c6 or %eax,%esi 10d17b: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d17e: 57 push %edi 10d17f: 9d popf if ( old_tables ) 10d180: 85 c9 test %ecx,%ecx 10d182: 74 12 je 10d196 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d184: 83 ec 0c sub $0xc,%esp 10d187: 51 push %ecx 10d188: 89 55 b4 mov %edx,-0x4c(%ebp) 10d18b: e8 98 1c 00 00 call 10ee28 <_Workspace_Free> 10d190: 83 c4 10 add $0x10,%esp 10d193: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d196: c1 e2 02 shl $0x2,%edx 10d199: 89 55 d0 mov %edx,-0x30(%ebp) 10d19c: 8b 43 34 mov 0x34(%ebx),%eax 10d19f: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d1a2: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d1a5: ff 73 18 pushl 0x18(%ebx) 10d1a8: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d1ac: 52 push %edx 10d1ad: 8b 7d d0 mov -0x30(%ebp),%edi 10d1b0: ff 34 38 pushl (%eax,%edi,1) 10d1b3: 8d 7d dc lea -0x24(%ebp),%edi 10d1b6: 57 push %edi 10d1b7: e8 e8 4d 00 00 call 111fa4 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d1bc: 8d 43 20 lea 0x20(%ebx),%eax 10d1bf: 89 45 d4 mov %eax,-0x2c(%ebp) 10d1c2: 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 ) { 10d1c5: 83 c4 10 add $0x10,%esp 10d1c8: eb 2b jmp 10d1f5 <_Objects_Extend_information+0x209> 10d1ca: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d1cc: 8b 13 mov (%ebx),%edx 10d1ce: c1 e2 18 shl $0x18,%edx 10d1d1: 81 ca 00 00 01 00 or $0x10000,%edx 10d1d7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d1db: c1 e1 1b shl $0x1b,%ecx 10d1de: 09 ca or %ecx,%edx 10d1e0: 09 f2 or %esi,%edx 10d1e2: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d1e5: 83 ec 08 sub $0x8,%esp 10d1e8: 50 push %eax 10d1e9: ff 75 d4 pushl -0x2c(%ebp) 10d1ec: e8 e3 f3 ff ff call 10c5d4 <_Chain_Append> index++; 10d1f1: 46 inc %esi 10d1f2: 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 ) { 10d1f5: 83 ec 0c sub $0xc,%esp 10d1f8: 57 push %edi 10d1f9: e8 12 f4 ff ff call 10c610 <_Chain_Get> 10d1fe: 83 c4 10 add $0x10,%esp 10d201: 85 c0 test %eax,%eax 10d203: 75 c7 jne 10d1cc <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d205: 8b 43 30 mov 0x30(%ebx),%eax 10d208: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d20c: 8b 4d d0 mov -0x30(%ebp),%ecx 10d20f: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d212: 8b 43 14 mov 0x14(%ebx),%eax 10d215: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d219: 8d 65 f4 lea -0xc(%ebp),%esp 10d21c: 5b pop %ebx 10d21d: 5e pop %esi 10d21e: 5f pop %edi 10d21f: c9 leave 10d220: c3 ret 10d221: 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 ); 10d224: 83 ec 0c sub $0xc,%esp 10d227: 57 push %edi 10d228: 89 55 b4 mov %edx,-0x4c(%ebp) 10d22b: e8 dc 1b 00 00 call 10ee0c <_Workspace_Allocate> 10d230: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d233: 83 c4 10 add $0x10,%esp 10d236: 85 c0 test %eax,%eax 10d238: 8b 55 b4 mov -0x4c(%ebp),%edx 10d23b: 0f 85 4a fe ff ff jne 10d08b <_Objects_Extend_information+0x9f> 10d241: eb d6 jmp 10d219 <_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, 10d243: c1 e6 02 shl $0x2,%esi 10d246: 89 75 c0 mov %esi,-0x40(%ebp) 10d249: 8b 73 34 mov 0x34(%ebx),%esi 10d24c: 8b 7d c8 mov -0x38(%ebp),%edi 10d24f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d252: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d254: 8b 73 30 mov 0x30(%ebx),%esi 10d257: 8b 7d b8 mov -0x48(%ebp),%edi 10d25a: 8b 4d c0 mov -0x40(%ebp),%ecx 10d25d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d25f: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d263: 03 45 d0 add -0x30(%ebp),%eax 10d266: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d26d: 8b 73 1c mov 0x1c(%ebx),%esi 10d270: 8b 7d bc mov -0x44(%ebp),%edi 10d273: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d275: e9 8c fe ff ff jmp 10d106 <_Objects_Extend_information+0x11a> 10d27a: 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 ) 10d27c: 8b 53 10 mov 0x10(%ebx),%edx 10d27f: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d283: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d287: 89 45 cc mov %eax,-0x34(%ebp) 10d28a: 31 d2 xor %edx,%edx 10d28c: 31 f6 xor %esi,%esi 10d28e: e9 c1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d293: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d296: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d299: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d29c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d29e: e9 b1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d2a3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d2a6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d2a9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d2ac: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d2ae: e9 a1 fd ff ff jmp 10d054 <_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 ); 10d2b3: 83 ec 0c sub $0xc,%esp 10d2b6: ff 75 c4 pushl -0x3c(%ebp) 10d2b9: e8 6a 1b 00 00 call 10ee28 <_Workspace_Free> return; 10d2be: 83 c4 10 add $0x10,%esp 10d2c1: e9 53 ff ff ff jmp 10d219 <_Objects_Extend_information+0x22d> =============================================================================== 0010d358 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d358: 55 push %ebp 10d359: 89 e5 mov %esp,%ebp 10d35b: 56 push %esi 10d35c: 53 push %ebx 10d35d: 8b 75 08 mov 0x8(%ebp),%esi 10d360: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d363: 85 db test %ebx,%ebx 10d365: 75 09 jne 10d370 <_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 ) 10d367: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d369: 8d 65 f8 lea -0x8(%ebp),%esp 10d36c: 5b pop %ebx 10d36d: 5e pop %esi 10d36e: c9 leave 10d36f: 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 ); 10d370: 83 ec 0c sub $0xc,%esp 10d373: 56 push %esi 10d374: e8 6f 52 00 00 call 1125e8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d379: 83 c4 10 add $0x10,%esp 10d37c: 85 c0 test %eax,%eax 10d37e: 74 e7 je 10d367 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d380: 39 c3 cmp %eax,%ebx 10d382: 77 e3 ja 10d367 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d384: 8b 04 b5 cc 93 12 00 mov 0x1293cc(,%esi,4),%eax 10d38b: 85 c0 test %eax,%eax 10d38d: 74 d8 je 10d367 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d38f: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d392: 85 c0 test %eax,%eax 10d394: 74 d3 je 10d369 <_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 ) 10d396: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d39b: 75 cc jne 10d369 <_Objects_Get_information+0x11> 10d39d: eb c8 jmp 10d367 <_Objects_Get_information+0xf> =============================================================================== 0010d3a0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d3a0: 55 push %ebp 10d3a1: 89 e5 mov %esp,%ebp 10d3a3: 56 push %esi 10d3a4: 53 push %ebx 10d3a5: 8b 55 08 mov 0x8(%ebp),%edx 10d3a8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d3ab: b8 01 00 00 00 mov $0x1,%eax 10d3b0: 2b 42 08 sub 0x8(%edx),%eax 10d3b3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d3b6: 9c pushf 10d3b7: fa cli 10d3b8: 5e pop %esi if ( information->maximum >= index ) { 10d3b9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d3bd: 39 c8 cmp %ecx,%eax 10d3bf: 77 1b ja 10d3dc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d3c1: 8b 52 1c mov 0x1c(%edx),%edx 10d3c4: 8b 04 82 mov (%edx,%eax,4),%eax 10d3c7: 85 c0 test %eax,%eax 10d3c9: 74 21 je 10d3ec <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d3cb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d3d1: 8b 55 14 mov 0x14(%ebp),%edx 10d3d4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d3d6: 5b pop %ebx 10d3d7: 5e pop %esi 10d3d8: c9 leave 10d3d9: c3 ret 10d3da: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d3dc: 56 push %esi 10d3dd: 9d popf *location = OBJECTS_ERROR; 10d3de: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d3e4: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d3e6: 5b pop %ebx 10d3e7: 5e pop %esi 10d3e8: c9 leave 10d3e9: c3 ret 10d3ea: 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 ); 10d3ec: 56 push %esi 10d3ed: 9d popf *location = OBJECTS_ERROR; 10d3ee: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d3f4: eb e0 jmp 10d3d6 <_Objects_Get_isr_disable+0x36> =============================================================================== 00119f20 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 119f20: 55 push %ebp 119f21: 89 e5 mov %esp,%ebp 119f23: 57 push %edi 119f24: 56 push %esi 119f25: 53 push %ebx 119f26: 83 ec 2c sub $0x2c,%esp 119f29: 8b 55 08 mov 0x8(%ebp),%edx 119f2c: 8b 75 0c mov 0xc(%ebp),%esi 119f2f: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 119f32: 85 f6 test %esi,%esi 119f34: 75 0e jne 119f44 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 119f36: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 119f38: 89 d8 mov %ebx,%eax 119f3a: 8d 65 f4 lea -0xc(%ebp),%esp 119f3d: 5b pop %ebx 119f3e: 5e pop %esi 119f3f: 5f pop %edi 119f40: c9 leave 119f41: c3 ret 119f42: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 119f44: 85 db test %ebx,%ebx 119f46: 74 f0 je 119f38 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 119f48: 85 d2 test %edx,%edx 119f4a: 75 08 jne 119f54 <_Objects_Get_name_as_string+0x34> 119f4c: a1 58 74 13 00 mov 0x137458,%eax 119f51: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 119f54: 83 ec 0c sub $0xc,%esp 119f57: 52 push %edx 119f58: 89 55 cc mov %edx,-0x34(%ebp) 119f5b: e8 74 80 ff ff call 111fd4 <_Objects_Get_information_id> 119f60: 89 c7 mov %eax,%edi if ( !information ) 119f62: 83 c4 10 add $0x10,%esp 119f65: 85 c0 test %eax,%eax 119f67: 8b 55 cc mov -0x34(%ebp),%edx 119f6a: 74 ca je 119f36 <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 119f6c: 51 push %ecx 119f6d: 8d 45 e4 lea -0x1c(%ebp),%eax 119f70: 50 push %eax 119f71: 52 push %edx 119f72: 57 push %edi 119f73: e8 1c 81 ff ff call 112094 <_Objects_Get> switch ( location ) { 119f78: 83 c4 10 add $0x10,%esp 119f7b: 8b 55 e4 mov -0x1c(%ebp),%edx 119f7e: 85 d2 test %edx,%edx 119f80: 75 b4 jne 119f36 <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 119f82: 80 7f 38 00 cmpb $0x0,0x38(%edi) 119f86: 74 4e je 119fd6 <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 119f88: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 119f8b: 85 ff test %edi,%edi 119f8d: 74 6e je 119ffd <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 119f8f: 4e dec %esi 119f90: 89 75 d4 mov %esi,-0x2c(%ebp) 119f93: 74 68 je 119ffd <_Objects_Get_name_as_string+0xdd><== NEVER TAKEN 119f95: 8a 07 mov (%edi),%al 119f97: 84 c0 test %al,%al 119f99: 74 62 je 119ffd <_Objects_Get_name_as_string+0xdd> 119f9b: 89 d9 mov %ebx,%ecx 119f9d: 31 d2 xor %edx,%edx 119f9f: 89 5d d0 mov %ebx,-0x30(%ebp) 119fa2: eb 07 jmp 119fab <_Objects_Get_name_as_string+0x8b> 119fa4: 8a 04 17 mov (%edi,%edx,1),%al 119fa7: 84 c0 test %al,%al 119fa9: 74 1b je 119fc6 <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 119fab: 0f b6 d8 movzbl %al,%ebx 119fae: 8b 35 98 49 13 00 mov 0x134998,%esi 119fb4: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 119fb9: 75 02 jne 119fbd <_Objects_Get_name_as_string+0x9d> 119fbb: b0 2a mov $0x2a,%al 119fbd: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 119fbf: 42 inc %edx 119fc0: 41 inc %ecx 119fc1: 3b 55 d4 cmp -0x2c(%ebp),%edx 119fc4: 72 de jb 119fa4 <_Objects_Get_name_as_string+0x84> 119fc6: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 119fc9: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 119fcc: e8 a7 89 ff ff call 112978 <_Thread_Enable_dispatch> return name; 119fd1: e9 62 ff ff ff jmp 119f38 <_Objects_Get_name_as_string+0x18> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 119fd6: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 119fd9: 89 c2 mov %eax,%edx 119fdb: c1 ea 18 shr $0x18,%edx 119fde: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 119fe1: 89 c2 mov %eax,%edx 119fe3: c1 ea 10 shr $0x10,%edx 119fe6: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 119fe9: 89 c2 mov %eax,%edx 119feb: c1 ea 08 shr $0x8,%edx 119fee: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 119ff1: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 119ff4: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 119ff8: 8d 7d df lea -0x21(%ebp),%edi 119ffb: eb 92 jmp 119f8f <_Objects_Get_name_as_string+0x6f> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 119ffd: 89 d9 mov %ebx,%ecx 119fff: eb c8 jmp 119fc9 <_Objects_Get_name_as_string+0xa9> =============================================================================== 0011d5c4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11d5c4: 55 push %ebp 11d5c5: 89 e5 mov %esp,%ebp 11d5c7: 57 push %edi 11d5c8: 56 push %esi 11d5c9: 53 push %ebx 11d5ca: 83 ec 0c sub $0xc,%esp 11d5cd: 8b 5d 08 mov 0x8(%ebp),%ebx 11d5d0: 8b 75 0c mov 0xc(%ebp),%esi 11d5d3: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11d5d6: 85 db test %ebx,%ebx 11d5d8: 75 0a jne 11d5e4 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11d5da: 31 c0 xor %eax,%eax } 11d5dc: 8d 65 f4 lea -0xc(%ebp),%esp 11d5df: 5b pop %ebx 11d5e0: 5e pop %esi 11d5e1: 5f pop %edi 11d5e2: c9 leave 11d5e3: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11d5e4: 85 ff test %edi,%edi 11d5e6: 74 f2 je 11d5da <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11d5e8: 8b 45 14 mov 0x14(%ebp),%eax 11d5eb: 85 c0 test %eax,%eax 11d5ed: 74 eb je 11d5da <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11d5ef: 66 85 f6 test %si,%si 11d5f2: 75 04 jne 11d5f8 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11d5f4: 8b 73 08 mov 0x8(%ebx),%esi 11d5f7: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11d5f8: 66 39 73 10 cmp %si,0x10(%ebx) 11d5fc: 72 22 jb 11d620 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11d5fe: 51 push %ecx 11d5ff: 57 push %edi 11d600: 56 push %esi 11d601: 53 push %ebx 11d602: e8 8d 4a ff ff call 112094 <_Objects_Get> next_id++; 11d607: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11d608: 83 c4 10 add $0x10,%esp 11d60b: 8b 17 mov (%edi),%edx 11d60d: 85 d2 test %edx,%edx 11d60f: 75 e7 jne 11d5f8 <_Objects_Get_next+0x34> *next_id_p = next_id; 11d611: 8b 55 14 mov 0x14(%ebp),%edx 11d614: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11d616: 8d 65 f4 lea -0xc(%ebp),%esp 11d619: 5b pop %ebx 11d61a: 5e pop %esi 11d61b: 5f pop %edi 11d61c: c9 leave 11d61d: c3 ret 11d61e: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11d620: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11d626: 8b 45 14 mov 0x14(%ebp),%eax 11d629: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11d62f: 31 c0 xor %eax,%eax return 0; 11d631: eb a9 jmp 11d5dc <_Objects_Get_next+0x18> =============================================================================== 0011b95c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b95c: 55 push %ebp 11b95d: 89 e5 mov %esp,%ebp 11b95f: 53 push %ebx 11b960: 8b 55 08 mov 0x8(%ebp),%edx 11b963: 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; 11b966: b8 01 00 00 00 mov $0x1,%eax 11b96b: 2b 42 08 sub 0x8(%edx),%eax 11b96e: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b971: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b975: 39 c8 cmp %ecx,%eax 11b977: 77 13 ja 11b98c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b979: 8b 52 1c mov 0x1c(%edx),%edx 11b97c: 8b 04 82 mov (%edx,%eax,4),%eax 11b97f: 85 c0 test %eax,%eax 11b981: 74 09 je 11b98c <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b983: 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; } 11b989: 5b pop %ebx 11b98a: c9 leave 11b98b: 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; 11b98c: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b992: 31 c0 xor %eax,%eax return NULL; } 11b994: 5b pop %ebx 11b995: c9 leave 11b996: c3 ret =============================================================================== 001120fc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 1120fc: 55 push %ebp 1120fd: 89 e5 mov %esp,%ebp 1120ff: 83 ec 18 sub $0x18,%esp 112102: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 112105: 85 d2 test %edx,%edx 112107: 75 08 jne 112111 <_Objects_Id_to_name+0x15> 112109: a1 58 74 13 00 mov 0x137458,%eax 11210e: 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); 112111: 89 d0 mov %edx,%eax 112113: c1 e8 18 shr $0x18,%eax 112116: 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 ) 112119: 8d 48 ff lea -0x1(%eax),%ecx 11211c: 83 f9 03 cmp $0x3,%ecx 11211f: 77 1d ja 11213e <_Objects_Id_to_name+0x42> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 112121: 8b 04 85 6c 73 13 00 mov 0x13736c(,%eax,4),%eax 112128: 85 c0 test %eax,%eax 11212a: 74 12 je 11213e <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 11212c: 89 d1 mov %edx,%ecx 11212e: c1 e9 1b shr $0x1b,%ecx 112131: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 112134: 85 c0 test %eax,%eax 112136: 74 06 je 11213e <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 112138: 80 78 38 00 cmpb $0x0,0x38(%eax) 11213c: 74 0a je 112148 <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 11213e: b8 03 00 00 00 mov $0x3,%eax } 112143: c9 leave 112144: c3 ret 112145: 8d 76 00 lea 0x0(%esi),%esi #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 ); 112148: 51 push %ecx 112149: 8d 4d f4 lea -0xc(%ebp),%ecx 11214c: 51 push %ecx 11214d: 52 push %edx 11214e: 50 push %eax 11214f: e8 40 ff ff ff call 112094 <_Objects_Get> if ( !the_object ) 112154: 83 c4 10 add $0x10,%esp 112157: 85 c0 test %eax,%eax 112159: 74 e3 je 11213e <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 11215b: 8b 50 0c mov 0xc(%eax),%edx 11215e: 8b 45 0c mov 0xc(%ebp),%eax 112161: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 112163: e8 10 08 00 00 call 112978 <_Thread_Enable_dispatch> 112168: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 11216a: c9 leave 11216b: c3 ret =============================================================================== 0010d460 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d460: 55 push %ebp 10d461: 89 e5 mov %esp,%ebp 10d463: 57 push %edi 10d464: 56 push %esi 10d465: 53 push %ebx 10d466: 83 ec 0c sub $0xc,%esp 10d469: 8b 45 08 mov 0x8(%ebp),%eax 10d46c: 8b 55 0c mov 0xc(%ebp),%edx 10d46f: 8b 5d 10 mov 0x10(%ebp),%ebx 10d472: 8b 75 20 mov 0x20(%ebp),%esi 10d475: 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; 10d479: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d47b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d47f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d482: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d489: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d490: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d497: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10d49d: 8b 7d 1c mov 0x1c(%ebp),%edi 10d4a0: 89 f9 mov %edi,%ecx 10d4a2: 88 48 38 mov %cl,0x38(%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; 10d4a5: 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; 10d4ab: 8b 3c 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%edi 10d4b2: 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; 10d4b5: 8b 7d 14 mov 0x14(%ebp),%edi 10d4b8: 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 = 10d4bb: 89 f9 mov %edi,%ecx 10d4bd: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d4c0: 8b 4d 14 mov 0x14(%ebp),%ecx 10d4c3: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d4c9: 85 ff test %edi,%edi 10d4cb: 74 04 je 10d4d1 <_Objects_Initialize_information+0x71> 10d4cd: 85 c9 test %ecx,%ecx 10d4cf: 74 6a je 10d53b <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d4d1: 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; 10d4d5: c7 40 1c 44 90 12 00 movl $0x129044,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10d4dc: c1 e2 18 shl $0x18,%edx 10d4df: 81 ca 00 00 01 00 or $0x10000,%edx 10d4e5: c1 e3 1b shl $0x1b,%ebx 10d4e8: 09 da or %ebx,%edx 10d4ea: 31 db xor %ebx,%ebx 10d4ec: 85 c9 test %ecx,%ecx 10d4ee: 0f 95 c3 setne %bl 10d4f1: 09 da or %ebx,%edx 10d4f3: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d4f6: f7 c6 03 00 00 00 test $0x3,%esi 10d4fc: 75 26 jne 10d524 <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d4fe: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d502: 8d 50 24 lea 0x24(%eax),%edx 10d505: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d508: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d50f: 8d 50 20 lea 0x20(%eax),%edx 10d512: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d515: 85 c9 test %ecx,%ecx 10d517: 75 13 jne 10d52c <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d519: 8d 65 f4 lea -0xc(%ebp),%esp 10d51c: 5b pop %ebx 10d51d: 5e pop %esi 10d51e: 5f pop %edi 10d51f: c9 leave 10d520: c3 ret 10d521: 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) & 10d524: 83 c6 04 add $0x4,%esi 10d527: 83 e6 fc and $0xfffffffc,%esi 10d52a: eb d2 jmp 10d4fe <_Objects_Initialize_information+0x9e> /* * 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 ); 10d52c: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d52f: 8d 65 f4 lea -0xc(%ebp),%esp 10d532: 5b pop %ebx 10d533: 5e pop %esi 10d534: 5f pop %edi 10d535: 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 ); 10d536: e9 b1 fa ff ff jmp 10cfec <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d53b: 50 push %eax 10d53c: 6a 14 push $0x14 10d53e: 6a 01 push $0x1 10d540: 6a 00 push $0x0 10d542: e8 69 f9 ff ff call 10ceb0 <_Internal_error_Occurred> =============================================================================== 00118a5c <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 118a5c: 55 push %ebp 118a5d: 89 e5 mov %esp,%ebp 118a5f: 57 push %edi 118a60: 56 push %esi 118a61: 53 push %ebx 118a62: 83 ec 1c sub $0x1c,%esp 118a65: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 118a68: 8b 5d 10 mov 0x10(%ebp),%ebx 118a6b: 85 db test %ebx,%ebx 118a6d: 74 75 je 118ae4 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 118a6f: 8b 4d 0c mov 0xc(%ebp),%ecx 118a72: 85 c9 test %ecx,%ecx 118a74: 74 4b je 118ac1 <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 118a76: 8b 47 10 mov 0x10(%edi),%eax 118a79: 66 85 c0 test %ax,%ax 118a7c: 74 43 je 118ac1 <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 118a7e: 0f b7 c0 movzwl %ax,%eax 118a81: 89 45 e4 mov %eax,-0x1c(%ebp) 118a84: 8b 47 1c mov 0x1c(%edi),%eax 118a87: bb 01 00 00 00 mov $0x1,%ebx 118a8c: 89 7d e0 mov %edi,-0x20(%ebp) 118a8f: 89 c7 mov %eax,%edi 118a91: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 118a94: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 118a97: 85 f6 test %esi,%esi 118a99: 74 20 je 118abb <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 118a9b: 8b 46 0c mov 0xc(%esi),%eax 118a9e: 85 c0 test %eax,%eax 118aa0: 74 19 je 118abb <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 118aa2: 52 push %edx 118aa3: 8b 4d e0 mov -0x20(%ebp),%ecx 118aa6: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 118aaa: 52 push %edx 118aab: 50 push %eax 118aac: ff 75 0c pushl 0xc(%ebp) 118aaf: e8 e8 3c 00 00 call 11c79c 118ab4: 83 c4 10 add $0x10,%esp 118ab7: 85 c0 test %eax,%eax 118ab9: 74 15 je 118ad0 <_Objects_Name_to_id_string+0x74> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 118abb: 43 inc %ebx 118abc: 3b 5d e4 cmp -0x1c(%ebp),%ebx 118abf: 76 d3 jbe 118a94 <_Objects_Name_to_id_string+0x38> 118ac1: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 118ac6: 8d 65 f4 lea -0xc(%ebp),%esp 118ac9: 5b pop %ebx 118aca: 5e pop %esi 118acb: 5f pop %edi 118acc: c9 leave 118acd: c3 ret 118ace: 66 90 xchg %ax,%ax if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 118ad0: 8b 46 08 mov 0x8(%esi),%eax 118ad3: 8b 55 10 mov 0x10(%ebp),%edx 118ad6: 89 02 mov %eax,(%edx) 118ad8: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 118ada: 8d 65 f4 lea -0xc(%ebp),%esp 118add: 5b pop %ebx 118ade: 5e pop %esi 118adf: 5f pop %edi 118ae0: c9 leave 118ae1: c3 ret 118ae2: 66 90 xchg %ax,%ax uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 118ae4: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 118ae9: 8d 65 f4 lea -0xc(%ebp),%esp 118aec: 5b pop %ebx 118aed: 5e pop %esi 118aee: 5f pop %edi 118aef: c9 leave 118af0: c3 ret =============================================================================== 0010d57c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d57c: 55 push %ebp 10d57d: 89 e5 mov %esp,%ebp 10d57f: 57 push %edi 10d580: 56 push %esi 10d581: 53 push %ebx 10d582: 8b 45 08 mov 0x8(%ebp),%eax 10d585: 8b 4d 0c mov 0xc(%ebp),%ecx 10d588: 8b 55 10 mov 0x10(%ebp),%edx 10d58b: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d58e: 85 ff test %edi,%edi 10d590: 74 56 je 10d5e8 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d592: 85 c9 test %ecx,%ecx 10d594: 74 08 je 10d59e <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d596: 8b 70 10 mov 0x10(%eax),%esi 10d599: 66 85 f6 test %si,%si 10d59c: 75 0a jne 10d5a8 <_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++ ) { 10d59e: 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 } 10d5a3: 5b pop %ebx 10d5a4: 5e pop %esi 10d5a5: 5f pop %edi 10d5a6: c9 leave 10d5a7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d5a8: 85 d2 test %edx,%edx 10d5aa: 75 20 jne 10d5cc <_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++ ) { 10d5ac: 0f b7 f6 movzwl %si,%esi 10d5af: 8b 58 1c mov 0x1c(%eax),%ebx 10d5b2: b8 01 00 00 00 mov $0x1,%eax 10d5b7: 90 nop the_object = information->local_table[ index ]; 10d5b8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d5bb: 85 d2 test %edx,%edx 10d5bd: 74 05 je 10d5c4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d5bf: 39 4a 0c cmp %ecx,0xc(%edx) 10d5c2: 74 18 je 10d5dc <_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++ ) { 10d5c4: 40 inc %eax 10d5c5: 39 c6 cmp %eax,%esi 10d5c7: 73 ef jae 10d5b8 <_Objects_Name_to_id_u32+0x3c> 10d5c9: eb d3 jmp 10d59e <_Objects_Name_to_id_u32+0x22> 10d5cb: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d5cc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d5d2: 74 d8 je 10d5ac <_Objects_Name_to_id_u32+0x30> 10d5d4: 4a dec %edx 10d5d5: 75 c7 jne 10d59e <_Objects_Name_to_id_u32+0x22> 10d5d7: eb d3 jmp 10d5ac <_Objects_Name_to_id_u32+0x30> 10d5d9: 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; 10d5dc: 8b 42 08 mov 0x8(%edx),%eax 10d5df: 89 07 mov %eax,(%edi) 10d5e1: 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 } 10d5e3: 5b pop %ebx 10d5e4: 5e pop %esi 10d5e5: 5f pop %edi 10d5e6: c9 leave 10d5e7: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d5e8: 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 } 10d5ed: 5b pop %ebx 10d5ee: 5e pop %esi 10d5ef: 5f pop %edi 10d5f0: c9 leave 10d5f1: c3 ret =============================================================================== 0010dc24 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10dc24: 55 push %ebp 10dc25: 89 e5 mov %esp,%ebp 10dc27: 57 push %edi 10dc28: 56 push %esi 10dc29: 53 push %ebx 10dc2a: 83 ec 14 sub $0x14,%esp 10dc2d: 8b 7d 08 mov 0x8(%ebp),%edi 10dc30: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10dc33: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10dc37: 50 push %eax 10dc38: 53 push %ebx 10dc39: e8 7a 91 00 00 call 116db8 10dc3e: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10dc40: 83 c4 10 add $0x10,%esp 10dc43: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10dc47: 75 53 jne 10dc9c <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10dc49: 0f be 13 movsbl (%ebx),%edx 10dc4c: c1 e2 18 shl $0x18,%edx 10dc4f: 83 f8 01 cmp $0x1,%eax 10dc52: 76 34 jbe 10dc88 <_Objects_Set_name+0x64> 10dc54: 0f be 43 01 movsbl 0x1(%ebx),%eax 10dc58: c1 e0 10 shl $0x10,%eax 10dc5b: 09 d0 or %edx,%eax 10dc5d: 83 fe 02 cmp $0x2,%esi 10dc60: 74 2d je 10dc8f <_Objects_Set_name+0x6b> 10dc62: 0f be 53 02 movsbl 0x2(%ebx),%edx 10dc66: c1 e2 08 shl $0x8,%edx 10dc69: 09 c2 or %eax,%edx 10dc6b: 83 fe 03 cmp $0x3,%esi 10dc6e: 74 24 je 10dc94 <_Objects_Set_name+0x70> 10dc70: 0f be 43 03 movsbl 0x3(%ebx),%eax 10dc74: 09 c2 or %eax,%edx 10dc76: 8b 45 0c mov 0xc(%ebp),%eax 10dc79: 89 50 0c mov %edx,0xc(%eax) 10dc7c: b0 01 mov $0x1,%al ); } return true; } 10dc7e: 8d 65 f4 lea -0xc(%ebp),%esp 10dc81: 5b pop %ebx 10dc82: 5e pop %esi 10dc83: 5f pop %edi 10dc84: c9 leave 10dc85: c3 ret 10dc86: 66 90 xchg %ax,%ax d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10dc88: 89 d0 mov %edx,%eax 10dc8a: 0d 00 00 20 00 or $0x200000,%eax 10dc8f: 89 c2 mov %eax,%edx 10dc91: 80 ce 20 or $0x20,%dh 10dc94: b8 20 00 00 00 mov $0x20,%eax 10dc99: eb d9 jmp 10dc74 <_Objects_Set_name+0x50> 10dc9b: 90 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10dc9c: 83 ec 0c sub $0xc,%esp 10dc9f: 8d 40 01 lea 0x1(%eax),%eax 10dca2: 50 push %eax 10dca3: e8 68 18 00 00 call 10f510 <_Workspace_Allocate> 10dca8: 89 c7 mov %eax,%edi if ( !d ) 10dcaa: 83 c4 10 add $0x10,%esp 10dcad: 85 c0 test %eax,%eax 10dcaf: 74 43 je 10dcf4 <_Objects_Set_name+0xd0><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10dcb1: 8b 55 0c mov 0xc(%ebp),%edx 10dcb4: 8b 42 0c mov 0xc(%edx),%eax 10dcb7: 85 c0 test %eax,%eax 10dcb9: 74 16 je 10dcd1 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10dcbb: 83 ec 0c sub $0xc,%esp 10dcbe: 50 push %eax 10dcbf: e8 68 18 00 00 call 10f52c <_Workspace_Free> the_object->name.name_p = NULL; 10dcc4: 8b 45 0c mov 0xc(%ebp),%eax 10dcc7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10dcce: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10dcd1: 50 push %eax 10dcd2: 56 push %esi 10dcd3: 53 push %ebx 10dcd4: 57 push %edi 10dcd5: e8 62 90 00 00 call 116d3c d[length] = '\0'; 10dcda: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10dcde: 8b 55 0c mov 0xc(%ebp),%edx 10dce1: 89 7a 0c mov %edi,0xc(%edx) 10dce4: b0 01 mov $0x1,%al 10dce6: 83 c4 10 add $0x10,%esp ); } return true; } 10dce9: 8d 65 f4 lea -0xc(%ebp),%esp 10dcec: 5b pop %ebx 10dced: 5e pop %esi 10dcee: 5f pop %edi 10dcef: c9 leave 10dcf0: c3 ret 10dcf1: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 10dcf4: 31 c0 xor %eax,%eax 10dcf6: eb 86 jmp 10dc7e <_Objects_Set_name+0x5a><== NOT EXECUTED =============================================================================== 0010d5f4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d5f4: 55 push %ebp 10d5f5: 89 e5 mov %esp,%ebp 10d5f7: 57 push %edi 10d5f8: 56 push %esi 10d5f9: 53 push %ebx 10d5fa: 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 ); 10d5fd: 8b 45 08 mov 0x8(%ebp),%eax 10d600: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d604: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d608: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d60c: 29 d8 sub %ebx,%eax 10d60e: 31 d2 xor %edx,%edx 10d610: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d612: 85 c0 test %eax,%eax 10d614: 74 21 je 10d637 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d616: 8b 55 08 mov 0x8(%ebp),%edx 10d619: 8b 7a 30 mov 0x30(%edx),%edi 10d61c: 3b 0f cmp (%edi),%ecx 10d61e: 74 1f je 10d63f <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d620: 31 d2 xor %edx,%edx 10d622: eb 0e jmp 10d632 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d624: 01 cb add %ecx,%ebx 10d626: 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 ] == 10d62d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d630: 74 12 je 10d644 <_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++ ) { 10d632: 42 inc %edx 10d633: 39 d0 cmp %edx,%eax 10d635: 77 ed ja 10d624 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d637: 8d 65 f4 lea -0xc(%ebp),%esp 10d63a: 5b pop %ebx 10d63b: 5e pop %esi 10d63c: 5f pop %edi 10d63d: c9 leave 10d63e: 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 ] == 10d63f: 31 f6 xor %esi,%esi 10d641: 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; 10d644: 8b 55 08 mov 0x8(%ebp),%edx 10d647: 8b 42 20 mov 0x20(%edx),%eax 10d64a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d64d: eb 07 jmp 10d656 <_Objects_Shrink_information+0x62> 10d64f: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d650: 85 ff test %edi,%edi 10d652: 74 2c je 10d680 <_Objects_Shrink_information+0x8c> 10d654: 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 ); 10d656: 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; 10d65a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d65c: 39 da cmp %ebx,%edx 10d65e: 72 f0 jb 10d650 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d660: 8b 75 08 mov 0x8(%ebp),%esi 10d663: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d667: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d66a: 39 ca cmp %ecx,%edx 10d66c: 73 e2 jae 10d650 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d66e: 83 ec 0c sub $0xc,%esp 10d671: 50 push %eax 10d672: e8 81 ef ff ff call 10c5f8 <_Chain_Extract> 10d677: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d67a: 85 ff test %edi,%edi 10d67c: 75 d6 jne 10d654 <_Objects_Shrink_information+0x60> 10d67e: 66 90 xchg %ax,%ax 10d680: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d683: 83 ec 0c sub $0xc,%esp 10d686: 8b 55 08 mov 0x8(%ebp),%edx 10d689: 8b 42 34 mov 0x34(%edx),%eax 10d68c: ff 34 30 pushl (%eax,%esi,1) 10d68f: e8 94 17 00 00 call 10ee28 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d694: 8b 55 08 mov 0x8(%ebp),%edx 10d697: 8b 42 34 mov 0x34(%edx),%eax 10d69a: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d6a1: 8b 42 30 mov 0x30(%edx),%eax 10d6a4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d6ab: 8b 42 14 mov 0x14(%edx),%eax 10d6ae: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d6b2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10d6b8: 5b pop %ebx 10d6b9: 5e pop %esi 10d6ba: 5f pop %edi 10d6bb: c9 leave 10d6bc: c3 ret =============================================================================== 0010dae8 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10dae8: 55 push %ebp 10dae9: 89 e5 mov %esp,%ebp 10daeb: 57 push %edi 10daec: 56 push %esi 10daed: 53 push %ebx 10daee: 83 ec 38 sub $0x38,%esp 10daf1: 8b 5d 08 mov 0x8(%ebp),%ebx 10daf4: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10daf7: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10dafd: 53 push %ebx 10dafe: e8 e1 3c 00 00 call 1117e4 <_Timespec_Is_valid> 10db03: 83 c4 10 add $0x10,%esp 10db06: 84 c0 test %al,%al 10db08: 75 0a jne 10db14 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10db0a: 31 c0 xor %eax,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10db0c: 8d 65 f4 lea -0xc(%ebp),%esp 10db0f: 5b pop %ebx 10db10: 5e pop %esi 10db11: 5f pop %edi 10db12: c9 leave 10db13: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10db14: 83 ec 0c sub $0xc,%esp 10db17: 8d 7d e0 lea -0x20(%ebp),%edi 10db1a: 57 push %edi 10db1b: e8 c4 1d 00 00 call 10f8e4 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10db20: 5a pop %edx 10db21: 59 pop %ecx 10db22: 57 push %edi 10db23: 53 push %ebx 10db24: e8 e3 3c 00 00 call 11180c <_Timespec_Less_than> 10db29: 83 c4 10 add $0x10,%esp 10db2c: 84 c0 test %al,%al 10db2e: 74 10 je 10db40 <_POSIX_Absolute_timeout_to_ticks+0x58> 10db30: b8 01 00 00 00 mov $0x1,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10db35: 8d 65 f4 lea -0xc(%ebp),%esp 10db38: 5b pop %ebx 10db39: 5e pop %esi 10db3a: 5f pop %edi 10db3b: c9 leave 10db3c: c3 ret 10db3d: 8d 76 00 lea 0x0(%esi),%esi return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10db40: 50 push %eax 10db41: 8d 45 d8 lea -0x28(%ebp),%eax 10db44: 50 push %eax 10db45: 53 push %ebx 10db46: 57 push %edi 10db47: 89 45 d4 mov %eax,-0x2c(%ebp) 10db4a: e8 e1 3c 00 00 call 111830 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10db4f: 8b 45 d4 mov -0x2c(%ebp),%eax 10db52: 89 04 24 mov %eax,(%esp) 10db55: e8 12 3d 00 00 call 11186c <_Timespec_To_ticks> 10db5a: 89 06 mov %eax,(%esi) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 10db5c: 83 c4 10 add $0x10,%esp 10db5f: 83 f8 01 cmp $0x1,%eax 10db62: 19 c0 sbb %eax,%eax 10db64: 83 c0 03 add $0x3,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10db67: 8d 65 f4 lea -0xc(%ebp),%esp 10db6a: 5b pop %ebx 10db6b: 5e pop %esi 10db6c: 5f pop %edi 10db6d: c9 leave 10db6e: c3 ret =============================================================================== 0010c6c8 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c6c8: 55 push %ebp 10c6c9: 89 e5 mov %esp,%ebp 10c6cb: 56 push %esi 10c6cc: 53 push %ebx 10c6cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d0: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c6d3: 85 db test %ebx,%ebx 10c6d5: 74 39 je 10c710 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c6d7: 8b 03 mov (%ebx),%eax 10c6d9: 83 f8 ff cmp $0xffffffff,%eax 10c6dc: 74 1a je 10c6f8 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c6de: 52 push %edx 10c6df: 56 push %esi 10c6e0: 50 push %eax 10c6e1: 68 00 c4 12 00 push $0x12c400 10c6e6: e8 91 2b 00 00 call 10f27c <_Objects_Get> 10c6eb: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c6ee: 8d 65 f8 lea -0x8(%ebp),%esp 10c6f1: 5b pop %ebx 10c6f2: 5e pop %esi 10c6f3: c9 leave 10c6f4: c3 ret 10c6f5: 8d 76 00 lea 0x0(%esi),%esi if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10c6f8: 83 ec 08 sub $0x8,%esp 10c6fb: 6a 00 push $0x0 10c6fd: 53 push %ebx 10c6fe: e8 19 00 00 00 call 10c71c if ( status ) { 10c703: 83 c4 10 add $0x10,%esp 10c706: 85 c0 test %eax,%eax 10c708: 75 06 jne 10c710 <_POSIX_Condition_variables_Get+0x48> 10c70a: 8b 03 mov (%ebx),%eax 10c70c: eb d0 jmp 10c6de <_POSIX_Condition_variables_Get+0x16> 10c70e: 66 90 xchg %ax,%ax *location = OBJECTS_ERROR; 10c710: c7 06 01 00 00 00 movl $0x1,(%esi) 10c716: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10c718: eb d4 jmp 10c6ee <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010c7e4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c7e4: 55 push %ebp 10c7e5: 89 e5 mov %esp,%ebp 10c7e7: 57 push %edi 10c7e8: 56 push %esi 10c7e9: 53 push %ebx 10c7ea: 83 ec 24 sub $0x24,%esp 10c7ed: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c7f0: 8d 45 e4 lea -0x1c(%ebp),%eax 10c7f3: 50 push %eax 10c7f4: ff 75 08 pushl 0x8(%ebp) 10c7f7: e8 cc fe ff ff call 10c6c8 <_POSIX_Condition_variables_Get> 10c7fc: 89 c7 mov %eax,%edi switch ( location ) { 10c7fe: 83 c4 10 add $0x10,%esp 10c801: 8b 45 e4 mov -0x1c(%ebp),%eax 10c804: 85 c0 test %eax,%eax 10c806: 74 10 je 10c818 <_POSIX_Condition_variables_Signal_support+0x34> 10c808: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c80d: 8d 65 f4 lea -0xc(%ebp),%esp 10c810: 5b pop %ebx 10c811: 5e pop %esi 10c812: 5f pop %edi 10c813: c9 leave 10c814: c3 ret 10c815: 8d 76 00 lea 0x0(%esi),%esi the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c818: 8d 77 18 lea 0x18(%edi),%esi 10c81b: eb 0b jmp 10c828 <_POSIX_Condition_variables_Signal_support+0x44> 10c81d: 8d 76 00 lea 0x0(%esi),%esi if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c820: 84 db test %bl,%bl 10c822: 74 20 je 10c844 <_POSIX_Condition_variables_Signal_support+0x60> 10c824: 85 c0 test %eax,%eax 10c826: 74 1c je 10c844 <_POSIX_Condition_variables_Signal_support+0x60> the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c828: 83 ec 0c sub $0xc,%esp 10c82b: 56 push %esi 10c82c: e8 db 36 00 00 call 10ff0c <_Thread_queue_Dequeue> if ( !the_thread ) 10c831: 83 c4 10 add $0x10,%esp 10c834: 85 c0 test %eax,%eax 10c836: 75 e8 jne 10c820 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c838: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c83f: 84 db test %bl,%bl 10c841: 75 e1 jne 10c824 <_POSIX_Condition_variables_Signal_support+0x40> 10c843: 90 nop _Thread_Enable_dispatch(); 10c844: e8 a7 32 00 00 call 10faf0 <_Thread_Enable_dispatch> 10c849: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c84b: 8d 65 f4 lea -0xc(%ebp),%esp 10c84e: 5b pop %ebx 10c84f: 5e pop %esi 10c850: 5f pop %edi 10c851: c9 leave 10c852: c3 ret =============================================================================== 0010c8ac <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c8ac: 55 push %ebp 10c8ad: 89 e5 mov %esp,%ebp 10c8af: 57 push %edi 10c8b0: 56 push %esi 10c8b1: 53 push %ebx 10c8b2: 83 ec 34 sub $0x34,%esp 10c8b5: 8b 7d 08 mov 0x8(%ebp),%edi 10c8b8: 8b 5d 0c mov 0xc(%ebp),%ebx 10c8bb: 8a 45 14 mov 0x14(%ebp),%al 10c8be: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10c8c1: 8d 75 e4 lea -0x1c(%ebp),%esi 10c8c4: 56 push %esi 10c8c5: 53 push %ebx 10c8c6: e8 b1 01 00 00 call 10ca7c <_POSIX_Mutex_Get> 10c8cb: 83 c4 10 add $0x10,%esp 10c8ce: 85 c0 test %eax,%eax 10c8d0: 74 21 je 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c8d2: a1 18 bf 12 00 mov 0x12bf18,%eax 10c8d7: 48 dec %eax 10c8d8: a3 18 bf 12 00 mov %eax,0x12bf18 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c8dd: 83 ec 08 sub $0x8,%esp 10c8e0: 56 push %esi 10c8e1: 57 push %edi 10c8e2: e8 e1 fd ff ff call 10c6c8 <_POSIX_Condition_variables_Get> 10c8e7: 89 c6 mov %eax,%esi switch ( location ) { 10c8e9: 83 c4 10 add $0x10,%esp 10c8ec: 8b 55 e4 mov -0x1c(%ebp),%edx 10c8ef: 85 d2 test %edx,%edx 10c8f1: 74 11 je 10c904 <_POSIX_Condition_variables_Wait_support+0x58> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 10c8f3: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c8f8: 89 f0 mov %esi,%eax 10c8fa: 8d 65 f4 lea -0xc(%ebp),%esp 10c8fd: 5b pop %ebx 10c8fe: 5e pop %esi 10c8ff: 5f pop %edi 10c900: c9 leave 10c901: c3 ret 10c902: 66 90 xchg %ax,%ax the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10c904: 8b 40 14 mov 0x14(%eax),%eax 10c907: 85 c0 test %eax,%eax 10c909: 74 19 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78> 10c90b: 3b 03 cmp (%ebx),%eax 10c90d: 74 15 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c90f: e8 dc 31 00 00 call 10faf0 <_Thread_Enable_dispatch> 10c914: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c919: 89 f0 mov %esi,%eax 10c91b: 8d 65 f4 lea -0xc(%ebp),%esp 10c91e: 5b pop %ebx 10c91f: 5e pop %esi 10c920: 5f pop %edi 10c921: c9 leave 10c922: c3 ret 10c923: 90 nop if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c924: 83 ec 0c sub $0xc,%esp 10c927: 53 push %ebx 10c928: e8 73 03 00 00 call 10cca0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c92d: 83 c4 10 add $0x10,%esp 10c930: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c934: 74 26 je 10c95c <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c936: e8 b5 31 00 00 call 10faf0 <_Thread_Enable_dispatch> 10c93b: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c940: 83 ec 0c sub $0xc,%esp 10c943: 53 push %ebx 10c944: e8 cf 02 00 00 call 10cc18 if ( mutex_status ) 10c949: 83 c4 10 add $0x10,%esp 10c94c: 85 c0 test %eax,%eax 10c94e: 75 a3 jne 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c950: 89 f0 mov %esi,%eax 10c952: 8d 65 f4 lea -0xc(%ebp),%esp 10c955: 5b pop %ebx 10c956: 5e pop %esi 10c957: 5f pop %edi 10c958: c9 leave 10c959: c3 ret 10c95a: 66 90 xchg %ax,%ax return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c95c: 8b 03 mov (%ebx),%eax 10c95e: 89 46 14 mov %eax,0x14(%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; 10c961: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10c968: a1 d8 bf 12 00 mov 0x12bfd8,%eax 10c96d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c974: 83 c6 18 add $0x18,%esi 10c977: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c97a: 8b 17 mov (%edi),%edx 10c97c: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c97f: 50 push %eax 10c980: 68 8c 03 11 00 push $0x11038c 10c985: ff 75 10 pushl 0x10(%ebp) 10c988: 56 push %esi 10c989: e8 9a 36 00 00 call 110028 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c98e: e8 5d 31 00 00 call 10faf0 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c993: a1 d8 bf 12 00 mov 0x12bfd8,%eax 10c998: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c99b: 83 c4 10 add $0x10,%esp 10c99e: 85 f6 test %esi,%esi 10c9a0: 74 9e je 10c940 <_POSIX_Condition_variables_Wait_support+0x94> 10c9a2: 83 fe 74 cmp $0x74,%esi 10c9a5: 0f 85 4d ff ff ff jne 10c8f8 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN 10c9ab: eb 93 jmp 10c940 <_POSIX_Condition_variables_Wait_support+0x94> =============================================================================== 001143d8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 1143d8: 55 push %ebp 1143d9: 89 e5 mov %esp,%ebp 1143db: 57 push %edi 1143dc: 56 push %esi 1143dd: 53 push %ebx 1143de: 83 ec 1c sub $0x1c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 1143e1: 8b 45 08 mov 0x8(%ebp),%eax 1143e4: 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); 1143e7: 89 d0 mov %edx,%eax 1143e9: c1 e8 18 shr $0x18,%eax 1143ec: 83 e0 07 and $0x7,%eax for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 1143ef: 0f b7 d2 movzwl %dx,%edx 1143f2: c1 e2 02 shl $0x2,%edx 1143f5: 89 55 e4 mov %edx,-0x1c(%ebp) 1143f8: 83 c0 04 add $0x4,%eax 1143fb: 89 45 e0 mov %eax,-0x20(%ebp) * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 1143fe: 8b 1d b0 98 12 00 mov 0x1298b0,%ebx done = true; for ( index = 1 ; index <= max ; ++index ) { 114404: 66 85 db test %bx,%bx 114407: 75 0b jne 114414 <_POSIX_Keys_Run_destructors+0x3c> done = false; } } } } } 114409: 8d 65 f4 lea -0xc(%ebp),%esp 11440c: 5b pop %ebx 11440d: 5e pop %esi 11440e: 5f pop %edi 11440f: c9 leave 114410: c3 ret 114411: 8d 76 00 lea 0x0(%esi),%esi Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 114414: be 01 00 00 00 mov $0x1,%esi 114419: b2 01 mov $0x1,%dl POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 11441b: 0f b7 ce movzwl %si,%ecx 11441e: a1 bc 98 12 00 mov 0x1298bc,%eax 114423: 8b 04 88 mov (%eax,%ecx,4),%eax if ( key != NULL && key->destructor != NULL ) { 114426: 85 c0 test %eax,%eax 114428: 74 29 je 114453 <_POSIX_Keys_Run_destructors+0x7b> 11442a: 8b 48 10 mov 0x10(%eax),%ecx 11442d: 85 c9 test %ecx,%ecx 11442f: 74 22 je 114453 <_POSIX_Keys_Run_destructors+0x7b> void *value = key->Values [ thread_api ][ thread_index ]; 114431: 8b 7d e4 mov -0x1c(%ebp),%edi 114434: 8b 4d e0 mov -0x20(%ebp),%ecx 114437: 03 7c 88 04 add 0x4(%eax,%ecx,4),%edi 11443b: 8b 0f mov (%edi),%ecx if ( value != NULL ) { 11443d: 85 c9 test %ecx,%ecx 11443f: 74 12 je 114453 <_POSIX_Keys_Run_destructors+0x7b><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 114441: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED (*key->destructor)( value ); 114447: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11444a: 51 push %ecx <== NOT EXECUTED 11444b: ff 50 10 call *0x10(%eax) <== NOT EXECUTED 11444e: 31 d2 xor %edx,%edx <== NOT EXECUTED 114450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 114453: 46 inc %esi 114454: 66 39 f3 cmp %si,%bx 114457: 73 c2 jae 11441b <_POSIX_Keys_Run_destructors+0x43> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 114459: 84 d2 test %dl,%dl 11445b: 74 a1 je 1143fe <_POSIX_Keys_Run_destructors+0x26><== NEVER TAKEN 11445d: eb aa jmp 114409 <_POSIX_Keys_Run_destructors+0x31> =============================================================================== 00117430 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 117430: 55 push %ebp 117431: 89 e5 mov %esp,%ebp 117433: 57 push %edi 117434: 56 push %esi 117435: 53 push %ebx 117436: 83 ec 34 sub $0x34,%esp 117439: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 11743c: 68 ff 00 00 00 push $0xff 117441: ff 75 08 pushl 0x8(%ebp) 117444: e8 4b 54 00 00 call 11c894 117449: 89 c3 mov %eax,%ebx 11744b: a1 d8 23 13 00 mov 0x1323d8,%eax 117450: 40 inc %eax 117451: a3 d8 23 13 00 mov %eax,0x1323d8 * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 117456: 83 c4 10 add $0x10,%esp 117459: 85 f6 test %esi,%esi 11745b: 0f 84 c3 00 00 00 je 117524 <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 117461: 8b 4e 04 mov 0x4(%esi),%ecx 117464: 85 c9 test %ecx,%ecx 117466: 0f 8e fc 00 00 00 jle 117568 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 11746c: 8b 56 08 mov 0x8(%esi),%edx 11746f: 85 d2 test %edx,%edx 117471: 0f 8e f1 00 00 00 jle 117568 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 117477: 8d 7d d8 lea -0x28(%ebp),%edi 11747a: b9 04 00 00 00 mov $0x4,%ecx 11747f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 117481: 8b 45 dc mov -0x24(%ebp),%eax 117484: 89 45 d4 mov %eax,-0x2c(%ebp) 117487: 8b 45 e0 mov -0x20(%ebp),%eax 11748a: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 11748d: 83 ec 0c sub $0xc,%esp 117490: 68 a0 27 13 00 push $0x1327a0 117495: e8 06 b9 ff ff call 112da0 <_Objects_Allocate> 11749a: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 11749c: 83 c4 10 add $0x10,%esp 11749f: 85 c0 test %eax,%eax 1174a1: 0f 84 03 01 00 00 je 1175aa <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 1174a7: 8b 45 0c mov 0xc(%ebp),%eax 1174aa: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 1174ad: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 1174b1: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 1174b8: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 1174bc: 43 inc %ebx 1174bd: 83 ec 0c sub $0xc,%esp 1174c0: 53 push %ebx 1174c1: e8 c2 d8 ff ff call 114d88 <_Workspace_Allocate> 1174c6: 89 c7 mov %eax,%edi if (!name) { 1174c8: 83 c4 10 add $0x10,%esp 1174cb: 85 c0 test %eax,%eax 1174cd: 0f 84 ac 00 00 00 je 11757f <_POSIX_Message_queue_Create_support+0x14f> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 1174d3: 50 push %eax 1174d4: 53 push %ebx 1174d5: ff 75 08 pushl 0x8(%ebp) 1174d8: 57 push %edi 1174d9: e8 3a 53 00 00 call 11c818 * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 1174de: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 1174e5: ff 75 d0 pushl -0x30(%ebp) 1174e8: ff 75 d4 pushl -0x2c(%ebp) 1174eb: 8d 46 5c lea 0x5c(%esi),%eax 1174ee: 50 push %eax 1174ef: 8d 46 1c lea 0x1c(%esi),%eax 1174f2: 50 push %eax 1174f3: e8 74 0f 00 00 call 11846c <_CORE_message_queue_Initialize> 1174f8: 83 c4 20 add $0x20,%esp 1174fb: 84 c0 test %al,%al 1174fd: 74 39 je 117538 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1174ff: 0f b7 56 08 movzwl 0x8(%esi),%edx 117503: a1 bc 27 13 00 mov 0x1327bc,%eax 117508: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 11750b: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 11750e: 8b 45 14 mov 0x14(%ebp),%eax 117511: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 117513: e8 fc c5 ff ff call 113b14 <_Thread_Enable_dispatch> 117518: 31 c0 xor %eax,%eax return 0; } 11751a: 8d 65 f4 lea -0xc(%ebp),%esp 11751d: 5b pop %ebx 11751e: 5e pop %esi 11751f: 5f pop %edi 117520: c9 leave 117521: c3 ret 117522: 66 90 xchg %ax,%ax * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 117524: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 11752b: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 117532: e9 56 ff ff ff jmp 11748d <_POSIX_Message_queue_Create_support+0x5d> 117537: 90 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 117538: 83 ec 08 sub $0x8,%esp 11753b: 56 push %esi 11753c: 68 a0 27 13 00 push $0x1327a0 117541: e8 da bb ff ff call 113120 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 117546: 89 3c 24 mov %edi,(%esp) 117549: e8 56 d8 ff ff call 114da4 <_Workspace_Free> _Thread_Enable_dispatch(); 11754e: e8 c1 c5 ff ff call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 117553: e8 18 3d 00 00 call 11b270 <__errno> 117558: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11755e: b8 ff ff ff ff mov $0xffffffff,%eax 117563: 83 c4 10 add $0x10,%esp 117566: eb b2 jmp 11751a <_POSIX_Message_queue_Create_support+0xea> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 117568: e8 a7 c5 ff ff call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 11756d: e8 fe 3c 00 00 call 11b270 <__errno> 117572: c7 00 16 00 00 00 movl $0x16,(%eax) 117578: b8 ff ff ff ff mov $0xffffffff,%eax 11757d: eb 9b jmp 11751a <_POSIX_Message_queue_Create_support+0xea> 11757f: 83 ec 08 sub $0x8,%esp 117582: 56 push %esi 117583: 68 a0 27 13 00 push $0x1327a0 117588: e8 93 bb ff ff call 113120 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 11758d: e8 82 c5 ff ff call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 117592: e8 d9 3c 00 00 call 11b270 <__errno> 117597: c7 00 0c 00 00 00 movl $0xc,(%eax) 11759d: b8 ff ff ff ff mov $0xffffffff,%eax 1175a2: 83 c4 10 add $0x10,%esp 1175a5: e9 70 ff ff ff jmp 11751a <_POSIX_Message_queue_Create_support+0xea> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 1175aa: e8 65 c5 ff ff call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1175af: e8 bc 3c 00 00 call 11b270 <__errno> 1175b4: c7 00 17 00 00 00 movl $0x17,(%eax) 1175ba: b8 ff ff ff ff mov $0xffffffff,%eax 1175bf: e9 56 ff ff ff jmp 11751a <_POSIX_Message_queue_Create_support+0xea> =============================================================================== 001175c4 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 1175c4: 55 push %ebp 1175c5: 89 e5 mov %esp,%ebp 1175c7: 53 push %ebx 1175c8: 83 ec 14 sub $0x14,%esp 1175cb: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1175ce: 85 db test %ebx,%ebx 1175d0: 74 05 je 1175d7 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 1175d2: 80 3b 00 cmpb $0x0,(%ebx) 1175d5: 75 0d jne 1175e4 <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1175d7: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 1175dc: 8b 5d fc mov -0x4(%ebp),%ebx 1175df: c9 leave 1175e0: c3 ret 1175e1: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1175e4: 83 ec 08 sub $0x8,%esp 1175e7: 68 ff 00 00 00 push $0xff 1175ec: 53 push %ebx 1175ed: e8 a2 52 00 00 call 11c894 1175f2: 83 c4 10 add $0x10,%esp 1175f5: 3d fe 00 00 00 cmp $0xfe,%eax 1175fa: 76 0c jbe 117608 <_POSIX_Message_queue_Name_to_id+0x44> 1175fc: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 117601: 8b 5d fc mov -0x4(%ebp),%ebx 117604: c9 leave 117605: c3 ret 117606: 66 90 xchg %ax,%ax return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 117608: 50 push %eax 117609: 8d 45 f4 lea -0xc(%ebp),%eax 11760c: 50 push %eax 11760d: 53 push %ebx 11760e: 68 a0 27 13 00 push $0x1327a0 117613: e8 44 14 00 00 call 118a5c <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 117618: 8b 4d f4 mov -0xc(%ebp),%ecx 11761b: 8b 55 0c mov 0xc(%ebp),%edx 11761e: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 117620: 83 c4 10 add $0x10,%esp 117623: 83 f8 01 cmp $0x1,%eax 117626: 19 c0 sbb %eax,%eax 117628: f7 d0 not %eax 11762a: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 11762d: 8b 5d fc mov -0x4(%ebp),%ebx 117630: c9 leave 117631: c3 ret =============================================================================== 001102d0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 1102d0: 55 push %ebp 1102d1: 89 e5 mov %esp,%ebp 1102d3: 56 push %esi 1102d4: 53 push %ebx 1102d5: 83 ec 24 sub $0x24,%esp 1102d8: 8b 75 08 mov 0x8(%ebp),%esi 1102db: 8b 5d 14 mov 0x14(%ebp),%ebx 1102de: 8a 45 18 mov 0x18(%ebp),%al 1102e1: 88 45 e7 mov %al,-0x19(%ebp) RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 1102e4: 8d 45 f4 lea -0xc(%ebp),%eax 1102e7: 50 push %eax 1102e8: 56 push %esi 1102e9: 68 40 29 13 00 push $0x132940 1102ee: e8 5d 2f 00 00 call 113250 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 1102f3: 83 c4 10 add $0x10,%esp 1102f6: 8b 55 f4 mov -0xc(%ebp),%edx 1102f9: 85 d2 test %edx,%edx 1102fb: 74 17 je 110314 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 1102fd: e8 6e af 00 00 call 11b270 <__errno> 110302: c7 00 09 00 00 00 movl $0x9,(%eax) 110308: b8 ff ff ff ff mov $0xffffffff,%eax } 11030d: 8d 65 f8 lea -0x8(%ebp),%esp 110310: 5b pop %ebx 110311: 5e pop %esi 110312: c9 leave 110313: c3 ret the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 110314: 8b 48 14 mov 0x14(%eax),%ecx 110317: 89 ca mov %ecx,%edx 110319: 83 e2 03 and $0x3,%edx 11031c: 4a dec %edx 11031d: 0f 84 bb 00 00 00 je 1103de <_POSIX_Message_queue_Receive_support+0x10e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 110323: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 110326: 8b 45 10 mov 0x10(%ebp),%eax 110329: 39 42 68 cmp %eax,0x68(%edx) 11032c: 77 6e ja 11039c <_POSIX_Message_queue_Receive_support+0xcc> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 11032e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110332: 75 4c jne 110380 <_POSIX_Message_queue_Receive_support+0xb0><== ALWAYS TAKEN 110334: 31 c0 xor %eax,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 110336: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 11033d: 83 ec 08 sub $0x8,%esp 110340: ff 75 1c pushl 0x1c(%ebp) 110343: 50 push %eax 110344: 8d 45 f0 lea -0x10(%ebp),%eax 110347: 50 push %eax 110348: ff 75 0c pushl 0xc(%ebp) 11034b: 56 push %esi 11034c: 83 c2 1c add $0x1c,%edx 11034f: 52 push %edx 110350: e8 e7 1f 00 00 call 11233c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 110355: 83 c4 20 add $0x20,%esp 110358: e8 b7 37 00 00 call 113b14 <_Thread_Enable_dispatch> if (msg_prio) { 11035d: 85 db test %ebx,%ebx 11035f: 74 33 je 110394 <_POSIX_Message_queue_Receive_support+0xc4><== NEVER TAKEN *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 110361: a1 98 24 13 00 mov 0x132498,%eax timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 110366: 8b 50 24 mov 0x24(%eax),%edx 110369: 89 13 mov %edx,(%ebx) 11036b: 85 d2 test %edx,%edx 11036d: 78 21 js 110390 <_POSIX_Message_queue_Receive_support+0xc0> _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 11036f: 8b 40 34 mov 0x34(%eax),%eax 110372: 85 c0 test %eax,%eax 110374: 75 42 jne 1103b8 <_POSIX_Message_queue_Receive_support+0xe8> return length_out; 110376: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 110379: 8d 65 f8 lea -0x8(%ebp),%esp 11037c: 5b pop %ebx 11037d: 5e pop %esi 11037e: c9 leave 11037f: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 110380: 89 c8 mov %ecx,%eax 110382: c1 e8 0e shr $0xe,%eax 110385: 83 f0 01 xor $0x1,%eax 110388: 83 e0 01 and $0x1,%eax 11038b: eb a9 jmp 110336 <_POSIX_Message_queue_Receive_support+0x66> 11038d: 8d 76 00 lea 0x0(%esi),%esi timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 110390: f7 1b negl (%ebx) 110392: eb db jmp 11036f <_POSIX_Message_queue_Receive_support+0x9f> do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { 110394: a1 98 24 13 00 mov 0x132498,%eax <== NOT EXECUTED 110399: eb d4 jmp 11036f <_POSIX_Message_queue_Receive_support+0x9f><== NOT EXECUTED 11039b: 90 nop <== NOT EXECUTED } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 11039c: e8 73 37 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 1103a1: e8 ca ae 00 00 call 11b270 <__errno> 1103a6: c7 00 7a 00 00 00 movl $0x7a,(%eax) 1103ac: b8 ff ff ff ff mov $0xffffffff,%eax 1103b1: e9 57 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> 1103b6: 66 90 xchg %ax,%ax } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 1103b8: e8 b3 ae 00 00 call 11b270 <__errno> 1103bd: 89 c3 mov %eax,%ebx 1103bf: 83 ec 0c sub $0xc,%esp 1103c2: a1 98 24 13 00 mov 0x132498,%eax 1103c7: ff 70 34 pushl 0x34(%eax) 1103ca: e8 39 02 00 00 call 110608 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 1103cf: 89 03 mov %eax,(%ebx) 1103d1: b8 ff ff ff ff mov $0xffffffff,%eax 1103d6: 83 c4 10 add $0x10,%esp 1103d9: e9 2f ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 1103de: e8 31 37 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 1103e3: e8 88 ae 00 00 call 11b270 <__errno> 1103e8: c7 00 09 00 00 00 movl $0x9,(%eax) 1103ee: b8 ff ff ff ff mov $0xffffffff,%eax 1103f3: e9 15 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> =============================================================================== 00110418 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 110418: 55 push %ebp 110419: 89 e5 mov %esp,%ebp 11041b: 57 push %edi 11041c: 56 push %esi 11041d: 53 push %ebx 11041e: 83 ec 2c sub $0x2c,%esp 110421: 8b 75 08 mov 0x8(%ebp),%esi 110424: 8b 5d 14 mov 0x14(%ebp),%ebx 110427: 8a 55 18 mov 0x18(%ebp),%dl /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 11042a: 83 fb 20 cmp $0x20,%ebx 11042d: 0f 87 9d 00 00 00 ja 1104d0 <_POSIX_Message_queue_Send_support+0xb8> 110433: 51 push %ecx 110434: 8d 45 e4 lea -0x1c(%ebp),%eax 110437: 50 push %eax 110438: 56 push %esi 110439: 68 40 29 13 00 push $0x132940 11043e: 88 55 d4 mov %dl,-0x2c(%ebp) 110441: e8 0a 2e 00 00 call 113250 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 110446: 83 c4 10 add $0x10,%esp 110449: 8b 55 e4 mov -0x1c(%ebp),%edx 11044c: 85 d2 test %edx,%edx 11044e: 8a 55 d4 mov -0x2c(%ebp),%dl 110451: 75 69 jne 1104bc <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 110453: 8b 48 14 mov 0x14(%eax),%ecx 110456: f6 c1 03 test $0x3,%cl 110459: 0f 84 85 00 00 00 je 1104e4 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 11045f: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 110462: 84 d2 test %dl,%dl 110464: 75 3a jne 1104a0 <_POSIX_Message_queue_Send_support+0x88> 110466: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 110468: ff 75 1c pushl 0x1c(%ebp) 11046b: 50 push %eax 11046c: f7 db neg %ebx 11046e: 53 push %ebx 11046f: 6a 00 push $0x0 110471: 56 push %esi 110472: ff 75 10 pushl 0x10(%ebp) 110475: ff 75 0c pushl 0xc(%ebp) 110478: 8d 47 1c lea 0x1c(%edi),%eax 11047b: 50 push %eax 11047c: e8 e7 1f 00 00 call 112468 <_CORE_message_queue_Submit> 110481: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 110483: 83 c4 20 add $0x20,%esp 110486: e8 89 36 00 00 call 113b14 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 11048b: 83 fb 07 cmp $0x7,%ebx 11048e: 74 20 je 1104b0 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 110490: 85 db test %ebx,%ebx 110492: 75 68 jne 1104fc <_POSIX_Message_queue_Send_support+0xe4> 110494: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 110496: 8d 65 f4 lea -0xc(%ebp),%esp 110499: 5b pop %ebx 11049a: 5e pop %esi 11049b: 5f pop %edi 11049c: c9 leave 11049d: c3 ret 11049e: 66 90 xchg %ax,%ax the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 1104a0: 89 c8 mov %ecx,%eax 1104a2: c1 e8 0e shr $0xe,%eax 1104a5: 83 f0 01 xor $0x1,%eax 1104a8: 83 e0 01 and $0x1,%eax 1104ab: eb bb jmp 110468 <_POSIX_Message_queue_Send_support+0x50> 1104ad: 8d 76 00 lea 0x0(%esi),%esi * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; 1104b0: a1 98 24 13 00 mov 0x132498,%eax 1104b5: 8b 58 34 mov 0x34(%eax),%ebx 1104b8: eb d6 jmp 110490 <_POSIX_Message_queue_Send_support+0x78> 1104ba: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 1104bc: e8 af ad 00 00 call 11b270 <__errno> 1104c1: c7 00 09 00 00 00 movl $0x9,(%eax) 1104c7: b8 ff ff ff ff mov $0xffffffff,%eax 1104cc: eb c8 jmp 110496 <_POSIX_Message_queue_Send_support+0x7e> 1104ce: 66 90 xchg %ax,%ax * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 1104d0: e8 9b ad 00 00 call 11b270 <__errno> 1104d5: c7 00 16 00 00 00 movl $0x16,(%eax) 1104db: b8 ff ff ff ff mov $0xffffffff,%eax 1104e0: eb b4 jmp 110496 <_POSIX_Message_queue_Send_support+0x7e> 1104e2: 66 90 xchg %ax,%ax the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 1104e4: e8 2b 36 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 1104e9: e8 82 ad 00 00 call 11b270 <__errno> 1104ee: c7 00 09 00 00 00 movl $0x9,(%eax) 1104f4: b8 ff ff ff ff mov $0xffffffff,%eax 1104f9: eb 9b jmp 110496 <_POSIX_Message_queue_Send_support+0x7e> 1104fb: 90 nop msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 1104fc: e8 6f ad 00 00 call 11b270 <__errno> 110501: 89 c6 mov %eax,%esi 110503: 83 ec 0c sub $0xc,%esp 110506: 53 push %ebx 110507: e8 fc 00 00 00 call 110608 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 11050c: 89 06 mov %eax,(%esi) 11050e: b8 ff ff ff ff mov $0xffffffff,%eax 110513: 83 c4 10 add $0x10,%esp 110516: e9 7b ff ff ff jmp 110496 <_POSIX_Message_queue_Send_support+0x7e> =============================================================================== 0010d738 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d738: 55 push %ebp 10d739: 89 e5 mov %esp,%ebp 10d73b: 56 push %esi 10d73c: 53 push %ebx 10d73d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d740: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d743: 85 db test %ebx,%ebx 10d745: 74 39 je 10d780 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d747: 8b 03 mov (%ebx),%eax 10d749: 83 f8 ff cmp $0xffffffff,%eax 10d74c: 74 1a je 10d768 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d74e: 52 push %edx 10d74f: 56 push %esi 10d750: 50 push %eax 10d751: 68 a0 ea 12 00 push $0x12eaa0 10d756: e8 71 2b 00 00 call 1102cc <_Objects_Get> 10d75b: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d75e: 8d 65 f8 lea -0x8(%ebp),%esp 10d761: 5b pop %ebx 10d762: 5e pop %esi 10d763: c9 leave 10d764: c3 ret 10d765: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d768: 83 ec 08 sub $0x8,%esp 10d76b: 6a 00 push $0x0 10d76d: 53 push %ebx 10d76e: e8 65 00 00 00 call 10d7d8 10d773: 83 c4 10 add $0x10,%esp 10d776: 85 c0 test %eax,%eax 10d778: 75 06 jne 10d780 <_POSIX_Mutex_Get+0x48> 10d77a: 8b 03 mov (%ebx),%eax 10d77c: eb d0 jmp 10d74e <_POSIX_Mutex_Get+0x16> 10d77e: 66 90 xchg %ax,%ax 10d780: c7 06 01 00 00 00 movl $0x1,(%esi) 10d786: 31 c0 xor %eax,%eax 10d788: eb d4 jmp 10d75e <_POSIX_Mutex_Get+0x26> =============================================================================== 0010d6e4 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d6e4: 55 push %ebp 10d6e5: 89 e5 mov %esp,%ebp 10d6e7: 56 push %esi 10d6e8: 53 push %ebx 10d6e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6ec: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d6ef: 85 db test %ebx,%ebx 10d6f1: 74 39 je 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d6f3: 8b 03 mov (%ebx),%eax 10d6f5: 83 f8 ff cmp $0xffffffff,%eax 10d6f8: 74 1a je 10d714 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d6fa: ff 75 10 pushl 0x10(%ebp) 10d6fd: 56 push %esi 10d6fe: 50 push %eax 10d6ff: 68 a0 ea 12 00 push $0x12eaa0 10d704: e8 6b 2b 00 00 call 110274 <_Objects_Get_isr_disable> 10d709: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d70c: 8d 65 f8 lea -0x8(%ebp),%esp 10d70f: 5b pop %ebx 10d710: 5e pop %esi 10d711: c9 leave 10d712: c3 ret 10d713: 90 nop ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d714: 83 ec 08 sub $0x8,%esp 10d717: 6a 00 push $0x0 10d719: 53 push %ebx 10d71a: e8 b9 00 00 00 call 10d7d8 10d71f: 83 c4 10 add $0x10,%esp 10d722: 85 c0 test %eax,%eax 10d724: 75 06 jne 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d726: 8b 03 mov (%ebx),%eax 10d728: eb d0 jmp 10d6fa <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d72a: 66 90 xchg %ax,%ax 10d72c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d732: 31 c0 xor %eax,%eax 10d734: eb d6 jmp 10d70c <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010d934 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d934: 55 push %ebp 10d935: 89 e5 mov %esp,%ebp 10d937: 53 push %ebx 10d938: 83 ec 18 sub $0x18,%esp 10d93b: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 10d93e: 8d 45 f0 lea -0x10(%ebp),%eax 10d941: 50 push %eax 10d942: 8d 45 f4 lea -0xc(%ebp),%eax 10d945: 50 push %eax 10d946: ff 75 08 pushl 0x8(%ebp) 10d949: e8 96 fd ff ff call 10d6e4 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d94e: 83 c4 10 add $0x10,%esp 10d951: 8b 55 f4 mov -0xc(%ebp),%edx 10d954: 85 d2 test %edx,%edx 10d956: 75 34 jne 10d98c <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d958: 83 ec 0c sub $0xc,%esp 10d95b: ff 75 f0 pushl -0x10(%ebp) 10d95e: ff 75 10 pushl 0x10(%ebp) 10d961: 0f b6 db movzbl %bl,%ebx 10d964: 53 push %ebx 10d965: ff 70 08 pushl 0x8(%eax) 10d968: 83 c0 14 add $0x14,%eax 10d96b: 50 push %eax 10d96c: e8 47 1d 00 00 call 10f6b8 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d971: 83 c4 14 add $0x14,%esp 10d974: a1 58 e7 12 00 mov 0x12e758,%eax 10d979: ff 70 34 pushl 0x34(%eax) 10d97c: e8 f3 00 00 00 call 10da74 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d981: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d984: 8b 5d fc mov -0x4(%ebp),%ebx 10d987: c9 leave 10d988: c3 ret 10d989: 8d 76 00 lea 0x0(%esi),%esi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 10d98c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d991: 8b 5d fc mov -0x4(%ebp),%ebx 10d994: c9 leave 10d995: c3 ret =============================================================================== 001128b4 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 1128b4: 55 push %ebp 1128b5: 89 e5 mov %esp,%ebp 1128b7: 56 push %esi 1128b8: 53 push %ebx 1128b9: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 1128bc: 8b 55 0c mov 0xc(%ebp),%edx 1128bf: 85 d2 test %edx,%edx 1128c1: 0f 85 b9 00 00 00 jne 112980 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 1128c7: 85 db test %ebx,%ebx 1128c9: 74 1c je 1128e7 <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 1128cb: 83 ec 08 sub $0x8,%esp 1128ce: 68 ff 00 00 00 push $0xff 1128d3: 53 push %ebx 1128d4: e8 8f 41 00 00 call 116a68 1128d9: 83 c4 10 add $0x10,%esp 1128dc: 3d fe 00 00 00 cmp $0xfe,%eax 1128e1: 0f 87 ad 00 00 00 ja 112994 <_POSIX_Semaphore_Create_support+0xe0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1128e7: a1 38 94 12 00 mov 0x129438,%eax 1128ec: 40 inc %eax 1128ed: a3 38 94 12 00 mov %eax,0x129438 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 1128f2: 83 ec 0c sub $0xc,%esp 1128f5: 68 80 97 12 00 push $0x129780 1128fa: e8 b1 b2 ff ff call 10dbb0 <_Objects_Allocate> 1128ff: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 112901: 83 c4 10 add $0x10,%esp 112904: 85 c0 test %eax,%eax 112906: 0f 84 9a 00 00 00 je 1129a6 <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 11290c: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 112913: 85 db test %ebx,%ebx 112915: 74 55 je 11296c <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 112917: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 11291b: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 112922: c6 40 15 01 movb $0x1,0x15(%eax) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 112926: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 11292d: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 112934: 50 push %eax 112935: ff 75 10 pushl 0x10(%ebp) 112938: 8d 46 5c lea 0x5c(%esi),%eax 11293b: 50 push %eax 11293c: 8d 46 1c lea 0x1c(%esi),%eax 11293f: 50 push %eax 112940: e8 1f ad ff ff call 10d664 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112945: 0f b7 56 08 movzwl 0x8(%esi),%edx 112949: a1 9c 97 12 00 mov 0x12979c,%eax 11294e: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 112951: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 112954: 8b 45 14 mov 0x14(%ebp),%eax 112957: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 112959: e8 76 bf ff ff call 10e8d4 <_Thread_Enable_dispatch> 11295e: 31 c0 xor %eax,%eax return 0; 112960: 83 c4 10 add $0x10,%esp } 112963: 8d 65 f8 lea -0x8(%ebp),%esp 112966: 5b pop %ebx 112967: 5e pop %esi 112968: c9 leave 112969: c3 ret 11296a: 66 90 xchg %ax,%ax if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 11296c: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 112970: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 112977: c6 40 15 00 movb $0x0,0x15(%eax) 11297b: eb a9 jmp 112926 <_POSIX_Semaphore_Create_support+0x72> 11297d: 8d 76 00 lea 0x0(%esi),%esi CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 112980: e8 bb 34 00 00 call 115e40 <__errno> 112985: c7 00 58 00 00 00 movl $0x58,(%eax) 11298b: b8 ff ff ff ff mov $0xffffffff,%eax 112990: eb d1 jmp 112963 <_POSIX_Semaphore_Create_support+0xaf> 112992: 66 90 xchg %ax,%ax if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 112994: e8 a7 34 00 00 call 115e40 <__errno> 112999: c7 00 5b 00 00 00 movl $0x5b,(%eax) 11299f: b8 ff ff ff ff mov $0xffffffff,%eax 1129a4: eb bd jmp 112963 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 1129a6: e8 29 bf ff ff call 10e8d4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 1129ab: e8 90 34 00 00 call 115e40 <__errno> 1129b0: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1129b6: b8 ff ff ff ff mov $0xffffffff,%eax 1129bb: eb a6 jmp 112963 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 001156cc <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 1156cc: 55 push %ebp 1156cd: 89 e5 mov %esp,%ebp 1156cf: 83 ec 18 sub $0x18,%esp 1156d2: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 1156d5: 85 c0 test %eax,%eax 1156d7: 74 05 je 1156de <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 1156d9: 80 38 00 cmpb $0x0,(%eax) 1156dc: 75 0a jne 1156e8 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1156de: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 1156e3: c9 leave 1156e4: c3 ret 1156e5: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 1156e8: 52 push %edx 1156e9: 8d 55 f4 lea -0xc(%ebp),%edx 1156ec: 52 push %edx 1156ed: 50 push %eax 1156ee: 68 00 f6 12 00 push $0x12f600 1156f3: e8 04 0f 00 00 call 1165fc <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 1156f8: 8b 4d f4 mov -0xc(%ebp),%ecx 1156fb: 8b 55 0c mov 0xc(%ebp),%edx 1156fe: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115700: 83 c4 10 add $0x10,%esp 115703: 83 f8 01 cmp $0x1,%eax 115706: 19 c0 sbb %eax,%eax 115708: f7 d0 not %eax 11570a: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 11570d: c9 leave 11570e: c3 ret =============================================================================== 001129e8 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 1129e8: 55 push %ebp 1129e9: 89 e5 mov %esp,%ebp 1129eb: 53 push %ebx 1129ec: 83 ec 18 sub $0x18,%esp 1129ef: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 1129f2: 8d 45 f4 lea -0xc(%ebp),%eax 1129f5: 50 push %eax 1129f6: 8b 45 08 mov 0x8(%ebp),%eax 1129f9: ff 30 pushl (%eax) 1129fb: 68 80 97 12 00 push $0x129780 112a00: e8 5b b6 ff ff call 10e060 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 112a05: 83 c4 10 add $0x10,%esp 112a08: 8b 55 f4 mov -0xc(%ebp),%edx 112a0b: 85 d2 test %edx,%edx 112a0d: 74 15 je 112a24 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 112a0f: e8 2c 34 00 00 call 115e40 <__errno> 112a14: c7 00 16 00 00 00 movl $0x16,(%eax) 112a1a: b8 ff ff ff ff mov $0xffffffff,%eax } 112a1f: 8b 5d fc mov -0x4(%ebp),%ebx 112a22: c9 leave 112a23: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 112a24: ff 75 10 pushl 0x10(%ebp) 112a27: 0f b6 db movzbl %bl,%ebx 112a2a: 53 push %ebx 112a2b: ff 70 08 pushl 0x8(%eax) 112a2e: 83 c0 1c add $0x1c,%eax 112a31: 50 push %eax 112a32: e8 9d 09 00 00 call 1133d4 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 112a37: e8 98 be ff ff call 10e8d4 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 112a3c: 83 c4 10 add $0x10,%esp 112a3f: a1 f8 94 12 00 mov 0x1294f8,%eax 112a44: 8b 40 34 mov 0x34(%eax),%eax 112a47: 85 c0 test %eax,%eax 112a49: 75 09 jne 112a54 <_POSIX_Semaphore_Wait_support+0x6c> 112a4b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 112a4d: 8b 5d fc mov -0x4(%ebp),%ebx 112a50: c9 leave 112a51: c3 ret 112a52: 66 90 xchg %ax,%ax _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 112a54: e8 e7 33 00 00 call 115e40 <__errno> 112a59: 89 c3 mov %eax,%ebx 112a5b: 83 ec 0c sub $0xc,%esp 112a5e: a1 f8 94 12 00 mov 0x1294f8,%eax 112a63: ff 70 34 pushl 0x34(%eax) 112a66: e8 d1 2e 00 00 call 11593c <_POSIX_Semaphore_Translate_core_semaphore_return_code> 112a6b: 89 03 mov %eax,(%ebx) 112a6d: b8 ff ff ff ff mov $0xffffffff,%eax 112a72: 83 c4 10 add $0x10,%esp 112a75: eb a8 jmp 112a1f <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 0011178c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 11178c: 55 push %ebp 11178d: 89 e5 mov %esp,%ebp 11178f: 83 ec 08 sub $0x8,%esp 111792: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111795: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 11179b: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx 1117a1: 85 c9 test %ecx,%ecx 1117a3: 75 09 jne 1117ae <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 1117a5: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 1117ac: 74 06 je 1117b4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 1117ae: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 1117af: e9 dc c8 ff ff jmp 10e090 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 1117b4: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 1117ba: 85 c0 test %eax,%eax 1117bc: 74 f0 je 1117ae <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 1117be: a1 58 aa 12 00 mov 0x12aa58,%eax 1117c3: 48 dec %eax 1117c4: a3 58 aa 12 00 mov %eax,0x12aa58 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 1117c9: 83 ec 08 sub $0x8,%esp 1117cc: 6a ff push $0xffffffff 1117ce: 52 push %edx 1117cf: e8 58 06 00 00 call 111e2c <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1117d4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 1117d7: c9 leave 1117d8: c3 ret =============================================================================== 001149d4 <_POSIX_Thread_Exit>: void _POSIX_Thread_Exit( Thread_Control *the_thread, void *value_ptr ) { 1149d4: 55 push %ebp 1149d5: 89 e5 mov %esp,%ebp 1149d7: 57 push %edi 1149d8: 56 push %esi 1149d9: 53 push %ebx 1149da: 83 ec 28 sub $0x28,%esp 1149dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1149e0: 8b 75 0c mov 0xc(%ebp),%esi Objects_Information *the_information; Thread_Control *unblocked; POSIX_API_Control *api; the_information = _Objects_Get_information_id( the_thread->Object.id ); 1149e3: ff 73 08 pushl 0x8(%ebx) 1149e6: e8 4d 89 ff ff call 10d338 <_Objects_Get_information_id> 1149eb: 89 c7 mov %eax,%edi api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1149ed: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax * are ready to be switched out. Otherwise, an ISR could * occur and preempt us out while we still hold the * allocator mutex. */ _RTEMS_Lock_allocator(); 1149f3: 5a pop %edx 1149f4: ff 35 b0 94 12 00 pushl 0x1294b0 1149fa: 89 45 e0 mov %eax,-0x20(%ebp) 1149fd: e8 5a 7b ff ff call 10c55c <_API_Mutex_Lock> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 114a02: 8b 15 f8 93 12 00 mov 0x1293f8,%edx 114a08: 42 inc %edx 114a09: 89 15 f8 93 12 00 mov %edx,0x1293f8 _Thread_Disable_dispatch(); the_thread->Wait.return_argument = value_ptr; 114a0f: 89 73 28 mov %esi,0x28(%ebx) /* * Process join */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { 114a12: 83 c4 10 add $0x10,%esp 114a15: 8b 45 e0 mov -0x20(%ebp),%eax 114a18: 83 78 3c 01 cmpl $0x1,0x3c(%eax) 114a1c: 74 32 je 114a50 <_POSIX_Thread_Exit+0x7c> } /* * Now shut down the thread */ _Thread_Close( the_information, the_thread ); 114a1e: 83 ec 08 sub $0x8,%esp 114a21: 53 push %ebx 114a22: 57 push %edi 114a23: e8 30 8f ff ff call 10d958 <_Thread_Close> RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 114a28: 5a pop %edx 114a29: 59 pop %ecx 114a2a: 53 push %ebx 114a2b: 68 c0 96 12 00 push $0x1296c0 114a30: e8 93 88 ff ff call 10d2c8 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 114a35: 58 pop %eax 114a36: ff 35 b0 94 12 00 pushl 0x1294b0 114a3c: e8 63 7b ff ff call 10c5a4 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 114a41: 83 c4 10 add $0x10,%esp } 114a44: 8d 65 f4 lea -0xc(%ebp),%esp 114a47: 5b pop %ebx 114a48: 5e pop %esi 114a49: 5f pop %edi 114a4a: c9 leave _Thread_Close( the_information, the_thread ); _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 114a4b: e9 1c 92 ff ff jmp 10dc6c <_Thread_Enable_dispatch> /* * Process join */ if ( api->detachstate == PTHREAD_CREATE_JOINABLE ) { unblocked = _Thread_queue_Dequeue( &api->Join_List ); 114a50: 83 c0 40 add $0x40,%eax 114a53: 89 45 e4 mov %eax,-0x1c(%ebp) 114a56: 83 ec 0c sub $0xc,%esp 114a59: 50 push %eax 114a5a: e8 29 96 ff ff call 10e088 <_Thread_queue_Dequeue> if ( unblocked ) { 114a5f: 83 c4 10 add $0x10,%esp 114a62: 85 c0 test %eax,%eax 114a64: 74 1e je 114a84 <_POSIX_Thread_Exit+0xb0> 114a66: 66 90 xchg %ax,%ax do { *(void **)unblocked->Wait.return_argument = value_ptr; 114a68: 8b 40 28 mov 0x28(%eax),%eax 114a6b: 89 30 mov %esi,(%eax) } while ( (unblocked = _Thread_queue_Dequeue( &api->Join_List )) ); 114a6d: 83 ec 0c sub $0xc,%esp 114a70: ff 75 e4 pushl -0x1c(%ebp) 114a73: e8 10 96 ff ff call 10e088 <_Thread_queue_Dequeue> 114a78: 83 c4 10 add $0x10,%esp 114a7b: 85 c0 test %eax,%eax 114a7d: 75 e9 jne 114a68 <_POSIX_Thread_Exit+0x94> 114a7f: eb 9d jmp 114a1e <_POSIX_Thread_Exit+0x4a> 114a81: 8d 76 00 lea 0x0(%esi),%esi } else { _Thread_Set_state( 114a84: 83 ec 08 sub $0x8,%esp 114a87: 68 04 10 00 00 push $0x1004 114a8c: 53 push %ebx 114a8d: e8 c6 9a ff ff call 10e558 <_Thread_Set_state> the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT ); _RTEMS_Unlock_allocator(); 114a92: 58 pop %eax 114a93: ff 35 b0 94 12 00 pushl 0x1294b0 114a99: e8 06 7b ff ff call 10c5a4 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 114a9e: e8 c9 91 ff ff call 10dc6c <_Thread_Enable_dispatch> /* now waiting for thread to arrive */ _RTEMS_Lock_allocator(); 114aa3: 5e pop %esi 114aa4: ff 35 b0 94 12 00 pushl 0x1294b0 114aaa: e8 ad 7a ff ff call 10c55c <_API_Mutex_Lock> 114aaf: a1 f8 93 12 00 mov 0x1293f8,%eax 114ab4: 40 inc %eax 114ab5: a3 f8 93 12 00 mov %eax,0x1293f8 RTEMS_COMPILER_MEMORY_BARRIER(); 114aba: 83 c4 10 add $0x10,%esp 114abd: e9 5c ff ff ff jmp 114a1e <_POSIX_Thread_Exit+0x4a> =============================================================================== 001128e8 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1128e8: 55 push %ebp 1128e9: 89 e5 mov %esp,%ebp 1128eb: 57 push %edi 1128ec: 56 push %esi 1128ed: 53 push %ebx 1128ee: 83 ec 18 sub $0x18,%esp 1128f1: 8b 5d 08 mov 0x8(%ebp),%ebx 1128f4: 8b 75 0c mov 0xc(%ebp),%esi 1128f7: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 1128fa: ff 36 pushl (%esi) 1128fc: e8 cb ff ff ff call 1128cc <_POSIX_Priority_Is_valid> 112901: 83 c4 10 add $0x10,%esp 112904: 84 c0 test %al,%al 112906: 74 2a je 112932 <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 112908: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 11290e: 8b 45 14 mov 0x14(%ebp),%eax 112911: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 112917: 85 db test %ebx,%ebx 112919: 74 25 je 112940 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 11291b: 83 fb 01 cmp $0x1,%ebx 11291e: 0f 84 90 00 00 00 je 1129b4 <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 112924: 83 fb 02 cmp $0x2,%ebx 112927: 0f 84 97 00 00 00 je 1129c4 <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 11292d: 83 fb 04 cmp $0x4,%ebx 112930: 74 1e je 112950 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 112932: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 112937: 8d 65 f4 lea -0xc(%ebp),%esp 11293a: 5b pop %ebx 11293b: 5e pop %esi 11293c: 5f pop %edi 11293d: c9 leave 11293e: c3 ret 11293f: 90 nop *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112940: c7 07 01 00 00 00 movl $0x1,(%edi) 112946: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 112948: 8d 65 f4 lea -0xc(%ebp),%esp 11294b: 5b pop %ebx 11294c: 5e pop %esi 11294d: 5f pop %edi 11294e: c9 leave 11294f: c3 ret *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 112950: 8b 5e 08 mov 0x8(%esi),%ebx 112953: 85 db test %ebx,%ebx 112955: 75 07 jne 11295e <_POSIX_Thread_Translate_sched_param+0x76> (param->sched_ss_repl_period.tv_nsec == 0) ) 112957: 8b 4e 0c mov 0xc(%esi),%ecx 11295a: 85 c9 test %ecx,%ecx 11295c: 74 d4 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 11295e: 8b 56 10 mov 0x10(%esi),%edx 112961: 85 d2 test %edx,%edx 112963: 75 07 jne 11296c <_POSIX_Thread_Translate_sched_param+0x84> (param->sched_ss_init_budget.tv_nsec == 0) ) 112965: 8b 46 14 mov 0x14(%esi),%eax 112968: 85 c0 test %eax,%eax 11296a: 74 c6 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 11296c: 83 ec 0c sub $0xc,%esp 11296f: 8d 46 08 lea 0x8(%esi),%eax 112972: 50 push %eax 112973: e8 a8 d0 ff ff call 10fa20 <_Timespec_To_ticks> 112978: 89 c3 mov %eax,%ebx 11297a: 8d 46 10 lea 0x10(%esi),%eax 11297d: 89 04 24 mov %eax,(%esp) 112980: e8 9b d0 ff ff call 10fa20 <_Timespec_To_ticks> 112985: 83 c4 10 add $0x10,%esp 112988: 39 c3 cmp %eax,%ebx 11298a: 72 a6 jb 112932 <_POSIX_Thread_Translate_sched_param+0x4a> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 11298c: 83 ec 0c sub $0xc,%esp 11298f: ff 76 04 pushl 0x4(%esi) 112992: e8 35 ff ff ff call 1128cc <_POSIX_Priority_Is_valid> 112997: 83 c4 10 add $0x10,%esp 11299a: 84 c0 test %al,%al 11299c: 74 94 je 112932 <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 11299e: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 1129a4: 8b 45 14 mov 0x14(%ebp),%eax 1129a7: c7 00 4c c3 10 00 movl $0x10c34c,(%eax) 1129ad: 31 c0 xor %eax,%eax return 0; 1129af: eb 86 jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f> 1129b1: 8d 76 00 lea 0x0(%esi),%esi *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1129b4: c7 07 00 00 00 00 movl $0x0,(%edi) 1129ba: 31 c0 xor %eax,%eax return 0; 1129bc: e9 76 ff ff ff jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f> 1129c1: 8d 76 00 lea 0x0(%esi),%esi } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1129c4: c7 07 02 00 00 00 movl $0x2,(%edi) 1129ca: 31 c0 xor %eax,%eax return 0; 1129cc: e9 66 ff ff ff jmp 112937 <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 001117a0 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 1117a0: 55 push %ebp 1117a1: 89 e5 mov %esp,%ebp 1117a3: 57 push %edi 1117a4: 56 push %esi 1117a5: 53 push %ebx 1117a6: 83 ec 28 sub $0x28,%esp 1117a9: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 1117ac: 68 ec 00 00 00 push $0xec 1117b1: 89 55 e4 mov %edx,-0x1c(%ebp) 1117b4: e8 53 d6 ff ff call 10ee0c <_Workspace_Allocate> 1117b9: 89 c3 mov %eax,%ebx if ( !api ) 1117bb: 83 c4 10 add $0x10,%esp 1117be: 85 c0 test %eax,%eax 1117c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1117c3: 0f 84 2f 01 00 00 je 1118f8 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 1117c9: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 1117cf: b9 3c 00 00 00 mov $0x3c,%ecx 1117d4: 31 c0 xor %eax,%eax 1117d6: 89 df mov %ebx,%edi 1117d8: f3 aa rep stos %al,%es:(%edi) 1117da: c7 03 01 00 00 00 movl $0x1,(%ebx) 1117e0: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 1117e7: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 1117ee: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 1117f5: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx) 1117fc: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 111803: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 11180a: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx) 111811: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 111814: be d8 33 12 00 mov $0x1233d8,%esi 111819: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 11181f: b1 07 mov $0x7,%cl 111821: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 111823: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax 11182a: 2b 42 14 sub 0x14(%edx),%eax 11182d: 89 83 84 00 00 00 mov %eax,0x84(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 111833: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 11183a: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 11183d: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 111844: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 111847: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 11184e: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 111851: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 111857: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) the_chain->permanent_null = NULL; 11185d: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 111864: 00 00 00 the_chain->last = _Chain_Head(the_chain); 111867: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 11186d: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 111873: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 11187a: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 11187d: 0f b6 42 0b movzbl 0xb(%edx),%eax 111881: 83 e0 07 and $0x7,%eax 111884: 83 f8 03 cmp $0x3,%eax 111887: 74 53 je 1118dc <_POSIX_Threads_Create_extension+0x13c> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 111889: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx) 111890: ff ff ff } _Thread_queue_Initialize( 111893: 6a 00 push $0x0 111895: 68 00 10 00 10 push $0x10001000 11189a: 6a 00 push $0x0 11189c: 8d 43 40 lea 0x40(%ebx),%eax 11189f: 50 push %eax 1118a0: 89 55 e4 mov %edx,-0x1c(%ebp) 1118a3: e8 5c cb ff ff call 10e404 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_INTERRUPTIBLE_BY_SIGNAL, 0 ); _Watchdog_Initialize( 1118a8: 8b 55 e4 mov -0x1c(%ebp),%edx 1118ab: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1118ae: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx) 1118b5: 00 00 00 the_watchdog->routine = routine; 1118b8: c7 83 c0 00 00 00 48 movl $0x111948,0xc0(%ebx) 1118bf: 19 11 00 the_watchdog->id = id; 1118c2: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) the_watchdog->user_data = user_data; 1118c8: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) 1118ce: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 1118d0: 83 c4 10 add $0x10,%esp } 1118d3: 8d 65 f4 lea -0xc(%ebp),%esp 1118d6: 5b pop %ebx 1118d7: 5e pop %esi 1118d8: 5f pop %edi 1118d9: c9 leave 1118da: c3 ret 1118db: 90 nop #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 1118dc: a1 b8 94 12 00 mov 0x1294b8,%eax 1118e1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 1118e7: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1118ed: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 1118f3: eb 9e jmp 111893 <_POSIX_Threads_Create_extension+0xf3> 1118f5: 8d 76 00 lea 0x0(%esi),%esi POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 1118f8: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 1118fa: 8d 65 f4 lea -0xc(%ebp),%esp 1118fd: 5b pop %ebx 1118fe: 5e pop %esi 1118ff: 5f pop %edi 111900: c9 leave 111901: c3 ret =============================================================================== 00111718 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 111718: 55 push %ebp 111719: 89 e5 mov %esp,%ebp 11171b: 57 push %edi 11171c: 56 push %esi 11171d: 53 push %ebx 11171e: 83 ec 28 sub $0x28,%esp 111721: 8b 7d 0c mov 0xc(%ebp),%edi Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 111724: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 11172a: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 11172d: 57 push %edi 11172e: e8 41 2c 00 00 call 114374 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 111733: 89 3c 24 mov %edi,(%esp) 111736: e8 9d 2c 00 00 call 1143d8 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 11173b: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 11173e: 8b 5d e4 mov -0x1c(%ebp),%ebx 111741: 83 c3 40 add $0x40,%ebx 111744: 83 c4 10 add $0x10,%esp 111747: eb 08 jmp 111751 <_POSIX_Threads_Delete_extension+0x39> 111749: 8d 76 00 lea 0x0(%esi),%esi *(void **)the_thread->Wait.return_argument = value_ptr; 11174c: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 11174f: 89 30 mov %esi,(%eax) <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 111751: 83 ec 0c sub $0xc,%esp 111754: 53 push %ebx 111755: e8 2e c9 ff ff call 10e088 <_Thread_queue_Dequeue> 11175a: 83 c4 10 add $0x10,%esp 11175d: 85 c0 test %eax,%eax 11175f: 75 eb jne 11174c <_POSIX_Threads_Delete_extension+0x34><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 111761: 8b 45 e4 mov -0x1c(%ebp),%eax 111764: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 11176b: 74 1f je 11178c <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 11176d: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 111774: 00 00 00 (void) _Workspace_Free( api ); 111777: 8b 45 e4 mov -0x1c(%ebp),%eax 11177a: 89 45 08 mov %eax,0x8(%ebp) } 11177d: 8d 65 f4 lea -0xc(%ebp),%esp 111780: 5b pop %ebx 111781: 5e pop %esi 111782: 5f pop %edi 111783: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 111784: e9 9f d6 ff ff jmp 10ee28 <_Workspace_Free> 111789: 8d 76 00 lea 0x0(%esi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 11178c: 83 ec 0c sub $0xc,%esp 11178f: 05 a4 00 00 00 add $0xa4,%eax 111794: 50 push %eax 111795: e8 6e d5 ff ff call 10ed08 <_Watchdog_Remove> 11179a: 83 c4 10 add $0x10,%esp 11179d: eb ce jmp 11176d <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 00111698 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 111698: 55 push %ebp 111699: 89 e5 mov %esp,%ebp 11169b: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 11169e: a1 98 76 12 00 mov 0x127698,%eax 1116a3: 85 c0 test %eax,%eax 1116a5: 74 05 je 1116ac <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 1116a7: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 1116a8: ff e0 jmp *%eax 1116aa: 66 90 xchg %ax,%ax } 1116ac: c9 leave 1116ad: c3 ret =============================================================================== 0010c06c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10c06c: 55 push %ebp 10c06d: 89 e5 mov %esp,%ebp 10c06f: 57 push %edi 10c070: 56 push %esi 10c071: 53 push %ebx 10c072: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10c075: 8b 3d 74 67 12 00 mov 0x126774,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10c07b: a1 70 67 12 00 mov 0x126770,%eax 10c080: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10c083: 85 ff test %edi,%edi 10c085: 74 44 je 10c0cb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10c087: 85 c0 test %eax,%eax 10c089: 74 40 je 10c0cb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10c08b: 31 db xor %ebx,%ebx 10c08d: 8d 75 a8 lea -0x58(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10c090: 83 ec 0c sub $0xc,%esp 10c093: 56 push %esi 10c094: e8 3b 69 00 00 call 1129d4 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10c099: 5a pop %edx 10c09a: 59 pop %ecx 10c09b: 6a 02 push $0x2 10c09d: 56 push %esi 10c09e: e8 59 69 00 00 call 1129fc (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10c0a3: 59 pop %ecx 10c0a4: 58 pop %eax 10c0a5: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10c0a9: 56 push %esi 10c0aa: e8 81 69 00 00 call 112a30 status = pthread_create( 10c0af: 6a 00 push $0x0 10c0b1: ff 34 df pushl (%edi,%ebx,8) 10c0b4: 56 push %esi 10c0b5: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0b8: 50 push %eax 10c0b9: e8 0e fc ff ff call 10bccc &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10c0be: 83 c4 20 add $0x20,%esp 10c0c1: 85 c0 test %eax,%eax 10c0c3: 75 0e jne 10c0d3 <_POSIX_Threads_Initialize_user_threads_body+0x67> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10c0c5: 43 inc %ebx 10c0c6: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10c0c9: 77 c5 ja 10c090 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10c0cb: 8d 65 f4 lea -0xc(%ebp),%esp 10c0ce: 5b pop %ebx 10c0cf: 5e pop %esi 10c0d0: 5f pop %edi 10c0d1: c9 leave 10c0d2: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10c0d3: 52 push %edx 10c0d4: 50 push %eax 10c0d5: 6a 01 push $0x1 10c0d7: 6a 02 push $0x2 10c0d9: e8 32 1e 00 00 call 10df10 <_Internal_error_Occurred> =============================================================================== 00111948 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 111948: 55 push %ebp 111949: 89 e5 mov %esp,%ebp 11194b: 56 push %esi 11194c: 53 push %ebx 11194d: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111950: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 111956: 83 ec 0c sub $0xc,%esp 111959: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 11195f: 50 push %eax 111960: e8 ef 10 00 00 call 112a54 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 111965: 89 46 78 mov %eax,0x78(%esi) 111968: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax 11196f: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 111975: 89 46 18 mov %eax,0x18(%esi) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 111978: 83 c4 10 add $0x10,%esp 11197b: 8b 4e 1c mov 0x1c(%esi),%ecx 11197e: 85 c9 test %ecx,%ecx 111980: 75 05 jne 111987 <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 111982: 39 46 14 cmp %eax,0x14(%esi) 111985: 77 35 ja 1119bc <_POSIX_Threads_Sporadic_budget_TSR+0x74> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 111987: 83 ec 0c sub $0xc,%esp 11198a: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 111990: 50 push %eax 111991: e8 be 10 00 00 call 112a54 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 111996: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11199c: 83 c4 10 add $0x10,%esp 11199f: 81 c3 a4 00 00 00 add $0xa4,%ebx 1119a5: 89 5d 0c mov %ebx,0xc(%ebp) 1119a8: c7 45 08 d8 94 12 00 movl $0x1294d8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 1119af: 8d 65 f8 lea -0x8(%ebp),%esp 1119b2: 5b pop %ebx 1119b3: 5e pop %esi 1119b4: c9 leave 1119b5: e9 26 d2 ff ff jmp 10ebe0 <_Watchdog_Insert> 1119ba: 66 90 xchg %ax,%ax if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 1119bc: 52 push %edx 1119bd: 6a 01 push $0x1 1119bf: 50 push %eax 1119c0: 56 push %esi 1119c1: e8 be bd ff ff call 10d784 <_Thread_Change_priority> 1119c6: 83 c4 10 add $0x10,%esp 1119c9: eb bc jmp 111987 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 00111904 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 111904: 55 push %ebp 111905: 89 e5 mov %esp,%ebp 111907: 83 ec 08 sub $0x8,%esp 11190a: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11190d: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 111913: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 11191a: 0f b6 15 14 52 12 00 movzbl 0x125214,%edx 111921: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 111927: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 11192a: 8b 48 1c mov 0x1c(%eax),%ecx 11192d: 85 c9 test %ecx,%ecx 11192f: 75 05 jne 111936 <_POSIX_Threads_Sporadic_budget_callout+0x32><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 111931: 39 50 14 cmp %edx,0x14(%eax) 111934: 72 02 jb 111938 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 111936: c9 leave <== NOT EXECUTED 111937: c3 ret <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 111938: 51 push %ecx 111939: 6a 01 push $0x1 11193b: 52 push %edx 11193c: 50 push %eax 11193d: e8 42 be ff ff call 10d784 <_Thread_Change_priority> 111942: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 111945: c9 leave 111946: c3 ret =============================================================================== 00114374 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 114374: 55 push %ebp 114375: 89 e5 mov %esp,%ebp 114377: 57 push %edi 114378: 56 push %esi 114379: 53 push %ebx 11437a: 83 ec 0c sub $0xc,%esp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11437d: 8b 45 08 mov 0x8(%ebp),%eax 114380: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 114386: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi) 11438d: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114390: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 114396: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 11439c: 74 30 je 1143ce <_POSIX_Threads_cancel_run+0x5a> 11439e: 66 90 xchg %ax,%ax thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 1143a0: 9c pushf 1143a1: fa cli 1143a2: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 1143a3: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1143a6: 8b 17 mov (%edi),%edx previous = the_node->previous; 1143a8: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 1143ab: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 1143ae: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 1143b0: 51 push %ecx 1143b1: 9d popf (*handler->routine)( handler->arg ); 1143b2: 83 ec 0c sub $0xc,%esp 1143b5: ff 77 0c pushl 0xc(%edi) 1143b8: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 1143bb: 89 3c 24 mov %edi,(%esp) 1143be: e8 65 aa ff ff call 10ee28 <_Workspace_Free> POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 1143c3: 83 c4 10 add $0x10,%esp 1143c6: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 1143cc: 75 d2 jne 1143a0 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 1143ce: 8d 65 f4 lea -0xc(%ebp),%esp 1143d1: 5b pop %ebx 1143d2: 5e pop %esi 1143d3: 5f pop %edi 1143d4: c9 leave 1143d5: c3 ret =============================================================================== 00112630 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 112630: 55 push %ebp 112631: 89 e5 mov %esp,%ebp 112633: 56 push %esi 112634: 53 push %ebx 112635: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 112638: 83 ec 0c sub $0xc,%esp 11263b: 53 push %ebx 11263c: e8 5b d1 ff ff call 10f79c <_Watchdog_Remove> _ISR_Disable( level ); 112641: 9c pushf 112642: fa cli 112643: 5e pop %esi /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 112644: 83 c4 10 add $0x10,%esp 112647: 8b 43 08 mov 0x8(%ebx),%eax 11264a: 85 c0 test %eax,%eax 11264c: 74 0e je 11265c <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 11264e: 56 push %esi 11264f: 9d popf 112650: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 112652: 8d 65 f8 lea -0x8(%ebp),%esp 112655: 5b pop %ebx 112656: 5e pop %esi 112657: c9 leave 112658: c3 ret 112659: 8d 76 00 lea 0x0(%esi),%esi Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11265c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 112663: 8b 45 14 mov 0x14(%ebp),%eax 112666: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 112669: 8b 45 10 mov 0x10(%ebp),%eax 11266c: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 11266f: 8b 45 18 mov 0x18(%ebp),%eax 112672: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 112675: 8b 45 0c mov 0xc(%ebp),%eax 112678: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11267b: 83 ec 08 sub $0x8,%esp 11267e: 53 push %ebx 11267f: 68 18 b6 12 00 push $0x12b618 112684: e8 eb cf ff ff call 10f674 <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 112689: 56 push %esi 11268a: 9d popf 11268b: b0 01 mov $0x1,%al return true; 11268d: 83 c4 10 add $0x10,%esp } 112690: 8d 65 f8 lea -0x8(%ebp),%esp 112693: 5b pop %ebx 112694: 5e pop %esi 112695: c9 leave 112696: c3 ret =============================================================================== 0010bdec <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10bdec: 55 push %ebp 10bded: 89 e5 mov %esp,%ebp 10bdef: 53 push %ebx 10bdf0: 83 ec 04 sub $0x4,%esp 10bdf3: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10bdf6: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10bdf9: 8b 53 54 mov 0x54(%ebx),%edx 10bdfc: 85 d2 test %edx,%edx 10bdfe: 75 28 jne 10be28 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10be00: 8b 43 58 mov 0x58(%ebx),%eax 10be03: 85 c0 test %eax,%eax 10be05: 75 21 jne 10be28 <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10be07: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 10be0b: 83 ec 08 sub $0x8,%esp 10be0e: ff 73 44 pushl 0x44(%ebx) 10be11: ff 73 38 pushl 0x38(%ebx) 10be14: e8 a7 63 00 00 call 1121c0 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10be19: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10be20: 83 c4 10 add $0x10,%esp } 10be23: 8b 5d fc mov -0x4(%ebp),%ebx 10be26: c9 leave 10be27: c3 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10be28: 83 ec 0c sub $0xc,%esp 10be2b: 53 push %ebx 10be2c: 68 ec bd 10 00 push $0x10bdec 10be31: ff 73 08 pushl 0x8(%ebx) 10be34: ff 73 64 pushl 0x64(%ebx) 10be37: 8d 43 10 lea 0x10(%ebx),%eax 10be3a: 50 push %eax 10be3b: e8 f0 67 00 00 call 112630 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10be40: 83 c4 20 add $0x20,%esp 10be43: 84 c0 test %al,%al 10be45: 74 dc je 10be23 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10be47: 83 ec 0c sub $0xc,%esp 10be4a: 8d 43 6c lea 0x6c(%ebx),%eax 10be4d: 50 push %eax 10be4e: e8 4d 16 00 00 call 10d4a0 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10be53: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10be57: 83 c4 10 add $0x10,%esp 10be5a: eb af jmp 10be0b <_POSIX_Timer_TSR+0x1f> =============================================================================== 001146f0 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 1146f0: 55 push %ebp 1146f1: 89 e5 mov %esp,%ebp 1146f3: 57 push %edi 1146f4: 56 push %esi 1146f5: 53 push %ebx 1146f6: 83 ec 48 sub $0x48,%esp 1146f9: 8b 75 08 mov 0x8(%ebp),%esi 1146fc: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 1146ff: 6a 01 push $0x1 114701: 0f b6 45 10 movzbl 0x10(%ebp),%eax 114705: 50 push %eax 114706: 8d 7d dc lea -0x24(%ebp),%edi 114709: 57 push %edi 11470a: 53 push %ebx 11470b: 56 push %esi 11470c: e8 6b 00 00 00 call 11477c <_POSIX_signals_Clear_signals> 114711: 83 c4 20 add $0x20,%esp 114714: 84 c0 test %al,%al 114716: 74 58 je 114770 <_POSIX_signals_Check_signal+0x80> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 114718: 8d 04 5b lea (%ebx,%ebx,2),%eax 11471b: c1 e0 02 shl $0x2,%eax 11471e: 8b 90 e8 99 12 00 mov 0x1299e8(%eax),%edx 114724: 89 55 c4 mov %edx,-0x3c(%ebp) 114727: 4a dec %edx 114728: 74 46 je 114770 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 11472a: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 114730: 8b 90 e4 99 12 00 mov 0x1299e4(%eax),%edx 114736: 09 ca or %ecx,%edx 114738: 89 96 cc 00 00 00 mov %edx,0xcc(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11473e: 83 b8 e0 99 12 00 02 cmpl $0x2,0x1299e0(%eax) 114745: 74 21 je 114768 <_POSIX_signals_Check_signal+0x78> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 114747: 83 ec 0c sub $0xc,%esp 11474a: 53 push %ebx 11474b: 89 4d d4 mov %ecx,-0x2c(%ebp) 11474e: ff 55 c4 call *-0x3c(%ebp) 114751: 83 c4 10 add $0x10,%esp 114754: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 114757: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi) 11475d: b0 01 mov $0x1,%al return true; } 11475f: 8d 65 f4 lea -0xc(%ebp),%esp 114762: 5b pop %ebx 114763: 5e pop %esi 114764: 5f pop %edi 114765: c9 leave 114766: c3 ret 114767: 90 nop /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 114768: 50 push %eax 114769: 6a 00 push $0x0 11476b: 57 push %edi 11476c: eb dc jmp 11474a <_POSIX_signals_Check_signal+0x5a> 11476e: 66 90 xchg %ax,%ax /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 114770: 31 c0 xor %eax,%eax } 114772: 8d 65 f4 lea -0xc(%ebp),%esp 114775: 5b pop %ebx 114776: 5e pop %esi 114777: 5f pop %edi 114778: c9 leave 114779: c3 ret =============================================================================== 00115048 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 115048: 55 push %ebp 115049: 89 e5 mov %esp,%ebp 11504b: 53 push %ebx 11504c: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 11504f: 9c pushf 115050: fa cli 115051: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 115052: 8d 04 49 lea (%ecx,%ecx,2),%eax 115055: c1 e0 02 shl $0x2,%eax 115058: 83 b8 e0 99 12 00 02 cmpl $0x2,0x1299e0(%eax) 11505f: 74 23 je 115084 <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 115061: 49 dec %ecx 115062: b8 fe ff ff ff mov $0xfffffffe,%eax 115067: d3 c0 rol %cl,%eax 115069: 23 05 e8 9b 12 00 and 0x129be8,%eax 11506f: a3 e8 9b 12 00 mov %eax,0x129be8 if ( !_POSIX_signals_Pending ) 115074: 85 c0 test %eax,%eax 115076: 75 06 jne 11507e <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 115078: ff 0d 9c 94 12 00 decl 0x12949c } _ISR_Enable( level ); 11507e: 52 push %edx 11507f: 9d popf } 115080: 5b pop %ebx 115081: c9 leave 115082: c3 ret 115083: 90 nop */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 115084: 8d 98 04 9c 12 00 lea 0x129c04(%eax),%ebx 11508a: 39 98 00 9c 12 00 cmp %ebx,0x129c00(%eax) 115090: 75 ec jne 11507e <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN 115092: eb cd jmp 115061 <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 0011477c <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 11477c: 55 push %ebp 11477d: 89 e5 mov %esp,%ebp 11477f: 57 push %edi 114780: 56 push %esi 114781: 53 push %ebx 114782: 83 ec 1c sub $0x1c,%esp 114785: 8b 5d 0c mov 0xc(%ebp),%ebx 114788: 0f b6 7d 14 movzbl 0x14(%ebp),%edi 11478c: 8d 4b ff lea -0x1(%ebx),%ecx 11478f: b8 01 00 00 00 mov $0x1,%eax 114794: d3 e0 shl %cl,%eax /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 114796: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 11479a: 75 3c jne 1147d8 <_POSIX_signals_Clear_signals+0x5c> 11479c: b9 ff ff ff ff mov $0xffffffff,%ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 1147a1: 9c pushf 1147a2: fa cli 1147a3: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 1147a6: 89 fa mov %edi,%edx 1147a8: 84 d2 test %dl,%dl 1147aa: 74 3c je 1147e8 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 1147ac: 23 05 e8 9b 12 00 and 0x129be8,%eax 1147b2: 85 c8 test %ecx,%eax 1147b4: 74 5e je 114814 <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1147b6: 8d 14 1b lea (%ebx,%ebx,1),%edx 1147b9: 8d 04 1a lea (%edx,%ebx,1),%eax 1147bc: 83 3c 85 e0 99 12 00 cmpl $0x2,0x1299e0(,%eax,4) 1147c3: 02 1147c4: 74 52 je 114818 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1147c6: 83 ec 0c sub $0xc,%esp 1147c9: 53 push %ebx 1147ca: e8 79 08 00 00 call 115048 <_POSIX_signals_Clear_process_signals> 1147cf: b0 01 mov $0x1,%al 1147d1: 83 c4 10 add $0x10,%esp 1147d4: eb 2f jmp 114805 <_POSIX_signals_Clear_signals+0x89> 1147d6: 66 90 xchg %ax,%ax /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 1147d8: 8b 55 08 mov 0x8(%ebp),%edx 1147db: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 1147e1: f7 d1 not %ecx 1147e3: eb bc jmp 1147a1 <_POSIX_signals_Clear_signals+0x25> 1147e5: 8d 76 00 lea 0x0(%esi),%esi } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 1147e8: 8b 55 08 mov 0x8(%ebp),%edx 1147eb: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx 1147f1: 89 c6 mov %eax,%esi 1147f3: 21 de and %ebx,%esi 1147f5: 85 ce test %ecx,%esi 1147f7: 74 1b je 114814 <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 1147f9: f7 d0 not %eax 1147fb: 21 d8 and %ebx,%eax 1147fd: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) 114803: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 114805: ff 75 e4 pushl -0x1c(%ebp) 114808: 9d popf return do_callout; } 114809: 8d 65 f4 lea -0xc(%ebp),%esp 11480c: 5b pop %ebx 11480d: 5e pop %esi 11480e: 5f pop %edi 11480f: c9 leave 114810: c3 ret 114811: 8d 76 00 lea 0x0(%esi),%esi _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 114814: 31 c0 xor %eax,%eax 114816: eb ed jmp 114805 <_POSIX_signals_Clear_signals+0x89> _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 114818: 89 c2 mov %eax,%edx 11481a: c1 e2 02 shl $0x2,%edx 11481d: 8d 8a 00 9c 12 00 lea 0x129c00(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114823: 8b 82 00 9c 12 00 mov 0x129c00(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114829: 8d 71 04 lea 0x4(%ecx),%esi 11482c: 39 f0 cmp %esi,%eax 11482e: 74 48 je 114878 <_POSIX_signals_Clear_signals+0xfc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114830: 8b 30 mov (%eax),%esi the_chain->first = new_first; 114832: 89 b2 00 9c 12 00 mov %esi,0x129c00(%edx) new_first->previous = _Chain_Head(the_chain); 114838: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 11483b: 83 ec 0c sub $0xc,%esp 11483e: 53 push %ebx 11483f: 89 45 e0 mov %eax,-0x20(%ebp) 114842: e8 01 08 00 00 call 115048 <_POSIX_signals_Clear_process_signals> * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 114847: 8b 45 e0 mov -0x20(%ebp),%eax 11484a: 8d 70 08 lea 0x8(%eax),%esi 11484d: b9 03 00 00 00 mov $0x3,%ecx 114852: 8b 7d 10 mov 0x10(%ebp),%edi 114855: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 114857: c7 00 64 9b 12 00 movl $0x129b64,(%eax) old_last_node = the_chain->last; 11485d: 8b 15 68 9b 12 00 mov 0x129b68,%edx the_chain->last = the_node; 114863: a3 68 9b 12 00 mov %eax,0x129b68 old_last_node->next = the_node; 114868: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11486a: 89 50 04 mov %edx,0x4(%eax) 11486d: 83 c4 10 add $0x10,%esp 114870: e9 51 ff ff ff jmp 1147c6 <_POSIX_signals_Clear_signals+0x4a> 114875: 8d 76 00 lea 0x0(%esi),%esi if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 114878: 83 ec 0c sub $0xc,%esp 11487b: 53 push %ebx 11487c: e8 c7 07 00 00 call 115048 <_POSIX_signals_Clear_process_signals> 114881: 83 c4 10 add $0x10,%esp 114884: e9 3d ff ff ff jmp 1147c6 <_POSIX_signals_Clear_signals+0x4a> =============================================================================== 0010c74c <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10c74c: 55 push %ebp 10c74d: 89 e5 mov %esp,%ebp 10c74f: 56 push %esi 10c750: 53 push %ebx 10c751: 8b 55 08 mov 0x8(%ebp),%edx 10c754: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c759: bb 01 00 00 00 mov $0x1,%ebx 10c75e: 8d 48 ff lea -0x1(%eax),%ecx 10c761: 89 de mov %ebx,%esi 10c763: d3 e6 shl %cl,%esi 10c765: 85 d6 test %edx,%esi 10c767: 75 20 jne 10c789 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c769: 40 inc %eax 10c76a: 83 f8 20 cmp $0x20,%eax 10c76d: 75 ef jne 10c75e <_POSIX_signals_Get_highest+0x12> 10c76f: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c771: bb 01 00 00 00 mov $0x1,%ebx 10c776: eb 06 jmp 10c77e <_POSIX_signals_Get_highest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c778: 40 inc %eax 10c779: 83 f8 1b cmp $0x1b,%eax 10c77c: 74 0b je 10c789 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN if ( set & signo_to_mask( signo ) ) { 10c77e: 8d 48 ff lea -0x1(%eax),%ecx 10c781: 89 de mov %ebx,%esi 10c783: d3 e6 shl %cl,%esi 10c785: 85 d6 test %edx,%esi 10c787: 74 ef je 10c778 <_POSIX_signals_Get_highest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10c789: 5b pop %ebx 10c78a: 5e pop %esi 10c78b: c9 leave 10c78c: c3 ret =============================================================================== 001115c8 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 1115c8: 55 push %ebp 1115c9: 89 e5 mov %esp,%ebp 1115cb: 57 push %edi 1115cc: 56 push %esi 1115cd: 53 push %ebx 1115ce: 83 ec 0c sub $0xc,%esp POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1115d1: 8b 45 08 mov 0x8(%ebp),%eax 1115d4: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 1115da: a1 b8 94 12 00 mov 0x1294b8,%eax 1115df: 8b 78 34 mov 0x34(%eax),%edi /* * api may be NULL in case of a thread close in progress */ if ( !api ) 1115e2: 85 f6 test %esi,%esi 1115e4: 74 71 je 111657 <_POSIX_signals_Post_switch_extension+0x8f><== NEVER TAKEN 1115e6: 66 90 xchg %ax,%ax * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 1115e8: 9c pushf 1115e9: fa cli 1115ea: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 1115eb: 8b 15 e8 9b 12 00 mov 0x129be8,%edx 1115f1: 0b 96 d0 00 00 00 or 0xd0(%esi),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 1115f7: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 1115fd: f7 d0 not %eax 1115ff: 85 c2 test %eax,%edx 111601: 74 4a je 11164d <_POSIX_signals_Post_switch_extension+0x85> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 111603: 51 push %ecx 111604: 9d popf 111605: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 11160a: 52 push %edx 11160b: 6a 00 push $0x0 11160d: 53 push %ebx 11160e: 56 push %esi 11160f: e8 dc 30 00 00 call 1146f0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 111614: 83 c4 0c add $0xc,%esp 111617: 6a 01 push $0x1 111619: 53 push %ebx 11161a: 56 push %esi 11161b: e8 d0 30 00 00 call 1146f0 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 111620: 43 inc %ebx 111621: 83 c4 10 add $0x10,%esp 111624: 83 fb 20 cmp $0x20,%ebx 111627: 75 e1 jne 11160a <_POSIX_signals_Post_switch_extension+0x42> 111629: b3 01 mov $0x1,%bl 11162b: 90 nop _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 11162c: 50 push %eax 11162d: 6a 00 push $0x0 11162f: 53 push %ebx 111630: 56 push %esi 111631: e8 ba 30 00 00 call 1146f0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 111636: 83 c4 0c add $0xc,%esp 111639: 6a 01 push $0x1 11163b: 53 push %ebx 11163c: 56 push %esi 11163d: e8 ae 30 00 00 call 1146f0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 111642: 43 inc %ebx 111643: 83 c4 10 add $0x10,%esp 111646: 83 fb 1b cmp $0x1b,%ebx 111649: 75 e1 jne 11162c <_POSIX_signals_Post_switch_extension+0x64> 11164b: eb 9b jmp 1115e8 <_POSIX_signals_Post_switch_extension+0x20> */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 11164d: 51 push %ecx 11164e: 9d popf _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 11164f: a1 b8 94 12 00 mov 0x1294b8,%eax 111654: 89 78 34 mov %edi,0x34(%eax) } 111657: 8d 65 f4 lea -0xc(%ebp),%esp 11165a: 5b pop %ebx 11165b: 5e pop %esi 11165c: 5f pop %edi 11165d: c9 leave 11165e: c3 ret =============================================================================== 001148b0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1148b0: 55 push %ebp 1148b1: 89 e5 mov %esp,%ebp 1148b3: 57 push %edi 1148b4: 56 push %esi 1148b5: 53 push %ebx 1148b6: 83 ec 0c sub $0xc,%esp 1148b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1148bc: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1148bf: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1148c5: 8d 4a ff lea -0x1(%edx),%ecx 1148c8: b8 01 00 00 00 mov $0x1,%eax 1148cd: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1148cf: 8b 4b 10 mov 0x10(%ebx),%ecx 1148d2: 89 cf mov %ecx,%edi 1148d4: 81 e7 00 80 00 10 and $0x10008000,%edi 1148da: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1148e0: 74 76 je 114958 <_POSIX_signals_Unblock_thread+0xa8> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1148e2: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 1148e8: f7 d2 not %edx 1148ea: 85 d0 test %edx,%eax 1148ec: 74 5e je 11494c <_POSIX_signals_Unblock_thread+0x9c> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 1148ee: c6 43 74 01 movb $0x1,0x74(%ebx) if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 1148f2: f7 c1 00 00 00 10 test $0x10000000,%ecx 1148f8: 74 3a je 114934 <_POSIX_signals_Unblock_thread+0x84> the_thread->Wait.return_code = EINTR; 1148fa: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 114901: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 114907: 0f 85 93 00 00 00 jne 1149a0 <_POSIX_signals_Unblock_thread+0xf0> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ){ 11490d: 83 e1 08 and $0x8,%ecx 114910: 74 3a je 11494c <_POSIX_signals_Unblock_thread+0x9c><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 114912: 83 ec 0c sub $0xc,%esp 114915: 8d 43 48 lea 0x48(%ebx),%eax 114918: 50 push %eax 114919: e8 ea a3 ff ff call 10ed08 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11491e: 58 pop %eax 11491f: 5a pop %edx 114920: 68 f8 ff 03 10 push $0x1003fff8 114925: 53 push %ebx 114926: e8 99 8f ff ff call 10d8c4 <_Thread_Clear_state> 11492b: 31 c0 xor %eax,%eax 11492d: 83 c4 10 add $0x10,%esp 114930: eb 1c jmp 11494e <_POSIX_signals_Unblock_thread+0x9e> 114932: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 114934: 85 c9 test %ecx,%ecx 114936: 75 14 jne 11494c <_POSIX_signals_Unblock_thread+0x9c><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 114938: a1 94 94 12 00 mov 0x129494,%eax 11493d: 85 c0 test %eax,%eax 11493f: 74 0b je 11494c <_POSIX_signals_Unblock_thread+0x9c> 114941: 3b 1d b8 94 12 00 cmp 0x1294b8,%ebx 114947: 74 7b je 1149c4 <_POSIX_signals_Unblock_thread+0x114><== ALWAYS TAKEN 114949: 8d 76 00 lea 0x0(%esi),%esi _ISR_Signals_to_thread_executing = true; 11494c: 31 c0 xor %eax,%eax } } return false; } 11494e: 8d 65 f4 lea -0xc(%ebp),%esp 114951: 5b pop %ebx 114952: 5e pop %esi 114953: 5f pop %edi 114954: c9 leave 114955: c3 ret 114956: 66 90 xchg %ax,%ax * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 114958: 85 43 30 test %eax,0x30(%ebx) 11495b: 74 33 je 114990 <_POSIX_signals_Unblock_thread+0xe0> the_thread->Wait.return_code = EINTR; 11495d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 114964: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 114967: 8b 4d 10 mov 0x10(%ebp),%ecx 11496a: 85 c9 test %ecx,%ecx 11496c: 74 42 je 1149b0 <_POSIX_signals_Unblock_thread+0x100> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 11496e: b9 03 00 00 00 mov $0x3,%ecx 114973: 89 c7 mov %eax,%edi 114975: 8b 75 10 mov 0x10(%ebp),%esi 114978: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11497a: 83 ec 0c sub $0xc,%esp 11497d: 53 push %ebx 11497e: e8 29 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy> 114983: b0 01 mov $0x1,%al return true; 114985: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 114988: 8d 65 f4 lea -0xc(%ebp),%esp 11498b: 5b pop %ebx 11498c: 5e pop %esi 11498d: 5f pop %edi 11498e: c9 leave 11498f: c3 ret * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 114990: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 114996: f7 d1 not %ecx 114998: 85 c8 test %ecx,%eax 11499a: 75 c1 jne 11495d <_POSIX_signals_Unblock_thread+0xad> 11499c: eb ae jmp 11494c <_POSIX_signals_Unblock_thread+0x9c> 11499e: 66 90 xchg %ax,%ax /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 1149a0: 83 ec 0c sub $0xc,%esp 1149a3: 53 push %ebx 1149a4: e8 03 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy> 1149a9: 31 c0 xor %eax,%eax 1149ab: 83 c4 10 add $0x10,%esp 1149ae: eb 9e jmp 11494e <_POSIX_signals_Unblock_thread+0x9e> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 1149b0: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 1149b2: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 1149b9: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 1149c0: eb b8 jmp 11497a <_POSIX_signals_Unblock_thread+0xca> 1149c2: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 1149c4: c6 05 68 95 12 00 01 movb $0x1,0x129568 1149cb: 31 c0 xor %eax,%eax 1149cd: e9 7c ff ff ff jmp 11494e <_POSIX_signals_Unblock_thread+0x9e> =============================================================================== 00100220 <_Partition_Manager_initialization>: #include #include #include void _Partition_Manager_initialization(void) { 100220: 55 push %ebp 100221: 89 e5 mov %esp,%ebp } 100223: c9 leave 100224: c3 ret =============================================================================== 00131fd0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 131fd0: 55 push %ebp 131fd1: 89 e5 mov %esp,%ebp 131fd3: 56 push %esi 131fd4: 53 push %ebx 131fd5: 8b 5d 08 mov 0x8(%ebp),%ebx 131fd8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 131fdb: 85 db test %ebx,%ebx 131fdd: 74 35 je 132014 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 131fdf: 85 f6 test %esi,%esi 131fe1: 74 31 je 132014 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 131fe3: 83 ec 0c sub $0xc,%esp 131fe6: ff 35 10 50 17 00 pushl 0x175010 131fec: e8 f3 19 fe ff call 1139e4 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 131ff1: 5a pop %edx 131ff2: 59 pop %ecx 131ff3: 56 push %esi 131ff4: 53 push %ebx 131ff5: e8 0a 31 01 00 call 145104 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 131ffa: 58 pop %eax 131ffb: ff 35 10 50 17 00 pushl 0x175010 132001: e8 26 1a fe ff call 113a2c <_API_Mutex_Unlock> 132006: b0 01 mov $0x1,%al return true; 132008: 83 c4 10 add $0x10,%esp } 13200b: 8d 65 f8 lea -0x8(%ebp),%esp 13200e: 5b pop %ebx 13200f: 5e pop %esi 132010: c9 leave 132011: c3 ret 132012: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 132014: 31 c0 xor %eax,%eax } 132016: 8d 65 f8 lea -0x8(%ebp),%esp 132019: 5b pop %ebx 13201a: 5e pop %esi 13201b: c9 leave 13201c: c3 ret =============================================================================== 00110f28 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110f28: 55 push %ebp 110f29: 89 e5 mov %esp,%ebp 110f2b: 56 push %esi 110f2c: 53 push %ebx 110f2d: 83 ec 10 sub $0x10,%esp 110f30: 8b 5d 08 mov 0x8(%ebp),%ebx 110f33: 8b 75 0c mov 0xc(%ebp),%esi 110f36: 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 ) { 110f39: 8b 15 38 01 13 00 mov 0x130138,%edx 110f3f: 85 d2 test %edx,%edx 110f41: 74 19 je 110f5c <_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 ); 110f43: 0f b6 c0 movzbl %al,%eax 110f46: 89 45 10 mov %eax,0x10(%ebp) 110f49: 89 75 0c mov %esi,0xc(%ebp) 110f4c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110f4f: 8d 65 f8 lea -0x8(%ebp),%esp 110f52: 5b pop %ebx 110f53: 5e pop %esi 110f54: 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 ); 110f55: e9 f2 f1 ff ff jmp 11014c <_Heap_Walk> 110f5a: 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(); 110f5c: 83 ec 0c sub $0xc,%esp 110f5f: ff 35 f0 01 13 00 pushl 0x1301f0 110f65: 88 45 f4 mov %al,-0xc(%ebp) 110f68: e8 e7 e3 ff ff call 10f354 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110f6d: 83 c4 0c add $0xc,%esp 110f70: 8a 45 f4 mov -0xc(%ebp),%al 110f73: 0f b6 c0 movzbl %al,%eax 110f76: 50 push %eax 110f77: 56 push %esi 110f78: 53 push %ebx 110f79: e8 ce f1 ff ff call 11014c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110f7e: 5a pop %edx 110f7f: ff 35 f0 01 13 00 pushl 0x1301f0 110f85: 88 45 f4 mov %al,-0xc(%ebp) 110f88: e8 0f e4 ff ff call 10f39c <_API_Mutex_Unlock> 110f8d: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110f90: 8a 45 f4 mov -0xc(%ebp),%al 110f93: 8d 65 f8 lea -0x8(%ebp),%esp 110f96: 5b pop %ebx 110f97: 5e pop %esi 110f98: c9 leave 110f99: c3 ret =============================================================================== 00111ce4 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 111ce4: 55 push %ebp 111ce5: 89 e5 mov %esp,%ebp 111ce7: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 111cea: a1 60 52 12 00 mov 0x125260,%eax 111cef: 85 c0 test %eax,%eax 111cf1: 74 05 je 111cf8 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 111cf3: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 111cf4: ff e0 jmp *%eax 111cf6: 66 90 xchg %ax,%ax } 111cf8: c9 leave 111cf9: c3 ret =============================================================================== 0010c0b0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c0b0: 55 push %ebp 10c0b1: 89 e5 mov %esp,%ebp 10c0b3: 57 push %edi 10c0b4: 56 push %esi 10c0b5: 53 push %ebx 10c0b6: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10c0b9: 8b 1d 0c 52 12 00 mov 0x12520c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c0bf: 8b 3d 08 52 12 00 mov 0x125208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c0c5: 85 db test %ebx,%ebx 10c0c7: 74 46 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0c9: 85 ff test %edi,%edi 10c0cb: 74 42 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c0cd: 31 f6 xor %esi,%esi 10c0cf: 90 nop return_value = rtems_task_create( 10c0d0: 83 ec 08 sub $0x8,%esp 10c0d3: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0d6: 50 push %eax 10c0d7: ff 73 0c pushl 0xc(%ebx) 10c0da: ff 73 14 pushl 0x14(%ebx) 10c0dd: ff 73 04 pushl 0x4(%ebx) 10c0e0: ff 73 08 pushl 0x8(%ebx) 10c0e3: ff 33 pushl (%ebx) 10c0e5: e8 96 fd ff ff call 10be80 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ea: 83 c4 20 add $0x20,%esp 10c0ed: 85 c0 test %eax,%eax 10c0ef: 75 26 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0f1: 51 push %ecx 10c0f2: ff 73 18 pushl 0x18(%ebx) 10c0f5: ff 73 10 pushl 0x10(%ebx) 10c0f8: ff 75 e4 pushl -0x1c(%ebp) 10c0fb: e8 24 00 00 00 call 10c124 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c100: 83 c4 10 add $0x10,%esp 10c103: 85 c0 test %eax,%eax 10c105: 75 10 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c107: 46 inc %esi 10c108: 83 c3 1c add $0x1c,%ebx 10c10b: 39 f7 cmp %esi,%edi 10c10d: 77 c1 ja 10c0d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10c10f: 8d 65 f4 lea -0xc(%ebp),%esp 10c112: 5b pop %ebx 10c113: 5e pop %esi 10c114: 5f pop %edi 10c115: c9 leave 10c116: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10c117: 52 push %edx 10c118: 50 push %eax 10c119: 6a 01 push $0x1 10c11b: 6a 01 push $0x1 10c11d: e8 8e 0d 00 00 call 10ceb0 <_Internal_error_Occurred> =============================================================================== 00111d40 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 111d40: 55 push %ebp 111d41: 89 e5 mov %esp,%ebp 111d43: 57 push %edi 111d44: 56 push %esi 111d45: 53 push %ebx 111d46: 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 ]; 111d49: 8b 45 08 mov 0x8(%ebp),%eax 111d4c: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 111d52: 85 db test %ebx,%ebx 111d54: 74 45 je 111d9b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 111d56: 9c pushf 111d57: fa cli 111d58: 58 pop %eax signal_set = asr->signals_posted; 111d59: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 111d5c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 111d63: 50 push %eax 111d64: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 111d65: 85 f6 test %esi,%esi 111d67: 74 32 je 111d9b <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 111d69: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111d6c: 50 push %eax 111d6d: 8d 7d e4 lea -0x1c(%ebp),%edi 111d70: 57 push %edi 111d71: 68 ff ff 00 00 push $0xffff 111d76: ff 73 10 pushl 0x10(%ebx) 111d79: e8 42 2e 00 00 call 114bc0 (*asr->handler)( signal_set ); 111d7e: 89 34 24 mov %esi,(%esp) 111d81: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111d84: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111d87: 83 c4 0c add $0xc,%esp 111d8a: 57 push %edi 111d8b: 68 ff ff 00 00 push $0xffff 111d90: ff 75 e4 pushl -0x1c(%ebp) 111d93: e8 28 2e 00 00 call 114bc0 111d98: 83 c4 10 add $0x10,%esp } 111d9b: 8d 65 f4 lea -0xc(%ebp),%esp 111d9e: 5b pop %ebx 111d9f: 5e pop %esi 111da0: 5f pop %edi 111da1: c9 leave 111da2: c3 ret =============================================================================== 00111c9c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 111c9c: 55 push %ebp 111c9d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 111c9f: 8b 45 08 mov 0x8(%ebp),%eax 111ca2: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 111ca8: 85 c0 test %eax,%eax 111caa: 74 13 je 111cbf <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 111cac: 8b 50 04 mov 0x4(%eax),%edx 111caf: 8b 0a mov (%edx),%ecx 111cb1: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111cb4: 8b 48 08 mov 0x8(%eax),%ecx 111cb7: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111cb9: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 111cbb: 85 c0 test %eax,%eax 111cbd: 75 ed jne 111cac <_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; 111cbf: 8b 45 0c mov 0xc(%ebp),%eax 111cc2: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 111cc8: 85 c0 test %eax,%eax 111cca: 74 13 je 111cdf <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 111ccc: 8b 50 04 mov 0x4(%eax),%edx 111ccf: 8b 0a mov (%edx),%ecx 111cd1: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 111cd4: 8b 48 0c mov 0xc(%eax),%ecx 111cd7: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111cd9: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 111cdb: 85 c0 test %eax,%eax 111cdd: 75 ed jne 111ccc <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 111cdf: c9 leave 111ce0: c3 ret =============================================================================== 00144b2c <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 144b2c: 55 push %ebp 144b2d: 89 e5 mov %esp,%ebp 144b2f: 57 push %edi 144b30: 56 push %esi 144b31: 53 push %ebx 144b32: 83 ec 28 sub $0x28,%esp 144b35: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 144b38: 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 ); 144b3b: 8d 7d e0 lea -0x20(%ebp),%edi 144b3e: 57 push %edi 144b3f: e8 ac ce fe ff call 1319f0 <_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; 144b44: 8b 45 e0 mov -0x20(%ebp),%eax 144b47: 8b 55 e4 mov -0x1c(%ebp),%edx 144b4a: 89 43 4c mov %eax,0x4c(%ebx) 144b4d: 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; 144b50: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 144b56: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 144b5c: 89 43 44 mov %eax,0x44(%ebx) 144b5f: 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) { 144b62: 83 c4 10 add $0x10,%esp 144b65: 3b 35 18 50 17 00 cmp 0x175018,%esi 144b6b: 74 0b je 144b78 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 144b6d: 8d 65 f4 lea -0xc(%ebp),%esp 144b70: 5b pop %ebx 144b71: 5e pop %esi 144b72: 5f pop %edi 144b73: c9 leave 144b74: c3 ret 144b75: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 144b78: 51 push %ecx 144b79: 8d 75 d8 lea -0x28(%ebp),%esi 144b7c: 56 push %esi 144b7d: 57 push %edi 144b7e: 68 20 50 17 00 push $0x175020 144b83: e8 c8 16 fd ff call 116250 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 144b88: 58 pop %eax 144b89: 5a pop %edx 144b8a: 56 push %esi 144b8b: 83 c3 44 add $0x44,%ebx 144b8e: 53 push %ebx 144b8f: e8 80 16 fd ff call 116214 <_Timespec_Add_to> 144b94: 83 c4 10 add $0x10,%esp } #endif } 144b97: 8d 65 f4 lea -0xc(%ebp),%esp 144b9a: 5b pop %ebx 144b9b: 5e pop %esi 144b9c: 5f pop %edi 144b9d: c9 leave 144b9e: c3 ret =============================================================================== 00100240 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { 100240: 55 push %ebp 100241: 89 e5 mov %esp,%ebp } 100243: c9 leave 100244: c3 ret =============================================================================== 00144ed8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 144ed8: 55 push %ebp 144ed9: 89 e5 mov %esp,%ebp 144edb: 83 ec 2c sub $0x2c,%esp 144ede: 8d 45 f4 lea -0xc(%ebp),%eax 144ee1: 50 push %eax 144ee2: ff 75 08 pushl 0x8(%ebp) 144ee5: 68 60 5b 17 00 push $0x175b60 144eea: e8 6d fd fc ff call 114c5c <_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 ) { 144eef: 83 c4 10 add $0x10,%esp 144ef2: 8b 55 f4 mov -0xc(%ebp),%edx 144ef5: 85 d2 test %edx,%edx 144ef7: 75 29 jne 144f22 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 144ef9: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 144efc: f6 42 11 40 testb $0x40,0x11(%edx) 144f00: 74 08 je 144f0a <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 144f02: 8b 4a 20 mov 0x20(%edx),%ecx 144f05: 3b 48 08 cmp 0x8(%eax),%ecx 144f08: 74 4e je 144f58 <_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 ) { 144f0a: 83 78 38 01 cmpl $0x1,0x38(%eax) 144f0e: 74 14 je 144f24 <_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; 144f10: 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; 144f17: a1 58 4f 17 00 mov 0x174f58,%eax 144f1c: 48 dec %eax 144f1d: a3 58 4f 17 00 mov %eax,0x174f58 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 144f22: c9 leave 144f23: 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; 144f24: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 144f2b: 83 ec 0c sub $0xc,%esp 144f2e: 50 push %eax 144f2f: 89 45 e4 mov %eax,-0x1c(%ebp) 144f32: e8 f5 fb ff ff call 144b2c <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 144f37: 8b 45 e4 mov -0x1c(%ebp),%eax 144f3a: 8b 50 3c mov 0x3c(%eax),%edx 144f3d: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 144f40: 5a pop %edx 144f41: 59 pop %ecx 144f42: 83 c0 10 add $0x10,%eax 144f45: 50 push %eax 144f46: 68 38 50 17 00 push $0x175038 144f4b: e8 d0 15 fd ff call 116520 <_Watchdog_Insert> 144f50: 83 c4 10 add $0x10,%esp 144f53: eb c2 jmp 144f17 <_Rate_monotonic_Timeout+0x3f> 144f55: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 144f58: 83 ec 08 sub $0x8,%esp 144f5b: 68 f8 ff 03 10 push $0x1003fff8 144f60: 52 push %edx 144f61: 89 45 e4 mov %eax,-0x1c(%ebp) 144f64: e8 6f 02 fd ff call 1151d8 <_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 ); 144f69: 8b 45 e4 mov -0x1c(%ebp),%eax 144f6c: 89 04 24 mov %eax,(%esp) 144f6f: eb c1 jmp 144f32 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 00144c38 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 144c38: 55 push %ebp 144c39: 89 e5 mov %esp,%ebp 144c3b: 57 push %edi 144c3c: 56 push %esi 144c3d: 53 push %ebx 144c3e: 83 ec 1c sub $0x1c,%esp 144c41: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 144c44: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 144c47: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 144c4b: 0f 84 bf 00 00 00 je 144d10 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 144c51: 52 push %edx 144c52: 8d 7d e0 lea -0x20(%ebp),%edi 144c55: 57 push %edi 144c56: 8d 75 d8 lea -0x28(%ebp),%esi 144c59: 56 push %esi 144c5a: 53 push %ebx 144c5b: e8 40 ff ff ff call 144ba0 <_Rate_monotonic_Get_status> if (!valid_status) 144c60: 83 c4 10 add $0x10,%esp 144c63: 84 c0 test %al,%al 144c65: 75 09 jne 144c70 <_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 } 144c67: 8d 65 f4 lea -0xc(%ebp),%esp 144c6a: 5b pop %ebx 144c6b: 5e pop %esi 144c6c: 5f pop %edi 144c6d: c9 leave 144c6e: c3 ret 144c6f: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 144c70: 83 ec 08 sub $0x8,%esp 144c73: 57 push %edi 144c74: 8d 43 6c lea 0x6c(%ebx),%eax 144c77: 50 push %eax 144c78: e8 97 15 fd ff call 116214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 144c7d: 59 pop %ecx 144c7e: 58 pop %eax 144c7f: 8d 43 5c lea 0x5c(%ebx),%eax 144c82: 50 push %eax 144c83: 57 push %edi 144c84: e8 6b 06 00 00 call 1452f4 <_Timespec_Less_than> 144c89: 83 c4 10 add $0x10,%esp 144c8c: 84 c0 test %al,%al 144c8e: 74 0c je 144c9c <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 144c90: 8b 45 e0 mov -0x20(%ebp),%eax 144c93: 8b 55 e4 mov -0x1c(%ebp),%edx 144c96: 89 43 5c mov %eax,0x5c(%ebx) 144c99: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 144c9c: 83 ec 08 sub $0x8,%esp 144c9f: 8d 43 64 lea 0x64(%ebx),%eax 144ca2: 50 push %eax 144ca3: 57 push %edi 144ca4: e8 27 06 00 00 call 1452d0 <_Timespec_Greater_than> 144ca9: 83 c4 10 add $0x10,%esp 144cac: 84 c0 test %al,%al 144cae: 74 0c je 144cbc <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 144cb0: 8b 45 e0 mov -0x20(%ebp),%eax 144cb3: 8b 55 e4 mov -0x1c(%ebp),%edx 144cb6: 89 43 64 mov %eax,0x64(%ebx) 144cb9: 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 ); 144cbc: 83 ec 08 sub $0x8,%esp 144cbf: 56 push %esi 144cc0: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 144cc6: 50 push %eax 144cc7: e8 48 15 fd ff call 116214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 144ccc: 58 pop %eax 144ccd: 5a pop %edx 144cce: 8d 43 74 lea 0x74(%ebx),%eax 144cd1: 50 push %eax 144cd2: 56 push %esi 144cd3: e8 1c 06 00 00 call 1452f4 <_Timespec_Less_than> 144cd8: 83 c4 10 add $0x10,%esp 144cdb: 84 c0 test %al,%al 144cdd: 75 39 jne 144d18 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 144cdf: 83 ec 08 sub $0x8,%esp 144ce2: 8d 43 7c lea 0x7c(%ebx),%eax 144ce5: 50 push %eax 144ce6: 56 push %esi 144ce7: e8 e4 05 00 00 call 1452d0 <_Timespec_Greater_than> 144cec: 83 c4 10 add $0x10,%esp 144cef: 84 c0 test %al,%al 144cf1: 0f 84 70 ff ff ff je 144c67 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 144cf7: 8b 45 d8 mov -0x28(%ebp),%eax 144cfa: 8b 55 dc mov -0x24(%ebp),%edx 144cfd: 89 43 7c mov %eax,0x7c(%ebx) 144d00: 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 } 144d06: 8d 65 f4 lea -0xc(%ebp),%esp 144d09: 5b pop %ebx 144d0a: 5e pop %esi 144d0b: 5f pop %edi 144d0c: c9 leave 144d0d: c3 ret 144d0e: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 144d10: ff 43 58 incl 0x58(%ebx) 144d13: e9 39 ff ff ff jmp 144c51 <_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; 144d18: 8b 45 d8 mov -0x28(%ebp),%eax 144d1b: 8b 55 dc mov -0x24(%ebp),%edx 144d1e: 89 43 74 mov %eax,0x74(%ebx) 144d21: 89 53 78 mov %edx,0x78(%ebx) 144d24: eb b9 jmp 144cdf <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 00100228 <_Region_Manager_initialization>: #include #include #include void _Region_Manager_initialization(void) { 100228: 55 push %ebp 100229: 89 e5 mov %esp,%ebp } 10022b: c9 leave 10022c: c3 ret =============================================================================== 0010e09c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10e09c: 55 push %ebp 10e09d: 89 e5 mov %esp,%ebp 10e09f: 53 push %ebx 10e0a0: 83 ec 04 sub $0x4,%esp 10e0a3: 8b 5d 08 mov 0x8(%ebp),%ebx 10e0a6: a1 78 ce 12 00 mov 0x12ce78,%eax 10e0ab: 40 inc %eax 10e0ac: a3 78 ce 12 00 mov %eax,0x12ce78 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10e0b1: a1 0c cf 12 00 mov 0x12cf0c,%eax if ( time->tv_sec < seconds ) 10e0b6: 8b 13 mov (%ebx),%edx 10e0b8: 39 d0 cmp %edx,%eax 10e0ba: 7f 34 jg 10e0f0 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10e0bc: 51 push %ecx 10e0bd: 29 c2 sub %eax,%edx 10e0bf: 52 push %edx 10e0c0: 6a 00 push $0x0 10e0c2: 68 4c cf 12 00 push $0x12cf4c 10e0c7: e8 0c 25 00 00 call 1105d8 <_Watchdog_Adjust> 10e0cc: 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 ); 10e0cf: 8b 03 mov (%ebx),%eax 10e0d1: a3 0c cf 12 00 mov %eax,0x12cf0c 10e0d6: 8b 43 04 mov 0x4(%ebx),%eax 10e0d9: a3 10 cf 12 00 mov %eax,0x12cf10 _TOD_Is_set = true; 10e0de: c6 05 8c ce 12 00 01 movb $0x1,0x12ce8c _TOD_Activate(); _Thread_Enable_dispatch(); } 10e0e5: 8b 5d fc mov -0x4(%ebp),%ebx 10e0e8: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e0e9: e9 ca 12 00 00 jmp 10f3b8 <_Thread_Enable_dispatch> 10e0ee: 66 90 xchg %ax,%ax 10e0f0: 51 push %ecx 10e0f1: 29 d0 sub %edx,%eax 10e0f3: 50 push %eax 10e0f4: 6a 01 push $0x1 10e0f6: 68 4c cf 12 00 push $0x12cf4c 10e0fb: e8 d8 24 00 00 call 1105d8 <_Watchdog_Adjust> 10e100: 83 c4 10 add $0x10,%esp 10e103: eb ca jmp 10e0cf <_TOD_Set+0x33> =============================================================================== 0010c804 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c804: 55 push %ebp 10c805: 89 e5 mov %esp,%ebp 10c807: 56 push %esi 10c808: 53 push %ebx 10c809: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c80c: 8b 72 08 mov 0x8(%edx),%esi 10c80f: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c810: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c812: 89 c3 mov %eax,%ebx 10c814: 83 e3 03 and $0x3,%ebx 10c817: 74 67 je 10c880 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c819: 8b 4a 04 mov 0x4(%edx),%ecx 10c81c: 0f b7 8c 09 e0 55 12 movzwl 0x1255e0(%ecx,%ecx,1),%ecx 10c823: 00 10c824: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c827: 0f b7 8c 1b 14 56 12 movzwl 0x125614(%ebx,%ebx,1),%ecx 10c82e: 00 10c82f: 2d c4 07 00 00 sub $0x7c4,%eax 10c834: c1 e8 02 shr $0x2,%eax 10c837: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c83a: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c83d: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c840: 8d 04 98 lea (%eax,%ebx,4),%eax 10c843: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c845: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c847: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c84a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c84d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c850: c1 e0 02 shl $0x2,%eax 10c853: 29 c8 sub %ecx,%eax 10c855: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c858: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c85b: 8b 4a 0c mov 0xc(%edx),%ecx 10c85e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c861: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c864: c1 e1 02 shl $0x2,%ecx 10c867: 03 4a 10 add 0x10(%edx),%ecx 10c86a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c86d: 8d 14 92 lea (%edx,%edx,4),%edx 10c870: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c877: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c87a: 5b pop %ebx 10c87b: 5e pop %esi 10c87c: c9 leave 10c87d: c3 ret 10c87e: 66 90 xchg %ax,%ax time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c880: 8b 4a 04 mov 0x4(%edx),%ecx 10c883: 0f b7 8c 09 fa 55 12 movzwl 0x1255fa(%ecx,%ecx,1),%ecx 10c88a: 00 10c88b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c88e: eb 97 jmp 10c827 <_TOD_To_seconds+0x23> =============================================================================== 0010c890 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c890: 55 push %ebp 10c891: 89 e5 mov %esp,%ebp 10c893: 53 push %ebx 10c894: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10c897: 8b 1d 4c 88 12 00 mov 0x12884c,%ebx if ((!the_tod) || 10c89d: 85 c9 test %ecx,%ecx 10c89f: 74 53 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8a1: b8 40 42 0f 00 mov $0xf4240,%eax 10c8a6: 31 d2 xor %edx,%edx 10c8a8: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c8aa: 3b 41 18 cmp 0x18(%ecx),%eax 10c8ad: 76 45 jbe 10c8f4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c8af: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c8b3: 77 3f ja 10c8f4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c8b5: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c8b9: 77 39 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c8bb: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c8bf: 77 33 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c8c1: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8c4: 85 c0 test %eax,%eax 10c8c6: 74 2c je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8c8: 83 f8 0c cmp $0xc,%eax 10c8cb: 77 27 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c8cd: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8cf: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c8d5: 76 1d jbe 10c8f4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c8d7: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8da: 85 c9 test %ecx,%ecx 10c8dc: 74 16 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c8de: 83 e2 03 and $0x3,%edx 10c8e1: 75 16 jne 10c8f9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8e3: 8b 04 85 54 56 12 00 mov 0x125654(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8ea: 39 c8 cmp %ecx,%eax 10c8ec: 0f 93 c0 setae %al 10c8ef: eb 05 jmp 10c8f6 <_TOD_Validate+0x66> 10c8f1: 8d 76 00 lea 0x0(%esi),%esi 10c8f4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8f6: 5b pop %ebx 10c8f7: c9 leave 10c8f8: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c8f9: 8b 04 85 20 56 12 00 mov 0x125620(,%eax,4),%eax 10c900: eb e8 jmp 10c8ea <_TOD_Validate+0x5a> =============================================================================== 0010d784 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d784: 55 push %ebp 10d785: 89 e5 mov %esp,%ebp 10d787: 57 push %edi 10d788: 56 push %esi 10d789: 53 push %ebx 10d78a: 83 ec 28 sub $0x28,%esp 10d78d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d790: 8b 75 0c mov 0xc(%ebp),%esi 10d793: 8a 45 10 mov 0x10(%ebp),%al 10d796: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d799: 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 ); 10d79c: 53 push %ebx 10d79d: e8 92 0e 00 00 call 10e634 <_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 ) 10d7a2: 83 c4 10 add $0x10,%esp 10d7a5: 39 73 14 cmp %esi,0x14(%ebx) 10d7a8: 74 0d je 10d7b7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d7aa: 83 ec 08 sub $0x8,%esp 10d7ad: 56 push %esi 10d7ae: 53 push %ebx 10d7af: e8 38 0d 00 00 call 10e4ec <_Thread_Set_priority> 10d7b4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d7b7: 9c pushf 10d7b8: fa cli 10d7b9: 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; 10d7ba: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d7bd: 83 f8 04 cmp $0x4,%eax 10d7c0: 74 26 je 10d7e8 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d7c2: 83 e7 04 and $0x4,%edi 10d7c5: 74 15 je 10d7dc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d7c7: 52 push %edx 10d7c8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d7c9: a9 e0 be 03 00 test $0x3bee0,%eax 10d7ce: 0f 85 bc 00 00 00 jne 10d890 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d7d4: 8d 65 f4 lea -0xc(%ebp),%esp 10d7d7: 5b pop %ebx 10d7d8: 5e pop %esi 10d7d9: 5f pop %edi 10d7da: c9 leave 10d7db: 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 ); 10d7dc: 89 c1 mov %eax,%ecx 10d7de: 83 e1 fb and $0xfffffffb,%ecx 10d7e1: 89 4b 10 mov %ecx,0x10(%ebx) 10d7e4: eb e1 jmp 10d7c7 <_Thread_Change_priority+0x43> 10d7e6: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d7e8: 83 e7 04 and $0x4,%edi 10d7eb: 75 45 jne 10d832 <_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 ); 10d7ed: 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; 10d7f4: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d7fa: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d801: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d804: 66 a1 ac 94 12 00 mov 0x1294ac,%ax 10d80a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d810: 66 a3 ac 94 12 00 mov %ax,0x1294ac _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d816: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d81a: 0f 84 88 00 00 00 je 10d8a8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d820: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d826: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d829: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d82b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d82d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d82f: 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 ); 10d832: 52 push %edx 10d833: 9d popf 10d834: 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 ); 10d835: 66 8b 1d ac 94 12 00 mov 0x1294ac,%bx 10d83c: 31 c0 xor %eax,%eax 10d83e: 89 c1 mov %eax,%ecx 10d840: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d844: 0f b7 c9 movzwl %cx,%ecx 10d847: 66 8b 9c 09 40 95 12 mov 0x129540(%ecx,%ecx,1),%bx 10d84e: 00 10d84f: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d853: c1 e1 04 shl $0x4,%ecx 10d856: 0f b7 c0 movzwl %ax,%eax 10d859: 8d 04 01 lea (%ecx,%eax,1),%eax 10d85c: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d85f: a1 c0 93 12 00 mov 0x1293c0,%eax 10d864: 8b 04 88 mov (%eax,%ecx,4),%eax 10d867: a3 88 94 12 00 mov %eax,0x129488 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d86c: 8b 0d b8 94 12 00 mov 0x1294b8,%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() && 10d872: 39 c8 cmp %ecx,%eax 10d874: 74 0d je 10d883 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d876: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d87a: 74 07 je 10d883 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d87c: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 _ISR_Enable( level ); 10d883: 52 push %edx 10d884: 9d popf } 10d885: 8d 65 f4 lea -0xc(%ebp),%esp 10d888: 5b pop %ebx 10d889: 5e pop %esi 10d88a: 5f pop %edi 10d88b: c9 leave 10d88c: c3 ret 10d88d: 8d 76 00 lea 0x0(%esi),%esi /* 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 ); 10d890: 89 5d 0c mov %ebx,0xc(%ebp) 10d893: 8b 43 44 mov 0x44(%ebx),%eax 10d896: 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 ); } 10d899: 8d 65 f4 lea -0xc(%ebp),%esp 10d89c: 5b pop %ebx 10d89d: 5e pop %esi 10d89e: 5f pop %edi 10d89f: 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 ); 10d8a0: e9 af 0b 00 00 jmp 10e454 <_Thread_queue_Requeue> 10d8a5: 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 ); 10d8a8: 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); 10d8ae: 8d 48 04 lea 0x4(%eax),%ecx 10d8b1: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d8b3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d8b6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d8b9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d8bb: 89 4b 04 mov %ecx,0x4(%ebx) 10d8be: e9 6f ff ff ff jmp 10d832 <_Thread_Change_priority+0xae> =============================================================================== 0010d8c4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d8c4: 55 push %ebp 10d8c5: 89 e5 mov %esp,%ebp 10d8c7: 53 push %ebx 10d8c8: 8b 45 08 mov 0x8(%ebp),%eax 10d8cb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d8ce: 9c pushf 10d8cf: fa cli 10d8d0: 5b pop %ebx current_state = the_thread->current_state; 10d8d1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d8d4: 85 ca test %ecx,%edx 10d8d6: 74 70 je 10d948 <_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); 10d8d8: f7 d2 not %edx 10d8da: 21 ca and %ecx,%edx current_state = 10d8dc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d8df: 85 d2 test %edx,%edx 10d8e1: 75 65 jne 10d948 <_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; 10d8e3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d8e9: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d8f0: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d8f3: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx 10d8fa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d900: 66 89 15 ac 94 12 00 mov %dx,0x1294ac _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d907: 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); 10d90d: 8d 4a 04 lea 0x4(%edx),%ecx 10d910: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d912: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d915: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d918: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d91a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d91d: 53 push %ebx 10d91e: 9d popf 10d91f: 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 ) { 10d920: 8b 50 14 mov 0x14(%eax),%edx 10d923: 8b 0d 88 94 12 00 mov 0x129488,%ecx 10d929: 3b 51 14 cmp 0x14(%ecx),%edx 10d92c: 73 1a jae 10d948 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d92e: a3 88 94 12 00 mov %eax,0x129488 if ( _Thread_Executing->is_preemptible || 10d933: a1 b8 94 12 00 mov 0x1294b8,%eax 10d938: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d93c: 74 12 je 10d950 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d93e: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 10d945: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d948: 53 push %ebx 10d949: 9d popf } 10d94a: 5b pop %ebx 10d94b: c9 leave 10d94c: c3 ret 10d94d: 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 || 10d950: 85 d2 test %edx,%edx 10d952: 74 ea je 10d93e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d954: eb f2 jmp 10d948 <_Thread_Clear_state+0x84> =============================================================================== 0010d958 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d958: 55 push %ebp 10d959: 89 e5 mov %esp,%ebp 10d95b: 56 push %esi 10d95c: 53 push %ebx 10d95d: 8b 75 08 mov 0x8(%ebp),%esi 10d960: 8b 5d 0c mov 0xc(%ebp),%ebx 10d963: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d967: 8b 46 1c mov 0x1c(%esi),%eax 10d96a: 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; 10d971: a1 f8 93 12 00 mov 0x1293f8,%eax 10d976: 48 dec %eax 10d977: a3 f8 93 12 00 mov %eax,0x1293f8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d97c: 83 ec 0c sub $0xc,%esp 10d97f: 53 push %ebx 10d980: e8 9b 11 00 00 call 10eb20 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d985: a1 f8 93 12 00 mov 0x1293f8,%eax 10d98a: 40 inc %eax 10d98b: a3 f8 93 12 00 mov %eax,0x1293f8 /* * 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 ); 10d990: 59 pop %ecx 10d991: 58 pop %eax 10d992: 53 push %ebx 10d993: 56 push %esi 10d994: e8 2b f6 ff ff call 10cfc4 <_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 ); 10d999: 58 pop %eax 10d99a: 5a pop %edx 10d99b: 6a 01 push $0x1 10d99d: 53 push %ebx 10d99e: e8 b5 0b 00 00 call 10e558 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d9a3: 89 1c 24 mov %ebx,(%esp) 10d9a6: e8 01 0a 00 00 call 10e3ac <_Thread_queue_Extract_with_proxy> 10d9ab: 83 c4 10 add $0x10,%esp 10d9ae: 84 c0 test %al,%al 10d9b0: 75 06 jne 10d9b8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d9b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d9b6: 74 68 je 10da20 <_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 ) ) 10d9b8: 3b 1d 80 94 12 00 cmp 0x129480,%ebx 10d9be: 74 74 je 10da34 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d9c0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d9c7: 00 00 00 if ( the_thread->Start.fp_context ) 10d9ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d9d0: 85 c0 test %eax,%eax 10d9d2: 74 0c je 10d9e0 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d9d4: 83 ec 0c sub $0xc,%esp 10d9d7: 50 push %eax 10d9d8: e8 4b 14 00 00 call 10ee28 <_Workspace_Free> 10d9dd: 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 ); 10d9e0: 83 ec 0c sub $0xc,%esp 10d9e3: 53 push %ebx 10d9e4: e8 23 0d 00 00 call 10e70c <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d9e9: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d9f0: 00 00 00 if ( the_thread->extensions ) 10d9f3: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d9f9: 83 c4 10 add $0x10,%esp 10d9fc: 85 c0 test %eax,%eax 10d9fe: 74 0c je 10da0c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10da00: 83 ec 0c sub $0xc,%esp 10da03: 50 push %eax 10da04: e8 1f 14 00 00 call 10ee28 <_Workspace_Free> 10da09: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10da0c: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10da13: 00 00 00 } 10da16: 8d 65 f8 lea -0x8(%ebp),%esp 10da19: 5b pop %ebx 10da1a: 5e pop %esi 10da1b: c9 leave 10da1c: c3 ret 10da1d: 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 ); 10da20: 83 ec 0c sub $0xc,%esp 10da23: 8d 43 48 lea 0x48(%ebx),%eax 10da26: 50 push %eax 10da27: e8 dc 12 00 00 call 10ed08 <_Watchdog_Remove> 10da2c: 83 c4 10 add $0x10,%esp 10da2f: eb 87 jmp 10d9b8 <_Thread_Close+0x60> 10da31: 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; 10da34: c7 05 80 94 12 00 00 movl $0x0,0x129480 10da3b: 00 00 00 10da3e: eb 80 jmp 10d9c0 <_Thread_Close+0x68> =============================================================================== 0010dad4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dad4: 55 push %ebp 10dad5: 89 e5 mov %esp,%ebp 10dad7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dada: 8d 45 f4 lea -0xc(%ebp),%eax 10dadd: 50 push %eax 10dade: ff 75 08 pushl 0x8(%ebp) 10dae1: e8 aa 01 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10dae6: 83 c4 10 add $0x10,%esp 10dae9: 8b 55 f4 mov -0xc(%ebp),%edx 10daec: 85 d2 test %edx,%edx 10daee: 75 1c jne 10db0c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10daf0: 83 ec 08 sub $0x8,%esp 10daf3: 68 18 00 00 10 push $0x10000018 10daf8: 50 push %eax 10daf9: e8 c6 fd ff ff call 10d8c4 <_Thread_Clear_state> 10dafe: a1 f8 93 12 00 mov 0x1293f8,%eax 10db03: 48 dec %eax 10db04: a3 f8 93 12 00 mov %eax,0x1293f8 10db09: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10db0c: c9 leave 10db0d: c3 ret =============================================================================== 0010db10 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10db10: 55 push %ebp 10db11: 89 e5 mov %esp,%ebp 10db13: 57 push %edi 10db14: 56 push %esi 10db15: 53 push %ebx 10db16: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10db19: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx _ISR_Disable( level ); 10db1f: 9c pushf 10db20: fa cli 10db21: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10db22: 8a 15 c8 94 12 00 mov 0x1294c8,%dl 10db28: 84 d2 test %dl,%dl 10db2a: 0f 84 10 01 00 00 je 10dc40 <_Thread_Dispatch+0x130> 10db30: 8d 7d d8 lea -0x28(%ebp),%edi 10db33: e9 d1 00 00 00 jmp 10dc09 <_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 ); 10db38: 50 push %eax 10db39: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10db3a: 83 ec 0c sub $0xc,%esp 10db3d: 8d 45 e0 lea -0x20(%ebp),%eax 10db40: 50 push %eax 10db41: e8 26 47 00 00 call 11226c <_TOD_Get_uptime> _Timestamp_Subtract( 10db46: 83 c4 0c add $0xc,%esp 10db49: 57 push %edi 10db4a: 8d 45 e0 lea -0x20(%ebp),%eax 10db4d: 50 push %eax 10db4e: 68 c0 94 12 00 push $0x1294c0 10db53: e8 b8 0d 00 00 call 10e910 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10db58: 5a pop %edx 10db59: 59 pop %ecx 10db5a: 57 push %edi 10db5b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10db61: 50 push %eax 10db62: e8 6d 0d 00 00 call 10e8d4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10db67: 8b 45 e0 mov -0x20(%ebp),%eax 10db6a: 8b 55 e4 mov -0x1c(%ebp),%edx 10db6d: a3 c0 94 12 00 mov %eax,0x1294c0 10db72: 89 15 c4 94 12 00 mov %edx,0x1294c4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10db78: a1 84 94 12 00 mov 0x129484,%eax 10db7d: 83 c4 10 add $0x10,%esp 10db80: 85 c0 test %eax,%eax 10db82: 74 10 je 10db94 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10db84: 8b 10 mov (%eax),%edx 10db86: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10db8c: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10db92: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10db94: 83 ec 08 sub $0x8,%esp 10db97: 56 push %esi 10db98: 53 push %ebx 10db99: e8 02 10 00 00 call 10eba0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10db9e: 59 pop %ecx 10db9f: 58 pop %eax 10dba0: 81 c6 d4 00 00 00 add $0xd4,%esi 10dba6: 56 push %esi 10dba7: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10dbad: 50 push %eax 10dbae: e8 dd 12 00 00 call 10ee90 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dbb3: 83 c4 10 add $0x10,%esp 10dbb6: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10dbbc: 85 d2 test %edx,%edx 10dbbe: 74 36 je 10dbf6 <_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 ); 10dbc0: a1 80 94 12 00 mov 0x129480,%eax 10dbc5: 39 c3 cmp %eax,%ebx 10dbc7: 74 2d je 10dbf6 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dbc9: 85 c0 test %eax,%eax 10dbcb: 74 11 je 10dbde <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10dbcd: 83 ec 0c sub $0xc,%esp 10dbd0: 05 ec 00 00 00 add $0xec,%eax 10dbd5: 50 push %eax 10dbd6: e8 e9 12 00 00 call 10eec4 <_CPU_Context_save_fp> 10dbdb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dbde: 83 ec 0c sub $0xc,%esp 10dbe1: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10dbe7: 50 push %eax 10dbe8: e8 e1 12 00 00 call 10eece <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10dbed: 89 1d 80 94 12 00 mov %ebx,0x129480 10dbf3: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10dbf6: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx _ISR_Disable( level ); 10dbfc: 9c pushf 10dbfd: fa cli 10dbfe: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10dbff: 8a 15 c8 94 12 00 mov 0x1294c8,%dl 10dc05: 84 d2 test %dl,%dl 10dc07: 74 37 je 10dc40 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10dc09: 8b 35 88 94 12 00 mov 0x129488,%esi _Thread_Dispatch_disable_level = 1; 10dc0f: c7 05 f8 93 12 00 01 movl $0x1,0x1293f8 10dc16: 00 00 00 _Context_Switch_necessary = false; 10dc19: c6 05 c8 94 12 00 00 movb $0x0,0x1294c8 _Thread_Executing = heir; 10dc20: 89 35 b8 94 12 00 mov %esi,0x1294b8 #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 ) 10dc26: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10dc2a: 0f 85 08 ff ff ff jne 10db38 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dc30: 8b 15 c4 93 12 00 mov 0x1293c4,%edx 10dc36: 89 56 78 mov %edx,0x78(%esi) 10dc39: e9 fa fe ff ff jmp 10db38 <_Thread_Dispatch+0x28> 10dc3e: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10dc40: c7 05 f8 93 12 00 00 movl $0x0,0x1293f8 10dc47: 00 00 00 _ISR_Enable( level ); 10dc4a: 50 push %eax 10dc4b: 9d popf if ( _Thread_Do_post_task_switch_extension || 10dc4c: a1 9c 94 12 00 mov 0x12949c,%eax 10dc51: 85 c0 test %eax,%eax 10dc53: 75 06 jne 10dc5b <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10dc55: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10dc59: 74 09 je 10dc64 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10dc5b: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10dc5f: e8 50 e8 ff ff call 10c4b4 <_API_extensions_Run_postswitch> } } 10dc64: 8d 65 f4 lea -0xc(%ebp),%esp 10dc67: 5b pop %ebx 10dc68: 5e pop %esi 10dc69: 5f pop %edi 10dc6a: c9 leave 10dc6b: c3 ret =============================================================================== 00114e90 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 114e90: 55 push %ebp 114e91: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 114e93: a1 b8 94 12 00 mov 0x1294b8,%eax if ( !_States_Is_ready( executing->current_state ) || 114e98: 8b 50 10 mov 0x10(%eax),%edx 114e9b: 85 d2 test %edx,%edx 114e9d: 75 0e jne 114ead <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 114e9f: 3b 05 88 94 12 00 cmp 0x129488,%eax 114ea5: 74 11 je 114eb8 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 114ea7: 80 78 75 00 cmpb $0x0,0x75(%eax) 114eab: 74 0b je 114eb8 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 114ead: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 114eb4: b0 01 mov $0x1,%al return true; } return false; } 114eb6: c9 leave 114eb7: 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; 114eb8: 31 c0 xor %eax,%eax } return false; } 114eba: c9 leave 114ebb: c3 ret =============================================================================== 0010dc90 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10dc90: 55 push %ebp 10dc91: 89 e5 mov %esp,%ebp 10dc93: 53 push %ebx 10dc94: 83 ec 04 sub $0x4,%esp 10dc97: 8b 45 08 mov 0x8(%ebp),%eax 10dc9a: 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 ) ) { 10dc9d: 85 c0 test %eax,%eax 10dc9f: 74 4b je 10dcec <_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); 10dca1: 89 c2 mov %eax,%edx 10dca3: c1 ea 18 shr $0x18,%edx 10dca6: 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 ) 10dca9: 8d 5a ff lea -0x1(%edx),%ebx 10dcac: 83 fb 03 cmp $0x3,%ebx 10dcaf: 77 2b ja 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dcb1: 89 c3 mov %eax,%ebx 10dcb3: c1 eb 1b shr $0x1b,%ebx 10dcb6: 4b dec %ebx 10dcb7: 75 23 jne 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dcb9: 8b 14 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%edx if ( !api_information ) { 10dcc0: 85 d2 test %edx,%edx 10dcc2: 74 18 je 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dcc4: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dcc7: 85 d2 test %edx,%edx 10dcc9: 74 11 je 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dccb: 53 push %ebx 10dccc: 51 push %ecx 10dccd: 50 push %eax 10dcce: 52 push %edx 10dccf: e8 24 f7 ff ff call 10d3f8 <_Objects_Get> 10dcd4: 83 c4 10 add $0x10,%esp done: return tp; } 10dcd7: 8b 5d fc mov -0x4(%ebp),%ebx 10dcda: c9 leave 10dcdb: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dcdc: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dce2: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dce4: 8b 5d fc mov -0x4(%ebp),%ebx 10dce7: c9 leave 10dce8: c3 ret 10dce9: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dcec: a1 f8 93 12 00 mov 0x1293f8,%eax 10dcf1: 40 inc %eax 10dcf2: a3 f8 93 12 00 mov %eax,0x1293f8 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; 10dcf7: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dcfd: a1 b8 94 12 00 mov 0x1294b8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dd02: 8b 5d fc mov -0x4(%ebp),%ebx 10dd05: c9 leave 10dd06: c3 ret =============================================================================== 00114ebc <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 114ebc: 55 push %ebp 114ebd: 89 e5 mov %esp,%ebp 114ebf: 53 push %ebx 114ec0: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 114ec3: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 114ec9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 114ecf: 85 c0 test %eax,%eax 114ed1: 74 79 je 114f4c <_Thread_Handler+0x90> 114ed3: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 114ed4: a0 54 90 12 00 mov 0x129054,%al 114ed9: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 114edc: c6 05 54 90 12 00 01 movb $0x1,0x129054 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 114ee3: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 114ee9: 85 c0 test %eax,%eax 114eeb: 74 24 je 114f11 <_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 ); 114eed: a1 80 94 12 00 mov 0x129480,%eax 114ef2: 39 c3 cmp %eax,%ebx 114ef4: 74 1b je 114f11 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 114ef6: 85 c0 test %eax,%eax 114ef8: 74 11 je 114f0b <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 114efa: 83 ec 0c sub $0xc,%esp 114efd: 05 ec 00 00 00 add $0xec,%eax 114f02: 50 push %eax 114f03: e8 bc 9f ff ff call 10eec4 <_CPU_Context_save_fp> 114f08: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 114f0b: 89 1d 80 94 12 00 mov %ebx,0x129480 /* * 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 ); 114f11: 83 ec 0c sub $0xc,%esp 114f14: 53 push %ebx 114f15: e8 f6 9a ff ff call 10ea10 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 114f1a: e8 4d 8d ff ff call 10dc6c <_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) */ { 114f1f: 83 c4 10 add $0x10,%esp 114f22: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 114f26: 74 28 je 114f50 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 114f28: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 114f2e: 85 c0 test %eax,%eax 114f30: 74 2d je 114f5f <_Thread_Handler+0xa3> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 114f32: 48 dec %eax 114f33: 74 43 je 114f78 <_Thread_Handler+0xbc> <== 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 ); 114f35: 83 ec 0c sub $0xc,%esp 114f38: 53 push %ebx 114f39: e8 0e 9b ff ff call 10ea4c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 114f3e: 83 c4 0c add $0xc,%esp 114f41: 6a 06 push $0x6 114f43: 6a 01 push $0x1 114f45: 6a 00 push $0x0 114f47: e8 64 7f ff ff call 10ceb0 <_Internal_error_Occurred> * 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); 114f4c: fb sti 114f4d: eb 85 jmp 114ed4 <_Thread_Handler+0x18> 114f4f: 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 (); 114f50: e8 1b c0 00 00 call 120f70 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 114f55: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 114f5b: 85 c0 test %eax,%eax 114f5d: 75 d3 jne 114f32 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 114f5f: 83 ec 0c sub $0xc,%esp 114f62: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 114f68: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 114f6e: 89 43 28 mov %eax,0x28(%ebx) 114f71: 83 c4 10 add $0x10,%esp 114f74: eb bf jmp 114f35 <_Thread_Handler+0x79> 114f76: 66 90 xchg %ax,%ax ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 114f78: 83 ec 0c sub $0xc,%esp 114f7b: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 114f81: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 114f87: 89 43 28 mov %eax,0x28(%ebx) 114f8a: 83 c4 10 add $0x10,%esp 114f8d: eb a6 jmp 114f35 <_Thread_Handler+0x79> =============================================================================== 0010dd08 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dd08: 55 push %ebp 10dd09: 89 e5 mov %esp,%ebp 10dd0b: 57 push %edi 10dd0c: 56 push %esi 10dd0d: 53 push %ebx 10dd0e: 83 ec 1c sub $0x1c,%esp 10dd11: 8b 5d 0c mov 0xc(%ebp),%ebx 10dd14: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd17: 8b 7d 14 mov 0x14(%ebp),%edi 10dd1a: 8b 75 1c mov 0x1c(%ebp),%esi 10dd1d: 8a 55 18 mov 0x18(%ebp),%dl 10dd20: 8a 45 20 mov 0x20(%ebp),%al 10dd23: 88 45 df mov %al,-0x21(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10dd26: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dd2d: 00 00 00 10dd30: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dd37: 00 00 00 10dd3a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dd41: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dd44: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dd4b: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10dd4e: 85 c9 test %ecx,%ecx 10dd50: 0f 84 13 02 00 00 je 10df69 <_Thread_Initialize+0x261> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10dd56: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10dd5d: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dd5f: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10dd65: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10dd6b: 84 d2 test %dl,%dl 10dd6d: 0f 85 89 01 00 00 jne 10defc <_Thread_Initialize+0x1f4> 10dd73: 31 c0 xor %eax,%eax 10dd75: 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; 10dd7c: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10dd82: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dd88: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dd8f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dd96: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dd9d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dda4: a1 98 94 12 00 mov 0x129498,%eax 10dda9: 85 c0 test %eax,%eax 10ddab: 0f 85 6b 01 00 00 jne 10df1c <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10ddb1: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10ddb8: 00 00 00 10ddbb: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10ddc2: 8a 45 df mov -0x21(%ebp),%al 10ddc5: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10ddcb: 8b 45 24 mov 0x24(%ebp),%eax 10ddce: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10ddd4: 8b 45 28 mov 0x28(%ebp),%eax 10ddd7: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10dddd: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10dde1: 75 08 jne 10ddeb <_Thread_Initialize+0xe3> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dde3: a1 c4 93 12 00 mov 0x1293c4,%eax 10dde8: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10ddeb: 8b 45 2c mov 0x2c(%ebp),%eax 10ddee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10ddf4: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10ddfb: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10de02: 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; 10de09: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10de0c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10de12: 83 ec 08 sub $0x8,%esp 10de15: 56 push %esi 10de16: 53 push %ebx 10de17: e8 d0 06 00 00 call 10e4ec <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10de1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10de23: 00 00 00 10de26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10de2d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10de30: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10de34: 8b 45 08 mov 0x8(%ebp),%eax 10de37: 8b 40 1c mov 0x1c(%eax),%eax 10de3a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10de3d: 8b 45 30 mov 0x30(%ebp),%eax 10de40: 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 ); 10de43: 89 1c 24 mov %ebx,(%esp) 10de46: e8 8d 0c 00 00 call 10ead8 <_User_extensions_Thread_create> if ( extension_status ) 10de4b: 83 c4 10 add $0x10,%esp 10de4e: 84 c0 test %al,%al 10de50: 0f 85 9a 00 00 00 jne 10def0 <_Thread_Initialize+0x1e8> return true; failed: if ( the_thread->libc_reent ) 10de56: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10de5c: 85 c0 test %eax,%eax 10de5e: 74 0c je 10de6c <_Thread_Initialize+0x164> _Workspace_Free( the_thread->libc_reent ); 10de60: 83 ec 0c sub $0xc,%esp 10de63: 50 push %eax 10de64: e8 bf 0f 00 00 call 10ee28 <_Workspace_Free> 10de69: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10de6c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10de72: 85 c0 test %eax,%eax 10de74: 74 0c je 10de82 <_Thread_Initialize+0x17a> _Workspace_Free( the_thread->API_Extensions[i] ); 10de76: 83 ec 0c sub $0xc,%esp 10de79: 50 push %eax 10de7a: e8 a9 0f 00 00 call 10ee28 <_Workspace_Free> 10de7f: 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] ) 10de82: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10de88: 85 c0 test %eax,%eax 10de8a: 74 0c je 10de98 <_Thread_Initialize+0x190> _Workspace_Free( the_thread->API_Extensions[i] ); 10de8c: 83 ec 0c sub $0xc,%esp 10de8f: 50 push %eax 10de90: e8 93 0f 00 00 call 10ee28 <_Workspace_Free> 10de95: 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] ) 10de98: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10de9e: 85 c0 test %eax,%eax 10dea0: 74 0c je 10deae <_Thread_Initialize+0x1a6><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dea2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dea5: 50 push %eax <== NOT EXECUTED 10dea6: e8 7d 0f 00 00 call 10ee28 <_Workspace_Free> <== NOT EXECUTED 10deab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10deae: 8b 55 e4 mov -0x1c(%ebp),%edx 10deb1: 85 d2 test %edx,%edx 10deb3: 74 0e je 10dec3 <_Thread_Initialize+0x1bb> (void) _Workspace_Free( extensions_area ); 10deb5: 83 ec 0c sub $0xc,%esp 10deb8: ff 75 e4 pushl -0x1c(%ebp) 10debb: e8 68 0f 00 00 call 10ee28 <_Workspace_Free> 10dec0: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10dec3: 8b 45 e0 mov -0x20(%ebp),%eax 10dec6: 85 c0 test %eax,%eax 10dec8: 74 0e je 10ded8 <_Thread_Initialize+0x1d0> (void) _Workspace_Free( fp_area ); 10deca: 83 ec 0c sub $0xc,%esp 10decd: ff 75 e0 pushl -0x20(%ebp) 10ded0: e8 53 0f 00 00 call 10ee28 <_Workspace_Free> 10ded5: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ded8: 83 ec 0c sub $0xc,%esp 10dedb: 53 push %ebx 10dedc: e8 2b 08 00 00 call 10e70c <_Thread_Stack_Free> 10dee1: 31 c0 xor %eax,%eax return false; 10dee3: 83 c4 10 add $0x10,%esp } 10dee6: 8d 65 f4 lea -0xc(%ebp),%esp 10dee9: 5b pop %ebx 10deea: 5e pop %esi 10deeb: 5f pop %edi 10deec: c9 leave 10deed: c3 ret 10deee: 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 ) 10def0: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10def2: 8d 65 f4 lea -0xc(%ebp),%esp 10def5: 5b pop %ebx 10def6: 5e pop %esi 10def7: 5f pop %edi 10def8: c9 leave 10def9: c3 ret 10defa: 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 ); 10defc: 83 ec 0c sub $0xc,%esp 10deff: 6a 6c push $0x6c 10df01: e8 06 0f 00 00 call 10ee0c <_Workspace_Allocate> 10df06: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10df09: 83 c4 10 add $0x10,%esp 10df0c: 85 c0 test %eax,%eax 10df0e: 0f 84 89 00 00 00 je 10df9d <_Thread_Initialize+0x295> 10df14: 8b 45 e0 mov -0x20(%ebp),%eax 10df17: e9 60 fe ff ff jmp 10dd7c <_Thread_Initialize+0x74> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10df1c: 83 ec 0c sub $0xc,%esp 10df1f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10df26: 50 push %eax 10df27: e8 e0 0e 00 00 call 10ee0c <_Workspace_Allocate> 10df2c: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10df2f: 83 c4 10 add $0x10,%esp 10df32: 85 c0 test %eax,%eax 10df34: 0f 84 1c ff ff ff je 10de56 <_Thread_Initialize+0x14e> goto failed; } the_thread->extensions = (void **) extensions_area; 10df3a: 89 c1 mov %eax,%ecx 10df3c: 89 83 00 01 00 00 mov %eax,0x100(%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++ ) 10df42: 8b 3d 98 94 12 00 mov 0x129498,%edi 10df48: 31 d2 xor %edx,%edx 10df4a: 31 c0 xor %eax,%eax 10df4c: eb 08 jmp 10df56 <_Thread_Initialize+0x24e> 10df4e: 66 90 xchg %ax,%ax 10df50: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10df56: 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++ ) 10df5d: 40 inc %eax 10df5e: 89 c2 mov %eax,%edx 10df60: 39 c7 cmp %eax,%edi 10df62: 73 ec jae 10df50 <_Thread_Initialize+0x248> 10df64: e9 59 fe ff ff jmp 10ddc2 <_Thread_Initialize+0xba> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10df69: 83 ec 08 sub $0x8,%esp 10df6c: 57 push %edi 10df6d: 53 push %ebx 10df6e: 88 55 d8 mov %dl,-0x28(%ebp) 10df71: e8 32 07 00 00 call 10e6a8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10df76: 83 c4 10 add $0x10,%esp 10df79: 85 c0 test %eax,%eax 10df7b: 8a 55 d8 mov -0x28(%ebp),%dl 10df7e: 74 16 je 10df96 <_Thread_Initialize+0x28e> 10df80: 39 c7 cmp %eax,%edi 10df82: 77 12 ja 10df96 <_Thread_Initialize+0x28e><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10df84: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10df8a: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10df91: e9 c9 fd ff ff jmp 10dd5f <_Thread_Initialize+0x57> if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10df96: 31 c0 xor %eax,%eax 10df98: e9 49 ff ff ff jmp 10dee6 <_Thread_Initialize+0x1de> * 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 ) 10df9d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10dfa4: e9 ad fe ff ff jmp 10de56 <_Thread_Initialize+0x14e> =============================================================================== 001135a4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1135a4: 55 push %ebp 1135a5: 89 e5 mov %esp,%ebp 1135a7: 53 push %ebx 1135a8: 83 ec 10 sub $0x10,%esp 1135ab: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1135ae: 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; 1135b5: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 1135bb: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1135be: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1135c4: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1135c7: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1135cd: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1135d3: 8b 45 0c mov 0xc(%ebp),%eax 1135d6: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1135dc: 8b 45 10 mov 0x10(%ebp),%eax 1135df: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1135e5: 53 push %ebx 1135e6: e8 e9 b8 ff ff call 10eed4 <_Thread_queue_Extract_with_proxy> 1135eb: 83 c4 10 add $0x10,%esp 1135ee: 84 c0 test %al,%al 1135f0: 75 06 jne 1135f8 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1135f2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1135f6: 74 28 je 113620 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 1135f8: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 1135fe: 39 43 14 cmp %eax,0x14(%ebx) 113601: 74 15 je 113618 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 113603: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 113606: 89 45 0c mov %eax,0xc(%ebp) 113609: 89 5d 08 mov %ebx,0x8(%ebp) } } 11360c: 8b 5d fc mov -0x4(%ebp),%ebx 11360f: 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 ); 113610: e9 8b ba ff ff jmp 10f0a0 <_Thread_Set_priority> 113615: 8d 76 00 lea 0x0(%esi),%esi } } 113618: 8b 5d fc mov -0x4(%ebp),%ebx 11361b: c9 leave 11361c: c3 ret 11361d: 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 ); 113620: 83 ec 0c sub $0xc,%esp 113623: 8d 43 48 lea 0x48(%ebx),%eax 113626: 50 push %eax 113627: e8 d0 c2 ff ff call 10f8fc <_Watchdog_Remove> 11362c: 83 c4 10 add $0x10,%esp 11362f: eb c7 jmp 1135f8 <_Thread_Reset+0x54> =============================================================================== 00111870 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111870: 55 push %ebp 111871: 89 e5 mov %esp,%ebp 111873: 53 push %ebx 111874: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111877: 9c pushf 111878: fa cli 111879: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11187a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 11187d: f6 c2 02 test $0x2,%dl 111880: 74 6e je 1118f0 <_Thread_Resume+0x80> <== NEVER TAKEN 111882: 83 e2 fd and $0xfffffffd,%edx current_state = 111885: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111888: 85 d2 test %edx,%edx 11188a: 75 64 jne 1118f0 <_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; 11188c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111892: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111899: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 11189c: 66 8b 15 ec c5 12 00 mov 0x12c5ec,%dx 1118a3: 0b 90 94 00 00 00 or 0x94(%eax),%edx 1118a9: 66 89 15 ec c5 12 00 mov %dx,0x12c5ec _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 1118b0: 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); 1118b6: 8d 5a 04 lea 0x4(%edx),%ebx 1118b9: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1118bb: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1118be: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1118c1: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1118c3: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1118c6: 51 push %ecx 1118c7: 9d popf 1118c8: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 1118c9: 8b 50 14 mov 0x14(%eax),%edx 1118cc: 8b 1d c8 c5 12 00 mov 0x12c5c8,%ebx 1118d2: 3b 53 14 cmp 0x14(%ebx),%edx 1118d5: 73 19 jae 1118f0 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1118d7: a3 c8 c5 12 00 mov %eax,0x12c5c8 if ( _Thread_Executing->is_preemptible || 1118dc: a1 f8 c5 12 00 mov 0x12c5f8,%eax 1118e1: 80 78 75 00 cmpb $0x0,0x75(%eax) 1118e5: 74 11 je 1118f8 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1118e7: c6 05 08 c6 12 00 01 movb $0x1,0x12c608 1118ee: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1118f0: 51 push %ecx 1118f1: 9d popf } 1118f2: 5b pop %ebx 1118f3: c9 leave 1118f4: c3 ret 1118f5: 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 || 1118f8: 85 d2 test %edx,%edx 1118fa: 74 eb je 1118e7 <_Thread_Resume+0x77> <== NEVER TAKEN 1118fc: eb f2 jmp 1118f0 <_Thread_Resume+0x80> =============================================================================== 0010e558 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e558: 55 push %ebp 10e559: 89 e5 mov %esp,%ebp 10e55b: 56 push %esi 10e55c: 53 push %ebx 10e55d: 8b 45 08 mov 0x8(%ebp),%eax 10e560: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e563: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e569: 9c pushf 10e56a: fa cli 10e56b: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e56c: 8b 58 10 mov 0x10(%eax),%ebx 10e56f: 85 db test %ebx,%ebx 10e571: 75 2d jne 10e5a0 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e573: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e576: 8b 1a mov (%edx),%ebx 10e578: 3b 5a 08 cmp 0x8(%edx),%ebx 10e57b: 74 3b je 10e5b8 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e57d: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e57f: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e582: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e585: 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 ); 10e587: 51 push %ecx 10e588: 9d popf 10e589: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e58a: 3b 05 88 94 12 00 cmp 0x129488,%eax 10e590: 74 62 je 10e5f4 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e592: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax 10e598: 74 12 je 10e5ac <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e59a: 51 push %ecx 10e59b: 9d popf } 10e59c: 5b pop %ebx 10e59d: 5e pop %esi 10e59e: c9 leave 10e59f: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e5a0: 09 f3 or %esi,%ebx 10e5a2: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e5a5: 51 push %ecx 10e5a6: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e5a7: 5b pop %ebx 10e5a8: 5e pop %esi 10e5a9: c9 leave 10e5aa: c3 ret 10e5ab: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e5ac: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 10e5b3: eb e5 jmp 10e59a <_Thread_Set_state+0x42> 10e5b5: 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); 10e5b8: 8d 5a 04 lea 0x4(%edx),%ebx 10e5bb: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e5c4: 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; 10e5c7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e5cd: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e5d4: 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 ); 10e5d7: 66 83 3a 00 cmpw $0x0,(%edx) 10e5db: 75 aa jne 10e587 <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e5dd: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx 10e5e4: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e5ea: 66 89 15 ac 94 12 00 mov %dx,0x1294ac 10e5f1: eb 94 jmp 10e587 <_Thread_Set_state+0x2f> 10e5f3: 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 ); 10e5f4: 66 8b 35 ac 94 12 00 mov 0x1294ac,%si 10e5fb: 31 d2 xor %edx,%edx 10e5fd: 89 d3 mov %edx,%ebx 10e5ff: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e603: 0f b7 db movzwl %bx,%ebx 10e606: 66 8b b4 1b 40 95 12 mov 0x129540(%ebx,%ebx,1),%si 10e60d: 00 10e60e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e612: c1 e3 04 shl $0x4,%ebx 10e615: 0f b7 d2 movzwl %dx,%edx 10e618: 8d 14 13 lea (%ebx,%edx,1),%edx 10e61b: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e61e: 8b 15 c0 93 12 00 mov 0x1293c0,%edx 10e624: 8b 14 9a mov (%edx,%ebx,4),%edx 10e627: 89 15 88 94 12 00 mov %edx,0x129488 10e62d: e9 60 ff ff ff jmp 10e592 <_Thread_Set_state+0x3a> =============================================================================== 0010e6a8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e6a8: 55 push %ebp 10e6a9: 89 e5 mov %esp,%ebp 10e6ab: 53 push %ebx 10e6ac: 83 ec 04 sub $0x4,%esp 10e6af: a1 10 52 12 00 mov 0x125210,%eax 10e6b4: 8b 5d 0c mov 0xc(%ebp),%ebx 10e6b7: 39 c3 cmp %eax,%ebx 10e6b9: 73 02 jae 10e6bd <_Thread_Stack_Allocate+0x15> 10e6bb: 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 ) { 10e6bd: a1 40 52 12 00 mov 0x125240,%eax 10e6c2: 85 c0 test %eax,%eax 10e6c4: 74 32 je 10e6f8 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e6c6: 83 ec 0c sub $0xc,%esp 10e6c9: 53 push %ebx 10e6ca: ff d0 call *%eax 10e6cc: 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 ) 10e6cf: 85 c0 test %eax,%eax 10e6d1: 74 11 je 10e6e4 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e6d3: 8b 55 08 mov 0x8(%ebp),%edx 10e6d6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e6dc: 89 d8 mov %ebx,%eax 10e6de: 8b 5d fc mov -0x4(%ebp),%ebx 10e6e1: c9 leave 10e6e2: c3 ret 10e6e3: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e6e4: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e6e6: 8b 55 08 mov 0x8(%ebp),%edx 10e6e9: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e6ef: 89 d8 mov %ebx,%eax 10e6f1: 8b 5d fc mov -0x4(%ebp),%ebx 10e6f4: c9 leave 10e6f5: c3 ret 10e6f6: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e6f8: 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 ); 10e6fb: 83 ec 0c sub $0xc,%esp 10e6fe: 53 push %ebx 10e6ff: e8 08 07 00 00 call 10ee0c <_Workspace_Allocate> 10e704: 83 c4 10 add $0x10,%esp 10e707: eb c6 jmp 10e6cf <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e70c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e70c: 55 push %ebp 10e70d: 89 e5 mov %esp,%ebp 10e70f: 83 ec 08 sub $0x8,%esp 10e712: 8b 45 08 mov 0x8(%ebp),%eax #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10e715: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e71c: 74 16 je 10e734 <_Thread_Stack_Free+0x28><== NEVER TAKEN * 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 ) 10e71e: 8b 15 44 52 12 00 mov 0x125244,%edx 10e724: 85 d2 test %edx,%edx 10e726: 74 10 je 10e738 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e728: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e72e: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e731: 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 ); 10e732: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e734: c9 leave <== NOT EXECUTED 10e735: c3 ret <== NOT EXECUTED 10e736: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e738: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e73e: 89 45 08 mov %eax,0x8(%ebp) } 10e741: 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 ); 10e742: e9 e1 06 00 00 jmp 10ee28 <_Workspace_Free> =============================================================================== 00112974 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 112974: 55 push %ebp 112975: 89 e5 mov %esp,%ebp 112977: 56 push %esi 112978: 53 push %ebx 112979: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 11297c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 112982: 9c pushf 112983: fa cli 112984: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 112985: 8b 58 10 mov 0x10(%eax),%ebx 112988: 85 db test %ebx,%ebx 11298a: 75 34 jne 1129c0 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 11298c: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 112993: 8b 1a mov (%edx),%ebx 112995: 3b 5a 08 cmp 0x8(%edx),%ebx 112998: 74 3e je 1129d8 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11299a: 8b 18 mov (%eax),%ebx previous = the_node->previous; 11299c: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11299f: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 1129a2: 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 ); 1129a4: 51 push %ecx 1129a5: 9d popf 1129a6: fa cli if ( _Thread_Is_heir( the_thread ) ) 1129a7: 3b 05 88 94 12 00 cmp 0x129488,%eax 1129ad: 74 65 je 112a14 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 1129af: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax 1129b5: 74 15 je 1129cc <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 1129b7: 51 push %ecx 1129b8: 9d popf } 1129b9: 5b pop %ebx 1129ba: 5e pop %esi 1129bb: c9 leave 1129bc: c3 ret 1129bd: 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 = 1129c0: 83 cb 02 or $0x2,%ebx 1129c3: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 1129c6: 51 push %ecx 1129c7: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 1129c8: 5b pop %ebx 1129c9: 5e pop %esi 1129ca: c9 leave 1129cb: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 1129cc: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 1129d3: eb e2 jmp 1129b7 <_Thread_Suspend+0x43> 1129d5: 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); 1129d8: 8d 5a 04 lea 0x4(%edx),%ebx 1129db: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 1129dd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1129e4: 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; 1129e7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1129ed: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 1129f4: 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 ); 1129f7: 66 83 3a 00 cmpw $0x0,(%edx) 1129fb: 75 a7 jne 1129a4 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 1129fd: 66 8b 15 ac 94 12 00 mov 0x1294ac,%dx 112a04: 23 90 98 00 00 00 and 0x98(%eax),%edx 112a0a: 66 89 15 ac 94 12 00 mov %dx,0x1294ac 112a11: eb 91 jmp 1129a4 <_Thread_Suspend+0x30> 112a13: 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 ); 112a14: 66 8b 35 ac 94 12 00 mov 0x1294ac,%si 112a1b: 31 d2 xor %edx,%edx 112a1d: 89 d3 mov %edx,%ebx 112a1f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112a23: 0f b7 db movzwl %bx,%ebx 112a26: 66 8b b4 1b 40 95 12 mov 0x129540(%ebx,%ebx,1),%si 112a2d: 00 112a2e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112a32: c1 e3 04 shl $0x4,%ebx 112a35: 0f b7 d2 movzwl %dx,%edx 112a38: 8d 14 13 lea (%ebx,%edx,1),%edx 112a3b: 8d 1c 52 lea (%edx,%edx,2),%ebx 112a3e: 8b 15 c0 93 12 00 mov 0x1293c0,%edx 112a44: 8b 14 9a mov (%edx,%ebx,4),%edx 112a47: 89 15 88 94 12 00 mov %edx,0x129488 112a4d: e9 5d ff ff ff jmp 1129af <_Thread_Suspend+0x3b> =============================================================================== 0010e804 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e804: 55 push %ebp 10e805: 89 e5 mov %esp,%ebp 10e807: 53 push %ebx 10e808: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e80b: 8b 1d b8 94 12 00 mov 0x1294b8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e811: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e815: 74 19 je 10e830 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e817: 8b 43 10 mov 0x10(%ebx),%eax 10e81a: 85 c0 test %eax,%eax 10e81c: 75 12 jne 10e830 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e81e: 8b 43 7c mov 0x7c(%ebx),%eax 10e821: 83 f8 01 cmp $0x1,%eax 10e824: 72 0a jb 10e830 <_Thread_Tickle_timeslice+0x2c> 10e826: 83 f8 02 cmp $0x2,%eax 10e829: 76 29 jbe 10e854 <_Thread_Tickle_timeslice+0x50> 10e82b: 83 f8 03 cmp $0x3,%eax 10e82e: 74 08 je 10e838 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e830: 8b 5d fc mov -0x4(%ebp),%ebx 10e833: c9 leave 10e834: c3 ret 10e835: 8d 76 00 lea 0x0(%esi),%esi } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10e838: 8b 43 78 mov 0x78(%ebx),%eax 10e83b: 48 dec %eax 10e83c: 89 43 78 mov %eax,0x78(%ebx) 10e83f: 85 c0 test %eax,%eax 10e841: 75 ed jne 10e830 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e843: 83 ec 0c sub $0xc,%esp 10e846: 53 push %ebx 10e847: ff 93 80 00 00 00 call *0x80(%ebx) 10e84d: 83 c4 10 add $0x10,%esp 10e850: eb de jmp 10e830 <_Thread_Tickle_timeslice+0x2c> 10e852: 66 90 xchg %ax,%ax case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10e854: 8b 43 78 mov 0x78(%ebx),%eax 10e857: 48 dec %eax 10e858: 89 43 78 mov %eax,0x78(%ebx) 10e85b: 85 c0 test %eax,%eax 10e85d: 7f d1 jg 10e830 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e85f: e8 b8 40 00 00 call 11291c <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e864: a1 c4 93 12 00 mov 0x1293c4,%eax 10e869: 89 43 78 mov %eax,0x78(%ebx) 10e86c: eb c2 jmp 10e830 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010e870 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e870: 55 push %ebp 10e871: 89 e5 mov %esp,%ebp 10e873: 56 push %esi 10e874: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e875: a1 b8 94 12 00 mov 0x1294b8,%eax ready = executing->ready; 10e87a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e880: 9c pushf 10e881: fa cli 10e882: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e883: 8b 1a mov (%edx),%ebx 10e885: 3b 5a 08 cmp 0x8(%edx),%ebx 10e888: 74 3e je 10e8c8 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e88a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e88c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e88f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e892: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e894: 8d 5a 04 lea 0x4(%edx),%ebx 10e897: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e899: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e89c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e89f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e8a1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e8a4: 51 push %ecx 10e8a5: 9d popf 10e8a6: fa cli if ( _Thread_Is_heir( executing ) ) 10e8a7: 3b 05 88 94 12 00 cmp 0x129488,%eax 10e8ad: 74 0d je 10e8bc <_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; 10e8af: c6 05 c8 94 12 00 01 movb $0x1,0x1294c8 _ISR_Enable( level ); 10e8b6: 51 push %ecx 10e8b7: 9d popf } 10e8b8: 5b pop %ebx 10e8b9: 5e pop %esi 10e8ba: c9 leave 10e8bb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e8bc: 8b 02 mov (%edx),%eax 10e8be: a3 88 94 12 00 mov %eax,0x129488 10e8c3: eb ea jmp 10e8af <_Thread_Yield_processor+0x3f> 10e8c5: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e8c8: 3b 05 88 94 12 00 cmp 0x129488,%eax 10e8ce: 75 df jne 10e8af <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e8d0: eb e4 jmp 10e8b6 <_Thread_Yield_processor+0x46> =============================================================================== 0010e0d4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10e0d4: 55 push %ebp 10e0d5: 89 e5 mov %esp,%ebp 10e0d7: 57 push %edi 10e0d8: 56 push %esi 10e0d9: 53 push %ebx 10e0da: 83 ec 1c sub $0x1c,%esp 10e0dd: 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 ); 10e0e0: 9c pushf 10e0e1: fa cli 10e0e2: 58 pop %eax 10e0e3: 89 f2 mov %esi,%edx 10e0e5: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e0e7: 8d 5a 04 lea 0x4(%edx),%ebx 10e0ea: 39 1a cmp %ebx,(%edx) 10e0ec: 75 1a jne 10e108 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10e0ee: 41 inc %ecx 10e0ef: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10e0f2: 83 f9 04 cmp $0x4,%ecx 10e0f5: 75 f0 jne 10e0e7 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10e0f7: 50 push %eax 10e0f8: 9d popf 10e0f9: 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 ); } 10e0fb: 89 d8 mov %ebx,%eax 10e0fd: 8d 65 f4 lea -0xc(%ebp),%esp 10e100: 5b pop %ebx 10e101: 5e pop %esi 10e102: 5f pop %edi 10e103: c9 leave 10e104: c3 ret 10e105: 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 *) 10e108: 8d 14 49 lea (%ecx,%ecx,2),%edx 10e10b: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10e10e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10e115: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10e118: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10e11a: 8b 73 04 mov 0x4(%ebx),%esi 10e11d: 8d 7b 3c lea 0x3c(%ebx),%edi 10e120: 39 fa cmp %edi,%edx 10e122: 74 76 je 10e19a <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10e124: 8b 7b 40 mov 0x40(%ebx),%edi 10e127: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10e12a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10e12c: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10e12e: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10e131: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10e133: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e136: 8b 4b 38 mov 0x38(%ebx),%ecx 10e139: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e13c: 74 14 je 10e152 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e13e: 8d 4a 38 lea 0x38(%edx),%ecx 10e141: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e144: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e147: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e14a: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e14d: 83 c2 3c add $0x3c,%edx 10e150: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e152: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e156: 74 18 je 10e170 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e158: 50 push %eax 10e159: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e15a: 83 ec 08 sub $0x8,%esp 10e15d: 68 f8 ff 03 10 push $0x1003fff8 10e162: 53 push %ebx 10e163: e8 5c f7 ff ff call 10d8c4 <_Thread_Clear_state> 10e168: 83 c4 10 add $0x10,%esp 10e16b: eb 8e jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27> 10e16d: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e170: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e177: 50 push %eax 10e178: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e179: 83 ec 0c sub $0xc,%esp 10e17c: 8d 43 48 lea 0x48(%ebx),%eax 10e17f: 50 push %eax 10e180: e8 83 0b 00 00 call 10ed08 <_Watchdog_Remove> 10e185: 58 pop %eax 10e186: 5a pop %edx 10e187: 68 f8 ff 03 10 push $0x1003fff8 10e18c: 53 push %ebx 10e18d: e8 32 f7 ff ff call 10d8c4 <_Thread_Clear_state> 10e192: 83 c4 10 add $0x10,%esp 10e195: e9 61 ff ff ff jmp 10e0fb <_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; 10e19a: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e19c: 89 71 04 mov %esi,0x4(%ecx) 10e19f: eb b1 jmp 10e152 <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 0011270c <_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 ) { 11270c: 55 push %ebp 11270d: 89 e5 mov %esp,%ebp 11270f: 56 push %esi 112710: 53 push %ebx 112711: 8b 55 08 mov 0x8(%ebp),%edx 112714: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 112717: 9c pushf 112718: fa cli 112719: 59 pop %ecx sync_state = the_thread_queue->sync_state; 11271a: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 11271d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 112724: 83 f8 01 cmp $0x1,%eax 112727: 74 0b je 112734 <_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; 112729: 8b 55 10 mov 0x10(%ebp),%edx 11272c: 89 0a mov %ecx,(%edx) return sync_state; } 11272e: 5b pop %ebx 11272f: 5e pop %esi 112730: c9 leave 112731: c3 ret 112732: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112734: 8d 72 04 lea 0x4(%edx),%esi 112737: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 112739: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 11273c: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 11273f: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 112741: 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; 112744: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 112747: 51 push %ecx 112748: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 112749: 5b pop %ebx 11274a: 5e pop %esi 11274b: c9 leave 11274c: c3 ret =============================================================================== 0010e23c <_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 ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 57 push %edi 10e240: 56 push %esi 10e241: 53 push %ebx 10e242: 83 ec 08 sub $0x8,%esp 10e245: 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); 10e248: 8d 47 3c lea 0x3c(%edi),%eax 10e24b: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e24e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e255: 8d 47 38 lea 0x38(%edi),%eax 10e258: 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; 10e25b: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e25e: 89 d0 mov %edx,%eax 10e260: c1 e8 06 shr $0x6,%eax 10e263: 8d 04 40 lea (%eax,%eax,2),%eax 10e266: 8b 4d 08 mov 0x8(%ebp),%ecx 10e269: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e26c: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e26f: f6 c2 20 test $0x20,%dl 10e272: 75 60 jne 10e2d4 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e274: 8d 46 04 lea 0x4(%esi),%eax 10e277: 89 75 f0 mov %esi,-0x10(%ebp) 10e27a: 89 7d ec mov %edi,-0x14(%ebp) 10e27d: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e27f: 9c pushf 10e280: fa cli 10e281: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e282: 8b 4d f0 mov -0x10(%ebp),%ecx 10e285: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e287: 39 f8 cmp %edi,%eax 10e289: 75 17 jne 10e2a2 <_Thread_queue_Enqueue_priority+0x66> 10e28b: e9 09 01 00 00 jmp 10e399 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e290: 56 push %esi 10e291: 9d popf 10e292: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e293: 85 58 10 test %ebx,0x10(%eax) 10e296: 0f 84 a8 00 00 00 je 10e344 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e29c: 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 ) ) { 10e29e: 39 f8 cmp %edi,%eax 10e2a0: 74 07 je 10e2a9 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e2a2: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e2a5: 39 ca cmp %ecx,%edx 10e2a7: 77 e7 ja 10e290 <_Thread_queue_Enqueue_priority+0x54> 10e2a9: 89 4d f0 mov %ecx,-0x10(%ebp) 10e2ac: 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 ) ) { 10e2af: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e2b1: 8b 4d 08 mov 0x8(%ebp),%ecx 10e2b4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e2b8: 0f 84 8e 00 00 00 je 10e34c <_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; 10e2be: 8b 45 10 mov 0x10(%ebp),%eax 10e2c1: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e2c3: 8b 55 08 mov 0x8(%ebp),%edx 10e2c6: 8b 42 30 mov 0x30(%edx),%eax } 10e2c9: 83 c4 08 add $0x8,%esp 10e2cc: 5b pop %ebx 10e2cd: 5e pop %esi 10e2ce: 5f pop %edi 10e2cf: c9 leave 10e2d0: c3 ret 10e2d1: 8d 76 00 lea 0x0(%esi),%esi 10e2d4: 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; 10e2d7: 0f b6 0d 14 52 12 00 movzbl 0x125214,%ecx 10e2de: 41 inc %ecx _ISR_Disable( level ); 10e2df: 9c pushf 10e2e0: fa cli 10e2e1: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e2e2: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e2e5: 39 f0 cmp %esi,%eax 10e2e7: 75 12 jne 10e2fb <_Thread_queue_Enqueue_priority+0xbf> 10e2e9: eb 17 jmp 10e302 <_Thread_queue_Enqueue_priority+0xc6> 10e2eb: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e2ec: 57 push %edi 10e2ed: 9d popf 10e2ee: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e2ef: 85 58 10 test %ebx,0x10(%eax) 10e2f2: 74 4c je 10e340 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e2f4: 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 ) ) { 10e2f7: 39 f0 cmp %esi,%eax 10e2f9: 74 07 je 10e302 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e2fb: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e2fe: 39 ca cmp %ecx,%edx 10e300: 72 ea jb 10e2ec <_Thread_queue_Enqueue_priority+0xb0> 10e302: 89 fe mov %edi,%esi 10e304: 89 4d ec mov %ecx,-0x14(%ebp) 10e307: 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 ) ) { 10e30a: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e30c: 8b 4d 08 mov 0x8(%ebp),%ecx 10e30f: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e313: 75 a9 jne 10e2be <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e315: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e31c: 3b 55 ec cmp -0x14(%ebp),%edx 10e31f: 74 56 je 10e377 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e321: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e323: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e325: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e328: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e32a: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e32d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e330: 56 push %esi 10e331: 9d popf 10e332: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e337: 83 c4 08 add $0x8,%esp 10e33a: 5b pop %ebx 10e33b: 5e pop %esi 10e33c: 5f pop %edi 10e33d: c9 leave 10e33e: c3 ret 10e33f: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e340: 57 push %edi 10e341: 9d popf goto restart_reverse_search; 10e342: eb 93 jmp 10e2d7 <_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 ); 10e344: 56 push %esi <== NOT EXECUTED 10e345: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e346: e9 34 ff ff ff jmp 10e27f <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e34b: 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; 10e34c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e353: 3b 55 f0 cmp -0x10(%ebp),%edx 10e356: 74 1f je 10e377 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e358: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e35b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e35d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e360: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e362: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e365: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e368: 56 push %esi 10e369: 9d popf 10e36a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e36f: 83 c4 08 add $0x8,%esp 10e372: 5b pop %ebx 10e373: 5e pop %esi 10e374: 5f pop %edi 10e375: c9 leave 10e376: c3 ret 10e377: 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; 10e37a: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e37d: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e37f: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e382: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e384: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e387: 8b 45 08 mov 0x8(%ebp),%eax 10e38a: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e38d: 53 push %ebx 10e38e: 9d popf 10e38f: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e394: e9 30 ff ff ff jmp 10e2c9 <_Thread_queue_Enqueue_priority+0x8d> 10e399: 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 ) ) { 10e39c: 89 f3 mov %esi,%ebx 10e39e: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e3a5: e9 07 ff ff ff jmp 10e2b1 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00112750 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 112750: 55 push %ebp 112751: 89 e5 mov %esp,%ebp 112753: 83 ec 08 sub $0x8,%esp 112756: 8b 45 08 mov 0x8(%ebp),%eax 112759: 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 ) 11275c: 83 78 34 01 cmpl $0x1,0x34(%eax) 112760: 74 0e je 112770 <_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 ); 112762: 89 55 0c mov %edx,0xc(%ebp) 112765: 89 45 08 mov %eax,0x8(%ebp) } 112768: 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 ); 112769: e9 22 28 00 00 jmp 114f90 <_Thread_queue_Extract_fifo> 11276e: 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 ); 112770: 51 push %ecx 112771: 6a 00 push $0x0 112773: 52 push %edx 112774: 50 push %eax 112775: e8 06 00 00 00 call 112780 <_Thread_queue_Extract_priority_helper> 11277a: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 11277d: c9 leave 11277e: c3 ret =============================================================================== 00114f90 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 114f90: 55 push %ebp 114f91: 89 e5 mov %esp,%ebp 114f93: 53 push %ebx 114f94: 83 ec 04 sub $0x4,%esp 114f97: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 114f9a: 9c pushf 114f9b: fa cli 114f9c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 114f9d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 114fa4: 74 2e je 114fd4 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 114fa6: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 114fa8: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 114fab: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 114fae: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 114fb0: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 114fb7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 114fbb: 74 1f je 114fdc <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 114fbd: 50 push %eax 114fbe: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 114fbf: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 114fc6: 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 } 114fc9: 8b 5d fc mov -0x4(%ebp),%ebx 114fcc: c9 leave 114fcd: e9 f2 88 ff ff jmp 10d8c4 <_Thread_Clear_state> 114fd2: 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 ); 114fd4: 50 push %eax 114fd5: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 114fd6: 8b 5d fc mov -0x4(%ebp),%ebx 114fd9: c9 leave 114fda: c3 ret 114fdb: 90 nop 114fdc: 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 ); 114fe3: 50 push %eax 114fe4: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 114fe5: 83 ec 0c sub $0xc,%esp 114fe8: 8d 43 48 lea 0x48(%ebx),%eax 114feb: 50 push %eax 114fec: e8 17 9d ff ff call 10ed08 <_Watchdog_Remove> 114ff1: 83 c4 10 add $0x10,%esp 114ff4: eb c9 jmp 114fbf <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00112780 <_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 ) { 112780: 55 push %ebp 112781: 89 e5 mov %esp,%ebp 112783: 57 push %edi 112784: 56 push %esi 112785: 53 push %ebx 112786: 83 ec 1c sub $0x1c,%esp 112789: 8b 5d 0c mov 0xc(%ebp),%ebx 11278c: 8a 45 10 mov 0x10(%ebp),%al 11278f: 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 ); 112792: 9c pushf 112793: fa cli 112794: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112797: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 11279e: 74 60 je 112800 <_Thread_queue_Extract_priority_helper+0x80> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 1127a0: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 1127a2: 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)); 1127a5: 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; 1127a8: 8d 73 3c lea 0x3c(%ebx),%esi 1127ab: 39 f0 cmp %esi,%eax 1127ad: 74 5d je 11280c <_Thread_queue_Extract_priority_helper+0x8c> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 1127af: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 1127b2: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 1127b4: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 1127b6: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 1127b9: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 1127bb: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 1127be: 8b 53 38 mov 0x38(%ebx),%edx 1127c1: 3b 53 40 cmp 0x40(%ebx),%edx 1127c4: 74 11 je 1127d7 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 1127c6: 8d 50 38 lea 0x38(%eax),%edx 1127c9: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 1127cc: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1127cf: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 1127d2: 83 c0 3c add $0x3c,%eax 1127d5: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1127d7: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1127db: 75 23 jne 112800 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1127dd: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1127e1: 74 31 je 112814 <_Thread_queue_Extract_priority_helper+0x94> _ISR_Enable( level ); 1127e3: ff 75 e4 pushl -0x1c(%ebp) 1127e6: 9d popf 1127e7: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1127ee: 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 } 1127f1: 8d 65 f4 lea -0xc(%ebp),%esp 1127f4: 5b pop %ebx 1127f5: 5e pop %esi 1127f6: 5f pop %edi 1127f7: c9 leave 1127f8: e9 c7 b0 ff ff jmp 10d8c4 <_Thread_Clear_state> 1127fd: 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 ); 112800: ff 75 e4 pushl -0x1c(%ebp) 112803: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112804: 8d 65 f4 lea -0xc(%ebp),%esp 112807: 5b pop %ebx 112808: 5e pop %esi 112809: 5f pop %edi 11280a: c9 leave 11280b: 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; 11280c: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 11280e: 89 4a 04 mov %ecx,0x4(%edx) 112811: eb c4 jmp 1127d7 <_Thread_queue_Extract_priority_helper+0x57> 112813: 90 nop 112814: 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 ); 11281b: ff 75 e4 pushl -0x1c(%ebp) 11281e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 11281f: 83 ec 0c sub $0xc,%esp 112822: 8d 43 48 lea 0x48(%ebx),%eax 112825: 50 push %eax 112826: e8 dd c4 ff ff call 10ed08 <_Watchdog_Remove> 11282b: 83 c4 10 add $0x10,%esp 11282e: eb b7 jmp 1127e7 <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e3ac <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e3ac: 55 push %ebp 10e3ad: 89 e5 mov %esp,%ebp 10e3af: 83 ec 08 sub $0x8,%esp 10e3b2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e3b5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e3bc: 75 06 jne 10e3c4 <_Thread_queue_Extract_with_proxy+0x18> 10e3be: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e3c0: c9 leave 10e3c1: c3 ret 10e3c2: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e3c4: 83 ec 08 sub $0x8,%esp 10e3c7: 50 push %eax 10e3c8: ff 70 44 pushl 0x44(%eax) 10e3cb: e8 80 43 00 00 call 112750 <_Thread_queue_Extract> 10e3d0: b0 01 mov $0x1,%al return true; 10e3d2: 83 c4 10 add $0x10,%esp } return false; } 10e3d5: c9 leave 10e3d6: c3 ret =============================================================================== 0011025c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11025c: 55 push %ebp 11025d: 89 e5 mov %esp,%ebp 11025f: 83 ec 08 sub $0x8,%esp 110262: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 110265: 83 78 34 01 cmpl $0x1,0x34(%eax) 110269: 74 0d je 110278 <_Thread_queue_First+0x1c> 11026b: ba 64 48 11 00 mov $0x114864,%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 ); 110270: 89 45 08 mov %eax,0x8(%ebp) } 110273: 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 ); 110274: ff e2 jmp *%edx 110276: 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 ) 110278: ba 84 02 11 00 mov $0x110284,%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 ); 11027d: 89 45 08 mov %eax,0x8(%ebp) } 110280: 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 ); 110281: ff e2 jmp *%edx =============================================================================== 00114864 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 114864: 55 push %ebp 114865: 89 e5 mov %esp,%ebp 114867: 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)); 11486a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11486c: 83 c2 04 add $0x4,%edx 11486f: 39 d0 cmp %edx,%eax 114871: 74 05 je 114878 <_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; } 114873: c9 leave 114874: c3 ret 114875: 8d 76 00 lea 0x0(%esi),%esi 114878: 31 c0 xor %eax,%eax 11487a: c9 leave 11487b: c3 ret =============================================================================== 0010e3d8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e3d8: 55 push %ebp 10e3d9: 89 e5 mov %esp,%ebp 10e3db: 56 push %esi 10e3dc: 53 push %ebx 10e3dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10e3e0: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e3e3: eb 06 jmp 10e3eb <_Thread_queue_Flush+0x13> 10e3e5: 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; 10e3e8: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e3eb: 83 ec 0c sub $0xc,%esp 10e3ee: 53 push %ebx 10e3ef: e8 94 fc ff ff call 10e088 <_Thread_queue_Dequeue> 10e3f4: 83 c4 10 add $0x10,%esp 10e3f7: 85 c0 test %eax,%eax 10e3f9: 75 ed jne 10e3e8 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e3fb: 8d 65 f8 lea -0x8(%ebp),%esp 10e3fe: 5b pop %ebx 10e3ff: 5e pop %esi 10e400: c9 leave 10e401: c3 ret =============================================================================== 00112830 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 112830: 55 push %ebp 112831: 89 e5 mov %esp,%ebp 112833: 83 ec 08 sub $0x8,%esp 112836: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 112839: 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 && 11283c: 8b 4a 30 mov 0x30(%edx),%ecx 11283f: 85 c9 test %ecx,%ecx 112841: 74 08 je 11284b <_Thread_queue_Process_timeout+0x1b> 112843: 3b 05 b8 94 12 00 cmp 0x1294b8,%eax 112849: 74 19 je 112864 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 11284b: 8b 52 3c mov 0x3c(%edx),%edx 11284e: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 112851: 83 ec 08 sub $0x8,%esp 112854: 50 push %eax 112855: ff 70 44 pushl 0x44(%eax) 112858: e8 f3 fe ff ff call 112750 <_Thread_queue_Extract> 11285d: 83 c4 10 add $0x10,%esp } } 112860: c9 leave 112861: c3 ret 112862: 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 ) { 112864: 83 f9 03 cmp $0x3,%ecx 112867: 74 f7 je 112860 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 112869: 8b 4a 3c mov 0x3c(%edx),%ecx 11286c: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11286f: 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 ); } } 112876: c9 leave 112877: c3 ret =============================================================================== 0010e454 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e454: 55 push %ebp 10e455: 89 e5 mov %esp,%ebp 10e457: 57 push %edi 10e458: 56 push %esi 10e459: 53 push %ebx 10e45a: 83 ec 1c sub $0x1c,%esp 10e45d: 8b 75 08 mov 0x8(%ebp),%esi 10e460: 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 ) 10e463: 85 f6 test %esi,%esi 10e465: 74 06 je 10e46d <_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 ) { 10e467: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e46b: 74 0b je 10e478 <_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 ); } } 10e46d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e470: 5b pop %ebx <== NOT EXECUTED 10e471: 5e pop %esi <== NOT EXECUTED 10e472: 5f pop %edi <== NOT EXECUTED 10e473: c9 leave <== NOT EXECUTED 10e474: c3 ret <== NOT EXECUTED 10e475: 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 ); 10e478: 9c pushf 10e479: fa cli 10e47a: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e47b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e482: 75 0c jne 10e490 <_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 ); 10e484: 53 push %ebx 10e485: 9d popf } } 10e486: 8d 65 f4 lea -0xc(%ebp),%esp 10e489: 5b pop %ebx 10e48a: 5e pop %esi 10e48b: 5f pop %edi 10e48c: c9 leave 10e48d: c3 ret 10e48e: 66 90 xchg %ax,%ax 10e490: 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 ); 10e497: 50 push %eax 10e498: 6a 01 push $0x1 10e49a: 57 push %edi 10e49b: 56 push %esi 10e49c: e8 df 42 00 00 call 112780 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e4a1: 83 c4 0c add $0xc,%esp 10e4a4: 8d 45 e4 lea -0x1c(%ebp),%eax 10e4a7: 50 push %eax 10e4a8: 57 push %edi 10e4a9: 56 push %esi 10e4aa: e8 8d fd ff ff call 10e23c <_Thread_queue_Enqueue_priority> 10e4af: 83 c4 10 add $0x10,%esp 10e4b2: eb d0 jmp 10e484 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e4b4 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e4b4: 55 push %ebp 10e4b5: 89 e5 mov %esp,%ebp 10e4b7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e4ba: 8d 45 f4 lea -0xc(%ebp),%eax 10e4bd: 50 push %eax 10e4be: ff 75 08 pushl 0x8(%ebp) 10e4c1: e8 ca f7 ff ff call 10dc90 <_Thread_Get> switch ( location ) { 10e4c6: 83 c4 10 add $0x10,%esp 10e4c9: 8b 55 f4 mov -0xc(%ebp),%edx 10e4cc: 85 d2 test %edx,%edx 10e4ce: 75 17 jne 10e4e7 <_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 ); 10e4d0: 83 ec 0c sub $0xc,%esp 10e4d3: 50 push %eax 10e4d4: e8 57 43 00 00 call 112830 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e4d9: a1 f8 93 12 00 mov 0x1293f8,%eax 10e4de: 48 dec %eax 10e4df: a3 f8 93 12 00 mov %eax,0x1293f8 10e4e4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e4e7: c9 leave 10e4e8: c3 ret =============================================================================== 00100238 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { 100238: 55 push %ebp 100239: 89 e5 mov %esp,%ebp } 10023b: c9 leave 10023c: c3 ret =============================================================================== 00119828 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 119828: 55 push %ebp 119829: 89 e5 mov %esp,%ebp 11982b: 57 push %edi 11982c: 56 push %esi 11982d: 53 push %ebx 11982e: 83 ec 4c sub $0x4c,%esp 119831: 8b 5d 08 mov 0x8(%ebp),%ebx 119834: 8d 45 e0 lea -0x20(%ebp),%eax 119837: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11983a: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 11983d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119844: 8d 4d dc lea -0x24(%ebp),%ecx 119847: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11984a: 8d 7d d0 lea -0x30(%ebp),%edi 11984d: 8d 45 d4 lea -0x2c(%ebp),%eax 119850: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119853: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 119856: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11985d: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119860: 8d 73 30 lea 0x30(%ebx),%esi /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119863: 8d 4b 68 lea 0x68(%ebx),%ecx 119866: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 119869: 8d 43 08 lea 0x8(%ebx),%eax 11986c: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11986f: 8d 53 40 lea 0x40(%ebx),%edx 119872: 89 55 c0 mov %edx,-0x40(%ebp) 119875: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 119878: 8d 4d dc lea -0x24(%ebp),%ecx 11987b: 89 4b 78 mov %ecx,0x78(%ebx) 11987e: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 119880: a1 c4 44 14 00 mov 0x1444c4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119885: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 119888: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988b: 51 push %ecx 11988c: 57 push %edi 11988d: 29 d0 sub %edx,%eax 11988f: 50 push %eax 119890: 56 push %esi 119891: e8 82 3c 00 00 call 11d518 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119896: a1 ec 43 14 00 mov 0x1443ec,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989b: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 11989e: 83 c4 10 add $0x10,%esp 1198a1: 39 d0 cmp %edx,%eax 1198a3: 77 63 ja 119908 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 1198a5: 72 7d jb 119924 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198a7: 89 43 74 mov %eax,0x74(%ebx) 1198aa: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1198ac: 8b 43 78 mov 0x78(%ebx),%eax 1198af: 83 ec 0c sub $0xc,%esp 1198b2: 50 push %eax 1198b3: e8 74 08 00 00 call 11a12c <_Chain_Get> if ( timer == NULL ) { 1198b8: 83 c4 10 add $0x10,%esp 1198bb: 85 c0 test %eax,%eax 1198bd: 74 35 je 1198f4 <_Timer_server_Body+0xcc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1198bf: 8b 50 38 mov 0x38(%eax),%edx 1198c2: 83 fa 01 cmp $0x1,%edx 1198c5: 74 19 je 1198e0 <_Timer_server_Body+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1198c7: 83 fa 03 cmp $0x3,%edx 1198ca: 75 e0 jne 1198ac <_Timer_server_Body+0x84><== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198cc: 83 ec 08 sub $0x8,%esp 1198cf: 83 c0 10 add $0x10,%eax 1198d2: 50 push %eax 1198d3: ff 75 c4 pushl -0x3c(%ebp) 1198d6: e8 d5 3c 00 00 call 11d5b0 <_Watchdog_Insert> 1198db: 83 c4 10 add $0x10,%esp 1198de: eb cc jmp 1198ac <_Timer_server_Body+0x84> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1198e0: 83 ec 08 sub $0x8,%esp 1198e3: 83 c0 10 add $0x10,%eax 1198e6: 50 push %eax 1198e7: 56 push %esi 1198e8: e8 c3 3c 00 00 call 11d5b0 <_Watchdog_Insert> 1198ed: 83 c4 10 add $0x10,%esp 1198f0: eb ba jmp 1198ac <_Timer_server_Body+0x84> 1198f2: 66 90 xchg %ax,%ax * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 1198f4: 9c pushf 1198f5: fa cli 1198f6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198f7: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fa: 3b 55 dc cmp -0x24(%ebp),%edx 1198fd: 74 41 je 119940 <_Timer_server_Body+0x118> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 1198ff: 50 push %eax 119900: 9d popf 119901: e9 7a ff ff ff jmp 119880 <_Timer_server_Body+0x58> 119906: 66 90 xchg %ax,%ax /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119908: 51 push %ecx 119909: 57 push %edi 11990a: 89 c1 mov %eax,%ecx 11990c: 29 d1 sub %edx,%ecx 11990e: 51 push %ecx 11990f: ff 75 c4 pushl -0x3c(%ebp) 119912: 89 45 b8 mov %eax,-0x48(%ebp) 119915: e8 fe 3b 00 00 call 11d518 <_Watchdog_Adjust_to_chain> 11991a: 83 c4 10 add $0x10,%esp 11991d: 8b 45 b8 mov -0x48(%ebp),%eax 119920: eb 85 jmp 1198a7 <_Timer_server_Body+0x7f> 119922: 66 90 xchg %ax,%ax /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 119924: 51 push %ecx 119925: 29 c2 sub %eax,%edx 119927: 52 push %edx 119928: 6a 01 push $0x1 11992a: ff 75 c4 pushl -0x3c(%ebp) 11992d: 89 45 b8 mov %eax,-0x48(%ebp) 119930: e8 6b 3b 00 00 call 11d4a0 <_Watchdog_Adjust> 119935: 83 c4 10 add $0x10,%esp 119938: 8b 45 b8 mov -0x48(%ebp),%eax 11993b: e9 67 ff ff ff jmp 1198a7 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119940: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 119947: 50 push %eax 119948: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 119949: 8b 4d b0 mov -0x50(%ebp),%ecx 11994c: 3b 4d d0 cmp -0x30(%ebp),%ecx 11994f: 75 23 jne 119974 <_Timer_server_Body+0x14c> 119951: eb 33 jmp 119986 <_Timer_server_Body+0x15e> 119953: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119954: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119956: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119959: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 11995c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119963: 51 push %ecx 119964: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 119965: 83 ec 08 sub $0x8,%esp 119968: ff 70 24 pushl 0x24(%eax) 11996b: ff 70 20 pushl 0x20(%eax) 11996e: ff 50 1c call *0x1c(%eax) } 119971: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 119974: 9c pushf 119975: fa cli 119976: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119977: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11997a: 39 45 b0 cmp %eax,-0x50(%ebp) 11997d: 75 d5 jne 119954 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 11997f: 51 push %ecx 119980: 9d popf 119981: e9 f2 fe ff ff jmp 119878 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119986: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998a: a1 58 43 14 00 mov 0x144358,%eax 11998f: 40 inc %eax 119990: a3 58 43 14 00 mov %eax,0x144358 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119995: 83 ec 08 sub $0x8,%esp 119998: 6a 08 push $0x8 11999a: ff 33 pushl (%ebx) 11999c: e8 0f 33 00 00 call 11ccb0 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a1: 89 d8 mov %ebx,%eax 1199a3: e8 e0 fd ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199a8: 89 d8 mov %ebx,%eax 1199aa: e8 29 fe ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199af: e8 c8 28 00 00 call 11c27c <_Thread_Enable_dispatch> ts->active = true; 1199b4: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1199b8: 58 pop %eax 1199b9: ff 75 bc pushl -0x44(%ebp) 1199bc: e8 17 3d 00 00 call 11d6d8 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c1: 59 pop %ecx 1199c2: ff 75 c0 pushl -0x40(%ebp) 1199c5: e8 0e 3d 00 00 call 11d6d8 <_Watchdog_Remove> 1199ca: 83 c4 10 add $0x10,%esp 1199cd: e9 a6 fe ff ff jmp 119878 <_Timer_server_Body+0x50> =============================================================================== 001199d4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d4: 55 push %ebp 1199d5: 89 e5 mov %esp,%ebp 1199d7: 57 push %edi 1199d8: 56 push %esi 1199d9: 53 push %ebx 1199da: 83 ec 2c sub $0x2c,%esp 1199dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e0: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e3: 8b 53 78 mov 0x78(%ebx),%edx 1199e6: 85 d2 test %edx,%edx 1199e8: 74 16 je 119a00 <_Timer_server_Schedule_operation_method+0x2c> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1199ea: 8b 53 78 mov 0x78(%ebx),%edx 1199ed: 89 45 0c mov %eax,0xc(%ebp) 1199f0: 89 55 08 mov %edx,0x8(%ebp) } } 1199f3: 8d 65 f4 lea -0xc(%ebp),%esp 1199f6: 5b pop %ebx 1199f7: 5e pop %esi 1199f8: 5f pop %edi 1199f9: c9 leave * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1199fa: e9 f1 06 00 00 jmp 11a0f0 <_Chain_Append> 1199ff: 90 nop 119a00: 8b 15 58 43 14 00 mov 0x144358,%edx 119a06: 42 inc %edx 119a07: 89 15 58 43 14 00 mov %edx,0x144358 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a0d: 8b 50 38 mov 0x38(%eax),%edx 119a10: 83 fa 01 cmp $0x1,%edx 119a13: 74 77 je 119a8c <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 119a15: 83 fa 03 cmp $0x3,%edx 119a18: 74 0e je 119a28 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 119a1a: 8d 65 f4 lea -0xc(%ebp),%esp 119a1d: 5b pop %ebx 119a1e: 5e pop %esi 119a1f: 5f pop %edi 119a20: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a21: e9 56 28 00 00 jmp 11c27c <_Thread_Enable_dispatch> 119a26: 66 90 xchg %ax,%ax } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a28: 9c pushf 119a29: fa cli 119a2a: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a2d: 8b 0d ec 43 14 00 mov 0x1443ec,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a33: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a36: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a39: 8d 7b 6c lea 0x6c(%ebx),%edi 119a3c: 39 fa cmp %edi,%edx 119a3e: 74 22 je 119a62 <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119a40: 8b 7a 10 mov 0x10(%edx),%edi 119a43: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a46: 39 f1 cmp %esi,%ecx 119a48: 0f 86 9e 00 00 00 jbe 119aec <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a4e: 89 cf mov %ecx,%edi 119a50: 29 f7 sub %esi,%edi 119a52: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a54: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a57: 0f 87 9b 00 00 00 ja 119af8 <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a5d: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119a5f: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a62: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a65: ff 75 e4 pushl -0x1c(%ebp) 119a68: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a69: 83 ec 08 sub $0x8,%esp 119a6c: 83 c0 10 add $0x10,%eax 119a6f: 50 push %eax 119a70: 8d 43 68 lea 0x68(%ebx),%eax 119a73: 50 push %eax 119a74: e8 37 3b 00 00 call 11d5b0 <_Watchdog_Insert> if ( !ts->active ) { 119a79: 8a 43 7c mov 0x7c(%ebx),%al 119a7c: 83 c4 10 add $0x10,%esp 119a7f: 84 c0 test %al,%al 119a81: 75 97 jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a83: 89 d8 mov %ebx,%eax 119a85: e8 4e fd ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> 119a8a: eb 8e jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a8c: 9c pushf 119a8d: fa cli 119a8e: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a91: 8b 0d c4 44 14 00 mov 0x1444c4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a97: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a9a: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a9d: 8d 7b 34 lea 0x34(%ebx),%edi 119aa0: 39 fa cmp %edi,%edx 119aa2: 74 12 je 119ab6 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa4: 89 cf mov %ecx,%edi 119aa6: 29 f7 sub %esi,%edi 119aa8: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aaa: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119aad: 39 fe cmp %edi,%esi 119aaf: 72 37 jb 119ae8 <_Timer_server_Schedule_operation_method+0x114> 119ab1: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab3: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119ab6: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119ab9: ff 75 e4 pushl -0x1c(%ebp) 119abc: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119abd: 83 ec 08 sub $0x8,%esp 119ac0: 83 c0 10 add $0x10,%eax 119ac3: 50 push %eax 119ac4: 8d 43 30 lea 0x30(%ebx),%eax 119ac7: 50 push %eax 119ac8: e8 e3 3a 00 00 call 11d5b0 <_Watchdog_Insert> if ( !ts->active ) { 119acd: 8a 43 7c mov 0x7c(%ebx),%al 119ad0: 83 c4 10 add $0x10,%esp 119ad3: 84 c0 test %al,%al 119ad5: 0f 85 3f ff ff ff jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adb: 89 d8 mov %ebx,%eax 119add: e8 a6 fc ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> 119ae2: e9 33 ff ff ff jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> 119ae7: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119ae8: 29 f7 sub %esi,%edi 119aea: eb c7 jmp 119ab3 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119aec: 8b 7d d4 mov -0x2c(%ebp),%edi 119aef: 01 f7 add %esi,%edi delta_interval += delta; 119af1: 29 cf sub %ecx,%edi 119af3: e9 67 ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119af8: 8b 7d d4 mov -0x2c(%ebp),%edi 119afb: 29 f7 sub %esi,%edi 119afd: e9 5d ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 0012b098 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 12b098: 55 push %ebp 12b099: 89 e5 mov %esp,%ebp 12b09b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 12b09e: 85 c0 test %eax,%eax 12b0a0: 74 1a je 12b0bc <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 12b0a2: 8b 10 mov (%eax),%edx 12b0a4: 85 d2 test %edx,%edx 12b0a6: 78 14 js 12b0bc <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 12b0a8: 8b 40 04 mov 0x4(%eax),%eax 12b0ab: 85 c0 test %eax,%eax 12b0ad: 78 0d js 12b0bc <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 12b0af: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 12b0b4: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12b0b7: c9 leave 12b0b8: c3 ret 12b0b9: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 12b0bc: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12b0be: c9 leave 12b0bf: c3 ret =============================================================================== 0010ea88 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10ea88: 55 push %ebp 10ea89: 89 e5 mov %esp,%ebp 10ea8b: 57 push %edi 10ea8c: 56 push %esi 10ea8d: 53 push %ebx 10ea8e: 83 ec 1c sub $0x1c,%esp 10ea91: 8b 75 08 mov 0x8(%ebp),%esi 10ea94: 8b 7d 10 mov 0x10(%ebp),%edi 10ea97: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea9a: 8b 1d 54 96 12 00 mov 0x129654,%ebx 10eaa0: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10eaa6: 74 25 je 10eacd <_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 ); 10eaa8: 0f b6 c0 movzbl %al,%eax 10eaab: 89 45 e4 mov %eax,-0x1c(%ebp) 10eaae: 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 ) 10eab0: 8b 43 30 mov 0x30(%ebx),%eax 10eab3: 85 c0 test %eax,%eax 10eab5: 74 0b je 10eac2 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10eab7: 52 push %edx 10eab8: 57 push %edi 10eab9: ff 75 e4 pushl -0x1c(%ebp) 10eabc: 56 push %esi 10eabd: ff d0 call *%eax 10eabf: 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 ) { 10eac2: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eac5: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10eacb: 75 e3 jne 10eab0 <_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 ); } } 10eacd: 8d 65 f4 lea -0xc(%ebp),%esp 10ead0: 5b pop %ebx 10ead1: 5e pop %esi 10ead2: 5f pop %edi 10ead3: c9 leave 10ead4: c3 ret =============================================================================== 0010e94c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e94c: 55 push %ebp 10e94d: 89 e5 mov %esp,%ebp 10e94f: 57 push %edi 10e950: 56 push %esi 10e951: 53 push %ebx 10e952: 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; 10e955: a1 58 52 12 00 mov 0x125258,%eax 10e95a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e95d: 8b 35 5c 52 12 00 mov 0x12525c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e963: c7 05 4c 96 12 00 50 movl $0x129650,0x12964c 10e96a: 96 12 00 the_chain->permanent_null = NULL; 10e96d: c7 05 50 96 12 00 00 movl $0x0,0x129650 10e974: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e977: c7 05 54 96 12 00 4c movl $0x12964c,0x129654 10e97e: 96 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e981: c7 05 fc 93 12 00 00 movl $0x129400,0x1293fc 10e988: 94 12 00 the_chain->permanent_null = NULL; 10e98b: c7 05 00 94 12 00 00 movl $0x0,0x129400 10e992: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e995: c7 05 04 94 12 00 fc movl $0x1293fc,0x129404 10e99c: 93 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e99f: 85 f6 test %esi,%esi 10e9a1: 74 64 je 10ea07 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e9a3: 89 c2 mov %eax,%edx 10e9a5: 8d 04 40 lea (%eax,%eax,2),%eax 10e9a8: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e9ab: c1 e1 02 shl $0x2,%ecx 10e9ae: 83 ec 0c sub $0xc,%esp 10e9b1: 51 push %ecx 10e9b2: 89 4d d8 mov %ecx,-0x28(%ebp) 10e9b5: e8 26 04 00 00 call 10ede0 <_Workspace_Allocate_or_fatal_error> 10e9ba: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e9bc: 31 c0 xor %eax,%eax 10e9be: 8b 4d d8 mov -0x28(%ebp),%ecx 10e9c1: 89 df mov %ebx,%edi 10e9c3: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e9c5: 83 c4 10 add $0x10,%esp 10e9c8: 8b 45 dc mov -0x24(%ebp),%eax 10e9cb: 85 c0 test %eax,%eax 10e9cd: 74 38 je 10ea07 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e9cf: 89 75 e4 mov %esi,-0x1c(%ebp) 10e9d2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e9d9: 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; 10e9dc: 8d 7b 14 lea 0x14(%ebx),%edi 10e9df: 8b 75 e4 mov -0x1c(%ebp),%esi 10e9e2: b9 08 00 00 00 mov $0x8,%ecx 10e9e7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e9e9: 83 ec 0c sub $0xc,%esp 10e9ec: 53 push %ebx 10e9ed: e8 ae 40 00 00 call 112aa0 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e9f2: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e9f5: ff 45 e0 incl -0x20(%ebp) 10e9f8: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e9fc: 83 c4 10 add $0x10,%esp 10e9ff: 8b 45 e0 mov -0x20(%ebp),%eax 10ea02: 39 45 dc cmp %eax,-0x24(%ebp) 10ea05: 77 d5 ja 10e9dc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10ea07: 8d 65 f4 lea -0xc(%ebp),%esp 10ea0a: 5b pop %ebx 10ea0b: 5e pop %esi 10ea0c: 5f pop %edi 10ea0d: c9 leave 10ea0e: c3 ret =============================================================================== 00113784 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113784: 55 push %ebp 113785: 89 e5 mov %esp,%ebp 113787: 53 push %ebx 113788: 83 ec 10 sub $0x10,%esp 11378b: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 11378e: 53 push %ebx 11378f: e8 00 db ff ff call 111294 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113794: 83 c4 10 add $0x10,%esp 113797: 8b 43 24 mov 0x24(%ebx),%eax 11379a: 85 c0 test %eax,%eax 11379c: 74 12 je 1137b0 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 11379e: 83 c3 08 add $0x8,%ebx 1137a1: 89 5d 08 mov %ebx,0x8(%ebp) } 1137a4: 8b 5d fc mov -0x4(%ebp),%ebx 1137a7: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 1137a8: e9 e7 da ff ff jmp 111294 <_Chain_Extract> 1137ad: 8d 76 00 lea 0x0(%esi),%esi } 1137b0: 8b 5d fc mov -0x4(%ebp),%ebx 1137b3: c9 leave 1137b4: c3 ret =============================================================================== 0010ea10 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10ea10: 55 push %ebp 10ea11: 89 e5 mov %esp,%ebp 10ea13: 56 push %esi 10ea14: 53 push %ebx 10ea15: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea18: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx 10ea1e: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10ea24: 74 1c je 10ea42 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10ea26: 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 ) 10ea28: 8b 43 28 mov 0x28(%ebx),%eax 10ea2b: 85 c0 test %eax,%eax 10ea2d: 74 09 je 10ea38 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10ea2f: 83 ec 0c sub $0xc,%esp 10ea32: 56 push %esi 10ea33: ff d0 call *%eax 10ea35: 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 ) { 10ea38: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea3a: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10ea40: 75 e6 jne 10ea28 <_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 ); } } 10ea42: 8d 65 f8 lea -0x8(%ebp),%esp 10ea45: 5b pop %ebx 10ea46: 5e pop %esi 10ea47: c9 leave 10ea48: c3 ret =============================================================================== 0010ead8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10ead8: 55 push %ebp 10ead9: 89 e5 mov %esp,%ebp 10eadb: 56 push %esi 10eadc: 53 push %ebx 10eadd: 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 ; 10eae0: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx 10eae6: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10eaec: 74 26 je 10eb14 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10eaee: 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 ) { 10eaf0: 8b 43 14 mov 0x14(%ebx),%eax 10eaf3: 85 c0 test %eax,%eax 10eaf5: 74 13 je 10eb0a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10eaf7: 83 ec 08 sub $0x8,%esp 10eafa: 56 push %esi 10eafb: ff 35 b8 94 12 00 pushl 0x1294b8 10eb01: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10eb03: 83 c4 10 add $0x10,%esp 10eb06: 84 c0 test %al,%al 10eb08: 74 0c je 10eb16 <_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 ) { 10eb0a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10eb0c: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10eb12: 75 dc jne 10eaf0 <_User_extensions_Thread_create+0x18> 10eb14: b0 01 mov $0x1,%al return false; } } return true; } 10eb16: 8d 65 f8 lea -0x8(%ebp),%esp 10eb19: 5b pop %ebx 10eb1a: 5e pop %esi 10eb1b: c9 leave 10eb1c: c3 ret =============================================================================== 0010eb20 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10eb20: 55 push %ebp 10eb21: 89 e5 mov %esp,%ebp 10eb23: 56 push %esi 10eb24: 53 push %ebx 10eb25: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eb28: 8b 1d 54 96 12 00 mov 0x129654,%ebx 10eb2e: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10eb34: 74 23 je 10eb59 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10eb36: 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 ) 10eb38: 8b 43 20 mov 0x20(%ebx),%eax 10eb3b: 85 c0 test %eax,%eax 10eb3d: 74 0f je 10eb4e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10eb3f: 83 ec 08 sub $0x8,%esp 10eb42: 56 push %esi 10eb43: ff 35 b8 94 12 00 pushl 0x1294b8 10eb49: ff d0 call *%eax 10eb4b: 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 ) { 10eb4e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eb51: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10eb57: 75 df jne 10eb38 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10eb59: 8d 65 f8 lea -0x8(%ebp),%esp 10eb5c: 5b pop %ebx 10eb5d: 5e pop %esi 10eb5e: c9 leave 10eb5f: c3 ret =============================================================================== 0010ea4c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ea4c: 55 push %ebp 10ea4d: 89 e5 mov %esp,%ebp 10ea4f: 56 push %esi 10ea50: 53 push %ebx 10ea51: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea54: 8b 1d 54 96 12 00 mov 0x129654,%ebx 10ea5a: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10ea60: 74 1d je 10ea7f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10ea62: 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 ) 10ea64: 8b 43 2c mov 0x2c(%ebx),%eax 10ea67: 85 c0 test %eax,%eax 10ea69: 74 09 je 10ea74 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10ea6b: 83 ec 0c sub $0xc,%esp 10ea6e: 56 push %esi 10ea6f: ff d0 call *%eax 10ea71: 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 ) { 10ea74: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea77: 81 fb 4c 96 12 00 cmp $0x12964c,%ebx 10ea7d: 75 e5 jne 10ea64 <_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 ); } } 10ea7f: 8d 65 f8 lea -0x8(%ebp),%esp 10ea82: 5b pop %ebx 10ea83: 5e pop %esi 10ea84: c9 leave 10ea85: c3 ret =============================================================================== 0010f714 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f714: 55 push %ebp 10f715: 89 e5 mov %esp,%ebp 10f717: 56 push %esi 10f718: 53 push %ebx 10f719: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f71c: 8b 1d ac a6 12 00 mov 0x12a6ac,%ebx 10f722: 81 fb b0 a6 12 00 cmp $0x12a6b0,%ebx 10f728: 74 22 je 10f74c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f72a: 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 ) 10f72c: 8b 43 1c mov 0x1c(%ebx),%eax 10f72f: 85 c0 test %eax,%eax 10f731: 74 0f je 10f742 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f733: 83 ec 08 sub $0x8,%esp 10f736: 56 push %esi 10f737: ff 35 18 a5 12 00 pushl 0x12a518 10f73d: ff d0 call *%eax 10f73f: 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 ) { 10f742: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f744: 81 fb b0 a6 12 00 cmp $0x12a6b0,%ebx 10f74a: 75 e0 jne 10f72c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f74c: 8d 65 f8 lea -0x8(%ebp),%esp 10f74f: 5b pop %ebx 10f750: 5e pop %esi 10f751: c9 leave 10f752: c3 ret =============================================================================== 0010eb60 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10eb60: 55 push %ebp 10eb61: 89 e5 mov %esp,%ebp 10eb63: 56 push %esi 10eb64: 53 push %ebx 10eb65: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eb68: 8b 1d 4c 96 12 00 mov 0x12964c,%ebx 10eb6e: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10eb74: 74 22 je 10eb98 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10eb76: 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 ) 10eb78: 8b 43 18 mov 0x18(%ebx),%eax 10eb7b: 85 c0 test %eax,%eax 10eb7d: 74 0f je 10eb8e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10eb7f: 83 ec 08 sub $0x8,%esp 10eb82: 56 push %esi 10eb83: ff 35 b8 94 12 00 pushl 0x1294b8 10eb89: ff d0 call *%eax 10eb8b: 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 ) { 10eb8e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eb90: 81 fb 50 96 12 00 cmp $0x129650,%ebx 10eb96: 75 e0 jne 10eb78 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10eb98: 8d 65 f8 lea -0x8(%ebp),%esp 10eb9b: 5b pop %ebx 10eb9c: 5e pop %esi 10eb9d: c9 leave 10eb9e: c3 ret =============================================================================== 0010eba0 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10eba0: 55 push %ebp 10eba1: 89 e5 mov %esp,%ebp 10eba3: 57 push %edi 10eba4: 56 push %esi 10eba5: 53 push %ebx 10eba6: 83 ec 0c sub $0xc,%esp 10eba9: 8b 7d 08 mov 0x8(%ebp),%edi 10ebac: 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 ; 10ebaf: 8b 1d fc 93 12 00 mov 0x1293fc,%ebx 10ebb5: 81 fb 00 94 12 00 cmp $0x129400,%ebx 10ebbb: 74 18 je 10ebd5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ebbd: 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 ); 10ebc0: 83 ec 08 sub $0x8,%esp 10ebc3: 56 push %esi 10ebc4: 57 push %edi 10ebc5: 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 ) { 10ebc8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ebca: 83 c4 10 add $0x10,%esp 10ebcd: 81 fb 00 94 12 00 cmp $0x129400,%ebx 10ebd3: 75 eb jne 10ebc0 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ebd5: 8d 65 f4 lea -0xc(%ebp),%esp 10ebd8: 5b pop %ebx 10ebd9: 5e pop %esi 10ebda: 5f pop %edi 10ebdb: c9 leave 10ebdc: c3 ret =============================================================================== 001105d8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 1105d8: 55 push %ebp 1105d9: 89 e5 mov %esp,%ebp 1105db: 57 push %edi 1105dc: 56 push %esi 1105dd: 53 push %ebx 1105de: 83 ec 1c sub $0x1c,%esp 1105e1: 8b 75 08 mov 0x8(%ebp),%esi 1105e4: 8b 4d 0c mov 0xc(%ebp),%ecx 1105e7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1105ea: 9c pushf 1105eb: fa cli 1105ec: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1105ed: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1105ef: 8d 7e 04 lea 0x4(%esi),%edi 1105f2: 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 ) ) { 1105f5: 39 fa cmp %edi,%edx 1105f7: 74 3d je 110636 <_Watchdog_Adjust+0x5e> switch ( direction ) { 1105f9: 85 c9 test %ecx,%ecx 1105fb: 75 43 jne 110640 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 1105fd: 85 db test %ebx,%ebx 1105ff: 74 35 je 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110601: 8b 7a 10 mov 0x10(%edx),%edi 110604: 39 fb cmp %edi,%ebx 110606: 73 0f jae 110617 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110608: eb 3e jmp 110648 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 11060a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 11060c: 29 fb sub %edi,%ebx 11060e: 74 26 je 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110610: 8b 7a 10 mov 0x10(%edx),%edi 110613: 39 df cmp %ebx,%edi 110615: 77 31 ja 110648 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 110617: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 11061e: 50 push %eax 11061f: 9d popf _Watchdog_Tickle( header ); 110620: 83 ec 0c sub $0xc,%esp 110623: 56 push %esi 110624: e8 bb 01 00 00 call 1107e4 <_Watchdog_Tickle> _ISR_Disable( level ); 110629: 9c pushf 11062a: fa cli 11062b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11062c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 11062e: 83 c4 10 add $0x10,%esp 110631: 39 55 e4 cmp %edx,-0x1c(%ebp) 110634: 75 d6 jne 11060c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 110636: 50 push %eax 110637: 9d popf } 110638: 8d 65 f4 lea -0xc(%ebp),%esp 11063b: 5b pop %ebx 11063c: 5e pop %esi 11063d: 5f pop %edi 11063e: c9 leave 11063f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 110640: 49 dec %ecx 110641: 75 f3 jne 110636 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 110643: 01 5a 10 add %ebx,0x10(%edx) break; 110646: eb ee jmp 110636 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 110648: 29 df sub %ebx,%edi 11064a: 89 7a 10 mov %edi,0x10(%edx) break; 11064d: eb e7 jmp 110636 <_Watchdog_Adjust+0x5e> =============================================================================== 0011d518 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d518: 55 push %ebp 11d519: 89 e5 mov %esp,%ebp 11d51b: 57 push %edi 11d51c: 56 push %esi 11d51d: 53 push %ebx 11d51e: 83 ec 0c sub $0xc,%esp 11d521: 8b 75 08 mov 0x8(%ebp),%esi 11d524: 8b 55 0c mov 0xc(%ebp),%edx 11d527: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d52a: 85 d2 test %edx,%edx 11d52c: 74 63 je 11d591 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d52e: 9c pushf 11d52f: fa cli 11d530: 8f 45 ec popl -0x14(%ebp) 11d533: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d535: 8d 4e 04 lea 0x4(%esi),%ecx 11d538: 89 4d f0 mov %ecx,-0x10(%ebp) 11d53b: 8d 7b 04 lea 0x4(%ebx),%edi 11d53e: 89 55 e8 mov %edx,-0x18(%ebp) 11d541: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d544: 39 45 f0 cmp %eax,-0x10(%ebp) 11d547: 74 44 je 11d58d <_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 ) { 11d549: 8b 50 10 mov 0x10(%eax),%edx 11d54c: 3b 55 e8 cmp -0x18(%ebp),%edx 11d54f: 77 57 ja 11d5a8 <_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; 11d551: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d554: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d55b: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d55c: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d55e: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d561: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d564: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d566: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d568: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d56b: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d56e: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d570: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d573: ff 75 ec pushl -0x14(%ebp) 11d576: 9d popf 11d577: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d578: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d57a: 39 45 f0 cmp %eax,-0x10(%ebp) 11d57d: 74 1d je 11d59c <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d57f: 8b 50 10 mov 0x10(%eax),%edx 11d582: 85 d2 test %edx,%edx 11d584: 74 d6 je 11d55c <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d586: 8b 4d e8 mov -0x18(%ebp),%ecx 11d589: 85 c9 test %ecx,%ecx 11d58b: 75 b7 jne 11d544 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d58d: ff 75 ec pushl -0x14(%ebp) 11d590: 9d popf } 11d591: 83 c4 0c add $0xc,%esp 11d594: 5b pop %ebx 11d595: 5e pop %esi 11d596: 5f pop %edi 11d597: c9 leave 11d598: c3 ret 11d599: 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; 11d59c: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d59f: 8b 4d e8 mov -0x18(%ebp),%ecx 11d5a2: 85 c9 test %ecx,%ecx 11d5a4: 75 9e jne 11d544 <_Watchdog_Adjust_to_chain+0x2c> 11d5a6: eb e5 jmp 11d58d <_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; 11d5a8: 2b 55 e8 sub -0x18(%ebp),%edx 11d5ab: 89 50 10 mov %edx,0x10(%eax) break; 11d5ae: eb dd jmp 11d58d <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ebe0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ebe0: 55 push %ebp 10ebe1: 89 e5 mov %esp,%ebp 10ebe3: 57 push %edi 10ebe4: 56 push %esi 10ebe5: 53 push %ebx 10ebe6: 83 ec 04 sub $0x4,%esp 10ebe9: 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; 10ebec: 8b 3d 94 94 12 00 mov 0x129494,%edi _ISR_Disable( level ); 10ebf2: 9c pushf 10ebf3: fa cli 10ebf4: 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 ) { 10ebf7: 8b 43 08 mov 0x8(%ebx),%eax 10ebfa: 85 c0 test %eax,%eax 10ebfc: 75 69 jne 10ec67 <_Watchdog_Insert+0x87> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10ebfe: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10ec05: a1 60 95 12 00 mov 0x129560,%eax 10ec0a: 40 inc %eax 10ec0b: a3 60 95 12 00 mov %eax,0x129560 restart: delta_interval = the_watchdog->initial; 10ec10: 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 ; 10ec13: 8b 4d 08 mov 0x8(%ebp),%ecx 10ec16: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10ec18: 85 c0 test %eax,%eax 10ec1a: 74 5d je 10ec79 <_Watchdog_Insert+0x99> 10ec1c: 8b 32 mov (%edx),%esi 10ec1e: 85 f6 test %esi,%esi 10ec20: 74 57 je 10ec79 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10ec22: 8b 4a 10 mov 0x10(%edx),%ecx 10ec25: 39 c8 cmp %ecx,%eax 10ec27: 73 22 jae 10ec4b <_Watchdog_Insert+0x6b> 10ec29: eb 49 jmp 10ec74 <_Watchdog_Insert+0x94> 10ec2b: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ec2c: 8b 35 b4 94 12 00 mov 0x1294b4,%esi 10ec32: 39 f7 cmp %esi,%edi 10ec34: 72 66 jb 10ec9c <_Watchdog_Insert+0xbc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10ec36: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10ec38: 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 ) ) 10ec3a: 85 c0 test %eax,%eax 10ec3c: 74 3b je 10ec79 <_Watchdog_Insert+0x99> 10ec3e: 8b 0a mov (%edx),%ecx 10ec40: 85 c9 test %ecx,%ecx 10ec42: 74 35 je 10ec79 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10ec44: 8b 4a 10 mov 0x10(%edx),%ecx 10ec47: 39 c1 cmp %eax,%ecx 10ec49: 77 29 ja 10ec74 <_Watchdog_Insert+0x94> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10ec4b: ff 75 f0 pushl -0x10(%ebp) 10ec4e: 9d popf 10ec4f: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10ec50: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10ec54: 74 d6 je 10ec2c <_Watchdog_Insert+0x4c> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10ec56: 89 3d b4 94 12 00 mov %edi,0x1294b4 _Watchdog_Sync_count--; 10ec5c: a1 60 95 12 00 mov 0x129560,%eax 10ec61: 48 dec %eax 10ec62: a3 60 95 12 00 mov %eax,0x129560 _ISR_Enable( level ); 10ec67: ff 75 f0 pushl -0x10(%ebp) 10ec6a: 9d popf } 10ec6b: 58 pop %eax 10ec6c: 5b pop %ebx 10ec6d: 5e pop %esi 10ec6e: 5f pop %edi 10ec6f: c9 leave 10ec70: c3 ret 10ec71: 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; 10ec74: 29 c1 sub %eax,%ecx 10ec76: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10ec79: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10ec80: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10ec83: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec86: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10ec89: 8b 10 mov (%eax),%edx after_node->next = the_node; 10ec8b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10ec8d: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10ec8f: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10ec92: a1 64 95 12 00 mov 0x129564,%eax 10ec97: 89 43 14 mov %eax,0x14(%ebx) 10ec9a: eb ba jmp 10ec56 <_Watchdog_Insert+0x76> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10ec9c: 89 3d b4 94 12 00 mov %edi,0x1294b4 goto restart; 10eca2: e9 69 ff ff ff jmp 10ec10 <_Watchdog_Insert+0x30> =============================================================================== 0010ed08 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ed08: 55 push %ebp 10ed09: 89 e5 mov %esp,%ebp 10ed0b: 56 push %esi 10ed0c: 53 push %ebx 10ed0d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ed10: 9c pushf 10ed11: fa cli 10ed12: 59 pop %ecx previous_state = the_watchdog->state; 10ed13: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ed16: 83 f8 01 cmp $0x1,%eax 10ed19: 74 4d je 10ed68 <_Watchdog_Remove+0x60> 10ed1b: 73 0f jae 10ed2c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ed1d: 8b 1d 64 95 12 00 mov 0x129564,%ebx 10ed23: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ed26: 51 push %ecx 10ed27: 9d popf return( previous_state ); } 10ed28: 5b pop %ebx 10ed29: 5e pop %esi 10ed2a: c9 leave 10ed2b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ed2c: 83 f8 03 cmp $0x3,%eax 10ed2f: 77 ec ja 10ed1d <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ed31: 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 ); 10ed38: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ed3a: 8b 33 mov (%ebx),%esi 10ed3c: 85 f6 test %esi,%esi 10ed3e: 74 06 je 10ed46 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ed40: 8b 72 10 mov 0x10(%edx),%esi 10ed43: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ed46: 8b 35 60 95 12 00 mov 0x129560,%esi 10ed4c: 85 f6 test %esi,%esi 10ed4e: 74 0c je 10ed5c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ed50: 8b 35 94 94 12 00 mov 0x129494,%esi 10ed56: 89 35 b4 94 12 00 mov %esi,0x1294b4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ed5c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ed5f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ed62: 89 1e mov %ebx,(%esi) 10ed64: eb b7 jmp 10ed1d <_Watchdog_Remove+0x15> 10ed66: 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; 10ed68: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ed6f: eb ac jmp 10ed1d <_Watchdog_Remove+0x15> =============================================================================== 0011016c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 11016c: 55 push %ebp 11016d: 89 e5 mov %esp,%ebp 11016f: 57 push %edi 110170: 56 push %esi 110171: 53 push %ebx 110172: 83 ec 2c sub $0x2c,%esp 110175: 8b 55 08 mov 0x8(%ebp),%edx 110178: 8b 45 0c mov 0xc(%ebp),%eax printk( 11017b: 8b 78 24 mov 0x24(%eax),%edi 11017e: 8b 70 20 mov 0x20(%eax),%esi 110181: 8b 58 1c mov 0x1c(%eax),%ebx 110184: 8b 48 0c mov 0xc(%eax),%ecx 110187: 89 4d d4 mov %ecx,-0x2c(%ebp) 11018a: 8b 48 10 mov 0x10(%eax),%ecx 11018d: 89 4d e0 mov %ecx,-0x20(%ebp) 110190: 85 d2 test %edx,%edx 110192: 74 2c je 1101c0 <_Watchdog_Report+0x54> 110194: b9 e3 48 12 00 mov $0x1248e3,%ecx 110199: 83 ec 0c sub $0xc,%esp 11019c: 57 push %edi 11019d: 56 push %esi 11019e: 53 push %ebx 11019f: 50 push %eax 1101a0: ff 75 d4 pushl -0x2c(%ebp) 1101a3: ff 75 e0 pushl -0x20(%ebp) 1101a6: 51 push %ecx 1101a7: 52 push %edx 1101a8: 68 e6 52 12 00 push $0x1252e6 1101ad: e8 0e 9e ff ff call 109fc0 1101b2: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 1101b5: 8d 65 f4 lea -0xc(%ebp),%esp 1101b8: 5b pop %ebx 1101b9: 5e pop %esi 1101ba: 5f pop %edi 1101bb: c9 leave 1101bc: c3 ret 1101bd: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 1101c0: b9 35 51 12 00 mov $0x125135,%ecx 1101c5: 89 ca mov %ecx,%edx 1101c7: eb d0 jmp 110199 <_Watchdog_Report+0x2d> =============================================================================== 001100fc <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 1100fc: 55 push %ebp 1100fd: 89 e5 mov %esp,%ebp 1100ff: 57 push %edi 110100: 56 push %esi 110101: 53 push %ebx 110102: 83 ec 20 sub $0x20,%esp 110105: 8b 7d 08 mov 0x8(%ebp),%edi 110108: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 11010b: 9c pushf 11010c: fa cli 11010d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 110110: 56 push %esi 110111: 57 push %edi 110112: 68 b0 52 12 00 push $0x1252b0 110117: e8 a4 9e ff ff call 109fc0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11011c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11011e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 110121: 83 c4 10 add $0x10,%esp 110124: 39 f3 cmp %esi,%ebx 110126: 74 31 je 110159 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 110128: 83 ec 08 sub $0x8,%esp 11012b: 53 push %ebx 11012c: 6a 00 push $0x0 11012e: e8 39 00 00 00 call 11016c <_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 ) 110133: 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 ; 110135: 83 c4 10 add $0x10,%esp 110138: 39 f3 cmp %esi,%ebx 11013a: 75 ec jne 110128 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 11013c: 83 ec 08 sub $0x8,%esp 11013f: 57 push %edi 110140: 68 c7 52 12 00 push $0x1252c7 110145: e8 76 9e ff ff call 109fc0 11014a: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 11014d: ff 75 e4 pushl -0x1c(%ebp) 110150: 9d popf } 110151: 8d 65 f4 lea -0xc(%ebp),%esp 110154: 5b pop %ebx 110155: 5e pop %esi 110156: 5f pop %edi 110157: c9 leave 110158: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110159: 83 ec 0c sub $0xc,%esp 11015c: 68 d6 52 12 00 push $0x1252d6 110161: e8 5a 9e ff ff call 109fc0 110166: 83 c4 10 add $0x10,%esp 110169: eb e2 jmp 11014d <_Watchdog_Report_chain+0x51> =============================================================================== 0010ee40 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ee40: 55 push %ebp 10ee41: 89 e5 mov %esp,%ebp 10ee43: 57 push %edi 10ee44: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ee45: 8b 1d 20 52 12 00 mov 0x125220,%ebx uintptr_t size = Configuration.work_space_size; 10ee4b: 8b 15 24 52 12 00 mov 0x125224,%edx if ( Configuration.do_zero_of_workspace ) 10ee51: 80 3d 48 52 12 00 00 cmpb $0x0,0x125248 10ee58: 75 1e jne 10ee78 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ee5a: 6a 04 push $0x4 10ee5c: 52 push %edx 10ee5d: 53 push %ebx 10ee5e: 68 20 94 12 00 push $0x129420 10ee63: e8 24 dd ff ff call 10cb8c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ee68: 83 c4 10 add $0x10,%esp 10ee6b: 85 c0 test %eax,%eax 10ee6d: 74 13 je 10ee82 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ee6f: 8d 65 f8 lea -0x8(%ebp),%esp 10ee72: 5b pop %ebx 10ee73: 5f pop %edi 10ee74: c9 leave 10ee75: c3 ret 10ee76: 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 ); 10ee78: 31 c0 xor %eax,%eax 10ee7a: 89 df mov %ebx,%edi 10ee7c: 89 d1 mov %edx,%ecx 10ee7e: f3 aa rep stos %al,%es:(%edi) 10ee80: eb d8 jmp 10ee5a <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ee82: 52 push %edx 10ee83: 6a 03 push $0x3 10ee85: 6a 01 push $0x1 10ee87: 6a 00 push $0x0 10ee89: e8 22 e0 ff ff call 10ceb0 <_Internal_error_Occurred> =============================================================================== 001208b4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 1208b4: 55 push %ebp 1208b5: 89 e5 mov %esp,%ebp 1208b7: 83 ec 08 sub $0x8,%esp 1208ba: e8 be 06 00 00 call 120f7d <_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(); 1208bf: e8 88 ff ff ff call 12084c rtems_shutdown_executive(status); 1208c4: 83 ec 0c sub $0xc,%esp 1208c7: ff 75 08 pushl 0x8(%ebp) 1208ca: e8 fd 00 00 00 call 1209cc 1208cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1208d2: eb fe jmp 1208d2 <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0012bf9c <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 12bf9c: 55 push %ebp <== NOT EXECUTED 12bf9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bf9f: 57 push %edi <== NOT EXECUTED 12bfa0: 56 push %esi <== NOT EXECUTED 12bfa1: 53 push %ebx <== NOT EXECUTED 12bfa2: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 12bfa5: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12bfa8: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 12bfab: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12bfae: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12bfb1: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12bfb3: 74 6c je 12c021 <_fat_block_read+0x85> <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 12bfb5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 12bfbc: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 12bfbf: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bfc2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12bfc5: 31 db xor %ebx,%ebx <== NOT EXECUTED 12bfc7: eb 31 jmp 12bffa <_fat_block_read+0x5e> <== NOT EXECUTED 12bfc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 12bfcc: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12bfcf: 0f b7 02 movzwl (%edx),%eax <== NOT EXECUTED 12bfd2: 29 f0 sub %esi,%eax <== NOT EXECUTED 12bfd4: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED 12bfd7: 76 03 jbe 12bfdc <_fat_block_read+0x40> <== NOT EXECUTED 12bfd9: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 12bfdc: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 12bfdf: 01 da add %ebx,%edx <== NOT EXECUTED 12bfe1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 12bfe4: 03 71 20 add 0x20(%ecx),%esi <== NOT EXECUTED 12bfe7: 89 d7 mov %edx,%edi <== NOT EXECUTED 12bfe9: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12bfeb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED count -= c; cmpltd += c; 12bfed: 8d 1c 18 lea (%eax,%ebx,1),%ebx <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12bff0: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED 12bff3: 74 22 je 12c017 <_fat_block_read+0x7b> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 12bff5: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 12bff8: 31 f6 xor %esi,%esi <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 12bffa: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 12bffd: 52 push %edx <== NOT EXECUTED 12bffe: 6a 01 push $0x1 <== NOT EXECUTED 12c000: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 12c003: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 12c006: e8 09 fa ff ff call 12ba14 <== NOT EXECUTED if (rc != RC_OK) 12c00b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c00e: 85 c0 test %eax,%eax <== NOT EXECUTED 12c010: 74 ba je 12bfcc <_fat_block_read+0x30> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 12c012: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED ofs = 0; } return cmpltd; } 12c017: 89 d8 mov %ebx,%eax <== NOT EXECUTED 12c019: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c01c: 5b pop %ebx <== NOT EXECUTED 12c01d: 5e pop %esi <== NOT EXECUTED 12c01e: 5f pop %edi <== NOT EXECUTED 12c01f: c9 leave <== NOT EXECUTED 12c020: c3 ret <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 12c021: 31 db xor %ebx,%ebx <== NOT EXECUTED 12c023: eb f2 jmp 12c017 <_fat_block_read+0x7b> <== NOT EXECUTED =============================================================================== 0012b9fc <_fat_block_release>: * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { 12b9fc: 55 push %ebp <== NOT EXECUTED 12b9fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b9ff: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12ba02: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12ba05: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 12ba08: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12ba0b: c9 leave <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12ba0c: e9 93 fe ff ff jmp 12b8a4 <== NOT EXECUTED =============================================================================== 0012bc50 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 12bc50: 55 push %ebp <== NOT EXECUTED 12bc51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bc53: 57 push %edi <== NOT EXECUTED 12bc54: 56 push %esi <== NOT EXECUTED 12bc55: 53 push %ebx <== NOT EXECUTED 12bc56: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12bc59: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12bc5c: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12bc5f: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12bc62: 85 c0 test %eax,%eax <== NOT EXECUTED 12bc64: 0f 84 8c 00 00 00 je 12bcf6 <_fat_block_write+0xa6> <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 12bc6a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 12bc71: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 12bc74: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bc77: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 12bc7a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12bc81: eb 45 jmp 12bcc8 <_fat_block_write+0x78> <== NOT EXECUTED 12bc83: 90 nop <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 12bc84: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bc87: 50 push %eax <== NOT EXECUTED 12bc88: 6a 01 push $0x1 <== NOT EXECUTED 12bc8a: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 12bc8d: 53 push %ebx <== NOT EXECUTED 12bc8e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 12bc91: e8 7e fd ff ff call 12ba14 <== NOT EXECUTED 12bc96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc99: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) 12bc9c: 85 c0 test %eax,%eax <== NOT EXECUTED 12bc9e: 75 44 jne 12bce4 <_fat_block_write+0x94> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 12bca0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12bca3: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED 12bca6: 89 f0 mov %esi,%eax <== NOT EXECUTED 12bca8: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED 12bcab: 03 75 d4 add -0x2c(%ebp),%esi <== NOT EXECUTED 12bcae: 89 c7 mov %eax,%edi <== NOT EXECUTED 12bcb0: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12bcb2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 12bcb4: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 12bcbb: 01 55 d4 add %edx,-0x2c(%ebp) <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12bcbe: 29 55 14 sub %edx,0x14(%ebp) <== NOT EXECUTED 12bcc1: 74 28 je 12bceb <_fat_block_write+0x9b> <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 12bcc3: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED 12bcc6: 31 f6 xor %esi,%esi <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 12bcc8: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12bccb: 89 c2 mov %eax,%edx <== NOT EXECUTED 12bccd: 29 f2 sub %esi,%edx <== NOT EXECUTED 12bccf: 3b 55 14 cmp 0x14(%ebp),%edx <== NOT EXECUTED 12bcd2: 76 03 jbe 12bcd7 <_fat_block_write+0x87> <== NOT EXECUTED 12bcd4: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED if (c == fs_info->vol.bps) 12bcd7: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12bcd9: 75 a9 jne 12bc84 <_fat_block_write+0x34> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 12bcdb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bcde: 50 push %eax <== NOT EXECUTED 12bcdf: 6a 02 push $0x2 <== NOT EXECUTED 12bce1: eb a7 jmp 12bc8a <_fat_block_write+0x3a> <== NOT EXECUTED 12bce3: 90 nop <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 12bce4: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp) <== NOT EXECUTED ofs = 0; } return cmpltd; } 12bceb: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 12bcee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bcf1: 5b pop %ebx <== NOT EXECUTED 12bcf2: 5e pop %esi <== NOT EXECUTED 12bcf3: 5f pop %edi <== NOT EXECUTED 12bcf4: c9 leave <== NOT EXECUTED 12bcf5: c3 ret <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 12bcf6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12bcfd: eb ec jmp 12bceb <_fat_block_write+0x9b> <== NOT EXECUTED =============================================================================== 00144154 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 144154: 55 push %ebp <== NOT EXECUTED 144155: 89 e5 mov %esp,%ebp <== NOT EXECUTED 144157: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 14415a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 14415d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 144160: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 144163: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 144166: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 144169: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 14416c: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 14416d: e9 4a fe ff ff jmp 143fbc <== NOT EXECUTED =============================================================================== 00110e40 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 110e40: 55 push %ebp <== NOT EXECUTED 110e41: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 110e43: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110e48: c9 leave <== NOT EXECUTED 110e49: c3 ret <== NOT EXECUTED =============================================================================== 001086c4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 1086c4: 55 push %ebp <== NOT EXECUTED 1086c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1086c7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 1086ca: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1086cb: e9 90 ff ff ff jmp 108660 <== NOT EXECUTED =============================================================================== 0012f308 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 12f308: 55 push %ebp <== NOT EXECUTED 12f309: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f30b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12f30e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 12f311: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12f314: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12f317: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12f31a: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 12f31b: e9 30 fe ff ff jmp 12f150 <== NOT EXECUTED =============================================================================== 0012f524 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 12f524: 55 push %ebp <== NOT EXECUTED 12f525: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f527: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12f52a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 12f52d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12f530: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12f533: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12f536: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 12f537: e9 18 ff ff ff jmp 12f454 <== NOT EXECUTED =============================================================================== 00120994 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 120994: 55 push %ebp <== NOT EXECUTED 120995: 89 e5 mov %esp,%ebp <== NOT EXECUTED 120997: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12099a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 12099d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1209a0: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1209a3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1209a6: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 1209a7: e9 48 00 00 00 jmp 1209f4 <== NOT EXECUTED =============================================================================== 0015db7c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 15db7c: 55 push %ebp 15db7d: 89 e5 mov %esp,%ebp 15db7f: 57 push %edi 15db80: 56 push %esi 15db81: 53 push %ebx 15db82: 83 ec 78 sub $0x78,%esp 15db85: 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 ); 15db88: 53 push %ebx 15db89: e8 4e 0b fb ff call 10e6dc if ( old_parent_pathlen == 0 ) 15db8e: 83 c4 10 add $0x10,%esp 15db91: 85 c0 test %eax,%eax 15db93: 0f 85 b7 01 00 00 jne 15dd50 <_rename_r+0x1d4> <== NEVER TAKEN rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 15db99: 56 push %esi 15db9a: 8d 45 b8 lea -0x48(%ebp),%eax 15db9d: 89 45 94 mov %eax,-0x6c(%ebp) 15dba0: 50 push %eax 15dba1: 8d 45 e4 lea -0x1c(%ebp),%eax 15dba4: 50 push %eax 15dba5: 53 push %ebx 15dba6: e8 bd 23 fb ff call 10ff68 15dbab: 31 d2 xor %edx,%edx 15dbad: c6 45 93 00 movb $0x0,-0x6d(%ebp) 15dbb1: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 15dbb4: 8d 7d cc lea -0x34(%ebp),%edi 15dbb7: b9 05 00 00 00 mov $0x5,%ecx 15dbbc: 8b 75 94 mov -0x6c(%ebp),%esi 15dbbf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 15dbc1: 01 d3 add %edx,%ebx 15dbc3: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 15dbc6: be ff ff ff ff mov $0xffffffff,%esi 15dbcb: 89 f1 mov %esi,%ecx 15dbcd: 89 df mov %ebx,%edi 15dbcf: 31 c0 xor %eax,%eax 15dbd1: f2 ae repnz scas %es:(%edi),%al 15dbd3: f7 d1 not %ecx 15dbd5: 49 dec %ecx 15dbd6: 83 ec 08 sub $0x8,%esp 15dbd9: 51 push %ecx 15dbda: 53 push %ebx 15dbdb: e8 ac 0a fb ff call 10e68c 15dbe0: 01 c3 add %eax,%ebx 15dbe2: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 15dbe5: 89 f1 mov %esi,%ecx 15dbe7: 89 df mov %ebx,%edi 15dbe9: 31 c0 xor %eax,%eax 15dbeb: f2 ae repnz scas %es:(%edi),%al 15dbed: 89 ce mov %ecx,%esi 15dbef: f7 d6 not %esi 15dbf1: 4e dec %esi 15dbf2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 15dbf9: 8d 7d cc lea -0x34(%ebp),%edi 15dbfc: 57 push %edi 15dbfd: 6a 00 push $0x0 15dbff: 56 push %esi 15dc00: 53 push %ebx 15dc01: e8 1e 0b fb ff call 10e724 0, &old_loc, false ); if ( result != 0 ) { 15dc06: 83 c4 20 add $0x20,%esp 15dc09: 85 c0 test %eax,%eax 15dc0b: 0f 85 23 01 00 00 jne 15dd34 <_rename_r+0x1b8> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 15dc11: 51 push %ecx 15dc12: 8d 5d a4 lea -0x5c(%ebp),%ebx 15dc15: 53 push %ebx 15dc16: 8d 45 e4 lea -0x1c(%ebp),%eax 15dc19: 50 push %eax 15dc1a: ff 75 10 pushl 0x10(%ebp) 15dc1d: e8 46 23 fb ff call 10ff68 if ( !new_parent_loc.ops->evalformake_h ) { 15dc22: 8b 45 b0 mov -0x50(%ebp),%eax 15dc25: 8b 40 04 mov 0x4(%eax),%eax 15dc28: 83 c4 10 add $0x10,%esp 15dc2b: 85 c0 test %eax,%eax 15dc2d: 0f 84 b5 01 00 00 je 15dde8 <_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 ); 15dc33: 52 push %edx 15dc34: 8d 55 e0 lea -0x20(%ebp),%edx 15dc37: 52 push %edx 15dc38: 53 push %ebx 15dc39: 8b 55 10 mov 0x10(%ebp),%edx 15dc3c: 03 55 e4 add -0x1c(%ebp),%edx 15dc3f: 52 push %edx 15dc40: ff d0 call *%eax if ( result != 0 ) { 15dc42: 83 c4 10 add $0x10,%esp 15dc45: 85 c0 test %eax,%eax 15dc47: 0f 85 2f 01 00 00 jne 15dd7c <_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 ) { 15dc4d: 8b 45 c8 mov -0x38(%ebp),%eax 15dc50: 3b 45 b4 cmp -0x4c(%ebp),%eax 15dc53: 75 77 jne 15dccc <_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 ) { 15dc55: 8b 55 b0 mov -0x50(%ebp),%edx 15dc58: 8b 42 40 mov 0x40(%edx),%eax 15dc5b: 85 c0 test %eax,%eax 15dc5d: 0f 84 75 01 00 00 je 15ddd8 <_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 ); 15dc63: ff 75 e0 pushl -0x20(%ebp) 15dc66: 53 push %ebx 15dc67: 57 push %edi 15dc68: ff 75 94 pushl -0x6c(%ebp) 15dc6b: ff d0 call *%eax 15dc6d: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &new_parent_loc ); 15dc6f: 8b 45 b0 mov -0x50(%ebp),%eax 15dc72: 83 c4 10 add $0x10,%esp 15dc75: 85 c0 test %eax,%eax 15dc77: 74 10 je 15dc89 <_rename_r+0x10d> <== NEVER TAKEN 15dc79: 8b 40 1c mov 0x1c(%eax),%eax 15dc7c: 85 c0 test %eax,%eax 15dc7e: 74 09 je 15dc89 <_rename_r+0x10d> <== NEVER TAKEN 15dc80: 83 ec 0c sub $0xc,%esp 15dc83: 53 push %ebx 15dc84: ff d0 call *%eax 15dc86: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15dc89: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15dc8d: 74 19 je 15dca8 <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); 15dc8f: 8b 45 c4 mov -0x3c(%ebp),%eax 15dc92: 85 c0 test %eax,%eax 15dc94: 74 12 je 15dca8 <_rename_r+0x12c> <== NEVER TAKEN 15dc96: 8b 40 1c mov 0x1c(%eax),%eax 15dc99: 85 c0 test %eax,%eax 15dc9b: 74 0b je 15dca8 <_rename_r+0x12c> <== NEVER TAKEN 15dc9d: 83 ec 0c sub $0xc,%esp 15dca0: ff 75 94 pushl -0x6c(%ebp) 15dca3: ff d0 call *%eax 15dca5: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15dca8: 8b 45 d8 mov -0x28(%ebp),%eax 15dcab: 85 c0 test %eax,%eax 15dcad: 74 10 je 15dcbf <_rename_r+0x143> <== NEVER TAKEN 15dcaf: 8b 40 1c mov 0x1c(%eax),%eax 15dcb2: 85 c0 test %eax,%eax 15dcb4: 74 09 je 15dcbf <_rename_r+0x143> <== NEVER TAKEN 15dcb6: 83 ec 0c sub $0xc,%esp 15dcb9: 57 push %edi 15dcba: ff d0 call *%eax 15dcbc: 83 c4 10 add $0x10,%esp return result; } 15dcbf: 89 f0 mov %esi,%eax 15dcc1: 8d 65 f4 lea -0xc(%ebp),%esp 15dcc4: 5b pop %ebx 15dcc5: 5e pop %esi 15dcc6: 5f pop %edi 15dcc7: c9 leave 15dcc8: c3 ret 15dcc9: 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 ); 15dccc: 8b 45 b0 mov -0x50(%ebp),%eax 15dccf: 85 c0 test %eax,%eax 15dcd1: 74 10 je 15dce3 <_rename_r+0x167> <== NEVER TAKEN 15dcd3: 8b 40 1c mov 0x1c(%eax),%eax 15dcd6: 85 c0 test %eax,%eax 15dcd8: 74 09 je 15dce3 <_rename_r+0x167> <== NEVER TAKEN 15dcda: 83 ec 0c sub $0xc,%esp 15dcdd: 53 push %ebx 15dcde: ff d0 call *%eax 15dce0: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15dce3: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15dce7: 74 19 je 15dd02 <_rename_r+0x186> rtems_filesystem_freenode( &old_parent_loc ); 15dce9: 8b 45 c4 mov -0x3c(%ebp),%eax 15dcec: 85 c0 test %eax,%eax 15dcee: 74 12 je 15dd02 <_rename_r+0x186> <== NEVER TAKEN 15dcf0: 8b 40 1c mov 0x1c(%eax),%eax 15dcf3: 85 c0 test %eax,%eax 15dcf5: 74 0b je 15dd02 <_rename_r+0x186> <== NEVER TAKEN 15dcf7: 83 ec 0c sub $0xc,%esp 15dcfa: ff 75 94 pushl -0x6c(%ebp) 15dcfd: ff d0 call *%eax 15dcff: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15dd02: 8b 45 d8 mov -0x28(%ebp),%eax 15dd05: 85 c0 test %eax,%eax 15dd07: 74 10 je 15dd19 <_rename_r+0x19d> <== NEVER TAKEN 15dd09: 8b 40 1c mov 0x1c(%eax),%eax 15dd0c: 85 c0 test %eax,%eax 15dd0e: 74 09 je 15dd19 <_rename_r+0x19d> <== NEVER TAKEN 15dd10: 83 ec 0c sub $0xc,%esp 15dd13: 57 push %edi 15dd14: ff d0 call *%eax 15dd16: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 15dd19: e8 62 9e fe ff call 147b80 <__errno> 15dd1e: c7 00 12 00 00 00 movl $0x12,(%eax) 15dd24: 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; } 15dd29: 89 f0 mov %esi,%eax 15dd2b: 8d 65 f4 lea -0xc(%ebp),%esp 15dd2e: 5b pop %ebx 15dd2f: 5e pop %esi 15dd30: 5f pop %edi 15dd31: c9 leave 15dd32: c3 ret 15dd33: 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 ) 15dd34: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15dd38: 0f 85 f5 00 00 00 jne 15de33 <_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 ); 15dd3e: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED return result; } 15dd43: 89 f0 mov %esi,%eax <== NOT EXECUTED 15dd45: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 15dd48: 5b pop %ebx <== NOT EXECUTED 15dd49: 5e pop %esi <== NOT EXECUTED 15dd4a: 5f pop %edi <== NOT EXECUTED 15dd4b: c9 leave <== NOT EXECUTED 15dd4c: c3 ret <== NOT EXECUTED 15dd4d: 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, 15dd50: 83 ec 0c sub $0xc,%esp 15dd53: 6a 00 push $0x0 15dd55: 8d 4d b8 lea -0x48(%ebp),%ecx 15dd58: 89 4d 94 mov %ecx,-0x6c(%ebp) 15dd5b: 51 push %ecx 15dd5c: 6a 02 push $0x2 15dd5e: 50 push %eax 15dd5f: 53 push %ebx 15dd60: 89 45 8c mov %eax,-0x74(%ebp) 15dd63: e8 90 0a fb ff call 10e7f8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 15dd68: 83 c4 20 add $0x20,%esp 15dd6b: 85 c0 test %eax,%eax 15dd6d: 8b 55 8c mov -0x74(%ebp),%edx 15dd70: 75 cc jne 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN 15dd72: c6 45 93 01 movb $0x1,-0x6d(%ebp) 15dd76: e9 39 fe ff ff jmp 15dbb4 <_rename_r+0x38> 15dd7b: 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 ); 15dd7c: 8b 45 b0 mov -0x50(%ebp),%eax 15dd7f: 85 c0 test %eax,%eax 15dd81: 74 10 je 15dd93 <_rename_r+0x217> <== NEVER TAKEN 15dd83: 8b 40 1c mov 0x1c(%eax),%eax 15dd86: 85 c0 test %eax,%eax 15dd88: 74 09 je 15dd93 <_rename_r+0x217> <== NEVER TAKEN 15dd8a: 83 ec 0c sub $0xc,%esp 15dd8d: 53 push %ebx 15dd8e: ff d0 call *%eax 15dd90: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15dd93: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15dd97: 74 19 je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 15dd99: 8b 45 c4 mov -0x3c(%ebp),%eax 15dd9c: 85 c0 test %eax,%eax 15dd9e: 74 12 je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN 15dda0: 8b 40 1c mov 0x1c(%eax),%eax 15dda3: 85 c0 test %eax,%eax 15dda5: 74 0b je 15ddb2 <_rename_r+0x236> <== NEVER TAKEN 15dda7: 83 ec 0c sub $0xc,%esp 15ddaa: ff 75 94 pushl -0x6c(%ebp) 15ddad: ff d0 call *%eax 15ddaf: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15ddb2: 8b 45 d8 mov -0x28(%ebp),%eax 15ddb5: 85 c0 test %eax,%eax 15ddb7: 74 85 je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN 15ddb9: 8b 40 1c mov 0x1c(%eax),%eax 15ddbc: 85 c0 test %eax,%eax 15ddbe: 0f 84 7a ff ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN 15ddc4: 83 ec 0c sub $0xc,%esp 15ddc7: 57 push %edi 15ddc8: ff d0 call *%eax 15ddca: 83 ce ff or $0xffffffff,%esi 15ddcd: 83 c4 10 add $0x10,%esp 15ddd0: e9 ea fe ff ff jmp 15dcbf <_rename_r+0x143> 15ddd5: 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 ); 15ddd8: 8b 42 1c mov 0x1c(%edx),%eax 15dddb: 85 c0 test %eax,%eax 15dddd: 74 09 je 15dde8 <_rename_r+0x26c> <== NEVER TAKEN 15dddf: 83 ec 0c sub $0xc,%esp 15dde2: 53 push %ebx 15dde3: ff d0 call *%eax 15dde5: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 15dde8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 15ddec: 74 19 je 15de07 <_rename_r+0x28b> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 15ddee: 8b 45 c4 mov -0x3c(%ebp),%eax 15ddf1: 85 c0 test %eax,%eax 15ddf3: 74 12 je 15de07 <_rename_r+0x28b> <== NEVER TAKEN 15ddf5: 8b 40 1c mov 0x1c(%eax),%eax 15ddf8: 85 c0 test %eax,%eax 15ddfa: 74 0b je 15de07 <_rename_r+0x28b> <== NEVER TAKEN 15ddfc: 83 ec 0c sub $0xc,%esp 15ddff: ff 75 94 pushl -0x6c(%ebp) 15de02: ff d0 call *%eax 15de04: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 15de07: 8b 45 d8 mov -0x28(%ebp),%eax 15de0a: 85 c0 test %eax,%eax 15de0c: 74 10 je 15de1e <_rename_r+0x2a2> <== NEVER TAKEN 15de0e: 8b 40 1c mov 0x1c(%eax),%eax 15de11: 85 c0 test %eax,%eax 15de13: 74 09 je 15de1e <_rename_r+0x2a2> <== NEVER TAKEN 15de15: 83 ec 0c sub $0xc,%esp 15de18: 57 push %edi 15de19: ff d0 call *%eax 15de1b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 15de1e: e8 5d 9d fe ff call 147b80 <__errno> 15de23: c7 00 86 00 00 00 movl $0x86,(%eax) 15de29: be ff ff ff ff mov $0xffffffff,%esi 15de2e: e9 8c fe ff ff jmp 15dcbf <_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 ); 15de33: 8b 45 c4 mov -0x3c(%ebp),%eax 15de36: 85 c0 test %eax,%eax 15de38: 0f 84 00 ff ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN 15de3e: 8b 40 1c mov 0x1c(%eax),%eax 15de41: 85 c0 test %eax,%eax 15de43: 0f 84 f5 fe ff ff je 15dd3e <_rename_r+0x1c2> <== NEVER TAKEN 15de49: 83 ec 0c sub $0xc,%esp 15de4c: ff 75 94 pushl -0x6c(%ebp) 15de4f: ff d0 call *%eax 15de51: 83 ce ff or $0xffffffff,%esi 15de54: 83 c4 10 add $0x10,%esp 15de57: e9 63 fe ff ff jmp 15dcbf <_rename_r+0x143> =============================================================================== 0010ff50 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10ff50: 55 push %ebp <== NOT EXECUTED 10ff51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ff53: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ff56: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10ff59: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10ff5c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10ff5f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10ff62: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10ff63: e9 18 ff ff ff jmp 10fe80 <== NOT EXECUTED =============================================================================== 00114360 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 114360: 55 push %ebp <== NOT EXECUTED 114361: 89 e5 mov %esp,%ebp <== NOT EXECUTED 114363: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 114366: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 114369: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11436c: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 11436d: e9 fa fd ff ff jmp 11416c <== NOT EXECUTED =============================================================================== 0012e190 : int access( const char *path, int amode ) { 12e190: 55 push %ebp 12e191: 89 e5 mov %esp,%ebp 12e193: 53 push %ebx 12e194: 83 ec 5c sub $0x5c,%esp 12e197: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 12e19a: 8d 45 b0 lea -0x50(%ebp),%eax 12e19d: 50 push %eax 12e19e: ff 75 08 pushl 0x8(%ebp) 12e1a1: e8 da 1c fe ff call 10fe80 12e1a6: 83 c4 10 add $0x10,%esp 12e1a9: 85 c0 test %eax,%eax 12e1ab: 75 1f jne 12e1cc return -1; if ( amode & R_OK ) { 12e1ad: f6 c3 04 test $0x4,%bl 12e1b0: 75 12 jne 12e1c4 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 12e1b2: f6 c3 02 test $0x2,%bl 12e1b5: 75 29 jne 12e1e0 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 12e1b7: 83 e3 01 and $0x1,%ebx 12e1ba: 75 1c jne 12e1d8 if ( !( statbuf.st_mode & S_IEXEC ) ) 12e1bc: 31 c0 xor %eax,%eax return -1; } return 0; } 12e1be: 8b 5d fc mov -0x4(%ebp),%ebx 12e1c1: c9 leave 12e1c2: c3 ret 12e1c3: 90 nop if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 12e1c4: f6 45 bd 01 testb $0x1,-0x43(%ebp) 12e1c8: 75 e8 jne 12e1b2 12e1ca: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12e1cc: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 12e1d1: 8b 5d fc mov -0x4(%ebp),%ebx 12e1d4: c9 leave 12e1d5: c3 ret 12e1d6: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 12e1d8: f6 45 bc 40 testb $0x40,-0x44(%ebp) 12e1dc: 75 de jne 12e1bc 12e1de: eb ec jmp 12e1cc if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 12e1e0: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) 12e1e4: 78 d1 js 12e1b7 12e1e6: eb e4 jmp 12e1cc =============================================================================== 0010bab8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10bab8: 55 push %ebp 10bab9: 89 e5 mov %esp,%ebp 10babb: 57 push %edi 10babc: 56 push %esi 10babd: 53 push %ebx 10babe: 83 ec 1c sub $0x1c,%esp 10bac1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bac4: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10bac7: 85 db test %ebx,%ebx 10bac9: 0f 84 f1 00 00 00 je 10bbc0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10bacf: 8b 53 04 mov 0x4(%ebx),%edx 10bad2: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10bad8: 0f 87 e2 00 00 00 ja 10bbc0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10bade: 85 f6 test %esi,%esi 10bae0: 74 10 je 10baf2 olddelta->tv_sec = 0; 10bae2: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10bae8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10baef: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10baf2: 8b 03 mov (%ebx),%eax 10baf4: 8d 04 80 lea (%eax,%eax,4),%eax 10baf7: 8d 04 80 lea (%eax,%eax,4),%eax 10bafa: 8d 04 80 lea (%eax,%eax,4),%eax 10bafd: 8d 04 80 lea (%eax,%eax,4),%eax 10bb00: 8d 04 80 lea (%eax,%eax,4),%eax 10bb03: 8d 04 80 lea (%eax,%eax,4),%eax 10bb06: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10bb09: 8d 04 02 lea (%edx,%eax,1),%eax 10bb0c: 3b 05 ac 69 12 00 cmp 0x1269ac,%eax 10bb12: 73 0c jae 10bb20 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10bb14: 31 c0 xor %eax,%eax return 0; } 10bb16: 8d 65 f4 lea -0xc(%ebp),%esp 10bb19: 5b pop %ebx 10bb1a: 5e pop %esi 10bb1b: 5f pop %edi 10bb1c: c9 leave 10bb1d: c3 ret 10bb1e: 66 90 xchg %ax,%ax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb20: a1 b8 ac 12 00 mov 0x12acb8,%eax 10bb25: 40 inc %eax 10bb26: a3 b8 ac 12 00 mov %eax,0x12acb8 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10bb2b: 83 ec 0c sub $0xc,%esp 10bb2e: 8d 7d e0 lea -0x20(%ebp),%edi 10bb31: 57 push %edi 10bb32: e8 59 17 00 00 call 10d290 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10bb37: 8b 03 mov (%ebx),%eax 10bb39: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10bb3c: 8b 43 04 mov 0x4(%ebx),%eax 10bb3f: 8d 04 80 lea (%eax,%eax,4),%eax 10bb42: 8d 04 80 lea (%eax,%eax,4),%eax 10bb45: 8d 04 80 lea (%eax,%eax,4),%eax 10bb48: c1 e0 03 shl $0x3,%eax 10bb4b: 03 45 e4 add -0x1c(%ebp),%eax 10bb4e: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10bb51: 83 c4 10 add $0x10,%esp 10bb54: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10bb59: 76 18 jbe 10bb73 10bb5b: 8b 55 e0 mov -0x20(%ebp),%edx 10bb5e: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10bb60: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10bb65: 42 inc %edx ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10bb66: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10bb6b: 77 f3 ja 10bb60 <== NEVER TAKEN 10bb6d: 89 45 e4 mov %eax,-0x1c(%ebp) 10bb70: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10bb73: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10bb78: 77 19 ja 10bb93 <== NEVER TAKEN 10bb7a: 8b 55 e0 mov -0x20(%ebp),%edx 10bb7d: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10bb80: 05 00 ca 9a 3b add $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10bb85: 4a dec %edx ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10bb86: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10bb8b: 76 f3 jbe 10bb80 10bb8d: 89 45 e4 mov %eax,-0x1c(%ebp) 10bb90: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10bb93: 83 ec 0c sub $0xc,%esp 10bb96: 57 push %edi 10bb97: e8 80 17 00 00 call 10d31c <_TOD_Set> _Thread_Enable_dispatch(); 10bb9c: e8 4b 29 00 00 call 10e4ec <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10bba1: 83 c4 10 add $0x10,%esp 10bba4: 85 f6 test %esi,%esi 10bba6: 0f 84 68 ff ff ff je 10bb14 <== NEVER TAKEN *olddelta = *delta; 10bbac: 8b 03 mov (%ebx),%eax 10bbae: 8b 53 04 mov 0x4(%ebx),%edx 10bbb1: 89 06 mov %eax,(%esi) 10bbb3: 89 56 04 mov %edx,0x4(%esi) 10bbb6: 31 c0 xor %eax,%eax return 0; } 10bbb8: 8d 65 f4 lea -0xc(%ebp),%esp 10bbbb: 5b pop %ebx 10bbbc: 5e pop %esi 10bbbd: 5f pop %edi 10bbbe: c9 leave 10bbbf: c3 ret */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bbc0: e8 fb 9f 00 00 call 115bc0 <__errno> 10bbc5: c7 00 16 00 00 00 movl $0x16,(%eax) 10bbcb: b8 ff ff ff ff mov $0xffffffff,%eax 10bbd0: e9 41 ff ff ff jmp 10bb16 =============================================================================== 001083cc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1083cc: 55 push %ebp 1083cd: 89 e5 mov %esp,%ebp 1083cf: 57 push %edi 1083d0: 53 push %ebx 1083d1: 8b 5d 0c mov 0xc(%ebp),%ebx 1083d4: ff 05 b4 92 12 00 incl 0x1292b4 length = nelem * elsize; 1083da: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1083de: 83 ec 0c sub $0xc,%esp 1083e1: 53 push %ebx 1083e2: e8 d5 04 00 00 call 1088bc 1083e7: 89 c2 mov %eax,%edx if ( cptr ) 1083e9: 83 c4 10 add $0x10,%esp 1083ec: 85 c0 test %eax,%eax 1083ee: 74 08 je 1083f8 <== NEVER TAKEN memset( cptr, '\0', length ); 1083f0: 31 c0 xor %eax,%eax 1083f2: 89 d7 mov %edx,%edi 1083f4: 89 d9 mov %ebx,%ecx 1083f6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1083f8: ff 0d a4 92 12 00 decl 0x1292a4 return cptr; } 1083fe: 89 d0 mov %edx,%eax 108400: 8d 65 f8 lea -0x8(%ebp),%esp 108403: 5b pop %ebx 108404: 5f pop %edi 108405: c9 leave 108406: c3 ret =============================================================================== 0012e338 : #include int chdir( const char *pathname ) { 12e338: 55 push %ebp 12e339: 89 e5 mov %esp,%ebp 12e33b: 57 push %edi 12e33c: 56 push %esi 12e33d: 83 ec 20 sub $0x20,%esp 12e340: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 12e343: 85 d2 test %edx,%edx 12e345: 0f 84 9d 00 00 00 je 12e3e8 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 12e34b: 31 c0 xor %eax,%eax 12e34d: b9 ff ff ff ff mov $0xffffffff,%ecx 12e352: 89 d7 mov %edx,%edi 12e354: f2 ae repnz scas %es:(%edi),%al 12e356: f7 d1 not %ecx 12e358: 49 dec %ecx 12e359: 83 ec 0c sub $0xc,%esp 12e35c: 6a 01 push $0x1 12e35e: 8d 75 e4 lea -0x1c(%ebp),%esi 12e361: 56 push %esi 12e362: 6a 01 push $0x1 12e364: 51 push %ecx 12e365: 52 push %edx 12e366: e8 8d 04 fe ff call 10e7f8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 12e36b: 83 c4 20 add $0x20,%esp 12e36e: 85 c0 test %eax,%eax 12e370: 75 6a jne 12e3dc return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 12e372: 8b 55 f0 mov -0x10(%ebp),%edx 12e375: 8b 42 10 mov 0x10(%edx),%eax 12e378: 85 c0 test %eax,%eax 12e37a: 74 45 je 12e3c1 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 12e37c: 83 ec 0c sub $0xc,%esp 12e37f: 56 push %esi 12e380: ff d0 call *%eax 12e382: 83 c4 10 add $0x10,%esp 12e385: 48 dec %eax 12e386: 75 78 jne 12e400 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 12e388: 8b 3d 20 f3 16 00 mov 0x16f320,%edi 12e38e: 8b 47 10 mov 0x10(%edi),%eax 12e391: 85 c0 test %eax,%eax 12e393: 74 19 je 12e3ae <== NEVER TAKEN 12e395: 8b 40 1c mov 0x1c(%eax),%eax 12e398: 85 c0 test %eax,%eax 12e39a: 74 12 je 12e3ae <== NEVER TAKEN 12e39c: 83 ec 0c sub $0xc,%esp 12e39f: 83 c7 04 add $0x4,%edi 12e3a2: 57 push %edi 12e3a3: ff d0 call *%eax 12e3a5: 8b 3d 20 f3 16 00 mov 0x16f320,%edi 12e3ab: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 12e3ae: 83 c7 04 add $0x4,%edi 12e3b1: b9 05 00 00 00 mov $0x5,%ecx 12e3b6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12e3b8: 31 c0 xor %eax,%eax return 0; } 12e3ba: 8d 65 f8 lea -0x8(%ebp),%esp 12e3bd: 5e pop %esi 12e3be: 5f pop %edi 12e3bf: c9 leave 12e3c0: c3 ret /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 12e3c1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12e3c4: 85 c0 test %eax,%eax <== NOT EXECUTED 12e3c6: 74 09 je 12e3d1 <== NOT EXECUTED 12e3c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e3cb: 56 push %esi <== NOT EXECUTED 12e3cc: ff d0 call *%eax <== NOT EXECUTED 12e3ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e3d1: e8 aa 97 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e3d6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e3dc: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12e3e1: 8d 65 f8 lea -0x8(%ebp),%esp 12e3e4: 5e pop %esi 12e3e5: 5f pop %edi 12e3e6: c9 leave 12e3e7: c3 ret { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 12e3e8: e8 93 97 01 00 call 147b80 <__errno> 12e3ed: c7 00 0e 00 00 00 movl $0xe,(%eax) 12e3f3: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 12e3f8: 8d 65 f8 lea -0x8(%ebp),%esp 12e3fb: 5e pop %esi 12e3fc: 5f pop %edi 12e3fd: c9 leave 12e3fe: c3 ret 12e3ff: 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 ); 12e400: 8b 45 f0 mov -0x10(%ebp),%eax 12e403: 85 c0 test %eax,%eax 12e405: 74 10 je 12e417 <== NEVER TAKEN 12e407: 8b 40 1c mov 0x1c(%eax),%eax 12e40a: 85 c0 test %eax,%eax 12e40c: 74 09 je 12e417 <== NEVER TAKEN 12e40e: 83 ec 0c sub $0xc,%esp 12e411: 56 push %esi 12e412: ff d0 call *%eax 12e414: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 12e417: e8 64 97 01 00 call 147b80 <__errno> 12e41c: c7 00 14 00 00 00 movl $0x14,(%eax) 12e422: b8 ff ff ff ff mov $0xffffffff,%eax 12e427: eb 91 jmp 12e3ba =============================================================================== 0010e348 : int chmod( const char *path, mode_t mode ) { 10e348: 55 push %ebp 10e349: 89 e5 mov %esp,%ebp 10e34b: 57 push %edi 10e34c: 56 push %esi 10e34d: 53 push %ebx 10e34e: 83 ec 38 sub $0x38,%esp 10e351: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 10e354: 31 c0 xor %eax,%eax 10e356: b9 ff ff ff ff mov $0xffffffff,%ecx 10e35b: 89 d7 mov %edx,%edi 10e35d: f2 ae repnz scas %es:(%edi),%al 10e35f: f7 d1 not %ecx 10e361: 49 dec %ecx 10e362: 6a 01 push $0x1 10e364: 8d 5d d4 lea -0x2c(%ebp),%ebx 10e367: 53 push %ebx 10e368: 6a 00 push $0x0 10e36a: 51 push %ecx 10e36b: 52 push %edx 10e36c: e8 87 04 00 00 call 10e7f8 if ( status != 0 ) 10e371: 83 c4 20 add $0x20,%esp 10e374: 85 c0 test %eax,%eax 10e376: 75 60 jne 10e3d8 return -1; if ( !loc.handlers ){ 10e378: 8b 45 dc mov -0x24(%ebp),%eax 10e37b: 85 c0 test %eax,%eax 10e37d: 74 36 je 10e3b5 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 10e37f: 8b 40 1c mov 0x1c(%eax),%eax 10e382: 85 c0 test %eax,%eax 10e384: 74 62 je 10e3e8 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10e386: 83 ec 08 sub $0x8,%esp 10e389: ff 75 0c pushl 0xc(%ebp) 10e38c: 53 push %ebx 10e38d: ff d0 call *%eax 10e38f: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10e391: 8b 45 e0 mov -0x20(%ebp),%eax 10e394: 83 c4 10 add $0x10,%esp 10e397: 85 c0 test %eax,%eax 10e399: 74 10 je 10e3ab <== NEVER TAKEN 10e39b: 8b 40 1c mov 0x1c(%eax),%eax 10e39e: 85 c0 test %eax,%eax 10e3a0: 74 09 je 10e3ab <== NEVER TAKEN 10e3a2: 83 ec 0c sub $0xc,%esp 10e3a5: 53 push %ebx 10e3a6: ff d0 call *%eax 10e3a8: 83 c4 10 add $0x10,%esp return result; } 10e3ab: 89 f0 mov %esi,%eax 10e3ad: 8d 65 f4 lea -0xc(%ebp),%esp 10e3b0: 5b pop %ebx 10e3b1: 5e pop %esi 10e3b2: 5f pop %edi 10e3b3: c9 leave 10e3b4: c3 ret status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 10e3b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e3b8: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3ba: 74 10 je 10e3cc <== NOT EXECUTED 10e3bc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e3bf: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3c1: 74 09 je 10e3cc <== NOT EXECUTED 10e3c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e3c6: 53 push %ebx <== NOT EXECUTED 10e3c7: ff d0 call *%eax <== NOT EXECUTED 10e3c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10e3cc: e8 af 97 03 00 call 147b80 <__errno> <== NOT EXECUTED 10e3d1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10e3d7: 90 nop <== NOT EXECUTED 10e3d8: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10e3dd: 89 f0 mov %esi,%eax 10e3df: 8d 65 f4 lea -0xc(%ebp),%esp 10e3e2: 5b pop %ebx 10e3e3: 5e pop %esi 10e3e4: 5f pop %edi 10e3e5: c9 leave 10e3e6: c3 ret 10e3e7: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 10e3e8: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10e3eb: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3ed: 74 10 je 10e3ff <== NOT EXECUTED 10e3ef: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10e3f2: 85 c0 test %eax,%eax <== NOT EXECUTED 10e3f4: 74 09 je 10e3ff <== NOT EXECUTED 10e3f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e3f9: 53 push %ebx <== NOT EXECUTED 10e3fa: ff d0 call *%eax <== NOT EXECUTED 10e3fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e3ff: e8 7c 97 03 00 call 147b80 <__errno> <== NOT EXECUTED 10e404: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e40a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10e40f: eb 9a jmp 10e3ab <== NOT EXECUTED =============================================================================== 0012e42c : int chown( const char *path, uid_t owner, gid_t group ) { 12e42c: 55 push %ebp 12e42d: 89 e5 mov %esp,%ebp 12e42f: 57 push %edi 12e430: 56 push %esi 12e431: 53 push %ebx 12e432: 83 ec 38 sub $0x38,%esp 12e435: 8b 55 08 mov 0x8(%ebp),%edx 12e438: 8b 75 0c mov 0xc(%ebp),%esi 12e43b: 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 ) ) 12e43e: 31 c0 xor %eax,%eax 12e440: b9 ff ff ff ff mov $0xffffffff,%ecx 12e445: 89 d7 mov %edx,%edi 12e447: f2 ae repnz scas %es:(%edi),%al 12e449: f7 d1 not %ecx 12e44b: 49 dec %ecx 12e44c: 6a 01 push $0x1 12e44e: 8d 7d d4 lea -0x2c(%ebp),%edi 12e451: 57 push %edi 12e452: 6a 00 push $0x0 12e454: 51 push %ecx 12e455: 52 push %edx 12e456: e8 9d 03 fe ff call 10e7f8 12e45b: 83 c4 20 add $0x20,%esp 12e45e: 85 c0 test %eax,%eax 12e460: 75 5a jne 12e4bc <== NEVER TAKEN return -1; if ( !loc.ops->chown_h ) { 12e462: 8b 55 e0 mov -0x20(%ebp),%edx 12e465: 8b 42 18 mov 0x18(%edx),%eax 12e468: 85 c0 test %eax,%eax 12e46a: 74 34 je 12e4a0 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 12e46c: 52 push %edx 12e46d: 0f b7 db movzwl %bx,%ebx 12e470: 53 push %ebx 12e471: 0f b7 f6 movzwl %si,%esi 12e474: 56 push %esi 12e475: 57 push %edi 12e476: ff d0 call *%eax 12e478: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 12e47a: 8b 45 e0 mov -0x20(%ebp),%eax 12e47d: 83 c4 10 add $0x10,%esp 12e480: 85 c0 test %eax,%eax 12e482: 74 10 je 12e494 <== NEVER TAKEN 12e484: 8b 40 1c mov 0x1c(%eax),%eax 12e487: 85 c0 test %eax,%eax 12e489: 74 09 je 12e494 <== NEVER TAKEN 12e48b: 83 ec 0c sub $0xc,%esp 12e48e: 57 push %edi 12e48f: ff d0 call *%eax 12e491: 83 c4 10 add $0x10,%esp return result; } 12e494: 89 d8 mov %ebx,%eax 12e496: 8d 65 f4 lea -0xc(%ebp),%esp 12e499: 5b pop %ebx 12e49a: 5e pop %esi 12e49b: 5f pop %edi 12e49c: c9 leave 12e49d: c3 ret 12e49e: 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 ); 12e4a0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12e4a3: 85 c0 test %eax,%eax <== NOT EXECUTED 12e4a5: 74 09 je 12e4b0 <== NOT EXECUTED 12e4a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e4aa: 57 push %edi <== NOT EXECUTED 12e4ab: ff d0 call *%eax <== NOT EXECUTED 12e4ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e4b0: e8 cb 96 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e4b5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e4bb: 90 nop <== NOT EXECUTED 12e4bc: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 12e4c1: 89 d8 mov %ebx,%eax 12e4c3: 8d 65 f4 lea -0xc(%ebp),%esp 12e4c6: 5b pop %ebx 12e4c7: 5e pop %esi 12e4c8: 5f pop %edi 12e4c9: c9 leave 12e4ca: c3 ret =============================================================================== 0012e4cc : #include int chroot( const char *pathname ) { 12e4cc: 55 push %ebp 12e4cd: 89 e5 mov %esp,%ebp 12e4cf: 57 push %edi 12e4d0: 56 push %esi 12e4d1: 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) { 12e4d4: 81 3d 20 f3 16 00 40 cmpl $0x174e40,0x16f320 12e4db: 4e 17 00 12e4de: 74 6c je 12e54c <== 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); 12e4e0: 83 ec 0c sub $0xc,%esp 12e4e3: ff 75 08 pushl 0x8(%ebp) 12e4e6: e8 4d fe ff ff call 12e338 if (result) { 12e4eb: 83 c4 10 add $0x10,%esp 12e4ee: 85 c0 test %eax,%eax 12e4f0: 75 7e jne 12e570 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 12e4f2: 83 ec 0c sub $0xc,%esp 12e4f5: 6a 00 push $0x0 12e4f7: 8d 75 e4 lea -0x1c(%ebp),%esi 12e4fa: 56 push %esi 12e4fb: 6a 00 push $0x0 12e4fd: 6a 01 push $0x1 12e4ff: 68 18 1c 16 00 push $0x161c18 12e504: e8 ef 02 fe ff call 10e7f8 12e509: 83 c4 20 add $0x20,%esp 12e50c: 85 c0 test %eax,%eax 12e50e: 75 60 jne 12e570 <== 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); 12e510: 8b 3d 20 f3 16 00 mov 0x16f320,%edi 12e516: 8b 47 24 mov 0x24(%edi),%eax 12e519: 85 c0 test %eax,%eax 12e51b: 74 19 je 12e536 <== NEVER TAKEN 12e51d: 8b 40 1c mov 0x1c(%eax),%eax 12e520: 85 c0 test %eax,%eax 12e522: 74 12 je 12e536 <== NEVER TAKEN 12e524: 83 ec 0c sub $0xc,%esp 12e527: 83 c7 18 add $0x18,%edi 12e52a: 57 push %edi 12e52b: ff d0 call *%eax 12e52d: 8b 3d 20 f3 16 00 mov 0x16f320,%edi 12e533: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 12e536: 83 c7 18 add $0x18,%edi 12e539: b9 05 00 00 00 mov $0x5,%ecx 12e53e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 12e540: 31 c0 xor %eax,%eax return 0; } 12e542: 8d 65 f8 lea -0x8(%ebp),%esp 12e545: 5e pop %esi 12e546: 5f pop %edi 12e547: c9 leave 12e548: c3 ret 12e549: 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*/ 12e54c: e8 ab 14 00 00 call 12f9fc if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 12e551: 81 3d 20 f3 16 00 40 cmpl $0x174e40,0x16f320 12e558: 4e 17 00 12e55b: 75 83 jne 12e4e0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e55d: e8 1e 96 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e562: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e568: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12e56b: eb d5 jmp 12e542 <== NOT EXECUTED 12e56d: 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 ); 12e570: e8 0b 96 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e575: 89 c6 mov %eax,%esi <== NOT EXECUTED 12e577: e8 04 96 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e57c: 8b 00 mov (%eax),%eax <== NOT EXECUTED 12e57e: 89 06 mov %eax,(%esi) <== NOT EXECUTED 12e580: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e585: eb bb jmp 12e542 <== NOT EXECUTED =============================================================================== 0010ba58 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10ba58: 55 push %ebp 10ba59: 89 e5 mov %esp,%ebp 10ba5b: 83 ec 08 sub $0x8,%esp 10ba5e: 8b 45 08 mov 0x8(%ebp),%eax 10ba61: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10ba64: 85 d2 test %edx,%edx 10ba66: 74 14 je 10ba7c rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10ba68: 83 f8 01 cmp $0x1,%eax 10ba6b: 74 47 je 10bab4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10ba6d: 83 f8 04 cmp $0x4,%eax 10ba70: 74 32 je 10baa4 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 10ba72: 83 f8 02 cmp $0x2,%eax 10ba75: 74 2d je 10baa4 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 10ba77: 83 f8 03 cmp $0x3,%eax 10ba7a: 74 14 je 10ba90 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10ba7c: e8 cb a5 00 00 call 11604c <__errno> 10ba81: c7 00 16 00 00 00 movl $0x16,(%eax) 10ba87: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10ba8c: c9 leave 10ba8d: c3 ret 10ba8e: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10ba90: e8 b7 a5 00 00 call 11604c <__errno> 10ba95: c7 00 58 00 00 00 movl $0x58,(%eax) 10ba9b: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10baa0: c9 leave 10baa1: c3 ret 10baa2: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { _TOD_Get_uptime_as_timespec( tp ); 10baa4: 83 ec 0c sub $0xc,%esp 10baa7: 52 push %edx 10baa8: e8 67 1e 00 00 call 10d914 <_TOD_Get_uptime_as_timespec> 10baad: 31 c0 xor %eax,%eax return 0; 10baaf: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10bab2: c9 leave 10bab3: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10bab4: 83 ec 0c sub $0xc,%esp 10bab7: 52 push %edx 10bab8: e8 ff 1d 00 00 call 10d8bc <_TOD_Get> 10babd: 31 c0 xor %eax,%eax return 0; 10babf: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10bac2: c9 leave 10bac3: c3 ret =============================================================================== 001302a0 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 1302a0: 55 push %ebp 1302a1: 89 e5 mov %esp,%ebp 1302a3: 83 ec 08 sub $0x8,%esp 1302a6: 8b 45 08 mov 0x8(%ebp),%eax 1302a9: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 1302ac: 85 d2 test %edx,%edx 1302ae: 74 0f je 1302bf <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 1302b0: 83 f8 01 cmp $0x1,%eax 1302b3: 74 1f je 1302d4 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 1302b5: 83 f8 02 cmp $0x2,%eax 1302b8: 74 42 je 1302fc rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 1302ba: 83 f8 03 cmp $0x3,%eax 1302bd: 74 3d je 1302fc rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 1302bf: e8 bc 78 01 00 call 147b80 <__errno> 1302c4: c7 00 16 00 00 00 movl $0x16,(%eax) 1302ca: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 1302cf: c9 leave 1302d0: c3 ret 1302d1: 8d 76 00 lea 0x0(%esi),%esi { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 1302d4: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 1302da: 76 e3 jbe 1302bf rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1302dc: a1 58 4f 17 00 mov 0x174f58,%eax 1302e1: 40 inc %eax 1302e2: a3 58 4f 17 00 mov %eax,0x174f58 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 1302e7: 83 ec 0c sub $0xc,%esp 1302ea: 52 push %edx 1302eb: e8 7c 17 00 00 call 131a6c <_TOD_Set> _Thread_Enable_dispatch(); 1302f0: e8 8b 52 fe ff call 115580 <_Thread_Enable_dispatch> 1302f5: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 1302f7: 83 c4 10 add $0x10,%esp } 1302fa: c9 leave 1302fb: c3 ret else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); 1302fc: e8 7f 78 01 00 call 147b80 <__errno> 130301: c7 00 58 00 00 00 movl $0x58,(%eax) 130307: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 13030c: c9 leave 13030d: c3 ret =============================================================================== 00110cb8 : #include int close( int fd ) { 110cb8: 55 push %ebp 110cb9: 89 e5 mov %esp,%ebp 110cbb: 56 push %esi 110cbc: 53 push %ebx 110cbd: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 110cc0: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx 110cc6: 73 58 jae 110d20 iop = rtems_libio_iop(fd); 110cc8: c1 e3 06 shl $0x6,%ebx 110ccb: 03 1d 80 92 12 00 add 0x129280,%ebx rtems_libio_check_is_open(iop); 110cd1: f6 43 15 01 testb $0x1,0x15(%ebx) 110cd5: 74 49 je 110d20 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110cd7: 8b 43 3c mov 0x3c(%ebx),%eax 110cda: 8b 40 04 mov 0x4(%eax),%eax 110cdd: 85 c0 test %eax,%eax 110cdf: 74 3b je 110d1c <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 110ce1: 83 ec 0c sub $0xc,%esp 110ce4: 53 push %ebx 110ce5: ff d0 call *%eax 110ce7: 89 c6 mov %eax,%esi 110ce9: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 110cec: 8b 43 24 mov 0x24(%ebx),%eax 110cef: 85 c0 test %eax,%eax 110cf1: 74 13 je 110d06 <== NEVER TAKEN 110cf3: 8b 40 1c mov 0x1c(%eax),%eax 110cf6: 85 c0 test %eax,%eax 110cf8: 74 0c je 110d06 110cfa: 83 ec 0c sub $0xc,%esp 110cfd: 8d 53 18 lea 0x18(%ebx),%edx 110d00: 52 push %edx 110d01: ff d0 call *%eax 110d03: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 110d06: 83 ec 0c sub $0xc,%esp 110d09: 53 push %ebx 110d0a: e8 45 02 00 00 call 110f54 return rc; 110d0f: 83 c4 10 add $0x10,%esp } 110d12: 89 f0 mov %esi,%eax 110d14: 8d 65 f8 lea -0x8(%ebp),%esp 110d17: 5b pop %ebx 110d18: 5e pop %esi 110d19: c9 leave 110d1a: c3 ret 110d1b: 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 ) 110d1c: 31 f6 xor %esi,%esi 110d1e: eb cc jmp 110cec <== 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); 110d20: e8 df 43 00 00 call 115104 <__errno> 110d25: c7 00 09 00 00 00 movl $0x9,(%eax) 110d2b: be ff ff ff ff mov $0xffffffff,%esi 110d30: eb e0 jmp 110d12 =============================================================================== 0010873c : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 10873c: 55 push %ebp 10873d: 89 e5 mov %esp,%ebp 10873f: 57 push %edi 108740: 56 push %esi 108741: 53 push %ebx 108742: 83 ec 2c sub $0x2c,%esp 108745: 89 c3 mov %eax,%ebx 108747: 89 d6 mov %edx,%esi 108749: 89 4d d8 mov %ecx,-0x28(%ebp) ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 10874c: 89 c2 mov %eax,%edx dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10874e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 108751: 8b 3d a4 bf 12 00 mov 0x12bfa4,%edi 108757: 39 f8 cmp %edi,%eax 108759: 0f 83 41 01 00 00 jae 1088a0 10875f: a1 a0 bf 12 00 mov 0x12bfa0,%eax 108764: 89 45 e0 mov %eax,-0x20(%ebp) memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 108767: c1 e2 03 shl $0x3,%edx 10876a: 89 55 dc mov %edx,-0x24(%ebp) 10876d: 8b 45 e0 mov -0x20(%ebp),%eax 108770: 01 d0 add %edx,%eax 108772: 8b 10 mov (%eax),%edx 108774: 85 d2 test %edx,%edx 108776: 0f 84 bc 00 00 00 je 108838 10877c: 8b 78 04 mov 0x4(%eax),%edi 10877f: 39 7d e4 cmp %edi,-0x1c(%ebp) 108782: 0f 83 b4 00 00 00 jae 10883c <== NEVER TAKEN memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 108788: 8b 45 e4 mov -0x1c(%ebp),%eax 10878b: 8d 3c 82 lea (%edx,%eax,4),%edi { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 10878e: 85 ff test %edi,%edi 108790: 0f 84 6a 01 00 00 je 108900 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 108796: 8b 07 mov (%edi),%eax 108798: 85 c0 test %eax,%eax 10879a: 74 10 je 1087ac 10879c: b8 0c 00 00 00 mov $0xc,%eax *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 1087a1: 8d 65 f4 lea -0xc(%ebp),%esp 1087a4: 5b pop %ebx 1087a5: 5e pop %esi 1087a6: 5f pop %edi 1087a7: c9 leave 1087a8: c3 ret 1087a9: 8d 76 00 lea 0x0(%esi),%esi if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 1087ac: 83 ec 0c sub $0xc,%esp 1087af: 6a 34 push $0x34 1087b1: e8 ae 0f 00 00 call 109764 1087b6: 89 c2 mov %eax,%edx if (dd == NULL) { 1087b8: 83 c4 10 add $0x10,%esp 1087bb: 85 c0 test %eax,%eax 1087bd: 0f 84 3d 01 00 00 je 108900 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 1087c3: 8b 4d d8 mov -0x28(%ebp),%ecx 1087c6: 85 c9 test %ecx,%ecx 1087c8: 0f 84 6e 01 00 00 je 10893c alloc_name = strdup(name); 1087ce: 83 ec 0c sub $0xc,%esp 1087d1: ff 75 d8 pushl -0x28(%ebp) 1087d4: 89 45 d0 mov %eax,-0x30(%ebp) 1087d7: e8 fc 0f 01 00 call 1197d8 1087dc: 89 45 e4 mov %eax,-0x1c(%ebp) if (alloc_name == NULL) { 1087df: 83 c4 10 add $0x10,%esp 1087e2: 85 c0 test %eax,%eax 1087e4: 8b 55 d0 mov -0x30(%ebp),%edx 1087e7: 0f 84 5b 01 00 00 je 108948 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 1087ed: 56 push %esi 1087ee: 53 push %ebx 1087ef: 68 ff 61 00 00 push $0x61ff 1087f4: 50 push %eax 1087f5: 89 55 d0 mov %edx,-0x30(%ebp) 1087f8: 89 45 cc mov %eax,-0x34(%ebp) 1087fb: e8 40 10 00 00 call 109840 108800: 83 c4 10 add $0x10,%esp 108803: 85 c0 test %eax,%eax 108805: 8b 55 d0 mov -0x30(%ebp),%edx 108808: 8b 4d cc mov -0x34(%ebp),%ecx 10880b: 0f 88 07 01 00 00 js 108918 <== NEVER TAKEN free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 108811: 89 1a mov %ebx,(%edx) 108813: 89 72 04 mov %esi,0x4(%edx) dd->name = alloc_name; 108816: 8b 4d e4 mov -0x1c(%ebp),%ecx 108819: 89 4a 10 mov %ecx,0x10(%edx) dd->uses = 0; 10881c: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) dd->deleted = false; 108823: c6 42 30 00 movb $0x0,0x30(%edx) *dd_entry = dd; 108827: 89 17 mov %edx,(%edi) *dd_ptr = dd; 108829: 8b 45 08 mov 0x8(%ebp),%eax 10882c: 89 10 mov %edx,(%eax) 10882e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 108830: e9 6c ff ff ff jmp 1087a1 108835: 8d 76 00 lea 0x0(%esi),%esi memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 108838: 8b 78 04 mov 0x4(%eax),%edi 10883b: 90 nop rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 10883c: 85 ff test %edi,%edi 10883e: 0f 85 c8 00 00 00 jne 10890c <== NEVER TAKEN 108844: c7 45 e0 08 00 00 00 movl $0x8,-0x20(%ebp) new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 10884b: 8b 45 e0 mov -0x20(%ebp),%eax 10884e: 39 45 e4 cmp %eax,-0x1c(%ebp) 108851: 72 07 jb 10885a new_size = minor + 1; 108853: 8b 4d e4 mov -0x1c(%ebp),%ecx 108856: 41 inc %ecx 108857: 89 4d e0 mov %ecx,-0x20(%ebp) } table = realloc(table, new_size * sizeof(*table)); 10885a: 83 ec 08 sub $0x8,%esp 10885d: 8b 45 e0 mov -0x20(%ebp),%eax 108860: c1 e0 02 shl $0x2,%eax 108863: 50 push %eax 108864: 52 push %edx 108865: e8 86 1a 00 00 call 10a2f0 10886a: 89 c2 mov %eax,%edx if (table == NULL) { 10886c: 83 c4 10 add $0x10,%esp 10886f: 85 c0 test %eax,%eax 108871: 0f 84 89 00 00 00 je 108900 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 108877: 8b 4d e0 mov -0x20(%ebp),%ecx 10887a: 29 f9 sub %edi,%ecx 10887c: c1 e1 02 shl $0x2,%ecx 10887f: 8d 3c b8 lea (%eax,%edi,4),%edi 108882: 89 7d d4 mov %edi,-0x2c(%ebp) 108885: 31 c0 xor %eax,%eax 108887: f3 aa rep stos %al,%es:(%edi) disktab [major].minor = table; 108889: 8b 45 dc mov -0x24(%ebp),%eax 10888c: 03 05 a0 bf 12 00 add 0x12bfa0,%eax 108892: 89 10 mov %edx,(%eax) disktab [major].size = new_size; 108894: 8b 4d e0 mov -0x20(%ebp),%ecx 108897: 89 48 04 mov %ecx,0x4(%eax) 10889a: e9 e9 fe ff ff jmp 108788 10889f: 90 nop rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 1088a0: 8b 0d a0 bf 12 00 mov 0x12bfa0,%ecx rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 1088a6: 8d 04 3f lea (%edi,%edi,1),%eax 1088a9: 89 45 dc mov %eax,-0x24(%ebp) if (major >= new_size) { 1088ac: 39 c3 cmp %eax,%ebx 1088ae: 72 06 jb 1088b6 <== NEVER TAKEN new_size = major + 1; 1088b0: 8d 43 01 lea 0x1(%ebx),%eax 1088b3: 89 45 dc mov %eax,-0x24(%ebp) } table = realloc(table, new_size * sizeof(*table)); 1088b6: 83 ec 08 sub $0x8,%esp 1088b9: 8b 45 dc mov -0x24(%ebp),%eax 1088bc: c1 e0 03 shl $0x3,%eax 1088bf: 50 push %eax 1088c0: 51 push %ecx 1088c1: 89 55 d0 mov %edx,-0x30(%ebp) 1088c4: e8 27 1a 00 00 call 10a2f0 1088c9: 89 45 e0 mov %eax,-0x20(%ebp) if (table == NULL) { 1088cc: 83 c4 10 add $0x10,%esp 1088cf: 85 c0 test %eax,%eax 1088d1: 8b 55 d0 mov -0x30(%ebp),%edx 1088d4: 74 2a je 108900 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 1088d6: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 1088d9: 29 f9 sub %edi,%ecx <== NOT EXECUTED 1088db: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED 1088de: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED 1088e1: 89 7d d4 mov %edi,-0x2c(%ebp) <== NOT EXECUTED 1088e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1088e6: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED disktab = table; 1088e8: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1088eb: 89 0d a0 bf 12 00 mov %ecx,0x12bfa0 <== NOT EXECUTED disktab_size = new_size; 1088f1: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1088f4: a3 a4 bf 12 00 mov %eax,0x12bfa4 <== NOT EXECUTED 1088f9: e9 69 fe ff ff jmp 108767 <== NOT EXECUTED 1088fe: 66 90 xchg %ax,%ax <== NOT EXECUTED dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 108900: b8 1a 00 00 00 mov $0x1a,%eax 108905: e9 97 fe ff ff jmp 1087a1 10890a: 66 90 xchg %ax,%ax rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 10890c: 8d 0c 3f lea (%edi,%edi,1),%ecx <== NOT EXECUTED 10890f: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 108912: e9 34 ff ff ff jmp 10884b <== NOT EXECUTED 108917: 90 nop <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 108918: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10891b: 51 push %ecx <== NOT EXECUTED 10891c: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10891f: e8 68 0b 00 00 call 10948c <== NOT EXECUTED free(dd); 108924: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 108927: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED 10892a: e8 5d 0b 00 00 call 10948c <== NOT EXECUTED 10892f: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_UNSATISFIED; 108934: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108937: e9 65 fe ff ff jmp 1087a1 <== NOT EXECUTED 10893c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 108943: e9 c9 fe ff ff jmp 108811 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 108948: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10894b: 52 push %edx <== NOT EXECUTED 10894c: e8 3b 0b 00 00 call 10948c <== NOT EXECUTED 108951: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED return RTEMS_NO_MEMORY; 108956: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108959: e9 43 fe ff ff jmp 1087a1 <== NOT EXECUTED =============================================================================== 0010f020 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10f020: 55 push %ebp 10f021: 89 e5 mov %esp,%ebp 10f023: 83 ec 1c sub $0x1c,%esp 10f026: 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; 10f029: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10f02c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10f02f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10f036: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10f03d: 8d 55 ec lea -0x14(%ebp),%edx 10f040: 52 push %edx 10f041: ff 70 0c pushl 0xc(%eax) 10f044: ff 70 08 pushl 0x8(%eax) 10f047: e8 70 11 00 00 call 1101bc np->major, np->minor, (void *) &args ); if ( status ) { 10f04c: 83 c4 10 add $0x10,%esp 10f04f: 85 c0 test %eax,%eax 10f051: 75 05 jne 10f058 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 10f053: c9 leave 10f054: c3 ret 10f055: 8d 76 00 lea 0x0(%esi),%esi np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10f058: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f05b: 50 push %eax <== NOT EXECUTED 10f05c: e8 e7 00 00 00 call 10f148 <== NOT EXECUTED 10f061: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10f064: c9 leave <== NOT EXECUTED 10f065: c3 ret <== NOT EXECUTED =============================================================================== 0010f078 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10f078: 55 push %ebp 10f079: 89 e5 mov %esp,%ebp 10f07b: 57 push %edi 10f07c: 56 push %esi 10f07d: 53 push %ebx 10f07e: 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 ) ) 10f081: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10f088: 0f 85 96 00 00 00 jne 10f124 <== 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; 10f08e: 8b 45 14 mov 0x14(%ebp),%eax 10f091: 8b 00 mov (%eax),%eax 10f093: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10f096: 85 c0 test %eax,%eax 10f098: 0f 84 98 00 00 00 je 10f136 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10f09e: 8b 15 50 01 12 00 mov 0x120150,%edx 10f0a4: 89 55 e0 mov %edx,-0x20(%ebp) 10f0a7: 85 d2 test %edx,%edx 10f0a9: 74 38 je 10f0e3 <== 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 ); 10f0ab: 31 c0 xor %eax,%eax 10f0ad: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10f0af: 8d 04 80 lea (%eax,%eax,4),%eax 10f0b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10f0b5: 8d 3c 82 lea (%edx,%eax,4),%edi 10f0b8: 8b 37 mov (%edi),%esi 10f0ba: 85 f6 test %esi,%esi 10f0bc: 74 1d je 10f0db continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10f0be: 50 push %eax 10f0bf: ff 75 0c pushl 0xc(%ebp) 10f0c2: 56 push %esi 10f0c3: ff 75 08 pushl 0x8(%ebp) 10f0c6: e8 71 2f 00 00 call 11203c 10f0cb: 83 c4 10 add $0x10,%esp 10f0ce: 85 c0 test %eax,%eax 10f0d0: 75 09 jne 10f0db <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10f0d2: 8b 45 0c mov 0xc(%ebp),%eax 10f0d5: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10f0d9: 74 21 je 10f0fc <== 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++) { 10f0db: 43 inc %ebx 10f0dc: 89 d8 mov %ebx,%eax 10f0de: 39 5d e0 cmp %ebx,-0x20(%ebp) 10f0e1: 77 cc ja 10f0af pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10f0e3: e8 a4 23 00 00 call 11148c <__errno> 10f0e8: c7 00 02 00 00 00 movl $0x2,(%eax) 10f0ee: b8 ff ff ff ff mov $0xffffffff,%eax } 10f0f3: 8d 65 f4 lea -0xc(%ebp),%esp 10f0f6: 5b pop %ebx 10f0f7: 5e pop %esi 10f0f8: 5f pop %edi 10f0f9: c9 leave 10f0fa: c3 ret 10f0fb: 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]; 10f0fc: 8b 55 14 mov 0x14(%ebp),%edx 10f0ff: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10f101: c7 42 08 80 20 12 00 movl $0x122080,0x8(%edx) pathloc->ops = &devFS_ops; 10f108: c7 42 0c 20 20 12 00 movl $0x122020,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10f10f: a1 d8 20 12 00 mov 0x1220d8,%eax 10f114: 8b 40 28 mov 0x28(%eax),%eax 10f117: 89 42 10 mov %eax,0x10(%edx) 10f11a: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10f11c: 8d 65 f4 lea -0xc(%ebp),%esp 10f11f: 5b pop %ebx 10f120: 5e pop %esi 10f121: 5f pop %edi 10f122: c9 leave 10f123: 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 ); 10f124: e8 63 23 00 00 call 11148c <__errno> <== NOT EXECUTED 10f129: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10f12f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f134: eb e6 jmp 10f11c <== 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 ); 10f136: e8 51 23 00 00 call 11148c <__errno> <== NOT EXECUTED 10f13b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10f141: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f144: eb d6 jmp 10f11c <== NOT EXECUTED =============================================================================== 00107bec : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 107bec: 55 push %ebp 107bed: 89 e5 mov %esp,%ebp 107bef: 57 push %edi 107bf0: 53 push %ebx 107bf1: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 107bf4: 83 ec 0c sub $0xc,%esp 107bf7: a1 50 01 12 00 mov 0x120150,%eax 107bfc: 8d 04 80 lea (%eax,%eax,4),%eax 107bff: c1 e0 02 shl $0x2,%eax 107c02: 50 push %eax 107c03: e8 88 6f 00 00 call 10eb90 <_Workspace_Allocate> 107c08: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107c0a: 83 c4 10 add $0x10,%esp 107c0d: 85 c0 test %eax,%eax 107c0f: 74 2b je 107c3c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107c11: a1 50 01 12 00 mov 0x120150,%eax 107c16: 8d 0c 80 lea (%eax,%eax,4),%ecx 107c19: c1 e1 02 shl $0x2,%ecx 107c1c: 31 c0 xor %eax,%eax 107c1e: 89 d7 mov %edx,%edi 107c20: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 107c22: c7 43 24 80 20 12 00 movl $0x122080,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107c29: c7 43 28 20 20 12 00 movl $0x122020,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107c30: 89 53 1c mov %edx,0x1c(%ebx) 107c33: 31 c0 xor %eax,%eax return 0; } 107c35: 8d 65 f8 lea -0x8(%ebp),%esp 107c38: 5b pop %ebx 107c39: 5f pop %edi 107c3a: c9 leave 107c3b: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c3c: e8 4b 98 00 00 call 11148c <__errno> <== NOT EXECUTED 107c41: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c47: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107c4c: eb e7 jmp 107c35 <== NOT EXECUTED =============================================================================== 00107da8 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107da8: 55 push %ebp 107da9: 89 e5 mov %esp,%ebp 107dab: 83 ec 1c sub $0x1c,%esp 107dae: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107db1: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107db4: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107db7: 8b 55 0c mov 0xc(%ebp),%edx 107dba: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107dbd: 8b 55 10 mov 0x10(%ebp),%edx 107dc0: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107dc3: 8d 55 e8 lea -0x18(%ebp),%edx 107dc6: 52 push %edx 107dc7: ff 70 0c pushl 0xc(%eax) 107dca: ff 70 08 pushl 0x8(%eax) 107dcd: e8 fe 41 00 00 call 10bfd0 np->major, np->minor, (void *) &args ); if ( status ) 107dd2: 83 c4 10 add $0x10,%esp 107dd5: 85 c0 test %eax,%eax 107dd7: 75 07 jne 107de0 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107dd9: 8b 45 f4 mov -0xc(%ebp),%eax } 107ddc: c9 leave 107ddd: c3 ret 107dde: 66 90 xchg %ax,%ax np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107de0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107de3: 50 push %eax <== NOT EXECUTED 107de4: e8 5f 73 00 00 call 10f148 <== NOT EXECUTED 107de9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107dec: c9 leave <== NOT EXECUTED 107ded: c3 ret <== NOT EXECUTED =============================================================================== 00107c50 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107c50: 55 push %ebp 107c51: 89 e5 mov %esp,%ebp 107c53: 57 push %edi 107c54: 56 push %esi 107c55: 53 push %ebx 107c56: 83 ec 1c sub $0x1c,%esp 107c59: 8b 7d 08 mov 0x8(%ebp),%edi 107c5c: 8b 4d 10 mov 0x10(%ebp),%ecx 107c5f: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107c62: 80 3f 64 cmpb $0x64,(%edi) 107c65: 0f 84 dd 00 00 00 je 107d48 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107c6b: 8b 45 0c mov 0xc(%ebp),%eax 107c6e: 25 00 f0 00 00 and $0xf000,%eax 107c73: 3d 00 60 00 00 cmp $0x6000,%eax 107c78: 74 0b je 107c85 <== NEVER TAKEN 107c7a: 3d 00 20 00 00 cmp $0x2000,%eax 107c7f: 0f 85 e3 00 00 00 jne 107d68 <== NEVER TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c85: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c88: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 107c8b: 8b 45 18 mov 0x18(%ebp),%eax 107c8e: 8b 30 mov (%eax),%esi if (!device_name_table) 107c90: 85 f6 test %esi,%esi 107c92: 0f 84 f2 00 00 00 je 107d8a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c98: 8b 15 50 01 12 00 mov 0x120150,%edx 107c9e: 85 d2 test %edx,%edx 107ca0: 0f 84 d4 00 00 00 je 107d7a <== NEVER TAKEN rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107ca6: 31 c0 xor %eax,%eax 107ca8: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107caf: 31 db xor %ebx,%ebx 107cb1: 89 7d e4 mov %edi,-0x1c(%ebp) 107cb4: 89 d7 mov %edx,%edi 107cb6: eb 1a jmp 107cd2 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107cb8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107cbb: 50 push %eax <== NOT EXECUTED 107cbc: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107cbf: e8 54 a2 00 00 call 111f18 <== NOT EXECUTED 107cc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107cc7: 85 c0 test %eax,%eax <== NOT EXECUTED 107cc9: 74 65 je 107d30 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107ccb: 43 inc %ebx <== NOT EXECUTED 107ccc: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107cce: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107cd0: 73 16 jae 107ce8 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107cd2: 8d 04 80 lea (%eax,%eax,4),%eax 107cd5: 8b 04 86 mov (%esi,%eax,4),%eax 107cd8: 85 c0 test %eax,%eax 107cda: 75 dc jne 107cb8 <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107cdc: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107cdf: 43 inc %ebx 107ce0: 89 d8 mov %ebx,%eax 107ce2: 39 fb cmp %edi,%ebx 107ce4: 72 ec jb 107cd2 107ce6: 66 90 xchg %ax,%ax 107ce8: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 107ceb: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107cef: 0f 84 85 00 00 00 je 107d7a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107cf5: 9c pushf 107cf6: fa cli 107cf7: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107cf8: 8b 55 e0 mov -0x20(%ebp),%edx 107cfb: 8d 04 92 lea (%edx,%edx,4),%eax 107cfe: 8d 14 86 lea (%esi,%eax,4),%edx 107d01: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107d03: 31 c0 xor %eax,%eax 107d05: b9 ff ff ff ff mov $0xffffffff,%ecx 107d0a: f2 ae repnz scas %es:(%edi),%al 107d0c: f7 d1 not %ecx 107d0e: 49 dec %ecx 107d0f: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107d12: 8b 45 d8 mov -0x28(%ebp),%eax 107d15: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107d18: 8b 45 dc mov -0x24(%ebp),%eax 107d1b: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107d1e: 8b 45 0c mov 0xc(%ebp),%eax 107d21: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107d24: 53 push %ebx 107d25: 9d popf 107d26: 31 c0 xor %eax,%eax return 0; } 107d28: 8d 65 f4 lea -0xc(%ebp),%esp 107d2b: 5b pop %ebx 107d2c: 5e pop %esi 107d2d: 5f pop %edi 107d2e: c9 leave 107d2f: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107d30: e8 57 97 00 00 call 11148c <__errno> <== NOT EXECUTED 107d35: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107d3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107d40: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d43: 5b pop %ebx <== NOT EXECUTED 107d44: 5e pop %esi <== NOT EXECUTED 107d45: 5f pop %edi <== NOT EXECUTED 107d46: c9 leave <== NOT EXECUTED 107d47: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107d48: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107d4c: 0f 85 19 ff ff ff jne 107c6b <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107d52: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107d56: 0f 85 0f ff ff ff jne 107c6b <== NEVER TAKEN 107d5c: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107d60: 0f 85 05 ff ff ff jne 107c6b 107d66: eb be jmp 107d26 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107d68: e8 1f 97 00 00 call 11148c <__errno> <== NOT EXECUTED 107d6d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d78: eb ae jmp 107d28 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d7a: e8 0d 97 00 00 call 11148c <__errno> <== NOT EXECUTED 107d7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d85: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d88: eb 9e jmp 107d28 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107d8a: e8 fd 96 00 00 call 11148c <__errno> <== NOT EXECUTED 107d8f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107d95: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d98: eb 8e jmp 107d28 <== NOT EXECUTED =============================================================================== 00107df0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107df0: 55 push %ebp 107df1: 89 e5 mov %esp,%ebp 107df3: 83 ec 1c sub $0x1c,%esp 107df6: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107df9: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107dfc: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107dff: 8b 40 14 mov 0x14(%eax),%eax 107e02: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107e05: 8b 45 14 mov 0x14(%ebp),%eax 107e08: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107e0b: 8d 45 ec lea -0x14(%ebp),%eax 107e0e: 50 push %eax 107e0f: ff 72 0c pushl 0xc(%edx) 107e12: ff 72 08 pushl 0x8(%edx) 107e15: e8 ca 42 00 00 call 10c0e4 np->major, np->minor, (void *) &args ); if ( status ) 107e1a: 83 c4 10 add $0x10,%esp 107e1d: 85 c0 test %eax,%eax 107e1f: 75 03 jne 107e24 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 107e21: c9 leave 107e22: c3 ret 107e23: 90 nop np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e27: 50 push %eax <== NOT EXECUTED 107e28: e8 1b 73 00 00 call 10f148 <== NOT EXECUTED 107e2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107e30: c9 leave <== NOT EXECUTED 107e31: c3 ret <== NOT EXECUTED =============================================================================== 00107e34 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107e34: 55 push %ebp <== NOT EXECUTED 107e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e37: 53 push %ebx <== NOT EXECUTED 107e38: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107e3b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107e3e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107e41: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107e44: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107e47: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107e4a: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107e4d: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107e50: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107e53: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107e56: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107e59: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107e5c: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107e5f: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107e62: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107e69: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107e6c: 50 push %eax <== NOT EXECUTED 107e6d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107e70: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107e73: e8 b8 42 00 00 call 10c130 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107e7b: 85 c0 test %eax,%eax <== NOT EXECUTED 107e7d: 75 09 jne 107e88 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e7f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e85: c9 leave <== NOT EXECUTED 107e86: c3 ret <== NOT EXECUTED 107e87: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e8b: 50 push %eax <== NOT EXECUTED 107e8c: e8 b7 72 00 00 call 10f148 <== NOT EXECUTED 107e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e97: c9 leave <== NOT EXECUTED 107e98: c3 ret <== NOT EXECUTED =============================================================================== 00107e9c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107e9c: 55 push %ebp 107e9d: 89 e5 mov %esp,%ebp 107e9f: 53 push %ebx 107ea0: 83 ec 04 sub $0x4,%esp 107ea3: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107ea6: 8b 45 08 mov 0x8(%ebp),%eax 107ea9: 8b 00 mov (%eax),%eax if (!the_dev) 107eab: 85 c0 test %eax,%eax 107ead: 74 18 je 107ec7 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107eaf: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107eb2: 8b 58 08 mov 0x8(%eax),%ebx 107eb5: 89 5a 18 mov %ebx,0x18(%edx) 107eb8: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107ebb: 8b 40 10 mov 0x10(%eax),%eax 107ebe: 89 42 0c mov %eax,0xc(%edx) 107ec1: 31 c0 xor %eax,%eax return 0; } 107ec3: 5a pop %edx 107ec4: 5b pop %ebx 107ec5: c9 leave 107ec6: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107ec7: e8 c0 95 00 00 call 11148c <__errno> <== NOT EXECUTED 107ecc: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107ed2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ed7: eb ea jmp 107ec3 <== NOT EXECUTED =============================================================================== 00107edc : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107edc: 55 push %ebp 107edd: 89 e5 mov %esp,%ebp 107edf: 53 push %ebx 107ee0: 83 ec 28 sub $0x28,%esp 107ee3: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107ee6: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107ee9: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107eec: 8b 48 0c mov 0xc(%eax),%ecx 107eef: 8b 58 10 mov 0x10(%eax),%ebx 107ef2: 89 4d e0 mov %ecx,-0x20(%ebp) 107ef5: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107ef8: 8b 4d 0c mov 0xc(%ebp),%ecx 107efb: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107efe: 8b 4d 10 mov 0x10(%ebp),%ecx 107f01: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107f04: 8b 40 14 mov 0x14(%eax),%eax 107f07: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107f0a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107f11: 8d 45 dc lea -0x24(%ebp),%eax 107f14: 50 push %eax 107f15: ff 72 0c pushl 0xc(%edx) 107f18: ff 72 08 pushl 0x8(%edx) 107f1b: e8 5c 42 00 00 call 10c17c np->major, np->minor, (void *) &args ); if ( status ) 107f20: 83 c4 10 add $0x10,%esp 107f23: 85 c0 test %eax,%eax 107f25: 75 09 jne 107f30 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107f27: 8b 45 f4 mov -0xc(%ebp),%eax } 107f2a: 8b 5d fc mov -0x4(%ebp),%ebx 107f2d: c9 leave 107f2e: c3 ret 107f2f: 90 nop np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107f30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107f33: 50 push %eax <== NOT EXECUTED 107f34: e8 0f 72 00 00 call 10f148 <== NOT EXECUTED 107f39: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107f3c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107f3f: c9 leave <== NOT EXECUTED 107f40: c3 ret <== NOT EXECUTED =============================================================================== 00113be8 : */ int device_close( rtems_libio_t *iop ) { 113be8: 55 push %ebp 113be9: 89 e5 mov %esp,%ebp 113beb: 83 ec 1c sub $0x1c,%esp 113bee: 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; 113bf1: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 113bf4: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 113bf7: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 113bfe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 113c05: 8d 55 ec lea -0x14(%ebp),%edx 113c08: 52 push %edx 113c09: ff 70 54 pushl 0x54(%eax) 113c0c: ff 70 50 pushl 0x50(%eax) 113c0f: e8 ec 10 00 00 call 114d00 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 113c14: 83 c4 10 add $0x10,%esp 113c17: 85 c0 test %eax,%eax 113c19: 75 05 jne 113c20 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 113c1b: c9 leave 113c1c: c3 ret 113c1d: 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); 113c20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113c23: 50 push %eax <== NOT EXECUTED 113c24: e8 cf 13 00 00 call 114ff8 <== NOT EXECUTED 113c29: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 113c2c: c9 leave <== NOT EXECUTED 113c2d: c3 ret <== NOT EXECUTED =============================================================================== 00113ad0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 113ad0: 55 push %ebp 113ad1: 89 e5 mov %esp,%ebp 113ad3: 83 ec 1c sub $0x1c,%esp 113ad6: 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; 113ad9: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 113adc: 8b 55 0c mov 0xc(%ebp),%edx 113adf: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 113ae2: 8b 55 10 mov 0x10(%ebp),%edx 113ae5: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 113ae8: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 113aeb: 8d 55 e8 lea -0x18(%ebp),%edx 113aee: 52 push %edx 113aef: ff 70 54 pushl 0x54(%eax) 113af2: ff 70 50 pushl 0x50(%eax) 113af5: e8 52 12 00 00 call 114d4c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113afa: 83 c4 10 add $0x10,%esp 113afd: 85 c0 test %eax,%eax 113aff: 75 07 jne 113b08 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 113b01: 8b 45 f4 mov -0xc(%ebp),%eax } 113b04: c9 leave 113b05: c3 ret 113b06: 66 90 xchg %ax,%ax the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113b08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113b0b: 50 push %eax <== NOT EXECUTED 113b0c: e8 e7 14 00 00 call 114ff8 <== NOT EXECUTED 113b11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 113b14: c9 leave <== NOT EXECUTED 113b15: c3 ret <== NOT EXECUTED =============================================================================== 00113c30 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113c30: 55 push %ebp 113c31: 89 e5 mov %esp,%ebp 113c33: 83 ec 1c sub $0x1c,%esp 113c36: 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; 113c39: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113c3c: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 113c3f: 8b 40 14 mov 0x14(%eax),%eax 113c42: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 113c45: 8b 45 14 mov 0x14(%ebp),%eax 113c48: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 113c4b: 8d 45 ec lea -0x14(%ebp),%eax 113c4e: 50 push %eax 113c4f: ff 72 54 pushl 0x54(%edx) 113c52: ff 72 50 pushl 0x50(%edx) 113c55: e8 3e 11 00 00 call 114d98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113c5a: 83 c4 10 add $0x10,%esp 113c5d: 85 c0 test %eax,%eax 113c5f: 75 03 jne 113c64 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 113c61: c9 leave 113c62: c3 ret 113c63: 90 nop the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113c64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113c67: 50 push %eax <== NOT EXECUTED 113c68: e8 8b 13 00 00 call 114ff8 <== NOT EXECUTED 113c6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 113c70: c9 leave <== NOT EXECUTED 113c71: c3 ret <== NOT EXECUTED =============================================================================== 00113b80 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113b80: 55 push %ebp 113b81: 89 e5 mov %esp,%ebp 113b83: 53 push %ebx 113b84: 83 ec 28 sub $0x28,%esp 113b87: 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; 113b8a: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113b8d: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 113b90: 8b 48 0c mov 0xc(%eax),%ecx 113b93: 8b 58 10 mov 0x10(%eax),%ebx 113b96: 89 4d e0 mov %ecx,-0x20(%ebp) 113b99: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 113b9c: 8b 4d 0c mov 0xc(%ebp),%ecx 113b9f: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 113ba2: 8b 4d 10 mov 0x10(%ebp),%ecx 113ba5: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 113ba8: 8b 40 14 mov 0x14(%eax),%eax 113bab: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 113bae: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( 113bb5: 8d 45 dc lea -0x24(%ebp),%eax 113bb8: 50 push %eax 113bb9: ff 72 54 pushl 0x54(%edx) 113bbc: ff 72 50 pushl 0x50(%edx) 113bbf: e8 20 12 00 00 call 114de4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113bc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113bc7: 85 c0 test %eax,%eax <== NOT EXECUTED 113bc9: 75 09 jne 113bd4 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 113bcb: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 113bce: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113bd1: c9 leave <== NOT EXECUTED 113bd2: c3 ret <== NOT EXECUTED 113bd3: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113bd4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113bd7: 50 push %eax <== NOT EXECUTED 113bd8: e8 1b 14 00 00 call 114ff8 <== NOT EXECUTED 113bdd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 113be0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113be3: c9 leave <== NOT EXECUTED 113be4: c3 ret <== NOT EXECUTED =============================================================================== 00113b18 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 113b18: 55 push %ebp 113b19: 89 e5 mov %esp,%ebp 113b1b: 53 push %ebx 113b1c: 83 ec 28 sub $0x28,%esp 113b1f: 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; 113b22: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113b25: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 113b28: 8b 48 0c mov 0xc(%eax),%ecx 113b2b: 8b 58 10 mov 0x10(%eax),%ebx 113b2e: 89 4d e0 mov %ecx,-0x20(%ebp) 113b31: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 113b34: 8b 4d 0c mov 0xc(%ebp),%ecx 113b37: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 113b3a: 8b 4d 10 mov 0x10(%ebp),%ecx 113b3d: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 113b40: 8b 40 14 mov 0x14(%eax),%eax 113b43: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 113b46: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 113b4d: 8d 45 dc lea -0x24(%ebp),%eax 113b50: 50 push %eax 113b51: ff 72 54 pushl 0x54(%edx) 113b54: ff 72 50 pushl 0x50(%edx) 113b57: e8 d4 12 00 00 call 114e30 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113b5c: 83 c4 10 add $0x10,%esp 113b5f: 85 c0 test %eax,%eax 113b61: 75 09 jne 113b6c <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 113b63: 8b 45 f4 mov -0xc(%ebp),%eax } 113b66: 8b 5d fc mov -0x4(%ebp),%ebx 113b69: c9 leave 113b6a: c3 ret 113b6b: 90 nop the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113b6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113b6f: 50 push %eax <== NOT EXECUTED 113b70: e8 83 14 00 00 call 114ff8 <== NOT EXECUTED 113b75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 113b78: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113b7b: c9 leave <== NOT EXECUTED 113b7c: c3 ret <== NOT EXECUTED =============================================================================== 001083fc : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 1083fc: 55 push %ebp 1083fd: 89 e5 mov %esp,%ebp 1083ff: 83 ec 0c sub $0xc,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108402: 6a 00 push $0x0 108404: 6a 00 push $0x0 108406: ff 35 a8 bf 12 00 pushl 0x12bfa8 10840c: e8 73 4a 00 00 call 10ce84 if (sc == RTEMS_SUCCESSFUL) { 108411: 83 c4 10 add $0x10,%esp 108414: 85 c0 test %eax,%eax 108416: 75 0c jne 108424 <== NEVER TAKEN diskdevs_protected = true; 108418: c6 05 ac bf 12 00 01 movb $0x1,0x12bfac 10841f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 108421: c9 leave 108422: c3 ret 108423: 90 nop disk_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { 108424: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 108429: c9 leave <== NOT EXECUTED 10842a: c3 ret <== NOT EXECUTED =============================================================================== 0010842c : static void disk_unlock(void) { 10842c: 55 push %ebp 10842d: 89 e5 mov %esp,%ebp 10842f: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 108432: c6 05 ac bf 12 00 00 movb $0x0,0x12bfac sc = rtems_semaphore_release(diskdevs_mutex); 108439: ff 35 a8 bf 12 00 pushl 0x12bfa8 10843f: e8 3c 4b 00 00 call 10cf80 if (sc != RTEMS_SUCCESSFUL) { 108444: 83 c4 10 add $0x10,%esp 108447: 85 c0 test %eax,%eax 108449: 75 02 jne 10844d <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 10844b: c9 leave 10844c: c3 ret diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 10844d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108450: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 108455: e8 fa 4f 00 00 call 10d454 <== NOT EXECUTED =============================================================================== 0010a324 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10a324: 55 push %ebp 10a325: 89 e5 mov %esp,%ebp 10a327: 53 push %ebx 10a328: 83 ec 04 sub $0x4,%esp 10a32b: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10a32d: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10a333: 85 d2 test %edx,%edx 10a335: 75 28 jne 10a35f 10a337: eb 3b jmp 10a374 10a339: 8d 76 00 lea 0x0(%esi),%esi rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 10a33c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10a343: 00 00 00 rtems_interrupt_enable (level); 10a346: 50 push %eax 10a347: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10a348: 50 push %eax 10a349: 6a 00 push $0x0 10a34b: 6a 00 push $0x0 10a34d: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a353: e8 8c 19 00 00 call 10bce4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a358: 83 c4 10 add $0x10,%esp 10a35b: 85 c0 test %eax,%eax 10a35d: 75 1a jne 10a379 <== NEVER TAKEN { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 10a35f: 9c pushf 10a360: fa cli 10a361: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10a362: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a368: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a36e: 39 d1 cmp %edx,%ecx 10a370: 75 ca jne 10a33c RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 10a372: 50 push %eax 10a373: 9d popf } } 10a374: 8b 5d fc mov -0x4(%ebp),%ebx 10a377: c9 leave 10a378: c3 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a379: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a37c: 50 push %eax <== NOT EXECUTED 10a37d: e8 76 1f 00 00 call 10c2f8 <== NOT EXECUTED =============================================================================== 00108d68 : int dup2( int fildes, int fildes2 ) { 108d68: 55 push %ebp 108d69: 89 e5 mov %esp,%ebp 108d6b: 57 push %edi 108d6c: 56 push %esi 108d6d: 53 push %ebx 108d6e: 83 ec 64 sub $0x64,%esp 108d71: 8b 75 08 mov 0x8(%ebp),%esi 108d74: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108d77: 8d 5d a0 lea -0x60(%ebp),%ebx 108d7a: 53 push %ebx 108d7b: 56 push %esi 108d7c: e8 73 05 00 00 call 1092f4 if ( status == -1 ) 108d81: 83 c4 10 add $0x10,%esp 108d84: 40 inc %eax 108d85: 75 0d jne 108d94 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d87: b8 ff ff ff ff mov $0xffffffff,%eax } 108d8c: 8d 65 f4 lea -0xc(%ebp),%esp 108d8f: 5b pop %ebx 108d90: 5e pop %esi 108d91: 5f pop %edi 108d92: c9 leave 108d93: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108d94: 83 ec 08 sub $0x8,%esp 108d97: 53 push %ebx 108d98: 57 push %edi 108d99: e8 56 05 00 00 call 1092f4 if ( status == -1 ) 108d9e: 83 c4 10 add $0x10,%esp 108da1: 40 inc %eax 108da2: 74 e3 je 108d87 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108da4: 50 push %eax <== NOT EXECUTED 108da5: 57 push %edi <== NOT EXECUTED 108da6: 6a 00 push $0x0 <== NOT EXECUTED 108da8: 56 push %esi <== NOT EXECUTED 108da9: e8 f6 01 00 00 call 108fa4 <== NOT EXECUTED 108dae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108db1: eb d9 jmp 108d8c <== NOT EXECUTED =============================================================================== 00109e98 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109e98: 55 push %ebp <== NOT EXECUTED 109e99: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e9b: 53 push %ebx <== NOT EXECUTED 109e9c: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109e9f: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 109ea3: 74 1b je 109ec0 <== NOT EXECUTED 109ea5: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 109ea8: 8b 1d 24 71 12 00 mov 0x127124,%ebx <== NOT EXECUTED 109eae: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 109eb3: 74 0b je 109ec0 <== NOT EXECUTED 109eb5: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109eb7: 74 07 je 109ec0 <== NOT EXECUTED 109eb9: 3c 0a cmp $0xa,%al <== NOT EXECUTED 109ebb: 75 13 jne 109ed0 <== NOT EXECUTED 109ebd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109ec0: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109ec3: e8 94 fe ff ff call 109d5c <== NOT EXECUTED } } 109ec8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109ecb: c9 leave <== NOT EXECUTED 109ecc: c3 ret <== NOT EXECUTED 109ecd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109ed0: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 109ed4: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 109ed7: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 109eda: 50 push %eax <== NOT EXECUTED 109edb: 52 push %edx <== NOT EXECUTED 109edc: 6a 02 push $0x2 <== NOT EXECUTED 109ede: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 109ee1: 50 push %eax <== NOT EXECUTED 109ee2: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 109ee5: e8 3e fd ff ff call 109c28 <== NOT EXECUTED tty->column += 2; 109eea: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109eed: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 109ef4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109ef7: c9 leave <== NOT EXECUTED 109ef8: c3 ret <== NOT EXECUTED =============================================================================== 0012e880 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12e880: 55 push %ebp <== NOT EXECUTED 12e881: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e883: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 12e886: a1 c4 49 17 00 mov 0x1749c4,%eax <== NOT EXECUTED 12e88b: 85 c0 test %eax,%eax <== NOT EXECUTED 12e88d: 74 0c je 12e89b <== NOT EXECUTED fclose(group_fp); 12e88f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e892: 50 push %eax <== NOT EXECUTED 12e893: e8 34 94 01 00 call 147ccc <== NOT EXECUTED 12e898: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12e89b: c9 leave <== NOT EXECUTED 12e89c: c3 ret <== NOT EXECUTED =============================================================================== 0012e8a0 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 12e8a0: 55 push %ebp <== NOT EXECUTED 12e8a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e8a3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 12e8a6: a1 c4 48 17 00 mov 0x1748c4,%eax <== NOT EXECUTED 12e8ab: 85 c0 test %eax,%eax <== NOT EXECUTED 12e8ad: 74 0c je 12e8bb <== NOT EXECUTED fclose(passwd_fp); 12e8af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12e8b2: 50 push %eax <== NOT EXECUTED 12e8b3: e8 14 94 01 00 call 147ccc <== NOT EXECUTED 12e8b8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12e8bb: c9 leave <== NOT EXECUTED 12e8bc: c3 ret <== NOT EXECUTED =============================================================================== 00109efc : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 109efc: 55 push %ebp <== NOT EXECUTED 109efd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109eff: 57 push %edi <== NOT EXECUTED 109f00: 56 push %esi <== NOT EXECUTED 109f01: 53 push %ebx <== NOT EXECUTED 109f02: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109f05: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109f07: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109f09: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109f0c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f0e: 0f 84 84 00 00 00 je 109f98 <== NOT EXECUTED return; if (lineFlag) { 109f14: 85 d2 test %edx,%edx <== NOT EXECUTED 109f16: 0f 85 84 00 00 00 jne 109fa0 <== NOT EXECUTED 109f1c: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109f1f: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109f22: eb 1d jmp 109f41 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f24: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109f27: 0f 85 37 01 00 00 jne 10a064 <== NOT EXECUTED 109f2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109f30: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f33: 85 d2 test %edx,%edx <== NOT EXECUTED 109f35: 74 61 je 109f98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 109f37: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 109f3a: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f3c: 74 5a je 109f98 <== NOT EXECUTED 109f3e: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 109f41: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109f44: 49 dec %ecx <== NOT EXECUTED 109f45: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 109f48: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 109f4b: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109f4e: 74 e0 je 109f30 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109f50: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 109f53: 85 f6 test %esi,%esi <== NOT EXECUTED 109f55: 75 09 jne 109f60 <== NOT EXECUTED 109f57: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109f5a: 0f 84 f0 00 00 00 je 10a050 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109f60: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109f62: 74 58 je 109fbc <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f64: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f67: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 109f6a: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED 109f6f: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f73: 75 af jne 109f24 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109f75: 51 push %ecx <== NOT EXECUTED 109f76: 53 push %ebx <== NOT EXECUTED 109f77: 6a 03 push $0x3 <== NOT EXECUTED 109f79: 68 32 2b 12 00 push $0x122b32 <== NOT EXECUTED 109f7e: e8 a5 fc ff ff call 109c28 <== NOT EXECUTED if (tty->column) 109f83: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109f86: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f89: 85 c0 test %eax,%eax <== NOT EXECUTED 109f8b: 74 a3 je 109f30 <== NOT EXECUTED tty->column--; 109f8d: 48 dec %eax <== NOT EXECUTED 109f8e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 109f91: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f94: 85 d2 test %edx,%edx <== NOT EXECUTED 109f96: 75 9f jne 109f37 <== NOT EXECUTED break; } } 109f98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f9b: 5b pop %ebx <== NOT EXECUTED 109f9c: 5e pop %esi <== NOT EXECUTED 109f9d: 5f pop %edi <== NOT EXECUTED 109f9e: c9 leave <== NOT EXECUTED 109f9f: c3 ret <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109fa0: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109fa3: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109fa6: 0f 84 94 00 00 00 je 10a040 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109fac: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109faf: 0f 84 eb 00 00 00 je 10a0a0 <== NOT EXECUTED 109fb5: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109fb8: eb 87 jmp 109f41 <== NOT EXECUTED 109fba: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109fbc: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fbf: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109fc1: 74 46 je 10a009 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109fc3: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED 109fc8: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 109fcb: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 109fcd: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 109fd3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109fd6: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 109fd9: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 109fdc: eb 10 jmp 109fee <== NOT EXECUTED 109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED 109fe0: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109fe3: 85 d2 test %edx,%edx <== NOT EXECUTED 109fe5: 74 03 je 109fea <== NOT EXECUTED col += 2; 109fe7: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fea: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109fec: 74 18 je 10a006 <== NOT EXECUTED c = tty->cbuf[i++]; 109fee: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 109ff1: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 109ff2: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 109ff5: 74 41 je 10a038 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 109ff7: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109ffa: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109fff: 75 df jne 109fe0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 10a001: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 10a002: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 10a004: 75 e8 jne 109fee <== NOT EXECUTED 10a006: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 10a009: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 10a00c: 0f 8d 1e ff ff ff jge 109f30 <== NOT EXECUTED 10a012: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 10a014: 50 push %eax <== NOT EXECUTED 10a015: 53 push %ebx <== NOT EXECUTED 10a016: 6a 01 push $0x1 <== NOT EXECUTED 10a018: 68 34 2b 12 00 push $0x122b34 <== NOT EXECUTED 10a01d: e8 06 fc ff ff call 109c28 <== NOT EXECUTED tty->column--; 10a022: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a025: 48 dec %eax <== NOT EXECUTED 10a026: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 10a029: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a02c: 39 c6 cmp %eax,%esi <== NOT EXECUTED 10a02e: 7c e4 jl 10a014 <== NOT EXECUTED 10a030: e9 fb fe ff ff jmp 109f30 <== NOT EXECUTED 10a035: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 10a038: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 10a03b: 46 inc %esi <== NOT EXECUTED 10a03c: eb ac jmp 109fea <== NOT EXECUTED 10a03e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 10a040: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 10a047: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a04a: 5b pop %ebx <== NOT EXECUTED 10a04b: 5e pop %esi <== NOT EXECUTED 10a04c: 5f pop %edi <== NOT EXECUTED 10a04d: c9 leave <== NOT EXECUTED 10a04e: c3 ret <== NOT EXECUTED 10a04f: 90 nop <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 10a050: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 10a054: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 10a056: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a059: 5b pop %ebx <== NOT EXECUTED 10a05a: 5e pop %esi <== NOT EXECUTED 10a05b: 5f pop %edi <== NOT EXECUTED 10a05c: c9 leave <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 10a05d: e9 36 fe ff ff jmp 109e98 <== NOT EXECUTED 10a062: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 10a064: 57 push %edi <== NOT EXECUTED 10a065: 53 push %ebx <== NOT EXECUTED 10a066: 6a 03 push $0x3 <== NOT EXECUTED 10a068: 68 32 2b 12 00 push $0x122b32 <== NOT EXECUTED 10a06d: e8 b6 fb ff ff call 109c28 <== NOT EXECUTED if (tty->column) 10a072: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a078: 85 c0 test %eax,%eax <== NOT EXECUTED 10a07a: 74 04 je 10a080 <== NOT EXECUTED tty->column--; 10a07c: 48 dec %eax <== NOT EXECUTED 10a07d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 10a080: a1 24 71 12 00 mov 0x127124,%eax <== NOT EXECUTED 10a085: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 10a089: 0f 84 e6 fe ff ff je 109f75 <== NOT EXECUTED 10a08f: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 10a093: 0f 85 dc fe ff ff jne 109f75 <== NOT EXECUTED 10a099: e9 92 fe ff ff jmp 109f30 <== NOT EXECUTED 10a09e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 10a0a0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 10a0a7: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 10a0ab: 89 da mov %ebx,%edx <== NOT EXECUTED 10a0ad: e8 e6 fd ff ff call 109e98 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 10a0b2: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 10a0b6: 0f 84 dc fe ff ff je 109f98 <== NOT EXECUTED echo ('\n', tty); 10a0bc: 89 da mov %ebx,%edx <== NOT EXECUTED 10a0be: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a0c3: eb 91 jmp 10a056 <== NOT EXECUTED =============================================================================== 0012ba14 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 12ba14: 55 push %ebp <== NOT EXECUTED 12ba15: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ba17: 57 push %edi <== NOT EXECUTED 12ba18: 56 push %esi <== NOT EXECUTED 12ba19: 53 push %ebx <== NOT EXECUTED 12ba1a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12ba1d: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 12ba20: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 12ba27: 0f 84 bf 00 00 00 je 12baec <== NOT EXECUTED 12ba2d: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12ba30: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12ba34: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12ba36: 0f 86 f9 00 00 00 jbe 12bb35 <== NOT EXECUTED 12ba3c: 31 d2 xor %edx,%edx <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 12ba3e: 39 45 0c cmp %eax,0xc(%ebp) <== NOT EXECUTED 12ba41: 0f 84 8d 00 00 00 je 12bad4 <== NOT EXECUTED { if (fs_info->c.modified) 12ba47: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 12ba4e: 0f 84 ec 00 00 00 je 12bb40 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 12ba54: 84 d2 test %dl,%dl <== NOT EXECUTED 12ba56: 74 0a je 12ba62 <== NOT EXECUTED 12ba58: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12ba5c: 0f 84 b2 01 00 00 je 12bc14 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 12ba62: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ba65: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12ba6b: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 12ba6e: e8 89 f9 fd ff call 10b3fc <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12ba73: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 12ba7a: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12ba81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ba84: 85 c0 test %eax,%eax <== NOT EXECUTED 12ba86: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 12ba89: 0f 85 d1 00 00 00 jne 12bb60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 12ba8f: 84 d2 test %dl,%dl <== NOT EXECUTED 12ba91: 74 0a je 12ba9d <== NOT EXECUTED 12ba93: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12ba97: 0f 84 fb 00 00 00 je 12bb98 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 12ba9d: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12baa1: 0f 84 89 01 00 00 je 12bc30 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 12baa7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12baad: 50 push %eax <== NOT EXECUTED 12baae: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12bab1: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12bab4: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12bab7: e8 6c 09 fe ff call 10c428 <== NOT EXECUTED 12babc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12babf: 85 c0 test %eax,%eax <== NOT EXECUTED 12bac1: 0f 85 99 00 00 00 jne 12bb60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 12bac7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12baca: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 12bacd: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } *buf = fs_info->c.buf; 12bad4: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx <== NOT EXECUTED 12bada: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12badd: 89 10 mov %edx,(%eax) <== NOT EXECUTED 12badf: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 12bae1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bae4: 5b pop %ebx <== NOT EXECUTED 12bae5: 5e pop %esi <== NOT EXECUTED 12bae6: 5f pop %edi <== NOT EXECUTED 12bae7: c9 leave <== NOT EXECUTED 12bae8: c3 ret <== NOT EXECUTED 12bae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 12baec: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12baf0: 0f 84 82 00 00 00 je 12bb78 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 12baf6: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12bafc: 50 push %eax <== NOT EXECUTED 12bafd: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12bb00: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12bb03: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12bb06: e8 1d 09 fe ff call 10c428 <== NOT EXECUTED 12bb0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12bb0e: 85 c0 test %eax,%eax <== NOT EXECUTED 12bb10: 75 4e jne 12bb60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 12bb12: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bb15: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 12bb18: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 12bb1f: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED 12bb26: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12bb29: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12bb2d: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12bb2f: 0f 87 07 ff ff ff ja 12ba3c <== NOT EXECUTED 12bb35: 39 43 1c cmp %eax,0x1c(%ebx) <== NOT EXECUTED 12bb38: 0f 97 c2 seta %dl <== NOT EXECUTED 12bb3b: e9 fe fe ff ff jmp 12ba3e <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 12bb40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bb43: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12bb49: e8 2a f9 fd ff call 10b478 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12bb4e: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12bb55: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bb58: 85 c0 test %eax,%eax <== NOT EXECUTED 12bb5a: 0f 84 3d ff ff ff je 12ba9d <== NOT EXECUTED if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 12bb60: e8 1b c0 01 00 call 147b80 <__errno> <== NOT EXECUTED 12bb65: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12bb6b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12bb70: e9 6c ff ff ff jmp 12bae1 <== NOT EXECUTED 12bb75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 12bb78: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12bb7e: 50 push %eax <== NOT EXECUTED 12bb7f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12bb82: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12bb85: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12bb88: e8 67 09 fe ff call 10c4f4 <== NOT EXECUTED 12bb8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bb90: e9 79 ff ff ff jmp 12bb0e <== NOT EXECUTED 12bb95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12bb98: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED 12bb9c: 0f 86 fb fe ff ff jbe 12ba9d <== NOT EXECUTED 12bba2: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 12bba6: eb 34 jmp 12bbdc <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 12bba8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12bbab: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 12bbae: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12bbb1: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 12bbb7: 89 c7 mov %eax,%edi <== NOT EXECUTED 12bbb9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 12bbbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bbbe: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12bbc1: e8 36 f8 fd ff call 10b3fc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 12bbc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bbc9: 85 c0 test %eax,%eax <== NOT EXECUTED 12bbcb: 75 31 jne 12bbfe <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12bbcd: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 12bbd0: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 12bbd3: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED 12bbd6: 0f 86 c1 fe ff ff jbe 12ba9d <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 12bbdc: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bbdf: 50 push %eax <== NOT EXECUTED 12bbe0: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 12bbe4: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12bbe8: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 12bbeb: 50 push %eax <== NOT EXECUTED 12bbec: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12bbef: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12bbf2: e8 31 08 fe ff call 10c428 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 12bbf7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bbfa: 85 c0 test %eax,%eax <== NOT EXECUTED 12bbfc: 74 aa je 12bba8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 12bbfe: e8 7d bf 01 00 call 147b80 <__errno> <== NOT EXECUTED 12bc03: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12bc09: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12bc0e: e9 ce fe ff ff jmp 12bae1 <== NOT EXECUTED 12bc13: 90 nop <== NOT EXECUTED if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 12bc14: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12bc17: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED 12bc1d: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 12bc20: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi <== NOT EXECUTED 12bc26: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 12bc28: e9 35 fe ff ff jmp 12ba62 <== NOT EXECUTED 12bc2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 12bc30: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 12bc36: 50 push %eax <== NOT EXECUTED 12bc37: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12bc3a: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12bc3d: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12bc40: e8 af 08 fe ff call 10c4f4 <== NOT EXECUTED 12bc45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bc48: e9 72 fe ff ff jmp 12babf <== NOT EXECUTED =============================================================================== 0012b8a4 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 12b8a4: 55 push %ebp <== NOT EXECUTED 12b8a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b8a7: 57 push %edi <== NOT EXECUTED 12b8a8: 56 push %esi <== NOT EXECUTED 12b8a9: 53 push %ebx <== NOT EXECUTED 12b8aa: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12b8ad: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 12b8b0: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 12b8b7: 0f 84 f7 00 00 00 je 12b9b4 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12b8bd: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 12b8c0: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12b8c4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12b8c6: 0f 83 f4 00 00 00 jae 12b9c0 <== NOT EXECUTED 12b8cc: 31 d2 xor %edx,%edx <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 12b8ce: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 12b8d5: 0f 84 bd 00 00 00 je 12b998 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 12b8db: 84 d2 test %dl,%dl <== NOT EXECUTED 12b8dd: 74 0a je 12b8e9 <== NOT EXECUTED 12b8df: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b8e3: 0f 84 e3 00 00 00 je 12b9cc <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 12b8e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b8ec: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b8f2: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 12b8f5: e8 02 fb fd ff call 10b3fc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b8fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b8fd: 85 c0 test %eax,%eax <== NOT EXECUTED 12b8ff: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 12b902: 0f 85 df 00 00 00 jne 12b9e7 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 12b908: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 12b90f: 84 d2 test %dl,%dl <== NOT EXECUTED 12b911: 0f 84 96 00 00 00 je 12b9ad <== NOT EXECUTED 12b917: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 12b91b: 0f 85 8c 00 00 00 jne 12b9ad <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b921: 80 7b 09 01 cmpb $0x1,0x9(%ebx) <== NOT EXECUTED 12b925: 0f 86 82 00 00 00 jbe 12b9ad <== NOT EXECUTED 12b92b: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 12b92f: eb 33 jmp 12b964 <== NOT EXECUTED 12b931: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 12b934: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b937: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 12b93a: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b93d: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 12b943: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b945: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 12b947: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b94a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b94d: e8 aa fa fd ff call 10b3fc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 12b952: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b955: 85 c0 test %eax,%eax <== NOT EXECUTED 12b957: 75 2d jne 12b986 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 12b959: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 12b95c: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 12b95f: 38 43 09 cmp %al,0x9(%ebx) <== NOT EXECUTED 12b962: 76 49 jbe 12b9ad <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 12b964: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b967: 50 push %eax <== NOT EXECUTED 12b968: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 12b96c: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12b970: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 12b973: 50 push %eax <== NOT EXECUTED 12b974: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12b977: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12b97a: e8 a9 0a fe ff call 10c428 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 12b97f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b982: 85 c0 test %eax,%eax <== NOT EXECUTED 12b984: 74 ae je 12b934 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 12b986: e8 f5 c1 01 00 call 147b80 <__errno> <== NOT EXECUTED 12b98b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b991: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b996: eb 1e jmp 12b9b6 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 12b998: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b99b: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12b9a1: e8 d2 fa fd ff call 10b478 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12b9a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b9a9: 85 c0 test %eax,%eax <== NOT EXECUTED 12b9ab: 75 3a jne 12b9e7 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 12b9ad: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED 12b9b4: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 12b9b6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b9b9: 5b pop %ebx <== NOT EXECUTED 12b9ba: 5e pop %esi <== NOT EXECUTED 12b9bb: 5f pop %edi <== NOT EXECUTED 12b9bc: c9 leave <== NOT EXECUTED 12b9bd: c3 ret <== NOT EXECUTED 12b9be: 66 90 xchg %ax,%ax <== NOT EXECUTED *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 12b9c0: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 12b9c3: 0f 92 c2 setb %dl <== NOT EXECUTED 12b9c6: e9 03 ff ff ff jmp 12b8ce <== NOT EXECUTED 12b9cb: 90 nop <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 12b9cc: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 12b9d2: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12b9d5: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 12b9db: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 12b9de: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b9e0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 12b9e2: e9 02 ff ff ff jmp 12b8e9 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 12b9e7: e8 94 c1 01 00 call 147b80 <__errno> <== NOT EXECUTED 12b9ec: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12b9f2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b9f7: eb bd jmp 12b9b6 <== NOT EXECUTED =============================================================================== 0012c718 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 12c718: 55 push %ebp <== NOT EXECUTED 12c719: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c71b: 56 push %esi <== NOT EXECUTED 12c71c: 53 push %ebx <== NOT EXECUTED 12c71d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12c720: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12c723: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12c726: 85 d2 test %edx,%edx <== NOT EXECUTED 12c728: 75 06 jne 12c730 <== NOT EXECUTED 12c72a: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 12c72e: 75 30 jne 12c760 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12c730: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 12c733: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 12c737: d3 e2 shl %cl,%edx <== NOT EXECUTED 12c739: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 12c73c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c73f: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 12c742: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED 12c746: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED 12c74a: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12c74c: 53 push %ebx <== NOT EXECUTED 12c74d: 6a 00 push $0x0 <== NOT EXECUTED 12c74f: 52 push %edx <== NOT EXECUTED 12c750: 56 push %esi <== NOT EXECUTED 12c751: e8 46 f8 ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 12c756: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12c759: 5b pop %ebx <== NOT EXECUTED 12c75a: 5e pop %esi <== NOT EXECUTED 12c75b: c9 leave <== NOT EXECUTED 12c75c: c3 ret <== NOT EXECUTED 12c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 12c760: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 12c763: eb d7 jmp 12c73c <== NOT EXECUTED =============================================================================== 0012be90 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 12be90: 55 push %ebp <== NOT EXECUTED 12be91: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12be93: 56 push %esi <== NOT EXECUTED 12be94: 53 push %ebx <== NOT EXECUTED 12be95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12be98: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12be9b: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12be9e: 85 d2 test %edx,%edx <== NOT EXECUTED 12bea0: 75 06 jne 12bea8 <== NOT EXECUTED 12bea2: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 12bea6: 75 30 jne 12bed8 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12bea8: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 12beab: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 12beaf: d3 e2 shl %cl,%edx <== NOT EXECUTED 12beb1: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 12beb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12beb7: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 12beba: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED 12bebe: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED 12bec2: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12bec4: 53 push %ebx <== NOT EXECUTED 12bec5: 6a 00 push $0x0 <== NOT EXECUTED 12bec7: 52 push %edx <== NOT EXECUTED 12bec8: 56 push %esi <== NOT EXECUTED 12bec9: e8 82 fd ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 12bece: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12bed1: 5b pop %ebx <== NOT EXECUTED 12bed2: 5e pop %esi <== NOT EXECUTED 12bed3: c9 leave <== NOT EXECUTED 12bed4: c3 ret <== NOT EXECUTED 12bed5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 12bed8: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 12bedb: eb d7 jmp 12beb4 <== NOT EXECUTED =============================================================================== 0012bd00 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 12bd00: 55 push %ebp <== NOT EXECUTED 12bd01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bd03: 57 push %edi <== NOT EXECUTED 12bd04: 56 push %esi <== NOT EXECUTED 12bd05: 53 push %ebx <== NOT EXECUTED 12bd06: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 12bd09: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 12bd0c: 8b 73 34 mov 0x34(%ebx),%esi <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 12bd0f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bd12: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 12bd15: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 12bd18: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 12bd1b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bd1e: 50 push %eax <== NOT EXECUTED 12bd1f: 6a 04 push $0x4 <== NOT EXECUTED 12bd21: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED 12bd26: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 12bd2a: 50 push %eax <== NOT EXECUTED 12bd2b: 53 push %ebx <== NOT EXECUTED 12bd2c: e8 1f ff ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED 12bd31: 89 c7 mov %eax,%edi <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 12bd33: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 12bd36: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12bd39: 50 push %eax <== NOT EXECUTED 12bd3a: 6a 04 push $0x4 <== NOT EXECUTED 12bd3c: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED 12bd41: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 12bd45: 50 push %eax <== NOT EXECUTED 12bd46: 53 push %ebx <== NOT EXECUTED 12bd47: e8 04 ff ff ff call 12bc50 <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 12bd4c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12bd4f: 85 ff test %edi,%edi <== NOT EXECUTED 12bd51: 79 0d jns 12bd60 <== NOT EXECUTED 12bd53: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; return RC_OK; } 12bd58: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bd5b: 5b pop %ebx <== NOT EXECUTED 12bd5c: 5e pop %esi <== NOT EXECUTED 12bd5d: 5f pop %edi <== NOT EXECUTED 12bd5e: c9 leave <== NOT EXECUTED 12bd5f: c3 ret <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 12bd60: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd62: 78 ef js 12bd53 <== NOT EXECUTED 12bd64: 31 c0 xor %eax,%eax <== NOT EXECUTED 12bd66: eb f0 jmp 12bd58 <== NOT EXECUTED =============================================================================== 0012b4b0 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12b4b0: 55 push %ebp <== NOT EXECUTED 12b4b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b4b3: 57 push %edi <== NOT EXECUTED 12b4b4: 56 push %esi <== NOT EXECUTED 12b4b5: 53 push %ebx <== NOT EXECUTED 12b4b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b4b9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12b4bc: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b4bf: 8b 7e 34 mov 0x34(%esi),%edi <== NOT EXECUTED /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 12b4c2: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 12b4c5: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12b4c8: 76 0e jbe 12b4d8 <== NOT EXECUTED { fat_fd->links_num--; 12b4ca: 48 dec %eax <== NOT EXECUTED 12b4cb: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED 12b4ce: 31 c0 xor %eax,%eax <== NOT EXECUTED * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 12b4d0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b4d3: 5b pop %ebx <== NOT EXECUTED 12b4d4: 5e pop %esi <== NOT EXECUTED 12b4d5: 5f pop %edi <== NOT EXECUTED 12b4d6: c9 leave <== NOT EXECUTED 12b4d7: c3 ret <== NOT EXECUTED return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 12b4d8: f6 43 30 01 testb $0x1,0x30(%ebx) <== NOT EXECUTED 12b4dc: 74 3a je 12b518 <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 12b4de: 51 push %ecx <== NOT EXECUTED 12b4df: 6a 00 push $0x0 <== NOT EXECUTED 12b4e1: 53 push %ebx <== NOT EXECUTED 12b4e2: 56 push %esi <== NOT EXECUTED 12b4e3: e8 a4 f8 ff ff call 12ad8c <== NOT EXECUTED if ( rc != RC_OK ) 12b4e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b4eb: 85 c0 test %eax,%eax <== NOT EXECUTED 12b4ed: 75 e1 jne 12b4d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 12b4ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b4f2: 53 push %ebx <== NOT EXECUTED 12b4f3: e8 88 85 fe ff call 113a80 <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 12b4f8: 58 pop %eax <== NOT EXECUTED 12b4f9: 5a pop %edx <== NOT EXECUTED 12b4fa: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b4fd: 56 push %esi <== NOT EXECUTED 12b4fe: e8 bd 02 00 00 call 12b7c0 <== NOT EXECUTED 12b503: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b506: 84 c0 test %al,%al <== NOT EXECUTED 12b508: 75 52 jne 12b55c <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); free(fat_fd); 12b50a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b50d: 53 push %ebx <== NOT EXECUTED 12b50e: e8 55 33 fe ff call 10e868 <== NOT EXECUTED 12b513: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b516: eb 1a jmp 12b532 <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 12b518: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b51b: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b51e: 56 push %esi <== NOT EXECUTED 12b51f: e8 9c 02 00 00 call 12b7c0 <== NOT EXECUTED 12b524: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b527: 84 c0 test %al,%al <== NOT EXECUTED 12b529: 74 19 je 12b544 <== NOT EXECUTED { fat_fd->links_num = 0; 12b52b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12b532: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED return rc; } 12b535: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b538: 5b pop %ebx <== NOT EXECUTED 12b539: 5e pop %esi <== NOT EXECUTED 12b53a: 5f pop %edi <== NOT EXECUTED 12b53b: c9 leave <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12b53c: e9 63 03 00 00 jmp 12b8a4 <== NOT EXECUTED 12b541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12b544: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b547: 53 push %ebx <== NOT EXECUTED 12b548: e8 33 85 fe ff call 113a80 <_Chain_Extract> <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 12b54d: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 12b550: e8 13 33 fe ff call 10e868 <== NOT EXECUTED 12b555: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b558: eb d8 jmp 12b532 <== NOT EXECUTED 12b55a: 66 90 xchg %ax,%ax <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 12b55c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b55f: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12b562: 56 push %esi <== NOT EXECUTED 12b563: e8 30 02 00 00 call 12b798 <== NOT EXECUTED 12b568: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b56b: eb 9d jmp 12b50a <== NOT EXECUTED =============================================================================== 0012ab8c : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12ab8c: 55 push %ebp <== NOT EXECUTED 12ab8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ab8f: 57 push %edi <== NOT EXECUTED 12ab90: 56 push %esi <== NOT EXECUTED 12ab91: 53 push %ebx <== NOT EXECUTED 12ab92: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12ab95: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ab98: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12ab9b: 8b 5a 34 mov 0x34(%edx),%ebx <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 12ab9e: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 12aba1: 8b 78 18 mov 0x18(%eax),%edi <== NOT EXECUTED 12aba4: 85 ff test %edi,%edi <== NOT EXECUTED 12aba6: 75 0c jne 12abb4 <== NOT EXECUTED 12aba8: 31 c0 xor %eax,%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12abaa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12abad: 5b pop %ebx <== NOT EXECUTED 12abae: 5e pop %esi <== NOT EXECUTED 12abaf: 5f pop %edi <== NOT EXECUTED 12abb0: c9 leave <== NOT EXECUTED 12abb1: c3 ret <== NOT EXECUTED 12abb2: 66 90 xchg %ax,%ax <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 12abb4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 12abbb: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 12abbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12abc1: 53 push %ebx <== NOT EXECUTED 12abc2: e8 dd 0c 00 00 call 12b8a4 <== NOT EXECUTED 12abc7: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED if (rc != RC_OK) 12abca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12abcd: 85 c0 test %eax,%eax <== NOT EXECUTED 12abcf: 0f 85 97 00 00 00 jne 12ac6c <== NOT EXECUTED 12abd5: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12abd8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12abdb: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12abde: 21 c2 and %eax,%edx <== NOT EXECUTED 12abe0: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12abe3: 0f 83 83 00 00 00 jae 12ac6c <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12abe9: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12abec: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12abef: 85 c0 test %eax,%eax <== NOT EXECUTED 12abf1: 74 6d je 12ac60 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12abf3: 8d 70 fe lea -0x2(%eax),%esi <== NOT EXECUTED 12abf6: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12abfa: d3 e6 shl %cl,%esi <== NOT EXECUTED 12abfc: 03 72 30 add 0x30(%edx),%esi <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 12abff: 80 7b 04 00 cmpb $0x0,0x4(%ebx) <== NOT EXECUTED 12ac03: 74 76 je 12ac7b <== NOT EXECUTED 12ac05: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ac07: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED 12ac0a: 89 c6 mov %eax,%esi <== NOT EXECUTED 12ac0c: eb 1d jmp 12ac2b <== NOT EXECUTED 12ac0e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 12ac10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ac13: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 12ac16: e8 65 11 fe ff call 10bd80 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 12ac1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ac1e: 85 c0 test %eax,%eax <== NOT EXECUTED 12ac20: 75 23 jne 12ac45 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 12ac22: 46 inc %esi <== NOT EXECUTED 12ac23: 0f b6 43 04 movzbl 0x4(%ebx),%eax <== NOT EXECUTED 12ac27: 39 f0 cmp %esi,%eax <== NOT EXECUTED 12ac29: 76 4d jbe 12ac78 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 12ac2b: 57 push %edi <== NOT EXECUTED 12ac2c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 12ac2f: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED 12ac32: 50 push %eax <== NOT EXECUTED 12ac33: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12ac36: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 12ac39: e8 b6 18 fe ff call 10c4f4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12ac3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ac41: 85 c0 test %eax,%eax <== NOT EXECUTED 12ac43: 74 cb je 12ac10 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 12ac45: e8 36 cf 01 00 call 147b80 <__errno> <== NOT EXECUTED 12ac4a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12ac50: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12ac55: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ac58: 5b pop %ebx <== NOT EXECUTED 12ac59: 5e pop %esi <== NOT EXECUTED 12ac5a: 5f pop %edi <== NOT EXECUTED 12ac5b: c9 leave <== NOT EXECUTED 12ac5c: c3 ret <== NOT EXECUTED 12ac5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12ac60: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12ac64: 74 8d je 12abf3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12ac66: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED 12ac69: eb 94 jmp 12abff <== NOT EXECUTED 12ac6b: 90 nop <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12ac6c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 12ac6f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ac72: 5b pop %ebx <== NOT EXECUTED 12ac73: 5e pop %esi <== NOT EXECUTED 12ac74: 5f pop %edi <== NOT EXECUTED 12ac75: c9 leave <== NOT EXECUTED 12ac76: c3 ret <== NOT EXECUTED 12ac77: 90 nop <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 12ac78: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12ac7b: 56 push %esi <== NOT EXECUTED 12ac7c: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12ac7f: 51 push %ecx <== NOT EXECUTED 12ac80: 50 push %eax <== NOT EXECUTED 12ac81: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12ac84: e8 a3 89 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12ac89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ac8c: 85 c0 test %eax,%eax <== NOT EXECUTED 12ac8e: 0f 84 44 ff ff ff je 12abd8 <== NOT EXECUTED 12ac94: e9 11 ff ff ff jmp 12abaa <== NOT EXECUTED =============================================================================== 0012ae6c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 12ae6c: 55 push %ebp <== NOT EXECUTED 12ae6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ae6f: 57 push %edi <== NOT EXECUTED 12ae70: 56 push %esi <== NOT EXECUTED 12ae71: 53 push %ebx <== NOT EXECUTED 12ae72: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12ae75: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 12ae78: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ae7b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12ae7e: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED uint32_t chain = 0; 12ae81: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 12ae88: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 12ae8f: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12ae92: 89 39 mov %edi,(%ecx) <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 12ae94: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 12ae97: 39 c7 cmp %eax,%edi <== NOT EXECUTED 12ae99: 0f 86 d5 00 00 00 jbe 12af74 <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ae9f: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 12aea3: 0f 84 d7 00 00 00 je 12af80 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 12aea9: 0f b7 56 06 movzwl 0x6(%esi),%edx <== NOT EXECUTED 12aead: 8d 4a ff lea -0x1(%edx),%ecx <== NOT EXECUTED 12aeb0: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 12aeb3: 21 c1 and %eax,%ecx <== NOT EXECUTED 12aeb5: 29 ca sub %ecx,%edx <== NOT EXECUTED 12aeb7: 23 55 c4 and -0x3c(%ebp),%edx <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 12aeba: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12aebc: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12aebe: 89 c8 mov %ecx,%eax <== NOT EXECUTED if (bytes2add > bytes_remain) 12aec0: 39 ca cmp %ecx,%edx <== NOT EXECUTED 12aec2: 0f 83 ac 00 00 00 jae 12af74 <== NOT EXECUTED /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 12aec8: 29 d0 sub %edx,%eax <== NOT EXECUTED 12aeca: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12aecd: 0f 84 a1 00 00 00 je 12af74 <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 12aed3: 48 dec %eax <== NOT EXECUTED 12aed4: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED 12aed8: d3 e8 shr %cl,%eax <== NOT EXECUTED 12aeda: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 12aedd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aee0: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 12aee3: 50 push %eax <== NOT EXECUTED 12aee4: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 12aee7: 50 push %eax <== NOT EXECUTED 12aee8: 51 push %ecx <== NOT EXECUTED 12aee9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12aeec: 50 push %eax <== NOT EXECUTED 12aeed: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12aef0: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 12aef3: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 12aef6: e8 91 89 01 00 call 14388c <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 12aefb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12aefe: 85 c0 test %eax,%eax <== NOT EXECUTED 12af00: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12af03: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12af06: 0f 85 9c 00 00 00 jne 12afa8 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 12af0c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12af0f: 85 c0 test %eax,%eax <== NOT EXECUTED 12af11: 75 04 jne 12af17 <== NOT EXECUTED 12af13: 85 d2 test %edx,%edx <== NOT EXECUTED 12af15: 74 7e je 12af95 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 12af17: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 12af19: 74 1d je 12af38 <== NOT EXECUTED *a_length = new_length - 12af1b: f7 d0 not %eax <== NOT EXECUTED 12af1d: 01 c8 add %ecx,%eax <== NOT EXECUTED 12af1f: 0f b6 4e 08 movzbl 0x8(%esi),%ecx <== NOT EXECUTED 12af23: d3 e0 shl %cl,%eax <== NOT EXECUTED 12af25: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12af27: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12af29: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 12af2d: 48 dec %eax <== NOT EXECUTED 12af2e: 23 45 d4 and -0x2c(%ebp),%eax <== NOT EXECUTED 12af31: 29 c1 sub %eax,%ecx <== NOT EXECUTED 12af33: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 12af36: 89 08 mov %ecx,(%eax) <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 12af38: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 12af3b: 85 c0 test %eax,%eax <== NOT EXECUTED 12af3d: 75 6d jne 12afac <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 12af3f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12af42: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED 12af45: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED fat_fd->map.file_cln = 0; 12af48: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) <== NOT EXECUTED } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 12af4f: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 12af52: 85 d2 test %edx,%edx <== NOT EXECUTED 12af54: 74 0c je 12af62 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 12af56: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 12af59: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 12af5c: 83 7b 10 01 cmpl $0x1,0x10(%ebx) <== NOT EXECUTED 12af60: 74 7c je 12afde <== NOT EXECUTED return rc; } } } fat_fd->fat_file_size = new_length; 12af62: 89 7b 18 mov %edi,0x18(%ebx) <== NOT EXECUTED 12af65: 31 d2 xor %edx,%edx <== NOT EXECUTED return RC_OK; } 12af67: 89 d0 mov %edx,%eax <== NOT EXECUTED 12af69: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12af6c: 5b pop %ebx <== NOT EXECUTED 12af6d: 5e pop %esi <== NOT EXECUTED 12af6e: 5f pop %edi <== NOT EXECUTED 12af6f: c9 leave <== NOT EXECUTED 12af70: c3 ret <== NOT EXECUTED 12af71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } fat_fd->fat_file_size = new_length; return RC_OK; 12af74: 31 d2 xor %edx,%edx <== NOT EXECUTED } 12af76: 89 d0 mov %edx,%eax <== NOT EXECUTED 12af78: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12af7b: 5b pop %ebx <== NOT EXECUTED 12af7c: 5e pop %esi <== NOT EXECUTED 12af7d: 5f pop %edi <== NOT EXECUTED 12af7e: c9 leave <== NOT EXECUTED 12af7f: c3 ret <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12af80: 8b 53 24 mov 0x24(%ebx),%edx <== NOT EXECUTED 12af83: 85 d2 test %edx,%edx <== NOT EXECUTED 12af85: 0f 85 1e ff ff ff jne 12aea9 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12af8b: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12af8f: 0f 84 14 ff ff ff je 12aea9 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 12af95: e8 e6 cb 01 00 call 147b80 <__errno> <== NOT EXECUTED 12af9a: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 12afa0: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 12afa5: eb cf jmp 12af76 <== NOT EXECUTED 12afa7: 90 nop <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 12afa8: 89 c2 mov %eax,%edx <== NOT EXECUTED 12afaa: eb ca jmp 12af76 <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 12afac: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 12afaf: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED 12afb2: 74 64 je 12b018 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 12afb4: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 12afb7: 51 push %ecx <== NOT EXECUTED 12afb8: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12afbb: 52 push %edx <== NOT EXECUTED 12afbc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12afbf: e8 40 84 01 00 call 143404 <== NOT EXECUTED 12afc4: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 12afc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12afc9: 85 c0 test %eax,%eax <== NOT EXECUTED 12afcb: 75 2f jne 12affc <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 12afcd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12afd0: 56 push %esi <== NOT EXECUTED 12afd1: e8 ce 08 00 00 call 12b8a4 <== NOT EXECUTED 12afd6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12afd9: e9 71 ff ff ff jmp 12af4f <== NOT EXECUTED if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 12afde: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12afe1: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12afe4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12afe7: e8 f4 0e 00 00 call 12bee0 <== NOT EXECUTED 12afec: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 12afee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12aff1: 85 c0 test %eax,%eax <== NOT EXECUTED 12aff3: 0f 84 69 ff ff ff je 12af62 <== NOT EXECUTED 12aff9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 12affc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12afff: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b002: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b005: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 12b008: e8 a3 87 01 00 call 1437b0 <== NOT EXECUTED return rc; 12b00d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b010: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12b013: e9 5e ff ff ff jmp 12af76 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 12b018: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b01b: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED 12b01e: 52 push %edx <== NOT EXECUTED 12b01f: 48 dec %eax <== NOT EXECUTED 12b020: 50 push %eax <== NOT EXECUTED 12b021: 6a 01 push $0x1 <== NOT EXECUTED 12b023: 53 push %ebx <== NOT EXECUTED 12b024: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b027: e8 c4 fc ff ff call 12acf0 <== NOT EXECUTED 12b02c: 89 c2 mov %eax,%edx <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 12b02e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b031: 85 c0 test %eax,%eax <== NOT EXECUTED 12b033: 75 c7 jne 12affc <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 12b035: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 12b038: e9 7a ff ff ff jmp 12afb7 <== NOT EXECUTED =============================================================================== 0012acf0 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 12acf0: 55 push %ebp <== NOT EXECUTED 12acf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12acf3: 56 push %esi <== NOT EXECUTED 12acf4: 53 push %ebx <== NOT EXECUTED 12acf5: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 12acf8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12acfb: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12acfe: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED uint32_t cur_cln = 0; 12ad01: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 12ad08: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12ad0c: 74 1a je 12ad28 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 12ad0e: e8 6d ce 01 00 call 147b80 <__errno> <== NOT EXECUTED 12ad13: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12ad19: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = -1; break; } return rc; } 12ad1e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12ad21: 5b pop %ebx <== NOT EXECUTED 12ad22: 5e pop %esi <== NOT EXECUTED 12ad23: c9 leave <== NOT EXECUTED 12ad24: c3 ret <== NOT EXECUTED 12ad25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 12ad28: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 12ad2b: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 12ad2e: 3b 72 18 cmp 0x18(%edx),%esi <== NOT EXECUTED 12ad31: 73 45 jae 12ad78 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ad33: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED 12ad37: 74 27 je 12ad60 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12ad39: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ad3c: 0f b6 49 08 movzbl 0x8(%ecx),%ecx <== NOT EXECUTED 12ad40: d3 ee shr %cl,%esi <== NOT EXECUTED 12ad42: 89 f1 mov %esi,%ecx <== NOT EXECUTED 12ad44: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 12ad47: 56 push %esi <== NOT EXECUTED 12ad48: e8 a3 fd ff ff call 12aaf0 <== NOT EXECUTED if ( rc != RC_OK ) 12ad4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ad50: 85 c0 test %eax,%eax <== NOT EXECUTED 12ad52: 75 ca jne 12ad1e <== NOT EXECUTED return rc; *ret = cur_cln; 12ad54: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 12ad57: 89 13 mov %edx,(%ebx) <== NOT EXECUTED errno = EINVAL; rc = -1; break; } return rc; } 12ad59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 12ad5c: 5b pop %ebx <== NOT EXECUTED 12ad5d: 5e pop %esi <== NOT EXECUTED 12ad5e: c9 leave <== NOT EXECUTED 12ad5f: c3 ret <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12ad60: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED 12ad64: 75 d3 jne 12ad39 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12ad66: f6 41 0a 03 testb $0x3,0xa(%ecx) <== NOT EXECUTED 12ad6a: 74 cd je 12ad39 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 12ad6c: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 12ad72: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; 12ad74: eb a8 jmp 12ad1e <== NOT EXECUTED 12ad76: 66 90 xchg %ax,%ax <== NOT EXECUTED pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); 12ad78: e8 03 ce 01 00 call 147b80 <__errno> <== NOT EXECUTED 12ad7d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12ad83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12ad88: eb 94 jmp 12ad1e <== NOT EXECUTED =============================================================================== 0012aaf0 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 12aaf0: 55 push %ebp <== NOT EXECUTED 12aaf1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12aaf3: 57 push %edi <== NOT EXECUTED 12aaf4: 56 push %esi <== NOT EXECUTED 12aaf5: 53 push %ebx <== NOT EXECUTED 12aaf6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12aaf9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 12aafb: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 12aafe: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 12ab01: 8b 7a 34 mov 0x34(%edx),%edi <== NOT EXECUTED 12ab04: 39 cf cmp %ecx,%edi <== NOT EXECUTED 12ab06: 74 70 je 12ab78 <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 12ab08: 72 3a jb 12ab44 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 12ab0a: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12ab0d: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 12ab10: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12ab13: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 12ab16: 85 ff test %edi,%edi <== NOT EXECUTED 12ab18: 74 41 je 12ab5b <== NOT EXECUTED 12ab1a: 31 f6 xor %esi,%esi <== NOT EXECUTED 12ab1c: eb 0a jmp 12ab28 <== NOT EXECUTED 12ab1e: 66 90 xchg %ax,%ax <== NOT EXECUTED 12ab20: 46 inc %esi <== NOT EXECUTED 12ab21: 39 f7 cmp %esi,%edi <== NOT EXECUTED 12ab23: 76 33 jbe 12ab58 <== NOT EXECUTED 12ab25: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12ab28: 51 push %ecx <== NOT EXECUTED 12ab29: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 12ab2c: 52 push %edx <== NOT EXECUTED 12ab2d: 50 push %eax <== NOT EXECUTED 12ab2e: 53 push %ebx <== NOT EXECUTED 12ab2f: e8 f8 8a 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12ab34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ab37: 85 c0 test %eax,%eax <== NOT EXECUTED 12ab39: 74 e5 je 12ab20 <== NOT EXECUTED return rc; 12ab3b: 99 cltd <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 12ab3c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ab3f: 5b pop %ebx <== NOT EXECUTED 12ab40: 5e pop %esi <== NOT EXECUTED 12ab41: 5f pop %edi <== NOT EXECUTED 12ab42: c9 leave <== NOT EXECUTED 12ab43: c3 ret <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 12ab44: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12ab47: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 12ab4a: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 12ab4d: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12ab50: 29 fa sub %edi,%edx <== NOT EXECUTED 12ab52: 89 d7 mov %edx,%edi <== NOT EXECUTED 12ab54: eb c0 jmp 12ab16 <== NOT EXECUTED 12ab56: 66 90 xchg %ax,%ax <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 12ab58: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 12ab5b: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 12ab5e: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 12ab61: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 12ab64: 89 41 38 mov %eax,0x38(%ecx) <== NOT EXECUTED *disk_cln = cur_cln; 12ab67: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12ab6a: 89 01 mov %eax,(%ecx) <== NOT EXECUTED 12ab6c: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ab6e: 31 d2 xor %edx,%edx <== NOT EXECUTED } return RC_OK; } 12ab70: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ab73: 5b pop %ebx <== NOT EXECUTED 12ab74: 5e pop %esi <== NOT EXECUTED 12ab75: 5f pop %edi <== NOT EXECUTED 12ab76: c9 leave <== NOT EXECUTED 12ab77: c3 ret <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 12ab78: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 12ab7b: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12ab7e: 89 02 mov %eax,(%edx) <== NOT EXECUTED 12ab80: 31 c0 xor %eax,%eax <== NOT EXECUTED 12ab82: 31 d2 xor %edx,%edx <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 12ab84: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ab87: 5b pop %ebx <== NOT EXECUTED 12ab88: 5e pop %esi <== NOT EXECUTED 12ab89: 5f pop %edi <== NOT EXECUTED 12ab8a: c9 leave <== NOT EXECUTED 12ab8b: c3 ret <== NOT EXECUTED =============================================================================== 0012ac9c : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12ac9c: 55 push %ebp <== NOT EXECUTED 12ac9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ac9f: 57 push %edi <== NOT EXECUTED 12aca0: 56 push %esi <== NOT EXECUTED 12aca1: 53 push %ebx <== NOT EXECUTED 12aca2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12aca5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12aca8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12acab: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12acae: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12acb1: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12acb4: 74 02 je 12acb8 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12acb6: 85 c0 test %eax,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12acb8: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 12acbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12acbe: 53 push %ebx <== NOT EXECUTED 12acbf: e8 bc 8d fe ff call 113a80 <_Chain_Extract> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 12acc4: 58 pop %eax <== NOT EXECUTED 12acc5: 5a pop %edx <== NOT EXECUTED 12acc6: 53 push %ebx <== NOT EXECUTED 12acc7: 89 f8 mov %edi,%eax <== NOT EXECUTED 12acc9: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED 12accc: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 12accf: 8d 14 00 lea (%eax,%eax,1),%edx <== NOT EXECUTED 12acd2: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 12acd5: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 12acd8: 03 46 68 add 0x68(%esi),%eax <== NOT EXECUTED 12acdb: 50 push %eax <== NOT EXECUTED 12acdc: e8 7b 8d fe ff call 113a5c <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 12ace1: 80 4b 30 01 orb $0x1,0x30(%ebx) <== NOT EXECUTED 12ace5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12ace8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12aceb: 5b pop %ebx <== NOT EXECUTED 12acec: 5e pop %esi <== NOT EXECUTED 12aced: 5f pop %edi <== NOT EXECUTED 12acee: c9 leave <== NOT EXECUTED 12acef: c3 ret <== NOT EXECUTED =============================================================================== 0012b570 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 12b570: 55 push %ebp <== NOT EXECUTED 12b571: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b573: 57 push %edi <== NOT EXECUTED 12b574: 56 push %esi <== NOT EXECUTED 12b575: 53 push %ebx <== NOT EXECUTED 12b576: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b579: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b57c: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12b57f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b582: 8b 02 mov (%edx),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b584: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 12b587: 74 1a je 12b5a3 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b589: 85 c0 test %eax,%eax <== NOT EXECUTED 12b58b: 0f 84 97 01 00 00 je 12b728 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b591: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b594: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b598: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b59a: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 12b59d: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b5a1: d3 e0 shl %cl,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b5a3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b5a6: 8b 51 04 mov 0x4(%ecx),%edx <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12b5a9: 89 d6 mov %edx,%esi <== NOT EXECUTED 12b5ab: c1 ee 09 shr $0x9,%esi <== NOT EXECUTED 12b5ae: 01 f0 add %esi,%eax <== NOT EXECUTED 12b5b0: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 12b5b3: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED 12b5b6: 83 e2 0f and $0xf,%edx <== NOT EXECUTED 12b5b9: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 12b5bc: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b5be: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 12b5c1: 8d 0c 00 lea (%eax,%eax,1),%ecx <== NOT EXECUTED 12b5c4: 8d 04 01 lea (%ecx,%eax,1),%eax <== NOT EXECUTED 12b5c7: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED 12b5ca: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 12b5cd: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 12b5d0: 01 c1 add %eax,%ecx <== NOT EXECUTED 12b5d2: 8b 01 mov (%ecx),%eax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12b5d4: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED 12b5d7: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b5da: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 12b5dc: 75 35 jne 12b613 <== NOT EXECUTED 12b5de: eb 50 jmp 12b630 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b5e0: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b5e4: 74 39 je 12b61f <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b5e6: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 12b5e9: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b5ed: d3 e6 shl %cl,%esi <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b5ef: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 12b5f2: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12b5f4: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED 12b5f7: 01 ce add %ecx,%esi <== NOT EXECUTED 12b5f9: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 12b5fc: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 12b5ff: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12b602: 01 fe add %edi,%esi <== NOT EXECUTED 12b604: 39 f2 cmp %esi,%edx <== NOT EXECUTED 12b606: 0f 84 30 01 00 00 je 12b73c <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 12b60c: 8b 00 mov (%eax),%eax <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b60e: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 12b611: 74 1d je 12b630 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12b613: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b616: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 12b619: 74 d4 je 12b5ef <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b61b: 85 f6 test %esi,%esi <== NOT EXECUTED 12b61d: 74 c1 je 12b5e0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b61f: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 12b622: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b626: d3 e6 shl %cl,%esi <== NOT EXECUTED 12b628: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED 12b62b: eb bc jmp 12b5e9 <== NOT EXECUTED 12b62d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 12b630: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 12b633: 03 4b 68 add 0x68(%ebx),%ecx <== NOT EXECUTED 12b636: 8b 01 mov (%ecx),%eax <== NOT EXECUTED 12b638: 83 c1 04 add $0x4,%ecx <== NOT EXECUTED 12b63b: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b63e: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 12b640: 75 3d jne 12b67f <== NOT EXECUTED 12b642: 66 90 xchg %ax,%ax <== NOT EXECUTED 12b644: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED 12b64b: eb 5f jmp 12b6ac <== NOT EXECUTED 12b64d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b650: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b654: 74 35 je 12b68b <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b656: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 12b659: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12b65d: d3 e6 shl %cl,%esi <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12b65f: 8b 78 24 mov 0x24(%eax),%edi <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 12b662: 89 f9 mov %edi,%ecx <== NOT EXECUTED 12b664: c1 e9 09 shr $0x9,%ecx <== NOT EXECUTED 12b667: 01 ce add %ecx,%esi <== NOT EXECUTED 12b669: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 12b66c: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 12b66f: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12b672: 01 fe add %edi,%esi <== NOT EXECUTED 12b674: 39 f2 cmp %esi,%edx <== NOT EXECUTED 12b676: 74 24 je 12b69c <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 12b678: 8b 00 mov (%eax),%eax <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b67a: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 12b67d: 74 c5 je 12b644 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 12b67f: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 12b682: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 12b685: 74 d8 je 12b65f <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b687: 85 f6 test %esi,%esi <== NOT EXECUTED 12b689: 74 c5 je 12b650 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b68b: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 12b68e: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b692: d3 e6 shl %cl,%esi <== NOT EXECUTED 12b694: 03 73 30 add 0x30(%ebx),%esi <== NOT EXECUTED 12b697: eb c0 jmp 12b659 <== NOT EXECUTED 12b699: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 12b69c: 85 d2 test %edx,%edx <== NOT EXECUTED 12b69e: 74 05 je 12b6a5 <== NOT EXECUTED 12b6a0: 3b 50 0c cmp 0xc(%eax),%edx <== NOT EXECUTED 12b6a3: 75 d3 jne 12b678 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 12b6a5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 12b6ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b6af: 6a 44 push $0x44 <== NOT EXECUTED 12b6b1: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED 12b6b4: e8 4f 37 fe ff call 10ee08 <== NOT EXECUTED 12b6b9: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12b6bc: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 12b6bf: 89 01 mov %eax,(%ecx) <== NOT EXECUTED if ( lfat_fd == NULL ) 12b6c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b6c4: 85 c0 test %eax,%eax <== NOT EXECUTED 12b6c6: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 12b6c9: 0f 84 b9 00 00 00 je 12b788 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 12b6cf: b9 44 00 00 00 mov $0x44,%ecx <== NOT EXECUTED 12b6d4: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b6d6: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED 12b6d9: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED lfat_fd->links_num = 1; 12b6db: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b6de: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 12b6e5: 80 60 30 fe andb $0xfe,0x30(%eax) <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 12b6e9: c7 40 3c ff ff ff ff movl $0xffffffff,0x3c(%eax) <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 12b6f0: 89 c7 mov %eax,%edi <== NOT EXECUTED 12b6f2: 83 c7 20 add $0x20,%edi <== NOT EXECUTED 12b6f5: b1 04 mov $0x4,%cl <== NOT EXECUTED 12b6f7: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 12b6fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED if ( rc != RC_OK ) 12b6fc: 8b 75 dc mov -0x24(%ebp),%esi <== NOT EXECUTED 12b6ff: 85 f6 test %esi,%esi <== NOT EXECUTED 12b701: 74 4d je 12b750 <== NOT EXECUTED lfat_fd->ino = key; 12b703: 89 50 0c mov %edx,0xc(%eax) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 12b706: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b709: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12b70c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12b70f: 03 43 64 add 0x64(%ebx),%eax <== NOT EXECUTED 12b712: 50 push %eax <== NOT EXECUTED 12b713: e8 44 83 fe ff call 113a5c <_Chain_Append> <== NOT EXECUTED 12b718: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 12b71a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12b71d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b720: 5b pop %ebx <== NOT EXECUTED 12b721: 5e pop %esi <== NOT EXECUTED 12b722: 5f pop %edi <== NOT EXECUTED 12b723: c9 leave <== NOT EXECUTED 12b724: c3 ret <== NOT EXECUTED 12b725: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b728: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b72c: 0f 84 5f fe ff ff je 12b591 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b732: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 12b735: e9 63 fe ff ff jmp 12b59d <== NOT EXECUTED 12b73a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 12b73c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12b73f: 89 02 mov %eax,(%edx) <== NOT EXECUTED lfat_fd->links_num++; 12b741: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED 12b744: 31 c0 xor %eax,%eax <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 12b746: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b749: 5b pop %ebx <== NOT EXECUTED 12b74a: 5e pop %esi <== NOT EXECUTED 12b74b: 5f pop %edi <== NOT EXECUTED 12b74c: c9 leave <== NOT EXECUTED 12b74d: c3 ret <== NOT EXECUTED 12b74e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 12b750: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b753: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b756: e8 79 00 00 00 call 12b7d4 <== NOT EXECUTED 12b75b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 12b75e: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 12b761: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b764: 85 c0 test %eax,%eax <== NOT EXECUTED 12b766: 75 9e jne 12b706 <== NOT EXECUTED { free((*fat_fd)); 12b768: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b76b: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 12b76e: ff 31 pushl (%ecx) <== NOT EXECUTED 12b770: e8 f3 30 fe ff call 10e868 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 12b775: e8 06 c4 01 00 call 147b80 <__errno> <== NOT EXECUTED 12b77a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b780: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12b783: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b786: eb 95 jmp 12b71d <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 12b788: e8 f3 c3 01 00 call 147b80 <__errno> <== NOT EXECUTED 12b78d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12b793: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12b796: eb 85 jmp 12b71d <== NOT EXECUTED =============================================================================== 0012b2ac : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 12b2ac: 55 push %ebp <== NOT EXECUTED 12b2ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b2af: 57 push %edi <== NOT EXECUTED 12b2b0: 56 push %esi <== NOT EXECUTED 12b2b1: 53 push %ebx <== NOT EXECUTED 12b2b2: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12b2b5: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b2b8: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b2bb: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 12b2be: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12b2c1: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12b2c3: 0f 84 33 01 00 00 je 12b3fc <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 12b2c9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b2cc: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12b2cf: 39 f8 cmp %edi,%eax <== NOT EXECUTED 12b2d1: 0f 86 25 01 00 00 jbe 12b3fc <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 12b2d7: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED 12b2da: 0f 86 28 01 00 00 jbe 12b408 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 12b2e0: 29 f8 sub %edi,%eax <== NOT EXECUTED 12b2e2: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 12b2e5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12b2ec: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b2ef: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED 12b2f3: 0f 84 23 01 00 00 je 12b41c <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 12b2f9: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12b2fd: 89 fe mov %edi,%esi <== NOT EXECUTED 12b2ff: d3 ee shr %cl,%esi <== NOT EXECUTED 12b301: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12b304: 66 8b 73 06 mov 0x6(%ebx),%si <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12b308: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b30b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b30e: 50 push %eax <== NOT EXECUTED 12b30f: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12b312: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b315: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b318: e8 d3 f7 ff ff call 12aaf0 <== NOT EXECUTED if (rc != RC_OK) 12b31d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b320: 85 c0 test %eax,%eax <== NOT EXECUTED 12b322: 0f 85 d6 00 00 00 jne 12b3fe <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12b328: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED 12b32b: 4e dec %esi <== NOT EXECUTED 12b32c: 21 fe and %edi,%esi <== NOT EXECUTED 12b32e: 89 75 c8 mov %esi,-0x38(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b331: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED 12b334: 85 f6 test %esi,%esi <== NOT EXECUTED 12b336: 0f 84 58 01 00 00 je 12b494 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 12b33c: 8a 53 02 mov 0x2(%ebx),%dl <== NOT EXECUTED 12b33f: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED 12b342: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 12b344: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 12b347: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 12b34a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b351: 89 df mov %ebx,%edi <== NOT EXECUTED 12b353: eb 74 jmp 12b3c9 <== NOT EXECUTED 12b355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b358: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12b35c: 0f 84 87 00 00 00 je 12b3e9 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b362: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 12b365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b368: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 12b36b: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED 12b36e: 51 push %ecx <== NOT EXECUTED 12b36f: 53 push %ebx <== NOT EXECUTED 12b370: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12b373: 4a dec %edx <== NOT EXECUTED 12b374: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED 12b377: 52 push %edx <== NOT EXECUTED 12b378: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 12b37b: 8a 4d cf mov -0x31(%ebp),%cl <== NOT EXECUTED 12b37e: d3 ea shr %cl,%edx <== NOT EXECUTED 12b380: 01 d0 add %edx,%eax <== NOT EXECUTED 12b382: 50 push %eax <== NOT EXECUTED 12b383: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b386: e8 11 0c 00 00 call 12bf9c <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 12b38b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b38e: 85 c0 test %eax,%eax <== NOT EXECUTED 12b390: 0f 88 ce 00 00 00 js 12b464 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 12b396: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12b399: 50 push %eax <== NOT EXECUTED 12b39a: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b39d: 50 push %eax <== NOT EXECUTED 12b39e: 56 push %esi <== NOT EXECUTED 12b39f: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b3a2: e8 85 82 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12b3a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b3aa: 85 c0 test %eax,%eax <== NOT EXECUTED 12b3ac: 75 50 jne 12b3fe <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 12b3ae: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b3b1: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED 12b3b4: 0f 84 b2 00 00 00 je 12b46c <== NOT EXECUTED 12b3ba: 8a 57 02 mov 0x2(%edi),%dl <== NOT EXECUTED 12b3bd: 88 55 cf mov %dl,-0x31(%ebp) <== NOT EXECUTED 12b3c0: 8b 17 mov (%edi),%edx <== NOT EXECUTED 12b3c2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 12b3c9: 0f b7 5f 06 movzwl 0x6(%edi),%ebx <== NOT EXECUTED 12b3cd: 2b 5d d4 sub -0x2c(%ebp),%ebx <== NOT EXECUTED 12b3d0: 3b 5d 14 cmp 0x14(%ebp),%ebx <== NOT EXECUTED 12b3d3: 76 03 jbe 12b3d8 <== NOT EXECUTED 12b3d5: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12b3d8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12b3db: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 12b3de: 8b 71 34 mov 0x34(%ecx),%esi <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b3e1: 85 c0 test %eax,%eax <== NOT EXECUTED 12b3e3: 0f 84 6f ff ff ff je 12b358 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b3e9: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b3ec: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED 12b3f0: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b3f2: 03 46 30 add 0x30(%esi),%eax <== NOT EXECUTED 12b3f5: e9 6b ff ff ff jmp 12b365 <== NOT EXECUTED 12b3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12b3fc: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12b3fe: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b401: 5b pop %ebx <== NOT EXECUTED 12b402: 5e pop %esi <== NOT EXECUTED 12b403: 5f pop %edi <== NOT EXECUTED 12b404: c9 leave <== NOT EXECUTED 12b405: c3 ret <== NOT EXECUTED 12b406: 66 90 xchg %ax,%ax <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 12b408: 89 c2 mov %eax,%edx <== NOT EXECUTED 12b40a: 2b 55 14 sub 0x14(%ebp),%edx <== NOT EXECUTED 12b40d: 39 d7 cmp %edx,%edi <== NOT EXECUTED 12b40f: 0f 86 d0 fe ff ff jbe 12b2e5 <== NOT EXECUTED 12b415: e9 c6 fe ff ff jmp 12b2e0 <== NOT EXECUTED 12b41a: 66 90 xchg %ax,%ax <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12b41c: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED 12b41f: 85 d2 test %edx,%edx <== NOT EXECUTED 12b421: 0f 85 d2 fe ff ff jne 12b2f9 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12b427: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b42b: 0f 84 c8 fe ff ff je 12b2f9 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 12b431: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b434: 85 c0 test %eax,%eax <== NOT EXECUTED 12b436: 75 69 jne 12b4a1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b438: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 12b43b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b43e: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 12b441: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 12b444: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 12b447: 4a dec %edx <== NOT EXECUTED 12b448: 21 fa and %edi,%edx <== NOT EXECUTED 12b44a: 52 push %edx <== NOT EXECUTED 12b44b: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12b44f: d3 ef shr %cl,%edi <== NOT EXECUTED 12b451: 01 f8 add %edi,%eax <== NOT EXECUTED 12b453: 50 push %eax <== NOT EXECUTED 12b454: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12b457: e8 40 0b 00 00 call 12bf9c <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 12b45c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b45f: 85 c0 test %eax,%eax <== NOT EXECUTED 12b461: 79 9b jns 12b3fe <== NOT EXECUTED 12b463: 90 nop <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12b464: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b469: eb 93 jmp 12b3fe <== NOT EXECUTED 12b46b: 90 nop <== NOT EXECUTED 12b46c: 89 fb mov %edi,%ebx <== NOT EXECUTED 12b46e: 89 f7 mov %esi,%edi <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b470: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 12b473: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED 12b476: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 12b479: 8d 54 0e ff lea -0x1(%esi,%ecx,1),%edx <== NOT EXECUTED 12b47d: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12b481: d3 ea shr %cl,%edx <== NOT EXECUTED 12b483: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED 12b486: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b489: 89 51 34 mov %edx,0x34(%ecx) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 12b48c: 89 79 38 mov %edi,0x38(%ecx) <== NOT EXECUTED return cmpltd; 12b48f: e9 6a ff ff ff jmp 12b3fe <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b494: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b496: 31 ff xor %edi,%edi <== NOT EXECUTED 12b498: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b49f: eb d2 jmp 12b473 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b4a1: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b4a4: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12b4a8: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b4aa: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED 12b4ad: eb 8c jmp 12b43b <== NOT EXECUTED =============================================================================== 0012aa4c : * RETURNS: * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { 12aa4c: 55 push %ebp <== NOT EXECUTED 12aa4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12aa4f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED fat_fd->links_num++; 12aa52: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED return RC_OK; } 12aa55: 31 c0 xor %eax,%eax <== NOT EXECUTED 12aa57: c9 leave <== NOT EXECUTED 12aa58: c3 ret <== NOT EXECUTED =============================================================================== 0012aa5c : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 12aa5c: 55 push %ebp <== NOT EXECUTED 12aa5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12aa5f: 57 push %edi <== NOT EXECUTED 12aa60: 56 push %esi <== NOT EXECUTED 12aa61: 53 push %ebx <== NOT EXECUTED 12aa62: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12aa65: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12aa68: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12aa6b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 12aa6e: 8b 7e 1c mov 0x1c(%esi),%edi <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12aa71: 83 7e 20 01 cmpl $0x1,0x20(%esi) <== NOT EXECUTED 12aa75: 74 61 je 12aad8 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 12aa77: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12aa7e: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 12aa81: 21 f8 and %edi,%eax <== NOT EXECUTED 12aa83: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED 12aa86: 73 3b jae 12aac3 <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 12aa88: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 12aa8b: eb 19 jmp 12aaa6 <== NOT EXECUTED 12aa8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 12aa90: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 12aa94: 01 46 18 add %eax,0x18(%esi) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12aa97: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12aa9a: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12aa9d: 21 c2 and %eax,%edx <== NOT EXECUTED 12aa9f: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12aaa2: 73 24 jae 12aac8 <== NOT EXECUTED 12aaa4: 89 c7 mov %eax,%edi <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12aaa6: 50 push %eax <== NOT EXECUTED 12aaa7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12aaaa: 50 push %eax <== NOT EXECUTED 12aaab: 57 push %edi <== NOT EXECUTED 12aaac: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12aaaf: e8 78 8b 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12aab4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12aab7: 85 c0 test %eax,%eax <== NOT EXECUTED 12aab9: 74 d5 je 12aa90 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 12aabb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12aabe: 5b pop %ebx <== NOT EXECUTED 12aabf: 5e pop %esi <== NOT EXECUTED 12aac0: 5f pop %edi <== NOT EXECUTED 12aac1: c9 leave <== NOT EXECUTED 12aac2: c3 ret <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12aac3: 31 ff xor %edi,%edi <== NOT EXECUTED 12aac5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 12aac8: 89 7e 3c mov %edi,0x3c(%esi) <== NOT EXECUTED 12aacb: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; } 12aacd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12aad0: 5b pop %ebx <== NOT EXECUTED 12aad1: 5e pop %esi <== NOT EXECUTED 12aad2: 5f pop %edi <== NOT EXECUTED 12aad3: c9 leave <== NOT EXECUTED 12aad4: c3 ret <== NOT EXECUTED 12aad5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12aad8: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED 12aadb: 85 d2 test %edx,%edx <== NOT EXECUTED 12aadd: 75 98 jne 12aa77 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12aadf: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12aae3: 74 92 je 12aa77 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 12aae5: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 12aae8: 89 46 18 mov %eax,0x18(%esi) <== NOT EXECUTED 12aaeb: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 12aaed: eb cc jmp 12aabb <== NOT EXECUTED =============================================================================== 0012ad8c : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 12ad8c: 55 push %ebp <== NOT EXECUTED 12ad8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ad8f: 57 push %edi <== NOT EXECUTED 12ad90: 56 push %esi <== NOT EXECUTED 12ad91: 53 push %ebx <== NOT EXECUTED 12ad92: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12ad95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12ad98: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 12ad9b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12ad9e: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 12ada1: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED 12ada4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12ada6: 0f 86 9c 00 00 00 jbe 12ae48 <== NOT EXECUTED uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 12adac: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 12adb3: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 12adba: 85 c0 test %eax,%eax <== NOT EXECUTED 12adbc: 0f 84 90 00 00 00 je 12ae52 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 12adc2: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12adc6: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED 12adca: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx <== NOT EXECUTED 12adce: d3 eb shr %cl,%ebx <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 12add0: 89 da mov %ebx,%edx <== NOT EXECUTED 12add2: d3 e2 shl %cl,%edx <== NOT EXECUTED 12add4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12add6: 76 70 jbe 12ae48 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 12add8: 85 db test %ebx,%ebx <== NOT EXECUTED 12adda: 74 1a je 12adf6 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 12addc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12addf: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED 12ade2: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12ade5: 50 push %eax <== NOT EXECUTED 12ade6: 89 fa mov %edi,%edx <== NOT EXECUTED 12ade8: 89 f0 mov %esi,%eax <== NOT EXECUTED 12adea: e8 01 fd ff ff call 12aaf0 <== NOT EXECUTED if (rc != RC_OK) 12adef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12adf2: 85 c0 test %eax,%eax <== NOT EXECUTED 12adf4: 75 54 jne 12ae4a <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12adf6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12adf9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12adfc: 50 push %eax <== NOT EXECUTED 12adfd: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 12adff: 89 fa mov %edi,%edx <== NOT EXECUTED 12ae01: 89 f0 mov %esi,%eax <== NOT EXECUTED 12ae03: e8 e8 fc ff ff call 12aaf0 <== NOT EXECUTED if (rc != RC_OK) 12ae08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ae0b: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae0d: 75 3b jne 12ae4a <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 12ae0f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12ae12: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12ae15: 56 push %esi <== NOT EXECUTED 12ae16: e8 95 89 01 00 call 1437b0 <== NOT EXECUTED if (rc != RC_OK) 12ae1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ae1e: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae20: 75 28 jne 12ae4a <== NOT EXECUTED return rc; if (cl_start != 0) 12ae22: 85 db test %ebx,%ebx <== NOT EXECUTED 12ae24: 74 24 je 12ae4a <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 12ae26: 50 push %eax <== NOT EXECUTED 12ae27: 6a ff push $0xffffffff <== NOT EXECUTED 12ae29: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 12ae2c: 56 push %esi <== NOT EXECUTED 12ae2d: e8 d2 85 01 00 call 143404 <== NOT EXECUTED if ( rc != RC_OK ) 12ae32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ae35: 85 c0 test %eax,%eax <== NOT EXECUTED 12ae37: 75 11 jne 12ae4a <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 12ae39: 4b dec %ebx <== NOT EXECUTED 12ae3a: 89 5f 34 mov %ebx,0x34(%edi) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 12ae3d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 12ae40: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 12ae43: 89 57 3c mov %edx,0x3c(%edi) <== NOT EXECUTED 12ae46: eb 02 jmp 12ae4a <== NOT EXECUTED 12ae48: 31 c0 xor %eax,%eax <== NOT EXECUTED } return RC_OK; } 12ae4a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12ae4d: 5b pop %ebx <== NOT EXECUTED 12ae4e: 5e pop %esi <== NOT EXECUTED 12ae4f: 5f pop %edi <== NOT EXECUTED 12ae50: c9 leave <== NOT EXECUTED 12ae51: c3 ret <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 12ae52: 68 eb 57 16 00 push $0x1657eb <== NOT EXECUTED 12ae57: 68 53 58 16 00 push $0x165853 <== NOT EXECUTED 12ae5c: 68 6d 02 00 00 push $0x26d <== NOT EXECUTED 12ae61: 68 04 58 16 00 push $0x165804 <== NOT EXECUTED 12ae66: e8 79 33 fe ff call 10e1e4 <__assert_func> <== NOT EXECUTED =============================================================================== 0012b040 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 12b040: 55 push %ebp <== NOT EXECUTED 12b041: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b043: 57 push %edi <== NOT EXECUTED 12b044: 56 push %esi <== NOT EXECUTED 12b045: 53 push %ebx <== NOT EXECUTED 12b046: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12b049: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 12b04c: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 12b04f: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 12b052: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12b055: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12b057: 0f 84 eb 01 00 00 je 12b248 <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 12b05d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 12b064: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 12b06b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b06e: 39 78 18 cmp %edi,0x18(%eax) <== NOT EXECUTED 12b071: 0f 82 dd 01 00 00 jb 12b254 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 12b077: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b07a: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 12b07d: 39 45 14 cmp %eax,0x14(%ebp) <== NOT EXECUTED 12b080: 0f 87 ce 01 00 00 ja 12b254 <== NOT EXECUTED 12b086: 2b 45 14 sub 0x14(%ebp),%eax <== NOT EXECUTED 12b089: 39 c7 cmp %eax,%edi <== NOT EXECUTED 12b08b: 0f 87 c3 01 00 00 ja 12b254 <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 12b091: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 12b094: 01 fa add %edi,%edx <== NOT EXECUTED 12b096: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 12b099: 50 push %eax <== NOT EXECUTED 12b09a: 52 push %edx <== NOT EXECUTED 12b09b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12b09e: 56 push %esi <== NOT EXECUTED 12b09f: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED 12b0a2: e8 c5 fd ff ff call 12ae6c <== NOT EXECUTED if (rc != RC_OK) 12b0a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b0aa: 85 c0 test %eax,%eax <== NOT EXECUTED 12b0ac: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED 12b0af: 0f 85 8b 01 00 00 jne 12b240 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 12b0b5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12b0b8: 39 c2 cmp %eax,%edx <== NOT EXECUTED 12b0ba: 74 05 je 12b0c1 <== NOT EXECUTED count = c - start; 12b0bc: 29 f8 sub %edi,%eax <== NOT EXECUTED 12b0be: 89 45 14 mov %eax,0x14(%ebp) <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12b0c1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12b0c4: 83 79 20 01 cmpl $0x1,0x20(%ecx) <== NOT EXECUTED 12b0c8: 0f 84 12 01 00 00 je 12b1e0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 12b0ce: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12b0d2: 89 f8 mov %edi,%eax <== NOT EXECUTED 12b0d4: d3 e8 shr %cl,%eax <== NOT EXECUTED 12b0d6: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12b0d9: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 12b0dd: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 12b0e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b0e4: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12b0e7: 51 push %ecx <== NOT EXECUTED 12b0e8: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12b0ea: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 12b0ed: 89 f0 mov %esi,%eax <== NOT EXECUTED 12b0ef: e8 fc f9 ff ff call 12aaf0 <== NOT EXECUTED if (rc != RC_OK) 12b0f4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b0f7: 85 c0 test %eax,%eax <== NOT EXECUTED 12b0f9: 0f 85 41 01 00 00 jne 12b240 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12b0ff: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx <== NOT EXECUTED 12b103: 4a dec %edx <== NOT EXECUTED 12b104: 21 fa and %edi,%edx <== NOT EXECUTED 12b106: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b109: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 12b10c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12b10e: 0f 84 7a 01 00 00 je 12b28e <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 12b114: 8a 43 02 mov 0x2(%ebx),%al <== NOT EXECUTED 12b117: 88 45 cb mov %al,-0x35(%ebp) <== NOT EXECUTED 12b11a: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 12b11c: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12b11f: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 12b122: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b129: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED 12b12c: 89 f7 mov %esi,%edi <== NOT EXECUTED 12b12e: eb 7d jmp 12b1ad <== NOT EXECUTED 12b130: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 12b134: 0f 84 93 00 00 00 je 12b1cd <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b13a: 8b 5e 1c mov 0x1c(%esi),%ebx <== NOT EXECUTED return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 12b13d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 12b140: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b143: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 12b146: 03 4d d0 add -0x30(%ebp),%ecx <== NOT EXECUTED 12b149: 51 push %ecx <== NOT EXECUTED 12b14a: 50 push %eax <== NOT EXECUTED 12b14b: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12b14e: 4a dec %edx <== NOT EXECUTED 12b14f: 23 55 d4 and -0x2c(%ebp),%edx <== NOT EXECUTED 12b152: 52 push %edx <== NOT EXECUTED 12b153: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 12b156: 8a 4d cb mov -0x35(%ebp),%cl <== NOT EXECUTED 12b159: d3 e8 shr %cl,%eax <== NOT EXECUTED 12b15b: 01 c3 add %eax,%ebx <== NOT EXECUTED 12b15d: 53 push %ebx <== NOT EXECUTED 12b15e: 57 push %edi <== NOT EXECUTED 12b15f: e8 ec 0a 00 00 call 12bc50 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 12b164: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b167: 85 c0 test %eax,%eax <== NOT EXECUTED 12b169: 0f 88 c9 00 00 00 js 12b238 <== NOT EXECUTED return -1; count -= c; 12b16f: 8b 5d e0 mov -0x20(%ebp),%ebx <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; 12b172: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12b175: 50 push %eax <== NOT EXECUTED 12b176: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12b179: 50 push %eax <== NOT EXECUTED 12b17a: 56 push %esi <== NOT EXECUTED 12b17b: 57 push %edi <== NOT EXECUTED 12b17c: e8 ab 84 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12b181: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b184: 85 c0 test %eax,%eax <== NOT EXECUTED 12b186: 0f 85 b4 00 00 00 jne 12b240 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 12b18c: 01 5d d0 add %ebx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b18f: 29 5d 14 sub %ebx,0x14(%ebp) <== NOT EXECUTED 12b192: 0f 84 d0 00 00 00 je 12b268 <== NOT EXECUTED 12b198: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 12b19b: 8a 52 02 mov 0x2(%edx),%dl <== NOT EXECUTED 12b19e: 88 55 cb mov %dl,-0x35(%ebp) <== NOT EXECUTED 12b1a1: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12b1a4: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 12b1a6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 12b1ad: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 12b1b0: 0f b7 41 06 movzwl 0x6(%ecx),%eax <== NOT EXECUTED 12b1b4: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 12b1b7: 3b 45 14 cmp 0x14(%ebp),%eax <== NOT EXECUTED 12b1ba: 76 03 jbe 12b1bf <== NOT EXECUTED 12b1bc: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12b1bf: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12b1c2: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b1c5: 85 db test %ebx,%ebx <== NOT EXECUTED 12b1c7: 0f 84 63 ff ff ff je 12b130 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b1cd: 83 eb 02 sub $0x2,%ebx <== NOT EXECUTED 12b1d0: 0f b6 4e 05 movzbl 0x5(%esi),%ecx <== NOT EXECUTED 12b1d4: d3 e3 shl %cl,%ebx <== NOT EXECUTED 12b1d6: 03 5e 30 add 0x30(%esi),%ebx <== NOT EXECUTED 12b1d9: e9 5f ff ff ff jmp 12b13d <== NOT EXECUTED 12b1de: 66 90 xchg %ax,%ax <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 12b1e0: 8b 51 24 mov 0x24(%ecx),%edx <== NOT EXECUTED 12b1e3: 85 d2 test %edx,%edx <== NOT EXECUTED 12b1e5: 0f 85 e3 fe ff ff jne 12b0ce <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 12b1eb: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12b1ef: 0f 84 d9 fe ff ff je 12b0ce <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 12b1f5: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 12b1f8: 8b 56 34 mov 0x34(%esi),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12b1fb: 85 c0 test %eax,%eax <== NOT EXECUTED 12b1fd: 0f 85 96 00 00 00 jne 12b299 <== NOT EXECUTED 12b203: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12b207: 0f 84 8c 00 00 00 je 12b299 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12b20d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 12b210: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12b213: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 12b216: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 12b219: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 12b21c: 4a dec %edx <== NOT EXECUTED 12b21d: 21 fa and %edi,%edx <== NOT EXECUTED 12b21f: 52 push %edx <== NOT EXECUTED 12b220: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12b224: d3 ef shr %cl,%edi <== NOT EXECUTED 12b226: 01 f8 add %edi,%eax <== NOT EXECUTED 12b228: 50 push %eax <== NOT EXECUTED 12b229: 56 push %esi <== NOT EXECUTED 12b22a: e8 21 0a 00 00 call 12bc50 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 12b22f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12b232: 85 c0 test %eax,%eax <== NOT EXECUTED 12b234: 79 0a jns 12b240 <== NOT EXECUTED 12b236: 66 90 xchg %ax,%ax <== NOT EXECUTED /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 12b238: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b23d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 12b240: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b243: 5b pop %ebx <== NOT EXECUTED 12b244: 5e pop %esi <== NOT EXECUTED 12b245: 5f pop %edi <== NOT EXECUTED 12b246: c9 leave <== NOT EXECUTED 12b247: c3 ret <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 12b248: 31 c0 xor %eax,%eax <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 12b24a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b24d: 5b pop %ebx <== NOT EXECUTED 12b24e: 5e pop %esi <== NOT EXECUTED 12b24f: 5f pop %edi <== NOT EXECUTED 12b250: c9 leave <== NOT EXECUTED 12b251: c3 ret <== NOT EXECUTED 12b252: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 12b254: e8 27 c9 01 00 call 147b80 <__errno> <== NOT EXECUTED 12b259: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12b25f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12b264: eb da jmp 12b240 <== NOT EXECUTED 12b266: 66 90 xchg %ax,%ax <== NOT EXECUTED 12b268: 89 f2 mov %esi,%edx <== NOT EXECUTED 12b26a: 8b 5d cc mov -0x34(%ebp),%ebx <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b26d: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 12b270: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 12b273: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 12b276: 8d 74 39 ff lea -0x1(%ecx,%edi,1),%esi <== NOT EXECUTED 12b27a: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 12b27e: d3 ee shr %cl,%esi <== NOT EXECUTED 12b280: 03 75 c0 add -0x40(%ebp),%esi <== NOT EXECUTED 12b283: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 12b286: 89 77 34 mov %esi,0x34(%edi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 12b289: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED return cmpltd; 12b28c: eb b2 jmp 12b240 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12b28e: 31 d2 xor %edx,%edx <== NOT EXECUTED 12b290: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 12b297: eb d7 jmp 12b270 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12b299: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12b29c: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12b2a0: d3 e0 shl %cl,%eax <== NOT EXECUTED 12b2a2: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED 12b2a5: e9 66 ff ff ff jmp 12b210 <== NOT EXECUTED =============================================================================== 001437b0 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 1437b0: 55 push %ebp <== NOT EXECUTED 1437b1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1437b3: 57 push %edi <== NOT EXECUTED 1437b4: 56 push %esi <== NOT EXECUTED 1437b5: 53 push %ebx <== NOT EXECUTED 1437b6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1437b9: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 1437bc: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 1437bf: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 1437c6: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1437c9: 23 46 0c and 0xc(%esi),%eax <== NOT EXECUTED 1437cc: 39 46 10 cmp %eax,0x10(%esi) <== NOT EXECUTED 1437cf: 0f 86 a9 00 00 00 jbe 14387e <== NOT EXECUTED 1437d5: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 1437d8: 31 d2 xor %edx,%edx <== NOT EXECUTED 1437da: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 1437e1: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED 1437e4: 89 d6 mov %edx,%esi <== NOT EXECUTED 1437e6: eb 25 jmp 14380d <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 1437e8: 50 push %eax <== NOT EXECUTED 1437e9: 6a 00 push $0x0 <== NOT EXECUTED 1437eb: 53 push %ebx <== NOT EXECUTED 1437ec: 57 push %edi <== NOT EXECUTED 1437ed: e8 12 fc ff ff call 143404 <== NOT EXECUTED if ( rc != RC_OK ) 1437f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1437f5: 85 c0 test %eax,%eax <== NOT EXECUTED 1437f7: 74 03 je 1437fc <== NOT EXECUTED 1437f9: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 1437fc: 46 inc %esi <== NOT EXECUTED cur_cln = next_cln; 1437fd: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 143800: 89 d8 mov %ebx,%eax <== NOT EXECUTED 143802: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 143805: 23 42 0c and 0xc(%edx),%eax <== NOT EXECUTED 143808: 3b 42 10 cmp 0x10(%edx),%eax <== NOT EXECUTED 14380b: 73 3f jae 14384c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 14380d: 52 push %edx <== NOT EXECUTED 14380e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 143811: 50 push %eax <== NOT EXECUTED 143812: 53 push %ebx <== NOT EXECUTED 143813: 57 push %edi <== NOT EXECUTED 143814: e8 13 fe ff ff call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 143819: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14381c: 85 c0 test %eax,%eax <== NOT EXECUTED 14381e: 74 c8 je 1437e8 <== NOT EXECUTED 143820: 89 f2 mov %esi,%edx <== NOT EXECUTED 143822: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 143825: 89 c7 mov %eax,%edi <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 143827: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED 14382a: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 14382d: 74 06 je 143835 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 14382f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 143832: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED fat_buf_release(fs_info); 143835: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143838: 56 push %esi <== NOT EXECUTED 143839: e8 66 80 fe ff call 12b8a4 <== NOT EXECUTED return rc; 14383e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 143841: 89 f8 mov %edi,%eax <== NOT EXECUTED 143843: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143846: 5b pop %ebx <== NOT EXECUTED 143847: 5e pop %esi <== NOT EXECUTED 143848: 5f pop %edi <== NOT EXECUTED 143849: c9 leave <== NOT EXECUTED 14384a: c3 ret <== NOT EXECUTED 14384b: 90 nop <== NOT EXECUTED 14384c: 89 f2 mov %esi,%edx <== NOT EXECUTED 14384e: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 143851: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 143854: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 143857: 8b 46 40 mov 0x40(%esi),%eax <== NOT EXECUTED 14385a: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 14385d: 74 06 je 143865 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 14385f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 143862: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED fat_buf_release(fs_info); 143865: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143868: 56 push %esi <== NOT EXECUTED 143869: e8 36 80 fe ff call 12b8a4 <== NOT EXECUTED 14386e: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 143871: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 143874: 89 f8 mov %edi,%eax <== NOT EXECUTED 143876: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143879: 5b pop %ebx <== NOT EXECUTED 14387a: 5e pop %esi <== NOT EXECUTED 14387b: 5f pop %edi <== NOT EXECUTED 14387c: c9 leave <== NOT EXECUTED 14387d: c3 ret <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 14387e: 31 d2 xor %edx,%edx <== NOT EXECUTED 143880: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 143887: eb c8 jmp 143851 <== NOT EXECUTED =============================================================================== 0012b798 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 12b798: 55 push %ebp <== NOT EXECUTED 12b799: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b79b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 12b79e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b7a1: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 12b7a4: 2b 4a 78 sub 0x78(%edx),%ecx <== NOT EXECUTED 12b7a7: 89 c8 mov %ecx,%eax <== NOT EXECUTED 12b7a9: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b7ac: 03 42 6c add 0x6c(%edx),%eax <== NOT EXECUTED 12b7af: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b7b2: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 12b7b7: d3 e2 shl %cl,%edx <== NOT EXECUTED 12b7b9: f7 d2 not %edx <== NOT EXECUTED 12b7bb: 20 10 and %dl,(%eax) <== NOT EXECUTED } 12b7bd: c9 leave <== NOT EXECUTED 12b7be: c3 ret <== NOT EXECUTED =============================================================================== 0014362c : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 14362c: 55 push %ebp <== NOT EXECUTED 14362d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 14362f: 57 push %edi <== NOT EXECUTED 143630: 56 push %esi <== NOT EXECUTED 143631: 53 push %ebx <== NOT EXECUTED 143632: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 143635: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 143638: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 14363b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; 14363e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 143645: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 143648: 76 67 jbe 1436b1 <== NOT EXECUTED 14364a: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 14364d: 40 inc %eax <== NOT EXECUTED 14364e: 39 c2 cmp %eax,%edx <== NOT EXECUTED 143650: 77 5f ja 1436b1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 143652: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 143656: a8 01 test $0x1,%al <== NOT EXECUTED 143658: 75 72 jne 1436cc <== NOT EXECUTED 14365a: a8 02 test $0x2,%al <== NOT EXECUTED 14365c: 74 76 je 1436d4 <== NOT EXECUTED 14365e: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED 143661: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 143664: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 143668: 89 c6 mov %eax,%esi <== NOT EXECUTED 14366a: d3 ee shr %cl,%esi <== NOT EXECUTED 14366c: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 14366f: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 143671: 66 89 45 d0 mov %ax,-0x30(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 143675: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED 143678: 57 push %edi <== NOT EXECUTED 143679: 6a 01 push $0x1 <== NOT EXECUTED 14367b: 56 push %esi <== NOT EXECUTED 14367c: 53 push %ebx <== NOT EXECUTED 14367d: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 143680: e8 8f 83 fe ff call 12ba14 <== NOT EXECUTED if (rc != RC_OK) 143685: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143688: 85 c0 test %eax,%eax <== NOT EXECUTED 14368a: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 14368d: 75 32 jne 1436c1 <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 14368f: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 143693: 48 dec %eax <== NOT EXECUTED 143694: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 143697: 21 c8 and %ecx,%eax <== NOT EXECUTED 143699: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 14369c: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED 14369f: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 1436a2: 74 48 je 1436ec <== NOT EXECUTED 1436a4: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 1436a7: 0f 84 a3 00 00 00 je 143750 <== NOT EXECUTED 1436ad: fe c9 dec %cl <== NOT EXECUTED 1436af: 74 57 je 143708 <== NOT EXECUTED *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 1436b1: e8 ca 44 00 00 call 147b80 <__errno> <== NOT EXECUTED 1436b6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1436bc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 1436c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1436c4: 5b pop %ebx <== NOT EXECUTED 1436c5: 5e pop %esi <== NOT EXECUTED 1436c6: 5f pop %edi <== NOT EXECUTED 1436c7: c9 leave <== NOT EXECUTED 1436c8: c3 ret <== NOT EXECUTED 1436c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 1436cc: 89 d0 mov %edx,%eax <== NOT EXECUTED 1436ce: d1 e8 shr %eax <== NOT EXECUTED 1436d0: 01 d0 add %edx,%eax <== NOT EXECUTED 1436d2: eb 8d jmp 143661 <== NOT EXECUTED 1436d4: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED 1436db: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1436de: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1436e2: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 1436e5: d3 ee shr %cl,%esi <== NOT EXECUTED 1436e7: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED 1436ea: eb 83 jmp 14366f <== NOT EXECUTED *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 1436ec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1436ef: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1436f2: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 1436f5: 0f b7 04 0a movzwl (%edx,%ecx,1),%eax <== NOT EXECUTED 1436f9: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 1436fc: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 1436fe: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 143700: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143703: 5b pop %ebx <== NOT EXECUTED 143704: 5e pop %esi <== NOT EXECUTED 143705: 5f pop %edi <== NOT EXECUTED 143706: c9 leave <== NOT EXECUTED 143707: c3 ret <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 143708: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 14370b: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 14370e: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 143711: 0f b6 04 01 movzbl (%ecx,%eax,1),%eax <== NOT EXECUTED 143715: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 143718: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 14371b: 89 01 mov %eax,(%ecx) <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 14371d: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 143720: 49 dec %ecx <== NOT EXECUTED 143721: 3b 4d c4 cmp -0x3c(%ebp),%ecx <== NOT EXECUTED 143724: 74 5a je 143780 <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 143726: 8b 5d d0 mov -0x30(%ebp),%ebx <== NOT EXECUTED 143729: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 14372c: 0f b6 44 0b 01 movzbl 0x1(%ebx,%ecx,1),%eax <== NOT EXECUTED 143731: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 143734: 0b 45 d4 or -0x2c(%ebp),%eax <== NOT EXECUTED 143737: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 14373a: 89 01 mov %eax,(%ecx) <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 14373c: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 14373f: 74 2b je 14376c <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; 143741: c1 e8 04 shr $0x4,%eax <== NOT EXECUTED 143744: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 143747: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 143749: 31 c0 xor %eax,%eax <== NOT EXECUTED 14374b: e9 71 ff ff ff jmp 1436c1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 143750: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143753: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 143756: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 143759: 8b 04 0a mov (%edx,%ecx,1),%eax <== NOT EXECUTED 14375c: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 14375f: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 143761: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 143763: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143766: 5b pop %ebx <== NOT EXECUTED 143767: 5e pop %esi <== NOT EXECUTED 143768: 5f pop %edi <== NOT EXECUTED 143769: c9 leave <== NOT EXECUTED 14376a: c3 ret <== NOT EXECUTED 14376b: 90 nop <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 14376c: 25 ff 0f 00 00 and $0xfff,%eax <== NOT EXECUTED 143771: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 143774: 89 02 mov %eax,(%edx) <== NOT EXECUTED 143776: 31 c0 xor %eax,%eax <== NOT EXECUTED 143778: e9 44 ff ff ff jmp 1436c1 <== NOT EXECUTED 14377d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 143780: 57 push %edi <== NOT EXECUTED 143781: 6a 01 push $0x1 <== NOT EXECUTED 143783: 46 inc %esi <== NOT EXECUTED 143784: 56 push %esi <== NOT EXECUTED 143785: 53 push %ebx <== NOT EXECUTED 143786: e8 89 82 fe ff call 12ba14 <== NOT EXECUTED &block0); if (rc != RC_OK) 14378b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14378e: 85 c0 test %eax,%eax <== NOT EXECUTED 143790: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 143793: 0f 85 28 ff ff ff jne 1436c1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 143799: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 14379c: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 14379f: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED 1437a2: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 1437a5: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED 1437a8: 0b 03 or (%ebx),%eax <== NOT EXECUTED 1437aa: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 1437ac: eb 8e jmp 14373c <== NOT EXECUTED =============================================================================== 0012b7d4 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 12b7d4: 55 push %ebp <== NOT EXECUTED 12b7d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b7d7: 57 push %edi <== NOT EXECUTED 12b7d8: 56 push %esi <== NOT EXECUTED 12b7d9: 53 push %ebx <== NOT EXECUTED 12b7da: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 12b7dd: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b7e0: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 12b7e3: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 12b7e6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 12b7e9: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12b7ec: 85 c0 test %eax,%eax <== NOT EXECUTED 12b7ee: 74 5d je 12b84d <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 12b7f0: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED 12b7f3: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b7f5: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b7f8: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 12b7fb: 8a 08 mov (%eax),%cl <== NOT EXECUTED 12b7fd: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 12b800: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12b802: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b805: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED 12b809: d3 fe sar %cl,%esi <== NOT EXECUTED 12b80b: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 12b80e: 74 50 je 12b860 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); 12b810: 31 ff xor %edi,%edi <== NOT EXECUTED 12b812: eb 20 jmp 12b834 <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 12b814: 8b 53 70 mov 0x70(%ebx),%edx <== NOT EXECUTED 12b817: 89 d0 mov %edx,%eax <== NOT EXECUTED 12b819: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 12b81c: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 12b81f: 8a 08 mov (%eax),%cl <== NOT EXECUTED 12b821: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 12b824: 89 d1 mov %edx,%ecx <== NOT EXECUTED 12b826: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 12b829: 0f be 75 e3 movsbl -0x1d(%ebp),%esi <== NOT EXECUTED 12b82d: d3 fe sar %cl,%esi <== NOT EXECUTED 12b82f: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 12b832: 74 2c je 12b860 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 12b834: 42 inc %edx <== NOT EXECUTED 12b835: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 12b838: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 12b83b: 77 07 ja 12b844 <== NOT EXECUTED fs_info->index = 0; 12b83d: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 12b844: 47 inc %edi <== NOT EXECUTED 12b845: 3b 7d e4 cmp -0x1c(%ebp),%edi <== NOT EXECUTED 12b848: 72 ca jb 12b814 <== NOT EXECUTED 12b84a: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 12b84d: d1 e0 shl %eax <== NOT EXECUTED 12b84f: ba ff ff ff 0f mov $0xfffffff,%edx <== NOT EXECUTED 12b854: 2b 53 78 sub 0x78(%ebx),%edx <== NOT EXECUTED 12b857: 39 d0 cmp %edx,%eax <== NOT EXECUTED 12b859: 72 1f jb 12b87a <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 12b85b: 31 c0 xor %eax,%eax <== NOT EXECUTED 12b85d: eb 13 jmp 12b872 <== NOT EXECUTED 12b85f: 90 nop <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 12b860: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 12b865: d3 e2 shl %cl,%edx <== NOT EXECUTED 12b867: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED 12b86a: 88 10 mov %dl,(%eax) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 12b86c: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 12b86f: 03 43 78 add 0x78(%ebx),%eax <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 12b872: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12b875: 5b pop %ebx <== NOT EXECUTED 12b876: 5e pop %esi <== NOT EXECUTED 12b877: 5f pop %edi <== NOT EXECUTED 12b878: c9 leave <== NOT EXECUTED 12b879: c3 ret <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 12b87a: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 12b87d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12b880: 50 push %eax <== NOT EXECUTED 12b881: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 12b884: e8 13 43 fe ff call 10fb9c <== NOT EXECUTED 12b889: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if (fs_info->uino != NULL) 12b88c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12b88f: 85 c0 test %eax,%eax <== NOT EXECUTED 12b891: 74 c8 je 12b85b <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 12b893: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 12b896: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 12b899: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED 12b89c: e9 48 ff ff ff jmp 12b7e9 <== NOT EXECUTED =============================================================================== 0012bee0 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 12bee0: 55 push %ebp <== NOT EXECUTED 12bee1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bee3: 57 push %edi <== NOT EXECUTED 12bee4: 56 push %esi <== NOT EXECUTED 12bee5: 53 push %ebx <== NOT EXECUTED 12bee6: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED 12bee9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 12beec: 8b 5e 34 mov 0x34(%esi),%ebx <== NOT EXECUTED uint32_t cur_cln = start_cln; 12beef: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12bef2: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 12bef5: 6a 01 push $0x1 <== NOT EXECUTED 12bef7: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 12befb: 50 push %eax <== NOT EXECUTED 12befc: e8 0b 24 fe ff call 10e30c <== NOT EXECUTED 12bf01: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( buf == NULL ) 12bf03: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bf06: 85 c0 test %eax,%eax <== NOT EXECUTED 12bf08: 74 7f je 12bf89 <== NOT EXECUTED 12bf0a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 12bf0c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12bf0f: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 12bf12: 21 c2 and %eax,%edx <== NOT EXECUTED 12bf14: 3b 53 10 cmp 0x10(%ebx),%edx <== NOT EXECUTED 12bf17: 73 3f jae 12bf58 <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 12bf19: 52 push %edx <== NOT EXECUTED 12bf1a: 57 push %edi <== NOT EXECUTED 12bf1b: 50 push %eax <== NOT EXECUTED 12bf1c: 56 push %esi <== NOT EXECUTED 12bf1d: e8 6e ff ff ff call 12be90 <== NOT EXECUTED if ( ret == -1 ) 12bf22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bf25: 40 inc %eax <== NOT EXECUTED 12bf26: 74 48 je 12bf70 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 12bf28: 50 push %eax <== NOT EXECUTED 12bf29: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 12bf2c: 50 push %eax <== NOT EXECUTED 12bf2d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12bf30: 56 push %esi <== NOT EXECUTED 12bf31: e8 f6 76 01 00 call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 12bf36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bf39: 85 c0 test %eax,%eax <== NOT EXECUTED 12bf3b: 74 cf je 12bf0c <== NOT EXECUTED { free(buf); 12bf3d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bf40: 57 push %edi <== NOT EXECUTED 12bf41: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 12bf44: e8 1f 29 fe ff call 10e868 <== NOT EXECUTED return rc; 12bf49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bf4c: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED } } free(buf); return rc; } 12bf4f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bf52: 5b pop %ebx <== NOT EXECUTED 12bf53: 5e pop %esi <== NOT EXECUTED 12bf54: 5f pop %edi <== NOT EXECUTED 12bf55: c9 leave <== NOT EXECUTED 12bf56: c3 ret <== NOT EXECUTED 12bf57: 90 nop <== NOT EXECUTED free(buf); return rc; } } free(buf); 12bf58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bf5b: 57 push %edi <== NOT EXECUTED 12bf5c: e8 07 29 fe ff call 10e868 <== NOT EXECUTED 12bf61: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 12bf63: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 12bf66: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bf69: 5b pop %ebx <== NOT EXECUTED 12bf6a: 5e pop %esi <== NOT EXECUTED 12bf6b: 5f pop %edi <== NOT EXECUTED 12bf6c: c9 leave <== NOT EXECUTED 12bf6d: c3 ret <== NOT EXECUTED 12bf6e: 66 90 xchg %ax,%ax <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 12bf70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bf73: 57 push %edi <== NOT EXECUTED 12bf74: e8 ef 28 fe ff call 10e868 <== NOT EXECUTED 12bf79: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12bf7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } free(buf); return rc; } 12bf81: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12bf84: 5b pop %ebx <== NOT EXECUTED 12bf85: 5e pop %esi <== NOT EXECUTED 12bf86: 5f pop %edi <== NOT EXECUTED 12bf87: c9 leave <== NOT EXECUTED 12bf88: c3 ret <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 12bf89: e8 f2 bb 01 00 call 147b80 <__errno> <== NOT EXECUTED 12bf8e: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12bf94: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12bf97: eb b6 jmp 12bf4f <== NOT EXECUTED =============================================================================== 0012c028 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 12c028: 55 push %ebp <== NOT EXECUTED 12c029: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12c02b: 57 push %edi <== NOT EXECUTED 12c02c: 56 push %esi <== NOT EXECUTED 12c02d: 53 push %ebx <== NOT EXECUTED 12c02e: 81 ec e4 00 00 00 sub $0xe4,%esp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12c034: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12c037: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 12c03a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 12c041: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED 12c044: 50 push %eax <== NOT EXECUTED 12c045: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c048: ff 72 70 pushl 0x70(%edx) <== NOT EXECUTED 12c04b: e8 30 3e fe ff call 10fe80 <== NOT EXECUTED 12c050: 89 c6 mov %eax,%esi <== NOT EXECUTED if (rc == -1) 12c052: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c055: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 12c058: 0f 84 52 03 00 00 je 12c3b0 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 12c05e: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED 12c061: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED 12c066: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 12c06b: 0f 85 5b 05 00 00 jne 12c5cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 12c071: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c074: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED 12c077: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED 12c07a: e8 05 14 fe ff call 10d484 <== NOT EXECUTED 12c07f: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED if (vol->dd == NULL) 12c082: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c085: 85 c0 test %eax,%eax <== NOT EXECUTED 12c087: 0f 84 b2 05 00 00 je 12c63f <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 12c08d: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED 12c090: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 12c093: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED 12c096: 89 53 58 mov %edx,0x58(%ebx) <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 12c099: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12c09c: 51 push %ecx <== NOT EXECUTED 12c09d: 6a 00 push $0x0 <== NOT EXECUTED 12c09f: 52 push %edx <== NOT EXECUTED 12c0a0: 50 push %eax <== NOT EXECUTED 12c0a1: e8 4e 04 fe ff call 10c4f4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12c0a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c0a9: 85 c0 test %eax,%eax <== NOT EXECUTED 12c0ab: 0f 85 37 05 00 00 jne 12c5e8 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 12c0b1: 8d 95 36 ff ff ff lea -0xca(%ebp),%edx <== NOT EXECUTED 12c0b7: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 12c0ba: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 12c0bd: b9 5a 00 00 00 mov $0x5a,%ecx <== NOT EXECUTED 12c0c2: 89 d7 mov %edx,%edi <== NOT EXECUTED 12c0c4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release( block); 12c0c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c0c9: 50 push %eax <== NOT EXECUTED 12c0ca: e8 a9 f3 fd ff call 10b478 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12c0cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c0d2: 85 c0 test %eax,%eax <== NOT EXECUTED 12c0d4: 0f 85 0e 05 00 00 jne 12c5e8 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 12c0da: 0f b6 85 42 ff ff ff movzbl -0xbe(%ebp),%eax <== NOT EXECUTED 12c0e1: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c0e4: 0f b6 95 41 ff ff ff movzbl -0xbf(%ebp),%edx <== NOT EXECUTED 12c0eb: 09 c2 or %eax,%edx <== NOT EXECUTED 12c0ed: 66 89 13 mov %dx,(%ebx) <== NOT EXECUTED if ( (vol->bps != 512) && 12c0f0: 66 81 fa 00 02 cmp $0x200,%dx <== NOT EXECUTED 12c0f5: 0f 84 a1 04 00 00 je 12c59c <== NOT EXECUTED 12c0fb: 66 81 fa 00 04 cmp $0x400,%dx <== NOT EXECUTED 12c100: 74 12 je 12c114 <== NOT EXECUTED 12c102: 66 81 fa 00 08 cmp $0x800,%dx <== NOT EXECUTED 12c107: 74 0b je 12c114 <== NOT EXECUTED 12c109: 66 81 fa 00 10 cmp $0x1000,%dx <== NOT EXECUTED 12c10e: 0f 85 f7 04 00 00 jne 12c60b <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 12c114: 66 c1 ea 09 shr $0x9,%dx <== NOT EXECUTED 12c118: 0f b7 d2 movzwl %dx,%edx <== NOT EXECUTED 12c11b: b0 01 mov $0x1,%al <== NOT EXECUTED 12c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED i >>= 1, vol->sec_mul++); 12c120: d1 fa sar %edx <== NOT EXECUTED 12c122: 88 c1 mov %al,%cl <== NOT EXECUTED 12c124: 40 inc %eax <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 12c125: f6 c2 01 test $0x1,%dl <== NOT EXECUTED 12c128: 74 f6 je 12c120 <== NOT EXECUTED 12c12a: 88 4b 03 mov %cl,0x3(%ebx) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 12c12d: c6 43 02 00 movb $0x0,0x2(%ebx) <== NOT EXECUTED 12c131: 0f b7 3b movzwl (%ebx),%edi <== NOT EXECUTED 12c134: 89 f8 mov %edi,%eax <== NOT EXECUTED 12c136: f7 c7 01 00 00 00 test $0x1,%edi <== NOT EXECUTED 12c13c: 75 14 jne 12c152 <== NOT EXECUTED 12c13e: b2 01 mov $0x1,%dl <== NOT EXECUTED 12c140: eb 04 jmp 12c146 <== NOT EXECUTED 12c142: 66 90 xchg %ax,%ax <== NOT EXECUTED 12c144: 88 ca mov %cl,%dl <== NOT EXECUTED i >>= 1, vol->sec_log2++); 12c146: d1 f8 sar %eax <== NOT EXECUTED 12c148: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 12c14b: a8 01 test $0x1,%al <== NOT EXECUTED 12c14d: 74 f5 je 12c144 <== NOT EXECUTED 12c14f: 88 53 02 mov %dl,0x2(%ebx) <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 12c152: 8a 85 43 ff ff ff mov -0xbd(%ebp),%al <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 12c158: 88 43 04 mov %al,0x4(%ebx) <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 12c15b: 84 c0 test %al,%al <== NOT EXECUTED 12c15d: 0f 84 a8 04 00 00 je 12c60b <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 12c163: c6 43 05 00 movb $0x0,0x5(%ebx) <== NOT EXECUTED 12c167: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 12c16a: a8 01 test $0x1,%al <== NOT EXECUTED 12c16c: 0f 85 6f 04 00 00 jne 12c5e1 <== NOT EXECUTED 12c172: b1 01 mov $0x1,%cl <== NOT EXECUTED 12c174: eb 04 jmp 12c17a <== NOT EXECUTED 12c176: 66 90 xchg %ax,%ax <== NOT EXECUTED 12c178: 88 d1 mov %dl,%cl <== NOT EXECUTED i >>= 1, vol->spc_log2++); 12c17a: d1 f8 sar %eax <== NOT EXECUTED 12c17c: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 12c17f: a8 01 test $0x1,%al <== NOT EXECUTED 12c181: 74 f5 je 12c178 <== NOT EXECUTED 12c183: 88 4b 05 mov %cl,0x5(%ebx) <== NOT EXECUTED 12c186: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 12c189: 89 f8 mov %edi,%eax <== NOT EXECUTED 12c18b: d3 e0 shl %cl,%eax <== NOT EXECUTED 12c18d: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12c18f: 66 89 4b 06 mov %cx,0x6(%ebx) <== NOT EXECUTED 12c193: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED 12c197: 0f 87 6e 04 00 00 ja 12c60b <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 12c19d: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED 12c1a1: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12c1a4: a8 01 test $0x1,%al <== NOT EXECUTED 12c1a6: 75 12 jne 12c1ba <== NOT EXECUTED 12c1a8: b2 01 mov $0x1,%dl <== NOT EXECUTED 12c1aa: eb 02 jmp 12c1ae <== NOT EXECUTED 12c1ac: 88 ca mov %cl,%dl <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 12c1ae: d1 f8 sar %eax <== NOT EXECUTED 12c1b0: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 12c1b3: a8 01 test $0x1,%al <== NOT EXECUTED 12c1b5: 74 f5 je 12c1ac <== NOT EXECUTED 12c1b7: 88 53 08 mov %dl,0x8(%ebx) <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 12c1ba: 8a 95 46 ff ff ff mov -0xba(%ebp),%dl <== NOT EXECUTED 12c1c0: 88 95 27 ff ff ff mov %dl,-0xd9(%ebp) <== NOT EXECUTED } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 12c1c6: 88 53 09 mov %dl,0x9(%ebx) <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 12c1c9: 0f b6 85 45 ff ff ff movzbl -0xbb(%ebp),%eax <== NOT EXECUTED 12c1d0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c1d3: 0f b6 b5 44 ff ff ff movzbl -0xbc(%ebp),%esi <== NOT EXECUTED 12c1da: 09 c6 or %eax,%esi <== NOT EXECUTED 12c1dc: 66 89 73 14 mov %si,0x14(%ebx) <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 12c1e0: 0f b6 95 48 ff ff ff movzbl -0xb8(%ebp),%edx <== NOT EXECUTED 12c1e7: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12c1ea: 0f b6 85 47 ff ff ff movzbl -0xb9(%ebp),%eax <== NOT EXECUTED 12c1f1: 09 d0 or %edx,%eax <== NOT EXECUTED 12c1f3: 66 89 43 20 mov %ax,0x20(%ebx) <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 12c1f7: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12c1fa: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 12c1fd: 8d 44 38 ff lea -0x1(%eax,%edi,1),%eax <== NOT EXECUTED 12c201: 99 cltd <== NOT EXECUTED 12c202: f7 ff idiv %edi <== NOT EXECUTED 12c204: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 12c207: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12c20b: 89 c2 mov %eax,%edx <== NOT EXECUTED 12c20d: d3 e2 shl %cl,%edx <== NOT EXECUTED 12c20f: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 12c212: 0f b6 95 4d ff ff ff movzbl -0xb3(%ebp),%edx <== NOT EXECUTED 12c219: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12c21c: 0f b6 8d 4c ff ff ff movzbl -0xb4(%ebp),%ecx <== NOT EXECUTED 12c223: 66 09 d1 or %dx,%cx <== NOT EXECUTED 12c226: 0f 84 3c 03 00 00 je 12c568 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 12c22c: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12c22f: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 12c232: 0f b7 f6 movzwl %si,%esi <== NOT EXECUTED 12c235: 01 f0 add %esi,%eax <== NOT EXECUTED 12c237: 0f b6 95 27 ff ff ff movzbl -0xd9(%ebp),%edx <== NOT EXECUTED 12c23e: 0f af ca imul %edx,%ecx <== NOT EXECUTED 12c241: 8d 0c 08 lea (%eax,%ecx,1),%ecx <== NOT EXECUTED 12c244: 89 4b 30 mov %ecx,0x30(%ebx) <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 12c247: 0f b6 53 09 movzbl 0x9(%ebx),%edx <== NOT EXECUTED 12c24b: 0f af 53 18 imul 0x18(%ebx),%edx <== NOT EXECUTED 12c24f: 0f b7 43 14 movzwl 0x14(%ebx),%eax <== NOT EXECUTED 12c253: 01 c2 add %eax,%edx <== NOT EXECUTED 12c255: 89 53 1c mov %edx,0x1c(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 12c258: 0f b6 95 4a ff ff ff movzbl -0xb6(%ebp),%edx <== NOT EXECUTED 12c25f: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12c262: 0f b6 85 49 ff ff ff movzbl -0xb7(%ebp),%eax <== NOT EXECUTED 12c269: 66 09 d0 or %dx,%ax <== NOT EXECUTED 12c26c: 0f 84 c2 02 00 00 je 12c534 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 12c272: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12c275: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 12c278: 29 c8 sub %ecx,%eax <== NOT EXECUTED 12c27a: 0f b6 73 04 movzbl 0x4(%ebx),%esi <== NOT EXECUTED 12c27e: 31 d2 xor %edx,%edx <== NOT EXECUTED 12c280: f7 f6 div %esi <== NOT EXECUTED 12c282: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 12c285: 3d f4 0f 00 00 cmp $0xff4,%eax <== NOT EXECUTED 12c28a: 0f 87 2c 01 00 00 ja 12c3bc <== NOT EXECUTED { vol->type = FAT_FAT12; 12c290: c6 43 0a 01 movb $0x1,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 12c294: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 12c29b: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 12c2a2: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) <== NOT EXECUTED vol->mirror = 0; 12c2a9: c6 43 48 00 movb $0x0,0x48(%ebx) <== NOT EXECUTED vol->afat = 0; 12c2ad: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; 12c2b1: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; 12c2b8: c7 43 44 ff ff ff ff movl $0xffffffff,0x44(%ebx) <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12c2bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c2c2: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c2c5: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED 12c2c8: e8 d7 f5 ff ff call 12b8a4 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 12c2cd: 0f b6 43 50 movzbl 0x50(%ebx),%eax <== NOT EXECUTED 12c2d1: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12c2d5: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 12c2d9: 01 d0 add %edx,%eax <== NOT EXECUTED 12c2db: 89 43 4c mov %eax,0x4c(%ebx) <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 12c2de: 5f pop %edi <== NOT EXECUTED 12c2df: 58 pop %eax <== NOT EXECUTED 12c2e0: 6a 0c push $0xc <== NOT EXECUTED 12c2e2: 6a 02 push $0x2 <== NOT EXECUTED 12c2e4: e8 23 20 fe ff call 10e30c <== NOT EXECUTED 12c2e9: 89 43 64 mov %eax,0x64(%ebx) <== NOT EXECUTED if ( fs_info->vhash == NULL ) 12c2ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c2ef: 85 c0 test %eax,%eax <== NOT EXECUTED 12c2f1: 0f 84 d5 03 00 00 je 12c6cc <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c2f7: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 12c2fa: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c2fc: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c303: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); 12c306: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c309: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 12c30c: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c30f: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c316: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 12c319: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c31c: 6a 0c push $0xc <== NOT EXECUTED 12c31e: 6a 02 push $0x2 <== NOT EXECUTED 12c320: e8 e7 1f fe ff call 10e30c <== NOT EXECUTED 12c325: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED if ( fs_info->rhash == NULL ) 12c328: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c32b: 85 c0 test %eax,%eax <== NOT EXECUTED 12c32d: 0f 84 ba 03 00 00 je 12c6ed <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c333: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 12c336: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c338: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c33f: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); 12c342: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c345: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 12c348: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12c34b: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 12c352: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 12c355: c7 43 74 00 01 00 00 movl $0x100,0x74(%ebx) <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 12c35c: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12c360: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 12c363: d3 e0 shl %cl,%eax <== NOT EXECUTED 12c365: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 12c368: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED fs_info->index = 0; 12c36b: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 12c372: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c375: 6a 01 push $0x1 <== NOT EXECUTED 12c377: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 12c37c: e8 8b 1f fe ff call 10e30c <== NOT EXECUTED 12c381: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if ( fs_info->uino == NULL ) 12c384: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c387: 85 c0 test %eax,%eax <== NOT EXECUTED 12c389: 0f 84 c3 02 00 00 je 12c652 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 12c38f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12c392: 6a 01 push $0x1 <== NOT EXECUTED 12c394: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 12c397: 50 push %eax <== NOT EXECUTED 12c398: e8 6f 1f fe ff call 10e30c <== NOT EXECUTED 12c39d: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) 12c3a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c3a6: 85 c0 test %eax,%eax <== NOT EXECUTED 12c3a8: 0f 84 fb 02 00 00 je 12c6a9 <== NOT EXECUTED 12c3ae: 31 f6 xor %esi,%esi <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 12c3b0: 89 f0 mov %esi,%eax <== NOT EXECUTED 12c3b2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12c3b5: 5b pop %ebx <== NOT EXECUTED 12c3b6: 5e pop %esi <== NOT EXECUTED 12c3b7: 5f pop %edi <== NOT EXECUTED 12c3b8: c9 leave <== NOT EXECUTED 12c3b9: c3 ret <== NOT EXECUTED 12c3ba: 66 90 xchg %ax,%ax <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 12c3bc: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED 12c3c1: 0f 86 e1 01 00 00 jbe 12c5a8 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 12c3c7: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 12c3cb: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 12c3d2: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 12c3d9: 0f b6 85 63 ff ff ff movzbl -0x9d(%ebp),%eax <== NOT EXECUTED 12c3e0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c3e3: 0f b6 95 64 ff ff ff movzbl -0x9c(%ebp),%edx <== NOT EXECUTED 12c3ea: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c3ed: 09 d0 or %edx,%eax <== NOT EXECUTED 12c3ef: 0f b6 95 62 ff ff ff movzbl -0x9e(%ebp),%edx <== NOT EXECUTED 12c3f6: 09 d0 or %edx,%eax <== NOT EXECUTED 12c3f8: 0f b6 95 65 ff ff ff movzbl -0x9b(%ebp),%edx <== NOT EXECUTED 12c3ff: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c402: 09 d0 or %edx,%eax <== NOT EXECUTED 12c404: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 12c407: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12c40d: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED 12c410: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED if (vol->mirror) 12c413: 84 c0 test %al,%al <== NOT EXECUTED 12c415: 0f 84 a5 01 00 00 je 12c5c0 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 12c41b: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 12c421: 83 e0 0f and $0xf,%eax <== NOT EXECUTED 12c424: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 12c427: 0f b6 95 67 ff ff ff movzbl -0x99(%ebp),%edx <== NOT EXECUTED 12c42e: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 12c431: 0f b6 85 66 ff ff ff movzbl -0x9a(%ebp),%eax <== NOT EXECUTED 12c438: 09 d0 or %edx,%eax <== NOT EXECUTED 12c43a: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED if( vol->info_sec == 0 ) 12c43e: 66 85 c0 test %ax,%ax <== NOT EXECUTED 12c441: 0f 84 c4 01 00 00 je 12c60b <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 12c447: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c44a: 8d 75 d8 lea -0x28(%ebp),%esi <== NOT EXECUTED 12c44d: 56 push %esi <== NOT EXECUTED 12c44e: 6a 04 push $0x4 <== NOT EXECUTED 12c450: 6a 00 push $0x0 <== NOT EXECUTED 12c452: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12c455: 50 push %eax <== NOT EXECUTED 12c456: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c459: e8 3e fb ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 12c45e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c461: 85 c0 test %eax,%eax <== NOT EXECUTED 12c463: 0f 88 98 02 00 00 js 12c701 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 12c469: 0f b6 45 d9 movzbl -0x27(%ebp),%eax <== NOT EXECUTED 12c46d: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c470: 0f b6 55 da movzbl -0x26(%ebp),%edx <== NOT EXECUTED 12c474: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c477: 09 d0 or %edx,%eax <== NOT EXECUTED 12c479: 0f b6 55 d8 movzbl -0x28(%ebp),%edx <== NOT EXECUTED 12c47d: 09 d0 or %edx,%eax <== NOT EXECUTED 12c47f: 0f b6 55 db movzbl -0x25(%ebp),%edx <== NOT EXECUTED 12c483: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c486: 09 d0 or %edx,%eax <== NOT EXECUTED 12c488: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED 12c48d: 0f 85 9b 01 00 00 jne 12c62e <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 12c493: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c496: 56 push %esi <== NOT EXECUTED 12c497: 6a 0c push $0xc <== NOT EXECUTED 12c499: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED 12c49e: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 12c4a2: 50 push %eax <== NOT EXECUTED 12c4a3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c4a6: e8 f1 fa ff ff call 12bf9c <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 12c4ab: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12c4ae: 85 c0 test %eax,%eax <== NOT EXECUTED 12c4b0: 0f 88 d1 01 00 00 js 12c687 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 12c4b6: 0f b6 45 dd movzbl -0x23(%ebp),%eax <== NOT EXECUTED 12c4ba: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c4bd: 0f b6 55 de movzbl -0x22(%ebp),%edx <== NOT EXECUTED 12c4c1: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c4c4: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4c6: 0f b6 55 dc movzbl -0x24(%ebp),%edx <== NOT EXECUTED 12c4ca: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4cc: 0f b6 55 df movzbl -0x21(%ebp),%edx <== NOT EXECUTED 12c4d0: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c4d3: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4d5: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 12c4d8: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax <== NOT EXECUTED 12c4dc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c4df: 0f b6 55 e2 movzbl -0x1e(%ebp),%edx <== NOT EXECUTED 12c4e3: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c4e6: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4e8: 0f b6 55 e0 movzbl -0x20(%ebp),%edx <== NOT EXECUTED 12c4ec: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4ee: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED 12c4f2: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c4f5: 09 d0 or %edx,%eax <== NOT EXECUTED 12c4f7: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 12c4fa: 51 push %ecx <== NOT EXECUTED 12c4fb: 6a ff push $0xffffffff <== NOT EXECUTED 12c4fd: 6a ff push $0xffffffff <== NOT EXECUTED 12c4ff: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12c502: e8 f9 f7 ff ff call 12bd00 <== NOT EXECUTED 12c507: 89 c6 mov %eax,%esi <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 12c509: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c50c: 85 c0 test %eax,%eax <== NOT EXECUTED 12c50e: 0f 84 ab fd ff ff je 12c2bf <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12c514: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c517: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12c51a: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12c51d: e8 82 f3 ff ff call 12b8a4 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 12c522: 5a pop %edx <== NOT EXECUTED 12c523: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c526: e8 35 11 fe ff call 10d660 <== NOT EXECUTED return rc; 12c52b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c52e: e9 7d fe ff ff jmp 12c3b0 <== NOT EXECUTED 12c533: 90 nop <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 12c534: 0f b6 85 57 ff ff ff movzbl -0xa9(%ebp),%eax <== NOT EXECUTED 12c53b: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 12c53e: 0f b6 95 58 ff ff ff movzbl -0xa8(%ebp),%edx <== NOT EXECUTED 12c545: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c548: 09 d0 or %edx,%eax <== NOT EXECUTED 12c54a: 0f b6 95 56 ff ff ff movzbl -0xaa(%ebp),%edx <== NOT EXECUTED 12c551: 09 d0 or %edx,%eax <== NOT EXECUTED 12c553: 0f b6 95 59 ff ff ff movzbl -0xa7(%ebp),%edx <== NOT EXECUTED 12c55a: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c55d: 09 d0 or %edx,%eax <== NOT EXECUTED 12c55f: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED 12c562: e9 11 fd ff ff jmp 12c278 <== NOT EXECUTED 12c567: 90 nop <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 12c568: 0f b6 8d 5b ff ff ff movzbl -0xa5(%ebp),%ecx <== NOT EXECUTED 12c56f: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED 12c572: 0f b6 95 5c ff ff ff movzbl -0xa4(%ebp),%edx <== NOT EXECUTED 12c579: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12c57c: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c57e: 0f b6 95 5a ff ff ff movzbl -0xa6(%ebp),%edx <== NOT EXECUTED 12c585: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c587: 0f b6 95 5d ff ff ff movzbl -0xa3(%ebp),%edx <== NOT EXECUTED 12c58e: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12c591: 09 d1 or %edx,%ecx <== NOT EXECUTED 12c593: 89 4b 18 mov %ecx,0x18(%ebx) <== NOT EXECUTED 12c596: e9 97 fc ff ff jmp 12c232 <== NOT EXECUTED 12c59b: 90 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 12c59c: c6 43 03 00 movb $0x0,0x3(%ebx) <== NOT EXECUTED 12c5a0: e9 88 fb ff ff jmp 12c12d <== NOT EXECUTED 12c5a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 12c5a8: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 12c5ac: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 12c5b3: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED 12c5ba: e9 e3 fc ff ff jmp 12c2a2 <== NOT EXECUTED 12c5bf: 90 nop <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 12c5c0: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED 12c5c4: e9 5e fe ff ff jmp 12c427 <== NOT EXECUTED 12c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 12c5cc: e8 af b5 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c5d1: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED 12c5d7: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c5dc: e9 cf fd ff ff jmp 12c3b0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 12c5e1: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 12c5e3: e9 a1 fb ff ff jmp 12c189 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 12c5e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c5eb: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c5ee: e8 6d 10 fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 12c5f3: e8 88 b5 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c5f8: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12c5fe: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c603: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c606: e9 a5 fd ff ff jmp 12c3b0 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 12c60b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 12c60e: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c611: e8 4a 10 fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 12c616: e8 65 b5 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c61b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12c621: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c626: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c629: e9 82 fd ff ff jmp 12c3b0 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12c62e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c631: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12c634: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12c637: e8 68 f2 ff ff call 12b8a4 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 12c63c: 5f pop %edi <== NOT EXECUTED 12c63d: eb cf jmp 12c60e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 12c63f: e8 3c b5 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c644: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 12c64a: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 12c64d: e9 5e fd ff ff jmp 12c3b0 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 12c652: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c655: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c658: e8 03 10 fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c65d: 59 pop %ecx <== NOT EXECUTED 12c65e: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c661: e8 02 22 fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12c666: 5a pop %edx <== NOT EXECUTED 12c667: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); 12c66a: e8 f9 21 fe ff call 10e868 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 12c66f: e8 0c b5 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c674: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12c67a: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 12c67f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c682: e9 29 fd ff ff jmp 12c3b0 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12c687: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c68a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12c68d: ff 72 34 pushl 0x34(%edx) <== NOT EXECUTED 12c690: e8 0f f2 ff ff call 12b8a4 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 12c695: 5e pop %esi <== NOT EXECUTED 12c696: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c699: e8 c2 0f fe ff call 10d660 <== NOT EXECUTED 12c69e: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED return -1; 12c6a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c6a4: e9 07 fd ff ff jmp 12c3b0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 12c6a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c6ac: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c6af: e8 ac 0f fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c6b4: 58 pop %eax <== NOT EXECUTED 12c6b5: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c6b8: e8 ab 21 fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12c6bd: 5f pop %edi <== NOT EXECUTED 12c6be: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 12c6c1: e8 a2 21 fe ff call 10e868 <== NOT EXECUTED free(fs_info->uino); 12c6c6: 5e pop %esi <== NOT EXECUTED 12c6c7: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 12c6ca: eb 9e jmp 12c66a <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 12c6cc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c6cf: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c6d2: e8 89 0f fe ff call 10d660 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 12c6d7: e8 a4 b4 01 00 call 147b80 <__errno> <== NOT EXECUTED 12c6dc: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12c6e2: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 12c6e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c6e8: e9 c3 fc ff ff jmp 12c3b0 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 12c6ed: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c6f0: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c6f3: e8 68 0f fe ff call 10d660 <== NOT EXECUTED free(fs_info->vhash); 12c6f8: 5e pop %esi <== NOT EXECUTED 12c6f9: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 12c6fc: e9 69 ff ff ff jmp 12c66a <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 12c701: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c704: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12c707: e8 54 0f fe ff call 10d660 <== NOT EXECUTED 12c70c: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED return -1; 12c70f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12c712: e9 99 fc ff ff jmp 12c3b0 <== NOT EXECUTED =============================================================================== 0012b7c0 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 12b7c0: 55 push %ebp <== NOT EXECUTED 12b7c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12b7c3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12b7c6: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED 12b7c9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12b7cc: 39 42 78 cmp %eax,0x78(%edx) <== NOT EXECUTED 12b7cf: 0f 96 c0 setbe %al <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 12b7d2: c9 leave <== NOT EXECUTED 12b7d3: c3 ret <== NOT EXECUTED =============================================================================== 0014388c : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 14388c: 55 push %ebp <== NOT EXECUTED 14388d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 14388f: 57 push %edi <== NOT EXECUTED 143890: 56 push %esi <== NOT EXECUTED 143891: 53 push %ebx <== NOT EXECUTED 143892: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 143895: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 143898: 8b 47 34 mov 0x34(%edi),%eax <== NOT EXECUTED 14389b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED uint32_t cl4find = 2; uint32_t next_cln = 0; 14389e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 1438a5: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 1438a8: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 1438ab: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED if (count == 0) 1438b1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1438b4: 85 d2 test %edx,%edx <== NOT EXECUTED 1438b6: 0f 84 e8 00 00 00 je 1439a4 <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 1438bc: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 1438bf: 8b 5a 44 mov 0x44(%edx),%ebx <== NOT EXECUTED 1438c2: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 1438c5: 0f 84 e5 00 00 00 je 1439b0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 1438cb: 83 c0 02 add $0x2,%eax <== NOT EXECUTED 1438ce: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 1438d1: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 1438d4: 0f 86 e0 00 00 00 jbe 1439ba <== NOT EXECUTED 1438da: be 02 00 00 00 mov $0x2,%esi <== NOT EXECUTED 1438df: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 1438e6: eb 43 jmp 14392b <== NOT EXECUTED * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 1438e8: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1438eb: 89 18 mov %ebx,(%eax) <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 1438ed: 51 push %ecx <== NOT EXECUTED 1438ee: 6a ff push $0xffffffff <== NOT EXECUTED 1438f0: 53 push %ebx <== NOT EXECUTED 1438f1: 57 push %edi <== NOT EXECUTED 1438f2: e8 0d fb ff ff call 143404 <== NOT EXECUTED if ( rc != RC_OK ) 1438f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1438fa: 85 c0 test %eax,%eax <== NOT EXECUTED 1438fc: 0f 85 40 01 00 00 jne 143a42 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 143902: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 143905: 8b 02 mov (%edx),%eax <== NOT EXECUTED 143907: 40 inc %eax <== NOT EXECUTED 143908: 89 02 mov %eax,(%edx) <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 14390a: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 14390d: 0f 84 0f 01 00 00 je 143a22 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return rc; 143913: 89 5d d0 mov %ebx,-0x30(%ebp) <== NOT EXECUTED } } i++; 143916: 46 inc %esi <== NOT EXECUTED cl4find++; 143917: 43 inc %ebx <== NOT EXECUTED if (cl4find >= data_cls_val) 143918: 39 5d d4 cmp %ebx,-0x2c(%ebp) <== NOT EXECUTED 14391b: 77 05 ja 143922 <== NOT EXECUTED 14391d: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 143922: 39 75 d4 cmp %esi,-0x2c(%ebp) <== NOT EXECUTED 143925: 0f 86 99 00 00 00 jbe 1439c4 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 14392b: 50 push %eax <== NOT EXECUTED 14392c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 14392f: 50 push %eax <== NOT EXECUTED 143930: 53 push %ebx <== NOT EXECUTED 143931: 57 push %edi <== NOT EXECUTED 143932: e8 f5 fc ff ff call 14362c <== NOT EXECUTED if ( rc != RC_OK ) 143937: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14393a: 85 c0 test %eax,%eax <== NOT EXECUTED 14393c: 0f 85 c2 00 00 00 jne 143a04 <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 143942: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143945: 85 d2 test %edx,%edx <== NOT EXECUTED 143947: 75 cd jne 143916 <== NOT EXECUTED /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 143949: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 14394c: 8b 02 mov (%edx),%eax <== NOT EXECUTED 14394e: 85 c0 test %eax,%eax <== NOT EXECUTED 143950: 74 96 je 1438e8 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 143952: 52 push %edx <== NOT EXECUTED 143953: 6a ff push $0xffffffff <== NOT EXECUTED 143955: 53 push %ebx <== NOT EXECUTED 143956: 57 push %edi <== NOT EXECUTED 143957: e8 a8 fa ff ff call 143404 <== NOT EXECUTED if ( rc != RC_OK ) 14395c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 14395f: 85 c0 test %eax,%eax <== NOT EXECUTED 143961: 0f 85 e2 00 00 00 jne 143a49 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 143967: 50 push %eax <== NOT EXECUTED 143968: 53 push %ebx <== NOT EXECUTED 143969: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 14396c: 57 push %edi <== NOT EXECUTED 14396d: e8 92 fa ff ff call 143404 <== NOT EXECUTED if ( rc != RC_OK ) 143972: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143975: 85 c0 test %eax,%eax <== NOT EXECUTED 143977: 74 89 je 143902 <== NOT EXECUTED 143979: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 14397b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 14397e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 143981: ff 30 pushl (%eax) <== NOT EXECUTED 143983: 57 push %edi <== NOT EXECUTED 143984: e8 27 fe ff ff call 1437b0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 143989: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 14398c: 6a 00 push $0x0 <== NOT EXECUTED 14398e: 53 push %ebx <== NOT EXECUTED 14398f: 57 push %edi <== NOT EXECUTED 143990: e8 6f fa ff ff call 143404 <== NOT EXECUTED fat_buf_release(fs_info); 143995: 59 pop %ecx <== NOT EXECUTED 143996: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 143999: e8 06 7f fe ff call 12b8a4 <== NOT EXECUTED return rc; 14399e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1439a1: eb 03 jmp 1439a6 <== NOT EXECUTED 1439a3: 90 nop <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 1439a4: 31 f6 xor %esi,%esi <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 1439a6: 89 f0 mov %esi,%eax <== NOT EXECUTED 1439a8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1439ab: 5b pop %ebx <== NOT EXECUTED 1439ac: 5e pop %esi <== NOT EXECUTED 1439ad: 5f pop %edi <== NOT EXECUTED 1439ae: c9 leave <== NOT EXECUTED 1439af: c3 ret <== NOT EXECUTED *cls_added = 0; if (count == 0) return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 1439b0: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 1439b5: e9 11 ff ff ff jmp 1438cb <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 1439ba: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 1439c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 1439c4: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 1439c7: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 1439ca: 89 42 44 mov %eax,0x44(%edx) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 1439cd: 8b 42 40 mov 0x40(%edx),%eax <== NOT EXECUTED 1439d0: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 1439d3: 74 0b je 1439e0 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 1439d5: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 1439d8: 2b 02 sub (%edx),%eax <== NOT EXECUTED 1439da: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 1439dd: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED *last_cl = save_cln; 1439e0: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 1439e3: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 1439e6: 89 10 mov %edx,(%eax) <== NOT EXECUTED fat_buf_release(fs_info); 1439e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1439eb: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 1439ee: e8 b1 7e fe ff call 12b8a4 <== NOT EXECUTED 1439f3: 31 f6 xor %esi,%esi <== NOT EXECUTED return RC_OK; 1439f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1439f8: 89 f0 mov %esi,%eax <== NOT EXECUTED 1439fa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1439fd: 5b pop %ebx <== NOT EXECUTED 1439fe: 5e pop %esi <== NOT EXECUTED 1439ff: 5f pop %edi <== NOT EXECUTED 143a00: c9 leave <== NOT EXECUTED 143a01: c3 ret <== NOT EXECUTED 143a02: 66 90 xchg %ax,%ax <== NOT EXECUTED 143a04: 89 c6 mov %eax,%esi <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 143a06: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 143a09: 8b 0a mov (%edx),%ecx <== NOT EXECUTED 143a0b: 85 c9 test %ecx,%ecx <== NOT EXECUTED 143a0d: 74 97 je 1439a6 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 143a0f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 143a12: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 143a15: ff 30 pushl (%eax) <== NOT EXECUTED 143a17: 57 push %edi <== NOT EXECUTED 143a18: e8 93 fd ff ff call 1437b0 <== NOT EXECUTED 143a1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143a20: eb 84 jmp 1439a6 <== NOT EXECUTED (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 143a22: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 143a25: 89 58 44 mov %ebx,0x44(%eax) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 143a28: 8b 40 40 mov 0x40(%eax),%eax <== NOT EXECUTED 143a2b: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 143a2e: 74 0b je 143a3b <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 143a30: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 143a33: 2b 02 sub (%edx),%eax <== NOT EXECUTED 143a35: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 143a38: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED *last_cl = save_cln; 143a3b: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 143a3e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 143a40: eb a6 jmp 1439e8 <== NOT EXECUTED 143a42: 89 c6 mov %eax,%esi <== NOT EXECUTED 143a44: e9 5d ff ff ff jmp 1439a6 <== NOT EXECUTED 143a49: 89 c6 mov %eax,%esi <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 143a4b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 143a4e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 143a51: ff 32 pushl (%edx) <== NOT EXECUTED 143a53: 57 push %edi <== NOT EXECUTED 143a54: e8 57 fd ff ff call 1437b0 <== NOT EXECUTED return rc; 143a59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143a5c: e9 45 ff ff ff jmp 1439a6 <== NOT EXECUTED =============================================================================== 00143404 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 143404: 55 push %ebp <== NOT EXECUTED 143405: 89 e5 mov %esp,%ebp <== NOT EXECUTED 143407: 57 push %edi <== NOT EXECUTED 143408: 56 push %esi <== NOT EXECUTED 143409: 53 push %ebx <== NOT EXECUTED 14340a: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 14340d: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 143410: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 143413: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 143416: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 14341d: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 143420: 76 6b jbe 14348d <== NOT EXECUTED 143422: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 143425: 40 inc %eax <== NOT EXECUTED 143426: 39 c2 cmp %eax,%edx <== NOT EXECUTED 143428: 77 63 ja 14348d <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 14342a: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 14342e: a8 01 test $0x1,%al <== NOT EXECUTED 143430: 75 76 jne 1434a8 <== NOT EXECUTED 143432: a8 02 test $0x2,%al <== NOT EXECUTED 143434: 74 7a je 1434b0 <== NOT EXECUTED 143436: 8d 04 12 lea (%edx,%edx,1),%eax <== NOT EXECUTED 143439: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 14343c: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 143440: 89 c6 mov %eax,%esi <== NOT EXECUTED 143442: d3 ee shr %cl,%esi <== NOT EXECUTED 143444: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 143447: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 143449: 66 89 45 d2 mov %ax,-0x2e(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 14344d: 8d 7d e4 lea -0x1c(%ebp),%edi <== NOT EXECUTED 143450: 57 push %edi <== NOT EXECUTED 143451: 6a 01 push $0x1 <== NOT EXECUTED 143453: 56 push %esi <== NOT EXECUTED 143454: 53 push %ebx <== NOT EXECUTED 143455: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 143458: e8 b7 85 fe ff call 12ba14 <== NOT EXECUTED if (rc != RC_OK) 14345d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143460: 85 c0 test %eax,%eax <== NOT EXECUTED 143462: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 143465: 75 36 jne 14349d <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 143467: 0f b7 4d d2 movzwl -0x2e(%ebp),%ecx <== NOT EXECUTED 14346b: 49 dec %ecx <== NOT EXECUTED 14346c: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 14346f: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 143472: 21 4d c4 and %ecx,-0x3c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 143475: 8a 4b 0a mov 0xa(%ebx),%cl <== NOT EXECUTED 143478: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED 14347b: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 14347e: 74 4c je 1434cc <== NOT EXECUTED 143480: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 143483: 0f 84 cb 00 00 00 je 143554 <== NOT EXECUTED 143489: fe c9 dec %cl <== NOT EXECUTED 14348b: 74 5f je 1434ec <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 14348d: e8 ee 46 00 00 call 147b80 <__errno> <== NOT EXECUTED 143492: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 143498: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 14349d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1434a0: 5b pop %ebx <== NOT EXECUTED 1434a1: 5e pop %esi <== NOT EXECUTED 1434a2: 5f pop %edi <== NOT EXECUTED 1434a3: c9 leave <== NOT EXECUTED 1434a4: c3 ret <== NOT EXECUTED 1434a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 1434a8: 89 d0 mov %edx,%eax <== NOT EXECUTED 1434aa: d1 e8 shr %eax <== NOT EXECUTED 1434ac: 01 d0 add %edx,%eax <== NOT EXECUTED 1434ae: eb 89 jmp 143439 <== NOT EXECUTED 1434b0: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx <== NOT EXECUTED 1434b7: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1434ba: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1434be: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 1434c1: d3 ee shr %cl,%esi <== NOT EXECUTED 1434c3: 03 73 4c add 0x4c(%ebx),%esi <== NOT EXECUTED 1434c6: e9 7c ff ff ff jmp 143447 <== NOT EXECUTED 1434cb: 90 nop <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 1434cc: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1434cf: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1434d2: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 1434d5: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED 1434d8: 66 89 0c 32 mov %cx,(%edx,%esi,1) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 1434dc: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED break; } return RC_OK; } 1434e3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1434e6: 5b pop %ebx <== NOT EXECUTED 1434e7: 5e pop %esi <== NOT EXECUTED 1434e8: 5f pop %edi <== NOT EXECUTED 1434e9: c9 leave <== NOT EXECUTED 1434ea: c3 ret <== NOT EXECUTED 1434eb: 90 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 1434ec: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 1434ef: 0f 84 8b 00 00 00 je 143580 <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 1434f5: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1434f8: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 1434fb: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 1434ff: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143502: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 143505: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 143508: 80 22 0f andb $0xf,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 14350b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 14350e: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 143511: 03 55 c4 add -0x3c(%ebp),%edx <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 143514: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED 143517: 08 0a or %cl,(%edx) <== NOT EXECUTED 143519: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 143520: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 143523: 4a dec %edx <== NOT EXECUTED 143524: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED 143527: 0f 84 9f 00 00 00 je 1435cc <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 14352d: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 143530: 41 inc %ecx <== NOT EXECUTED 143531: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143534: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 143537: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 14353b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 14353e: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 143541: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 143544: 66 c1 ea 08 shr $0x8,%dx <== NOT EXECUTED 143548: 08 11 or %dl,(%ecx) <== NOT EXECUTED break; } return RC_OK; } 14354a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 14354d: 5b pop %ebx <== NOT EXECUTED 14354e: 5e pop %esi <== NOT EXECUTED 14354f: 5f pop %edi <== NOT EXECUTED 143550: c9 leave <== NOT EXECUTED 143551: c3 ret <== NOT EXECUTED 143552: 66 90 xchg %ax,%ax <== NOT EXECUTED case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 143554: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143557: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 14355a: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 14355d: 81 21 00 00 00 f0 andl $0xf0000000,(%ecx) <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 143563: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 143566: 81 e2 ff ff ff 0f and $0xfffffff,%edx <== NOT EXECUTED 14356c: 09 11 or %edx,(%ecx) <== NOT EXECUTED 14356e: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED break; } return RC_OK; } 143575: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143578: 5b pop %ebx <== NOT EXECUTED 143579: 5e pop %esi <== NOT EXECUTED 14357a: 5f pop %edi <== NOT EXECUTED 14357b: c9 leave <== NOT EXECUTED 14357c: c3 ret <== NOT EXECUTED 14357d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 143580: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 143583: 81 e2 ff 0f 00 00 and $0xfff,%edx <== NOT EXECUTED 143589: 66 89 55 d4 mov %dx,-0x2c(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 14358d: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143590: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 143593: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 143596: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 14359a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 14359d: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1435a0: 01 ca add %ecx,%edx <== NOT EXECUTED else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 1435a2: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED 1435a5: 08 0a or %cl,(%edx) <== NOT EXECUTED 1435a7: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 1435ae: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 1435b1: 4a dec %edx <== NOT EXECUTED 1435b2: 3b 55 c4 cmp -0x3c(%ebp),%edx <== NOT EXECUTED 1435b5: 74 51 je 143608 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 1435b7: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 1435ba: 41 inc %ecx <== NOT EXECUTED 1435bb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1435be: 8b 5a 20 mov 0x20(%edx),%ebx <== NOT EXECUTED 1435c1: 8d 14 19 lea (%ecx,%ebx,1),%edx <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 1435c4: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED 1435c7: e9 6f ff ff ff jmp 14353b <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 1435cc: 57 push %edi <== NOT EXECUTED 1435cd: 6a 01 push $0x1 <== NOT EXECUTED 1435cf: 46 inc %esi <== NOT EXECUTED 1435d0: 56 push %esi <== NOT EXECUTED 1435d1: 53 push %ebx <== NOT EXECUTED 1435d2: e8 3d 84 fe ff call 12ba14 <== NOT EXECUTED &block0); if (rc != RC_OK) 1435d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1435da: 85 c0 test %eax,%eax <== NOT EXECUTED 1435dc: 0f 85 bb fe ff ff jne 14349d <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 1435e2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1435e5: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1435e8: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 1435eb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1435ee: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 1435f1: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 1435f4: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 1435f8: 08 0a or %cl,(%edx) <== NOT EXECUTED 1435fa: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED 143601: e9 97 fe ff ff jmp 14349d <== NOT EXECUTED 143606: 66 90 xchg %ax,%ax <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 143608: 57 push %edi <== NOT EXECUTED 143609: 6a 01 push $0x1 <== NOT EXECUTED 14360b: 46 inc %esi <== NOT EXECUTED 14360c: 56 push %esi <== NOT EXECUTED 14360d: 53 push %ebx <== NOT EXECUTED 14360e: e8 01 84 fe ff call 12ba14 <== NOT EXECUTED &block0); if (rc != RC_OK) 143613: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143616: 85 c0 test %eax,%eax <== NOT EXECUTED 143618: 0f 85 7f fe ff ff jne 14349d <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 14361e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 143621: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 143624: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED 143627: eb c2 jmp 1435eb <== NOT EXECUTED =============================================================================== 0012bd68 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 12bd68: 55 push %ebp <== NOT EXECUTED 12bd69: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12bd6b: 57 push %edi <== NOT EXECUTED 12bd6c: 56 push %esi <== NOT EXECUTED 12bd6d: 53 push %ebx <== NOT EXECUTED 12bd6e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12bd71: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 12bd74: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 12bd77: f6 46 0a 04 testb $0x4,0xa(%esi) <== NOT EXECUTED 12bd7b: 0f 85 df 00 00 00 jne 12be60 <== NOT EXECUTED 12bd81: 31 ff xor %edi,%edi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 12bd83: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bd86: 56 push %esi <== NOT EXECUTED 12bd87: e8 18 fb ff ff call 12b8a4 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 12bd8c: 5a pop %edx <== NOT EXECUTED 12bd8d: 59 pop %ecx <== NOT EXECUTED 12bd8e: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 12bd91: ff 76 54 pushl 0x54(%esi) <== NOT EXECUTED 12bd94: e8 bf ec fd ff call 10aa58 <== NOT EXECUTED 12bd99: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bd9c: 85 c0 test %eax,%eax <== NOT EXECUTED 12bd9e: 0f 85 e0 00 00 00 jne 12be84 <== NOT EXECUTED 12bda4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 12bdab: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 12bdae: 03 5e 64 add 0x64(%esi),%ebx <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 12bdb1: eb 0d jmp 12bdc0 <== NOT EXECUTED 12bdb3: 90 nop <== NOT EXECUTED free(node); 12bdb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bdb7: 50 push %eax <== NOT EXECUTED 12bdb8: e8 ab 2a fe ff call 10e868 <== NOT EXECUTED 12bdbd: 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 ); 12bdc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bdc3: 53 push %ebx <== NOT EXECUTED 12bdc4: e8 cf 7c fe ff call 113a98 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 12bdc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bdcc: 85 c0 test %eax,%eax <== NOT EXECUTED 12bdce: 75 e4 jne 12bdb4 <== NOT EXECUTED 12bdd0: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 12bdd4: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED 12bdd8: 75 d1 jne 12bdab <== NOT EXECUTED 12bdda: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 12bde1: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 12bde4: 03 5e 68 add 0x68(%esi),%ebx <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 12bde7: eb 0f jmp 12bdf8 <== NOT EXECUTED 12bde9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED free(node); 12bdec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bdef: 50 push %eax <== NOT EXECUTED 12bdf0: e8 73 2a fe ff call 10e868 <== NOT EXECUTED 12bdf5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12bdf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12bdfb: 53 push %ebx <== NOT EXECUTED 12bdfc: e8 97 7c fe ff call 113a98 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 12be01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12be04: 85 c0 test %eax,%eax <== NOT EXECUTED 12be06: 75 e4 jne 12bdec <== NOT EXECUTED 12be08: 83 45 e4 0c addl $0xc,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 12be0c: 83 7d e4 18 cmpl $0x18,-0x1c(%ebp) <== NOT EXECUTED 12be10: 75 cf jne 12bde1 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 12be12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12be15: ff 76 64 pushl 0x64(%esi) <== NOT EXECUTED 12be18: e8 4b 2a fe ff call 10e868 <== NOT EXECUTED free(fs_info->rhash); 12be1d: 58 pop %eax <== NOT EXECUTED 12be1e: ff 76 68 pushl 0x68(%esi) <== NOT EXECUTED 12be21: e8 42 2a fe ff call 10e868 <== NOT EXECUTED free(fs_info->uino); 12be26: 5b pop %ebx <== NOT EXECUTED 12be27: ff 76 6c pushl 0x6c(%esi) <== NOT EXECUTED 12be2a: e8 39 2a fe ff call 10e868 <== NOT EXECUTED free(fs_info->sec_buf); 12be2f: 59 pop %ecx <== NOT EXECUTED 12be30: ff b6 88 00 00 00 pushl 0x88(%esi) <== NOT EXECUTED 12be36: e8 2d 2a fe ff call 10e868 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 12be3b: 5a pop %edx <== NOT EXECUTED 12be3c: ff 76 5c pushl 0x5c(%esi) <== NOT EXECUTED 12be3f: e8 1c 18 fe ff call 10d660 <== NOT EXECUTED if (rc) 12be44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12be47: 85 ff test %edi,%edi <== NOT EXECUTED 12be49: 74 0b je 12be56 <== NOT EXECUTED errno = EIO; 12be4b: e8 30 bd 01 00 call 147b80 <__errno> <== NOT EXECUTED 12be50: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rc; } 12be56: 89 f8 mov %edi,%eax <== NOT EXECUTED 12be58: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12be5b: 5b pop %ebx <== NOT EXECUTED 12be5c: 5e pop %esi <== NOT EXECUTED 12be5d: 5f pop %edi <== NOT EXECUTED 12be5e: c9 leave <== NOT EXECUTED 12be5f: c3 ret <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 12be60: 53 push %ebx <== NOT EXECUTED 12be61: ff 76 44 pushl 0x44(%esi) <== NOT EXECUTED 12be64: ff 76 40 pushl 0x40(%esi) <== NOT EXECUTED 12be67: 50 push %eax <== NOT EXECUTED 12be68: e8 93 fe ff ff call 12bd00 <== NOT EXECUTED 12be6d: 89 c7 mov %eax,%edi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 12be6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12be72: 85 c0 test %eax,%eax <== NOT EXECUTED 12be74: 0f 84 09 ff ff ff je 12bd83 <== NOT EXECUTED 12be7a: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 12be7f: e9 ff fe ff ff jmp 12bd83 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 12be84: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 12be89: e9 16 ff ff ff jmp 12bda4 <== NOT EXECUTED =============================================================================== 00143ea4 : #include int fchdir( int fd ) { 143ea4: 55 push %ebp <== NOT EXECUTED 143ea5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 143ea7: 57 push %edi <== NOT EXECUTED 143ea8: 56 push %esi <== NOT EXECUTED 143ea9: 53 push %ebx <== NOT EXECUTED 143eaa: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED 143ead: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 143eb0: 3b 1d 4c d1 16 00 cmp 0x16d14c,%ebx <== NOT EXECUTED 143eb6: 0f 83 c0 00 00 00 jae 143f7c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 143ebc: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 143ebf: 03 1d dc 4d 17 00 add 0x174ddc,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 143ec5: f6 43 15 01 testb $0x1,0x15(%ebx) <== NOT EXECUTED 143ec9: 0f 84 ad 00 00 00 je 143f7c <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 143ecf: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 143ed2: 85 c0 test %eax,%eax <== NOT EXECUTED 143ed4: 0f 84 d0 00 00 00 je 143faa <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 143eda: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 143edd: 85 c0 test %eax,%eax <== NOT EXECUTED 143edf: 0f 84 c5 00 00 00 je 143faa <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 143ee5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143ee8: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 143eeb: 53 push %ebx <== NOT EXECUTED 143eec: ff d0 call *%eax <== NOT EXECUTED 143eee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 143ef1: 48 dec %eax <== NOT EXECUTED 143ef2: 75 74 jne 143f68 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 143ef4: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED 143ef9: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 143efc: 89 55 b4 mov %edx,-0x4c(%ebp) <== NOT EXECUTED 143eff: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 143f02: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 143f07: 89 d7 mov %edx,%edi <== NOT EXECUTED 143f09: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 143f0b: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 143f0e: b1 05 mov $0x5,%cl <== NOT EXECUTED 143f10: 89 de mov %ebx,%esi <== NOT EXECUTED 143f12: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 143f14: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143f17: 6a 00 push $0x0 <== NOT EXECUTED 143f19: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 143f1c: 56 push %esi <== NOT EXECUTED 143f1d: 6a 00 push $0x0 <== NOT EXECUTED 143f1f: 6a 01 push $0x1 <== NOT EXECUTED 143f21: 68 18 1c 16 00 push $0x161c18 <== NOT EXECUTED 143f26: e8 cd a8 fc ff call 10e7f8 <== NOT EXECUTED 143f2b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 143f2e: 85 c0 test %eax,%eax <== NOT EXECUTED 143f30: 75 5e jne 143f90 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 143f32: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 143f35: 85 c0 test %eax,%eax <== NOT EXECUTED 143f37: 74 13 je 143f4c <== NOT EXECUTED 143f39: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 143f3c: 85 c0 test %eax,%eax <== NOT EXECUTED 143f3e: 74 0c je 143f4c <== NOT EXECUTED 143f40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 143f43: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 143f46: 52 push %edx <== NOT EXECUTED 143f47: ff d0 call *%eax <== NOT EXECUTED 143f49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 143f4c: 8b 3d 20 f3 16 00 mov 0x16f320,%edi <== NOT EXECUTED 143f52: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 143f55: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 143f5a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 143f5c: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 143f5e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 143f61: 5b pop %ebx <== NOT EXECUTED 143f62: 5e pop %esi <== NOT EXECUTED 143f63: 5f pop %edi <== NOT EXECUTED 143f64: c9 leave <== NOT EXECUTED 143f65: c3 ret <== NOT EXECUTED 143f66: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 143f68: e8 13 3c 00 00 call 147b80 <__errno> <== NOT EXECUTED 143f6d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 143f73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 143f78: eb e4 jmp 143f5e <== NOT EXECUTED 143f7a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 143f7c: e8 ff 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED 143f81: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 143f87: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 143f8c: eb d0 jmp 143f5e <== NOT EXECUTED 143f8e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 143f90: 8b 3d 20 f3 16 00 mov 0x16f320,%edi <== NOT EXECUTED 143f96: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 143f99: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 143f9e: 8b 75 b4 mov -0x4c(%ebp),%esi <== NOT EXECUTED 143fa1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 143fa3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 143fa8: eb b4 jmp 143f5e <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 143faa: e8 d1 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED 143faf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 143fb5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 143fba: eb a2 jmp 143f5e <== NOT EXECUTED =============================================================================== 0012e588 : int fchmod( int fd, mode_t mode ) { 12e588: 55 push %ebp <== NOT EXECUTED 12e589: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e58b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12e58e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12e591: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e594: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax <== NOT EXECUTED 12e59a: 73 2c jae 12e5c8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12e59c: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12e59f: 03 05 dc 4d 17 00 add 0x174ddc,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12e5a5: f6 40 15 01 testb $0x1,0x15(%eax) <== NOT EXECUTED 12e5a9: 74 1d je 12e5c8 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 12e5ab: 8b 48 3c mov 0x3c(%eax),%ecx <== NOT EXECUTED 12e5ae: 8b 49 1c mov 0x1c(%ecx),%ecx <== NOT EXECUTED 12e5b1: 85 c9 test %ecx,%ecx <== NOT EXECUTED 12e5b3: 74 25 je 12e5da <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12e5b5: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 12e5b8: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 12e5bb: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12e5be: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12e5c1: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED } 12e5c4: c9 leave <== NOT EXECUTED * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 12e5c5: ff e0 jmp *%eax <== NOT EXECUTED 12e5c7: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12e5c8: e8 b3 95 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e5cd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 12e5d3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e5d8: c9 leave <== NOT EXECUTED 12e5d9: c3 ret <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e5da: e8 a1 95 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e5df: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e5e5: eb ec jmp 12e5d3 <== NOT EXECUTED =============================================================================== 0012e5e8 : int fchown( int fd, uid_t owner, gid_t group ) { 12e5e8: 55 push %ebp <== NOT EXECUTED 12e5e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e5eb: 53 push %ebx <== NOT EXECUTED 12e5ec: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12e5ef: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12e5f2: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12e5f5: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e5f8: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax <== NOT EXECUTED 12e5fe: 73 38 jae 12e638 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 12e600: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 12e603: 03 05 dc 4d 17 00 add 0x174ddc,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 12e609: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 12e60c: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 12e60f: 74 27 je 12e638 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12e611: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 12e614: 74 36 je 12e64c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 12e616: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 12e619: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 12e61c: 85 d2 test %edx,%edx <== NOT EXECUTED 12e61e: 74 39 je 12e659 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12e620: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 12e623: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12e626: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 12e629: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 12e62c: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 12e62f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 12e632: 59 pop %ecx <== NOT EXECUTED 12e633: 5b pop %ebx <== NOT EXECUTED 12e634: c9 leave <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 12e635: ff e2 jmp *%edx <== NOT EXECUTED 12e637: 90 nop <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12e638: e8 43 95 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e63d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 12e643: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12e648: 5a pop %edx <== NOT EXECUTED 12e649: 5b pop %ebx <== NOT EXECUTED 12e64a: c9 leave <== NOT EXECUTED 12e64b: c3 ret <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 12e64c: e8 2f 95 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e651: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12e657: eb ea jmp 12e643 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e659: e8 22 95 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e65e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12e664: eb dd jmp 12e643 <== NOT EXECUTED =============================================================================== 00143fbc : int fcntl( int fd, int cmd, ... ) { 143fbc: 55 push %ebp 143fbd: 89 e5 mov %esp,%ebp 143fbf: 57 push %edi 143fc0: 56 push %esi 143fc1: 53 push %ebx 143fc2: 83 ec 1c sub $0x1c,%esp 143fc5: 8b 5d 08 mov 0x8(%ebp),%ebx 143fc8: 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, ...)); 143fcb: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 143fce: 8b 35 4c d1 16 00 mov 0x16d14c,%esi 143fd4: 39 f3 cmp %esi,%ebx 143fd6: 0f 83 3c 01 00 00 jae 144118 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 143fdc: a1 dc 4d 17 00 mov 0x174ddc,%eax 143fe1: c1 e3 06 shl $0x6,%ebx 143fe4: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 143fe7: 8b 4b 14 mov 0x14(%ebx),%ecx 143fea: f6 c5 01 test $0x1,%ch 143fed: 0f 84 25 01 00 00 je 144118 <== NEVER TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 143ff3: 83 fa 09 cmp $0x9,%edx 143ff6: 76 14 jbe 14400c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 143ff8: e8 83 3b 00 00 call 147b80 <__errno> 143ffd: c7 00 16 00 00 00 movl $0x16,(%eax) 144003: be ff ff ff ff mov $0xffffffff,%esi 144008: eb 1a jmp 144024 14400a: 66 90 xchg %ax,%ax /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 14400c: ff 24 95 c4 9b 16 00 jmp *0x169bc4(,%edx,4) 144013: 90 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 144014: e8 67 3b 00 00 call 147b80 <__errno> 144019: c7 00 86 00 00 00 movl $0x86,(%eax) 14401f: 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; } 144024: 89 f0 mov %esi,%eax 144026: 8d 65 f4 lea -0xc(%ebp),%esp 144029: 5b pop %ebx 14402a: 5e pop %esi 14402b: 5f pop %edi 14402c: c9 leave 14402d: c3 ret 14402e: 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 ) ); 144030: 83 ec 0c sub $0xc,%esp 144033: ff 37 pushl (%edi) 144035: 89 55 e0 mov %edx,-0x20(%ebp) 144038: e8 47 ac fc ff call 10ec84 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 14403d: 25 01 02 00 00 and $0x201,%eax 144042: 8b 4b 14 mov 0x14(%ebx),%ecx 144045: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 14404b: 09 c8 or %ecx,%eax 14404d: 89 43 14 mov %eax,0x14(%ebx) 144050: 31 f6 xor %esi,%esi 144052: 83 c4 10 add $0x10,%esp 144055: 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) { 144058: 8b 43 3c mov 0x3c(%ebx),%eax 14405b: 8b 40 30 mov 0x30(%eax),%eax 14405e: 85 c0 test %eax,%eax 144060: 74 c2 je 144024 <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 144062: 83 ec 08 sub $0x8,%esp 144065: 53 push %ebx 144066: 52 push %edx 144067: ff d0 call *%eax 144069: 89 c3 mov %eax,%ebx if (err) { 14406b: 83 c4 10 add $0x10,%esp 14406e: 85 c0 test %eax,%eax 144070: 74 b2 je 144024 <== ALWAYS TAKEN errno = err; 144072: e8 09 3b 00 00 call 147b80 <__errno> <== NOT EXECUTED 144077: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 144079: 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; } 14407e: 89 f0 mov %esi,%eax <== NOT EXECUTED 144080: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 144083: 5b pop %ebx <== NOT EXECUTED 144084: 5e pop %esi <== NOT EXECUTED 144085: 5f pop %edi <== NOT EXECUTED 144086: c9 leave <== NOT EXECUTED 144087: 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 ); 144088: 83 ec 0c sub $0xc,%esp 14408b: 51 push %ecx 14408c: 89 55 e0 mov %edx,-0x20(%ebp) 14408f: e8 04 aa fc ff call 10ea98 144094: 89 c6 mov %eax,%esi 144096: 83 c4 10 add $0x10,%esp 144099: 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) { 14409c: 85 f6 test %esi,%esi 14409e: 79 b8 jns 144058 <== ALWAYS TAKEN 1440a0: eb 82 jmp 144024 <== NOT EXECUTED 1440a2: 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 ) ) 1440a4: 8b 07 mov (%edi),%eax 1440a6: 85 c0 test %eax,%eax 1440a8: 74 52 je 1440fc <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 1440aa: 80 cd 08 or $0x8,%ch 1440ad: 89 4b 14 mov %ecx,0x14(%ebx) 1440b0: 31 f6 xor %esi,%esi 1440b2: eb a4 jmp 144058 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); 1440b4: 89 ce mov %ecx,%esi 1440b6: c1 ee 0b shr $0xb,%esi 1440b9: 83 e6 01 and $0x1,%esi 1440bc: eb 9a jmp 144058 1440be: 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 ); 1440c0: 8b 3f mov (%edi),%edi if ( fd2 ) 1440c2: 85 ff test %edi,%edi 1440c4: 74 6a je 144130 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 1440c6: 39 fe cmp %edi,%esi <== NOT EXECUTED 1440c8: 77 42 ja 14410c <== NOT EXECUTED 1440ca: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1440d1: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 1440d3: 8b 73 3c mov 0x3c(%ebx),%esi 1440d6: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 1440d9: 8b 73 38 mov 0x38(%ebx),%esi 1440dc: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 1440df: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 1440e2: 83 c7 18 add $0x18,%edi 1440e5: 8d 73 18 lea 0x18(%ebx),%esi 1440e8: b9 05 00 00 00 mov $0x5,%ecx 1440ed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 1440ef: 8b 75 e4 mov -0x1c(%ebp),%esi 1440f2: 29 c6 sub %eax,%esi 1440f4: c1 fe 06 sar $0x6,%esi 1440f7: eb a3 jmp 14409c 1440f9: 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; 1440fc: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 1440ff: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 144102: 31 f6 xor %esi,%esi <== NOT EXECUTED 144104: e9 4f ff ff ff jmp 144058 <== NOT EXECUTED 144109: 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 ); 14410c: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 14410f: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 144112: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 144115: eb bc jmp 1440d3 <== NOT EXECUTED 144117: 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); 144118: e8 63 3a 00 00 call 147b80 <__errno> <== NOT EXECUTED 14411d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 144123: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 144128: e9 f7 fe ff ff jmp 144024 <== NOT EXECUTED 14412d: 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(); 144130: 89 55 e0 mov %edx,-0x20(%ebp) 144133: e8 c0 aa fc ff call 10ebf8 144138: 89 c7 mov %eax,%edi if ( diop == 0 ) { 14413a: 85 c0 test %eax,%eax 14413c: 8b 55 e0 mov -0x20(%ebp),%edx 14413f: 0f 84 34 ff ff ff je 144079 <== NEVER TAKEN 144145: 89 45 e4 mov %eax,-0x1c(%ebp) 144148: a1 dc 4d 17 00 mov 0x174ddc,%eax 14414d: 8b 4b 14 mov 0x14(%ebx),%ecx 144150: eb 81 jmp 1440d3 =============================================================================== 0010915c : #include int fdatasync( int fd ) { 10915c: 55 push %ebp 10915d: 89 e5 mov %esp,%ebp 10915f: 83 ec 08 sub $0x8,%esp 109162: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 109165: 3b 05 ec 70 12 00 cmp 0x1270ec,%eax 10916b: 73 27 jae 109194 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10916d: c1 e0 06 shl $0x6,%eax 109170: 03 05 20 b2 12 00 add 0x12b220,%eax rtems_libio_check_is_open(iop); 109176: 8b 50 14 mov 0x14(%eax),%edx 109179: f6 c6 01 test $0x1,%dh 10917c: 74 16 je 109194 <== NEVER TAKEN rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 10917e: 83 e2 04 and $0x4,%edx 109181: 74 11 je 109194 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 109183: 8b 50 3c mov 0x3c(%eax),%edx 109186: 8b 52 2c mov 0x2c(%edx),%edx 109189: 85 d2 test %edx,%edx 10918b: 74 19 je 1091a6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 10918d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109190: c9 leave <== NOT EXECUTED */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 109191: ff e2 jmp *%edx <== NOT EXECUTED 109193: 90 nop <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 109194: e8 bf d1 00 00 call 116358 <__errno> 109199: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 10919f: b8 ff ff ff ff mov $0xffffffff,%eax 1091a4: c9 leave 1091a5: c3 ret /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1091a6: e8 ad d1 00 00 call 116358 <__errno> 1091ab: c7 00 86 00 00 00 movl $0x86,(%eax) 1091b1: eb ec jmp 10919f =============================================================================== 0010f824 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f824: 55 push %ebp 10f825: 89 e5 mov %esp,%ebp 10f827: 57 push %edi 10f828: 56 push %esi 10f829: 53 push %ebx 10f82a: 83 ec 30 sub $0x30,%esp 10f82d: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f830: 6a 00 push $0x0 10f832: 6a 00 push $0x0 10f834: ff 35 48 90 12 00 pushl 0x129048 10f83a: e8 a5 c4 ff ff call 10bce4 10f83f: 83 c4 10 add $0x10,%esp 10f842: 85 c0 test %eax,%eax 10f844: 74 12 je 10f858 <== NEVER TAKEN 10f846: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 10f84b: 89 f8 mov %edi,%eax 10f84d: 8d 65 f4 lea -0xc(%ebp),%esp 10f850: 5b pop %ebx 10f851: 5e pop %esi 10f852: 5f pop %edi 10f853: c9 leave 10f854: c3 ret 10f855: 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; 10f858: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 10f85a: 85 db test %ebx,%ebx <== NOT EXECUTED 10f85c: 74 7a je 10f8d8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f85e: 52 push %edx <== NOT EXECUTED 10f85f: 6a 00 push $0x0 <== NOT EXECUTED 10f861: 6a 00 push $0x0 <== NOT EXECUTED 10f863: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f866: e8 79 c4 ff ff call 10bce4 <== NOT EXECUTED 10f86b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f86e: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f871: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f873: f7 d7 not %edi <== NOT EXECUTED 10f875: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f878: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10f87a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f87c: 0f 84 b2 02 00 00 je 10fb34 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f882: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f885: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED 10f88b: e8 50 c5 ff ff call 10bde0 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f890: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f893: 85 ff test %edi,%edi <== NOT EXECUTED 10f895: 75 b4 jne 10f84b <== NOT EXECUTED return err; pipe = *pipep; 10f897: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f899: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f89c: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10f89f: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f8a2: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f8a5: 0f 84 11 02 00 00 je 10fabc <== NOT EXECUTED 10f8ab: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f8ae: 0f 84 c8 01 00 00 je 10fa7c <== NOT EXECUTED 10f8b4: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f8b7: 0f 84 37 01 00 00 je 10f9f4 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 10f8bd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f8c0: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f8c3: e8 18 c5 ff ff call 10bde0 <== NOT EXECUTED 10f8c8: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 10f8ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 10f8cd: 89 f8 mov %edi,%eax <== NOT EXECUTED 10f8cf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f8d2: 5b pop %ebx <== NOT EXECUTED 10f8d3: 5e pop %esi <== NOT EXECUTED 10f8d4: 5f pop %edi <== NOT EXECUTED 10f8d5: c9 leave <== NOT EXECUTED 10f8d6: c3 ret <== NOT EXECUTED 10f8d7: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f8d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f8db: 6a 34 push $0x34 <== NOT EXECUTED 10f8dd: e8 da 8f ff ff call 1088bc <== NOT EXECUTED 10f8e2: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f8e4: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED if (pipe == NULL) 10f8e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8ea: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8ec: 0f 84 46 03 00 00 je 10fc38 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f8f2: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 10f8f7: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f8f9: 89 df mov %ebx,%edi <== NOT EXECUTED 10f8fb: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f8fd: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f904: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f907: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f90c: e8 ab 8f ff ff call 1088bc <== NOT EXECUTED 10f911: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f913: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f916: 85 c0 test %eax,%eax <== NOT EXECUTED 10f918: 0f 84 0c 03 00 00 je 10fc2a <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f91e: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f921: 50 push %eax <== NOT EXECUTED 10f922: 6a 00 push $0x0 <== NOT EXECUTED 10f924: 6a 00 push $0x0 <== NOT EXECUTED 10f926: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED 10f92d: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f932: 50 push %eax <== NOT EXECUTED 10f933: e8 10 21 00 00 call 111a48 <== NOT EXECUTED 10f938: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f93b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f93d: 0f 85 d7 02 00 00 jne 10fc1a <== 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( 10f943: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f946: 50 push %eax <== NOT EXECUTED 10f947: 6a 00 push $0x0 <== NOT EXECUTED 10f949: 6a 00 push $0x0 <== NOT EXECUTED 10f94b: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED 10f952: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f957: 50 push %eax <== NOT EXECUTED 10f958: e8 eb 20 00 00 call 111a48 <== NOT EXECUTED 10f95d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f960: 85 c0 test %eax,%eax <== NOT EXECUTED 10f962: 0f 85 a1 02 00 00 jne 10fc09 <== 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( 10f968: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f96b: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f96e: 50 push %eax <== NOT EXECUTED 10f96f: 6a 00 push $0x0 <== NOT EXECUTED 10f971: 6a 10 push $0x10 <== NOT EXECUTED 10f973: 6a 01 push $0x1 <== NOT EXECUTED 10f975: 0f be 05 48 70 12 00 movsbl 0x127048,%eax <== NOT EXECUTED 10f97c: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f981: 50 push %eax <== NOT EXECUTED 10f982: e8 e5 c0 ff ff call 10ba6c <== NOT EXECUTED 10f987: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f98a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f98c: 0f 85 66 02 00 00 jne 10fbf8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10f992: 51 push %ecx <== NOT EXECUTED 10f993: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED 10f996: 57 push %edi <== NOT EXECUTED 10f997: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f99a: 68 c0 9d 12 00 push $0x129dc0 <== NOT EXECUTED 10f99f: e8 54 da ff ff call 10d3f8 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 10f9a4: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10f9ab: e8 bc e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED 10f9b0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f9b3: 57 push %edi <== NOT EXECUTED 10f9b4: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9b7: 68 c0 9d 12 00 push $0x129dc0 <== NOT EXECUTED 10f9bc: e8 37 da ff ff call 10d3f8 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 10f9c1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10f9c8: e8 9f e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f9cd: a0 48 70 12 00 mov 0x127048,%al <== NOT EXECUTED 10f9d2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f9d5: 88 15 48 70 12 00 mov %dl,0x127048 <== NOT EXECUTED 10f9db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9de: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f9e0: 0f 85 78 fe ff ff jne 10f85e <== NOT EXECUTED c = 'a'; 10f9e6: c6 05 48 70 12 00 61 movb $0x61,0x127048 <== NOT EXECUTED 10f9ed: e9 6c fe ff ff jmp 10f85e <== NOT EXECUTED 10f9f2: 66 90 xchg %ax,%ax <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f9f4: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10f9f7: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f9fa: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f9fd: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10fa00: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa02: 0f 84 90 01 00 00 je 10fb98 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 10fa08: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED 10fa0b: 85 ff test %edi,%edi <== NOT EXECUTED 10fa0d: 0f 85 aa fe ff ff jne 10f8bd <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10fa13: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10fa16: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10fa1a: 0f 85 9d fe ff ff jne 10f8bd <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10fa20: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 10fa23: eb 20 jmp 10fa45 <== NOT EXECUTED 10fa25: 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)) 10fa28: 50 push %eax <== NOT EXECUTED 10fa29: 6a 00 push $0x0 <== NOT EXECUTED 10fa2b: 6a 00 push $0x0 <== NOT EXECUTED 10fa2d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa30: e8 af c2 ff ff call 10bce4 <== NOT EXECUTED 10fa35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa38: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa3a: 75 27 jne 10fa63 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10fa3c: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 10fa3f: 0f 85 78 fe ff ff jne 10f8bd <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10fa45: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa48: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa4b: e8 90 c3 ff ff call 10bde0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10fa50: 5a pop %edx <== NOT EXECUTED 10fa51: 59 pop %ecx <== NOT EXECUTED 10fa52: 6a 00 push $0x0 <== NOT EXECUTED 10fa54: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fa57: e8 a0 21 00 00 call 111bfc <== NOT EXECUTED 10fa5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa5f: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa61: 74 c5 je 10fa28 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 10fa63: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10fa68: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fa6b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10fa6e: 56 push %esi <== NOT EXECUTED 10fa6f: e8 9c fc ff ff call 10f710 <== NOT EXECUTED return err; 10fa74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa77: e9 cf fd ff ff jmp 10f84b <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10fa7c: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10fa7f: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10fa82: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fa85: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10fa88: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa8a: 0f 84 38 01 00 00 je 10fbc8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 10fa90: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10fa93: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10fa96: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fa99: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10fa9c: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa9e: 0f 85 19 fe ff ff jne 10f8bd <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10faa4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10faa7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10faaa: 50 push %eax <== NOT EXECUTED 10faab: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10faae: e8 e5 20 00 00 call 111b98 <== NOT EXECUTED 10fab3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fab6: e9 02 fe ff ff jmp 10f8bd <== NOT EXECUTED 10fabb: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10fabc: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10fabf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10fac2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fac5: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10fac8: 85 c0 test %eax,%eax <== NOT EXECUTED 10faca: 0f 84 e0 00 00 00 je 10fbb0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10fad0: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 10fad3: 85 ff test %edi,%edi <== NOT EXECUTED 10fad5: 0f 85 e2 fd ff ff jne 10f8bd <== NOT EXECUTED 10fadb: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10fade: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10fae2: 0f 85 f8 00 00 00 jne 10fbe0 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10fae8: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10faeb: eb 24 jmp 10fb11 <== NOT EXECUTED 10faed: 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)) 10faf0: 50 push %eax <== NOT EXECUTED 10faf1: 6a 00 push $0x0 <== NOT EXECUTED 10faf3: 6a 00 push $0x0 <== NOT EXECUTED 10faf5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10faf8: e8 e7 c1 ff ff call 10bce4 <== NOT EXECUTED 10fafd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb00: 85 c0 test %eax,%eax <== NOT EXECUTED 10fb02: 0f 85 5b ff ff ff jne 10fa63 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10fb08: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 10fb0b: 0f 85 ac fd ff ff jne 10f8bd <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 10fb11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb14: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb17: e8 c4 c2 ff ff call 10bde0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10fb1c: 5a pop %edx <== NOT EXECUTED 10fb1d: 59 pop %ecx <== NOT EXECUTED 10fb1e: 6a 00 push $0x0 <== NOT EXECUTED 10fb20: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fb23: e8 d4 20 00 00 call 111bfc <== NOT EXECUTED 10fb28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb2b: 85 c0 test %eax,%eax <== NOT EXECUTED 10fb2d: 74 c1 je 10faf0 <== NOT EXECUTED 10fb2f: e9 2f ff ff ff jmp 10fa63 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 10fb34: 85 ff test %edi,%edi <== NOT EXECUTED 10fb36: 75 18 jne 10fb50 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 10fb38: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10fb3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb3d: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED 10fb43: e8 98 c2 ff ff call 10bde0 <== NOT EXECUTED 10fb48: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb4b: e9 47 fd ff ff jmp 10f897 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10fb50: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb53: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fb56: e8 d5 1f 00 00 call 111b30 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10fb5b: 59 pop %ecx <== NOT EXECUTED 10fb5c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fb5f: e8 cc 1f 00 00 call 111b30 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10fb64: 5a pop %edx <== NOT EXECUTED 10fb65: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb68: e8 d3 c0 ff ff call 10bc40 <== NOT EXECUTED free(pipe->Buffer); 10fb6d: 58 pop %eax <== NOT EXECUTED 10fb6e: ff 33 pushl (%ebx) <== NOT EXECUTED 10fb70: e8 6f 8a ff ff call 1085e4 <== NOT EXECUTED free(pipe); 10fb75: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10fb78: e8 67 8a ff ff call 1085e4 <== NOT EXECUTED 10fb7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10fb80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb83: ff 35 48 90 12 00 pushl 0x129048 <== NOT EXECUTED 10fb89: e8 52 c2 ff ff call 10bde0 <== NOT EXECUTED 10fb8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb91: e9 b5 fc ff ff jmp 10f84b <== NOT EXECUTED 10fb96: 66 90 xchg %ax,%ax <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fb98: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fb9b: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fb9e: 50 push %eax <== NOT EXECUTED 10fb9f: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fba2: e8 f1 1f 00 00 call 111b98 <== NOT EXECUTED 10fba7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbaa: e9 59 fe ff ff jmp 10fa08 <== NOT EXECUTED 10fbaf: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 10fbb0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fbb3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fbb6: 50 push %eax <== NOT EXECUTED 10fbb7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fbba: e8 d9 1f 00 00 call 111b98 <== NOT EXECUTED 10fbbf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbc2: e9 09 ff ff ff jmp 10fad0 <== NOT EXECUTED 10fbc7: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fbc8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fbcb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fbce: 50 push %eax <== NOT EXECUTED 10fbcf: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fbd2: e8 c1 1f 00 00 call 111b98 <== NOT EXECUTED 10fbd7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbda: e9 b1 fe ff ff jmp 10fa90 <== NOT EXECUTED 10fbdf: 90 nop <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 10fbe0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fbe3: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fbe6: e8 f5 c1 ff ff call 10bde0 <== NOT EXECUTED 10fbeb: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED err = -ENXIO; goto out_error; 10fbf0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbf3: e9 70 fe ff ff jmp 10fa68 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10fbf8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fbfb: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fbfe: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 10fc01: e8 2a 1f 00 00 call 111b30 <== NOT EXECUTED 10fc06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10fc09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc0c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10fc0f: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 10fc12: e8 19 1f 00 00 call 111b30 <== NOT EXECUTED 10fc17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10fc1a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc1d: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fc20: ff 30 pushl (%eax) <== NOT EXECUTED 10fc22: e8 bd 89 ff ff call 1085e4 <== NOT EXECUTED 10fc27: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10fc2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc2d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10fc30: e8 af 89 ff ff call 1085e4 <== NOT EXECUTED 10fc35: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fc38: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10fc3d: e9 3e ff ff ff jmp 10fb80 <== NOT EXECUTED =============================================================================== 00111070 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 111070: 55 push %ebp 111071: 89 e5 mov %esp,%ebp 111073: 56 push %esi 111074: 53 push %ebx 111075: 8b 75 08 mov 0x8(%ebp),%esi 111078: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 11107b: 83 ec 08 sub $0x8,%esp 11107e: ff 33 pushl (%ebx) 111080: ff 36 pushl (%esi) 111082: e8 45 4b 00 00 call 115bcc 111087: 83 c4 10 add $0x10,%esp 11108a: 85 c0 test %eax,%eax 11108c: 75 12 jne 1110a0 return false; } else { fa->mount_h = entry->mount_h; 11108e: 8b 46 04 mov 0x4(%esi),%eax 111091: 89 43 04 mov %eax,0x4(%ebx) 111094: b0 01 mov $0x1,%al return true; } } 111096: 8d 65 f8 lea -0x8(%ebp),%esp 111099: 5b pop %ebx 11109a: 5e pop %esi 11109b: c9 leave 11109c: c3 ret 11109d: 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 ) { 1110a0: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 1110a2: 8d 65 f8 lea -0x8(%ebp),%esp 1110a5: 5b pop %ebx 1110a6: 5e pop %esi 1110a7: c9 leave 1110a8: 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 ec 70 12 00 cmp 0x1270ec,%eax 1091c6: 0f 83 98 00 00 00 jae 109264 iop = rtems_libio_iop(fd); 1091cc: c1 e0 06 shl $0x6,%eax 1091cf: 03 05 20 b2 12 00 add 0x12b220,%eax rtems_libio_check_is_open(iop); 1091d5: f6 40 15 01 testb $0x1,0x15(%eax) 1091d9: 0f 84 85 00 00 00 je 109264 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1091df: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1091e2: 83 fa 0b cmp $0xb,%edx 1091e5: 76 15 jbe 1091fc break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1091e7: e8 6c d1 00 00 call 116358 <__errno> 1091ec: c7 00 16 00 00 00 movl $0x16,(%eax) 1091f2: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 1091f7: c9 leave 1091f8: c3 ret 1091f9: 8d 76 00 lea 0x0(%esi),%esi * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 1091fc: ff 24 95 98 47 12 00 jmp *0x124798(,%edx,4) 109203: 90 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 109204: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109207: c9 leave 109208: c3 ret 109209: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 10920c: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10920f: c9 leave 109210: c3 ret 109211: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 109214: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109217: c9 leave 109218: c3 ret 109219: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 10921c: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10921f: c9 leave 109220: c3 ret 109221: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 109224: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109227: c9 leave 109228: c3 ret 109229: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 10922c: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10922f: c9 leave 109230: c3 ret 109231: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 109234: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109237: c9 leave 109238: c3 ret 109239: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 10923c: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10923f: c9 leave 109240: c3 ret 109241: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 109244: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109247: c9 leave 109248: c3 ret 109249: 8d 76 00 lea 0x0(%esi),%esi switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 10924c: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10924f: c9 leave 109250: c3 ret 109251: 8d 76 00 lea 0x0(%esi),%esi the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 109254: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109257: c9 leave 109258: c3 ret 109259: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 10925c: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10925f: c9 leave 109260: c3 ret 109261: 8d 76 00 lea 0x0(%esi),%esi rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 109264: e8 ef d0 00 00 call 116358 <__errno> 109269: c7 00 09 00 00 00 movl $0x9,(%eax) 10926f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109274: c9 leave 109275: c3 ret =============================================================================== 001085e4 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1085e4: 55 push %ebp 1085e5: 89 e5 mov %esp,%ebp 1085e7: 53 push %ebx 1085e8: 83 ec 04 sub $0x4,%esp 1085eb: 8b 5d 08 mov 0x8(%ebp),%ebx 1085ee: ff 05 ac 92 12 00 incl 0x1292ac if ( !ptr ) 1085f4: 85 db test %ebx,%ebx 1085f6: 74 4b je 108643 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1085f8: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0 1085ff: 74 47 je 108648 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108601: a1 48 76 12 00 mov 0x127648,%eax 108606: 85 c0 test %eax,%eax 108608: 74 0a je 108614 (*rtems_malloc_statistics_helpers->at_free)(ptr); 10860a: 83 ec 0c sub $0xc,%esp 10860d: 53 push %ebx 10860e: ff 50 08 call *0x8(%eax) 108611: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 108614: 83 ec 08 sub $0x8,%esp 108617: 53 push %ebx 108618: ff 35 58 51 12 00 pushl 0x125158 10861e: e8 d5 50 00 00 call 10d6f8 <_Protected_heap_Free> 108623: 83 c4 10 add $0x10,%esp 108626: 84 c0 test %al,%al 108628: 75 19 jne 108643 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10862a: a1 58 51 12 00 mov 0x125158,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 10862f: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 108632: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 108635: 53 push %ebx <== NOT EXECUTED 108636: 68 b0 2a 12 00 push $0x122ab0 <== NOT EXECUTED 10863b: e8 f0 0d 00 00 call 109430 <== NOT EXECUTED 108640: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108643: 8b 5d fc mov -0x4(%ebp),%ebx 108646: c9 leave 108647: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108648: e8 3f 01 00 00 call 10878c 10864d: 84 c0 test %al,%al 10864f: 75 b0 jne 108601 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108651: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108654: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108657: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108658: e9 6f 01 00 00 jmp 1087cc <== NOT EXECUTED =============================================================================== 0012f908 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 12f908: 55 push %ebp <== NOT EXECUTED 12f909: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f90b: 53 push %ebx <== NOT EXECUTED 12f90c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12f90f: 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 12f912: 81 fb 40 4e 17 00 cmp $0x174e40,%ebx <== NOT EXECUTED 12f918: 74 42 je 12f95c <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 12f91a: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 12f91d: 85 c0 test %eax,%eax <== NOT EXECUTED 12f91f: 74 13 je 12f934 <== NOT EXECUTED 12f921: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f924: 85 c0 test %eax,%eax <== NOT EXECUTED 12f926: 74 0c je 12f934 <== NOT EXECUTED 12f928: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f92b: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 12f92e: 52 push %edx <== NOT EXECUTED 12f92f: ff d0 call *%eax <== NOT EXECUTED 12f931: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 12f934: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 12f937: 85 c0 test %eax,%eax <== NOT EXECUTED 12f939: 74 13 je 12f94e <== NOT EXECUTED 12f93b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f93e: 85 c0 test %eax,%eax <== NOT EXECUTED 12f940: 74 0c je 12f94e <== NOT EXECUTED 12f942: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f945: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 12f948: 52 push %edx <== NOT EXECUTED 12f949: ff d0 call *%eax <== NOT EXECUTED 12f94b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 12f94e: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 12f951: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12f954: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 12f955: e9 0e ef fd ff jmp 10e868 <== NOT EXECUTED 12f95a: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 12f95c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12f95f: c9 leave <== NOT EXECUTED 12f960: c3 ret <== NOT EXECUTED =============================================================================== 00120654 : int fstat( int fd, struct stat *sbuf ) { 120654: 55 push %ebp 120655: 89 e5 mov %esp,%ebp 120657: 57 push %edi 120658: 53 push %ebx 120659: 8b 55 08 mov 0x8(%ebp),%edx 12065c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 12065f: 85 db test %ebx,%ebx 120661: 74 66 je 1206c9 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 120663: 3b 15 4c 51 12 00 cmp 0x12514c,%edx 120669: 73 3d jae 1206a8 12066b: c1 e2 06 shl $0x6,%edx 12066e: 03 15 80 92 12 00 add 0x129280,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 120674: f6 42 15 01 testb $0x1,0x15(%edx) 120678: 74 2e je 1206a8 <== NEVER TAKEN if ( !iop->handlers ) 12067a: 8b 42 3c mov 0x3c(%edx),%eax 12067d: 85 c0 test %eax,%eax 12067f: 74 27 je 1206a8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 120681: 8b 40 18 mov 0x18(%eax),%eax 120684: 85 c0 test %eax,%eax 120686: 74 34 je 1206bc <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 120688: b9 48 00 00 00 mov $0x48,%ecx 12068d: 31 c0 xor %eax,%eax 12068f: 89 df mov %ebx,%edi 120691: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 120693: 8b 42 3c mov 0x3c(%edx),%eax 120696: 89 5d 0c mov %ebx,0xc(%ebp) 120699: 83 c2 18 add $0x18,%edx 12069c: 89 55 08 mov %edx,0x8(%ebp) 12069f: 8b 40 18 mov 0x18(%eax),%eax } 1206a2: 5b pop %ebx 1206a3: 5f pop %edi 1206a4: 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 ); 1206a5: ff e0 jmp *%eax 1206a7: 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 ); 1206a8: e8 57 4a ff ff call 115104 <__errno> 1206ad: 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 ); } 1206b3: b8 ff ff ff ff mov $0xffffffff,%eax 1206b8: 5b pop %ebx 1206b9: 5f pop %edi 1206ba: c9 leave 1206bb: 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 ); 1206bc: e8 43 4a ff ff call 115104 <__errno> <== NOT EXECUTED 1206c1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1206c7: eb ea jmp 1206b3 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 1206c9: e8 36 4a ff ff call 115104 <__errno> 1206ce: c7 00 0e 00 00 00 movl $0xe,(%eax) 1206d4: eb dd jmp 1206b3 =============================================================================== 0012e704 : #include int fsync( int fd ) { 12e704: 55 push %ebp 12e705: 89 e5 mov %esp,%ebp 12e707: 83 ec 08 sub $0x8,%esp 12e70a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 12e70d: 3b 05 4c d1 16 00 cmp 0x16d14c,%eax 12e713: 73 23 jae 12e738 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 12e715: c1 e0 06 shl $0x6,%eax 12e718: 03 05 dc 4d 17 00 add 0x174ddc,%eax rtems_libio_check_is_open(iop); 12e71e: f6 40 15 01 testb $0x1,0x15(%eax) 12e722: 74 14 je 12e738 <== NEVER TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 12e724: 8b 50 3c mov 0x3c(%eax),%edx 12e727: 85 d2 test %edx,%edx 12e729: 74 0d je 12e738 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 12e72b: 8b 52 28 mov 0x28(%edx),%edx 12e72e: 85 d2 test %edx,%edx 12e730: 74 18 je 12e74a rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 12e732: 89 45 08 mov %eax,0x8(%ebp) } 12e735: 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 ); 12e736: ff e2 jmp *%edx /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 12e738: e8 43 94 01 00 call 147b80 <__errno> <== NOT EXECUTED 12e73d: 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 ); } 12e743: b8 ff ff ff ff mov $0xffffffff,%eax 12e748: c9 leave 12e749: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12e74a: e8 31 94 01 00 call 147b80 <__errno> 12e74f: c7 00 86 00 00 00 movl $0x86,(%eax) 12e755: eb ec jmp 12e743 =============================================================================== 00110d48 : int ftruncate( int fd, off_t length ) { 110d48: 55 push %ebp 110d49: 89 e5 mov %esp,%ebp 110d4b: 57 push %edi 110d4c: 56 push %esi 110d4d: 53 push %ebx 110d4e: 83 ec 3c sub $0x3c,%esp 110d51: 8b 5d 08 mov 0x8(%ebp),%ebx 110d54: 8b 45 0c mov 0xc(%ebp),%eax 110d57: 8b 55 10 mov 0x10(%ebp),%edx 110d5a: 89 45 c0 mov %eax,-0x40(%ebp) 110d5d: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 110d60: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx 110d66: 73 60 jae 110dc8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 110d68: c1 e3 06 shl $0x6,%ebx 110d6b: 03 1d 80 92 12 00 add 0x129280,%ebx rtems_libio_check_is_open(iop); 110d71: 8b 43 14 mov 0x14(%ebx),%eax 110d74: f6 c4 01 test $0x1,%ah 110d77: 74 4f je 110dc8 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110d79: a8 04 test $0x4,%al 110d7b: 74 5f je 110ddc <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 110d7d: 8d 45 d4 lea -0x2c(%ebp),%eax 110d80: 8d 73 18 lea 0x18(%ebx),%esi 110d83: b9 05 00 00 00 mov $0x5,%ecx 110d88: 89 c7 mov %eax,%edi 110d8a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 110d8c: 8b 55 e0 mov -0x20(%ebp),%edx 110d8f: 8b 52 10 mov 0x10(%edx),%edx 110d92: 85 d2 test %edx,%edx 110d94: 74 5a je 110df0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 110d96: 83 ec 0c sub $0xc,%esp 110d99: 50 push %eax 110d9a: ff d2 call *%edx 110d9c: 83 c4 10 add $0x10,%esp 110d9f: 48 dec %eax 110da0: 74 60 je 110e02 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110da2: f6 43 14 04 testb $0x4,0x14(%ebx) 110da6: 74 34 je 110ddc <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 110da8: 8b 43 3c mov 0x3c(%ebx),%eax 110dab: 8b 40 20 mov 0x20(%eax),%eax 110dae: 85 c0 test %eax,%eax 110db0: 74 3e je 110df0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 110db2: 52 push %edx 110db3: ff 75 c4 pushl -0x3c(%ebp) 110db6: ff 75 c0 pushl -0x40(%ebp) 110db9: 53 push %ebx 110dba: ff d0 call *%eax 110dbc: 83 c4 10 add $0x10,%esp } 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 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); 110dc8: e8 37 43 00 00 call 115104 <__errno> <== NOT EXECUTED 110dcd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 110dd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110dd8: eb e5 jmp 110dbf <== NOT EXECUTED 110dda: 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 ); 110ddc: e8 23 43 00 00 call 115104 <__errno> <== NOT EXECUTED 110de1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110de7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110dec: eb d1 jmp 110dbf <== NOT EXECUTED 110dee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 110df0: e8 0f 43 00 00 call 115104 <__errno> <== NOT EXECUTED 110df5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110dfb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110e00: eb bd jmp 110dbf <== 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 ); 110e02: e8 fd 42 00 00 call 115104 <__errno> 110e07: c7 00 15 00 00 00 movl $0x15,(%eax) 110e0d: b8 ff ff ff ff mov $0xffffffff,%eax 110e12: eb ab jmp 110dbf =============================================================================== 0010821c : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 10821c: 55 push %ebp 10821d: 89 e5 mov %esp,%ebp 10821f: 53 push %ebx rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 108220: 39 05 a4 bf 12 00 cmp %eax,0x12bfa4 108226: 77 08 ja 108230 <== ALWAYS TAKEN if (minor < dtab->size && dtab->minor != NULL) { rtems_disk_device *dd = dtab->minor [minor]; if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; 108228: 31 c0 xor %eax,%eax return dd; } } return NULL; } 10822a: 5b pop %ebx 10822b: c9 leave 10822c: c3 ret 10822d: 8d 76 00 lea 0x0(%esi),%esi rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 108230: 8b 1d a0 bf 12 00 mov 0x12bfa0,%ebx 108236: 85 db test %ebx,%ebx 108238: 74 ee je 108228 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 10823a: 8d 04 c3 lea (%ebx,%eax,8),%eax if (minor < dtab->size && dtab->minor != NULL) { 10823d: 39 50 04 cmp %edx,0x4(%eax) 108240: 76 e6 jbe 108228 <== NEVER TAKEN 108242: 8b 00 mov (%eax),%eax 108244: 85 c0 test %eax,%eax 108246: 74 e0 je 108228 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 108248: 8b 04 90 mov (%eax,%edx,4),%eax if (dd != NULL && !lookup_only) { 10824b: 85 c0 test %eax,%eax 10824d: 74 db je 10822a 10824f: 84 c9 test %cl,%cl 108251: 75 d7 jne 10822a if (!dd->deleted) { 108253: 80 78 30 00 cmpb $0x0,0x30(%eax) 108257: 75 cf jne 108228 ++dd->uses; 108259: ff 40 14 incl 0x14(%eax) 10825c: eb cc jmp 10822a =============================================================================== 0015daac : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 15daac: 55 push %ebp 15daad: 89 e5 mov %esp,%ebp 15daaf: 57 push %edi 15dab0: 56 push %esi 15dab1: 53 push %ebx 15dab2: 83 ec 2c sub $0x2c,%esp 15dab5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 15dab8: 3b 1d 4c d1 16 00 cmp 0x16d14c,%ebx 15dabe: 72 48 jb 15db08 <== ALWAYS TAKEN 15dac0: 31 db xor %ebx,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 15dac2: 8d 45 d4 lea -0x2c(%ebp),%eax 15dac5: 8d 73 18 lea 0x18(%ebx),%esi 15dac8: b9 05 00 00 00 mov $0x5,%ecx 15dacd: 89 c7 mov %eax,%edi 15dacf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 15dad1: 8b 55 e0 mov -0x20(%ebp),%edx 15dad4: 8b 52 10 mov 0x10(%edx),%edx 15dad7: 85 d2 test %edx,%edx 15dad9: 74 4d je 15db28 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 15dadb: 83 ec 0c sub $0xc,%esp 15dade: 50 push %eax 15dadf: ff d2 call *%edx 15dae1: 83 c4 10 add $0x10,%esp 15dae4: 48 dec %eax 15dae5: 75 2d jne 15db14 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 15dae7: 8b 43 3c mov 0x3c(%ebx),%eax 15daea: 8b 40 08 mov 0x8(%eax),%eax 15daed: 85 c0 test %eax,%eax 15daef: 74 37 je 15db28 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 15daf1: 52 push %edx 15daf2: ff 75 10 pushl 0x10(%ebp) 15daf5: ff 75 0c pushl 0xc(%ebp) 15daf8: 53 push %ebx 15daf9: ff d0 call *%eax 15dafb: 83 c4 10 add $0x10,%esp } 15dafe: 8d 65 f4 lea -0xc(%ebp),%esp 15db01: 5b pop %ebx 15db02: 5e pop %esi 15db03: 5f pop %edi 15db04: c9 leave 15db05: c3 ret 15db06: 66 90 xchg %ax,%ax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 15db08: c1 e3 06 shl $0x6,%ebx 15db0b: 03 1d dc 4d 17 00 add 0x174ddc,%ebx 15db11: eb af jmp 15dac2 15db13: 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 ); 15db14: e8 67 a0 fe ff call 147b80 <__errno> 15db19: c7 00 14 00 00 00 movl $0x14,(%eax) 15db1f: b8 ff ff ff ff mov $0xffffffff,%eax 15db24: eb d8 jmp 15dafe 15db26: 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 ); 15db28: e8 53 a0 fe ff call 147b80 <__errno> <== NOT EXECUTED 15db2d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 15db33: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 15db38: eb c4 jmp 15dafe <== NOT EXECUTED =============================================================================== 0012e844 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 12e844: 55 push %ebp <== NOT EXECUTED 12e845: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12e847: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED 12e84c: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 12e84f: c9 leave <== NOT EXECUTED 12e850: c3 ret <== NOT EXECUTED =============================================================================== 0012edf4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12edf4: 55 push %ebp 12edf5: 89 e5 mov %esp,%ebp 12edf7: 57 push %edi 12edf8: 56 push %esi 12edf9: 53 push %ebx 12edfa: 83 ec 1c sub $0x1c,%esp 12edfd: 89 c3 mov %eax,%ebx 12edff: 89 55 e4 mov %edx,-0x1c(%ebp) 12ee02: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12ee04: e8 af fe ff ff call 12ecb8 if ((fp = fopen("/etc/group", "r")) == NULL) { 12ee09: 83 ec 08 sub $0x8,%esp 12ee0c: 68 e9 1d 16 00 push $0x161de9 12ee11: 68 dc e1 15 00 push $0x15e1dc 12ee16: e8 c9 96 01 00 call 1484e4 12ee1b: 89 c7 mov %eax,%edi 12ee1d: 83 c4 10 add $0x10,%esp 12ee20: 85 c0 test %eax,%eax 12ee22: 75 22 jne 12ee46 <== ALWAYS TAKEN 12ee24: e9 8b 00 00 00 jmp 12eeb4 <== NOT EXECUTED 12ee29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 12ee2c: 83 ec 08 sub $0x8,%esp 12ee2f: 53 push %ebx 12ee30: ff 36 pushl (%esi) 12ee32: e8 f5 e5 01 00 call 14d42c 12ee37: 83 c4 10 add $0x10,%esp 12ee3a: 85 c0 test %eax,%eax 12ee3c: 0f 94 c0 sete %al 12ee3f: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 12ee42: 85 c0 test %eax,%eax 12ee44: 75 2e jne 12ee74 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 12ee46: 83 ec 0c sub $0xc,%esp 12ee49: ff 75 0c pushl 0xc(%ebp) 12ee4c: 8b 4d 08 mov 0x8(%ebp),%ecx 12ee4f: 89 f2 mov %esi,%edx 12ee51: 89 f8 mov %edi,%eax 12ee53: e8 d4 fb ff ff call 12ea2c 12ee58: 83 c4 10 add $0x10,%esp 12ee5b: 85 c0 test %eax,%eax 12ee5d: 74 31 je 12ee90 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12ee5f: 85 db test %ebx,%ebx 12ee61: 75 c9 jne 12ee2c <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 12ee63: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12ee67: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12ee6a: 0f 94 c0 sete %al <== NOT EXECUTED 12ee6d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12ee70: 85 c0 test %eax,%eax <== NOT EXECUTED 12ee72: 74 d2 je 12ee46 <== NOT EXECUTED fclose(fp); 12ee74: 83 ec 0c sub $0xc,%esp 12ee77: 57 push %edi 12ee78: e8 4f 8e 01 00 call 147ccc *result = grp; 12ee7d: 8b 45 10 mov 0x10(%ebp),%eax 12ee80: 89 30 mov %esi,(%eax) 12ee82: 31 c0 xor %eax,%eax return 0; 12ee84: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12ee87: 8d 65 f4 lea -0xc(%ebp),%esp 12ee8a: 5b pop %ebx 12ee8b: 5e pop %esi 12ee8c: 5f pop %edi 12ee8d: c9 leave 12ee8e: c3 ret 12ee8f: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 12ee90: e8 eb 8c 01 00 call 147b80 <__errno> <== NOT EXECUTED 12ee95: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12ee9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ee9e: 57 push %edi <== NOT EXECUTED 12ee9f: e8 28 8e 01 00 call 147ccc <== NOT EXECUTED 12eea4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12eea9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12eeac: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12eeaf: 5b pop %ebx <== NOT EXECUTED 12eeb0: 5e pop %esi <== NOT EXECUTED 12eeb1: 5f pop %edi <== NOT EXECUTED 12eeb2: c9 leave <== NOT EXECUTED 12eeb3: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 12eeb4: e8 c7 8c 01 00 call 147b80 <__errno> <== NOT EXECUTED 12eeb9: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12eebf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12eec2: eb c3 jmp 12ee87 <== NOT EXECUTED =============================================================================== 0012eb44 : return NULL; return p; } struct group *getgrent(void) { 12eb44: 55 push %ebp <== NOT EXECUTED 12eb45: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eb47: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 12eb4a: a1 c4 49 17 00 mov 0x1749c4,%eax <== NOT EXECUTED 12eb4f: 85 c0 test %eax,%eax <== NOT EXECUTED 12eb51: 75 05 jne 12eb58 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12eb53: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 12eb55: c9 leave <== NOT EXECUTED 12eb56: c3 ret <== NOT EXECUTED 12eb57: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12eb58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12eb5b: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12eb60: b9 e0 49 17 00 mov $0x1749e0,%ecx <== NOT EXECUTED 12eb65: ba a8 4a 17 00 mov $0x174aa8,%edx <== NOT EXECUTED 12eb6a: e8 bd fe ff ff call 12ea2c <== NOT EXECUTED 12eb6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12eb72: 85 c0 test %eax,%eax <== NOT EXECUTED 12eb74: 74 dd je 12eb53 <== NOT EXECUTED 12eb76: b8 a8 4a 17 00 mov $0x174aa8,%eax <== NOT EXECUTED return NULL; return &grent; } 12eb7b: c9 leave <== NOT EXECUTED 12eb7c: c3 ret <== NOT EXECUTED =============================================================================== 0012eef0 : } struct group *getgrgid( gid_t gid ) { 12eef0: 55 push %ebp <== NOT EXECUTED 12eef1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eef3: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12eef6: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12eef9: 50 push %eax <== NOT EXECUTED 12eefa: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12eeff: 68 e0 49 17 00 push $0x1749e0 <== NOT EXECUTED 12ef04: 68 a8 4a 17 00 push $0x174aa8 <== NOT EXECUTED 12ef09: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12ef0d: 50 push %eax <== NOT EXECUTED 12ef0e: e8 b1 ff ff ff call 12eec4 <== NOT EXECUTED 12ef13: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12ef16: 85 c0 test %eax,%eax <== NOT EXECUTED 12ef18: 75 06 jne 12ef20 <== NOT EXECUTED return NULL; return p; 12ef1a: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12ef1d: c9 leave <== NOT EXECUTED 12ef1e: c3 ret <== NOT EXECUTED 12ef1f: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 12ef20: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12ef22: c9 leave <== NOT EXECUTED 12ef23: c3 ret <== NOT EXECUTED =============================================================================== 0012eec4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 12eec4: 55 push %ebp <== NOT EXECUTED 12eec5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12eec7: 53 push %ebx <== NOT EXECUTED 12eec8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12eecb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12eece: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12eed1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12eed5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12eed8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12eedb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12eede: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12eee1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12eee4: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12eee6: 5b pop %ebx <== NOT EXECUTED 12eee7: 5b pop %ebx <== NOT EXECUTED 12eee8: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 12eee9: e9 06 ff ff ff jmp 12edf4 <== NOT EXECUTED =============================================================================== 0012ef50 : } struct group *getgrnam( const char *name ) { 12ef50: 55 push %ebp 12ef51: 89 e5 mov %esp,%ebp 12ef53: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12ef56: 8d 45 f4 lea -0xc(%ebp),%eax 12ef59: 50 push %eax 12ef5a: 68 c8 00 00 00 push $0xc8 12ef5f: 68 e0 49 17 00 push $0x1749e0 12ef64: 68 a8 4a 17 00 push $0x174aa8 12ef69: ff 75 08 pushl 0x8(%ebp) 12ef6c: e8 b3 ff ff ff call 12ef24 12ef71: 83 c4 20 add $0x20,%esp 12ef74: 85 c0 test %eax,%eax 12ef76: 75 08 jne 12ef80 <== NEVER TAKEN return NULL; return p; 12ef78: 8b 45 f4 mov -0xc(%ebp),%eax } 12ef7b: c9 leave 12ef7c: c3 ret 12ef7d: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 12ef80: 31 c0 xor %eax,%eax return NULL; return p; } 12ef82: c9 leave <== NOT EXECUTED 12ef83: c3 ret <== NOT EXECUTED =============================================================================== 0010b838 : int getitimer( int which, struct itimerval *value ) { 10b838: 55 push %ebp 10b839: 89 e5 mov %esp,%ebp 10b83b: 83 ec 08 sub $0x8,%esp if ( !value ) 10b83e: 8b 45 0c mov 0xc(%ebp),%eax 10b841: 85 c0 test %eax,%eax 10b843: 74 2f je 10b874 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b845: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b849: 76 15 jbe 10b860 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b84b: e8 d8 a0 00 00 call 115928 <__errno> 10b850: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b856: b8 ff ff ff ff mov $0xffffffff,%eax 10b85b: c9 leave 10b85c: c3 ret 10b85d: 8d 76 00 lea 0x0(%esi),%esi switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b860: e8 c3 a0 00 00 call 115928 <__errno> 10b865: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b86b: b8 ff ff ff ff mov $0xffffffff,%eax 10b870: c9 leave 10b871: c3 ret 10b872: 66 90 xchg %ax,%ax int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b874: e8 af a0 00 00 call 115928 <__errno> 10b879: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b87f: eb d5 jmp 10b856 =============================================================================== 0012efc0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12efc0: 55 push %ebp 12efc1: 89 e5 mov %esp,%ebp 12efc3: 57 push %edi 12efc4: 56 push %esi 12efc5: 53 push %ebx 12efc6: 83 ec 1c sub $0x1c,%esp 12efc9: 89 c3 mov %eax,%ebx 12efcb: 89 55 e4 mov %edx,-0x1c(%ebp) 12efce: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 12efd0: e8 e3 fc ff ff call 12ecb8 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 12efd5: 83 ec 08 sub $0x8,%esp 12efd8: 68 e9 1d 16 00 push $0x161de9 12efdd: 68 d0 e1 15 00 push $0x15e1d0 12efe2: e8 fd 94 01 00 call 1484e4 12efe7: 89 c7 mov %eax,%edi 12efe9: 83 c4 10 add $0x10,%esp 12efec: 85 c0 test %eax,%eax 12efee: 75 22 jne 12f012 <== ALWAYS TAKEN 12eff0: e9 8b 00 00 00 jmp 12f080 <== NOT EXECUTED 12eff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 12eff8: 83 ec 08 sub $0x8,%esp 12effb: 53 push %ebx 12effc: ff 36 pushl (%esi) 12effe: e8 29 e4 01 00 call 14d42c 12f003: 83 c4 10 add $0x10,%esp 12f006: 85 c0 test %eax,%eax 12f008: 0f 94 c0 sete %al 12f00b: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 12f00e: 85 c0 test %eax,%eax 12f010: 75 2e jne 12f040 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 12f012: 83 ec 0c sub $0xc,%esp 12f015: ff 75 0c pushl 0xc(%ebp) 12f018: 8b 4d 08 mov 0x8(%ebp),%ecx 12f01b: 89 f2 mov %esi,%edx 12f01d: 89 f8 mov %edi,%eax 12f01f: e8 5c fb ff ff call 12eb80 12f024: 83 c4 10 add $0x10,%esp 12f027: 85 c0 test %eax,%eax 12f029: 74 31 je 12f05c <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 12f02b: 85 db test %ebx,%ebx 12f02d: 75 c9 jne 12eff8 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 12f02f: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12f033: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12f036: 0f 94 c0 sete %al <== NOT EXECUTED 12f039: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 12f03c: 85 c0 test %eax,%eax <== NOT EXECUTED 12f03e: 74 d2 je 12f012 <== NOT EXECUTED fclose(fp); 12f040: 83 ec 0c sub $0xc,%esp 12f043: 57 push %edi 12f044: e8 83 8c 01 00 call 147ccc *result = pwd; 12f049: 8b 45 10 mov 0x10(%ebp),%eax 12f04c: 89 30 mov %esi,(%eax) 12f04e: 31 c0 xor %eax,%eax return 0; 12f050: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 12f053: 8d 65 f4 lea -0xc(%ebp),%esp 12f056: 5b pop %ebx 12f057: 5e pop %esi 12f058: 5f pop %edi 12f059: c9 leave 12f05a: c3 ret 12f05b: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 12f05c: e8 1f 8b 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f061: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 12f067: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f06a: 57 push %edi <== NOT EXECUTED 12f06b: e8 5c 8c 01 00 call 147ccc <== NOT EXECUTED 12f070: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 12f075: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 12f078: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f07b: 5b pop %ebx <== NOT EXECUTED 12f07c: 5e pop %esi <== NOT EXECUTED 12f07d: 5f pop %edi <== NOT EXECUTED 12f07e: c9 leave <== NOT EXECUTED 12f07f: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 12f080: e8 fb 8a 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f085: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12f08b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12f08e: eb c3 jmp 12f053 <== NOT EXECUTED =============================================================================== 0012ec7c : return NULL; return p; } struct passwd *getpwent(void) { 12ec7c: 55 push %ebp <== NOT EXECUTED 12ec7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12ec7f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 12ec82: a1 c4 48 17 00 mov 0x1748c4,%eax <== NOT EXECUTED 12ec87: 85 c0 test %eax,%eax <== NOT EXECUTED 12ec89: 75 05 jne 12ec90 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12ec8b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 12ec8d: c9 leave <== NOT EXECUTED 12ec8e: c3 ret <== NOT EXECUTED 12ec8f: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 12ec90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ec93: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12ec98: b9 e0 48 17 00 mov $0x1748e0,%ecx <== NOT EXECUTED 12ec9d: ba a8 49 17 00 mov $0x1749a8,%edx <== NOT EXECUTED 12eca2: e8 d9 fe ff ff call 12eb80 <== NOT EXECUTED 12eca7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12ecaa: 85 c0 test %eax,%eax <== NOT EXECUTED 12ecac: 74 dd je 12ec8b <== NOT EXECUTED 12ecae: b8 a8 49 17 00 mov $0x1749a8,%eax <== NOT EXECUTED return NULL; return &pwent; } 12ecb3: c9 leave <== NOT EXECUTED 12ecb4: c3 ret <== NOT EXECUTED =============================================================================== 0012f11c : } struct passwd *getpwnam( const char *name ) { 12f11c: 55 push %ebp 12f11d: 89 e5 mov %esp,%ebp 12f11f: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12f122: 8d 45 f4 lea -0xc(%ebp),%eax 12f125: 50 push %eax 12f126: 68 c8 00 00 00 push $0xc8 12f12b: 68 e0 48 17 00 push $0x1748e0 12f130: 68 a8 49 17 00 push $0x1749a8 12f135: ff 75 08 pushl 0x8(%ebp) 12f138: e8 b3 ff ff ff call 12f0f0 12f13d: 83 c4 20 add $0x20,%esp 12f140: 85 c0 test %eax,%eax 12f142: 75 08 jne 12f14c <== NEVER TAKEN return NULL; return p; 12f144: 8b 45 f4 mov -0xc(%ebp),%eax } 12f147: c9 leave 12f148: c3 ret 12f149: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 12f14c: 31 c0 xor %eax,%eax return NULL; return p; } 12f14e: c9 leave <== NOT EXECUTED 12f14f: c3 ret <== NOT EXECUTED =============================================================================== 0012f0bc : } struct passwd *getpwuid( uid_t uid ) { 12f0bc: 55 push %ebp <== NOT EXECUTED 12f0bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f0bf: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12f0c2: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12f0c5: 50 push %eax <== NOT EXECUTED 12f0c6: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 12f0cb: 68 e0 48 17 00 push $0x1748e0 <== NOT EXECUTED 12f0d0: 68 a8 49 17 00 push $0x1749a8 <== NOT EXECUTED 12f0d5: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12f0d9: 50 push %eax <== NOT EXECUTED 12f0da: e8 b1 ff ff ff call 12f090 <== NOT EXECUTED 12f0df: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12f0e2: 85 c0 test %eax,%eax <== NOT EXECUTED 12f0e4: 75 06 jne 12f0ec <== NOT EXECUTED return NULL; return p; 12f0e6: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12f0e9: c9 leave <== NOT EXECUTED 12f0ea: c3 ret <== NOT EXECUTED 12f0eb: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 12f0ec: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 12f0ee: c9 leave <== NOT EXECUTED 12f0ef: c3 ret <== NOT EXECUTED =============================================================================== 0012f090 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 12f090: 55 push %ebp <== NOT EXECUTED 12f091: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f093: 53 push %ebx <== NOT EXECUTED 12f094: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12f097: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 12f09a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12f09d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 12f0a1: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12f0a4: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12f0a7: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 12f0aa: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 12f0ad: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 12f0b0: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12f0b2: 5b pop %ebx <== NOT EXECUTED 12f0b3: 5b pop %ebx <== NOT EXECUTED 12f0b4: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12f0b5: e9 06 ff ff ff jmp 12efc0 <== NOT EXECUTED =============================================================================== 00108660 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 108660: 55 push %ebp 108661: 89 e5 mov %esp,%ebp 108663: 56 push %esi 108664: 53 push %ebx 108665: 83 ec 20 sub $0x20,%esp 108668: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10866b: 85 db test %ebx,%ebx 10866d: 74 42 je 1086b1 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10866f: 9c pushf 108670: fa cli 108671: 5e pop %esi _TOD_Get( &now ); 108672: 83 ec 0c sub $0xc,%esp 108675: 8d 45 f0 lea -0x10(%ebp),%eax 108678: 50 push %eax 108679: e8 fe 43 00 00 call 10ca7c <_TOD_Get> _ISR_Enable(level); 10867e: 56 push %esi 10867f: 9d popf useconds = (suseconds_t)now.tv_nsec; 108680: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 108683: 8b 45 f0 mov -0x10(%ebp),%eax 108686: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 108688: be d3 4d 62 10 mov $0x10624dd3,%esi 10868d: 89 c8 mov %ecx,%eax 10868f: f7 ee imul %esi 108691: 89 45 e0 mov %eax,-0x20(%ebp) 108694: 89 55 e4 mov %edx,-0x1c(%ebp) 108697: 8b 75 e4 mov -0x1c(%ebp),%esi 10869a: c1 fe 06 sar $0x6,%esi 10869d: 89 c8 mov %ecx,%eax 10869f: 99 cltd 1086a0: 29 d6 sub %edx,%esi 1086a2: 89 73 04 mov %esi,0x4(%ebx) 1086a5: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 1086a7: 83 c4 10 add $0x10,%esp } 1086aa: 8d 65 f8 lea -0x8(%ebp),%esp 1086ad: 5b pop %ebx 1086ae: 5e pop %esi 1086af: c9 leave 1086b0: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 1086b1: e8 4e ca 00 00 call 115104 <__errno> <== NOT EXECUTED 1086b6: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1086bc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 1086c1: eb e7 jmp 1086aa <== NOT EXECUTED =============================================================================== 0010e96c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10e96c: 55 push %ebp <== NOT EXECUTED 10e96d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e96f: a1 20 f3 16 00 mov 0x16f320,%eax <== NOT EXECUTED 10e974: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10e978: c9 leave <== NOT EXECUTED 10e979: c3 ret <== NOT EXECUTED =============================================================================== 00113c74 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113c74: 55 push %ebp 113c75: 89 e5 mov %esp,%ebp 113c77: 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; 113c7a: 8b 50 38 mov 0x38(%eax),%edx 113c7d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 113c81: 74 09 je 113c8c <== ALWAYS TAKEN 113c83: 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; } 113c88: c9 leave <== NOT EXECUTED 113c89: c3 ret <== NOT EXECUTED 113c8a: 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; 113c8c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 113c93: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 113c9a: 31 c0 xor %eax,%eax return 0; } 113c9c: c9 leave 113c9d: c3 ret =============================================================================== 00113eac : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113eac: 55 push %ebp 113ead: 89 e5 mov %esp,%ebp 113eaf: 57 push %edi 113eb0: 56 push %esi 113eb1: 53 push %ebx 113eb2: 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; 113eb8: 8b 55 08 mov 0x8(%ebp),%edx 113ebb: 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)); 113ebe: 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; 113ec1: 83 c0 54 add $0x54,%eax 113ec4: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 113eca: 39 c3 cmp %eax,%ebx 113ecc: 0f 84 2a 01 00 00 je 113ffc /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 113ed2: 8b 45 08 mov 0x8(%ebp),%eax 113ed5: 8b 40 0c mov 0xc(%eax),%eax 113ed8: 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); 113ede: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 113ee3: 8b 45 10 mov 0x10(%ebp),%eax 113ee6: f7 e2 mul %edx 113ee8: c1 ea 08 shr $0x8,%edx 113eeb: 89 d0 mov %edx,%eax 113eed: c1 e0 04 shl $0x4,%eax 113ef0: c1 e2 08 shl $0x8,%edx 113ef3: 8d 14 10 lea (%eax,%edx,1),%edx 113ef6: 03 95 d0 fe ff ff add -0x130(%ebp),%edx 113efc: 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 ( 113f02: 85 d2 test %edx,%edx 113f04: 0f 8e f2 00 00 00 jle 113ffc <== NEVER TAKEN 113f0a: 31 d2 xor %edx,%edx 113f0c: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 113f13: 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 ); 113f16: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 113f1c: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 113f22: eb 20 jmp 113f44 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 113f24: 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( 113f26: 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 ( 113f2c: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 113f32: 0f 8d b4 00 00 00 jge 113fec <== 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 ) ){ 113f38: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 113f3e: 0f 84 a8 00 00 00 je 113fec /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 113f44: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 113f4a: 7f d8 jg 113f24 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 113f4c: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 113f52: 89 d0 mov %edx,%eax 113f54: c1 f8 1f sar $0x1f,%eax 113f57: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 113f5d: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 113f64: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 113f66: 8b 43 38 mov 0x38(%ebx),%eax 113f69: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 113f6f: 8d 73 0c lea 0xc(%ebx),%esi 113f72: 31 c0 xor %eax,%eax 113f74: b9 ff ff ff ff mov $0xffffffff,%ecx 113f79: 89 f7 mov %esi,%edi 113f7b: f2 ae repnz scas %es:(%edi),%al 113f7d: f7 d1 not %ecx 113f7f: 49 dec %ecx 113f80: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 113f87: 83 ec 08 sub $0x8,%esp 113f8a: 56 push %esi 113f8b: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 113f91: 50 push %eax 113f92: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 113f98: e8 87 1c 00 00 call 115c24 memcpy( 113f9d: 8b 45 0c mov 0xc(%ebp),%eax 113fa0: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 113fa6: b9 44 00 00 00 mov $0x44,%ecx 113fab: 89 c7 mov %eax,%edi 113fad: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 113fb3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 113fb5: 8b 45 08 mov 0x8(%ebp),%eax 113fb8: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 113fbf: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 113fc3: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 113fca: 01 00 00 113fcd: 83 c4 10 add $0x10,%esp 113fd0: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 113fd6: 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( 113fd8: 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 ( 113fde: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 113fe4: 0f 8c 4e ff ff ff jl 113f38 <== NEVER TAKEN 113fea: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 113fec: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 113ff2: 8d 65 f4 lea -0xc(%ebp),%esp 113ff5: 5b pop %ebx 113ff6: 5e pop %esi 113ff7: 5f pop %edi 113ff8: c9 leave 113ff9: c3 ret 113ffa: 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 ( 113ffc: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 114003: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 114006: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 11400c: 8d 65 f4 lea -0xc(%ebp),%esp 11400f: 5b pop %ebx 114010: 5e pop %esi 114011: 5f pop %edi 114012: c9 leave 114013: c3 ret =============================================================================== 00113dd0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 113dd0: 55 push %ebp 113dd1: 89 e5 mov %esp,%ebp 113dd3: 56 push %esi 113dd4: 53 push %ebx 113dd5: 83 ec 10 sub $0x10,%esp 113dd8: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 113ddb: 8b 1e mov (%esi),%ebx 113ddd: 8d 43 54 lea 0x54(%ebx),%eax 113de0: 39 43 50 cmp %eax,0x50(%ebx) 113de3: 0f 85 8f 00 00 00 jne 113e78 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 113de9: 8b 46 10 mov 0x10(%esi),%eax 113dec: 3b 58 1c cmp 0x1c(%eax),%ebx 113def: 0f 84 97 00 00 00 je 113e8c /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 113df5: 8b 43 5c mov 0x5c(%ebx),%eax 113df8: 85 c0 test %eax,%eax 113dfa: 0f 85 8c 00 00 00 jne 113e8c <== NEVER TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 113e00: 8b 4b 08 mov 0x8(%ebx),%ecx 113e03: 85 c9 test %ecx,%ecx 113e05: 74 13 je 113e1a 113e07: 83 ec 0c sub $0xc,%esp 113e0a: 53 push %ebx 113e0b: e8 e8 87 ff ff call 10c5f8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 113e10: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 113e17: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 113e1a: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 113e1e: 83 ec 08 sub $0x8,%esp 113e21: 6a 00 push $0x0 113e23: 8d 45 f0 lea -0x10(%ebp),%eax 113e26: 50 push %eax 113e27: e8 34 48 ff ff call 108660 113e2c: 8b 45 f0 mov -0x10(%ebp),%eax 113e2f: 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) ) { 113e32: 89 1c 24 mov %ebx,(%esp) 113e35: e8 52 d0 ff ff call 110e8c 113e3a: 83 c4 10 add $0x10,%esp 113e3d: 85 c0 test %eax,%eax 113e3f: 75 2b jne 113e6c 113e41: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 113e46: 75 24 jne 113e6c /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 113e48: a1 24 70 12 00 mov 0x127024,%eax 113e4d: 8b 50 04 mov 0x4(%eax),%edx 113e50: 3b 16 cmp (%esi),%edx 113e52: 74 4c je 113ea0 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 113e54: 83 ec 0c sub $0xc,%esp 113e57: 53 push %ebx 113e58: e8 87 47 ff ff call 1085e4 113e5d: 31 c0 xor %eax,%eax 113e5f: 83 c4 10 add $0x10,%esp } return 0; } 113e62: 8d 65 f8 lea -0x8(%ebp),%esp 113e65: 5b pop %ebx 113e66: 5e pop %esi 113e67: c9 leave 113e68: c3 ret 113e69: 8d 76 00 lea 0x0(%esi),%esi /* * Free memory associated with a memory file. */ free( the_jnode ); 113e6c: 31 c0 xor %eax,%eax } return 0; } 113e6e: 8d 65 f8 lea -0x8(%ebp),%esp 113e71: 5b pop %ebx 113e72: 5e pop %esi 113e73: c9 leave 113e74: c3 ret 113e75: 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 ); 113e78: e8 87 12 00 00 call 115104 <__errno> 113e7d: c7 00 5a 00 00 00 movl $0x5a,(%eax) 113e83: b8 ff ff ff ff mov $0xffffffff,%eax 113e88: eb e4 jmp 113e6e 113e8a: 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 ); 113e8c: e8 73 12 00 00 call 115104 <__errno> 113e91: c7 00 10 00 00 00 movl $0x10,(%eax) 113e97: b8 ff ff ff ff mov $0xffffffff,%eax 113e9c: eb d0 jmp 113e6e 113e9e: 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; 113ea0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 113ea7: eb ab jmp 113e54 <== NOT EXECUTED =============================================================================== 0012ecb8 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 12ecb8: 55 push %ebp 12ecb9: 89 e5 mov %esp,%ebp 12ecbb: 53 push %ebx 12ecbc: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 12ecbf: 80 3d c0 48 17 00 00 cmpb $0x0,0x1748c0 12ecc6: 74 08 je 12ecd0 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 12ecc8: 8b 5d fc mov -0x4(%ebp),%ebx 12eccb: c9 leave 12eccc: c3 ret 12eccd: 8d 76 00 lea 0x0(%esi),%esi FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 12ecd0: c6 05 c0 48 17 00 01 movb $0x1,0x1748c0 mkdir("/etc", 0777); 12ecd7: 83 ec 08 sub $0x8,%esp 12ecda: 68 ff 01 00 00 push $0x1ff 12ecdf: 68 ba e1 15 00 push $0x15e1ba 12ece4: e8 87 02 fe ff call 10ef70 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 12ece9: 59 pop %ecx 12ecea: 5b pop %ebx 12eceb: 68 e9 1d 16 00 push $0x161de9 12ecf0: 68 d0 e1 15 00 push $0x15e1d0 12ecf5: e8 ea 97 01 00 call 1484e4 12ecfa: 83 c4 10 add $0x10,%esp 12ecfd: 85 c0 test %eax,%eax 12ecff: 74 77 je 12ed78 <== ALWAYS TAKEN fclose(fp); 12ed01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ed04: 50 push %eax <== NOT EXECUTED 12ed05: e8 c2 8f 01 00 call 147ccc <== NOT EXECUTED 12ed0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12ed0d: 83 ec 08 sub $0x8,%esp 12ed10: 68 e9 1d 16 00 push $0x161de9 12ed15: 68 dc e1 15 00 push $0x15e1dc 12ed1a: e8 c5 97 01 00 call 1484e4 12ed1f: 83 c4 10 add $0x10,%esp 12ed22: 85 c0 test %eax,%eax 12ed24: 74 12 je 12ed38 <== ALWAYS TAKEN fclose(fp); 12ed26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12ed29: 50 push %eax <== NOT EXECUTED 12ed2a: e8 9d 8f 01 00 call 147ccc <== NOT EXECUTED 12ed2f: 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); } } 12ed32: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 12ed35: c9 leave <== NOT EXECUTED 12ed36: c3 ret <== NOT EXECUTED 12ed37: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 12ed38: 83 ec 08 sub $0x8,%esp 12ed3b: 68 70 19 16 00 push $0x161970 12ed40: 68 dc e1 15 00 push $0x15e1dc 12ed45: e8 9a 97 01 00 call 1484e4 12ed4a: 89 c3 mov %eax,%ebx 12ed4c: 83 c4 10 add $0x10,%esp 12ed4f: 85 c0 test %eax,%eax 12ed51: 0f 84 71 ff ff ff je 12ecc8 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 12ed57: 50 push %eax 12ed58: 6a 2a push $0x2a 12ed5a: 6a 01 push $0x1 12ed5c: 68 0c 5c 16 00 push $0x165c0c 12ed61: e8 fa a9 01 00 call 149760 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 12ed66: 89 1c 24 mov %ebx,(%esp) 12ed69: e8 5e 8f 01 00 call 147ccc 12ed6e: 83 c4 10 add $0x10,%esp 12ed71: e9 52 ff ff ff jmp 12ecc8 12ed76: 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) { 12ed78: 83 ec 08 sub $0x8,%esp 12ed7b: 68 70 19 16 00 push $0x161970 12ed80: 68 d0 e1 15 00 push $0x15e1d0 12ed85: e8 5a 97 01 00 call 1484e4 12ed8a: 89 c3 mov %eax,%ebx 12ed8c: 83 c4 10 add $0x10,%esp 12ed8f: 85 c0 test %eax,%eax 12ed91: 0f 84 76 ff ff ff je 12ed0d <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 12ed97: 50 push %eax 12ed98: 6a 66 push $0x66 12ed9a: 6a 01 push $0x1 12ed9c: 68 a4 5b 16 00 push $0x165ba4 12eda1: e8 ba a9 01 00 call 149760 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 12eda6: 89 1c 24 mov %ebx,(%esp) 12eda9: e8 1e 8f 01 00 call 147ccc 12edae: 83 c4 10 add $0x10,%esp 12edb1: e9 57 ff ff ff jmp 12ed0d =============================================================================== 0010b868 : int ioctl( int fd, ioctl_command_t command, ... ) { 10b868: 55 push %ebp 10b869: 89 e5 mov %esp,%ebp 10b86b: 83 ec 08 sub $0x8,%esp 10b86e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10b871: 3b 05 4c 81 12 00 cmp 0x12814c,%eax 10b877: 73 2f jae 10b8a8 iop = rtems_libio_iop( fd ); 10b879: c1 e0 06 shl $0x6,%eax 10b87c: 03 05 c0 c3 12 00 add 0x12c3c0,%eax rtems_libio_check_is_open(iop); 10b882: f6 40 15 01 testb $0x1,0x15(%eax) 10b886: 74 20 je 10b8a8 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b888: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b88b: 8b 50 3c mov 0x3c(%eax),%edx 10b88e: 85 d2 test %edx,%edx 10b890: 74 16 je 10b8a8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b892: 8b 52 10 mov 0x10(%edx),%edx 10b895: 85 d2 test %edx,%edx 10b897: 74 21 je 10b8ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b899: 83 ec 04 sub $0x4,%esp 10b89c: 51 push %ecx 10b89d: ff 75 0c pushl 0xc(%ebp) 10b8a0: 50 push %eax 10b8a1: ff d2 call *%edx return rc; 10b8a3: 83 c4 10 add $0x10,%esp } 10b8a6: c9 leave 10b8a7: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b8a8: e8 6b d6 00 00 call 118f18 <__errno> 10b8ad: c7 00 09 00 00 00 movl $0x9,(%eax) 10b8b3: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b8b8: c9 leave 10b8b9: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b8ba: e8 59 d6 00 00 call 118f18 <__errno> <== NOT EXECUTED 10b8bf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b8c5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b8ca: c9 leave <== NOT EXECUTED 10b8cb: c3 ret <== NOT EXECUTED =============================================================================== 0010a0c8 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 10a0c8: 55 push %ebp <== NOT EXECUTED 10a0c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a0cb: 56 push %esi <== NOT EXECUTED 10a0cc: 53 push %ebx <== NOT EXECUTED 10a0cd: 89 d6 mov %edx,%esi <== NOT EXECUTED 10a0cf: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10a0d1: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10a0d4: a8 20 test $0x20,%al <== NOT EXECUTED 10a0d6: 74 03 je 10a0db <== NOT EXECUTED c &= 0x7f; 10a0d8: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 10a0db: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10a0de: 74 18 je 10a0f8 <== NOT EXECUTED c = tolower (c); 10a0e0: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 10a0e3: 8b 15 24 71 12 00 mov 0x127124,%edx <== NOT EXECUTED 10a0e9: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 10a0ee: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10a0f1: 4a dec %edx <== NOT EXECUTED 10a0f2: 0f 84 98 00 00 00 je 10a190 <== NOT EXECUTED if (c == '\r') { 10a0f8: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 10a0fb: 74 33 je 10a130 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a0fd: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a100: 0f 84 82 00 00 00 je 10a188 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a106: 84 db test %bl,%bl <== NOT EXECUTED 10a108: 75 3a jne 10a144 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 10a10a: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a10d: 8b 15 14 70 12 00 mov 0x127014,%edx <== NOT EXECUTED 10a113: 4a dec %edx <== NOT EXECUTED 10a114: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a116: 7d 1c jge 10a134 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a118: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 10a11c: 75 7a jne 10a198 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a11e: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a121: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a124: 40 inc %eax <== NOT EXECUTED 10a125: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a128: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a12a: 5b pop %ebx <== NOT EXECUTED 10a12b: 5e pop %esi <== NOT EXECUTED 10a12c: c9 leave <== NOT EXECUTED 10a12d: c3 ret <== NOT EXECUTED 10a12e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 10a130: 84 c0 test %al,%al <== NOT EXECUTED 10a132: 79 08 jns 10a13c <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a134: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a136: 5b pop %ebx <== NOT EXECUTED 10a137: 5e pop %esi <== NOT EXECUTED 10a138: c9 leave <== NOT EXECUTED 10a139: c3 ret <== NOT EXECUTED 10a13a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 10a13c: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a13f: 74 03 je 10a144 <== NOT EXECUTED 10a141: b3 0a mov $0xa,%bl <== NOT EXECUTED 10a143: 90 nop <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a144: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 10a147: a8 02 test $0x2,%al <== NOT EXECUTED 10a149: 74 bf je 10a10a <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 10a14b: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 10a14e: 0f 84 a0 00 00 00 je 10a1f4 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10a154: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 10a157: 74 5f je 10a1b8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 10a159: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 10a15c: 74 20 je 10a17e <== NOT EXECUTED return 1; } else if (c == '\n') { 10a15e: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a161: 74 69 je 10a1cc <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 10a163: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 10a166: 74 05 je 10a16d <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 10a168: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 10a16b: 75 9d jne 10a10a <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a16d: a8 08 test $0x8,%al <== NOT EXECUTED 10a16f: 75 3b jne 10a1ac <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a171: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a174: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a177: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a17a: 40 inc %eax <== NOT EXECUTED 10a17b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a17e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a183: eb a5 jmp 10a12a <== NOT EXECUTED 10a185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a188: a8 40 test $0x40,%al <== NOT EXECUTED 10a18a: 74 b8 je 10a144 <== NOT EXECUTED 10a18c: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a18e: eb b4 jmp 10a144 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a190: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 10a193: e9 60 ff ff ff jmp 10a0f8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a198: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a19b: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a19d: e8 f6 fc ff ff call 109e98 <== NOT EXECUTED 10a1a2: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a1a5: e9 74 ff ff ff jmp 10a11e <== NOT EXECUTED 10a1aa: 66 90 xchg %ax,%ax <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a1ac: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a1af: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1b1: e8 e2 fc ff ff call 109e98 <== NOT EXECUTED 10a1b6: eb b9 jmp 10a171 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 10a1b8: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 10a1bd: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1bf: e8 38 fd ff ff call 109efc <== NOT EXECUTED 10a1c4: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a1c6: e9 5f ff ff ff jmp 10a12a <== NOT EXECUTED 10a1cb: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10a1cc: a8 48 test $0x48,%al <== NOT EXECUTED 10a1ce: 74 0c je 10a1dc <== NOT EXECUTED echo (c, tty); 10a1d0: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1d2: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a1d7: e8 bc fc ff ff call 109e98 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 10a1dc: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a1df: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a1e2: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 10a1e6: 40 inc %eax <== NOT EXECUTED 10a1e7: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a1ea: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a1ef: e9 36 ff ff ff jmp 10a12a <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a1f4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a1f6: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1f8: e8 ff fc ff ff call 109efc <== NOT EXECUTED 10a1fd: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a1ff: e9 26 ff ff ff jmp 10a12a <== NOT EXECUTED =============================================================================== 00114460 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 114460: 55 push %ebp 114461: 89 e5 mov %esp,%ebp 114463: 57 push %edi 114464: 56 push %esi 114465: 53 push %ebx 114466: 83 ec 3c sub $0x3c,%esp 114469: 8b 75 0c mov 0xc(%ebp),%esi 11446c: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 11446f: e8 c0 c9 ff ff call 110e34 114474: 3b 45 08 cmp 0x8(%ebp),%eax 114477: 0f 85 2f 02 00 00 jne 1146ac <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 11447d: 85 f6 test %esi,%esi 11447f: 0f 84 3c 02 00 00 je 1146c1 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 114485: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 114488: 83 f9 1f cmp $0x1f,%ecx 11448b: 0f 87 30 02 00 00 ja 1146c1 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 114491: 8d 04 76 lea (%esi,%esi,2),%eax 114494: 83 3c 85 e8 99 12 00 cmpl $0x1,0x1299e8(,%eax,4) 11449b: 01 11449c: 0f 84 cf 00 00 00 je 114571 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 1144a2: 83 fe 08 cmp $0x8,%esi 1144a5: 0f 84 d1 00 00 00 je 11457c 1144ab: 83 fe 04 cmp $0x4,%esi 1144ae: 0f 84 c8 00 00 00 je 11457c 1144b4: 83 fe 0b cmp $0xb,%esi 1144b7: 0f 84 bf 00 00 00 je 11457c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1144bd: bb 01 00 00 00 mov $0x1,%ebx 1144c2: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1144c4: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 1144c7: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 1144ce: 85 ff test %edi,%edi 1144d0: 0f 84 ca 01 00 00 je 1146a0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 1144d6: 8b 07 mov (%edi),%eax 1144d8: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1144db: a1 f8 93 12 00 mov 0x1293f8,%eax 1144e0: 40 inc %eax 1144e1: a3 f8 93 12 00 mov %eax,0x1293f8 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 1144e6: 8b 0d b8 94 12 00 mov 0x1294b8,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1144ec: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 1144f2: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1144f8: f7 d0 not %eax 1144fa: 85 c3 test %eax,%ebx 1144fc: 75 34 jne 114532 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1144fe: a1 80 9b 12 00 mov 0x129b80,%eax 114503: 3d 84 9b 12 00 cmp $0x129b84,%eax 114508: 75 1b jne 114525 11450a: e9 89 00 00 00 jmp 114598 11450f: 90 nop /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 114510: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx 114516: f7 d2 not %edx 114518: 85 d3 test %edx,%ebx 11451a: 75 16 jne 114532 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 11451c: 8b 00 mov (%eax),%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11451e: 3d 84 9b 12 00 cmp $0x129b84,%eax 114523: 74 73 je 114598 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 114525: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 114527: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 11452d: 85 58 30 test %ebx,0x30(%eax) 114530: 74 de je 114510 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 114532: c6 41 74 01 movb $0x1,0x74(%ecx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 114536: 50 push %eax 114537: 8d 45 dc lea -0x24(%ebp),%eax 11453a: 50 push %eax 11453b: 56 push %esi 11453c: 51 push %ecx 11453d: e8 6e 03 00 00 call 1148b0 <_POSIX_signals_Unblock_thread> 114542: 83 c4 10 add $0x10,%esp 114545: 84 c0 test %al,%al 114547: 0f 85 47 01 00 00 jne 114694 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 11454d: 83 ec 0c sub $0xc,%esp 114550: 53 push %ebx 114551: e8 36 03 00 00 call 11488c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 114556: 8d 1c 76 lea (%esi,%esi,2),%ebx 114559: c1 e3 02 shl $0x2,%ebx 11455c: 83 c4 10 add $0x10,%esp 11455f: 83 bb e0 99 12 00 02 cmpl $0x2,0x1299e0(%ebx) 114566: 0f 84 ec 00 00 00 je 114658 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 11456c: e8 fb 96 ff ff call 10dc6c <_Thread_Enable_dispatch> 114571: 31 c0 xor %eax,%eax return 0; } 114573: 8d 65 f4 lea -0xc(%ebp),%esp 114576: 5b pop %ebx 114577: 5e pop %esi 114578: 5f pop %edi 114579: c9 leave 11457a: c3 ret 11457b: 90 nop * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 11457c: e8 1f 06 00 00 call 114ba0 114581: 83 ec 08 sub $0x8,%esp 114584: 56 push %esi 114585: 50 push %eax 114586: e8 55 05 00 00 call 114ae0 11458b: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 11458e: 8d 65 f4 lea -0xc(%ebp),%esp 114591: 5b pop %ebx 114592: 5e pop %esi 114593: 5f pop %edi 114594: c9 leave 114595: c3 ret 114596: 66 90 xchg %ax,%ax * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 114598: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax 11459f: 40 inc %eax 1145a0: 89 45 d4 mov %eax,-0x2c(%ebp) 1145a3: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1145aa: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 1145b1: 89 5d cc mov %ebx,-0x34(%ebp) 1145b4: 89 75 c0 mov %esi,-0x40(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1145b7: 8b 55 d0 mov -0x30(%ebp),%edx 1145ba: 8b 04 95 cc 93 12 00 mov 0x1293cc(,%edx,4),%eax 1145c1: 85 c0 test %eax,%eax 1145c3: 74 6c je 114631 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1145c5: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 1145c8: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 1145cc: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 1145cf: 85 f6 test %esi,%esi 1145d1: 74 5e je 114631 1145d3: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 1145d8: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 1145db: 85 d2 test %edx,%edx 1145dd: 74 4d je 11462c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 1145df: 8b 4a 14 mov 0x14(%edx),%ecx 1145e2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1145e5: 77 45 ja 11462c DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1145e7: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 1145ed: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx 1145f3: f7 d3 not %ebx 1145f5: 85 5d cc test %ebx,-0x34(%ebp) 1145f8: 74 32 je 11462c * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 1145fa: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1145fd: 72 25 jb 114624 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1145ff: 8b 5d c8 mov -0x38(%ebp),%ebx 114602: 8b 5b 10 mov 0x10(%ebx),%ebx 114605: 89 5d c4 mov %ebx,-0x3c(%ebp) 114608: 85 db test %ebx,%ebx 11460a: 74 20 je 11462c <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 11460c: 8b 5a 10 mov 0x10(%edx),%ebx 11460f: 85 db test %ebx,%ebx 114611: 74 11 je 114624 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 114613: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 11461a: 75 10 jne 11462c DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 11461c: 81 e3 00 00 00 10 and $0x10000000,%ebx 114622: 74 08 je 11462c 114624: 89 4d d4 mov %ecx,-0x2c(%ebp) 114627: 89 55 c8 mov %edx,-0x38(%ebp) 11462a: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11462c: 40 inc %eax 11462d: 39 c6 cmp %eax,%esi 11462f: 73 a7 jae 1145d8 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 114631: ff 45 d0 incl -0x30(%ebp) 114634: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 114638: 0f 85 79 ff ff ff jne 1145b7 11463e: 8b 5d cc mov -0x34(%ebp),%ebx 114641: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 114644: 8b 55 c8 mov -0x38(%ebp),%edx 114647: 85 d2 test %edx,%edx 114649: 0f 84 fe fe ff ff je 11454d 11464f: 8b 4d c8 mov -0x38(%ebp),%ecx 114652: e9 db fe ff ff jmp 114532 114657: 90 nop */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 114658: 83 ec 0c sub $0xc,%esp 11465b: 68 60 9b 12 00 push $0x129b60 114660: e8 ab 7f ff ff call 10c610 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 114665: 83 c4 10 add $0x10,%esp 114668: 85 c0 test %eax,%eax 11466a: 74 6a je 1146d6 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 11466c: 8d 78 08 lea 0x8(%eax),%edi 11466f: 8d 75 dc lea -0x24(%ebp),%esi 114672: b9 03 00 00 00 mov $0x3,%ecx 114677: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 114679: 83 ec 08 sub $0x8,%esp 11467c: 50 push %eax 11467d: 81 c3 00 9c 12 00 add $0x129c00,%ebx 114683: 53 push %ebx 114684: e8 4b 7f ff ff call 10c5d4 <_Chain_Append> 114689: 83 c4 10 add $0x10,%esp 11468c: e9 db fe ff ff jmp 11456c 114691: 8d 76 00 lea 0x0(%esi),%esi /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 114694: e8 d3 95 ff ff call 10dc6c <_Thread_Enable_dispatch> 114699: 31 c0 xor %eax,%eax return 0; 11469b: e9 ee fe ff ff jmp 11458e */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 1146a0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1146a7: e9 2f fe ff ff jmp 1144db /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 1146ac: e8 53 0a 00 00 call 115104 <__errno> <== NOT EXECUTED 1146b1: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED 1146b7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1146bc: e9 cd fe ff ff jmp 11458e <== NOT EXECUTED */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1146c1: e8 3e 0a 00 00 call 115104 <__errno> <== NOT EXECUTED 1146c6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1146cc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1146d1: e9 b8 fe ff ff jmp 11458e <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 1146d6: e8 91 95 ff ff call 10dc6c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1146db: e8 24 0a 00 00 call 115104 <__errno> 1146e0: c7 00 0b 00 00 00 movl $0xb,(%eax) 1146e6: 83 c8 ff or $0xffffffff,%eax 1146e9: e9 a0 fe ff ff jmp 11458e =============================================================================== 0012084c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 12084c: 55 push %ebp 12084d: 89 e5 mov %esp,%ebp 12084f: 53 push %ebx 120850: 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())) 120853: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0 12085a: 74 08 je 120864 */ fclose (stdin); fclose (stdout); fclose (stderr); } 12085c: 8b 5d fc mov -0x4(%ebp),%ebx 12085f: c9 leave 120860: c3 ret 120861: 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) { 120864: 8b 1d 80 39 12 00 mov 0x123980,%ebx 12086a: 39 1d 40 71 12 00 cmp %ebx,0x127140 120870: 74 12 je 120884 _wrapup_reent(_global_impure_ptr); 120872: 83 ec 0c sub $0xc,%esp 120875: 53 push %ebx 120876: e8 f5 04 00 00 call 120d70 <_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; 12087b: 89 1d 40 71 12 00 mov %ebx,0x127140 120881: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 120884: 83 ec 0c sub $0xc,%esp 120887: ff 73 04 pushl 0x4(%ebx) 12088a: e8 c1 49 ff ff call 115250 fclose (stdout); 12088f: 5a pop %edx 120890: a1 40 71 12 00 mov 0x127140,%eax 120895: ff 70 08 pushl 0x8(%eax) 120898: e8 b3 49 ff ff call 115250 fclose (stderr); 12089d: 58 pop %eax 12089e: a1 40 71 12 00 mov 0x127140,%eax 1208a3: ff 70 0c pushl 0xc(%eax) 1208a6: e8 a5 49 ff ff call 115250 1208ab: 83 c4 10 add $0x10,%esp } 1208ae: 8b 5d fc mov -0x4(%ebp),%ebx 1208b1: c9 leave 1208b2: c3 ret =============================================================================== 0012f150 : int link( const char *existing, const char *new ) { 12f150: 55 push %ebp 12f151: 89 e5 mov %esp,%ebp 12f153: 57 push %edi 12f154: 56 push %esi 12f155: 53 push %ebx 12f156: 83 ec 48 sub $0x48,%esp 12f159: 8b 55 08 mov 0x8(%ebp),%edx 12f15c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12f15f: 31 c0 xor %eax,%eax 12f161: b9 ff ff ff ff mov $0xffffffff,%ecx 12f166: 89 d7 mov %edx,%edi 12f168: f2 ae repnz scas %es:(%edi),%al 12f16a: f7 d1 not %ecx 12f16c: 49 dec %ecx 12f16d: 6a 01 push $0x1 12f16f: 8d 75 cc lea -0x34(%ebp),%esi 12f172: 56 push %esi 12f173: 6a 00 push $0x0 12f175: 51 push %ecx 12f176: 52 push %edx 12f177: e8 7c f6 fd ff call 10e7f8 0, &existing_loc, true ); if ( result != 0 ) 12f17c: 83 c4 20 add $0x20,%esp 12f17f: 85 c0 test %eax,%eax 12f181: 74 11 je 12f194 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 ); 12f183: bb ff ff ff ff mov $0xffffffff,%ebx rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 12f188: 89 d8 mov %ebx,%eax 12f18a: 8d 65 f4 lea -0xc(%ebp),%esp 12f18d: 5b pop %ebx 12f18e: 5e pop %esi 12f18f: 5f pop %edi 12f190: c9 leave 12f191: c3 ret 12f192: 66 90 xchg %ax,%ax /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 12f194: 57 push %edi 12f195: 8d 7d b8 lea -0x48(%ebp),%edi 12f198: 57 push %edi 12f199: 8d 45 e4 lea -0x1c(%ebp),%eax 12f19c: 50 push %eax 12f19d: 53 push %ebx 12f19e: e8 c5 0d fe ff call 10ff68 if ( !parent_loc.ops->evalformake_h ) { 12f1a3: 8b 45 c4 mov -0x3c(%ebp),%eax 12f1a6: 8b 40 04 mov 0x4(%eax),%eax 12f1a9: 83 c4 10 add $0x10,%esp 12f1ac: 85 c0 test %eax,%eax 12f1ae: 0f 84 e8 00 00 00 je 12f29c <== 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 ); 12f1b4: 51 push %ecx 12f1b5: 8d 55 e0 lea -0x20(%ebp),%edx 12f1b8: 52 push %edx 12f1b9: 57 push %edi 12f1ba: 03 5d e4 add -0x1c(%ebp),%ebx 12f1bd: 53 push %ebx 12f1be: ff d0 call *%eax 12f1c0: 89 c3 mov %eax,%ebx if ( result != 0 ) { 12f1c2: 83 c4 10 add $0x10,%esp 12f1c5: 85 c0 test %eax,%eax 12f1c7: 0f 85 a7 00 00 00 jne 12f274 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 12f1cd: 8b 45 c8 mov -0x38(%ebp),%eax 12f1d0: 3b 45 dc cmp -0x24(%ebp),%eax 12f1d3: 75 5b jne 12f230 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 12f1d5: 8b 55 c4 mov -0x3c(%ebp),%edx 12f1d8: 8b 42 08 mov 0x8(%edx),%eax 12f1db: 85 c0 test %eax,%eax 12f1dd: 0f 84 e0 00 00 00 je 12f2c3 <== 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 ); 12f1e3: 52 push %edx 12f1e4: ff 75 e0 pushl -0x20(%ebp) 12f1e7: 57 push %edi 12f1e8: 56 push %esi 12f1e9: ff d0 call *%eax 12f1eb: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &existing_loc ); 12f1ed: 8b 45 d8 mov -0x28(%ebp),%eax 12f1f0: 83 c4 10 add $0x10,%esp 12f1f3: 85 c0 test %eax,%eax 12f1f5: 74 10 je 12f207 <== NEVER TAKEN 12f1f7: 8b 40 1c mov 0x1c(%eax),%eax 12f1fa: 85 c0 test %eax,%eax 12f1fc: 74 09 je 12f207 <== NEVER TAKEN 12f1fe: 83 ec 0c sub $0xc,%esp 12f201: 56 push %esi 12f202: ff d0 call *%eax 12f204: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12f207: 8b 45 c4 mov -0x3c(%ebp),%eax 12f20a: 85 c0 test %eax,%eax 12f20c: 0f 84 76 ff ff ff je 12f188 <== NEVER TAKEN 12f212: 8b 40 1c mov 0x1c(%eax),%eax 12f215: 85 c0 test %eax,%eax 12f217: 0f 84 6b ff ff ff je 12f188 <== NEVER TAKEN 12f21d: 83 ec 0c sub $0xc,%esp 12f220: 57 push %edi 12f221: ff d0 call *%eax 12f223: 83 c4 10 add $0x10,%esp return result; } 12f226: 89 d8 mov %ebx,%eax 12f228: 8d 65 f4 lea -0xc(%ebp),%esp 12f22b: 5b pop %ebx 12f22c: 5e pop %esi 12f22d: 5f pop %edi 12f22e: c9 leave 12f22f: 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 ); 12f230: 8b 45 d8 mov -0x28(%ebp),%eax 12f233: 85 c0 test %eax,%eax 12f235: 74 10 je 12f247 <== NEVER TAKEN 12f237: 8b 40 1c mov 0x1c(%eax),%eax 12f23a: 85 c0 test %eax,%eax 12f23c: 74 09 je 12f247 <== NEVER TAKEN 12f23e: 83 ec 0c sub $0xc,%esp 12f241: 56 push %esi 12f242: ff d0 call *%eax 12f244: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 12f247: 8b 45 c4 mov -0x3c(%ebp),%eax 12f24a: 85 c0 test %eax,%eax 12f24c: 74 10 je 12f25e <== NEVER TAKEN 12f24e: 8b 40 1c mov 0x1c(%eax),%eax 12f251: 85 c0 test %eax,%eax 12f253: 74 09 je 12f25e <== NEVER TAKEN 12f255: 83 ec 0c sub $0xc,%esp 12f258: 57 push %edi 12f259: ff d0 call *%eax 12f25b: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 12f25e: e8 1d 89 01 00 call 147b80 <__errno> 12f263: c7 00 12 00 00 00 movl $0x12,(%eax) 12f269: bb ff ff ff ff mov $0xffffffff,%ebx 12f26e: e9 15 ff ff ff jmp 12f188 12f273: 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 ); 12f274: 8b 45 d8 mov -0x28(%ebp),%eax 12f277: 85 c0 test %eax,%eax 12f279: 74 10 je 12f28b <== NEVER TAKEN 12f27b: 8b 40 1c mov 0x1c(%eax),%eax 12f27e: 85 c0 test %eax,%eax 12f280: 74 09 je 12f28b <== NEVER TAKEN 12f282: 83 ec 0c sub $0xc,%esp 12f285: 56 push %esi 12f286: ff d0 call *%eax 12f288: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 12f28b: e8 f0 88 01 00 call 147b80 <__errno> 12f290: 89 18 mov %ebx,(%eax) 12f292: bb ff ff ff ff mov $0xffffffff,%ebx 12f297: e9 ec fe ff ff jmp 12f188 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 12f29c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12f29f: 85 c0 test %eax,%eax <== NOT EXECUTED 12f2a1: 74 10 je 12f2b3 <== NOT EXECUTED 12f2a3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f2a6: 85 c0 test %eax,%eax <== NOT EXECUTED 12f2a8: 74 09 je 12f2b3 <== NOT EXECUTED 12f2aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f2ad: 56 push %esi <== NOT EXECUTED 12f2ae: ff d0 call *%eax <== NOT EXECUTED 12f2b0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12f2b3: e8 c8 88 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f2b8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12f2be: e9 c0 fe ff ff jmp 12f183 <== 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 ); 12f2c3: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 12f2c6: 85 c0 test %eax,%eax <== NOT EXECUTED 12f2c8: 74 13 je 12f2dd <== NOT EXECUTED 12f2ca: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f2cd: 85 c0 test %eax,%eax <== NOT EXECUTED 12f2cf: 74 0c je 12f2dd <== NOT EXECUTED 12f2d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f2d4: 56 push %esi <== NOT EXECUTED 12f2d5: ff d0 call *%eax <== NOT EXECUTED 12f2d7: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 12f2da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 12f2dd: 85 d2 test %edx,%edx <== NOT EXECUTED 12f2df: 74 10 je 12f2f1 <== NOT EXECUTED 12f2e1: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 12f2e4: 85 c0 test %eax,%eax <== NOT EXECUTED 12f2e6: 74 09 je 12f2f1 <== NOT EXECUTED 12f2e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f2eb: 57 push %edi <== NOT EXECUTED 12f2ec: ff d0 call *%eax <== NOT EXECUTED 12f2ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12f2f1: e8 8a 88 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f2f6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12f2fc: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 12f301: e9 82 fe ff ff jmp 12f188 <== NOT EXECUTED =============================================================================== 00120704 : off_t lseek( int fd, off_t offset, int whence ) { 120704: 55 push %ebp 120705: 89 e5 mov %esp,%ebp 120707: 57 push %edi 120708: 56 push %esi 120709: 53 push %ebx 12070a: 83 ec 2c sub $0x2c,%esp 12070d: 8b 5d 08 mov 0x8(%ebp),%ebx 120710: 8b 75 0c mov 0xc(%ebp),%esi 120713: 8b 7d 10 mov 0x10(%ebp),%edi 120716: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 120719: 3b 1d 4c 51 12 00 cmp 0x12514c,%ebx 12071f: 0f 83 b7 00 00 00 jae 1207dc <== NEVER TAKEN iop = rtems_libio_iop( fd ); 120725: c1 e3 06 shl $0x6,%ebx 120728: 03 1d 80 92 12 00 add 0x129280,%ebx rtems_libio_check_is_open(iop); 12072e: f6 43 15 01 testb $0x1,0x15(%ebx) 120732: 0f 84 a4 00 00 00 je 1207dc <== NEVER TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 120738: 8b 53 3c mov 0x3c(%ebx),%edx 12073b: 89 55 d4 mov %edx,-0x2c(%ebp) 12073e: 8b 52 14 mov 0x14(%edx),%edx 120741: 85 d2 test %edx,%edx 120743: 0f 84 aa 00 00 00 je 1207f3 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 120749: 8b 53 0c mov 0xc(%ebx),%edx 12074c: 8b 4b 10 mov 0x10(%ebx),%ecx 12074f: 89 55 e0 mov %edx,-0x20(%ebp) 120752: 89 4d e4 mov %ecx,-0x1c(%ebp) switch ( whence ) { 120755: 83 f8 01 cmp $0x1,%eax 120758: 74 6e je 1207c8 12075a: 83 f8 02 cmp $0x2,%eax 12075d: 74 35 je 120794 12075f: 85 c0 test %eax,%eax 120761: 75 45 jne 1207a8 case SEEK_SET: iop->offset = offset; 120763: 89 73 0c mov %esi,0xc(%ebx) 120766: 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 ); 120769: 50 push %eax 12076a: 57 push %edi 12076b: 56 push %esi 12076c: 53 push %ebx 12076d: 8b 4d d4 mov -0x2c(%ebp),%ecx 120770: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 120773: 83 c4 10 add $0x10,%esp 120776: 89 c1 mov %eax,%ecx 120778: 21 d1 and %edx,%ecx 12077a: 41 inc %ecx 12077b: 75 0c jne 120789 iop->offset = old_offset; 12077d: 8b 75 e0 mov -0x20(%ebp),%esi 120780: 8b 7d e4 mov -0x1c(%ebp),%edi 120783: 89 73 0c mov %esi,0xc(%ebx) 120786: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 120789: 8d 65 f4 lea -0xc(%ebp),%esp 12078c: 5b pop %ebx 12078d: 5e pop %esi 12078e: 5f pop %edi 12078f: c9 leave 120790: c3 ret 120791: 8d 76 00 lea 0x0(%esi),%esi case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 120794: 89 f2 mov %esi,%edx 120796: 89 f9 mov %edi,%ecx 120798: 03 53 04 add 0x4(%ebx),%edx 12079b: 13 4b 08 adc 0x8(%ebx),%ecx 12079e: 89 53 0c mov %edx,0xc(%ebx) 1207a1: 89 4b 10 mov %ecx,0x10(%ebx) break; 1207a4: eb c3 jmp 120769 1207a6: 66 90 xchg %ax,%ax default: rtems_set_errno_and_return_minus_one( EINVAL ); 1207a8: e8 57 49 ff ff call 115104 <__errno> 1207ad: c7 00 16 00 00 00 movl $0x16,(%eax) 1207b3: b8 ff ff ff ff mov $0xffffffff,%eax 1207b8: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1207bd: 8d 65 f4 lea -0xc(%ebp),%esp 1207c0: 5b pop %ebx 1207c1: 5e pop %esi 1207c2: 5f pop %edi 1207c3: c9 leave 1207c4: c3 ret 1207c5: 8d 76 00 lea 0x0(%esi),%esi case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 1207c8: 8b 55 e0 mov -0x20(%ebp),%edx 1207cb: 8b 4d e4 mov -0x1c(%ebp),%ecx 1207ce: 01 f2 add %esi,%edx 1207d0: 11 f9 adc %edi,%ecx 1207d2: 89 53 0c mov %edx,0xc(%ebx) 1207d5: 89 4b 10 mov %ecx,0x10(%ebx) break; 1207d8: eb 8f jmp 120769 1207da: 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); 1207dc: e8 23 49 ff ff call 115104 <__errno> <== NOT EXECUTED 1207e1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1207e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1207ec: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 1207f1: eb 96 jmp 120789 <== 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 ); 1207f3: e8 0c 49 ff ff call 115104 <__errno> <== NOT EXECUTED 1207f8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1207fe: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120803: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 120808: e9 7c ff ff ff jmp 120789 <== NOT EXECUTED =============================================================================== 0012f454 : int _STAT_NAME( const char *path, struct stat *buf ) { 12f454: 55 push %ebp <== NOT EXECUTED 12f455: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12f457: 57 push %edi <== NOT EXECUTED 12f458: 56 push %esi <== NOT EXECUTED 12f459: 53 push %ebx <== NOT EXECUTED 12f45a: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 12f45d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 12f460: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 12f463: 85 f6 test %esi,%esi <== NOT EXECUTED 12f465: 0f 84 9d 00 00 00 je 12f508 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 12f46b: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 12f470: 89 d7 mov %edx,%edi <== NOT EXECUTED 12f472: 31 c0 xor %eax,%eax <== NOT EXECUTED 12f474: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 12f476: f7 d1 not %ecx <== NOT EXECUTED 12f478: 49 dec %ecx <== NOT EXECUTED 12f479: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f47c: 6a 00 push $0x0 <== NOT EXECUTED 12f47e: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 12f481: 53 push %ebx <== NOT EXECUTED 12f482: 6a 00 push $0x0 <== NOT EXECUTED 12f484: 51 push %ecx <== NOT EXECUTED 12f485: 52 push %edx <== NOT EXECUTED 12f486: e8 6d f3 fd ff call 10e7f8 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 12f48b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12f48e: 85 c0 test %eax,%eax <== NOT EXECUTED 12f490: 75 66 jne 12f4f8 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 12f492: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 12f495: 8b 42 18 mov 0x18(%edx),%eax <== NOT EXECUTED 12f498: 85 c0 test %eax,%eax <== NOT EXECUTED 12f49a: 74 39 je 12f4d5 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 12f49c: b9 48 00 00 00 mov $0x48,%ecx <== NOT EXECUTED 12f4a1: 89 f7 mov %esi,%edi <== NOT EXECUTED 12f4a3: 31 c0 xor %eax,%eax <== NOT EXECUTED 12f4a5: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 12f4a7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12f4aa: 56 push %esi <== NOT EXECUTED 12f4ab: 53 push %ebx <== NOT EXECUTED 12f4ac: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 12f4af: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 12f4b1: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12f4b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12f4b7: 85 c0 test %eax,%eax <== NOT EXECUTED 12f4b9: 74 10 je 12f4cb <== NOT EXECUTED 12f4bb: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f4be: 85 c0 test %eax,%eax <== NOT EXECUTED 12f4c0: 74 09 je 12f4cb <== NOT EXECUTED 12f4c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f4c5: 53 push %ebx <== NOT EXECUTED 12f4c6: ff d0 call *%eax <== NOT EXECUTED 12f4c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 12f4cb: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f4cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f4d0: 5b pop %ebx <== NOT EXECUTED 12f4d1: 5e pop %esi <== NOT EXECUTED 12f4d2: 5f pop %edi <== NOT EXECUTED 12f4d3: c9 leave <== NOT EXECUTED 12f4d4: c3 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 12f4d5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 12f4d8: 85 c0 test %eax,%eax <== NOT EXECUTED 12f4da: 74 10 je 12f4ec <== NOT EXECUTED 12f4dc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12f4df: 85 c0 test %eax,%eax <== NOT EXECUTED 12f4e1: 74 09 je 12f4ec <== NOT EXECUTED 12f4e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12f4e6: 53 push %ebx <== NOT EXECUTED 12f4e7: ff d0 call *%eax <== NOT EXECUTED 12f4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12f4ec: e8 8f 86 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f4f1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12f4f7: 90 nop <== NOT EXECUTED 12f4f8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12f4fd: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f4ff: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f502: 5b pop %ebx <== NOT EXECUTED 12f503: 5e pop %esi <== NOT EXECUTED 12f504: 5f pop %edi <== NOT EXECUTED 12f505: c9 leave <== NOT EXECUTED 12f506: c3 ret <== NOT EXECUTED 12f507: 90 nop <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 12f508: e8 73 86 01 00 call 147b80 <__errno> <== NOT EXECUTED 12f50d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 12f513: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 12f518: 89 f0 mov %esi,%eax <== NOT EXECUTED 12f51a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12f51d: 5b pop %ebx <== NOT EXECUTED 12f51e: 5e pop %esi <== NOT EXECUTED 12f51f: 5f pop %edi <== NOT EXECUTED 12f520: c9 leave <== NOT EXECUTED 12f521: c3 ret <== NOT EXECUTED =============================================================================== 001088bc : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 1088bc: 55 push %ebp 1088bd: 89 e5 mov %esp,%ebp 1088bf: 57 push %edi 1088c0: 56 push %esi 1088c1: 53 push %ebx 1088c2: 83 ec 0c sub $0xc,%esp 1088c5: 8b 75 08 mov 0x8(%ebp),%esi 1088c8: ff 05 a4 92 12 00 incl 0x1292a4 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1088ce: e8 11 ff ff ff call 1087e4 /* * Validate the parameters */ if ( !size ) 1088d3: 85 f6 test %esi,%esi 1088d5: 74 65 je 10893c <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1088d7: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0 1088de: 74 50 je 108930 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1088e0: 6a 00 push $0x0 1088e2: 6a 00 push $0x0 1088e4: 56 push %esi 1088e5: ff 35 58 51 12 00 pushl 0x125158 1088eb: e8 d0 4d 00 00 call 10d6c0 <_Protected_heap_Allocate_aligned_with_boundary> 1088f0: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1088f2: 83 c4 10 add $0x10,%esp 1088f5: 85 c0 test %eax,%eax 1088f7: 74 5b je 108954 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 1088f9: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1088fb: a1 50 76 12 00 mov 0x127650,%eax 108900: 85 c0 test %eax,%eax 108902: 74 0a je 10890e <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 108904: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108907: 56 push %esi <== NOT EXECUTED 108908: 57 push %edi <== NOT EXECUTED 108909: ff d0 call *%eax <== NOT EXECUTED 10890b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10890e: a1 48 76 12 00 mov 0x127648,%eax 108913: 85 c0 test %eax,%eax 108915: 74 31 je 108948 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 108917: 83 ec 0c sub $0xc,%esp 10891a: 57 push %edi 10891b: ff 50 04 call *0x4(%eax) 10891e: 89 fb mov %edi,%ebx 108920: 83 c4 10 add $0x10,%esp if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 108923: 89 d8 mov %ebx,%eax 108925: 8d 65 f4 lea -0xc(%ebp),%esp 108928: 5b pop %ebx 108929: 5e pop %esi 10892a: 5f pop %edi 10892b: c9 leave 10892c: c3 ret 10892d: 8d 76 00 lea 0x0(%esi),%esi return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 108930: e8 57 fe ff ff call 10878c 108935: 84 c0 test %al,%al 108937: 75 a7 jne 1088e0 <== ALWAYS TAKEN 108939: 8d 76 00 lea 0x0(%esi),%esi /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 10893c: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 10893e: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108940: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108943: 5b pop %ebx <== NOT EXECUTED 108944: 5e pop %esi <== NOT EXECUTED 108945: 5f pop %edi <== NOT EXECUTED 108946: c9 leave <== NOT EXECUTED 108947: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108948: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 10894a: 89 d8 mov %ebx,%eax 10894c: 8d 65 f4 lea -0xc(%ebp),%esp 10894f: 5b pop %ebx 108950: 5e pop %esi 108951: 5f pop %edi 108952: c9 leave 108953: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 108954: a1 4c 76 12 00 mov 0x12764c,%eax 108959: 85 c0 test %eax,%eax 10895b: 74 10 je 10896d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10895d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108960: 56 push %esi <== NOT EXECUTED 108961: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 108964: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 108966: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108969: 85 c0 test %eax,%eax <== NOT EXECUTED 10896b: 75 8e jne 1088fb <== NOT EXECUTED errno = ENOMEM; 10896d: e8 92 c7 00 00 call 115104 <__errno> 108972: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 108978: eb a9 jmp 108923 =============================================================================== 001087cc : } void malloc_deferred_free( void *pointer ) { 1087cc: 55 push %ebp <== NOT EXECUTED 1087cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1087cf: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1087d2: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1087d5: 68 8c 92 12 00 push $0x12928c <== NOT EXECUTED 1087da: e8 f5 3d 00 00 call 10c5d4 <_Chain_Append> <== NOT EXECUTED 1087df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 1087e2: c9 leave <== NOT EXECUTED 1087e3: c3 ret <== NOT EXECUTED =============================================================================== 001087e4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 1087e4: 55 push %ebp 1087e5: 89 e5 mov %esp,%ebp 1087e7: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1087ea: eb 0c jmp 1087f8 free(to_be_freed); 1087ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087ef: 50 push %eax <== NOT EXECUTED 1087f0: e8 ef fd ff ff call 1085e4 <== NOT EXECUTED 1087f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 1087f8: 83 ec 0c sub $0xc,%esp 1087fb: 68 8c 92 12 00 push $0x12928c 108800: e8 0b 3e 00 00 call 10c610 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 108805: 83 c4 10 add $0x10,%esp 108808: 85 c0 test %eax,%eax 10880a: 75 e0 jne 1087ec <== NEVER TAKEN free(to_be_freed); } 10880c: c9 leave 10880d: c3 ret =============================================================================== 0010878c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 10878c: 55 push %ebp 10878d: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 10878f: a1 f8 93 12 00 mov 0x1293f8,%eax 108794: 85 c0 test %eax,%eax 108796: 75 0c jne 1087a4 <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 108798: a1 94 94 12 00 mov 0x129494,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 10879d: 85 c0 test %eax,%eax 10879f: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 1087a2: c9 leave 1087a3: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 1087a4: 31 c0 xor %eax,%eax if ( _ISR_Nest_level > 0 ) return false; return true; } 1087a6: c9 leave <== NOT EXECUTED 1087a7: c3 ret <== NOT EXECUTED =============================================================================== 00112b00 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 112b00: 55 push %ebp 112b01: 89 e5 mov %esp,%ebp 112b03: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 112b06: ff 35 38 8f 12 00 pushl 0x128f38 112b0c: 6a 01 push $0x1 112b0e: e8 b9 58 ff ff call 1083cc if ( memory ) 112b13: 83 c4 10 add $0x10,%esp 112b16: 85 c0 test %eax,%eax 112b18: 74 06 je 112b20 <== NEVER TAKEN memfile_blocks_allocated++; 112b1a: ff 05 4c 90 12 00 incl 0x12904c return memory; } 112b20: c9 leave 112b21: c3 ret =============================================================================== 00112f74 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 112f74: 55 push %ebp 112f75: 89 e5 mov %esp,%ebp 112f77: 53 push %ebx 112f78: 83 ec 10 sub $0x10,%esp 112f7b: 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) ) { 112f7e: 53 push %ebx 112f7f: e8 08 df ff ff call 110e8c 112f84: 83 c4 10 add $0x10,%esp 112f87: 85 c0 test %eax,%eax 112f89: 75 2f jne 112fba 112f8b: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 112f90: 75 28 jne 112fba <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 112f92: a1 24 70 12 00 mov 0x127024,%eax 112f97: 39 58 04 cmp %ebx,0x4(%eax) 112f9a: 74 28 je 112fc4 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 112f9c: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 112fa0: 74 0c je 112fae <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 112fa2: 83 ec 0c sub $0xc,%esp 112fa5: 53 push %ebx 112fa6: e8 21 fe ff ff call 112dcc 112fab: 83 c4 10 add $0x10,%esp free( the_jnode ); 112fae: 83 ec 0c sub $0xc,%esp 112fb1: 53 push %ebx 112fb2: e8 2d 56 ff ff call 1085e4 112fb7: 83 c4 10 add $0x10,%esp } return 0; } 112fba: 31 c0 xor %eax,%eax 112fbc: 8b 5d fc mov -0x4(%ebp),%ebx 112fbf: c9 leave 112fc0: c3 ret 112fc1: 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; 112fc4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 112fcb: eb cf jmp 112f9c <== NOT EXECUTED =============================================================================== 00112d04 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 112d04: 55 push %ebp 112d05: 89 e5 mov %esp,%ebp 112d07: 57 push %edi 112d08: 56 push %esi 112d09: 53 push %ebx 112d0a: 83 ec 0c sub $0xc,%esp 112d0d: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 112d10: 8b 45 08 mov 0x8(%ebp),%eax 112d13: 85 c0 test %eax,%eax 112d15: 74 4e je 112d65 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 112d17: 8b 45 08 mov 0x8(%ebp),%eax 112d1a: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 112d20: 31 db xor %ebx,%ebx 112d22: 66 90 xchg %ax,%ax if ( b[i] ) { 112d24: 8b 04 9e mov (%esi,%ebx,4),%eax 112d27: 85 c0 test %eax,%eax 112d29: 74 13 je 112d3e memfile_free_block( b[i] ); 112d2b: 83 ec 0c sub $0xc,%esp 112d2e: 50 push %eax 112d2f: e8 b0 fd ff ff call 112ae4 b[i] = 0; 112d34: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 112d3b: 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 112d43: 8b 45 08 mov 0x8(%ebp),%eax 112d46: 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 ); 112d48: 83 ec 0c sub $0xc,%esp 112d4b: 56 push %esi 112d4c: e8 93 fd ff ff call 112ae4 *block_table = 0; 112d51: 8b 45 08 mov 0x8(%ebp),%eax 112d54: c7 00 00 00 00 00 movl $0x0,(%eax) 112d5a: 83 c4 10 add $0x10,%esp } 112d5d: 8d 65 f4 lea -0xc(%ebp),%esp 112d60: 5b pop %ebx 112d61: 5e pop %esi 112d62: 5f pop %edi 112d63: c9 leave 112d64: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 112d65: 68 16 34 12 00 push $0x123416 <== NOT EXECUTED 112d6a: 68 50 35 12 00 push $0x123550 <== NOT EXECUTED 112d6f: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 112d74: 68 38 34 12 00 push $0x123438 <== NOT EXECUTED 112d79: e8 26 55 ff ff call 1082a4 <__assert_func> <== NOT EXECUTED =============================================================================== 00113228 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 113228: 55 push %ebp 113229: 89 e5 mov %esp,%ebp 11322b: 53 push %ebx 11322c: 83 ec 14 sub $0x14,%esp 11322f: 8b 4d 08 mov 0x8(%ebp),%ecx 113232: 8b 45 0c mov 0xc(%ebp),%eax 113235: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113238: 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 ) 11323b: 39 53 54 cmp %edx,0x54(%ebx) 11323e: 7f 19 jg 113259 <== NEVER TAKEN 113240: 7d 12 jge 113254 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 113242: 51 push %ecx <== NOT EXECUTED 113243: 52 push %edx <== NOT EXECUTED 113244: 50 push %eax <== NOT EXECUTED 113245: 53 push %ebx <== NOT EXECUTED 113246: e8 79 fe ff ff call 1130c4 <== NOT EXECUTED 11324b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 11324e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113251: c9 leave <== NOT EXECUTED 113252: c3 ret <== NOT EXECUTED 113253: 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 ) 113254: 39 43 50 cmp %eax,0x50(%ebx) 113257: 72 e9 jb 113242 <== 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; 113259: 89 43 50 mov %eax,0x50(%ebx) 11325c: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 11325f: 89 41 04 mov %eax,0x4(%ecx) 113262: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 113265: 83 ec 08 sub $0x8,%esp 113268: 6a 00 push $0x0 11326a: 8d 45 f0 lea -0x10(%ebp),%eax 11326d: 50 push %eax 11326e: e8 ed 53 ff ff call 108660 113273: 8b 45 f0 mov -0x10(%ebp),%eax 113276: 89 43 40 mov %eax,0x40(%ebx) 113279: 31 c0 xor %eax,%eax return 0; 11327b: 83 c4 10 add $0x10,%esp } 11327e: 8b 5d fc mov -0x4(%ebp),%ebx 113281: c9 leave 113282: c3 ret =============================================================================== 00113284 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 113284: 55 push %ebp 113285: 89 e5 mov %esp,%ebp 113287: 57 push %edi 113288: 56 push %esi 113289: 53 push %ebx 11328a: 83 ec 0c sub $0xc,%esp 11328d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113290: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 113293: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 113297: 74 2f je 1132c8 <== 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 )) 113299: 57 push %edi 11329a: ff 73 10 pushl 0x10(%ebx) 11329d: ff 73 0c pushl 0xc(%ebx) 1132a0: 56 push %esi 1132a1: e8 1e fe ff ff call 1130c4 1132a6: 83 c4 10 add $0x10,%esp 1132a9: 85 c0 test %eax,%eax 1132ab: 75 4d jne 1132fa <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 1132ad: 8b 46 50 mov 0x50(%esi),%eax 1132b0: 8b 56 54 mov 0x54(%esi),%edx 1132b3: 89 43 04 mov %eax,0x4(%ebx) 1132b6: 89 53 08 mov %edx,0x8(%ebx) 1132b9: 8b 43 0c mov 0xc(%ebx),%eax 1132bc: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 1132bf: 8d 65 f4 lea -0xc(%ebp),%esp 1132c2: 5b pop %ebx 1132c3: 5e pop %esi 1132c4: 5f pop %edi 1132c5: c9 leave 1132c6: c3 ret 1132c7: 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) 1132c8: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 1132cb: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 1132ce: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 1132d1: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 1132d4: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1132d6: 7f 14 jg 1132ec <== NOT EXECUTED 1132d8: 7d 0e jge 1132e8 <== NOT EXECUTED 1132da: 89 f8 mov %edi,%eax <== NOT EXECUTED 1132dc: 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; } 1132de: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1132e1: 5b pop %ebx <== NOT EXECUTED 1132e2: 5e pop %esi <== NOT EXECUTED 1132e3: 5f pop %edi <== NOT EXECUTED 1132e4: c9 leave <== NOT EXECUTED 1132e5: c3 ret <== NOT EXECUTED 1132e6: 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) 1132e8: 39 c7 cmp %eax,%edi <== NOT EXECUTED 1132ea: 76 ee jbe 1132da <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1132ec: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 1132ef: 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; } 1132f2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1132f5: 5b pop %ebx <== NOT EXECUTED 1132f6: 5e pop %esi <== NOT EXECUTED 1132f7: 5f pop %edi <== NOT EXECUTED 1132f8: c9 leave <== NOT EXECUTED 1132f9: 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 ); 1132fa: e8 05 1e 00 00 call 115104 <__errno> <== NOT EXECUTED 1132ff: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 113305: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11330a: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 11330f: eb ae jmp 1132bf <== NOT EXECUTED =============================================================================== 001135a0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1135a0: 55 push %ebp 1135a1: 89 e5 mov %esp,%ebp 1135a3: 56 push %esi 1135a4: 53 push %ebx 1135a5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1135a8: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1135ab: 8b 43 14 mov 0x14(%ebx),%eax 1135ae: a9 04 02 00 00 test $0x204,%eax 1135b3: 74 06 je 1135bb && (the_jnode->type == IMFS_LINEAR_FILE)) { 1135b5: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1135b9: 74 2d je 1135e8 <== 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) 1135bb: 8b 56 50 mov 0x50(%esi),%edx 1135be: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1135c1: f6 c4 02 test $0x2,%ah 1135c4: 75 12 jne 1135d8 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 1135c6: 89 53 04 mov %edx,0x4(%ebx) 1135c9: 89 4b 08 mov %ecx,0x8(%ebx) 1135cc: 31 c0 xor %eax,%eax return 0; } 1135ce: 8d 65 f8 lea -0x8(%ebp),%esp 1135d1: 5b pop %ebx 1135d2: 5e pop %esi 1135d3: c9 leave 1135d4: c3 ret 1135d5: 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; 1135d8: 89 53 0c mov %edx,0xc(%ebx) 1135db: 89 4b 10 mov %ecx,0x10(%ebx) 1135de: 8b 56 50 mov 0x50(%esi),%edx 1135e1: 8b 4e 54 mov 0x54(%esi),%ecx 1135e4: eb e0 jmp 1135c6 1135e6: 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; 1135e8: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1135eb: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 1135ee: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 1135f5: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 1135fc: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 113603: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11360a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 113611: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 113618: 85 c0 test %eax,%eax <== NOT EXECUTED 11361a: 75 09 jne 113625 <== NOT EXECUTED 11361c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11361f: 31 d2 xor %edx,%edx <== NOT EXECUTED 113621: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 113623: eb 9c jmp 1135c1 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 113625: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113628: 50 push %eax <== NOT EXECUTED 113629: 52 push %edx <== NOT EXECUTED 11362a: 6a 00 push $0x0 <== NOT EXECUTED 11362c: 6a 00 push $0x0 <== NOT EXECUTED 11362e: 56 push %esi <== NOT EXECUTED 11362f: e8 e0 fc ff ff call 113314 <== 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) 113634: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 113637: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 11363a: 74 92 je 1135ce <== NOT EXECUTED 11363c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11363f: e9 77 ff ff ff jmp 1135bb <== NOT EXECUTED =============================================================================== 00112fd0 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 112fd0: 55 push %ebp 112fd1: 89 e5 mov %esp,%ebp 112fd3: 53 push %ebx 112fd4: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 112fd7: 8b 45 0c mov 0xc(%ebp),%eax 112fda: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 112fdc: 8b 4b 08 mov 0x8(%ebx),%ecx 112fdf: 85 c9 test %ecx,%ecx 112fe1: 74 13 je 112ff6 <== NEVER TAKEN 112fe3: 83 ec 0c sub $0xc,%esp 112fe6: 53 push %ebx 112fe7: e8 0c 96 ff ff call 10c5f8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 112fec: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112ff3: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 112ff6: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 112ffa: 83 ec 08 sub $0x8,%esp 112ffd: 6a 00 push $0x0 112fff: 8d 45 f0 lea -0x10(%ebp),%eax 113002: 50 push %eax 113003: e8 58 56 ff ff call 108660 113008: 8b 45 f0 mov -0x10(%ebp),%eax 11300b: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 11300e: 89 1c 24 mov %ebx,(%esp) 113011: e8 5e ff ff ff call 112f74 } 113016: 8b 5d fc mov -0x4(%ebp),%ebx 113019: c9 leave 11301a: c3 ret =============================================================================== 00108998 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 108998: 55 push %ebp 108999: 89 e5 mov %esp,%ebp 10899b: 57 push %edi 10899c: 56 push %esi 10899d: 53 push %ebx 10899e: 83 ec 2c sub $0x2c,%esp 1089a1: 8b 75 10 mov 0x10(%ebp),%esi 1089a4: 8b 7d 14 mov 0x14(%ebp),%edi int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 1089a7: 8b 45 0c mov 0xc(%ebp),%eax 1089aa: 25 00 f0 00 00 and $0xf000,%eax 1089af: 3d 00 40 00 00 cmp $0x4000,%eax 1089b4: 74 32 je 1089e8 1089b6: 76 20 jbe 1089d8 1089b8: 3d 00 60 00 00 cmp $0x6000,%eax 1089bd: 74 29 je 1089e8 1089bf: 3d 00 80 00 00 cmp $0x8000,%eax 1089c4: 74 22 je 1089e8 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1089c6: e8 39 c7 00 00 call 115104 <__errno> <== NOT EXECUTED 1089cb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1089d1: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1089d6: eb 78 jmp 108a50 <== NOT EXECUTED int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 1089d8: 3d 00 10 00 00 cmp $0x1000,%eax 1089dd: 74 09 je 1089e8 1089df: 3d 00 20 00 00 cmp $0x2000,%eax 1089e4: 75 e0 jne 1089c6 <== NEVER TAKEN 1089e6: 66 90 xchg %ax,%ax break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1089e8: 51 push %ecx 1089e9: 8d 5d cc lea -0x34(%ebp),%ebx 1089ec: 53 push %ebx 1089ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1089f0: 50 push %eax 1089f1: ff 75 08 pushl 0x8(%ebp) 1089f4: e8 4f 0a 00 00 call 109448 if ( !temp_loc.ops->evalformake_h ) { 1089f9: 8b 45 d8 mov -0x28(%ebp),%eax 1089fc: 8b 40 04 mov 0x4(%eax),%eax 1089ff: 83 c4 10 add $0x10,%esp 108a02: 85 c0 test %eax,%eax 108a04: 74 66 je 108a6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 108a06: 52 push %edx 108a07: 8d 55 e0 lea -0x20(%ebp),%edx 108a0a: 52 push %edx 108a0b: 53 push %ebx 108a0c: 8b 55 08 mov 0x8(%ebp),%edx 108a0f: 03 55 e4 add -0x1c(%ebp),%edx 108a12: 52 push %edx 108a13: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108a15: 83 c4 10 add $0x10,%esp 108a18: 85 c0 test %eax,%eax 108a1a: 75 5b jne 108a77 return -1; if ( !temp_loc.ops->mknod_h ) { 108a1c: 8b 55 d8 mov -0x28(%ebp),%edx 108a1f: 8b 42 14 mov 0x14(%edx),%eax 108a22: 85 c0 test %eax,%eax 108a24: 74 34 je 108a5a <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 108a26: 83 ec 0c sub $0xc,%esp 108a29: 53 push %ebx 108a2a: 57 push %edi 108a2b: 56 push %esi 108a2c: ff 75 0c pushl 0xc(%ebp) 108a2f: ff 75 e0 pushl -0x20(%ebp) 108a32: ff d0 call *%eax 108a34: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 108a36: 8b 45 d8 mov -0x28(%ebp),%eax 108a39: 83 c4 20 add $0x20,%esp 108a3c: 85 c0 test %eax,%eax 108a3e: 74 10 je 108a50 <== NEVER TAKEN 108a40: 8b 40 1c mov 0x1c(%eax),%eax 108a43: 85 c0 test %eax,%eax 108a45: 74 09 je 108a50 108a47: 83 ec 0c sub $0xc,%esp 108a4a: 53 push %ebx 108a4b: ff d0 call *%eax 108a4d: 83 c4 10 add $0x10,%esp return result; } 108a50: 89 f0 mov %esi,%eax 108a52: 8d 65 f4 lea -0xc(%ebp),%esp 108a55: 5b pop %ebx 108a56: 5e pop %esi 108a57: 5f pop %edi 108a58: c9 leave 108a59: c3 ret ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 108a5a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 108a5d: 85 c0 test %eax,%eax <== NOT EXECUTED 108a5f: 74 0b je 108a6c <== NOT EXECUTED 108a61: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a64: 53 push %ebx <== NOT EXECUTED 108a65: ff d0 call *%eax <== NOT EXECUTED 108a67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 108a6c: e8 93 c6 00 00 call 115104 <__errno> <== NOT EXECUTED 108a71: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108a77: be ff ff ff ff mov $0xffffffff,%esi result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108a7c: 89 f0 mov %esi,%eax 108a7e: 8d 65 f4 lea -0xc(%ebp),%esp 108a81: 5b pop %ebx 108a82: 5e pop %esi 108a83: 5f pop %edi 108a84: c9 leave 108a85: c3 ret =============================================================================== 00108b0c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 57 push %edi 108b10: 56 push %esi 108b11: 53 push %ebx 108b12: 83 ec 4c sub $0x4c,%esp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108b15: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108b19: 0f 87 61 02 00 00 ja 108d80 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 108b1f: 83 ec 0c sub $0xc,%esp 108b22: ff 75 10 pushl 0x10(%ebp) 108b25: e8 da 86 00 00 call 111204 108b2a: 89 45 c0 mov %eax,-0x40(%ebp) if ( !mount_h ) 108b2d: 83 c4 10 add $0x10,%esp 108b30: 85 c0 test %eax,%eax 108b32: 0f 84 48 02 00 00 je 108d80 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 108b38: 8b 5d 0c mov 0xc(%ebp),%ebx 108b3b: 85 db test %ebx,%ebx const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108b3d: 0f 95 45 bf setne -0x41(%ebp) 108b41: 0f 84 25 02 00 00 je 108d6c * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 108b47: 31 c0 xor %eax,%eax 108b49: b9 ff ff ff ff mov $0xffffffff,%ecx 108b4e: 8b 7d 0c mov 0xc(%ebp),%edi 108b51: f2 ae repnz scas %es:(%edi),%al 108b53: f7 d1 not %ecx 108b55: 49 dec %ecx 108b56: 89 4d b8 mov %ecx,-0x48(%ebp) 108b59: 8b 45 0c mov 0xc(%ebp),%eax 108b5c: 89 45 b4 mov %eax,-0x4c(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 108b5f: ba ff ff ff ff mov $0xffffffff,%edx 108b64: 31 c0 xor %eax,%eax 108b66: 89 d1 mov %edx,%ecx 108b68: 8b 7d 10 mov 0x10(%ebp),%edi 108b6b: f2 ae repnz scas %es:(%edi),%al 108b6d: f7 d1 not %ecx 108b6f: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108b72: 8b 4d 08 mov 0x8(%ebp),%ecx 108b75: 85 c9 test %ecx,%ecx 108b77: 0f 84 e7 01 00 00 je 108d64 108b7d: 89 d1 mov %edx,%ecx 108b7f: 8b 7d 08 mov 0x8(%ebp),%edi 108b82: f2 ae repnz scas %es:(%edi),%al 108b84: 89 ce mov %ecx,%esi 108b86: f7 d6 not %esi size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 108b88: 83 ec 08 sub $0x8,%esp 108b8b: 8b 4d b8 mov -0x48(%ebp),%ecx 108b8e: 8b 55 c4 mov -0x3c(%ebp),%edx 108b91: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 108b95: 01 f0 add %esi,%eax 108b97: 50 push %eax 108b98: 6a 01 push $0x1 108b9a: e8 2d f8 ff ff call 1083cc 108b9f: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 108ba1: 83 c4 10 add $0x10,%esp 108ba4: 85 c0 test %eax,%eax 108ba6: 0f 84 a0 01 00 00 je 108d4c <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 108bac: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 108baf: 83 ec 08 sub $0x8,%esp 108bb2: ff 75 10 pushl 0x10(%ebp) 108bb5: 57 push %edi 108bb6: e8 69 d0 00 00 call 115c24 mt_entry->type = str; 108bbb: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 108bbe: 03 7d c4 add -0x3c(%ebp),%edi if ( source_or_null != NULL ) { 108bc1: 83 c4 10 add $0x10,%esp 108bc4: 8b 45 08 mov 0x8(%ebp),%eax 108bc7: 85 c0 test %eax,%eax 108bc9: 74 14 je 108bdf strcpy( str, source_or_null ); 108bcb: 83 ec 08 sub $0x8,%esp 108bce: ff 75 08 pushl 0x8(%ebp) 108bd1: 57 push %edi 108bd2: e8 4d d0 00 00 call 115c24 mt_entry->dev = str; 108bd7: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 108bda: 01 f7 add %esi,%edi 108bdc: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 108bdf: 83 ec 08 sub $0x8,%esp 108be2: ff 75 b4 pushl -0x4c(%ebp) 108be5: 57 push %edi 108be6: e8 39 d0 00 00 call 115c24 mt_entry->target = str; 108beb: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 108bee: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108bf1: 8b 45 14 mov 0x14(%ebp),%eax 108bf4: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 108bf7: 8d 7b 38 lea 0x38(%ebx),%edi 108bfa: be 00 2b 12 00 mov $0x122b00,%esi 108bff: b9 0c 00 00 00 mov $0xc,%ecx 108c04: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 108c06: 83 c4 10 add $0x10,%esp 108c09: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108c0d: 75 7d jne 108c8c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108c0f: 81 3d 04 70 12 00 08 cmpl $0x127008,0x127004 108c16: 70 12 00 108c19: 0f 85 a9 01 00 00 jne 108dc8 <== NEVER TAKEN 108c1f: 31 f6 xor %esi,%esi * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 108c21: 83 ec 08 sub $0x8,%esp 108c24: ff 75 18 pushl 0x18(%ebp) 108c27: 53 push %ebx 108c28: ff 55 c0 call *-0x40(%ebp) 108c2b: 83 c4 10 add $0x10,%esp 108c2e: 85 c0 test %eax,%eax 108c30: 0f 85 62 01 00 00 jne 108d98 <== NEVER TAKEN rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 108c36: 56 push %esi 108c37: 6a 00 push $0x0 108c39: 6a 00 push $0x0 108c3b: ff 35 88 92 12 00 pushl 0x129288 108c41: e8 9e 30 00 00 call 10bce4 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108c46: 5a pop %edx 108c47: 59 pop %ecx 108c48: 53 push %ebx 108c49: 68 04 70 12 00 push $0x127004 108c4e: e8 81 39 00 00 call 10c5d4 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108c53: 58 pop %eax 108c54: ff 35 88 92 12 00 pushl 0x129288 108c5a: e8 81 31 00 00 call 10bde0 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108c5f: 83 c4 10 add $0x10,%esp 108c62: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108c66: 74 0c je 108c74 rtems_filesystem_root = mt_entry->mt_fs_root; 108c68: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108c6a: 8d 65 f4 lea -0xc(%ebp),%esp 108c6d: 5b pop %ebx 108c6e: 5e pop %esi 108c6f: 5f pop %edi 108c70: c9 leave 108c71: c3 ret 108c72: 66 90 xchg %ax,%ax rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 108c74: 8b 3d 24 70 12 00 mov 0x127024,%edi 108c7a: 83 c7 18 add $0x18,%edi 108c7d: 8d 73 1c lea 0x1c(%ebx),%esi 108c80: b9 05 00 00 00 mov $0x5,%ecx 108c85: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108c87: eb df jmp 108c68 108c89: 8d 76 00 lea 0x0(%esi),%esi * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 108c8c: 83 ec 0c sub $0xc,%esp 108c8f: 6a 01 push $0x1 108c91: 8d 75 d4 lea -0x2c(%ebp),%esi 108c94: 56 push %esi 108c95: 6a 07 push $0x7 108c97: ff 75 b8 pushl -0x48(%ebp) 108c9a: ff 75 0c pushl 0xc(%ebp) 108c9d: e8 d2 f8 ff ff call 108574 108ca2: 83 c4 20 add $0x20,%esp 108ca5: 40 inc %eax 108ca6: 0f 84 27 01 00 00 je 108dd3 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 108cac: 8b 45 e0 mov -0x20(%ebp),%eax 108caf: 8b 40 10 mov 0x10(%eax),%eax 108cb2: 85 c0 test %eax,%eax 108cb4: 0f 84 52 01 00 00 je 108e0c <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 108cba: 83 ec 0c sub $0xc,%esp 108cbd: 56 push %esi 108cbe: ff d0 call *%eax 108cc0: 83 c4 10 add $0x10,%esp 108cc3: 48 dec %eax 108cc4: 0f 85 22 01 00 00 jne 108dec /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 108cca: 83 ec 08 sub $0x8,%esp 108ccd: ff 75 d4 pushl -0x2c(%ebp) 108cd0: 68 88 8a 10 00 push $0x108a88 108cd5: e8 c2 fd ff ff call 108a9c 108cda: 83 c4 10 add $0x10,%esp 108cdd: 84 c0 test %al,%al 108cdf: 0f 85 17 01 00 00 jne 108dfc * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 108ce5: 8b 45 d4 mov -0x2c(%ebp),%eax 108ce8: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108ceb: 8b 45 dc mov -0x24(%ebp),%eax 108cee: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 108cf1: 8b 45 e0 mov -0x20(%ebp),%eax 108cf4: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108cf7: 8b 55 e4 mov -0x1c(%ebp),%edx 108cfa: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 108cfd: 8b 40 20 mov 0x20(%eax),%eax 108d00: 85 c0 test %eax,%eax 108d02: 0f 84 04 01 00 00 je 108e0c <== NEVER TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 108d08: 83 ec 0c sub $0xc,%esp 108d0b: 53 push %ebx 108d0c: ff d0 call *%eax 108d0e: 83 c4 10 add $0x10,%esp 108d11: 85 c0 test %eax,%eax 108d13: 0f 84 08 ff ff ff je 108c21 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 108d19: 83 ec 0c sub $0xc,%esp 108d1c: 53 push %ebx 108d1d: e8 c2 f8 ff ff call 1085e4 108d22: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108d25: 8b 46 0c mov 0xc(%esi),%eax 108d28: 85 c0 test %eax,%eax 108d2a: 0f 84 8f 00 00 00 je 108dbf <== NEVER TAKEN 108d30: 8b 40 1c mov 0x1c(%eax),%eax 108d33: 85 c0 test %eax,%eax 108d35: 0f 84 84 00 00 00 je 108dbf <== NEVER TAKEN 108d3b: 83 ec 0c sub $0xc,%esp 108d3e: 56 push %esi 108d3f: ff d0 call *%eax 108d41: 83 c8 ff or $0xffffffff,%eax 108d44: 83 c4 10 add $0x10,%esp 108d47: e9 1e ff ff ff jmp 108c6a target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108d4c: e8 b3 c3 00 00 call 115104 <__errno> <== NOT EXECUTED 108d51: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108d57: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5f: 5b pop %ebx <== NOT EXECUTED 108d60: 5e pop %esi <== NOT EXECUTED 108d61: 5f pop %edi <== NOT EXECUTED 108d62: c9 leave <== NOT EXECUTED 108d63: c3 ret <== NOT EXECUTED ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108d64: 31 f6 xor %esi,%esi 108d66: e9 1d fe ff ff jmp 108b88 108d6b: 90 nop const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108d6c: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp) 108d73: c7 45 b4 a7 2a 12 00 movl $0x122aa7,-0x4c(%ebp) 108d7a: e9 e0 fd ff ff jmp 108b5f 108d7f: 90 nop /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 108d80: e8 7f c3 00 00 call 115104 <__errno> 108d85: c7 00 16 00 00 00 movl $0x16,(%eax) 108d8b: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d90: 8d 65 f4 lea -0xc(%ebp),%esp 108d93: 5b pop %ebx 108d94: 5e pop %esi 108d95: 5f pop %edi 108d96: c9 leave 108d97: c3 ret if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 108d98: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108d9b: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 108d9e: 85 c0 test %eax,%eax <== NOT EXECUTED 108da0: 74 09 je 108dab <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 108da2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108da5: 53 push %ebx <== NOT EXECUTED 108da6: ff d0 call *%eax <== NOT EXECUTED 108da8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108dab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108dae: 53 push %ebx <== NOT EXECUTED 108daf: e8 30 f8 ff ff call 1085e4 <== NOT EXECUTED if ( loc_to_free ) 108db4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108db7: 85 f6 test %esi,%esi <== NOT EXECUTED 108db9: 0f 85 66 ff ff ff jne 108d25 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 108dbf: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108dc2: e9 a3 fe ff ff jmp 108c6a <== NOT EXECUTED 108dc7: 90 nop <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 108dc8: e8 37 c3 00 00 call 115104 <__errno> <== NOT EXECUTED 108dcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108dd3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108dd6: 53 push %ebx <== NOT EXECUTED 108dd7: e8 08 f8 ff ff call 1085e4 <== NOT EXECUTED 108ddc: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108de1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108de4: e9 81 fe ff ff jmp 108c6a <== NOT EXECUTED 108de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108dec: e8 13 c3 00 00 call 115104 <__errno> 108df1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 108df7: e9 1d ff ff ff jmp 108d19 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 108dfc: e8 03 c3 00 00 call 115104 <__errno> 108e01: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 108e07: e9 0d ff ff ff jmp 108d19 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 108e0c: e8 f3 c2 00 00 call 115104 <__errno> <== NOT EXECUTED 108e11: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 108e17: e9 fd fe ff ff jmp 108d19 <== NOT EXECUTED =============================================================================== 0010ffa4 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10ffa4: 55 push %ebp 10ffa5: 89 e5 mov %esp,%ebp 10ffa7: 53 push %ebx 10ffa8: 83 ec 14 sub $0x14,%esp 10ffab: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 10ffae: 85 db test %ebx,%ebx 10ffb0: 74 54 je 110006 <== NEVER TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10ffb2: 51 push %ecx 10ffb3: 8d 45 f4 lea -0xc(%ebp),%eax 10ffb6: 50 push %eax 10ffb7: ff 75 08 pushl 0x8(%ebp) 10ffba: 68 40 29 13 00 push $0x132940 10ffbf: e8 8c 32 00 00 call 113250 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10ffc4: 83 c4 10 add $0x10,%esp 10ffc7: 8b 55 f4 mov -0xc(%ebp),%edx 10ffca: 85 d2 test %edx,%edx 10ffcc: 75 26 jne 10fff4 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10ffce: 8b 50 10 mov 0x10(%eax),%edx * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 10ffd1: 8b 40 14 mov 0x14(%eax),%eax 10ffd4: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10ffd6: 8b 42 68 mov 0x68(%edx),%eax 10ffd9: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10ffdc: 8b 42 60 mov 0x60(%edx),%eax 10ffdf: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10ffe2: 8b 42 64 mov 0x64(%edx),%eax 10ffe5: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10ffe8: e8 27 3b 00 00 call 113b14 <_Thread_Enable_dispatch> 10ffed: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ffef: 8b 5d fc mov -0x4(%ebp),%ebx 10fff2: c9 leave 10fff3: c3 ret #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fff4: e8 77 b2 00 00 call 11b270 <__errno> 10fff9: c7 00 09 00 00 00 movl $0x9,(%eax) 10ffff: b8 ff ff ff ff mov $0xffffffff,%eax 110004: eb e9 jmp 10ffef POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 110006: e8 65 b2 00 00 call 11b270 <__errno> 11000b: c7 00 16 00 00 00 movl $0x16,(%eax) 110011: b8 ff ff ff ff mov $0xffffffff,%eax 110016: eb d7 jmp 10ffef =============================================================================== 001100fc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 1100fc: 55 push %ebp 1100fd: 89 e5 mov %esp,%ebp 1100ff: 57 push %edi 110100: 56 push %esi 110101: 53 push %ebx 110102: 83 ec 2c sub $0x2c,%esp 110105: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110108: a1 d8 23 13 00 mov 0x1323d8,%eax 11010d: 40 inc %eax 11010e: a3 d8 23 13 00 mov %eax,0x1323d8 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 110113: 89 f0 mov %esi,%eax 110115: 25 00 02 00 00 and $0x200,%eax 11011a: 89 45 d4 mov %eax,-0x2c(%ebp) 11011d: 0f 85 c9 00 00 00 jne 1101ec 110123: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 11012a: 83 ec 0c sub $0xc,%esp 11012d: 68 40 29 13 00 push $0x132940 110132: e8 69 2c 00 00 call 112da0 <_Objects_Allocate> 110137: 89 c3 mov %eax,%ebx attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 110139: 83 c4 10 add $0x10,%esp 11013c: 85 c0 test %eax,%eax 11013e: 0f 84 b4 00 00 00 je 1101f8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 110144: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 110147: 83 ec 08 sub $0x8,%esp 11014a: 8d 45 e4 lea -0x1c(%ebp),%eax 11014d: 50 push %eax 11014e: ff 75 08 pushl 0x8(%ebp) 110151: e8 6e 74 00 00 call 1175c4 <_POSIX_Message_queue_Name_to_id> 110156: 89 c7 mov %eax,%edi * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 110158: 83 c4 10 add $0x10,%esp 11015b: 85 c0 test %eax,%eax 11015d: 75 59 jne 1101b8 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 11015f: 81 e6 00 0a 00 00 and $0xa00,%esi 110165: 81 fe 00 0a 00 00 cmp $0xa00,%esi 11016b: 0f 84 a7 00 00 00 je 110218 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 110171: 50 push %eax 110172: 8d 45 dc lea -0x24(%ebp),%eax 110175: 50 push %eax 110176: ff 75 e4 pushl -0x1c(%ebp) 110179: 68 a0 27 13 00 push $0x1327a0 11017e: e8 cd 30 00 00 call 113250 <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 110183: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 110186: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 110189: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11018c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 110190: a1 5c 29 13 00 mov 0x13295c,%eax 110195: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 110198: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 11019f: e8 70 39 00 00 call 113b14 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 1101a4: e8 6b 39 00 00 call 113b14 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 1101a9: 8b 43 08 mov 0x8(%ebx),%eax 1101ac: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 1101af: 8d 65 f4 lea -0xc(%ebp),%esp 1101b2: 5b pop %ebx 1101b3: 5e pop %esi 1101b4: 5f pop %edi 1101b5: c9 leave 1101b6: c3 ret 1101b7: 90 nop if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 1101b8: 83 f8 02 cmp $0x2,%eax 1101bb: 0f 84 87 00 00 00 je 110248 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 1101c1: 83 ec 08 sub $0x8,%esp 1101c4: 53 push %ebx 1101c5: 68 40 29 13 00 push $0x132940 1101ca: e8 51 2f 00 00 call 113120 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 1101cf: e8 40 39 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 1101d4: e8 97 b0 00 00 call 11b270 <__errno> 1101d9: 89 38 mov %edi,(%eax) 1101db: b8 ff ff ff ff mov $0xffffffff,%eax 1101e0: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 1101e3: 8d 65 f4 lea -0xc(%ebp),%esp 1101e6: 5b pop %ebx 1101e7: 5e pop %esi 1101e8: 5f pop %edi 1101e9: c9 leave 1101ea: c3 ret 1101eb: 90 nop _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 1101ec: 8b 45 14 mov 0x14(%ebp),%eax 1101ef: 89 45 d0 mov %eax,-0x30(%ebp) 1101f2: e9 33 ff ff ff jmp 11012a 1101f7: 90 nop va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 1101f8: e8 17 39 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1101fd: e8 6e b0 00 00 call 11b270 <__errno> 110202: c7 00 17 00 00 00 movl $0x17,(%eax) 110208: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 11020d: 8d 65 f4 lea -0xc(%ebp),%esp 110210: 5b pop %ebx 110211: 5e pop %esi 110212: 5f pop %edi 110213: c9 leave 110214: c3 ret 110215: 8d 76 00 lea 0x0(%esi),%esi 110218: 83 ec 08 sub $0x8,%esp 11021b: 53 push %ebx 11021c: 68 40 29 13 00 push $0x132940 110221: e8 fa 2e 00 00 call 113120 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 110226: e8 e9 38 00 00 call 113b14 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 11022b: e8 40 b0 00 00 call 11b270 <__errno> 110230: c7 00 11 00 00 00 movl $0x11,(%eax) 110236: b8 ff ff ff ff mov $0xffffffff,%eax 11023b: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 11023e: 8d 65 f4 lea -0xc(%ebp),%esp 110241: 5b pop %ebx 110242: 5e pop %esi 110243: 5f pop %edi 110244: c9 leave 110245: c3 ret 110246: 66 90 xchg %ax,%ax if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 110248: 8b 55 d4 mov -0x2c(%ebp),%edx 11024b: 85 d2 test %edx,%edx 11024d: 0f 84 6e ff ff ff je 1101c1 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 110253: 8d 45 e0 lea -0x20(%ebp),%eax 110256: 50 push %eax 110257: ff 75 d0 pushl -0x30(%ebp) 11025a: 6a 01 push $0x1 11025c: ff 75 08 pushl 0x8(%ebp) 11025f: e8 cc 71 00 00 call 117430 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 110264: 83 c4 10 add $0x10,%esp 110267: 40 inc %eax 110268: 74 26 je 110290 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 11026a: 8b 45 e0 mov -0x20(%ebp),%eax 11026d: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 110270: 0f b7 53 08 movzwl 0x8(%ebx),%edx 110274: a1 5c 29 13 00 mov 0x13295c,%eax 110279: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 11027c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 110283: e8 8c 38 00 00 call 113b14 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 110288: 8b 43 08 mov 0x8(%ebx),%eax 11028b: e9 1f ff ff ff jmp 1101af 110290: 83 ec 08 sub $0x8,%esp 110293: 53 push %ebx 110294: 68 40 29 13 00 push $0x132940 110299: e8 82 2e 00 00 call 113120 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 11029e: e8 71 38 00 00 call 113b14 <_Thread_Enable_dispatch> 1102a3: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 1102a8: 83 c4 10 add $0x10,%esp 1102ab: e9 ff fe ff ff jmp 1101af =============================================================================== 0013a8d8 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 13a8d8: 55 push %ebp <== NOT EXECUTED 13a8d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a8db: 57 push %edi <== NOT EXECUTED 13a8dc: 56 push %esi <== NOT EXECUTED 13a8dd: 53 push %ebx <== NOT EXECUTED 13a8de: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 13a8e4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 13a8e7: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 13a8ea: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 13a8ed: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 13a8f3: 8b 0a mov (%edx),%ecx <== NOT EXECUTED 13a8f5: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp) <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 13a8fb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 13a902: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp) <== NOT EXECUTED uint16_t date = 0; 13a908: 66 c7 45 e4 00 00 movw $0x0,-0x1c(%ebp) <== NOT EXECUTED static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 13a90e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED dir_pos->sname.ofs = 0; 13a915: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 13a91c: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 13a923: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 13a92a: 8d 5d b0 lea -0x50(%ebp),%ebx <== NOT EXECUTED 13a92d: 31 c0 xor %eax,%eax <== NOT EXECUTED 13a92f: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED 13a934: 89 df mov %ebx,%edi <== NOT EXECUTED 13a936: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 13a938: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED 13a93e: 89 95 34 ff ff ff mov %edx,-0xcc(%ebp) <== NOT EXECUTED 13a944: b1 40 mov $0x40,%cl <== NOT EXECUTED 13a946: 89 d7 mov %edx,%edi <== NOT EXECUTED 13a948: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 13a94a: 6a 0b push $0xb <== NOT EXECUTED 13a94c: 53 push %ebx <== NOT EXECUTED 13a94d: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 13a950: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 13a953: e8 74 1f 00 00 call 13c8cc <== NOT EXECUTED 13a958: 89 c6 mov %eax,%esi <== NOT EXECUTED MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 13a95a: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 13a95e: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 13a965: e8 f6 7e 01 00 call 152860