=============================================================================== 0010d220 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 10d220: 55 push %ebp 10d221: 89 e5 mov %esp,%ebp 10d223: 57 push %edi 10d224: 56 push %esi 10d225: 53 push %ebx 10d226: 83 ec 1c sub $0x1c,%esp 10d229: 8b 7d 0c mov 0xc(%ebp),%edi 10d22c: 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 *) loc->node_access; 10d22f: 8b 45 08 mov 0x8(%ebp),%eax 10d232: 8b 58 08 mov 0x8(%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10d235: e8 0e 08 00 00 call 10da48 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10d23a: 66 3b 43 3c cmp 0x3c(%ebx),%ax 10d23e: 74 15 je 10d255 10d240: 66 85 c0 test %ax,%ax 10d243: 74 10 je 10d255 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d245: e8 92 3c 00 00 call 110edc <__errno> 10d24a: c7 00 01 00 00 00 movl $0x1,(%eax) 10d250: 83 c8 ff or $0xffffffff,%eax 10d253: eb 20 jmp 10d275 #endif jnode->st_uid = owner; 10d255: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10d259: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10d25d: 50 push %eax 10d25e: 50 push %eax 10d25f: 6a 00 push $0x0 10d261: 8d 45 e0 lea -0x20(%ebp),%eax 10d264: 50 push %eax 10d265: e8 42 95 ff ff call 1067ac 10d26a: 8b 45 e0 mov -0x20(%ebp),%eax 10d26d: 89 43 48 mov %eax,0x48(%ebx) return 0; 10d270: 83 c4 10 add $0x10,%esp 10d273: 31 c0 xor %eax,%eax } 10d275: 8d 65 f4 lea -0xc(%ebp),%esp 10d278: 5b pop %ebx 10d279: 5e pop %esi 10d27a: 5f pop %edi 10d27b: 5d pop %ebp 10d27c: c3 ret =============================================================================== 0010888c : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 10888c: 55 push %ebp 10888d: 89 e5 mov %esp,%ebp 10888f: 57 push %edi 108890: 56 push %esi 108891: 53 push %ebx 108892: 83 ec 1c sub $0x1c,%esp 108895: 89 d6 mov %edx,%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 108897: 8b 58 50 mov 0x50(%eax),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 10889a: 83 c0 54 add $0x54,%eax 10889d: 89 45 e4 mov %eax,-0x1c(%ebp) for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 1088a0: 8d 42 01 lea 0x1(%edx),%eax 1088a3: 89 45 e0 mov %eax,-0x20(%ebp) IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 1088a6: e9 d7 00 00 00 jmp 108982 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 1088ab: 51 push %ecx 1088ac: 51 push %ecx 1088ad: ff 70 08 pushl 0x8(%eax) 1088b0: 68 81 47 12 00 push $0x124781 1088b5: e8 e2 c3 00 00 call 114c9c !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++ ) 1088ba: 47 inc %edi 1088bb: 83 c4 10 add $0x10,%esp 1088be: eb 02 jmp 1088c2 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 1088c0: 31 ff xor %edi,%edi !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++ ) 1088c2: 39 f7 cmp %esi,%edi 1088c4: a1 00 27 13 00 mov 0x132700,%eax 1088c9: 7e e0 jle 1088ab IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 1088cb: 52 push %edx 1088cc: 52 push %edx 1088cd: ff 70 08 pushl 0x8(%eax) 1088d0: 8d 43 0c lea 0xc(%ebx),%eax 1088d3: 50 push %eax 1088d4: e8 c3 c3 00 00 call 114c9c rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 1088d9: 8b 43 4c mov 0x4c(%ebx),%eax 1088dc: 8b 10 mov (%eax),%edx switch( IMFS_type( the_jnode ) ) { 1088de: 83 c4 10 add $0x10,%esp 1088e1: 83 fa 06 cmp $0x6,%edx 1088e4: a1 00 27 13 00 mov 0x132700,%eax 1088e9: 77 62 ja 10894d <== NEVER TAKEN 1088eb: ff 24 95 5c 48 12 00 jmp *0x12485c(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 1088f2: 57 push %edi 1088f3: 57 push %edi 1088f4: ff 70 08 pushl 0x8(%eax) 1088f7: 6a 2f push $0x2f 1088f9: e8 e6 c2 00 00 call 114be4 1088fe: eb 2b jmp 10892b break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108900: ff 73 54 pushl 0x54(%ebx) 108903: ff 73 50 pushl 0x50(%ebx) 108906: 68 86 47 12 00 push $0x124786 10890b: eb 16 jmp 108923 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 10890d: ff 73 58 pushl 0x58(%ebx) 108910: ff 73 50 pushl 0x50(%ebx) 108913: 68 99 47 12 00 push $0x124799 108918: eb 09 jmp 108923 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 10891a: 51 push %ecx 10891b: ff 73 50 pushl 0x50(%ebx) 10891e: 68 a8 47 12 00 push $0x1247a8 108923: ff 70 08 pushl 0x8(%eax) 108926: e8 51 c2 00 00 call 114b7c 10892b: 83 c4 10 add $0x10,%esp 10892e: eb 2e jmp 10895e case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108930: 52 push %edx 108931: 52 push %edx 108932: ff 70 08 pushl 0x8(%eax) 108935: 68 b4 47 12 00 push $0x1247b4 10893a: eb 0a jmp 108946 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 10893c: 57 push %edi 10893d: 57 push %edi 10893e: ff 70 08 pushl 0x8(%eax) 108941: 68 c8 47 12 00 push $0x1247c8 108946: e8 51 c3 00 00 call 114c9c 10894b: eb 1e jmp 10896b return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 10894d: 51 push %ecx <== NOT EXECUTED 10894e: 52 push %edx <== NOT EXECUTED 10894f: 68 db 47 12 00 push $0x1247db <== NOT EXECUTED 108954: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108957: e8 20 c2 00 00 call 114b7c <== NOT EXECUTED 10895c: eb 0d jmp 10896b <== NOT EXECUTED return; } puts(""); 10895e: 83 ec 0c sub $0xc,%esp 108961: 68 fd 4f 12 00 push $0x124ffd 108966: e8 79 db 00 00 call 1164e4 10896b: 83 c4 10 add $0x10,%esp } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 10896e: 8b 43 4c mov 0x4c(%ebx),%eax the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 108971: 83 38 00 cmpl $0x0,(%eax) 108974: 75 0a jne 108980 IMFS_dump_directory( the_jnode, level + 1 ); 108976: 8b 55 e0 mov -0x20(%ebp),%edx 108979: 89 d8 mov %ebx,%eax 10897b: e8 0c ff ff ff call 10888c the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108980: 8b 1b mov (%ebx),%ebx IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 108982: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108985: 0f 85 35 ff ff ff jne 1088c0 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 10898b: 8d 65 f4 lea -0xc(%ebp),%esp 10898e: 5b pop %ebx 10898f: 5e pop %esi 108990: 5f pop %edi 108991: 5d pop %ebp 108992: c3 ret =============================================================================== 0010d39c : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 10d39c: 55 push %ebp 10d39d: 89 e5 mov %esp,%ebp 10d39f: 57 push %edi 10d3a0: 56 push %esi 10d3a1: 53 push %ebx 10d3a2: 83 ec 28 sub $0x28,%esp 10d3a5: 8b 75 08 mov 0x8(%ebp),%esi 10d3a8: 8b 7d 10 mov 0x10(%ebp),%edi rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; 10d3ab: 8b 56 20 mov 0x20(%esi),%edx bool access_ok = rtems_filesystem_eval_path_check_access( 10d3ae: 0f b7 42 3e movzwl 0x3e(%edx),%eax 10d3b2: 50 push %eax 10d3b3: 0f b7 42 3c movzwl 0x3c(%edx),%eax 10d3b7: 50 push %eax 10d3b8: ff 72 30 pushl 0x30(%edx) 10d3bb: 6a 01 push $0x1 10d3bd: 56 push %esi 10d3be: 89 55 e0 mov %edx,-0x20(%ebp) 10d3c1: e8 77 0a 00 00 call 10de3d dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 10d3c6: 83 c4 20 add $0x20,%esp 10d3c9: 84 c0 test %al,%al 10d3cb: 8b 55 e0 mov -0x20(%ebp),%edx 10d3ce: 75 05 jne 10d3d5 10d3d0: e9 0b 01 00 00 jmp 10d4e0 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 10d3d5: 31 c0 xor %eax,%eax 10d3d7: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 10d3db: 75 08 jne 10d3e5 10d3dd: 31 c0 xor %eax,%eax 10d3df: 80 3f 2e cmpb $0x2e,(%edi) 10d3e2: 0f 94 c0 sete %al IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 10d3e5: 85 c0 test %eax,%eax 10d3e7: 75 6b jne 10d454 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 10d3e9: 83 7d 14 02 cmpl $0x2,0x14(%ebp) 10d3ed: 75 0e jne 10d3fd 10d3ef: 80 3f 2e cmpb $0x2e,(%edi) 10d3f2: 75 09 jne 10d3fd 10d3f4: 31 c0 xor %eax,%eax 10d3f6: 80 7f 01 2e cmpb $0x2e,0x1(%edi) 10d3fa: 0f 94 c0 sete %al return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { 10d3fd: 85 c0 test %eax,%eax 10d3ff: 74 05 je 10d406 return dir->Parent; 10d401: 8b 5a 08 mov 0x8(%edx),%ebx 10d404: eb 45 jmp 10d44b */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 10d406: 8b 5a 50 mov 0x50(%edx),%ebx } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); 10d409: 8d 42 54 lea 0x54(%edx),%eax 10d40c: 89 45 e4 mov %eax,-0x1c(%ebp) 10d40f: eb 30 jmp 10d441 while ( current != tail ) { IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 10d411: 50 push %eax 10d412: ff 75 14 pushl 0x14(%ebp) 10d415: 57 push %edi 10d416: 8d 43 0c lea 0xc(%ebx),%eax 10d419: 50 push %eax 10d41a: 89 55 e0 mov %edx,-0x20(%ebp) 10d41d: e8 3a 4d 00 00 call 11215c 10d422: 83 c4 10 add $0x10,%esp && entry->name [tokenlen] == '\0'; 10d425: 31 c9 xor %ecx,%ecx 10d427: 85 c0 test %eax,%eax 10d429: 8b 55 e0 mov -0x20(%ebp),%edx 10d42c: 75 0d jne 10d43b 10d42e: 8b 45 14 mov 0x14(%ebp),%eax 10d431: 31 c9 xor %ecx,%ecx 10d433: 80 7c 03 0c 00 cmpb $0x0,0xc(%ebx,%eax,1) 10d438: 0f 94 c1 sete %cl if ( match ) { 10d43b: 85 c9 test %ecx,%ecx 10d43d: 75 0c jne 10d44b }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 10d43f: 8b 1b mov (%ebx),%ebx } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { 10d441: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d444: 75 cb jne 10d411 10d446: e9 9c 00 00 00 jmp 10d4e7 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 10d44b: 85 db test %ebx,%ebx 10d44d: 75 07 jne 10d456 10d44f: e9 93 00 00 00 jmp 10d4e7 IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 10d454: 89 d3 mov %edx,%ebx if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 10d456: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10d45a: 0f 94 c0 sete %al }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 10d45d: 8b 7e 10 mov 0x10(%esi),%edi rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 10d460: 8b 4b 4c mov 0x4c(%ebx),%ecx 10d463: 8b 09 mov (%ecx),%ecx static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 10d465: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 10d46c: 83 f9 02 cmp $0x2,%ecx 10d46f: 75 0e jne 10d47f 10d471: 84 c0 test %al,%al 10d473: 74 05 je 10d47a 10d475: 83 e7 08 and $0x8,%edi 10d478: 74 74 je 10d4ee entry = entry->info.hard_link.link_node; 10d47a: 8b 5b 50 mov 0x50(%ebx),%ebx 10d47d: eb 6f jmp 10d4ee } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 10d47f: 83 f9 03 cmp $0x3,%ecx 10d482: 75 23 jne 10d4a7 10d484: 84 c0 test %al,%al 10d486: 74 05 je 10d48d 10d488: 83 e7 10 and $0x10,%edi 10d48b: 74 61 je 10d4ee const char *target = entry->info.sym_link.name; 10d48d: 8b 53 50 mov 0x50(%ebx),%edx rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 10d490: 31 c0 xor %eax,%eax 10d492: 83 c9 ff or $0xffffffff,%ecx 10d495: 89 d7 mov %edx,%edi 10d497: f2 ae repnz scas %es:(%edi),%al 10d499: f7 d1 not %ecx 10d49b: 49 dec %ecx 10d49c: 53 push %ebx 10d49d: 51 push %ecx 10d49e: 52 push %edx 10d49f: 56 push %esi 10d4a0: e8 b5 a4 ff ff call 10795a 10d4a5: eb 36 jmp 10d4dd IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 10d4a7: 85 c9 test %ecx,%ecx 10d4a9: 75 43 jne 10d4ee if ( node->info.directory.mt_fs != NULL ) { 10d4ab: 8b 4b 5c mov 0x5c(%ebx),%ecx 10d4ae: 85 c9 test %ecx,%ecx 10d4b0: 74 3c je 10d4ee fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root; 10d4b2: 8d 79 24 lea 0x24(%ecx),%edi if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 10d4b5: 83 ec 0c sub $0xc,%esp 10d4b8: 0f b7 43 3e movzwl 0x3e(%ebx),%eax 10d4bc: 50 push %eax 10d4bd: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 10d4c1: 50 push %eax 10d4c2: ff 73 30 pushl 0x30(%ebx) 10d4c5: 6a 01 push $0x1 10d4c7: 56 push %esi 10d4c8: e8 70 09 00 00 call 10de3d RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 10d4cd: 83 c4 20 add $0x20,%esp 10d4d0: 84 c0 test %al,%al 10d4d2: 74 0c je 10d4e0 <== NEVER TAKEN rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 10d4d4: 50 push %eax 10d4d5: 50 push %eax 10d4d6: 57 push %edi 10d4d7: 56 push %esi 10d4d8: e8 1a a4 ff ff call 1078f7 10d4dd: 83 c4 10 add $0x10,%esp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 10d4e0: b8 01 00 00 00 mov $0x1,%eax 10d4e5: eb 1e jmp 10d505 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 10d4e7: b8 02 00 00 00 mov $0x2,%eax 10d4ec: eb 17 jmp 10d505 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 10d4ee: 66 ff 4a 34 decw 0x34(%edx) ++entry->reference_count; 10d4f2: 66 ff 43 34 incw 0x34(%ebx) currentloc->node_access = entry; 10d4f6: 89 5e 20 mov %ebx,0x20(%esi) static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 10d4f9: 8b 53 4c mov 0x4c(%ebx),%edx 10d4fc: 8b 52 04 mov 0x4(%edx),%edx 10d4ff: 89 56 28 mov %edx,0x28(%esi) void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 10d502: 0f b6 c0 movzbl %al,%eax status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 10d505: 8d 65 f4 lea -0xc(%ebp),%esp 10d508: 5b pop %ebx 10d509: 5e pop %esi 10d50a: 5f pop %edi 10d50b: 5d pop %ebp 10d50c: c3 ret =============================================================================== 0010d528 : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 10d528: 55 push %ebp 10d529: 89 e5 mov %esp,%ebp 10d52b: 53 push %ebx 10d52c: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 10d52f: 8b 45 08 mov 0x8(%ebp),%eax 10d532: 8b 58 08 mov 0x8(%eax),%ebx /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10d535: e8 0e 05 00 00 call 10da48 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10d53a: 66 3b 43 3c cmp 0x3c(%ebx),%ax 10d53e: 74 15 je 10d555 10d540: 66 85 c0 test %ax,%ax 10d543: 74 10 je 10d555 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d545: e8 92 39 00 00 call 110edc <__errno> 10d54a: c7 00 01 00 00 00 movl $0x1,(%eax) 10d550: 83 c8 ff or $0xffffffff,%eax 10d553: eb 2e jmp 10d583 /* * 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); 10d555: 8b 45 0c mov 0xc(%ebp),%eax 10d558: 25 ff 0f 00 00 and $0xfff,%eax /* * 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); 10d55d: 8b 53 30 mov 0x30(%ebx),%edx 10d560: 81 e2 00 f0 ff ff and $0xfffff000,%edx jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 10d566: 09 d0 or %edx,%eax 10d568: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 10d56b: 50 push %eax 10d56c: 50 push %eax 10d56d: 6a 00 push $0x0 10d56f: 8d 45 f0 lea -0x10(%ebp),%eax 10d572: 50 push %eax 10d573: e8 34 92 ff ff call 1067ac 10d578: 8b 45 f0 mov -0x10(%ebp),%eax 10d57b: 89 43 48 mov %eax,0x48(%ebx) return 0; 10d57e: 83 c4 10 add $0x10,%esp 10d581: 31 c0 xor %eax,%eax } 10d583: 8b 5d fc mov -0x4(%ebp),%ebx 10d586: c9 leave 10d587: c3 ret =============================================================================== 00106934 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 106934: 55 push %ebp 106935: 89 e5 mov %esp,%ebp 106937: 56 push %esi 106938: 53 push %ebx 106939: 83 ec 10 sub $0x10,%esp 10693c: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 10693f: 8b 70 18 mov 0x18(%eax),%esi int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 106942: 50 push %eax 106943: ff 75 10 pushl 0x10(%ebp) 106946: ff 75 0c pushl 0xc(%ebp) 106949: ff 76 50 pushl 0x50(%esi) 10694c: e8 7c 8d 00 00 call 10f6cd 106951: 89 c3 mov %eax,%ebx if (err > 0) { 106953: 83 c4 10 add $0x10,%esp 106956: 83 f8 00 cmp $0x0,%eax 106959: 7e 1b jle 106976 IMFS_mtime_ctime_update(jnode); 10695b: 50 push %eax 10695c: 50 push %eax 10695d: 6a 00 push $0x0 10695f: 8d 45 f0 lea -0x10(%ebp),%eax 106962: 50 push %eax 106963: e8 84 0d 00 00 call 1076ec 106968: 8b 45 f0 mov -0x10(%ebp),%eax 10696b: 89 46 44 mov %eax,0x44(%esi) 10696e: 89 46 48 mov %eax,0x48(%esi) 106971: 83 c4 10 add $0x10,%esp 106974: eb 0e jmp 106984 } IMFS_FIFO_RETURN(err); 106976: 74 0c je 106984 <== NEVER TAKEN 106978: e8 d7 c0 00 00 call 112a54 <__errno> 10697d: f7 db neg %ebx 10697f: 89 18 mov %ebx,(%eax) 106981: 83 cb ff or $0xffffffff,%ebx } 106984: 89 d8 mov %ebx,%eax 106986: 8d 65 f8 lea -0x8(%ebp),%esp 106989: 5b pop %ebx 10698a: 5e pop %esi 10698b: 5d pop %ebp 10698c: c3 ret =============================================================================== 0010d588 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10d588: 55 push %ebp 10d589: 89 e5 mov %esp,%ebp 10d58b: 57 push %edi 10d58c: 56 push %esi 10d58d: 53 push %ebx 10d58e: 83 ec 2c sub $0x2c,%esp /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 10d591: 8b 45 08 mov 0x8(%ebp),%eax 10d594: 8b 40 24 mov 0x24(%eax),%eax 10d597: 8d 7d d0 lea -0x30(%ebp),%edi 10d59a: b9 06 00 00 00 mov $0x6,%ecx 10d59f: 89 c6 mov %eax,%esi 10d5a1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) jnode = (IMFS_jnode_t *)loc.node_access; 10d5a3: 8b 5d d8 mov -0x28(%ebp),%ebx /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 10d5a6: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); 10d5ad: 8d 7d d0 lea -0x30(%ebp),%edi 10d5b0: eb 02 jmp 10d5b4 if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 10d5b2: 89 c3 mov %eax,%ebx */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 10d5b4: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 10d5b7: 89 5d d8 mov %ebx,-0x28(%ebp) 10d5ba: 8b 43 4c mov 0x4c(%ebx),%eax 10d5bd: 8b 50 04 mov 0x4(%eax),%edx 10d5c0: 89 55 e0 mov %edx,-0x20(%ebp) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 10d5c3: 83 38 00 cmpl $0x0,(%eax) 10d5c6: 75 08 jne 10d5d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d5c8: 8d 43 54 lea 0x54(%ebx),%eax 10d5cb: 39 43 50 cmp %eax,0x50(%ebx) 10d5ce: 75 30 jne 10d600 result = IMFS_rmnod( NULL, &loc ); 10d5d0: 50 push %eax 10d5d1: 50 push %eax 10d5d2: 57 push %edi 10d5d3: 6a 00 push $0x0 10d5d5: e8 32 8d ff ff call 10630c if ( result != 0 ) 10d5da: 83 c4 10 add $0x10,%esp 10d5dd: 85 c0 test %eax,%eax 10d5df: 74 0d je 10d5ee <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xdeadbeef ); 10d5e1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d5e4: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 10d5e9: e8 c6 cd ff ff call 10a3b4 <== NOT EXECUTED IMFS_node_destroy( jnode ); 10d5ee: 83 ec 0c sub $0xc,%esp 10d5f1: 53 push %ebx 10d5f2: e8 68 8a ff ff call 10605f jnode = next; } if ( jnode != NULL ) { 10d5f7: 83 c4 10 add $0x10,%esp 10d5fa: 85 f6 test %esi,%esi 10d5fc: 74 18 je 10d616 10d5fe: 89 f3 mov %esi,%ebx return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 10d600: 8b 43 4c mov 0x4c(%ebx),%eax if ( IMFS_is_directory( jnode ) ) { 10d603: 83 38 00 cmpl $0x0,(%eax) 10d606: 75 ac jne 10d5b4 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 10d608: 8b 43 50 mov 0x50(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d60b: 8d 53 54 lea 0x54(%ebx),%edx if ( jnode_has_children( jnode ) ) 10d60e: 39 d0 cmp %edx,%eax 10d610: 74 a2 je 10d5b4 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 10d612: 85 c0 test %eax,%eax 10d614: 75 9c jne 10d5b2 <== ALWAYS TAKEN } 10d616: 8d 65 f4 lea -0xc(%ebp),%esp 10d619: 5b pop %ebx 10d61a: 5e pop %esi 10d61b: 5f pop %edi 10d61c: 5d pop %ebp 10d61d: c3 ret =============================================================================== 00105f90 : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 105f90: 55 push %ebp 105f91: 89 e5 mov %esp,%ebp 105f93: 57 push %edi 105f94: 56 push %esi 105f95: 53 push %ebx 105f96: 83 ec 14 sub $0x14,%esp 105f99: 8b 75 10 mov 0x10(%ebp),%esi static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 105f9c: 6a 24 push $0x24 105f9e: 6a 01 push $0x1 105fa0: e8 87 05 00 00 call 10652c 105fa5: 89 c3 mov %eax,%ebx if ( fs_info != NULL ) { 105fa7: 83 c4 10 add $0x10,%esp 105faa: 85 c0 test %eax,%eax 105fac: 74 6f je 10601d IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 105fae: a1 b8 df 12 00 mov 0x12dfb8,%eax 105fb3: 89 03 mov %eax,(%ebx) 105fb5: 40 inc %eax 105fb6: a3 b8 df 12 00 mov %eax,0x12dfb8 memcpy( fs_info->node_controls, 105fbb: 8d 43 08 lea 0x8(%ebx),%eax if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; memcpy( 105fbe: b9 07 00 00 00 mov $0x7,%ecx 105fc3: 89 c7 mov %eax,%edi 105fc5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 105fc7: 50 push %eax 105fc8: 50 push %eax 105fc9: 6a 00 push $0x0 105fcb: 68 ed 41 00 00 push $0x41ed 105fd0: 6a 00 push $0x0 105fd2: 68 19 fa 11 00 push $0x11fa19 105fd7: ff 73 08 pushl 0x8(%ebx) 105fda: 53 push %ebx 105fdb: e8 a0 72 00 00 call 10d280 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 105fe0: 83 c4 20 add $0x20,%esp 105fe3: 85 c0 test %eax,%eax 105fe5: 74 36 je 10601d <== NEVER TAKEN mt_entry->fs_info = fs_info; 105fe7: 8b 55 08 mov 0x8(%ebp),%edx 105fea: 89 5a 08 mov %ebx,0x8(%edx) mt_entry->ops = op_table; 105fed: 8b 55 0c mov 0xc(%ebp),%edx 105ff0: 8b 4d 08 mov 0x8(%ebp),%ecx 105ff3: 89 51 0c mov %edx,0xc(%ecx) mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 105ff6: c7 41 2c 7c fd 11 00 movl $0x11fd7c,0x2c(%ecx) mt_entry->mt_fs_root->location.node_access = root_node; 105ffd: 8b 51 24 mov 0x24(%ecx),%edx 106000: 89 42 08 mov %eax,0x8(%edx) static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 106003: 8b 40 4c mov 0x4c(%eax),%eax 106006: 8b 40 04 mov 0x4(%eax),%eax 106009: 89 42 10 mov %eax,0x10(%edx) errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 10600c: a1 6c a2 12 00 mov 0x12a26c,%eax 106011: ba 06 00 00 00 mov $0x6,%edx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106016: b9 10 00 00 00 mov $0x10,%ecx 10601b: eb 0d jmp 10602a } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 10601d: e8 ba ae 00 00 call 110edc <__errno> 106022: c7 00 0c 00 00 00 movl $0xc,(%eax) 106028: eb 19 jmp 106043 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 10602a: 39 c1 cmp %eax,%ecx 10602c: 74 0c je 10603a is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 10602e: 7f 05 jg 106035 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106030: d1 e1 shl %ecx 106032: 4a dec %edx 106033: 75 f5 jne 10602a <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 106035: b8 80 00 00 00 mov $0x80,%eax break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 10603a: a3 b4 df 12 00 mov %eax,0x12dfb4 const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; 10603f: 31 c0 xor %eax,%eax 106041: eb 03 jmp 106046 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 106043: 83 c8 ff or $0xffffffff,%eax IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 106046: 8d 65 f4 lea -0xc(%ebp),%esp 106049: 5b pop %ebx 10604a: 5e pop %esi 10604b: 5f pop %edi 10604c: 5d pop %ebp 10604d: c3 ret =============================================================================== 001075ed : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 1075ed: 55 push %ebp 1075ee: 89 e5 mov %esp,%ebp 1075f0: 57 push %edi 1075f1: 56 push %esi 1075f2: 53 push %ebx 1075f3: 83 ec 6c sub $0x6c,%esp int rv = 0; mode &= ~rtems_filesystem_umask; 1075f6: a1 24 0c 13 00 mov 0x130c24,%eax 1075fb: 8b 58 08 mov 0x8(%eax),%ebx 1075fe: f7 d3 not %ebx 107600: 23 5d 0c and 0xc(%ebp),%ebx switch (mode & S_IFMT) { 107603: 89 d8 mov %ebx,%eax 107605: 25 00 f0 00 00 and $0xf000,%eax 10760a: 3d 00 20 00 00 cmp $0x2000,%eax 10760f: 0f 84 c8 00 00 00 je 1076dd 107615: 77 07 ja 10761e <== ALWAYS TAKEN 107617: 3d 00 10 00 00 cmp $0x1000,%eax <== NOT EXECUTED 10761c: eb 10 jmp 10762e <== NOT EXECUTED 10761e: 3d 00 60 00 00 cmp $0x6000,%eax 107623: 0f 84 b4 00 00 00 je 1076dd 107629: 3d 00 80 00 00 cmp $0x8000,%eax 10762e: 0f 84 a9 00 00 00 je 1076dd <== NEVER TAKEN 107634: e9 94 00 00 00 jmp 1076cd if ( node_control->imfs_type == IMFS_GENERIC ) { rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 107639: 50 push %eax 10763a: 6a 78 push $0x78 10763c: ff 75 08 pushl 0x8(%ebp) rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 10763f: 8d 75 b0 lea -0x50(%ebp),%esi if ( node_control->imfs_type == IMFS_GENERIC ) { rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 107642: 56 push %esi 107643: e8 81 1b 00 00 call 1091c9 107648: 89 c7 mov %eax,%edi rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 10764a: 89 04 24 mov %eax,(%esp) 10764d: e8 56 ff ff ff call 1075a8 107652: 83 c4 10 add $0x10,%esp 107655: 84 c0 test %al,%al 107657: 74 50 je 1076a9 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 107659: 8b 45 14 mov 0x14(%ebp),%eax 10765c: 89 45 9c mov %eax,-0x64(%ebp) new_node = IMFS_create_node_with_control( 10765f: 50 push %eax 107660: 50 push %eax currentloc, node_control, rtems_filesystem_eval_path_get_token( &ctx ), rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info 107661: 8d 45 9c lea -0x64(%ebp),%eax if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 107664: 50 push %eax 107665: 53 push %ebx 107666: ff 75 bc pushl -0x44(%ebp) 107669: ff 75 b8 pushl -0x48(%ebp) 10766c: ff 75 10 pushl 0x10(%ebp) 10766f: 57 push %edi 107670: e8 d7 97 00 00 call 110e4c rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 107675: 83 c4 20 add $0x20,%esp 107678: 85 c0 test %eax,%eax 10767a: 74 3d je 1076b9 IMFS_jnode_t *parent = currentloc->node_access; 10767c: 8b 5f 08 mov 0x8(%edi),%ebx IMFS_update_ctime( parent ); 10767f: 51 push %ecx 107680: 51 push %ecx 107681: 6a 00 push $0x0 107683: 8d 75 94 lea -0x6c(%ebp),%esi 107686: 56 push %esi 107687: e8 2c 08 00 00 call 107eb8 10768c: 8b 45 94 mov -0x6c(%ebp),%eax 10768f: 89 43 48 mov %eax,0x48(%ebx) IMFS_update_mtime( parent ); 107692: 5f pop %edi 107693: 58 pop %eax 107694: 6a 00 push $0x0 107696: 56 push %esi 107697: e8 1c 08 00 00 call 107eb8 10769c: 8b 45 94 mov -0x6c(%ebp),%eax 10769f: 89 43 44 mov %eax,0x44(%ebx) 1076a2: 83 c4 10 add $0x10,%esp 1076a5: 31 db xor %ebx,%ebx 1076a7: eb 13 jmp 1076bc } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 1076a9: 52 push %edx 1076aa: 52 push %edx 1076ab: 68 86 00 00 00 push $0x86 1076b0: 56 push %esi 1076b1: e8 ec 18 00 00 call 108fa2 1076b6: 83 c4 10 add $0x10,%esp rv = -1; 1076b9: 83 cb ff or $0xffffffff,%ebx } rtems_filesystem_eval_path_cleanup( &ctx ); 1076bc: 83 ec 0c sub $0xc,%esp 1076bf: 8d 45 b0 lea -0x50(%ebp),%eax 1076c2: 50 push %eax 1076c3: e8 bd 1b 00 00 call 109285 1076c8: 83 c4 10 add $0x10,%esp 1076cb: eb 1e jmp 1076eb } else { errno = EINVAL; 1076cd: e8 52 d1 00 00 call 114824 <__errno> 1076d2: c7 00 16 00 00 00 movl $0x16,(%eax) rv = -1; 1076d8: 83 cb ff or $0xffffffff,%ebx 1076db: eb 0e jmp 1076eb rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 1076dd: 8b 45 10 mov 0x10(%ebp),%eax 1076e0: 83 38 07 cmpl $0x7,(%eax) 1076e3: 0f 84 50 ff ff ff je 107639 1076e9: eb e2 jmp 1076cd rv = -1; } } return rv; } 1076eb: 89 d8 mov %ebx,%eax 1076ed: 8d 65 f4 lea -0xc(%ebp),%esp 1076f0: 5b pop %ebx 1076f1: 5e pop %esi 1076f2: 5f pop %edi 1076f3: 5d pop %ebp 1076f4: c3 ret =============================================================================== 0010fbd8 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 10fbd8: 55 push %ebp 10fbd9: 89 e5 mov %esp,%ebp 10fbdb: 56 push %esi 10fbdc: 53 push %ebx IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 10fbdd: 50 push %eax 10fbde: 6a 01 push $0x1 10fbe0: ff 75 0c pushl 0xc(%ebp) 10fbe3: ff 75 08 pushl 0x8(%ebp) 10fbe6: e8 d7 fc ff ff call 10f8c2 10fbeb: 89 c6 mov %eax,%esi if ( *block_entry_ptr ) 10fbed: 83 c4 10 add $0x10,%esp return 0; 10fbf0: 31 db xor %ebx,%ebx /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 10fbf2: 83 38 00 cmpl $0x0,(%eax) 10fbf5: 75 12 jne 10fc09 return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 10fbf7: e8 a4 fc ff ff call 10f8a0 if ( !memory ) 10fbfc: 85 c0 test %eax,%eax 10fbfe: 74 04 je 10fc04 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 10fc00: 89 06 mov %eax,(%esi) return 0; 10fc02: eb 05 jmp 10fc09 /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 10fc04: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED *block_entry_ptr = memory; return 0; } 10fc09: 89 d8 mov %ebx,%eax 10fc0b: 8d 65 f8 lea -0x8(%ebp),%esp 10fc0e: 5b pop %ebx 10fc0f: 5e pop %esi 10fc10: 5d pop %ebp 10fc11: c3 ret =============================================================================== 0010fd7a : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 10fd7a: 55 push %ebp 10fd7b: 89 e5 mov %esp,%ebp 10fd7d: 57 push %edi 10fd7e: 56 push %esi 10fd7f: 53 push %ebx 10fd80: 83 ec 4c sub $0x4c,%esp 10fd83: 8b 75 08 mov 0x8(%ebp),%esi 10fd86: 8b 45 10 mov 0x10(%ebp),%eax 10fd89: 8b 55 14 mov 0x14(%ebp),%edx 10fd8c: 89 45 d0 mov %eax,-0x30(%ebp) 10fd8f: 89 55 d4 mov %edx,-0x2c(%ebp) 10fd92: 8a 55 0c mov 0xc(%ebp),%dl 10fd95: 88 55 bb mov %dl,-0x45(%ebp) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 10fd98: 8b 1d b4 df 12 00 mov 0x12dfb4,%ebx 10fd9e: 89 da mov %ebx,%edx 10fda0: c1 ea 02 shr $0x2,%edx 10fda3: 8d 42 01 lea 0x1(%edx),%eax 10fda6: 0f af c2 imul %edx,%eax 10fda9: 40 inc %eax 10fdaa: 0f af c2 imul %edx,%eax 10fdad: 48 dec %eax 10fdae: 0f af c3 imul %ebx,%eax 10fdb1: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10fdb5: 7c 17 jl 10fdce <== NEVER TAKEN 10fdb7: 7f 05 jg 10fdbe <== NEVER TAKEN 10fdb9: 39 45 d0 cmp %eax,-0x30(%ebp) 10fdbc: 72 10 jb 10fdce rtems_set_errno_and_return_minus_one( EFBIG ); 10fdbe: e8 19 11 00 00 call 110edc <__errno> 10fdc3: c7 00 1b 00 00 00 movl $0x1b,(%eax) 10fdc9: e9 c1 00 00 00 jmp 10fe8f /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 10fdce: 8b 46 50 mov 0x50(%esi),%eax 10fdd1: 8b 56 54 mov 0x54(%esi),%edx 10fdd4: 89 45 c0 mov %eax,-0x40(%ebp) 10fdd7: 89 55 c4 mov %edx,-0x3c(%ebp) 10fdda: 39 55 d4 cmp %edx,-0x2c(%ebp) 10fddd: 0f 8c e9 00 00 00 jl 10fecc <== NEVER TAKEN 10fde3: 7f 09 jg 10fdee <== NEVER TAKEN 10fde5: 39 45 d0 cmp %eax,-0x30(%ebp) 10fde8: 0f 86 de 00 00 00 jbe 10fecc <== NEVER TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10fdee: 89 5d c8 mov %ebx,-0x38(%ebp) 10fdf1: 89 da mov %ebx,%edx 10fdf3: c1 fa 1f sar $0x1f,%edx 10fdf6: 89 55 cc mov %edx,-0x34(%ebp) 10fdf9: ff 75 cc pushl -0x34(%ebp) 10fdfc: ff 75 c8 pushl -0x38(%ebp) 10fdff: ff 75 d4 pushl -0x2c(%ebp) 10fe02: ff 75 d0 pushl -0x30(%ebp) 10fe05: e8 7e d3 00 00 call 11d188 <__divdi3> 10fe0a: 83 c4 10 add $0x10,%esp 10fe0d: 89 45 bc mov %eax,-0x44(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10fe10: ff 75 cc pushl -0x34(%ebp) 10fe13: ff 75 c8 pushl -0x38(%ebp) 10fe16: ff 75 c4 pushl -0x3c(%ebp) 10fe19: ff 75 c0 pushl -0x40(%ebp) 10fe1c: e8 67 d3 00 00 call 11d188 <__divdi3> 10fe21: 83 c4 10 add $0x10,%esp 10fe24: 89 45 c8 mov %eax,-0x38(%ebp) offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 10fe27: 0f af d8 imul %eax,%ebx 10fe2a: 8b 7d c0 mov -0x40(%ebp),%edi 10fe2d: 29 df sub %ebx,%edi /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10fe2f: 89 c3 mov %eax,%ebx 10fe31: eb 62 jmp 10fe95 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 10fe33: 50 push %eax 10fe34: 50 push %eax 10fe35: 53 push %ebx 10fe36: 56 push %esi 10fe37: e8 9c fd ff ff call 10fbd8 10fe3c: 83 c4 10 add $0x10,%esp 10fe3f: 85 c0 test %eax,%eax 10fe41: 75 3c jne 10fe7f <== NEVER TAKEN if ( zero_fill ) { 10fe43: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 10fe47: 74 4b je 10fe94 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 10fe49: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx 10fe4f: 29 f9 sub %edi,%ecx block_p *block_ptr = 10fe51: 50 push %eax 10fe52: 6a 00 push $0x0 10fe54: 53 push %ebx 10fe55: 56 push %esi 10fe56: 89 4d b4 mov %ecx,-0x4c(%ebp) 10fe59: e8 64 fa ff ff call 10f8c2 IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 10fe5e: 8b 10 mov (%eax),%edx 10fe60: 01 fa add %edi,%edx 10fe62: 31 c0 xor %eax,%eax 10fe64: 8b 4d b4 mov -0x4c(%ebp),%ecx 10fe67: 89 d7 mov %edx,%edi 10fe69: f3 aa rep stos %al,%es:(%edi) 10fe6b: 83 c4 10 add $0x10,%esp offset = 0; 10fe6e: 31 ff xor %edi,%edi 10fe70: eb 22 jmp 10fe94 } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 10fe72: 51 push %ecx <== NOT EXECUTED 10fe73: 51 push %ecx <== NOT EXECUTED 10fe74: 53 push %ebx <== NOT EXECUTED 10fe75: 56 push %esi <== NOT EXECUTED 10fe76: e8 d5 fe ff ff call 10fd50 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 10fe7b: 4b dec %ebx <== NOT EXECUTED 10fe7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fe7f: 3b 5d c8 cmp -0x38(%ebp),%ebx <== NOT EXECUTED 10fe82: 73 ee jae 10fe72 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 10fe84: e8 53 10 00 00 call 110edc <__errno> <== NOT EXECUTED 10fe89: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 10fe8f: 83 c8 ff or $0xffffffff,%eax 10fe92: eb 3a jmp 10fece offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10fe94: 43 inc %ebx 10fe95: 3b 5d bc cmp -0x44(%ebp),%ebx 10fe98: 76 99 jbe 10fe33 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 10fe9a: 8b 45 d0 mov -0x30(%ebp),%eax 10fe9d: 8b 55 d4 mov -0x2c(%ebp),%edx 10fea0: 89 46 50 mov %eax,0x50(%esi) 10fea3: 89 56 54 mov %edx,0x54(%esi) IMFS_update_ctime(the_jnode); 10fea6: 50 push %eax 10fea7: 50 push %eax 10fea8: 6a 00 push $0x0 10feaa: 8d 5d e0 lea -0x20(%ebp),%ebx 10fead: 53 push %ebx 10feae: e8 f9 68 ff ff call 1067ac 10feb3: 8b 45 e0 mov -0x20(%ebp),%eax 10feb6: 89 46 48 mov %eax,0x48(%esi) IMFS_update_mtime(the_jnode); 10feb9: 58 pop %eax 10feba: 5a pop %edx 10febb: 6a 00 push $0x0 10febd: 53 push %ebx 10febe: e8 e9 68 ff ff call 1067ac 10fec3: 8b 45 e0 mov -0x20(%ebp),%eax 10fec6: 89 46 44 mov %eax,0x44(%esi) return 0; 10fec9: 83 c4 10 add $0x10,%esp /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 10fecc: 31 c0 xor %eax,%eax the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 10fece: 8d 65 f4 lea -0xc(%ebp),%esp 10fed1: 5b pop %ebx 10fed2: 5e pop %esi 10fed3: 5f pop %edi 10fed4: 5d pop %ebp 10fed5: c3 ret =============================================================================== 0010f8c2 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 10f8c2: 55 push %ebp 10f8c3: 89 e5 mov %esp,%ebp 10f8c5: 57 push %edi 10f8c6: 56 push %esi 10f8c7: 53 push %ebx 10f8c8: 83 ec 1c sub $0x1c,%esp 10f8cb: 8b 5d 08 mov 0x8(%ebp),%ebx 10f8ce: 8b 75 0c mov 0xc(%ebp),%esi 10f8d1: 8b 7d 10 mov 0x10(%ebp),%edi my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 10f8d4: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx 10f8da: c1 e9 02 shr $0x2,%ecx 10f8dd: 8d 41 ff lea -0x1(%ecx),%eax 10f8e0: 39 c6 cmp %eax,%esi 10f8e2: 77 23 ja 10f907 p = info->indirect; 10f8e4: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 10f8e7: 85 ff test %edi,%edi 10f8e9: 74 6f je 10f95a if ( !p ) { 10f8eb: 85 c0 test %eax,%eax 10f8ed: 75 13 jne 10f902 p = memfile_alloc_block(); 10f8ef: e8 ac ff ff ff call 10f8a0 if ( !p ) 10f8f4: 85 c0 test %eax,%eax 10f8f6: 75 07 jne 10f8ff <== ALWAYS TAKEN return 0; 10f8f8: 31 c0 xor %eax,%eax 10f8fa: e9 fc 00 00 00 jmp 10f9fb <== NOT EXECUTED info->indirect = p; 10f8ff: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 10f902: 8b 43 58 mov 0x58(%ebx),%eax 10f905: eb 57 jmp 10f95e /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 10f907: 8d 41 01 lea 0x1(%ecx),%eax 10f90a: 0f af c1 imul %ecx,%eax 10f90d: 8d 50 ff lea -0x1(%eax),%edx 10f910: 39 d6 cmp %edx,%esi 10f912: 77 52 ja 10f966 my_block -= FIRST_DOUBLY_INDIRECT; 10f914: 89 f0 mov %esi,%eax 10f916: 29 c8 sub %ecx,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 10f918: 31 d2 xor %edx,%edx 10f91a: f7 f1 div %ecx 10f91c: 89 d6 mov %edx,%esi 10f91e: 89 c1 mov %eax,%ecx doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 10f920: 8b 43 5c mov 0x5c(%ebx),%eax if ( malloc_it ) { 10f923: 85 ff test %edi,%edi 10f925: 74 2c je 10f953 if ( !p ) { 10f927: 85 c0 test %eax,%eax 10f929: 75 12 jne 10f93d p = memfile_alloc_block(); 10f92b: 89 4d e0 mov %ecx,-0x20(%ebp) 10f92e: e8 6d ff ff ff call 10f8a0 if ( !p ) 10f933: 85 c0 test %eax,%eax 10f935: 8b 4d e0 mov -0x20(%ebp),%ecx 10f938: 74 be je 10f8f8 <== NEVER TAKEN return 0; info->doubly_indirect = p; 10f93a: 89 43 5c mov %eax,0x5c(%ebx) } p1 = (block_p *)p[ doubly ]; 10f93d: 8d 1c 88 lea (%eax,%ecx,4),%ebx 10f940: 8b 03 mov (%ebx),%eax if ( !p1 ) { 10f942: 85 c0 test %eax,%eax 10f944: 75 18 jne 10f95e p1 = memfile_alloc_block(); 10f946: e8 55 ff ff ff call 10f8a0 if ( !p1 ) 10f94b: 85 c0 test %eax,%eax 10f94d: 74 a9 je 10f8f8 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 10f94f: 89 03 mov %eax,(%ebx) 10f951: eb 0b jmp 10f95e } return (block_p *)&p1[ singly ]; } if ( !p ) 10f953: 85 c0 test %eax,%eax 10f955: 74 a1 je 10f8f8 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 10f957: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !p ) 10f95a: 85 c0 test %eax,%eax 10f95c: 74 9a je 10f8f8 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; 10f95e: 8d 04 b0 lea (%eax,%esi,4),%eax 10f961: e9 95 00 00 00 jmp 10f9fb } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 10f966: 8d 50 01 lea 0x1(%eax),%edx 10f969: 0f af d1 imul %ecx,%edx 10f96c: 4a dec %edx 10f96d: 39 d6 cmp %edx,%esi 10f96f: 77 87 ja 10f8f8 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 10f971: 29 c6 sub %eax,%esi 10f973: 89 f0 mov %esi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 10f975: 31 d2 xor %edx,%edx 10f977: f7 f1 div %ecx 10f979: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 10f97c: 31 d2 xor %edx,%edx 10f97e: f7 f1 div %ecx 10f980: 89 d6 mov %edx,%esi 10f982: 89 c1 mov %eax,%ecx doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 10f984: 8b 43 60 mov 0x60(%ebx),%eax if ( malloc_it ) { 10f987: 85 ff test %edi,%edi 10f989: 74 4c je 10f9d7 if ( !p ) { 10f98b: 85 c0 test %eax,%eax 10f98d: 75 16 jne 10f9a5 p = memfile_alloc_block(); 10f98f: 89 4d e0 mov %ecx,-0x20(%ebp) 10f992: e8 09 ff ff ff call 10f8a0 if ( !p ) 10f997: 85 c0 test %eax,%eax 10f999: 8b 4d e0 mov -0x20(%ebp),%ecx 10f99c: 0f 84 56 ff ff ff je 10f8f8 <== NEVER TAKEN return 0; info->triply_indirect = p; 10f9a2: 89 43 60 mov %eax,0x60(%ebx) } p1 = (block_p *) p[ triply ]; 10f9a5: 8d 1c 88 lea (%eax,%ecx,4),%ebx 10f9a8: 8b 03 mov (%ebx),%eax if ( !p1 ) { 10f9aa: 85 c0 test %eax,%eax 10f9ac: 75 0f jne 10f9bd p1 = memfile_alloc_block(); 10f9ae: e8 ed fe ff ff call 10f8a0 if ( !p1 ) 10f9b3: 85 c0 test %eax,%eax 10f9b5: 0f 84 3d ff ff ff je 10f8f8 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 10f9bb: 89 03 mov %eax,(%ebx) } p2 = (block_p *)p1[ doubly ]; 10f9bd: 8d 1c b0 lea (%eax,%esi,4),%ebx 10f9c0: 8b 03 mov (%ebx),%eax if ( !p2 ) { 10f9c2: 85 c0 test %eax,%eax 10f9c4: 75 2f jne 10f9f5 <== NEVER TAKEN p2 = memfile_alloc_block(); 10f9c6: e8 d5 fe ff ff call 10f8a0 if ( !p2 ) 10f9cb: 85 c0 test %eax,%eax 10f9cd: 0f 84 25 ff ff ff je 10f8f8 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 10f9d3: 89 03 mov %eax,(%ebx) 10f9d5: eb 1e jmp 10f9f5 } return (block_p *)&p2[ singly ]; } if ( !p ) 10f9d7: 85 c0 test %eax,%eax 10f9d9: 0f 84 19 ff ff ff je 10f8f8 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 10f9df: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !p1 ) 10f9e2: 85 c0 test %eax,%eax 10f9e4: 0f 84 0e ff ff ff je 10f8f8 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 10f9ea: 8b 04 90 mov (%eax,%edx,4),%eax if ( !p2 ) 10f9ed: 85 c0 test %eax,%eax 10f9ef: 0f 84 03 ff ff ff je 10f8f8 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 10f9f5: 8b 55 e4 mov -0x1c(%ebp),%edx 10f9f8: 8d 04 90 lea (%eax,%edx,4),%eax /* * This means the requested block number is out of range. */ return 0; } 10f9fb: 83 c4 1c add $0x1c,%esp 10f9fe: 5b pop %ebx 10f9ff: 5e pop %esi 10fa00: 5f pop %edi 10fa01: 5d pop %ebp 10fa02: c3 ret =============================================================================== 0010fa03 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 10fa03: 55 push %ebp 10fa04: 89 e5 mov %esp,%ebp 10fa06: 57 push %edi 10fa07: 56 push %esi 10fa08: 53 push %ebx 10fa09: 83 ec 3c sub $0x3c,%esp 10fa0c: 8b 45 0c mov 0xc(%ebp),%eax 10fa0f: 8b 55 10 mov 0x10(%ebp),%edx 10fa12: 89 45 c8 mov %eax,-0x38(%ebp) 10fa15: 89 55 cc mov %edx,-0x34(%ebp) rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 10fa18: 8b 55 08 mov 0x8(%ebp),%edx 10fa1b: 8b 42 4c mov 0x4c(%edx),%eax * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 10fa1e: 83 38 05 cmpl $0x5,(%eax) 10fa21: 75 39 jne 10fa5c unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 10fa23: 8b 72 58 mov 0x58(%edx),%esi if (my_length > (the_jnode->info.linearfile.size - start)) 10fa26: 8b 42 50 mov 0x50(%edx),%eax 10fa29: 8b 52 54 mov 0x54(%edx),%edx 10fa2c: 89 c1 mov %eax,%ecx 10fa2e: 89 d3 mov %edx,%ebx 10fa30: 2b 4d c8 sub -0x38(%ebp),%ecx 10fa33: 1b 5d cc sbb -0x34(%ebp),%ebx 10fa36: 31 ff xor %edi,%edi 10fa38: 39 df cmp %ebx,%edi 10fa3a: 7c 0e jl 10fa4a <== NEVER TAKEN 10fa3c: 7f 05 jg 10fa43 <== NEVER TAKEN 10fa3e: 39 4d 18 cmp %ecx,0x18(%ebp) 10fa41: 76 07 jbe 10fa4a <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 10fa43: 89 c3 mov %eax,%ebx 10fa45: 2b 5d c8 sub -0x38(%ebp),%ebx 10fa48: eb 03 jmp 10fa4d /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 10fa4a: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 10fa4d: 03 75 c8 add -0x38(%ebp),%esi 10fa50: 8b 7d 14 mov 0x14(%ebp),%edi 10fa53: 89 d9 mov %ebx,%ecx 10fa55: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10fa57: e9 1d 01 00 00 jmp 10fb79 /* * 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; 10fa5c: 8b 45 c8 mov -0x38(%ebp),%eax if ( last_byte > the_jnode->info.file.size ) 10fa5f: 8b 55 08 mov 0x8(%ebp),%edx 10fa62: 8b 5a 50 mov 0x50(%edx),%ebx /* * 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; 10fa65: 8b 55 18 mov 0x18(%ebp),%edx 10fa68: 01 c2 add %eax,%edx if ( last_byte > the_jnode->info.file.size ) 10fa6a: 31 c9 xor %ecx,%ecx 10fa6c: 8b 75 08 mov 0x8(%ebp),%esi 10fa6f: 3b 4e 54 cmp 0x54(%esi),%ecx 10fa72: 7c 0d jl 10fa81 <== NEVER TAKEN 10fa74: 7f 04 jg 10fa7a <== NEVER TAKEN 10fa76: 39 da cmp %ebx,%edx 10fa78: 76 07 jbe 10fa81 my_length = the_jnode->info.file.size - start; 10fa7a: 29 c3 sub %eax,%ebx 10fa7c: 89 5d d4 mov %ebx,-0x2c(%ebp) 10fa7f: eb 06 jmp 10fa87 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 10fa81: 8b 45 18 mov 0x18(%ebp),%eax 10fa84: 89 45 d4 mov %eax,-0x2c(%ebp) */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10fa87: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx 10fa8d: 89 cb mov %ecx,%ebx 10fa8f: 89 ce mov %ecx,%esi 10fa91: c1 fe 1f sar $0x1f,%esi 10fa94: 56 push %esi 10fa95: 51 push %ecx 10fa96: ff 75 cc pushl -0x34(%ebp) 10fa99: ff 75 c8 pushl -0x38(%ebp) 10fa9c: 89 4d c0 mov %ecx,-0x40(%ebp) 10fa9f: e8 38 d8 00 00 call 11d2dc <__moddi3> 10faa4: 83 c4 10 add $0x10,%esp 10faa7: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10faa9: 56 push %esi 10faaa: 53 push %ebx 10faab: ff 75 cc pushl -0x34(%ebp) 10faae: ff 75 c8 pushl -0x38(%ebp) 10fab1: e8 d2 d6 00 00 call 11d188 <__divdi3> 10fab6: 83 c4 10 add $0x10,%esp 10fab9: 89 c2 mov %eax,%edx if ( start_offset ) { 10fabb: 85 ff test %edi,%edi 10fabd: 8b 4d c0 mov -0x40(%ebp),%ecx 10fac0: 74 39 je 10fafb to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 10fac2: 29 f9 sub %edi,%ecx 10fac4: 8b 5d d4 mov -0x2c(%ebp),%ebx 10fac7: 39 cb cmp %ecx,%ebx 10fac9: 76 02 jbe 10facd 10facb: 89 cb mov %ecx,%ebx if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10facd: 50 push %eax 10face: 6a 00 push $0x0 10fad0: 52 push %edx 10fad1: ff 75 08 pushl 0x8(%ebp) 10fad4: 89 55 c0 mov %edx,-0x40(%ebp) 10fad7: e8 e6 fd ff ff call 10f8c2 if ( !block_ptr ) 10fadc: 83 c4 10 add $0x10,%esp 10fadf: 85 c0 test %eax,%eax 10fae1: 8b 55 c0 mov -0x40(%ebp),%edx 10fae4: 0f 84 ac 00 00 00 je 10fb96 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 10faea: 8b 30 mov (%eax),%esi 10faec: 01 fe add %edi,%esi dest += to_copy; 10faee: 8b 7d 14 mov 0x14(%ebp),%edi 10faf1: 89 d9 mov %ebx,%ecx 10faf3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 10faf5: 42 inc %edx my_length -= to_copy; 10faf6: 29 5d d4 sub %ebx,-0x2c(%ebp) 10faf9: eb 05 jmp 10fb00 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 10fafb: 8b 7d 14 mov 0x14(%ebp),%edi */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 10fafe: 31 db xor %ebx,%ebx } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10fb00: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx 10fb06: 89 4d c8 mov %ecx,-0x38(%ebp) * is considered an error. Read from an offset for more bytes than * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( 10fb09: 29 df sub %ebx,%edi 10fb0b: 89 7d c4 mov %edi,-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 ) { 10fb0e: eb 2e jmp 10fb3e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10fb10: 56 push %esi 10fb11: 6a 00 push $0x0 10fb13: 52 push %edx 10fb14: ff 75 08 pushl 0x8(%ebp) 10fb17: 89 55 c0 mov %edx,-0x40(%ebp) 10fb1a: e8 a3 fd ff ff call 10f8c2 if ( !block_ptr ) 10fb1f: 83 c4 10 add $0x10,%esp 10fb22: 85 c0 test %eax,%eax 10fb24: 8b 55 c0 mov -0x40(%ebp),%edx 10fb27: 75 02 jne 10fb2b <== ALWAYS TAKEN 10fb29: eb 3d jmp 10fb68 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 10fb2b: 8b 30 mov (%eax),%esi 10fb2d: 8b 7d d0 mov -0x30(%ebp),%edi 10fb30: 8b 4d c8 mov -0x38(%ebp),%ecx 10fb33: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; block++; 10fb35: 42 inc %edx my_length -= to_copy; 10fb36: 8b 4d c8 mov -0x38(%ebp),%ecx 10fb39: 29 4d d4 sub %ecx,-0x2c(%ebp) copied += to_copy; 10fb3c: 01 cb add %ecx,%ebx * is considered an error. Read from an offset for more bytes than * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( 10fb3e: 8b 75 c4 mov -0x3c(%ebp),%esi 10fb41: 01 de add %ebx,%esi 10fb43: 89 75 d0 mov %esi,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10fb46: 8b 4d d4 mov -0x2c(%ebp),%ecx 10fb49: 3b 0d b4 df 12 00 cmp 0x12dfb4,%ecx 10fb4f: 73 bf jae 10fb10 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 10fb51: 85 c9 test %ecx,%ecx 10fb53: 74 24 je 10fb79 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10fb55: 51 push %ecx 10fb56: 6a 00 push $0x0 10fb58: 52 push %edx 10fb59: ff 75 08 pushl 0x8(%ebp) 10fb5c: e8 61 fd ff ff call 10f8c2 if ( !block_ptr ) 10fb61: 83 c4 10 add $0x10,%esp 10fb64: 85 c0 test %eax,%eax 10fb66: 75 04 jne 10fb6c <== ALWAYS TAKEN return copied; 10fb68: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10fb6a: eb 2c jmp 10fb98 <== NOT EXECUTED memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 10fb6c: 8b 30 mov (%eax),%esi 10fb6e: 8b 7d d0 mov -0x30(%ebp),%edi 10fb71: 8b 4d d4 mov -0x2c(%ebp),%ecx 10fb74: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 10fb76: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_update_atime( the_jnode ); 10fb79: 50 push %eax 10fb7a: 50 push %eax 10fb7b: 6a 00 push $0x0 10fb7d: 8d 45 e0 lea -0x20(%ebp),%eax 10fb80: 50 push %eax 10fb81: e8 26 6c ff ff call 1067ac 10fb86: 8b 45 e0 mov -0x20(%ebp),%eax 10fb89: 8b 75 08 mov 0x8(%ebp),%esi 10fb8c: 89 46 40 mov %eax,0x40(%esi) return copied; 10fb8f: 89 d8 mov %ebx,%eax 10fb91: 83 c4 10 add $0x10,%esp 10fb94: eb 02 jmp 10fb98 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 ); if ( !block_ptr ) return copied; 10fb96: 31 c0 xor %eax,%eax } IMFS_update_atime( the_jnode ); return copied; } 10fb98: 8d 65 f4 lea -0xc(%ebp),%esp 10fb9b: 5b pop %ebx 10fb9c: 5e pop %esi 10fb9d: 5f pop %edi 10fb9e: 5d pop %ebp 10fb9f: c3 ret =============================================================================== 0010fc7c : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 10fc7c: 55 push %ebp 10fc7d: 89 e5 mov %esp,%ebp 10fc7f: 57 push %edi 10fc80: 56 push %esi 10fc81: 53 push %ebx 10fc82: 83 ec 1c sub $0x1c,%esp 10fc85: 8b 5d 08 mov 0x8(%ebp),%ebx /* * 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; 10fc88: 8b 35 b4 df 12 00 mov 0x12dfb4,%esi 10fc8e: c1 ee 02 shr $0x2,%esi * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 10fc91: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10fc95: 74 0a je 10fca1 memfile_free_blocks_in_table( &info->indirect, to_free ); 10fc97: 8d 43 58 lea 0x58(%ebx),%eax 10fc9a: 89 f2 mov %esi,%edx 10fc9c: e8 8a ff ff ff call 10fc2b } if ( info->doubly_indirect ) { 10fca1: 31 ff xor %edi,%edi 10fca3: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 10fca7: 75 15 jne 10fcbe 10fca9: eb 29 jmp 10fcd4 for ( i=0 ; idoubly_indirect[i] ) { 10fcab: 8b 43 5c mov 0x5c(%ebx),%eax 10fcae: 8d 04 b8 lea (%eax,%edi,4),%eax 10fcb1: 83 38 00 cmpl $0x0,(%eax) 10fcb4: 74 07 je 10fcbd <== NEVER TAKEN memfile_free_blocks_in_table( 10fcb6: 89 f2 mov %esi,%edx 10fcb8: e8 6e ff ff ff call 10fc2b if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 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 ); 10fcca: 8d 43 5c lea 0x5c(%ebx),%eax 10fccd: 89 f2 mov %esi,%edx 10fccf: e8 57 ff ff ff call 10fc2b } if ( info->triply_indirect ) { 10fcd4: 31 ff xor %edi,%edi 10fcd6: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 10fcda: 75 54 jne 10fd30 10fcdc: eb 68 jmp 10fd46 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( 10fcde: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 10fce5: 89 45 e0 mov %eax,-0x20(%ebp) } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 10fce8: 8b 43 60 mov 0x60(%ebx),%eax 10fceb: 8b 0c b8 mov (%eax,%edi,4),%ecx if ( !p ) /* ensure we have a valid pointer */ 10fcee: 85 c9 test %ecx,%ecx 10fcf0: 74 4a je 10fd3c <== NEVER TAKEN 10fcf2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10fcf9: eb 1a jmp 10fd15 break; for ( j=0 ; j<== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 10fd00: 89 f2 mov %esi,%edx 10fd02: 89 c8 mov %ecx,%eax 10fd04: 89 4d dc mov %ecx,-0x24(%ebp) 10fd07: e8 1f ff ff ff call 10fc2b 10fd0c: 8b 4d dc mov -0x24(%ebp),%ecx if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 10fd22: 8b 45 e0 mov -0x20(%ebp),%eax 10fd25: 03 43 60 add 0x60(%ebx),%eax 10fd28: 89 f2 mov %esi,%edx 10fd2a: e8 fc fe ff ff call 10fc2b memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); 10fd3c: 8d 43 60 lea 0x60(%ebx),%eax } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 10fd3f: 89 f2 mov %esi,%edx 10fd41: e8 e5 fe ff ff call 10fc2b (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 10fd46: 89 d8 mov %ebx,%eax 10fd48: 83 c4 1c add $0x1c,%esp 10fd4b: 5b pop %ebx 10fd4c: 5e pop %esi 10fd4d: 5f pop %edi 10fd4e: 5d pop %ebp 10fd4f: c3 ret =============================================================================== 0010fd50 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 10fd50: 55 push %ebp <== NOT EXECUTED 10fd51: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10fd53: 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 ); 10fd56: 6a 00 push $0x0 <== NOT EXECUTED 10fd58: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10fd5b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10fd5e: e8 5f fb ff ff call 10f8c2 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 10fd63: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 10fd65: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 10fd6b: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED 10fd6e: e8 9f fe ff ff call 10fc12 <== NOT EXECUTED return 1; } 10fd73: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10fd78: c9 leave <== NOT EXECUTED 10fd79: c3 ret <== NOT EXECUTED =============================================================================== 0010fed6 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10fed6: 55 push %ebp 10fed7: 89 e5 mov %esp,%ebp 10fed9: 57 push %edi 10feda: 56 push %esi 10fedb: 53 push %ebx 10fedc: 83 ec 3c sub $0x3c,%esp 10fedf: 8b 45 0c mov 0xc(%ebp),%eax 10fee2: 8b 55 10 mov 0x10(%ebp),%edx 10fee5: 89 45 c8 mov %eax,-0x38(%ebp) 10fee8: 89 55 cc mov %edx,-0x34(%ebp) /* * 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 + my_length; 10feeb: 8b 75 18 mov 0x18(%ebp),%esi 10feee: 01 c6 add %eax,%esi if ( last_byte > the_jnode->info.file.size ) { 10fef0: 89 f0 mov %esi,%eax 10fef2: 31 d2 xor %edx,%edx 10fef4: 8b 5d 08 mov 0x8(%ebp),%ebx 10fef7: 8b 4b 50 mov 0x50(%ebx),%ecx 10fefa: 8b 5b 54 mov 0x54(%ebx),%ebx 10fefd: 39 da cmp %ebx,%edx 10feff: 7f 4e jg 10ff4f <== NEVER TAKEN 10ff01: 7c 04 jl 10ff07 <== NEVER TAKEN 10ff03: 39 ce cmp %ecx,%esi 10ff05: 77 48 ja 10ff4f */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10ff07: 8b 0d b4 df 12 00 mov 0x12dfb4,%ecx 10ff0d: 89 cb mov %ecx,%ebx 10ff0f: 89 ce mov %ecx,%esi 10ff11: c1 fe 1f sar $0x1f,%esi 10ff14: 56 push %esi 10ff15: 51 push %ecx 10ff16: ff 75 cc pushl -0x34(%ebp) 10ff19: ff 75 c8 pushl -0x38(%ebp) 10ff1c: 89 4d c4 mov %ecx,-0x3c(%ebp) 10ff1f: e8 b8 d3 00 00 call 11d2dc <__moddi3> 10ff24: 83 c4 10 add $0x10,%esp 10ff27: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10ff29: 56 push %esi 10ff2a: 53 push %ebx 10ff2b: ff 75 cc pushl -0x34(%ebp) 10ff2e: ff 75 c8 pushl -0x38(%ebp) 10ff31: e8 52 d2 00 00 call 11d188 <__divdi3> 10ff36: 83 c4 10 add $0x10,%esp 10ff39: 89 c2 mov %eax,%edx if ( start_offset ) { 10ff3b: 85 ff test %edi,%edi 10ff3d: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ff40: 75 37 jne 10ff79 unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 10ff42: 8b 75 14 mov 0x14(%ebp),%esi /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 10ff45: 8b 5d 18 mov 0x18(%ebp),%ebx 10ff48: 89 5d d4 mov %ebx,-0x2c(%ebp) status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 10ff4b: 31 db xor %ebx,%ebx 10ff4d: eb 69 jmp 10ffb8 last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 10ff4f: 52 push %edx 10ff50: 50 push %eax * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 10ff51: b8 01 00 00 00 mov $0x1,%eax 10ff56: 39 5d cc cmp %ebx,-0x34(%ebp) 10ff59: 7f 09 jg 10ff64 <== NEVER TAKEN 10ff5b: 7c 05 jl 10ff62 <== NEVER TAKEN 10ff5d: 39 4d c8 cmp %ecx,-0x38(%ebp) 10ff60: 77 02 ja 10ff64 10ff62: 31 c0 xor %eax,%eax status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 10ff64: 50 push %eax 10ff65: ff 75 08 pushl 0x8(%ebp) 10ff68: e8 0d fe ff ff call 10fd7a if ( status ) 10ff6d: 83 c4 10 add $0x10,%esp 10ff70: 85 c0 test %eax,%eax 10ff72: 74 93 je 10ff07 10ff74: e9 d0 00 00 00 jmp 110049 10ff79: 89 cb mov %ecx,%ebx 10ff7b: 29 fb sub %edi,%ebx 10ff7d: 3b 5d 18 cmp 0x18(%ebp),%ebx 10ff80: 76 03 jbe 10ff85 10ff82: 8b 5d 18 mov 0x18(%ebp),%ebx 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 ); 10ff85: 50 push %eax 10ff86: 6a 00 push $0x0 10ff88: 52 push %edx 10ff89: ff 75 08 pushl 0x8(%ebp) 10ff8c: 89 55 c4 mov %edx,-0x3c(%ebp) 10ff8f: e8 2e f9 ff ff call 10f8c2 if ( !block_ptr ) 10ff94: 83 c4 10 add $0x10,%esp 10ff97: 85 c0 test %eax,%eax 10ff99: 8b 55 c4 mov -0x3c(%ebp),%edx 10ff9c: 0f 84 a1 00 00 00 je 110043 <== NEVER TAKEN block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 10ffa2: 8b 00 mov (%eax),%eax 10ffa4: 01 f8 add %edi,%eax src += to_copy; 10ffa6: 89 c7 mov %eax,%edi 10ffa8: 8b 75 14 mov 0x14(%ebp),%esi 10ffab: 89 d9 mov %ebx,%ecx 10ffad: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 10ffaf: 42 inc %edx my_length -= to_copy; 10ffb0: 8b 7d 18 mov 0x18(%ebp),%edi 10ffb3: 29 df sub %ebx,%edi 10ffb5: 89 7d d4 mov %edi,-0x2c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10ffb8: a1 b4 df 12 00 mov 0x12dfb4,%eax 10ffbd: 89 45 c8 mov %eax,-0x38(%ebp) * IMFS_memfile_write * * 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( 10ffc0: 29 de sub %ebx,%esi 10ffc2: 89 75 d0 mov %esi,-0x30(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10ffc5: eb 2b jmp 10fff2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10ffc7: 50 push %eax 10ffc8: 6a 00 push $0x0 10ffca: 52 push %edx 10ffcb: ff 75 08 pushl 0x8(%ebp) 10ffce: 89 55 c4 mov %edx,-0x3c(%ebp) 10ffd1: e8 ec f8 ff ff call 10f8c2 if ( !block_ptr ) 10ffd6: 83 c4 10 add $0x10,%esp 10ffd9: 85 c0 test %eax,%eax 10ffdb: 8b 55 c4 mov -0x3c(%ebp),%edx 10ffde: 74 67 je 110047 <== NEVER TAKEN 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 ); 10ffe0: 8b 00 mov (%eax),%eax 10ffe2: 89 c7 mov %eax,%edi 10ffe4: 8b 4d c8 mov -0x38(%ebp),%ecx 10ffe7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) src += to_copy; block++; 10ffe9: 42 inc %edx my_length -= to_copy; 10ffea: 8b 7d c8 mov -0x38(%ebp),%edi 10ffed: 29 7d d4 sub %edi,-0x2c(%ebp) * IMFS_memfile_write * * 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( 10fff0: 01 fb add %edi,%ebx 10fff2: 8b 75 d0 mov -0x30(%ebp),%esi 10fff5: 01 de add %ebx,%esi /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10fff7: 8b 45 d4 mov -0x2c(%ebp),%eax 10fffa: 3b 05 b4 df 12 00 cmp 0x12dfb4,%eax 110000: 73 c5 jae 10ffc7 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 110002: 85 c0 test %eax,%eax 110004: 74 1f je 110025 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110006: 50 push %eax 110007: 6a 00 push $0x0 110009: 52 push %edx 11000a: ff 75 08 pushl 0x8(%ebp) 11000d: e8 b0 f8 ff ff call 10f8c2 if ( !block_ptr ) 110012: 83 c4 10 add $0x10,%esp 110015: 85 c0 test %eax,%eax 110017: 74 2e je 110047 <== NEVER TAKEN 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 ); 110019: 8b 00 mov (%eax),%eax 11001b: 89 c7 mov %eax,%edi 11001d: 8b 4d d4 mov -0x2c(%ebp),%ecx 110020: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 110022: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 110025: 50 push %eax 110026: 50 push %eax 110027: 6a 00 push $0x0 110029: 8d 45 e0 lea -0x20(%ebp),%eax 11002c: 50 push %eax 11002d: e8 7a 67 ff ff call 1067ac 110032: 8b 45 e0 mov -0x20(%ebp),%eax 110035: 8b 55 08 mov 0x8(%ebp),%edx 110038: 89 42 44 mov %eax,0x44(%edx) 11003b: 89 42 48 mov %eax,0x48(%edx) return copied; 11003e: 83 c4 10 add $0x10,%esp 110041: eb 04 jmp 110047 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 ); if ( !block_ptr ) return copied; 110043: 31 c0 xor %eax,%eax 110045: eb 02 jmp 110049 <== NOT EXECUTED IMFS_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 ); if ( !block_ptr ) 110047: 89 d8 mov %ebx,%eax } IMFS_mtime_ctime_update( the_jnode ); return copied; } 110049: 8d 65 f4 lea -0xc(%ebp),%esp 11004c: 5b pop %ebx 11004d: 5e pop %esi 11004e: 5f pop %edi 11004f: 5d pop %ebp 110050: c3 ret =============================================================================== 00106124 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 106124: 55 push %ebp 106125: 89 e5 mov %esp,%ebp 106127: 57 push %edi 106128: 56 push %esi 106129: 53 push %ebx 10612a: 83 ec 2c sub $0x2c,%esp 10612d: 8b 5d 08 mov 0x8(%ebp),%ebx 106130: 8b 75 18 mov 0x18(%ebp),%esi 106133: 8b 4d 1c mov 0x1c(%ebp),%ecx dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 106136: 8b 55 14 mov 0x14(%ebp),%edx 106139: 81 e2 00 f0 00 00 and $0xf000,%edx 10613f: 81 fa 00 40 00 00 cmp $0x4000,%edx 106145: 74 30 je 106177 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 106147: 81 fa 00 80 00 00 cmp $0x8000,%edx 10614d: 74 2c je 10617b *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 10614f: 8b 7d 14 mov 0x14(%ebp),%edi 106152: 81 e7 00 b0 00 00 and $0xb000,%edi 106158: 81 ff 00 20 00 00 cmp $0x2000,%edi 10615e: 75 0d jne 10616d *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 106160: 89 75 d4 mov %esi,-0x2c(%ebp) 106163: 89 4d d8 mov %ecx,-0x28(%ebp) if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; 106166: b8 01 00 00 00 mov $0x1,%eax 10616b: eb 1a jmp 106187 rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 10616d: 81 fa 00 10 00 00 cmp $0x1000,%edx 106173: 75 12 jne 106187 <== NEVER TAKEN 106175: eb 0b jmp 106182 IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 106177: 31 c0 xor %eax,%eax 106179: eb 0c jmp 106187 } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 10617b: b8 04 00 00 00 mov $0x4,%eax 106180: eb 05 jmp 106187 dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { *type = IMFS_FIFO; 106182: b8 06 00 00 00 mov $0x6,%eax 106187: 56 push %esi 106188: 56 push %esi IMFS_types_union info; IMFS_jnode_t *new_node; get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); 106189: 8d 55 d4 lea -0x2c(%ebp),%edx 10618c: 52 push %edx 10618d: ff 75 14 pushl 0x14(%ebp) 106190: ff 75 10 pushl 0x10(%ebp) 106193: ff 75 0c pushl 0xc(%ebp) size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 106196: 8b 53 14 mov 0x14(%ebx),%edx (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 106199: 8b 52 08 mov 0x8(%edx),%edx 10619c: ff 74 82 08 pushl 0x8(%edx,%eax,4) 1061a0: 53 push %ebx 1061a1: e8 9a 71 00 00 call 10d340 if ( new_node != NULL ) { 1061a6: 83 c4 20 add $0x20,%esp 1061a9: 85 c0 test %eax,%eax 1061ab: 74 2d je 1061da IMFS_jnode_t *parent = parentloc->node_access; 1061ad: 8b 5b 08 mov 0x8(%ebx),%ebx IMFS_update_ctime( parent ); 1061b0: 50 push %eax 1061b1: 50 push %eax 1061b2: 6a 00 push $0x0 1061b4: 8d 75 cc lea -0x34(%ebp),%esi 1061b7: 56 push %esi 1061b8: e8 ef 05 00 00 call 1067ac 1061bd: 8b 45 cc mov -0x34(%ebp),%eax 1061c0: 89 43 48 mov %eax,0x48(%ebx) IMFS_update_mtime( parent ); 1061c3: 5a pop %edx 1061c4: 59 pop %ecx 1061c5: 6a 00 push $0x0 1061c7: 56 push %esi 1061c8: e8 df 05 00 00 call 1067ac 1061cd: 8b 45 cc mov -0x34(%ebp),%eax 1061d0: 89 43 44 mov %eax,0x44(%ebx) 1061d3: 83 c4 10 add $0x10,%esp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 1061d6: 31 c0 xor %eax,%eax 1061d8: eb 03 jmp 1061dd IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 1061da: 83 c8 ff or $0xffffffff,%eax } return rv; } 1061dd: 8d 65 f4 lea -0xc(%ebp),%esp 1061e0: 5b pop %ebx 1061e1: 5e pop %esi 1061e2: 5f pop %edi 1061e3: 5d pop %ebp 1061e4: c3 ret =============================================================================== 001061e8 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1061e8: 55 push %ebp 1061e9: 89 e5 mov %esp,%ebp 1061eb: 83 ec 08 sub $0x8,%esp 1061ee: 8b 55 08 mov 0x8(%ebp),%edx int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 1061f1: 8b 42 20 mov 0x20(%edx),%eax 1061f4: 8b 40 08 mov 0x8(%eax),%eax return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 1061f7: 8b 48 4c mov 0x4c(%eax),%ecx if ( IMFS_is_directory( node ) ) { 1061fa: 83 39 00 cmpl $0x0,(%ecx) 1061fd: 75 1a jne 106219 if ( node->info.directory.mt_fs == NULL ) { 1061ff: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 106203: 75 07 jne 10620c <== NEVER TAKEN node->info.directory.mt_fs = mt_entry; 106205: 89 50 5c mov %edx,0x5c(%eax) #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 106208: 31 c0 xor %eax,%eax 10620a: eb 1b jmp 106227 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 10620c: e8 cb ac 00 00 call 110edc <__errno> <== NOT EXECUTED 106211: c7 00 10 00 00 00 movl $0x10,(%eax) <== NOT EXECUTED 106217: eb 0b jmp 106224 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 106219: e8 be ac 00 00 call 110edc <__errno> 10621e: c7 00 14 00 00 00 movl $0x14,(%eax) rv = -1; 106224: 83 c8 ff or $0xffffffff,%eax } return rv; } 106227: c9 leave 106228: c3 ret =============================================================================== 0010d6ae : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 10d6ae: 55 push %ebp 10d6af: 89 e5 mov %esp,%ebp 10d6b1: 83 ec 08 sub $0x8,%esp 10d6b4: 8b 45 08 mov 0x8(%ebp),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d6b7: 8d 50 54 lea 0x54(%eax),%edx if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 10d6ba: 39 50 50 cmp %edx,0x50(%eax) 10d6bd: 74 0d je 10d6cc errno = ENOTEMPTY; 10d6bf: e8 18 38 00 00 call 110edc <__errno> 10d6c4: c7 00 5a 00 00 00 movl $0x5a,(%eax) 10d6ca: eb 16 jmp 10d6e2 node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 10d6cc: 3b 45 0c cmp 0xc(%ebp),%eax 10d6cf: 74 06 je 10d6d7 10d6d1: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10d6d5: 74 0d je 10d6e4 <== ALWAYS TAKEN errno = EBUSY; 10d6d7: e8 00 38 00 00 call 110edc <__errno> 10d6dc: c7 00 10 00 00 00 movl $0x10,(%eax) node = NULL; 10d6e2: 31 c0 xor %eax,%eax } return node; } 10d6e4: c9 leave 10d6e5: c3 ret =============================================================================== 0010622c : #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { 10622c: 55 push %ebp 10622d: 89 e5 mov %esp,%ebp const IMFS_jnode_t *node = loc->node_access; 10622f: 8b 45 08 mov 0x8(%ebp),%eax 106232: 8b 50 08 mov 0x8(%eax),%edx rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 106235: 8b 42 4c mov 0x4c(%edx),%eax 106238: 8b 00 mov (%eax),%eax IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 10623a: 83 f8 02 cmp $0x2,%eax 10623d: 74 09 je 106248 10623f: 83 f8 05 cmp $0x5,%eax 106242: 75 0c jne 106250 <== ALWAYS TAKEN case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; case IMFS_LINEAR_FILE: type = RTEMS_FILESYSTEM_MEMORY_FILE; 106244: b0 04 mov $0x4,%al <== NOT EXECUTED 106246: eb 08 jmp 106250 <== NOT EXECUTED type = imfs_type; break; } return type; } 106248: 8b 42 50 mov 0x50(%edx),%eax 10624b: 8b 40 4c mov 0x4c(%eax),%eax 10624e: 8b 00 mov (%eax),%eax 106250: 5d pop %ebp 106251: c3 ret =============================================================================== 0010627c : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 10627c: 55 push %ebp 10627d: 89 e5 mov %esp,%ebp 10627f: 57 push %edi 106280: 56 push %esi 106281: 53 push %ebx 106282: 83 ec 1c sub $0x1c,%esp 106285: 8b 75 14 mov 0x14(%ebp),%esi int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 106288: 8b 45 0c mov 0xc(%ebp),%eax 10628b: 8b 58 08 mov 0x8(%eax),%ebx IMFS_jnode_t *new_parent = newparentloc->node_access; 10628e: 8b 45 10 mov 0x10(%ebp),%eax 106291: 8b 50 08 mov 0x8(%eax),%edx /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 106294: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 106298: 74 5c je 1062f6 <== NEVER TAKEN if ( namelen < IMFS_NAME_MAX ) { 10629a: 83 7d 18 1f cmpl $0x1f,0x18(%ebp) 10629e: 77 49 ja 1062e9 <== NEVER TAKEN memcpy( node->name, name, namelen ); 1062a0: 8d 43 0c lea 0xc(%ebx),%eax 1062a3: 89 c7 mov %eax,%edi 1062a5: 8b 4d 18 mov 0x18(%ebp),%ecx 1062a8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) node->name [namelen] = '\0'; 1062aa: 8b 45 18 mov 0x18(%ebp),%eax 1062ad: c6 44 03 0c 00 movb $0x0,0xc(%ebx,%eax,1) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1062b2: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 1062b4: 8b 43 04 mov 0x4(%ebx),%eax next->previous = previous; 1062b7: 89 41 04 mov %eax,0x4(%ecx) previous->next = next; 1062ba: 89 08 mov %ecx,(%eax) static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 1062bc: 89 53 08 mov %edx,0x8(%ebx) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 1062bf: 8b 42 58 mov 0x58(%edx),%eax RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 1062c2: 8d 4a 54 lea 0x54(%edx),%ecx 1062c5: 89 0b mov %ecx,(%ebx) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 1062c7: 89 5a 58 mov %ebx,0x58(%edx) old_last->next = the_node; 1062ca: 89 18 mov %ebx,(%eax) the_node->previous = old_last; 1062cc: 89 43 04 mov %eax,0x4(%ebx) IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 1062cf: 50 push %eax 1062d0: 50 push %eax 1062d1: 6a 00 push $0x0 1062d3: 8d 45 e0 lea -0x20(%ebp),%eax 1062d6: 50 push %eax 1062d7: e8 d0 04 00 00 call 1067ac 1062dc: 8b 45 e0 mov -0x20(%ebp),%eax 1062df: 89 43 48 mov %eax,0x48(%ebx) 1062e2: 83 c4 10 add $0x10,%esp const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 1062e5: 31 c0 xor %eax,%eax 1062e7: eb 1b jmp 106304 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 1062e9: e8 ee ab 00 00 call 110edc <__errno> <== NOT EXECUTED 1062ee: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED 1062f4: eb 0b jmp 106301 <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 1062f6: e8 e1 ab 00 00 call 110edc <__errno> <== NOT EXECUTED 1062fb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED rv = -1; 106301: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } return rv; } 106304: 8d 65 f4 lea -0xc(%ebp),%esp 106307: 5b pop %ebx 106308: 5e pop %esi 106309: 5f pop %edi 10630a: 5d pop %ebp 10630b: c3 ret =============================================================================== 001063d4 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1063d4: 55 push %ebp 1063d5: 89 e5 mov %esp,%ebp 1063d7: 83 ec 08 sub $0x8,%esp 1063da: 8b 55 08 mov 0x8(%ebp),%edx int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 1063dd: 8b 42 20 mov 0x20(%edx),%eax 1063e0: 8b 40 08 mov 0x8(%eax),%eax return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 1063e3: 8b 48 4c mov 0x4c(%eax),%ecx if ( IMFS_is_directory( node ) ) { 1063e6: 83 39 00 cmpl $0x0,(%ecx) 1063e9: 75 1d jne 106408 <== NEVER TAKEN if ( node->info.directory.mt_fs == mt_entry ) { 1063eb: 39 50 5c cmp %edx,0x5c(%eax) 1063ee: 75 0b jne 1063fb <== NEVER TAKEN node->info.directory.mt_fs = NULL; 1063f0: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 1063f7: 31 c0 xor %eax,%eax 1063f9: eb 1b jmp 106416 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 1063fb: e8 dc aa 00 00 call 110edc <__errno> <== NOT EXECUTED 106400: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106406: eb 0b jmp 106413 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 106408: e8 cf aa 00 00 call 110edc <__errno> <== NOT EXECUTED 10640d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED rv = -1; 106413: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } return rv; } 106416: c9 leave 106417: c3 ret =============================================================================== 001208e4 : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1208e4: 55 push %ebp <== NOT EXECUTED 1208e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1208e7: 57 push %edi <== NOT EXECUTED 1208e8: 56 push %esi <== NOT EXECUTED 1208e9: 53 push %ebx <== NOT EXECUTED 1208ea: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1208ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 1208f0: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 1208f3: 75 1d jne 120912 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 1208f5: 83 3d 1c ec 16 00 00 cmpl $0x0,0x16ec1c <== NOT EXECUTED 1208fc: 0f 84 f2 00 00 00 je 1209f4 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 120902: bf 18 ec 16 00 mov $0x16ec18,%edi <== NOT EXECUTED the_thread = 0; current = 0; 120907: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 12090e: 31 db xor %ebx,%ebx <== NOT EXECUTED 120910: eb 0f jmp 120921 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 120912: 8d bb b4 00 00 00 lea 0xb4(%ebx),%edi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 120918: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 12091e: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 120921: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED 120924: 8d 50 10 lea 0x10(%eax),%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 120927: 8b 0f mov (%edi),%ecx <== NOT EXECUTED 120929: 83 e9 10 sub $0x10,%ecx <== NOT EXECUTED 12092c: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 12092f: 83 c0 20 add $0x20,%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 120932: 83 e1 fc and $0xfffffffc,%ecx <== NOT EXECUTED 120935: 01 c1 add %eax,%ecx <== NOT EXECUTED 120937: eb 0b jmp 120944 <== NOT EXECUTED if (*base != U32_PATTERN) 120939: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 12093f: 75 0b jne 12094c <== 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++) 120941: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 120944: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 120946: 72 f1 jb 120939 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 120948: 31 f6 xor %esi,%esi <== NOT EXECUTED 12094a: eb 0d jmp 120959 <== NOT EXECUTED 12094c: 31 f6 xor %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 ) 12094e: 85 c0 test %eax,%eax <== NOT EXECUTED 120950: 74 07 je 120959 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 120952: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 120955: 01 d6 add %edx,%esi <== NOT EXECUTED 120957: 29 c6 sub %eax,%esi <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 120959: 85 db test %ebx,%ebx <== NOT EXECUTED 12095b: 74 31 je 12098e <== NOT EXECUTED #endif { (*print_handler)( 12095d: 8b 0d 48 da 16 00 mov 0x16da48,%ecx <== NOT EXECUTED 120963: 50 push %eax <== NOT EXECUTED 120964: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 120967: 50 push %eax <== NOT EXECUTED 120968: 6a 05 push $0x5 <== NOT EXECUTED 12096a: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 12096d: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 120970: e8 0f fc fe ff call 110584 <== NOT EXECUTED 120975: 50 push %eax <== NOT EXECUTED 120976: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 120979: 68 3b ff 14 00 push $0x14ff3b <== NOT EXECUTED 12097e: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED 120984: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 120987: ff d1 call *%ecx <== NOT EXECUTED 120989: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 12098c: eb 17 jmp 1209a5 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 12098e: 53 push %ebx <== NOT EXECUTED 12098f: 6a ff push $0xffffffff <== NOT EXECUTED 120991: 68 48 ff 14 00 push $0x14ff48 <== NOT EXECUTED 120996: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED 12099c: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED 1209a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 1209a5: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 1209a8: 51 push %ecx <== NOT EXECUTED 1209a9: 51 push %ecx <== NOT EXECUTED 1209aa: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1209ad: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 1209b0: 8b 17 mov (%edi),%edx <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 1209b2: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 1209b6: 52 push %edx <== NOT EXECUTED 1209b7: 50 push %eax <== NOT EXECUTED 1209b8: 68 56 ff 14 00 push $0x14ff56 <== NOT EXECUTED 1209bd: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED 1209c3: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1209c9: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1209cc: 83 3d 40 da 16 00 00 cmpl $0x0,0x16da40 <== NOT EXECUTED 1209d3: 75 09 jne 1209de <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 1209d5: 52 push %edx <== NOT EXECUTED 1209d6: 52 push %edx <== NOT EXECUTED 1209d7: 68 74 ff 14 00 push $0x14ff74 <== NOT EXECUTED 1209dc: eb 07 jmp 1209e5 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 1209de: 50 push %eax <== NOT EXECUTED 1209df: 56 push %esi <== NOT EXECUTED 1209e0: 68 81 ff 14 00 push $0x14ff81 <== NOT EXECUTED 1209e5: ff 35 44 da 16 00 pushl 0x16da44 <== NOT EXECUTED 1209eb: ff 15 48 da 16 00 call *0x16da48 <== NOT EXECUTED 1209f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 1209f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1209f7: 5b pop %ebx <== NOT EXECUTED 1209f8: 5e pop %esi <== NOT EXECUTED 1209f9: 5f pop %edi <== NOT EXECUTED 1209fa: 5d pop %ebp <== NOT EXECUTED 1209fb: c3 ret <== NOT EXECUTED =============================================================================== 00120aaa : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 120aaa: 55 push %ebp <== NOT EXECUTED 120aab: 89 e5 mov %esp,%ebp <== NOT EXECUTED 120aad: 56 push %esi <== NOT EXECUTED 120aae: 53 push %ebx <== NOT EXECUTED 120aaf: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 120ab2: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 120ab5: 8a 4d 0c mov 0xc(%ebp),%cl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 120ab8: 8b b3 b8 00 00 00 mov 0xb8(%ebx),%esi <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 120abe: 68 87 ff 14 00 push $0x14ff87 <== NOT EXECUTED 120ac3: 88 4d d4 mov %cl,-0x2c(%ebp) <== NOT EXECUTED 120ac6: e8 91 67 fe ff call 10725c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 120acb: 58 pop %eax <== NOT EXECUTED 120acc: 5a pop %edx <== NOT EXECUTED 120acd: 53 push %ebx <== NOT EXECUTED 120ace: 68 97 ff 14 00 push $0x14ff97 <== NOT EXECUTED 120ad3: e8 84 67 fe ff call 10725c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 120ad8: 59 pop %ecx <== NOT EXECUTED 120ad9: 58 pop %eax <== NOT EXECUTED 120ada: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 120add: 68 b4 ff 14 00 push $0x14ffb4 <== NOT EXECUTED 120ae2: e8 75 67 fe ff call 10725c <== NOT EXECUTED printk( 120ae7: 58 pop %eax <== NOT EXECUTED 120ae8: 5a pop %edx <== NOT EXECUTED 120ae9: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 120aec: 68 c6 ff 14 00 push $0x14ffc6 <== NOT EXECUTED 120af1: e8 66 67 fe ff call 10725c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 120af6: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 120af9: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 120afc: 50 push %eax <== NOT EXECUTED 120afd: 6a 20 push $0x20 <== NOT EXECUTED 120aff: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 120b02: e8 7d fa fe ff call 110584 <== NOT EXECUTED 120b07: 59 pop %ecx <== NOT EXECUTED 120b08: 5a pop %edx <== NOT EXECUTED 120b09: 50 push %eax <== NOT EXECUTED 120b0a: 68 da ff 14 00 push $0x14ffda <== NOT EXECUTED 120b0f: e8 48 67 fe ff call 10725c <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 120b14: 8b 93 b8 00 00 00 mov 0xb8(%ebx),%edx <== NOT EXECUTED 120b1a: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 120b20: 8d 1c 02 lea (%edx,%eax,1),%ebx <== NOT EXECUTED 120b23: 53 push %ebx <== NOT EXECUTED 120b24: 52 push %edx <== NOT EXECUTED 120b25: 50 push %eax <== NOT EXECUTED 120b26: 68 f0 ff 14 00 push $0x14fff0 <== NOT EXECUTED 120b2b: e8 2c 67 fe ff call 10725c <== 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) { 120b30: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 120b33: 8a 4d d4 mov -0x2c(%ebp),%cl <== NOT EXECUTED 120b36: 84 c9 test %cl,%cl <== NOT EXECUTED 120b38: 75 17 jne 120b51 <== NOT EXECUTED printk( 120b3a: 8d 46 18 lea 0x18(%esi),%eax <== NOT EXECUTED 120b3d: 50 push %eax <== NOT EXECUTED ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; 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(stack); 120b3e: 83 c6 08 add $0x8,%esi <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 120b41: 56 push %esi <== NOT EXECUTED 120b42: 6a 10 push $0x10 <== NOT EXECUTED 120b44: 68 21 00 15 00 push $0x150021 <== NOT EXECUTED 120b49: e8 0e 67 fe ff call 10725c <== NOT EXECUTED 120b4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 120b51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 120b54: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 120b59: e8 2e 96 fe ff call 10a18c <== NOT EXECUTED =============================================================================== 0010c774 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10c774: 55 push %ebp 10c775: 89 e5 mov %esp,%ebp 10c777: 53 push %ebx 10c778: 51 push %ecx 10c779: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10c77c: 8b 15 e4 18 13 00 mov 0x1318e4,%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 ); 10c782: 9c pushf 10c783: fa cli 10c784: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10c785: 8b 4b 44 mov 0x44(%ebx),%ecx 10c788: 85 c9 test %ecx,%ecx 10c78a: 75 0b jne 10c797 <_CORE_RWLock_Release+0x23> _ISR_Enable( level ); 10c78c: 50 push %eax 10c78d: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10c78e: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10c795: eb 6c jmp 10c803 <_CORE_RWLock_Release+0x8f> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10c797: 49 dec %ecx 10c798: 75 09 jne 10c7a3 <_CORE_RWLock_Release+0x2f> the_rwlock->number_of_readers -= 1; if ( the_rwlock->number_of_readers != 0 ) { 10c79a: ff 4b 48 decl 0x48(%ebx) 10c79d: 74 04 je 10c7a3 <_CORE_RWLock_Release+0x2f> /* must be unlocked again */ _ISR_Enable( level ); 10c79f: 50 push %eax 10c7a0: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10c7a1: eb 60 jmp 10c803 <_CORE_RWLock_Release+0x8f> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10c7a3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10c7aa: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10c7b1: 50 push %eax 10c7b2: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10c7b3: 83 ec 0c sub $0xc,%esp 10c7b6: 53 push %ebx 10c7b7: e8 80 18 00 00 call 10e03c <_Thread_queue_Dequeue> if ( next ) { 10c7bc: 83 c4 10 add $0x10,%esp 10c7bf: 85 c0 test %eax,%eax 10c7c1: 74 40 je 10c803 <_CORE_RWLock_Release+0x8f> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10c7c3: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c7c7: 75 09 jne 10c7d2 <_CORE_RWLock_Release+0x5e> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10c7c9: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10c7d0: eb 31 jmp 10c803 <_CORE_RWLock_Release+0x8f> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10c7d2: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10c7d5: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10c7dc: 83 ec 0c sub $0xc,%esp 10c7df: 53 push %ebx 10c7e0: e8 1b 1c 00 00 call 10e400 <_Thread_queue_First> if ( !next || 10c7e5: 83 c4 10 add $0x10,%esp 10c7e8: 85 c0 test %eax,%eax 10c7ea: 74 17 je 10c803 <_CORE_RWLock_Release+0x8f> 10c7ec: 83 78 30 01 cmpl $0x1,0x30(%eax) 10c7f0: 74 11 je 10c803 <_CORE_RWLock_Release+0x8f><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10c7f2: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10c7f5: 52 push %edx 10c7f6: 52 push %edx 10c7f7: 50 push %eax 10c7f8: 53 push %ebx 10c7f9: e8 fa 1a 00 00 call 10e2f8 <_Thread_queue_Extract> } 10c7fe: 83 c4 10 add $0x10,%esp 10c801: eb d9 jmp 10c7dc <_CORE_RWLock_Release+0x68> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10c803: 31 c0 xor %eax,%eax 10c805: 8b 5d fc mov -0x4(%ebp),%ebx 10c808: c9 leave 10c809: c3 ret =============================================================================== 0010c80c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c812: 8d 45 f4 lea -0xc(%ebp),%eax 10c815: 50 push %eax 10c816: ff 75 08 pushl 0x8(%ebp) 10c819: e8 d6 14 00 00 call 10dcf4 <_Thread_Get> switch ( location ) { 10c81e: 83 c4 10 add $0x10,%esp 10c821: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c825: 75 1c jne 10c843 <_CORE_RWLock_Timeout+0x37><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c827: 83 ec 0c sub $0xc,%esp 10c82a: 50 push %eax 10c82b: e8 84 1c 00 00 call 10e4b4 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10c830: a1 dc 13 13 00 mov 0x1313dc,%eax 10c835: 48 dec %eax 10c836: a3 dc 13 13 00 mov %eax,0x1313dc return _Thread_Dispatch_disable_level; 10c83b: a1 dc 13 13 00 mov 0x1313dc,%eax 10c840: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c843: c9 leave 10c844: c3 ret =============================================================================== 0010a9a4 <_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 ) { 10a9a4: 55 push %ebp 10a9a5: 89 e5 mov %esp,%ebp 10a9a7: 53 push %ebx 10a9a8: 83 ec 10 sub $0x10,%esp 10a9ab: 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)) ) { 10a9ae: 53 push %ebx 10a9af: e8 c0 17 00 00 call 10c174 <_Thread_queue_Dequeue> 10a9b4: 83 c4 10 add $0x10,%esp { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10a9b7: 31 d2 xor %edx,%edx if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10a9b9: 85 c0 test %eax,%eax 10a9bb: 75 15 jne 10a9d2 <_CORE_semaphore_Surrender+0x2e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10a9bd: 9c pushf 10a9be: fa cli 10a9bf: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10a9c0: 8b 43 48 mov 0x48(%ebx),%eax the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10a9c3: b2 04 mov $0x4,%dl (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10a9c5: 3b 43 40 cmp 0x40(%ebx),%eax 10a9c8: 73 06 jae 10a9d0 <_CORE_semaphore_Surrender+0x2c><== NEVER TAKEN the_semaphore->count += 1; 10a9ca: 40 inc %eax 10a9cb: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10a9ce: 30 d2 xor %dl,%dl _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10a9d0: 51 push %ecx 10a9d1: 9d popf } return status; } 10a9d2: 89 d0 mov %edx,%eax 10a9d4: 8b 5d fc mov -0x4(%ebp),%ebx 10a9d7: c9 leave 10a9d8: c3 ret =============================================================================== 00109a10 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109a10: 55 push %ebp 109a11: 89 e5 mov %esp,%ebp 109a13: 57 push %edi 109a14: 56 push %esi 109a15: 53 push %ebx 109a16: 83 ec 1c sub $0x1c,%esp 109a19: 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 ]; 109a1c: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi option_set = (rtems_option) the_thread->Wait.option; 109a22: 8b 43 30 mov 0x30(%ebx),%eax 109a25: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109a28: 9c pushf 109a29: fa cli 109a2a: 58 pop %eax pending_events = api->pending_events; 109a2b: 8b 16 mov (%esi),%edx 109a2d: 89 55 e4 mov %edx,-0x1c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109a30: 8b 4b 24 mov 0x24(%ebx),%ecx seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109a33: 21 ca and %ecx,%edx 109a35: 75 05 jne 109a3c <_Event_Surrender+0x2c> 109a37: e9 ab 00 00 00 jmp 109ae7 <_Event_Surrender+0xd7> /* * 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() && 109a3c: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8 109a43: 74 47 je 109a8c <_Event_Surrender+0x7c> 109a45: 3b 1d ec e8 12 00 cmp 0x12e8ec,%ebx 109a4b: 75 3f jne 109a8c <_Event_Surrender+0x7c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109a4d: 8b 3d c8 ec 12 00 mov 0x12ecc8,%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() && _Thread_Is_executing( the_thread ) && 109a53: 83 ff 02 cmp $0x2,%edi 109a56: 74 09 je 109a61 <_Event_Surrender+0x51> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109a58: 8b 3d c8 ec 12 00 mov 0x12ecc8,%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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109a5e: 4f dec %edi 109a5f: 75 2b jne 109a8c <_Event_Surrender+0x7c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109a61: 39 ca cmp %ecx,%edx 109a63: 74 06 je 109a6b <_Event_Surrender+0x5b> 109a65: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109a69: 74 7c je 109ae7 <_Event_Surrender+0xd7> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 109a6b: 89 d1 mov %edx,%ecx 109a6d: f7 d1 not %ecx 109a6f: 23 4d e4 and -0x1c(%ebp),%ecx 109a72: 89 0e mov %ecx,(%esi) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 109a74: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109a7b: 8b 4b 28 mov 0x28(%ebx),%ecx 109a7e: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109a80: c7 05 c8 ec 12 00 03 movl $0x3,0x12ecc8 109a87: 00 00 00 109a8a: eb 5b jmp 109ae7 <_Event_Surrender+0xd7> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109a8c: f6 43 11 01 testb $0x1,0x11(%ebx) 109a90: 74 55 je 109ae7 <_Event_Surrender+0xd7> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109a92: 39 ca cmp %ecx,%edx 109a94: 74 06 je 109a9c <_Event_Surrender+0x8c> 109a96: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109a9a: 74 4b je 109ae7 <_Event_Surrender+0xd7> <== NEVER TAKEN 109a9c: 89 d1 mov %edx,%ecx 109a9e: f7 d1 not %ecx 109aa0: 23 4d e4 and -0x1c(%ebp),%ecx 109aa3: 89 0e mov %ecx,(%esi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 109aa5: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109aac: 8b 4b 28 mov 0x28(%ebx),%ecx 109aaf: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109ab1: 50 push %eax 109ab2: 9d popf 109ab3: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109ab4: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109ab8: 74 06 je 109ac0 <_Event_Surrender+0xb0> _ISR_Enable( level ); 109aba: 50 push %eax 109abb: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109abc: 51 push %ecx 109abd: 51 push %ecx 109abe: eb 17 jmp 109ad7 <_Event_Surrender+0xc7> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109ac0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109ac7: 50 push %eax 109ac8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109ac9: 83 ec 0c sub $0xc,%esp 109acc: 8d 43 48 lea 0x48(%ebx),%eax 109acf: 50 push %eax 109ad0: e8 43 2f 00 00 call 10ca18 <_Watchdog_Remove> 109ad5: 58 pop %eax 109ad6: 5a pop %edx 109ad7: 68 f8 ff 03 10 push $0x1003fff8 109adc: 53 push %ebx 109add: e8 fa 1f 00 00 call 10badc <_Thread_Clear_state> 109ae2: 83 c4 10 add $0x10,%esp 109ae5: eb 02 jmp 109ae9 <_Event_Surrender+0xd9> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109ae7: 50 push %eax 109ae8: 9d popf } 109ae9: 8d 65 f4 lea -0xc(%ebp),%esp 109aec: 5b pop %ebx 109aed: 5e pop %esi 109aee: 5f pop %edi 109aef: 5d pop %ebp 109af0: c3 ret =============================================================================== 00109af4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109af4: 55 push %ebp 109af5: 89 e5 mov %esp,%ebp 109af7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109afa: 8d 45 f4 lea -0xc(%ebp),%eax 109afd: 50 push %eax 109afe: ff 75 08 pushl 0x8(%ebp) 109b01: e8 26 23 00 00 call 10be2c <_Thread_Get> switch ( location ) { 109b06: 83 c4 10 add $0x10,%esp 109b09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109b0d: 75 4e jne 109b5d <_Event_Timeout+0x69> <== 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 ); 109b0f: 9c pushf 109b10: fa cli 109b11: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109b12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109b19: 3b 05 ec e8 12 00 cmp 0x12e8ec,%eax 109b1f: 75 13 jne 109b34 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109b21: 8b 0d c8 ec 12 00 mov 0x12ecc8,%ecx 109b27: 49 dec %ecx 109b28: 75 0a jne 109b34 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109b2a: c7 05 c8 ec 12 00 02 movl $0x2,0x12ecc8 109b31: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109b34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109b3b: 52 push %edx 109b3c: 9d popf 109b3d: 52 push %edx 109b3e: 52 push %edx 109b3f: 68 f8 ff 03 10 push $0x1003fff8 109b44: 50 push %eax 109b45: e8 92 1f 00 00 call 10badc <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 109b4a: a1 e4 e3 12 00 mov 0x12e3e4,%eax 109b4f: 48 dec %eax 109b50: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 109b55: a1 e4 e3 12 00 mov 0x12e3e4,%eax 109b5a: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109b5d: c9 leave 109b5e: c3 ret =============================================================================== 0010f33f <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 10f33f: 55 push %ebp 10f340: 89 e5 mov %esp,%ebp 10f342: 57 push %edi 10f343: 56 push %esi 10f344: 53 push %ebx 10f345: 83 ec 4c sub $0x4c,%esp 10f348: 8b 5d 08 mov 0x8(%ebp),%ebx 10f34b: 8b 45 10 mov 0x10(%ebp),%eax Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 10f34e: 8b 4b 20 mov 0x20(%ebx),%ecx 10f351: 89 4d b8 mov %ecx,-0x48(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 10f354: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Heap_Block *extend_last_block = NULL; 10f35b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const page_size = heap->page_size; 10f362: 8b 73 10 mov 0x10(%ebx),%esi 10f365: 89 75 bc mov %esi,-0x44(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10f368: 8b 53 14 mov 0x14(%ebx),%edx uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 10f36b: 8b 4b 30 mov 0x30(%ebx),%ecx 10f36e: 89 4d b4 mov %ecx,-0x4c(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 10f371: 8b 75 0c mov 0xc(%ebp),%esi 10f374: 01 c6 add %eax,%esi 10f376: 89 75 d4 mov %esi,-0x2c(%ebp) 10f379: 73 07 jae 10f382 <_Heap_Extend+0x43> return false; 10f37b: 31 c0 xor %eax,%eax 10f37d: e9 cb 01 00 00 jmp 10f54d <_Heap_Extend+0x20e> } extend_area_ok = _Heap_Get_first_and_last_block( 10f382: 51 push %ecx 10f383: 51 push %ecx 10f384: 8d 4d e4 lea -0x1c(%ebp),%ecx 10f387: 51 push %ecx 10f388: 8d 4d e0 lea -0x20(%ebp),%ecx 10f38b: 51 push %ecx 10f38c: 52 push %edx 10f38d: ff 75 bc pushl -0x44(%ebp) 10f390: 50 push %eax 10f391: ff 75 0c pushl 0xc(%ebp) 10f394: e8 89 b8 ff ff call 10ac22 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 10f399: 83 c4 20 add $0x20,%esp 10f39c: 84 c0 test %al,%al 10f39e: 74 db je 10f37b <_Heap_Extend+0x3c> 10f3a0: 8b 4d b8 mov -0x48(%ebp),%ecx 10f3a3: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10f3aa: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 10f3b1: 31 ff xor %edi,%edi 10f3b3: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 10f3ba: 8b 73 18 mov 0x18(%ebx),%esi 10f3bd: 89 75 c0 mov %esi,-0x40(%ebp) 10f3c0: eb 03 jmp 10f3c5 <_Heap_Extend+0x86> 10f3c2: 89 4d c0 mov %ecx,-0x40(%ebp) uintptr_t const sub_area_end = start_block->prev_size; 10f3c5: 8b 01 mov (%ecx),%eax 10f3c7: 89 45 d0 mov %eax,-0x30(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f3ca: 89 c6 mov %eax,%esi 10f3cc: 83 ee 08 sub $0x8,%esi 10f3cf: 31 d2 xor %edx,%edx 10f3d1: f7 75 bc divl -0x44(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10f3d4: 29 d6 sub %edx,%esi Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 10f3d6: 8b 55 c0 mov -0x40(%ebp),%edx 10f3d9: 39 55 d4 cmp %edx,-0x2c(%ebp) 10f3dc: 76 08 jbe 10f3e6 <_Heap_Extend+0xa7> 10f3de: 8b 45 d0 mov -0x30(%ebp),%eax 10f3e1: 39 45 0c cmp %eax,0xc(%ebp) 10f3e4: 72 95 jb 10f37b <_Heap_Extend+0x3c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10f3e6: 8b 55 c0 mov -0x40(%ebp),%edx 10f3e9: 39 55 d4 cmp %edx,-0x2c(%ebp) 10f3ec: 74 0a je 10f3f8 <_Heap_Extend+0xb9> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10f3ee: 8b 45 d0 mov -0x30(%ebp),%eax 10f3f1: 39 45 d4 cmp %eax,-0x2c(%ebp) 10f3f4: 72 07 jb 10f3fd <_Heap_Extend+0xbe> 10f3f6: eb 08 jmp 10f400 <_Heap_Extend+0xc1> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10f3f8: 89 4d cc mov %ecx,-0x34(%ebp) 10f3fb: eb 03 jmp 10f400 <_Heap_Extend+0xc1> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10f3fd: 89 4d c4 mov %ecx,-0x3c(%ebp) link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 10f400: 8b 55 0c mov 0xc(%ebp),%edx 10f403: 39 55 d0 cmp %edx,-0x30(%ebp) 10f406: 75 09 jne 10f411 <_Heap_Extend+0xd2> start_block->prev_size = extend_area_end; 10f408: 8b 45 d4 mov -0x2c(%ebp),%eax 10f40b: 89 01 mov %eax,(%ecx) 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 ) 10f40d: 89 f7 mov %esi,%edi 10f40f: eb 05 jmp 10f416 <_Heap_Extend+0xd7> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 10f411: 73 03 jae 10f416 <_Heap_Extend+0xd7> 10f413: 89 75 c8 mov %esi,-0x38(%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; 10f416: 8b 4e 04 mov 0x4(%esi),%ecx 10f419: 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); 10f41c: 01 f1 add %esi,%ecx link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 10f41e: 3b 4d b8 cmp -0x48(%ebp),%ecx 10f421: 75 9f jne 10f3c2 <_Heap_Extend+0x83> if ( extend_area_begin < heap->area_begin ) { 10f423: 8b 4d 0c mov 0xc(%ebp),%ecx 10f426: 3b 4b 18 cmp 0x18(%ebx),%ecx 10f429: 73 05 jae 10f430 <_Heap_Extend+0xf1> heap->area_begin = extend_area_begin; 10f42b: 89 4b 18 mov %ecx,0x18(%ebx) 10f42e: eb 0b jmp 10f43b <_Heap_Extend+0xfc> } else if ( heap->area_end < extend_area_end ) { 10f430: 8b 75 d4 mov -0x2c(%ebp),%esi 10f433: 39 73 1c cmp %esi,0x1c(%ebx) 10f436: 73 03 jae 10f43b <_Heap_Extend+0xfc> heap->area_end = extend_area_end; 10f438: 89 73 1c mov %esi,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 10f43b: 8b 45 e4 mov -0x1c(%ebp),%eax 10f43e: 8b 55 e0 mov -0x20(%ebp),%edx heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 10f441: 89 c1 mov %eax,%ecx 10f443: 29 d1 sub %edx,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 10f445: 8b 75 d4 mov -0x2c(%ebp),%esi 10f448: 89 32 mov %esi,(%edx) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 10f44a: 89 ce mov %ecx,%esi 10f44c: 83 ce 01 or $0x1,%esi 10f44f: 89 72 04 mov %esi,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 10f452: 89 08 mov %ecx,(%eax) extend_last_block->size_and_flag = 0; 10f454: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 10f45b: 39 53 20 cmp %edx,0x20(%ebx) 10f45e: 76 05 jbe 10f465 <_Heap_Extend+0x126> heap->first_block = extend_first_block; 10f460: 89 53 20 mov %edx,0x20(%ebx) 10f463: eb 08 jmp 10f46d <_Heap_Extend+0x12e> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 10f465: 39 43 24 cmp %eax,0x24(%ebx) 10f468: 73 03 jae 10f46d <_Heap_Extend+0x12e> heap->last_block = extend_last_block; 10f46a: 89 43 24 mov %eax,0x24(%ebx) } if ( merge_below_block != NULL ) { 10f46d: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10f471: 74 35 je 10f4a8 <_Heap_Extend+0x169> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 10f473: 8b 73 10 mov 0x10(%ebx),%esi uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10f476: 8b 4d 0c mov 0xc(%ebp),%ecx 10f479: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10f47c: 89 c8 mov %ecx,%eax 10f47e: 31 d2 xor %edx,%edx 10f480: f7 f6 div %esi if ( remainder != 0 ) { 10f482: 85 d2 test %edx,%edx 10f484: 74 04 je 10f48a <_Heap_Extend+0x14b> return value - remainder + alignment; 10f486: 01 f1 add %esi,%ecx 10f488: 29 d1 sub %edx,%ecx uintptr_t const new_first_block_begin = 10f48a: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 10f48d: 8b 75 cc mov -0x34(%ebp),%esi 10f490: 8b 06 mov (%esi),%eax 10f492: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 10f495: 89 f0 mov %esi,%eax 10f497: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 10f499: 83 c8 01 or $0x1,%eax 10f49c: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 10f49f: 89 d8 mov %ebx,%eax 10f4a1: e8 7e fe ff ff call 10f324 <_Heap_Free_block> 10f4a6: eb 11 jmp 10f4b9 <_Heap_Extend+0x17a> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 10f4a8: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10f4ac: 74 0b je 10f4b9 <_Heap_Extend+0x17a> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 10f4ae: 8b 55 c4 mov -0x3c(%ebp),%edx 10f4b1: 29 c2 sub %eax,%edx 10f4b3: 83 ca 01 or $0x1,%edx 10f4b6: 89 50 04 mov %edx,0x4(%eax) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 10f4b9: 85 ff test %edi,%edi 10f4bb: 74 33 je 10f4f0 <_Heap_Extend+0x1b1> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 10f4bd: 8b 4d d4 mov -0x2c(%ebp),%ecx 10f4c0: 83 e9 08 sub $0x8,%ecx uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 10f4c3: 29 f9 sub %edi,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f4c5: 89 c8 mov %ecx,%eax 10f4c7: 31 d2 xor %edx,%edx 10f4c9: f7 73 10 divl 0x10(%ebx) 10f4cc: 29 d1 sub %edx,%ecx ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 10f4ce: 8b 47 04 mov 0x4(%edi),%eax 10f4d1: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 10f4d3: 83 c8 01 or $0x1,%eax 10f4d6: 89 44 39 04 mov %eax,0x4(%ecx,%edi,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f4da: 8b 47 04 mov 0x4(%edi),%eax 10f4dd: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 10f4e0: 09 c8 or %ecx,%eax 10f4e2: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 10f4e5: 89 fa mov %edi,%edx 10f4e7: 89 d8 mov %ebx,%eax 10f4e9: e8 36 fe ff ff call 10f324 <_Heap_Free_block> 10f4ee: eb 20 jmp 10f510 <_Heap_Extend+0x1d1> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 10f4f0: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10f4f4: 74 1a je 10f510 <_Heap_Extend+0x1d1> _Heap_Link_above( 10f4f6: 8b 4d e4 mov -0x1c(%ebp),%ecx RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f4f9: 8b 75 c8 mov -0x38(%ebp),%esi 10f4fc: 8b 46 04 mov 0x4(%esi),%eax 10f4ff: 83 e0 01 and $0x1,%eax ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 10f502: 8b 55 e0 mov -0x20(%ebp),%edx 10f505: 29 f2 sub %esi,%edx block->size_and_flag = size | flag; 10f507: 09 d0 or %edx,%eax 10f509: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10f50c: 83 49 04 01 orl $0x1,0x4(%ecx) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 10f510: 85 ff test %edi,%edi 10f512: 75 10 jne 10f524 <_Heap_Extend+0x1e5> 10f514: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10f518: 75 0a jne 10f524 <_Heap_Extend+0x1e5> _Heap_Free_block( heap, extend_first_block ); 10f51a: 8b 55 e0 mov -0x20(%ebp),%edx 10f51d: 89 d8 mov %ebx,%eax 10f51f: e8 00 fe ff ff call 10f324 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 10f524: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f527: 8b 42 04 mov 0x4(%edx),%eax 10f52a: 83 e0 01 and $0x1,%eax * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10f52d: 8b 4b 20 mov 0x20(%ebx),%ecx 10f530: 29 d1 sub %edx,%ecx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10f532: 09 c8 or %ecx,%eax 10f534: 89 42 04 mov %eax,0x4(%edx) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 10f537: 8b 43 30 mov 0x30(%ebx),%eax 10f53a: 2b 45 b4 sub -0x4c(%ebp),%eax /* Statistics */ stats->size += extended_size; 10f53d: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 10f540: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f544: 74 05 je 10f54b <_Heap_Extend+0x20c> <== NEVER TAKEN *extended_size_ptr = extended_size; 10f546: 8b 4d 14 mov 0x14(%ebp),%ecx 10f549: 89 01 mov %eax,(%ecx) return true; 10f54b: b0 01 mov $0x1,%al } 10f54d: 8d 65 f4 lea -0xc(%ebp),%esp 10f550: 5b pop %ebx 10f551: 5e pop %esi 10f552: 5f pop %edi 10f553: 5d pop %ebp 10f554: c3 ret =============================================================================== 0010f2d4 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10f2d4: 55 push %ebp 10f2d5: 89 e5 mov %esp,%ebp 10f2d7: 57 push %edi 10f2d8: 56 push %esi 10f2d9: 53 push %ebx 10f2da: 83 ec 14 sub $0x14,%esp 10f2dd: 8b 4d 08 mov 0x8(%ebp),%ecx 10f2e0: 8b 45 0c mov 0xc(%ebp),%eax /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 10f2e3: 85 c0 test %eax,%eax 10f2e5: 0f 84 46 01 00 00 je 10f431 <_Heap_Free+0x15d> 10f2eb: 8d 58 f8 lea -0x8(%eax),%ebx 10f2ee: 31 d2 xor %edx,%edx 10f2f0: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10f2f3: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10f2f5: 8b 41 20 mov 0x20(%ecx),%eax 10f2f8: 89 45 e8 mov %eax,-0x18(%ebp) && (uintptr_t) block <= (uintptr_t) heap->last_block; 10f2fb: 31 d2 xor %edx,%edx 10f2fd: 39 c3 cmp %eax,%ebx 10f2ff: 72 08 jb 10f309 <_Heap_Free+0x35> 10f301: 31 d2 xor %edx,%edx 10f303: 39 59 24 cmp %ebx,0x24(%ecx) 10f306: 0f 93 c2 setae %dl alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10f309: 31 c0 xor %eax,%eax } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10f30b: 85 d2 test %edx,%edx 10f30d: 0f 84 20 01 00 00 je 10f433 <_Heap_Free+0x15f> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10f313: 8b 43 04 mov 0x4(%ebx),%eax 10f316: 89 45 ec mov %eax,-0x14(%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; 10f319: 89 c7 mov %eax,%edi 10f31b: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10f31e: 8d 14 1f lea (%edi,%ebx,1),%edx 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; 10f321: 31 f6 xor %esi,%esi 10f323: 3b 55 e8 cmp -0x18(%ebp),%edx 10f326: 72 0a jb 10f332 <_Heap_Free+0x5e> <== NEVER TAKEN 10f328: 31 c0 xor %eax,%eax 10f32a: 39 51 24 cmp %edx,0x24(%ecx) 10f32d: 0f 93 c0 setae %al 10f330: 89 c6 mov %eax,%esi alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10f332: 31 c0 xor %eax,%eax _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10f334: 85 f6 test %esi,%esi 10f336: 0f 84 f7 00 00 00 je 10f433 <_Heap_Free+0x15f> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10f33c: 8b 72 04 mov 0x4(%edx),%esi return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 10f33f: f7 c6 01 00 00 00 test $0x1,%esi 10f345: 0f 84 e8 00 00 00 je 10f433 <_Heap_Free+0x15f> <== 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; 10f34b: 83 e6 fe and $0xfffffffe,%esi 10f34e: 89 75 f0 mov %esi,-0x10(%ebp) if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10f351: 8b 41 24 mov 0x24(%ecx),%eax 10f354: 89 45 e0 mov %eax,-0x20(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10f357: 39 c2 cmp %eax,%edx 10f359: 74 0c je 10f367 <_Heap_Free+0x93> 10f35b: 8b 74 32 04 mov 0x4(%edx,%esi,1),%esi 10f35f: 83 f6 01 xor $0x1,%esi 10f362: 83 e6 01 and $0x1,%esi 10f365: eb 02 jmp 10f369 <_Heap_Free+0x95> 10f367: 31 f6 xor %esi,%esi if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10f369: 89 f0 mov %esi,%eax 10f36b: 88 45 e7 mov %al,-0x19(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10f36e: f6 45 ec 01 testb $0x1,-0x14(%ebp) 10f372: 75 5e jne 10f3d2 <_Heap_Free+0xfe> uintptr_t const prev_size = block->prev_size; 10f374: 8b 33 mov (%ebx),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10f376: 29 f3 sub %esi,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10f378: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 10f37f: 3b 5d e8 cmp -0x18(%ebp),%ebx 10f382: 72 0b jb 10f38f <_Heap_Free+0xbb> <== NEVER TAKEN 10f384: 31 c0 xor %eax,%eax 10f386: 39 5d e0 cmp %ebx,-0x20(%ebp) 10f389: 0f 93 c0 setae %al 10f38c: 89 45 ec mov %eax,-0x14(%ebp) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10f38f: 31 c0 xor %eax,%eax if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10f391: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 10f395: 0f 84 98 00 00 00 je 10f433 <_Heap_Free+0x15f> <== 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) ) { 10f39b: f6 43 04 01 testb $0x1,0x4(%ebx) 10f39f: 0f 84 8e 00 00 00 je 10f433 <_Heap_Free+0x15f> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10f3a5: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f3a9: 8d 34 37 lea (%edi,%esi,1),%esi 10f3ac: 74 14 je 10f3c2 <_Heap_Free+0xee> uintptr_t const size = block_size + prev_size + next_block_size; 10f3ae: 03 75 f0 add -0x10(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10f3b1: 8b 42 08 mov 0x8(%edx),%eax Heap_Block *prev = block->prev; 10f3b4: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 10f3b7: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 10f3ba: 89 50 0c mov %edx,0xc(%eax) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10f3bd: ff 49 38 decl 0x38(%ecx) 10f3c0: eb 2d jmp 10f3ef <_Heap_Free+0x11b> 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f3c2: 89 f0 mov %esi,%eax 10f3c4: 83 c8 01 or $0x1,%eax 10f3c7: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f3ca: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 10f3ce: 89 32 mov %esi,(%edx) 10f3d0: eb 56 jmp 10f428 <_Heap_Free+0x154> } } else if ( next_is_free ) { /* coalesce next */ 10f3d2: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10f3d6: 74 24 je 10f3fc <_Heap_Free+0x128> uintptr_t const size = block_size + next_block_size; 10f3d8: 8b 75 f0 mov -0x10(%ebp),%esi 10f3db: 01 fe add %edi,%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10f3dd: 8b 42 08 mov 0x8(%edx),%eax Heap_Block *prev = old_block->prev; 10f3e0: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10f3e3: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = prev; 10f3e6: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 10f3e9: 89 58 0c mov %ebx,0xc(%eax) prev->next = new_block; 10f3ec: 89 5a 08 mov %ebx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f3ef: 89 f0 mov %esi,%eax 10f3f1: 83 c8 01 or $0x1,%eax 10f3f4: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10f3f7: 89 34 1e mov %esi,(%esi,%ebx,1) 10f3fa: eb 2c jmp 10f428 <_Heap_Free+0x154> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10f3fc: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 10f3ff: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 10f402: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10f405: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10f408: 89 58 0c mov %ebx,0xc(%eax) } 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; 10f40b: 89 f8 mov %edi,%eax 10f40d: 83 c8 01 or $0x1,%eax 10f410: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f413: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 10f417: 89 3a mov %edi,(%edx) /* Statistics */ ++stats->free_blocks; 10f419: 8b 41 38 mov 0x38(%ecx),%eax 10f41c: 40 inc %eax 10f41d: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 10f420: 39 41 3c cmp %eax,0x3c(%ecx) 10f423: 73 03 jae 10f428 <_Heap_Free+0x154> stats->max_free_blocks = stats->free_blocks; 10f425: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10f428: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10f42b: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10f42e: 01 79 30 add %edi,0x30(%ecx) * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 10f431: b0 01 mov $0x1,%al --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10f433: 83 c4 14 add $0x14,%esp 10f436: 5b pop %ebx 10f437: 5e pop %esi 10f438: 5f pop %edi 10f439: 5d pop %ebp 10f43a: c3 ret =============================================================================== 0010c528 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 10c528: 55 push %ebp 10c529: 89 e5 mov %esp,%ebp 10c52b: 57 push %edi 10c52c: 56 push %esi 10c52d: 53 push %ebx 10c52e: 83 ec 1c sub $0x1c,%esp 10c531: 8b 5d 08 mov 0x8(%ebp),%ebx Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 10c534: 31 f6 xor %esi,%esi const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; 10c536: 31 c9 xor %ecx,%ecx Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 10c538: eb 2d jmp 10c567 <_Heap_Greedy_allocate+0x3f> * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 10c53a: 6a 00 push $0x0 10c53c: 6a 00 push $0x0 10c53e: 8b 45 0c mov 0xc(%ebp),%eax 10c541: ff 34 b0 pushl (%eax,%esi,4) 10c544: 53 push %ebx 10c545: 89 4d e4 mov %ecx,-0x1c(%ebp) 10c548: e8 bb 67 00 00 call 112d08 <_Heap_Allocate_aligned_with_boundary> void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { 10c54d: 83 c4 10 add $0x10,%esp 10c550: 85 c0 test %eax,%eax 10c552: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c555: 74 0f je 10c566 <_Heap_Greedy_allocate+0x3e><== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c557: 8d 78 f8 lea -0x8(%eax),%edi 10c55a: 31 d2 xor %edx,%edx 10c55c: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10c55f: 29 d7 sub %edx,%edi Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; 10c561: 89 4f 08 mov %ecx,0x8(%edi) 10c564: 89 f9 mov %edi,%ecx Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 10c566: 46 inc %esi 10c567: 3b 75 10 cmp 0x10(%ebp),%esi 10c56a: 75 ce jne 10c53a <_Heap_Greedy_allocate+0x12> 10c56c: 31 f6 xor %esi,%esi 10c56e: eb 23 jmp 10c593 <_Heap_Greedy_allocate+0x6b> } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c570: 8b 47 04 mov 0x4(%edi),%eax 10c573: 83 e0 fe and $0xfffffffe,%eax allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { _Heap_Block_allocate( 10c576: 83 e8 08 sub $0x8,%eax 10c579: 50 push %eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c57a: 8d 47 08 lea 0x8(%edi),%eax 10c57d: 50 push %eax 10c57e: 57 push %edi 10c57f: 53 push %ebx 10c580: 89 4d e4 mov %ecx,-0x1c(%ebp) 10c583: e8 8e 02 00 00 call 10c816 <_Heap_Block_allocate> current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 10c588: 89 77 08 mov %esi,0x8(%edi) 10c58b: 89 fe mov %edi,%esi 10c58d: 83 c4 10 add $0x10,%esp 10c590: 8b 4d e4 mov -0x1c(%ebp),%ecx return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c593: 8b 7b 08 mov 0x8(%ebx),%edi next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 10c596: 39 df cmp %ebx,%edi 10c598: 75 d6 jne 10c570 <_Heap_Greedy_allocate+0x48> 10c59a: eb 14 jmp 10c5b0 <_Heap_Greedy_allocate+0x88> blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 10c59c: 8b 79 08 mov 0x8(%ecx),%edi _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 10c59f: 50 push %eax 10c5a0: 50 push %eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c5a1: 83 c1 08 add $0x8,%ecx 10c5a4: 51 push %ecx 10c5a5: 53 push %ebx 10c5a6: e8 b5 68 00 00 call 112e60 <_Heap_Free> 10c5ab: 83 c4 10 add $0x10,%esp blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 10c5ae: 89 f9 mov %edi,%ecx current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 10c5b0: 85 c9 test %ecx,%ecx 10c5b2: 75 e8 jne 10c59c <_Heap_Greedy_allocate+0x74> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } 10c5b4: 89 f0 mov %esi,%eax 10c5b6: 8d 65 f4 lea -0xc(%ebp),%esp 10c5b9: 5b pop %ebx 10c5ba: 5e pop %esi 10c5bb: 5f pop %edi 10c5bc: 5d pop %ebp 10c5bd: c3 ret =============================================================================== 00112620 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 112620: 55 push %ebp 112621: 89 e5 mov %esp,%ebp 112623: 56 push %esi 112624: 53 push %ebx 112625: 8b 45 08 mov 0x8(%ebp),%eax Heap_Block *current = heap->first_block; 112628: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *end = heap->last_block; 11262b: 8b 58 24 mov 0x24(%eax),%ebx bool stop = false; 11262e: 31 c0 xor %eax,%eax while ( !stop && current != end ) { 112630: eb 1f jmp 112651 <_Heap_Iterate+0x31> 112632: 8b 42 04 mov 0x4(%edx),%eax 112635: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 112638: 8d 34 02 lea (%edx,%eax,1),%esi uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); 11263b: ff 75 10 pushl 0x10(%ebp) block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 11263e: 8b 4e 04 mov 0x4(%esi),%ecx 112641: 83 e1 01 and $0x1,%ecx 112644: 51 push %ecx 112645: 50 push %eax 112646: 52 push %edx 112647: 8b 55 0c mov 0xc(%ebp),%edx 11264a: ff d2 call *%edx 11264c: 89 f2 mov %esi,%edx 11264e: 83 c4 10 add $0x10,%esp { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 112651: 39 da cmp %ebx,%edx 112653: 74 04 je 112659 <_Heap_Iterate+0x39> 112655: fe c8 dec %al 112657: 75 d9 jne 112632 <_Heap_Iterate+0x12> <== ALWAYS TAKEN stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } 112659: 8d 65 f8 lea -0x8(%ebp),%esp 11265c: 5b pop %ebx 11265d: 5e pop %esi 11265e: 5d pop %ebp 11265f: c3 ret =============================================================================== 0010f534 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 10f534: 55 push %ebp 10f535: 89 e5 mov %esp,%ebp 10f537: 57 push %edi 10f538: 56 push %esi 10f539: 53 push %ebx 10f53a: 8b 5d 08 mov 0x8(%ebp),%ebx 10f53d: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f540: 8d 4e f8 lea -0x8(%esi),%ecx 10f543: 89 f0 mov %esi,%eax 10f545: 31 d2 xor %edx,%edx 10f547: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10f54a: 29 d1 sub %edx,%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 10f54c: 8b 53 20 mov 0x20(%ebx),%edx && (uintptr_t) block <= (uintptr_t) heap->last_block; 10f54f: 31 ff xor %edi,%edi 10f551: 39 d1 cmp %edx,%ecx 10f553: 72 0a jb 10f55f <_Heap_Size_of_alloc_area+0x2b> 10f555: 31 c0 xor %eax,%eax 10f557: 39 4b 24 cmp %ecx,0x24(%ebx) 10f55a: 0f 93 c0 setae %al 10f55d: 89 c7 mov %eax,%edi Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10f55f: 31 c0 xor %eax,%eax uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10f561: 85 ff test %edi,%edi 10f563: 74 30 je 10f595 <_Heap_Size_of_alloc_area+0x61> - 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; 10f565: 8b 41 04 mov 0x4(%ecx),%eax 10f568: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10f56b: 01 c1 add %eax,%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; 10f56d: 31 ff xor %edi,%edi 10f56f: 39 d1 cmp %edx,%ecx 10f571: 72 0a jb 10f57d <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN 10f573: 31 c0 xor %eax,%eax 10f575: 39 4b 24 cmp %ecx,0x24(%ebx) 10f578: 0f 93 c0 setae %al 10f57b: 89 c7 mov %eax,%edi return false; 10f57d: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 10f57f: 85 ff test %edi,%edi 10f581: 74 12 je 10f595 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 10f583: f6 41 04 01 testb $0x1,0x4(%ecx) 10f587: 74 0c je 10f595 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 10f589: 29 f1 sub %esi,%ecx 10f58b: 8d 51 04 lea 0x4(%ecx),%edx 10f58e: 8b 45 10 mov 0x10(%ebp),%eax 10f591: 89 10 mov %edx,(%eax) return true; 10f593: b0 01 mov $0x1,%al } 10f595: 5b pop %ebx 10f596: 5e pop %esi 10f597: 5f pop %edi 10f598: 5d pop %ebp 10f599: c3 ret =============================================================================== 0010b5d2 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b5d2: 55 push %ebp 10b5d3: 89 e5 mov %esp,%ebp 10b5d5: 57 push %edi 10b5d6: 56 push %esi 10b5d7: 53 push %ebx 10b5d8: 83 ec 3c sub $0x3c,%esp 10b5db: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const page_size = heap->page_size; 10b5de: 8b 4d 08 mov 0x8(%ebp),%ecx 10b5e1: 8b 49 10 mov 0x10(%ecx),%ecx 10b5e4: 89 4d e0 mov %ecx,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10b5e7: 8b 4d 08 mov 0x8(%ebp),%ecx 10b5ea: 8b 49 14 mov 0x14(%ecx),%ecx 10b5ed: 89 4d d8 mov %ecx,-0x28(%ebp) Heap_Block *const first_block = heap->first_block; 10b5f0: 8b 4d 08 mov 0x8(%ebp),%ecx 10b5f3: 8b 71 20 mov 0x20(%ecx),%esi Heap_Block *const last_block = heap->last_block; 10b5f6: 8b 49 24 mov 0x24(%ecx),%ecx 10b5f9: 89 4d d4 mov %ecx,-0x2c(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b5fc: bb 94 b5 10 00 mov $0x10b594,%ebx 10b601: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b605: 74 05 je 10b60c <_Heap_Walk+0x3a> 10b607: bb 99 b5 10 00 mov $0x10b599,%ebx if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b60c: 83 3d a8 05 13 00 03 cmpl $0x3,0x1305a8 10b613: 74 07 je 10b61c <_Heap_Walk+0x4a> return true; 10b615: b0 01 mov $0x1,%al 10b617: e9 ec 02 00 00 jmp 10b908 <_Heap_Walk+0x336> 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)( 10b61c: 50 push %eax 10b61d: 8b 4d 08 mov 0x8(%ebp),%ecx 10b620: ff 71 0c pushl 0xc(%ecx) 10b623: ff 71 08 pushl 0x8(%ecx) 10b626: ff 75 d4 pushl -0x2c(%ebp) 10b629: 56 push %esi 10b62a: ff 71 1c pushl 0x1c(%ecx) 10b62d: ff 71 18 pushl 0x18(%ecx) 10b630: ff 75 d8 pushl -0x28(%ebp) 10b633: ff 75 e0 pushl -0x20(%ebp) 10b636: 68 e4 07 12 00 push $0x1207e4 10b63b: 6a 00 push $0x0 10b63d: 57 push %edi 10b63e: ff d3 call *%ebx heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10b640: 83 c4 30 add $0x30,%esp 10b643: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 10b647: 75 0b jne 10b654 <_Heap_Walk+0x82> (*printer)( source, true, "page size is zero\n" ); 10b649: 50 push %eax 10b64a: 68 75 08 12 00 push $0x120875 10b64f: e9 d5 00 00 00 jmp 10b729 <_Heap_Walk+0x157> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b654: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10b658: 74 0d je 10b667 <_Heap_Walk+0x95> (*printer)( 10b65a: ff 75 e0 pushl -0x20(%ebp) 10b65d: 68 88 08 12 00 push $0x120888 10b662: e9 c2 00 00 00 jmp 10b729 <_Heap_Walk+0x157> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b667: 8b 45 d8 mov -0x28(%ebp),%eax 10b66a: 31 d2 xor %edx,%edx 10b66c: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b66f: 85 d2 test %edx,%edx 10b671: 74 0d je 10b680 <_Heap_Walk+0xae> (*printer)( 10b673: ff 75 d8 pushl -0x28(%ebp) 10b676: 68 a6 08 12 00 push $0x1208a6 10b67b: e9 a9 00 00 00 jmp 10b729 <_Heap_Walk+0x157> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10b680: 8d 46 08 lea 0x8(%esi),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b683: 31 d2 xor %edx,%edx 10b685: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10b688: 85 d2 test %edx,%edx 10b68a: 74 0b je 10b697 <_Heap_Walk+0xc5> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10b68c: 56 push %esi 10b68d: 68 ca 08 12 00 push $0x1208ca 10b692: e9 92 00 00 00 jmp 10b729 <_Heap_Walk+0x157> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10b697: f6 46 04 01 testb $0x1,0x4(%esi) 10b69b: 75 0b jne 10b6a8 <_Heap_Walk+0xd6> (*printer)( 10b69d: 50 push %eax 10b69e: 68 fb 08 12 00 push $0x1208fb 10b6a3: e9 81 00 00 00 jmp 10b729 <_Heap_Walk+0x157> - 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; 10b6a8: 8b 4d d4 mov -0x2c(%ebp),%ecx 10b6ab: 8b 41 04 mov 0x4(%ecx),%eax 10b6ae: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10b6b1: 01 c8 add %ecx,%eax 10b6b3: 89 45 d0 mov %eax,-0x30(%ebp) ); return false; } if ( _Heap_Is_free( last_block ) ) { 10b6b6: f6 40 04 01 testb $0x1,0x4(%eax) 10b6ba: 75 08 jne 10b6c4 <_Heap_Walk+0xf2> (*printer)( 10b6bc: 50 push %eax 10b6bd: 68 29 09 12 00 push $0x120929 10b6c2: eb 65 jmp 10b729 <_Heap_Walk+0x157> ); return false; } if ( 10b6c4: 39 75 d0 cmp %esi,-0x30(%ebp) 10b6c7: 74 08 je 10b6d1 <_Heap_Walk+0xff> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10b6c9: 56 push %esi 10b6ca: 68 3e 09 12 00 push $0x12093e 10b6cf: eb 58 jmp 10b729 <_Heap_Walk+0x157> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10b6d1: 8b 4d 08 mov 0x8(%ebp),%ecx 10b6d4: 8b 49 10 mov 0x10(%ecx),%ecx 10b6d7: 89 4d e4 mov %ecx,-0x1c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b6da: 8b 45 08 mov 0x8(%ebp),%eax 10b6dd: 8b 48 08 mov 0x8(%eax),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 10b6e0: 89 c6 mov %eax,%esi 10b6e2: eb 6d jmp 10b751 <_Heap_Walk+0x17f> 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; 10b6e4: 31 c0 xor %eax,%eax 10b6e6: 8b 55 08 mov 0x8(%ebp),%edx 10b6e9: 39 4a 20 cmp %ecx,0x20(%edx) 10b6ec: 77 08 ja 10b6f6 <_Heap_Walk+0x124> 10b6ee: 31 c0 xor %eax,%eax 10b6f0: 39 4a 24 cmp %ecx,0x24(%edx) 10b6f3: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10b6f6: 85 c0 test %eax,%eax 10b6f8: 75 08 jne 10b702 <_Heap_Walk+0x130> (*printer)( 10b6fa: 51 push %ecx 10b6fb: 68 6d 09 12 00 push $0x12096d 10b700: eb 27 jmp 10b729 <_Heap_Walk+0x157> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10b702: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b705: 31 d2 xor %edx,%edx 10b707: f7 75 e4 divl -0x1c(%ebp) ); return false; } if ( 10b70a: 85 d2 test %edx,%edx 10b70c: 74 08 je 10b716 <_Heap_Walk+0x144> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10b70e: 51 push %ecx 10b70f: 68 8d 09 12 00 push $0x12098d 10b714: eb 13 jmp 10b729 <_Heap_Walk+0x157> - 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; 10b716: 8b 41 04 mov 0x4(%ecx),%eax 10b719: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10b71c: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10b721: 74 13 je 10b736 <_Heap_Walk+0x164> (*printer)( 10b723: 51 push %ecx 10b724: 68 bd 09 12 00 push $0x1209bd 10b729: 6a 01 push $0x1 10b72b: 57 push %edi 10b72c: ff d3 call *%ebx 10b72e: 83 c4 10 add $0x10,%esp 10b731: e9 c3 01 00 00 jmp 10b8f9 <_Heap_Walk+0x327> ); return false; } if ( free_block->prev != prev_block ) { 10b736: 8b 41 0c mov 0xc(%ecx),%eax 10b739: 39 f0 cmp %esi,%eax 10b73b: 74 0f je 10b74c <_Heap_Walk+0x17a> (*printer)( 10b73d: 83 ec 0c sub $0xc,%esp 10b740: 50 push %eax 10b741: 51 push %ecx 10b742: 68 d9 09 12 00 push $0x1209d9 10b747: e9 42 01 00 00 jmp 10b88e <_Heap_Walk+0x2bc> return false; } prev_block = free_block; free_block = free_block->next; 10b74c: 89 ce mov %ecx,%esi 10b74e: 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 ) { 10b751: 3b 4d 08 cmp 0x8(%ebp),%ecx 10b754: 75 8e jne 10b6e4 <_Heap_Walk+0x112> 10b756: 8b 75 d0 mov -0x30(%ebp),%esi block = next_block; } while ( block != first_block ); return true; } 10b759: 8b 46 04 mov 0x4(%esi),%eax 10b75c: 89 c1 mov %eax,%ecx 10b75e: 83 e1 fe and $0xfffffffe,%ecx 10b761: 89 4d e4 mov %ecx,-0x1c(%ebp) block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10b764: 83 e0 01 and $0x1,%eax 10b767: 89 45 c8 mov %eax,-0x38(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10b76a: 01 f1 add %esi,%ecx 10b76c: 89 4d dc mov %ecx,-0x24(%ebp) uintptr_t const block_begin = (uintptr_t) block; 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; bool const is_not_last_block = block != last_block; 10b76f: 3b 75 d4 cmp -0x2c(%ebp),%esi 10b772: 0f 95 c1 setne %cl 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; 10b775: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b77c: 8b 55 dc mov -0x24(%ebp),%edx 10b77f: 8b 45 08 mov 0x8(%ebp),%eax 10b782: 39 50 20 cmp %edx,0x20(%eax) 10b785: 77 0c ja 10b793 <_Heap_Walk+0x1c1> <== NEVER TAKEN 10b787: 39 50 24 cmp %edx,0x24(%eax) 10b78a: 0f 93 c0 setae %al 10b78d: 0f b6 c0 movzbl %al,%eax 10b790: 89 45 cc mov %eax,-0x34(%ebp) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10b793: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10b797: 75 11 jne 10b7aa <_Heap_Walk+0x1d8> (*printer)( 10b799: 83 ec 0c sub $0xc,%esp 10b79c: ff 75 dc pushl -0x24(%ebp) 10b79f: 56 push %esi 10b7a0: 68 0b 0a 12 00 push $0x120a0b 10b7a5: e9 e4 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b7aa: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7ad: 31 d2 xor %edx,%edx 10b7af: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10b7b2: 85 d2 test %edx,%edx 10b7b4: 74 15 je 10b7cb <_Heap_Walk+0x1f9> 10b7b6: 84 c9 test %cl,%cl 10b7b8: 74 11 je 10b7cb <_Heap_Walk+0x1f9> (*printer)( 10b7ba: 83 ec 0c sub $0xc,%esp 10b7bd: ff 75 e4 pushl -0x1c(%ebp) 10b7c0: 56 push %esi 10b7c1: 68 38 0a 12 00 push $0x120a38 10b7c6: e9 c3 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10b7cb: 8b 45 d8 mov -0x28(%ebp),%eax 10b7ce: 39 45 e4 cmp %eax,-0x1c(%ebp) 10b7d1: 73 15 jae 10b7e8 <_Heap_Walk+0x216> 10b7d3: 84 c9 test %cl,%cl 10b7d5: 74 11 je 10b7e8 <_Heap_Walk+0x216> <== NEVER TAKEN (*printer)( 10b7d7: 51 push %ecx 10b7d8: 51 push %ecx 10b7d9: 50 push %eax 10b7da: ff 75 e4 pushl -0x1c(%ebp) 10b7dd: 56 push %esi 10b7de: 68 66 0a 12 00 push $0x120a66 10b7e3: e9 a6 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10b7e8: 3b 75 dc cmp -0x24(%ebp),%esi 10b7eb: 72 15 jb 10b802 <_Heap_Walk+0x230> 10b7ed: 84 c9 test %cl,%cl 10b7ef: 74 11 je 10b802 <_Heap_Walk+0x230> (*printer)( 10b7f1: 83 ec 0c sub $0xc,%esp 10b7f4: ff 75 dc pushl -0x24(%ebp) 10b7f7: 56 push %esi 10b7f8: 68 91 0a 12 00 push $0x120a91 10b7fd: e9 8c 00 00 00 jmp 10b88e <_Heap_Walk+0x2bc> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10b802: 8b 4d dc mov -0x24(%ebp),%ecx 10b805: f6 41 04 01 testb $0x1,0x4(%ecx) 10b809: 0f 85 b0 00 00 00 jne 10b8bf <_Heap_Walk+0x2ed> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b80f: 8b 45 08 mov 0x8(%ebp),%eax 10b812: 8b 48 08 mov 0x8(%eax),%ecx block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10b815: 8b 56 08 mov 0x8(%esi),%edx 10b818: 89 55 c4 mov %edx,-0x3c(%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)( 10b81b: 3b 50 0c cmp 0xc(%eax),%edx 10b81e: 74 14 je 10b834 <_Heap_Walk+0x262> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10b820: b8 89 06 12 00 mov $0x120689,%eax 10b825: 8b 55 08 mov 0x8(%ebp),%edx 10b828: 39 55 c4 cmp %edx,-0x3c(%ebp) 10b82b: 75 0c jne 10b839 <_Heap_Walk+0x267> 10b82d: b8 c0 07 12 00 mov $0x1207c0,%eax 10b832: eb 05 jmp 10b839 <_Heap_Walk+0x267> 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)( 10b834: b8 b1 07 12 00 mov $0x1207b1,%eax false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10b839: 8b 56 0c mov 0xc(%esi),%edx 10b83c: 89 55 cc mov %edx,-0x34(%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)( 10b83f: 39 ca cmp %ecx,%edx 10b841: 74 14 je 10b857 <_Heap_Walk+0x285> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10b843: ba 89 06 12 00 mov $0x120689,%edx 10b848: 8b 4d 08 mov 0x8(%ebp),%ecx 10b84b: 39 4d cc cmp %ecx,-0x34(%ebp) 10b84e: 75 0c jne 10b85c <_Heap_Walk+0x28a> 10b850: ba da 07 12 00 mov $0x1207da,%edx 10b855: eb 05 jmp 10b85c <_Heap_Walk+0x28a> 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)( 10b857: ba ca 07 12 00 mov $0x1207ca,%edx 10b85c: 83 ec 0c sub $0xc,%esp 10b85f: 50 push %eax 10b860: ff 75 c4 pushl -0x3c(%ebp) 10b863: 52 push %edx 10b864: ff 75 cc pushl -0x34(%ebp) 10b867: ff 75 e4 pushl -0x1c(%ebp) 10b86a: 56 push %esi 10b86b: 68 c5 0a 12 00 push $0x120ac5 10b870: 6a 00 push $0x0 10b872: 57 push %edi 10b873: ff d3 call *%ebx block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10b875: 8b 4d dc mov -0x24(%ebp),%ecx 10b878: 8b 01 mov (%ecx),%eax 10b87a: 83 c4 30 add $0x30,%esp 10b87d: 39 45 e4 cmp %eax,-0x1c(%ebp) 10b880: 74 16 je 10b898 <_Heap_Walk+0x2c6> (*printer)( 10b882: 52 push %edx 10b883: 51 push %ecx 10b884: 50 push %eax 10b885: ff 75 e4 pushl -0x1c(%ebp) 10b888: 56 push %esi 10b889: 68 fa 0a 12 00 push $0x120afa 10b88e: 6a 01 push $0x1 10b890: 57 push %edi 10b891: ff d3 call *%ebx 10b893: 83 c4 20 add $0x20,%esp 10b896: eb 61 jmp 10b8f9 <_Heap_Walk+0x327> ); return false; } if ( !prev_used ) { 10b898: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10b89c: 75 0b jne 10b8a9 <_Heap_Walk+0x2d7> (*printer)( 10b89e: 56 push %esi 10b89f: 68 33 0b 12 00 push $0x120b33 10b8a4: e9 80 fe ff ff jmp 10b729 <_Heap_Walk+0x157> 10b8a9: 8b 4d 08 mov 0x8(%ebp),%ecx 10b8ac: 8b 41 08 mov 0x8(%ecx),%eax 10b8af: eb 07 jmp 10b8b8 <_Heap_Walk+0x2e6> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10b8b1: 39 f0 cmp %esi,%eax 10b8b3: 74 33 je 10b8e8 <_Heap_Walk+0x316> return true; } free_block = free_block->next; 10b8b5: 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 ) { 10b8b8: 3b 45 08 cmp 0x8(%ebp),%eax 10b8bb: 75 f4 jne 10b8b1 <_Heap_Walk+0x2df> 10b8bd: eb 3e jmp 10b8fd <_Heap_Walk+0x32b> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10b8bf: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10b8c3: 74 0e je 10b8d3 <_Heap_Walk+0x301> (*printer)( 10b8c5: 83 ec 0c sub $0xc,%esp 10b8c8: ff 75 e4 pushl -0x1c(%ebp) 10b8cb: 56 push %esi 10b8cc: 68 62 0b 12 00 push $0x120b62 10b8d1: eb 0d jmp 10b8e0 <_Heap_Walk+0x30e> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10b8d3: 50 push %eax 10b8d4: 50 push %eax 10b8d5: ff 36 pushl (%esi) 10b8d7: ff 75 e4 pushl -0x1c(%ebp) 10b8da: 56 push %esi 10b8db: 68 79 0b 12 00 push $0x120b79 10b8e0: 6a 00 push $0x0 10b8e2: 57 push %edi 10b8e3: ff d3 call *%ebx 10b8e5: 83 c4 20 add $0x20,%esp 10b8e8: 8b 75 dc mov -0x24(%ebp),%esi block->prev_size ); } block = next_block; } while ( block != first_block ); 10b8eb: 3b 75 d0 cmp -0x30(%ebp),%esi 10b8ee: 0f 85 65 fe ff ff jne 10b759 <_Heap_Walk+0x187> 10b8f4: e9 1c fd ff ff jmp 10b615 <_Heap_Walk+0x43> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 10b8f9: 31 c0 xor %eax,%eax 10b8fb: eb 0b jmp 10b908 <_Heap_Walk+0x336> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10b8fd: 56 push %esi 10b8fe: 68 9e 0b 12 00 push $0x120b9e 10b903: e9 21 fe ff ff jmp 10b729 <_Heap_Walk+0x157> block = next_block; } while ( block != first_block ); return true; } 10b908: 8d 65 f4 lea -0xc(%ebp),%esp 10b90b: 5b pop %ebx 10b90c: 5e pop %esi 10b90d: 5f pop %edi 10b90e: 5d pop %ebp 10b90f: c3 ret =============================================================================== 0010adcc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10adcc: 55 push %ebp 10adcd: 89 e5 mov %esp,%ebp 10adcf: 53 push %ebx 10add0: 83 ec 08 sub $0x8,%esp 10add3: 8b 55 08 mov 0x8(%ebp),%edx 10add6: 8b 45 0c mov 0xc(%ebp),%eax 10add9: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10addc: 89 15 64 e4 12 00 mov %edx,0x12e464 _Internal_errors_What_happened.is_internal = is_internal; 10ade2: a2 68 e4 12 00 mov %al,0x12e468 _Internal_errors_What_happened.the_error = the_error; 10ade7: 89 1d 6c e4 12 00 mov %ebx,0x12e46c _User_extensions_Fatal( the_source, is_internal, the_error ); 10aded: 53 push %ebx 10adee: 0f b6 c0 movzbl %al,%eax 10adf1: 50 push %eax 10adf2: 52 push %edx 10adf3: e8 01 1a 00 00 call 10c7f9 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10adf8: c7 05 20 e5 12 00 05 movl $0x5,0x12e520 <== NOT EXECUTED 10adff: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10ae02: fa cli <== NOT EXECUTED 10ae03: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ae05: f4 hlt <== NOT EXECUTED 10ae06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ae09: eb fe jmp 10ae09 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010ae5c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ae5c: 55 push %ebp 10ae5d: 89 e5 mov %esp,%ebp 10ae5f: 56 push %esi 10ae60: 53 push %ebx 10ae61: 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 ) 10ae64: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10ae68: 75 04 jne 10ae6e <_Objects_Allocate+0x12><== ALWAYS TAKEN return NULL; 10ae6a: 31 c9 xor %ecx,%ecx 10ae6c: eb 51 jmp 10aebf <_Objects_Allocate+0x63> /* * 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 ); 10ae6e: 8d 73 20 lea 0x20(%ebx),%esi 10ae71: 83 ec 0c sub $0xc,%esp 10ae74: 56 push %esi 10ae75: e8 06 f8 ff ff call 10a680 <_Chain_Get> 10ae7a: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10ae7c: 83 c4 10 add $0x10,%esp 10ae7f: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ae83: 74 3a je 10aebf <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10ae85: 85 c0 test %eax,%eax 10ae87: 75 1a jne 10aea3 <_Objects_Allocate+0x47> _Objects_Extend_information( information ); 10ae89: 83 ec 0c sub $0xc,%esp 10ae8c: 53 push %ebx 10ae8d: e8 56 00 00 00 call 10aee8 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10ae92: 89 34 24 mov %esi,(%esp) 10ae95: e8 e6 f7 ff ff call 10a680 <_Chain_Get> 10ae9a: 89 c1 mov %eax,%ecx } if ( the_object ) { 10ae9c: 83 c4 10 add $0x10,%esp 10ae9f: 85 c0 test %eax,%eax 10aea1: 74 c7 je 10ae6a <_Objects_Allocate+0xe> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10aea3: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10aea7: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10aeab: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10aead: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10aeb1: 31 d2 xor %edx,%edx 10aeb3: f7 f6 div %esi information->inactive_per_block[ block ]--; 10aeb5: 8b 53 30 mov 0x30(%ebx),%edx 10aeb8: ff 0c 82 decl (%edx,%eax,4) information->inactive--; 10aebb: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10aebf: 89 c8 mov %ecx,%eax 10aec1: 8d 65 f8 lea -0x8(%ebp),%esp 10aec4: 5b pop %ebx 10aec5: 5e pop %esi 10aec6: 5d pop %ebp 10aec7: c3 ret =============================================================================== 0010aee8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10aee8: 55 push %ebp 10aee9: 89 e5 mov %esp,%ebp 10aeeb: 57 push %edi 10aeec: 56 push %esi 10aeed: 53 push %ebx 10aeee: 83 ec 3c sub $0x3c,%esp 10aef1: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10aef4: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10aef8: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10aefb: 8b 73 34 mov 0x34(%ebx),%esi 10aefe: 85 f6 test %esi,%esi 10af00: 74 40 je 10af42 <_Objects_Extend_information+0x5a> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10af02: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10af06: 8b 43 10 mov 0x10(%ebx),%eax 10af09: 31 d2 xor %edx,%edx 10af0b: 66 f7 f1 div %cx 10af0e: 0f b7 c0 movzwl %ax,%eax 10af11: 89 45 d0 mov %eax,-0x30(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10af14: 8b 55 c8 mov -0x38(%ebp),%edx 10af17: 89 55 cc mov %edx,-0x34(%ebp) index_base = minimum_index; block = 0; 10af1a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10af21: eb 10 jmp 10af33 <_Objects_Extend_information+0x4b> if ( information->object_blocks[ block ] == NULL ) { 10af23: 8b 55 d4 mov -0x2c(%ebp),%edx 10af26: 83 3c 96 00 cmpl $0x0,(%esi,%edx,4) 10af2a: 74 31 je 10af5d <_Objects_Extend_information+0x75> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 10af2c: 01 4d cc add %ecx,-0x34(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10af2f: 42 inc %edx 10af30: 89 55 d4 mov %edx,-0x2c(%ebp) 10af33: 8b 55 d0 mov -0x30(%ebp),%edx 10af36: 39 55 d4 cmp %edx,-0x2c(%ebp) 10af39: 72 e8 jb 10af23 <_Objects_Extend_information+0x3b> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10af3b: be 01 00 00 00 mov $0x1,%esi 10af40: eb 1d jmp 10af5f <_Objects_Extend_information+0x77> minimum_index = _Objects_Get_index( information->minimum_id ); 10af42: 8b 4d c8 mov -0x38(%ebp),%ecx 10af45: 89 4d cc mov %ecx,-0x34(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10af48: be 01 00 00 00 mov $0x1,%esi minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10af4d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10af54: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 10af5b: eb 02 jmp 10af5f <_Objects_Extend_information+0x77> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10af5d: 31 f6 xor %esi,%esi } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10af5f: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10af63: 0f b7 53 10 movzwl 0x10(%ebx),%edx 10af67: 01 c2 add %eax,%edx 10af69: 89 55 bc mov %edx,-0x44(%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 ) { 10af6c: 81 fa ff ff 00 00 cmp $0xffff,%edx 10af72: 0f 87 bb 01 00 00 ja 10b133 <_Objects_Extend_information+0x24b><== 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; 10af78: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10af7c: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10af80: 74 18 je 10af9a <_Objects_Extend_information+0xb2> new_object_block = _Workspace_Allocate( block_size ); 10af82: 83 ec 0c sub $0xc,%esp 10af85: 50 push %eax 10af86: e8 b9 1b 00 00 call 10cb44 <_Workspace_Allocate> 10af8b: 89 45 c0 mov %eax,-0x40(%ebp) if ( !new_object_block ) 10af8e: 83 c4 10 add $0x10,%esp 10af91: 85 c0 test %eax,%eax 10af93: 75 14 jne 10afa9 <_Objects_Extend_information+0xc1> 10af95: e9 99 01 00 00 jmp 10b133 <_Objects_Extend_information+0x24b> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10af9a: 83 ec 0c sub $0xc,%esp 10af9d: 50 push %eax 10af9e: e8 d2 1b 00 00 call 10cb75 <_Workspace_Allocate_or_fatal_error> 10afa3: 89 45 c0 mov %eax,-0x40(%ebp) 10afa6: 83 c4 10 add $0x10,%esp } /* * Do we need to grow the tables? */ if ( do_extend ) { 10afa9: 89 f0 mov %esi,%eax 10afab: 84 c0 test %al,%al 10afad: 0f 84 fd 00 00 00 je 10b0b0 <_Objects_Extend_information+0x1c8> */ /* * Up the block count and maximum */ block_count++; 10afb3: 8b 75 d0 mov -0x30(%ebp),%esi 10afb6: 46 inc %esi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10afb7: 83 ec 0c sub $0xc,%esp /* * 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 *)); 10afba: 8b 55 bc mov -0x44(%ebp),%edx 10afbd: 03 55 c8 add -0x38(%ebp),%edx /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10afc0: 8d 04 76 lea (%esi,%esi,2),%eax 10afc3: 01 d0 add %edx,%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10afc5: c1 e0 02 shl $0x2,%eax (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10afc8: 50 push %eax 10afc9: e8 76 1b 00 00 call 10cb44 <_Workspace_Allocate> 10afce: 89 c2 mov %eax,%edx if ( !object_blocks ) { 10afd0: 83 c4 10 add $0x10,%esp 10afd3: 85 c0 test %eax,%eax 10afd5: 75 13 jne 10afea <_Objects_Extend_information+0x102> _Workspace_Free( new_object_block ); 10afd7: 83 ec 0c sub $0xc,%esp 10afda: ff 75 c0 pushl -0x40(%ebp) 10afdd: e8 7b 1b 00 00 call 10cb5d <_Workspace_Free> 10afe2: 83 c4 10 add $0x10,%esp 10afe5: e9 49 01 00 00 jmp 10b133 <_Objects_Extend_information+0x24b> 10afea: 8d 0c b0 lea (%eax,%esi,4),%ecx 10afed: 89 4d b8 mov %ecx,-0x48(%ebp) 10aff0: 8d 34 f0 lea (%eax,%esi,8),%esi 10aff3: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10aff6: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10affa: 31 c0 xor %eax,%eax 10affc: 3b 4d c8 cmp -0x38(%ebp),%ecx 10afff: 76 38 jbe 10b039 <_Objects_Extend_information+0x151> /* * 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, 10b001: 8b 45 d0 mov -0x30(%ebp),%eax 10b004: c1 e0 02 shl $0x2,%eax 10b007: 8b 73 34 mov 0x34(%ebx),%esi 10b00a: 89 d7 mov %edx,%edi 10b00c: 89 c1 mov %eax,%ecx 10b00e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b010: 8b 73 30 mov 0x30(%ebx),%esi 10b013: 8b 7d b8 mov -0x48(%ebp),%edi 10b016: 89 c1 mov %eax,%ecx 10b018: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 10b01a: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b01e: 03 4d c8 add -0x38(%ebp),%ecx information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b021: c1 e1 02 shl $0x2,%ecx 10b024: 8b 73 1c mov 0x1c(%ebx),%esi 10b027: 8b 7d c4 mov -0x3c(%ebp),%edi 10b02a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b02c: eb 10 jmp 10b03e <_Objects_Extend_information+0x156> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b02e: 8b 75 c4 mov -0x3c(%ebp),%esi 10b031: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b038: 40 inc %eax 10b039: 3b 45 c8 cmp -0x38(%ebp),%eax 10b03c: 75 f0 jne 10b02e <_Objects_Extend_information+0x146> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b03e: 8b 45 d0 mov -0x30(%ebp),%eax 10b041: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) inactive_per_block[block_count] = 0; 10b048: 8b 4d b8 mov -0x48(%ebp),%ecx 10b04b: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b052: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b056: 03 4d cc add -0x34(%ebp),%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b059: 8b 45 cc mov -0x34(%ebp),%eax 10b05c: eb 0b jmp 10b069 <_Objects_Extend_information+0x181> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b05e: 8b 75 c4 mov -0x3c(%ebp),%esi 10b061: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b068: 40 inc %eax * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b069: 39 c8 cmp %ecx,%eax 10b06b: 72 f1 jb 10b05e <_Objects_Extend_information+0x176> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b06d: 9c pushf 10b06e: fa cli 10b06f: 5e pop %esi old_tables = information->object_blocks; 10b070: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10b073: 89 53 34 mov %edx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b076: 8b 45 b8 mov -0x48(%ebp),%eax 10b079: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10b07c: 8b 55 c4 mov -0x3c(%ebp),%edx 10b07f: 89 53 1c mov %edx,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b082: 8b 45 bc mov -0x44(%ebp),%eax 10b085: 66 89 43 10 mov %ax,0x10(%ebx) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10b089: 8b 03 mov (%ebx),%eax 10b08b: c1 e0 18 shl $0x18,%eax 10b08e: 0d 00 00 01 00 or $0x10000,%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10b093: 0b 45 bc or -0x44(%ebp),%eax information->maximum_id = _Objects_Build_id( 10b096: 0f b7 53 04 movzwl 0x4(%ebx),%edx 10b09a: c1 e2 1b shl $0x1b,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10b09d: 09 d0 or %edx,%eax 10b09f: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b0a2: 56 push %esi 10b0a3: 9d popf _Workspace_Free( old_tables ); 10b0a4: 83 ec 0c sub $0xc,%esp 10b0a7: 51 push %ecx 10b0a8: e8 b0 1a 00 00 call 10cb5d <_Workspace_Free> 10b0ad: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b0b0: 8b 55 d4 mov -0x2c(%ebp),%edx 10b0b3: c1 e2 02 shl $0x2,%edx 10b0b6: 89 55 d0 mov %edx,-0x30(%ebp) 10b0b9: 8b 43 34 mov 0x34(%ebx),%eax 10b0bc: 8b 4d c0 mov -0x40(%ebp),%ecx 10b0bf: 8b 55 d4 mov -0x2c(%ebp),%edx 10b0c2: 89 0c 90 mov %ecx,(%eax,%edx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b0c5: ff 73 18 pushl 0x18(%ebx) 10b0c8: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b0cc: 50 push %eax 10b0cd: 8b 43 34 mov 0x34(%ebx),%eax 10b0d0: ff 34 90 pushl (%eax,%edx,4) 10b0d3: 8d 7d dc lea -0x24(%ebp),%edi 10b0d6: 57 push %edi 10b0d7: e8 c8 f5 ff ff call 10a6a4 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b0dc: 83 c4 10 add $0x10,%esp ); /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; 10b0df: 8b 75 cc mov -0x34(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b0e2: 8d 7b 20 lea 0x20(%ebx),%edi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b0e5: eb 26 jmp 10b10d <_Objects_Extend_information+0x225> 10b0e7: 8b 13 mov (%ebx),%edx 10b0e9: c1 e2 18 shl $0x18,%edx 10b0ec: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10b0f2: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10b0f6: c1 e1 1b shl $0x1b,%ecx 10b0f9: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10b0fb: 09 f2 or %esi,%edx 10b0fd: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b100: 52 push %edx 10b101: 52 push %edx 10b102: 50 push %eax 10b103: 57 push %edi 10b104: e8 53 f5 ff ff call 10a65c <_Chain_Append> index++; 10b109: 46 inc %esi 10b10a: 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 ) { 10b10d: 83 ec 0c sub $0xc,%esp 10b110: 8d 45 dc lea -0x24(%ebp),%eax 10b113: 50 push %eax 10b114: e8 67 f5 ff ff call 10a680 <_Chain_Get> 10b119: 83 c4 10 add $0x10,%esp 10b11c: 85 c0 test %eax,%eax 10b11e: 75 c7 jne 10b0e7 <_Objects_Extend_information+0x1ff> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b120: 8b 43 14 mov 0x14(%ebx),%eax 10b123: 8b 53 30 mov 0x30(%ebx),%edx 10b126: 0f b7 c8 movzwl %ax,%ecx 10b129: 8b 75 d0 mov -0x30(%ebp),%esi 10b12c: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10b12f: 66 01 43 2c add %ax,0x2c(%ebx) } 10b133: 8d 65 f4 lea -0xc(%ebp),%esp 10b136: 5b pop %ebx 10b137: 5e pop %esi 10b138: 5f pop %edi 10b139: 5d pop %ebp 10b13a: c3 ret =============================================================================== 0010b1cc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10b1cc: 55 push %ebp 10b1cd: 89 e5 mov %esp,%ebp 10b1cf: 56 push %esi 10b1d0: 53 push %ebx 10b1d1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b1d4: 0f b7 75 0c movzwl 0xc(%ebp),%esi Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b1d8: 66 85 f6 test %si,%si 10b1db: 75 04 jne 10b1e1 <_Objects_Get_information+0x15> return NULL; 10b1dd: 31 c0 xor %eax,%eax 10b1df: eb 2d jmp 10b20e <_Objects_Get_information+0x42> /* * 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 ); 10b1e1: 83 ec 0c sub $0xc,%esp 10b1e4: 53 push %ebx 10b1e5: e8 b2 43 00 00 call 10f59c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b1ea: 83 c4 10 add $0x10,%esp 10b1ed: 85 c0 test %eax,%eax 10b1ef: 74 ec je 10b1dd <_Objects_Get_information+0x11> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b1f1: 39 c6 cmp %eax,%esi 10b1f3: 77 e8 ja 10b1dd <_Objects_Get_information+0x11> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b1f5: 8b 04 9d bc e3 12 00 mov 0x12e3bc(,%ebx,4),%eax 10b1fc: 85 c0 test %eax,%eax 10b1fe: 74 dd je 10b1dd <_Objects_Get_information+0x11><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b200: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !info ) 10b203: 85 c0 test %eax,%eax 10b205: 74 d6 je 10b1dd <_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 ) 10b207: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b20c: 74 cf je 10b1dd <_Objects_Get_information+0x11> return NULL; #endif return info; } 10b20e: 8d 65 f8 lea -0x8(%ebp),%esp 10b211: 5b pop %ebx 10b212: 5e pop %esi 10b213: 5d pop %ebp 10b214: c3 ret =============================================================================== 001187b4 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 1187b4: 55 push %ebp 1187b5: 89 e5 mov %esp,%ebp 1187b7: 53 push %ebx 1187b8: 8b 55 08 mov 0x8(%ebp),%edx 1187bb: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 1187be: b8 01 00 00 00 mov $0x1,%eax 1187c3: 2b 42 08 sub 0x8(%edx),%eax 1187c6: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 1187c9: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 1187cd: 39 c3 cmp %eax,%ebx 1187cf: 72 12 jb 1187e3 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 1187d1: 8b 52 1c mov 0x1c(%edx),%edx 1187d4: 8b 04 82 mov (%edx,%eax,4),%eax 1187d7: 85 c0 test %eax,%eax 1187d9: 74 08 je 1187e3 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 1187db: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 1187e1: eb 08 jmp 1187eb <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 1187e3: c7 01 01 00 00 00 movl $0x1,(%ecx) return NULL; 1187e9: 31 c0 xor %eax,%eax } 1187eb: 5b pop %ebx 1187ec: 5d pop %ebp 1187ed: c3 ret =============================================================================== 0010e310 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e310: 55 push %ebp 10e311: 89 e5 mov %esp,%ebp 10e313: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e316: 8b 45 08 mov 0x8(%ebp),%eax 10e319: 85 c0 test %eax,%eax 10e31b: 75 08 jne 10e325 <_Objects_Id_to_name+0x15> 10e31d: a1 ec a1 13 00 mov 0x13a1ec,%eax 10e322: 8b 40 08 mov 0x8(%eax),%eax 10e325: 89 c2 mov %eax,%edx 10e327: c1 ea 18 shr $0x18,%edx 10e32a: 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 ) 10e32d: 8d 4a ff lea -0x1(%edx),%ecx 10e330: 83 f9 02 cmp $0x2,%ecx 10e333: 76 3d jbe 10e372 <_Objects_Id_to_name+0x62> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 10e335: b8 03 00 00 00 mov $0x3,%eax 10e33a: eb 43 jmp 10e37f <_Objects_Id_to_name+0x6f> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e33c: 89 c1 mov %eax,%ecx 10e33e: c1 e9 1b shr $0x1b,%ecx if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e341: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10e344: 85 d2 test %edx,%edx 10e346: 74 ed je 10e335 <_Objects_Id_to_name+0x25><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10e348: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10e34c: 75 e7 jne 10e335 <_Objects_Id_to_name+0x25><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e34e: 51 push %ecx 10e34f: 8d 4d f4 lea -0xc(%ebp),%ecx 10e352: 51 push %ecx 10e353: 50 push %eax 10e354: 52 push %edx 10e355: e8 56 ff ff ff call 10e2b0 <_Objects_Get> if ( !the_object ) 10e35a: 83 c4 10 add $0x10,%esp 10e35d: 85 c0 test %eax,%eax 10e35f: 74 d4 je 10e335 <_Objects_Id_to_name+0x25> return OBJECTS_INVALID_ID; *name = the_object->name; 10e361: 8b 50 0c mov 0xc(%eax),%edx 10e364: 8b 45 0c mov 0xc(%ebp),%eax 10e367: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e369: e8 5a 0b 00 00 call 10eec8 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e36e: 31 c0 xor %eax,%eax 10e370: eb 0d jmp 10e37f <_Objects_Id_to_name+0x6f> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e372: 8b 14 95 7c 9c 13 00 mov 0x139c7c(,%edx,4),%edx 10e379: 85 d2 test %edx,%edx 10e37b: 75 bf jne 10e33c <_Objects_Id_to_name+0x2c> 10e37d: eb b6 jmp 10e335 <_Objects_Id_to_name+0x25> return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e37f: c9 leave 10e380: c3 ret =============================================================================== 00110704 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 110704: 55 push %ebp 110705: 89 e5 mov %esp,%ebp 110707: 57 push %edi 110708: 56 push %esi 110709: 53 push %ebx 11070a: 83 ec 1c sub $0x1c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 11070d: 8b 45 08 mov 0x8(%ebp),%eax 110710: 8b 40 08 mov 0x8(%eax),%eax 110713: 89 c6 mov %eax,%esi 110715: c1 ee 18 shr $0x18,%esi 110718: 83 e6 07 and $0x7,%esi 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 ]; 11071b: 25 ff ff 00 00 and $0xffff,%eax 110720: c1 e0 02 shl $0x2,%eax 110723: 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; 110726: a1 d0 e7 12 00 mov 0x12e7d0,%eax 11072b: 66 89 45 e6 mov %ax,-0x1a(%ebp) done = true; for ( index = 1 ; index <= max ; ++index ) { 11072f: bb 01 00 00 00 mov $0x1,%ebx */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 110734: b2 01 mov $0x1,%dl for ( index = 1 ; index <= max ; ++index ) { 110736: eb 35 jmp 11076d <_POSIX_Keys_Run_destructors+0x69> POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 110738: 0f b7 cb movzwl %bx,%ecx Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 11073b: a1 dc e7 12 00 mov 0x12e7dc,%eax 110740: 8b 04 88 mov (%eax,%ecx,4),%eax _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 110743: 85 c0 test %eax,%eax 110745: 74 25 je 11076c <_POSIX_Keys_Run_destructors+0x68> 110747: 83 78 10 00 cmpl $0x0,0x10(%eax) 11074b: 74 1f je 11076c <_POSIX_Keys_Run_destructors+0x68> void *value = key->Values [ thread_api ][ thread_index ]; 11074d: 8b 7d e0 mov -0x20(%ebp),%edi 110750: 03 7c b0 14 add 0x14(%eax,%esi,4),%edi 110754: 8b 0f mov (%edi),%ecx if ( value != NULL ) { 110756: 85 c9 test %ecx,%ecx 110758: 74 12 je 11076c <_POSIX_Keys_Run_destructors+0x68><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 11075a: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED (*key->destructor)( value ); 110760: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110763: 51 push %ecx <== NOT EXECUTED 110764: ff 50 10 call *0x10(%eax) <== NOT EXECUTED 110767: 83 c4 10 add $0x10,%esp <== NOT EXECUTED done = false; 11076a: 31 d2 xor %edx,%edx <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 11076c: 43 inc %ebx 11076d: 66 3b 5d e6 cmp -0x1a(%ebp),%bx 110771: 76 c5 jbe 110738 <_POSIX_Keys_Run_destructors+0x34> * 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 ) { 110773: 84 d2 test %dl,%dl 110775: 74 af je 110726 <_POSIX_Keys_Run_destructors+0x22><== NEVER TAKEN done = false; } } } } } 110777: 8d 65 f4 lea -0xc(%ebp),%esp 11077a: 5b pop %ebx 11077b: 5e pop %esi 11077c: 5f pop %edi 11077d: 5d pop %ebp 11077e: c3 ret =============================================================================== 0010dd3c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10dd3c: 55 push %ebp 10dd3d: 89 e5 mov %esp,%ebp 10dd3f: 57 push %edi 10dd40: 56 push %esi 10dd41: 53 push %ebx 10dd42: 83 ec 30 sub $0x30,%esp 10dd45: 8b 75 08 mov 0x8(%ebp),%esi 10dd48: 8b 5d 14 mov 0x14(%ebp),%ebx 10dd4b: 8a 4d 18 mov 0x18(%ebp),%cl POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10dd4e: 8d 45 e0 lea -0x20(%ebp),%eax 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( 10dd51: 50 push %eax 10dd52: 56 push %esi 10dd53: 68 b4 5d 13 00 push $0x135db4 10dd58: 88 4d d4 mov %cl,-0x2c(%ebp) 10dd5b: e8 34 2b 00 00 call 110894 <_Objects_Get> switch ( location ) { 10dd60: 83 c4 10 add $0x10,%esp 10dd63: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 10dd67: 8a 4d d4 mov -0x2c(%ebp),%cl 10dd6a: 0f 85 b6 00 00 00 jne 10de26 <_POSIX_Message_queue_Receive_support+0xea> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10dd70: 8b 78 14 mov 0x14(%eax),%edi 10dd73: 89 fa mov %edi,%edx 10dd75: 83 e2 03 and $0x3,%edx 10dd78: 4a dec %edx 10dd79: 75 0a jne 10dd85 <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10dd7b: e8 c4 36 00 00 call 111444 <_Thread_Enable_dispatch> 10dd80: e9 a1 00 00 00 jmp 10de26 <_POSIX_Message_queue_Receive_support+0xea> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10dd85: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10dd88: 8b 42 68 mov 0x68(%edx),%eax 10dd8b: 39 45 10 cmp %eax,0x10(%ebp) 10dd8e: 73 15 jae 10dda5 <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10dd90: e8 af 36 00 00 call 111444 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10dd95: e8 a6 88 00 00 call 116640 <__errno> 10dd9a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10dda0: e9 8c 00 00 00 jmp 10de31 <_POSIX_Message_queue_Receive_support+0xf5> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10dda5: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10ddac: 31 c0 xor %eax,%eax 10ddae: 84 c9 test %cl,%cl 10ddb0: 74 0b je 10ddbd <_POSIX_Message_queue_Receive_support+0x81> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10ddb2: 89 f8 mov %edi,%eax 10ddb4: c1 e8 0e shr $0xe,%eax 10ddb7: 83 f0 01 xor $0x1,%eax 10ddba: 83 e0 01 and $0x1,%eax do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10ddbd: 51 push %ecx 10ddbe: 51 push %ecx 10ddbf: ff 75 1c pushl 0x1c(%ebp) 10ddc2: 0f b6 c0 movzbl %al,%eax 10ddc5: 50 push %eax 10ddc6: 8d 45 e4 lea -0x1c(%ebp),%eax 10ddc9: 50 push %eax 10ddca: ff 75 0c pushl 0xc(%ebp) 10ddcd: 56 push %esi 10ddce: 83 c2 1c add $0x1c,%edx 10ddd1: 52 push %edx 10ddd2: e8 dd 1c 00 00 call 10fab4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10ddd7: 83 c4 20 add $0x20,%esp 10ddda: e8 65 36 00 00 call 111444 <_Thread_Enable_dispatch> if (msg_prio) { 10dddf: 85 db test %ebx,%ebx 10dde1: 74 15 je 10ddf8 <_POSIX_Message_queue_Receive_support+0xbc><== NEVER TAKEN *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 10dde3: 8b 15 2c 5e 13 00 mov 0x135e2c,%edx RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); 10dde9: 8b 42 24 mov 0x24(%edx),%eax 10ddec: c1 f8 1f sar $0x1f,%eax 10ddef: 8b 52 24 mov 0x24(%edx),%edx 10ddf2: 31 c2 xor %eax,%edx 10ddf4: 89 13 mov %edx,(%ebx) 10ddf6: 29 03 sub %eax,(%ebx) ); } if ( !_Thread_Executing->Wait.return_code ) 10ddf8: a1 2c 5e 13 00 mov 0x135e2c,%eax 10ddfd: 83 78 34 00 cmpl $0x0,0x34(%eax) 10de01: 75 05 jne 10de08 <_POSIX_Message_queue_Receive_support+0xcc> return length_out; 10de03: 8b 45 e4 mov -0x1c(%ebp),%eax 10de06: eb 2c jmp 10de34 <_POSIX_Message_queue_Receive_support+0xf8> rtems_set_errno_and_return_minus_one( 10de08: e8 33 88 00 00 call 116640 <__errno> 10de0d: 89 c3 mov %eax,%ebx 10de0f: 83 ec 0c sub $0xc,%esp 10de12: a1 2c 5e 13 00 mov 0x135e2c,%eax 10de17: ff 70 34 pushl 0x34(%eax) 10de1a: e8 f1 01 00 00 call 10e010 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10de1f: 89 03 mov %eax,(%ebx) 10de21: 83 c4 10 add $0x10,%esp 10de24: eb 0b jmp 10de31 <_POSIX_Message_queue_Receive_support+0xf5> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10de26: e8 15 88 00 00 call 116640 <__errno> 10de2b: c7 00 09 00 00 00 movl $0x9,(%eax) 10de31: 83 c8 ff or $0xffffffff,%eax } 10de34: 8d 65 f4 lea -0xc(%ebp),%esp 10de37: 5b pop %ebx 10de38: 5e pop %esi 10de39: 5f pop %edi 10de3a: 5d pop %ebp 10de3b: c3 ret =============================================================================== 001100d8 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 1100d8: 55 push %ebp 1100d9: 89 e5 mov %esp,%ebp 1100db: 56 push %esi 1100dc: 53 push %ebx 1100dd: 8b 75 08 mov 0x8(%ebp),%esi POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 1100e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1100e4: 74 0d je 1100f3 <_POSIX_Semaphore_Create_support+0x1b> rtems_set_errno_and_return_minus_one( ENOSYS ); 1100e6: e8 ad 27 00 00 call 112898 <__errno> 1100eb: c7 00 58 00 00 00 movl $0x58,(%eax) 1100f1: eb 36 jmp 110129 <_POSIX_Semaphore_Create_support+0x51> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 1100f3: a1 b4 31 13 00 mov 0x1331b4,%eax 1100f8: 40 inc %eax 1100f9: a3 b4 31 13 00 mov %eax,0x1331b4 return _Thread_Dispatch_disable_level; 1100fe: a1 b4 31 13 00 mov 0x1331b4,%eax * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 110103: 83 ec 0c sub $0xc,%esp 110106: 68 78 34 13 00 push $0x133478 11010b: e8 a8 c5 ff ff call 10c6b8 <_Objects_Allocate> 110110: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 110112: 83 c4 10 add $0x10,%esp 110115: 85 c0 test %eax,%eax 110117: 75 18 jne 110131 <_POSIX_Semaphore_Create_support+0x59> _Thread_Enable_dispatch(); 110119: e8 9e d5 ff ff call 10d6bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11011e: e8 75 27 00 00 call 112898 <__errno> 110123: c7 00 1c 00 00 00 movl $0x1c,(%eax) 110129: 83 c8 ff or $0xffffffff,%eax 11012c: e9 a4 00 00 00 jmp 1101d5 <_POSIX_Semaphore_Create_support+0xfd> /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { 110131: 85 f6 test %esi,%esi 110133: 74 36 je 11016b <_POSIX_Semaphore_Create_support+0x93> name = _Workspace_String_duplicate( name_arg, name_len ); 110135: 51 push %ecx 110136: 51 push %ecx 110137: ff 75 0c pushl 0xc(%ebp) 11013a: 56 push %esi 11013b: e8 d4 12 00 00 call 111414 <_Workspace_String_duplicate> 110140: 89 c6 mov %eax,%esi if ( !name ) { 110142: 83 c4 10 add $0x10,%esp 110145: 85 c0 test %eax,%eax 110147: 75 24 jne 11016d <_POSIX_Semaphore_Create_support+0x95><== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 110149: 52 push %edx <== NOT EXECUTED 11014a: 52 push %edx <== NOT EXECUTED 11014b: 53 push %ebx <== NOT EXECUTED 11014c: 68 78 34 13 00 push $0x133478 <== NOT EXECUTED 110151: e8 42 c8 ff ff call 10c998 <_Objects_Free> <== NOT EXECUTED _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 110156: e8 61 d5 ff ff call 10d6bc <_Thread_Enable_dispatch><== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 11015b: e8 38 27 00 00 call 112898 <__errno> <== NOT EXECUTED 110160: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 110166: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110169: eb be jmp 110129 <_POSIX_Semaphore_Create_support+0x51><== NOT EXECUTED } } else { name = NULL; 11016b: 31 f6 xor %esi,%esi } the_semaphore->process_shared = pshared; 11016d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( name ) { 110174: 85 f6 test %esi,%esi 110176: 74 11 je 110189 <_POSIX_Semaphore_Create_support+0xb1> the_semaphore->named = true; 110178: c6 43 14 01 movb $0x1,0x14(%ebx) the_semaphore->open_count = 1; 11017c: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx) the_semaphore->linked = true; 110183: c6 43 15 01 movb $0x1,0x15(%ebx) 110187: eb 0f jmp 110198 <_POSIX_Semaphore_Create_support+0xc0> } else { the_semaphore->named = false; 110189: c6 43 14 00 movb $0x0,0x14(%ebx) the_semaphore->open_count = 0; 11018d: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_semaphore->linked = false; 110194: c6 43 15 00 movb $0x0,0x15(%ebx) * 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; 110198: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 11019f: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1101a6: 50 push %eax 1101a7: ff 75 14 pushl 0x14(%ebp) the_semaphore->named = false; the_semaphore->open_count = 0; the_semaphore->linked = false; } the_sem_attr = &the_semaphore->Semaphore.Attributes; 1101aa: 8d 43 5c lea 0x5c(%ebx),%eax /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1101ad: 50 push %eax 1101ae: 8d 43 1c lea 0x1c(%ebx),%eax 1101b1: 50 push %eax 1101b2: e8 e9 bf ff ff call 10c1a0 <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 1101b7: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1101bb: a1 94 34 13 00 mov 0x133494,%eax 1101c0: 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; 1101c3: 89 73 0c mov %esi,0xc(%ebx) &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 1101c6: 8b 45 18 mov 0x18(%ebp),%eax 1101c9: 89 18 mov %ebx,(%eax) _Thread_Enable_dispatch(); 1101cb: e8 ec d4 ff ff call 10d6bc <_Thread_Enable_dispatch> return 0; 1101d0: 83 c4 10 add $0x10,%esp 1101d3: 31 c0 xor %eax,%eax } 1101d5: 8d 65 f8 lea -0x8(%ebp),%esp 1101d8: 5b pop %ebx 1101d9: 5e pop %esi 1101da: 5d pop %ebp 1101db: c3 ret =============================================================================== 0010e1a8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10e1a8: 55 push %ebp 10e1a9: 89 e5 mov %esp,%ebp 10e1ab: 83 ec 08 sub $0x8,%esp 10e1ae: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e1b1: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e1b7: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax) 10e1be: 75 31 jne 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49><== NEVER TAKEN 10e1c0: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax) 10e1c7: 75 28 jne 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10e1c9: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) 10e1d0: 74 1f je 10e1f1 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x49> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10e1d2: a1 dc e3 12 00 mov 0x12e3dc,%eax 10e1d7: 48 dec %eax 10e1d8: a3 dc e3 12 00 mov %eax,0x12e3dc return _Thread_Dispatch_disable_level; 10e1dd: a1 dc e3 12 00 mov 0x12e3dc,%eax thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10e1e2: 50 push %eax 10e1e3: 50 push %eax 10e1e4: 6a ff push $0xffffffff 10e1e6: 52 push %edx 10e1e7: e8 e4 05 00 00 call 10e7d0 <_POSIX_Thread_Exit> 10e1ec: 83 c4 10 add $0x10,%esp 10e1ef: eb 06 jmp 10e1f7 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x4f> } else _Thread_Enable_dispatch(); } 10e1f1: 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(); 10e1f2: e9 61 dd ff ff jmp 10bf58 <_Thread_Enable_dispatch> } 10e1f7: c9 leave 10e1f8: c3 ret =============================================================================== 0010f20c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 10f20c: 55 push %ebp 10f20d: 89 e5 mov %esp,%ebp 10f20f: 57 push %edi 10f210: 56 push %esi 10f211: 53 push %ebx 10f212: 83 ec 18 sub $0x18,%esp 10f215: 8b 75 08 mov 0x8(%ebp),%esi 10f218: 8b 7d 0c mov 0xc(%ebp),%edi 10f21b: 8b 5d 10 mov 0x10(%ebp),%ebx if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10f21e: ff 37 pushl (%edi) 10f220: e8 c7 ff ff ff call 10f1ec <_POSIX_Priority_Is_valid> 10f225: 83 c4 10 add $0x10,%esp 10f228: 84 c0 test %al,%al 10f22a: 75 0a jne 10f236 <_POSIX_Thread_Translate_sched_param+0x2a><== ALWAYS TAKEN return EINVAL; 10f22c: b8 16 00 00 00 mov $0x16,%eax 10f231: e9 91 00 00 00 jmp 10f2c7 <_POSIX_Thread_Translate_sched_param+0xbb> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10f236: c7 03 00 00 00 00 movl $0x0,(%ebx) *budget_callout = NULL; 10f23c: 8b 45 14 mov 0x14(%ebp),%eax 10f23f: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 10f245: 85 f6 test %esi,%esi 10f247: 75 08 jne 10f251 <_POSIX_Thread_Translate_sched_param+0x45> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10f249: c7 03 01 00 00 00 movl $0x1,(%ebx) 10f24f: eb 74 jmp 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9> return 0; } if ( policy == SCHED_FIFO ) { 10f251: 83 fe 01 cmp $0x1,%esi 10f254: 74 6f je 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 10f256: 83 fe 02 cmp $0x2,%esi 10f259: 75 08 jne 10f263 <_POSIX_Thread_Translate_sched_param+0x57> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 10f25b: c7 03 02 00 00 00 movl $0x2,(%ebx) 10f261: eb 62 jmp 10f2c5 <_POSIX_Thread_Translate_sched_param+0xb9> return 0; } if ( policy == SCHED_SPORADIC ) { 10f263: 83 fe 04 cmp $0x4,%esi 10f266: 75 c4 jne 10f22c <_POSIX_Thread_Translate_sched_param+0x20> if ( (param->sched_ss_repl_period.tv_sec == 0) && 10f268: 83 7f 08 00 cmpl $0x0,0x8(%edi) 10f26c: 75 06 jne 10f274 <_POSIX_Thread_Translate_sched_param+0x68> 10f26e: 83 7f 0c 00 cmpl $0x0,0xc(%edi) 10f272: 74 b8 je 10f22c <_POSIX_Thread_Translate_sched_param+0x20> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 10f274: 83 7f 10 00 cmpl $0x0,0x10(%edi) 10f278: 75 06 jne 10f280 <_POSIX_Thread_Translate_sched_param+0x74> 10f27a: 83 7f 14 00 cmpl $0x0,0x14(%edi) 10f27e: 74 ac je 10f22c <_POSIX_Thread_Translate_sched_param+0x20> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10f280: 83 ec 0c sub $0xc,%esp 10f283: 8d 47 08 lea 0x8(%edi),%eax 10f286: 50 push %eax 10f287: e8 74 e1 ff ff call 10d400 <_Timespec_To_ticks> 10f28c: 89 c6 mov %eax,%esi _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 10f28e: 8d 47 10 lea 0x10(%edi),%eax 10f291: 89 04 24 mov %eax,(%esp) 10f294: e8 67 e1 ff ff call 10d400 <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10f299: 83 c4 10 add $0x10,%esp 10f29c: 39 c6 cmp %eax,%esi 10f29e: 72 8c jb 10f22c <_POSIX_Thread_Translate_sched_param+0x20> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 10f2a0: 83 ec 0c sub $0xc,%esp 10f2a3: ff 77 04 pushl 0x4(%edi) 10f2a6: e8 41 ff ff ff call 10f1ec <_POSIX_Priority_Is_valid> 10f2ab: 83 c4 10 add $0x10,%esp 10f2ae: 84 c0 test %al,%al 10f2b0: 0f 84 76 ff ff ff je 10f22c <_POSIX_Thread_Translate_sched_param+0x20> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 10f2b6: c7 03 03 00 00 00 movl $0x3,(%ebx) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 10f2bc: 8b 45 14 mov 0x14(%ebp),%eax 10f2bf: c7 00 fb a2 10 00 movl $0x10a2fb,(%eax) return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 10f2c5: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 10f2c7: 8d 65 f4 lea -0xc(%ebp),%esp 10f2ca: 5b pop %ebx 10f2cb: 5e pop %esi 10f2cc: 5f pop %edi 10f2cd: 5d pop %ebp 10f2ce: c3 ret =============================================================================== 0010e3c1 <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 10e3c1: 55 push %ebp 10e3c2: 89 e5 mov %esp,%ebp 10e3c4: 57 push %edi 10e3c5: 56 push %esi 10e3c6: 53 push %ebx 10e3c7: 83 ec 28 sub $0x28,%esp 10e3ca: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 10e3cd: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 10e3d3: 53 push %ebx 10e3d4: e8 cb 22 00 00 call 1106a4 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 10e3d9: 89 1c 24 mov %ebx,(%esp) 10e3dc: e8 23 23 00 00 call 110704 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 10e3e1: 8b 53 28 mov 0x28(%ebx),%edx while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 10e3e4: 83 c4 10 add $0x10,%esp 10e3e7: 8d 7e 44 lea 0x44(%esi),%edi 10e3ea: eb 05 jmp 10e3f1 <_POSIX_Threads_Delete_extension+0x30> *(void **)the_thread->Wait.return_argument = value_ptr; 10e3ec: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 10e3ef: 89 10 mov %edx,(%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 )) ) 10e3f1: 83 ec 0c sub $0xc,%esp 10e3f4: 57 push %edi 10e3f5: 89 55 e4 mov %edx,-0x1c(%ebp) 10e3f8: e8 77 dd ff ff call 10c174 <_Thread_queue_Dequeue> 10e3fd: 83 c4 10 add $0x10,%esp 10e400: 85 c0 test %eax,%eax 10e402: 8b 55 e4 mov -0x1c(%ebp),%edx 10e405: 75 e5 jne 10e3ec <_POSIX_Threads_Delete_extension+0x2b><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 10e407: 83 be 84 00 00 00 04 cmpl $0x4,0x84(%esi) 10e40e: 75 12 jne 10e422 <_POSIX_Threads_Delete_extension+0x61> (void) _Watchdog_Remove( &api->Sporadic_timer ); 10e410: 83 ec 0c sub $0xc,%esp 10e413: 8d 86 a8 00 00 00 lea 0xa8(%esi),%eax 10e419: 50 push %eax 10e41a: e8 f9 e5 ff ff call 10ca18 <_Watchdog_Remove> 10e41f: 83 c4 10 add $0x10,%esp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 10e422: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10e429: 00 00 00 _Workspace_Free( api ); 10e42c: 89 75 08 mov %esi,0x8(%ebp) } 10e42f: 8d 65 f4 lea -0xc(%ebp),%esp 10e432: 5b pop %ebx 10e433: 5e pop %esi 10e434: 5f pop %edi 10e435: 5d pop %ebp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 10e436: e9 22 e7 ff ff jmp 10cb5d <_Workspace_Free> =============================================================================== 0010a028 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a028: 55 push %ebp 10a029: 89 e5 mov %esp,%ebp 10a02b: 57 push %edi 10a02c: 56 push %esi 10a02d: 53 push %ebx 10a02e: 83 ec 6c sub $0x6c,%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; 10a031: 8b 3d c4 b1 12 00 mov 0x12b1c4,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a037: 8b 15 c0 b1 12 00 mov 0x12b1c0,%edx if ( !user_threads || maximum == 0 ) 10a03d: 85 d2 test %edx,%edx 10a03f: 74 54 je 10a095 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a041: 85 ff test %edi,%edi 10a043: 74 50 je 10a095 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a045: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a047: 8d 75 a8 lea -0x58(%ebp),%esi 10a04a: 83 ec 0c sub $0xc,%esp 10a04d: 56 push %esi 10a04e: 89 55 94 mov %edx,-0x6c(%ebp) 10a051: e8 7a 52 00 00 call 10f2d0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a056: 59 pop %ecx 10a057: 58 pop %eax 10a058: 6a 02 push $0x2 10a05a: 56 push %esi 10a05b: e8 98 52 00 00 call 10f2f8 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a060: 58 pop %eax 10a061: 5a pop %edx 10a062: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a066: 56 push %esi 10a067: e8 b8 52 00 00 call 10f324 status = pthread_create( 10a06c: 6a 00 push $0x0 10a06e: ff 34 df pushl (%edi,%ebx,8) 10a071: 56 push %esi 10a072: 8d 45 a4 lea -0x5c(%ebp),%eax 10a075: 50 push %eax 10a076: e8 75 fc ff ff call 109cf0 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a07b: 83 c4 20 add $0x20,%esp 10a07e: 85 c0 test %eax,%eax 10a080: 8b 55 94 mov -0x6c(%ebp),%edx 10a083: 74 0b je 10a090 <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a085: 52 push %edx 10a086: 50 push %eax 10a087: 6a 01 push $0x1 10a089: 6a 02 push $0x2 10a08b: e8 98 1a 00 00 call 10bb28 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a090: 43 inc %ebx 10a091: 39 d3 cmp %edx,%ebx 10a093: 75 b5 jne 10a04a <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a095: 8d 65 f4 lea -0xc(%ebp),%esp 10a098: 5b pop %ebx 10a099: 5e pop %esi 10a09a: 5f pop %edi 10a09b: 5d pop %ebp 10a09c: c3 ret =============================================================================== 0010e56d <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10e56d: 55 push %ebp 10e56e: 89 e5 mov %esp,%ebp 10e570: 56 push %esi 10e571: 53 push %ebx 10e572: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e575: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 10e57b: 83 ec 0c sub $0xc,%esp 10e57e: 8d 86 98 00 00 00 lea 0x98(%esi),%eax 10e584: 50 push %eax 10e585: e8 a2 12 00 00 call 10f82c <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10e58a: 89 43 74 mov %eax,0x74(%ebx) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10e58d: 0f b6 05 88 a1 12 00 movzbl 0x12a188,%eax 10e594: 2b 86 88 00 00 00 sub 0x88(%esi),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 10e59a: 89 43 18 mov %eax,0x18(%ebx) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10e59d: 83 c4 10 add $0x10,%esp 10e5a0: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10e5a4: 75 12 jne 10e5b8 <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10e5a6: 39 43 14 cmp %eax,0x14(%ebx) 10e5a9: 76 0d jbe 10e5b8 <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10e5ab: 52 push %edx 10e5ac: 6a 01 push $0x1 10e5ae: 50 push %eax 10e5af: 53 push %ebx 10e5b0: e8 67 d4 ff ff call 10ba1c <_Thread_Change_priority> 10e5b5: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 10e5b8: 83 ec 0c sub $0xc,%esp 10e5bb: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10e5c1: 50 push %eax 10e5c2: e8 65 12 00 00 call 10f82c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10e5c7: 89 86 b4 00 00 00 mov %eax,0xb4(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10e5cd: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 10e5d0: 81 c6 a8 00 00 00 add $0xa8,%esi 10e5d6: 89 75 0c mov %esi,0xc(%ebp) 10e5d9: c7 45 08 88 e4 12 00 movl $0x12e488,0x8(%ebp) } 10e5e0: 8d 65 f8 lea -0x8(%ebp),%esp 10e5e3: 5b pop %ebx 10e5e4: 5e pop %esi 10e5e5: 5d pop %ebp 10e5e6: e9 19 e3 ff ff jmp 10c904 <_Watchdog_Insert> =============================================================================== 0010e5eb <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10e5eb: 55 push %ebp 10e5ec: 89 e5 mov %esp,%ebp 10e5ee: 83 ec 08 sub $0x8,%esp 10e5f1: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e5f4: 8b 88 e8 00 00 00 mov 0xe8(%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 */ 10e5fa: c7 40 74 ff ff ff ff movl $0xffffffff,0x74(%eax) 10e601: 0f b6 15 88 a1 12 00 movzbl 0x12a188,%edx 10e608: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 10e60e: 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 ) { 10e611: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e615: 75 12 jne 10e629 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10e617: 39 50 14 cmp %edx,0x14(%eax) 10e61a: 73 0d jae 10e629 <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10e61c: 51 push %ecx 10e61d: 6a 01 push $0x1 10e61f: 52 push %edx 10e620: 50 push %eax 10e621: e8 f6 d3 ff ff call 10ba1c <_Thread_Change_priority> 10e626: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10e629: c9 leave 10e62a: c3 ret =============================================================================== 00109bb8 <_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) { 109bb8: 55 push %ebp 109bb9: 89 e5 mov %esp,%ebp 109bbb: 57 push %edi 109bbc: 56 push %esi 109bbd: 53 push %ebx 109bbe: 83 ec 1c sub $0x1c,%esp 109bc1: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 109bc4: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 109bc7: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 109bcb: 75 06 jne 109bd3 <_POSIX_Timer_TSR+0x1b> 109bcd: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 109bd1: 74 5f je 109c32 <_POSIX_Timer_TSR+0x7a> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 109bd3: 83 ec 0c sub $0xc,%esp 109bd6: 53 push %ebx 109bd7: 68 b8 9b 10 00 push $0x109bb8 109bdc: ff 73 08 pushl 0x8(%ebx) 109bdf: ff 73 64 pushl 0x64(%ebx) 109be2: 8d 43 10 lea 0x10(%ebx),%eax 109be5: 50 push %eax 109be6: e8 65 51 00 00 call 10ed50 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 109beb: 83 c4 20 add $0x20,%esp 109bee: 84 c0 test %al,%al 109bf0: 74 5b je 109c4d <_POSIX_Timer_TSR+0x95> <== NEVER TAKEN struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 109bf2: 83 ec 0c sub $0xc,%esp 109bf5: 8d 45 e0 lea -0x20(%ebp),%eax 109bf8: 50 push %eax 109bf9: e8 5e 13 00 00 call 10af5c <_TOD_Get_as_timestamp> _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 109bfe: 8b 75 e0 mov -0x20(%ebp),%esi 109c01: 8b 7d e4 mov -0x1c(%ebp),%edi static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 109c04: 6a 00 push $0x0 109c06: 68 00 ca 9a 3b push $0x3b9aca00 109c0b: 57 push %edi 109c0c: 56 push %esi 109c0d: e8 d2 3f 01 00 call 11dbe4 <__divdi3> 109c12: 83 c4 10 add $0x10,%esp 109c15: 89 43 6c mov %eax,0x6c(%ebx) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 109c18: 6a 00 push $0x0 109c1a: 68 00 ca 9a 3b push $0x3b9aca00 109c1f: 57 push %edi 109c20: 56 push %esi 109c21: e8 12 41 01 00 call 11dd38 <__moddi3> 109c26: 89 43 70 mov %eax,0x70(%ebx) /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 109c29: c6 43 3c 03 movb $0x3,0x3c(%ebx) 109c2d: 83 c4 20 add $0x20,%esp 109c30: eb 04 jmp 109c36 <_POSIX_Timer_TSR+0x7e> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 109c32: 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 ) ) { 109c36: 50 push %eax 109c37: 50 push %eax 109c38: ff 73 44 pushl 0x44(%ebx) 109c3b: ff 73 38 pushl 0x38(%ebx) 109c3e: e8 0d 4d 00 00 call 10e950 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 109c43: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 109c4a: 83 c4 10 add $0x10,%esp } 109c4d: 8d 65 f4 lea -0xc(%ebp),%esp 109c50: 5b pop %ebx 109c51: 5e pop %esi 109c52: 5f pop %edi 109c53: 5d pop %ebp 109c54: c3 ret =============================================================================== 00110780 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 110780: 55 push %ebp 110781: 89 e5 mov %esp,%ebp 110783: 57 push %edi 110784: 56 push %esi 110785: 53 push %ebx 110786: 83 ec 68 sub $0x68,%esp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 110789: 6a 01 push $0x1 11078b: 0f b6 45 10 movzbl 0x10(%ebp),%eax 11078f: 50 push %eax 110790: 8d 45 b4 lea -0x4c(%ebp),%eax 110793: 50 push %eax 110794: ff 75 0c pushl 0xc(%ebp) 110797: ff 75 08 pushl 0x8(%ebp) 11079a: e8 91 00 00 00 call 110830 <_POSIX_signals_Clear_signals> 11079f: 83 c4 20 add $0x20,%esp is_global, true ) ) return false; 1107a2: 31 c9 xor %ecx,%ecx { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 1107a4: 84 c0 test %al,%al 1107a6: 74 7d je 110825 <_POSIX_signals_Check_signal+0xa5> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 1107a8: 6b 55 0c 0c imul $0xc,0xc(%ebp),%edx 1107ac: 8b 9a 30 e9 12 00 mov 0x12e930(%edx),%ebx 1107b2: 83 fb 01 cmp $0x1,%ebx 1107b5: 74 6e je 110825 <_POSIX_signals_Check_signal+0xa5><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 1107b7: 8b 4d 08 mov 0x8(%ebp),%ecx 1107ba: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx 1107c0: 89 4d a4 mov %ecx,-0x5c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 1107c3: 8b 82 2c e9 12 00 mov 0x12e92c(%edx),%eax 1107c9: 09 c8 or %ecx,%eax 1107cb: 8b 4d 08 mov 0x8(%ebp),%ecx 1107ce: 89 81 d0 00 00 00 mov %eax,0xd0(%ecx) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 1107d4: 8d 7d c0 lea -0x40(%ebp),%edi 1107d7: 8b 35 ec e8 12 00 mov 0x12e8ec,%esi 1107dd: 83 c6 20 add $0x20,%esi 1107e0: b9 0a 00 00 00 mov $0xa,%ecx 1107e5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 1107e7: 83 ba 28 e9 12 00 02 cmpl $0x2,0x12e928(%edx) 1107ee: 75 09 jne 1107f9 <_POSIX_signals_Check_signal+0x79> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 1107f0: 50 push %eax 1107f1: 6a 00 push $0x0 1107f3: 8d 45 b4 lea -0x4c(%ebp),%eax 1107f6: 50 push %eax 1107f7: eb 03 jmp 1107fc <_POSIX_signals_Check_signal+0x7c> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 1107f9: 83 ec 0c sub $0xc,%esp 1107fc: ff 75 0c pushl 0xc(%ebp) 1107ff: ff d3 call *%ebx break; 110801: 83 c4 10 add $0x10,%esp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 110804: 8b 3d ec e8 12 00 mov 0x12e8ec,%edi 11080a: 83 c7 20 add $0x20,%edi 11080d: 8d 75 c0 lea -0x40(%ebp),%esi 110810: b9 0a 00 00 00 mov $0xa,%ecx 110815: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 110817: 8b 45 a4 mov -0x5c(%ebp),%eax 11081a: 8b 55 08 mov 0x8(%ebp),%edx 11081d: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return true; 110823: b1 01 mov $0x1,%cl } 110825: 88 c8 mov %cl,%al 110827: 8d 65 f4 lea -0xc(%ebp),%esp 11082a: 5b pop %ebx 11082b: 5e pop %esi 11082c: 5f pop %edi 11082d: 5d pop %ebp 11082e: c3 ret =============================================================================== 00110e54 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 110e54: 55 push %ebp 110e55: 89 e5 mov %esp,%ebp 110e57: 53 push %ebx 110e58: 8b 55 08 mov 0x8(%ebp),%edx 110e5b: 8d 4a ff lea -0x1(%edx),%ecx 110e5e: b8 01 00 00 00 mov $0x1,%eax 110e63: d3 e0 shl %cl,%eax clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 110e65: 9c pushf 110e66: fa cli 110e67: 59 pop %ecx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 110e68: 6b d2 0c imul $0xc,%edx,%edx 110e6b: 83 ba 28 e9 12 00 02 cmpl $0x2,0x12e928(%edx) 110e72: 75 12 jne 110e86 <_POSIX_signals_Clear_process_signals+0x32> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 110e74: 8d 9a 24 eb 12 00 lea 0x12eb24(%edx),%ebx if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 110e7a: 39 9a 20 eb 12 00 cmp %ebx,0x12eb20(%edx) 110e80: 74 04 je 110e86 <_POSIX_signals_Clear_process_signals+0x32><== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 110e82: 51 push %ecx 110e83: 9d popf 110e84: eb 0a jmp 110e90 <_POSIX_signals_Clear_process_signals+0x3c> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 110e86: f7 d0 not %eax 110e88: 21 05 1c eb 12 00 and %eax,0x12eb1c 110e8e: eb f2 jmp 110e82 <_POSIX_signals_Clear_process_signals+0x2e> } _ISR_Enable( level ); } 110e90: 5b pop %ebx 110e91: 5d pop %ebp 110e92: c3 ret =============================================================================== 0010a6c4 <_POSIX_signals_Get_lowest>: #include static int _POSIX_signals_Get_lowest( sigset_t set ) { 10a6c4: 55 push %ebp 10a6c5: 89 e5 mov %esp,%ebp 10a6c7: 56 push %esi 10a6c8: 53 push %ebx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10a6c9: ba 1b 00 00 00 mov $0x1b,%edx 10a6ce: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include static int _POSIX_signals_Get_lowest( 10a6d3: 8d 4a ff lea -0x1(%edx),%ecx 10a6d6: 89 de mov %ebx,%esi 10a6d8: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a6da: 85 c6 test %eax,%esi 10a6dc: 75 1e jne 10a6fc <_POSIX_signals_Get_lowest+0x38><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10a6de: 42 inc %edx 10a6df: 83 fa 20 cmp $0x20,%edx 10a6e2: 75 ef jne 10a6d3 <_POSIX_signals_Get_lowest+0xf> 10a6e4: b2 01 mov $0x1,%dl 10a6e6: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include static int _POSIX_signals_Get_lowest( 10a6eb: 8d 4a ff lea -0x1(%edx),%ecx 10a6ee: 89 de mov %ebx,%esi 10a6f0: d3 e6 shl %cl,%esi #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10a6f2: 85 c6 test %eax,%esi 10a6f4: 75 06 jne 10a6fc <_POSIX_signals_Get_lowest+0x38> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10a6f6: 42 inc %edx 10a6f7: 83 fa 1b cmp $0x1b,%edx 10a6fa: 75 ef jne 10a6eb <_POSIX_signals_Get_lowest+0x27><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10a6fc: 89 d0 mov %edx,%eax 10a6fe: 5b pop %ebx 10a6ff: 5e pop %esi 10a700: 5d pop %ebp 10a701: c3 ret =============================================================================== 0011dbf0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11dbf0: 55 push %ebp 11dbf1: 89 e5 mov %esp,%ebp 11dbf3: 57 push %edi 11dbf4: 56 push %esi 11dbf5: 53 push %ebx 11dbf6: 83 ec 0c sub $0xc,%esp 11dbf9: 8b 5d 08 mov 0x8(%ebp),%ebx 11dbfc: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11dbff: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi 11dc05: 8d 4e ff lea -0x1(%esi),%ecx 11dc08: b8 01 00 00 00 mov $0x1,%eax 11dc0d: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 11dc0f: 8b 53 10 mov 0x10(%ebx),%edx 11dc12: 89 d1 mov %edx,%ecx 11dc14: 81 e1 00 80 00 10 and $0x10008000,%ecx 11dc1a: 81 f9 00 80 00 10 cmp $0x10008000,%ecx 11dc20: 75 54 jne 11dc76 <_POSIX_signals_Unblock_thread+0x86> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11dc22: 85 43 30 test %eax,0x30(%ebx) 11dc25: 75 11 jne 11dc38 <_POSIX_signals_Unblock_thread+0x48> 11dc27: 8b 97 d0 00 00 00 mov 0xd0(%edi),%edx 11dc2d: f7 d2 not %edx 11dc2f: 85 d0 test %edx,%eax 11dc31: 75 05 jne 11dc38 <_POSIX_signals_Unblock_thread+0x48> 11dc33: e9 ab 00 00 00 jmp 11dce3 <_POSIX_signals_Unblock_thread+0xf3> the_thread->Wait.return_code = EINTR; 11dc38: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11dc3f: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11dc42: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11dc46: 75 12 jne 11dc5a <_POSIX_signals_Unblock_thread+0x6a> the_info->si_signo = signo; 11dc48: 89 30 mov %esi,(%eax) the_info->si_code = SI_USER; 11dc4a: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11dc51: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 11dc58: eb 0c jmp 11dc66 <_POSIX_signals_Unblock_thread+0x76> } else { *the_info = *info; 11dc5a: b9 03 00 00 00 mov $0x3,%ecx 11dc5f: 89 c7 mov %eax,%edi 11dc61: 8b 75 10 mov 0x10(%ebp),%esi 11dc64: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11dc66: 83 ec 0c sub $0xc,%esp 11dc69: 53 push %ebx 11dc6a: e8 c1 e7 fe ff call 10c430 <_Thread_queue_Extract_with_proxy> return true; 11dc6f: 83 c4 10 add $0x10,%esp 11dc72: b0 01 mov $0x1,%al 11dc74: eb 6f jmp 11dce5 <_POSIX_signals_Unblock_thread+0xf5> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 11dc76: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx 11dc7c: f7 d1 not %ecx 11dc7e: 85 c8 test %ecx,%eax 11dc80: 74 61 je 11dce3 <_POSIX_signals_Unblock_thread+0xf3> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 11dc82: f7 c2 00 00 00 10 test $0x10000000,%edx 11dc88: 74 3d je 11dcc7 <_POSIX_signals_Unblock_thread+0xd7> the_thread->Wait.return_code = EINTR; 11dc8a: 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) ) 11dc91: f7 c2 e0 be 03 00 test $0x3bee0,%edx 11dc97: 74 0b je 11dca4 <_POSIX_signals_Unblock_thread+0xb4> _Thread_queue_Extract_with_proxy( the_thread ); 11dc99: 83 ec 0c sub $0xc,%esp 11dc9c: 53 push %ebx 11dc9d: e8 8e e7 fe ff call 10c430 <_Thread_queue_Extract_with_proxy> 11dca2: eb 1e jmp 11dcc2 <_POSIX_signals_Unblock_thread+0xd2> else if ( _States_Is_delaying(the_thread->current_state) ) { 11dca4: 80 e2 08 and $0x8,%dl 11dca7: 74 3a je 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 11dca9: 83 ec 0c sub $0xc,%esp 11dcac: 8d 43 48 lea 0x48(%ebx),%eax 11dcaf: 50 push %eax 11dcb0: e8 63 ed fe ff call 10ca18 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11dcb5: 58 pop %eax 11dcb6: 5a pop %edx 11dcb7: 68 f8 ff 03 10 push $0x1003fff8 11dcbc: 53 push %ebx 11dcbd: e8 1a de fe ff call 10badc <_Thread_Clear_state> 11dcc2: 83 c4 10 add $0x10,%esp 11dcc5: eb 1c jmp 11dce3 <_POSIX_signals_Unblock_thread+0xf3> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11dcc7: 85 d2 test %edx,%edx 11dcc9: 75 18 jne 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11dccb: 83 3d e8 e8 12 00 00 cmpl $0x0,0x12e8e8 11dcd2: 74 0f je 11dce3 <_POSIX_signals_Unblock_thread+0xf3> 11dcd4: 3b 1d ec e8 12 00 cmp 0x12e8ec,%ebx 11dcda: 75 07 jne 11dce3 <_POSIX_signals_Unblock_thread+0xf3><== NEVER TAKEN _Thread_Dispatch_necessary = true; 11dcdc: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8 } } return false; 11dce3: 31 c0 xor %eax,%eax } 11dce5: 8d 65 f4 lea -0xc(%ebp),%esp 11dce8: 5b pop %ebx 11dce9: 5e pop %esi 11dcea: 5f pop %edi 11dceb: 5d pop %ebp 11dcec: c3 ret =============================================================================== 0010c004 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 10c004: 55 push %ebp 10c005: 89 e5 mov %esp,%ebp 10c007: 57 push %edi 10c008: 56 push %esi 10c009: 53 push %ebx 10c00a: 83 ec 1c sub $0x1c,%esp 10c00d: 8b 7d 08 mov 0x8(%ebp),%edi 10c010: 8b 5d 0c mov 0xc(%ebp),%ebx RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 10c013: 85 db test %ebx,%ebx 10c015: 0f 84 0d 01 00 00 je 10c128 <_RBTree_Extract_unprotected+0x124> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 10c01b: 3b 5f 08 cmp 0x8(%edi),%ebx 10c01e: 75 10 jne 10c030 <_RBTree_Extract_unprotected+0x2c> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); 10c020: 50 push %eax 10c021: 50 push %eax 10c022: 6a 01 push $0x1 10c024: 53 push %ebx 10c025: e8 5a 03 00 00 call 10c384 <_RBTree_Next_unprotected> RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 10c02a: 89 47 08 mov %eax,0x8(%edi) 10c02d: 83 c4 10 add $0x10,%esp } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 10c030: 3b 5f 0c cmp 0xc(%edi),%ebx 10c033: 75 10 jne 10c045 <_RBTree_Extract_unprotected+0x41> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); 10c035: 56 push %esi 10c036: 56 push %esi 10c037: 6a 00 push $0x0 10c039: 53 push %ebx 10c03a: e8 45 03 00 00 call 10c384 <_RBTree_Next_unprotected> RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 10c03f: 89 47 0c mov %eax,0xc(%edi) 10c042: 83 c4 10 add $0x10,%esp * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 10c045: 8b 73 04 mov 0x4(%ebx),%esi 10c048: 85 f6 test %esi,%esi 10c04a: 74 77 je 10c0c3 <_RBTree_Extract_unprotected+0xbf> 10c04c: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c050: 75 04 jne 10c056 <_RBTree_Extract_unprotected+0x52> 10c052: eb 78 jmp 10c0cc <_RBTree_Extract_unprotected+0xc8> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 10c054: 89 c6 mov %eax,%esi 10c056: 8b 46 08 mov 0x8(%esi),%eax 10c059: 85 c0 test %eax,%eax 10c05b: 75 f7 jne 10c054 <_RBTree_Extract_unprotected+0x50> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 10c05d: 8b 56 04 mov 0x4(%esi),%edx if(leaf) { 10c060: 85 d2 test %edx,%edx 10c062: 74 06 je 10c06a <_RBTree_Extract_unprotected+0x66> leaf->parent = target->parent; 10c064: 8b 06 mov (%esi),%eax 10c066: 89 02 mov %eax,(%edx) 10c068: eb 0d jmp 10c077 <_RBTree_Extract_unprotected+0x73> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 10c06a: 89 f0 mov %esi,%eax 10c06c: 89 55 e0 mov %edx,-0x20(%ebp) 10c06f: e8 53 fe ff ff call 10bec7 <_RBTree_Extract_validate_unprotected> 10c074: 8b 55 e0 mov -0x20(%ebp),%edx } victim_color = target->color; 10c077: 8b 46 0c mov 0xc(%esi),%eax 10c07a: 89 45 e4 mov %eax,-0x1c(%ebp) dir = target != target->parent->child[0]; 10c07d: 8b 06 mov (%esi),%eax 10c07f: 31 c9 xor %ecx,%ecx 10c081: 3b 70 04 cmp 0x4(%eax),%esi 10c084: 0f 95 c1 setne %cl target->parent->child[dir] = leaf; 10c087: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 10c08b: 8b 03 mov (%ebx),%eax 10c08d: 31 c9 xor %ecx,%ecx 10c08f: 3b 58 04 cmp 0x4(%eax),%ebx 10c092: 0f 95 c1 setne %cl the_node->parent->child[dir] = target; 10c095: 89 74 88 04 mov %esi,0x4(%eax,%ecx,4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 10c099: 8b 43 08 mov 0x8(%ebx),%eax 10c09c: 89 46 08 mov %eax,0x8(%esi) if (the_node->child[RBT_RIGHT]) 10c09f: 8b 43 08 mov 0x8(%ebx),%eax 10c0a2: 85 c0 test %eax,%eax 10c0a4: 74 02 je 10c0a8 <_RBTree_Extract_unprotected+0xa4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 10c0a6: 89 30 mov %esi,(%eax) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 10c0a8: 8b 43 04 mov 0x4(%ebx),%eax 10c0ab: 89 46 04 mov %eax,0x4(%esi) if (the_node->child[RBT_LEFT]) 10c0ae: 8b 43 04 mov 0x4(%ebx),%eax 10c0b1: 85 c0 test %eax,%eax 10c0b3: 74 02 je 10c0b7 <_RBTree_Extract_unprotected+0xb3> the_node->child[RBT_LEFT]->parent = target; 10c0b5: 89 30 mov %esi,(%eax) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 10c0b7: 8b 03 mov (%ebx),%eax 10c0b9: 89 06 mov %eax,(%esi) target->color = the_node->color; 10c0bb: 8b 43 0c mov 0xc(%ebx),%eax 10c0be: 89 46 0c mov %eax,0xc(%esi) 10c0c1: eb 32 jmp 10c0f5 <_RBTree_Extract_unprotected+0xf1> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 10c0c3: 8b 53 08 mov 0x8(%ebx),%edx if( leaf ) { 10c0c6: 85 d2 test %edx,%edx 10c0c8: 75 04 jne 10c0ce <_RBTree_Extract_unprotected+0xca> 10c0ca: eb 08 jmp 10c0d4 <_RBTree_Extract_unprotected+0xd0> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 10c0cc: 89 f2 mov %esi,%edx * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; 10c0ce: 8b 03 mov (%ebx),%eax 10c0d0: 89 02 mov %eax,(%edx) 10c0d2: eb 0d jmp 10c0e1 <_RBTree_Extract_unprotected+0xdd> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 10c0d4: 89 d8 mov %ebx,%eax 10c0d6: 89 55 e0 mov %edx,-0x20(%ebp) 10c0d9: e8 e9 fd ff ff call 10bec7 <_RBTree_Extract_validate_unprotected> 10c0de: 8b 55 e0 mov -0x20(%ebp),%edx } victim_color = the_node->color; 10c0e1: 8b 43 0c mov 0xc(%ebx),%eax 10c0e4: 89 45 e4 mov %eax,-0x1c(%ebp) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 10c0e7: 8b 03 mov (%ebx),%eax 10c0e9: 31 c9 xor %ecx,%ecx 10c0eb: 3b 58 04 cmp 0x4(%eax),%ebx 10c0ee: 0f 95 c1 setne %cl the_node->parent->child[dir] = leaf; 10c0f1: 89 54 88 04 mov %edx,0x4(%eax,%ecx,4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 10c0f5: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10c0f9: 75 0b jne 10c106 <_RBTree_Extract_unprotected+0x102> if (leaf) { 10c0fb: 85 d2 test %edx,%edx 10c0fd: 74 07 je 10c106 <_RBTree_Extract_unprotected+0x102> leaf->color = RBT_BLACK; /* case 2 */ 10c0ff: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 10c106: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10c10d: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 10c114: c7 03 00 00 00 00 movl $0x0,(%ebx) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 10c11a: 8b 47 04 mov 0x4(%edi),%eax 10c11d: 85 c0 test %eax,%eax 10c11f: 74 07 je 10c128 <_RBTree_Extract_unprotected+0x124> 10c121: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) } 10c128: 8d 65 f4 lea -0xc(%ebp),%esp 10c12b: 5b pop %ebx 10c12c: 5e pop %esi 10c12d: 5f pop %edi 10c12e: 5d pop %ebp 10c12f: c3 ret =============================================================================== 0010cb1c <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 10cb1c: 55 push %ebp 10cb1d: 89 e5 mov %esp,%ebp 10cb1f: 57 push %edi 10cb20: 56 push %esi 10cb21: 53 push %ebx 10cb22: 83 ec 0c sub $0xc,%esp 10cb25: 8b 5d 08 mov 0x8(%ebp),%ebx 10cb28: 8b 75 14 mov 0x14(%ebp),%esi 10cb2b: 8b 45 1c mov 0x1c(%ebp),%eax size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 10cb2e: 85 db test %ebx,%ebx 10cb30: 74 3d je 10cb6f <_RBTree_Initialize+0x53><== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 10cb32: c7 03 00 00 00 00 movl $0x0,(%ebx) the_rbtree->root = NULL; 10cb38: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) the_rbtree->first[0] = NULL; 10cb3f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_rbtree->first[1] = NULL; 10cb46: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_rbtree->compare_function = compare_function; 10cb4d: 8b 55 0c mov 0xc(%ebp),%edx 10cb50: 89 53 10 mov %edx,0x10(%ebx) the_rbtree->is_unique = is_unique; 10cb53: 88 43 14 mov %al,0x14(%ebx) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 10cb56: 8b 7d 10 mov 0x10(%ebp),%edi while ( count-- ) { 10cb59: eb 10 jmp 10cb6b <_RBTree_Initialize+0x4f> _RBTree_Insert_unprotected(the_rbtree, next); 10cb5b: 50 push %eax 10cb5c: 50 push %eax 10cb5d: 57 push %edi 10cb5e: 53 push %ebx 10cb5f: e8 a8 fd ff ff call 10c90c <_RBTree_Insert_unprotected> * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 10cb64: 03 7d 18 add 0x18(%ebp),%edi 10cb67: 4e dec %esi 10cb68: 83 c4 10 add $0x10,%esp /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 10cb6b: 85 f6 test %esi,%esi 10cb6d: 75 ec jne 10cb5b <_RBTree_Initialize+0x3f> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 10cb6f: 8d 65 f4 lea -0xc(%ebp),%esp 10cb72: 5b pop %ebx 10cb73: 5e pop %esi 10cb74: 5f pop %edi 10cb75: 5d pop %ebp 10cb76: c3 ret =============================================================================== 0010c194 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 10c194: 55 push %ebp 10c195: 89 e5 mov %esp,%ebp 10c197: 57 push %edi 10c198: 56 push %esi 10c199: 53 push %ebx 10c19a: 83 ec 1c sub $0x1c,%esp 10c19d: 8b 75 08 mov 0x8(%ebp),%esi 10c1a0: 8b 5d 0c mov 0xc(%ebp),%ebx if(!the_node) return (RBTree_Node*)-1; 10c1a3: 85 db test %ebx,%ebx 10c1a5: 0f 84 55 01 00 00 je 10c300 <_RBTree_Insert_unprotected+0x16c> RBTree_Node *iter_node = the_rbtree->root; 10c1ab: 8b 7e 04 mov 0x4(%esi),%edi int compare_result; if (!iter_node) { /* special case: first node inserted */ 10c1ae: 89 f9 mov %edi,%ecx 10c1b0: 85 ff test %edi,%edi 10c1b2: 75 27 jne 10c1db <_RBTree_Insert_unprotected+0x47> the_node->color = RBT_BLACK; 10c1b4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_rbtree->root = the_node; 10c1bb: 89 5e 04 mov %ebx,0x4(%esi) the_rbtree->first[0] = the_rbtree->first[1] = the_node; 10c1be: 89 5e 0c mov %ebx,0xc(%esi) 10c1c1: 89 5e 08 mov %ebx,0x8(%esi) the_node->parent = (RBTree_Node *) the_rbtree; 10c1c4: 89 33 mov %esi,(%ebx) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 10c1c6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10c1cd: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 10c1d4: e9 37 01 00 00 jmp 10c310 <_RBTree_Insert_unprotected+0x17c> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; 10c1d9: 89 f9 mov %edi,%ecx the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 10c1db: 52 push %edx 10c1dc: 52 push %edx 10c1dd: 57 push %edi 10c1de: 53 push %ebx 10c1df: 89 4d e4 mov %ecx,-0x1c(%ebp) 10c1e2: ff 56 10 call *0x10(%esi) if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 10c1e5: 83 c4 10 add $0x10,%esp 10c1e8: 80 7e 14 00 cmpb $0x0,0x14(%esi) 10c1ec: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c1ef: 74 08 je 10c1f9 <_RBTree_Insert_unprotected+0x65> 10c1f1: 85 c0 test %eax,%eax 10c1f3: 0f 84 17 01 00 00 je 10c310 <_RBTree_Insert_unprotected+0x17c> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 10c1f9: 89 c2 mov %eax,%edx 10c1fb: f7 d2 not %edx 10c1fd: c1 ea 1f shr $0x1f,%edx if (!iter_node->child[dir]) { 10c200: 8b 7c 97 04 mov 0x4(%edi,%edx,4),%edi 10c204: 85 ff test %edi,%edi 10c206: 75 d1 jne 10c1d9 <_RBTree_Insert_unprotected+0x45> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 10c208: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10c20f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) the_node->color = RBT_RED; 10c216: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) iter_node->child[dir] = the_node; 10c21d: 89 5c 91 04 mov %ebx,0x4(%ecx,%edx,4) the_node->parent = iter_node; 10c221: 89 0b mov %ecx,(%ebx) /* update min/max */ compare_result = the_rbtree->compare_function( 10c223: 50 push %eax 10c224: 50 push %eax 10c225: ff 74 96 08 pushl 0x8(%esi,%edx,4) 10c229: 53 push %ebx 10c22a: 89 55 e4 mov %edx,-0x1c(%ebp) 10c22d: ff 56 10 call *0x10(%esi) the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 10c230: 83 c4 10 add $0x10,%esp 10c233: 8b 55 e4 mov -0x1c(%ebp),%edx 10c236: 85 d2 test %edx,%edx 10c238: 75 0a jne 10c244 <_RBTree_Insert_unprotected+0xb0> 10c23a: 85 c0 test %eax,%eax 10c23c: 0f 89 9f 00 00 00 jns 10c2e1 <_RBTree_Insert_unprotected+0x14d> 10c242: eb 08 jmp 10c24c <_RBTree_Insert_unprotected+0xb8> (dir && _RBTree_Is_greater(compare_result)) ) { 10c244: 85 c0 test %eax,%eax 10c246: 0f 8e 95 00 00 00 jle 10c2e1 <_RBTree_Insert_unprotected+0x14d> the_rbtree->first[dir] = the_node; 10c24c: 89 5c 96 08 mov %ebx,0x8(%esi,%edx,4) 10c250: e9 8c 00 00 00 jmp 10c2e1 <_RBTree_Insert_unprotected+0x14d> const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; 10c255: 85 f6 test %esi,%esi 10c257: 74 1b je 10c274 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN if(!(the_node->parent->parent->parent)) return NULL; 10c259: 83 3e 00 cmpl $0x0,(%esi) 10c25c: 74 16 je 10c274 <_RBTree_Insert_unprotected+0xe0><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 10c25e: 8b 56 04 mov 0x4(%esi),%edx 10c261: 39 d0 cmp %edx,%eax 10c263: 75 03 jne 10c268 <_RBTree_Insert_unprotected+0xd4> return the_node->parent->child[RBT_RIGHT]; 10c265: 8b 56 08 mov 0x8(%esi),%edx */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10c268: 85 d2 test %edx,%edx 10c26a: 74 0a je 10c276 <_RBTree_Insert_unprotected+0xe2> 10c26c: 83 7a 0c 01 cmpl $0x1,0xc(%edx) 10c270: 75 04 jne 10c276 <_RBTree_Insert_unprotected+0xe2> 10c272: eb 06 jmp 10c27a <_RBTree_Insert_unprotected+0xe6> ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 10c274: 31 d2 xor %edx,%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10c276: 31 c9 xor %ecx,%ecx 10c278: eb 05 jmp 10c27f <_RBTree_Insert_unprotected+0xeb> 10c27a: b9 01 00 00 00 mov $0x1,%ecx while (_RBTree_Is_red(_RBTree_Parent(the_node))) { u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { 10c27f: 85 c9 test %ecx,%ecx 10c281: 74 17 je 10c29a <_RBTree_Insert_unprotected+0x106> the_node->parent->color = RBT_BLACK; 10c283: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) u->color = RBT_BLACK; 10c28a: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) g->color = RBT_RED; 10c291: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) 10c298: eb 45 jmp 10c2df <_RBTree_Insert_unprotected+0x14b> the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 10c29a: 31 c9 xor %ecx,%ecx 10c29c: 3b 46 04 cmp 0x4(%esi),%eax 10c29f: 0f 95 c1 setne %cl the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 10c2a2: 31 d2 xor %edx,%edx 10c2a4: 3b 58 04 cmp 0x4(%eax),%ebx 10c2a7: 0f 95 c2 setne %dl RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 10c2aa: 39 ca cmp %ecx,%edx 10c2ac: 74 11 je 10c2bf <_RBTree_Insert_unprotected+0x12b> _RBTree_Rotate(the_node->parent, pdir); 10c2ae: 89 ca mov %ecx,%edx 10c2b0: 89 4d e4 mov %ecx,-0x1c(%ebp) 10c2b3: e8 98 fe ff ff call 10c150 <_RBTree_Rotate> the_node = the_node->child[pdir]; 10c2b8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c2bb: 8b 5c 8b 04 mov 0x4(%ebx,%ecx,4),%ebx } the_node->parent->color = RBT_BLACK; 10c2bf: 8b 03 mov (%ebx),%eax 10c2c1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) g->color = RBT_RED; 10c2c8: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 10c2cf: ba 01 00 00 00 mov $0x1,%edx 10c2d4: 29 ca sub %ecx,%edx 10c2d6: 89 f0 mov %esi,%eax 10c2d8: e8 73 fe ff ff call 10c150 <_RBTree_Rotate> 10c2dd: 89 de mov %ebx,%esi 10c2df: 89 f3 mov %esi,%ebx _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 10c2e1: 8b 03 mov (%ebx),%eax */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 10c2e3: 8b 30 mov (%eax),%esi 10c2e5: 85 f6 test %esi,%esi 10c2e7: 75 1c jne 10c305 <_RBTree_Insert_unprotected+0x171> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10c2e9: 31 d2 xor %edx,%edx RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { 10c2eb: 85 d2 test %edx,%edx 10c2ed: 0f 85 62 ff ff ff jne 10c255 <_RBTree_Insert_unprotected+0xc1> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 10c2f3: 85 f6 test %esi,%esi 10c2f5: 75 19 jne 10c310 <_RBTree_Insert_unprotected+0x17c> 10c2f7: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) 10c2fe: eb 10 jmp 10c310 <_RBTree_Insert_unprotected+0x17c> RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; 10c300: 83 cf ff or $0xffffffff,%edi 10c303: eb 0b jmp 10c310 <_RBTree_Insert_unprotected+0x17c> 10c305: 31 d2 xor %edx,%edx 10c307: 83 78 0c 01 cmpl $0x1,0xc(%eax) 10c30b: 0f 94 c2 sete %dl 10c30e: eb db jmp 10c2eb <_RBTree_Insert_unprotected+0x157> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 10c310: 89 f8 mov %edi,%eax 10c312: 8d 65 f4 lea -0xc(%ebp),%esp 10c315: 5b pop %ebx 10c316: 5e pop %esi 10c317: 5f pop %edi 10c318: 5d pop %ebp 10c319: c3 ret =============================================================================== 0010c338 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 10c338: 55 push %ebp 10c339: 89 e5 mov %esp,%ebp 10c33b: 57 push %edi 10c33c: 56 push %esi 10c33d: 53 push %ebx 10c33e: 83 ec 0c sub $0xc,%esp 10c341: 8b 5d 0c mov 0xc(%ebp),%ebx */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 10c344: 31 d2 xor %edx,%edx 10c346: 85 db test %ebx,%ebx 10c348: 0f 94 c2 sete %dl RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 10c34b: 8b 45 08 mov 0x8(%ebp),%eax 10c34e: 8b 74 90 08 mov 0x8(%eax,%edx,4),%esi RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; 10c352: 31 ff xor %edi,%edi while ( !stop && current != NULL ) { 10c354: eb 1b jmp 10c371 <_RBTree_Iterate_unprotected+0x39> stop = (*visitor)( current, dir, visitor_arg ); 10c356: 50 push %eax 10c357: ff 75 14 pushl 0x14(%ebp) 10c35a: 53 push %ebx 10c35b: 56 push %esi 10c35c: 8b 55 10 mov 0x10(%ebp),%edx 10c35f: ff d2 call *%edx 10c361: 89 c7 mov %eax,%edi current = _RBTree_Next_unprotected( current, dir ); 10c363: 5a pop %edx 10c364: 59 pop %ecx 10c365: 53 push %ebx 10c366: 56 push %esi 10c367: e8 18 00 00 00 call 10c384 <_RBTree_Next_unprotected> 10c36c: 89 c6 mov %eax,%esi 10c36e: 83 c4 10 add $0x10,%esp { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 10c371: 85 f6 test %esi,%esi 10c373: 74 06 je 10c37b <_RBTree_Iterate_unprotected+0x43> 10c375: 89 f8 mov %edi,%eax 10c377: fe c8 dec %al 10c379: 75 db jne 10c356 <_RBTree_Iterate_unprotected+0x1e><== ALWAYS TAKEN stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } 10c37b: 8d 65 f4 lea -0xc(%ebp),%esp 10c37e: 5b pop %ebx 10c37f: 5e pop %esi 10c380: 5f pop %edi 10c381: 5d pop %ebp 10c382: c3 ret =============================================================================== 0010be83 <_RBTree_Rotate>: RBTree_Node *the_node, RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; 10be83: 85 c0 test %eax,%eax 10be85: 74 3f je 10bec6 <_RBTree_Rotate+0x43> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _RBTree_Rotate( RBTree_Node *the_node, RBTree_Direction dir ) { 10be87: 55 push %ebp 10be88: 89 e5 mov %esp,%ebp 10be8a: 56 push %esi 10be8b: 53 push %ebx */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 10be8c: 31 db xor %ebx,%ebx 10be8e: 85 d2 test %edx,%edx 10be90: 0f 94 c3 sete %bl RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 10be93: 8b 4c 98 04 mov 0x4(%eax,%ebx,4),%ecx 10be97: 85 c9 test %ecx,%ecx 10be99: 74 28 je 10bec3 <_RBTree_Rotate+0x40> <== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 10be9b: 8b 74 91 04 mov 0x4(%ecx,%edx,4),%esi 10be9f: 89 74 98 04 mov %esi,0x4(%eax,%ebx,4) if (c->child[dir]) 10bea3: 8b 5c 91 04 mov 0x4(%ecx,%edx,4),%ebx 10bea7: 85 db test %ebx,%ebx 10bea9: 74 02 je 10bead <_RBTree_Rotate+0x2a> c->child[dir]->parent = the_node; 10beab: 89 03 mov %eax,(%ebx) c->child[dir] = the_node; 10bead: 89 44 91 04 mov %eax,0x4(%ecx,%edx,4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 10beb1: 8b 10 mov (%eax),%edx 10beb3: 31 db xor %ebx,%ebx 10beb5: 3b 42 04 cmp 0x4(%edx),%eax 10beb8: 0f 95 c3 setne %bl 10bebb: 89 4c 9a 04 mov %ecx,0x4(%edx,%ebx,4) c->parent = the_node->parent; 10bebf: 89 11 mov %edx,(%ecx) the_node->parent = c; 10bec1: 89 08 mov %ecx,(%eax) } 10bec3: 5b pop %ebx 10bec4: 5e pop %esi 10bec5: 5d pop %ebp 10bec6: c3 ret =============================================================================== 0010be5f <_RBTree_Sibling>: * exists, and NULL if not. */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { 10be5f: 55 push %ebp 10be60: 89 e5 mov %esp,%ebp if(!the_node) return NULL; 10be62: 85 c0 test %eax,%eax 10be64: 74 17 je 10be7d <_RBTree_Sibling+0x1e> <== NEVER TAKEN if(!(the_node->parent)) return NULL; 10be66: 8b 08 mov (%eax),%ecx 10be68: 85 c9 test %ecx,%ecx 10be6a: 74 11 je 10be7d <_RBTree_Sibling+0x1e> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; 10be6c: 83 39 00 cmpl $0x0,(%ecx) 10be6f: 74 0c je 10be7d <_RBTree_Sibling+0x1e> if(the_node == the_node->parent->child[RBT_LEFT]) 10be71: 8b 51 04 mov 0x4(%ecx),%edx 10be74: 39 d0 cmp %edx,%eax 10be76: 75 07 jne 10be7f <_RBTree_Sibling+0x20> return the_node->parent->child[RBT_RIGHT]; 10be78: 8b 51 08 mov 0x8(%ecx),%edx 10be7b: eb 02 jmp 10be7f <_RBTree_Sibling+0x20> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 10be7d: 31 d2 xor %edx,%edx if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 10be7f: 89 d0 mov %edx,%eax 10be81: 5d pop %ebp 10be82: c3 ret =============================================================================== 0012dbb8 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 12dbb8: 55 push %ebp 12dbb9: 89 e5 mov %esp,%ebp 12dbbb: 57 push %edi 12dbbc: 56 push %esi 12dbbd: 53 push %ebx 12dbbe: 83 ec 28 sub $0x28,%esp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 12dbc1: 8b 45 08 mov 0x8(%ebp),%eax 12dbc4: 8b 78 40 mov 0x40(%eax),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 12dbc7: 8d 45 e0 lea -0x20(%ebp),%eax 12dbca: 50 push %eax 12dbcb: e8 e4 30 fe ff call 110cb4 <_TOD_Get_uptime> _Timestamp_Subtract( 12dbd0: 8b 45 e0 mov -0x20(%ebp),%eax 12dbd3: 8b 55 e4 mov -0x1c(%ebp),%edx const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 12dbd6: 89 c1 mov %eax,%ecx 12dbd8: 89 d3 mov %edx,%ebx 12dbda: 8b 75 08 mov 0x8(%ebp),%esi 12dbdd: 2b 4e 4c sub 0x4c(%esi),%ecx 12dbe0: 1b 5e 50 sbb 0x50(%esi),%ebx 12dbe3: 8b 75 0c mov 0xc(%ebp),%esi 12dbe6: 89 0e mov %ecx,(%esi) 12dbe8: 89 5e 04 mov %ebx,0x4(%esi) #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 12dbeb: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx 12dbf1: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 12dbf7: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 12dbfa: be 01 00 00 00 mov $0x1,%esi * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 12dbff: 3b 3d 04 e7 16 00 cmp 0x16e704,%edi 12dc05: 75 38 jne 12dc3f <_Rate_monotonic_Get_status+0x87> 12dc07: 2b 05 14 e7 16 00 sub 0x16e714,%eax 12dc0d: 1b 15 18 e7 16 00 sbb 0x16e718,%edx static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 12dc13: 01 c8 add %ecx,%eax 12dc15: 11 da adc %ebx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12dc17: 8b 75 08 mov 0x8(%ebp),%esi 12dc1a: 8b 4e 44 mov 0x44(%esi),%ecx 12dc1d: 8b 5e 48 mov 0x48(%esi),%ebx /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 12dc20: 39 da cmp %ebx,%edx 12dc22: 7c 19 jl 12dc3d <_Rate_monotonic_Get_status+0x85><== NEVER TAKEN 12dc24: 7f 04 jg 12dc2a <_Rate_monotonic_Get_status+0x72> 12dc26: 39 c8 cmp %ecx,%eax 12dc28: 72 13 jb 12dc3d <_Rate_monotonic_Get_status+0x85> const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 12dc2a: 29 c8 sub %ecx,%eax 12dc2c: 19 da sbb %ebx,%edx 12dc2e: 8b 4d 10 mov 0x10(%ebp),%ecx 12dc31: 89 01 mov %eax,(%ecx) 12dc33: 89 51 04 mov %edx,0x4(%ecx) if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 12dc36: be 01 00 00 00 mov $0x1,%esi 12dc3b: eb 02 jmp 12dc3f <_Rate_monotonic_Get_status+0x87> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; 12dc3d: 31 f6 xor %esi,%esi return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 12dc3f: 89 f0 mov %esi,%eax 12dc41: 8d 65 f4 lea -0xc(%ebp),%esp 12dc44: 5b pop %ebx 12dc45: 5e pop %esi 12dc46: 5f pop %edi 12dc47: 5d pop %ebp 12dc48: c3 ret =============================================================================== 0012dedc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 12dedc: 55 push %ebp 12dedd: 89 e5 mov %esp,%ebp 12dedf: 53 push %ebx 12dee0: 83 ec 18 sub $0x18,%esp /* * 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 ); 12dee3: 8d 45 f4 lea -0xc(%ebp),%eax 12dee6: 50 push %eax 12dee7: ff 75 08 pushl 0x8(%ebp) 12deea: 68 a0 ec 16 00 push $0x16eca0 12deef: e8 4c d1 fd ff call 10b040 <_Objects_Get> switch ( location ) { 12def4: 83 c4 10 add $0x10,%esp 12def7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12defb: 75 6b jne 12df68 <_Rate_monotonic_Timeout+0x8c><== NEVER TAKEN 12defd: 89 c3 mov %eax,%ebx case OBJECTS_LOCAL: the_thread = the_period->owner; 12deff: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 12df02: f6 40 11 40 testb $0x40,0x11(%eax) 12df06: 74 18 je 12df20 <_Rate_monotonic_Timeout+0x44> 12df08: 8b 53 08 mov 0x8(%ebx),%edx 12df0b: 39 50 20 cmp %edx,0x20(%eax) 12df0e: 75 10 jne 12df20 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 12df10: 51 push %ecx 12df11: 51 push %ecx 12df12: 68 f8 ff 03 10 push $0x1003fff8 12df17: 50 push %eax 12df18: e8 27 d9 fd ff call 10b844 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 12df1d: 58 pop %eax 12df1e: eb 10 jmp 12df30 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 12df20: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 12df24: 75 2b jne 12df51 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 12df26: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 12df2d: 83 ec 0c sub $0xc,%esp 12df30: 53 push %ebx 12df31: e8 b2 fd ff ff call 12dce8 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12df36: 8b 43 3c mov 0x3c(%ebx),%eax 12df39: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12df3c: 58 pop %eax 12df3d: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 12df3e: 83 c3 10 add $0x10,%ebx 12df41: 53 push %ebx 12df42: 68 a0 e2 16 00 push $0x16e2a0 12df47: e8 20 e7 fd ff call 10c66c <_Watchdog_Insert> 12df4c: 83 c4 10 add $0x10,%esp 12df4f: eb 07 jmp 12df58 <_Rate_monotonic_Timeout+0x7c> } else the_period->state = RATE_MONOTONIC_EXPIRED; 12df51: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 12df58: a1 fc e1 16 00 mov 0x16e1fc,%eax 12df5d: 48 dec %eax 12df5e: a3 fc e1 16 00 mov %eax,0x16e1fc return _Thread_Dispatch_disable_level; 12df63: a1 fc e1 16 00 mov 0x16e1fc,%eax case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 12df68: 8b 5d fc mov -0x4(%ebp),%ebx 12df6b: c9 leave 12df6c: c3 ret =============================================================================== 0012dc49 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 12dc49: 55 push %ebp 12dc4a: 89 e5 mov %esp,%ebp 12dc4c: 56 push %esi 12dc4d: 53 push %ebx 12dc4e: 83 ec 10 sub $0x10,%esp 12dc51: 89 c6 mov %eax,%esi /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 12dc53: ff 40 54 incl 0x54(%eax) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 12dc56: 83 78 38 04 cmpl $0x4,0x38(%eax) 12dc5a: 75 03 jne 12dc5f <_Rate_monotonic_Update_statistics+0x16> stats->missed_count++; 12dc5c: ff 40 58 incl 0x58(%eax) /* * Grab status for time statistics. */ valid_status = 12dc5f: 50 push %eax _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 12dc60: 8d 45 e8 lea -0x18(%ebp),%eax stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 12dc63: 50 push %eax _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 12dc64: 8d 45 f0 lea -0x10(%ebp),%eax stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 12dc67: 50 push %eax 12dc68: 56 push %esi 12dc69: e8 4a ff ff ff call 12dbb8 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 12dc6e: 83 c4 10 add $0x10,%esp 12dc71: 84 c0 test %al,%al 12dc73: 74 6c je 12dce1 <_Rate_monotonic_Update_statistics+0x98> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 12dc75: 8b 4d e8 mov -0x18(%ebp),%ecx 12dc78: 8b 5d ec mov -0x14(%ebp),%ebx static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 12dc7b: 01 4e 6c add %ecx,0x6c(%esi) 12dc7e: 11 5e 70 adc %ebx,0x70(%esi) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 12dc81: 3b 5e 60 cmp 0x60(%esi),%ebx 12dc84: 7f 0d jg 12dc93 <_Rate_monotonic_Update_statistics+0x4a><== NEVER TAKEN 12dc86: 7c 05 jl 12dc8d <_Rate_monotonic_Update_statistics+0x44> 12dc88: 3b 4e 5c cmp 0x5c(%esi),%ecx 12dc8b: 73 06 jae 12dc93 <_Rate_monotonic_Update_statistics+0x4a> stats->min_cpu_time = executed; 12dc8d: 89 4e 5c mov %ecx,0x5c(%esi) 12dc90: 89 5e 60 mov %ebx,0x60(%esi) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 12dc93: 39 5e 68 cmp %ebx,0x68(%esi) 12dc96: 7f 0d jg 12dca5 <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN 12dc98: 7c 05 jl 12dc9f <_Rate_monotonic_Update_statistics+0x56><== NEVER TAKEN 12dc9a: 39 4e 64 cmp %ecx,0x64(%esi) 12dc9d: 73 06 jae 12dca5 <_Rate_monotonic_Update_statistics+0x5c> stats->max_cpu_time = executed; 12dc9f: 89 4e 64 mov %ecx,0x64(%esi) 12dca2: 89 5e 68 mov %ebx,0x68(%esi) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 12dca5: 8b 4d f0 mov -0x10(%ebp),%ecx 12dca8: 8b 5d f4 mov -0xc(%ebp),%ebx 12dcab: 01 8e 84 00 00 00 add %ecx,0x84(%esi) 12dcb1: 11 9e 88 00 00 00 adc %ebx,0x88(%esi) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 12dcb7: 3b 5e 78 cmp 0x78(%esi),%ebx 12dcba: 7f 0d jg 12dcc9 <_Rate_monotonic_Update_statistics+0x80><== NEVER TAKEN 12dcbc: 7c 05 jl 12dcc3 <_Rate_monotonic_Update_statistics+0x7a> 12dcbe: 3b 4e 74 cmp 0x74(%esi),%ecx 12dcc1: 73 06 jae 12dcc9 <_Rate_monotonic_Update_statistics+0x80> stats->min_wall_time = since_last_period; 12dcc3: 89 4e 74 mov %ecx,0x74(%esi) 12dcc6: 89 5e 78 mov %ebx,0x78(%esi) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 12dcc9: 39 9e 80 00 00 00 cmp %ebx,0x80(%esi) 12dccf: 7f 10 jg 12dce1 <_Rate_monotonic_Update_statistics+0x98> 12dcd1: 7c 05 jl 12dcd8 <_Rate_monotonic_Update_statistics+0x8f><== NEVER TAKEN 12dcd3: 39 4e 7c cmp %ecx,0x7c(%esi) 12dcd6: 73 09 jae 12dce1 <_Rate_monotonic_Update_statistics+0x98> stats->max_wall_time = since_last_period; 12dcd8: 89 4e 7c mov %ecx,0x7c(%esi) 12dcdb: 89 9e 80 00 00 00 mov %ebx,0x80(%esi) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 12dce1: 8d 65 f8 lea -0x8(%ebp),%esp 12dce4: 5b pop %ebx 12dce5: 5e pop %esi 12dce6: 5d pop %ebp 12dce7: c3 ret =============================================================================== 0010bcd8 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 10bcd8: 55 push %ebp 10bcd9: 89 e5 mov %esp,%ebp 10bcdb: 53 push %ebx 10bcdc: 83 ec 10 sub $0x10,%esp 10bcdf: 8b 5d 08 mov 0x8(%ebp),%ebx void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 10bce2: 6a 1c push $0x1c 10bce4: e8 a7 15 00 00 call 10d290 <_Workspace_Allocate> if ( sched ) { 10bce9: 83 c4 10 add $0x10,%esp 10bcec: 85 c0 test %eax,%eax 10bcee: 74 16 je 10bd06 <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN the_thread->scheduler_info = sched; 10bcf0: 89 83 88 00 00 00 mov %eax,0x88(%ebx) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 10bcf6: 89 18 mov %ebx,(%eax) schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 10bcf8: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) schinfo->cbs_server = NULL; 10bcff: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) } return sched; } 10bd06: 8b 5d fc mov -0x4(%ebp),%ebx 10bd09: c9 leave 10bd0a: c3 ret =============================================================================== 0010d104 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 10d104: 55 push %ebp 10d105: 89 e5 mov %esp,%ebp 10d107: 53 push %ebx 10d108: 83 ec 14 sub $0x14,%esp 10d10b: 8b 5d 08 mov 0x8(%ebp),%ebx Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 10d10e: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax if ( the_thread->real_priority != new_priority ) 10d114: 39 43 18 cmp %eax,0x18(%ebx) 10d117: 74 03 je 10d11c <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN the_thread->real_priority = new_priority; 10d119: 89 43 18 mov %eax,0x18(%ebx) if ( the_thread->current_priority != new_priority ) 10d11c: 39 43 14 cmp %eax,0x14(%ebx) 10d11f: 74 0d je 10d12e <_Scheduler_CBS_Budget_callout+0x2a><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); 10d121: 52 push %edx 10d122: 6a 01 push $0x1 10d124: 50 push %eax 10d125: 53 push %ebx 10d126: e8 b5 04 00 00 call 10d5e0 <_Thread_Change_priority> 10d12b: 83 c4 10 add $0x10,%esp /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 10d12e: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx if ( sched_info->cbs_server->cbs_budget_overrun ) { 10d134: 8b 43 18 mov 0x18(%ebx),%eax 10d137: 83 78 0c 00 cmpl $0x0,0xc(%eax) 10d13b: 74 1a je 10d157 <_Scheduler_CBS_Budget_callout+0x53> _Scheduler_CBS_Get_server_id( 10d13d: 52 push %edx 10d13e: 52 push %edx 10d13f: 8d 55 f4 lea -0xc(%ebp),%edx 10d142: 52 push %edx 10d143: ff 30 pushl (%eax) 10d145: e8 7e ff ff ff call 10d0c8 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 10d14a: 59 pop %ecx 10d14b: 8b 43 18 mov 0x18(%ebx),%eax 10d14e: ff 75 f4 pushl -0xc(%ebp) 10d151: ff 50 0c call *0xc(%eax) 10d154: 83 c4 10 add $0x10,%esp } } 10d157: 8b 5d fc mov -0x4(%ebp),%ebx 10d15a: c9 leave 10d15b: c3 ret =============================================================================== 0010cdcc <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 10cdcc: 55 push %ebp 10cdcd: 89 e5 mov %esp,%ebp 10cdcf: 57 push %edi 10cdd0: 56 push %esi 10cdd1: 53 push %ebx 10cdd2: 83 ec 0c sub $0xc,%esp 10cdd5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cdd8: 8b 75 10 mov 0x10(%ebp),%esi unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 10cddb: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10cddf: 7e 42 jle 10ce23 <_Scheduler_CBS_Create_server+0x57> 10cde1: 83 3b 00 cmpl $0x0,(%ebx) 10cde4: 7e 3d jle 10ce23 <_Scheduler_CBS_Create_server+0x57> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 10cde6: 8b 15 6c d2 12 00 mov 0x12d26c,%edx if ( !_Scheduler_CBS_Server_list[i] ) 10cdec: 8b 0d ac 19 13 00 mov 0x1319ac,%ecx 10cdf2: 31 c0 xor %eax,%eax 10cdf4: eb 07 jmp 10cdfd <_Scheduler_CBS_Create_server+0x31> 10cdf6: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10cdfa: 74 35 je 10ce31 <_Scheduler_CBS_Create_server+0x65> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 10cdfc: 40 inc %eax 10cdfd: 39 d0 cmp %edx,%eax 10cdff: 75 f5 jne 10cdf6 <_Scheduler_CBS_Create_server+0x2a> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 10ce01: b8 e6 ff ff ff mov $0xffffffe6,%eax 10ce06: eb 53 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f> _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 10ce08: 8b 03 mov (%ebx),%eax 10ce0a: 8b 53 04 mov 0x4(%ebx),%edx 10ce0d: 89 41 04 mov %eax,0x4(%ecx) 10ce10: 89 51 08 mov %edx,0x8(%ecx) the_server->task_id = -1; 10ce13: c7 01 ff ff ff ff movl $0xffffffff,(%ecx) the_server->cbs_budget_overrun = budget_overrun_callback; 10ce19: 8b 45 0c mov 0xc(%ebp),%eax 10ce1c: 89 41 0c mov %eax,0xc(%ecx) return SCHEDULER_CBS_OK; 10ce1f: 31 c0 xor %eax,%eax 10ce21: eb 38 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10ce23: b8 ee ff ff ff mov $0xffffffee,%eax 10ce28: eb 31 jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f> *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 10ce2a: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED 10ce2f: eb 2a jmp 10ce5b <_Scheduler_CBS_Create_server+0x8f><== NOT EXECUTED } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 10ce31: 89 06 mov %eax,(%esi) _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 10ce33: 8b 15 ac 19 13 00 mov 0x1319ac,%edx 10ce39: 8d 3c 82 lea (%edx,%eax,4),%edi _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 10ce3c: 83 ec 0c sub $0xc,%esp 10ce3f: 6a 10 push $0x10 10ce41: e8 c2 18 00 00 call 10e708 <_Workspace_Allocate> if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 10ce46: 89 07 mov %eax,(%edi) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 10ce48: 8b 16 mov (%esi),%edx 10ce4a: a1 ac 19 13 00 mov 0x1319ac,%eax 10ce4f: 8b 0c 90 mov (%eax,%edx,4),%ecx if ( !the_server ) 10ce52: 83 c4 10 add $0x10,%esp 10ce55: 85 c9 test %ecx,%ecx 10ce57: 75 af jne 10ce08 <_Scheduler_CBS_Create_server+0x3c><== ALWAYS TAKEN 10ce59: eb cf jmp 10ce2a <_Scheduler_CBS_Create_server+0x5e><== NOT EXECUTED the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 10ce5b: 8d 65 f4 lea -0xc(%ebp),%esp 10ce5e: 5b pop %ebx 10ce5f: 5e pop %esi 10ce60: 5f pop %edi 10ce61: 5d pop %ebp 10ce62: c3 ret =============================================================================== 0010ced4 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 10ced4: 55 push %ebp 10ced5: 89 e5 mov %esp,%ebp 10ced7: 57 push %edi 10ced8: 56 push %esi 10ced9: 53 push %ebx 10ceda: 83 ec 24 sub $0x24,%esp 10cedd: 8b 7d 08 mov 0x8(%ebp),%edi 10cee0: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 10cee3: 8d 45 e4 lea -0x1c(%ebp),%eax 10cee6: 50 push %eax 10cee7: 56 push %esi 10cee8: e8 03 0b 00 00 call 10d9f0 <_Thread_Get> 10ceed: 89 c3 mov %eax,%ebx /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10ceef: 83 c4 10 add $0x10,%esp 10cef2: 85 c0 test %eax,%eax 10cef4: 74 05 je 10cefb <_Scheduler_CBS_Detach_thread+0x27> _Thread_Enable_dispatch(); 10cef6: e8 d5 0a 00 00 call 10d9d0 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 10cefb: 3b 3d 6c d2 12 00 cmp 0x12d26c,%edi 10cf01: 73 4d jae 10cf50 <_Scheduler_CBS_Detach_thread+0x7c> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 10cf03: 85 db test %ebx,%ebx 10cf05: 74 49 je 10cf50 <_Scheduler_CBS_Detach_thread+0x7c> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 10cf07: a1 ac 19 13 00 mov 0x1319ac,%eax 10cf0c: 8b 04 b8 mov (%eax,%edi,4),%eax 10cf0f: 85 c0 test %eax,%eax 10cf11: 74 36 je 10cf49 <_Scheduler_CBS_Detach_thread+0x75> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 10cf13: 39 30 cmp %esi,(%eax) 10cf15: 75 39 jne 10cf50 <_Scheduler_CBS_Detach_thread+0x7c><== NEVER TAKEN return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 10cf17: c7 00 ff ff ff ff movl $0xffffffff,(%eax) sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 10cf1d: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax 10cf23: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 10cf2a: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10cf30: 89 43 78 mov %eax,0x78(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 10cf33: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 10cf39: 89 43 7c mov %eax,0x7c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 10cf3c: 8a 83 9c 00 00 00 mov 0x9c(%ebx),%al 10cf42: 88 43 70 mov %al,0x70(%ebx) return SCHEDULER_CBS_OK; 10cf45: 31 c0 xor %eax,%eax 10cf47: eb 0c jmp 10cf55 <_Scheduler_CBS_Detach_thread+0x81> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 10cf49: b8 e7 ff ff ff mov $0xffffffe7,%eax 10cf4e: eb 05 jmp 10cf55 <_Scheduler_CBS_Detach_thread+0x81> if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10cf50: b8 ee ff ff ff mov $0xffffffee,%eax the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 10cf55: 8d 65 f4 lea -0xc(%ebp),%esp 10cf58: 5b pop %ebx 10cf59: 5e pop %esi 10cf5a: 5f pop %edi 10cf5b: 5d pop %ebp 10cf5c: c3 ret =============================================================================== 0010cf98 <_Scheduler_CBS_Get_execution_time>: int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { 10cf98: 55 push %ebp 10cf99: 89 e5 mov %esp,%ebp 10cf9b: 57 push %edi 10cf9c: 56 push %esi 10cf9d: 53 push %ebx 10cf9e: 83 ec 1c sub $0x1c,%esp 10cfa1: 8b 5d 08 mov 0x8(%ebp),%ebx 10cfa4: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) 10cfa7: 3b 1d 6c d2 12 00 cmp 0x12d26c,%ebx 10cfad: 73 58 jae 10d007 <_Scheduler_CBS_Get_execution_time+0x6f> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10cfaf: a1 ac 19 13 00 mov 0x1319ac,%eax 10cfb4: 8b 04 98 mov (%eax,%ebx,4),%eax 10cfb7: 85 c0 test %eax,%eax 10cfb9: 74 53 je 10d00e <_Scheduler_CBS_Get_execution_time+0x76> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { 10cfbb: 8b 00 mov (%eax),%eax 10cfbd: 83 f8 ff cmp $0xffffffff,%eax 10cfc0: 75 08 jne 10cfca <_Scheduler_CBS_Get_execution_time+0x32> *exec_time = 0; 10cfc2: c7 06 00 00 00 00 movl $0x0,(%esi) 10cfc8: eb 39 jmp 10d003 <_Scheduler_CBS_Get_execution_time+0x6b> return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( 10cfca: 52 push %edx 10cfcb: 52 push %edx 10cfcc: 8d 55 e4 lea -0x1c(%ebp),%edx 10cfcf: 52 push %edx 10cfd0: 50 push %eax 10cfd1: e8 1a 0a 00 00 call 10d9f0 <_Thread_Get> 10cfd6: 89 c7 mov %eax,%edi _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10cfd8: 83 c4 10 add $0x10,%esp 10cfdb: 85 c0 test %eax,%eax 10cfdd: 74 17 je 10cff6 <_Scheduler_CBS_Get_execution_time+0x5e><== NEVER TAKEN _Thread_Enable_dispatch(); 10cfdf: e8 ec 09 00 00 call 10d9d0 <_Thread_Enable_dispatch> *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - 10cfe4: a1 ac 19 13 00 mov 0x1319ac,%eax 10cfe9: 8b 04 98 mov (%eax,%ebx,4),%eax 10cfec: 8b 50 08 mov 0x8(%eax),%edx 10cfef: 2b 57 74 sub 0x74(%edi),%edx 10cff2: 89 16 mov %edx,(%esi) 10cff4: eb 0d jmp 10d003 <_Scheduler_CBS_Get_execution_time+0x6b> the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; 10cff6: a1 ac 19 13 00 mov 0x1319ac,%eax <== NOT EXECUTED 10cffb: 8b 04 98 mov (%eax,%ebx,4),%eax <== NOT EXECUTED 10cffe: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED 10d001: 89 06 mov %eax,(%esi) <== NOT EXECUTED } return SCHEDULER_CBS_OK; 10d003: 31 c0 xor %eax,%eax 10d005: eb 0c jmp 10d013 <_Scheduler_CBS_Get_execution_time+0x7b> { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10d007: b8 ee ff ff ff mov $0xffffffee,%eax 10d00c: eb 05 jmp 10d013 <_Scheduler_CBS_Get_execution_time+0x7b> if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 10d00e: b8 e7 ff ff ff mov $0xffffffe7,%eax } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; } return SCHEDULER_CBS_OK; } 10d013: 8d 65 f4 lea -0xc(%ebp),%esp 10d016: 5b pop %ebx 10d017: 5e pop %esi 10d018: 5f pop %edi 10d019: 5d pop %ebp 10d01a: c3 ret =============================================================================== 0010d058 <_Scheduler_CBS_Get_remaining_budget>: int _Scheduler_CBS_Get_remaining_budget ( Scheduler_CBS_Server_id server_id, time_t *remaining_budget ) { 10d058: 55 push %ebp 10d059: 89 e5 mov %esp,%ebp 10d05b: 56 push %esi 10d05c: 53 push %ebx 10d05d: 83 ec 10 sub $0x10,%esp 10d060: 8b 45 08 mov 0x8(%ebp),%eax 10d063: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) 10d066: 3b 05 6c d2 12 00 cmp 0x12d26c,%eax 10d06c: 73 44 jae 10d0b2 <_Scheduler_CBS_Get_remaining_budget+0x5a> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10d06e: 8b 15 ac 19 13 00 mov 0x1319ac,%edx 10d074: 8b 04 82 mov (%edx,%eax,4),%eax 10d077: 85 c0 test %eax,%eax 10d079: 74 3e je 10d0b9 <_Scheduler_CBS_Get_remaining_budget+0x61> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { 10d07b: 8b 10 mov (%eax),%edx 10d07d: 83 fa ff cmp $0xffffffff,%edx 10d080: 75 05 jne 10d087 <_Scheduler_CBS_Get_remaining_budget+0x2f> *remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget; 10d082: 8b 40 08 mov 0x8(%eax),%eax 10d085: eb 1d jmp 10d0a4 <_Scheduler_CBS_Get_remaining_budget+0x4c> return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( 10d087: 50 push %eax 10d088: 50 push %eax 10d089: 8d 45 f4 lea -0xc(%ebp),%eax 10d08c: 50 push %eax 10d08d: 52 push %edx 10d08e: e8 5d 09 00 00 call 10d9f0 <_Thread_Get> 10d093: 89 c6 mov %eax,%esi _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10d095: 83 c4 10 add $0x10,%esp 10d098: 85 c0 test %eax,%eax 10d09a: 74 0c je 10d0a8 <_Scheduler_CBS_Get_remaining_budget+0x50><== NEVER TAKEN _Thread_Enable_dispatch(); 10d09c: e8 2f 09 00 00 call 10d9d0 <_Thread_Enable_dispatch> *remaining_budget = the_thread->cpu_time_budget; 10d0a1: 8b 46 74 mov 0x74(%esi),%eax 10d0a4: 89 03 mov %eax,(%ebx) 10d0a6: eb 06 jmp 10d0ae <_Scheduler_CBS_Get_remaining_budget+0x56> } else { *remaining_budget = 0; 10d0a8: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED } return SCHEDULER_CBS_OK; 10d0ae: 31 c0 xor %eax,%eax 10d0b0: eb 0c jmp 10d0be <_Scheduler_CBS_Get_remaining_budget+0x66> { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10d0b2: b8 ee ff ff ff mov $0xffffffee,%eax 10d0b7: eb 05 jmp 10d0be <_Scheduler_CBS_Get_remaining_budget+0x66> if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 10d0b9: b8 e7 ff ff ff mov $0xffffffe7,%eax else { *remaining_budget = 0; } return SCHEDULER_CBS_OK; } 10d0be: 8d 65 f8 lea -0x8(%ebp),%esp 10d0c1: 5b pop %ebx 10d0c2: 5e pop %esi 10d0c3: 5d pop %ebp 10d0c4: c3 ret =============================================================================== 0010d15c <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { 10d15c: 55 push %ebp 10d15d: 89 e5 mov %esp,%ebp 10d15f: 83 ec 14 sub $0x14,%esp unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 10d162: a1 6c d2 12 00 mov 0x12d26c,%eax 10d167: c1 e0 02 shl $0x2,%eax 10d16a: 50 push %eax 10d16b: e8 98 15 00 00 call 10e708 <_Workspace_Allocate> 10d170: a3 ac 19 13 00 mov %eax,0x1319ac _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 10d175: 83 c4 10 add $0x10,%esp 10d178: 85 c0 test %eax,%eax 10d17a: 74 20 je 10d19c <_Scheduler_CBS_Initialize+0x40><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 10d17c: 8b 15 6c d2 12 00 mov 0x12d26c,%edx 10d182: 31 c0 xor %eax,%eax 10d184: eb 0e jmp 10d194 <_Scheduler_CBS_Initialize+0x38> _Scheduler_CBS_Server_list[i] = NULL; 10d186: 8b 0d ac 19 13 00 mov 0x1319ac,%ecx 10d18c: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 10d193: 40 inc %eax 10d194: 39 d0 cmp %edx,%eax 10d196: 75 ee jne 10d186 <_Scheduler_CBS_Initialize+0x2a> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 10d198: 31 c0 xor %eax,%eax 10d19a: eb 05 jmp 10d1a1 <_Scheduler_CBS_Initialize+0x45> { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 10d19c: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; } 10d1a1: c9 leave 10d1a2: c3 ret =============================================================================== 0010bd0c <_Scheduler_CBS_Release_job>: void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 10bd0c: 55 push %ebp 10bd0d: 89 e5 mov %esp,%ebp 10bd0f: 83 ec 08 sub $0x8,%esp 10bd12: 8b 55 08 mov 0x8(%ebp),%edx 10bd15: 8b 45 0c mov 0xc(%ebp),%eax Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 10bd18: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = 10bd1e: 8b 49 18 mov 0x18(%ecx),%ecx (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { 10bd21: 85 c0 test %eax,%eax 10bd23: 74 22 je 10bd47 <_Scheduler_CBS_Release_job+0x3b> /* Initializing or shifting deadline. */ if (serv_info) 10bd25: 85 c9 test %ecx,%ecx 10bd27: 74 0f je 10bd38 <_Scheduler_CBS_Release_job+0x2c> new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 10bd29: a1 40 f5 12 00 mov 0x12f540,%eax 10bd2e: 03 41 04 add 0x4(%ecx),%eax 10bd31: 25 ff ff ff 7f and $0x7fffffff,%eax 10bd36: eb 19 jmp 10bd51 <_Scheduler_CBS_Release_job+0x45> & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 10bd38: 8b 0d 40 f5 12 00 mov 0x12f540,%ecx 10bd3e: 01 c8 add %ecx,%eax 10bd40: 25 ff ff ff 7f and $0x7fffffff,%eax 10bd45: eb 10 jmp 10bd57 <_Scheduler_CBS_Release_job+0x4b> & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 10bd47: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax } /* Budget replenishment for the next job. */ if (serv_info) 10bd4d: 85 c9 test %ecx,%ecx 10bd4f: 74 06 je 10bd57 <_Scheduler_CBS_Release_job+0x4b><== NEVER TAKEN the_thread->cpu_time_budget = serv_info->parameters.budget; 10bd51: 8b 49 08 mov 0x8(%ecx),%ecx 10bd54: 89 4a 74 mov %ecx,0x74(%edx) the_thread->real_priority = new_priority; 10bd57: 89 42 18 mov %eax,0x18(%edx) _Thread_Change_priority(the_thread, new_priority, true); 10bd5a: 51 push %ecx 10bd5b: 6a 01 push $0x1 10bd5d: 50 push %eax 10bd5e: 52 push %edx 10bd5f: e8 9c 03 00 00 call 10c100 <_Thread_Change_priority> 10bd64: 83 c4 10 add $0x10,%esp } 10bd67: c9 leave 10bd68: c3 ret =============================================================================== 0010bd6c <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 10bd6c: 55 push %ebp 10bd6d: 89 e5 mov %esp,%ebp 10bd6f: 56 push %esi 10bd70: 53 push %ebx 10bd71: 8b 5d 08 mov 0x8(%ebp),%ebx Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 10bd74: 83 ec 0c sub $0xc,%esp 10bd77: 53 push %ebx 10bd78: e8 cf 00 00 00 call 10be4c <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 10bd7d: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax 10bd83: 8b 40 18 mov 0x18(%eax),%eax * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 10bd86: 83 c4 10 add $0x10,%esp 10bd89: 85 c0 test %eax,%eax 10bd8b: 74 3d je 10bdca <_Scheduler_CBS_Unblock+0x5e> time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 10bd8d: 8b 4b 18 mov 0x18(%ebx),%ecx 10bd90: 8b 15 40 f5 12 00 mov 0x12f540,%edx 10bd96: 89 ce mov %ecx,%esi 10bd98: 29 d6 sub %edx,%esi _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 10bd9a: 8b 50 04 mov 0x4(%eax),%edx 10bd9d: 0f af d6 imul %esi,%edx 10bda0: 8b 40 08 mov 0x8(%eax),%eax 10bda3: 0f af 43 74 imul 0x74(%ebx),%eax 10bda7: 39 c2 cmp %eax,%edx 10bda9: 7e 1f jle 10bdca <_Scheduler_CBS_Unblock+0x5e> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 10bdab: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax if ( the_thread->real_priority != new_priority ) 10bdb1: 39 c1 cmp %eax,%ecx 10bdb3: 74 03 je 10bdb8 <_Scheduler_CBS_Unblock+0x4c> the_thread->real_priority = new_priority; 10bdb5: 89 43 18 mov %eax,0x18(%ebx) if ( the_thread->current_priority != new_priority ) 10bdb8: 39 43 14 cmp %eax,0x14(%ebx) 10bdbb: 74 0d je 10bdca <_Scheduler_CBS_Unblock+0x5e> _Thread_Change_priority(the_thread, new_priority, true); 10bdbd: 52 push %edx 10bdbe: 6a 01 push $0x1 10bdc0: 50 push %eax 10bdc1: 53 push %ebx 10bdc2: e8 39 03 00 00 call 10c100 <_Thread_Change_priority> 10bdc7: 83 c4 10 add $0x10,%esp 10bdca: 50 push %eax 10bdcb: 50 push %eax * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 10bdcc: a1 58 f9 12 00 mov 0x12f958,%eax 10bdd1: ff 70 14 pushl 0x14(%eax) 10bdd4: ff 73 14 pushl 0x14(%ebx) 10bdd7: ff 15 60 b2 12 00 call *0x12b260 10bddd: 83 c4 10 add $0x10,%esp 10bde0: 85 c0 test %eax,%eax 10bde2: 7e 1e jle 10be02 <_Scheduler_CBS_Unblock+0x96> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 10bde4: 89 1d 58 f9 12 00 mov %ebx,0x12f958 if ( _Thread_Executing->is_preemptible || 10bdea: a1 54 f9 12 00 mov 0x12f954,%eax 10bdef: 80 78 70 00 cmpb $0x0,0x70(%eax) 10bdf3: 75 06 jne 10bdfb <_Scheduler_CBS_Unblock+0x8f> 10bdf5: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10bdf9: 75 07 jne 10be02 <_Scheduler_CBS_Unblock+0x96><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10bdfb: c6 05 60 f9 12 00 01 movb $0x1,0x12f960 } } 10be02: 8d 65 f8 lea -0x8(%ebp),%esp 10be05: 5b pop %ebx 10be06: 5e pop %esi 10be07: 5d pop %ebp 10be08: c3 ret =============================================================================== 0010bcd8 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 10bcd8: 55 push %ebp 10bcd9: 89 e5 mov %esp,%ebp 10bcdb: 53 push %ebx 10bcdc: 83 ec 10 sub $0x10,%esp 10bcdf: 8b 5d 08 mov 0x8(%ebp),%ebx void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 10bce2: 6a 18 push $0x18 10bce4: e8 27 15 00 00 call 10d210 <_Workspace_Allocate> if ( sched ) { 10bce9: 83 c4 10 add $0x10,%esp 10bcec: 85 c0 test %eax,%eax 10bcee: 74 0f je 10bcff <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN the_thread->scheduler_info = sched; 10bcf0: 89 83 88 00 00 00 mov %eax,0x88(%ebx) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 10bcf6: 89 18 mov %ebx,(%eax) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 10bcf8: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) } return sched; } 10bcff: 8b 5d fc mov -0x4(%ebp),%ebx 10bd02: c9 leave 10bd03: c3 ret =============================================================================== 0010bea0 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 10bea0: 55 push %ebp 10bea1: 89 e5 mov %esp,%ebp 10bea3: 53 push %ebx 10bea4: 83 ec 10 sub $0x10,%esp 10bea7: 8b 5d 08 mov 0x8(%ebp),%ebx _Scheduler_EDF_Enqueue(the_thread); 10beaa: 53 push %ebx 10beab: e8 94 fe ff ff call 10bd44 <_Scheduler_EDF_Enqueue> 10beb0: 58 pop %eax 10beb1: 5a pop %edx 10beb2: ff 73 14 pushl 0x14(%ebx) * 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 ( _Scheduler_Is_priority_lower_than( 10beb5: a1 58 f9 12 00 mov 0x12f958,%eax 10beba: ff 70 14 pushl 0x14(%eax) 10bebd: ff 15 60 b2 12 00 call *0x12b260 10bec3: 83 c4 10 add $0x10,%esp 10bec6: 85 c0 test %eax,%eax 10bec8: 79 1e jns 10bee8 <_Scheduler_EDF_Unblock+0x48> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 10beca: 89 1d 58 f9 12 00 mov %ebx,0x12f958 if ( _Thread_Executing->is_preemptible || 10bed0: a1 54 f9 12 00 mov 0x12f954,%eax 10bed5: 80 78 70 00 cmpb $0x0,0x70(%eax) 10bed9: 75 06 jne 10bee1 <_Scheduler_EDF_Unblock+0x41> 10bedb: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10bedf: 75 07 jne 10bee8 <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10bee1: c6 05 60 f9 12 00 01 movb $0x1,0x12f960 } } 10bee8: 8b 5d fc mov -0x4(%ebp),%ebx 10beeb: c9 leave 10beec: c3 ret =============================================================================== 0010b854 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 10b854: 55 push %ebp 10b855: 89 e5 mov %esp,%ebp 10b857: 53 push %ebx 10b858: 50 push %eax Thread_Control *executing; executing = _Thread_Executing; 10b859: 8b 1d ec e8 12 00 mov 0x12e8ec,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10b85f: 80 7b 70 00 cmpb $0x0,0x70(%ebx) 10b863: 74 44 je 10b8a9 <_Scheduler_priority_Tick+0x55> return; if ( !_States_Is_ready( executing->current_state ) ) 10b865: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10b869: 75 3e jne 10b8a9 <_Scheduler_priority_Tick+0x55> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10b86b: 8b 43 78 mov 0x78(%ebx),%eax 10b86e: 83 f8 01 cmp $0x1,%eax 10b871: 72 36 jb 10b8a9 <_Scheduler_priority_Tick+0x55> 10b873: 83 f8 02 cmp $0x2,%eax 10b876: 76 07 jbe 10b87f <_Scheduler_priority_Tick+0x2b> 10b878: 83 f8 03 cmp $0x3,%eax 10b87b: 75 2c jne 10b8a9 <_Scheduler_priority_Tick+0x55><== NEVER TAKEN 10b87d: eb 1b jmp 10b89a <_Scheduler_priority_Tick+0x46> 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 ) { 10b87f: 8b 43 74 mov 0x74(%ebx),%eax 10b882: 48 dec %eax 10b883: 89 43 74 mov %eax,0x74(%ebx) 10b886: 85 c0 test %eax,%eax 10b888: 7f 1f jg 10b8a9 <_Scheduler_priority_Tick+0x55> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 10b88a: ff 15 3c a2 12 00 call *0x12a23c * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b890: a1 b8 e3 12 00 mov 0x12e3b8,%eax 10b895: 89 43 74 mov %eax,0x74(%ebx) 10b898: eb 0f jmp 10b8a9 <_Scheduler_priority_Tick+0x55> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10b89a: ff 4b 74 decl 0x74(%ebx) 10b89d: 75 0a jne 10b8a9 <_Scheduler_priority_Tick+0x55> (*executing->budget_callout)( executing ); 10b89f: 83 ec 0c sub $0xc,%esp 10b8a2: 53 push %ebx 10b8a3: ff 53 7c call *0x7c(%ebx) 10b8a6: 83 c4 10 add $0x10,%esp break; #endif } } 10b8a9: 8b 5d fc mov -0x4(%ebp),%ebx 10b8ac: c9 leave 10b8ad: c3 ret =============================================================================== 0010a6b8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10a6b8: 55 push %ebp 10a6b9: 89 e5 mov %esp,%ebp 10a6bb: 53 push %ebx 10a6bc: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10a6bf: b8 40 42 0f 00 mov $0xf4240,%eax 10a6c4: 31 d2 xor %edx,%edx 10a6c6: f7 35 0c c8 12 00 divl 0x12c80c (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) ) return false; 10a6cc: 31 db xor %ebx,%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10a6ce: 85 c9 test %ecx,%ecx 10a6d0: 74 4c je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN 10a6d2: 39 41 18 cmp %eax,0x18(%ecx) 10a6d5: 73 47 jae 10a71e <_TOD_Validate+0x66> (the_tod->ticks >= ticks_per_second) || 10a6d7: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10a6db: 77 41 ja 10a71e <_TOD_Validate+0x66> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10a6dd: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10a6e1: 77 3b ja 10a71e <_TOD_Validate+0x66> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10a6e3: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10a6e7: 77 35 ja 10a71e <_TOD_Validate+0x66> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10a6e9: 8b 51 04 mov 0x4(%ecx),%edx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10a6ec: 85 d2 test %edx,%edx 10a6ee: 74 2e je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN (the_tod->month == 0) || 10a6f0: 83 fa 0c cmp $0xc,%edx 10a6f3: 77 29 ja 10a71e <_TOD_Validate+0x66> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10a6f5: 8b 01 mov (%ecx),%eax (the_tod->ticks >= ticks_per_second) || (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) || 10a6f7: 3d c3 07 00 00 cmp $0x7c3,%eax 10a6fc: 76 20 jbe 10a71e <_TOD_Validate+0x66> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10a6fe: 8b 49 08 mov 0x8(%ecx),%ecx (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) || 10a701: 85 c9 test %ecx,%ecx 10a703: 74 19 je 10a71e <_TOD_Validate+0x66> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10a705: a8 03 test $0x3,%al 10a707: 75 09 jne 10a712 <_TOD_Validate+0x5a> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10a709: 8b 04 95 b8 18 12 00 mov 0x1218b8(,%edx,4),%eax 10a710: eb 07 jmp 10a719 <_TOD_Validate+0x61> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10a712: 8b 04 95 84 18 12 00 mov 0x121884(,%edx,4),%eax if ( the_tod->day > days_in_month ) 10a719: 39 c1 cmp %eax,%ecx 10a71b: 0f 96 c3 setbe %bl return false; return true; } 10a71e: 88 d8 mov %bl,%al 10a720: 5b pop %ebx 10a721: 5d pop %ebp 10a722: c3 ret =============================================================================== 0010ba1c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10ba1c: 55 push %ebp 10ba1d: 89 e5 mov %esp,%ebp 10ba1f: 57 push %edi 10ba20: 56 push %esi 10ba21: 53 push %ebx 10ba22: 83 ec 28 sub $0x28,%esp 10ba25: 8b 7d 08 mov 0x8(%ebp),%edi 10ba28: 8b 5d 0c mov 0xc(%ebp),%ebx 10ba2b: 8a 45 10 mov 0x10(%ebp),%al 10ba2e: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10ba31: 8b 77 10 mov 0x10(%edi),%esi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10ba34: 57 push %edi 10ba35: e8 72 0b 00 00 call 10c5ac <_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 ) 10ba3a: 83 c4 10 add $0x10,%esp 10ba3d: 39 5f 14 cmp %ebx,0x14(%edi) 10ba40: 74 0c je 10ba4e <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10ba42: 50 push %eax 10ba43: 50 push %eax 10ba44: 53 push %ebx 10ba45: 57 push %edi 10ba46: e8 15 0b 00 00 call 10c560 <_Thread_Set_priority> 10ba4b: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10ba4e: 9c pushf 10ba4f: fa cli 10ba50: 5b pop %ebx /* * 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; 10ba51: 8b 47 10 mov 0x10(%edi),%eax if ( state != STATES_TRANSIENT ) { 10ba54: 83 f8 04 cmp $0x4,%eax 10ba57: 74 2b je 10ba84 <_Thread_Change_priority+0x68> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10ba59: 83 e6 04 and $0x4,%esi 10ba5c: 75 08 jne 10ba66 <_Thread_Change_priority+0x4a><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10ba5e: 89 c2 mov %eax,%edx 10ba60: 83 e2 fb and $0xfffffffb,%edx 10ba63: 89 57 10 mov %edx,0x10(%edi) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10ba66: 53 push %ebx 10ba67: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10ba68: a9 e0 be 03 00 test $0x3bee0,%eax 10ba6d: 74 65 je 10bad4 <_Thread_Change_priority+0xb8> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10ba6f: 89 7d 0c mov %edi,0xc(%ebp) 10ba72: 8b 47 44 mov 0x44(%edi),%eax 10ba75: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10ba78: 8d 65 f4 lea -0xc(%ebp),%esp 10ba7b: 5b pop %ebx 10ba7c: 5e pop %esi 10ba7d: 5f pop %edi 10ba7e: 5d pop %ebp /* 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 ); 10ba7f: e9 4c 0a 00 00 jmp 10c4d0 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10ba84: 83 e6 04 and $0x4,%esi 10ba87: 75 26 jne 10baaf <_Thread_Change_priority+0x93><== 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 ); 10ba89: c7 47 10 00 00 00 00 movl $0x0,0x10(%edi) if ( prepend_it ) 10ba90: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10ba94: 74 0c je 10baa2 <_Thread_Change_priority+0x86> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10ba96: 83 ec 0c sub $0xc,%esp 10ba99: 57 push %edi 10ba9a: ff 15 58 a2 12 00 call *0x12a258 10baa0: eb 0a jmp 10baac <_Thread_Change_priority+0x90> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10baa2: 83 ec 0c sub $0xc,%esp 10baa5: 57 push %edi 10baa6: ff 15 54 a2 12 00 call *0x12a254 10baac: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10baaf: 53 push %ebx 10bab0: 9d popf 10bab1: fa cli * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 10bab2: ff 15 38 a2 12 00 call *0x12a238 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bab8: a1 ec e8 12 00 mov 0x12e8ec,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 10babd: 3b 05 f0 e8 12 00 cmp 0x12e8f0,%eax 10bac3: 74 0d je 10bad2 <_Thread_Change_priority+0xb6> 10bac5: 80 78 70 00 cmpb $0x0,0x70(%eax) 10bac9: 74 07 je 10bad2 <_Thread_Change_priority+0xb6> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10bacb: c6 05 f8 e8 12 00 01 movb $0x1,0x12e8f8 _ISR_Enable( level ); 10bad2: 53 push %ebx 10bad3: 9d popf } 10bad4: 8d 65 f4 lea -0xc(%ebp),%esp 10bad7: 5b pop %ebx 10bad8: 5e pop %esi 10bad9: 5f pop %edi 10bada: 5d pop %ebp 10badb: c3 ret =============================================================================== 0010bc90 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10bc90: 55 push %ebp 10bc91: 89 e5 mov %esp,%ebp 10bc93: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10bc96: 8d 45 f4 lea -0xc(%ebp),%eax 10bc99: 50 push %eax 10bc9a: ff 75 08 pushl 0x8(%ebp) 10bc9d: e8 8a 01 00 00 call 10be2c <_Thread_Get> switch ( location ) { 10bca2: 83 c4 10 add $0x10,%esp 10bca5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bca9: 75 20 jne 10bccb <_Thread_Delay_ended+0x3b><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10bcab: 52 push %edx 10bcac: 52 push %edx 10bcad: 68 18 00 00 10 push $0x10000018 10bcb2: 50 push %eax 10bcb3: e8 24 fe ff ff call 10badc <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10bcb8: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10bcbd: 48 dec %eax 10bcbe: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 10bcc3: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10bcc8: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10bccb: c9 leave 10bccc: c3 ret =============================================================================== 0010bcd0 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10bcd0: 55 push %ebp 10bcd1: 89 e5 mov %esp,%ebp 10bcd3: 57 push %edi 10bcd4: 56 push %esi 10bcd5: 53 push %ebx 10bcd6: 83 ec 1c sub $0x1c,%esp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 10bcd9: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10bcde: 40 inc %eax 10bcdf: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 10bce4: a1 e4 e3 12 00 mov 0x12e3e4,%eax void _Thread_Disable_dispatch( void ); #else RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { _Thread_Dispatch_increment_disable_level(); RTEMS_COMPILER_MEMORY_BARRIER(); 10bce9: e9 f9 00 00 00 jmp 10bde7 <_Thread_Dispatch+0x117> */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 10bcee: 8b 35 f0 e8 12 00 mov 0x12e8f0,%esi _Thread_Dispatch_necessary = false; 10bcf4: c6 05 f8 e8 12 00 00 movb $0x0,0x12e8f8 _Thread_Executing = heir; 10bcfb: 89 35 ec e8 12 00 mov %esi,0x12e8ec /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10bd01: 39 fe cmp %edi,%esi 10bd03: 75 1c jne 10bd21 <_Thread_Dispatch+0x51> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 10bd05: 50 push %eax 10bd06: 9d popf * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10bd07: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10bd0c: 48 dec %eax 10bd0d: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 10bd12: a1 e4 e3 12 00 mov 0x12e3e4,%eax _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 10bd17: e8 39 e8 ff ff call 10a555 <_API_extensions_Run_postswitch> 10bd1c: e9 e2 00 00 00 jmp 10be03 <_Thread_Dispatch+0x133> */ #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 ) 10bd21: 83 7e 78 01 cmpl $0x1,0x78(%esi) 10bd25: 75 09 jne 10bd30 <_Thread_Dispatch+0x60> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bd27: 8b 15 b8 e3 12 00 mov 0x12e3b8,%edx 10bd2d: 89 56 74 mov %edx,0x74(%esi) _ISR_Enable( level ); 10bd30: 50 push %eax 10bd31: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10bd32: 83 ec 0c sub $0xc,%esp 10bd35: 8d 45 e0 lea -0x20(%ebp),%eax 10bd38: 50 push %eax 10bd39: e8 06 34 00 00 call 10f144 <_TOD_Get_uptime> _Timestamp_Subtract( 10bd3e: 8b 45 e0 mov -0x20(%ebp),%eax 10bd41: 8b 55 e4 mov -0x1c(%ebp),%edx const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 10bd44: 89 c1 mov %eax,%ecx 10bd46: 89 d3 mov %edx,%ebx 10bd48: 2b 0d fc e8 12 00 sub 0x12e8fc,%ecx 10bd4e: 1b 1d 00 e9 12 00 sbb 0x12e900,%ebx static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 10bd54: 01 8f 80 00 00 00 add %ecx,0x80(%edi) 10bd5a: 11 9f 84 00 00 00 adc %ebx,0x84(%edi) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 10bd60: a3 fc e8 12 00 mov %eax,0x12e8fc 10bd65: 89 15 00 e9 12 00 mov %edx,0x12e900 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bd6b: a1 5c e4 12 00 mov 0x12e45c,%eax 10bd70: 83 c4 10 add $0x10,%esp 10bd73: 85 c0 test %eax,%eax 10bd75: 74 10 je 10bd87 <_Thread_Dispatch+0xb7> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10bd77: 8b 10 mov (%eax),%edx 10bd79: 89 97 e0 00 00 00 mov %edx,0xe0(%edi) *_Thread_libc_reent = heir->libc_reent; 10bd7f: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10bd85: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bd87: 50 push %eax 10bd88: 50 push %eax 10bd89: 56 push %esi 10bd8a: 57 push %edi 10bd8b: e8 48 0b 00 00 call 10c8d8 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10bd90: 5a pop %edx 10bd91: 59 pop %ecx 10bd92: 8d 86 c4 00 00 00 lea 0xc4(%esi),%eax 10bd98: 50 push %eax 10bd99: 8d 87 c4 00 00 00 lea 0xc4(%edi),%eax 10bd9f: 50 push %eax 10bda0: e8 0b 0e 00 00 call 10cbb0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bda5: 83 c4 10 add $0x10,%esp 10bda8: 83 bf dc 00 00 00 00 cmpl $0x0,0xdc(%edi) 10bdaf: 74 36 je 10bde7 <_Thread_Dispatch+0x117> #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 ); 10bdb1: a1 58 e4 12 00 mov 0x12e458,%eax 10bdb6: 39 c7 cmp %eax,%edi 10bdb8: 74 2d je 10bde7 <_Thread_Dispatch+0x117> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bdba: 85 c0 test %eax,%eax 10bdbc: 74 11 je 10bdcf <_Thread_Dispatch+0xff> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bdbe: 83 ec 0c sub $0xc,%esp 10bdc1: 05 dc 00 00 00 add $0xdc,%eax 10bdc6: 50 push %eax 10bdc7: e8 18 0e 00 00 call 10cbe4 <_CPU_Context_save_fp> 10bdcc: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10bdcf: 83 ec 0c sub $0xc,%esp 10bdd2: 8d 87 dc 00 00 00 lea 0xdc(%edi),%eax 10bdd8: 50 push %eax 10bdd9: e8 10 0e 00 00 call 10cbee <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bdde: 89 3d 58 e4 12 00 mov %edi,0x12e458 10bde4: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bde7: 8b 3d ec e8 12 00 mov 0x12e8ec,%edi _ISR_Disable( level ); 10bded: 9c pushf 10bdee: fa cli 10bdef: 58 pop %eax /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10bdf0: 8a 15 f8 e8 12 00 mov 0x12e8f8,%dl 10bdf6: 84 d2 test %dl,%dl 10bdf8: 0f 85 f0 fe ff ff jne 10bcee <_Thread_Dispatch+0x1e> 10bdfe: e9 02 ff ff ff jmp 10bd05 <_Thread_Dispatch+0x35> _ISR_Enable( level ); _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); } 10be03: 8d 65 f4 lea -0xc(%ebp),%esp 10be06: 5b pop %ebx 10be07: 5e pop %esi 10be08: 5f pop %edi 10be09: 5d pop %ebp 10be0a: c3 ret =============================================================================== 00110d08 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 110d08: 55 push %ebp 110d09: 89 e5 mov %esp,%ebp 110d0b: 53 push %ebx 110d0c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 110d0f: 8b 1d ec e8 12 00 mov 0x12e8ec,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110d15: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax _ISR_Set_level(level); 110d1b: 85 c0 test %eax,%eax 110d1d: 74 03 je 110d22 <_Thread_Handler+0x1a> 110d1f: fa cli 110d20: eb 01 jmp 110d23 <_Thread_Handler+0x1b> 110d22: fb sti doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 110d23: a0 d4 e0 12 00 mov 0x12e0d4,%al 110d28: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = true; 110d2b: c6 05 d4 e0 12 00 01 movb $0x1,0x12e0d4 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110d32: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx) 110d39: 74 24 je 110d5f <_Thread_Handler+0x57> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 110d3b: a1 58 e4 12 00 mov 0x12e458,%eax 110d40: 39 c3 cmp %eax,%ebx 110d42: 74 1b je 110d5f <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110d44: 85 c0 test %eax,%eax 110d46: 74 11 je 110d59 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110d48: 83 ec 0c sub $0xc,%esp 110d4b: 05 dc 00 00 00 add $0xdc,%eax 110d50: 50 push %eax 110d51: e8 8e be ff ff call 10cbe4 <_CPU_Context_save_fp> 110d56: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110d59: 89 1d 58 e4 12 00 mov %ebx,0x12e458 /* * 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 ); 110d5f: 83 ec 0c sub $0xc,%esp 110d62: 53 push %ebx 110d63: e8 34 ba ff ff call 10c79c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110d68: e8 9f b0 ff ff call 10be0c <_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 (doCons) /* && (volatile void *)_init) */ { 110d6d: 83 c4 10 add $0x10,%esp 110d70: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110d74: 75 05 jne 110d7b <_Thread_Handler+0x73> INIT_NAME (); 110d76: e8 b1 d0 00 00 call 11de2c <__start_set_sysctl_set> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 110d7b: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 110d81: 85 c0 test %eax,%eax 110d83: 75 0b jne 110d90 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110d85: 83 ec 0c sub $0xc,%esp 110d88: ff b3 98 00 00 00 pushl 0x98(%ebx) 110d8e: eb 0c jmp 110d9c <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 110d90: 48 dec %eax 110d91: 75 15 jne 110da8 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 110d93: 83 ec 0c sub $0xc,%esp 110d96: ff b3 94 00 00 00 pushl 0x94(%ebx) 110d9c: ff 93 8c 00 00 00 call *0x8c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 110da2: 89 43 28 mov %eax,0x28(%ebx) 110da5: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 110da8: 83 ec 0c sub $0xc,%esp 110dab: 53 push %ebx 110dac: e8 19 ba ff ff call 10c7ca <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110db1: 83 c4 0c add $0xc,%esp 110db4: 6a 05 push $0x5 110db6: 6a 01 push $0x1 110db8: 6a 00 push $0x0 110dba: e8 0d a0 ff ff call 10adcc <_Internal_error_Occurred> =============================================================================== 0010c0d8 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10c0d8: 55 push %ebp 10c0d9: 89 e5 mov %esp,%ebp 10c0db: 56 push %esi 10c0dc: 53 push %ebx uint32_t ticks_per_timeslice = 10c0dd: 8b 1d 54 a1 12 00 mov 0x12a154,%ebx rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 10c0e3: 8b 35 48 a1 12 00 mov 0x12a148,%esi rtems_configuration_get_maximum_extensions(); rtems_stack_allocate_init_hook stack_allocate_init_hook = 10c0e9: a1 64 a1 12 00 mov 0x12a164,%eax #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 10c0ee: 83 3d 68 a1 12 00 00 cmpl $0x0,0x12a168 10c0f5: 74 09 je 10c100 <_Thread_Handler_initialization+0x28> 10c0f7: 83 3d 6c a1 12 00 00 cmpl $0x0,0x12a16c 10c0fe: 75 0c jne 10c10c <_Thread_Handler_initialization+0x34><== ALWAYS TAKEN rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 10c100: 52 push %edx 10c101: 6a 0e push $0xe 10c103: 6a 01 push $0x1 10c105: 6a 00 push $0x0 10c107: e8 c0 ec ff ff call 10adcc <_Internal_error_Occurred> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 10c10c: 85 c0 test %eax,%eax 10c10e: 74 0e je 10c11e <_Thread_Handler_initialization+0x46> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: ff 35 44 a1 12 00 pushl 0x12a144 10c119: ff d0 call *%eax 10c11b: 83 c4 10 add $0x10,%esp _Thread_Dispatch_necessary = false; 10c11e: c6 05 f8 e8 12 00 00 movb $0x0,0x12e8f8 _Thread_Executing = NULL; 10c125: c7 05 ec e8 12 00 00 movl $0x0,0x12e8ec 10c12c: 00 00 00 _Thread_Heir = NULL; 10c12f: c7 05 f0 e8 12 00 00 movl $0x0,0x12e8f0 10c136: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10c139: c7 05 58 e4 12 00 00 movl $0x0,0x12e458 10c140: 00 00 00 #endif _Thread_Maximum_extensions = maximum_extensions; 10c143: 89 35 60 e4 12 00 mov %esi,0x12e460 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10c149: 89 1d b8 e3 12 00 mov %ebx,0x12e3b8 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 10c14f: 50 push %eax 10c150: 6a 08 push $0x8 10c152: 6a 00 push $0x0 10c154: 68 f4 00 00 00 push $0xf4 10c159: 6a 01 push $0x1 10c15b: 6a 01 push $0x1 10c15d: 6a 01 push $0x1 10c15f: 68 e0 e4 12 00 push $0x12e4e0 10c164: e8 5f f1 ff ff call 10b2c8 <_Objects_Initialize_information> 10c169: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10c16c: 8d 65 f8 lea -0x8(%ebp),%esp 10c16f: 5b pop %ebx 10c170: 5e pop %esi 10c171: 5d pop %ebp 10c172: c3 ret =============================================================================== 0010beac <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10beac: 55 push %ebp 10bead: 89 e5 mov %esp,%ebp 10beaf: 57 push %edi 10beb0: 56 push %esi 10beb1: 53 push %ebx 10beb2: 83 ec 1c sub $0x1c,%esp 10beb5: 8b 5d 0c mov 0xc(%ebp),%ebx 10beb8: 8b 4d 10 mov 0x10(%ebp),%ecx 10bebb: 8b 75 14 mov 0x14(%ebp),%esi 10bebe: 8a 55 18 mov 0x18(%ebp),%dl 10bec1: 8a 45 20 mov 0x20(%ebp),%al 10bec4: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10bec7: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10bece: 00 00 00 10bed1: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10bed8: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bedb: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10bee2: 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 ) { 10bee5: 85 c9 test %ecx,%ecx 10bee7: 75 31 jne 10bf1a <_Thread_Initialize+0x6e> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10bee9: 57 push %edi 10beea: 57 push %edi 10beeb: 56 push %esi 10beec: 53 push %ebx 10beed: 88 55 e0 mov %dl,-0x20(%ebp) 10bef0: e8 e7 06 00 00 call 10c5dc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10bef5: 83 c4 10 add $0x10,%esp 10bef8: 39 f0 cmp %esi,%eax 10befa: 8a 55 e0 mov -0x20(%ebp),%dl 10befd: 0f 82 c7 01 00 00 jb 10c0ca <_Thread_Initialize+0x21e> 10bf03: 85 c0 test %eax,%eax 10bf05: 0f 84 bf 01 00 00 je 10c0ca <_Thread_Initialize+0x21e><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10bf0b: 8b 8b c0 00 00 00 mov 0xc0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10bf11: c6 83 b0 00 00 00 01 movb $0x1,0xb0(%ebx) 10bf18: eb 09 jmp 10bf23 <_Thread_Initialize+0x77> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10bf1a: c6 83 b0 00 00 00 00 movb $0x0,0xb0(%ebx) 10bf21: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bf23: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx) the_stack->size = size; 10bf29: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10bf2f: 31 ff xor %edi,%edi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bf31: 84 d2 test %dl,%dl 10bf33: 74 17 je 10bf4c <_Thread_Initialize+0xa0> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bf35: 83 ec 0c sub $0xc,%esp 10bf38: 6a 6c push $0x6c 10bf3a: e8 05 0c 00 00 call 10cb44 <_Workspace_Allocate> 10bf3f: 89 c7 mov %eax,%edi if ( !fp_area ) 10bf41: 83 c4 10 add $0x10,%esp 10bf44: 85 c0 test %eax,%eax 10bf46: 0f 84 2b 01 00 00 je 10c077 <_Thread_Initialize+0x1cb><== NEVER TAKEN goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bf4c: 89 bb dc 00 00 00 mov %edi,0xdc(%ebx) the_thread->Start.fp_context = fp_area; 10bf52: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bf58: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bf5f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bf66: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bf6d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bf74: a1 60 e4 12 00 mov 0x12e460,%eax * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10bf79: 31 f6 xor %esi,%esi #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bf7b: 85 c0 test %eax,%eax 10bf7d: 74 1d je 10bf9c <_Thread_Initialize+0xf0> extensions_area = _Workspace_Allocate( 10bf7f: 83 ec 0c sub $0xc,%esp 10bf82: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bf89: 50 push %eax 10bf8a: e8 b5 0b 00 00 call 10cb44 <_Workspace_Allocate> 10bf8f: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bf91: 83 c4 10 add $0x10,%esp 10bf94: 85 c0 test %eax,%eax 10bf96: 0f 84 dd 00 00 00 je 10c079 <_Thread_Initialize+0x1cd><== NEVER TAKEN goto failed; } the_thread->extensions = (void **) extensions_area; 10bf9c: 89 b3 ec 00 00 00 mov %esi,0xec(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10bfa2: 85 f6 test %esi,%esi 10bfa4: 75 23 jne 10bfc9 <_Thread_Initialize+0x11d> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bfa6: 8a 45 e7 mov -0x19(%ebp),%al 10bfa9: 88 83 9c 00 00 00 mov %al,0x9c(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bfaf: 8b 45 24 mov 0x24(%ebp),%eax 10bfb2: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bfb8: 8b 45 28 mov 0x28(%ebp),%eax 10bfbb: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) switch ( budget_algorithm ) { 10bfc1: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10bfc5: 75 28 jne 10bfef <_Thread_Initialize+0x143> 10bfc7: eb 1e jmp 10bfe7 <_Thread_Initialize+0x13b> * 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++ ) 10bfc9: 8b 15 60 e4 12 00 mov 0x12e460,%edx 10bfcf: 31 c0 xor %eax,%eax 10bfd1: eb 0e jmp 10bfe1 <_Thread_Initialize+0x135> the_thread->extensions[i] = NULL; 10bfd3: 8b 8b ec 00 00 00 mov 0xec(%ebx),%ecx 10bfd9: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bfe0: 40 inc %eax 10bfe1: 39 d0 cmp %edx,%eax 10bfe3: 76 ee jbe 10bfd3 <_Thread_Initialize+0x127> 10bfe5: eb bf jmp 10bfa6 <_Thread_Initialize+0xfa> 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; 10bfe7: a1 b8 e3 12 00 mov 0x12e3b8,%eax 10bfec: 89 43 74 mov %eax,0x74(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10bfef: 8b 45 2c mov 0x2c(%ebp),%eax 10bff2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) the_thread->current_state = STATES_DORMANT; 10bff8: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bfff: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c006: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10c00d: 8b 45 1c mov 0x1c(%ebp),%eax 10c010: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c013: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 10c019: 83 ec 0c sub $0xc,%esp 10c01c: 53 push %ebx 10c01d: ff 15 48 a2 12 00 call *0x12a248 10c023: 89 c2 mov %eax,%edx sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10c025: 83 c4 10 add $0x10,%esp 10c028: 85 c0 test %eax,%eax 10c02a: 74 4f je 10c07b <_Thread_Initialize+0x1cf> goto failed; _Thread_Set_priority( the_thread, priority ); 10c02c: 51 push %ecx 10c02d: 51 push %ecx 10c02e: ff 75 1c pushl 0x1c(%ebp) 10c031: 53 push %ebx 10c032: 89 45 e0 mov %eax,-0x20(%ebp) 10c035: e8 26 05 00 00 call 10c560 <_Thread_Set_priority> static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 10c03a: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx) 10c041: 00 00 00 10c044: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c04b: 00 00 00 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c04e: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c052: 8b 45 08 mov 0x8(%ebp),%eax 10c055: 8b 40 1c mov 0x1c(%eax),%eax 10c058: 89 1c 88 mov %ebx,(%eax,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c05b: 8b 45 30 mov 0x30(%ebp),%eax 10c05e: 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 ); 10c061: 89 1c 24 mov %ebx,(%esp) 10c064: e8 c7 07 00 00 call 10c830 <_User_extensions_Thread_create> if ( extension_status ) 10c069: 83 c4 10 add $0x10,%esp return true; 10c06c: b1 01 mov $0x1,%cl * 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 ) 10c06e: 84 c0 test %al,%al 10c070: 8b 55 e0 mov -0x20(%ebp),%edx 10c073: 74 06 je 10c07b <_Thread_Initialize+0x1cf> 10c075: eb 55 jmp 10c0cc <_Thread_Initialize+0x220> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10c077: 31 f6 xor %esi,%esi size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10c079: 31 d2 xor %edx,%edx extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 10c07b: 83 ec 0c sub $0xc,%esp 10c07e: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10c084: 89 55 e0 mov %edx,-0x20(%ebp) 10c087: e8 d1 0a 00 00 call 10cb5d <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10c08c: 58 pop %eax 10c08d: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10c093: e8 c5 0a 00 00 call 10cb5d <_Workspace_Free> 10c098: 5a pop %edx 10c099: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10c09f: e8 b9 0a 00 00 call 10cb5d <_Workspace_Free> _Workspace_Free( extensions_area ); 10c0a4: 89 34 24 mov %esi,(%esp) 10c0a7: e8 b1 0a 00 00 call 10cb5d <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10c0ac: 89 3c 24 mov %edi,(%esp) 10c0af: e8 a9 0a 00 00 call 10cb5d <_Workspace_Free> #endif _Workspace_Free( sched ); 10c0b4: 8b 55 e0 mov -0x20(%ebp),%edx 10c0b7: 89 14 24 mov %edx,(%esp) 10c0ba: e8 9e 0a 00 00 call 10cb5d <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10c0bf: 89 1c 24 mov %ebx,(%esp) 10c0c2: e8 51 05 00 00 call 10c618 <_Thread_Stack_Free> return false; 10c0c7: 83 c4 10 add $0x10,%esp stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10c0ca: 31 c9 xor %ecx,%ecx _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10c0cc: 88 c8 mov %cl,%al 10c0ce: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d1: 5b pop %ebx 10c0d2: 5e pop %esi 10c0d3: 5f pop %edi 10c0d4: 5d pop %ebp 10c0d5: c3 ret =============================================================================== 0010c618 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 8b 45 08 mov 0x8(%ebp),%eax rtems_stack_free_hook stack_free_hook = 10c61e: 8b 15 6c a1 12 00 mov 0x12a16c,%edx #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 ) 10c624: 80 b8 b0 00 00 00 00 cmpb $0x0,0xb0(%eax) 10c62b: 74 0c je 10c639 <_Thread_Stack_Free+0x21><== 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. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c62d: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax 10c633: 89 45 08 mov %eax,0x8(%ebp) } 10c636: 5d pop %ebp * 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. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c637: ff e2 jmp *%edx } 10c639: 5d pop %ebp <== NOT EXECUTED 10c63a: c3 ret <== NOT EXECUTED =============================================================================== 0010c4d0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c4d0: 55 push %ebp 10c4d1: 89 e5 mov %esp,%ebp 10c4d3: 57 push %edi 10c4d4: 56 push %esi 10c4d5: 53 push %ebx 10c4d6: 83 ec 1c sub $0x1c,%esp 10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx 10c4dc: 8b 75 0c mov 0xc(%ebp),%esi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10c4df: 85 db test %ebx,%ebx 10c4e1: 74 36 je 10c519 <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c4e3: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10c4e7: 75 30 jne 10c519 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c4e9: 9c pushf 10c4ea: fa cli 10c4eb: 5f pop %edi if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c4ec: f7 46 10 e0 be 03 00 testl $0x3bee0,0x10(%esi) 10c4f3: 74 22 je 10c517 <_Thread_queue_Requeue+0x47><== NEVER TAKEN 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; 10c4f5: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c4fc: 50 push %eax 10c4fd: 6a 01 push $0x1 10c4ff: 56 push %esi 10c500: 53 push %ebx 10c501: e8 0a 32 00 00 call 10f710 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c506: 83 c4 0c add $0xc,%esp 10c509: 8d 45 e4 lea -0x1c(%ebp),%eax 10c50c: 50 push %eax 10c50d: 56 push %esi 10c50e: 53 push %ebx 10c50f: e8 e4 fd ff ff call 10c2f8 <_Thread_queue_Enqueue_priority> 10c514: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c517: 57 push %edi 10c518: 9d popf } } 10c519: 8d 65 f4 lea -0xc(%ebp),%esp 10c51c: 5b pop %ebx 10c51d: 5e pop %esi 10c51e: 5f pop %edi 10c51f: 5d pop %ebp 10c520: c3 ret =============================================================================== 0010c524 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c524: 55 push %ebp 10c525: 89 e5 mov %esp,%ebp 10c527: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c52a: 8d 45 f4 lea -0xc(%ebp),%eax 10c52d: 50 push %eax 10c52e: ff 75 08 pushl 0x8(%ebp) 10c531: e8 f6 f8 ff ff call 10be2c <_Thread_Get> switch ( location ) { 10c536: 83 c4 10 add $0x10,%esp 10c539: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c53d: 75 1c jne 10c55b <_Thread_queue_Timeout+0x37><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c53f: 83 ec 0c sub $0xc,%esp 10c542: 50 push %eax 10c543: e8 78 32 00 00 call 10f7c0 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10c548: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10c54d: 48 dec %eax 10c54e: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 10c553: a1 e4 e3 12 00 mov 0x12e3e4,%eax 10c558: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c55b: c9 leave 10c55c: c3 ret =============================================================================== 00116732 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116732: 55 push %ebp 116733: 89 e5 mov %esp,%ebp 116735: 57 push %edi 116736: 56 push %esi 116737: 53 push %ebx 116738: 83 ec 3c sub $0x3c,%esp 11673b: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 11673e: 8d 45 d0 lea -0x30(%ebp),%eax 116741: 8d 55 d4 lea -0x2c(%ebp),%edx 116744: 89 55 d0 mov %edx,-0x30(%ebp) head->previous = NULL; 116747: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 11674e: 89 45 d8 mov %eax,-0x28(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 116751: 8d 75 dc lea -0x24(%ebp),%esi 116754: 8d 55 e0 lea -0x20(%ebp),%edx 116757: 89 55 dc mov %edx,-0x24(%ebp) head->previous = NULL; 11675a: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 116761: 89 75 e4 mov %esi,-0x1c(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 116764: 8d 45 d0 lea -0x30(%ebp),%eax 116767: 89 43 78 mov %eax,0x78(%ebx) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11676a: 8d 7b 30 lea 0x30(%ebx),%edi static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11676d: a1 48 7f 14 00 mov 0x147f48,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116772: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 116775: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116778: 51 push %ecx 116779: 56 push %esi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 11677a: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11677c: 50 push %eax 11677d: 57 push %edi 11677e: e8 25 38 00 00 call 119fa8 <_Watchdog_Adjust_to_chain> 116783: 6a 00 push $0x0 116785: 68 00 ca 9a 3b push $0x3b9aca00 11678a: ff 35 14 7e 14 00 pushl 0x147e14 116790: ff 35 10 7e 14 00 pushl 0x147e10 116796: e8 59 3e 01 00 call 12a5f4 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11679b: 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 ) { 11679e: 83 c4 20 add $0x20,%esp 1167a1: 39 d0 cmp %edx,%eax 1167a3: 76 15 jbe 1167ba <_Timer_server_Body+0x88> /* * 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 ); 1167a5: 51 push %ecx 1167a6: 56 push %esi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 1167a7: 89 c1 mov %eax,%ecx 1167a9: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1167ab: 51 push %ecx 1167ac: 8d 53 68 lea 0x68(%ebx),%edx 1167af: 52 push %edx 1167b0: 89 45 c0 mov %eax,-0x40(%ebp) 1167b3: e8 f0 37 00 00 call 119fa8 <_Watchdog_Adjust_to_chain> 1167b8: eb 14 jmp 1167ce <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 1167ba: 73 18 jae 1167d4 <_Timer_server_Body+0xa2> /* * 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 ); 1167bc: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 1167bd: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1167bf: 52 push %edx 1167c0: 6a 01 push $0x1 1167c2: 8d 53 68 lea 0x68(%ebx),%edx 1167c5: 52 push %edx 1167c6: 89 45 c0 mov %eax,-0x40(%ebp) 1167c9: e8 72 37 00 00 call 119f40 <_Watchdog_Adjust> 1167ce: 83 c4 10 add $0x10,%esp 1167d1: 8b 45 c0 mov -0x40(%ebp),%eax } watchdogs->last_snapshot = snapshot; 1167d4: 89 43 74 mov %eax,0x74(%ebx) ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1167d7: 8d 4b 68 lea 0x68(%ebx),%ecx 1167da: 89 4d c4 mov %ecx,-0x3c(%ebp) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1167dd: 8b 43 78 mov 0x78(%ebx),%eax 1167e0: 83 ec 0c sub $0xc,%esp 1167e3: 50 push %eax 1167e4: e8 cf 07 00 00 call 116fb8 <_Chain_Get> if ( timer == NULL ) { 1167e9: 83 c4 10 add $0x10,%esp 1167ec: 85 c0 test %eax,%eax 1167ee: 74 29 je 116819 <_Timer_server_Body+0xe7><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1167f0: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1167f3: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1167f6: 75 09 jne 116801 <_Timer_server_Body+0xcf><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1167f8: 52 push %edx <== NOT EXECUTED 1167f9: 52 push %edx <== NOT EXECUTED 1167fa: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1167fd: 50 push %eax <== NOT EXECUTED 1167fe: 57 push %edi <== NOT EXECUTED 1167ff: eb 0e jmp 11680f <_Timer_server_Body+0xdd><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116801: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116804: 75 d7 jne 1167dd <_Timer_server_Body+0xab><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116806: 51 push %ecx <== NOT EXECUTED 116807: 51 push %ecx <== NOT EXECUTED 116808: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11680b: 50 push %eax <== NOT EXECUTED 11680c: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 11680f: e8 18 38 00 00 call 11a02c <_Watchdog_Insert> <== NOT EXECUTED 116814: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116817: eb c4 jmp 1167dd <_Timer_server_Body+0xab><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116819: 9c pushf 11681a: fa cli 11681b: 58 pop %eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 11681c: 8d 55 d4 lea -0x2c(%ebp),%edx if ( _Chain_Is_empty( insert_chain ) ) { 11681f: 39 55 d0 cmp %edx,-0x30(%ebp) 116822: 75 13 jne 116837 <_Timer_server_Body+0x105><== NEVER TAKEN ts->insert_chain = NULL; 116824: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11682b: 50 push %eax 11682c: 9d popf 11682d: 8d 7d e0 lea -0x20(%ebp),%edi _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 ) ) { 116830: 39 7d dc cmp %edi,-0x24(%ebp) 116833: 75 09 jne 11683e <_Timer_server_Body+0x10c> 116835: eb 39 jmp 116870 <_Timer_server_Body+0x13e> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116837: 50 push %eax <== NOT EXECUTED 116838: 9d popf <== NOT EXECUTED 116839: e9 2f ff ff ff jmp 11676d <_Timer_server_Body+0x3b><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 11683e: 9c pushf 11683f: fa cli 116840: 5a pop %edx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 116841: 8b 45 dc mov -0x24(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 116844: 39 f8 cmp %edi,%eax 116846: 74 21 je 116869 <_Timer_server_Body+0x137> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 116848: 8b 08 mov (%eax),%ecx head->next = new_first; 11684a: 89 4d dc mov %ecx,-0x24(%ebp) new_first->previous = head; 11684d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 116850: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116857: 52 push %edx 116858: 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 ); 116859: 52 push %edx 11685a: 52 push %edx 11685b: ff 70 24 pushl 0x24(%eax) 11685e: ff 70 20 pushl 0x20(%eax) 116861: ff 50 1c call *0x1c(%eax) } 116864: 83 c4 10 add $0x10,%esp 116867: eb d5 jmp 11683e <_Timer_server_Body+0x10c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 116869: 52 push %edx 11686a: 9d popf 11686b: e9 f4 fe ff ff jmp 116764 <_Timer_server_Body+0x32> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116870: c6 43 7c 00 movb $0x0,0x7c(%ebx) 116874: e8 ef fc ff ff call 116568 <_Thread_Dispatch_increment_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 116879: 57 push %edi 11687a: 57 push %edi 11687b: 6a 08 push $0x8 11687d: ff 33 pushl (%ebx) 11687f: e8 f8 32 00 00 call 119b7c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116884: 89 d8 mov %ebx,%eax 116886: e8 f2 fc ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 11688b: 89 d8 mov %ebx,%eax 11688d: e8 31 fd ff ff call 1165c3 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116892: e8 fd 2a 00 00 call 119394 <_Thread_Enable_dispatch> ts->active = true; 116897: 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 ); 11689b: 8d 43 08 lea 0x8(%ebx),%eax 11689e: 89 04 24 mov %eax,(%esp) 1168a1: e8 9a 38 00 00 call 11a140 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1168a6: 8d 43 40 lea 0x40(%ebx),%eax 1168a9: 89 04 24 mov %eax,(%esp) 1168ac: e8 8f 38 00 00 call 11a140 <_Watchdog_Remove> 1168b1: 83 c4 10 add $0x10,%esp 1168b4: e9 ab fe ff ff jmp 116764 <_Timer_server_Body+0x32> =============================================================================== 00116609 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116609: 55 push %ebp 11660a: 89 e5 mov %esp,%ebp 11660c: 57 push %edi 11660d: 56 push %esi 11660e: 53 push %ebx 11660f: 83 ec 1c sub $0x1c,%esp 116612: 8b 5d 08 mov 0x8(%ebp),%ebx 116615: 8b 7d 0c mov 0xc(%ebp),%edi if ( ts->insert_chain == NULL ) { 116618: 8b 43 78 mov 0x78(%ebx),%eax 11661b: 85 c0 test %eax,%eax 11661d: 0f 85 fa 00 00 00 jne 11671d <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN #if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ ) void _Thread_Disable_dispatch( void ); #else RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { _Thread_Dispatch_increment_disable_level(); 116623: e8 40 ff ff ff call 116568 <_Thread_Dispatch_increment_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116628: 8b 47 38 mov 0x38(%edi),%eax 11662b: 83 f8 01 cmp $0x1,%eax 11662e: 75 61 jne 116691 <_Timer_server_Schedule_operation_method+0x88> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116630: 9c pushf 116631: fa cli 116632: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116635: 8b 15 48 7f 14 00 mov 0x147f48,%edx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11663b: 8b 4b 3c mov 0x3c(%ebx),%ecx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 11663e: 8b 43 30 mov 0x30(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 116641: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 116644: 39 f0 cmp %esi,%eax 116646: 74 19 je 116661 <_Timer_server_Schedule_operation_method+0x58> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116648: 89 d6 mov %edx,%esi 11664a: 29 ce sub %ecx,%esi 11664c: 89 75 e4 mov %esi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 11664f: 8b 70 10 mov 0x10(%eax),%esi if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116652: 31 c9 xor %ecx,%ecx * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 116654: 3b 75 e4 cmp -0x1c(%ebp),%esi 116657: 76 05 jbe 11665e <_Timer_server_Schedule_operation_method+0x55> delta_interval -= delta; 116659: 89 f1 mov %esi,%ecx 11665b: 2b 4d e4 sub -0x1c(%ebp),%ecx } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11665e: 89 48 10 mov %ecx,0x10(%eax) } ts->Interval_watchdogs.last_snapshot = snapshot; 116661: 89 53 3c mov %edx,0x3c(%ebx) _ISR_Enable( level ); 116664: ff 75 e0 pushl -0x20(%ebp) 116667: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116668: 56 push %esi 116669: 56 push %esi 11666a: 8d 47 10 lea 0x10(%edi),%eax 11666d: 50 push %eax 11666e: 8d 43 30 lea 0x30(%ebx),%eax 116671: 50 push %eax 116672: e8 b5 39 00 00 call 11a02c <_Watchdog_Insert> if ( !ts->active ) { 116677: 8a 43 7c mov 0x7c(%ebx),%al 11667a: 83 c4 10 add $0x10,%esp 11667d: 84 c0 test %al,%al 11667f: 0f 85 8c 00 00 00 jne 116711 <_Timer_server_Schedule_operation_method+0x108> _Timer_server_Reset_interval_system_watchdog( ts ); 116685: 89 d8 mov %ebx,%eax 116687: e8 f1 fe ff ff call 11657d <_Timer_server_Reset_interval_system_watchdog> 11668c: e9 80 00 00 00 jmp 116711 <_Timer_server_Schedule_operation_method+0x108> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116691: 83 f8 03 cmp $0x3,%eax 116694: 75 7b jne 116711 <_Timer_server_Schedule_operation_method+0x108> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116696: 9c pushf 116697: fa cli 116698: 8f 45 e0 popl -0x20(%ebp) 11669b: 6a 00 push $0x0 11669d: 68 00 ca 9a 3b push $0x3b9aca00 1166a2: ff 35 14 7e 14 00 pushl 0x147e14 1166a8: ff 35 10 7e 14 00 pushl 0x147e10 1166ae: e8 41 3f 01 00 call 12a5f4 <__divdi3> 1166b3: 83 c4 10 add $0x10,%esp snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 1166b6: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 1166b9: 8b 4b 68 mov 0x68(%ebx),%ecx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 1166bc: 8d 73 6c lea 0x6c(%ebx),%esi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1166bf: 39 f1 cmp %esi,%ecx 1166c1: 74 27 je 1166ea <_Timer_server_Schedule_operation_method+0xe1> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1166c3: 8b 71 10 mov 0x10(%ecx),%esi 1166c6: 89 75 dc mov %esi,-0x24(%ebp) if ( snapshot > last_snapshot ) { 1166c9: 39 d0 cmp %edx,%eax 1166cb: 76 15 jbe 1166e2 <_Timer_server_Schedule_operation_method+0xd9> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1166cd: 89 c6 mov %eax,%esi 1166cf: 29 d6 sub %edx,%esi 1166d1: 89 75 e4 mov %esi,-0x1c(%ebp) if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1166d4: 31 d2 xor %edx,%edx if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 1166d6: 39 75 dc cmp %esi,-0x24(%ebp) 1166d9: 76 0c jbe 1166e7 <_Timer_server_Schedule_operation_method+0xde><== NEVER TAKEN delta_interval -= delta; 1166db: 8b 55 dc mov -0x24(%ebp),%edx 1166de: 29 f2 sub %esi,%edx 1166e0: eb 05 jmp 1166e7 <_Timer_server_Schedule_operation_method+0xde> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1166e2: 03 55 dc add -0x24(%ebp),%edx delta_interval += delta; 1166e5: 29 c2 sub %eax,%edx } first_watchdog->delta_interval = delta_interval; 1166e7: 89 51 10 mov %edx,0x10(%ecx) } ts->TOD_watchdogs.last_snapshot = snapshot; 1166ea: 89 43 74 mov %eax,0x74(%ebx) _ISR_Enable( level ); 1166ed: ff 75 e0 pushl -0x20(%ebp) 1166f0: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1166f1: 51 push %ecx 1166f2: 51 push %ecx 1166f3: 8d 47 10 lea 0x10(%edi),%eax 1166f6: 50 push %eax 1166f7: 8d 43 68 lea 0x68(%ebx),%eax 1166fa: 50 push %eax 1166fb: e8 2c 39 00 00 call 11a02c <_Watchdog_Insert> if ( !ts->active ) { 116700: 8a 43 7c mov 0x7c(%ebx),%al 116703: 83 c4 10 add $0x10,%esp 116706: 84 c0 test %al,%al 116708: 75 07 jne 116711 <_Timer_server_Schedule_operation_method+0x108> _Timer_server_Reset_tod_system_watchdog( ts ); 11670a: 89 d8 mov %ebx,%eax 11670c: e8 b2 fe ff ff call 1165c3 <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 116711: 8d 65 f4 lea -0xc(%ebp),%esp 116714: 5b pop %ebx 116715: 5e pop %esi 116716: 5f pop %edi 116717: 5d pop %ebp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116718: e9 77 2c 00 00 jmp 119394 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 11671d: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED 116720: 89 7d 0c mov %edi,0xc(%ebp) <== NOT EXECUTED 116723: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 116726: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116729: 5b pop %ebx <== NOT EXECUTED 11672a: 5e pop %esi <== NOT EXECUTED 11672b: 5f pop %edi <== NOT EXECUTED 11672c: 5d pop %ebp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 11672d: e9 62 08 00 00 jmp 116f94 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010d974 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 10d974: 55 push %ebp 10d975: 89 e5 mov %esp,%ebp 10d977: 57 push %edi 10d978: 56 push %esi 10d979: 53 push %ebx 10d97a: 83 ec 0c sub $0xc,%esp 10d97d: 8b 55 08 mov 0x8(%ebp),%edx Timestamp64_Control answer; if ( *_rhs == 0 ) { 10d980: 8b 45 0c mov 0xc(%ebp),%eax 10d983: 8b 08 mov (%eax),%ecx 10d985: 8b 58 04 mov 0x4(%eax),%ebx 10d988: 89 d8 mov %ebx,%eax 10d98a: 09 c8 or %ecx,%eax 10d98c: 75 14 jne 10d9a2 <_Timestamp64_Divide+0x2e><== ALWAYS TAKEN *_ival_percentage = 0; 10d98e: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10d991: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED *_fval_percentage = 0; 10d997: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d99a: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED return; 10d9a0: eb 4c jmp 10d9ee <_Timestamp64_Divide+0x7a><== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 10d9a2: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi 10d9a9: b8 a0 86 01 00 mov $0x186a0,%eax 10d9ae: f7 22 mull (%edx) 10d9b0: 01 f2 add %esi,%edx 10d9b2: 53 push %ebx 10d9b3: 51 push %ecx 10d9b4: 52 push %edx 10d9b5: 50 push %eax 10d9b6: e8 5d 10 01 00 call 11ea18 <__divdi3> 10d9bb: 83 c4 10 add $0x10,%esp 10d9be: 89 c6 mov %eax,%esi 10d9c0: 89 d7 mov %edx,%edi *_ival_percentage = answer / 1000; 10d9c2: 6a 00 push $0x0 10d9c4: 68 e8 03 00 00 push $0x3e8 10d9c9: 52 push %edx 10d9ca: 50 push %eax 10d9cb: e8 48 10 01 00 call 11ea18 <__divdi3> 10d9d0: 83 c4 10 add $0x10,%esp 10d9d3: 8b 55 10 mov 0x10(%ebp),%edx 10d9d6: 89 02 mov %eax,(%edx) *_fval_percentage = answer % 1000; 10d9d8: 6a 00 push $0x0 10d9da: 68 e8 03 00 00 push $0x3e8 10d9df: 57 push %edi 10d9e0: 56 push %esi 10d9e1: e8 86 11 01 00 call 11eb6c <__moddi3> 10d9e6: 83 c4 10 add $0x10,%esp 10d9e9: 8b 55 14 mov 0x14(%ebp),%edx 10d9ec: 89 02 mov %eax,(%edx) } 10d9ee: 8d 65 f4 lea -0xc(%ebp),%esp 10d9f1: 5b pop %ebx 10d9f2: 5e pop %esi 10d9f3: 5f pop %edi 10d9f4: 5d pop %ebp 10d9f5: c3 ret =============================================================================== 0010c6ec <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c6ec: 55 push %ebp 10c6ed: 89 e5 mov %esp,%ebp 10c6ef: 57 push %edi 10c6f0: 56 push %esi 10c6f1: 53 push %ebx 10c6f2: 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; 10c6f5: a1 80 a1 12 00 mov 0x12a180,%eax 10c6fa: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c6fd: 8b 1d 84 a1 12 00 mov 0x12a184,%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10c703: c7 05 90 e5 12 00 94 movl $0x12e594,0x12e590 10c70a: e5 12 00 head->previous = NULL; 10c70d: c7 05 94 e5 12 00 00 movl $0x0,0x12e594 10c714: 00 00 00 tail->previous = head; 10c717: c7 05 98 e5 12 00 90 movl $0x12e590,0x12e598 10c71e: e5 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10c721: c7 05 e8 e3 12 00 ec movl $0x12e3ec,0x12e3e8 10c728: e3 12 00 head->previous = NULL; 10c72b: c7 05 ec e3 12 00 00 movl $0x0,0x12e3ec 10c732: 00 00 00 tail->previous = head; 10c735: c7 05 f0 e3 12 00 e8 movl $0x12e3e8,0x12e3f0 10c73c: e3 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c73f: 85 db test %ebx,%ebx 10c741: 74 4f je 10c792 <_User_extensions_Handler_initialization+0xa6><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10c743: 6b f0 34 imul $0x34,%eax,%esi _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 10c746: 83 ec 0c sub $0xc,%esp 10c749: 56 push %esi 10c74a: e8 26 04 00 00 call 10cb75 <_Workspace_Allocate_or_fatal_error> 10c74f: 89 c2 mov %eax,%edx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c751: 31 c0 xor %eax,%eax 10c753: 89 d7 mov %edx,%edi 10c755: 89 f1 mov %esi,%ecx 10c757: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c759: 83 c4 10 add $0x10,%esp 10c75c: 31 c0 xor %eax,%eax 10c75e: eb 2d jmp 10c78d <_User_extensions_Handler_initialization+0xa1> #include #include #include #include void _User_extensions_Handler_initialization(void) 10c760: 89 c6 mov %eax,%esi 10c762: c1 e6 05 shl $0x5,%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; 10c765: 8d 7a 14 lea 0x14(%edx),%edi 10c768: 01 de add %ebx,%esi 10c76a: b9 08 00 00 00 mov $0x8,%ecx 10c76f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c771: 83 ec 0c sub $0xc,%esp 10c774: 52 push %edx 10c775: 89 45 dc mov %eax,-0x24(%ebp) 10c778: 89 55 e0 mov %edx,-0x20(%ebp) 10c77b: e8 e4 30 00 00 call 10f864 <_User_extensions_Add_set> number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10c780: 8b 55 e0 mov -0x20(%ebp),%edx 10c783: 83 c2 34 add $0x34,%edx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c786: 8b 45 dc mov -0x24(%ebp),%eax 10c789: 40 inc %eax 10c78a: 83 c4 10 add $0x10,%esp 10c78d: 3b 45 e4 cmp -0x1c(%ebp),%eax 10c790: 75 ce jne 10c760 <_User_extensions_Handler_initialization+0x74> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c792: 8d 65 f4 lea -0xc(%ebp),%esp 10c795: 5b pop %ebx 10c796: 5e pop %esi 10c797: 5f pop %edi 10c798: 5d pop %ebp 10c799: c3 ret =============================================================================== 0010dc4c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10dc4c: 55 push %ebp 10dc4d: 89 e5 mov %esp,%ebp 10dc4f: 57 push %edi 10dc50: 56 push %esi 10dc51: 53 push %ebx 10dc52: 83 ec 0c sub $0xc,%esp 10dc55: 8b 75 08 mov 0x8(%ebp),%esi 10dc58: 8b 4d 0c mov 0xc(%ebp),%ecx 10dc5b: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10dc5e: 9c pushf 10dc5f: fa cli 10dc60: 58 pop %eax */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 10dc61: 8b 16 mov (%esi),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10dc63: 8d 7e 04 lea 0x4(%esi),%edi * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10dc66: 39 fa cmp %edi,%edx 10dc68: 74 3e je 10dca8 <_Watchdog_Adjust+0x5c> switch ( direction ) { 10dc6a: 85 c9 test %ecx,%ecx 10dc6c: 74 36 je 10dca4 <_Watchdog_Adjust+0x58> 10dc6e: 49 dec %ecx 10dc6f: 75 37 jne 10dca8 <_Watchdog_Adjust+0x5c> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10dc71: 01 5a 10 add %ebx,0x10(%edx) break; 10dc74: eb 32 jmp 10dca8 <_Watchdog_Adjust+0x5c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 10dc76: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10dc78: 8b 4a 10 mov 0x10(%edx),%ecx 10dc7b: 39 cb cmp %ecx,%ebx 10dc7d: 73 07 jae 10dc86 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10dc7f: 29 d9 sub %ebx,%ecx 10dc81: 89 4a 10 mov %ecx,0x10(%edx) break; 10dc84: eb 22 jmp 10dca8 <_Watchdog_Adjust+0x5c> } else { units -= _Watchdog_First( header )->delta_interval; 10dc86: 29 cb sub %ecx,%ebx _Watchdog_First( header )->delta_interval = 1; 10dc88: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10dc8f: 50 push %eax 10dc90: 9d popf _Watchdog_Tickle( header ); 10dc91: 83 ec 0c sub $0xc,%esp 10dc94: 56 push %esi 10dc95: e8 96 01 00 00 call 10de30 <_Watchdog_Tickle> _ISR_Disable( level ); 10dc9a: 9c pushf 10dc9b: fa cli 10dc9c: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10dc9d: 83 c4 10 add $0x10,%esp 10dca0: 39 3e cmp %edi,(%esi) 10dca2: 74 04 je 10dca8 <_Watchdog_Adjust+0x5c> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10dca4: 85 db test %ebx,%ebx 10dca6: 75 ce jne 10dc76 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10dca8: 50 push %eax 10dca9: 9d popf } 10dcaa: 8d 65 f4 lea -0xc(%ebp),%esp 10dcad: 5b pop %ebx 10dcae: 5e pop %esi 10dcaf: 5f pop %edi 10dcb0: 5d pop %ebp 10dcb1: c3 ret =============================================================================== 0010ca18 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ca18: 55 push %ebp 10ca19: 89 e5 mov %esp,%ebp 10ca1b: 56 push %esi 10ca1c: 53 push %ebx 10ca1d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ca20: 9c pushf 10ca21: fa cli 10ca22: 5e pop %esi previous_state = the_watchdog->state; 10ca23: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ca26: 83 f8 01 cmp $0x1,%eax 10ca29: 74 09 je 10ca34 <_Watchdog_Remove+0x1c> 10ca2b: 72 42 jb 10ca6f <_Watchdog_Remove+0x57> 10ca2d: 83 f8 03 cmp $0x3,%eax 10ca30: 77 3d ja 10ca6f <_Watchdog_Remove+0x57> <== NEVER TAKEN 10ca32: eb 09 jmp 10ca3d <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10ca34: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ca3b: eb 32 jmp 10ca6f <_Watchdog_Remove+0x57> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ca3d: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10ca44: 8b 0a mov (%edx),%ecx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ca46: 83 39 00 cmpl $0x0,(%ecx) 10ca49: 74 06 je 10ca51 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ca4b: 8b 5a 10 mov 0x10(%edx),%ebx 10ca4e: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10ca51: 8b 1d d4 e4 12 00 mov 0x12e4d4,%ebx 10ca57: 85 db test %ebx,%ebx 10ca59: 74 0c je 10ca67 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10ca5b: 8b 1d e8 e8 12 00 mov 0x12e8e8,%ebx 10ca61: 89 1d 74 e4 12 00 mov %ebx,0x12e474 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ca67: 8b 5a 04 mov 0x4(%edx),%ebx next->previous = previous; 10ca6a: 89 59 04 mov %ebx,0x4(%ecx) previous->next = next; 10ca6d: 89 0b mov %ecx,(%ebx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ca6f: 8b 0d d8 e4 12 00 mov 0x12e4d8,%ecx 10ca75: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10ca78: 56 push %esi 10ca79: 9d popf return( previous_state ); } 10ca7a: 5b pop %ebx 10ca7b: 5e pop %esi 10ca7c: 5d pop %ebp 10ca7d: c3 ret =============================================================================== 001124df <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 1124df: 55 push %ebp 1124e0: 89 e5 mov %esp,%ebp 1124e2: 57 push %edi 1124e3: 56 push %esi 1124e4: 53 push %ebx 1124e5: 83 ec 2c sub $0x2c,%esp int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 1124e8: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) ) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; 1124ef: 8b 75 10 mov 0x10(%ebp),%esi void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; 1124f2: 8b 45 0c mov 0xc(%ebp),%eax 1124f5: 89 45 d4 mov %eax,-0x2c(%ebp) uint32_t count, void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; 1124f8: 31 db xor %ebx,%ebx uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 1124fa: eb 43 jmp 11253f <_fat_block_read+0x60> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 1124fc: 8d 45 e4 lea -0x1c(%ebp),%eax 1124ff: 50 push %eax 112500: 6a 01 push $0x1 112502: ff 75 d4 pushl -0x2c(%ebp) 112505: ff 75 08 pushl 0x8(%ebp) 112508: e8 f7 fc ff ff call 112204 if (rc != RC_OK) 11250d: 83 c4 10 add $0x10,%esp 112510: 85 c0 test %eax,%eax 112512: 75 33 jne 112547 <_fat_block_read+0x68> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 112514: 8b 45 08 mov 0x8(%ebp),%eax 112517: 0f b7 10 movzwl (%eax),%edx 11251a: 29 f2 sub %esi,%edx 11251c: 3b 55 14 cmp 0x14(%ebp),%edx 11251f: 76 03 jbe 112524 <_fat_block_read+0x45> 112521: 8b 55 14 mov 0x14(%ebp),%edx memcpy((buff + cmpltd), (block->buffer + ofs), c); 112524: 8b 45 18 mov 0x18(%ebp),%eax 112527: 01 d8 add %ebx,%eax 112529: 8b 4d e4 mov -0x1c(%ebp),%ecx 11252c: 03 71 1c add 0x1c(%ecx),%esi 11252f: 89 c7 mov %eax,%edi 112531: 89 d1 mov %edx,%ecx 112533: f3 a4 rep movsb %ds:(%esi),%es:(%edi) count -= c; 112535: 29 55 14 sub %edx,0x14(%ebp) cmpltd += c; 112538: 01 d3 add %edx,%ebx blk++; 11253a: ff 45 d4 incl -0x2c(%ebp) ofs = 0; 11253d: 31 f6 xor %esi,%esi uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 11253f: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 112543: 75 b7 jne 1124fc <_fat_block_read+0x1d> 112545: eb 03 jmp 11254a <_fat_block_read+0x6b> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 112547: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 11254a: 89 d8 mov %ebx,%eax 11254c: 8d 65 f4 lea -0xc(%ebp),%esp 11254f: 5b pop %ebx 112550: 5e pop %esi 112551: 5f pop %edi 112552: 5d pop %ebp 112553: c3 ret =============================================================================== 00112554 <_fat_block_write>: fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 112554: 55 push %ebp 112555: 89 e5 mov %esp,%ebp 112557: 57 push %edi 112558: 56 push %esi 112559: 53 push %ebx 11255a: 83 ec 2c sub $0x2c,%esp int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 11255d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; 112564: 8b 75 10 mov 0x10(%ebp),%esi uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; 112567: 8b 55 0c mov 0xc(%ebp),%edx uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; 11256a: 31 db xor %ebx,%ebx uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 11256c: eb 67 jmp 1125d5 <_fat_block_write+0x81> { c = MIN(count, (fs_info->vol.bps - ofs)); 11256e: 8b 4d 08 mov 0x8(%ebp),%ecx 112571: 0f b7 01 movzwl (%ecx),%eax 112574: 89 c1 mov %eax,%ecx 112576: 29 f1 sub %esi,%ecx 112578: 89 4d d4 mov %ecx,-0x2c(%ebp) 11257b: 8b 4d 14 mov 0x14(%ebp),%ecx 11257e: 39 4d d4 cmp %ecx,-0x2c(%ebp) 112581: 76 03 jbe 112586 <_fat_block_write+0x32> 112583: 89 4d d4 mov %ecx,-0x2c(%ebp) if (c == fs_info->vol.bps) 112586: 39 45 d4 cmp %eax,-0x2c(%ebp) 112589: 75 08 jne 112593 <_fat_block_write+0x3f> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 11258b: 8d 45 e4 lea -0x1c(%ebp),%eax 11258e: 50 push %eax 11258f: 6a 02 push $0x2 112591: eb 06 jmp 112599 <_fat_block_write+0x45> else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 112593: 8d 4d e4 lea -0x1c(%ebp),%ecx 112596: 51 push %ecx 112597: 6a 01 push $0x1 112599: 52 push %edx 11259a: ff 75 08 pushl 0x8(%ebp) 11259d: 89 55 d0 mov %edx,-0x30(%ebp) 1125a0: e8 5f fc ff ff call 112204 1125a5: 83 c4 10 add $0x10,%esp 1125a8: 8b 55 d0 mov -0x30(%ebp),%edx if (rc != RC_OK) 1125ab: 85 c0 test %eax,%eax 1125ad: 75 2e jne 1125dd <_fat_block_write+0x89> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 1125af: 8b 45 e4 mov -0x1c(%ebp),%eax 1125b2: 8b 40 1c mov 0x1c(%eax),%eax 1125b5: 01 f0 add %esi,%eax 1125b7: 8b 75 18 mov 0x18(%ebp),%esi 1125ba: 01 de add %ebx,%esi 1125bc: 89 c7 mov %eax,%edi 1125be: 8b 4d d4 mov -0x2c(%ebp),%ecx 1125c1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 1125c3: 8b 45 08 mov 0x8(%ebp),%eax 1125c6: c6 40 7c 01 movb $0x1,0x7c(%eax) fat_buf_mark_modified(fs_info); count -= c; 1125ca: 8b 4d d4 mov -0x2c(%ebp),%ecx 1125cd: 29 4d 14 sub %ecx,0x14(%ebp) cmpltd +=c; 1125d0: 01 cb add %ecx,%ebx blk++; 1125d2: 42 inc %edx ofs = 0; 1125d3: 31 f6 xor %esi,%esi uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 1125d5: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1125d9: 75 93 jne 11256e <_fat_block_write+0x1a> 1125db: eb 03 jmp 1125e0 <_fat_block_write+0x8c> 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); if (rc != RC_OK) return -1; 1125dd: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 1125e0: 89 d8 mov %ebx,%eax 1125e2: 8d 65 f4 lea -0xc(%ebp),%esp 1125e5: 5b pop %ebx 1125e6: 5e pop %esi 1125e7: 5f pop %edi 1125e8: 5d pop %ebp 1125e9: c3 ret =============================================================================== 001125ea <_fat_block_zero>: _fat_block_zero( fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count) { 1125ea: 55 push %ebp 1125eb: 89 e5 mov %esp,%ebp 1125ed: 57 push %edi 1125ee: 56 push %esi 1125ef: 53 push %ebx 1125f0: 83 ec 1c sub $0x1c,%esp int rc = RC_OK; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 1125f3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uint32_t offset, uint32_t count) { int rc = RC_OK; uint32_t blk = start; uint32_t ofs = offset; 1125fa: 8b 7d 10 mov 0x10(%ebp),%edi uint32_t start, uint32_t offset, uint32_t count) { int rc = RC_OK; uint32_t blk = start; 1125fd: 8b 75 0c mov 0xc(%ebp),%esi uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 112600: eb 51 jmp 112653 <_fat_block_zero+0x69> { c = MIN(count, (fs_info->vol.bps - ofs)); 112602: 8b 55 08 mov 0x8(%ebp),%edx 112605: 0f b7 02 movzwl (%edx),%eax 112608: 89 c3 mov %eax,%ebx 11260a: 29 fb sub %edi,%ebx 11260c: 3b 5d 14 cmp 0x14(%ebp),%ebx 11260f: 76 03 jbe 112614 <_fat_block_zero+0x2a> <== ALWAYS TAKEN 112611: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED if (c == fs_info->vol.bps) 112614: 39 c3 cmp %eax,%ebx 112616: 75 08 jne 112620 <_fat_block_zero+0x36> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 112618: 8d 45 e4 lea -0x1c(%ebp),%eax 11261b: 50 push %eax 11261c: 6a 02 push $0x2 11261e: eb 06 jmp 112626 <_fat_block_zero+0x3c> else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 112620: 8d 55 e4 lea -0x1c(%ebp),%edx 112623: 52 push %edx 112624: 6a 01 push $0x1 112626: 56 push %esi 112627: ff 75 08 pushl 0x8(%ebp) 11262a: e8 d5 fb ff ff call 112204 11262f: 83 c4 10 add $0x10,%esp if (rc != RC_OK) 112632: 85 c0 test %eax,%eax 112634: 75 27 jne 11265d <_fat_block_zero+0x73> <== NEVER TAKEN return -1; memset((block->buffer + ofs), 0, c); 112636: 8b 45 e4 mov -0x1c(%ebp),%eax 112639: 8b 50 1c mov 0x1c(%eax),%edx 11263c: 01 fa add %edi,%edx 11263e: 31 c0 xor %eax,%eax 112640: 89 d7 mov %edx,%edi 112642: 89 d9 mov %ebx,%ecx 112644: f3 aa rep stos %al,%es:(%edi) 112646: 8b 55 08 mov 0x8(%ebp),%edx 112649: c6 42 7c 01 movb $0x1,0x7c(%edx) fat_buf_mark_modified(fs_info); count -= c; 11264d: 29 5d 14 sub %ebx,0x14(%ebp) blk++; 112650: 46 inc %esi ofs = 0; 112651: 31 ff xor %edi,%edi uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 112653: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 112657: 75 a9 jne 112602 <_fat_block_zero+0x18> count -= c; blk++; ofs = 0; } return 0; 112659: 31 c0 xor %eax,%eax 11265b: eb 03 jmp 112660 <_fat_block_zero+0x76> 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); if (rc != RC_OK) return -1; 11265d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED count -= c; blk++; ofs = 0; } return 0; } 112660: 8d 65 f4 lea -0xc(%ebp),%esp 112663: 5b pop %ebx 112664: 5e pop %esi 112665: 5f pop %edi 112666: 5d pop %ebp 112667: c3 ret =============================================================================== 00104935 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 104935: 55 push %ebp <== NOT EXECUTED 104936: 89 e5 mov %esp,%ebp <== NOT EXECUTED 104938: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10493b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10493e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 104941: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 104944: 5d pop %ebp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 104945: e9 a6 ff ff ff jmp 1048f0 <== NOT EXECUTED =============================================================================== 0010757d <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10757d: 55 push %ebp <== NOT EXECUTED 10757e: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107580: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 107583: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 107586: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 107589: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10758c: 5d pop %ebp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10758d: e9 a6 ff ff ff jmp 107538 <== NOT EXECUTED =============================================================================== 00109dc4 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 109dc4: 55 push %ebp 109dc5: 89 e5 mov %esp,%ebp 109dc7: 57 push %edi 109dc8: 56 push %esi 109dc9: 53 push %ebx 109dca: 83 ec 18 sub $0x18,%esp 109dcd: 8b 75 08 mov 0x8(%ebp),%esi 109dd0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 109dd3: 68 08 03 13 00 push $0x130308 109dd8: e8 2b 10 00 00 call 10ae08 if (fcntl (fildes, F_GETFD) < 0) { 109ddd: 58 pop %eax 109dde: 5a pop %edx 109ddf: 6a 01 push $0x1 109de1: 56 push %esi 109de2: e8 a9 5b 00 00 call 10f990 109de7: 83 c4 10 add $0x10,%esp 109dea: 85 c0 test %eax,%eax 109dec: 79 1d jns 109e0b pthread_mutex_unlock(&aio_request_queue.mutex); 109dee: 83 ec 0c sub $0xc,%esp 109df1: 68 08 03 13 00 push $0x130308 109df6: e8 8d 10 00 00 call 10ae88 rtems_set_errno_and_return_minus_one (EBADF); 109dfb: e8 1c 8f 00 00 call 112d1c <__errno> 109e00: c7 00 09 00 00 00 movl $0x9,(%eax) 109e06: e9 20 01 00 00 jmp 109f2b } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 109e0b: 85 db test %ebx,%ebx 109e0d: 0f 85 bc 00 00 00 jne 109ecf AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 109e13: 50 push %eax 109e14: 6a 00 push $0x0 109e16: 56 push %esi 109e17: 68 50 03 13 00 push $0x130350 109e1c: e8 9e 05 00 00 call 10a3bf 109e21: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 109e23: 83 c4 10 add $0x10,%esp 109e26: 85 c0 test %eax,%eax 109e28: 75 6b jne 109e95 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 109e2a: 81 3d 5c 03 13 00 60 cmpl $0x130360,0x13035c 109e31: 03 13 00 109e34: 74 17 je 109e4d <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 109e36: 50 push %eax 109e37: 6a 00 push $0x0 109e39: 56 push %esi 109e3a: 68 5c 03 13 00 push $0x13035c 109e3f: e8 7b 05 00 00 call 10a3bf 109e44: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 109e46: 83 c4 10 add $0x10,%esp 109e49: 85 c0 test %eax,%eax 109e4b: 75 1a jne 109e67 pthread_mutex_unlock(&aio_request_queue.mutex); 109e4d: 83 ec 0c sub $0xc,%esp 109e50: 68 08 03 13 00 push $0x130308 109e55: e8 2e 10 00 00 call 10ae88 return AIO_ALLDONE; 109e5a: 83 c4 10 add $0x10,%esp 109e5d: bb 02 00 00 00 mov $0x2,%ebx 109e62: e9 0d 01 00 00 jmp 109f74 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 109e67: 83 ec 0c sub $0xc,%esp 109e6a: 50 push %eax 109e6b: e8 94 26 00 00 call 10c504 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 109e70: 89 1c 24 mov %ebx,(%esp) 109e73: e8 d5 05 00 00 call 10a44d pthread_mutex_destroy (&r_chain->mutex); 109e78: 8d 73 1c lea 0x1c(%ebx),%esi 109e7b: 89 34 24 mov %esi,(%esp) 109e7e: e8 59 0d 00 00 call 10abdc pthread_cond_destroy (&r_chain->mutex); 109e83: 89 34 24 mov %esi,(%esp) 109e86: e8 4d 0a 00 00 call 10a8d8 free (r_chain); 109e8b: 89 1c 24 mov %ebx,(%esp) 109e8e: e8 c5 cc ff ff call 106b58 109e93: eb 24 jmp 109eb9 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 109e95: 8d 70 1c lea 0x1c(%eax),%esi 109e98: 83 ec 0c sub $0xc,%esp 109e9b: 56 push %esi 109e9c: e8 67 0f 00 00 call 10ae08 109ea1: 89 1c 24 mov %ebx,(%esp) 109ea4: e8 5b 26 00 00 call 10c504 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 109ea9: 89 1c 24 mov %ebx,(%esp) 109eac: e8 9c 05 00 00 call 10a44d pthread_mutex_unlock (&r_chain->mutex); 109eb1: 89 34 24 mov %esi,(%esp) 109eb4: e8 cf 0f 00 00 call 10ae88 pthread_mutex_unlock (&aio_request_queue.mutex); 109eb9: c7 04 24 08 03 13 00 movl $0x130308,(%esp) 109ec0: e8 c3 0f 00 00 call 10ae88 return AIO_CANCELED; 109ec5: 83 c4 10 add $0x10,%esp 109ec8: 31 db xor %ebx,%ebx 109eca: e9 a5 00 00 00 jmp 109f74 } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 109ecf: 8b 3b mov (%ebx),%edi 109ed1: 39 f7 cmp %esi,%edi 109ed3: 74 02 je 109ed7 109ed5: eb 3c jmp 109f13 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 109ed7: 50 push %eax 109ed8: 6a 00 push $0x0 109eda: 57 push %edi 109edb: 68 50 03 13 00 push $0x130350 109ee0: e8 da 04 00 00 call 10a3bf 109ee5: 89 c6 mov %eax,%esi if (r_chain == NULL) { 109ee7: 83 c4 10 add $0x10,%esp 109eea: 85 c0 test %eax,%eax 109eec: 75 55 jne 109f43 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 109eee: 81 3d 5c 03 13 00 60 cmpl $0x130360,0x13035c 109ef5: 03 13 00 109ef8: 0f 84 4f ff ff ff je 109e4d <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 109efe: 56 push %esi 109eff: 6a 00 push $0x0 109f01: 57 push %edi 109f02: 68 5c 03 13 00 push $0x13035c 109f07: e8 b3 04 00 00 call 10a3bf if (r_chain == NULL) { 109f0c: 83 c4 10 add $0x10,%esp 109f0f: 85 c0 test %eax,%eax 109f11: 75 20 jne 109f33 pthread_mutex_unlock (&aio_request_queue.mutex); 109f13: 83 ec 0c sub $0xc,%esp 109f16: 68 08 03 13 00 push $0x130308 109f1b: e8 68 0f 00 00 call 10ae88 rtems_set_errno_and_return_minus_one (EINVAL); 109f20: e8 f7 8d 00 00 call 112d1c <__errno> 109f25: c7 00 16 00 00 00 movl $0x16,(%eax) 109f2b: 83 c4 10 add $0x10,%esp 109f2e: 83 cb ff or $0xffffffff,%ebx 109f31: eb 41 jmp 109f74 } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 109f33: 51 push %ecx 109f34: 51 push %ecx 109f35: 53 push %ebx 109f36: 83 c0 08 add $0x8,%eax 109f39: 50 push %eax 109f3a: e8 57 05 00 00 call 10a496 109f3f: 89 c3 mov %eax,%ebx 109f41: eb 22 jmp 109f65 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 109f43: 8d 78 1c lea 0x1c(%eax),%edi 109f46: 83 ec 0c sub $0xc,%esp 109f49: 57 push %edi 109f4a: e8 b9 0e 00 00 call 10ae08 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 109f4f: 58 pop %eax 109f50: 5a pop %edx 109f51: 53 push %ebx 109f52: 83 c6 08 add $0x8,%esi 109f55: 56 push %esi 109f56: e8 3b 05 00 00 call 10a496 109f5b: 89 c3 mov %eax,%ebx pthread_mutex_unlock (&r_chain->mutex); 109f5d: 89 3c 24 mov %edi,(%esp) 109f60: e8 23 0f 00 00 call 10ae88 pthread_mutex_unlock (&aio_request_queue.mutex); 109f65: c7 04 24 08 03 13 00 movl $0x130308,(%esp) 109f6c: e8 17 0f 00 00 call 10ae88 return result; 109f71: 83 c4 10 add $0x10,%esp } return AIO_ALLDONE; } 109f74: 89 d8 mov %ebx,%eax 109f76: 8d 65 f4 lea -0xc(%ebp),%esp 109f79: 5b pop %ebx 109f7a: 5e pop %esi 109f7b: 5f pop %edi 109f7c: 5d pop %ebp 109f7d: c3 ret =============================================================================== 00109f8c : int aio_fsync( int op, struct aiocb *aiocbp ) { 109f8c: 55 push %ebp 109f8d: 89 e5 mov %esp,%ebp 109f8f: 53 push %ebx 109f90: 52 push %edx 109f91: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request *req; int mode; if (op != O_SYNC) 109f94: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp) 109f9b: 74 1b je 109fb8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 109f9d: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 109fa4: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 109fab: e8 6c 8d 00 00 call 112d1c <__errno> 109fb0: c7 00 16 00 00 00 movl $0x16,(%eax) 109fb6: eb 74 jmp 10a02c mode = fcntl (aiocbp->aio_fildes, F_GETFL); 109fb8: 50 push %eax 109fb9: 50 push %eax 109fba: 6a 03 push $0x3 109fbc: ff 33 pushl (%ebx) 109fbe: e8 cd 59 00 00 call 10f990 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 109fc3: 83 e0 03 and $0x3,%eax 109fc6: 48 dec %eax 109fc7: 83 c4 10 add $0x10,%esp 109fca: 83 f8 01 cmp $0x1,%eax 109fcd: 76 1b jbe 109fea rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 109fcf: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 109fd6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 109fdd: e8 3a 8d 00 00 call 112d1c <__errno> 109fe2: c7 00 09 00 00 00 movl $0x9,(%eax) 109fe8: eb 42 jmp 10a02c req = malloc (sizeof (rtems_aio_request)); 109fea: 83 ec 0c sub $0xc,%esp 109fed: 6a 18 push $0x18 109fef: e8 3c cf ff ff call 106f30 if (req == NULL) 109ff4: 83 c4 10 add $0x10,%esp 109ff7: 85 c0 test %eax,%eax 109ff9: 75 1b jne 10a016 <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 109ffb: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10a002: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10a009: e8 0e 8d 00 00 call 112d1c <__errno> <== NOT EXECUTED 10a00e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10a014: eb 16 jmp 10a02c <== NOT EXECUTED req->aiocbp = aiocbp; 10a016: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_SYNC; 10a019: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx) return rtems_aio_enqueue (req); 10a020: 89 45 08 mov %eax,0x8(%ebp) } 10a023: 8b 5d fc mov -0x4(%ebp),%ebx 10a026: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 10a027: e9 ce 04 00 00 jmp 10a4fa } 10a02c: 83 c8 ff or $0xffffffff,%eax 10a02f: 8b 5d fc mov -0x4(%ebp),%ebx 10a032: c9 leave 10a033: c3 ret =============================================================================== 0010a6dc : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 10a6dc: 55 push %ebp 10a6dd: 89 e5 mov %esp,%ebp 10a6df: 53 push %ebx 10a6e0: 83 ec 0c sub $0xc,%esp 10a6e3: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10a6e6: 6a 03 push $0x3 10a6e8: ff 33 pushl (%ebx) 10a6ea: e8 a1 52 00 00 call 10f990 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10a6ef: 83 c4 10 add $0x10,%esp 10a6f2: a8 01 test $0x1,%al 10a6f4: 74 1b je 10a711 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10a6f6: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10a6fd: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a704: e8 13 86 00 00 call 112d1c <__errno> 10a709: c7 00 09 00 00 00 movl $0x9,(%eax) 10a70f: eb 6b jmp 10a77c if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10a711: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10a715: 74 02 je 10a719 10a717: eb 06 jmp 10a71f rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10a719: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a71d: 79 1b jns 10a73a rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10a71f: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10a726: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a72d: e8 ea 85 00 00 call 112d1c <__errno> 10a732: c7 00 16 00 00 00 movl $0x16,(%eax) 10a738: eb 42 jmp 10a77c req = malloc (sizeof (rtems_aio_request)); 10a73a: 83 ec 0c sub $0xc,%esp 10a73d: 6a 18 push $0x18 10a73f: e8 ec c7 ff ff call 106f30 if (req == NULL) 10a744: 83 c4 10 add $0x10,%esp 10a747: 85 c0 test %eax,%eax 10a749: 75 1b jne 10a766 <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10a74b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10a752: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10a759: e8 be 85 00 00 call 112d1c <__errno> <== NOT EXECUTED 10a75e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10a764: eb 16 jmp 10a77c <== NOT EXECUTED req->aiocbp = aiocbp; 10a766: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_READ; 10a769: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx) return rtems_aio_enqueue (req); 10a770: 89 45 08 mov %eax,0x8(%ebp) } 10a773: 8b 5d fc mov -0x4(%ebp),%ebx 10a776: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 10a777: e9 7e fd ff ff jmp 10a4fa } 10a77c: 83 c8 ff or $0xffffffff,%eax 10a77f: 8b 5d fc mov -0x4(%ebp),%ebx 10a782: c9 leave 10a783: c3 ret =============================================================================== 0010a790 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 10a790: 55 push %ebp 10a791: 89 e5 mov %esp,%ebp 10a793: 53 push %ebx 10a794: 83 ec 0c sub $0xc,%esp 10a797: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10a79a: 6a 03 push $0x3 10a79c: ff 33 pushl (%ebx) 10a79e: e8 ed 51 00 00 call 10f990 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10a7a3: 83 e0 03 and $0x3,%eax 10a7a6: 48 dec %eax 10a7a7: 83 c4 10 add $0x10,%esp 10a7aa: 83 f8 01 cmp $0x1,%eax 10a7ad: 76 1b jbe 10a7ca rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10a7af: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10a7b6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a7bd: e8 5a 85 00 00 call 112d1c <__errno> 10a7c2: c7 00 09 00 00 00 movl $0x9,(%eax) 10a7c8: eb 6b jmp 10a835 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10a7ca: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10a7ce: 74 02 je 10a7d2 10a7d0: eb 06 jmp 10a7d8 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10a7d2: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a7d6: 79 1b jns 10a7f3 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10a7d8: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10a7df: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a7e6: e8 31 85 00 00 call 112d1c <__errno> 10a7eb: c7 00 16 00 00 00 movl $0x16,(%eax) 10a7f1: eb 42 jmp 10a835 req = malloc (sizeof (rtems_aio_request)); 10a7f3: 83 ec 0c sub $0xc,%esp 10a7f6: 6a 18 push $0x18 10a7f8: e8 33 c7 ff ff call 106f30 if (req == NULL) 10a7fd: 83 c4 10 add $0x10,%esp 10a800: 85 c0 test %eax,%eax 10a802: 75 1b jne 10a81f <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10a804: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10a80b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10a812: e8 05 85 00 00 call 112d1c <__errno> <== NOT EXECUTED 10a817: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10a81d: eb 16 jmp 10a835 <== NOT EXECUTED req->aiocbp = aiocbp; 10a81f: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_WRITE; 10a822: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx) return rtems_aio_enqueue (req); 10a829: 89 45 08 mov %eax,0x8(%ebp) } 10a82c: 8b 5d fc mov -0x4(%ebp),%ebx 10a82f: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 10a830: e9 c5 fc ff ff jmp 10a4fa } 10a835: 83 c8 ff or $0xffffffff,%eax 10a838: 8b 5d fc mov -0x4(%ebp),%ebx 10a83b: c9 leave 10a83c: c3 ret =============================================================================== 00104608 : #include #include int chroot( const char *path ) { 104608: 55 push %ebp 104609: 89 e5 mov %esp,%ebp 10460b: 53 push %ebx 10460c: 83 ec 70 sub $0x70,%esp /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 10460f: 68 60 7b 12 00 push $0x127b60 104614: 68 64 7b 12 00 push $0x127b64 104619: 6a 19 push $0x19 10461b: ff 75 08 pushl 0x8(%ebp) 10461e: 8d 45 c0 lea -0x40(%ebp),%eax 104621: 50 push %eax 104622: e8 45 11 00 00 call 10576c 104627: 83 c4 18 add $0x18,%esp 10462a: 8d 45 d8 lea -0x28(%ebp),%eax 10462d: 50 push %eax eval_flags, &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); 10462e: 8d 5d a8 lea -0x58(%ebp),%ebx 104631: 53 push %ebx 104632: e8 00 15 00 00 call 105b37 new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 104637: 89 1c 24 mov %ebx,(%esp) 10463a: e8 6b 16 00 00 call 105caa 10463f: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 104642: 83 c4 10 add $0x10,%esp 104645: 81 78 10 24 d6 11 00 cmpl $0x11d624,0x10(%eax) 10464c: 74 7a je 1046c8 rtems_filesystem_global_location_t *new_root_loc = 10464e: 83 ec 0c sub $0xc,%esp rtems_filesystem_global_location_obtain( &new_current_loc ); 104651: 8d 45 a4 lea -0x5c(%ebp),%eax ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = 104654: 50 push %eax 104655: e8 c9 15 00 00 call 105c23 10465a: 89 c3 mov %eax,%ebx rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( 10465c: 8b 40 14 mov 0x14(%eax),%eax 10465f: 8b 40 0c mov 0xc(%eax),%eax rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = 104662: 89 1c 24 mov %ebx,(%esp) 104665: ff 50 14 call *0x14(%eax) (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 104668: 83 c4 10 add $0x10,%esp 10466b: 85 c0 test %eax,%eax 10466d: 75 43 jne 1046b2 sc = rtems_libio_set_private_env(); 10466f: e8 93 0b 00 00 call 105207 if (sc == RTEMS_SUCCESSFUL) { 104674: 85 c0 test %eax,%eax 104676: 75 28 jne 1046a0 rtems_filesystem_global_location_assign( 104678: 50 push %eax 104679: 50 push %eax 10467a: 53 push %ebx 10467b: a1 5c 7b 12 00 mov 0x127b5c,%eax 104680: 83 c0 04 add $0x4,%eax 104683: 50 push %eax 104684: e8 7d 15 00 00 call 105c06 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 104689: 5a pop %edx 10468a: 59 pop %ecx 10468b: ff 75 a4 pushl -0x5c(%ebp) 10468e: ff 35 5c 7b 12 00 pushl 0x127b5c 104694: e8 6d 15 00 00 call 105c06 104699: 83 c4 10 add $0x10,%esp 10469c: 31 db xor %ebx,%ebx 10469e: eb 2b jmp 1046cb &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 1046a0: 83 f8 0d cmp $0xd,%eax 1046a3: 74 49 je 1046ee <== NEVER TAKEN errno = ENOMEM; 1046a5: e8 6a 6c 00 00 call 10b314 <__errno> 1046aa: c7 00 0c 00 00 00 movl $0xc,(%eax) 1046b0: eb 3c jmp 1046ee static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 1046b2: 81 7b 10 24 d6 11 00 cmpl $0x11d624,0x10(%ebx) 1046b9: 74 33 je 1046ee <== NEVER TAKEN errno = eno; 1046bb: e8 54 6c 00 00 call 10b314 <__errno> 1046c0: c7 00 14 00 00 00 movl $0x14,(%eax) 1046c6: eb 26 jmp 1046ee if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); } } else { rv = -1; 1046c8: 83 cb ff or $0xffffffff,%ebx } rtems_filesystem_eval_path_cleanup( &ctx ); 1046cb: 83 ec 0c sub $0xc,%esp 1046ce: 8d 45 c0 lea -0x40(%ebp),%eax 1046d1: 50 push %eax 1046d2: e8 86 11 00 00 call 10585d if ( rv != 0 ) { 1046d7: 83 c4 10 add $0x10,%esp 1046da: 85 db test %ebx,%ebx 1046dc: 74 1e je 1046fc rtems_filesystem_global_location_release( new_current_loc ); 1046de: 83 ec 0c sub $0xc,%esp 1046e1: ff 75 a4 pushl -0x5c(%ebp) 1046e4: e8 d8 14 00 00 call 105bc1 1046e9: 83 c4 10 add $0x10,%esp 1046ec: eb 0e jmp 1046fc rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 1046ee: 83 ec 0c sub $0xc,%esp 1046f1: 53 push %ebx 1046f2: e8 ca 14 00 00 call 105bc1 1046f7: 83 c4 10 add $0x10,%esp 1046fa: eb cc jmp 1046c8 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 1046fc: 89 d8 mov %ebx,%eax 1046fe: 8b 5d fc mov -0x4(%ebp),%ebx 104701: c9 leave 104702: c3 ret =============================================================================== 00109a54 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109a54: 55 push %ebp 109a55: 89 e5 mov %esp,%ebp 109a57: 57 push %edi 109a58: 56 push %esi 109a59: 53 push %ebx 109a5a: 83 ec 1c sub $0x1c,%esp 109a5d: 8b 45 08 mov 0x8(%ebp),%eax 109a60: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !tp ) 109a63: 85 db test %ebx,%ebx 109a65: 75 02 jne 109a69 109a67: eb 6c jmp 109ad5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109a69: 83 f8 01 cmp $0x1,%eax 109a6c: 75 3b jne 109aa9 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 109a6e: 83 ec 0c sub $0xc,%esp 109a71: 8d 45 e0 lea -0x20(%ebp),%eax 109a74: 50 push %eax 109a75: e8 ba 1a 00 00 call 10b534 <_TOD_Get_as_timestamp> _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 109a7a: 8b 75 e0 mov -0x20(%ebp),%esi 109a7d: 8b 7d e4 mov -0x1c(%ebp),%edi static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 109a80: 6a 00 push $0x0 109a82: 68 00 ca 9a 3b push $0x3b9aca00 109a87: 57 push %edi 109a88: 56 push %esi 109a89: e8 86 52 01 00 call 11ed14 <__divdi3> 109a8e: 83 c4 10 add $0x10,%esp 109a91: 89 03 mov %eax,(%ebx) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 109a93: 6a 00 push $0x0 109a95: 68 00 ca 9a 3b push $0x3b9aca00 109a9a: 57 push %edi 109a9b: 56 push %esi 109a9c: e8 c7 53 01 00 call 11ee68 <__moddi3> 109aa1: 83 c4 10 add $0x10,%esp 109aa4: 89 43 04 mov %eax,0x4(%ebx) 109aa7: eb 0e jmp 109ab7 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109aa9: 83 f8 04 cmp $0x4,%eax 109aac: 75 10 jne 109abe <== ALWAYS TAKEN _TOD_Get_uptime_as_timespec( tp ); 109aae: 83 ec 0c sub $0xc,%esp 109ab1: 53 push %ebx 109ab2: e8 b5 1a 00 00 call 10b56c <_TOD_Get_uptime_as_timespec> return 0; 109ab7: 83 c4 10 add $0x10,%esp 109aba: 31 c0 xor %eax,%eax 109abc: eb 25 jmp 109ae3 } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 109abe: 83 f8 02 cmp $0x2,%eax 109ac1: 74 eb je 109aae return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 109ac3: 83 f8 03 cmp $0x3,%eax 109ac6: 75 0d jne 109ad5 rtems_set_errno_and_return_minus_one( ENOSYS ); 109ac8: e8 cf 80 00 00 call 111b9c <__errno> 109acd: c7 00 58 00 00 00 movl $0x58,(%eax) 109ad3: eb 0b jmp 109ae0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109ad5: e8 c2 80 00 00 call 111b9c <__errno> 109ada: c7 00 16 00 00 00 movl $0x16,(%eax) 109ae0: 83 c8 ff or $0xffffffff,%eax return 0; } 109ae3: 8d 65 f4 lea -0xc(%ebp),%esp 109ae6: 5b pop %ebx 109ae7: 5e pop %esi 109ae8: 5f pop %edi 109ae9: 5d pop %ebp 109aea: c3 ret =============================================================================== 001233a0 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 1233a0: 55 push %ebp 1233a1: 89 e5 mov %esp,%ebp 1233a3: 53 push %ebx 1233a4: 83 ec 14 sub $0x14,%esp 1233a7: 8b 45 08 mov 0x8(%ebp),%eax 1233aa: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !tp ) 1233ad: 85 c9 test %ecx,%ecx 1233af: 75 02 jne 1233b3 <== ALWAYS TAKEN 1233b1: eb 69 jmp 12341c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 1233b3: 83 f8 01 cmp $0x1,%eax 1233b6: 75 4b jne 123403 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 1233b8: 81 39 ff e4 da 21 cmpl $0x21dae4ff,(%ecx) 1233be: 77 02 ja 1233c2 1233c0: eb 5a jmp 12341c * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 1233c2: a1 fc e1 16 00 mov 0x16e1fc,%eax 1233c7: 40 inc %eax 1233c8: a3 fc e1 16 00 mov %eax,0x16e1fc return _Thread_Dispatch_disable_level; 1233cd: a1 fc e1 16 00 mov 0x16e1fc,%eax Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 1233d2: b8 00 ca 9a 3b mov $0x3b9aca00,%eax 1233d7: f7 29 imull (%ecx) const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 1233d9: 8b 49 04 mov 0x4(%ecx),%ecx 1233dc: 89 cb mov %ecx,%ebx 1233de: c1 fb 1f sar $0x1f,%ebx 1233e1: 01 c8 add %ecx,%eax 1233e3: 11 da adc %ebx,%edx 1233e5: 89 45 f0 mov %eax,-0x10(%ebp) 1233e8: 89 55 f4 mov %edx,-0xc(%ebp) &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 1233eb: 83 ec 0c sub $0xc,%esp 1233ee: 8d 45 f0 lea -0x10(%ebp),%eax 1233f1: 50 push %eax 1233f2: e8 0d 0e 00 00 call 124204 <_TOD_Set_with_timestamp> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 1233f7: e8 78 87 fe ff call 10bb74 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 1233fc: 83 c4 10 add $0x10,%esp 1233ff: 31 c0 xor %eax,%eax 123401: eb 27 jmp 12342a _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 123403: 83 f8 02 cmp $0x2,%eax 123406: 75 02 jne 12340a 123408: eb 05 jmp 12340f rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 12340a: 83 f8 03 cmp $0x3,%eax 12340d: 75 0d jne 12341c rtems_set_errno_and_return_minus_one( ENOSYS ); 12340f: e8 74 da 00 00 call 130e88 <__errno> 123414: c7 00 58 00 00 00 movl $0x58,(%eax) 12341a: eb 0b jmp 123427 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 12341c: e8 67 da 00 00 call 130e88 <__errno> 123421: c7 00 16 00 00 00 movl $0x16,(%eax) 123427: 83 c8 ff or $0xffffffff,%eax return 0; } 12342a: 8b 5d fc mov -0x4(%ebp),%ebx 12342d: c9 leave 12342e: c3 ret =============================================================================== 0010666a : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 10666a: 55 push %ebp 10666b: 89 e5 mov %esp,%ebp 10666d: 57 push %edi 10666e: 56 push %esi 10666f: 53 push %ebx 106670: 83 ec 2c sub $0x2c,%esp 106673: 89 45 d8 mov %eax,-0x28(%ebp) 106676: 89 55 dc mov %edx,-0x24(%ebp) 106679: 89 4d d4 mov %ecx,-0x2c(%ebp) ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 10667c: 89 c6 mov %eax,%esi dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10667e: 89 55 e0 mov %edx,-0x20(%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) { 106681: 8b 3d 9c 1f 13 00 mov 0x131f9c,%edi 106687: 39 f8 cmp %edi,%eax 106689: 72 49 jb 1066d4 rtems_disk_device_table *table = disktab; 10668b: a1 a0 1f 13 00 mov 0x131fa0,%eax rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 106690: 8d 1c 3f lea (%edi,%edi,1),%ebx if (major >= new_size) { 106693: 39 de cmp %ebx,%esi 106695: 72 03 jb 10669a <== NEVER TAKEN new_size = major + 1; 106697: 8d 5e 01 lea 0x1(%esi),%ebx } table = realloc(table, new_size * sizeof(*table)); 10669a: 51 push %ecx 10669b: 51 push %ecx 10669c: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx 1066a3: 52 push %edx 1066a4: 50 push %eax 1066a5: e8 fa 1c 00 00 call 1083a4 1066aa: 89 c2 mov %eax,%edx if (table == NULL) { 1066ac: 83 c4 10 add $0x10,%esp 1066af: 85 c0 test %eax,%eax 1066b1: 0f 84 25 01 00 00 je 1067dc <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 1066b7: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 1066b9: 29 f9 sub %edi,%ecx <== NOT EXECUTED 1066bb: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED 1066be: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED 1066c1: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1066c4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1066c6: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED disktab = table; 1066c8: 89 15 a0 1f 13 00 mov %edx,0x131fa0 <== NOT EXECUTED disktab_size = new_size; 1066ce: 89 1d 9c 1f 13 00 mov %ebx,0x131f9c <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 1066d4: a1 a0 1f 13 00 mov 0x131fa0,%eax 1066d9: 8d 1c f0 lea (%eax,%esi,8),%ebx 1066dc: 8b 03 mov (%ebx),%eax 1066de: 85 c0 test %eax,%eax 1066e0: 74 08 je 1066ea 1066e2: 8b 55 e0 mov -0x20(%ebp),%edx 1066e5: 3b 53 04 cmp 0x4(%ebx),%edx 1066e8: 72 4b jb 106735 rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 1066ea: 8b 7b 04 mov 0x4(%ebx),%edi rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; 1066ed: be 08 00 00 00 mov $0x8,%esi if (disktab [major].minor == NULL || minor >= disktab[major].size) { 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) { 1066f2: 85 ff test %edi,%edi 1066f4: 74 03 je 1066f9 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 1066f6: 8d 34 3f lea (%edi,%edi,1),%esi } if (minor >= new_size) { 1066f9: 39 75 e0 cmp %esi,-0x20(%ebp) 1066fc: 72 04 jb 106702 new_size = minor + 1; 1066fe: 8b 75 e0 mov -0x20(%ebp),%esi 106701: 46 inc %esi } table = realloc(table, new_size * sizeof(*table)); 106702: 52 push %edx 106703: 52 push %edx 106704: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx 10670b: 52 push %edx 10670c: 50 push %eax 10670d: e8 92 1c 00 00 call 1083a4 106712: 89 c2 mov %eax,%edx if (table == NULL) { 106714: 83 c4 10 add $0x10,%esp 106717: 85 c0 test %eax,%eax 106719: 0f 84 bd 00 00 00 je 1067dc return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 10671f: 89 f1 mov %esi,%ecx 106721: 29 f9 sub %edi,%ecx 106723: c1 e1 02 shl $0x2,%ecx 106726: 8d 3c b8 lea (%eax,%edi,4),%edi 106729: 89 7d e4 mov %edi,-0x1c(%ebp) 10672c: 31 c0 xor %eax,%eax 10672e: f3 aa rep stos %al,%es:(%edi) disktab [major].minor = table; 106730: 89 13 mov %edx,(%ebx) disktab [major].size = new_size; 106732: 89 73 04 mov %esi,0x4(%ebx) } return disktab [major].minor + minor; 106735: 8b 03 mov (%ebx),%eax 106737: 8b 55 e0 mov -0x20(%ebp),%edx 10673a: 8d 1c 90 lea (%eax,%edx,4),%ebx { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 10673d: 85 db test %ebx,%ebx 10673f: 75 05 jne 106746 <== ALWAYS TAKEN 106741: e9 96 00 00 00 jmp 1067dc <== NOT EXECUTED return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; 106746: b8 0c 00 00 00 mov $0xc,%eax if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 10674b: 83 3b 00 cmpl $0x0,(%ebx) 10674e: 0f 85 8d 00 00 00 jne 1067e1 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 106754: 83 ec 0c sub $0xc,%esp 106757: 6a 74 push $0x74 106759: e8 e6 11 00 00 call 107944 10675e: 89 c6 mov %eax,%esi if (dd == NULL) { 106760: 83 c4 10 add $0x10,%esp 106763: 85 c0 test %eax,%eax 106765: 74 75 je 1067dc <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 106767: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10676b: 74 3d je 1067aa alloc_name = strdup(name); 10676d: 83 ec 0c sub $0xc,%esp 106770: ff 75 d4 pushl -0x2c(%ebp) 106773: e8 08 ea 00 00 call 115180 106778: 89 c7 mov %eax,%edi if (alloc_name == NULL) { 10677a: 83 c4 10 add $0x10,%esp 10677d: 85 c0 test %eax,%eax 10677f: 75 3b jne 1067bc <== ALWAYS TAKEN free(dd); 106781: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106784: 56 push %esi <== NOT EXECUTED 106785: e8 9a 0d 00 00 call 107524 <== NOT EXECUTED return RTEMS_NO_MEMORY; 10678a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10678d: eb 4d jmp 1067dc <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 10678f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106792: 57 push %edi <== NOT EXECUTED 106793: e8 8c 0d 00 00 call 107524 <== NOT EXECUTED free(dd); 106798: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10679b: e8 84 0d 00 00 call 107524 <== NOT EXECUTED return RTEMS_UNSATISFIED; 1067a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1067a3: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 1067a8: eb 37 jmp 1067e1 <== NOT EXECUTED char **alloc_name_ptr ) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 1067aa: 31 d2 xor %edx,%edx free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 1067ac: 89 33 mov %esi,(%ebx) *dd_ptr = dd; 1067ae: 8b 45 08 mov 0x8(%ebp),%eax 1067b1: 89 30 mov %esi,(%eax) *alloc_name_ptr = alloc_name; 1067b3: 8b 45 0c mov 0xc(%ebp),%eax 1067b6: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 1067b8: 31 c0 xor %eax,%eax 1067ba: eb 25 jmp 1067e1 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 1067bc: ff 75 dc pushl -0x24(%ebp) 1067bf: ff 75 d8 pushl -0x28(%ebp) 1067c2: 68 ff 61 00 00 push $0x61ff 1067c7: 50 push %eax 1067c8: 89 45 d0 mov %eax,-0x30(%ebp) 1067cb: e8 c8 12 00 00 call 107a98 1067d0: 83 c4 10 add $0x10,%esp 1067d3: 85 c0 test %eax,%eax 1067d5: 8b 55 d0 mov -0x30(%ebp),%edx 1067d8: 79 d2 jns 1067ac <== ALWAYS TAKEN 1067da: eb b3 jmp 10678f <== NOT EXECUTED rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; 1067dc: b8 1a 00 00 00 mov $0x1a,%eax *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 1067e1: 8d 65 f4 lea -0xc(%ebp),%esp 1067e4: 5b pop %ebx 1067e5: 5e pop %esi 1067e6: 5f pop %edi 1067e7: 5d pop %ebp 1067e8: c3 ret =============================================================================== 00107766 : * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 107766: 55 push %ebp 107767: 89 e5 mov %esp,%ebp 107769: 57 push %edi 10776a: 56 push %esi 10776b: 53 push %ebx 10776c: 83 ec 14 sub $0x14,%esp 10776f: 89 c6 mov %eax,%esi 107771: 89 d7 mov %edx,%edi if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 107773: c7 02 00 00 00 00 movl $0x0,(%edx) if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 107779: 6a 28 push $0x28 10777b: 6a 01 push $0x1 10777d: e8 3a 0a 00 00 call 1081bc 107782: 89 c3 mov %eax,%ebx 107784: 83 c4 10 add $0x10,%esp 107787: 85 c0 test %eax,%eax 107789: 74 4e je 1077d9 <== NEVER TAKEN { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 10778b: 8a 06 mov (%esi),%al 10778d: 88 03 mov %al,(%ebx) part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 10778f: 0f b6 46 04 movzbl 0x4(%esi),%eax 107793: 88 43 01 mov %al,0x1(%ebx) /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 107796: 8b 56 08 mov 0x8(%esi),%edx part_desc->start = LE_TO_CPU_U32(temp); 107799: 89 53 04 mov %edx,0x4(%ebx) memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 10779c: 8b 76 0c mov 0xc(%esi),%esi part_desc->size = LE_TO_CPU_U32(temp); 10779f: 89 73 08 mov %esi,0x8(%ebx) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 1077a2: 88 c2 mov %al,%dl 1077a4: 83 e2 7f and $0x7f,%edx * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 1077a7: 80 fa 05 cmp $0x5,%dl 1077aa: 74 19 je 1077c5 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 1077ac: 52 push %edx 1077ad: 6a 06 push $0x6 1077af: 50 push %eax 1077b0: 68 90 38 12 00 push $0x123890 1077b5: e8 d6 e1 00 00 call 115990 1077ba: 83 c4 10 add $0x10,%esp * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 1077bd: 85 c0 test %eax,%eax 1077bf: 74 08 je 1077c9 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 1077c1: 85 f6 test %esi,%esi 1077c3: 74 04 je 1077c9 <== NEVER TAKEN *new_part_desc = part_desc; 1077c5: 89 1f mov %ebx,(%edi) 1077c7: eb 0c jmp 1077d5 } else { /* empty partition */ free(part_desc); 1077c9: 83 ec 0c sub $0xc,%esp 1077cc: 53 push %ebx 1077cd: e8 56 0c 00 00 call 108428 1077d2: 83 c4 10 add $0x10,%esp } return RTEMS_SUCCESSFUL; 1077d5: 31 c0 xor %eax,%eax 1077d7: eb 05 jmp 1077de *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; 1077d9: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } 1077de: 8d 65 f4 lea -0xc(%ebp),%esp 1077e1: 5b pop %ebx 1077e2: 5e pop %esi 1077e3: 5f pop %edi 1077e4: 5d pop %ebp 1077e5: c3 ret =============================================================================== 00105e08 : #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 105e08: a1 14 91 12 00 mov 0x129114,%eax if (rootloc->mt_entry->ops == &devFS_ops) { 105e0d: 8b 40 04 mov 0x4(%eax),%eax 105e10: 8b 40 14 mov 0x14(%eax),%eax 105e13: 81 78 0c 10 d6 11 00 cmpl $0x11d610,0xc(%eax) 105e1a: 75 77 jne 105e93 <== NEVER TAKEN #endif #include "devfs.h" void devFS_Show(void) { 105e1c: 55 push %ebp 105e1d: 89 e5 mov %esp,%ebp 105e1f: 57 push %edi 105e20: 56 push %esi 105e21: 53 push %ebx 105e22: 83 ec 1c sub $0x1c,%esp static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 105e25: 8b 40 10 mov 0x10(%eax),%eax rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 105e28: 8b 50 04 mov 0x4(%eax),%edx 105e2b: 89 55 e4 mov %edx,-0x1c(%ebp) 105e2e: 8b 30 mov (%eax),%esi devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 105e30: 31 db xor %ebx,%ebx 105e32: eb 53 jmp 105e87 devFS_node *current = nodes + i; if (current->name != NULL) { 105e34: 83 3e 00 cmpl $0x0,(%esi) 105e37: 74 4a je 105e83 <== NEVER TAKEN size_t j = 0; size_t m = current->namelen; 105e39: 8b 46 04 mov 0x4(%esi),%eax 105e3c: 89 45 e0 mov %eax,-0x20(%ebp) printk("/"); 105e3f: 83 ec 0c sub $0xc,%esp 105e42: 68 64 d6 11 00 push $0x11d664 105e47: e8 60 10 00 00 call 106eac for (j = 0; j < m; ++j) { 105e4c: 83 c4 10 add $0x10,%esp 105e4f: 31 ff xor %edi,%edi 105e51: eb 17 jmp 105e6a printk("%c", current->name [j]); 105e53: 52 push %edx 105e54: 52 push %edx 105e55: 8b 0e mov (%esi),%ecx 105e57: 0f be 0c 39 movsbl (%ecx,%edi,1),%ecx 105e5b: 51 push %ecx 105e5c: 68 66 d6 11 00 push $0x11d666 105e61: e8 46 10 00 00 call 106eac if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 105e66: 47 inc %edi 105e67: 83 c4 10 add $0x10,%esp 105e6a: 3b 7d e0 cmp -0x20(%ebp),%edi 105e6d: 75 e4 jne 105e53 printk("%c", current->name [j]); } printk( 105e6f: 50 push %eax 105e70: ff 76 0c pushl 0xc(%esi) 105e73: ff 76 08 pushl 0x8(%esi) 105e76: 68 69 d6 11 00 push $0x11d669 105e7b: e8 2c 10 00 00 call 106eac 105e80: 83 c4 10 add $0x10,%esp const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 105e83: 43 inc %ebx 105e84: 83 c6 14 add $0x14,%esi 105e87: 3b 5d e4 cmp -0x1c(%ebp),%ebx 105e8a: 75 a8 jne 105e34 (unsigned long) current->minor ); } } } } 105e8c: 8d 65 f4 lea -0xc(%ebp),%esp 105e8f: 5b pop %ebx 105e90: 5e pop %esi 105e91: 5f pop %edi 105e92: 5d pop %ebp 105e93: c3 ret =============================================================================== 0010da90 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 10da90: 55 push %ebp 10da91: 89 e5 mov %esp,%ebp 10da93: 57 push %edi 10da94: 56 push %esi 10da95: 53 push %ebx 10da96: 83 ec 2c sub $0x2c,%esp 10da99: 8b 5d 08 mov 0x8(%ebp),%ebx } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 10da9c: 8b 53 04 mov 0x4(%ebx),%edx 10da9f: 8b 0b mov (%ebx),%ecx 10daa1: 89 4d e0 mov %ecx,-0x20(%ebp) static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 10daa4: 8b 43 2c mov 0x2c(%ebx),%eax 10daa7: 8b 40 10 mov 0x10(%eax),%eax size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 10daaa: 8b 48 04 mov 0x4(%eax),%ecx 10daad: 89 4d d8 mov %ecx,-0x28(%ebp) 10dab0: 8b 30 mov (%eax),%esi devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; 10dab2: 31 c0 xor %eax,%eax ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 10dab4: 31 ff xor %edi,%edi devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 10dab6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10dabd: eb 34 jmp 10daf3 devFS_node *current = nodes + i; 10dabf: 89 75 dc mov %esi,-0x24(%ebp) if (current->name != NULL) { 10dac2: 8b 0e mov (%esi),%ecx 10dac4: 85 c9 test %ecx,%ecx 10dac6: 74 22 je 10daea if ( 10dac8: 89 45 dc mov %eax,-0x24(%ebp) 10dacb: 39 56 04 cmp %edx,0x4(%esi) 10dace: 75 1a jne 10daea current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 10dad0: 50 push %eax 10dad1: 52 push %edx 10dad2: ff 75 e0 pushl -0x20(%ebp) 10dad5: 51 push %ecx 10dad6: 89 55 d4 mov %edx,-0x2c(%ebp) 10dad9: e8 6a 34 00 00 call 110f48 10dade: 83 c4 10 add $0x10,%esp 10dae1: 85 c0 test %eax,%eax 10dae3: 8b 55 d4 mov -0x2c(%ebp),%edx 10dae6: 75 02 jne 10daea 10dae8: 89 f7 mov %esi,%edi size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 10daea: ff 45 e4 incl -0x1c(%ebp) 10daed: 83 c6 14 add $0x14,%esi 10daf0: 8b 45 dc mov -0x24(%ebp),%eax 10daf3: 85 ff test %edi,%edi 10daf5: 74 0d je 10db04 10daf7: 85 c0 test %eax,%eax 10daf9: 74 09 je 10db04 <== ALWAYS TAKEN } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 10dafb: 8b 4b 10 mov 0x10(%ebx),%ecx rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 10dafe: 85 ff test %edi,%edi 10db00: 75 0c jne 10db0e 10db02: eb 1a jmp 10db1e size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 10db04: 8b 4d d8 mov -0x28(%ebp),%ecx 10db07: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10db0a: 75 b3 jne 10dabf 10db0c: eb ed jmp 10dafb &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 10db0e: 80 e1 40 and $0x40,%cl 10db11: 75 05 jne 10db18 <== NEVER TAKEN currentloc->node_access = node; 10db13: 89 7b 20 mov %edi,0x20(%ebx) 10db16: eb 22 jmp 10db3a rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 10db18: 51 push %ecx <== NOT EXECUTED 10db19: 51 push %ecx <== NOT EXECUTED 10db1a: 6a 11 push $0x11 <== NOT EXECUTED 10db1c: eb 2f jmp 10db4d <== NOT EXECUTED } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 10db1e: 80 e1 20 and $0x20,%cl 10db21: 74 26 je 10db49 <== NEVER TAKEN if (free_node != NULL) { 10db23: 85 c0 test %eax,%eax 10db25: 74 1c je 10db43 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 10db27: c7 40 10 ff 01 00 00 movl $0x1ff,0x10(%eax) currentloc->node_access = free_node; 10db2e: 89 43 20 mov %eax,0x20(%ebx) rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 10db31: 8b 4d e0 mov -0x20(%ebp),%ecx 10db34: 89 4b 08 mov %ecx,0x8(%ebx) ctx->tokenlen = tokenlen; 10db37: 89 53 0c mov %edx,0xc(%ebx) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 10db3a: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 10db41: eb 13 jmp 10db56 rtems_filesystem_eval_path_get_path(ctx), rtems_filesystem_eval_path_get_pathlen(ctx) ); rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); 10db43: 52 push %edx 10db44: 52 push %edx 10db45: 6a 1c push $0x1c 10db47: eb 04 jmp 10db4d } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 10db49: 50 push %eax <== NOT EXECUTED 10db4a: 50 push %eax <== NOT EXECUTED 10db4b: 6a 02 push $0x2 <== NOT EXECUTED 10db4d: 53 push %ebx 10db4e: e8 f7 a0 ff ff call 107c4a 10db53: 83 c4 10 add $0x10,%esp } } } 10db56: 8d 65 f4 lea -0xc(%ebp),%esp 10db59: 5b pop %ebx 10db5a: 5e pop %esi 10db5b: 5f pop %edi 10db5c: 5d pop %ebp 10db5d: c3 ret =============================================================================== 00106884 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 106884: 55 push %ebp 106885: 89 e5 mov %esp,%ebp 106887: 57 push %edi 106888: 56 push %esi 106889: 53 push %ebx 10688a: 83 ec 1c sub $0x1c,%esp 10688d: 8b 75 0c mov 0xc(%ebp),%esi 106890: 8b 4d 10 mov 0x10(%ebp),%ecx 106893: 8b 7d 18 mov 0x18(%ebp),%edi 106896: 8b 5d 1c mov 0x1c(%ebp),%ebx int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 106899: 83 f9 03 cmp $0x3,%ecx 10689c: 75 11 jne 1068af 10689e: 80 3e 64 cmpb $0x64,(%esi) 1068a1: 75 0c jne 1068af <== NEVER TAKEN 1068a3: 80 7e 01 65 cmpb $0x65,0x1(%esi) 1068a7: 75 06 jne 1068af <== NEVER TAKEN 1068a9: 80 7e 02 76 cmpb $0x76,0x2(%esi) 1068ad: 74 51 je 106900 <== ALWAYS TAKEN if (S_ISBLK(mode) || S_ISCHR(mode)) { 1068af: 8b 45 14 mov 0x14(%ebp),%eax 1068b2: 25 00 b0 00 00 and $0xb000,%eax 1068b7: 3d 00 20 00 00 cmp $0x2000,%eax 1068bc: 75 55 jne 106913 char *dupname = malloc(namelen); 1068be: 83 ec 0c sub $0xc,%esp 1068c1: 51 push %ecx 1068c2: 89 4d e4 mov %ecx,-0x1c(%ebp) 1068c5: e8 3e 06 00 00 call 106f08 if (dupname != NULL) { 1068ca: 83 c4 10 add $0x10,%esp 1068cd: 85 c0 test %eax,%eax 1068cf: 8b 4d e4 mov -0x1c(%ebp),%ecx 1068d2: 74 1f je 1068f3 <== NEVER TAKEN devFS_node *node = parentloc->node_access; 1068d4: 8b 55 08 mov 0x8(%ebp),%edx 1068d7: 8b 52 08 mov 0x8(%edx),%edx node->name = dupname; 1068da: 89 02 mov %eax,(%edx) node->namelen = namelen; 1068dc: 89 4a 04 mov %ecx,0x4(%edx) node->major = rtems_filesystem_dev_major_t(dev); 1068df: 89 7a 08 mov %edi,0x8(%edx) node->minor = rtems_filesystem_dev_minor_t(dev); 1068e2: 89 5a 0c mov %ebx,0xc(%edx) node->mode = mode; 1068e5: 8b 5d 14 mov 0x14(%ebp),%ebx 1068e8: 89 5a 10 mov %ebx,0x10(%edx) memcpy(dupname, name, namelen); 1068eb: 89 c7 mov %eax,%edi 1068ed: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 1068ef: 31 c0 xor %eax,%eax 1068f1: eb 2e jmp 106921 node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; 1068f3: e8 80 98 00 00 call 110178 <__errno> <== NOT EXECUTED 1068f8: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1068fe: eb 1e jmp 10691e <== NOT EXECUTED } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 106900: 8b 55 14 mov 0x14(%ebp),%edx 106903: 81 e2 00 f0 00 00 and $0xf000,%edx size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 106909: 31 c0 xor %eax,%eax } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 10690b: 81 fa 00 40 00 00 cmp $0x4000,%edx 106911: 74 0e je 106921 <== ALWAYS TAKEN errno = ENOTSUP; 106913: e8 60 98 00 00 call 110178 <__errno> 106918: c7 00 86 00 00 00 movl $0x86,(%eax) rv = -1; 10691e: 83 c8 ff or $0xffffffff,%eax } } return rv; } 106921: 8d 65 f4 lea -0xc(%ebp),%esp 106924: 5b pop %ebx 106925: 5e pop %esi 106926: 5f pop %edi 106927: 5d pop %ebp 106928: c3 ret =============================================================================== 0010697c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10697c: 55 push %ebp <== NOT EXECUTED 10697d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10697f: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 106982: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED const devFS_node *np = iop->pathinfo.node_access; 106985: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED return rtems_deviceio_read( iop, buffer, count, np->major, np->minor ); 106988: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 10698b: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 10698e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 106991: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 106994: 50 push %eax <== NOT EXECUTED 106995: e8 72 11 00 00 call 107b0c <== NOT EXECUTED } 10699a: c9 leave <== NOT EXECUTED 10699b: c3 ret <== NOT EXECUTED =============================================================================== 0010660e : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 10660e: 55 push %ebp 10660f: 89 e5 mov %esp,%ebp 106611: 83 ec 0c sub $0xc,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 106614: 6a 00 push $0x0 106616: 6a 00 push $0x0 106618: ff 35 98 1f 13 00 pushl 0x131f98 10661e: e8 11 47 00 00 call 10ad34 if (sc == RTEMS_SUCCESSFUL) { 106623: 83 c4 10 add $0x10,%esp diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; 106626: ba 16 00 00 00 mov $0x16,%edx disk_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { 10662b: 85 c0 test %eax,%eax 10662d: 75 09 jne 106638 <== NEVER TAKEN diskdevs_protected = true; 10662f: c6 05 94 1f 13 00 01 movb $0x1,0x131f94 return RTEMS_SUCCESSFUL; 106636: 30 d2 xor %dl,%dl } else { return RTEMS_NOT_CONFIGURED; } } 106638: 89 d0 mov %edx,%eax 10663a: c9 leave 10663b: c3 ret =============================================================================== 0010663c : static void disk_unlock(void) { 10663c: 55 push %ebp 10663d: 89 e5 mov %esp,%ebp 10663f: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 106642: c6 05 94 1f 13 00 00 movb $0x0,0x131f94 sc = rtems_semaphore_release(diskdevs_mutex); 106649: ff 35 98 1f 13 00 pushl 0x131f98 10664f: e8 d0 47 00 00 call 10ae24 if (sc != RTEMS_SUCCESSFUL) { 106654: 83 c4 10 add $0x10,%esp 106657: 85 c0 test %eax,%eax 106659: 74 0d je 106668 <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 10665b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10665e: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 106663: e8 a8 4c 00 00 call 10b310 <== NOT EXECUTED } } 106668: c9 leave 106669: c3 ret =============================================================================== 00107fa6 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 107fa6: 55 push %ebp 107fa7: 89 e5 mov %esp,%ebp 107fa9: 53 push %ebx 107faa: 52 push %edx 107fab: 89 c3 mov %eax,%ebx 107fad: eb 2c jmp 107fdb rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 107faf: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 107fb6: 00 00 00 rtems_interrupt_enable (level); 107fb9: 50 push %eax 107fba: 9d popf sc = rtems_semaphore_obtain( 107fbb: 50 push %eax 107fbc: 6a 00 push $0x0 107fbe: 6a 00 push $0x0 107fc0: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 107fc6: e8 c5 1d 00 00 call 109d90 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 107fcb: 83 c4 10 add $0x10,%esp 107fce: 85 c0 test %eax,%eax 107fd0: 74 09 je 107fdb <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 107fd2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107fd5: 50 push %eax <== NOT EXECUTED 107fd6: e8 d9 23 00 00 call 10a3b4 <== NOT EXECUTED rtems_interrupt_disable (level); 107fdb: 9c pushf 107fdc: fa cli 107fdd: 58 pop %eax rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 107fde: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 107fe4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 107fea: 39 d1 cmp %edx,%ecx 107fec: 75 c1 jne 107faf tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 107fee: 50 push %eax 107fef: 9d popf } } 107ff0: 8b 5d fc mov -0x4(%ebp),%ebx 107ff3: c9 leave 107ff4: c3 ret =============================================================================== 00106bac : int dup2( int fildes, int fildes2 ) { 106bac: 55 push %ebp 106bad: 89 e5 mov %esp,%ebp 106baf: 57 push %edi 106bb0: 56 push %esi 106bb1: 53 push %ebx 106bb2: 83 ec 64 sub $0x64,%esp 106bb5: 8b 5d 08 mov 0x8(%ebp),%ebx 106bb8: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 106bbb: 8d 7d a0 lea -0x60(%ebp),%edi 106bbe: 57 push %edi 106bbf: 53 push %ebx 106bc0: e8 eb 04 00 00 call 1070b0 if ( status == -1 ) 106bc5: 83 c4 10 add $0x10,%esp 106bc8: 40 inc %eax 106bc9: 75 05 jne 106bd0 return -1; 106bcb: 83 c8 ff or $0xffffffff,%eax 106bce: eb 1c jmp 106bec /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 106bd0: 52 push %edx 106bd1: 52 push %edx 106bd2: 57 push %edi 106bd3: 56 push %esi 106bd4: e8 d7 04 00 00 call 1070b0 if ( status == -1 ) 106bd9: 83 c4 10 add $0x10,%esp 106bdc: 40 inc %eax 106bdd: 74 ec je 106bcb <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 106bdf: 50 push %eax 106be0: 56 push %esi 106be1: 6a 00 push $0x0 106be3: 53 push %ebx 106be4: e8 eb 01 00 00 call 106dd4 106be9: 83 c4 10 add $0x10,%esp } 106bec: 8d 65 f4 lea -0xc(%ebp),%esp 106bef: 5b pop %ebx 106bf0: 5e pop %esi 106bf1: 5f pop %edi 106bf2: 5d pop %ebp 106bf3: c3 ret =============================================================================== 00108ae8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108ae8: 55 push %ebp 108ae9: 89 e5 mov %esp,%ebp 108aeb: 53 push %ebx 108aec: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 108aef: f6 42 3d 02 testb $0x2,0x3d(%edx) 108af3: 74 3e je 108b33 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 108af5: 0f b6 c8 movzbl %al,%ecx * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 108af8: 8b 1d 88 c2 12 00 mov 0x12c288,%ebx 108afe: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 108b03: 74 2e je 108b33 iscntrl(c) && (c != '\t') && (c != '\n')) { 108b05: 8d 48 f7 lea -0x9(%eax),%ecx 108b08: 80 f9 01 cmp $0x1,%cl 108b0b: 76 26 jbe 108b33 char echobuf[2]; echobuf[0] = '^'; 108b0d: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 108b11: 83 f0 40 xor $0x40,%eax 108b14: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 108b17: 53 push %ebx 108b18: 52 push %edx 108b19: 6a 02 push $0x2 108b1b: 8d 45 f6 lea -0xa(%ebp),%eax 108b1e: 50 push %eax 108b1f: 89 55 e4 mov %edx,-0x1c(%ebp) 108b22: e8 9e fd ff ff call 1088c5 tty->column += 2; 108b27: 8b 55 e4 mov -0x1c(%ebp),%edx 108b2a: 83 42 28 02 addl $0x2,0x28(%edx) 108b2e: 83 c4 10 add $0x10,%esp 108b31: eb 08 jmp 108b3b } else { oproc (c, tty); 108b33: 0f b6 c0 movzbl %al,%eax 108b36: e8 96 fe ff ff call 1089d1 } } 108b3b: 8b 5d fc mov -0x4(%ebp),%ebx 108b3e: c9 leave 108b3f: c3 ret =============================================================================== 00122635 : void endgrent(void) { if (group_fp != NULL) 122635: a1 20 dc 16 00 mov 0x16dc20,%eax 12263a: 85 c0 test %eax,%eax 12263c: 74 10 je 12264e <== NEVER TAKEN fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 12263e: 55 push %ebp 12263f: 89 e5 mov %esp,%ebp 122641: 83 ec 14 sub $0x14,%esp if (group_fp != NULL) fclose(group_fp); 122644: 50 push %eax 122645: e8 5a e9 00 00 call 130fa4 12264a: 83 c4 10 add $0x10,%esp } 12264d: c9 leave 12264e: c3 ret =============================================================================== 001224f7 : void endpwent(void) { if (passwd_fp != NULL) 1224f7: a1 44 db 16 00 mov 0x16db44,%eax 1224fc: 85 c0 test %eax,%eax 1224fe: 74 10 je 122510 <== NEVER TAKEN fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 122500: 55 push %ebp 122501: 89 e5 mov %esp,%ebp 122503: 83 ec 14 sub $0x14,%esp if (passwd_fp != NULL) fclose(passwd_fp); 122506: 50 push %eax 122507: e8 98 ea 00 00 call 130fa4 12250c: 83 c4 10 add $0x10,%esp } 12250f: c9 leave 122510: c3 ret =============================================================================== 00108b40 : * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108b40: 55 push %ebp 108b41: 89 e5 mov %esp,%ebp 108b43: 57 push %edi 108b44: 56 push %esi 108b45: 53 push %ebx 108b46: 83 ec 2c sub $0x2c,%esp 108b49: 89 c3 mov %eax,%ebx 108b4b: 89 55 e4 mov %edx,-0x1c(%ebp) 108b4e: e9 09 01 00 00 jmp 108c5c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108b53: 8b 53 1c mov 0x1c(%ebx),%edx 108b56: 89 55 d4 mov %edx,-0x2c(%ebp) 108b59: 8d 50 ff lea -0x1(%eax),%edx 108b5c: 89 53 20 mov %edx,0x20(%ebx) 108b5f: 8b 75 d4 mov -0x2c(%ebp),%esi 108b62: 8a 4c 06 ff mov -0x1(%esi,%eax,1),%cl if (tty->termios.c_lflag & ECHO) { 108b66: 8b 53 3c mov 0x3c(%ebx),%edx 108b69: f6 c2 08 test $0x8,%dl 108b6c: 0f 84 e4 00 00 00 je 108c56 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108b72: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 108b76: 75 17 jne 108b8f 108b78: f6 c2 10 test $0x10,%dl 108b7b: 75 12 jne 108b8f <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 108b7d: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108b81: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108b83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108b86: 5b pop %ebx <== NOT EXECUTED 108b87: 5e pop %esi <== NOT EXECUTED 108b88: 5f pop %edi <== NOT EXECUTED 108b89: 5d pop %ebp <== 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); 108b8a: e9 59 ff ff ff jmp 108ae8 <== NOT EXECUTED } else if (c == '\t') { 108b8f: 80 f9 09 cmp $0x9,%cl 108b92: 8b 3d 88 c2 12 00 mov 0x12c288,%edi 108b98: 89 7d e0 mov %edi,-0x20(%ebp) 108b9b: 75 5d jne 108bfa int col = tty->read_start_column; 108b9d: 8b 73 2c mov 0x2c(%ebx),%esi * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108ba0: b9 01 00 00 00 mov $0x1,%ecx while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108ba5: 81 e2 00 02 00 00 and $0x200,%edx 108bab: 89 55 dc mov %edx,-0x24(%ebp) 108bae: eb 29 jmp 108bd9 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 108bb0: 8b 7d d4 mov -0x2c(%ebp),%edi 108bb3: 0f b6 54 0f ff movzbl -0x1(%edi,%ecx,1),%edx if (c == '\t') { 108bb8: 80 fa 09 cmp $0x9,%dl 108bbb: 75 05 jne 108bc2 col = (col | 7) + 1; 108bbd: 83 ce 07 or $0x7,%esi 108bc0: eb 15 jmp 108bd7 } else if (iscntrl (c)) { 108bc2: 8b 7d e0 mov -0x20(%ebp),%edi 108bc5: f6 44 17 01 20 testb $0x20,0x1(%edi,%edx,1) 108bca: 74 0b je 108bd7 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 108bcc: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED 108bd0: 74 06 je 108bd8 <== NOT EXECUTED col += 2; 108bd2: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108bd5: eb 01 jmp 108bd8 <== NOT EXECUTED } else { col++; 108bd7: 46 inc %esi 108bd8: 41 inc %ecx int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108bd9: 39 c1 cmp %eax,%ecx 108bdb: 75 d3 jne 108bb0 108bdd: eb 14 jmp 108bf3 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108bdf: 50 push %eax 108be0: 53 push %ebx 108be1: 6a 01 push $0x1 108be3: 68 18 fa 11 00 push $0x11fa18 108be8: e8 d8 fc ff ff call 1088c5 tty->column--; 108bed: ff 4b 28 decl 0x28(%ebx) 108bf0: 83 c4 10 add $0x10,%esp } /* * Back up over the tab */ while (tty->column > col) { 108bf3: 39 73 28 cmp %esi,0x28(%ebx) 108bf6: 7f e7 jg 108bdf 108bf8: eb 5c jmp 108c56 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108bfa: 0f b6 f1 movzbl %cl,%esi 108bfd: 8b 45 e0 mov -0x20(%ebp),%eax 108c00: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) 108c05: 74 21 je 108c28 <== ALWAYS TAKEN 108c07: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 108c0a: 74 1c je 108c28 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108c0c: 57 push %edi <== NOT EXECUTED 108c0d: 53 push %ebx <== NOT EXECUTED 108c0e: 6a 03 push $0x3 <== NOT EXECUTED 108c10: 68 16 fa 11 00 push $0x11fa16 <== NOT EXECUTED 108c15: e8 ab fc ff ff call 1088c5 <== NOT EXECUTED if (tty->column) 108c1a: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108c1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108c20: 85 c0 test %eax,%eax <== NOT EXECUTED 108c22: 74 04 je 108c28 <== NOT EXECUTED tty->column--; 108c24: 48 dec %eax <== NOT EXECUTED 108c25: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108c28: a1 88 c2 12 00 mov 0x12c288,%eax 108c2d: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) 108c32: 74 06 je 108c3a <== ALWAYS TAKEN 108c34: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108c38: 74 1c je 108c56 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108c3a: 56 push %esi 108c3b: 53 push %ebx 108c3c: 6a 03 push $0x3 108c3e: 68 16 fa 11 00 push $0x11fa16 108c43: e8 7d fc ff ff call 1088c5 if (tty->column) 108c48: 8b 43 28 mov 0x28(%ebx),%eax 108c4b: 83 c4 10 add $0x10,%esp 108c4e: 85 c0 test %eax,%eax 108c50: 74 04 je 108c56 <== NEVER TAKEN tty->column--; 108c52: 48 dec %eax 108c53: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 108c56: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 108c5a: 74 0b je 108c67 echo ('\n', tty); return; } } while (tty->ccount) { 108c5c: 8b 43 20 mov 0x20(%ebx),%eax 108c5f: 85 c0 test %eax,%eax 108c61: 0f 85 ec fe ff ff jne 108b53 } } if (!lineFlag) break; } } 108c67: 8d 65 f4 lea -0xc(%ebp),%esp 108c6a: 5b pop %ebx 108c6b: 5e pop %esi 108c6c: 5f pop %edi 108c6d: 5d pop %ebp 108c6e: c3 ret =============================================================================== 001076e7 : size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { 1076e7: 55 push %ebp 1076e8: 89 e5 mov %esp,%ebp 1076ea: 57 push %edi 1076eb: 56 push %esi 1076ec: 53 push %ebx 1076ed: 83 ec 2c sub $0x2c,%esp 1076f0: 89 c3 mov %eax,%ebx 1076f2: 89 ce mov %ecx,%esi memset(ctx, 0, sizeof(*ctx)); 1076f4: b9 0e 00 00 00 mov $0xe,%ecx 1076f9: 31 c0 xor %eax,%eax 1076fb: 89 df mov %ebx,%edi 1076fd: f3 ab rep stos %eax,%es:(%edi) ctx->path = path; 1076ff: 89 13 mov %edx,(%ebx) ctx->pathlen = pathlen; 107701: 89 73 04 mov %esi,0x4(%ebx) ctx->flags = eval_flags; 107704: 8b 45 08 mov 0x8(%ebp),%eax 107707: 89 43 10 mov %eax,0x10(%ebx) rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { if (ctx->pathlen > 0) { 10770a: 85 f6 test %esi,%esi 10770c: 74 41 je 10774f char c = ctx->path [0]; 10770e: 8a 12 mov (%edx),%dl ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); 107710: 83 ec 0c sub $0xc,%esp 107713: ff 75 0c pushl 0xc(%ebp) 107716: 88 55 d4 mov %dl,-0x2c(%ebp) 107719: e8 0d 05 00 00 call 107c2b 10771e: 89 43 30 mov %eax,0x30(%ebx) gid_t node_gid ); static inline bool rtems_filesystem_is_delimiter(char c) { return c == '/' || c == '\\'; 107721: 83 c4 10 add $0x10,%esp if (rtems_filesystem_is_delimiter(c)) { 107724: 8a 55 d4 mov -0x2c(%ebp),%dl 107727: 80 fa 5c cmp $0x5c,%dl 10772a: 74 05 je 107731 <== NEVER TAKEN 10772c: 80 fa 2f cmp $0x2f,%dl 10772f: 75 0e jne 10773f ++ctx->path; 107731: ff 03 incl (%ebx) --ctx->pathlen; 107733: ff 4b 04 decl 0x4(%ebx) ctx->startloc = rtems_filesystem_global_location_obtain( 107736: 83 ec 0c sub $0xc,%esp &ctx->rootloc 107739: 8d 43 30 lea 0x30(%ebx),%eax ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; --ctx->pathlen; ctx->startloc = rtems_filesystem_global_location_obtain( 10773c: 50 push %eax 10773d: eb 06 jmp 107745 &ctx->rootloc ); } else { ctx->startloc = rtems_filesystem_global_location_obtain( 10773f: 83 ec 0c sub $0xc,%esp 107742: ff 75 10 pushl 0x10(%ebp) 107745: e8 e1 04 00 00 call 107c2b 10774a: 89 43 34 mov %eax,0x34(%ebx) 10774d: eb 33 jmp 107782 ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; 10774f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) return rtems_filesystem_global_location_obtain( &global_loc ); 107756: 83 ec 0c sub $0xc,%esp 107759: 8d 75 e4 lea -0x1c(%ebp),%esi 10775c: 56 push %esi 10775d: e8 c9 04 00 00 call 107c2b global_current_ptr ); } } else { ctx->rootloc = rtems_filesystem_global_location_obtain_null(); 107762: 89 43 30 mov %eax,0x30(%ebx) ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; 107765: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) return rtems_filesystem_global_location_obtain( &global_loc ); 10776c: 89 34 24 mov %esi,(%esp) 10776f: e8 b7 04 00 00 call 107c2b ctx->startloc = rtems_filesystem_global_location_obtain_null(); 107774: 89 43 34 mov %eax,0x34(%ebx) errno = ENOENT; 107777: e8 60 97 00 00 call 110edc <__errno> 10777c: c7 00 02 00 00 00 movl $0x2,(%eax) &ctx->startloc, rtems_filesystem_global_location_obtain(newstartloc_ptr) ); rtems_filesystem_instance_lock(&ctx->startloc->location); rtems_filesystem_location_clone(&ctx->currentloc, &ctx->startloc->location); } 107782: 8b 43 34 mov 0x34(%ebx),%eax 107785: 8b 40 14 mov 0x14(%eax),%eax const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 107788: 8b 50 0c mov 0xc(%eax),%edx 10778b: 89 04 24 mov %eax,(%esp) 10778e: ff 12 call *(%edx) set_startloc(ctx, global_root_ptr, global_current_ptr); rtems_filesystem_instance_lock(&ctx->startloc->location); rtems_filesystem_location_clone( 107790: 8d 73 18 lea 0x18(%ebx),%esi 107793: 5f pop %edi 107794: 58 pop %eax 107795: ff 73 34 pushl 0x34(%ebx) 107798: 56 push %esi 107799: e8 aa 61 00 00 call 10d948 &ctx->currentloc, &ctx->startloc->location ); rtems_filesystem_eval_path_continue(ctx); 10779e: 89 1c 24 mov %ebx,(%esp) 1077a1: e8 e5 fe ff ff call 10768b return &ctx->currentloc; } 1077a6: 89 f0 mov %esi,%eax 1077a8: 8d 65 f4 lea -0xc(%ebp),%esp 1077ab: 5b pop %ebx 1077ac: 5e pop %esi 1077ad: 5f pop %edi 1077ae: 5d pop %ebp 1077af: c3 ret =============================================================================== 00112204 : #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) { 112204: 55 push %ebp 112205: 89 e5 mov %esp,%ebp 112207: 57 push %edi 112208: 56 push %esi 112209: 53 push %ebx 11220a: 83 ec 2c sub $0x2c,%esp 11220d: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 112210: 80 7b 7d 00 cmpb $0x0,0x7d(%ebx) 112214: 75 42 jne 112258 { if (op_type == FAT_OP_TYPE_READ) 112216: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 11221a: 8d 83 80 00 00 00 lea 0x80(%ebx),%eax 112220: 75 0f jne 112231 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 112222: 52 push %edx 112223: 50 push %eax 112224: ff 75 0c pushl 0xc(%ebp) 112227: ff 73 58 pushl 0x58(%ebx) 11222a: e8 e2 eb ff ff call 110e11 11222f: eb 0d jmp 11223e else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 112231: 57 push %edi 112232: 50 push %eax 112233: ff 75 0c pushl 0xc(%ebp) 112236: ff 73 58 pushl 0x58(%ebx) 112239: e8 37 eb ff ff call 110d75 11223e: 83 c4 10 add $0x10,%esp if (sc != RTEMS_SUCCESSFUL) 112241: 85 c0 test %eax,%eax 112243: 74 05 je 11224a <== ALWAYS TAKEN 112245: e9 40 01 00 00 jmp 11238a <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 11224a: 8b 45 0c mov 0xc(%ebp),%eax 11224d: 89 43 78 mov %eax,0x78(%ebx) fs_info->c.modified = 0; 112250: c6 43 7c 00 movb $0x0,0x7c(%ebx) fs_info->c.state = FAT_CACHE_ACTUAL; 112254: c6 43 7d 01 movb $0x1,0x7d(%ebx) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 112258: 8b 43 78 mov 0x78(%ebx),%eax 11225b: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 11225f: 31 d2 xor %edx,%edx 112261: 39 c8 cmp %ecx,%eax 112263: 72 08 jb 11226d <== NEVER TAKEN 112265: 31 d2 xor %edx,%edx 112267: 3b 43 1c cmp 0x1c(%ebx),%eax 11226a: 0f 92 c2 setb %dl (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 11226d: 3b 45 0c cmp 0xc(%ebp),%eax 112270: 0f 84 2e 01 00 00 je 1123a4 { if (fs_info->c.modified) 112276: 80 7b 7c 00 cmpb $0x0,0x7c(%ebx) 11227a: 0f 84 c0 00 00 00 je 112340 { if (sec_of_fat && !fs_info->vol.mirror) 112280: 84 d2 test %dl,%dl 112282: 74 1a je 11229e 112284: 80 7b 48 00 cmpb $0x0,0x48(%ebx) 112288: 75 14 jne 11229e <== NEVER TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 11228a: 0f b7 0b movzwl (%ebx),%ecx 11228d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 112293: 8b 70 1c mov 0x1c(%eax),%esi 112296: 8b bb 84 00 00 00 mov 0x84(%ebx),%edi 11229c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 11229e: 83 ec 0c sub $0xc,%esp 1122a1: ff b3 80 00 00 00 pushl 0x80(%ebx) 1122a7: 88 55 d0 mov %dl,-0x30(%ebp) 1122aa: e8 51 ed ff ff call 111000 fs_info->c.state = FAT_CACHE_EMPTY; 1122af: c6 43 7d 00 movb $0x0,0x7d(%ebx) fs_info->c.modified = 0; 1122b3: c6 43 7c 00 movb $0x0,0x7c(%ebx) if (sc != RTEMS_SUCCESSFUL) 1122b7: 83 c4 10 add $0x10,%esp 1122ba: 85 c0 test %eax,%eax 1122bc: 8a 55 d0 mov -0x30(%ebp),%dl 1122bf: 74 05 je 1122c6 <== ALWAYS TAKEN 1122c1: e9 c4 00 00 00 jmp 11238a <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 1122c6: 84 d2 test %dl,%dl 1122c8: 0f 84 8d 00 00 00 je 11235b 1122ce: 80 7b 48 00 cmpb $0x0,0x48(%ebx) 1122d2: 74 5e je 112332 <== ALWAYS TAKEN 1122d4: e9 82 00 00 00 jmp 11235b <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 1122d9: 56 push %esi 1122da: 8d 45 e4 lea -0x1c(%ebp),%eax 1122dd: 50 push %eax fs_info->c.blk_num + fs_info->vol.fat_length * i, 1122de: 0f b6 45 d7 movzbl -0x29(%ebp),%eax 1122e2: 0f af 43 18 imul 0x18(%ebx),%eax { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 1122e6: 03 43 78 add 0x78(%ebx),%eax 1122e9: 50 push %eax 1122ea: ff 73 58 pushl 0x58(%ebx) 1122ed: e8 83 ea ff ff call 110d75 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 1122f2: 83 c4 10 add $0x10,%esp 1122f5: 85 c0 test %eax,%eax 1122f7: 74 02 je 1122fb <== ALWAYS TAKEN 1122f9: eb 25 jmp 112320 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 1122fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1122fe: 8b 40 1c mov 0x1c(%eax),%eax 112301: 0f b7 0b movzwl (%ebx),%ecx 112304: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi 11230a: 89 c7 mov %eax,%edi 11230c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sc = rtems_bdbuf_release_modified(b); 11230e: 83 ec 0c sub $0xc,%esp 112311: ff 75 e4 pushl -0x1c(%ebp) 112314: e8 e7 ec ff ff call 111000 if ( sc != RTEMS_SUCCESSFUL) 112319: 83 c4 10 add $0x10,%esp 11231c: 85 c0 test %eax,%eax 11231e: 74 0d je 11232d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 112320: e8 eb 74 00 00 call 119810 <__errno> <== NOT EXECUTED 112325: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 11232b: eb 68 jmp 112395 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 11232d: fe 45 d7 incb -0x29(%ebp) 112330: eb 04 jmp 112336 fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 112332: c6 45 d7 01 movb $0x1,-0x29(%ebp) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 112336: 8a 45 d7 mov -0x29(%ebp),%al 112339: 3a 43 09 cmp 0x9(%ebx),%al 11233c: 72 9b jb 1122d9 11233e: eb 1b jmp 11235b } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 112340: 83 ec 0c sub $0xc,%esp 112343: ff b3 80 00 00 00 pushl 0x80(%ebx) 112349: e8 21 ec ff ff call 110f6f fs_info->c.state = FAT_CACHE_EMPTY; 11234e: c6 43 7d 00 movb $0x0,0x7d(%ebx) if (sc != RTEMS_SUCCESSFUL) 112352: 83 c4 10 add $0x10,%esp 112355: 85 c0 test %eax,%eax 112357: 74 02 je 11235b <== ALWAYS TAKEN 112359: eb 2f jmp 11238a <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 11235b: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 11235f: 8d 83 80 00 00 00 lea 0x80(%ebx),%eax 112365: 75 0f jne 112376 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 112367: 51 push %ecx 112368: 50 push %eax 112369: ff 75 0c pushl 0xc(%ebp) 11236c: ff 73 58 pushl 0x58(%ebx) 11236f: e8 9d ea ff ff call 110e11 112374: eb 0d jmp 112383 else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 112376: 52 push %edx 112377: 50 push %eax 112378: ff 75 0c pushl 0xc(%ebp) 11237b: ff 73 58 pushl 0x58(%ebx) 11237e: e8 f2 e9 ff ff call 110d75 112383: 83 c4 10 add $0x10,%esp if (sc != RTEMS_SUCCESSFUL) 112386: 85 c0 test %eax,%eax 112388: 74 10 je 11239a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 11238a: e8 81 74 00 00 call 119810 <__errno> <== NOT EXECUTED 11238f: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 112395: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 112398: eb 17 jmp 1123b1 <== NOT EXECUTED fs_info->c.blk_num = blk; 11239a: 8b 45 0c mov 0xc(%ebp),%eax 11239d: 89 43 78 mov %eax,0x78(%ebx) fs_info->c.state = FAT_CACHE_ACTUAL; 1123a0: c6 43 7d 01 movb $0x1,0x7d(%ebx) } *buf = fs_info->c.buf; 1123a4: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1123aa: 8b 45 14 mov 0x14(%ebp),%eax 1123ad: 89 10 mov %edx,(%eax) return RC_OK; 1123af: 31 c0 xor %eax,%eax } 1123b1: 8d 65 f4 lea -0xc(%ebp),%esp 1123b4: 5b pop %ebx 1123b5: 5e pop %esi 1123b6: 5f pop %edi 1123b7: 5d pop %ebp 1123b8: c3 ret =============================================================================== 001123b9 : int fat_buf_release(fat_fs_info_t *fs_info) { 1123b9: 55 push %ebp 1123ba: 89 e5 mov %esp,%ebp 1123bc: 57 push %edi 1123bd: 56 push %esi 1123be: 53 push %ebx 1123bf: 83 ec 2c sub $0x2c,%esp 1123c2: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 1123c5: 31 c0 xor %eax,%eax { rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 1123c7: 80 7b 7d 00 cmpb $0x0,0x7d(%ebx) 1123cb: 0f 84 06 01 00 00 je 1124d7 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 1123d1: 8b 43 78 mov 0x78(%ebx),%eax 1123d4: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 1123d8: 31 d2 xor %edx,%edx 1123da: 39 c8 cmp %ecx,%eax 1123dc: 72 08 jb 1123e6 <== NEVER TAKEN 1123de: 31 d2 xor %edx,%edx 1123e0: 3b 43 1c cmp 0x1c(%ebx),%eax 1123e3: 0f 92 c2 setb %dl (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 1123e6: 80 7b 7c 00 cmpb $0x0,0x7c(%ebx) 1123ea: 0f 84 bc 00 00 00 je 1124ac { if (sec_of_fat && !fs_info->vol.mirror) 1123f0: 84 d2 test %dl,%dl 1123f2: 74 1a je 11240e 1123f4: 80 7b 48 00 cmpb $0x0,0x48(%ebx) 1123f8: 75 14 jne 11240e <== NEVER TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 1123fa: 0f b7 0b movzwl (%ebx),%ecx 1123fd: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 112403: 8b 70 1c mov 0x1c(%eax),%esi 112406: 8b bb 84 00 00 00 mov 0x84(%ebx),%edi 11240c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sc = rtems_bdbuf_release_modified(fs_info->c.buf); 11240e: 83 ec 0c sub $0xc,%esp 112411: ff b3 80 00 00 00 pushl 0x80(%ebx) 112417: 88 55 d0 mov %dl,-0x30(%ebp) 11241a: e8 e1 eb ff ff call 111000 if (sc != RTEMS_SUCCESSFUL) 11241f: 83 c4 10 add $0x10,%esp 112422: 85 c0 test %eax,%eax 112424: 8a 55 d0 mov -0x30(%ebp),%dl 112427: 74 05 je 11242e <== ALWAYS TAKEN 112429: e9 93 00 00 00 jmp 1124c1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 11242e: c6 43 7c 00 movb $0x0,0x7c(%ebx) if (sec_of_fat && !fs_info->vol.mirror) 112432: 84 d2 test %dl,%dl 112434: 0f 84 97 00 00 00 je 1124d1 11243a: 80 7b 48 00 cmpb $0x0,0x48(%ebx) 11243e: 74 5e je 11249e <== ALWAYS TAKEN 112440: e9 8c 00 00 00 jmp 1124d1 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 112445: 51 push %ecx 112446: 8d 45 e4 lea -0x1c(%ebp),%eax 112449: 50 push %eax fs_info->c.blk_num + fs_info->vol.fat_length * i, 11244a: 0f b6 45 d7 movzbl -0x29(%ebp),%eax 11244e: 0f af 43 18 imul 0x18(%ebx),%eax { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 112452: 03 43 78 add 0x78(%ebx),%eax 112455: 50 push %eax 112456: ff 73 58 pushl 0x58(%ebx) 112459: e8 17 e9 ff ff call 110d75 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 11245e: 83 c4 10 add $0x10,%esp 112461: 85 c0 test %eax,%eax 112463: 74 02 je 112467 <== ALWAYS TAKEN 112465: eb 25 jmp 11248c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 112467: 8b 45 e4 mov -0x1c(%ebp),%eax 11246a: 8b 40 1c mov 0x1c(%eax),%eax 11246d: 0f b7 0b movzwl (%ebx),%ecx 112470: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi 112476: 89 c7 mov %eax,%edi 112478: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sc = rtems_bdbuf_release_modified(b); 11247a: 83 ec 0c sub $0xc,%esp 11247d: ff 75 e4 pushl -0x1c(%ebp) 112480: e8 7b eb ff ff call 111000 if ( sc != RTEMS_SUCCESSFUL) 112485: 83 c4 10 add $0x10,%esp 112488: 85 c0 test %eax,%eax 11248a: 74 0d je 112499 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 11248c: e8 7f 73 00 00 call 119810 <__errno> <== NOT EXECUTED 112491: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 112497: eb 33 jmp 1124cc <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 112499: fe 45 d7 incb -0x29(%ebp) 11249c: eb 04 jmp 1124a2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 11249e: c6 45 d7 01 movb $0x1,-0x29(%ebp) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 1124a2: 8a 45 d7 mov -0x29(%ebp),%al 1124a5: 3a 43 09 cmp 0x9(%ebx),%al 1124a8: 72 9b jb 112445 1124aa: eb 25 jmp 1124d1 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 1124ac: 83 ec 0c sub $0xc,%esp 1124af: ff b3 80 00 00 00 pushl 0x80(%ebx) 1124b5: e8 b5 ea ff ff call 110f6f if (sc != RTEMS_SUCCESSFUL) 1124ba: 83 c4 10 add $0x10,%esp 1124bd: 85 c0 test %eax,%eax 1124bf: 74 10 je 1124d1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 1124c1: e8 4a 73 00 00 call 119810 <__errno> <== NOT EXECUTED 1124c6: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 1124cc: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1124cf: eb 06 jmp 1124d7 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 1124d1: c6 43 7d 00 movb $0x0,0x7d(%ebx) return RC_OK; 1124d5: 31 c0 xor %eax,%eax } 1124d7: 8d 65 f4 lea -0xc(%ebp),%esp 1124da: 5b pop %ebx 1124db: 5e pop %esi 1124dc: 5f pop %edi 1124dd: 5d pop %ebp 1124de: c3 ret =============================================================================== 001117b8 : static inline uint32_t fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { 1117b8: 55 push %ebp 1117b9: 89 e5 mov %esp,%ebp if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 1117bb: 85 d2 test %edx,%edx 1117bd: 75 0b jne 1117ca 1117bf: f6 40 0a 03 testb $0x3,0xa(%eax) 1117c3: 74 05 je 1117ca <== NEVER TAKEN return fs_info->vol.rdir_loc; 1117c5: 8b 50 1c mov 0x1c(%eax),%edx 1117c8: eb 0c jmp 1117d6 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 1117ca: 83 ea 02 sub $0x2,%edx 1117cd: 0f b6 48 05 movzbl 0x5(%eax),%ecx 1117d1: d3 e2 shl %cl,%edx 1117d3: 03 50 30 add 0x30(%eax),%edx fs_info->vol.data_fsec); } 1117d6: 89 d0 mov %edx,%eax 1117d8: 5d pop %ebp 1117d9: c3 ret =============================================================================== 00112671 : fat_cluster_read( fat_fs_info_t *fs_info, uint32_t cln, void *buff ) { 112671: 55 push %ebp <== NOT EXECUTED 112672: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112674: 53 push %ebx <== NOT EXECUTED 112675: 53 push %ebx <== NOT EXECUTED 112676: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112679: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 11267c: 85 d2 test %edx,%edx <== NOT EXECUTED 11267e: 75 0b jne 11268b <== NOT EXECUTED 112680: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 112684: 74 05 je 11268b <== NOT EXECUTED return fs_info->vol.rdir_loc; 112686: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 112689: eb 0c jmp 112697 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 11268b: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 11268e: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 112692: d3 e2 shl %cl,%edx <== NOT EXECUTED 112694: 03 50 30 add 0x30(%eax),%edx <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_read(fs_info, fsec, 0, 112697: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11269a: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 11269d: 0f b6 58 04 movzbl 0x4(%eax),%ebx <== NOT EXECUTED 1126a1: 0f b6 48 02 movzbl 0x2(%eax),%ecx <== NOT EXECUTED 1126a5: d3 e3 shl %cl,%ebx <== NOT EXECUTED { uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_read(fs_info, fsec, 0, 1126a7: 53 push %ebx <== NOT EXECUTED 1126a8: 6a 00 push $0x0 <== NOT EXECUTED 1126aa: 52 push %edx <== NOT EXECUTED 1126ab: 50 push %eax <== NOT EXECUTED 1126ac: e8 2e fe ff ff call 1124df <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 1126b1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1126b4: c9 leave <== NOT EXECUTED 1126b5: c3 ret <== NOT EXECUTED =============================================================================== 001126b6 : fat_cluster_write( fat_fs_info_t *fs_info, uint32_t cln, const void *buff ) { 1126b6: 55 push %ebp 1126b7: 89 e5 mov %esp,%ebp 1126b9: 53 push %ebx 1126ba: 50 push %eax 1126bb: 8b 45 08 mov 0x8(%ebp),%eax 1126be: 8b 55 0c mov 0xc(%ebp),%edx fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 1126c1: 85 d2 test %edx,%edx 1126c3: 75 0b jne 1126d0 <== ALWAYS TAKEN 1126c5: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 1126c9: 74 05 je 1126d0 <== NOT EXECUTED return fs_info->vol.rdir_loc; 1126cb: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED 1126ce: eb 0c jmp 1126dc <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 1126d0: 83 ea 02 sub $0x2,%edx 1126d3: 0f b6 48 05 movzbl 0x5(%eax),%ecx 1126d7: d3 e2 shl %cl,%edx 1126d9: 03 50 30 add 0x30(%eax),%edx uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_write(fs_info, fsec, 0, 1126dc: 83 ec 0c sub $0xc,%esp 1126df: ff 75 10 pushl 0x10(%ebp) fs_info->vol.spc << fs_info->vol.sec_log2, buff); 1126e2: 0f b6 58 04 movzbl 0x4(%eax),%ebx 1126e6: 0f b6 48 02 movzbl 0x2(%eax),%ecx 1126ea: d3 e3 shl %cl,%ebx { uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_write(fs_info, fsec, 0, 1126ec: 53 push %ebx 1126ed: 6a 00 push $0x0 1126ef: 52 push %edx 1126f0: 50 push %eax 1126f1: e8 5e fe ff ff call 112554 <_fat_block_write> fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 1126f6: 8b 5d fc mov -0x4(%ebp),%ebx 1126f9: c9 leave 1126fa: c3 ret =============================================================================== 0011286a : fat_fat32_update_fsinfo_sector( fat_fs_info_t *fs_info, uint32_t free_count, uint32_t next_free ) { 11286a: 55 push %ebp <== NOT EXECUTED 11286b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11286d: 56 push %esi <== NOT EXECUTED 11286e: 53 push %ebx <== NOT EXECUTED 11286f: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 112872: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 112875: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 112878: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 11287b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 11287e: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED ret1 = _fat_block_write(fs_info, fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); 112881: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(fs_info, 112884: 50 push %eax <== NOT EXECUTED 112885: 6a 04 push $0x4 <== NOT EXECUTED 112887: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED 11288c: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 112890: 50 push %eax <== NOT EXECUTED 112891: 53 push %ebx <== NOT EXECUTED 112892: e8 bd fc ff ff call 112554 <_fat_block_write> <== NOT EXECUTED 112897: 89 c6 mov %eax,%esi <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(fs_info, 112899: 83 c4 14 add $0x14,%esp <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); 11289c: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(fs_info, 11289f: 50 push %eax <== NOT EXECUTED 1128a0: 6a 04 push $0x4 <== NOT EXECUTED 1128a2: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED 1128a7: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 1128ab: 50 push %eax <== NOT EXECUTED 1128ac: 53 push %ebx <== NOT EXECUTED 1128ad: e8 a2 fc ff ff call 112554 <_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) ) 1128b2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1128b5: c1 e8 1f shr $0x1f,%eax <== NOT EXECUTED 1128b8: 75 07 jne 1128c1 <== NOT EXECUTED return -1; return RC_OK; 1128ba: 31 c0 xor %eax,%eax <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 1128bc: c1 ee 1f shr $0x1f,%esi <== NOT EXECUTED 1128bf: 74 03 je 1128c4 <== NOT EXECUTED return -1; 1128c1: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return RC_OK; } 1128c4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1128c7: 5b pop %ebx <== NOT EXECUTED 1128c8: 5e pop %esi <== NOT EXECUTED 1128c9: 5d pop %ebp <== NOT EXECUTED 1128ca: c3 ret <== NOT EXECUTED =============================================================================== 00111c38 : int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 111c38: 55 push %ebp 111c39: 89 e5 mov %esp,%ebp 111c3b: 56 push %esi 111c3c: 53 push %ebx 111c3d: 8b 75 08 mov 0x8(%ebp),%esi 111c40: 8b 5d 0c mov 0xc(%ebp),%ebx /* * 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) 111c43: 8b 43 08 mov 0x8(%ebx),%eax 111c46: 83 f8 01 cmp $0x1,%eax 111c49: 76 0b jbe 111c56 { fat_fd->links_num--; 111c4b: 48 dec %eax 111c4c: 89 43 08 mov %eax,0x8(%ebx) return rc; 111c4f: 31 c0 xor %eax,%eax 111c51: e9 81 00 00 00 jmp 111cd7 } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 111c56: f6 43 30 01 testb $0x1,0x30(%ebx) 111c5a: 74 3f je 111c9b { rc = fat_file_truncate(fs_info, fat_fd, 0); 111c5c: 51 push %ecx 111c5d: 6a 00 push $0x0 111c5f: 53 push %ebx 111c60: 56 push %esi 111c61: e8 f4 fe ff ff call 111b5a if ( rc != RC_OK ) 111c66: 83 c4 10 add $0x10,%esp 111c69: 85 c0 test %eax,%eax 111c6b: 75 6a jne 111cd7 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 111c6d: 83 ec 0c sub $0xc,%esp 111c70: 53 push %ebx 111c71: e8 7a 31 00 00 call 114df0 <_Chain_Extract> return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) 111c76: 58 pop %eax 111c77: 5a pop %edx 111c78: ff 73 0c pushl 0xc(%ebx) 111c7b: 56 push %esi 111c7c: e8 d8 0b 00 00 call 112859 111c81: 83 c4 10 add $0x10,%esp 111c84: 84 c0 test %al,%al 111c86: 74 0e je 111c96 <== ALWAYS TAKEN fat_free_unique_ino(fs_info, fat_fd->ino); 111c88: 50 push %eax <== NOT EXECUTED 111c89: 50 push %eax <== NOT EXECUTED 111c8a: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 111c8d: 56 push %esi <== NOT EXECUTED 111c8e: e8 a2 0b 00 00 call 112835 <== NOT EXECUTED 111c93: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(fat_fd); 111c96: 83 ec 0c sub $0xc,%esp 111c99: eb 25 jmp 111cc0 } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 111c9b: 50 push %eax 111c9c: 50 push %eax 111c9d: ff 73 0c pushl 0xc(%ebx) 111ca0: 56 push %esi 111ca1: e8 b3 0b 00 00 call 112859 111ca6: 83 c4 10 add $0x10,%esp 111ca9: 84 c0 test %al,%al 111cab: 74 09 je 111cb6 <== ALWAYS TAKEN { fat_fd->links_num = 0; 111cad: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED 111cb4: eb 13 jmp 111cc9 <== NOT EXECUTED 111cb6: 83 ec 0c sub $0xc,%esp 111cb9: 53 push %ebx 111cba: e8 31 31 00 00 call 114df0 <_Chain_Extract> } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 111cbf: 58 pop %eax 111cc0: 53 push %ebx 111cc1: e8 66 55 ff ff call 10722c 111cc6: 83 c4 10 add $0x10,%esp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 111cc9: 89 75 08 mov %esi,0x8(%ebp) return rc; } 111ccc: 8d 65 f8 lea -0x8(%ebp),%esp 111ccf: 5b pop %ebx 111cd0: 5e pop %esi 111cd1: 5d pop %ebp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 111cd2: e9 e2 06 00 00 jmp 1123b9 return rc; } 111cd7: 8d 65 f8 lea -0x8(%ebp),%esp 111cda: 5b pop %ebx 111cdb: 5e pop %esi 111cdc: 5d pop %ebp 111cdd: c3 ret =============================================================================== 00111d64 : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 111d64: 55 push %ebp 111d65: 89 e5 mov %esp,%ebp 111d67: 57 push %edi 111d68: 56 push %esi 111d69: 53 push %ebx 111d6a: 83 ec 2c sub $0x2c,%esp 111d6d: 8b 5d 08 mov 0x8(%ebp),%ebx 111d70: 8b 75 0c mov 0xc(%ebp),%esi 111d73: 8a 45 10 mov 0x10(%ebp),%al 111d76: 88 45 cf mov %al,-0x31(%ebp) int rc = RC_OK; uint32_t chain = 0; 111d79: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 111d80: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 111d87: 8b 4d 14 mov 0x14(%ebp),%ecx 111d8a: 8b 55 18 mov 0x18(%ebp),%edx 111d8d: 89 0a mov %ecx,(%edx) if (new_length <= fat_fd->fat_file_size) 111d8f: 8b 46 18 mov 0x18(%esi),%eax 111d92: 39 c1 cmp %eax,%ecx 111d94: 77 07 ja 111d9d return RC_OK; 111d96: 31 d2 xor %edx,%edx 111d98: e9 db 01 00 00 jmp 111f78 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 111d9d: 83 7e 20 01 cmpl $0x1,0x20(%esi) 111da1: 75 11 jne 111db4 <== ALWAYS TAKEN 111da3: 83 7e 24 00 cmpl $0x0,0x24(%esi) <== NOT EXECUTED 111da7: 75 0b jne 111db4 <== NOT EXECUTED 111da9: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 111dad: 74 05 je 111db4 <== NOT EXECUTED 111daf: e9 d3 00 00 00 jmp 111e87 <== 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))) & 111db4: 0f b7 7b 06 movzwl 0x6(%ebx),%edi 111db8: 8d 57 ff lea -0x1(%edi),%edx 111dbb: 89 d1 mov %edx,%ecx 111dbd: 21 c1 and %eax,%ecx 111dbf: 89 4d d0 mov %ecx,-0x30(%ebp) 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 - 111dc2: 29 cf sub %ecx,%edi 111dc4: 21 d7 and %edx,%edi (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 111dc6: 8b 55 14 mov 0x14(%ebp),%edx 111dc9: 29 c2 sub %eax,%edx if (bytes2add > bytes_remain) bytes2add -= bytes_remain; else bytes2add = 0; 111dcb: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 111dd2: 39 fa cmp %edi,%edx 111dd4: 76 05 jbe 111ddb bytes2add -= bytes_remain; 111dd6: 29 fa sub %edi,%edx 111dd8: 89 55 d4 mov %edx,-0x2c(%ebp) else bytes2add = 0; if (zero_fill && bytes_remain > 0) { 111ddb: 85 ff test %edi,%edi 111ddd: 74 5d je 111e3c 111ddf: 80 7d cf 00 cmpb $0x0,-0x31(%ebp) 111de3: 74 57 je 111e3c uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; uint32_t sec; uint32_t byte; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111de5: 83 ec 0c sub $0xc,%esp else bytes2add = 0; if (zero_fill && bytes_remain > 0) { uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; 111de8: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 111dec: d3 e8 shr %cl,%eax 111dee: 89 c1 mov %eax,%ecx uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; uint32_t sec; uint32_t byte; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111df0: 8d 45 e4 lea -0x1c(%ebp),%eax 111df3: 50 push %eax 111df4: 89 f2 mov %esi,%edx 111df6: 89 d8 mov %ebx,%eax 111df8: e8 1c fa ff ff call 111819 111dfd: 89 c2 mov %eax,%edx if (rc != RC_OK) 111dff: 83 c4 10 add $0x10,%esp 111e02: 85 c0 test %eax,%eax 111e04: 0f 85 6e 01 00 00 jne 111f78 <== NEVER TAKEN return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 111e0a: 8b 55 e4 mov -0x1c(%ebp),%edx 111e0d: 89 d8 mov %ebx,%eax 111e0f: e8 a4 f9 ff ff call 1117b8 sec += ofs >> fs_info->vol.sec_log2; byte = ofs & (fs_info->vol.bps - 1); rc = _fat_block_zero(fs_info, sec, byte, bytes_remain); 111e14: 57 push %edi if (rc != RC_OK) return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += ofs >> fs_info->vol.sec_log2; byte = ofs & (fs_info->vol.bps - 1); 111e15: 0f b7 13 movzwl (%ebx),%edx 111e18: 4a dec %edx 111e19: 23 55 d0 and -0x30(%ebp),%edx rc = _fat_block_zero(fs_info, sec, byte, bytes_remain); 111e1c: 52 push %edx rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += ofs >> fs_info->vol.sec_log2; 111e1d: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 111e21: 8b 55 d0 mov -0x30(%ebp),%edx 111e24: d3 ea shr %cl,%edx 111e26: 01 d0 add %edx,%eax byte = ofs & (fs_info->vol.bps - 1); rc = _fat_block_zero(fs_info, sec, byte, bytes_remain); 111e28: 50 push %eax 111e29: 53 push %ebx 111e2a: e8 bb 07 00 00 call 1125ea <_fat_block_zero> 111e2f: 89 c2 mov %eax,%edx if (rc != RC_OK) 111e31: 83 c4 10 add $0x10,%esp 111e34: 85 c0 test %eax,%eax 111e36: 0f 85 3c 01 00 00 jne 111f78 <== NEVER TAKEN /* * 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) 111e3c: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 111e40: 0f 84 50 ff ff ff je 111d96 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 111e46: 8b 45 d4 mov -0x2c(%ebp),%eax 111e49: 48 dec %eax 111e4a: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 111e4e: d3 e8 shr %cl,%eax 111e50: 8d 48 01 lea 0x1(%eax),%ecx rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 111e53: 50 push %eax 111e54: 50 push %eax 111e55: 0f b6 45 cf movzbl -0x31(%ebp),%eax 111e59: 50 push %eax 111e5a: 8d 45 e0 lea -0x20(%ebp),%eax 111e5d: 50 push %eax 111e5e: 8d 45 e4 lea -0x1c(%ebp),%eax 111e61: 50 push %eax 111e62: 51 push %ecx 111e63: 8d 45 d8 lea -0x28(%ebp),%eax 111e66: 50 push %eax 111e67: 53 push %ebx 111e68: 89 4d c8 mov %ecx,-0x38(%ebp) 111e6b: e8 96 60 00 00 call 117f06 111e70: 89 c2 mov %eax,%edx &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 111e72: 83 c4 20 add $0x20,%esp 111e75: 85 c0 test %eax,%eax 111e77: 8b 4d c8 mov -0x38(%ebp),%ecx 111e7a: 0f 85 f8 00 00 00 jne 111f78 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 111e80: 8b 45 e4 mov -0x1c(%ebp),%eax 111e83: 09 c7 or %eax,%edi 111e85: 75 13 jne 111e9a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); 111e87: e8 84 79 00 00 call 119810 <__errno> <== NOT EXECUTED 111e8c: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 111e92: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 111e95: e9 de 00 00 00 jmp 111f78 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 111e9a: 39 c1 cmp %eax,%ecx 111e9c: 74 18 je 111eb6 <== ALWAYS TAKEN { new_length -= bytes2add & (fs_info->vol.bpc - 1); 111e9e: 0f b7 7b 06 movzwl 0x6(%ebx),%edi <== NOT EXECUTED 111ea2: 4f dec %edi <== NOT EXECUTED 111ea3: 23 7d d4 and -0x2c(%ebp),%edi <== NOT EXECUTED 111ea6: 29 7d 14 sub %edi,0x14(%ebp) <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 111ea9: 29 c1 sub %eax,%ecx <== NOT EXECUTED 111eab: 89 c8 mov %ecx,%eax <== NOT EXECUTED 111ead: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 111eb1: d3 e0 shl %cl,%eax <== NOT EXECUTED 111eb3: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 111eb6: 8b 46 18 mov 0x18(%esi),%eax 111eb9: 85 c0 test %eax,%eax 111ebb: 75 12 jne 111ecf { fat_fd->map.disk_cln = fat_fd->cln = chain; 111ebd: 8b 45 d8 mov -0x28(%ebp),%eax 111ec0: 89 46 1c mov %eax,0x1c(%esi) 111ec3: 89 46 38 mov %eax,0x38(%esi) fat_fd->map.file_cln = 0; 111ec6: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) 111ecd: eb 60 jmp 111f2f } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 111ecf: 8b 4e 3c mov 0x3c(%esi),%ecx 111ed2: 83 f9 ff cmp $0xffffffff,%ecx 111ed5: 74 05 je 111edc <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; 111ed7: 89 4d dc mov %ecx,-0x24(%ebp) 111eda: eb 23 jmp 111eff } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 111edc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111edf: 8d 4d dc lea -0x24(%ebp),%ecx <== NOT EXECUTED 111ee2: 51 push %ecx <== NOT EXECUTED 111ee3: 48 dec %eax <== NOT EXECUTED 111ee4: 50 push %eax <== NOT EXECUTED 111ee5: 6a 01 push $0x1 <== NOT EXECUTED 111ee7: 56 push %esi <== NOT EXECUTED 111ee8: 53 push %ebx <== NOT EXECUTED 111ee9: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 111eec: e8 ed fd ff ff call 111cde <== NOT EXECUTED 111ef1: 89 c7 mov %eax,%edi <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 111ef3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 111ef6: 85 c0 test %eax,%eax <== NOT EXECUTED 111ef8: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 111efb: 74 02 je 111eff <== NOT EXECUTED 111efd: eb 5c jmp 111f5b <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 111eff: 50 push %eax 111f00: ff 75 d8 pushl -0x28(%ebp) 111f03: ff 75 dc pushl -0x24(%ebp) 111f06: 53 push %ebx 111f07: 89 55 c8 mov %edx,-0x38(%ebp) 111f0a: e8 3a 5d 00 00 call 117c49 111f0f: 89 c7 mov %eax,%edi if ( rc != RC_OK ) 111f11: 83 c4 10 add $0x10,%esp 111f14: 85 c0 test %eax,%eax 111f16: 8b 55 c8 mov -0x38(%ebp),%edx 111f19: 74 02 je 111f1d <== ALWAYS TAKEN 111f1b: eb 3e jmp 111f5b <== NOT EXECUTED { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); 111f1d: 83 ec 0c sub $0xc,%esp 111f20: 53 push %ebx 111f21: 89 55 c8 mov %edx,-0x38(%ebp) 111f24: e8 90 04 00 00 call 1123b9 111f29: 83 c4 10 add $0x10,%esp 111f2c: 8b 55 c8 mov -0x38(%ebp),%edx } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 111f2f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 111f33: 74 38 je 111f6d <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; 111f35: 8b 45 e0 mov -0x20(%ebp),%eax 111f38: 89 46 3c mov %eax,0x3c(%esi) if (fat_fd->fat_file_type == FAT_DIRECTORY) 111f3b: 83 7e 10 00 cmpl $0x0,0x10(%esi) 111f3f: 75 2c jne 111f6d { rc = fat_init_clusters_chain(fs_info, chain); 111f41: 57 push %edi 111f42: 57 push %edi 111f43: ff 75 d8 pushl -0x28(%ebp) 111f46: 53 push %ebx 111f47: 89 55 c8 mov %edx,-0x38(%ebp) 111f4a: e8 ac 07 00 00 call 1126fb 111f4f: 89 c7 mov %eax,%edi if ( rc != RC_OK ) 111f51: 83 c4 10 add $0x10,%esp 111f54: 85 c0 test %eax,%eax 111f56: 8b 55 c8 mov -0x38(%ebp),%edx 111f59: 74 12 je 111f6d <== ALWAYS TAKEN { fat_free_fat_clusters_chain(fs_info, chain); 111f5b: 56 push %esi <== NOT EXECUTED 111f5c: 56 push %esi <== NOT EXECUTED 111f5d: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED 111f60: 53 push %ebx <== NOT EXECUTED 111f61: e8 fc 5e 00 00 call 117e62 <== NOT EXECUTED 111f66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111f69: 89 fa mov %edi,%edx <== NOT EXECUTED 111f6b: eb 0b jmp 111f78 <== NOT EXECUTED return rc; } } } *a_length = new_length; 111f6d: 8b 4d 14 mov 0x14(%ebp),%ecx 111f70: 8b 45 18 mov 0x18(%ebp),%eax 111f73: 89 08 mov %ecx,(%eax) fat_fd->fat_file_size = new_length; 111f75: 89 4e 18 mov %ecx,0x18(%esi) return RC_OK; } 111f78: 89 d0 mov %edx,%eax 111f7a: 8d 65 f4 lea -0xc(%ebp),%esp 111f7d: 5b pop %ebx 111f7e: 5e pop %esi 111f7f: 5f pop %edi 111f80: 5d pop %ebp 111f81: c3 ret =============================================================================== 00111cde : fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 111cde: 55 push %ebp 111cdf: 89 e5 mov %esp,%ebp 111ce1: 56 push %esi 111ce2: 53 push %ebx 111ce3: 83 ec 10 sub $0x10,%esp 111ce6: 8b 45 08 mov 0x8(%ebp),%eax 111ce9: 8b 55 0c mov 0xc(%ebp),%edx int rc = RC_OK; uint32_t cur_cln = 0; 111cec: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 111cf3: 83 7d 10 01 cmpl $0x1,0x10(%ebp) 111cf7: 75 56 jne 111d4f <== NEVER TAKEN { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 111cf9: 8b 75 14 mov 0x14(%ebp),%esi ret = va_arg(ap, uint32_t *); 111cfc: 8b 5d 18 mov 0x18(%ebp),%ebx /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 111cff: 3b 72 18 cmp 0x18(%edx),%esi 111d02: 72 0d jb 111d11 <== ALWAYS TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 111d04: e8 07 7b 00 00 call 119810 <__errno> <== NOT EXECUTED 111d09: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 111d0f: eb 49 jmp 111d5a <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 111d11: 83 7a 20 01 cmpl $0x1,0x20(%edx) 111d15: 75 16 jne 111d2d 111d17: 83 7a 24 00 cmpl $0x0,0x24(%edx) 111d1b: 75 10 jne 111d2d <== NEVER TAKEN 111d1d: f6 40 0a 03 testb $0x3,0xa(%eax) 111d21: 74 0a je 111d2d <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 111d23: c7 03 00 00 00 00 movl $0x0,(%ebx) rc = RC_OK; 111d29: 31 c0 xor %eax,%eax break; 111d2b: eb 30 jmp 111d5d } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111d2d: 83 ec 0c sub $0xc,%esp *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 111d30: 0f b6 48 08 movzbl 0x8(%eax),%ecx 111d34: d3 ee shr %cl,%esi 111d36: 89 f1 mov %esi,%ecx rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111d38: 8d 75 f4 lea -0xc(%ebp),%esi 111d3b: 56 push %esi 111d3c: e8 d8 fa ff ff call 111819 if ( rc != RC_OK ) 111d41: 83 c4 10 add $0x10,%esp 111d44: 85 c0 test %eax,%eax 111d46: 75 15 jne 111d5d <== NEVER TAKEN break; *ret = cur_cln; 111d48: 8b 55 f4 mov -0xc(%ebp),%edx 111d4b: 89 13 mov %edx,(%ebx) break; 111d4d: eb 0e jmp 111d5d default: errno = EINVAL; 111d4f: e8 bc 7a 00 00 call 119810 <__errno> <== NOT EXECUTED 111d54: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED rc = -1; 111d5a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED break; } va_end(ap); return rc; } 111d5d: 8d 65 f8 lea -0x8(%ebp),%esp 111d60: 5b pop %ebx 111d61: 5e pop %esi 111d62: 5d pop %ebp 111d63: c3 ret =============================================================================== 00111819 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 111819: 55 push %ebp 11181a: 89 e5 mov %esp,%ebp 11181c: 57 push %edi 11181d: 56 push %esi 11181e: 53 push %ebx 11181f: 83 ec 2c sub $0x2c,%esp 111822: 89 c7 mov %eax,%edi 111824: 89 d3 mov %edx,%ebx 111826: 89 ce mov %ecx,%esi int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 111828: 8b 42 34 mov 0x34(%edx),%eax 11182b: 39 c1 cmp %eax,%ecx 11182d: 75 05 jne 111834 *disk_cln = fat_fd->map.disk_cln; 11182f: 8b 42 38 mov 0x38(%edx),%eax 111832: eb 51 jmp 111885 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 111834: 76 0f jbe 111845 { cur_cln = fat_fd->map.disk_cln; 111836: 8b 52 38 mov 0x38(%edx),%edx 111839: 89 55 e4 mov %edx,-0x1c(%ebp) count = file_cln - fat_fd->map.file_cln; 11183c: 89 ca mov %ecx,%edx 11183e: 29 c2 sub %eax,%edx 111840: 89 55 d4 mov %edx,-0x2c(%ebp) 111843: eb 09 jmp 11184e } else { cur_cln = fat_fd->cln; 111845: 8b 42 1c mov 0x1c(%edx),%eax 111848: 89 45 e4 mov %eax,-0x1c(%ebp) 11184b: 89 4d d4 mov %ecx,-0x2c(%ebp) count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 11184e: 31 d2 xor %edx,%edx { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 111850: 8d 4d e4 lea -0x1c(%ebp),%ecx cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 111853: eb 22 jmp 111877 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 111855: 50 push %eax 111856: 51 push %ecx 111857: ff 75 e4 pushl -0x1c(%ebp) 11185a: 57 push %edi 11185b: 89 55 d0 mov %edx,-0x30(%ebp) 11185e: 89 4d cc mov %ecx,-0x34(%ebp) 111861: e8 9a 62 00 00 call 117b00 if ( rc != RC_OK ) 111866: 83 c4 10 add $0x10,%esp 111869: 85 c0 test %eax,%eax 11186b: 8b 55 d0 mov -0x30(%ebp),%edx 11186e: 8b 4d cc mov -0x34(%ebp),%ecx 111871: 74 03 je 111876 <== ALWAYS TAKEN return rc; 111873: 99 cltd <== NOT EXECUTED 111874: eb 18 jmp 11188e <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 111876: 42 inc %edx 111877: 3b 55 d4 cmp -0x2c(%ebp),%edx 11187a: 75 d9 jne 111855 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 11187c: 89 73 34 mov %esi,0x34(%ebx) fat_fd->map.disk_cln = cur_cln; 11187f: 8b 45 e4 mov -0x1c(%ebp),%eax 111882: 89 43 38 mov %eax,0x38(%ebx) *disk_cln = cur_cln; 111885: 8b 55 08 mov 0x8(%ebp),%edx 111888: 89 02 mov %eax,(%edx) } return RC_OK; 11188a: 31 c0 xor %eax,%eax 11188c: 31 d2 xor %edx,%edx } 11188e: 8d 65 f4 lea -0xc(%ebp),%esp 111891: 5b pop %ebx 111892: 5e pop %esi 111893: 5f pop %edi 111894: 5d pop %ebp 111895: c3 ret =============================================================================== 00111896 : fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 111896: 55 push %ebp 111897: 89 e5 mov %esp,%ebp 111899: 57 push %edi 11189a: 56 push %esi 11189b: 53 push %ebx 11189c: 83 ec 1c sub $0x1c,%esp 11189f: 8b 75 0c mov 0xc(%ebp),%esi int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 1118a2: 89 f2 mov %esi,%edx 1118a4: 8b 45 08 mov 0x8(%ebp),%eax 1118a7: e8 2e ff ff ff call 1117da 1118ac: 89 45 e4 mov %eax,-0x1c(%ebp) uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 1118af: 83 e0 01 and $0x1,%eax rtems_chain_node *the_node = rtems_chain_first(hash + mod); 1118b2: 6b c0 0c imul $0xc,%eax,%eax 1118b5: 89 45 e0 mov %eax,-0x20(%ebp) 1118b8: 89 c3 mov %eax,%ebx 1118ba: 8b 45 08 mov 0x8(%ebp),%eax 1118bd: 03 58 60 add 0x60(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 1118c0: 8b 3b mov (%ebx),%edi RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 1118c2: 83 c3 04 add $0x4,%ebx 1118c5: eb 1f jmp 1118e6 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); 1118c7: 8d 57 20 lea 0x20(%edi),%edx 1118ca: 8b 45 08 mov 0x8(%ebp),%eax 1118cd: e8 08 ff ff ff call 1117da if ( (key1) == ck) 1118d2: 39 45 e4 cmp %eax,-0x1c(%ebp) 1118d5: 75 0d jne 1118e4 /* access "valid" hash table */ rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 1118d7: 8b 55 10 mov 0x10(%ebp),%edx 1118da: 89 3a mov %edi,(%edx) lfat_fd->links_num++; 1118dc: ff 47 08 incl 0x8(%edi) 1118df: e9 db 00 00 00 jmp 1119bf { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 1118e4: 8b 3f mov (%edi),%edi ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 1118e6: 39 df cmp %ebx,%edi 1118e8: 75 dd jne 1118c7 1118ea: e9 d4 00 00 00 jmp 1119c3 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); 1118ef: 8d 57 20 lea 0x20(%edi),%edx <== NOT EXECUTED 1118f2: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1118f5: e8 e0 fe ff ff call 1117da <== NOT EXECUTED if ( (key1) == ck) 1118fa: 39 45 e4 cmp %eax,-0x1c(%ebp) <== NOT EXECUTED 1118fd: 75 0e jne 11190d <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 1118ff: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 111903: 74 13 je 111918 <== NOT EXECUTED 111905: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 111908: 3b 47 0c cmp 0xc(%edi),%eax <== NOT EXECUTED 11190b: 74 0b je 111918 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 11190d: 8b 3f mov (%edi),%edi <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 11190f: 39 df cmp %ebx,%edi 111911: 75 dc jne 1118ef <== NEVER TAKEN return 0; } } the_node = the_node->next; } return -1; 111913: 83 ca ff or $0xffffffff,%edx 111916: eb 02 jmp 11191a if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) { *ret = (void *)the_node; return 0; 111918: 31 d2 xor %edx,%edx <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 11191a: 83 ec 0c sub $0xc,%esp 11191d: 6a 44 push $0x44 11191f: 89 55 dc mov %edx,-0x24(%ebp) 111922: e8 e1 5d ff ff call 107708 111927: 89 c3 mov %eax,%ebx 111929: 8b 45 10 mov 0x10(%ebp),%eax 11192c: 89 18 mov %ebx,(%eax) if ( lfat_fd == NULL ) 11192e: 83 c4 10 add $0x10,%esp 111931: 85 db test %ebx,%ebx 111933: 8b 55 dc mov -0x24(%ebp),%edx 111936: 75 0d jne 111945 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 111938: e8 d3 7e 00 00 call 119810 <__errno> <== NOT EXECUTED 11193d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 111943: eb 60 jmp 1119a5 <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 111945: b9 11 00 00 00 mov $0x11,%ecx 11194a: 31 c0 xor %eax,%eax 11194c: 89 df mov %ebx,%edi 11194e: f3 ab rep stos %eax,%es:(%edi) lfat_fd->links_num = 1; 111950: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) lfat_fd->flags &= ~FAT_FILE_REMOVED; 111957: 80 63 30 fe andb $0xfe,0x30(%ebx) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 11195b: c7 43 3c ff ff ff ff movl $0xffffffff,0x3c(%ebx) lfat_fd->dir_pos = *dir_pos; 111962: 8d 7b 20 lea 0x20(%ebx),%edi 111965: b1 04 mov $0x4,%cl 111967: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( rc != RC_OK ) 111969: 85 d2 test %edx,%edx 11196b: 74 08 je 111975 <== NEVER TAKEN lfat_fd->ino = key; 11196d: 8b 45 e4 mov -0x1c(%ebp),%eax 111970: 89 43 0c mov %eax,0xc(%ebx) 111973: eb 35 jmp 1119aa else { lfat_fd->ino = fat_get_unique_ino(fs_info); 111975: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111978: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 11197b: e8 1b 0e 00 00 call 11279b <== NOT EXECUTED 111980: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 111983: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111986: 85 c0 test %eax,%eax <== NOT EXECUTED 111988: 75 20 jne 1119aa <== NOT EXECUTED { free((*fat_fd)); 11198a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11198d: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 111990: ff 32 pushl (%edx) <== NOT EXECUTED 111992: e8 95 58 ff ff call 10722c <== 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 ); 111997: e8 74 7e 00 00 call 119810 <__errno> <== NOT EXECUTED 11199c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1119a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1119a5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1119a8: eb 2c jmp 1119d6 <== 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 ); 1119aa: 52 push %edx 1119ab: 52 push %edx 1119ac: 53 push %ebx */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 1119ad: 8b 45 e0 mov -0x20(%ebp),%eax 1119b0: 8b 55 08 mov 0x8(%ebp),%edx 1119b3: 03 42 60 add 0x60(%edx),%eax 1119b6: 50 push %eax 1119b7: e8 3c 9d ff ff call 10b6f8 <_Chain_Append> 1119bc: 83 c4 10 add $0x10,%esp /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 1119bf: 31 c0 xor %eax,%eax 1119c1: eb 13 jmp 1119d6 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 1119c3: 8b 5d e0 mov -0x20(%ebp),%ebx 1119c6: 8b 45 08 mov 0x8(%ebp),%eax 1119c9: 03 58 64 add 0x64(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 1119cc: 8b 3b mov (%ebx),%edi RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 1119ce: 83 c3 04 add $0x4,%ebx 1119d1: e9 39 ff ff ff jmp 11190f * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 1119d6: 8d 65 f4 lea -0xc(%ebp),%esp 1119d9: 5b pop %ebx 1119da: 5e pop %esi 1119db: 5f pop %edi 1119dc: 5d pop %ebp 1119dd: c3 ret =============================================================================== 001119eb : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 1119eb: 55 push %ebp 1119ec: 89 e5 mov %esp,%ebp 1119ee: 57 push %edi 1119ef: 56 push %esi 1119f0: 53 push %ebx 1119f1: 83 ec 2c sub $0x2c,%esp 1119f4: 8b 5d 08 mov 0x8(%ebp),%ebx 1119f7: 8b 75 10 mov 0x10(%ebp),%esi int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 1119fa: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; 111a01: 31 c0 xor %eax,%eax 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) 111a03: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 111a07: 0f 84 45 01 00 00 je 111b52 <== NEVER TAKEN /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 111a0d: 8b 4d 0c mov 0xc(%ebp),%ecx 111a10: 8b 51 18 mov 0x18(%ecx),%edx 111a13: 39 d6 cmp %edx,%esi 111a15: 0f 83 37 01 00 00 jae 111b52 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 111a1b: 39 55 14 cmp %edx,0x14(%ebp) 111a1e: 77 09 ja 111a29 <== NEVER TAKEN (start > fat_fd->fat_file_size - count)) 111a20: 89 d0 mov %edx,%eax 111a22: 2b 45 14 sub 0x14(%ebp),%eax * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 111a25: 39 c6 cmp %eax,%esi 111a27: 76 05 jbe 111a2e (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 111a29: 29 f2 sub %esi,%edx 111a2b: 89 55 14 mov %edx,0x14(%ebp) if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 111a2e: 8b 45 0c mov 0xc(%ebp),%eax 111a31: 83 78 20 01 cmpl $0x1,0x20(%eax) 111a35: 75 45 jne 111a7c 111a37: 83 78 24 00 cmpl $0x0,0x24(%eax) 111a3b: 75 3f jne 111a7c <== NEVER TAKEN 111a3d: f6 43 0a 03 testb $0x3,0xa(%ebx) 111a41: 74 39 je 111a7c <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 111a43: 8b 50 1c mov 0x1c(%eax),%edx 111a46: 89 d8 mov %ebx,%eax 111a48: e8 6b fd ff ff call 1117b8 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 111a4d: 83 ec 0c sub $0xc,%esp 111a50: ff 75 18 pushl 0x18(%ebp) 111a53: ff 75 14 pushl 0x14(%ebp) if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 111a56: 0f b7 13 movzwl (%ebx),%edx 111a59: 4a dec %edx 111a5a: 21 f2 and %esi,%edx ret = _fat_block_read(fs_info, sec, byte, count, buf); 111a5c: 52 push %edx if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 111a5d: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 111a61: d3 ee shr %cl,%esi 111a63: 01 f0 add %esi,%eax byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 111a65: 50 push %eax 111a66: 53 push %ebx 111a67: e8 73 0a 00 00 call 1124df <_fat_block_read> if ( ret < 0 ) 111a6c: 83 c4 20 add $0x20,%esp 111a6f: 85 c0 test %eax,%eax 111a71: 0f 89 db 00 00 00 jns 111b52 <== ALWAYS TAKEN 111a77: e9 d3 00 00 00 jmp 111b4f <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 111a7c: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 111a80: 89 f0 mov %esi,%eax 111a82: d3 e8 shr %cl,%eax 111a84: 89 45 cc mov %eax,-0x34(%ebp) save_ofs = ofs = start & (fs_info->vol.bpc - 1); 111a87: 66 8b 4b 06 mov 0x6(%ebx),%cx 111a8b: 66 89 4d d4 mov %cx,-0x2c(%ebp) rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111a8f: 83 ec 0c sub $0xc,%esp 111a92: 8d 7d e4 lea -0x1c(%ebp),%edi 111a95: 57 push %edi 111a96: 89 c1 mov %eax,%ecx 111a98: 8b 55 0c mov 0xc(%ebp),%edx 111a9b: 89 d8 mov %ebx,%eax 111a9d: e8 77 fd ff ff call 111819 if (rc != RC_OK) 111aa2: 83 c4 10 add $0x10,%esp 111aa5: 85 c0 test %eax,%eax 111aa7: 0f 85 a5 00 00 00 jne 111b52 <== NEVER TAKEN return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 111aad: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 111ab1: 48 dec %eax 111ab2: 21 f0 and %esi,%eax 111ab4: 89 45 d0 mov %eax,-0x30(%ebp) 111ab7: 89 c6 mov %eax,%esi 111ab9: 31 d2 xor %edx,%edx 111abb: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 111ac2: eb 64 jmp 111b28 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 111ac4: 0f b7 7b 06 movzwl 0x6(%ebx),%edi 111ac8: 29 f7 sub %esi,%edi 111aca: 3b 7d 14 cmp 0x14(%ebp),%edi 111acd: 76 03 jbe 111ad2 111acf: 8b 7d 14 mov 0x14(%ebp),%edi sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 111ad2: 8b 55 e4 mov -0x1c(%ebp),%edx 111ad5: 89 d8 mov %ebx,%eax 111ad7: e8 dc fc ff ff call 1117b8 sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 111adc: 83 ec 0c sub $0xc,%esp 111adf: 8b 55 18 mov 0x18(%ebp),%edx 111ae2: 03 55 d4 add -0x2c(%ebp),%edx 111ae5: 52 push %edx 111ae6: 57 push %edi { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 111ae7: 0f b7 13 movzwl (%ebx),%edx 111aea: 4a dec %edx 111aeb: 21 f2 and %esi,%edx ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 111aed: 52 push %edx while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 111aee: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 111af2: d3 ee shr %cl,%esi 111af4: 01 f0 add %esi,%eax byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 111af6: 50 push %eax 111af7: 53 push %ebx 111af8: e8 e2 09 00 00 call 1124df <_fat_block_read> if ( ret < 0 ) 111afd: 83 c4 20 add $0x20,%esp 111b00: 85 c0 test %eax,%eax 111b02: 78 4b js 111b4f <== NEVER TAKEN return -1; count -= c; 111b04: 29 7d 14 sub %edi,0x14(%ebp) cmpltd += c; 111b07: 01 7d d4 add %edi,-0x2c(%ebp) save_cln = cur_cln; 111b0a: 8b 55 e4 mov -0x1c(%ebp),%edx rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 111b0d: 51 push %ecx 111b0e: 8d 75 e4 lea -0x1c(%ebp),%esi 111b11: 56 push %esi 111b12: 52 push %edx 111b13: 53 push %ebx 111b14: 89 55 c8 mov %edx,-0x38(%ebp) 111b17: e8 e4 5f 00 00 call 117b00 if ( rc != RC_OK ) return rc; ofs = 0; 111b1c: 31 f6 xor %esi,%esi count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) 111b1e: 83 c4 10 add $0x10,%esp 111b21: 85 c0 test %eax,%eax 111b23: 8b 55 c8 mov -0x38(%ebp),%edx 111b26: 75 2a jne 111b52 <== NEVER TAKEN rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 111b28: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 111b2c: 75 96 jne 111ac4 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 111b2e: 8b 4d d4 mov -0x2c(%ebp),%ecx 111b31: 8b 75 d0 mov -0x30(%ebp),%esi 111b34: 8d 44 31 ff lea -0x1(%ecx,%esi,1),%eax 111b38: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 111b3c: d3 e8 shr %cl,%eax ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 111b3e: 03 45 cc add -0x34(%ebp),%eax 111b41: 8b 75 0c mov 0xc(%ebp),%esi 111b44: 89 46 34 mov %eax,0x34(%esi) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 111b47: 89 56 38 mov %edx,0x38(%esi) return cmpltd; 111b4a: 8b 45 d4 mov -0x2c(%ebp),%eax 111b4d: eb 03 jmp 111b52 sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 111b4f: 83 c8 ff or $0xffffffff,%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; } 111b52: 8d 65 f4 lea -0xc(%ebp),%esp 111b55: 5b pop %ebx 111b56: 5e pop %esi 111b57: 5f pop %edi 111b58: 5d pop %ebp 111b59: c3 ret =============================================================================== 0011218c : int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 11218c: 55 push %ebp 11218d: 89 e5 mov %esp,%ebp 11218f: 57 push %edi 112190: 56 push %esi 112191: 53 push %ebx 112192: 83 ec 2c sub $0x2c,%esp 112195: 8b 75 08 mov 0x8(%ebp),%esi 112198: 8b 5d 0c mov 0xc(%ebp),%ebx int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 11219b: 8b 43 1c mov 0x1c(%ebx),%eax 11219e: 89 45 e4 mov %eax,-0x1c(%ebp) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 1121a1: 83 7b 20 01 cmpl $0x1,0x20(%ebx) 1121a5: 75 14 jne 1121bb <== ALWAYS TAKEN 1121a7: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED 1121ab: 75 0e jne 1121bb <== NOT EXECUTED 1121ad: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 1121b1: 74 08 je 1121bb <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 1121b3: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED 1121b6: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 1121b9: eb 3d jmp 1121f8 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 1121bb: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 1121c2: 31 c0 xor %eax,%eax fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 1121c4: 8d 55 e4 lea -0x1c(%ebp),%edx return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 1121c7: eb 1f jmp 1121e8 { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 1121c9: 51 push %ecx 1121ca: 52 push %edx 1121cb: 57 push %edi 1121cc: 56 push %esi 1121cd: 89 55 d4 mov %edx,-0x2c(%ebp) 1121d0: e8 2b 59 00 00 call 117b00 if ( rc != RC_OK ) 1121d5: 83 c4 10 add $0x10,%esp 1121d8: 85 c0 test %eax,%eax 1121da: 8b 55 d4 mov -0x2c(%ebp),%edx 1121dd: 75 1b jne 1121fa <== NEVER TAKEN return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 1121df: 0f b7 46 06 movzwl 0x6(%esi),%eax 1121e3: 01 43 18 add %eax,0x18(%ebx) fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; 1121e6: 89 f8 mov %edi,%eax return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 1121e8: 8b 7d e4 mov -0x1c(%ebp),%edi 1121eb: 8b 4e 0c mov 0xc(%esi),%ecx 1121ee: 21 f9 and %edi,%ecx 1121f0: 3b 4e 10 cmp 0x10(%esi),%ecx 1121f3: 72 d4 jb 1121c9 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 1121f5: 89 43 3c mov %eax,0x3c(%ebx) 1121f8: 31 c0 xor %eax,%eax return rc; } 1121fa: 8d 65 f4 lea -0xc(%ebp),%esp 1121fd: 5b pop %ebx 1121fe: 5e pop %esi 1121ff: 5f pop %edi 112200: 5d pop %ebp 112201: c3 ret =============================================================================== 00111b5a : fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 111b5a: 55 push %ebp 111b5b: 89 e5 mov %esp,%ebp 111b5d: 57 push %edi 111b5e: 56 push %esi 111b5f: 53 push %ebx 111b60: 83 ec 1c sub $0x1c,%esp 111b63: 8b 7d 08 mov 0x8(%ebp),%edi 111b66: 8b 75 0c mov 0xc(%ebp),%esi 111b69: 8b 55 10 mov 0x10(%ebp),%edx int rc = RC_OK; uint32_t cur_cln = 0; 111b6c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 111b73: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if ( new_length >= fat_fd->fat_file_size ) 111b7a: 8b 46 18 mov 0x18(%esi),%eax 111b7d: 39 c2 cmp %eax,%edx 111b7f: 72 07 jb 111b88 return rc; 111b81: 31 c0 xor %eax,%eax 111b83: e9 a8 00 00 00 jmp 111c30 assert(fat_fd->fat_file_size); 111b88: 85 c0 test %eax,%eax 111b8a: 75 19 jne 111ba5 <== ALWAYS TAKEN 111b8c: 68 b8 86 12 00 push $0x1286b8 <== NOT EXECUTED 111b91: 68 18 87 12 00 push $0x128718 <== NOT EXECUTED 111b96: 68 7d 02 00 00 push $0x27d <== NOT EXECUTED 111b9b: 68 ce 86 12 00 push $0x1286ce <== NOT EXECUTED 111ba0: e8 17 1b 00 00 call 1136bc <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 111ba5: 0f b6 4f 08 movzbl 0x8(%edi),%ecx 111ba9: 0f b7 5f 06 movzwl 0x6(%edi),%ebx 111bad: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx 111bb1: d3 eb shr %cl,%ebx if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 111bb3: 89 da mov %ebx,%edx 111bb5: d3 e2 shl %cl,%edx 111bb7: 39 c2 cmp %eax,%edx 111bb9: 73 c6 jae 111b81 return RC_OK; if (cl_start != 0) 111bbb: 85 db test %ebx,%ebx 111bbd: 75 1b jne 111bda if (rc != RC_OK) return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 111bbf: 83 ec 0c sub $0xc,%esp 111bc2: 8d 45 e0 lea -0x20(%ebp),%eax 111bc5: 50 push %eax 111bc6: 89 d9 mov %ebx,%ecx 111bc8: 89 f2 mov %esi,%edx 111bca: 89 f8 mov %edi,%eax 111bcc: e8 48 fc ff ff call 111819 if (rc != RC_OK) 111bd1: 83 c4 10 add $0x10,%esp 111bd4: 85 c0 test %eax,%eax 111bd6: 75 58 jne 111c30 <== NEVER TAKEN 111bd8: eb 1c jmp 111bf6 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 111bda: 83 ec 0c sub $0xc,%esp 111bdd: 8d 4b ff lea -0x1(%ebx),%ecx 111be0: 8d 45 e4 lea -0x1c(%ebp),%eax 111be3: 50 push %eax 111be4: 89 f2 mov %esi,%edx 111be6: 89 f8 mov %edi,%eax 111be8: e8 2c fc ff ff call 111819 if (rc != RC_OK) 111bed: 83 c4 10 add $0x10,%esp 111bf0: 85 c0 test %eax,%eax 111bf2: 74 cb je 111bbf <== ALWAYS TAKEN 111bf4: eb 3a jmp 111c30 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 111bf6: 50 push %eax 111bf7: 50 push %eax 111bf8: ff 75 e0 pushl -0x20(%ebp) 111bfb: 57 push %edi 111bfc: e8 61 62 00 00 call 117e62 if (rc != RC_OK) 111c01: 83 c4 10 add $0x10,%esp 111c04: 85 c0 test %eax,%eax 111c06: 75 28 jne 111c30 <== NEVER TAKEN return rc; if (cl_start != 0) 111c08: 85 db test %ebx,%ebx 111c0a: 0f 84 71 ff ff ff je 111b81 { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 111c10: 50 push %eax 111c11: 6a ff push $0xffffffff 111c13: ff 75 e4 pushl -0x1c(%ebp) 111c16: 57 push %edi 111c17: e8 2d 60 00 00 call 117c49 if ( rc != RC_OK ) 111c1c: 83 c4 10 add $0x10,%esp 111c1f: 85 c0 test %eax,%eax 111c21: 75 0d jne 111c30 <== NEVER TAKEN return rc; fat_fd->map.file_cln = cl_start - 1; 111c23: 4b dec %ebx 111c24: 89 5e 34 mov %ebx,0x34(%esi) fat_fd->map.disk_cln = new_last_cln; 111c27: 8b 55 e4 mov -0x1c(%ebp),%edx 111c2a: 89 56 38 mov %edx,0x38(%esi) fat_fd->map.last_cln = new_last_cln; 111c2d: 89 56 3c mov %edx,0x3c(%esi) } return RC_OK; } 111c30: 8d 65 f4 lea -0xc(%ebp),%esp 111c33: 5b pop %ebx 111c34: 5e pop %esi 111c35: 5f pop %edi 111c36: 5d pop %ebp 111c37: c3 ret =============================================================================== 00111f82 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 111f82: 55 push %ebp 111f83: 89 e5 mov %esp,%ebp 111f85: 57 push %edi 111f86: 56 push %esi 111f87: 53 push %ebx 111f88: 83 ec 3c sub $0x3c,%esp 111f8b: 8b 5d 08 mov 0x8(%ebp),%ebx 111f8e: 8b 75 0c mov 0xc(%ebp),%esi 111f91: 8b 7d 10 mov 0x10(%ebp),%edi 111f94: 8b 4d 14 mov 0x14(%ebp),%ecx int rc = 0; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 111f97: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 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; 111f9e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) bool zero_fill = start > fat_fd->fat_file_size; 111fa5: 8b 56 18 mov 0x18(%esi),%edx if ( count == 0 ) return cmpltd; 111fa8: 31 c0 xor %eax,%eax uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; if ( count == 0 ) 111faa: 85 c9 test %ecx,%ecx 111fac: 0f 84 8b 01 00 00 je 11213d <== NEVER TAKEN return cmpltd; if (start >= fat_fd->size_limit) 111fb2: 8b 46 14 mov 0x14(%esi),%eax 111fb5: 39 c7 cmp %eax,%edi 111fb7: 72 10 jb 111fc9 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EFBIG); 111fb9: e8 52 78 00 00 call 119810 <__errno> <== NOT EXECUTED 111fbe: c7 00 1b 00 00 00 movl $0x1b,(%eax) <== NOT EXECUTED 111fc4: e9 71 01 00 00 jmp 11213a <== NOT EXECUTED 111fc9: 29 f8 sub %edi,%eax 111fcb: 89 45 d0 mov %eax,-0x30(%ebp) 111fce: 39 c8 cmp %ecx,%eax 111fd0: 76 03 jbe 111fd5 <== NEVER TAKEN 111fd2: 89 4d d0 mov %ecx,-0x30(%ebp) if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 111fd5: 8b 4d d0 mov -0x30(%ebp),%ecx 111fd8: 01 f9 add %edi,%ecx 111fda: 83 ec 0c sub $0xc,%esp 111fdd: 8d 45 e4 lea -0x1c(%ebp),%eax 111fe0: 50 push %eax 111fe1: 51 push %ecx uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 111fe2: 31 c0 xor %eax,%eax 111fe4: 39 d7 cmp %edx,%edi 111fe6: 0f 97 c0 seta %al rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 111fe9: 50 push %eax 111fea: 56 push %esi 111feb: 53 push %ebx 111fec: 89 4d c0 mov %ecx,-0x40(%ebp) 111fef: e8 70 fd ff ff call 111d64 if (rc != RC_OK) 111ff4: 83 c4 20 add $0x20,%esp 111ff7: 85 c0 test %eax,%eax 111ff9: 8b 4d c0 mov -0x40(%ebp),%ecx 111ffc: 0f 85 3b 01 00 00 jne 11213d <== NEVER TAKEN /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 112002: 8b 45 e4 mov -0x1c(%ebp),%eax 112005: 39 c8 cmp %ecx,%eax 112007: 74 05 je 11200e <== ALWAYS TAKEN count = c - start; 112009: 29 f8 sub %edi,%eax <== NOT EXECUTED 11200b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 11200e: 83 7e 20 01 cmpl $0x1,0x20(%esi) 112012: 75 47 jne 11205b 112014: 83 7e 24 00 cmpl $0x0,0x24(%esi) 112018: 75 41 jne 11205b <== NEVER TAKEN 11201a: f6 43 0a 03 testb $0x3,0xa(%ebx) 11201e: 74 3b je 11205b <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 112020: 8b 56 1c mov 0x1c(%esi),%edx 112023: 89 d8 mov %ebx,%eax 112025: e8 8e f7 ff ff call 1117b8 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, count, buf); 11202a: 83 ec 0c sub $0xc,%esp 11202d: ff 75 18 pushl 0x18(%ebp) 112030: ff 75 d0 pushl -0x30(%ebp) if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 112033: 0f b7 13 movzwl (%ebx),%edx 112036: 4a dec %edx 112037: 21 fa and %edi,%edx ret = _fat_block_write(fs_info, sec, byte, count, buf); 112039: 52 push %edx if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 11203a: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 11203e: 89 fa mov %edi,%edx 112040: d3 ea shr %cl,%edx 112042: 01 d0 add %edx,%eax byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, count, buf); 112044: 50 push %eax 112045: 53 push %ebx 112046: e8 09 05 00 00 call 112554 <_fat_block_write> if ( ret < 0 ) 11204b: 83 c4 20 add $0x20,%esp 11204e: 85 c0 test %eax,%eax 112050: 0f 89 e7 00 00 00 jns 11213d <== ALWAYS TAKEN 112056: e9 df 00 00 00 jmp 11213a <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 11205b: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 11205f: 89 f8 mov %edi,%eax 112061: d3 e8 shr %cl,%eax 112063: 89 45 c4 mov %eax,-0x3c(%ebp) save_ofs = ofs = start & (fs_info->vol.bpc - 1); 112066: 66 8b 4b 06 mov 0x6(%ebx),%cx 11206a: 66 89 4d cc mov %cx,-0x34(%ebp) rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 11206e: 83 ec 0c sub $0xc,%esp 112071: 8d 45 e0 lea -0x20(%ebp),%eax 112074: 89 45 d4 mov %eax,-0x2c(%ebp) 112077: 50 push %eax 112078: 8b 4d c4 mov -0x3c(%ebp),%ecx 11207b: 89 f2 mov %esi,%edx 11207d: 89 d8 mov %ebx,%eax 11207f: e8 95 f7 ff ff call 111819 if (rc != RC_OK) 112084: 83 c4 10 add $0x10,%esp 112087: 85 c0 test %eax,%eax 112089: 0f 85 ae 00 00 00 jne 11213d <== NEVER TAKEN return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 11208f: 0f b7 45 cc movzwl -0x34(%ebp),%eax 112093: 48 dec %eax 112094: 21 f8 and %edi,%eax 112096: 89 45 c8 mov %eax,-0x38(%ebp) 112099: 89 c7 mov %eax,%edi 11209b: 31 d2 xor %edx,%edx 11209d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 1120a4: eb 70 jmp 112116 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 1120a6: 0f b7 4b 06 movzwl 0x6(%ebx),%ecx 1120aa: 29 f9 sub %edi,%ecx 1120ac: 3b 4d d0 cmp -0x30(%ebp),%ecx 1120af: 76 03 jbe 1120b4 1120b1: 8b 4d d0 mov -0x30(%ebp),%ecx 1120b4: 89 4d e4 mov %ecx,-0x1c(%ebp) sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 1120b7: 8b 55 e0 mov -0x20(%ebp),%edx 1120ba: 89 d8 mov %ebx,%eax 1120bc: 89 4d c0 mov %ecx,-0x40(%ebp) 1120bf: e8 f4 f6 ff ff call 1117b8 sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); 1120c4: 83 ec 0c sub $0xc,%esp 1120c7: 8b 55 18 mov 0x18(%ebp),%edx 1120ca: 03 55 cc add -0x34(%ebp),%edx 1120cd: 52 push %edx 1120ce: 8b 4d c0 mov -0x40(%ebp),%ecx 1120d1: 51 push %ecx { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 1120d2: 0f b7 13 movzwl (%ebx),%edx 1120d5: 4a dec %edx 1120d6: 21 fa and %edi,%edx ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); 1120d8: 52 push %edx while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 1120d9: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 1120dd: d3 ef shr %cl,%edi 1120df: 01 f8 add %edi,%eax byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); 1120e1: 50 push %eax 1120e2: 53 push %ebx 1120e3: e8 6c 04 00 00 call 112554 <_fat_block_write> if ( ret < 0 ) 1120e8: 83 c4 20 add $0x20,%esp 1120eb: 85 c0 test %eax,%eax 1120ed: 78 4b js 11213a <== NEVER TAKEN return -1; count -= c; 1120ef: 8b 45 e4 mov -0x1c(%ebp),%eax 1120f2: 29 45 d0 sub %eax,-0x30(%ebp) cmpltd += c; 1120f5: 01 45 cc add %eax,-0x34(%ebp) save_cln = cur_cln; 1120f8: 8b 55 e0 mov -0x20(%ebp),%edx rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 1120fb: 50 push %eax 1120fc: 8d 7d e0 lea -0x20(%ebp),%edi 1120ff: 57 push %edi 112100: 52 push %edx 112101: 53 push %ebx 112102: 89 55 c0 mov %edx,-0x40(%ebp) 112105: e8 f6 59 00 00 call 117b00 if ( rc != RC_OK ) return rc; ofs = 0; 11210a: 31 ff xor %edi,%edi count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) 11210c: 83 c4 10 add $0x10,%esp 11210f: 85 c0 test %eax,%eax 112111: 8b 55 c0 mov -0x40(%ebp),%edx 112114: 75 27 jne 11213d <== NEVER TAKEN rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 112116: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 11211a: 75 8a jne 1120a6 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 11211c: 8b 4d cc mov -0x34(%ebp),%ecx 11211f: 8b 7d c8 mov -0x38(%ebp),%edi 112122: 8d 44 39 ff lea -0x1(%ecx,%edi,1),%eax 112126: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx 11212a: d3 e8 shr %cl,%eax ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 11212c: 03 45 c4 add -0x3c(%ebp),%eax 11212f: 89 46 34 mov %eax,0x34(%esi) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 112132: 89 56 38 mov %edx,0x38(%esi) return cmpltd; 112135: 8b 45 cc mov -0x34(%ebp),%eax 112138: eb 03 jmp 11213d sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 11213a: 83 c8 ff or $0xffffffff,%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; } 11213d: 8d 65 f4 lea -0xc(%ebp),%esp 112140: 5b pop %ebx 112141: 5e pop %esi 112142: 5f pop %edi 112143: 5d pop %ebp 112144: c3 ret =============================================================================== 00117e62 : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 117e62: 55 push %ebp 117e63: 89 e5 mov %esp,%ebp 117e65: 57 push %edi 117e66: 56 push %esi 117e67: 53 push %ebx 117e68: 83 ec 2c sub $0x2c,%esp 117e6b: 8b 5d 08 mov 0x8(%ebp),%ebx int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 117e6e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; 117e75: 8b 55 0c mov 0xc(%ebp),%edx uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 117e78: 31 f6 xor %esi,%esi fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 117e7a: 31 ff xor %edi,%edi 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) 117e7c: eb 53 jmp 117ed1 { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 117e7e: 51 push %ecx 117e7f: 8d 45 e4 lea -0x1c(%ebp),%eax 117e82: 50 push %eax 117e83: 52 push %edx 117e84: 53 push %ebx 117e85: 89 55 d4 mov %edx,-0x2c(%ebp) 117e88: e8 73 fc ff ff call 117b00 117e8d: 89 c1 mov %eax,%ecx if ( rc != RC_OK ) 117e8f: 83 c4 10 add $0x10,%esp 117e92: 85 c0 test %eax,%eax 117e94: 8b 55 d4 mov -0x2c(%ebp),%edx 117e97: 74 21 je 117eba <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 117e99: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 117e9c: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 117e9f: 74 05 je 117ea6 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 117ea1: 01 c6 add %eax,%esi <== NOT EXECUTED 117ea3: 89 73 40 mov %esi,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 117ea6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 117ea9: 53 push %ebx <== NOT EXECUTED 117eaa: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 117ead: e8 07 a5 ff ff call 1123b9 <== NOT EXECUTED 117eb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117eb5: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 117eb8: eb 42 jmp 117efc <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 117eba: 50 push %eax 117ebb: 6a 00 push $0x0 117ebd: 52 push %edx 117ebe: 53 push %ebx 117ebf: e8 85 fd ff ff call 117c49 if ( rc != RC_OK ) 117ec4: 83 c4 10 add $0x10,%esp 117ec7: 85 c0 test %eax,%eax 117ec9: 74 02 je 117ecd <== ALWAYS TAKEN 117ecb: 89 c7 mov %eax,%edi <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 117ecd: 46 inc %esi cur_cln = next_cln; 117ece: 8b 55 e4 mov -0x1c(%ebp),%edx int rc = RC_OK, rc1 = RC_OK; 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) 117ed1: 8b 43 0c mov 0xc(%ebx),%eax 117ed4: 21 d0 and %edx,%eax 117ed6: 3b 43 10 cmp 0x10(%ebx),%eax 117ed9: 72 a3 jb 117e7e freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 117edb: 8b 45 0c mov 0xc(%ebp),%eax 117ede: 89 43 44 mov %eax,0x44(%ebx) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 117ee1: 8b 43 40 mov 0x40(%ebx),%eax 117ee4: 83 f8 ff cmp $0xffffffff,%eax 117ee7: 74 05 je 117eee <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; 117ee9: 01 c6 add %eax,%esi <== NOT EXECUTED 117eeb: 89 73 40 mov %esi,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 117eee: 83 ec 0c sub $0xc,%esp 117ef1: 53 push %ebx 117ef2: e8 c2 a4 ff ff call 1123b9 117ef7: 83 c4 10 add $0x10,%esp 117efa: 89 f9 mov %edi,%ecx if (rc1 != RC_OK) return rc1; return RC_OK; } 117efc: 89 c8 mov %ecx,%eax 117efe: 8d 65 f4 lea -0xc(%ebp),%esp 117f01: 5b pop %ebx 117f02: 5e pop %esi 117f03: 5f pop %edi 117f04: 5d pop %ebp 117f05: c3 ret =============================================================================== 00112835 : void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 112835: 55 push %ebp <== NOT EXECUTED 112836: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112838: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 11283b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 11283e: 2b 4a 74 sub 0x74(%edx),%ecx <== NOT EXECUTED 112841: 89 c8 mov %ecx,%eax <== NOT EXECUTED 112843: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 112846: 03 42 68 add 0x68(%edx),%eax <== NOT EXECUTED 112849: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 11284c: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 112851: d3 e2 shl %cl,%edx <== NOT EXECUTED 112853: f7 d2 not %edx <== NOT EXECUTED 112855: 20 10 and %dl,(%eax) <== NOT EXECUTED } 112857: 5d pop %ebp <== NOT EXECUTED 112858: c3 ret <== NOT EXECUTED =============================================================================== 00117b00 : fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 117b00: 55 push %ebp 117b01: 89 e5 mov %esp,%ebp 117b03: 57 push %edi 117b04: 56 push %esi 117b05: 53 push %ebx 117b06: 83 ec 2c sub $0x2c,%esp 117b09: 8b 75 08 mov 0x8(%ebp),%esi 117b0c: 8b 5d 10 mov 0x10(%ebp),%ebx int rc = RC_OK; rtems_bdbuf_buffer *block0 = NULL; 117b0f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 117b16: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 117b1a: 0f 86 0d 01 00 00 jbe 117c2d <== NEVER TAKEN 117b20: 8b 46 34 mov 0x34(%esi),%eax 117b23: 40 inc %eax 117b24: 39 45 0c cmp %eax,0xc(%ebp) 117b27: 76 05 jbe 117b2e <== ALWAYS TAKEN 117b29: e9 ff 00 00 00 jmp 117c2d <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 117b2e: 8a 56 0a mov 0xa(%esi),%dl 117b31: 88 d0 mov %dl,%al 117b33: 8b 7d 0c mov 0xc(%ebp),%edi 117b36: 24 01 and $0x1,%al 117b38: 74 07 je 117b41 <== NEVER TAKEN 117b3a: d1 ef shr %edi 117b3c: 03 7d 0c add 0xc(%ebp),%edi 117b3f: eb 0c jmp 117b4d 117b41: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 117b44: 74 04 je 117b4a <== NOT EXECUTED 117b46: d1 e7 shl %edi <== NOT EXECUTED 117b48: eb 03 jmp 117b4d <== NOT EXECUTED 117b4a: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED 117b4d: 0f b6 4e 02 movzbl 0x2(%esi),%ecx 117b51: d3 ef shr %cl,%edi 117b53: 8b 4e 4c mov 0x4c(%esi),%ecx 117b56: 01 cf add %ecx,%edi 117b58: 89 7d d4 mov %edi,-0x2c(%ebp) fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 117b5b: 8b 7d 0c mov 0xc(%ebp),%edi 117b5e: 84 c0 test %al,%al 117b60: 74 07 je 117b69 <== NEVER TAKEN 117b62: d1 ef shr %edi 117b64: 03 7d 0c add 0xc(%ebp),%edi 117b67: eb 0c jmp 117b75 117b69: 80 e2 02 and $0x2,%dl <== NOT EXECUTED 117b6c: 74 04 je 117b72 <== NOT EXECUTED 117b6e: d1 e7 shl %edi <== NOT EXECUTED 117b70: eb 03 jmp 117b75 <== NOT EXECUTED 117b72: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED 117b75: 8b 0e mov (%esi),%ecx 117b77: 66 89 4d d0 mov %cx,-0x30(%ebp) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 117b7b: 8d 45 e4 lea -0x1c(%ebp),%eax 117b7e: 50 push %eax 117b7f: 6a 01 push $0x1 117b81: ff 75 d4 pushl -0x2c(%ebp) 117b84: 56 push %esi 117b85: e8 7a a6 ff ff call 112204 117b8a: 89 c1 mov %eax,%ecx if (rc != RC_OK) 117b8c: 83 c4 10 add $0x10,%esp 117b8f: 85 c0 test %eax,%eax 117b91: 0f 85 a8 00 00 00 jne 117c3f <== NEVER TAKEN 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); 117b97: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 117b9b: 48 dec %eax 117b9c: 21 f8 and %edi,%eax rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 117b9e: 8a 56 0a mov 0xa(%esi),%dl 117ba1: 80 fa 02 cmp $0x2,%dl 117ba4: 74 6e je 117c14 <== NEVER TAKEN 117ba6: 80 fa 04 cmp $0x4,%dl 117ba9: 74 75 je 117c20 <== NEVER TAKEN 117bab: fe ca dec %dl 117bad: 75 7e jne 117c2d <== NEVER TAKEN 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))); 117baf: 8b 55 e4 mov -0x1c(%ebp),%edx 117bb2: 8b 52 1c mov 0x1c(%edx),%edx 117bb5: 0f b6 3c 02 movzbl (%edx,%eax,1),%edi 117bb9: 89 7d d0 mov %edi,-0x30(%ebp) 117bbc: 89 3b mov %edi,(%ebx) if ( ofs == (fs_info->vol.bps - 1) ) 117bbe: 0f b7 3e movzwl (%esi),%edi 117bc1: 4f dec %edi 117bc2: 39 f8 cmp %edi,%eax 117bc4: 75 2e jne 117bf4 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 117bc6: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 117bc9: 50 push %eax <== NOT EXECUTED 117bca: 6a 01 push $0x1 <== NOT EXECUTED 117bcc: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 117bcf: 47 inc %edi <== NOT EXECUTED 117bd0: 57 push %edi <== NOT EXECUTED 117bd1: 56 push %esi <== NOT EXECUTED 117bd2: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 117bd5: e8 2a a6 ff ff call 112204 <== NOT EXECUTED &block0); if (rc != RC_OK) 117bda: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117bdd: 85 c0 test %eax,%eax <== NOT EXECUTED 117bdf: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 117be2: 75 59 jne 117c3d <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 117be4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 117be7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 117bea: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED 117bed: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 117bf0: 09 03 or %eax,(%ebx) <== NOT EXECUTED 117bf2: eb 0d jmp 117c01 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 117bf4: 0f b6 44 02 01 movzbl 0x1(%edx,%eax,1),%eax 117bf9: c1 e0 08 shl $0x8,%eax 117bfc: 0b 45 d0 or -0x30(%ebp),%eax 117bff: 89 03 mov %eax,(%ebx) } if ( FAT_CLUSTER_IS_ODD(cln) ) 117c01: f6 45 0c 01 testb $0x1,0xc(%ebp) 117c05: 74 05 je 117c0c *ret_val = (*ret_val) >> FAT12_SHIFT; 117c07: c1 2b 04 shrl $0x4,(%ebx) 117c0a: eb 33 jmp 117c3f else *ret_val = (*ret_val) & FAT_FAT12_MASK; 117c0c: 81 23 ff 0f 00 00 andl $0xfff,(%ebx) 117c12: eb 2b jmp 117c3f break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 117c14: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117c17: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED 117c1a: 0f b7 04 02 movzwl (%edx,%eax,1),%eax <== NOT EXECUTED 117c1e: eb 09 jmp 117c29 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 117c20: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117c23: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED 117c26: 8b 04 02 mov (%edx,%eax,1),%eax <== NOT EXECUTED 117c29: 89 03 mov %eax,(%ebx) <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); break; 117c2b: eb 12 jmp 117c3f <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 117c2d: e8 de 1b 00 00 call 119810 <__errno> <== NOT EXECUTED 117c32: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 117c38: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 117c3b: eb 02 jmp 117c3f <== NOT EXECUTED *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, &block0); if (rc != RC_OK) 117c3d: 89 c1 mov %eax,%ecx <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 117c3f: 89 c8 mov %ecx,%eax 117c41: 8d 65 f4 lea -0xc(%ebp),%esp 117c44: 5b pop %ebx 117c45: 5e pop %esi 117c46: 5f pop %edi 117c47: 5d pop %ebp 117c48: c3 ret =============================================================================== 0011279b : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 11279b: 55 push %ebp <== NOT EXECUTED 11279c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11279e: 57 push %edi <== NOT EXECUTED 11279f: 56 push %esi <== NOT EXECUTED 1127a0: 53 push %ebx <== NOT EXECUTED 1127a1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 1127a4: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 1127a7: eb 7a jmp 112823 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 1127a9: 8b 73 6c mov 0x6c(%ebx),%esi <== NOT EXECUTED 1127ac: 89 f0 mov %esi,%eax <== NOT EXECUTED 1127ae: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 1127b1: 03 43 68 add 0x68(%ebx),%eax <== NOT EXECUTED 1127b4: 8a 08 mov (%eax),%cl <== NOT EXECUTED 1127b6: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 1127b9: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1127bb: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 1127be: 0f be 7d e3 movsbl -0x1d(%ebp),%edi <== NOT EXECUTED 1127c2: 0f a3 cf bt %ecx,%edi <== NOT EXECUTED 1127c5: 72 14 jb 1127db <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 1127c7: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1127cc: d3 e2 shl %cl,%edx <== NOT EXECUTED 1127ce: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED 1127d1: 88 10 mov %dl,(%eax) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 1127d3: 8b 43 6c mov 0x6c(%ebx),%eax <== NOT EXECUTED 1127d6: 03 43 74 add 0x74(%ebx),%eax <== NOT EXECUTED 1127d9: eb 52 jmp 11282d <== NOT EXECUTED } fs_info->index++; 1127db: 46 inc %esi <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 1127dc: 3b 75 e4 cmp -0x1c(%ebp),%esi <== NOT EXECUTED 1127df: 73 05 jae 1127e6 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 1127e1: 89 73 6c mov %esi,0x6c(%ebx) <== NOT EXECUTED 1127e4: eb 07 jmp 1127ed <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 1127e6: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 1127ed: 42 inc %edx <== NOT EXECUTED 1127ee: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED 1127f1: 75 b6 jne 1127a9 <== 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)) 1127f3: d1 e2 shl %edx <== NOT EXECUTED 1127f5: b8 ff ff ff 0f mov $0xfffffff,%eax <== NOT EXECUTED 1127fa: 2b 43 74 sub 0x74(%ebx),%eax <== NOT EXECUTED 1127fd: 39 c2 cmp %eax,%edx <== NOT EXECUTED 1127ff: 72 04 jb 112805 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 112801: 31 c0 xor %eax,%eax <== NOT EXECUTED 112803: eb 28 jmp 11282d <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 112805: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 112808: 51 push %ecx <== NOT EXECUTED 112809: 51 push %ecx <== NOT EXECUTED 11280a: 52 push %edx <== NOT EXECUTED 11280b: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 11280e: e8 c5 59 ff ff call 1081d8 <== NOT EXECUTED 112813: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED if (fs_info->uino != NULL) 112816: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112819: 85 c0 test %eax,%eax <== NOT EXECUTED 11281b: 74 e4 je 112801 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 11281d: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 112820: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 112823: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 112826: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 112829: 31 d2 xor %edx,%edx <== NOT EXECUTED 11282b: eb c1 jmp 1127ee <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 11282d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112830: 5b pop %ebx <== NOT EXECUTED 112831: 5e pop %esi <== NOT EXECUTED 112832: 5f pop %edi <== NOT EXECUTED 112833: 5d pop %ebp <== NOT EXECUTED 112834: c3 ret <== NOT EXECUTED =============================================================================== 001126fb : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 1126fb: 55 push %ebp 1126fc: 89 e5 mov %esp,%ebp 1126fe: 57 push %edi 1126ff: 56 push %esi 112700: 53 push %ebx 112701: 83 ec 34 sub $0x34,%esp 112704: 8b 5d 08 mov 0x8(%ebp),%ebx int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 112707: 8b 45 0c mov 0xc(%ebp),%eax 11270a: 89 45 e4 mov %eax,-0x1c(%ebp) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 11270d: 6a 01 push $0x1 11270f: 0f b7 43 06 movzwl 0x6(%ebx),%eax 112713: 50 push %eax 112714: e8 a7 48 ff ff call 106fc0 112719: 89 c6 mov %eax,%esi if ( buf == NULL ) 11271b: 83 c4 10 add $0x10,%esp { free(buf); return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 11271e: 8d 7d e4 lea -0x1c(%ebp),%edi ssize_t ret = 0; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) 112721: 85 c0 test %eax,%eax 112723: 75 53 jne 112778 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 112725: e8 e6 70 00 00 call 119810 <__errno> <== NOT EXECUTED 11272a: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 112730: eb 1b jmp 11274d <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(fs_info, cur_cln, buf); 112732: 52 push %edx 112733: 56 push %esi 112734: 50 push %eax 112735: 53 push %ebx 112736: e8 7b ff ff ff call 1126b6 if ( ret == -1 ) 11273b: 83 c4 10 add $0x10,%esp 11273e: 40 inc %eax 11273f: 75 11 jne 112752 <== ALWAYS TAKEN { free(buf); 112741: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112744: 56 push %esi <== NOT EXECUTED 112745: e8 e2 4a ff ff call 10722c <== NOT EXECUTED 11274a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 11274d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 112750: eb 41 jmp 112793 <== NOT EXECUTED } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 112752: 50 push %eax 112753: 57 push %edi 112754: ff 75 e4 pushl -0x1c(%ebp) 112757: 53 push %ebx 112758: e8 a3 53 00 00 call 117b00 if ( rc != RC_OK ) 11275d: 83 c4 10 add $0x10,%esp 112760: 85 c0 test %eax,%eax 112762: 74 14 je 112778 <== ALWAYS TAKEN { free(buf); 112764: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112767: 56 push %esi <== NOT EXECUTED 112768: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 11276b: e8 bc 4a ff ff call 10722c <== NOT EXECUTED 112770: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112773: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 112776: eb 1b jmp 112793 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 112778: 8b 45 e4 mov -0x1c(%ebp),%eax 11277b: 8b 53 0c mov 0xc(%ebx),%edx 11277e: 21 c2 and %eax,%edx 112780: 3b 53 10 cmp 0x10(%ebx),%edx 112783: 72 ad jb 112732 free(buf); return rc; } } free(buf); 112785: 83 ec 0c sub $0xc,%esp 112788: 56 push %esi 112789: e8 9e 4a ff ff call 10722c 11278e: 83 c4 10 add $0x10,%esp 112791: 31 c0 xor %eax,%eax return rc; } 112793: 8d 65 f4 lea -0xc(%ebp),%esp 112796: 5b pop %ebx 112797: 5e pop %esi 112798: 5f pop %edi 112799: 5d pop %ebp 11279a: c3 ret =============================================================================== 001129c7 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 1129c7: 55 push %ebp 1129c8: 89 e5 mov %esp,%ebp 1129ca: 57 push %edi 1129cb: 56 push %esi 1129cc: 53 push %ebx 1129cd: 81 ec 14 01 00 00 sub $0x114,%esp 1129d3: 8b 5d 08 mov 0x8(%ebp),%ebx 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; 1129d6: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp) vol->fd = open(device, O_RDWR); 1129dd: 6a 02 push $0x2 1129df: ff 75 0c pushl 0xc(%ebp) 1129e2: e8 09 56 ff ff call 107ff0 1129e7: 89 43 54 mov %eax,0x54(%ebx) if (vol->fd < 0) 1129ea: 83 c4 10 add $0x10,%esp 1129ed: 85 c0 test %eax,%eax 1129ef: 79 10 jns 112a01 <== ALWAYS TAKEN { rtems_set_errno_and_return_minus_one(ENXIO); 1129f1: e8 1a 6e 00 00 call 119810 <__errno> <== NOT EXECUTED 1129f6: c7 00 06 00 00 00 movl $0x6,(%eax) <== NOT EXECUTED 1129fc: e9 6a 06 00 00 jmp 11306b <== NOT EXECUTED } rc = fstat(vol->fd, &stat_buf); 112a01: 52 push %edx 112a02: 52 push %edx 112a03: 8d 55 a0 lea -0x60(%ebp),%edx 112a06: 52 push %edx 112a07: 50 push %eax 112a08: e8 93 0e 00 00 call 1138a0 if (rc != 0) 112a0d: 83 c4 10 add $0x10,%esp 112a10: 85 c0 test %eax,%eax 112a12: 74 02 je 112a16 <== ALWAYS TAKEN 112a14: eb 2c jmp 112a42 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 112a16: 8b 45 ac mov -0x54(%ebp),%eax 112a19: 25 00 f0 00 00 and $0xf000,%eax 112a1e: 3d 00 60 00 00 cmp $0x6000,%eax 112a23: 74 02 je 112a27 <== ALWAYS TAKEN 112a25: eb 1b jmp 112a42 <== NOT EXECUTED static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 112a27: 50 push %eax close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); 112a28: 8d 43 58 lea 0x58(%ebx),%eax 112a2b: 50 push %eax 112a2c: 68 09 42 04 40 push $0x40044209 112a31: ff 73 54 pushl 0x54(%ebx) 112a34: e8 3f 49 ff ff call 107378 112a39: 89 c6 mov %eax,%esi if (rc != 0) { 112a3b: 83 c4 10 add $0x10,%esp 112a3e: 85 c0 test %eax,%eax 112a40: 74 1b je 112a5d <== ALWAYS TAKEN close(vol->fd); 112a42: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112a45: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112a48: e8 af 45 ff ff call 106ffc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 112a4d: e8 be 6d 00 00 call 119810 <__errno> <== NOT EXECUTED 112a52: c7 00 06 00 00 00 movl $0x6,(%eax) <== NOT EXECUTED 112a58: e9 0b 06 00 00 jmp 113068 <== NOT EXECUTED } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 112a5d: 50 push %eax 112a5e: 8d 45 90 lea -0x70(%ebp),%eax 112a61: 50 push %eax 112a62: 6a 00 push $0x0 112a64: ff 73 58 pushl 0x58(%ebx) 112a67: e8 a5 e3 ff ff call 110e11 if (sc != RTEMS_SUCCESSFUL) 112a6c: 83 c4 10 add $0x10,%esp 112a6f: 85 c0 test %eax,%eax 112a71: 74 05 je 112a78 <== ALWAYS TAKEN 112a73: e9 ec 00 00 00 jmp 112b64 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 112a78: 8b 55 90 mov -0x70(%ebp),%edx 112a7b: 8b 42 1c mov 0x1c(%edx),%eax 112a7e: 8a 48 0b mov 0xb(%eax),%cl 112a81: 88 8d 78 ff ff ff mov %cl,-0x88(%ebp) 112a87: 0f b6 78 0c movzbl 0xc(%eax),%edi 112a8b: 8a 48 0d mov 0xd(%eax),%cl 112a8e: 88 4d 87 mov %cl,-0x79(%ebp) 112a91: 8a 48 0e mov 0xe(%eax),%cl 112a94: 88 8d 07 ff ff ff mov %cl,-0xf9(%ebp) 112a9a: 8a 48 0f mov 0xf(%eax),%cl 112a9d: 88 8d e8 fe ff ff mov %cl,-0x118(%ebp) 112aa3: 8a 48 10 mov 0x10(%eax),%cl 112aa6: 88 4d 85 mov %cl,-0x7b(%ebp) 112aa9: 8a 48 11 mov 0x11(%eax),%cl 112aac: 88 8d 06 ff ff ff mov %cl,-0xfa(%ebp) 112ab2: 8a 48 12 mov 0x12(%eax),%cl 112ab5: 88 8d 18 ff ff ff mov %cl,-0xe8(%ebp) 112abb: 8a 48 13 mov 0x13(%eax),%cl 112abe: 88 8d 7a ff ff ff mov %cl,-0x86(%ebp) 112ac4: 8a 48 14 mov 0x14(%eax),%cl 112ac7: 88 8d 08 ff ff ff mov %cl,-0xf8(%ebp) 112acd: 8a 48 16 mov 0x16(%eax),%cl 112ad0: 88 8d 79 ff ff ff mov %cl,-0x87(%ebp) 112ad6: 8a 48 17 mov 0x17(%eax),%cl 112ad9: 88 8d 28 ff ff ff mov %cl,-0xd8(%ebp) 112adf: 8a 48 20 mov 0x20(%eax),%cl 112ae2: 88 8d 7b ff ff ff mov %cl,-0x85(%ebp) 112ae8: 8a 48 21 mov 0x21(%eax),%cl 112aeb: 88 4d 80 mov %cl,-0x80(%ebp) 112aee: 8a 48 22 mov 0x22(%eax),%cl 112af1: 88 8d 7f ff ff ff mov %cl,-0x81(%ebp) 112af7: 8a 48 23 mov 0x23(%eax),%cl 112afa: 88 8d 38 ff ff ff mov %cl,-0xc8(%ebp) 112b00: 8a 48 24 mov 0x24(%eax),%cl 112b03: 88 8d 7e ff ff ff mov %cl,-0x82(%ebp) 112b09: 8a 48 25 mov 0x25(%eax),%cl 112b0c: 88 8d 7d ff ff ff mov %cl,-0x83(%ebp) 112b12: 8a 48 26 mov 0x26(%eax),%cl 112b15: 88 8d 7c ff ff ff mov %cl,-0x84(%ebp) 112b1b: 8a 48 27 mov 0x27(%eax),%cl 112b1e: 88 8d 68 ff ff ff mov %cl,-0x98(%ebp) 112b24: 8a 48 28 mov 0x28(%eax),%cl 112b27: 88 4d 86 mov %cl,-0x7a(%ebp) 112b2a: 8a 48 2c mov 0x2c(%eax),%cl 112b2d: 88 4d 84 mov %cl,-0x7c(%ebp) 112b30: 8a 48 2d mov 0x2d(%eax),%cl 112b33: 88 4d 83 mov %cl,-0x7d(%ebp) 112b36: 8a 48 2e mov 0x2e(%eax),%cl 112b39: 88 4d 82 mov %cl,-0x7e(%ebp) 112b3c: 8a 48 2f mov 0x2f(%eax),%cl 112b3f: 88 8d 58 ff ff ff mov %cl,-0xa8(%ebp) 112b45: 8a 48 30 mov 0x30(%eax),%cl 112b48: 88 4d 81 mov %cl,-0x7f(%ebp) 112b4b: 8a 40 31 mov 0x31(%eax),%al 112b4e: 88 85 48 ff ff ff mov %al,-0xb8(%ebp) sc = rtems_bdbuf_release( block); 112b54: 83 ec 0c sub $0xc,%esp 112b57: 52 push %edx 112b58: e8 12 e4 ff ff call 110f6f if (sc != RTEMS_SUCCESSFUL) 112b5d: 83 c4 10 add $0x10,%esp 112b60: 85 c0 test %eax,%eax 112b62: 74 1b je 112b7f <== ALWAYS TAKEN { close(vol->fd); 112b64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112b67: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112b6a: e8 8d 44 ff ff call 106ffc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 112b6f: e8 9c 6c 00 00 call 119810 <__errno> <== NOT EXECUTED 112b74: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 112b7a: e9 e9 04 00 00 jmp 113068 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 112b7f: c1 e7 08 shl $0x8,%edi 112b82: 0f b6 85 78 ff ff ff movzbl -0x88(%ebp),%eax 112b89: 09 c7 or %eax,%edi 112b8b: 66 89 3b mov %di,(%ebx) if ( (vol->bps != 512) && 112b8e: 66 81 ff 00 04 cmp $0x400,%di 112b93: 74 1a je 112baf <== NEVER TAKEN 112b95: 66 81 ff 00 02 cmp $0x200,%di 112b9a: 74 13 je 112baf <== ALWAYS TAKEN (vol->bps != 1024) && 112b9c: 66 81 ff 00 08 cmp $0x800,%di <== NOT EXECUTED 112ba1: 74 0c je 112baf <== NOT EXECUTED (vol->bps != 2048) && 112ba3: 66 81 ff 00 10 cmp $0x1000,%di <== NOT EXECUTED 112ba8: 74 05 je 112baf <== NOT EXECUTED 112baa: e9 3f 02 00 00 jmp 112dee <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 112baf: c6 43 03 00 movb $0x0,0x3(%ebx) 112bb3: 89 f8 mov %edi,%eax 112bb5: 66 c1 e8 09 shr $0x9,%ax 112bb9: 0f b7 c0 movzwl %ax,%eax 112bbc: eb 05 jmp 112bc3 i >>= 1, vol->sec_mul++); 112bbe: d1 f8 sar %eax <== NOT EXECUTED 112bc0: fe 43 03 incb 0x3(%ebx) <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 112bc3: a8 01 test $0x1,%al 112bc5: 74 f7 je 112bbe <== NEVER TAKEN i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 112bc7: c6 43 02 00 movb $0x0,0x2(%ebx) 112bcb: 0f b7 ff movzwl %di,%edi 112bce: 89 bd 00 ff ff ff mov %edi,-0x100(%ebp) 112bd4: 89 f8 mov %edi,%eax 112bd6: eb 05 jmp 112bdd i >>= 1, vol->sec_log2++); 112bd8: d1 f8 sar %eax 112bda: fe 43 02 incb 0x2(%ebx) 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; 112bdd: a8 01 test $0x1,%al 112bdf: 74 f7 je 112bd8 i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 112be1: 8a 45 87 mov -0x79(%ebp),%al 112be4: 88 43 04 mov %al,0x4(%ebx) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 112be7: 84 c0 test %al,%al 112be9: 75 05 jne 112bf0 <== ALWAYS TAKEN 112beb: e9 fe 01 00 00 jmp 112dee <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 112bf0: c6 43 05 00 movb $0x0,0x5(%ebx) 112bf4: 0f b6 45 87 movzbl -0x79(%ebp),%eax 112bf8: eb 05 jmp 112bff i >>= 1, vol->spc_log2++); 112bfa: d1 f8 sar %eax 112bfc: fe 43 05 incb 0x5(%ebx) { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 112bff: a8 01 test $0x1,%al 112c01: 74 f7 je 112bfa 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) 112c03: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx 112c07: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx 112c0d: d3 e2 shl %cl,%edx 112c0f: 89 d1 mov %edx,%ecx 112c11: 66 89 53 06 mov %dx,0x6(%ebx) 112c15: 66 81 fa 00 80 cmp $0x8000,%dx 112c1a: 76 05 jbe 112c21 <== ALWAYS TAKEN 112c1c: e9 cd 01 00 00 jmp 112dee <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 112c21: c6 43 08 00 movb $0x0,0x8(%ebx) 112c25: 81 e1 ff ff 00 00 and $0xffff,%ecx 112c2b: eb 05 jmp 112c32 i >>= 1, vol->bpc_log2++); 112c2d: d1 f9 sar %ecx 112c2f: fe 43 08 incb 0x8(%ebx) { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 112c32: f6 c1 01 test $0x1,%cl 112c35: 74 f6 je 112c2d i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 112c37: 8a 4d 85 mov -0x7b(%ebp),%cl 112c3a: 88 4b 09 mov %cl,0x9(%ebx) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 112c3d: 8a 95 e8 fe ff ff mov -0x118(%ebp),%dl 112c43: c1 e2 08 shl $0x8,%edx 112c46: 89 d7 mov %edx,%edi 112c48: 0f b6 85 07 ff ff ff movzbl -0xf9(%ebp),%eax 112c4f: 09 c7 or %eax,%edi 112c51: 66 89 7b 14 mov %di,0x14(%ebx) vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 112c55: 8a 85 18 ff ff ff mov -0xe8(%ebp),%al 112c5b: c1 e0 08 shl $0x8,%eax 112c5e: 0f b6 8d 06 ff ff ff movzbl -0xfa(%ebp),%ecx 112c65: 09 c8 or %ecx,%eax 112c67: 66 89 43 20 mov %ax,0x20(%ebx) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 112c6b: 0f b7 c0 movzwl %ax,%eax 112c6e: c1 e0 05 shl $0x5,%eax 112c71: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx 112c77: 8d 44 02 ff lea -0x1(%edx,%eax,1),%eax 112c7b: 99 cltd 112c7c: f7 bd 00 ff ff ff idivl -0x100(%ebp) 112c82: 89 43 24 mov %eax,0x24(%ebx) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 112c85: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 112c89: 89 c2 mov %eax,%edx 112c8b: d3 e2 shl %cl,%edx 112c8d: 89 53 28 mov %edx,0x28(%ebx) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 112c90: 8a 8d 28 ff ff ff mov -0xd8(%ebp),%cl 112c96: c1 e1 08 shl $0x8,%ecx 112c99: 0f b6 95 79 ff ff ff movzbl -0x87(%ebp),%edx 112ca0: 66 09 ca or %cx,%dx 112ca3: 74 05 je 112caa <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 112ca5: 0f b7 d2 movzwl %dx,%edx 112ca8: eb 2a jmp 112cd4 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 112caa: 0f b6 95 7d ff ff ff movzbl -0x83(%ebp),%edx <== NOT EXECUTED 112cb1: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 112cb4: 0f b6 8d 7c ff ff ff movzbl -0x84(%ebp),%ecx <== NOT EXECUTED 112cbb: c1 e1 10 shl $0x10,%ecx <== NOT EXECUTED 112cbe: 09 ca or %ecx,%edx <== NOT EXECUTED 112cc0: 0f b6 8d 7e ff ff ff movzbl -0x82(%ebp),%ecx <== NOT EXECUTED 112cc7: 09 ca or %ecx,%edx <== NOT EXECUTED 112cc9: 8a 8d 68 ff ff ff mov -0x98(%ebp),%cl <== NOT EXECUTED 112ccf: c1 e1 18 shl $0x18,%ecx <== NOT EXECUTED 112cd2: 09 ca or %ecx,%edx <== NOT EXECUTED 112cd4: 89 53 18 mov %edx,0x18(%ebx) vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 112cd7: 0f b7 ff movzwl %di,%edi 112cda: 0f b6 55 85 movzbl -0x7b(%ebp),%edx 112cde: 0f af 53 18 imul 0x18(%ebx),%edx 112ce2: 01 d7 add %edx,%edi 112ce4: 8d 14 38 lea (%eax,%edi,1),%edx 112ce7: 89 53 30 mov %edx,0x30(%ebx) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 112cea: 89 7b 1c mov %edi,0x1c(%ebx) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 112ced: 8a 8d 08 ff ff ff mov -0xf8(%ebp),%cl 112cf3: c1 e1 08 shl $0x8,%ecx 112cf6: 0f b6 85 7a ff ff ff movzbl -0x86(%ebp),%eax 112cfd: 66 09 c8 or %cx,%ax 112d00: 74 08 je 112d0a <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 112d02: 0f b7 c0 movzwl %ax,%eax 112d05: 89 43 2c mov %eax,0x2c(%ebx) 112d08: eb 2a jmp 112d34 else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 112d0a: 0f b6 4d 80 movzbl -0x80(%ebp),%ecx <== NOT EXECUTED 112d0e: c1 e1 08 shl $0x8,%ecx <== NOT EXECUTED 112d11: 0f b6 85 7f ff ff ff movzbl -0x81(%ebp),%eax <== NOT EXECUTED 112d18: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED 112d1b: 09 c1 or %eax,%ecx <== NOT EXECUTED 112d1d: 0f b6 85 7b ff ff ff movzbl -0x85(%ebp),%eax <== NOT EXECUTED 112d24: 09 c1 or %eax,%ecx <== NOT EXECUTED 112d26: 8a 85 38 ff ff ff mov -0xc8(%ebp),%al <== NOT EXECUTED 112d2c: c1 e0 18 shl $0x18,%eax <== NOT EXECUTED 112d2f: 09 c1 or %eax,%ecx <== NOT EXECUTED 112d31: 89 4b 2c mov %ecx,0x2c(%ebx) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 112d34: 8b 43 2c mov 0x2c(%ebx),%eax 112d37: 29 d0 sub %edx,%eax vol->data_cls = data_secs / vol->spc; 112d39: 0f b6 4d 87 movzbl -0x79(%ebp),%ecx 112d3d: 31 d2 xor %edx,%edx 112d3f: f7 f1 div %ecx 112d41: 89 43 34 mov %eax,0x34(%ebx) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 112d44: 3d f4 0f 00 00 cmp $0xff4,%eax 112d49: 77 14 ja 112d5f <== NEVER TAKEN { vol->type = FAT_FAT12; 112d4b: c6 43 0a 01 movb $0x1,0xa(%ebx) vol->mask = FAT_FAT12_MASK; 112d4f: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) vol->eoc_val = FAT_FAT12_EOC; 112d56: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) 112d5d: eb 2d jmp 112d8c } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 112d5f: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED 112d64: 77 14 ja 112d7a <== NOT EXECUTED { vol->type = FAT_FAT16; 112d66: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 112d6a: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 112d71: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED 112d78: eb 12 jmp 112d8c <== NOT EXECUTED } else { vol->type = FAT_FAT32; 112d7a: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 112d7e: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 112d85: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) 112d8c: 80 7b 0a 04 cmpb $0x4,0xa(%ebx) 112d90: 0f 85 6e 01 00 00 jne 112f04 <== ALWAYS TAKEN { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 112d96: 0f b6 45 83 movzbl -0x7d(%ebp),%eax <== NOT EXECUTED 112d9a: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 112d9d: 0f b6 55 82 movzbl -0x7e(%ebp),%edx <== NOT EXECUTED 112da1: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 112da4: 09 d0 or %edx,%eax <== NOT EXECUTED 112da6: 0f b6 55 84 movzbl -0x7c(%ebp),%edx <== NOT EXECUTED 112daa: 09 d0 or %edx,%eax <== NOT EXECUTED 112dac: 8a 95 58 ff ff ff mov -0xa8(%ebp),%dl <== NOT EXECUTED 112db2: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 112db5: 09 d0 or %edx,%eax <== NOT EXECUTED 112db7: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 112dba: 8a 45 86 mov -0x7a(%ebp),%al <== NOT EXECUTED 112dbd: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED 112dc0: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED if (vol->mirror) 112dc3: 84 c0 test %al,%al <== NOT EXECUTED 112dc5: 74 0b je 112dd2 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 112dc7: 8a 45 86 mov -0x7a(%ebp),%al <== NOT EXECUTED 112dca: 83 e0 0f and $0xf,%eax <== NOT EXECUTED 112dcd: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED 112dd0: eb 04 jmp 112dd6 <== NOT EXECUTED else vol->afat = 0; 112dd2: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 112dd6: 8a 85 48 ff ff ff mov -0xb8(%ebp),%al <== NOT EXECUTED 112ddc: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 112ddf: 0f b6 55 81 movzbl -0x7f(%ebp),%edx <== NOT EXECUTED 112de3: 09 d0 or %edx,%eax <== NOT EXECUTED 112de5: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED if( vol->info_sec == 0 ) 112de9: 66 85 c0 test %ax,%ax <== NOT EXECUTED 112dec: 75 05 jne 112df3 <== NOT EXECUTED { close(vol->fd); 112dee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112df1: eb 51 jmp 112e44 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 112df3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); 112df6: 8d 7d 94 lea -0x6c(%ebp),%edi <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 112df9: 57 push %edi <== NOT EXECUTED 112dfa: 6a 04 push $0x4 <== NOT EXECUTED 112dfc: 6a 00 push $0x0 <== NOT EXECUTED 112dfe: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 112e01: 50 push %eax <== NOT EXECUTED 112e02: 53 push %ebx <== NOT EXECUTED 112e03: e8 d7 f6 ff ff call 1124df <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 112e08: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 112e0b: 85 c0 test %eax,%eax <== NOT EXECUTED 112e0d: 79 05 jns 112e14 <== NOT EXECUTED { close(vol->fd); 112e0f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e12: eb 6f jmp 112e83 <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 112e14: 0f b6 45 95 movzbl -0x6b(%ebp),%eax <== NOT EXECUTED 112e18: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 112e1b: 0f b6 55 96 movzbl -0x6a(%ebp),%edx <== NOT EXECUTED 112e1f: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 112e22: 09 d0 or %edx,%eax <== NOT EXECUTED 112e24: 0f b6 55 94 movzbl -0x6c(%ebp),%edx <== NOT EXECUTED 112e28: 09 d0 or %edx,%eax <== NOT EXECUTED 112e2a: 0f b6 55 97 movzbl -0x69(%ebp),%edx <== NOT EXECUTED 112e2e: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 112e31: 09 d0 or %edx,%eax <== NOT EXECUTED 112e33: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED 112e38: 74 22 je 112e5c <== NOT EXECUTED FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); 112e3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e3d: 53 push %ebx <== NOT EXECUTED 112e3e: e8 25 f8 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED close(vol->fd); 112e43: 58 pop %eax <== NOT EXECUTED 112e44: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112e47: e8 b0 41 ff ff call 106ffc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 112e4c: e8 bf 69 00 00 call 119810 <__errno> <== NOT EXECUTED 112e51: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 112e57: e9 0c 02 00 00 jmp 113068 <== NOT EXECUTED } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 112e5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e5f: 57 push %edi <== NOT EXECUTED 112e60: 6a 0c push $0xc <== NOT EXECUTED 112e62: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED 112e67: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 112e6b: 50 push %eax <== NOT EXECUTED 112e6c: 53 push %ebx <== NOT EXECUTED 112e6d: e8 6d f6 ff ff call 1124df <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 112e72: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 112e75: 85 c0 test %eax,%eax <== NOT EXECUTED 112e77: 79 17 jns 112e90 <== NOT EXECUTED { _fat_block_release(fs_info); 112e79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112e7c: 53 push %ebx <== NOT EXECUTED 112e7d: e8 e6 f7 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED close(vol->fd); 112e82: 58 pop %eax <== NOT EXECUTED 112e83: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112e86: e8 71 41 ff ff call 106ffc <== NOT EXECUTED 112e8b: e9 d8 01 00 00 jmp 113068 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 112e90: 0f b6 45 99 movzbl -0x67(%ebp),%eax <== NOT EXECUTED 112e94: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 112e97: 0f b6 55 9a movzbl -0x66(%ebp),%edx <== NOT EXECUTED 112e9b: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 112e9e: 09 d0 or %edx,%eax <== NOT EXECUTED 112ea0: 0f b6 55 98 movzbl -0x68(%ebp),%edx <== NOT EXECUTED 112ea4: 09 d0 or %edx,%eax <== NOT EXECUTED 112ea6: 0f b6 55 9b movzbl -0x65(%ebp),%edx <== NOT EXECUTED 112eaa: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 112ead: 09 d0 or %edx,%eax <== NOT EXECUTED 112eaf: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 112eb2: 0f b6 45 9d movzbl -0x63(%ebp),%eax <== NOT EXECUTED 112eb6: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 112eb9: 0f b6 55 9e movzbl -0x62(%ebp),%edx <== NOT EXECUTED 112ebd: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 112ec0: 09 d0 or %edx,%eax <== NOT EXECUTED 112ec2: 0f b6 55 9c movzbl -0x64(%ebp),%edx <== NOT EXECUTED 112ec6: 09 d0 or %edx,%eax <== NOT EXECUTED 112ec8: 0f b6 55 9f movzbl -0x61(%ebp),%edx <== NOT EXECUTED 112ecc: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 112ecf: 09 d0 or %edx,%eax <== NOT EXECUTED 112ed1: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF, 112ed4: 57 push %edi <== NOT EXECUTED 112ed5: 6a ff push $0xffffffff <== NOT EXECUTED 112ed7: 6a ff push $0xffffffff <== NOT EXECUTED 112ed9: 53 push %ebx <== NOT EXECUTED 112eda: e8 8b f9 ff ff call 11286a <== NOT EXECUTED 112edf: 89 c7 mov %eax,%edi <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 112ee1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ee4: 85 c0 test %eax,%eax <== NOT EXECUTED 112ee6: 74 39 je 112f21 <== NOT EXECUTED { _fat_block_release(fs_info); 112ee8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112eeb: 53 push %ebx <== NOT EXECUTED 112eec: e8 77 f7 ff ff call 112668 <_fat_block_release> <== NOT EXECUTED close(vol->fd); 112ef1: 59 pop %ecx <== NOT EXECUTED 112ef2: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112ef5: e8 02 41 ff ff call 106ffc <== NOT EXECUTED 112efa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112efd: 89 fe mov %edi,%esi <== NOT EXECUTED 112eff: e9 6a 01 00 00 jmp 11306e <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 112f04: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) vol->mirror = 0; 112f0b: c6 43 48 00 movb $0x0,0x48(%ebx) vol->afat = 0; 112f0f: c6 43 50 00 movb $0x0,0x50(%ebx) vol->free_cls = 0xFFFFFFFF; 112f13: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) vol->next_cl = 0xFFFFFFFF; 112f1a: c7 43 44 ff ff ff ff movl $0xffffffff,0x44(%ebx) } _fat_block_release(fs_info); 112f21: 83 ec 0c sub $0xc,%esp 112f24: 53 push %ebx 112f25: e8 3e f7 ff ff call 112668 <_fat_block_release> vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 112f2a: 0f b6 43 50 movzbl 0x50(%ebx),%eax 112f2e: 0f af 43 18 imul 0x18(%ebx),%eax 112f32: 0f b7 53 14 movzwl 0x14(%ebx),%edx 112f36: 01 d0 add %edx,%eax 112f38: 89 43 4c mov %eax,0x4c(%ebx) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 112f3b: 58 pop %eax 112f3c: 5a pop %edx 112f3d: 6a 0c push $0xc 112f3f: 6a 02 push $0x2 112f41: e8 7a 40 ff ff call 106fc0 112f46: 89 43 60 mov %eax,0x60(%ebx) if ( fs_info->vhash == NULL ) 112f49: 83 c4 10 add $0x10,%esp 112f4c: 85 c0 test %eax,%eax 112f4e: 74 39 je 112f89 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 112f50: 8d 50 04 lea 0x4(%eax),%edx 112f53: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 112f55: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 112f5c: 89 40 08 mov %eax,0x8(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 112f5f: 8d 50 0c lea 0xc(%eax),%edx 112f62: 8d 48 10 lea 0x10(%eax),%ecx 112f65: 89 48 0c mov %ecx,0xc(%eax) head->next = tail; head->previous = NULL; 112f68: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 112f6f: 89 50 14 mov %edx,0x14(%eax) } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 112f72: 50 push %eax 112f73: 50 push %eax 112f74: 6a 0c push $0xc 112f76: 6a 02 push $0x2 112f78: e8 43 40 ff ff call 106fc0 112f7d: 89 43 64 mov %eax,0x64(%ebx) if ( fs_info->rhash == NULL ) 112f80: 83 c4 10 add $0x10,%esp 112f83: 85 c0 test %eax,%eax 112f85: 75 12 jne 112f99 <== ALWAYS TAKEN 112f87: eb 69 jmp 112ff2 <== 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 ) { close(vol->fd); 112f89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112f8c: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112f8f: e8 68 40 ff ff call 106ffc <== NOT EXECUTED 112f94: e9 c4 00 00 00 jmp 11305d <== NOT EXECUTED Chain_Node *tail = _Chain_Tail( the_chain ); 112f99: 8d 50 04 lea 0x4(%eax),%edx 112f9c: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 112f9e: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 112fa5: 89 40 08 mov %eax,0x8(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 112fa8: 8d 50 0c lea 0xc(%eax),%edx 112fab: 8d 48 10 lea 0x10(%eax),%ecx 112fae: 89 48 0c mov %ecx,0xc(%eax) head->next = tail; head->previous = NULL; 112fb1: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 112fb8: 89 50 14 mov %edx,0x14(%eax) rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 112fbb: c7 43 70 00 01 00 00 movl $0x100,0x70(%ebx) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 112fc2: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx 112fc6: 8b 43 2c mov 0x2c(%ebx),%eax 112fc9: d3 e0 shl %cl,%eax 112fcb: c1 e0 04 shl $0x4,%eax 112fce: 89 43 74 mov %eax,0x74(%ebx) fs_info->index = 0; 112fd1: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 112fd8: 50 push %eax 112fd9: 50 push %eax 112fda: 6a 01 push $0x1 112fdc: 68 00 01 00 00 push $0x100 112fe1: e8 da 3f ff ff call 106fc0 112fe6: 89 43 68 mov %eax,0x68(%ebx) if ( fs_info->uino == NULL ) 112fe9: 83 c4 10 add $0x10,%esp 112fec: 85 c0 test %eax,%eax 112fee: 75 2d jne 11301d <== ALWAYS TAKEN 112ff0: eb 11 jmp 113003 <== 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 ) { close(vol->fd); 112ff2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112ff5: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 112ff8: e8 ff 3f ff ff call 106ffc <== NOT EXECUTED free(fs_info->vhash); 112ffd: 58 pop %eax <== NOT EXECUTED 112ffe: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED 113001: eb 55 jmp 113058 <== 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 ) { close(vol->fd); 113003: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113006: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 113009: e8 ee 3f ff ff call 106ffc <== NOT EXECUTED free(fs_info->vhash); 11300e: 58 pop %eax <== NOT EXECUTED 11300f: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED 113012: e8 15 42 ff ff call 10722c <== NOT EXECUTED free(fs_info->rhash); 113017: 58 pop %eax <== NOT EXECUTED 113018: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 11301b: eb 3b jmp 113058 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 11301d: 57 push %edi 11301e: 57 push %edi 11301f: 6a 01 push $0x1 113021: 0f b7 03 movzwl (%ebx),%eax 113024: 50 push %eax 113025: e8 96 3f ff ff call 106fc0 11302a: 89 83 84 00 00 00 mov %eax,0x84(%ebx) if (fs_info->sec_buf == NULL) 113030: 83 c4 10 add $0x10,%esp 113033: 85 c0 test %eax,%eax 113035: 75 37 jne 11306e <== ALWAYS TAKEN { close(vol->fd); 113037: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11303a: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 11303d: e8 ba 3f ff ff call 106ffc <== NOT EXECUTED free(fs_info->vhash); 113042: 58 pop %eax <== NOT EXECUTED 113043: ff 73 60 pushl 0x60(%ebx) <== NOT EXECUTED 113046: e8 e1 41 ff ff call 10722c <== NOT EXECUTED free(fs_info->rhash); 11304b: 5a pop %edx <== NOT EXECUTED 11304c: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 11304f: e8 d8 41 ff ff call 10722c <== NOT EXECUTED free(fs_info->uino); 113054: 59 pop %ecx <== NOT EXECUTED 113055: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 113058: e8 cf 41 ff ff call 10722c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 11305d: e8 ae 67 00 00 call 119810 <__errno> <== NOT EXECUTED 113062: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 113068: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11306b: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED } return RC_OK; } 11306e: 89 f0 mov %esi,%eax 113070: 8d 65 f4 lea -0xc(%ebp),%esp 113073: 5b pop %ebx 113074: 5e pop %esi 113075: 5f pop %edi 113076: 5d pop %ebp 113077: c3 ret =============================================================================== 00117f06 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 117f06: 55 push %ebp 117f07: 89 e5 mov %esp,%ebp 117f09: 57 push %edi 117f0a: 56 push %esi 117f0b: 53 push %ebx 117f0c: 83 ec 3c sub $0x3c,%esp 117f0f: 8b 5d 08 mov 0x8(%ebp),%ebx 117f12: 8a 55 1c mov 0x1c(%ebp),%dl 117f15: 88 55 cf mov %dl,-0x31(%ebp) int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 117f18: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 117f1f: 8b 43 34 mov 0x34(%ebx),%eax uint32_t i = 2; *cls_added = 0; 117f22: 8b 55 14 mov 0x14(%ebp),%edx 117f25: c7 02 00 00 00 00 movl $0x0,(%edx) if (count == 0) return rc; 117f2b: 31 ff xor %edi,%edi uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 117f2d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 117f31: 0f 84 bd 01 00 00 je 1180f4 <== NEVER TAKEN return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 117f37: 8b 73 44 mov 0x44(%ebx),%esi 117f3a: 83 fe ff cmp $0xffffffff,%esi 117f3d: 75 05 jne 117f44 uint32_t *last_cl, bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; 117f3f: be 02 00 00 00 mov $0x2,%esi uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 117f44: 83 c0 02 add $0x2,%eax 117f47: 89 45 d0 mov %eax,-0x30(%ebp) 117f4a: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp) 117f51: 31 d2 xor %edx,%edx 117f53: e9 38 01 00 00 jmp 118090 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 117f58: 50 push %eax 117f59: 8d 4d e4 lea -0x1c(%ebp),%ecx 117f5c: 51 push %ecx 117f5d: 56 push %esi 117f5e: 53 push %ebx 117f5f: 89 55 c4 mov %edx,-0x3c(%ebp) 117f62: e8 99 fb ff ff call 117b00 117f67: 89 c7 mov %eax,%edi if ( rc != RC_OK ) 117f69: 83 c4 10 add $0x10,%esp 117f6c: 85 c0 test %eax,%eax 117f6e: 8b 55 c4 mov -0x3c(%ebp),%edx 117f71: 74 1e je 117f91 <== ALWAYS TAKEN { if (*cls_added != 0) 117f73: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 117f76: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 117f79: 0f 84 75 01 00 00 je 1180f4 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 117f7f: 50 push %eax <== NOT EXECUTED 117f80: 50 push %eax <== NOT EXECUTED 117f81: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 117f84: ff 32 pushl (%edx) <== NOT EXECUTED 117f86: 53 push %ebx <== NOT EXECUTED 117f87: e8 d6 fe ff ff call 117e62 <== NOT EXECUTED 117f8c: e9 ec 00 00 00 jmp 11807d <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 117f91: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 117f95: 0f 85 e7 00 00 00 jne 118082 /* * 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) 117f9b: 8b 4d 14 mov 0x14(%ebp),%ecx 117f9e: 83 39 00 cmpl $0x0,(%ecx) 117fa1: 75 22 jne 117fc5 { *chain = cl4find; 117fa3: 8b 55 0c mov 0xc(%ebp),%edx 117fa6: 89 32 mov %esi,(%edx) rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 117fa8: 50 push %eax 117fa9: 6a ff push $0xffffffff 117fab: 56 push %esi 117fac: 53 push %ebx 117fad: e8 97 fc ff ff call 117c49 if ( rc != RC_OK ) 117fb2: 83 c4 10 add $0x10,%esp 117fb5: 85 c0 test %eax,%eax 117fb7: 0f 85 35 01 00 00 jne 1180f2 <== NEVER TAKEN rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) { 117fbd: 80 7d cf 00 cmpb $0x0,-0x31(%ebp) 117fc1: 74 4f je 118012 117fc3: eb 63 jmp 118028 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 117fc5: 50 push %eax 117fc6: 6a ff push $0xffffffff 117fc8: 56 push %esi 117fc9: 53 push %ebx 117fca: 89 55 c4 mov %edx,-0x3c(%ebp) 117fcd: e8 77 fc ff ff call 117c49 117fd2: 89 c1 mov %eax,%ecx if ( rc != RC_OK ) 117fd4: 83 c4 10 add $0x10,%esp 117fd7: 85 c0 test %eax,%eax 117fd9: 8b 55 c4 mov -0x3c(%ebp),%edx 117fdc: 74 1d je 117ffb <== ALWAYS TAKEN { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 117fde: 50 push %eax <== NOT EXECUTED 117fdf: 50 push %eax <== NOT EXECUTED 117fe0: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 117fe3: ff 32 pushl (%edx) <== NOT EXECUTED 117fe5: 53 push %ebx <== NOT EXECUTED 117fe6: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 117fe9: e8 74 fe ff ff call 117e62 <== NOT EXECUTED 117fee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 117ff1: 8b 4d c4 mov -0x3c(%ebp),%ecx <== NOT EXECUTED 117ff4: 89 cf mov %ecx,%edi <== NOT EXECUTED 117ff6: e9 f9 00 00 00 jmp 1180f4 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 117ffb: 50 push %eax 117ffc: 56 push %esi 117ffd: 52 push %edx 117ffe: 53 push %ebx 117fff: e8 45 fc ff ff call 117c49 118004: 89 c2 mov %eax,%edx if ( rc != RC_OK ) 118006: 83 c4 10 add $0x10,%esp 118009: 85 c0 test %eax,%eax 11800b: 74 b0 je 117fbd <== ALWAYS TAKEN 11800d: e9 b2 00 00 00 jmp 1180c4 <== NOT EXECUTED if ( rc != RC_OK ) goto cleanup; } save_cln = cl4find; (*cls_added)++; 118012: 8b 55 14 mov 0x14(%ebp),%edx 118015: 8b 12 mov (%edx),%edx 118017: 89 d0 mov %edx,%eax 118019: 40 inc %eax 11801a: 8b 55 14 mov 0x14(%ebp),%edx 11801d: 89 02 mov %eax,(%edx) /* have we satisfied request ? */ if (*cls_added == count) 11801f: 3b 45 10 cmp 0x10(%ebp),%eax 118022: 74 38 je 11805c 118024: 89 f2 mov %esi,%edx 118026: eb 5a jmp 118082 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 118028: 85 f6 test %esi,%esi 11802a: 75 0b jne 118037 <== ALWAYS TAKEN 11802c: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 118030: 74 05 je 118037 <== NOT EXECUTED return fs_info->vol.rdir_loc; 118032: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 118035: eb 0c jmp 118043 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 118037: 8d 46 fe lea -0x2(%esi),%eax 11803a: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx 11803e: d3 e0 shl %cl,%eax 118040: 03 43 30 add 0x30(%ebx),%eax if (zero_fill) { uint32_t sec = fat_cluster_num_to_sector_num(fs_info, cl4find); rc = _fat_block_zero(fs_info, sec, 0, fs_info->vol.bpc); 118043: 0f b7 53 06 movzwl 0x6(%ebx),%edx 118047: 52 push %edx 118048: 6a 00 push $0x0 11804a: 50 push %eax 11804b: 53 push %ebx 11804c: e8 99 a5 ff ff call 1125ea <_fat_block_zero> 118051: 89 c2 mov %eax,%edx if ( rc != RC_OK ) 118053: 83 c4 10 add $0x10,%esp 118056: 85 c0 test %eax,%eax 118058: 74 b8 je 118012 <== ALWAYS TAKEN 11805a: eb 68 jmp 1180c4 <== NOT EXECUTED (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 11805c: 89 73 44 mov %esi,0x44(%ebx) if (fs_info->vol.free_cls != 0xFFFFFFFF) 11805f: 8b 43 40 mov 0x40(%ebx),%eax 118062: 83 f8 ff cmp $0xffffffff,%eax 118065: 74 08 je 11806f <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 118067: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 11806a: 2b 02 sub (%edx),%eax <== NOT EXECUTED 11806c: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED *last_cl = save_cln; 11806f: 8b 55 18 mov 0x18(%ebp),%edx 118072: 89 32 mov %esi,(%edx) fat_buf_release(fs_info); 118074: 83 ec 0c sub $0xc,%esp 118077: 53 push %ebx 118078: e8 3c a3 ff ff call 1123b9 11807d: 83 c4 10 add $0x10,%esp 118080: eb 72 jmp 1180f4 return rc; } } i++; 118082: ff 45 d4 incl -0x2c(%ebp) cl4find++; 118085: 46 inc %esi if (cl4find >= data_cls_val) 118086: 3b 75 d0 cmp -0x30(%ebp),%esi 118089: 72 05 jb 118090 <== ALWAYS TAKEN cl4find = 2; 11808b: be 02 00 00 00 mov $0x2,%esi <== 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) 118090: 8b 4d d0 mov -0x30(%ebp),%ecx 118093: 39 4d d4 cmp %ecx,-0x2c(%ebp) 118096: 0f 82 bc fe ff ff jb 117f58 <== ALWAYS TAKEN cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 11809c: 89 53 44 mov %edx,0x44(%ebx) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 11809f: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 1180a2: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 1180a5: 74 08 je 1180af <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 1180a7: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 1180aa: 2b 01 sub (%ecx),%eax <== NOT EXECUTED 1180ac: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED *last_cl = save_cln; 1180af: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 1180b2: 89 10 mov %edx,(%eax) <== NOT EXECUTED fat_buf_release(fs_info); 1180b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1180b7: 53 push %ebx <== NOT EXECUTED 1180b8: e8 fc a2 ff ff call 1123b9 <== NOT EXECUTED 1180bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return RC_OK; 1180c0: 31 ff xor %edi,%edi <== NOT EXECUTED 1180c2: eb 30 jmp 1180f4 <== NOT EXECUTED cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 1180c4: 57 push %edi <== NOT EXECUTED 1180c5: 57 push %edi <== NOT EXECUTED 1180c6: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1180c9: ff 31 pushl (%ecx) <== NOT EXECUTED 1180cb: 53 push %ebx <== NOT EXECUTED 1180cc: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 1180cf: e8 8e fd ff ff call 117e62 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 1180d4: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 1180d7: 6a 00 push $0x0 <== NOT EXECUTED 1180d9: 56 push %esi <== NOT EXECUTED 1180da: 53 push %ebx <== NOT EXECUTED 1180db: e8 69 fb ff ff call 117c49 <== NOT EXECUTED fat_buf_release(fs_info); 1180e0: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 1180e3: e8 d1 a2 ff ff call 1123b9 <== NOT EXECUTED 1180e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return rc; 1180eb: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 1180ee: 89 d7 mov %edx,%edi <== NOT EXECUTED 1180f0: eb 02 jmp 1180f4 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 1180f2: 89 c7 mov %eax,%edi <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 1180f4: 89 f8 mov %edi,%eax 1180f6: 8d 65 f4 lea -0xc(%ebp),%esp 1180f9: 5b pop %ebx 1180fa: 5e pop %esi 1180fb: 5f pop %edi 1180fc: 5d pop %ebp 1180fd: c3 ret =============================================================================== 00117c49 : fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 117c49: 55 push %ebp 117c4a: 89 e5 mov %esp,%ebp 117c4c: 57 push %edi 117c4d: 56 push %esi 117c4e: 53 push %ebx 117c4f: 83 ec 3c sub $0x3c,%esp 117c52: 8b 5d 08 mov 0x8(%ebp),%ebx 117c55: 8b 75 0c mov 0xc(%ebp),%esi int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 117c58: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 117c5f: 83 fe 01 cmp $0x1,%esi 117c62: 0f 86 e4 01 00 00 jbe 117e4c <== NEVER TAKEN 117c68: 8b 43 34 mov 0x34(%ebx),%eax 117c6b: 40 inc %eax 117c6c: 39 c6 cmp %eax,%esi 117c6e: 76 05 jbe 117c75 <== ALWAYS TAKEN 117c70: e9 d7 01 00 00 jmp 117e4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 117c75: 8a 53 0a mov 0xa(%ebx),%dl 117c78: 88 d0 mov %dl,%al 117c7a: 24 01 and $0x1,%al 117c7c: 74 08 je 117c86 <== NEVER TAKEN 117c7e: 89 f7 mov %esi,%edi 117c80: d1 ef shr %edi 117c82: 01 f7 add %esi,%edi 117c84: eb 11 jmp 117c97 117c86: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 117c89: 74 05 je 117c90 <== NOT EXECUTED 117c8b: 8d 3c 36 lea (%esi,%esi,1),%edi <== NOT EXECUTED 117c8e: eb 07 jmp 117c97 <== NOT EXECUTED 117c90: 8d 3c b5 00 00 00 00 lea 0x0(,%esi,4),%edi <== NOT EXECUTED 117c97: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx 117c9b: d3 ef shr %cl,%edi 117c9d: 8b 4b 4c mov 0x4c(%ebx),%ecx 117ca0: 01 f9 add %edi,%ecx fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 117ca2: 84 c0 test %al,%al 117ca4: 74 08 je 117cae <== NEVER TAKEN 117ca6: 89 f2 mov %esi,%edx 117ca8: d1 ea shr %edx 117caa: 01 f2 add %esi,%edx 117cac: eb 11 jmp 117cbf 117cae: 80 e2 02 and $0x2,%dl <== NOT EXECUTED 117cb1: 74 05 je 117cb8 <== NOT EXECUTED 117cb3: 8d 14 36 lea (%esi,%esi,1),%edx <== NOT EXECUTED 117cb6: eb 07 jmp 117cbf <== NOT EXECUTED 117cb8: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx <== NOT EXECUTED 117cbf: 0f b7 3b movzwl (%ebx),%edi rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 117cc2: 8d 45 e4 lea -0x1c(%ebp),%eax 117cc5: 50 push %eax 117cc6: 6a 01 push $0x1 117cc8: 51 push %ecx 117cc9: 53 push %ebx 117cca: 89 55 d0 mov %edx,-0x30(%ebp) 117ccd: 89 4d cc mov %ecx,-0x34(%ebp) 117cd0: e8 2f a5 ff ff call 112204 if (rc != RC_OK) 117cd5: 83 c4 10 add $0x10,%esp 117cd8: 85 c0 test %eax,%eax 117cda: 8b 55 d0 mov -0x30(%ebp),%edx 117cdd: 8b 4d cc mov -0x34(%ebp),%ecx 117ce0: 0f 85 74 01 00 00 jne 117e5a <== NEVER TAKEN 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); 117ce6: 4f dec %edi 117ce7: 21 d7 and %edx,%edi rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 117ce9: 8a 53 0a mov 0xa(%ebx),%dl 117cec: 80 fa 02 cmp $0x2,%dl 117cef: 0f 84 27 01 00 00 je 117e1c <== NEVER TAKEN 117cf5: 80 fa 04 cmp $0x4,%dl 117cf8: 0f 84 2d 01 00 00 je 117e2b <== NEVER TAKEN 117cfe: fe ca dec %dl 117d00: 0f 85 46 01 00 00 jne 117e4c <== NEVER TAKEN { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 117d06: 83 e6 01 and $0x1,%esi 117d09: 8b 55 e4 mov -0x1c(%ebp),%edx 117d0c: 0f 84 84 00 00 00 je 117d96 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 117d12: 8b 75 10 mov 0x10(%ebp),%esi 117d15: c1 e6 04 shl $0x4,%esi 117d18: 66 89 75 c8 mov %si,-0x38(%ebp) *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 117d1c: 8b 52 1c mov 0x1c(%edx),%edx 117d1f: 01 fa add %edi,%edx { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 117d21: 80 22 0f andb $0xf,(%edx) (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 117d24: 8b 55 e4 mov -0x1c(%ebp),%edx 117d27: 8b 52 1c mov 0x1c(%edx),%edx 117d2a: 01 fa add %edi,%edx 117d2c: 89 55 d4 mov %edx,-0x2c(%ebp) { 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)) = 117d2f: 8a 55 c8 mov -0x38(%ebp),%dl 117d32: 8b 75 d4 mov -0x2c(%ebp),%esi 117d35: 08 16 or %dl,(%esi) } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 117d37: c6 43 7c 01 movb $0x1,0x7c(%ebx) (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 117d3b: 0f b7 13 movzwl (%ebx),%edx 117d3e: 4a dec %edx 117d3f: 39 d7 cmp %edx,%edi 117d41: 75 32 jne 117d75 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 117d43: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 117d46: 50 push %eax <== NOT EXECUTED 117d47: 6a 01 push $0x1 <== NOT EXECUTED 117d49: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 117d4c: 50 push %eax <== NOT EXECUTED 117d4d: 53 push %ebx <== NOT EXECUTED 117d4e: e8 b1 a4 ff ff call 112204 <== NOT EXECUTED &block0); if (rc != RC_OK) 117d53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117d56: 85 c0 test %eax,%eax <== NOT EXECUTED 117d58: 0f 85 fc 00 00 00 jne 117e5a <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 117d5e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117d61: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED 117d64: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 117d67: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117d6a: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); 117d6d: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 117d70: e9 81 00 00 00 jmp 117df6 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 117d75: 8b 55 e4 mov -0x1c(%ebp),%edx 117d78: 8b 52 1c mov 0x1c(%edx),%edx 117d7b: c6 44 3a 01 00 movb $0x0,0x1(%edx,%edi,1) *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 117d80: 8b 55 e4 mov -0x1c(%ebp),%edx 117d83: 8b 52 1c mov 0x1c(%edx),%edx (uint8_t )((fat16_clv & 0xFF00)>>8); 117d86: 8b 4d c8 mov -0x38(%ebp),%ecx 117d89: 66 c1 e9 08 shr $0x8,%cx } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 117d8d: 08 4c 3a 01 or %cl,0x1(%edx,%edi,1) 117d91: e9 c4 00 00 00 jmp 117e5a (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 117d96: 8b 75 10 mov 0x10(%ebp),%esi 117d99: 81 e6 ff 0f 00 00 and $0xfff,%esi 117d9f: 89 75 d4 mov %esi,-0x2c(%ebp) 117da2: 66 89 75 c6 mov %si,-0x3a(%ebp) *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 117da6: 8b 52 1c mov 0x1c(%edx),%edx 117da9: c6 04 3a 00 movb $0x0,(%edx,%edi,1) *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 117dad: 8b 55 e4 mov -0x1c(%ebp),%edx 117db0: 8b 52 1c mov 0x1c(%edx),%edx 117db3: 01 fa add %edi,%edx 117db5: 89 55 c8 mov %edx,-0x38(%ebp) else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 117db8: 8a 55 d4 mov -0x2c(%ebp),%dl 117dbb: 8b 75 c8 mov -0x38(%ebp),%esi 117dbe: 08 16 or %dl,(%esi) 117dc0: c6 43 7c 01 movb $0x1,0x7c(%ebx) (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 117dc4: 0f b7 13 movzwl (%ebx),%edx 117dc7: 4a dec %edx 117dc8: 39 d7 cmp %edx,%edi 117dca: 75 32 jne 117dfe <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 117dcc: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 117dcf: 50 push %eax <== NOT EXECUTED 117dd0: 6a 01 push $0x1 <== NOT EXECUTED 117dd2: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 117dd5: 50 push %eax <== NOT EXECUTED 117dd6: 53 push %ebx <== NOT EXECUTED 117dd7: e8 28 a4 ff ff call 112204 <== NOT EXECUTED &block0); if (rc != RC_OK) 117ddc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117ddf: 85 c0 test %eax,%eax <== NOT EXECUTED 117de1: 75 77 jne 117e5a <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 117de3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117de6: 8b 52 1c mov 0x1c(%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)) = 117de9: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 117dec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117def: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); 117df2: 66 8b 4d c6 mov -0x3a(%ebp),%cx <== NOT EXECUTED 117df6: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 117dfa: 08 0a or %cl,(%edx) <== NOT EXECUTED 117dfc: eb 48 jmp 117e46 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 117dfe: 47 inc %edi 117dff: 8b 55 e4 mov -0x1c(%ebp),%edx 117e02: 8b 52 1c mov 0x1c(%edx),%edx 117e05: 01 fa add %edi,%edx fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 117e07: 80 22 f0 andb $0xf0,(%edx) (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 117e0a: 8b 55 e4 mov -0x1c(%ebp),%edx 117e0d: 03 7a 1c add 0x1c(%edx),%edi (uint8_t )((fat16_clv & 0xFF00)>>8); 117e10: 66 8b 55 c6 mov -0x3a(%ebp),%dx 117e14: 66 c1 ea 08 shr $0x8,%dx else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 117e18: 08 17 or %dl,(%edi) 117e1a: eb 3e jmp 117e5a } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 117e1c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117e1f: 8b 52 1c mov 0x1c(%edx),%edx <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 117e22: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 117e25: 66 89 0c 3a mov %cx,(%edx,%edi,1) <== NOT EXECUTED 117e29: eb 1b jmp 117e46 <== 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)); 117e2b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 117e2e: 03 7a 1c add 0x1c(%edx),%edi <== NOT EXECUTED 117e31: 8b 17 mov (%edi),%edx <== NOT EXECUTED 117e33: 81 e2 00 00 00 f0 and $0xf0000000,%edx <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 117e39: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 117e3c: 81 e1 ff ff ff 0f and $0xfffffff,%ecx <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 117e42: 09 ca or %ecx,%edx <== NOT EXECUTED 117e44: 89 17 mov %edx,(%edi) <== NOT EXECUTED 117e46: c6 43 7c 01 movb $0x1,0x7c(%ebx) <== NOT EXECUTED 117e4a: eb 0e jmp 117e5a <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 117e4c: e8 bf 19 00 00 call 119810 <__errno> <== NOT EXECUTED 117e51: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 117e57: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 117e5a: 8d 65 f4 lea -0xc(%ebp),%esp 117e5d: 5b pop %ebx 117e5e: 5e pop %esi 117e5f: 5f pop %edi 117e60: 5d pop %ebp 117e61: c3 ret =============================================================================== 001128cb : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 1128cb: 55 push %ebp 1128cc: 89 e5 mov %esp,%ebp 1128ce: 57 push %edi 1128cf: 56 push %esi 1128d0: 53 push %ebx 1128d1: 83 ec 1c sub $0x1c,%esp 1128d4: 8b 5d 08 mov 0x8(%ebp),%ebx int rc = RC_OK; 1128d7: 31 f6 xor %esi,%esi int i = 0; if (fs_info->vol.type & FAT_FAT32) 1128d9: f6 43 0a 04 testb $0x4,0xa(%ebx) 1128dd: 74 19 je 1128f8 <== ALWAYS TAKEN { rc = fat_fat32_update_fsinfo_sector(fs_info, fs_info->vol.free_cls, 1128df: 50 push %eax <== NOT EXECUTED 1128e0: ff 73 44 pushl 0x44(%ebx) <== NOT EXECUTED 1128e3: ff 73 40 pushl 0x40(%ebx) <== NOT EXECUTED 1128e6: 53 push %ebx <== NOT EXECUTED 1128e7: e8 7e ff ff ff call 11286a <== NOT EXECUTED 1128ec: 89 c6 mov %eax,%esi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 1128ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1128f1: 85 c0 test %eax,%eax <== NOT EXECUTED 1128f3: 74 03 je 1128f8 <== NOT EXECUTED rc = -1; 1128f5: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED } fat_buf_release(fs_info); 1128f8: 83 ec 0c sub $0xc,%esp 1128fb: 53 push %ebx 1128fc: e8 b8 fa ff ff call 1123b9 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 112901: 58 pop %eax 112902: ff 73 58 pushl 0x58(%ebx) 112905: e8 29 e8 ff ff call 111133 11290a: 83 c4 10 add $0x10,%esp 11290d: 85 c0 test %eax,%eax 11290f: 74 03 je 112914 <== ALWAYS TAKEN rc = -1; 112911: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 112914: 31 ff xor %edi,%edi for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 112916: 8b 43 60 mov 0x60(%ebx),%eax 112919: 01 f8 add %edi,%eax 11291b: 89 45 e4 mov %eax,-0x1c(%ebp) while ( (node = rtems_chain_get(the_chain)) != NULL ) 11291e: eb 0c jmp 11292c free(node); 112920: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112923: 50 push %eax <== NOT EXECUTED 112924: e8 03 49 ff ff call 10722c <== NOT EXECUTED 112929: 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 ); 11292c: 83 ec 0c sub $0xc,%esp 11292f: ff 75 e4 pushl -0x1c(%ebp) 112932: e8 e5 8d ff ff call 10b71c <_Chain_Get> 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 ) 112937: 83 c4 10 add $0x10,%esp 11293a: 85 c0 test %eax,%eax 11293c: 75 e2 jne 112920 <== NEVER TAKEN 11293e: 83 c7 0c add $0xc,%edi fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 112941: 83 ff 18 cmp $0x18,%edi 112944: 75 d0 jne 112916 112946: 66 31 ff xor %di,%di } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 112949: 8b 43 64 mov 0x64(%ebx),%eax 11294c: 01 f8 add %edi,%eax 11294e: 89 45 e4 mov %eax,-0x1c(%ebp) while ( (node = rtems_chain_get(the_chain)) != NULL ) 112951: eb 0c jmp 11295f free(node); 112953: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112956: 50 push %eax <== NOT EXECUTED 112957: e8 d0 48 ff ff call 10722c <== NOT EXECUTED 11295c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11295f: 83 ec 0c sub $0xc,%esp 112962: ff 75 e4 pushl -0x1c(%ebp) 112965: e8 b2 8d ff ff call 10b71c <_Chain_Get> 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 ) 11296a: 83 c4 10 add $0x10,%esp 11296d: 85 c0 test %eax,%eax 11296f: 75 e2 jne 112953 <== NEVER TAKEN 112971: 83 c7 0c add $0xc,%edi while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 112974: 83 ff 18 cmp $0x18,%edi 112977: 75 d0 jne 112949 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 112979: 83 ec 0c sub $0xc,%esp 11297c: ff 73 60 pushl 0x60(%ebx) 11297f: e8 a8 48 ff ff call 10722c free(fs_info->rhash); 112984: 5f pop %edi 112985: ff 73 64 pushl 0x64(%ebx) 112988: e8 9f 48 ff ff call 10722c free(fs_info->uino); 11298d: 58 pop %eax 11298e: ff 73 68 pushl 0x68(%ebx) 112991: e8 96 48 ff ff call 10722c free(fs_info->sec_buf); 112996: 58 pop %eax 112997: ff b3 84 00 00 00 pushl 0x84(%ebx) 11299d: e8 8a 48 ff ff call 10722c close(fs_info->vol.fd); 1129a2: 58 pop %eax 1129a3: ff 73 54 pushl 0x54(%ebx) 1129a6: e8 51 46 ff ff call 106ffc if (rc) 1129ab: 83 c4 10 add $0x10,%esp 1129ae: 85 f6 test %esi,%esi 1129b0: 74 0b je 1129bd <== ALWAYS TAKEN errno = EIO; 1129b2: e8 59 6e 00 00 call 119810 <__errno> <== NOT EXECUTED 1129b7: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rc; } 1129bd: 89 f0 mov %esi,%eax 1129bf: 8d 65 f4 lea -0xc(%ebp),%esp 1129c2: 5b pop %ebx 1129c3: 5e pop %esi 1129c4: 5f pop %edi 1129c5: 5d pop %ebp 1129c6: c3 ret =============================================================================== 0012d5e4 : #include #include int fchdir( int fd ) { 12d5e4: 55 push %ebp 12d5e5: 89 e5 mov %esp,%ebp 12d5e7: 57 push %edi 12d5e8: 56 push %esi 12d5e9: 53 push %ebx 12d5ea: 83 ec 6c sub $0x6c,%esp 12d5ed: 8b 5d 08 mov 0x8(%ebp),%ebx int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 12d5f0: c7 45 ac 00 00 00 00 movl $0x0,-0x54(%ebp) st.st_uid = 0; 12d5f7: 66 c7 45 b2 00 00 movw $0x0,-0x4e(%ebp) st.st_gid = 0; 12d5fd: 66 c7 45 b4 00 00 movw $0x0,-0x4c(%ebp) rtems_libio_check_fd( fd ); 12d603: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx 12d609: 72 02 jb 12d60d 12d60b: eb 0f jmp 12d61c iop = rtems_libio_iop( fd ); 12d60d: 6b db 30 imul $0x30,%ebx,%ebx 12d610: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx rtems_libio_check_is_open( iop ); 12d616: f6 43 0d 01 testb $0x1,0xd(%ebx) 12d61a: 75 13 jne 12d62f 12d61c: e8 67 38 00 00 call 130e88 <__errno> 12d621: c7 00 09 00 00 00 movl $0x9,(%eax) 12d627: 83 ce ff or $0xffffffff,%esi 12d62a: e9 84 00 00 00 jmp 12d6b3 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 12d62f: 8b 43 24 mov 0x24(%ebx),%eax const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 12d632: 83 ec 0c sub $0xc,%esp 12d635: 8b 50 0c mov 0xc(%eax),%edx 12d638: 50 push %eax 12d639: ff 12 call *(%edx) rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 12d63b: 8d 7b 10 lea 0x10(%ebx),%edi 12d63e: 5a pop %edx 12d63f: 59 pop %ecx 12d640: 8b 43 20 mov 0x20(%ebx),%eax 12d643: 8d 55 a0 lea -0x60(%ebp),%edx 12d646: 52 push %edx 12d647: 57 push %edi 12d648: ff 50 18 call *0x18(%eax) 12d64b: 89 c6 mov %eax,%esi if ( rv == 0 ) { 12d64d: 83 c4 10 add $0x10,%esp 12d650: 85 c0 test %eax,%eax 12d652: 75 3a jne 12d68e <== NEVER TAKEN bool access_ok = rtems_filesystem_check_access( 12d654: 0f b7 45 b4 movzwl -0x4c(%ebp),%eax 12d658: 50 push %eax 12d659: 0f b7 45 b2 movzwl -0x4e(%ebp),%eax 12d65d: 50 push %eax 12d65e: ff 75 ac pushl -0x54(%ebp) 12d661: 6a 01 push $0x1 12d663: e8 ec 22 fe ff call 10f954 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 12d668: 83 c4 10 add $0x10,%esp 12d66b: 84 c0 test %al,%al 12d66d: 74 11 je 12d680 <== NEVER TAKEN rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 12d66f: 50 push %eax 12d670: 50 push %eax 12d671: 57 push %edi 12d672: 8d 45 88 lea -0x78(%ebp),%eax 12d675: 50 push %eax 12d676: e8 31 1e fe ff call 10f4ac 12d67b: 83 c4 10 add $0x10,%esp 12d67e: eb 0e jmp 12d68e } else { errno = EACCES; 12d680: e8 03 38 00 00 call 130e88 <__errno> 12d685: c7 00 0d 00 00 00 movl $0xd,(%eax) rv = -1; 12d68b: 83 ce ff or $0xffffffff,%esi if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 12d68e: 8b 43 24 mov 0x24(%ebx),%eax const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 12d691: 83 ec 0c sub $0xc,%esp 12d694: 8b 50 0c mov 0xc(%eax),%edx 12d697: 50 push %eax 12d698: ff 52 04 call *0x4(%edx) rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 12d69b: 83 c4 10 add $0x10,%esp 12d69e: 85 f6 test %esi,%esi 12d6a0: 75 11 jne 12d6b3 rv = rtems_filesystem_chdir( &loc ); 12d6a2: 83 ec 0c sub $0xc,%esp 12d6a5: 8d 45 88 lea -0x78(%ebp),%eax 12d6a8: 50 push %eax 12d6a9: e8 7a 43 ff ff call 121a28 12d6ae: 89 c6 mov %eax,%esi 12d6b0: 83 c4 10 add $0x10,%esp } return rv; } 12d6b3: 89 f0 mov %esi,%eax 12d6b5: 8d 65 f4 lea -0xc(%ebp),%esp 12d6b8: 5b pop %ebx 12d6b9: 5e pop %esi 12d6ba: 5f pop %edi 12d6bb: 5d pop %ebp 12d6bc: c3 ret =============================================================================== 00121cc4 : #include #include int fchmod( int fd, mode_t mode ) { 121cc4: 55 push %ebp 121cc5: 89 e5 mov %esp,%ebp 121cc7: 53 push %ebx 121cc8: 83 ec 14 sub $0x14,%esp 121ccb: 8b 5d 08 mov 0x8(%ebp),%ebx int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 121cce: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx 121cd4: 72 02 jb 121cd8 121cd6: eb 0f jmp 121ce7 iop = rtems_libio_iop( fd ); 121cd8: 6b db 30 imul $0x30,%ebx,%ebx 121cdb: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx rtems_libio_check_is_open(iop); 121ce1: f6 43 0d 01 testb $0x1,0xd(%ebx) 121ce5: 75 0d jne 121cf4 121ce7: e8 9c f1 00 00 call 130e88 <__errno> 121cec: c7 00 09 00 00 00 movl $0x9,(%eax) 121cf2: eb 46 jmp 121d3a if (iop->pathinfo.mt_entry->writeable) { 121cf4: 8b 43 24 mov 0x24(%ebx),%eax 121cf7: 80 78 29 00 cmpb $0x0,0x29(%eax) 121cfb: 74 32 je 121d2f <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 121cfd: 83 ec 0c sub $0xc,%esp 121d00: 8b 50 0c mov 0xc(%eax),%edx 121d03: 50 push %eax 121d04: ff 12 call *(%edx) rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 121d06: 58 pop %eax 121d07: 5a pop %edx 121d08: 8b 43 24 mov 0x24(%ebx),%eax 121d0b: 8b 40 0c mov 0xc(%eax),%eax 121d0e: ff 75 0c pushl 0xc(%ebp) 121d11: 8d 53 10 lea 0x10(%ebx),%edx 121d14: 52 push %edx 121d15: ff 50 20 call *0x20(%eax) errno = EROFS; rv = -1; } return rv; } 121d18: 8b 53 24 mov 0x24(%ebx),%edx const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 121d1b: 8b 4a 0c mov 0xc(%edx),%ecx 121d1e: 89 14 24 mov %edx,(%esp) 121d21: 89 45 f4 mov %eax,-0xc(%ebp) 121d24: ff 51 04 call *0x4(%ecx) 121d27: 83 c4 10 add $0x10,%esp 121d2a: 8b 45 f4 mov -0xc(%ebp),%eax 121d2d: eb 0e jmp 121d3d if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 121d2f: e8 54 f1 00 00 call 130e88 <__errno> <== NOT EXECUTED 121d34: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED rv = -1; 121d3a: 83 c8 ff or $0xffffffff,%eax } return rv; } 121d3d: 8b 5d fc mov -0x4(%ebp),%ebx 121d40: c9 leave 121d41: c3 ret =============================================================================== 00121d44 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 121d44: 55 push %ebp 121d45: 89 e5 mov %esp,%ebp 121d47: 57 push %edi 121d48: 56 push %esi 121d49: 53 push %ebx 121d4a: 83 ec 1c sub $0x1c,%esp 121d4d: 8b 5d 08 mov 0x8(%ebp),%ebx 121d50: 0f b7 75 0c movzwl 0xc(%ebp),%esi 121d54: 0f b7 7d 10 movzwl 0x10(%ebp),%edi int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 121d58: 3b 1d 1c 69 16 00 cmp 0x16691c,%ebx 121d5e: 72 02 jb 121d62 121d60: eb 0f jmp 121d71 iop = rtems_libio_iop( fd ); 121d62: 6b db 30 imul $0x30,%ebx,%ebx 121d65: 03 1d e8 e0 16 00 add 0x16e0e8,%ebx rtems_libio_check_is_open(iop); 121d6b: f6 43 0d 01 testb $0x1,0xd(%ebx) 121d6f: 75 0d jne 121d7e 121d71: e8 12 f1 00 00 call 130e88 <__errno> 121d76: c7 00 09 00 00 00 movl $0x9,(%eax) 121d7c: eb 46 jmp 121dc4 if (iop->pathinfo.mt_entry->writeable) { 121d7e: 8b 43 24 mov 0x24(%ebx),%eax 121d81: 80 78 29 00 cmpb $0x0,0x29(%eax) 121d85: 74 32 je 121db9 <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 121d87: 83 ec 0c sub $0xc,%esp 121d8a: 8b 50 0c mov 0xc(%eax),%edx 121d8d: 50 push %eax 121d8e: ff 12 call *(%edx) rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 121d90: 83 c4 0c add $0xc,%esp 121d93: 8b 43 24 mov 0x24(%ebx),%eax 121d96: 8b 40 0c mov 0xc(%eax),%eax 121d99: 57 push %edi 121d9a: 56 push %esi &iop->pathinfo, 121d9b: 8d 53 10 lea 0x10(%ebx),%edx iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 121d9e: 52 push %edx 121d9f: ff 50 24 call *0x24(%eax) errno = EROFS; rv = -1; } return rv; } 121da2: 8b 53 24 mov 0x24(%ebx),%edx const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 121da5: 8b 4a 0c mov 0xc(%edx),%ecx 121da8: 89 14 24 mov %edx,(%esp) 121dab: 89 45 e4 mov %eax,-0x1c(%ebp) 121dae: ff 51 04 call *0x4(%ecx) 121db1: 83 c4 10 add $0x10,%esp 121db4: 8b 45 e4 mov -0x1c(%ebp),%eax 121db7: eb 0e jmp 121dc7 owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 121db9: e8 ca f0 00 00 call 130e88 <__errno> <== NOT EXECUTED 121dbe: c7 00 1e 00 00 00 movl $0x1e,(%eax) <== NOT EXECUTED rv = -1; 121dc4: 83 c8 ff or $0xffffffff,%eax } return rv; } 121dc7: 8d 65 f4 lea -0xc(%ebp),%esp 121dca: 5b pop %ebx 121dcb: 5e pop %esi 121dcc: 5f pop %edi 121dcd: 5d pop %ebp 121dce: c3 ret =============================================================================== 0012c490 : int fcntl( int fd, int cmd, ... ) { 12c490: 55 push %ebp 12c491: 89 e5 mov %esp,%ebp 12c493: 57 push %edi 12c494: 56 push %esi 12c495: 53 push %ebx 12c496: 83 ec 1c sub $0x1c,%esp 12c499: 8b 55 08 mov 0x8(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 12c49c: 3b 15 08 f7 13 00 cmp 0x13f708,%edx 12c4a2: 72 02 jb 12c4a6 12c4a4: eb 11 jmp 12c4b7 iop = rtems_libio_iop( fd ); 12c4a6: 6b fa 30 imul $0x30,%edx,%edi 12c4a9: 03 3d d8 38 15 00 add 0x1538d8,%edi rtems_libio_check_is_open(iop); 12c4af: 8b 5f 0c mov 0xc(%edi),%ebx 12c4b2: f6 c7 01 test $0x1,%bh 12c4b5: 75 10 jne 12c4c7 12c4b7: e8 10 2d ff ff call 11f1cc <__errno> 12c4bc: c7 00 09 00 00 00 movl $0x9,(%eax) 12c4c2: e9 29 01 00 00 jmp 12c5f0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 12c4c7: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 12c4cb: 0f 87 f2 00 00 00 ja 12c5c3 12c4d1: 8b 45 0c mov 0xc(%ebp),%eax 12c4d4: ff 24 85 64 36 13 00 jmp *0x133664(,%eax,4) /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 12c4db: e8 d8 dc fd ff call 10a1b8 12c4e0: 89 c6 mov %eax,%esi if (diop != NULL) { 12c4e2: 85 c0 test %eax,%eax 12c4e4: 0f 84 06 01 00 00 je 12c5f0 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 12c4ea: 83 ec 0c sub $0xc,%esp 12c4ed: ff 77 0c pushl 0xc(%edi) 12c4f0: e8 83 dc fd ff call 10a178 12c4f5: 89 c1 mov %eax,%ecx oflag &= ~O_CREAT; 12c4f7: 80 e5 fd and $0xfd,%ch diop->flags |= rtems_libio_fcntl_flags( oflag ); 12c4fa: 8b 5e 0c mov 0xc(%esi),%ebx 12c4fd: 89 0c 24 mov %ecx,(%esp) 12c500: 89 4d e4 mov %ecx,-0x1c(%ebp) 12c503: e8 3c dc fd ff call 10a144 12c508: 09 d8 or %ebx,%eax 12c50a: 89 46 0c mov %eax,0xc(%esi) int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 12c50d: 8b 47 24 mov 0x24(%edi),%eax const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 12c510: 8b 58 0c mov 0xc(%eax),%ebx 12c513: 89 04 24 mov %eax,(%esp) 12c516: ff 13 call *(%ebx) oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 12c518: 5a pop %edx 12c519: 59 pop %ecx 12c51a: 8d 47 10 lea 0x10(%edi),%eax 12c51d: 50 push %eax 12c51e: 8d 46 10 lea 0x10(%esi),%eax 12c521: 50 push %eax 12c522: e8 89 9e fe ff call 1163b0 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 12c527: 8b 47 24 mov 0x24(%edi),%eax const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 12c52a: 8b 58 0c mov 0xc(%eax),%ebx 12c52d: 89 04 24 mov %eax,(%esp) 12c530: ff 53 04 call *0x4(%ebx) /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 12c533: 8b 46 20 mov 0x20(%esi),%eax 12c536: 6a 00 push $0x0 12c538: 8b 4d e4 mov -0x1c(%ebp),%ecx 12c53b: 51 push %ecx 12c53c: 6a 00 push $0x0 12c53e: 56 push %esi 12c53f: ff 10 call *(%eax) 12c541: 89 c3 mov %eax,%ebx if ( rv == 0 ) { 12c543: 83 c4 20 add $0x20,%esp 12c546: 85 c0 test %eax,%eax 12c548: 75 11 jne 12c55b <== NEVER TAKEN rv = diop - rtems_libio_iops; 12c54a: 2b 35 d8 38 15 00 sub 0x1538d8,%esi 12c550: c1 fe 04 sar $0x4,%esi 12c553: 69 de ab aa aa aa imul $0xaaaaaaab,%esi,%ebx 12c559: eb 75 jmp 12c5d0 } else { rtems_libio_free( diop ); 12c55b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12c55e: 56 push %esi <== NOT EXECUTED 12c55f: e8 a7 dc fd ff call 10a20b <== NOT EXECUTED 12c564: eb 26 jmp 12c58c <== NOT EXECUTED fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 12c566: c1 eb 0b shr $0xb,%ebx 12c569: 83 e3 01 and $0x1,%ebx 12c56c: eb 66 jmp 12c5d4 * 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 ) ) 12c56e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 12c572: 74 05 je 12c579 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 12c574: 80 cf 08 or $0x8,%bh 12c577: eb 03 jmp 12c57c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 12c579: 80 e7 f7 and $0xf7,%bh 12c57c: 89 5f 0c mov %ebx,0xc(%edi) 12c57f: eb 31 jmp 12c5b2 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 12c581: 83 ec 0c sub $0xc,%esp 12c584: 53 push %ebx 12c585: e8 ee db fd ff call 10a178 12c58a: 89 c3 mov %eax,%ebx 12c58c: 83 c4 10 add $0x10,%esp 12c58f: eb 3f jmp 12c5d0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 12c591: 83 ec 0c sub $0xc,%esp 12c594: ff 75 10 pushl 0x10(%ebp) 12c597: e8 a8 db fd ff call 10a144 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 12c59c: 25 01 02 00 00 and $0x201,%eax 12c5a1: 8b 4f 0c mov 0xc(%edi),%ecx 12c5a4: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 12c5aa: 09 c8 or %ecx,%eax 12c5ac: 89 47 0c mov %eax,0xc(%edi) 12c5af: 83 c4 10 add $0x10,%esp { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 12c5b2: 31 db xor %ebx,%ebx 12c5b4: eb 1e jmp 12c5d4 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 12c5b6: e8 11 2c ff ff call 11f1cc <__errno> 12c5bb: c7 00 86 00 00 00 movl $0x86,(%eax) 12c5c1: eb 2d jmp 12c5f0 ret = -1; break; default: errno = EINVAL; 12c5c3: e8 04 2c ff ff call 11f1cc <__errno> 12c5c8: c7 00 16 00 00 00 movl $0x16,(%eax) 12c5ce: eb 20 jmp 12c5f0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 12c5d0: 85 db test %ebx,%ebx 12c5d2: 78 1f js 12c5f3 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 12c5d4: 50 push %eax 12c5d5: 50 push %eax 12c5d6: 8b 47 20 mov 0x20(%edi),%eax 12c5d9: ff 75 0c pushl 0xc(%ebp) 12c5dc: 57 push %edi 12c5dd: ff 50 28 call *0x28(%eax) 12c5e0: 89 c6 mov %eax,%esi if (err) { 12c5e2: 83 c4 10 add $0x10,%esp 12c5e5: 85 c0 test %eax,%eax 12c5e7: 74 0a je 12c5f3 <== ALWAYS TAKEN errno = err; 12c5e9: e8 de 2b ff ff call 11f1cc <__errno> <== NOT EXECUTED 12c5ee: 89 30 mov %esi,(%eax) <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 12c5f0: 83 cb ff or $0xffffffff,%ebx va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 12c5f3: 89 d8 mov %ebx,%eax 12c5f5: 8d 65 f4 lea -0xc(%ebp),%esp 12c5f8: 5b pop %ebx 12c5f9: 5e pop %esi 12c5fa: 5f pop %edi 12c5fb: 5d pop %ebp 12c5fc: c3 ret =============================================================================== 0010f178 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f178: 55 push %ebp 10f179: 89 e5 mov %esp,%ebp 10f17b: 57 push %edi 10f17c: 56 push %esi 10f17d: 53 push %ebx 10f17e: 83 ec 2c sub $0x2c,%esp 10f181: 8b 75 08 mov 0x8(%ebp),%esi static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 10f184: 83 3d d4 00 13 00 00 cmpl $0x0,0x1300d4 10f18b: 74 1f je 10f1ac rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10f18d: 50 push %eax 10f18e: 6a 00 push $0x0 10f190: 6a 00 push $0x0 10f192: ff 35 d4 00 13 00 pushl 0x1300d4 10f198: e8 cf bf ff ff call 10b16c 10f19d: 89 c2 mov %eax,%edx } if (sc == RTEMS_SUCCESSFUL) { 10f19f: 83 c4 10 add $0x10,%esp 10f1a2: 85 c0 test %eax,%eax 10f1a4: 0f 84 87 03 00 00 je 10f531 <== ALWAYS TAKEN 10f1aa: eb 50 jmp 10f1fc <== NOT EXECUTED */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10f1ac: 50 push %eax 10f1ad: 6a 00 push $0x0 10f1af: 6a 00 push $0x0 10f1b1: ff 35 e0 02 13 00 pushl 0x1302e0 10f1b7: e8 b0 bf ff ff call 10b16c rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 10f1bc: 83 c4 10 add $0x10,%esp free(pipe); } static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 10f1bf: 31 db xor %ebx,%ebx if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 10f1c1: 83 3d d4 00 13 00 00 cmpl $0x0,0x1300d4 10f1c8: 75 1d jne 10f1e7 <== NEVER TAKEN sc = rtems_semaphore_create( 10f1ca: 83 ec 0c sub $0xc,%esp 10f1cd: 68 d4 00 13 00 push $0x1300d4 10f1d2: 6a 00 push $0x0 10f1d4: 6a 54 push $0x54 10f1d6: 6a 01 push $0x1 10f1d8: 68 45 50 49 50 push $0x50495045 10f1dd: e8 5a bd ff ff call 10af3c 10f1e2: 89 c3 mov %eax,%ebx 10f1e4: 83 c4 20 add $0x20,%esp } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f1e7: 83 ec 0c sub $0xc,%esp 10f1ea: ff 35 e0 02 13 00 pushl 0x1302e0 10f1f0: e8 67 c0 ff ff call 10b25c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 10f1f5: 83 c4 10 add $0x10,%esp 10f1f8: 85 db test %ebx,%ebx 10f1fa: 74 91 je 10f18d } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 10f1fc: bf f4 ff ff ff mov $0xfffffff4,%edi 10f201: e9 4f 03 00 00 jmp 10f555 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f206: 83 ec 0c sub $0xc,%esp 10f209: 6a 34 push $0x34 10f20b: 89 55 d0 mov %edx,-0x30(%ebp) 10f20e: e8 0d 88 ff ff call 107a20 10f213: 89 c3 mov %eax,%ebx if (pipe == NULL) 10f215: 83 c4 10 add $0x10,%esp 10f218: 85 c0 test %eax,%eax 10f21a: 8b 55 d0 mov -0x30(%ebp),%edx 10f21d: 0f 84 1d 03 00 00 je 10f540 <== NEVER TAKEN return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f223: b9 0d 00 00 00 mov $0xd,%ecx 10f228: 89 c7 mov %eax,%edi 10f22a: 89 d0 mov %edx,%eax 10f22c: f3 ab rep stos %eax,%es:(%edi) pipe->Size = PIPE_BUF; 10f22e: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 10f235: 83 ec 0c sub $0xc,%esp 10f238: 68 00 02 00 00 push $0x200 10f23d: e8 de 87 ff ff call 107a20 10f242: 89 03 mov %eax,(%ebx) if (! pipe->Buffer) 10f244: 83 c4 10 add $0x10,%esp 10f247: 85 c0 test %eax,%eax 10f249: 0f 84 ed 00 00 00 je 10f33c <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f24f: 8d 43 2c lea 0x2c(%ebx),%eax 10f252: 50 push %eax 10f253: 6a 00 push $0x0 10f255: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 10f257: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f25e: 0d 00 72 49 50 or $0x50497200,%eax 10f263: 50 push %eax 10f264: e8 8f 16 00 00 call 1108f8 10f269: 83 c4 10 add $0x10,%esp 10f26c: 85 c0 test %eax,%eax 10f26e: 0f 85 bb 00 00 00 jne 10f32f rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10f274: 8d 43 30 lea 0x30(%ebx),%eax 10f277: 50 push %eax 10f278: 6a 00 push $0x0 10f27a: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 10f27c: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10f283: 0d 00 77 49 50 or $0x50497700,%eax 10f288: 50 push %eax 10f289: e8 6a 16 00 00 call 1108f8 10f28e: 83 c4 10 add $0x10,%esp 10f291: 85 c0 test %eax,%eax 10f293: 0f 85 88 00 00 00 jne 10f321 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10f299: 83 ec 0c sub $0xc,%esp 10f29c: 8d 43 28 lea 0x28(%ebx),%eax 10f29f: 50 push %eax 10f2a0: 6a 00 push $0x0 10f2a2: 6a 10 push $0x10 10f2a4: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 10f2a6: 0f be 05 b0 e1 12 00 movsbl 0x12e1b0,%eax if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10f2ad: 0d 00 73 49 50 or $0x50497300,%eax 10f2b2: 50 push %eax 10f2b3: e8 84 bc ff ff call 10af3c 10f2b8: 83 c4 20 add $0x20,%esp 10f2bb: 85 c0 test %eax,%eax 10f2bd: 75 54 jne 10f313 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10f2bf: 50 push %eax /* 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 10f2c0: 8d 7d e4 lea -0x1c(%ebp),%edi 10f2c3: 57 push %edi 10f2c4: ff 73 2c pushl 0x2c(%ebx) 10f2c7: 68 d0 0c 13 00 push $0x130cd0 10f2cc: e8 eb d3 ff ff call 10c6bc <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; 10f2d1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 10f2d8: e8 13 df ff ff call 10d1f0 <_Thread_Enable_dispatch> 10f2dd: 83 c4 0c add $0xc,%esp 10f2e0: 57 push %edi 10f2e1: ff 73 30 pushl 0x30(%ebx) 10f2e4: 68 d0 0c 13 00 push $0x130cd0 10f2e9: e8 ce d3 ff ff call 10c6bc <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 10f2ee: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) _Thread_Enable_dispatch(); 10f2f5: e8 f6 de ff ff call 10d1f0 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f2fa: a0 b0 e1 12 00 mov 0x12e1b0,%al 10f2ff: 83 c4 10 add $0x10,%esp 10f302: 3c 7a cmp $0x7a,%al 10f304: 0f 85 40 02 00 00 jne 10f54a c = 'a'; 10f30a: c6 05 b0 e1 12 00 61 movb $0x61,0x12e1b0 10f311: eb 3a jmp 10f34d return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10f313: 83 ec 0c sub $0xc,%esp 10f316: ff 73 30 pushl 0x30(%ebx) 10f319: e8 9a 16 00 00 call 1109b8 10f31e: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 10f321: 83 ec 0c sub $0xc,%esp 10f324: ff 73 2c pushl 0x2c(%ebx) 10f327: e8 8c 16 00 00 call 1109b8 10f32c: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 10f32f: 83 ec 0c sub $0xc,%esp 10f332: ff 33 pushl (%ebx) 10f334: e8 2b 83 ff ff call 107664 10f339: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 10f33c: 83 ec 0c sub $0xc,%esp 10f33f: 53 push %ebx 10f340: e8 1f 83 ff ff call 107664 10f345: 83 c4 10 add $0x10,%esp 10f348: e9 f3 01 00 00 jmp 10f540 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f34d: 57 push %edi 10f34e: 6a 00 push $0x0 10f350: 6a 00 push $0x0 10f352: ff 73 28 pushl 0x28(%ebx) 10f355: e8 12 be ff ff call 10b16c 10f35a: 83 c4 10 add $0x10,%esp 10f35d: 83 f8 01 cmp $0x1,%eax 10f360: 19 ff sbb %edi,%edi 10f362: f7 d7 not %edi 10f364: 83 e7 fc and $0xfffffffc,%edi err = -EINTR; if (*pipep == NULL) { 10f367: 83 3e 00 cmpl $0x0,(%esi) 10f36a: 75 0f jne 10f37b if (err) 10f36c: 85 ff test %edi,%edi 10f36e: 74 09 je 10f379 <== ALWAYS TAKEN pipe_free(pipe); 10f370: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f372: e8 31 fd ff ff call 10f0a8 <== NOT EXECUTED 10f377: eb 02 jmp 10f37b <== NOT EXECUTED else *pipep = pipe; 10f379: 89 1e mov %ebx,(%esi) #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 10f37b: 83 ec 0c sub $0xc,%esp 10f37e: ff 35 d4 00 13 00 pushl 0x1300d4 10f384: e8 d3 be ff ff call 10b25c pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f389: 83 c4 10 add $0x10,%esp 10f38c: 85 ff test %edi,%edi 10f38e: 0f 85 c1 01 00 00 jne 10f555 <== NEVER TAKEN return err; pipe = *pipep; 10f394: 8b 1e mov (%esi),%ebx switch (LIBIO_ACCMODE(iop)) { 10f396: 8b 55 0c mov 0xc(%ebp),%edx 10f399: 8b 42 0c mov 0xc(%edx),%eax 10f39c: 83 e0 06 and $0x6,%eax 10f39f: 83 f8 04 cmp $0x4,%eax 10f3a2: 0f 84 97 00 00 00 je 10f43f 10f3a8: 83 f8 06 cmp $0x6,%eax 10f3ab: 0f 84 1c 01 00 00 je 10f4cd <== NEVER TAKEN 10f3b1: 83 f8 02 cmp $0x2,%eax 10f3b4: 0f 85 55 01 00 00 jne 10f50f <== NEVER TAKEN case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f3ba: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 10f3bd: 8b 43 10 mov 0x10(%ebx),%eax 10f3c0: 8d 48 01 lea 0x1(%eax),%ecx 10f3c3: 89 4b 10 mov %ecx,0x10(%ebx) 10f3c6: 85 c0 test %eax,%eax 10f3c8: 75 11 jne 10f3db <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 10f3ca: 51 push %ecx 10f3cb: 51 push %ecx 10f3cc: 8d 45 e0 lea -0x20(%ebp),%eax 10f3cf: 50 push %eax 10f3d0: ff 73 30 pushl 0x30(%ebx) 10f3d3: e8 6c 16 00 00 call 110a44 10f3d8: 83 c4 10 add $0x10,%esp if (pipe->Writers == 0) { 10f3db: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f3df: 0f 85 2a 01 00 00 jne 10f50f /* Not an error */ if (LIBIO_NODELAY(iop)) 10f3e5: 8b 55 0c mov 0xc(%ebp),%edx 10f3e8: f6 42 0c 01 testb $0x1,0xc(%edx) 10f3ec: 0f 85 1d 01 00 00 jne 10f50f break; prevCounter = pipe->writerCounter; 10f3f2: 8b 53 24 mov 0x24(%ebx),%edx 10f3f5: 89 55 d4 mov %edx,-0x2c(%ebp) err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f3f8: 83 ec 0c sub $0xc,%esp 10f3fb: ff 73 28 pushl 0x28(%ebx) 10f3fe: e8 59 be ff ff call 10b25c if (! PIPE_READWAIT(pipe)) 10f403: 58 pop %eax 10f404: 5a pop %edx 10f405: 6a 00 push $0x0 10f407: ff 73 2c pushl 0x2c(%ebx) 10f40a: e8 8d 16 00 00 call 110a9c 10f40f: 83 c4 10 add $0x10,%esp 10f412: 85 c0 test %eax,%eax 10f414: 0f 85 02 01 00 00 jne 10f51c <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 10f41a: 50 push %eax 10f41b: 6a 00 push $0x0 10f41d: 6a 00 push $0x0 10f41f: ff 73 28 pushl 0x28(%ebx) 10f422: e8 45 bd ff ff call 10b16c 10f427: 83 c4 10 add $0x10,%esp 10f42a: 85 c0 test %eax,%eax 10f42c: 0f 85 ea 00 00 00 jne 10f51c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 10f432: 8b 55 d4 mov -0x2c(%ebp),%edx 10f435: 3b 53 24 cmp 0x24(%ebx),%edx 10f438: 74 be je 10f3f8 <== NEVER TAKEN 10f43a: e9 d0 00 00 00 jmp 10f50f } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10f43f: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 10f442: 8b 43 14 mov 0x14(%ebx),%eax 10f445: 8d 48 01 lea 0x1(%eax),%ecx 10f448: 89 4b 14 mov %ecx,0x14(%ebx) 10f44b: 85 c0 test %eax,%eax 10f44d: 75 11 jne 10f460 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 10f44f: 51 push %ecx 10f450: 51 push %ecx 10f451: 8d 45 e0 lea -0x20(%ebp),%eax 10f454: 50 push %eax 10f455: ff 73 2c pushl 0x2c(%ebx) 10f458: e8 e7 15 00 00 call 110a44 10f45d: 83 c4 10 add $0x10,%esp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f460: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f464: 0f 85 a5 00 00 00 jne 10f50f 10f46a: 8b 55 0c mov 0xc(%ebp),%edx 10f46d: f6 42 0c 01 testb $0x1,0xc(%edx) 10f471: 74 18 je 10f48b PIPE_UNLOCK(pipe); 10f473: 83 ec 0c sub $0xc,%esp 10f476: ff 73 28 pushl 0x28(%ebx) 10f479: e8 de bd ff ff call 10b25c err = -ENXIO; goto out_error; 10f47e: 83 c4 10 add $0x10,%esp if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); err = -ENXIO; 10f481: bf fa ff ff ff mov $0xfffffffa,%edi goto out_error; 10f486: e9 96 00 00 00 jmp 10f521 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10f48b: 8b 53 20 mov 0x20(%ebx),%edx 10f48e: 89 55 d4 mov %edx,-0x2c(%ebp) err = -EINTR; do { PIPE_UNLOCK(pipe); 10f491: 83 ec 0c sub $0xc,%esp 10f494: ff 73 28 pushl 0x28(%ebx) 10f497: e8 c0 bd ff ff call 10b25c if (! PIPE_WRITEWAIT(pipe)) 10f49c: 58 pop %eax 10f49d: 5a pop %edx 10f49e: 6a 00 push $0x0 10f4a0: ff 73 30 pushl 0x30(%ebx) 10f4a3: e8 f4 15 00 00 call 110a9c 10f4a8: 83 c4 10 add $0x10,%esp 10f4ab: 85 c0 test %eax,%eax 10f4ad: 75 6d jne 10f51c <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 10f4af: 50 push %eax 10f4b0: 6a 00 push $0x0 10f4b2: 6a 00 push $0x0 10f4b4: ff 73 28 pushl 0x28(%ebx) 10f4b7: e8 b0 bc ff ff call 10b16c 10f4bc: 83 c4 10 add $0x10,%esp 10f4bf: 85 c0 test %eax,%eax 10f4c1: 75 59 jne 10f51c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 10f4c3: 8b 55 d4 mov -0x2c(%ebp),%edx 10f4c6: 3b 53 20 cmp 0x20(%ebx),%edx 10f4c9: 74 c6 je 10f491 <== NEVER TAKEN 10f4cb: eb 42 jmp 10f50f } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f4cd: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 10f4d0: 8b 43 10 mov 0x10(%ebx),%eax 10f4d3: 8d 48 01 lea 0x1(%eax),%ecx 10f4d6: 89 4b 10 mov %ecx,0x10(%ebx) 10f4d9: 85 c0 test %eax,%eax 10f4db: 75 11 jne 10f4ee <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 10f4dd: 50 push %eax 10f4de: 50 push %eax 10f4df: 8d 45 e0 lea -0x20(%ebp),%eax 10f4e2: 50 push %eax 10f4e3: ff 73 30 pushl 0x30(%ebx) 10f4e6: e8 59 15 00 00 call 110a44 10f4eb: 83 c4 10 add $0x10,%esp pipe->writerCounter ++; 10f4ee: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 10f4f1: 8b 43 14 mov 0x14(%ebx),%eax 10f4f4: 8d 48 01 lea 0x1(%eax),%ecx 10f4f7: 89 4b 14 mov %ecx,0x14(%ebx) 10f4fa: 85 c0 test %eax,%eax 10f4fc: 75 11 jne 10f50f <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 10f4fe: 50 push %eax 10f4ff: 50 push %eax 10f500: 8d 45 e0 lea -0x20(%ebp),%eax 10f503: 50 push %eax 10f504: ff 73 2c pushl 0x2c(%ebx) 10f507: e8 38 15 00 00 call 110a44 10f50c: 83 c4 10 add $0x10,%esp break; } PIPE_UNLOCK(pipe); 10f50f: 83 ec 0c sub $0xc,%esp 10f512: ff 73 28 pushl 0x28(%ebx) 10f515: e8 42 bd ff ff call 10b25c 10f51a: eb 10 jmp 10f52c /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 10f51c: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 10f521: 50 push %eax 10f522: 50 push %eax 10f523: ff 75 0c pushl 0xc(%ebp) 10f526: 56 push %esi 10f527: e8 b7 fb ff ff call 10f0e3 return err; 10f52c: 83 c4 10 add $0x10,%esp 10f52f: eb 24 jmp 10f555 err = pipe_lock(); if (err) return err; pipe = *pipep; 10f531: 8b 1e mov (%esi),%ebx if (pipe == NULL) { 10f533: 85 db test %ebx,%ebx 10f535: 0f 85 12 fe ff ff jne 10f34d 10f53b: e9 c6 fc ff ff jmp 10f206 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 10f540: bf f4 ff ff ff mov $0xfffffff4,%edi 10f545: e9 31 fe ff ff jmp 10f37b #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f54a: 40 inc %eax 10f54b: a2 b0 e1 12 00 mov %al,0x12e1b0 10f550: e9 f8 fd ff ff jmp 10f34d return 0; out_error: pipe_release(pipep, iop); return err; } 10f555: 89 f8 mov %edi,%eax 10f557: 8d 65 f4 lea -0xc(%ebp),%esp 10f55a: 5b pop %ebx 10f55b: 5e pop %esi 10f55c: 5f pop %edi 10f55d: 5d pop %ebp 10f55e: c3 ret =============================================================================== 0010948c : long fpathconf( int fd, int name ) { 10948c: 55 push %ebp 10948d: 89 e5 mov %esp,%ebp 10948f: 83 ec 08 sub $0x8,%esp 109492: 8b 45 08 mov 0x8(%ebp),%eax 109495: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 109498: 3b 05 54 72 12 00 cmp 0x127254,%eax 10949e: 72 02 jb 1094a2 1094a0: eb 0f jmp 1094b1 iop = rtems_libio_iop(fd); 1094a2: 6b c0 30 imul $0x30,%eax,%eax 1094a5: 03 05 34 b2 12 00 add 0x12b234,%eax rtems_libio_check_is_open(iop); 1094ab: f6 40 0d 01 testb $0x1,0xd(%eax) 1094af: 75 0d jne 1094be <== ALWAYS TAKEN 1094b1: e8 5e 1e 00 00 call 10b314 <__errno> 1094b6: c7 00 09 00 00 00 movl $0x9,(%eax) 1094bc: eb 58 jmp 109516 /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 1094be: 8b 40 24 mov 0x24(%eax),%eax 1094c1: 8b 40 2c mov 0x2c(%eax),%eax switch ( name ) { 1094c4: 83 fa 0b cmp $0xb,%edx 1094c7: 77 42 ja 10950b 1094c9: ff 24 95 58 d9 11 00 jmp *0x11d958(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 1094d0: 8b 00 mov (%eax),%eax break; 1094d2: eb 45 jmp 109519 case _PC_MAX_CANON: return_value = the_limits->max_canon; 1094d4: 8b 40 04 mov 0x4(%eax),%eax break; 1094d7: eb 40 jmp 109519 case _PC_MAX_INPUT: return_value = the_limits->max_input; 1094d9: 8b 40 08 mov 0x8(%eax),%eax break; 1094dc: eb 3b jmp 109519 case _PC_NAME_MAX: return_value = the_limits->name_max; 1094de: 8b 40 0c mov 0xc(%eax),%eax break; 1094e1: eb 36 jmp 109519 case _PC_PATH_MAX: return_value = the_limits->path_max; 1094e3: 8b 40 10 mov 0x10(%eax),%eax break; 1094e6: eb 31 jmp 109519 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 1094e8: 8b 40 14 mov 0x14(%eax),%eax break; 1094eb: eb 2c jmp 109519 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 1094ed: 8b 40 1c mov 0x1c(%eax),%eax break; 1094f0: eb 27 jmp 109519 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 1094f2: 8b 40 20 mov 0x20(%eax),%eax break; 1094f5: eb 22 jmp 109519 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 1094f7: 8b 40 2c mov 0x2c(%eax),%eax break; 1094fa: eb 1d jmp 109519 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 1094fc: 8b 40 18 mov 0x18(%eax),%eax break; 1094ff: eb 18 jmp 109519 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 109501: 8b 40 24 mov 0x24(%eax),%eax break; 109504: eb 13 jmp 109519 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 109506: 8b 40 28 mov 0x28(%eax),%eax break; 109509: eb 0e jmp 109519 default: rtems_set_errno_and_return_minus_one( EINVAL ); 10950b: e8 04 1e 00 00 call 10b314 <__errno> 109510: c7 00 16 00 00 00 movl $0x16,(%eax) 109516: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 109519: c9 leave 10951a: c3 ret =============================================================================== 00106734 : #include void free( void *ptr ) { 106734: 55 push %ebp 106735: 89 e5 mov %esp,%ebp 106737: 53 push %ebx 106738: 52 push %edx 106739: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 10673c: ff 05 f4 e2 12 00 incl 0x12e2f4 if ( !ptr ) 106742: 85 db test %ebx,%ebx 106744: 74 5f je 1067a5 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 106746: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520 10674d: 75 15 jne 106764 <== NEVER TAKEN !malloc_is_system_state_OK() ) { 10674f: e8 78 01 00 00 call 1068cc return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 106754: 84 c0 test %al,%al 106756: 75 0c jne 106764 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 106758: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10675b: 8b 5d fc mov -0x4(%ebp),%ebx 10675e: c9 leave /* * 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); 10675f: e9 d1 01 00 00 jmp 106935 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 106764: a1 04 c8 12 00 mov 0x12c804,%eax 106769: 85 c0 test %eax,%eax 10676b: 74 0a je 106777 (*rtems_malloc_statistics_helpers->at_free)(ptr); 10676d: 83 ec 0c sub $0xc,%esp 106770: 53 push %ebx 106771: ff 50 08 call *0x8(%eax) 106774: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 106777: 50 push %eax 106778: 50 push %eax 106779: 53 push %ebx 10677a: ff 35 2c a2 12 00 pushl 0x12a22c 106780: e8 87 4d 00 00 call 10b50c <_Protected_heap_Free> 106785: 83 c4 10 add $0x10,%esp 106788: 84 c0 test %al,%al 10678a: 75 19 jne 1067a5 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10678c: a1 2c a2 12 00 mov 0x12a22c,%eax */ 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", 106791: ff 70 1c pushl 0x1c(%eax) 106794: ff 70 18 pushl 0x18(%eax) 106797: 53 push %ebx 106798: 68 28 f8 11 00 push $0x11f828 10679d: e8 9a 0c 00 00 call 10743c 1067a2: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1067a5: 8b 5d fc mov -0x4(%ebp),%ebx 1067a8: c9 leave 1067a9: c3 ret =============================================================================== 0011d718 : int fstat( int fd, struct stat *sbuf ) { 11d718: 55 push %ebp 11d719: 89 e5 mov %esp,%ebp 11d71b: 57 push %edi 11d71c: 53 push %ebx 11d71d: 8b 55 08 mov 0x8(%ebp),%edx 11d720: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11d723: 85 db test %ebx,%ebx 11d725: 75 0d jne 11d734 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 11d727: e8 b0 37 ff ff call 110edc <__errno> <== NOT EXECUTED 11d72c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 11d732: eb 43 jmp 11d777 <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11d734: 3b 15 70 a2 12 00 cmp 0x12a270,%edx 11d73a: 73 0f jae 11d74b 11d73c: 6b d2 30 imul $0x30,%edx,%edx 11d73f: 03 15 d0 e2 12 00 add 0x12e2d0,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11d745: f6 42 0d 01 testb $0x1,0xd(%edx) 11d749: 75 0d jne 11d758 11d74b: e8 8c 37 ff ff call 110edc <__errno> 11d750: c7 00 09 00 00 00 movl $0x9,(%eax) 11d756: eb 1f jmp 11d777 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11d758: b9 12 00 00 00 mov $0x12,%ecx 11d75d: 31 c0 xor %eax,%eax 11d75f: 89 df mov %ebx,%edi 11d761: f3 ab rep stos %eax,%es:(%edi) return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11d763: 8b 42 20 mov 0x20(%edx),%eax 11d766: 89 5d 0c mov %ebx,0xc(%ebp) 11d769: 83 c2 10 add $0x10,%edx 11d76c: 89 55 08 mov %edx,0x8(%ebp) 11d76f: 8b 40 18 mov 0x18(%eax),%eax } 11d772: 5b pop %ebx 11d773: 5f pop %edi 11d774: 5d pop %ebp * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11d775: ff e0 jmp *%eax } 11d777: 83 c8 ff or $0xffffffff,%eax 11d77a: 5b pop %ebx 11d77b: 5f pop %edi 11d77c: 5d pop %ebp 11d77d: c3 ret =============================================================================== 0010657c : 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) { 10657c: 3b 05 9c 1f 13 00 cmp 0x131f9c,%eax 106582: 73 32 jae 1065b6 <== NEVER TAKEN } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 106584: 55 push %ebp 106585: 89 e5 mov %esp,%ebp 106587: 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) { 106588: 8b 1d a0 1f 13 00 mov 0x131fa0,%ebx 10658e: 85 db test %ebx,%ebx 106590: 74 27 je 1065b9 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 106592: 8d 04 c3 lea (%ebx,%eax,8),%eax if (minor < dtab->size && dtab->minor != NULL) { 106595: 3b 50 04 cmp 0x4(%eax),%edx 106598: 73 1f jae 1065b9 <== NEVER TAKEN 10659a: 8b 00 mov (%eax),%eax 10659c: 85 c0 test %eax,%eax 10659e: 74 19 je 1065b9 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 1065a0: 8b 04 90 mov (%eax,%edx,4),%eax if (dd != NULL && !lookup_only) { 1065a3: fe c9 dec %cl 1065a5: 74 14 je 1065bb 1065a7: 85 c0 test %eax,%eax 1065a9: 74 10 je 1065bb <== NEVER TAKEN if (!dd->deleted) { 1065ab: 80 78 40 00 cmpb $0x0,0x40(%eax) 1065af: 75 08 jne 1065b9 ++dd->uses; 1065b1: ff 40 14 incl 0x14(%eax) 1065b4: eb 05 jmp 1065bb return dd; } } return NULL; 1065b6: 31 c0 xor %eax,%eax } 1065b8: c3 ret <== NOT EXECUTED return dd; } } return NULL; 1065b9: 31 c0 xor %eax,%eax } 1065bb: 5b pop %ebx 1065bc: 5d pop %ebp 1065bd: c3 ret =============================================================================== 001076fc : * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, 1076fc: 55 push %ebp 1076fd: 89 e5 mov %esp,%ebp 1076ff: 57 push %edi 107700: 56 push %esi 107701: 53 push %ebx 107702: 83 ec 28 sub $0x28,%esp 107705: 89 c7 mov %eax,%edi 107707: 89 d6 mov %edx,%esi 107709: 89 cb mov %ecx,%ebx new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 10770b: 68 04 02 00 00 push $0x204 107710: e8 2b 12 00 00 call 108940 107715: 89 c2 mov %eax,%edx if (s == NULL) 107717: 83 c4 10 add $0x10,%esp { return RTEMS_NO_MEMORY; 10771a: b8 1a 00 00 00 mov $0x1a,%eax if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) 10771f: 85 d2 test %edx,%edx 107721: 74 3b je 10775e <== NEVER TAKEN { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 107723: 50 push %eax 107724: 68 00 02 00 00 push $0x200 107729: 8d 42 04 lea 0x4(%edx),%eax 10772c: 50 push %eax 10772d: 57 push %edi 10772e: 89 55 e4 mov %edx,-0x1c(%ebp) 107731: e8 6a 1c 00 00 call 1093a0 if (n != RTEMS_IDE_SECTOR_SIZE) 107736: 83 c4 10 add $0x10,%esp 107739: 3d 00 02 00 00 cmp $0x200,%eax 10773e: 8b 55 e4 mov -0x1c(%ebp),%edx 107741: 74 13 je 107756 <== ALWAYS TAKEN { free(s); 107743: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107746: 52 push %edx <== NOT EXECUTED 107747: e8 dc 0c 00 00 call 108428 <== NOT EXECUTED 10774c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return RTEMS_IO_ERROR; 10774f: b8 1b 00 00 00 mov $0x1b,%eax <== NOT EXECUTED 107754: eb 08 jmp 10775e <== NOT EXECUTED } s->sector_num = sector_num; 107756: 89 32 mov %esi,(%edx) *sector = s; 107758: 89 13 mov %edx,(%ebx) return RTEMS_SUCCESSFUL; 10775a: 31 c0 xor %eax,%eax 10775c: eb 00 jmp 10775e } 10775e: 8d 65 f4 lea -0xc(%ebp),%esp 107761: 5b pop %ebx 107762: 5e pop %esi 107763: 5f pop %edi 107764: 5d pop %ebp 107765: c3 ret =============================================================================== 0012c628 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 12c628: 55 push %ebp 12c629: 89 e5 mov %esp,%ebp 12c62b: 57 push %edi 12c62c: 56 push %esi 12c62d: 53 push %ebx 12c62e: 83 ec 0c sub $0xc,%esp 12c631: 8b 45 08 mov 0x8(%ebp),%eax 12c634: 8b 75 0c mov 0xc(%ebp),%esi 12c637: 8b 7d 10 mov 0x10(%ebp),%edi rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 12c63a: 31 db xor %ebx,%ebx 12c63c: 3b 05 08 f7 13 00 cmp 0x13f708,%eax 12c642: 73 09 jae 12c64d <== NEVER TAKEN 12c644: 6b d8 30 imul $0x30,%eax,%ebx 12c647: 03 1d d8 38 15 00 add 0x1538d8,%ebx /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 12c64d: 83 ec 0c sub $0xc,%esp 12c650: 8d 43 10 lea 0x10(%ebx),%eax 12c653: 50 push %eax 12c654: e8 d3 f3 fd ff call 10ba2c if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 12c659: 83 c4 10 add $0x10,%esp 12c65c: 85 c0 test %eax,%eax 12c65e: 75 18 jne 12c678 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 12c660: 8b 43 20 mov 0x20(%ebx),%eax 12c663: 89 7d 10 mov %edi,0x10(%ebp) 12c666: 89 75 0c mov %esi,0xc(%ebp) 12c669: 89 5d 08 mov %ebx,0x8(%ebp) 12c66c: 8b 40 08 mov 0x8(%eax),%eax } 12c66f: 8d 65 f4 lea -0xc(%ebp),%esp 12c672: 5b pop %ebx 12c673: 5e pop %esi 12c674: 5f pop %edi 12c675: 5d pop %ebp /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 12c676: ff e0 jmp *%eax /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 12c678: e8 4f 2b ff ff call 11f1cc <__errno> 12c67d: c7 00 14 00 00 00 movl $0x14,(%eax) /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 12c683: 83 c8 ff or $0xffffffff,%eax 12c686: 8d 65 f4 lea -0xc(%ebp),%esp 12c689: 5b pop %ebx 12c68a: 5e pop %esi 12c68b: 5f pop %edi 12c68c: 5d pop %ebp 12c68d: c3 ret =============================================================================== 001221a0 : void init_etc_passwd_group(void) { FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1221a0: 80 3d 5c da 16 00 00 cmpb $0x0,0x16da5c 1221a7: 0f 85 c1 00 00 00 jne 12226e /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1221ad: 55 push %ebp 1221ae: 89 e5 mov %esp,%ebp 1221b0: 53 push %ebx 1221b1: 83 ec 0c sub $0xc,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 1221b4: c6 05 5c da 16 00 01 movb $0x1,0x16da5c mkdir("/etc", 0777); 1221bb: 68 ff 01 00 00 push $0x1ff 1221c0: 68 41 03 15 00 push $0x150341 1221c5: e8 ea 46 fe ff call 1068b4 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 1221ca: 58 pop %eax 1221cb: 5a pop %edx 1221cc: 68 7b c9 14 00 push $0x14c97b 1221d1: 68 46 03 15 00 push $0x150346 1221d6: e8 41 f6 00 00 call 13181c 1221db: 83 c4 10 add $0x10,%esp 1221de: 85 c0 test %eax,%eax 1221e0: 74 06 je 1221e8 fclose(fp); 1221e2: 83 ec 0c sub $0xc,%esp 1221e5: 50 push %eax 1221e6: eb 2a jmp 122212 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 1221e8: 50 push %eax 1221e9: 50 push %eax 1221ea: 68 78 c9 14 00 push $0x14c978 1221ef: 68 46 03 15 00 push $0x150346 1221f4: e8 23 f6 00 00 call 13181c 1221f9: 89 c3 mov %eax,%ebx 1221fb: 83 c4 10 add $0x10,%esp 1221fe: 85 c0 test %eax,%eax 122200: 74 18 je 12221a <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 122202: 50 push %eax 122203: 50 push %eax 122204: 53 push %ebx 122205: 68 52 03 15 00 push $0x150352 12220a: e8 7d f7 00 00 call 13198c "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 12220f: 89 1c 24 mov %ebx,(%esp) 122212: e8 8d ed 00 00 call 130fa4 122217: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 12221a: 53 push %ebx 12221b: 53 push %ebx 12221c: 68 7b c9 14 00 push $0x14c97b 122221: 68 b9 03 15 00 push $0x1503b9 122226: e8 f1 f5 00 00 call 13181c 12222b: 83 c4 10 add $0x10,%esp 12222e: 85 c0 test %eax,%eax 122230: 74 06 je 122238 fclose(fp); 122232: 83 ec 0c sub $0xc,%esp 122235: 50 push %eax 122236: eb 2a jmp 122262 } else if ((fp = fopen("/etc/group", "w")) != NULL) { 122238: 51 push %ecx 122239: 51 push %ecx 12223a: 68 78 c9 14 00 push $0x14c978 12223f: 68 b9 03 15 00 push $0x1503b9 122244: e8 d3 f5 00 00 call 13181c 122249: 89 c3 mov %eax,%ebx 12224b: 83 c4 10 add $0x10,%esp 12224e: 85 c0 test %eax,%eax 122250: 74 18 je 12226a <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 122252: 52 push %edx 122253: 52 push %edx 122254: 50 push %eax 122255: 68 c4 03 15 00 push $0x1503c4 12225a: e8 2d f7 00 00 call 13198c "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 12225f: 89 1c 24 mov %ebx,(%esp) 122262: e8 3d ed 00 00 call 130fa4 122267: 83 c4 10 add $0x10,%esp } } 12226a: 8b 5d fc mov -0x4(%ebp),%ebx 12226d: c9 leave 12226e: c3 ret =============================================================================== 00108c6f : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108c6f: 55 push %ebp 108c70: 89 e5 mov %esp,%ebp 108c72: 53 push %ebx 108c73: 83 ec 14 sub $0x14,%esp 108c76: 89 d3 mov %edx,%ebx 108c78: 88 c1 mov %al,%cl if (tty->termios.c_iflag & ISTRIP) 108c7a: 8b 42 30 mov 0x30(%edx),%eax 108c7d: a8 20 test $0x20,%al 108c7f: 74 03 je 108c84 <== ALWAYS TAKEN c &= 0x7f; 108c81: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108c84: f6 c4 02 test $0x2,%ah 108c87: 74 17 je 108ca0 c = tolower (c); 108c89: 0f b6 c9 movzbl %cl,%ecx 108c8c: 8b 15 88 c2 12 00 mov 0x12c288,%edx 108c92: 8a 54 0a 01 mov 0x1(%edx,%ecx,1),%dl 108c96: 83 e2 03 and $0x3,%edx 108c99: fe ca dec %dl 108c9b: 75 03 jne 108ca0 108c9d: 83 c1 20 add $0x20,%ecx if (c == '\r') { 108ca0: 80 f9 0d cmp $0xd,%cl 108ca3: 75 12 jne 108cb7 if (tty->termios.c_iflag & IGNCR) 108ca5: a8 80 test $0x80,%al 108ca7: 74 05 je 108cae <== ALWAYS TAKEN 108ca9: e9 20 01 00 00 jmp 108dce <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 108cae: f6 c4 01 test $0x1,%ah 108cb1: 74 19 je 108ccc <== NEVER TAKEN c = '\n'; 108cb3: b1 0a mov $0xa,%cl 108cb5: eb 15 jmp 108ccc } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108cb7: 80 f9 0a cmp $0xa,%cl 108cba: 75 08 jne 108cc4 108cbc: a8 40 test $0x40,%al 108cbe: 74 0c je 108ccc <== ALWAYS TAKEN c = '\r'; 108cc0: b1 0d mov $0xd,%cl <== NOT EXECUTED 108cc2: eb 08 jmp 108ccc <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108cc4: 84 c9 test %cl,%cl 108cc6: 0f 84 d4 00 00 00 je 108da0 <== NEVER TAKEN 108ccc: 8b 43 3c mov 0x3c(%ebx),%eax 108ccf: a8 02 test $0x2,%al 108cd1: 0f 84 c9 00 00 00 je 108da0 if (c == tty->termios.c_cc[VERASE]) { 108cd7: 3a 4b 43 cmp 0x43(%ebx),%cl 108cda: 75 0d jne 108ce9 108cdc: 31 d2 xor %edx,%edx * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 108cde: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 108ce2: 75 59 jne 108d3d 108ce4: e9 e5 00 00 00 jmp 108dce if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108ce9: 3a 4b 44 cmp 0x44(%ebx),%cl 108cec: 75 5b jne 108d49 * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 108cee: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 108cf2: 0f 84 d6 00 00 00 je 108dce <== NEVER TAKEN return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 108cf8: a8 08 test $0x8,%al 108cfa: 75 0c jne 108d08 <== ALWAYS TAKEN tty->ccount = 0; 108cfc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 108d03: e9 c6 00 00 00 jmp 108dce <== NOT EXECUTED 108d08: ba 01 00 00 00 mov $0x1,%edx return; } if (!(tty->termios.c_lflag & ECHOE)) { 108d0d: a8 10 test $0x10,%al 108d0f: 75 2c jne 108d3d <== ALWAYS TAKEN tty->ccount = 0; 108d11: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108d18: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108d1b: 89 da mov %ebx,%edx <== NOT EXECUTED 108d1d: e8 c6 fd ff ff call 108ae8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108d22: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d26: 0f 84 a2 00 00 00 je 108dce <== NOT EXECUTED echo ('\n', tty); 108d2c: 89 da mov %ebx,%edx <== NOT EXECUTED 108d2e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d33: e8 b0 fd ff ff call 108ae8 <== NOT EXECUTED 108d38: e9 91 00 00 00 jmp 108dce <== NOT EXECUTED 108d3d: 89 d8 mov %ebx,%eax 108d3f: e8 fc fd ff ff call 108b40 108d44: e9 85 00 00 00 jmp 108dce } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108d49: 3a 4b 45 cmp 0x45(%ebx),%cl 108d4c: 0f 84 80 00 00 00 je 108dd2 <== NEVER TAKEN return 1; } else if (c == '\n') { 108d52: 80 f9 0a cmp $0xa,%cl 108d55: 75 1c jne 108d73 if (tty->termios.c_lflag & (ECHO | ECHONL)) 108d57: a8 48 test $0x48,%al 108d59: 74 0c je 108d67 <== NEVER TAKEN echo (c, tty); 108d5b: 89 da mov %ebx,%edx 108d5d: b8 0a 00 00 00 mov $0xa,%eax 108d62: e8 81 fd ff ff call 108ae8 tty->cbuf[tty->ccount++] = c; 108d67: 8b 43 20 mov 0x20(%ebx),%eax 108d6a: 8b 53 1c mov 0x1c(%ebx),%edx 108d6d: c6 04 02 0a movb $0xa,(%edx,%eax,1) 108d71: eb 27 jmp 108d9a return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 108d73: 3a 4b 4c cmp 0x4c(%ebx),%cl 108d76: 74 05 je 108d7d <== NEVER TAKEN 108d78: 3a 4b 51 cmp 0x51(%ebx),%cl 108d7b: 75 23 jne 108da0 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 108d7d: a8 08 test $0x8,%al <== NOT EXECUTED 108d7f: 74 10 je 108d91 <== NOT EXECUTED echo (c, tty); 108d81: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108d84: 89 da mov %ebx,%edx <== NOT EXECUTED 108d86: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108d89: e8 5a fd ff ff call 108ae8 <== NOT EXECUTED 108d8e: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108d91: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108d94: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108d97: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108d9a: 40 inc %eax 108d9b: 89 43 20 mov %eax,0x20(%ebx) 108d9e: eb 32 jmp 108dd2 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108da0: a1 0c c1 12 00 mov 0x12c10c,%eax 108da5: 48 dec %eax 108da6: 39 43 20 cmp %eax,0x20(%ebx) 108da9: 73 23 jae 108dce <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 108dab: f6 43 3c 08 testb $0x8,0x3c(%ebx) 108daf: 74 10 je 108dc1 <== NEVER TAKEN echo (c, tty); 108db1: 0f b6 c1 movzbl %cl,%eax 108db4: 89 da mov %ebx,%edx 108db6: 88 4d f4 mov %cl,-0xc(%ebp) 108db9: e8 2a fd ff ff call 108ae8 108dbe: 8a 4d f4 mov -0xc(%ebp),%cl tty->cbuf[tty->ccount++] = c; 108dc1: 8b 43 20 mov 0x20(%ebx),%eax 108dc4: 8b 53 1c mov 0x1c(%ebx),%edx 108dc7: 88 0c 02 mov %cl,(%edx,%eax,1) 108dca: 40 inc %eax 108dcb: 89 43 20 mov %eax,0x20(%ebx) } return 0; 108dce: 31 c0 xor %eax,%eax 108dd0: eb 05 jmp 108dd7 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 108dd2: b8 01 00 00 00 mov $0x1,%eax if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 108dd7: 83 c4 14 add $0x14,%esp 108dda: 5b pop %ebx 108ddb: 5d pop %ebp 108ddc: c3 ret =============================================================================== 0011d990 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11d990: 55 push %ebp 11d991: 89 e5 mov %esp,%ebp 11d993: 57 push %edi 11d994: 56 push %esi 11d995: 53 push %ebx 11d996: 83 ec 3c sub $0x3c,%esp 11d999: 8b 5d 0c mov 0xc(%ebp),%ebx 11d99c: 8b 75 10 mov 0x10(%ebp),%esi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 11d99f: e8 f0 fd ff ff call 11d794 11d9a4: 39 45 08 cmp %eax,0x8(%ebp) 11d9a7: 74 10 je 11d9b9 rtems_set_errno_and_return_minus_one( ESRCH ); 11d9a9: e8 2e 35 ff ff call 110edc <__errno> 11d9ae: c7 00 03 00 00 00 movl $0x3,(%eax) 11d9b4: e9 f1 01 00 00 jmp 11dbaa /* * Validate the signal passed. */ if ( !sig ) 11d9b9: 85 db test %ebx,%ebx 11d9bb: 75 02 jne 11d9bf 11d9bd: eb 08 jmp 11d9c7 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 11d9bf: 8d 4b ff lea -0x1(%ebx),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 11d9c2: 83 f9 1f cmp $0x1f,%ecx 11d9c5: 76 10 jbe 11d9d7 rtems_set_errno_and_return_minus_one( EINVAL ); 11d9c7: e8 10 35 ff ff call 110edc <__errno> 11d9cc: c7 00 16 00 00 00 movl $0x16,(%eax) 11d9d2: e9 d3 01 00 00 jmp 11dbaa /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 11d9d7: 6b c3 0c imul $0xc,%ebx,%eax 11d9da: 83 b8 30 e9 12 00 01 cmpl $0x1,0x12e930(%eax) 11d9e1: 0f 84 e9 01 00 00 je 11dbd0 /* * 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 ) ) 11d9e7: 83 fb 04 cmp $0x4,%ebx 11d9ea: 74 0a je 11d9f6 11d9ec: 83 fb 08 cmp $0x8,%ebx 11d9ef: 74 05 je 11d9f6 11d9f1: 83 fb 0b cmp $0xb,%ebx 11d9f4: 75 16 jne 11da0c return pthread_kill( pthread_self(), sig ); 11d9f6: e8 9d 03 00 00 call 11dd98 11d9fb: 56 push %esi 11d9fc: 56 push %esi 11d9fd: 53 push %ebx 11d9fe: 50 push %eax 11d9ff: e8 ec 02 00 00 call 11dcf0 11da04: 83 c4 10 add $0x10,%esp 11da07: e9 c6 01 00 00 jmp 11dbd2 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 11da0c: bf 01 00 00 00 mov $0x1,%edi 11da11: d3 e7 shl %cl,%edi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 11da13: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 11da16: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 11da1d: 85 f6 test %esi,%esi 11da1f: 75 09 jne 11da2a siginfo->si_value.sival_int = 0; 11da21: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11da28: eb 05 jmp 11da2f } else { siginfo->si_value = *value; 11da2a: 8b 06 mov (%esi),%eax 11da2c: 89 45 e4 mov %eax,-0x1c(%ebp) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 11da2f: a1 e4 e3 12 00 mov 0x12e3e4,%eax 11da34: 40 inc %eax 11da35: a3 e4 e3 12 00 mov %eax,0x12e3e4 return _Thread_Dispatch_disable_level; 11da3a: a1 e4 e3 12 00 mov 0x12e3e4,%eax /* * 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; 11da3f: a1 ec e8 12 00 mov 0x12e8ec,%eax api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 11da44: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx 11da4a: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 11da50: f7 d2 not %edx 11da52: 85 d7 test %edx,%edi 11da54: 0f 85 fa 00 00 00 jne 11db54 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 11da5a: a1 b4 ea 12 00 mov 0x12eab4,%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 11da5f: eb 21 jmp 11da82 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11da61: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 11da67: 85 78 30 test %edi,0x30(%eax) 11da6a: 0f 85 e4 00 00 00 jne 11db54 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 11da70: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 11da76: f7 d2 not %edx 11da78: 85 d7 test %edx,%edi 11da7a: 0f 85 d4 00 00 00 jne 11db54 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 11da80: 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 = _Chain_First( the_chain ); 11da82: 3d b8 ea 12 00 cmp $0x12eab8,%eax 11da87: 75 d8 jne 11da61 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 11da89: 0f b6 05 88 a1 12 00 movzbl 0x12a188,%eax 11da90: 40 inc %eax 11da91: 89 45 bc mov %eax,-0x44(%ebp) * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 11da94: 31 c0 xor %eax,%eax interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 11da96: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 11da9d: 8b 4d cc mov -0x34(%ebp),%ecx 11daa0: 8b 14 8d bc e3 12 00 mov 0x12e3bc(,%ecx,4),%edx 11daa7: 85 d2 test %edx,%edx 11daa9: 0f 84 94 00 00 00 je 11db43 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 11daaf: 8b 52 04 mov 0x4(%edx),%edx */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 11dab2: 0f b7 72 10 movzwl 0x10(%edx),%esi 11dab6: 89 75 c4 mov %esi,-0x3c(%ebp) object_table = the_info->local_table; 11dab9: 8b 52 1c mov 0x1c(%edx),%edx 11dabc: 89 55 c0 mov %edx,-0x40(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 11dabf: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) 11dac6: eb 73 jmp 11db3b the_thread = (Thread_Control *) object_table[ index ]; 11dac8: 8b 4d d0 mov -0x30(%ebp),%ecx 11dacb: 8b 75 c0 mov -0x40(%ebp),%esi 11dace: 8b 14 8e mov (%esi,%ecx,4),%edx if ( !the_thread ) 11dad1: 85 d2 test %edx,%edx 11dad3: 74 63 je 11db38 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 11dad5: 8b 4a 14 mov 0x14(%edx),%ecx 11dad8: 89 4d d4 mov %ecx,-0x2c(%ebp) 11dadb: 8b 75 bc mov -0x44(%ebp),%esi 11dade: 39 f1 cmp %esi,%ecx 11dae0: 77 56 ja 11db38 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 11dae2: 8b b2 e8 00 00 00 mov 0xe8(%edx),%esi 11dae8: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi 11daee: f7 d6 not %esi 11daf0: 85 f7 test %esi,%edi 11daf2: 74 44 je 11db38 * * 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 ) { 11daf4: 8b 75 bc mov -0x44(%ebp),%esi 11daf7: 39 f1 cmp %esi,%ecx 11daf9: 72 2d jb 11db28 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 11dafb: 85 c0 test %eax,%eax 11dafd: 74 39 je 11db38 <== NEVER TAKEN 11daff: 8b 48 10 mov 0x10(%eax),%ecx 11db02: 89 4d c8 mov %ecx,-0x38(%ebp) 11db05: 85 c9 test %ecx,%ecx 11db07: 74 2f je 11db38 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 11db09: 8b 72 10 mov 0x10(%edx),%esi 11db0c: 85 f6 test %esi,%esi 11db0e: 74 20 je 11db30 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 11db10: 81 e1 00 00 00 10 and $0x10000000,%ecx 11db16: 75 20 jne 11db38 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 11db18: 81 e6 00 00 00 10 and $0x10000000,%esi 11db1e: 74 18 je 11db38 11db20: 8b 75 d4 mov -0x2c(%ebp),%esi 11db23: 89 75 bc mov %esi,-0x44(%ebp) 11db26: eb 0e jmp 11db36 * * 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 ) { 11db28: 8b 45 d4 mov -0x2c(%ebp),%eax 11db2b: 89 45 bc mov %eax,-0x44(%ebp) 11db2e: eb 06 jmp 11db36 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 11db30: 8b 4d d4 mov -0x2c(%ebp),%ecx 11db33: 89 4d bc mov %ecx,-0x44(%ebp) 11db36: 89 d0 mov %edx,%eax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11db38: ff 45 d0 incl -0x30(%ebp) 11db3b: 8b 75 c4 mov -0x3c(%ebp),%esi 11db3e: 39 75 d0 cmp %esi,-0x30(%ebp) 11db41: 76 85 jbe 11dac8 * + 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++) { 11db43: ff 45 cc incl -0x34(%ebp) 11db46: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 11db4a: 0f 85 4d ff ff ff jne 11da9d } } } } if ( interested ) { 11db50: 85 c0 test %eax,%eax 11db52: 74 1a je 11db6e /* * 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 ) ) { 11db54: 51 push %ecx mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 11db55: 8d 55 dc lea -0x24(%ebp),%edx /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 11db58: 52 push %edx 11db59: 53 push %ebx 11db5a: 50 push %eax 11db5b: e8 90 00 00 00 call 11dbf0 <_POSIX_signals_Unblock_thread> 11db60: 83 c4 10 add $0x10,%esp 11db63: 84 c0 test %al,%al 11db65: 74 07 je 11db6e _Thread_Enable_dispatch(); 11db67: e8 a0 e2 fe ff call 10be0c <_Thread_Enable_dispatch> 11db6c: eb 62 jmp 11dbd0 /* * 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 ); 11db6e: 83 ec 0c sub $0xc,%esp 11db71: 57 push %edi 11db72: e8 65 00 00 00 call 11dbdc <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 11db77: 6b db 0c imul $0xc,%ebx,%ebx 11db7a: 83 c4 10 add $0x10,%esp 11db7d: 83 bb 28 e9 12 00 02 cmpl $0x2,0x12e928(%ebx) 11db84: 75 e1 jne 11db67 psiginfo = (POSIX_signals_Siginfo_node *) 11db86: 83 ec 0c sub $0xc,%esp 11db89: 68 a8 ea 12 00 push $0x12eaa8 11db8e: e8 ed ca fe ff call 10a680 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 11db93: 83 c4 10 add $0x10,%esp 11db96: 85 c0 test %eax,%eax 11db98: 75 15 jne 11dbaf _Thread_Enable_dispatch(); 11db9a: e8 6d e2 fe ff call 10be0c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 11db9f: e8 38 33 ff ff call 110edc <__errno> 11dba4: c7 00 0b 00 00 00 movl $0xb,(%eax) 11dbaa: 83 c8 ff or $0xffffffff,%eax 11dbad: eb 23 jmp 11dbd2 } psiginfo->Info = *siginfo; 11dbaf: 8d 78 08 lea 0x8(%eax),%edi 11dbb2: 8d 75 dc lea -0x24(%ebp),%esi 11dbb5: b9 03 00 00 00 mov $0x3,%ecx 11dbba: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 11dbbc: 52 push %edx 11dbbd: 52 push %edx 11dbbe: 50 push %eax 11dbbf: 81 c3 20 eb 12 00 add $0x12eb20,%ebx 11dbc5: 53 push %ebx 11dbc6: e8 91 ca fe ff call 10a65c <_Chain_Append> 11dbcb: 83 c4 10 add $0x10,%esp 11dbce: eb 97 jmp 11db67 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 11dbd0: 31 c0 xor %eax,%eax } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 11dbd2: 8d 65 f4 lea -0xc(%ebp),%esp 11dbd5: 5b pop %ebx 11dbd6: 5e pop %esi 11dbd7: 5f pop %edi 11dbd8: 5d pop %ebp 11dbd9: c3 ret =============================================================================== 00106e64 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 106e64: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520 106e6b: 75 58 jne 106ec5 <== NEVER TAKEN extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 106e6d: 55 push %ebp 106e6e: 89 e5 mov %esp,%ebp 106e70: 53 push %ebx 106e71: 51 push %ecx /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 106e72: 8b 1d 60 04 12 00 mov 0x120460,%ebx 106e78: 39 1d a0 c2 12 00 cmp %ebx,0x12c2a0 106e7e: 74 12 je 106e92 _wrapup_reent(_global_impure_ptr); 106e80: 83 ec 0c sub $0xc,%esp 106e83: 53 push %ebx 106e84: e8 a7 aa 00 00 call 111930 <_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; 106e89: 89 1d a0 c2 12 00 mov %ebx,0x12c2a0 106e8f: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 106e92: 83 ec 0c sub $0xc,%esp 106e95: a1 a0 c2 12 00 mov 0x12c2a0,%eax 106e9a: ff 70 04 pushl 0x4(%eax) 106e9d: e8 56 a1 00 00 call 110ff8 fclose (stdout); 106ea2: 58 pop %eax 106ea3: a1 a0 c2 12 00 mov 0x12c2a0,%eax 106ea8: ff 70 08 pushl 0x8(%eax) 106eab: e8 48 a1 00 00 call 110ff8 fclose (stderr); 106eb0: 5a pop %edx 106eb1: a1 a0 c2 12 00 mov 0x12c2a0,%eax 106eb6: ff 70 0c pushl 0xc(%eax) 106eb9: e8 3a a1 00 00 call 110ff8 106ebe: 83 c4 10 add $0x10,%esp } 106ec1: 8b 5d fc mov -0x4(%ebp),%ebx 106ec4: c9 leave 106ec5: c3 ret =============================================================================== 001069f4 : #include "malloc_p.h" void *malloc( size_t size ) { 1069f4: 55 push %ebp 1069f5: 89 e5 mov %esp,%ebp 1069f7: 56 push %esi 1069f8: 53 push %ebx 1069f9: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 1069fc: ff 05 ec e2 12 00 incl 0x12e2ec /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 106a02: e8 04 ff ff ff call 10690b /* * Validate the parameters */ if ( !size ) 106a07: 85 f6 test %esi,%esi 106a09: 75 02 jne 106a0d 106a0b: eb 43 jmp 106a50 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 106a0d: 83 3d 20 e5 12 00 03 cmpl $0x3,0x12e520 106a14: 74 1b je 106a31 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 106a16: 6a 00 push $0x0 106a18: 6a 00 push $0x0 106a1a: 56 push %esi 106a1b: ff 35 2c a2 12 00 pushl 0x12a22c 106a21: e8 ae 4a 00 00 call 10b4d4 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 106a26: 83 c4 10 add $0x10,%esp 106a29: 85 c0 test %eax,%eax 106a2b: 74 0f je 106a3c 106a2d: 89 c3 mov %eax,%ebx 106a2f: eb 33 jmp 106a64 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 106a31: e8 96 fe ff ff call 1068cc return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 106a36: 84 c0 test %al,%al 106a38: 75 dc jne 106a16 <== ALWAYS TAKEN 106a3a: eb 14 jmp 106a50 <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 106a3c: a1 00 c8 12 00 mov 0x12c800,%eax 106a41: 85 c0 test %eax,%eax 106a43: 75 0f jne 106a54 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; 106a45: e8 92 a4 00 00 call 110edc <__errno> 106a4a: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 106a50: 31 db xor %ebx,%ebx 106a52: eb 35 jmp 106a89 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 106a54: 83 ec 0c sub $0xc,%esp 106a57: 56 push %esi 106a58: ff 50 04 call *0x4(%eax) 106a5b: 89 c3 mov %eax,%ebx if ( !return_this ) { 106a5d: 83 c4 10 add $0x10,%esp 106a60: 85 c0 test %eax,%eax 106a62: 74 e1 je 106a45 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 106a64: a1 fc c7 12 00 mov 0x12c7fc,%eax 106a69: 85 c0 test %eax,%eax 106a6b: 74 09 je 106a76 (*rtems_malloc_dirty_helper)( return_this, size ); 106a6d: 52 push %edx 106a6e: 52 push %edx 106a6f: 56 push %esi 106a70: 53 push %ebx 106a71: ff d0 call *%eax 106a73: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 106a76: a1 04 c8 12 00 mov 0x12c804,%eax 106a7b: 85 c0 test %eax,%eax 106a7d: 74 0a je 106a89 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 106a7f: 83 ec 0c sub $0xc,%esp 106a82: 53 push %ebx 106a83: ff 50 04 call *0x4(%eax) 106a86: 83 c4 10 add $0x10,%esp return return_this; } 106a89: 89 d8 mov %ebx,%eax 106a8b: 8d 65 f8 lea -0x8(%ebp),%esp 106a8e: 5b pop %ebx 106a8f: 5e pop %esi 106a90: 5d pop %ebp 106a91: c3 ret =============================================================================== 00106a90 : } static void *malloc_sbrk_extend_and_allocate( size_t size ) { 106a90: 55 push %ebp 106a91: 89 e5 mov %esp,%ebp 106a93: 56 push %esi 106a94: 53 push %ebx 106a95: 8b 75 08 mov 0x8(%ebp),%esi * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 106a98: 8b 0d 9c ea 12 00 mov 0x12ea9c,%ecx if ( sbrk_amount == 0 ) 106a9e: 85 c9 test %ecx,%ecx 106aa0: 75 02 jne 106aa4 <== ALWAYS TAKEN 106aa2: eb 4b jmp 106aef <== NOT EXECUTED return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 106aa4: 8d 04 0e lea (%esi,%ecx,1),%eax 106aa7: 31 d2 xor %edx,%edx 106aa9: f7 f1 div %ecx 106aab: 89 c3 mov %eax,%ebx 106aad: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 106ab0: 83 ec 0c sub $0xc,%esp 106ab3: 53 push %ebx 106ab4: e8 1c 99 ff ff call 1003d5 if ( starting_address == (void*) -1 ) 106ab9: 83 c4 10 add $0x10,%esp 106abc: 83 f8 ff cmp $0xffffffff,%eax 106abf: 74 2e je 106aef return (void *) 0; if ( !_Protected_heap_Extend( 106ac1: 52 push %edx 106ac2: 53 push %ebx 106ac3: 50 push %eax 106ac4: ff 35 6c a8 12 00 pushl 0x12a86c 106aca: e8 51 4a 00 00 call 10b520 <_Protected_heap_Extend> 106acf: 83 c4 10 add $0x10,%esp 106ad2: 84 c0 test %al,%al 106ad4: 75 1d jne 106af3 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 106ad6: 83 ec 0c sub $0xc,%esp 106ad9: f7 db neg %ebx 106adb: 53 push %ebx 106adc: e8 f4 98 ff ff call 1003d5 errno = ENOMEM; 106ae1: e8 7a a6 00 00 call 111160 <__errno> 106ae6: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 106aec: 83 c4 10 add $0x10,%esp 106aef: 31 c0 xor %eax,%eax 106af1: eb 19 jmp 106b0c } MSBUMP(space_available, the_size); 106af3: 01 1d 70 ea 12 00 add %ebx,0x12ea70 106af9: 6a 00 push $0x0 106afb: 6a 00 push $0x0 106afd: 56 push %esi 106afe: ff 35 6c a8 12 00 pushl 0x12a86c 106b04: e8 df 49 00 00 call 10b4e8 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 106b09: 83 c4 10 add $0x10,%esp } 106b0c: 8d 65 f8 lea -0x8(%ebp),%esp 106b0f: 5b pop %ebx 106b10: 5e pop %esi 106b11: 5d pop %ebp 106b12: c3 ret =============================================================================== 00106b13 : static void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 106b13: 55 push %ebp 106b14: 89 e5 mov %esp,%ebp 106b16: 83 ec 08 sub $0x8,%esp 106b19: 8b 45 08 mov 0x8(%ebp),%eax 106b1c: 8b 55 0c mov 0xc(%ebp),%edx uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 106b1f: 89 15 9c ea 12 00 mov %edx,0x12ea9c * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 106b25: 85 c0 test %eax,%eax 106b27: 75 25 jne 106b4e uaddress = (uintptr_t)sbrk(length); 106b29: 83 ec 0c sub $0xc,%esp 106b2c: 52 push %edx 106b2d: e8 a3 98 ff ff call 1003d5 if (uaddress == (uintptr_t) -1) { 106b32: 83 c4 10 add $0x10,%esp 106b35: 83 f8 ff cmp $0xffffffff,%eax 106b38: 75 0a jne 106b44 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 106b3a: 83 ec 0c sub $0xc,%esp 106b3d: 6a 1a push $0x1a 106b3f: e8 f4 38 00 00 call 10a438 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 106b44: a8 03 test $0x3,%al <== NOT EXECUTED 106b46: 74 06 je 106b4e <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 106b48: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 106b4b: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 106b4e: c9 leave 106b4f: c3 ret =============================================================================== 0010f8a0 : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 10f8a0: 55 push %ebp 10f8a1: 89 e5 mov %esp,%ebp 10f8a3: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 10f8a6: ff 35 b4 df 12 00 pushl 0x12dfb4 10f8ac: 6a 01 push $0x1 10f8ae: e8 79 6c ff ff call 10652c if ( memory ) 10f8b3: 83 c4 10 add $0x10,%esp 10f8b6: 85 c0 test %eax,%eax 10f8b8: 74 06 je 10f8c0 <== NEVER TAKEN memfile_blocks_allocated++; 10f8ba: ff 05 d0 e0 12 00 incl 0x12e0d0 return memory; } 10f8c0: c9 leave 10f8c1: c3 ret =============================================================================== 0011010a : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 11010a: 55 push %ebp 11010b: 89 e5 mov %esp,%ebp 11010d: 53 push %ebx 11010e: 83 ec 14 sub $0x14,%esp 110111: 8b 45 0c mov 0xc(%ebp),%eax 110114: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 110117: 8b 4d 08 mov 0x8(%ebp),%ecx 11011a: 8b 59 18 mov 0x18(%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 ) 11011d: 3b 53 54 cmp 0x54(%ebx),%edx 110120: 7c 16 jl 110138 <== NEVER TAKEN 110122: 7f 05 jg 110129 <== NEVER TAKEN 110124: 3b 43 50 cmp 0x50(%ebx),%eax 110127: 76 0f jbe 110138 return IMFS_memfile_extend( the_jnode, true, length ); 110129: 52 push %edx 11012a: 50 push %eax 11012b: 6a 01 push $0x1 11012d: 53 push %ebx 11012e: e8 47 fc ff ff call 10fd7a 110133: 83 c4 10 add $0x10,%esp 110136: eb 1e jmp 110156 /* * 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; 110138: 89 43 50 mov %eax,0x50(%ebx) 11013b: 89 53 54 mov %edx,0x54(%ebx) IMFS_update_atime( the_jnode ); 11013e: 51 push %ecx 11013f: 51 push %ecx 110140: 6a 00 push $0x0 110142: 8d 45 f0 lea -0x10(%ebp),%eax 110145: 50 push %eax 110146: e8 61 66 ff ff call 1067ac 11014b: 8b 45 f0 mov -0x10(%ebp),%eax 11014e: 89 43 40 mov %eax,0x40(%ebx) return 0; 110151: 83 c4 10 add $0x10,%esp 110154: 31 c0 xor %eax,%eax } 110156: 8b 5d fc mov -0x4(%ebp),%ebx 110159: c9 leave 11015a: c3 ret =============================================================================== 0011009c : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 11009c: 55 push %ebp 11009d: 89 e5 mov %esp,%ebp 11009f: 83 ec 08 sub $0x8,%esp 1100a2: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1100a5: 8b 42 18 mov 0x18(%edx),%eax /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 1100a8: f6 42 0c 04 testb $0x4,0xc(%edx) 1100ac: 75 04 jne 1100b2 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 1100ae: 31 c0 xor %eax,%eax 1100b0: eb 56 jmp 110108 1100b2: 8b 50 4c mov 0x4c(%eax),%edx /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 1100b5: 83 3a 05 cmpl $0x5,(%edx) 1100b8: 75 f4 jne 1100ae <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 1100ba: 8b 50 50 mov 0x50(%eax),%edx <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1100bd: 8b 48 58 mov 0x58(%eax),%ecx <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 1100c0: c7 40 4c 9c fe 11 00 movl $0x11fe9c,0x4c(%eax) <== NOT EXECUTED the_jnode->info.file.size = 0; 1100c7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 1100ce: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 1100d5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 1100dc: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 1100e3: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) <== NOT EXECUTED if ((count != 0) 1100ea: 85 d2 test %edx,%edx <== NOT EXECUTED 1100ec: 74 c0 je 1100ae <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 1100ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1100f1: 52 push %edx <== NOT EXECUTED 1100f2: 51 push %ecx <== NOT EXECUTED 1100f3: 6a 00 push $0x0 <== NOT EXECUTED 1100f5: 6a 00 push $0x0 <== NOT EXECUTED 1100f7: 50 push %eax <== NOT EXECUTED 1100f8: e8 d9 fd ff ff call 10fed6 <== NOT EXECUTED 1100fd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED return -1; 110100: 40 inc %eax <== NOT EXECUTED 110101: 0f 95 c0 setne %al <== NOT EXECUTED 110104: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 110107: 48 dec %eax <== NOT EXECUTED } return 0; } 110108: c9 leave 110109: c3 ret =============================================================================== 00106bac : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 106bac: 55 push %ebp 106bad: 89 e5 mov %esp,%ebp 106baf: 57 push %edi 106bb0: 56 push %esi 106bb1: 53 push %ebx 106bb2: 83 ec 7c sub $0x7c,%esp 106bb5: 8b 75 10 mov 0x10(%ebp),%esi int rv = 0; if ( 106bb8: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 106bbc: 0f 87 6e 02 00 00 ja 106e30 options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 106bc2: 83 ec 0c sub $0xc,%esp 106bc5: 56 push %esi 106bc6: e8 c4 70 00 00 call 10dc8f 106bcb: 89 45 84 mov %eax,-0x7c(%ebp) rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 106bce: 83 c4 10 add $0x10,%esp 106bd1: 85 c0 test %eax,%eax 106bd3: 0f 84 57 02 00 00 je 106e30 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 106bd9: 8b 55 0c mov 0xc(%ebp),%edx 106bdc: 89 55 88 mov %edx,-0x78(%ebp) 106bdf: 85 d2 test %edx,%edx 106be1: 75 07 jne 106bea 106be3: c7 45 88 60 f8 11 00 movl $0x11f860,-0x78(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 106bea: 83 cb ff or $0xffffffff,%ebx 106bed: 31 c0 xor %eax,%eax 106bef: 89 d9 mov %ebx,%ecx 106bf1: 89 f7 mov %esi,%edi 106bf3: f2 ae repnz scas %es:(%edi),%al 106bf5: f7 d1 not %ecx 106bf7: 89 4d 94 mov %ecx,-0x6c(%ebp) 106bfa: 89 ca mov %ecx,%edx 106bfc: 4a dec %edx size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 106bfd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 106c01: 74 0e je 106c11 106c03: 89 d9 mov %ebx,%ecx 106c05: 8b 7d 08 mov 0x8(%ebp),%edi 106c08: f2 ae repnz scas %es:(%edi),%al 106c0a: f7 d1 not %ecx 106c0c: 89 4d 90 mov %ecx,-0x70(%ebp) 106c0f: eb 07 jmp 106c18 106c11: c7 45 90 00 00 00 00 movl $0x0,-0x70(%ebp) size_t target_size = strlen( target ) + 1; 106c18: 31 c0 xor %eax,%eax 106c1a: 83 c9 ff or $0xffffffff,%ecx 106c1d: 8b 7d 88 mov -0x78(%ebp),%edi 106c20: f2 ae repnz scas %es:(%edi),%al 106c22: f7 d1 not %ecx 106c24: 89 4d 8c mov %ecx,-0x74(%ebp) size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 106c27: 51 push %ecx 106c28: 51 push %ecx size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 106c29: 8b 4d 90 mov -0x70(%ebp),%ecx 106c2c: 8d 44 0a 65 lea 0x65(%edx,%ecx,1),%eax 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; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) 106c30: 03 45 8c add -0x74(%ebp),%eax + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 106c33: 50 push %eax 106c34: 6a 01 push $0x1 106c36: e8 f1 f8 ff ff call 10652c 106c3b: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 106c3d: 83 c4 10 add $0x10,%esp 106c40: 85 c0 test %eax,%eax 106c42: 0f 84 03 02 00 00 je 106e4b <== NEVER TAKEN rtems_filesystem_global_location_t *mt_fs_root = 106c48: 8d 50 40 lea 0x40(%eax),%edx (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); 106c4b: 8d 40 64 lea 0x64(%eax),%eax memcpy( str, filesystemtype, filesystemtype_size ); 106c4e: 89 c7 mov %eax,%edi 106c50: 8b 4d 94 mov -0x6c(%ebp),%ecx 106c53: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 106c55: 89 7d 94 mov %edi,-0x6c(%ebp) mt_entry->type = str; 106c58: 89 43 34 mov %eax,0x34(%ebx) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 106c5b: 8b 75 08 mov 0x8(%ebp),%esi 106c5e: 8b 4d 90 mov -0x70(%ebp),%ecx 106c61: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 106c63: 89 f8 mov %edi,%eax mt_entry->dev = str; 106c65: 8b 7d 94 mov -0x6c(%ebp),%edi 106c68: 89 7b 38 mov %edi,0x38(%ebx) str += source_size; memcpy( str, target, target_size ); 106c6b: 89 c7 mov %eax,%edi 106c6d: 8b 75 88 mov -0x78(%ebp),%esi 106c70: 8b 4d 8c mov -0x74(%ebp),%ecx 106c73: f3 a4 rep movsb %ds:(%esi),%es:(%edi) mt_entry->target = str; 106c75: 89 43 30 mov %eax,0x30(%ebx) str += target_size; mt_entry->mounted = true; 106c78: c6 43 28 01 movb $0x1,0x28(%ebx) mt_entry->mt_fs_root = mt_fs_root; 106c7c: 89 53 24 mov %edx,0x24(%ebx) mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 106c7f: c7 43 2c 64 f8 11 00 movl $0x11f864,0x2c(%ebx) mt_fs_root->location.mt_entry = mt_entry; 106c86: 89 5b 54 mov %ebx,0x54(%ebx) mt_fs_root->reference_count = 1; 106c89: c7 43 58 01 00 00 00 movl $0x1,0x58(%ebx) void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 106c90: 6a 24 push $0x24 106c92: 6a 01 push $0x1 106c94: 52 push %edx rtems_chain_initialize( 106c95: 8d 43 14 lea 0x14(%ebx),%eax 106c98: 50 push %eax 106c99: e8 06 3a 00 00 call 10a6a4 <_Chain_Initialize> filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 106c9e: 8a 45 14 mov 0x14(%ebp),%al 106ca1: 88 43 29 mov %al,0x29(%ebx) 106ca4: 80 63 29 01 andb $0x1,0x29(%ebx) rv = (*fsmount_me_h)( mt_entry, data ); 106ca8: 58 pop %eax 106ca9: 5a pop %edx 106caa: ff 75 18 pushl 0x18(%ebp) 106cad: 53 push %ebx 106cae: 8b 55 84 mov -0x7c(%ebp),%edx 106cb1: ff d2 call *%edx 106cb3: 89 c6 mov %eax,%esi if ( rv == 0 ) { 106cb5: 83 c4 10 add $0x10,%esp 106cb8: 85 c0 test %eax,%eax 106cba: 0f 85 7d 01 00 00 jne 106e3d if ( target != NULL ) { 106cc0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 106cc4: 0f 84 c4 00 00 00 je 106d8e { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 106cca: 50 push %eax 106ccb: 6a 1f push $0x1f 106ccd: ff 75 0c pushl 0xc(%ebp) rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); 106cd0: 8d 75 b0 lea -0x50(%ebp),%esi { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 106cd3: 56 push %esi 106cd4: e8 0c 0b 00 00 call 1077e5 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 106cd9: 8b 50 14 mov 0x14(%eax),%edx return (*mt_entry->ops->are_nodes_equal_h)( 106cdc: 59 pop %ecx 106cdd: 5f pop %edi 106cde: 8b 4a 0c mov 0xc(%edx),%ecx 106ce1: ff 72 24 pushl 0x24(%edx) 106ce4: 50 push %eax 106ce5: ff 51 10 call *0x10(%ecx) rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_root( currentloc ) ) { 106ce8: 83 c4 10 add $0x10,%esp 106ceb: 84 c0 test %al,%al 106ced: 75 73 jne 106d62 static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( 106cef: 50 push %eax 106cf0: 50 push %eax 106cf1: 8d 45 c8 lea -0x38(%ebp),%eax 106cf4: 50 push %eax rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); 106cf5: 8d 75 98 lea -0x68(%ebp),%esi 106cf8: 56 push %esi 106cf9: e8 41 0e 00 00 call 107b3f mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 106cfe: 89 34 24 mov %esi,(%esp) 106d01: e8 ac 0f 00 00 call 107cb2 106d06: 89 c7 mov %eax,%edi mt_entry->mt_point_node = mt_point_node; 106d08: 89 43 20 mov %eax,0x20(%ebx) rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 106d0b: 8b 40 14 mov 0x14(%eax),%eax 106d0e: 8b 40 0c mov 0xc(%eax),%eax 106d11: 89 1c 24 mov %ebx,(%esp) 106d14: ff 50 30 call *0x30(%eax) 106d17: 89 c6 mov %eax,%esi if ( rv == 0 ) { 106d19: 83 c4 10 add $0x10,%esp 106d1c: 85 c0 test %eax,%eax 106d1e: 75 34 jne 106d54 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 106d20: 50 push %eax 106d21: 6a 00 push $0x0 106d23: 6a 00 push $0x0 106d25: ff 35 d8 e2 12 00 pushl 0x12e2d8 106d2b: e8 60 30 00 00 call 109d90 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 106d30: a1 fc c0 12 00 mov 0x12c0fc,%eax the_node->next = tail; 106d35: c7 03 f8 c0 12 00 movl $0x12c0f8,(%ebx) tail->previous = the_node; 106d3b: 89 1d fc c0 12 00 mov %ebx,0x12c0fc old_last->next = the_node; 106d41: 89 18 mov %ebx,(%eax) the_node->previous = old_last; 106d43: 89 43 04 mov %eax,0x4(%ebx) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 106d46: 58 pop %eax 106d47: ff 35 d8 e2 12 00 pushl 0x12e2d8 106d4d: e8 2e 31 00 00 call 109e80 106d52: eb 09 jmp 106d5d &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 106d54: 83 ec 0c sub $0xc,%esp 106d57: 57 push %edi 106d58: e8 6c 0e 00 00 call 107bc9 106d5d: 83 c4 10 add $0x10,%esp 106d60: eb 10 jmp 106d72 } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 106d62: 50 push %eax 106d63: 50 push %eax 106d64: 6a 10 push $0x10 106d66: 56 push %esi 106d67: e8 52 08 00 00 call 1075be 106d6c: 83 c4 10 add $0x10,%esp rv = -1; 106d6f: 83 ce ff or $0xffffffff,%esi } rtems_filesystem_eval_path_cleanup( &ctx ); 106d72: 83 ec 0c sub $0xc,%esp 106d75: 8d 45 b0 lea -0x50(%ebp),%eax 106d78: 50 push %eax 106d79: e8 23 0b 00 00 call 1078a1 106d7e: 83 c4 10 add $0x10,%esp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 106d81: 85 f6 test %esi,%esi 106d83: 0f 84 d0 00 00 00 je 106e59 106d89: e9 93 00 00 00 jmp 106e21 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 106d8e: 50 push %eax 106d8f: 6a 00 push $0x0 106d91: 6a 00 push $0x0 106d93: ff 35 d8 e2 12 00 pushl 0x12e2d8 106d99: e8 f2 2f 00 00 call 109d90 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 106d9e: 83 c4 10 add $0x10,%esp 106da1: 81 3d f4 c0 12 00 f8 cmpl $0x12c0f8,0x12c0f4 106da8: c0 12 00 106dab: 75 18 jne 106dc5 <== NEVER TAKEN Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 106dad: a1 fc c0 12 00 mov 0x12c0fc,%eax the_node->next = tail; 106db2: c7 03 f8 c0 12 00 movl $0x12c0f8,(%ebx) tail->previous = the_node; 106db8: 89 1d fc c0 12 00 mov %ebx,0x12c0fc old_last->next = the_node; 106dbe: 89 18 mov %ebx,(%eax) the_node->previous = old_last; 106dc0: 89 43 04 mov %eax,0x4(%ebx) 106dc3: eb 0e jmp 106dd3 rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 106dc5: e8 12 a1 00 00 call 110edc <__errno> <== NOT EXECUTED 106dca: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED rv = -1; 106dd0: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 106dd3: 83 ec 0c sub $0xc,%esp 106dd6: ff 35 d8 e2 12 00 pushl 0x12e2d8 106ddc: e8 9f 30 00 00 call 109e80 } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { 106de1: 83 c4 10 add $0x10,%esp 106de4: 85 f6 test %esi,%esi 106de6: 75 39 jne 106e21 <== NEVER TAKEN rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 106de8: 83 c3 24 add $0x24,%ebx rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 106deb: 83 ec 0c sub $0xc,%esp 106dee: 53 push %ebx 106def: e8 37 0e 00 00 call 107c2b 106df4: 89 c7 mov %eax,%edi rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 106df6: 89 1c 24 mov %ebx,(%esp) 106df9: e8 2d 0e 00 00 call 107c2b 106dfe: 89 c3 mov %eax,%ebx rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 106e00: 58 pop %eax 106e01: 5a pop %edx 106e02: 57 push %edi 106e03: a1 14 c1 12 00 mov 0x12c114,%eax 106e08: 83 c0 04 add $0x4,%eax 106e0b: 50 push %eax 106e0c: e8 fd 0d 00 00 call 107c0e &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 106e11: 59 pop %ecx 106e12: 5f pop %edi 106e13: 53 push %ebx 106e14: ff 35 14 c1 12 00 pushl 0x12c114 106e1a: e8 ef 0d 00 00 call 107c0e 106e1f: eb 25 jmp 106e46 } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 106e21: 83 ec 0c sub $0xc,%esp 106e24: 8b 43 0c mov 0xc(%ebx),%eax 106e27: 53 push %ebx 106e28: ff 50 3c call *0x3c(%eax) 106e2b: 83 c4 10 add $0x10,%esp 106e2e: eb 0d jmp 106e3d } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 106e30: e8 a7 a0 00 00 call 110edc <__errno> 106e35: c7 00 16 00 00 00 movl $0x16,(%eax) 106e3b: eb 19 jmp 106e56 (*mt_entry->ops->fsunmount_me_h)( mt_entry ); } } if ( rv != 0 ) { free( mt_entry ); 106e3d: 83 ec 0c sub $0xc,%esp 106e40: 53 push %ebx 106e41: e8 ee f8 ff ff call 106734 106e46: 83 c4 10 add $0x10,%esp 106e49: eb 0e jmp 106e59 } } else { errno = ENOMEM; 106e4b: e8 8c a0 00 00 call 110edc <__errno> <== NOT EXECUTED 106e50: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED rv = -1; 106e56: 83 ce ff or $0xffffffff,%esi errno = EINVAL; rv = -1; } return rv; } 106e59: 89 f0 mov %esi,%eax 106e5b: 8d 65 f4 lea -0xc(%ebp),%esp 106e5e: 5b pop %ebx 106e5f: 5e pop %esi 106e60: 5f pop %edi 106e61: 5d pop %ebp 106e62: c3 ret =============================================================================== 0010a5b8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 10a5b8: 55 push %ebp 10a5b9: 89 e5 mov %esp,%ebp 10a5bb: 57 push %edi 10a5bc: 56 push %esi 10a5bd: 53 push %ebx 10a5be: 83 ec 1c sub $0x1c,%esp 10a5c1: 8b 75 08 mov 0x8(%ebp),%esi 10a5c4: 8b 5d 0c mov 0xc(%ebp),%ebx 10a5c7: 8b 7d 10 mov 0x10(%ebp),%edi 10a5ca: 8b 55 14 mov 0x14(%ebp),%edx 10a5cd: 8b 4d 18 mov 0x18(%ebp),%ecx int rv = -1; if (target != NULL) { 10a5d0: 85 db test %ebx,%ebx 10a5d2: 74 3b je 10a60f <== NEVER TAKEN rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 10a5d4: 50 push %eax 10a5d5: 50 push %eax 10a5d6: 68 ff 01 00 00 push $0x1ff 10a5db: 53 push %ebx 10a5dc: 89 55 e4 mov %edx,-0x1c(%ebp) 10a5df: 89 4d e0 mov %ecx,-0x20(%ebp) 10a5e2: e8 d1 0a 00 00 call 10b0b8 if (rv == 0) { 10a5e7: 83 c4 10 add $0x10,%esp 10a5ea: 85 c0 test %eax,%eax 10a5ec: 8b 55 e4 mov -0x1c(%ebp),%edx 10a5ef: 8b 4d e0 mov -0x20(%ebp),%ecx 10a5f2: 75 29 jne 10a61d <== NEVER TAKEN rv = mount( 10a5f4: 89 4d 18 mov %ecx,0x18(%ebp) 10a5f7: 89 55 14 mov %edx,0x14(%ebp) 10a5fa: 89 7d 10 mov %edi,0x10(%ebp) 10a5fd: 89 5d 0c mov %ebx,0xc(%ebp) 10a600: 89 75 08 mov %esi,0x8(%ebp) } else { errno = EINVAL; } return rv; } 10a603: 8d 65 f4 lea -0xc(%ebp),%esp 10a606: 5b pop %ebx 10a607: 5e pop %esi 10a608: 5f pop %edi 10a609: 5d pop %ebp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 10a60a: e9 19 00 00 00 jmp 10a628 options, data ); } } else { errno = EINVAL; 10a60f: e8 b8 4b 01 00 call 11f1cc <__errno> 10a614: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 10a61a: 83 c8 ff or $0xffffffff,%eax } else { errno = EINVAL; } return rv; } 10a61d: 8d 65 f4 lea -0xc(%ebp),%esp 10a620: 5b pop %ebx 10a621: 5e pop %esi 10a622: 5f pop %edi 10a623: 5d pop %ebp 10a624: c3 ret =============================================================================== 0011623c : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 11623c: 55 push %ebp 11623d: 89 e5 mov %esp,%ebp 11623f: 57 push %edi 116240: 56 push %esi 116241: 53 push %ebx 116242: 81 ec bc 00 00 00 sub $0xbc,%esp 116248: 8b 75 1c mov 0x1c(%ebp),%esi int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 11624b: 8b 55 08 mov 0x8(%ebp),%edx 11624e: 8b 42 14 mov 0x14(%edx),%eax 116251: 8b 58 08 mov 0x8(%eax),%ebx fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 116254: 8b 52 08 mov 0x8(%edx),%edx 116257: 89 95 40 ff ff ff mov %edx,-0xc0(%ebp) fat_file_fd_t *fat_fd = NULL; 11625d: c7 85 54 ff ff ff 00 movl $0x0,-0xac(%ebp) 116264: 00 00 00 time_t time_ret = 0; uint16_t time_val = 0; 116267: 66 c7 85 50 ff ff ff movw $0x0,-0xb0(%ebp) 11626e: 00 00 uint16_t date = 0; 116270: 66 c7 85 52 ff ff ff movw $0x0,-0xae(%ebp) 116277: 00 00 static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 116279: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp) 116280: 00 00 00 dir_pos->sname.ofs = 0; 116283: c7 85 5c ff ff ff 00 movl $0x0,-0xa4(%ebp) 11628a: 00 00 00 dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 11628d: c7 85 60 ff ff ff ff movl $0xffffffff,-0xa0(%ebp) 116294: ff ff ff dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 116297: c7 85 64 ff ff ff ff movl $0xffffffff,-0x9c(%ebp) 11629e: ff ff ff uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 1162a1: 8d 95 68 ff ff ff lea -0x98(%ebp),%edx 1162a7: 31 c0 xor %eax,%eax 1162a9: b9 08 00 00 00 mov $0x8,%ecx 1162ae: 89 d7 mov %edx,%edi 1162b0: f3 ab rep stos %eax,%es:(%edi) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 1162b2: 8d 4d a8 lea -0x58(%ebp),%ecx 1162b5: 89 8d 44 ff ff ff mov %ecx,-0xbc(%ebp) 1162bb: b9 10 00 00 00 mov $0x10,%ecx 1162c0: 8b bd 44 ff ff ff mov -0xbc(%ebp),%edi 1162c6: f3 ab rep stos %eax,%es:(%edi) if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 1162c8: 81 7d 14 04 01 00 00 cmpl $0x104,0x14(%ebp) 1162cf: 7e 0d jle 1162de <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 1162d1: e8 3a 35 00 00 call 119810 <__errno> <== NOT EXECUTED 1162d6: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED 1162dc: eb 22 jmp 116300 <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 1162de: 6a 0b push $0xb 1162e0: 52 push %edx 1162e1: ff 75 14 pushl 0x14(%ebp) 1162e4: ff 75 10 pushl 0x10(%ebp) 1162e7: e8 22 04 00 00 call 11670e 1162ec: 89 c7 mov %eax,%edi MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 1162ee: 83 c4 10 add $0x10,%esp 1162f1: 85 c0 test %eax,%eax 1162f3: 75 13 jne 116308 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EINVAL); 1162f5: e8 16 35 00 00 call 119810 <__errno> <== NOT EXECUTED 1162fa: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 116300: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 116303: e9 a7 02 00 00 jmp 1165af <== NOT EXECUTED } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 116308: c6 85 74 ff ff ff 00 movb $0x0,-0x8c(%ebp) /* set up last write date and time */ time_ret = time(NULL); 11630f: 83 ec 0c sub $0xc,%esp 116312: 6a 00 push $0x0 116314: e8 4b 78 00 00 call 11db64