=============================================================================== 0010ee54 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10ee54: 55 push %ebp 10ee55: 89 e5 mov %esp,%ebp 10ee57: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 10ee5a: 8b 50 10 mov 0x10(%eax),%edx 10ee5d: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10ee60: 8b 10 mov (%eax),%edx 10ee62: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10ee66: 77 12 ja 10ee7a <== NEVER TAKEN 10ee68: 8b 52 4c mov 0x4c(%edx),%edx 10ee6b: ff 24 95 10 ff 11 00 jmp *0x11ff10(,%edx,4) 10ee72: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10ee74: 8b 51 0c mov 0xc(%ecx),%edx 10ee77: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10ee7a: 31 c0 xor %eax,%eax 10ee7c: c9 leave 10ee7d: c3 ret 10ee7e: 66 90 xchg %ax,%ax <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10ee80: 8b 51 08 mov 0x8(%ecx),%edx 10ee83: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10ee86: 31 c0 xor %eax,%eax 10ee88: c9 leave 10ee89: c3 ret 10ee8a: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10ee8c: c7 40 08 c0 ff 11 00 movl $0x11ffc0,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10ee93: 31 c0 xor %eax,%eax 10ee95: c9 leave 10ee96: c3 ret 10ee97: 90 nop <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 10ee98: 8b 51 10 mov 0x10(%ecx),%edx 10ee9b: 89 50 08 mov %edx,0x8(%eax) break; } return 0; } 10ee9e: 31 c0 xor %eax,%eax 10eea0: c9 leave 10eea1: c3 ret 10eea2: 66 90 xchg %ax,%ax <== NOT EXECUTED switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10eea4: c7 40 08 40 ff 11 00 movl $0x11ff40,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10eeab: 31 c0 xor %eax,%eax 10eead: c9 leave 10eeae: c3 ret =============================================================================== 0010f798 : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 10f798: 55 push %ebp 10f799: 89 e5 mov %esp,%ebp 10f79b: 53 push %ebx 10f79c: 83 ec 10 sub $0x10,%esp 10f79f: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 10f7a2: 53 push %ebx 10f7a3: e8 d8 04 00 00 call 10fc80 10f7a8: 83 c4 10 add $0x10,%esp 10f7ab: 85 c0 test %eax,%eax 10f7ad: 75 2d jne 10f7dc 10f7af: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f7b4: 75 26 jne 10f7dc if ( rtems_filesystem_current.node_access == jnode ) 10f7b6: a1 30 31 12 00 mov 0x123130,%eax 10f7bb: 39 58 04 cmp %ebx,0x4(%eax) 10f7be: 74 58 je 10f818 rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 10f7c0: 8b 43 4c mov 0x4c(%ebx),%eax 10f7c3: 83 f8 04 cmp $0x4,%eax 10f7c6: 74 34 je 10f7fc 10f7c8: 83 f8 05 cmp $0x5,%eax 10f7cb: 74 17 je 10f7e4 break; default: break; } free( jnode ); 10f7cd: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f7d0: 8b 5d fc mov -0x4(%ebp),%ebx 10f7d3: c9 leave break; default: break; } free( jnode ); 10f7d4: e9 bb 88 ff ff jmp 108094 10f7d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 10f7dc: 8b 5d fc mov -0x4(%ebp),%ebx 10f7df: c9 leave 10f7e0: c3 ret 10f7e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 10f7e4: 83 ec 0c sub $0xc,%esp 10f7e7: 53 push %ebx 10f7e8: e8 93 1a 00 00 call 111280 break; 10f7ed: 83 c4 10 add $0x10,%esp break; default: break; } free( jnode ); 10f7f0: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f7f3: 8b 5d fc mov -0x4(%ebp),%ebx 10f7f6: c9 leave break; default: break; } free( jnode ); 10f7f7: e9 98 88 ff ff jmp 108094 switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 10f7fc: 83 ec 0c sub $0xc,%esp 10f7ff: ff 73 50 pushl 0x50(%ebx) 10f802: e8 8d 88 ff ff call 108094 break; 10f807: 83 c4 10 add $0x10,%esp default: break; } free( jnode ); 10f80a: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f80d: 8b 5d fc mov -0x4(%ebp),%ebx 10f810: c9 leave break; default: break; } free( jnode ); 10f811: e9 7e 88 ff ff jmp 108094 10f816: 66 90 xchg %ax,%ax <== NOT EXECUTED void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; 10f818: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10f81f: eb 9f jmp 10f7c0 =============================================================================== 0010ece8 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10ece8: 55 push %ebp 10ece9: 89 e5 mov %esp,%ebp 10eceb: 57 push %edi 10ecec: 56 push %esi 10eced: 53 push %ebx 10ecee: 83 ec 1c sub $0x1c,%esp 10ecf1: 8b 45 08 mov 0x8(%ebp),%eax 10ecf4: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10ecf7: 85 c0 test %eax,%eax 10ecf9: 0f 84 ba 00 00 00 je 10edb9 <== NEVER TAKEN return NULL; parent = parent_loc->node_access; 10ecff: 8b 38 mov (%eax),%edi fs_info = parent_loc->mt_entry->fs_info; 10ed01: 8b 40 10 mov 0x10(%eax),%eax 10ed04: 8b 70 34 mov 0x34(%eax),%esi /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10ed07: 83 fb 07 cmp $0x7,%ebx 10ed0a: 0f 84 9c 00 00 00 je 10edac return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10ed10: 50 push %eax 10ed11: a1 30 31 12 00 mov 0x123130,%eax 10ed16: 8b 40 2c mov 0x2c(%eax),%eax 10ed19: f7 d0 not %eax 10ed1b: 23 45 14 and 0x14(%ebp),%eax 10ed1e: 50 push %eax 10ed1f: ff 75 10 pushl 0x10(%ebp) 10ed22: 53 push %ebx 10ed23: e8 54 ff ff ff call 10ec7c if ( !node ) 10ed28: 83 c4 10 add $0x10,%esp 10ed2b: 85 c0 test %eax,%eax 10ed2d: 74 73 je 10eda2 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 10ed2f: 83 fb 01 cmp $0x1,%ebx 10ed32: 74 38 je 10ed6c rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 10ed34: 83 fb 03 cmp $0x3,%ebx 10ed37: 0f 84 97 00 00 00 je 10edd4 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 10ed3d: 83 fb 04 cmp $0x4,%ebx 10ed40: 0f 84 8e 00 00 00 je 10edd4 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 10ed46: 83 fb 02 cmp $0x2,%ebx 10ed49: 74 79 je 10edc4 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 10ed4b: 83 fb 06 cmp $0x6,%ebx 10ed4e: 0f 84 8c 00 00 00 je 10ede0 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 10ed54: 83 fb 05 cmp $0x5,%ebx 10ed57: 0f 84 9b 00 00 00 je 10edf8 node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { 10ed5d: 83 fb 07 cmp $0x7,%ebx 10ed60: 75 1d jne 10ed7f <== NEVER TAKEN node->info.fifo.pipe = NULL; 10ed62: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ed69: eb 14 jmp 10ed7f 10ed6b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ed6c: 8d 50 54 lea 0x54(%eax),%edx 10ed6f: 89 50 50 mov %edx,0x50(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ed72: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); 10ed79: 8d 50 50 lea 0x50(%eax),%edx 10ed7c: 89 50 58 mov %edx,0x58(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 10ed7f: 89 78 08 mov %edi,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10ed82: 8b 56 04 mov 0x4(%esi),%edx 10ed85: 42 inc %edx 10ed86: 89 56 04 mov %edx,0x4(%esi) 10ed89: 89 50 38 mov %edx,0x38(%eax) 10ed8c: 83 ec 08 sub $0x8,%esp 10ed8f: 50 push %eax rtems_chain_append( &parent->info.directory.Entries, &node->Node ); 10ed90: 83 c7 50 add $0x50,%edi 10ed93: 57 push %edi 10ed94: 89 45 e4 mov %eax,-0x1c(%ebp) 10ed97: e8 c4 d1 ff ff call 10bf60 <_Chain_Append> return node; 10ed9c: 83 c4 10 add $0x10,%esp 10ed9f: 8b 45 e4 mov -0x1c(%ebp),%eax } 10eda2: 8d 65 f4 lea -0xc(%ebp),%esp 10eda5: 5b pop %ebx 10eda6: 5e pop %esi 10eda7: 5f pop %edi 10eda8: c9 leave 10eda9: c3 ret 10edaa: 66 90 xchg %ax,%ax <== NOT EXECUTED fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10edac: 81 7e 10 a0 fe 11 00 cmpl $0x11fea0,0x10(%esi) 10edb3: 0f 85 57 ff ff ff jne 10ed10 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 10edb9: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10edbb: 8d 65 f4 lea -0xc(%ebp),%esp 10edbe: 5b pop %ebx 10edbf: 5e pop %esi 10edc0: 5f pop %edi 10edc1: c9 leave 10edc2: c3 ret 10edc3: 90 nop <== NOT EXECUTED } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 10edc4: 8b 4d 18 mov 0x18(%ebp),%ecx 10edc7: 8b 11 mov (%ecx),%edx 10edc9: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10edcc: 8b 51 04 mov 0x4(%ecx),%edx 10edcf: 89 50 54 mov %edx,0x54(%eax) 10edd2: eb ab jmp 10ed7f if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; 10edd4: 8b 4d 18 mov 0x18(%ebp),%ecx 10edd7: 8b 11 mov (%ecx),%edx 10edd9: 89 50 50 mov %edx,0x50(%eax) 10eddc: eb a1 jmp 10ed7f 10edde: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 10ede0: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ede7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = 0; 10edee: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) 10edf5: eb 88 jmp 10ed7f 10edf7: 90 nop <== NOT EXECUTED } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 10edf8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10edff: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10ee06: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10ee0d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10ee14: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) 10ee1b: e9 5f ff ff ff jmp 10ed7f =============================================================================== 0010a4b8 : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 10a4b8: 55 push %ebp 10a4b9: 89 e5 mov %esp,%ebp 10a4bb: 57 push %edi 10a4bc: 56 push %esi 10a4bd: 53 push %ebx 10a4be: 83 ec 1c sub $0x1c,%esp 10a4c1: 8b 45 08 mov 0x8(%ebp),%eax 10a4c4: 8b 75 0c mov 0xc(%ebp),%esi IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 10a4c7: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a4ca: 83 c0 54 add $0x54,%eax 10a4cd: 89 45 e4 mov %eax,-0x1c(%ebp) 10a4d0: 39 c7 cmp %eax,%edi 10a4d2: 74 47 je 10a51b for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 10a4d4: 8d 46 01 lea 0x1(%esi),%eax 10a4d7: 89 45 e0 mov %eax,-0x20(%ebp) 10a4da: 66 90 xchg %ax,%ax !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++ ) 10a4dc: 85 f6 test %esi,%esi 10a4de: 78 22 js 10a502 <== NEVER TAKEN 10a4e0: 31 db xor %ebx,%ebx 10a4e2: 66 90 xchg %ax,%ax fprintf(stdout, "...." ); 10a4e4: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a4e9: ff 70 08 pushl 0x8(%eax) 10a4ec: 6a 04 push $0x4 10a4ee: 6a 01 push $0x1 10a4f0: 68 b2 58 12 00 push $0x1258b2 10a4f5: e8 e2 d0 00 00 call 1175dc !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++ ) 10a4fa: 43 inc %ebx 10a4fb: 83 c4 10 add $0x10,%esp 10a4fe: 39 de cmp %ebx,%esi 10a500: 7d e2 jge 10a4e4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 10a502: 83 ec 0c sub $0xc,%esp 10a505: 57 push %edi 10a506: e8 75 fe ff ff call 10a380 if ( the_jnode->type == IMFS_DIRECTORY ) 10a50b: 83 c4 10 add $0x10,%esp 10a50e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10a512: 74 10 je 10a524 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10a514: 8b 3f mov (%edi),%edi IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 10a516: 3b 7d e4 cmp -0x1c(%ebp),%edi 10a519: 75 c1 jne 10a4dc fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 10a51b: 8d 65 f4 lea -0xc(%ebp),%esp 10a51e: 5b pop %ebx 10a51f: 5e pop %esi 10a520: 5f pop %edi 10a521: c9 leave 10a522: c3 ret 10a523: 90 nop <== NOT EXECUTED for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 10a524: 83 ec 08 sub $0x8,%esp 10a527: ff 75 e0 pushl -0x20(%ebp) 10a52a: 57 push %edi 10a52b: e8 88 ff ff ff call 10a4b8 10a530: 83 c4 10 add $0x10,%esp 10a533: eb df jmp 10a514 =============================================================================== 0010ef30 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10ef30: 55 push %ebp 10ef31: 89 e5 mov %esp,%ebp 10ef33: 57 push %edi 10ef34: 56 push %esi 10ef35: 53 push %ebx 10ef36: 83 ec 5c sub $0x5c,%esp char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 10ef39: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10ef40: 0f 85 ee 01 00 00 jne 10f134 <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10ef46: 8b 45 14 mov 0x14(%ebp),%eax 10ef49: 8b 38 mov (%eax),%edi size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 10ef4b: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 10ef52: 8d 75 af lea -0x51(%ebp),%esi * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10ef55: 8d 55 e4 lea -0x1c(%ebp),%edx 10ef58: 52 push %edx 10ef59: 56 push %esi 10ef5a: ff 75 0c pushl 0xc(%ebp) 10ef5d: 8b 45 08 mov 0x8(%ebp),%eax 10ef60: 03 45 a4 add -0x5c(%ebp),%eax 10ef63: 50 push %eax 10ef64: e8 13 07 00 00 call 10f67c 10ef69: 89 c3 mov %eax,%ebx pathnamelen -= len; 10ef6b: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10ef6e: 8b 4d 14 mov 0x14(%ebp),%ecx 10ef71: 8b 01 mov (%ecx),%eax 10ef73: 83 c4 10 add $0x10,%esp 10ef76: 85 c0 test %eax,%eax 10ef78: 0f 84 e6 00 00 00 je 10f064 <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10ef7e: 29 55 0c sub %edx,0xc(%ebp) i += len; 10ef81: 01 55 a4 add %edx,-0x5c(%ebp) rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10ef84: 85 db test %ebx,%ebx 10ef86: 75 44 jne 10efcc * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 10ef88: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10ef8c: 0f 84 26 01 00 00 je 10f0b8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10ef92: 83 ec 0c sub $0xc,%esp 10ef95: ff 75 14 pushl 0x14(%ebp) 10ef98: e8 b7 fe ff ff call 10ee54 10ef9d: 89 c3 mov %eax,%ebx 10ef9f: 5a pop %edx 10efa0: 59 pop %ecx /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10efa1: ff 75 10 pushl 0x10(%ebp) 10efa4: ff 75 14 pushl 0x14(%ebp) 10efa7: e8 04 ff ff ff call 10eeb0 10efac: 83 c4 10 add $0x10,%esp 10efaf: 85 c0 test %eax,%eax 10efb1: 0f 85 d1 00 00 00 jne 10f088 rtems_set_errno_and_return_minus_one( EACCES ); 10efb7: e8 f4 32 00 00 call 1122b0 <__errno> 10efbc: c7 00 0d 00 00 00 movl $0xd,(%eax) 10efc2: bb ff ff ff ff mov $0xffffffff,%ebx 10efc7: e9 bc 00 00 00 jmp 10f088 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10efcc: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10efd0: 0f 84 be 00 00 00 je 10f094 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10efd6: 89 c7 mov %eax,%edi switch( type ) { 10efd8: 83 fb 03 cmp $0x3,%ebx 10efdb: 74 1b je 10eff8 10efdd: 83 fb 04 cmp $0x4,%ebx 10efe0: 0f 84 92 00 00 00 je 10f078 10efe6: 83 fb 02 cmp $0x2,%ebx 10efe9: 74 51 je 10f03c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10efeb: 83 fb 04 cmp $0x4,%ebx 10efee: 0f 85 61 ff ff ff jne 10ef55 <== ALWAYS TAKEN 10eff4: eb 92 jmp 10ef88 <== NOT EXECUTED 10eff6: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10eff8: 8b 40 4c mov 0x4c(%eax),%eax 10effb: 83 f8 03 cmp $0x3,%eax 10effe: 0f 84 08 01 00 00 je 10f10c * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 10f004: 83 f8 04 cmp $0x4,%eax 10f007: 0f 84 51 01 00 00 je 10f15e } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f00d: 48 dec %eax 10f00e: 0f 85 35 01 00 00 jne 10f149 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 10f014: 8b 47 5c mov 0x5c(%edi),%eax 10f017: 85 c0 test %eax,%eax 10f019: 0f 85 a4 00 00 00 jne 10f0c3 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f01f: 83 ec 08 sub $0x8,%esp 10f022: 56 push %esi 10f023: 57 push %edi 10f024: e8 e7 05 00 00 call 10f610 10f029: 89 c7 mov %eax,%edi if ( !node ) 10f02b: 83 c4 10 add $0x10,%esp 10f02e: 85 c0 test %eax,%eax 10f030: 74 32 je 10f064 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10f032: 8b 45 14 mov 0x14(%ebp),%eax 10f035: 89 38 mov %edi,(%eax) 10f037: e9 19 ff ff ff jmp 10ef55 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10f03c: 8b 15 30 31 12 00 mov 0x123130,%edx 10f042: 39 42 18 cmp %eax,0x18(%edx) 10f045: 0f 84 0a ff ff ff je 10ef55 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10f04b: 8b 4d 14 mov 0x14(%ebp),%ecx 10f04e: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10f051: 39 42 1c cmp %eax,0x1c(%edx) 10f054: 0f 84 d2 00 00 00 je 10f12c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10f05a: 8b 78 08 mov 0x8(%eax),%edi 10f05d: 85 ff test %edi,%edi 10f05f: 75 d1 jne 10f032 10f061: 8d 76 00 lea 0x0(%esi),%esi /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 10f064: e8 47 32 00 00 call 1122b0 <__errno> 10f069: c7 00 02 00 00 00 movl $0x2,(%eax) 10f06f: bb ff ff ff ff mov $0xffffffff,%ebx 10f074: eb 12 jmp 10f088 10f076: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10f078: e8 33 32 00 00 call 1122b0 <__errno> 10f07d: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f083: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f088: 89 d8 mov %ebx,%eax 10f08a: 8d 65 f4 lea -0xc(%ebp),%esp 10f08d: 5b pop %ebx 10f08e: 5e pop %esi 10f08f: 5f pop %edi 10f090: c9 leave 10f091: c3 ret 10f092: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10f094: 83 ec 08 sub $0x8,%esp 10f097: 6a 01 push $0x1 10f099: ff 75 14 pushl 0x14(%ebp) 10f09c: e8 0f fe ff ff call 10eeb0 10f0a1: 83 c4 10 add $0x10,%esp 10f0a4: 85 c0 test %eax,%eax 10f0a6: 0f 84 0b ff ff ff je 10efb7 10f0ac: 8b 55 14 mov 0x14(%ebp),%edx 10f0af: 8b 02 mov (%edx),%eax 10f0b1: e9 20 ff ff ff jmp 10efd6 10f0b6: 66 90 xchg %ax,%ax <== NOT EXECUTED * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 10f0b8: 8b 40 5c mov 0x5c(%eax),%eax 10f0bb: 85 c0 test %eax,%eax 10f0bd: 0f 84 cf fe ff ff je 10ef92 newloc = node->info.directory.mt_fs->mt_fs_root; 10f0c3: 8d 7d d0 lea -0x30(%ebp),%edi 10f0c6: 8d 70 1c lea 0x1c(%eax),%esi 10f0c9: b9 05 00 00 00 mov $0x5,%ecx 10f0ce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f0d0: 8d 75 d0 lea -0x30(%ebp),%esi 10f0d3: b1 05 mov $0x5,%cl 10f0d5: 8b 7d 14 mov 0x14(%ebp),%edi 10f0d8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10f0da: 8b 55 e4 mov -0x1c(%ebp),%edx 10f0dd: 8b 4d 14 mov 0x14(%ebp),%ecx 10f0e0: 8b 41 0c mov 0xc(%ecx),%eax 10f0e3: 51 push %ecx 10f0e4: ff 75 10 pushl 0x10(%ebp) 10f0e7: 8b 4d 0c mov 0xc(%ebp),%ecx 10f0ea: 01 d1 add %edx,%ecx 10f0ec: 51 push %ecx 10f0ed: 8b 4d a4 mov -0x5c(%ebp),%ecx 10f0f0: 29 d1 sub %edx,%ecx 10f0f2: 8b 55 08 mov 0x8(%ebp),%edx 10f0f5: 01 ca add %ecx,%edx 10f0f7: 52 push %edx 10f0f8: ff 10 call *(%eax) 10f0fa: 89 c3 mov %eax,%ebx 10f0fc: 83 c4 10 add $0x10,%esp if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f0ff: 89 d8 mov %ebx,%eax 10f101: 8d 65 f4 lea -0xc(%ebp),%esp 10f104: 5b pop %ebx 10f105: 5e pop %esi 10f106: 5f pop %edi 10f107: c9 leave 10f108: c3 ret 10f109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10f10c: 83 ec 08 sub $0x8,%esp 10f10f: 6a 00 push $0x0 10f111: ff 75 14 pushl 0x14(%ebp) 10f114: e8 d3 fd ff ff call 10eeec node = pathloc->node_access; 10f119: 8b 55 14 mov 0x14(%ebp),%edx 10f11c: 8b 3a mov (%edx),%edi 10f11e: 8b 47 4c mov 0x4c(%edi),%eax 10f121: 83 c4 10 add $0x10,%esp 10f124: e9 e4 fe ff ff jmp 10f00d 10f129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10f12c: 8d 7d d0 lea -0x30(%ebp),%edi 10f12f: 8d 72 08 lea 0x8(%edx),%esi 10f132: eb 95 jmp 10f0c9 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 10f134: e8 77 31 00 00 call 1122b0 <__errno> <== NOT EXECUTED 10f139: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10f13f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10f144: e9 3f ff ff ff jmp 10f088 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f149: e8 62 31 00 00 call 1122b0 <__errno> 10f14e: c7 00 14 00 00 00 movl $0x14,(%eax) 10f154: bb ff ff ff ff mov $0xffffffff,%ebx 10f159: e9 2a ff ff ff jmp 10f088 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10f15e: 83 ec 08 sub $0x8,%esp 10f161: 6a 00 push $0x0 10f163: ff 75 14 pushl 0x14(%ebp) 10f166: e8 1d 00 00 00 call 10f188 10f16b: 89 c3 mov %eax,%ebx /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10f16d: 8b 4d 14 mov 0x14(%ebp),%ecx 10f170: 8b 39 mov (%ecx),%edi if ( result == -1 ) 10f172: 83 c4 10 add $0x10,%esp 10f175: 83 f8 ff cmp $0xffffffff,%eax 10f178: 0f 84 0a ff ff ff je 10f088 <== NEVER TAKEN /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 10f17e: 8b 47 4c mov 0x4c(%edi),%eax 10f181: e9 87 fe ff ff jmp 10f00d =============================================================================== 0010f2b0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10f2b0: 55 push %ebp 10f2b1: 89 e5 mov %esp,%ebp 10f2b3: 57 push %edi 10f2b4: 56 push %esi 10f2b5: 53 push %ebx 10f2b6: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10f2b9: 8b 45 0c mov 0xc(%ebp),%eax 10f2bc: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10f2be: 31 c0 xor %eax,%eax 10f2c0: b9 ff ff ff ff mov $0xffffffff,%ecx 10f2c5: 8b 7d 08 mov 0x8(%ebp),%edi 10f2c8: f2 ae repnz scas %es:(%edi),%al 10f2ca: f7 d1 not %ecx 10f2cc: 8d 71 ff lea -0x1(%ecx),%esi const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 10f2cf: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 10f2d6: 8d 55 e4 lea -0x1c(%ebp),%edx 10f2d9: 52 push %edx 10f2da: 8d 4d af lea -0x51(%ebp),%ecx 10f2dd: 51 push %ecx 10f2de: 56 push %esi 10f2df: 8b 45 08 mov 0x8(%ebp),%eax 10f2e2: 03 45 a4 add -0x5c(%ebp),%eax 10f2e5: 50 push %eax 10f2e6: e8 91 03 00 00 call 10f67c 10f2eb: 89 c7 mov %eax,%edi pathlen -= len; 10f2ed: 8b 55 e4 mov -0x1c(%ebp),%edx 10f2f0: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 10f2f2: 8b 4d 0c mov 0xc(%ebp),%ecx 10f2f5: 8b 01 mov (%ecx),%eax 10f2f7: 83 c4 10 add $0x10,%esp 10f2fa: 85 c0 test %eax,%eax 10f2fc: 0f 84 55 01 00 00 je 10f457 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10f302: 85 ff test %edi,%edi 10f304: 75 1a jne 10f320 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10f306: e8 a5 2f 00 00 call 1122b0 <__errno> 10f30b: c7 00 11 00 00 00 movl $0x11,(%eax) 10f311: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f316: 89 d8 mov %ebx,%eax 10f318: 8d 65 f4 lea -0xc(%ebp),%esp 10f31b: 5b pop %ebx 10f31c: 5e pop %esi 10f31d: 5f pop %edi 10f31e: c9 leave 10f31f: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f320: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f324: 0f 84 c6 00 00 00 je 10f3f0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10f32a: 01 55 a4 add %edx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10f32d: 89 c3 mov %eax,%ebx switch( type ) { 10f32f: 83 ff 02 cmp $0x2,%edi 10f332: 0f 84 88 00 00 00 je 10f3c0 10f338: 76 26 jbe 10f360 10f33a: 83 ff 03 cmp $0x3,%edi 10f33d: 74 2d je 10f36c 10f33f: 83 ff 04 cmp $0x4,%edi 10f342: 75 92 jne 10f2d6 <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10f344: e8 67 2f 00 00 call 1122b0 <__errno> 10f349: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f34f: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f354: 89 d8 mov %ebx,%eax 10f356: 8d 65 f4 lea -0xc(%ebp),%esp 10f359: 5b pop %ebx 10f35a: 5e pop %esi 10f35b: 5f pop %edi 10f35c: c9 leave 10f35d: c3 ret 10f35e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 10f360: 85 ff test %edi,%edi 10f362: 74 a2 je 10f306 <== NEVER TAKEN 10f364: e9 6d ff ff ff jmp 10f2d6 10f369: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10f36c: 8b 40 4c mov 0x4c(%eax),%eax 10f36f: 83 f8 03 cmp $0x3,%eax 10f372: 0f 84 b4 01 00 00 je 10f52c <== NEVER TAKEN result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10f378: 83 f8 04 cmp $0x4,%eax 10f37b: 0f 84 ca 01 00 00 je 10f54b <== NEVER TAKEN if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10f381: 85 db test %ebx,%ebx 10f383: 0f 84 67 01 00 00 je 10f4f0 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f389: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f38d: 0f 85 5d 01 00 00 jne 10f4f0 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 10f393: 8b 43 5c mov 0x5c(%ebx),%eax 10f396: 85 c0 test %eax,%eax 10f398: 0f 85 67 01 00 00 jne 10f505 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f39e: 83 ec 08 sub $0x8,%esp 10f3a1: 8d 45 af lea -0x51(%ebp),%eax 10f3a4: 50 push %eax 10f3a5: 53 push %ebx 10f3a6: e8 65 02 00 00 call 10f610 10f3ab: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10f3ad: 83 c4 10 add $0x10,%esp 10f3b0: 85 c0 test %eax,%eax 10f3b2: 74 64 je 10f418 done = true; else pathloc->node_access = node; 10f3b4: 8b 55 0c mov 0xc(%ebp),%edx 10f3b7: 89 02 mov %eax,(%edx) 10f3b9: e9 18 ff ff ff jmp 10f2d6 10f3be: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10f3c0: 8b 15 30 31 12 00 mov 0x123130,%edx 10f3c6: 3b 42 18 cmp 0x18(%edx),%eax 10f3c9: 0f 84 07 ff ff ff je 10f2d6 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10f3cf: 8b 4d 0c mov 0xc(%ebp),%ecx 10f3d2: 8b 51 10 mov 0x10(%ecx),%edx 10f3d5: 3b 42 1c cmp 0x1c(%edx),%eax 10f3d8: 0f 84 8e 00 00 00 je 10f46c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10f3de: 8b 58 08 mov 0x8(%eax),%ebx 10f3e1: 85 db test %ebx,%ebx 10f3e3: 74 72 je 10f457 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 10f3e5: 8b 4d 0c mov 0xc(%ebp),%ecx 10f3e8: 89 19 mov %ebx,(%ecx) break; 10f3ea: e9 e7 fe ff ff jmp 10f2d6 10f3ef: 90 nop <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10f3f0: 83 ec 08 sub $0x8,%esp 10f3f3: 6a 01 push $0x1 10f3f5: ff 75 0c pushl 0xc(%ebp) 10f3f8: 89 55 a0 mov %edx,-0x60(%ebp) 10f3fb: e8 b0 fa ff ff call 10eeb0 10f400: 83 c4 10 add $0x10,%esp 10f403: 85 c0 test %eax,%eax 10f405: 8b 55 a0 mov -0x60(%ebp),%edx 10f408: 0f 84 cd 00 00 00 je 10f4db 10f40e: 8b 4d 0c mov 0xc(%ebp),%ecx 10f411: 8b 01 mov (%ecx),%eax 10f413: e9 12 ff ff ff jmp 10f32a case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10f418: 8b 45 a4 mov -0x5c(%ebp),%eax 10f41b: 2b 45 e4 sub -0x1c(%ebp),%eax 10f41e: 03 45 08 add 0x8(%ebp),%eax 10f421: 8b 4d 10 mov 0x10(%ebp),%ecx 10f424: 89 01 mov %eax,(%ecx) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10f426: 8b 4d 08 mov 0x8(%ebp),%ecx 10f429: 8b 55 a4 mov -0x5c(%ebp),%edx 10f42c: 8a 04 11 mov (%ecx,%edx,1),%al 10f42f: 84 c0 test %al,%al 10f431: 74 75 je 10f4a8 10f433: 89 d3 mov %edx,%ebx 10f435: 89 ce mov %ecx,%esi 10f437: eb 0b jmp 10f444 10f439: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f43c: 43 inc %ebx 10f43d: 8a 04 1e mov (%esi,%ebx,1),%al 10f440: 84 c0 test %al,%al 10f442: 74 64 je 10f4a8 if ( !IMFS_is_separator( path[ i ] ) ) 10f444: 83 ec 0c sub $0xc,%esp 10f447: 0f be c0 movsbl %al,%eax 10f44a: 50 push %eax 10f44b: e8 a8 9a ff ff call 108ef8 10f450: 83 c4 10 add $0x10,%esp 10f453: 85 c0 test %eax,%eax 10f455: 75 e5 jne 10f43c rtems_set_errno_and_return_minus_one( ENOENT ); 10f457: e8 54 2e 00 00 call 1122b0 <__errno> 10f45c: c7 00 02 00 00 00 movl $0x2,(%eax) 10f462: bb ff ff ff ff mov $0xffffffff,%ebx 10f467: e9 aa fe ff ff jmp 10f316 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10f46c: 8d 7d d0 lea -0x30(%ebp),%edi 10f46f: 8d 72 08 lea 0x8(%edx),%esi 10f472: b9 05 00 00 00 mov $0x5,%ecx 10f477: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f479: 8d 75 d0 lea -0x30(%ebp),%esi 10f47c: b1 05 mov $0x5,%cl 10f47e: 8b 7d 0c mov 0xc(%ebp),%edi 10f481: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f483: 53 push %ebx 10f484: 8b 55 0c mov 0xc(%ebp),%edx 10f487: 8b 42 0c mov 0xc(%edx),%eax 10f48a: ff 75 10 pushl 0x10(%ebp) 10f48d: 52 push %edx */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f48e: 8b 55 a4 mov -0x5c(%ebp),%edx 10f491: 2b 55 e4 sub -0x1c(%ebp),%edx 10f494: 03 55 08 add 0x8(%ebp),%edx 10f497: 52 push %edx 10f498: ff 50 04 call *0x4(%eax) 10f49b: 89 c3 mov %eax,%ebx 10f49d: 83 c4 10 add $0x10,%esp 10f4a0: e9 71 fe ff ff jmp 10f316 10f4a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10f4a8: 83 ec 0c sub $0xc,%esp 10f4ab: ff 75 0c pushl 0xc(%ebp) 10f4ae: e8 a1 f9 ff ff call 10ee54 10f4b3: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 10f4b5: 8b 55 0c mov 0xc(%ebp),%edx 10f4b8: 8b 02 mov (%edx),%eax 10f4ba: 83 c4 10 add $0x10,%esp 10f4bd: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f4c1: 75 2d jne 10f4f0 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10f4c3: 83 ec 08 sub $0x8,%esp 10f4c6: 6a 03 push $0x3 10f4c8: ff 75 0c pushl 0xc(%ebp) 10f4cb: e8 e0 f9 ff ff call 10eeb0 10f4d0: 83 c4 10 add $0x10,%esp 10f4d3: 85 c0 test %eax,%eax 10f4d5: 0f 85 3b fe ff ff jne 10f316 rtems_set_errno_and_return_minus_one( EACCES ); 10f4db: e8 d0 2d 00 00 call 1122b0 <__errno> 10f4e0: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f4e6: bb ff ff ff ff mov $0xffffffff,%ebx 10f4eb: e9 26 fe ff ff jmp 10f316 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f4f0: e8 bb 2d 00 00 call 1122b0 <__errno> 10f4f5: c7 00 14 00 00 00 movl $0x14,(%eax) 10f4fb: bb ff ff ff ff mov $0xffffffff,%ebx 10f500: e9 11 fe ff ff jmp 10f316 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 10f505: 8d 7d d0 lea -0x30(%ebp),%edi 10f508: 8d 70 1c lea 0x1c(%eax),%esi 10f50b: b9 05 00 00 00 mov $0x5,%ecx 10f510: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f512: 8d 75 d0 lea -0x30(%ebp),%esi 10f515: b1 05 mov $0x5,%cl 10f517: 8b 7d 0c mov 0xc(%ebp),%edi 10f51a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f51c: 51 push %ecx 10f51d: 8b 4d 0c mov 0xc(%ebp),%ecx 10f520: 8b 41 0c mov 0xc(%ecx),%eax 10f523: ff 75 10 pushl 0x10(%ebp) 10f526: 51 push %ecx 10f527: e9 62 ff ff ff jmp 10f48e case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f52c: 83 ec 08 sub $0x8,%esp 10f52f: 6a 00 push $0x0 10f531: ff 75 0c pushl 0xc(%ebp) 10f534: e8 cb fc ff ff call 10f204 if ( result == -1 ) 10f539: 83 c4 10 add $0x10,%esp 10f53c: 83 f8 ff cmp $0xffffffff,%eax 10f53f: 74 29 je 10f56a <== NEVER TAKEN 10f541: 8b 45 0c mov 0xc(%ebp),%eax 10f544: 8b 18 mov (%eax),%ebx 10f546: e9 36 fe ff ff jmp 10f381 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f54b: 83 ec 08 sub $0x8,%esp 10f54e: 6a 00 push $0x0 10f550: ff 75 0c pushl 0xc(%ebp) 10f553: e8 ac fc ff ff call 10f204 if ( result == -1 ) 10f558: 83 c4 10 add $0x10,%esp 10f55b: 83 f8 ff cmp $0xffffffff,%eax 10f55e: 74 0a je 10f56a <== NEVER TAKEN 10f560: 8b 55 0c mov 0xc(%ebp),%edx 10f563: 8b 1a mov (%edx),%ebx 10f565: e9 17 fe ff ff jmp 10f381 10f56a: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f56c: e9 a5 fd ff ff jmp 10f316 <== NOT EXECUTED =============================================================================== 0010eeec : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10eeec: 55 push %ebp 10eeed: 89 e5 mov %esp,%ebp 10eeef: 53 push %ebx 10eef0: 83 ec 04 sub $0x4,%esp 10eef3: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10eef6: 8b 03 mov (%ebx),%eax 10eef8: 8b 40 50 mov 0x50(%eax),%eax 10eefb: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10eefd: 53 push %ebx 10eefe: e8 51 ff ff ff call 10ee54 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ef03: 50 push %eax 10ef04: ff 75 0c pushl 0xc(%ebp) 10ef07: 53 push %ebx 10ef08: e8 a3 ff ff ff call 10eeb0 10ef0d: 83 c4 10 add $0x10,%esp 10ef10: 85 c0 test %eax,%eax 10ef12: 74 08 je 10ef1c rtems_set_errno_and_return_minus_one( EACCES ); return result; 10ef14: 31 c0 xor %eax,%eax } 10ef16: 8b 5d fc mov -0x4(%ebp),%ebx 10ef19: c9 leave 10ef1a: c3 ret 10ef1b: 90 nop <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10ef1c: e8 8f 33 00 00 call 1122b0 <__errno> 10ef21: c7 00 0d 00 00 00 movl $0xd,(%eax) 10ef27: b8 ff ff ff ff mov $0xffffffff,%eax 10ef2c: eb e8 jmp 10ef16 =============================================================================== 0010f204 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f204: 55 push %ebp 10f205: 89 e5 mov %esp,%ebp 10f207: 57 push %edi 10f208: 56 push %esi 10f209: 53 push %ebx 10f20a: 83 ec 0c sub $0xc,%esp 10f20d: 8b 75 08 mov 0x8(%ebp),%esi 10f210: 8b 7d 0c mov 0xc(%ebp),%edi */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 10f213: 8b 15 30 31 12 00 mov 0x123130,%edx 10f219: eb 0e jmp 10f229 10f21b: 90 nop <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10f21c: 83 f8 04 cmp $0x4,%eax 10f21f: 74 53 je 10f274 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10f221: 83 e8 03 sub $0x3,%eax 10f224: 83 f8 01 cmp $0x1,%eax 10f227: 77 3a ja 10f263 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10f229: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10f22b: 8b 42 30 mov 0x30(%edx),%eax 10f22e: 40 inc %eax 10f22f: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10f233: 66 83 f8 05 cmp $0x5,%ax 10f237: 77 57 ja 10f290 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10f239: 8b 43 4c mov 0x4c(%ebx),%eax 10f23c: 83 f8 03 cmp $0x3,%eax 10f23f: 75 db jne 10f21c result = IMFS_evaluate_hard_link( node, flags ); 10f241: 83 ec 08 sub $0x8,%esp 10f244: 57 push %edi 10f245: 56 push %esi 10f246: e8 a1 fc ff ff call 10eeec 10f24b: 83 c4 10 add $0x10,%esp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f24e: 85 c0 test %eax,%eax 10f250: 75 33 jne 10f285 10f252: 8b 43 4c mov 0x4c(%ebx),%eax 10f255: 8b 15 30 31 12 00 mov 0x123130,%edx result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10f25b: 83 e8 03 sub $0x3,%eax 10f25e: 83 f8 01 cmp $0x1,%eax 10f261: 76 c6 jbe 10f229 <== ALWAYS TAKEN 10f263: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10f265: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10f26b: 8d 65 f4 lea -0xc(%ebp),%esp 10f26e: 5b pop %ebx 10f26f: 5e pop %esi 10f270: 5f pop %edi 10f271: c9 leave 10f272: c3 ret 10f273: 90 nop <== NOT EXECUTED if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 10f274: 83 ec 08 sub $0x8,%esp 10f277: 57 push %edi 10f278: 56 push %esi 10f279: e8 0a ff ff ff call 10f188 10f27e: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f281: 85 c0 test %eax,%eax 10f283: 74 cd je 10f252 10f285: 8b 15 30 31 12 00 mov 0x123130,%edx 10f28b: eb d8 jmp 10f265 10f28d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 10f290: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10f296: e8 15 30 00 00 call 1122b0 <__errno> 10f29b: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10f2a1: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10f2a6: 8d 65 f4 lea -0xc(%ebp),%esp 10f2a9: 5b pop %ebx 10f2aa: 5e pop %esi 10f2ab: 5f pop %edi 10f2ac: c9 leave 10f2ad: c3 ret =============================================================================== 0010eeb0 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10eeb0: 55 push %ebp 10eeb1: 89 e5 mov %esp,%ebp 10eeb3: 83 ec 08 sub $0x8,%esp 10eeb6: 8b 45 0c mov 0xc(%ebp),%eax uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10eeb9: a9 f8 ff ff ff test $0xfffffff8,%eax 10eebe: 75 18 jne 10eed8 <== NEVER TAKEN */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10eec0: c1 e0 06 shl $0x6,%eax /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10eec3: 8b 55 08 mov 0x8(%ebp),%edx 10eec6: 8b 12 mov (%edx),%edx 10eec8: 8b 52 30 mov 0x30(%edx),%edx 10eecb: 21 c2 and %eax,%edx gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10eecd: 39 d0 cmp %edx,%eax 10eecf: 0f 94 c0 sete %al 10eed2: 0f b6 c0 movzbl %al,%eax */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10eed5: c9 leave 10eed6: c3 ret 10eed7: 90 nop <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10eed8: e8 d3 33 00 00 call 1122b0 <__errno> <== NOT EXECUTED 10eedd: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10eee3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 10eee8: c9 leave <== NOT EXECUTED 10eee9: c3 ret <== NOT EXECUTED =============================================================================== 0010f188 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f188: 55 push %ebp 10f189: 89 e5 mov %esp,%ebp 10f18b: 57 push %edi 10f18c: 56 push %esi 10f18d: 53 push %ebx 10f18e: 83 ec 20 sub $0x20,%esp 10f191: 8b 5d 08 mov 0x8(%ebp),%ebx 10f194: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10f197: 8b 3b mov (%ebx),%edi /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10f199: 8b 47 08 mov 0x8(%edi),%eax 10f19c: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10f19e: 53 push %ebx 10f19f: 8d 45 e4 lea -0x1c(%ebp),%eax 10f1a2: 50 push %eax 10f1a3: ff 77 50 pushl 0x50(%edi) 10f1a6: e8 d5 0d 00 00 call 10ff80 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10f1ab: 8b 57 50 mov 0x50(%edi),%edx 10f1ae: 03 55 e4 add -0x1c(%ebp),%edx 10f1b1: 31 c0 xor %eax,%eax 10f1b3: b9 ff ff ff ff mov $0xffffffff,%ecx 10f1b8: 89 d7 mov %edx,%edi 10f1ba: f2 ae repnz scas %es:(%edi),%al 10f1bc: f7 d1 not %ecx 10f1be: 49 dec %ecx 10f1bf: 53 push %ebx 10f1c0: 56 push %esi 10f1c1: 51 push %ecx 10f1c2: 52 push %edx 10f1c3: e8 68 fd ff ff call 10ef30 10f1c8: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10f1ca: 83 c4 14 add $0x14,%esp 10f1cd: 53 push %ebx 10f1ce: e8 81 fc ff ff call 10ee54 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10f1d3: 58 pop %eax 10f1d4: 5a pop %edx 10f1d5: 56 push %esi 10f1d6: 53 push %ebx 10f1d7: e8 d4 fc ff ff call 10eeb0 10f1dc: 83 c4 10 add $0x10,%esp 10f1df: 85 c0 test %eax,%eax 10f1e1: 74 0d je 10f1f0 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f1e3: 89 f8 mov %edi,%eax 10f1e5: 8d 65 f4 lea -0xc(%ebp),%esp 10f1e8: 5b pop %ebx 10f1e9: 5e pop %esi 10f1ea: 5f pop %edi 10f1eb: c9 leave 10f1ec: c3 ret 10f1ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10f1f0: e8 bb 30 00 00 call 1122b0 <__errno> 10f1f5: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f1fb: bf ff ff ff ff mov $0xffffffff,%edi 10f200: eb e1 jmp 10f1e3 =============================================================================== 001089f4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1089f4: 55 push %ebp 1089f5: 89 e5 mov %esp,%ebp 1089f7: 53 push %ebx 1089f8: 83 ec 04 sub $0x4,%esp 1089fb: 8b 45 08 mov 0x8(%ebp),%eax 1089fe: 8b 55 0c mov 0xc(%ebp),%edx 108a01: 8b 4d 10 mov 0x10(%ebp),%ecx int err; if (command == FIONBIO) { 108a04: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx 108a0a: 74 1c je 108a28 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 108a0c: 50 push %eax 108a0d: 51 push %ecx 108a0e: 52 push %edx 108a0f: 8b 40 18 mov 0x18(%eax),%eax 108a12: ff 70 50 pushl 0x50(%eax) 108a15: e8 5e 95 00 00 call 111f78 IMFS_FIFO_RETURN(err); 108a1a: 83 c4 10 add $0x10,%esp 108a1d: 85 c0 test %eax,%eax 108a1f: 78 3e js 108a5f } 108a21: 8b 5d fc mov -0x4(%ebp),%ebx 108a24: c9 leave 108a25: c3 ret 108a26: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108a28: 85 c9 test %ecx,%ecx 108a2a: 74 20 je 108a4c err = -EFAULT; else { if (*(int *)buffer) 108a2c: 8b 11 mov (%ecx),%edx 108a2e: 85 d2 test %edx,%edx 108a30: 74 0e je 108a40 iop->flags |= LIBIO_FLAGS_NO_DELAY; 108a32: 83 48 14 01 orl $0x1,0x14(%eax) else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 108a36: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108a38: 8b 5d fc mov -0x4(%ebp),%ebx 108a3b: c9 leave 108a3c: c3 ret 108a3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 108a40: 83 60 14 fe andl $0xfffffffe,0x14(%eax) return 0; 108a44: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108a46: 8b 5d fc mov -0x4(%ebp),%ebx 108a49: c9 leave 108a4a: c3 ret 108a4b: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108a4c: bb 0e 00 00 00 mov $0xe,%ebx } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 108a51: e8 fe b4 00 00 call 113f54 <__errno> 108a56: 89 18 mov %ebx,(%eax) 108a58: b8 ff ff ff ff mov $0xffffffff,%eax 108a5d: eb c2 jmp 108a21 108a5f: 89 c3 mov %eax,%ebx 108a61: f7 db neg %ebx 108a63: eb ec jmp 108a51 =============================================================================== 001089b0 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 1089b0: 55 push %ebp 1089b1: 89 e5 mov %esp,%ebp 1089b3: 53 push %ebx 1089b4: 83 ec 10 sub $0x10,%esp 1089b7: 8b 45 08 mov 0x8(%ebp),%eax off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 1089ba: 50 push %eax 1089bb: ff 75 14 pushl 0x14(%ebp) 1089be: ff 75 10 pushl 0x10(%ebp) 1089c1: ff 75 0c pushl 0xc(%ebp) 1089c4: 8b 40 18 mov 0x18(%eax),%eax 1089c7: ff 70 50 pushl 0x50(%eax) 1089ca: e8 09 96 00 00 call 111fd8 1089cf: 89 c3 mov %eax,%ebx 1089d1: 99 cltd IMFS_FIFO_RETURN(err); 1089d2: 83 c4 20 add $0x20,%esp 1089d5: 85 d2 test %edx,%edx 1089d7: 78 05 js 1089de <== ALWAYS TAKEN } 1089d9: 8b 5d fc mov -0x4(%ebp),%ebx 1089dc: c9 leave 1089dd: c3 ret rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 1089de: e8 71 b5 00 00 call 113f54 <__errno> 1089e3: f7 db neg %ebx 1089e5: 89 18 mov %ebx,(%eax) 1089e7: b8 ff ff ff ff mov $0xffffffff,%eax 1089ec: ba ff ff ff ff mov $0xffffffff,%edx 1089f1: eb e6 jmp 1089d9 =============================================================================== 00108ac8 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 108ac8: 55 push %ebp 108ac9: 89 e5 mov %esp,%ebp 108acb: 56 push %esi 108acc: 53 push %ebx 108acd: 83 ec 10 sub $0x10,%esp 108ad0: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 108ad3: 8b 70 18 mov 0x18(%eax),%esi int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 108ad6: 50 push %eax 108ad7: ff 75 10 pushl 0x10(%ebp) 108ada: ff 75 0c pushl 0xc(%ebp) 108add: ff 76 50 pushl 0x50(%esi) 108ae0: e8 ef 90 00 00 call 111bd4 108ae5: 89 c3 mov %eax,%ebx if (err > 0) 108ae7: 83 c4 10 add $0x10,%esp 108aea: 83 f8 00 cmp $0x0,%eax 108aed: 7e 21 jle 108b10 IMFS_update_atime(jnode); 108aef: 83 ec 08 sub $0x8,%esp 108af2: 6a 00 push $0x0 108af4: 8d 45 f0 lea -0x10(%ebp),%eax 108af7: 50 push %eax 108af8: e8 ab 0e 00 00 call 1099a8 108afd: 8b 45 f0 mov -0x10(%ebp),%eax 108b00: 89 46 40 mov %eax,0x40(%esi) 108b03: 83 c4 10 add $0x10,%esp IMFS_FIFO_RETURN(err); } 108b06: 89 d8 mov %ebx,%eax 108b08: 8d 65 f8 lea -0x8(%ebp),%esp 108b0b: 5b pop %ebx 108b0c: 5e pop %esi 108b0d: c9 leave 108b0e: c3 ret 108b0f: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 108b10: 74 f4 je 108b06 108b12: e8 3d b4 00 00 call 113f54 <__errno> 108b17: f7 db neg %ebx 108b19: 89 18 mov %ebx,(%eax) 108b1b: bb ff ff ff ff mov $0xffffffff,%ebx 108b20: eb e4 jmp 108b06 =============================================================================== 00108a68 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 108a68: 55 push %ebp 108a69: 89 e5 mov %esp,%ebp 108a6b: 56 push %esi 108a6c: 53 push %ebx 108a6d: 83 ec 10 sub $0x10,%esp 108a70: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 108a73: 8b 58 18 mov 0x18(%eax),%ebx int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 108a76: 50 push %eax 108a77: ff 75 10 pushl 0x10(%ebp) 108a7a: ff 75 0c pushl 0xc(%ebp) 108a7d: ff 73 50 pushl 0x50(%ebx) 108a80: e8 0f 93 00 00 call 111d94 108a85: 89 c6 mov %eax,%esi if (err > 0) { 108a87: 83 c4 10 add $0x10,%esp 108a8a: 83 f8 00 cmp $0x0,%eax 108a8d: 7e 25 jle 108ab4 IMFS_mtime_ctime_update(jnode); 108a8f: 83 ec 08 sub $0x8,%esp 108a92: 6a 00 push $0x0 108a94: 8d 45 f0 lea -0x10(%ebp),%eax 108a97: 50 push %eax 108a98: e8 0b 0f 00 00 call 1099a8 108a9d: 8b 45 f0 mov -0x10(%ebp),%eax 108aa0: 89 43 44 mov %eax,0x44(%ebx) 108aa3: 89 43 48 mov %eax,0x48(%ebx) 108aa6: 83 c4 10 add $0x10,%esp } IMFS_FIFO_RETURN(err); } 108aa9: 89 f0 mov %esi,%eax 108aab: 8d 65 f8 lea -0x8(%ebp),%esp 108aae: 5b pop %ebx 108aaf: 5e pop %esi 108ab0: c9 leave 108ab1: c3 ret 108ab2: 66 90 xchg %ax,%ax <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 108ab4: 74 f3 je 108aa9 <== NEVER TAKEN 108ab6: e8 99 b4 00 00 call 113f54 <__errno> 108abb: f7 de neg %esi 108abd: 89 30 mov %esi,(%eax) 108abf: be ff ff ff ff mov $0xffffffff,%esi 108ac4: eb e3 jmp 108aa9 =============================================================================== 0010f610 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10f610: 55 push %ebp 10f611: 89 e5 mov %esp,%ebp 10f613: 57 push %edi 10f614: 56 push %esi 10f615: 53 push %ebx 10f616: 83 ec 0c sub $0xc,%esp 10f619: 8b 45 08 mov 0x8(%ebp),%eax 10f61c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10f61f: bf 30 ff 11 00 mov $0x11ff30,%edi 10f624: b9 02 00 00 00 mov $0x2,%ecx 10f629: 89 de mov %ebx,%esi 10f62b: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f62d: 74 13 je 10f642 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10f62f: bf 32 ff 11 00 mov $0x11ff32,%edi 10f634: b9 03 00 00 00 mov $0x3,%ecx 10f639: 89 de mov %ebx,%esi 10f63b: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f63d: 75 0d jne 10f64c <== ALWAYS TAKEN return directory->Parent; 10f63f: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f642: 8d 65 f4 lea -0xc(%ebp),%esp 10f645: 5b pop %ebx 10f646: 5e pop %esi 10f647: 5f pop %edi 10f648: c9 leave 10f649: c3 ret 10f64a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f64c: 8b 70 50 mov 0x50(%eax),%esi 10f64f: 8d 78 54 lea 0x54(%eax),%edi 10f652: 39 fe cmp %edi,%esi 10f654: 75 08 jne 10f65e 10f656: eb 20 jmp 10f678 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10f658: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f65a: 39 fe cmp %edi,%esi 10f65c: 74 1a je 10f678 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 10f65e: 8d 46 0c lea 0xc(%esi),%eax 10f661: 83 ec 08 sub $0x8,%esp 10f664: 50 push %eax 10f665: 53 push %ebx 10f666: e8 b1 38 00 00 call 112f1c 10f66b: 83 c4 10 add $0x10,%esp 10f66e: 85 c0 test %eax,%eax 10f670: 75 e6 jne 10f658 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 10f672: 89 f0 mov %esi,%eax 10f674: eb cc jmp 10f642 10f676: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 10f678: 31 c0 xor %eax,%eax 10f67a: eb c6 jmp 10f642 =============================================================================== 0010f574 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10f574: 55 push %ebp 10f575: 89 e5 mov %esp,%ebp 10f577: 57 push %edi 10f578: 56 push %esi 10f579: 53 push %ebx 10f57a: 83 ec 3c sub $0x3c,%esp 10f57d: 8b 45 08 mov 0x8(%ebp),%eax /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 10f580: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10f583: 8d 55 d4 lea -0x2c(%ebp),%edx 10f586: 89 55 c4 mov %edx,-0x3c(%ebp) 10f589: 8d 70 1c lea 0x1c(%eax),%esi 10f58c: b9 05 00 00 00 mov $0x5,%ecx 10f591: 89 d7 mov %edx,%edi 10f593: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 10f595: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 10f59c: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 10f59f: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10f5a2: 83 ec 0c sub $0xc,%esp 10f5a5: 8d 45 d4 lea -0x2c(%ebp),%eax 10f5a8: 50 push %eax 10f5a9: e8 a6 f8 ff ff call 10ee54 if ( jnode->type != IMFS_DIRECTORY ) { 10f5ae: 83 c4 10 add $0x10,%esp 10f5b1: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f5b5: 75 2d jne 10f5e4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f5b7: 8d 43 54 lea 0x54(%ebx),%eax result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 10f5ba: 39 43 50 cmp %eax,0x50(%ebx) 10f5bd: 74 3e je 10f5fd result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 10f5bf: 85 db test %ebx,%ebx 10f5c1: 74 15 je 10f5d8 if ( jnode->type == IMFS_DIRECTORY ) { 10f5c3: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f5c7: 75 d3 jne 10f59c <== NEVER TAKEN 10f5c9: 8d 43 54 lea 0x54(%ebx),%eax if ( jnode_has_children( jnode ) ) 10f5cc: 39 43 50 cmp %eax,0x50(%ebx) 10f5cf: 74 cb je 10f59c jnode = jnode_get_first_child( jnode ); 10f5d1: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10f5d4: 85 db test %ebx,%ebx 10f5d6: 75 c4 jne 10f59c <== ALWAYS TAKEN return 0; 10f5d8: 31 c0 xor %eax,%eax } 10f5da: 8d 65 f4 lea -0xc(%ebp),%esp 10f5dd: 5b pop %ebx 10f5de: 5e pop %esi 10f5df: 5f pop %edi 10f5e0: c9 leave 10f5e1: c3 ret 10f5e2: 66 90 xchg %ax,%ax <== NOT EXECUTED next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 10f5e4: 83 ec 08 sub $0x8,%esp 10f5e7: 8d 55 d4 lea -0x2c(%ebp),%edx 10f5ea: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f5eb: 6a 00 push $0x0 10f5ed: e8 ea 85 ff ff call 107bdc if (result != 0) 10f5f2: 83 c4 10 add $0x10,%esp 10f5f5: 85 c0 test %eax,%eax 10f5f7: 75 0d jne 10f606 <== NEVER TAKEN return -1; jnode = next; 10f5f9: 89 f3 mov %esi,%ebx 10f5fb: eb c2 jmp 10f5bf result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f5fd: 83 ec 08 sub $0x8,%esp 10f600: 8d 45 d4 lea -0x2c(%ebp),%eax 10f603: 50 push %eax 10f604: eb e5 jmp 10f5eb if (result != 0) return -1; 10f606: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f60b: eb cd jmp 10f5da <== NOT EXECUTED =============================================================================== 0010f67c : const char *path, int pathlen, char *token, int *token_len ) { 10f67c: 55 push %ebp 10f67d: 89 e5 mov %esp,%ebp 10f67f: 57 push %edi 10f680: 56 push %esi 10f681: 53 push %ebx 10f682: 83 ec 1c sub $0x1c,%esp 10f685: 8b 7d 08 mov 0x8(%ebp),%edi 10f688: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10f68b: 8a 17 mov (%edi),%dl int pathlen, char *token, int *token_len ) { register int i = 0; 10f68d: 31 f6 xor %esi,%esi 10f68f: 89 7d e4 mov %edi,-0x1c(%ebp) 10f692: 89 df mov %ebx,%edi 10f694: 88 d3 mov %dl,%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f696: eb 07 jmp 10f69f return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10f698: 46 inc %esi 10f699: 8b 45 e4 mov -0x1c(%ebp),%eax 10f69c: 8a 1c 30 mov (%eax,%esi,1),%bl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10f69f: 83 ec 0c sub $0xc,%esp 10f6a2: 0f be c3 movsbl %bl,%eax 10f6a5: 50 push %eax 10f6a6: e8 4d 98 ff ff call 108ef8 10f6ab: 83 c4 10 add $0x10,%esp 10f6ae: 85 c0 test %eax,%eax 10f6b0: 75 1a jne 10f6cc 10f6b2: 3b 75 0c cmp 0xc(%ebp),%esi 10f6b5: 7d 15 jge 10f6cc token[i] = c; 10f6b7: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 10f6ba: 83 fe 20 cmp $0x20,%esi 10f6bd: 75 d9 jne 10f698 return IMFS_INVALID_TOKEN; 10f6bf: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f6c4: 8d 65 f4 lea -0xc(%ebp),%esp 10f6c7: 5b pop %ebx 10f6c8: 5e pop %esi 10f6c9: 5f pop %edi 10f6ca: c9 leave 10f6cb: c3 ret 10f6cc: 88 da mov %bl,%dl 10f6ce: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 10f6d0: 85 f6 test %esi,%esi 10f6d2: 75 25 jne 10f6f9 token[i] = c; 10f6d4: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 10f6d6: 84 d2 test %dl,%dl 10f6d8: 74 16 je 10f6f0 10f6da: 8b 45 0c mov 0xc(%ebp),%eax 10f6dd: 85 c0 test %eax,%eax 10f6df: 74 0f je 10f6f0 i++; type = IMFS_CURRENT_DIR; 10f6e1: b8 01 00 00 00 mov $0x1,%eax if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 10f6e6: be 01 00 00 00 mov $0x1,%esi 10f6eb: eb 05 jmp 10f6f2 10f6ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 10f6f0: 31 c0 xor %eax,%eax /* * Set token_len to the number of characters copied. */ *token_len = i; 10f6f2: 8b 55 14 mov 0x14(%ebp),%edx 10f6f5: 89 32 mov %esi,(%edx) 10f6f7: eb cb jmp 10f6c4 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f6f9: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 10f6fe: 74 04 je 10f704 <== NEVER TAKEN token[i] = '\0'; 10f700: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10f704: 8b 45 14 mov 0x14(%ebp),%eax 10f707: 89 30 mov %esi,(%eax) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 10f709: bf 35 ff 11 00 mov $0x11ff35,%edi 10f70e: b9 03 00 00 00 mov $0x3,%ecx 10f713: 89 de mov %ebx,%esi 10f715: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f717: 75 0f jne 10f728 type = IMFS_UP_DIR; 10f719: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f71e: 8d 65 f4 lea -0xc(%ebp),%esp 10f721: 5b pop %ebx 10f722: 5e pop %esi 10f723: 5f pop %edi 10f724: c9 leave 10f725: c3 ret 10f726: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10f728: bf 36 ff 11 00 mov $0x11ff36,%edi 10f72d: b9 02 00 00 00 mov $0x2,%ecx 10f732: 89 de mov %ebx,%esi 10f734: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f736: 0f 97 c0 seta %al 10f739: 0f 92 c2 setb %dl 10f73c: 28 d0 sub %dl,%al 10f73e: 0f be c0 movsbl %al,%eax 10f741: 83 f8 01 cmp $0x1,%eax 10f744: 19 c0 sbb %eax,%eax 10f746: 83 e0 fe and $0xfffffffe,%eax 10f749: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10f74c: 8d 65 f4 lea -0xc(%ebp),%esp 10f74f: 5b pop %ebx 10f750: 5e pop %esi 10f751: 5f pop %edi 10f752: c9 leave 10f753: c3 ret =============================================================================== 00107824 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 107824: 55 push %ebp 107825: 89 e5 mov %esp,%ebp 107827: 57 push %edi 107828: 56 push %esi 107829: 53 push %ebx 10782a: 83 ec 1c sub $0x1c,%esp 10782d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 107830: 8b 0d 50 11 12 00 mov 0x121150,%ecx /* * 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) { 107836: 83 f9 10 cmp $0x10,%ecx 107839: 74 1f je 10785a is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 10783b: 83 f9 0f cmp $0xf,%ecx 10783e: 7e 15 jle 107855 107840: ba 05 00 00 00 mov $0x5,%edx 107845: b8 20 00 00 00 mov $0x20,%eax /* * 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) { 10784a: 39 c1 cmp %eax,%ecx 10784c: 74 0c je 10785a is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 10784e: 7c 05 jl 107855 <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107850: d1 e0 shl %eax 107852: 4a dec %edx 107853: 75 f5 jne 10784a <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 107855: b9 80 00 00 00 mov $0x80,%ecx break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 10785a: 89 0d 80 4f 12 00 mov %ecx,0x124f80 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 107860: e8 bb 75 00 00 call 10ee20 107865: 89 c2 mov %eax,%edx 107867: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 10786a: 8b 45 14 mov 0x14(%ebp),%eax 10786d: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107870: 8b 45 0c mov 0xc(%ebp),%eax 107873: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107876: 8d 7b 38 lea 0x38(%ebx),%edi 107879: be e0 fe 11 00 mov $0x11fee0,%esi 10787e: b9 0c 00 00 00 mov $0xc,%ecx 107883: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107885: 83 ec 08 sub $0x8,%esp 107888: 6a 14 push $0x14 10788a: 6a 01 push $0x1 10788c: 89 55 e4 mov %edx,-0x1c(%ebp) 10788f: e8 70 06 00 00 call 107f04 if ( !fs_info ) { 107894: 83 c4 10 add $0x10,%esp 107897: 85 c0 test %eax,%eax 107899: 8b 55 e4 mov -0x1c(%ebp),%edx 10789c: 74 3c je 1078da free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 10789e: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1078a1: 8b 0d 84 4f 12 00 mov 0x124f84,%ecx 1078a7: 89 08 mov %ecx,(%eax) 1078a9: 41 inc %ecx 1078aa: 89 0d 84 4f 12 00 mov %ecx,0x124f84 fs_info->ino_count = 1; 1078b0: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 1078b7: 8b 4d 10 mov 0x10(%ebp),%ecx 1078ba: 89 48 08 mov %ecx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 1078bd: 8b 4d 14 mov 0x14(%ebp),%ecx 1078c0: 89 48 0c mov %ecx,0xc(%eax) fs_info->fifo_handlers = fifo_handlers; 1078c3: 8b 4d 18 mov 0x18(%ebp),%ecx 1078c6: 89 48 10 mov %ecx,0x10(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 1078c9: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) return 0; 1078d0: 31 c0 xor %eax,%eax } 1078d2: 8d 65 f4 lea -0xc(%ebp),%esp 1078d5: 5b pop %ebx 1078d6: 5e pop %esi 1078d7: 5f pop %edi 1078d8: c9 leave 1078d9: c3 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 1078da: 83 ec 0c sub $0xc,%esp 1078dd: 52 push %edx 1078de: e8 b1 07 00 00 call 108094 rtems_set_errno_and_return_minus_one(ENOMEM); 1078e3: e8 c8 a9 00 00 call 1122b0 <__errno> 1078e8: c7 00 0c 00 00 00 movl $0xc,(%eax) 1078ee: 83 c4 10 add $0x10,%esp 1078f1: 83 c8 ff or $0xffffffff,%eax 1078f4: eb dc jmp 1078d2 =============================================================================== 001078f8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1078f8: 55 push %ebp 1078f9: 89 e5 mov %esp,%ebp 1078fb: 57 push %edi 1078fc: 53 push %ebx 1078fd: 83 ec 50 sub $0x50,%esp 107900: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 107903: 8b 45 08 mov 0x8(%ebp),%eax 107906: 8b 00 mov (%eax),%eax 107908: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 10790b: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107910: 77 66 ja 107978 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 107912: 31 c0 xor %eax,%eax 107914: b9 ff ff ff ff mov $0xffffffff,%ecx 107919: 89 d7 mov %edx,%edi 10791b: f2 ae repnz scas %es:(%edi),%al 10791d: f7 d1 not %ecx 10791f: 49 dec %ecx 107920: 8d 45 f4 lea -0xc(%ebp),%eax 107923: 50 push %eax 107924: 8d 5d b7 lea -0x49(%ebp),%ebx 107927: 53 push %ebx 107928: 51 push %ecx 107929: 52 push %edx 10792a: e8 4d 7d 00 00 call 10f67c new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 10792f: 8d 45 d8 lea -0x28(%ebp),%eax * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107932: 89 04 24 mov %eax,(%esp) 107935: 68 ff a1 00 00 push $0xa1ff 10793a: 53 push %ebx 10793b: 6a 03 push $0x3 10793d: ff 75 0c pushl 0xc(%ebp) 107940: e8 a3 73 00 00 call 10ece8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107945: 83 c4 20 add $0x20,%esp 107948: 85 c0 test %eax,%eax 10794a: 74 3e je 10798a rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 10794c: 8b 45 d8 mov -0x28(%ebp),%eax 10794f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107953: 83 ec 08 sub $0x8,%esp 107956: 6a 00 push $0x0 107958: 8d 45 ec lea -0x14(%ebp),%eax 10795b: 50 push %eax 10795c: e8 af 07 00 00 call 108110 107961: 8b 55 ec mov -0x14(%ebp),%edx 107964: 8b 45 d8 mov -0x28(%ebp),%eax 107967: 89 50 48 mov %edx,0x48(%eax) return 0; 10796a: 83 c4 10 add $0x10,%esp 10796d: 31 c0 xor %eax,%eax } 10796f: 8d 65 f8 lea -0x8(%ebp),%esp 107972: 5b pop %ebx 107973: 5f pop %edi 107974: c9 leave 107975: c3 ret 107976: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 107978: e8 33 a9 00 00 call 1122b0 <__errno> 10797d: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107983: b8 ff ff ff ff mov $0xffffffff,%eax 107988: eb e5 jmp 10796f ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10798a: e8 21 a9 00 00 call 1122b0 <__errno> 10798f: c7 00 0c 00 00 00 movl $0xc,(%eax) 107995: b8 ff ff ff ff mov $0xffffffff,%eax 10799a: eb d3 jmp 10796f =============================================================================== 001111c8 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 1111c8: 55 push %ebp 1111c9: 89 e5 mov %esp,%ebp 1111cb: 53 push %ebx 1111cc: 83 ec 08 sub $0x8,%esp IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 1111cf: 6a 01 push $0x1 1111d1: ff 75 0c pushl 0xc(%ebp) 1111d4: ff 75 08 pushl 0x8(%ebp) 1111d7: e8 28 fc ff ff call 110e04 1111dc: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 1111de: 83 c4 10 add $0x10,%esp 1111e1: 8b 00 mov (%eax),%eax 1111e3: 85 c0 test %eax,%eax 1111e5: 74 09 je 1111f0 return 0; 1111e7: 31 c0 xor %eax,%eax if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 1111e9: 8b 5d fc mov -0x4(%ebp),%ebx 1111ec: c9 leave 1111ed: c3 ret 1111ee: 66 90 xchg %ax,%ax <== NOT EXECUTED return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 1111f0: e8 eb fb ff ff call 110de0 if ( !memory ) 1111f5: 85 c0 test %eax,%eax 1111f7: 74 07 je 111200 return 1; *block_entry_ptr = memory; 1111f9: 89 03 mov %eax,(%ebx) return 0; 1111fb: 31 c0 xor %eax,%eax 1111fd: eb ea jmp 1111e9 1111ff: 90 nop <== NOT EXECUTED /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 111200: b8 01 00 00 00 mov $0x1,%eax 111205: eb e2 jmp 1111e9 =============================================================================== 00111408 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 111408: 55 push %ebp 111409: 89 e5 mov %esp,%ebp 11140b: 57 push %edi 11140c: 56 push %esi 11140d: 53 push %ebx 11140e: 83 ec 2c sub $0x2c,%esp 111411: 8b 5d 08 mov 0x8(%ebp),%ebx 111414: 8b 45 0c mov 0xc(%ebp),%eax 111417: 8b 55 10 mov 0x10(%ebp),%edx 11141a: 89 45 d8 mov %eax,-0x28(%ebp) 11141d: 89 55 dc mov %edx,-0x24(%ebp) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 111420: a1 80 4f 12 00 mov 0x124f80,%eax 111425: 89 c1 mov %eax,%ecx 111427: c1 e9 02 shr $0x2,%ecx 11142a: 8d 51 01 lea 0x1(%ecx),%edx 11142d: 0f af d1 imul %ecx,%edx 111430: 42 inc %edx 111431: 0f af d1 imul %ecx,%edx 111434: 4a dec %edx 111435: 0f af d0 imul %eax,%edx 111438: 31 c9 xor %ecx,%ecx 11143a: 3b 4d dc cmp -0x24(%ebp),%ecx 11143d: 7f 1a jg 111459 <== NEVER TAKEN 11143f: 7d 13 jge 111454 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 111441: e8 6a 0e 00 00 call 1122b0 <__errno> 111446: c7 00 16 00 00 00 movl $0x16,(%eax) 11144c: b8 ff ff ff ff mov $0xffffffff,%eax 111451: eb 19 jmp 11146c 111453: 90 nop <== NOT EXECUTED IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 111454: 3b 55 d8 cmp -0x28(%ebp),%edx 111457: 76 e8 jbe 111441 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 111459: 8b 53 50 mov 0x50(%ebx),%edx 11145c: 8b 4b 54 mov 0x54(%ebx),%ecx 11145f: 89 55 e0 mov %edx,-0x20(%ebp) 111462: 89 4d e4 mov %ecx,-0x1c(%ebp) 111465: 39 4d dc cmp %ecx,-0x24(%ebp) 111468: 7d 0a jge 111474 <== ALWAYS TAKEN return 0; 11146a: 31 c0 xor %eax,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 11146c: 8d 65 f4 lea -0xc(%ebp),%esp 11146f: 5b pop %ebx 111470: 5e pop %esi 111471: 5f pop %edi 111472: c9 leave 111473: c3 ret rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 111474: 7f 05 jg 11147b <== NEVER TAKEN 111476: 39 55 d8 cmp %edx,-0x28(%ebp) 111479: 76 ef jbe 11146a return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 11147b: 89 45 d0 mov %eax,-0x30(%ebp) 11147e: 89 c1 mov %eax,%ecx 111480: c1 f9 1f sar $0x1f,%ecx 111483: 89 4d d4 mov %ecx,-0x2c(%ebp) 111486: ff 75 d4 pushl -0x2c(%ebp) 111489: ff 75 d0 pushl -0x30(%ebp) 11148c: ff 75 dc pushl -0x24(%ebp) 11148f: ff 75 d8 pushl -0x28(%ebp) 111492: e8 49 bd 00 00 call 11d1e0 <__divdi3> 111497: 83 c4 10 add $0x10,%esp 11149a: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 11149c: ff 75 d4 pushl -0x2c(%ebp) 11149f: ff 75 d0 pushl -0x30(%ebp) 1114a2: ff 75 e4 pushl -0x1c(%ebp) 1114a5: ff 75 e0 pushl -0x20(%ebp) 1114a8: e8 33 bd 00 00 call 11d1e0 <__divdi3> 1114ad: 83 c4 10 add $0x10,%esp 1114b0: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 1114b3: 39 c6 cmp %eax,%esi 1114b5: 72 51 jb 111508 <== NEVER TAKEN 1114b7: 89 c7 mov %eax,%edi 1114b9: eb 06 jmp 1114c1 1114bb: 90 nop <== NOT EXECUTED 1114bc: 47 inc %edi 1114bd: 39 fe cmp %edi,%esi 1114bf: 72 47 jb 111508 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 1114c1: 83 ec 08 sub $0x8,%esp 1114c4: 57 push %edi 1114c5: 53 push %ebx 1114c6: e8 fd fc ff ff call 1111c8 1114cb: 83 c4 10 add $0x10,%esp 1114ce: 85 c0 test %eax,%eax 1114d0: 74 ea je 1114bc for ( ; block>=old_blocks ; block-- ) { 1114d2: 39 7d e0 cmp %edi,-0x20(%ebp) 1114d5: 77 17 ja 1114ee <== NEVER TAKEN 1114d7: 8b 75 e0 mov -0x20(%ebp),%esi 1114da: 66 90 xchg %ax,%ax IMFS_memfile_remove_block( the_jnode, block ); 1114dc: 83 ec 08 sub $0x8,%esp 1114df: 57 push %edi 1114e0: 53 push %ebx 1114e1: e8 f6 fe ff ff call 1113dc /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 1114e6: 4f dec %edi 1114e7: 83 c4 10 add $0x10,%esp 1114ea: 39 fe cmp %edi,%esi 1114ec: 76 ee jbe 1114dc IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1114ee: e8 bd 0d 00 00 call 1122b0 <__errno> 1114f3: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1114f9: b8 ff ff ff ff mov $0xffffffff,%eax /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 1114fe: 8d 65 f4 lea -0xc(%ebp),%esp 111501: 5b pop %ebx 111502: 5e pop %esi 111503: 5f pop %edi 111504: c9 leave 111505: c3 ret 111506: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 111508: 8b 45 d8 mov -0x28(%ebp),%eax 11150b: 8b 55 dc mov -0x24(%ebp),%edx 11150e: 89 43 50 mov %eax,0x50(%ebx) 111511: 89 53 54 mov %edx,0x54(%ebx) return 0; 111514: 31 c0 xor %eax,%eax } 111516: 8d 65 f4 lea -0xc(%ebp),%esp 111519: 5b pop %ebx 11151a: 5e pop %esi 11151b: 5f pop %edi 11151c: c9 leave 11151d: c3 ret =============================================================================== 00110e04 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 110e04: 55 push %ebp 110e05: 89 e5 mov %esp,%ebp 110e07: 57 push %edi 110e08: 56 push %esi 110e09: 53 push %ebx 110e0a: 83 ec 1c sub $0x1c,%esp 110e0d: 8b 5d 08 mov 0x8(%ebp),%ebx 110e10: 8b 75 0c mov 0xc(%ebp),%esi 110e13: 8b 7d 10 mov 0x10(%ebp),%edi my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 110e16: 8b 0d 80 4f 12 00 mov 0x124f80,%ecx 110e1c: c1 e9 02 shr $0x2,%ecx 110e1f: 8d 41 ff lea -0x1(%ecx),%eax 110e22: 39 c6 cmp %eax,%esi 110e24: 77 1a ja 110e40 p = info->indirect; 110e26: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 110e29: 85 ff test %edi,%edi 110e2b: 74 53 je 110e80 if ( !p ) { 110e2d: 85 c0 test %eax,%eax 110e2f: 0f 84 b6 00 00 00 je 110eeb } if ( !p ) return 0; return &info->indirect[ my_block ]; 110e35: 8d 04 b0 lea (%eax,%esi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 110e38: 83 c4 1c add $0x1c,%esp 110e3b: 5b pop %ebx 110e3c: 5e pop %esi 110e3d: 5f pop %edi 110e3e: c9 leave 110e3f: c3 ret /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 110e40: 8d 41 01 lea 0x1(%ecx),%eax 110e43: 0f af c1 imul %ecx,%eax 110e46: 8d 50 ff lea -0x1(%eax),%edx 110e49: 39 d6 cmp %edx,%esi 110e4b: 77 3b ja 110e88 my_block -= FIRST_DOUBLY_INDIRECT; 110e4d: 29 ce sub %ecx,%esi singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110e4f: 89 f0 mov %esi,%eax 110e51: 31 d2 xor %edx,%edx 110e53: f7 f1 div %ecx 110e55: 89 c6 mov %eax,%esi doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 110e57: 8b 43 5c mov 0x5c(%ebx),%eax if ( malloc_it ) { 110e5a: 85 ff test %edi,%edi 110e5c: 74 7e je 110edc if ( !p ) { 110e5e: 85 c0 test %eax,%eax 110e60: 0f 84 96 00 00 00 je 110efc if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 110e66: 8d 1c b0 lea (%eax,%esi,4),%ebx 110e69: 8b 03 mov (%ebx),%eax if ( !p1 ) { 110e6b: 85 c0 test %eax,%eax 110e6d: 0f 84 a4 00 00 00 je 110f17 p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 110e73: 8d 04 90 lea (%eax,%edx,4),%eax /* * This means the requested block number is out of range. */ return 0; } 110e76: 83 c4 1c add $0x1c,%esp 110e79: 5b pop %ebx 110e7a: 5e pop %esi 110e7b: 5f pop %edi 110e7c: c9 leave 110e7d: c3 ret 110e7e: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 110e80: 85 c0 test %eax,%eax 110e82: 75 b1 jne 110e35 <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 110e84: 31 c0 xor %eax,%eax <== NOT EXECUTED 110e86: eb ee jmp 110e76 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 110e88: 8d 50 01 lea 0x1(%eax),%edx 110e8b: 0f af d1 imul %ecx,%edx 110e8e: 4a dec %edx 110e8f: 39 d6 cmp %edx,%esi 110e91: 77 f1 ja 110e84 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 110e93: 29 c6 sub %eax,%esi 110e95: 89 f0 mov %esi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110e97: 31 d2 xor %edx,%edx 110e99: f7 f1 div %ecx 110e9b: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 110e9e: 31 d2 xor %edx,%edx 110ea0: f7 f1 div %ecx 110ea2: 89 c6 mov %eax,%esi doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 110ea4: 8b 4b 60 mov 0x60(%ebx),%ecx if ( malloc_it ) { 110ea7: 85 ff test %edi,%edi 110ea9: 0f 84 82 00 00 00 je 110f31 if ( !p ) { 110eaf: 85 c9 test %ecx,%ecx 110eb1: 0f 84 9b 00 00 00 je 110f52 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 110eb7: 8d 1c b1 lea (%ecx,%esi,4),%ebx 110eba: 8b 0b mov (%ebx),%ecx if ( !p1 ) { 110ebc: 85 c9 test %ecx,%ecx 110ebe: 0f 84 c5 00 00 00 je 110f89 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 110ec4: 8d 1c 91 lea (%ecx,%edx,4),%ebx 110ec7: 8b 13 mov (%ebx),%edx if ( !p2 ) { 110ec9: 85 d2 test %edx,%edx 110ecb: 0f 84 a0 00 00 00 je 110f71 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 110ed1: 8b 4d e4 mov -0x1c(%ebp),%ecx 110ed4: 8d 04 8a lea (%edx,%ecx,4),%eax 110ed7: eb 9d jmp 110e76 110ed9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 110edc: 85 c0 test %eax,%eax 110ede: 74 a4 je 110e84 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 110ee0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !p ) 110ee3: 85 c0 test %eax,%eax 110ee5: 75 8c jne 110e73 <== ALWAYS TAKEN if ( !p ) return 0; p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 110ee7: 31 c0 xor %eax,%eax <== NOT EXECUTED 110ee9: eb 8b jmp 110e76 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110eeb: e8 f0 fe ff ff call 110de0 if ( !p ) 110ef0: 85 c0 test %eax,%eax 110ef2: 74 90 je 110e84 <== NEVER TAKEN return 0; info->indirect = p; 110ef4: 89 43 58 mov %eax,0x58(%ebx) 110ef7: e9 39 ff ff ff jmp 110e35 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110efc: 89 55 e0 mov %edx,-0x20(%ebp) 110eff: e8 dc fe ff ff call 110de0 if ( !p ) 110f04: 85 c0 test %eax,%eax 110f06: 8b 55 e0 mov -0x20(%ebp),%edx 110f09: 0f 84 75 ff ff ff je 110e84 <== NEVER TAKEN return 0; info->doubly_indirect = p; 110f0f: 89 43 5c mov %eax,0x5c(%ebx) 110f12: e9 4f ff ff ff jmp 110e66 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 110f17: 89 55 e0 mov %edx,-0x20(%ebp) 110f1a: e8 c1 fe ff ff call 110de0 if ( !p1 ) 110f1f: 85 c0 test %eax,%eax 110f21: 8b 55 e0 mov -0x20(%ebp),%edx 110f24: 0f 84 5a ff ff ff je 110e84 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 110f2a: 89 03 mov %eax,(%ebx) 110f2c: e9 42 ff ff ff jmp 110e73 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 110f31: 85 c9 test %ecx,%ecx 110f33: 0f 84 4b ff ff ff je 110e84 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 110f39: 8b 04 81 mov (%ecx,%eax,4),%eax if ( !p1 ) 110f3c: 85 c0 test %eax,%eax 110f3e: 0f 84 40 ff ff ff je 110e84 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 110f44: 8b 14 90 mov (%eax,%edx,4),%edx if ( !p2 ) return 0; 110f47: 31 c0 xor %eax,%eax p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 110f49: 85 d2 test %edx,%edx 110f4b: 75 84 jne 110ed1 <== ALWAYS TAKEN 110f4d: e9 24 ff ff ff jmp 110e76 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110f52: 89 55 e0 mov %edx,-0x20(%ebp) 110f55: e8 86 fe ff ff call 110de0 110f5a: 89 c1 mov %eax,%ecx if ( !p ) return 0; 110f5c: 31 c0 xor %eax,%eax p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 110f5e: 85 c9 test %ecx,%ecx 110f60: 8b 55 e0 mov -0x20(%ebp),%edx 110f63: 0f 84 0d ff ff ff je 110e76 <== NEVER TAKEN return 0; info->triply_indirect = p; 110f69: 89 4b 60 mov %ecx,0x60(%ebx) 110f6c: e9 46 ff ff ff jmp 110eb7 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 110f71: e8 6a fe ff ff call 110de0 110f76: 89 c2 mov %eax,%edx if ( !p2 ) return 0; 110f78: 31 c0 xor %eax,%eax } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 110f7a: 85 d2 test %edx,%edx 110f7c: 0f 84 f4 fe ff ff je 110e76 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 110f82: 89 13 mov %edx,(%ebx) 110f84: e9 48 ff ff ff jmp 110ed1 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 110f89: 89 55 e0 mov %edx,-0x20(%ebp) 110f8c: e8 4f fe ff ff call 110de0 110f91: 89 c1 mov %eax,%ecx if ( !p1 ) return 0; 110f93: 31 c0 xor %eax,%eax } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 110f95: 85 c9 test %ecx,%ecx 110f97: 8b 55 e0 mov -0x20(%ebp),%edx 110f9a: 0f 84 d6 fe ff ff je 110e76 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 110fa0: 89 0b mov %ecx,(%ebx) 110fa2: e9 1d ff ff ff jmp 110ec4 =============================================================================== 00110fa8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 110fa8: 55 push %ebp 110fa9: 89 e5 mov %esp,%ebp 110fab: 57 push %edi 110fac: 56 push %esi 110fad: 53 push %ebx 110fae: 83 ec 3c sub $0x3c,%esp 110fb1: 8b 75 0c mov 0xc(%ebp),%esi 110fb4: 8b 7d 10 mov 0x10(%ebp),%edi * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 110fb7: 8b 45 08 mov 0x8(%ebp),%eax 110fba: 83 78 4c 06 cmpl $0x6,0x4c(%eax) 110fbe: 0f 84 60 01 00 00 je 111124 /* * 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; 110fc4: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 110fc6: 8b 55 08 mov 0x8(%ebp),%edx 110fc9: 8b 4a 50 mov 0x50(%edx),%ecx /* * 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; 110fcc: 8b 5d 18 mov 0x18(%ebp),%ebx 110fcf: 01 f3 add %esi,%ebx 110fd1: 89 5d d0 mov %ebx,-0x30(%ebp) if ( last_byte > the_jnode->info.file.size ) 110fd4: 31 d2 xor %edx,%edx 110fd6: 8b 5d 08 mov 0x8(%ebp),%ebx 110fd9: 3b 53 54 cmp 0x54(%ebx),%edx 110fdc: 0f 8d d2 00 00 00 jge 1110b4 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 110fe2: 8b 45 18 mov 0x18(%ebp),%eax 110fe5: 89 45 cc mov %eax,-0x34(%ebp) */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 110fe8: 8b 15 80 4f 12 00 mov 0x124f80,%edx 110fee: 89 55 d0 mov %edx,-0x30(%ebp) 110ff1: 89 d0 mov %edx,%eax 110ff3: 99 cltd 110ff4: 89 d3 mov %edx,%ebx 110ff6: 52 push %edx 110ff7: 50 push %eax 110ff8: 57 push %edi 110ff9: 56 push %esi 110ffa: 89 45 c0 mov %eax,-0x40(%ebp) 110ffd: e8 2a c3 00 00 call 11d32c <__moddi3> 111002: 83 c4 10 add $0x10,%esp 111005: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111008: 8b 4d c0 mov -0x40(%ebp),%ecx 11100b: 53 push %ebx 11100c: 51 push %ecx 11100d: 57 push %edi 11100e: 56 push %esi 11100f: e8 cc c1 00 00 call 11d1e0 <__divdi3> 111014: 83 c4 10 add $0x10,%esp 111017: 89 c3 mov %eax,%ebx if ( start_offset ) { 111019: 8b 7d c8 mov -0x38(%ebp),%edi 11101c: 85 ff test %edi,%edi 11101e: 0f 84 a0 00 00 00 je 1110c4 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 ); 111024: 56 push %esi 111025: 6a 00 push $0x0 111027: 50 push %eax 111028: ff 75 08 pushl 0x8(%ebp) 11102b: e8 d4 fd ff ff call 110e04 if ( !block_ptr ) 111030: 83 c4 10 add $0x10,%esp 111033: 85 c0 test %eax,%eax 111035: 0f 84 65 01 00 00 je 1111a0 <== NEVER TAKEN * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11103b: 8b 4d d0 mov -0x30(%ebp),%ecx 11103e: 2b 4d c8 sub -0x38(%ebp),%ecx 111041: 8b 55 cc mov -0x34(%ebp),%edx 111044: 39 ca cmp %ecx,%edx 111046: 0f 87 3c 01 00 00 ja 111188 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; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 11104c: 8b 75 c8 mov -0x38(%ebp),%esi 11104f: 03 30 add (%eax),%esi dest += to_copy; 111051: 8b 7d 14 mov 0x14(%ebp),%edi 111054: 89 d1 mov %edx,%ecx 111056: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111058: 89 7d c8 mov %edi,-0x38(%ebp) block++; 11105b: 43 inc %ebx my_length -= to_copy; 11105c: 29 55 cc sub %edx,-0x34(%ebp) 11105f: a1 80 4f 12 00 mov 0x124f80,%eax 111064: 89 45 d0 mov %eax,-0x30(%ebp) copied += to_copy; 111067: 89 55 c4 mov %edx,-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 ) { 11106a: 8b 4d d0 mov -0x30(%ebp),%ecx 11106d: 39 4d cc cmp %ecx,-0x34(%ebp) 111070: 73 24 jae 111096 111072: eb 60 jmp 1110d4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 111074: 8b 30 mov (%eax),%esi 111076: 8b 7d c8 mov -0x38(%ebp),%edi 111079: 8b 4d d0 mov -0x30(%ebp),%ecx 11107c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 11107e: 89 7d c8 mov %edi,-0x38(%ebp) block++; 111081: 43 inc %ebx my_length -= to_copy; 111082: 8b 7d d0 mov -0x30(%ebp),%edi 111085: 29 7d cc sub %edi,-0x34(%ebp) copied += to_copy; 111088: 01 7d c4 add %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 ) { 11108b: 8b 45 cc mov -0x34(%ebp),%eax 11108e: 39 05 80 4f 12 00 cmp %eax,0x124f80 111094: 77 3e ja 1110d4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111096: 51 push %ecx 111097: 6a 00 push $0x0 111099: 53 push %ebx 11109a: ff 75 08 pushl 0x8(%ebp) 11109d: e8 62 fd ff ff call 110e04 if ( !block_ptr ) 1110a2: 83 c4 10 add $0x10,%esp 1110a5: 85 c0 test %eax,%eax 1110a7: 75 cb jne 111074 <== ALWAYS TAKEN IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 1110a9: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 1110ac: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1110af: 5b pop %ebx <== NOT EXECUTED 1110b0: 5e pop %esi <== NOT EXECUTED 1110b1: 5f pop %edi <== NOT EXECUTED 1110b2: c9 leave <== NOT EXECUTED 1110b3: c3 ret <== NOT EXECUTED /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 1110b4: 0f 8e be 00 00 00 jle 111178 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 1110ba: 29 c1 sub %eax,%ecx 1110bc: 89 4d cc mov %ecx,-0x34(%ebp) 1110bf: e9 24 ff ff ff jmp 110fe8 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 1110c4: 8b 55 14 mov 0x14(%ebp),%edx 1110c7: 89 55 c8 mov %edx,-0x38(%ebp) */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 1110ca: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1110d1: eb 97 jmp 11106a 1110d3: 90 nop <== NOT EXECUTED /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 1110d4: 8b 55 cc mov -0x34(%ebp),%edx 1110d7: 85 d2 test %edx,%edx 1110d9: 74 23 je 1110fe block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1110db: 50 push %eax 1110dc: 6a 00 push $0x0 1110de: 53 push %ebx 1110df: ff 75 08 pushl 0x8(%ebp) 1110e2: e8 1d fd ff ff call 110e04 if ( !block_ptr ) 1110e7: 83 c4 10 add $0x10,%esp 1110ea: 85 c0 test %eax,%eax 1110ec: 74 bb je 1110a9 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 1110ee: 8b 30 mov (%eax),%esi 1110f0: 8b 7d c8 mov -0x38(%ebp),%edi 1110f3: 8b 4d cc mov -0x34(%ebp),%ecx 1110f6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 1110f8: 8b 55 cc mov -0x34(%ebp),%edx 1110fb: 01 55 c4 add %edx,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 1110fe: 83 ec 08 sub $0x8,%esp 111101: 6a 00 push $0x0 111103: 8d 45 e0 lea -0x20(%ebp),%eax 111106: 50 push %eax 111107: e8 04 70 ff ff call 108110 11110c: 8b 45 e0 mov -0x20(%ebp),%eax 11110f: 8b 4d 08 mov 0x8(%ebp),%ecx 111112: 89 41 40 mov %eax,0x40(%ecx) return copied; 111115: 8b 45 c4 mov -0x3c(%ebp),%eax 111118: 83 c4 10 add $0x10,%esp } 11111b: 8d 65 f4 lea -0xc(%ebp),%esp 11111e: 5b pop %ebx 11111f: 5e pop %esi 111120: 5f pop %edi 111121: c9 leave 111122: c3 ret 111123: 90 nop <== NOT EXECUTED my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 111124: 8b 50 58 mov 0x58(%eax),%edx 111127: 89 55 cc mov %edx,-0x34(%ebp) if (my_length > (the_jnode->info.linearfile.size - start)) 11112a: 89 c1 mov %eax,%ecx 11112c: 8b 40 50 mov 0x50(%eax),%eax 11112f: 8b 51 54 mov 0x54(%ecx),%edx 111132: 89 c1 mov %eax,%ecx 111134: 89 d3 mov %edx,%ebx 111136: 29 f1 sub %esi,%ecx 111138: 19 fb sbb %edi,%ebx 11113a: 89 4d d0 mov %ecx,-0x30(%ebp) 11113d: 89 5d d4 mov %ebx,-0x2c(%ebp) 111140: 31 c9 xor %ecx,%ecx 111142: 39 d9 cmp %ebx,%ecx 111144: 7d 4a jge 111190 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 111146: 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); 111149: 03 75 cc add -0x34(%ebp),%esi 11114c: 8b 7d 14 mov 0x14(%ebp),%edi 11114f: 89 d9 mov %ebx,%ecx 111151: f3 a4 rep movsb %ds:(%esi),%es:(%edi) IMFS_update_atime( the_jnode ); 111153: 83 ec 08 sub $0x8,%esp 111156: 6a 00 push $0x0 111158: 8d 45 e0 lea -0x20(%ebp),%eax 11115b: 50 push %eax 11115c: e8 af 6f ff ff call 108110 111161: 8b 45 e0 mov -0x20(%ebp),%eax 111164: 8b 7d 08 mov 0x8(%ebp),%edi 111167: 89 47 40 mov %eax,0x40(%edi) return my_length; 11116a: 89 d8 mov %ebx,%eax 11116c: 83 c4 10 add $0x10,%esp } IMFS_update_atime( the_jnode ); return copied; } 11116f: 8d 65 f4 lea -0xc(%ebp),%esp 111172: 5b pop %ebx 111173: 5e pop %esi 111174: 5f pop %edi 111175: c9 leave 111176: c3 ret 111177: 90 nop <== NOT EXECUTED /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 111178: 39 4d d0 cmp %ecx,-0x30(%ebp) 11117b: 0f 86 61 fe ff ff jbe 110fe2 111181: e9 34 ff ff ff jmp 1110ba 111186: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 111188: 89 ca mov %ecx,%edx 11118a: e9 bd fe ff ff jmp 11104c 11118f: 90 nop <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 111190: 7f 08 jg 11119a <== NEVER TAKEN 111192: 8b 5d d0 mov -0x30(%ebp),%ebx 111195: 39 5d 18 cmp %ebx,0x18(%ebp) 111198: 76 ac jbe 111146 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 11119a: 89 c3 mov %eax,%ebx 11119c: 29 f3 sub %esi,%ebx 11119e: eb a9 jmp 111149 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; 1111a0: 31 c0 xor %eax,%eax <== NOT EXECUTED 1111a2: e9 05 ff ff ff jmp 1110ac <== NOT EXECUTED =============================================================================== 00111280 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 111280: 55 push %ebp 111281: 89 e5 mov %esp,%ebp 111283: 57 push %edi 111284: 56 push %esi 111285: 53 push %ebx 111286: 83 ec 1c sub $0x1c,%esp /* * 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; 111289: 8b 3d 80 4f 12 00 mov 0x124f80,%edi 11128f: c1 ef 02 shr $0x2,%edi * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 111292: 8b 45 08 mov 0x8(%ebp),%eax 111295: 8b 50 58 mov 0x58(%eax),%edx 111298: 85 d2 test %edx,%edx 11129a: 74 10 je 1112ac memfile_free_blocks_in_table( &info->indirect, to_free ); 11129c: 83 ec 08 sub $0x8,%esp 11129f: 57 push %edi 1112a0: 83 c0 58 add $0x58,%eax 1112a3: 50 push %eax 1112a4: e8 7b ff ff ff call 111224 1112a9: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 1112ac: 8b 4d 08 mov 0x8(%ebp),%ecx 1112af: 8b 51 5c mov 0x5c(%ecx),%edx 1112b2: 85 d2 test %edx,%edx 1112b4: 74 55 je 11130b for ( i=0 ; i<== NEVER TAKEN 1112c2: 31 c9 xor %ecx,%ecx 1112c4: 31 db xor %ebx,%ebx 1112c6: 8b 75 08 mov 0x8(%ebp),%esi 1112c9: eb 04 jmp 1112cf 1112cb: 90 nop <== NOT EXECUTED 1112cc: 8b 56 5c mov 0x5c(%esi),%edx if ( info->doubly_indirect[i] ) { 1112cf: c1 e1 02 shl $0x2,%ecx 1112d2: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) 1112d6: 74 14 je 1112ec <== NEVER TAKEN memfile_free_blocks_in_table( 1112d8: 83 ec 08 sub $0x8,%esp 1112db: 57 push %edi 1112dc: 01 ca add %ecx,%edx 1112de: 52 push %edx 1112df: e8 40 ff ff ff call 111224 1112e4: 83 c4 10 add $0x10,%esp 1112e7: a1 80 4f 12 00 mov 0x124f80,%eax 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 ); 1112f8: 83 ec 08 sub $0x8,%esp 1112fb: 57 push %edi 1112fc: 8b 45 08 mov 0x8(%ebp),%eax 1112ff: 83 c0 5c add $0x5c,%eax 111302: 50 push %eax 111303: e8 1c ff ff ff call 111224 111308: 83 c4 10 add $0x10,%esp } if ( info->triply_indirect ) { 11130b: 8b 45 08 mov 0x8(%ebp),%eax 11130e: 8b 50 60 mov 0x60(%eax),%edx 111311: 85 d2 test %edx,%edx 111313: 0f 84 b6 00 00 00 je 1113cf for ( i=0 ; i<== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 111329: 8b 32 mov (%edx),%esi if ( !p ) /* ensure we have a valid pointer */ 11132b: 85 f6 test %esi,%esi 11132d: 0f 84 89 00 00 00 je 1113bc <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111333: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( !p ) /* ensure we have a valid pointer */ 11133a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111341: 8d 76 00 lea 0x0(%esi),%esi break; for ( j=0 ; j<== NEVER TAKEN 11134b: 31 d2 xor %edx,%edx 11134d: 31 db xor %ebx,%ebx 11134f: 90 nop if ( p[j] ) { 111350: c1 e2 02 shl $0x2,%edx 111353: 8b 0c 16 mov (%esi,%edx,1),%ecx 111356: 85 c9 test %ecx,%ecx 111358: 74 15 je 11136f <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 11135a: 83 ec 08 sub $0x8,%esp 11135d: 57 push %edi 11135e: 8d 14 16 lea (%esi,%edx,1),%edx 111361: 52 push %edx 111362: e8 bd fe ff ff call 111224 111367: 83 c4 10 add $0x10,%esp 11136a: a1 80 4f 12 00 mov 0x124f80,%eax 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( 11137b: 83 ec 08 sub $0x8,%esp 11137e: 57 push %edi 11137f: 8b 45 e0 mov -0x20(%ebp),%eax 111382: 8b 4d 08 mov 0x8(%ebp),%ecx 111385: 03 41 60 add 0x60(%ecx),%eax 111388: 50 push %eax 111389: e8 96 fe ff ff call 111224 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 1113a3: 8b 55 e4 mov -0x1c(%ebp),%edx 1113a6: c1 e2 02 shl $0x2,%edx 1113a9: 89 55 e0 mov %edx,-0x20(%ebp) } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 1113ac: 8b 4d 08 mov 0x8(%ebp),%ecx 1113af: 8b 51 60 mov 0x60(%ecx),%edx 1113b2: 8b 4d e0 mov -0x20(%ebp),%ecx 1113b5: 8b 34 0a mov (%edx,%ecx,1),%esi if ( !p ) /* ensure we have a valid pointer */ 1113b8: 85 f6 test %esi,%esi 1113ba: 75 88 jne 111344 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 1113bc: 83 ec 08 sub $0x8,%esp 1113bf: 57 push %edi (block_p **)&info->triply_indirect, to_free ); 1113c0: 8b 45 08 mov 0x8(%ebp),%eax 1113c3: 83 c0 60 add $0x60,%eax } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 1113c6: 50 push %eax 1113c7: e8 58 fe ff ff call 111224 1113cc: 83 c4 10 add $0x10,%esp (block_p **)&info->triply_indirect, to_free ); } return 0; } 1113cf: 31 c0 xor %eax,%eax 1113d1: 8d 65 f4 lea -0xc(%ebp),%esp 1113d4: 5b pop %ebx 1113d5: 5e pop %esi 1113d6: 5f pop %edi 1113d7: c9 leave 1113d8: c3 ret =============================================================================== 00111520 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 111520: 55 push %ebp 111521: 89 e5 mov %esp,%ebp 111523: 57 push %edi 111524: 56 push %esi 111525: 53 push %ebx 111526: 83 ec 3c sub $0x3c,%esp 111529: 8b 5d 0c mov 0xc(%ebp),%ebx 11152c: 8b 75 10 mov 0x10(%ebp),%esi /* * 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; 11152f: 8b 4d 18 mov 0x18(%ebp),%ecx 111532: 01 d9 add %ebx,%ecx if ( last_byte > the_jnode->info.file.size ) { 111534: 89 c8 mov %ecx,%eax 111536: 31 d2 xor %edx,%edx 111538: 8b 7d 08 mov 0x8(%ebp),%edi 11153b: 3b 57 54 cmp 0x54(%edi),%edx 11153e: 7c 1c jl 11155c <== NEVER TAKEN 111540: 0f 8e f2 00 00 00 jle 111638 <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 111546: 51 push %ecx 111547: 52 push %edx 111548: 50 push %eax 111549: ff 75 08 pushl 0x8(%ebp) 11154c: e8 b7 fe ff ff call 111408 if ( status ) 111551: 83 c4 10 add $0x10,%esp 111554: 85 c0 test %eax,%eax 111556: 0f 85 5a 01 00 00 jne 1116b6 <== NEVER TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11155c: a1 80 4f 12 00 mov 0x124f80,%eax 111561: 89 45 d4 mov %eax,-0x2c(%ebp) 111564: 99 cltd 111565: 89 45 c8 mov %eax,-0x38(%ebp) 111568: 89 55 cc mov %edx,-0x34(%ebp) 11156b: 52 push %edx 11156c: 50 push %eax 11156d: 56 push %esi 11156e: 53 push %ebx 11156f: e8 b8 bd 00 00 call 11d32c <__moddi3> 111574: 83 c4 10 add $0x10,%esp 111577: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111579: ff 75 cc pushl -0x34(%ebp) 11157c: ff 75 c8 pushl -0x38(%ebp) 11157f: 56 push %esi 111580: 53 push %ebx 111581: e8 5a bc 00 00 call 11d1e0 <__divdi3> 111586: 83 c4 10 add $0x10,%esp 111589: 89 c3 mov %eax,%ebx if ( start_offset ) { 11158b: 85 ff test %edi,%edi 11158d: 75 5d jne 1115ec unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 11158f: 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 ) { 111592: 8b 55 18 mov 0x18(%ebp),%edx status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 111595: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 11159c: 3b 55 d4 cmp -0x2c(%ebp),%edx 11159f: 73 26 jae 1115c7 1115a1: e9 a2 00 00 00 jmp 111648 1115a6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1115a8: 8b 00 mov (%eax),%eax src += to_copy; 1115aa: 89 c7 mov %eax,%edi 1115ac: 8b 4d d4 mov -0x2c(%ebp),%ecx 1115af: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1115b1: 43 inc %ebx my_length -= to_copy; 1115b2: 2b 55 d4 sub -0x2c(%ebp),%edx * 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( 1115b5: 8b 45 d4 mov -0x2c(%ebp),%eax 1115b8: 01 45 c8 add %eax,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1115bb: 39 15 80 4f 12 00 cmp %edx,0x124f80 1115c1: 0f 87 81 00 00 00 ja 111648 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1115c7: 57 push %edi 1115c8: 6a 00 push $0x0 1115ca: 53 push %ebx 1115cb: ff 75 08 pushl 0x8(%ebp) 1115ce: 89 55 c4 mov %edx,-0x3c(%ebp) 1115d1: e8 2e f8 ff ff call 110e04 if ( !block_ptr ) 1115d6: 83 c4 10 add $0x10,%esp 1115d9: 85 c0 test %eax,%eax 1115db: 8b 55 c4 mov -0x3c(%ebp),%edx 1115de: 75 c8 jne 1115a8 <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } 1115e0: 8b 45 c8 mov -0x38(%ebp),%eax 1115e3: 8d 65 f4 lea -0xc(%ebp),%esp 1115e6: 5b pop %ebx 1115e7: 5e pop %esi 1115e8: 5f pop %edi 1115e9: c9 leave 1115ea: c3 ret 1115eb: 90 nop <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1115ec: 50 push %eax 1115ed: 6a 00 push $0x0 1115ef: 53 push %ebx 1115f0: ff 75 08 pushl 0x8(%ebp) 1115f3: e8 0c f8 ff ff call 110e04 if ( !block_ptr ) 1115f8: 83 c4 10 add $0x10,%esp 1115fb: 85 c0 test %eax,%eax 1115fd: 0f 84 a1 00 00 00 je 1116a4 <== NEVER TAKEN * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 111603: 8b 55 d4 mov -0x2c(%ebp),%edx 111606: 29 fa sub %edi,%edx 111608: 89 55 c8 mov %edx,-0x38(%ebp) 11160b: 8b 55 18 mov 0x18(%ebp),%edx 11160e: 39 55 c8 cmp %edx,-0x38(%ebp) 111611: 0f 87 85 00 00 00 ja 11169c block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 111617: 03 38 add (%eax),%edi src += to_copy; 111619: 8b 75 14 mov 0x14(%ebp),%esi 11161c: 8b 4d c8 mov -0x38(%ebp),%ecx 11161f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111621: 43 inc %ebx my_length -= to_copy; 111622: 8b 55 18 mov 0x18(%ebp),%edx 111625: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 111628: 8b 3d 80 4f 12 00 mov 0x124f80,%edi 11162e: 89 7d d4 mov %edi,-0x2c(%ebp) 111631: e9 66 ff ff ff jmp 11159c 111636: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 111638: 3b 4f 50 cmp 0x50(%edi),%ecx 11163b: 0f 86 1b ff ff ff jbe 11155c <== NEVER TAKEN 111641: e9 00 ff ff ff jmp 111546 111646: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ) { 111648: 85 d2 test %edx,%edx 11164a: 74 28 je 111674 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11164c: 51 push %ecx 11164d: 6a 00 push $0x0 11164f: 53 push %ebx 111650: ff 75 08 pushl 0x8(%ebp) 111653: 89 55 c4 mov %edx,-0x3c(%ebp) 111656: e8 a9 f7 ff ff call 110e04 if ( !block_ptr ) 11165b: 83 c4 10 add $0x10,%esp 11165e: 85 c0 test %eax,%eax 111660: 8b 55 c4 mov -0x3c(%ebp),%edx 111663: 0f 84 77 ff ff ff je 1115e0 <== 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 ); 111669: 8b 00 mov (%eax),%eax 11166b: 89 c7 mov %eax,%edi 11166d: 89 d1 mov %edx,%ecx 11166f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 111671: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 111674: 83 ec 08 sub $0x8,%esp 111677: 6a 00 push $0x0 111679: 8d 45 e0 lea -0x20(%ebp),%eax 11167c: 50 push %eax 11167d: e8 8e 6a ff ff call 108110 111682: 8b 45 e0 mov -0x20(%ebp),%eax 111685: 8b 55 08 mov 0x8(%ebp),%edx 111688: 89 42 44 mov %eax,0x44(%edx) 11168b: 89 42 48 mov %eax,0x48(%edx) return copied; 11168e: 83 c4 10 add $0x10,%esp } 111691: 8b 45 c8 mov -0x38(%ebp),%eax 111694: 8d 65 f4 lea -0xc(%ebp),%esp 111697: 5b pop %ebx 111698: 5e pop %esi 111699: 5f pop %edi 11169a: c9 leave 11169b: c3 ret * 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 ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11169c: 89 55 c8 mov %edx,-0x38(%ebp) 11169f: e9 73 ff ff ff jmp 111617 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; 1116a4: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 1116ab: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 1116ae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1116b1: 5b pop %ebx <== NOT EXECUTED 1116b2: 5e pop %esi <== NOT EXECUTED 1116b3: 5f pop %edi <== NOT EXECUTED 1116b4: c9 leave <== NOT EXECUTED 1116b5: c3 ret <== NOT EXECUTED last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 1116b6: e8 f5 0b 00 00 call 1122b0 <__errno> 1116bb: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1116c1: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) 1116c8: e9 13 ff ff ff jmp 1115e0 =============================================================================== 0010799c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10799c: 55 push %ebp 10799d: 89 e5 mov %esp,%ebp 10799f: 57 push %edi 1079a0: 56 push %esi 1079a1: 53 push %ebx 1079a2: 83 ec 5c sub $0x5c,%esp 1079a5: 8b 55 08 mov 0x8(%ebp),%edx 1079a8: 8b 5d 0c mov 0xc(%ebp),%ebx 1079ab: 8b 75 10 mov 0x10(%ebp),%esi 1079ae: 8b 45 14 mov 0x14(%ebp),%eax 1079b1: 89 45 a4 mov %eax,-0x5c(%ebp) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 1079b4: 31 c0 xor %eax,%eax 1079b6: b9 ff ff ff ff mov $0xffffffff,%ecx 1079bb: 89 d7 mov %edx,%edi 1079bd: f2 ae repnz scas %es:(%edi),%al 1079bf: f7 d1 not %ecx 1079c1: 49 dec %ecx 1079c2: 8d 45 e4 lea -0x1c(%ebp),%eax 1079c5: 50 push %eax 1079c6: 8d 7d af lea -0x51(%ebp),%edi 1079c9: 57 push %edi 1079ca: 51 push %ecx 1079cb: 52 push %edx 1079cc: e8 ab 7c 00 00 call 10f67c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 1079d1: 89 d8 mov %ebx,%eax 1079d3: 25 00 f0 00 00 and $0xf000,%eax 1079d8: 83 c4 10 add $0x10,%esp 1079db: 3d 00 40 00 00 cmp $0x4000,%eax 1079e0: 74 56 je 107a38 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 1079e2: 3d 00 80 00 00 cmp $0x8000,%eax 1079e7: 74 57 je 107a40 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1079e9: 3d 00 60 00 00 cmp $0x6000,%eax 1079ee: 74 14 je 107a04 1079f0: 3d 00 20 00 00 cmp $0x2000,%eax 1079f5: 74 0d je 107a04 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 1079f7: 3d 00 10 00 00 cmp $0x1000,%eax 1079fc: 74 4a je 107a48 <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 1079fe: 31 d2 xor %edx,%edx <== NOT EXECUTED 107a00: eb 10 jmp 107a12 <== NOT EXECUTED 107a02: 66 90 xchg %ax,%ax <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 107a04: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107a07: 8b 45 a4 mov -0x5c(%ebp),%eax 107a0a: 89 45 d4 mov %eax,-0x2c(%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; 107a0d: ba 02 00 00 00 mov $0x2,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); 107a12: 83 ec 0c sub $0xc,%esp 107a15: 8d 45 d0 lea -0x30(%ebp),%eax 107a18: 50 push %eax 107a19: 53 push %ebx 107a1a: 57 push %edi 107a1b: 52 push %edx 107a1c: ff 75 18 pushl 0x18(%ebp) 107a1f: e8 c4 72 00 00 call 10ece8 if ( !new_node ) 107a24: 83 c4 20 add $0x20,%esp 107a27: 85 c0 test %eax,%eax 107a29: 74 24 je 107a4f rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 107a2b: 31 c0 xor %eax,%eax } 107a2d: 8d 65 f4 lea -0xc(%ebp),%esp 107a30: 5b pop %ebx 107a31: 5e pop %esi 107a32: 5f pop %edi 107a33: c9 leave 107a34: c3 ret 107a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 107a38: ba 01 00 00 00 mov $0x1,%edx 107a3d: eb d3 jmp 107a12 107a3f: 90 nop <== NOT EXECUTED else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 107a40: ba 05 00 00 00 mov $0x5,%edx 107a45: eb cb jmp 107a12 107a47: 90 nop <== NOT EXECUTED else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; 107a48: ba 07 00 00 00 mov $0x7,%edx 107a4d: eb c3 jmp 107a12 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107a4f: e8 5c a8 00 00 call 1122b0 <__errno> 107a54: c7 00 0c 00 00 00 movl $0xc,(%eax) 107a5a: b8 ff ff ff ff mov $0xffffffff,%eax 107a5f: eb cc jmp 107a2d =============================================================================== 00107a64 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107a64: 55 push %ebp 107a65: 89 e5 mov %esp,%ebp 107a67: 83 ec 08 sub $0x8,%esp 107a6a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107a6d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107a70: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107a74: 75 0a jne 107a80 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107a76: 89 50 5c mov %edx,0x5c(%eax) return 0; 107a79: 31 c0 xor %eax,%eax } 107a7b: c9 leave 107a7c: c3 ret 107a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107a80: e8 2b a8 00 00 call 1122b0 <__errno> <== NOT EXECUTED 107a85: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107a8b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107a90: c9 leave <== NOT EXECUTED 107a91: c3 ret <== NOT EXECUTED =============================================================================== 0010a380 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 10a380: 55 push %ebp 10a381: 89 e5 mov %esp,%ebp 10a383: 53 push %ebx 10a384: 83 ec 0c sub $0xc,%esp 10a387: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 10a38a: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a38f: ff 70 08 pushl 0x8(%eax) 10a392: 8d 43 0c lea 0xc(%ebx),%eax 10a395: 50 push %eax 10a396: e8 21 c6 00 00 call 1169bc switch( the_jnode->type ) { 10a39b: 8b 43 4c mov 0x4c(%ebx),%eax 10a39e: 83 c4 10 add $0x10,%esp 10a3a1: 83 f8 07 cmp $0x7,%eax 10a3a4: 76 1e jbe 10a3c4 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 10a3a6: 52 push %edx <== NOT EXECUTED 10a3a7: 50 push %eax <== NOT EXECUTED 10a3a8: 68 a4 58 12 00 push $0x1258a4 <== NOT EXECUTED 10a3ad: a1 e0 a8 12 00 mov 0x12a8e0,%eax <== NOT EXECUTED 10a3b2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10a3b5: e8 f6 c4 00 00 call 1168b0 <== NOT EXECUTED return; 10a3ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } puts(""); } 10a3bd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10a3c0: c9 leave <== NOT EXECUTED 10a3c1: c3 ret <== NOT EXECUTED 10a3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 10a3c4: ff 24 85 bc 58 12 00 jmp *0x1258bc(,%eax,4) 10a3cb: 90 nop <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 10a3cc: a1 e0 a8 12 00 mov 0x12a8e0,%eax <== NOT EXECUTED 10a3d1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10a3d4: 6a 13 push $0x13 <== NOT EXECUTED 10a3d6: 6a 01 push $0x1 <== NOT EXECUTED 10a3d8: 68 7d 58 12 00 push $0x12587d <== NOT EXECUTED 10a3dd: e8 fa d1 00 00 call 1175dc <== NOT EXECUTED return; 10a3e2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 10a3e5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10a3e8: c9 leave <== NOT EXECUTED 10a3e9: c3 ret <== NOT EXECUTED 10a3ea: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 10a3ec: a1 e0 a8 12 00 mov 0x12a8e0,%eax <== NOT EXECUTED 10a3f1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10a3f4: 6a 12 push $0x12 <== NOT EXECUTED 10a3f6: 6a 01 push $0x1 <== NOT EXECUTED 10a3f8: 68 91 58 12 00 push $0x125891 <== NOT EXECUTED 10a3fd: e8 da d1 00 00 call 1175dc <== NOT EXECUTED return; 10a402: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 10a405: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10a408: c9 leave <== NOT EXECUTED 10a409: c3 ret <== NOT EXECUTED 10a40a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 10a40c: 51 push %ecx 10a40d: ff 73 50 pushl 0x50(%ebx) 10a410: 68 71 58 12 00 push $0x125871 10a415: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a41a: ff 70 08 pushl 0x8(%eax) 10a41d: e8 8e c4 00 00 call 1168b0 (uint32_t)the_jnode->info.file.size ); #endif break; 10a422: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a425: c7 45 08 a9 5b 12 00 movl $0x125ba9,0x8(%ebp) } 10a42c: 8b 5d fc mov -0x4(%ebp),%ebx 10a42f: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a430: e9 a3 dd 00 00 jmp 1181d8 10a435: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 10a438: ff 73 58 pushl 0x58(%ebx) 10a43b: ff 73 50 pushl 0x50(%ebx) 10a43e: 68 62 58 12 00 push $0x125862 10a443: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a448: ff 70 08 pushl 0x8(%eax) 10a44b: e8 60 c4 00 00 call 1168b0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 10a450: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a453: c7 45 08 a9 5b 12 00 movl $0x125ba9,0x8(%ebp) } 10a45a: 8b 5d fc mov -0x4(%ebp),%ebx 10a45d: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a45e: e9 75 dd 00 00 jmp 1181d8 10a463: 90 nop <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 10a464: 83 ec 08 sub $0x8,%esp 10a467: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a46c: ff 70 08 pushl 0x8(%eax) 10a46f: 6a 2f push $0x2f 10a471: e8 9a c4 00 00 call 116910 break; 10a476: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a479: c7 45 08 a9 5b 12 00 movl $0x125ba9,0x8(%ebp) } 10a480: 8b 5d fc mov -0x4(%ebp),%ebx 10a483: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a484: e9 4f dd 00 00 jmp 1181d8 10a489: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10a48c: ff 73 54 pushl 0x54(%ebx) 10a48f: ff 73 50 pushl 0x50(%ebx) 10a492: 68 4f 58 12 00 push $0x12584f 10a497: a1 e0 a8 12 00 mov 0x12a8e0,%eax 10a49c: ff 70 08 pushl 0x8(%eax) 10a49f: e8 0c c4 00 00 call 1168b0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 10a4a4: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a4a7: c7 45 08 a9 5b 12 00 movl $0x125ba9,0x8(%ebp) } 10a4ae: 8b 5d fc mov -0x4(%ebp),%ebx 10a4b1: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10a4b2: e9 21 dd 00 00 jmp 1181d8 =============================================================================== 00107aa4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107aa4: 55 push %ebp 107aa5: 89 e5 mov %esp,%ebp 107aa7: 57 push %edi 107aa8: 56 push %esi 107aa9: 53 push %ebx 107aaa: 8b 7d 0c mov 0xc(%ebp),%edi 107aad: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 107ab0: 8b 45 08 mov 0x8(%ebp),%eax 107ab3: 8b 30 mov (%eax),%esi IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ab5: 85 db test %ebx,%ebx 107ab7: 74 28 je 107ae1 <== NEVER TAKEN 107ab9: 8b 46 50 mov 0x50(%esi),%eax 107abc: 8a 10 mov (%eax),%dl 107abe: 84 d2 test %dl,%dl 107ac0: 74 1f je 107ae1 <== NEVER TAKEN 107ac2: 31 c9 xor %ecx,%ecx 107ac4: 31 c0 xor %eax,%eax 107ac6: eb 0a jmp 107ad2 107ac8: 8b 56 50 mov 0x50(%esi),%edx 107acb: 8a 14 02 mov (%edx,%eax,1),%dl 107ace: 84 d2 test %dl,%dl 107ad0: 74 0a je 107adc buf[i] = node->info.sym_link.name[i]; 107ad2: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ad5: 40 inc %eax 107ad6: 89 c1 mov %eax,%ecx 107ad8: 39 d8 cmp %ebx,%eax 107ada: 72 ec jb 107ac8 buf[i] = node->info.sym_link.name[i]; return i; } 107adc: 5b pop %ebx 107add: 5e pop %esi 107ade: 5f pop %edi 107adf: c9 leave 107ae0: c3 ret node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ae1: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ae3: eb f7 jmp 107adc <== NOT EXECUTED =============================================================================== 00107ae8 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 107ae8: 55 push %ebp 107ae9: 89 e5 mov %esp,%ebp 107aeb: 53 push %ebx 107aec: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107aef: 8b 45 0c mov 0xc(%ebp),%eax 107af2: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107af4: 6a 20 push $0x20 107af6: ff 75 14 pushl 0x14(%ebp) 107af9: 8d 43 0c lea 0xc(%ebx),%eax 107afc: 50 push %eax 107afd: e8 9a b5 00 00 call 11309c if ( the_jnode->Parent != NULL ) 107b02: 83 c4 10 add $0x10,%esp 107b05: 8b 4b 08 mov 0x8(%ebx),%ecx 107b08: 85 c9 test %ecx,%ecx 107b0a: 74 0c je 107b18 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107b0c: 83 ec 0c sub $0xc,%esp 107b0f: 53 push %ebx 107b10: e8 6f 44 00 00 call 10bf84 <_Chain_Extract> 107b15: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107b18: 8b 45 10 mov 0x10(%ebp),%eax 107b1b: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107b1d: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107b20: 83 ec 08 sub $0x8,%esp 107b23: 53 push %ebx rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); 107b24: 83 c0 50 add $0x50,%eax 107b27: 50 push %eax 107b28: e8 33 44 00 00 call 10bf60 <_Chain_Append> /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107b2d: 58 pop %eax 107b2e: 5a pop %edx 107b2f: 6a 00 push $0x0 107b31: 8d 45 f0 lea -0x10(%ebp),%eax 107b34: 50 push %eax 107b35: e8 d6 05 00 00 call 108110 107b3a: 8b 45 f0 mov -0x10(%ebp),%eax 107b3d: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107b40: 31 c0 xor %eax,%eax 107b42: 8b 5d fc mov -0x4(%ebp),%ebx 107b45: c9 leave 107b46: c3 ret =============================================================================== 0010f848 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10f848: 55 push %ebp 10f849: 89 e5 mov %esp,%ebp 10f84b: 56 push %esi 10f84c: 53 push %ebx 10f84d: 8b 4d 08 mov 0x8(%ebp),%ecx 10f850: 8b 45 0c mov 0xc(%ebp),%eax IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10f853: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10f855: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10f859: 76 15 jbe 10f870 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f85b: e8 50 2a 00 00 call 1122b0 <__errno> 10f860: c7 00 86 00 00 00 movl $0x86,(%eax) 10f866: b8 ff ff ff ff mov $0xffffffff,%eax buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 10f86b: 5b pop %ebx 10f86c: 5e pop %esi 10f86d: c9 leave 10f86e: c3 ret 10f86f: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10f870: 8b 5a 4c mov 0x4c(%edx),%ebx 10f873: ff 24 9d 38 00 12 00 jmp *0x120038(,%ebx,4) 10f87a: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10f87c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) 10f883: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 10f88a: 8b 49 10 mov 0x10(%ecx),%ecx buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10f88d: 8b 49 34 mov 0x34(%ecx),%ecx 10f890: 8b 09 mov (%ecx),%ecx /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 10f892: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10f898: 89 48 04 mov %ecx,0x4(%eax) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 10f89b: 8b 4a 30 mov 0x30(%edx),%ecx 10f89e: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10f8a1: 8b 4a 34 mov 0x34(%edx),%ecx 10f8a4: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10f8a8: 8b 4a 38 mov 0x38(%edx),%ecx 10f8ab: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10f8ae: 8b 4a 3c mov 0x3c(%edx),%ecx 10f8b1: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10f8b5: 66 8b 4a 3e mov 0x3e(%edx),%cx 10f8b9: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10f8bd: 8b 4a 40 mov 0x40(%edx),%ecx 10f8c0: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10f8c3: 8b 4a 44 mov 0x44(%edx),%ecx 10f8c6: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10f8c9: 8b 52 48 mov 0x48(%edx),%edx 10f8cc: 89 50 38 mov %edx,0x38(%eax) return 0; 10f8cf: 31 c0 xor %eax,%eax } 10f8d1: 5b pop %ebx 10f8d2: 5e pop %esi 10f8d3: c9 leave 10f8d4: c3 ret 10f8d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10f8d8: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10f8db: 8b 72 50 mov 0x50(%edx),%esi 10f8de: 89 70 18 mov %esi,0x18(%eax) 10f8e1: 89 58 1c mov %ebx,0x1c(%eax) break; 10f8e4: eb a4 jmp 10f88a 10f8e6: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10f8e8: 8b 5a 50 mov 0x50(%edx),%ebx 10f8eb: 8b 72 54 mov 0x54(%edx),%esi 10f8ee: 89 58 20 mov %ebx,0x20(%eax) 10f8f1: 89 70 24 mov %esi,0x24(%eax) break; 10f8f4: eb 94 jmp 10f88a =============================================================================== 00107bdc : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107bdc: 55 push %ebp 107bdd: 89 e5 mov %esp,%ebp 107bdf: 57 push %edi 107be0: 56 push %esi 107be1: 53 push %ebx 107be2: 83 ec 3c sub $0x3c,%esp 107be5: 8b 5d 0c mov 0xc(%ebp),%ebx IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107be8: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 107bea: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 107bee: 74 18 je 107c08 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107bf0: 83 ec 08 sub $0x8,%esp 107bf3: 8b 43 08 mov 0x8(%ebx),%eax 107bf6: 53 push %ebx 107bf7: ff 75 08 pushl 0x8(%ebp) 107bfa: ff 50 34 call *0x34(%eax) return result; 107bfd: 83 c4 10 add $0x10,%esp } 107c00: 8d 65 f4 lea -0xc(%ebp),%esp 107c03: 5b pop %ebx 107c04: 5e pop %esi 107c05: 5f pop %edi 107c06: c9 leave 107c07: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 107c08: 8b 42 50 mov 0x50(%edx),%eax 107c0b: 85 c0 test %eax,%eax 107c0d: 74 79 je 107c88 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 107c0f: 8d 7d cc lea -0x34(%ebp),%edi 107c12: b9 05 00 00 00 mov $0x5,%ecx 107c17: 89 de mov %ebx,%esi 107c19: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 107c1b: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 107c1e: 83 ec 0c sub $0xc,%esp 107c21: 8d 75 cc lea -0x34(%ebp),%esi 107c24: 56 push %esi 107c25: 89 55 c4 mov %edx,-0x3c(%ebp) 107c28: e8 27 72 00 00 call 10ee54 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 107c2d: 8b 55 c4 mov -0x3c(%ebp),%edx 107c30: 8b 42 50 mov 0x50(%edx),%eax 107c33: 8b 48 34 mov 0x34(%eax),%ecx 107c36: 83 c4 10 add $0x10,%esp 107c39: 66 83 f9 01 cmp $0x1,%cx 107c3d: 74 27 je 107c66 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 107c3f: 49 dec %ecx 107c40: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107c44: 83 ec 08 sub $0x8,%esp 107c47: 6a 00 push $0x0 107c49: 8d 45 e0 lea -0x20(%ebp),%eax 107c4c: 50 push %eax 107c4d: 89 55 c4 mov %edx,-0x3c(%ebp) 107c50: e8 bb 04 00 00 call 108110 107c55: 8b 55 c4 mov -0x3c(%ebp),%edx 107c58: 8b 42 50 mov 0x50(%edx),%eax 107c5b: 8b 55 e0 mov -0x20(%ebp),%edx 107c5e: 89 50 48 mov %edx,0x48(%eax) 107c61: 83 c4 10 add $0x10,%esp 107c64: eb 8a jmp 107bf0 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 107c66: 83 ec 08 sub $0x8,%esp 107c69: 56 push %esi 107c6a: ff 75 08 pushl 0x8(%ebp) 107c6d: 8b 45 d4 mov -0x2c(%ebp),%eax 107c70: ff 50 34 call *0x34(%eax) if ( result != 0 ) 107c73: 83 c4 10 add $0x10,%esp 107c76: 85 c0 test %eax,%eax 107c78: 0f 84 72 ff ff ff je 107bf0 return -1; 107c7e: b8 ff ff ff ff mov $0xffffffff,%eax 107c83: e9 78 ff ff ff jmp 107c00 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 107c88: e8 23 a6 00 00 call 1122b0 <__errno> <== NOT EXECUTED 107c8d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107c93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107c98: e9 63 ff ff ff jmp 107c00 <== NOT EXECUTED =============================================================================== 00107ca0 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107ca0: 55 push %ebp 107ca1: 89 e5 mov %esp,%ebp 107ca3: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107ca6: 8b 45 08 mov 0x8(%ebp),%eax 107ca9: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107cac: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107cb0: 75 12 jne 107cc4 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107cb2: 8b 50 5c mov 0x5c(%eax),%edx 107cb5: 85 d2 test %edx,%edx 107cb7: 74 1d je 107cd6 <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 107cb9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) return 0; 107cc0: 31 c0 xor %eax,%eax } 107cc2: c9 leave 107cc3: c3 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 107cc4: e8 e7 a5 00 00 call 1122b0 <__errno> <== NOT EXECUTED 107cc9: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107ccf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107cd4: c9 leave <== NOT EXECUTED 107cd5: c3 ret <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 107cd6: e8 d5 a5 00 00 call 1122b0 <__errno> <== NOT EXECUTED 107cdb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ce1: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107ce6: c9 leave <== NOT EXECUTED 107ce7: c3 ret <== NOT EXECUTED =============================================================================== 001082bc : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1082bc: 55 push %ebp 1082bd: 89 e5 mov %esp,%ebp 1082bf: 57 push %edi 1082c0: 56 push %esi 1082c1: 53 push %ebx 1082c2: 83 ec 0c sub $0xc,%esp 1082c5: 8b 5d 08 mov 0x8(%ebp),%ebx 1082c8: 8b 75 0c mov 0xc(%ebp),%esi 1082cb: 8b 7d 10 mov 0x10(%ebp),%edi /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1082ce: a1 c8 36 12 00 mov 0x1236c8,%eax 1082d3: 85 c0 test %eax,%eax 1082d5: 74 02 je 1082d9 (*rtems_malloc_statistics_helpers->initialize)(); 1082d7: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1082d9: e8 76 ff ff ff call 108254 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1082de: a1 cc 36 12 00 mov 0x1236cc,%eax 1082e3: 85 c0 test %eax,%eax 1082e5: 74 0e je 1082f5 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1082e7: 83 ec 08 sub $0x8,%esp 1082ea: 57 push %edi 1082eb: 53 push %ebx 1082ec: ff 10 call *(%eax) 1082ee: 89 c3 mov %eax,%ebx 1082f0: 83 c4 10 add $0x10,%esp heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; 1082f3: 89 fe mov %edi,%esi * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1082f5: 80 3d c4 36 12 00 00 cmpb $0x0,0x1236c4 1082fc: 75 1f jne 10831d !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1082fe: 80 3d 48 12 12 00 00 cmpb $0x0,0x121248 108305: 75 41 jne 108348 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 108307: 6a 04 push $0x4 108309: 56 push %esi 10830a: 53 push %ebx 10830b: ff 35 58 11 12 00 pushl 0x121158 108311: e8 de 42 00 00 call 10c5f4 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 108316: 83 c4 10 add $0x10,%esp 108319: 85 c0 test %eax,%eax 10831b: 74 3e je 10835b rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 10831d: 8b 1d e0 52 12 00 mov 0x1252e0,%ebx 108323: 83 ec 0c sub $0xc,%esp 108326: ff 35 58 11 12 00 pushl 0x121158 10832c: e8 1b 4d 00 00 call 10d04c <_Protected_heap_Get_size> 108331: 8d 1c 18 lea (%eax,%ebx,1),%ebx 108334: 89 1d e0 52 12 00 mov %ebx,0x1252e0 10833a: 83 c4 10 add $0x10,%esp } 10833d: 8d 65 f4 lea -0xc(%ebp),%esp 108340: 5b pop %ebx 108341: 5e pop %esi 108342: 5f pop %edi 108343: c9 leave 108344: c3 ret 108345: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 108348: 31 c0 xor %eax,%eax 10834a: 89 df mov %ebx,%edi 10834c: 89 f1 mov %esi,%ecx 10834e: f3 aa rep stos %al,%es:(%edi) * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 108350: 80 3d c4 36 12 00 00 cmpb $0x0,0x1236c4 108357: 74 ae je 108307 <== ALWAYS TAKEN 108359: eb c2 jmp 10831d <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 10835b: 83 ec 0c sub $0xc,%esp 10835e: 6a 1a push $0x1a 108360: e8 67 39 00 00 call 10bccc =============================================================================== 001077e0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1077e0: 55 push %ebp <== NOT EXECUTED 1077e1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1077e3: 57 push %edi <== NOT EXECUTED 1077e4: 56 push %esi <== NOT EXECUTED 1077e5: 53 push %ebx <== NOT EXECUTED 1077e6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1077e9: 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) { 1077ec: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 1077ef: 0f 84 37 01 00 00 je 10792c <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 1077f5: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 1077fb: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax <== NOT EXECUTED 107801: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 107804: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10780a: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED 10780d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 107810: 8b 3e mov (%esi),%edi <== NOT EXECUTED 107812: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 107815: 8d 41 20 lea 0x20(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 107818: 89 fa mov %edi,%edx <== NOT EXECUTED 10781a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10781d: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107820: 39 d0 cmp %edx,%eax <== NOT EXECUTED 107822: 73 23 jae 107847 <== NOT EXECUTED if (*base != U32_PATTERN) 107824: 81 79 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%ecx) <== NOT EXECUTED 10782b: 74 13 je 107840 <== NOT EXECUTED 10782d: e9 a2 00 00 00 jmp 1078d4 <== NOT EXECUTED 107832: 66 90 xchg %ax,%ax <== NOT EXECUTED 107834: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10783a: 0f 85 94 00 00 00 jne 1078d4 <== 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++) 107840: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 107843: 39 c2 cmp %eax,%edx <== NOT EXECUTED 107845: 77 ed ja 107834 <== 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; 107847: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 10784e: 85 db test %ebx,%ebx <== NOT EXECUTED 107850: 0f 84 98 00 00 00 je 1078ee <== NOT EXECUTED #endif { (*print_handler)( 107856: a1 4c 63 12 00 mov 0x12634c,%eax <== NOT EXECUTED 10785b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10785e: 50 push %eax <== NOT EXECUTED 10785f: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 107862: 50 push %eax <== NOT EXECUTED 107863: 6a 05 push $0x5 <== NOT EXECUTED 107865: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107868: e8 cf 3f 00 00 call 10b83c <== NOT EXECUTED 10786d: 50 push %eax <== NOT EXECUTED 10786e: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107871: 68 17 fe 11 00 push $0x11fe17 <== NOT EXECUTED 107876: ff 35 48 63 12 00 pushl 0x126348 <== NOT EXECUTED 10787c: ff 55 cc call *-0x34(%ebp) <== NOT EXECUTED 10787f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 107882: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 107885: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107888: 57 push %edi <== NOT EXECUTED 107889: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 10788c: 8b 16 mov (%esi),%edx <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 10788e: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107892: 52 push %edx <== NOT EXECUTED 107893: 50 push %eax <== NOT EXECUTED 107894: 68 32 fe 11 00 push $0x11fe32 <== NOT EXECUTED 107899: ff 35 48 63 12 00 pushl 0x126348 <== NOT EXECUTED 10789f: ff 15 4c 63 12 00 call *0x12634c <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1078a5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1078a8: 8b 15 50 63 12 00 mov 0x126350,%edx <== NOT EXECUTED 1078ae: 85 d2 test %edx,%edx <== NOT EXECUTED 1078b0: 74 5a je 10790c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 1078b2: 50 push %eax <== NOT EXECUTED 1078b3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1078b6: 68 5d fe 11 00 push $0x11fe5d <== NOT EXECUTED 1078bb: ff 35 48 63 12 00 pushl 0x126348 <== NOT EXECUTED 1078c1: ff 15 4c 63 12 00 call *0x12634c <== NOT EXECUTED 1078c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 1078ca: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1078cd: 5b pop %ebx <== NOT EXECUTED 1078ce: 5e pop %esi <== NOT EXECUTED 1078cf: 5f pop %edi <== NOT EXECUTED 1078d0: c9 leave <== NOT EXECUTED 1078d1: c3 ret <== NOT EXECUTED 1078d2: 66 90 xchg %ax,%ax <== 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 ) 1078d4: 85 c0 test %eax,%eax <== NOT EXECUTED 1078d6: 0f 84 6b ff ff ff je 107847 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 1078dc: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 1078df: 01 fa add %edi,%edx <== NOT EXECUTED 1078e1: 29 c2 sub %eax,%edx <== NOT EXECUTED 1078e3: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 1078e6: 85 db test %ebx,%ebx <== NOT EXECUTED 1078e8: 0f 85 68 ff ff ff jne 107856 <== 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 ); 1078ee: 51 push %ecx <== NOT EXECUTED 1078ef: 6a ff push $0xffffffff <== NOT EXECUTED 1078f1: 68 24 fe 11 00 push $0x11fe24 <== NOT EXECUTED 1078f6: ff 35 48 63 12 00 pushl 0x126348 <== NOT EXECUTED 1078fc: ff 15 4c 63 12 00 call *0x12634c <== NOT EXECUTED 107902: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107905: e9 78 ff ff ff jmp 107882 <== NOT EXECUTED 10790a: 66 90 xchg %ax,%ax <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 10790c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10790f: 68 50 fe 11 00 push $0x11fe50 <== NOT EXECUTED 107914: ff 35 48 63 12 00 pushl 0x126348 <== NOT EXECUTED 10791a: ff 15 4c 63 12 00 call *0x12634c <== NOT EXECUTED 107920: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 107923: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107926: 5b pop %ebx <== NOT EXECUTED 107927: 5e pop %esi <== NOT EXECUTED 107928: 5f pop %edi <== NOT EXECUTED 107929: c9 leave <== NOT EXECUTED 10792a: c3 ret <== NOT EXECUTED 10792b: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 10792c: 8b 0d 94 66 12 00 mov 0x126694,%ecx <== NOT EXECUTED 107932: 85 c9 test %ecx,%ecx <== NOT EXECUTED 107934: 74 94 je 1078ca <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 107936: be 90 66 12 00 mov $0x126690,%esi <== NOT EXECUTED the_thread = 0; current = 0; 10793b: 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; 107942: 31 db xor %ebx,%ebx <== NOT EXECUTED 107944: e9 c1 fe ff ff jmp 10780a <== NOT EXECUTED =============================================================================== 0010794c : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10794c: 55 push %ebp 10794d: 89 e5 mov %esp,%ebp 10794f: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) 107950: 8b 15 50 63 12 00 mov 0x126350,%edx 107956: 85 d2 test %edx,%edx 107958: 75 5a jne 1079b4 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 10795a: c7 05 80 66 12 00 0d movl $0xfeedf00d,0x126680 107961: f0 ed fe 107964: c7 05 84 66 12 00 06 movl $0xbad0d06,0x126684 10796b: 0d ad 0b 10796e: c7 05 88 66 12 00 0d movl $0xdeadf00d,0x126688 107975: f0 ad de 107978: c7 05 8c 66 12 00 06 movl $0x600d0d06,0x12668c 10797f: 0d 0d 60 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 107982: 8b 15 ac 6a 12 00 mov 0x126aac,%edx 107988: 85 d2 test %edx,%edx 10798a: 74 1e je 1079aa <== NEVER TAKEN 10798c: 8b 0d b0 6a 12 00 mov 0x126ab0,%ecx 107992: 85 c9 test %ecx,%ecx 107994: 74 14 je 1079aa <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 107996: 89 15 94 66 12 00 mov %edx,0x126694 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10799c: 29 d1 sub %edx,%ecx 10799e: 89 0d 90 66 12 00 mov %ecx,0x126690 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 1079a4: b0 a5 mov $0xa5,%al 1079a6: 89 d7 mov %edx,%edi 1079a8: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 1079aa: c7 05 50 63 12 00 01 movl $0x1,0x126350 1079b1: 00 00 00 } 1079b4: 5f pop %edi 1079b5: c9 leave 1079b6: c3 ret =============================================================================== 00107a08 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 107a08: 55 push %ebp <== NOT EXECUTED 107a09: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107a0b: 56 push %esi <== NOT EXECUTED 107a0c: 53 push %ebx <== NOT EXECUTED 107a0d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 107a10: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 107a13: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 107a16: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 107a1c: 68 63 fe 11 00 push $0x11fe63 <== NOT EXECUTED 107a21: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 107a24: e8 63 18 00 00 call 10928c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 107a29: 5a pop %edx <== NOT EXECUTED 107a2a: 59 pop %ecx <== NOT EXECUTED 107a2b: 53 push %ebx <== NOT EXECUTED 107a2c: 68 73 fe 11 00 push $0x11fe73 <== NOT EXECUTED 107a31: e8 56 18 00 00 call 10928c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 107a36: 59 pop %ecx <== NOT EXECUTED 107a37: 58 pop %eax <== NOT EXECUTED 107a38: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107a3b: 68 90 fe 11 00 push $0x11fe90 <== NOT EXECUTED 107a40: e8 47 18 00 00 call 10928c <== NOT EXECUTED printk( 107a45: 58 pop %eax <== NOT EXECUTED 107a46: 5a pop %edx <== NOT EXECUTED 107a47: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 107a4a: 68 a2 fe 11 00 push $0x11fea2 <== NOT EXECUTED 107a4f: e8 38 18 00 00 call 10928c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 107a54: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 107a57: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 107a5a: 50 push %eax <== NOT EXECUTED 107a5b: 6a 20 push $0x20 <== NOT EXECUTED 107a5d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107a60: e8 d7 3d 00 00 call 10b83c <== NOT EXECUTED 107a65: 5a pop %edx <== NOT EXECUTED 107a66: 59 pop %ecx <== NOT EXECUTED 107a67: 50 push %eax <== NOT EXECUTED 107a68: 68 b6 fe 11 00 push $0x11feb6 <== NOT EXECUTED 107a6d: e8 1a 18 00 00 call 10928c <== 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) 107a72: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 107a78: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107a7e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107a81: 53 push %ebx <== NOT EXECUTED 107a82: 51 push %ecx <== NOT EXECUTED 107a83: 50 push %eax <== NOT EXECUTED 107a84: 68 e4 fe 11 00 push $0x11fee4 <== NOT EXECUTED 107a89: e8 fe 17 00 00 call 10928c <== 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) { 107a8e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107a91: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107a94: 84 d2 test %dl,%dl <== NOT EXECUTED 107a96: 74 10 je 107aa8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107a98: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a9b: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 107aa0: e8 13 46 00 00 call 10c0b8 <== NOT EXECUTED 107aa5: 8d 76 00 lea 0x0(%esi),%esi <== 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_area(stack); 107aa8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 107aab: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107aae: 56 push %esi <== NOT EXECUTED 107aaf: 50 push %eax <== NOT EXECUTED 107ab0: 6a 10 push $0x10 <== NOT EXECUTED 107ab2: 68 18 ff 11 00 push $0x11ff18 <== NOT EXECUTED 107ab7: e8 d0 17 00 00 call 10928c <== NOT EXECUTED 107abc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107abf: eb d7 jmp 107a98 <== NOT EXECUTED =============================================================================== 0010be2c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be2c: 55 push %ebp 10be2d: 89 e5 mov %esp,%ebp 10be2f: 53 push %ebx 10be30: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be33: 8b 1d 78 56 12 00 mov 0x125678,%ebx 10be39: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be3f: 74 10 je 10be51 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10be41: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10be44: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10be47: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be49: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be4f: 75 f3 jne 10be44 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10be51: 58 pop %eax 10be52: 5b pop %ebx 10be53: c9 leave 10be54: c3 ret =============================================================================== 0010be58 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10be58: 55 push %ebp 10be59: 89 e5 mov %esp,%ebp 10be5b: 53 push %ebx 10be5c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be5f: 8b 1d 78 56 12 00 mov 0x125678,%ebx 10be65: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be6b: 74 1c je 10be89 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10be6d: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 10be70: 83 ec 0c sub $0xc,%esp 10be73: ff 35 d8 56 12 00 pushl 0x1256d8 10be79: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10be7c: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be7e: 83 c4 10 add $0x10,%esp 10be81: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be87: 75 e7 jne 10be70 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be89: 8b 5d fc mov -0x4(%ebp),%ebx 10be8c: c9 leave 10be8d: c3 ret =============================================================================== 00113254 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 113254: 55 push %ebp 113255: 89 e5 mov %esp,%ebp 113257: 57 push %edi 113258: 56 push %esi 113259: 53 push %ebx 11325a: 83 ec 1c sub $0x1c,%esp 11325d: 8b 45 08 mov 0x8(%ebp),%eax 113260: 8b 5d 0c mov 0xc(%ebp),%ebx 113263: 8b 75 14 mov 0x14(%ebp),%esi 113266: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 113269: 8b 15 98 89 12 00 mov 0x128998,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 11326f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 113276: 9c pushf 113277: fa cli 113278: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 11327b: 8b 48 48 mov 0x48(%eax),%ecx 11327e: 41 inc %ecx 11327f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 113282: 83 78 40 00 cmpl $0x0,0x40(%eax) 113286: 75 05 jne 11328d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 113288: 3b 48 44 cmp 0x44(%eax),%ecx 11328b: 74 2b je 1132b8 <_CORE_barrier_Wait+0x64> 11328d: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 113294: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 113297: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 11329a: ff 75 e4 pushl -0x1c(%ebp) 11329d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 11329e: c7 45 10 20 fb 10 00 movl $0x10fb20,0x10(%ebp) 1132a5: 89 75 0c mov %esi,0xc(%ebp) 1132a8: 89 45 08 mov %eax,0x8(%ebp) } 1132ab: 83 c4 1c add $0x1c,%esp 1132ae: 5b pop %ebx 1132af: 5e pop %esi 1132b0: 5f pop %edi 1132b1: c9 leave _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 1132b2: e9 19 c5 ff ff jmp 10f7d0 <_Thread_queue_Enqueue_with_handler> 1132b7: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 1132b8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 1132bf: ff 75 e4 pushl -0x1c(%ebp) 1132c2: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 1132c3: 89 7d 10 mov %edi,0x10(%ebp) 1132c6: 89 5d 0c mov %ebx,0xc(%ebp) 1132c9: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 1132cc: 83 c4 1c add $0x1c,%esp 1132cf: 5b pop %ebx 1132d0: 5e pop %esi 1132d1: 5f pop %edi 1132d2: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 1132d3: e9 4c ff ff ff jmp 113224 <_CORE_barrier_Release> =============================================================================== 00119838 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 119838: 55 push %ebp 119839: 89 e5 mov %esp,%ebp 11983b: 57 push %edi 11983c: 56 push %esi 11983d: 53 push %ebx 11983e: 83 ec 1c sub $0x1c,%esp 119841: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 119844: 8b 45 10 mov 0x10(%ebp),%eax 119847: 39 43 4c cmp %eax,0x4c(%ebx) 11984a: 72 60 jb 1198ac <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11984c: 8b 43 48 mov 0x48(%ebx),%eax 11984f: 85 c0 test %eax,%eax 119851: 75 45 jne 119898 <_CORE_message_queue_Broadcast+0x60> 119853: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11985a: eb 18 jmp 119874 <_CORE_message_queue_Broadcast+0x3c> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 11985c: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11985f: 8b 42 2c mov 0x2c(%edx),%eax 119862: 89 c7 mov %eax,%edi 119864: 8b 75 0c mov 0xc(%ebp),%esi 119867: 8b 4d 10 mov 0x10(%ebp),%ecx 11986a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11986c: 8b 42 28 mov 0x28(%edx),%eax 11986f: 8b 55 10 mov 0x10(%ebp),%edx 119872: 89 10 mov %edx,(%eax) /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 119874: 83 ec 0c sub $0xc,%esp 119877: 53 push %ebx 119878: e8 cb 24 00 00 call 11bd48 <_Thread_queue_Dequeue> 11987d: 89 c2 mov %eax,%edx 11987f: 83 c4 10 add $0x10,%esp 119882: 85 c0 test %eax,%eax 119884: 75 d6 jne 11985c <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 119886: 8b 55 e4 mov -0x1c(%ebp),%edx 119889: 8b 45 1c mov 0x1c(%ebp),%eax 11988c: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11988e: 31 c0 xor %eax,%eax } 119890: 8d 65 f4 lea -0xc(%ebp),%esp 119893: 5b pop %ebx 119894: 5e pop %esi 119895: 5f pop %edi 119896: c9 leave 119897: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 119898: 8b 55 1c mov 0x1c(%ebp),%edx 11989b: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198a1: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198a3: 8d 65 f4 lea -0xc(%ebp),%esp 1198a6: 5b pop %ebx 1198a7: 5e pop %esi 1198a8: 5f pop %edi 1198a9: c9 leave 1198aa: c3 ret 1198ab: 90 nop <== NOT EXECUTED Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 1198ac: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198b1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1198b4: 5b pop %ebx <== NOT EXECUTED 1198b5: 5e pop %esi <== NOT EXECUTED 1198b6: 5f pop %edi <== NOT EXECUTED 1198b7: c9 leave <== NOT EXECUTED 1198b8: c3 ret <== NOT EXECUTED =============================================================================== 00114990 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 114990: 55 push %ebp 114991: 89 e5 mov %esp,%ebp 114993: 57 push %edi 114994: 56 push %esi 114995: 53 push %ebx 114996: 83 ec 0c sub $0xc,%esp 114999: 8b 5d 08 mov 0x8(%ebp),%ebx 11499c: 8b 75 10 mov 0x10(%ebp),%esi 11499f: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1149a2: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1149a5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1149ac: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 1149af: a8 03 test $0x3,%al 1149b1: 74 15 je 1149c8 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 1149b3: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1149b6: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1149b9: 39 d0 cmp %edx,%eax 1149bb: 76 0d jbe 1149ca <_CORE_message_queue_Initialize+0x3a><== ALWAYS TAKEN */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 1149bd: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 1149bf: 8d 65 f4 lea -0xc(%ebp),%esp 1149c2: 5b pop %ebx 1149c3: 5e pop %esi 1149c4: 5f pop %edi 1149c5: c9 leave 1149c6: c3 ret 1149c7: 90 nop <== NOT EXECUTED /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 1149c8: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1149ca: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1149cd: 89 f8 mov %edi,%eax 1149cf: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1149d2: 39 d0 cmp %edx,%eax 1149d4: 72 e7 jb 1149bd <_CORE_message_queue_Initialize+0x2d><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 1149d6: 83 ec 0c sub $0xc,%esp 1149d9: 50 push %eax 1149da: e8 0d 29 00 00 call 1172ec <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1149df: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1149e2: 83 c4 10 add $0x10,%esp 1149e5: 85 c0 test %eax,%eax 1149e7: 74 d4 je 1149bd <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 1149e9: 57 push %edi 1149ea: 56 push %esi 1149eb: 50 push %eax 1149ec: 8d 43 60 lea 0x60(%ebx),%eax 1149ef: 50 push %eax 1149f0: e8 33 46 00 00 call 119028 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1149f5: 8d 43 54 lea 0x54(%ebx),%eax 1149f8: 89 43 50 mov %eax,0x50(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1149fb: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 114a02: 8d 43 50 lea 0x50(%ebx),%eax 114a05: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114a08: 6a 06 push $0x6 114a0a: 68 80 00 00 00 push $0x80 114a0f: 8b 45 0c mov 0xc(%ebp),%eax 114a12: 83 38 01 cmpl $0x1,(%eax) 114a15: 0f 94 c0 sete %al 114a18: 0f b6 c0 movzbl %al,%eax 114a1b: 50 push %eax 114a1c: 53 push %ebx 114a1d: e8 9a 1e 00 00 call 1168bc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114a22: 83 c4 20 add $0x20,%esp 114a25: b0 01 mov $0x1,%al } 114a27: 8d 65 f4 lea -0xc(%ebp),%esp 114a2a: 5b pop %ebx 114a2b: 5e pop %esi 114a2c: 5f pop %edi 114a2d: c9 leave 114a2e: c3 ret =============================================================================== 001104a4 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 1104a4: 55 push %ebp 1104a5: 89 e5 mov %esp,%ebp 1104a7: 53 push %ebx 1104a8: 8b 45 08 mov 0x8(%ebp),%eax 1104ab: 8b 55 0c mov 0xc(%ebp),%edx #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 1104ae: 9c pushf 1104af: fa cli 1104b0: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1104b1: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 1104b4: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 1104bb: 74 17 je 1104d4 <_CORE_message_queue_Insert_message+0x30> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 1104bd: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1104c0: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1104c3: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 1104c6: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1104c9: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1104cb: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1104ce: 53 push %ebx 1104cf: 9d popf * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 1104d0: 5b pop %ebx 1104d1: c9 leave 1104d2: c3 ret 1104d3: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1104d4: 8d 48 54 lea 0x54(%eax),%ecx 1104d7: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 1104d9: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 1104dc: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 1104df: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 1104e1: 89 4a 04 mov %ecx,0x4(%edx) 1104e4: eb e8 jmp 1104ce <_CORE_message_queue_Insert_message+0x2a> =============================================================================== 00114a30 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114a30: 55 push %ebp 114a31: 89 e5 mov %esp,%ebp 114a33: 57 push %edi 114a34: 56 push %esi 114a35: 53 push %ebx 114a36: 83 ec 1c sub $0x1c,%esp 114a39: 8b 45 08 mov 0x8(%ebp),%eax 114a3c: 8b 55 0c mov 0xc(%ebp),%edx 114a3f: 89 55 dc mov %edx,-0x24(%ebp) 114a42: 8b 55 10 mov 0x10(%ebp),%edx 114a45: 89 55 e4 mov %edx,-0x1c(%ebp) 114a48: 8b 7d 14 mov 0x14(%ebp),%edi 114a4b: 8b 55 1c mov 0x1c(%ebp),%edx 114a4e: 89 55 d8 mov %edx,-0x28(%ebp) 114a51: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114a54: 8b 0d f8 fa 12 00 mov 0x12faf8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114a5a: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114a61: 9c pushf 114a62: fa cli 114a63: 8f 45 e0 popl -0x20(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114a66: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114a69: 8d 70 54 lea 0x54(%eax),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 114a6c: 39 f2 cmp %esi,%edx 114a6e: 74 44 je 114ab4 <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114a70: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114a72: 89 48 50 mov %ecx,0x50(%eax) CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 114a75: 8d 58 50 lea 0x50(%eax),%ebx 114a78: 89 59 04 mov %ebx,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114a7b: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114a7e: ff 75 e0 pushl -0x20(%ebp) 114a81: 9d popf *size_p = the_message->Contents.size; 114a82: 8b 4a 08 mov 0x8(%edx),%ecx 114a85: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114a87: 8b 0d f8 fa 12 00 mov 0x12faf8,%ecx 114a8d: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114a94: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114a97: 8b 0f mov (%edi),%ecx 114a99: 8b 7d e4 mov -0x1c(%ebp),%edi 114a9c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 114a9e: 89 55 0c mov %edx,0xc(%ebp) 114aa1: 83 c0 60 add $0x60,%eax 114aa4: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114aa7: 83 c4 1c add $0x1c,%esp 114aaa: 5b pop %ebx 114aab: 5e pop %esi 114aac: 5f pop %edi 114aad: c9 leave 114aae: e9 5d fe ff ff jmp 114910 <_Chain_Append> 114ab3: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114ab4: 84 db test %bl,%bl 114ab6: 75 14 jne 114acc <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114ab8: ff 75 e0 pushl -0x20(%ebp) 114abb: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114abc: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114ac3: 83 c4 1c add $0x1c,%esp 114ac6: 5b pop %ebx 114ac7: 5e pop %esi 114ac8: 5f pop %edi 114ac9: c9 leave 114aca: c3 ret 114acb: 90 nop <== NOT EXECUTED 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; 114acc: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 114ad3: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114ad6: 8b 55 dc mov -0x24(%ebp),%edx 114ad9: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114adc: 8b 55 e4 mov -0x1c(%ebp),%edx 114adf: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114ae2: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114ae5: ff 75 e0 pushl -0x20(%ebp) 114ae8: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114ae9: c7 45 10 80 69 11 00 movl $0x116980,0x10(%ebp) 114af0: 8b 55 d8 mov -0x28(%ebp),%edx 114af3: 89 55 0c mov %edx,0xc(%ebp) 114af6: 89 45 08 mov %eax,0x8(%ebp) } 114af9: 83 c4 1c add $0x1c,%esp 114afc: 5b pop %ebx 114afd: 5e pop %esi 114afe: 5f pop %edi 114aff: c9 leave executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114b00: e9 2b 1b 00 00 jmp 116630 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010bfc0 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bfc0: 55 push %ebp 10bfc1: 89 e5 mov %esp,%ebp 10bfc3: 57 push %edi 10bfc4: 56 push %esi 10bfc5: 53 push %ebx 10bfc6: 83 ec 0c sub $0xc,%esp 10bfc9: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfcc: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bfcf: 8b 45 10 mov 0x10(%ebp),%eax 10bfd2: 39 43 4c cmp %eax,0x4c(%ebx) 10bfd5: 72 51 jb 10c028 <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10bfd7: 8b 43 48 mov 0x48(%ebx),%eax 10bfda: 85 c0 test %eax,%eax 10bfdc: 74 5a je 10c038 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 10bfde: 39 43 44 cmp %eax,0x44(%ebx) 10bfe1: 77 0d ja 10bff0 <_CORE_message_queue_Submit+0x30> ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 10bfe3: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bfe8: 8d 65 f4 lea -0xc(%ebp),%esp 10bfeb: 5b pop %ebx 10bfec: 5e pop %esi 10bfed: 5f pop %edi 10bfee: c9 leave 10bfef: c3 ret _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 10bff0: 83 ec 0c sub $0xc,%esp 10bff3: 8d 43 60 lea 0x60(%ebx),%eax 10bff6: 50 push %eax 10bff7: e8 a0 ff ff ff call 10bf9c <_Chain_Get> 10bffc: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10bffe: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c001: 89 c7 mov %eax,%edi 10c003: 8b 4d 10 mov 0x10(%ebp),%ecx 10c006: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c008: 8b 4d 10 mov 0x10(%ebp),%ecx 10c00b: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c00e: 83 c4 0c add $0xc,%esp 10c011: ff 75 1c pushl 0x1c(%ebp) 10c014: 52 push %edx 10c015: 53 push %ebx 10c016: e8 89 44 00 00 call 1104a4 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c01b: 83 c4 10 add $0x10,%esp 10c01e: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c020: 8d 65 f4 lea -0xc(%ebp),%esp 10c023: 5b pop %ebx 10c024: 5e pop %esi 10c025: 5f pop %edi 10c026: c9 leave 10c027: c3 ret { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 10c028: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c02d: 8d 65 f4 lea -0xc(%ebp),%esp 10c030: 5b pop %ebx 10c031: 5e pop %esi 10c032: 5f pop %edi 10c033: c9 leave 10c034: c3 ret 10c035: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c038: 83 ec 0c sub $0xc,%esp 10c03b: 53 push %ebx 10c03c: e8 03 19 00 00 call 10d944 <_Thread_queue_Dequeue> 10c041: 89 c2 mov %eax,%edx if ( the_thread ) { 10c043: 83 c4 10 add $0x10,%esp 10c046: 85 c0 test %eax,%eax 10c048: 74 1e je 10c068 <_CORE_message_queue_Submit+0xa8> 10c04a: 8b 40 2c mov 0x2c(%eax),%eax 10c04d: 89 c7 mov %eax,%edi 10c04f: 8b 4d 10 mov 0x10(%ebp),%ecx 10c052: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10c054: 8b 42 28 mov 0x28(%edx),%eax 10c057: 8b 4d 10 mov 0x10(%ebp),%ecx 10c05a: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c05c: 8b 45 1c mov 0x1c(%ebp),%eax 10c05f: 89 42 24 mov %eax,0x24(%edx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c062: 31 c0 xor %eax,%eax 10c064: eb 82 jmp 10bfe8 <_CORE_message_queue_Submit+0x28> 10c066: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10c068: 8b 43 48 mov 0x48(%ebx),%eax 10c06b: e9 6e ff ff ff jmp 10bfde <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c07c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c07c: 55 push %ebp 10c07d: 89 e5 mov %esp,%ebp 10c07f: 57 push %edi 10c080: 56 push %esi 10c081: 53 push %ebx 10c082: 83 ec 0c sub $0xc,%esp 10c085: 8b 45 08 mov 0x8(%ebp),%eax 10c088: 8b 5d 0c mov 0xc(%ebp),%ebx 10c08b: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10c08e: 8d 78 40 lea 0x40(%eax),%edi 10c091: b9 04 00 00 00 mov $0x4,%ecx 10c096: 89 de mov %ebx,%esi 10c098: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c09a: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c09d: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c0a4: 85 d2 test %edx,%edx 10c0a6: 75 30 jne 10c0d8 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c0a8: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c0af: 8b 15 d8 56 12 00 mov 0x1256d8,%edx 10c0b5: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c0b8: 8b 4a 08 mov 0x8(%edx),%ecx 10c0bb: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c0be: 8b 48 48 mov 0x48(%eax),%ecx if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c0c1: 83 f9 02 cmp $0x2,%ecx 10c0c4: 74 05 je 10c0cb <_CORE_mutex_Initialize+0x4f> 10c0c6: 83 f9 03 cmp $0x3,%ecx 10c0c9: 75 22 jne 10c0ed <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c0cb: 8b 48 4c mov 0x4c(%eax),%ecx 10c0ce: 39 4a 14 cmp %ecx,0x14(%edx) 10c0d1: 72 41 jb 10c114 <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10c0d3: ff 42 1c incl 0x1c(%edx) 10c0d6: eb 15 jmp 10c0ed <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c0d8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c0df: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c0e6: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c0ed: 6a 05 push $0x5 10c0ef: 68 00 04 00 00 push $0x400 10c0f4: 31 d2 xor %edx,%edx 10c0f6: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c0fa: 0f 95 c2 setne %dl 10c0fd: 52 push %edx 10c0fe: 50 push %eax 10c0ff: e8 f0 1b 00 00 call 10dcf4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c104: 83 c4 10 add $0x10,%esp 10c107: 31 c0 xor %eax,%eax } 10c109: 8d 65 f4 lea -0xc(%ebp),%esp 10c10c: 5b pop %ebx 10c10d: 5e pop %esi 10c10e: 5f pop %edi 10c10f: c9 leave 10c110: c3 ret 10c111: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 10c114: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c119: 8d 65 f4 lea -0xc(%ebp),%esp 10c11c: 5b pop %ebx 10c11d: 5e pop %esi 10c11e: 5f pop %edi 10c11f: c9 leave 10c120: c3 ret =============================================================================== 0010c174 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c174: 55 push %ebp 10c175: 89 e5 mov %esp,%ebp 10c177: 53 push %ebx 10c178: 83 ec 14 sub $0x14,%esp 10c17b: 8b 5d 08 mov 0x8(%ebp),%ebx 10c17e: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c181: a1 34 54 12 00 mov 0x125434,%eax 10c186: 85 c0 test %eax,%eax 10c188: 74 04 je 10c18e <_CORE_mutex_Seize+0x1a> 10c18a: 84 d2 test %dl,%dl 10c18c: 75 36 jne 10c1c4 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c18e: 83 ec 08 sub $0x8,%esp 10c191: 8d 45 18 lea 0x18(%ebp),%eax 10c194: 50 push %eax 10c195: 53 push %ebx 10c196: 88 55 f4 mov %dl,-0xc(%ebp) 10c199: e8 4a 43 00 00 call 1104e8 <_CORE_mutex_Seize_interrupt_trylock> 10c19e: 83 c4 10 add $0x10,%esp 10c1a1: 85 c0 test %eax,%eax 10c1a3: 8a 55 f4 mov -0xc(%ebp),%dl 10c1a6: 74 14 je 10c1bc <_CORE_mutex_Seize+0x48> 10c1a8: 84 d2 test %dl,%dl 10c1aa: 75 30 jne 10c1dc <_CORE_mutex_Seize+0x68> 10c1ac: ff 75 18 pushl 0x18(%ebp) 10c1af: 9d popf 10c1b0: a1 d8 56 12 00 mov 0x1256d8,%eax 10c1b5: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10c1bf: c9 leave 10c1c0: c3 ret 10c1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1c4: 83 3d e0 55 12 00 01 cmpl $0x1,0x1255e0 10c1cb: 76 c1 jbe 10c18e <_CORE_mutex_Seize+0x1a> 10c1cd: 53 push %ebx 10c1ce: 6a 12 push $0x12 10c1d0: 6a 00 push $0x0 10c1d2: 6a 00 push $0x0 10c1d4: e8 23 06 00 00 call 10c7fc <_Internal_error_Occurred> 10c1d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 10c1dc: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c1e3: a1 d8 56 12 00 mov 0x1256d8,%eax 10c1e8: 89 58 44 mov %ebx,0x44(%eax) 10c1eb: 8b 55 0c mov 0xc(%ebp),%edx 10c1ee: 89 50 20 mov %edx,0x20(%eax) 10c1f1: a1 34 54 12 00 mov 0x125434,%eax 10c1f6: 40 inc %eax 10c1f7: a3 34 54 12 00 mov %eax,0x125434 10c1fc: ff 75 18 pushl 0x18(%ebp) 10c1ff: 9d popf 10c200: 83 ec 08 sub $0x8,%esp 10c203: ff 75 14 pushl 0x14(%ebp) 10c206: 53 push %ebx 10c207: e8 18 ff ff ff call 10c124 <_CORE_mutex_Seize_interrupt_blocking> 10c20c: 83 c4 10 add $0x10,%esp } 10c20f: 8b 5d fc mov -0x4(%ebp),%ebx 10c212: c9 leave 10c213: c3 ret =============================================================================== 001104e8 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 1104e8: 55 push %ebp 1104e9: 89 e5 mov %esp,%ebp 1104eb: 56 push %esi 1104ec: 53 push %ebx 1104ed: 8b 45 08 mov 0x8(%ebp),%eax 1104f0: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1104f3: 8b 15 d8 56 12 00 mov 0x1256d8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1104f9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110500: 8b 58 50 mov 0x50(%eax),%ebx 110503: 85 db test %ebx,%ebx 110505: 74 31 je 110538 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110507: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11050e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110511: 8b 5a 08 mov 0x8(%edx),%ebx 110514: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110517: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 11051e: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110521: 83 fb 02 cmp $0x2,%ebx 110524: 74 26 je 11054c <_CORE_mutex_Seize_interrupt_trylock+0x64> 110526: 83 fb 03 cmp $0x3,%ebx 110529: 74 3d je 110568 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 11052b: ff 31 pushl (%ecx) 11052d: 9d popf return 0; 11052e: 31 c0 xor %eax,%eax 110530: 8d 65 f8 lea -0x8(%ebp),%esp 110533: 5b pop %ebx 110534: 5e pop %esi 110535: c9 leave 110536: c3 ret 110537: 90 nop <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 110538: 3b 50 5c cmp 0x5c(%eax),%edx 11053b: 74 17 je 110554 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 11053d: b8 01 00 00 00 mov $0x1,%eax 110542: 8d 65 f8 lea -0x8(%ebp),%esp 110545: 5b pop %ebx 110546: 5e pop %esi 110547: c9 leave 110548: c3 ret 110549: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 11054c: ff 42 1c incl 0x1c(%edx) 11054f: eb da jmp 11052b <_CORE_mutex_Seize_interrupt_trylock+0x43> 110551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 110554: 8b 58 40 mov 0x40(%eax),%ebx 110557: 85 db test %ebx,%ebx 110559: 75 45 jne 1105a0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11055b: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 11055e: ff 31 pushl (%ecx) 110560: 9d popf return 0; 110561: 31 c0 xor %eax,%eax 110563: eb dd jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110565: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110568: 8b 5a 1c mov 0x1c(%edx),%ebx 11056b: 8d 73 01 lea 0x1(%ebx),%esi 11056e: 89 72 1c mov %esi,0x1c(%edx) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 110571: 8b 72 14 mov 0x14(%edx),%esi 110574: 39 70 4c cmp %esi,0x4c(%eax) 110577: 74 6b je 1105e4 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110579: 72 39 jb 1105b4 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11057b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110582: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110589: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110590: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110593: ff 31 pushl (%ecx) 110595: 9d popf return 0; 110596: 31 c0 xor %eax,%eax 110598: 8d 65 f8 lea -0x8(%ebp),%esp 11059b: 5b pop %ebx 11059c: 5e pop %esi 11059d: c9 leave 11059e: c3 ret 11059f: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 1105a0: 4b dec %ebx 1105a1: 75 9a jne 11053d <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 1105a3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 1105aa: ff 31 pushl (%ecx) <== NOT EXECUTED 1105ac: 9d popf <== NOT EXECUTED return 0; 1105ad: 31 c0 xor %eax,%eax <== NOT EXECUTED 1105af: eb 91 jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 1105b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1105b4: 8b 15 34 54 12 00 mov 0x125434,%edx 1105ba: 42 inc %edx 1105bb: 89 15 34 54 12 00 mov %edx,0x125434 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1105c1: ff 31 pushl (%ecx) 1105c3: 9d popf _Thread_Change_priority( 1105c4: 52 push %edx 1105c5: 6a 00 push $0x0 1105c7: ff 70 4c pushl 0x4c(%eax) 1105ca: ff 70 5c pushl 0x5c(%eax) 1105cd: e8 d2 ca ff ff call 10d0a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1105d2: e8 d1 cf ff ff call 10d5a8 <_Thread_Enable_dispatch> 1105d7: 83 c4 10 add $0x10,%esp return 0; 1105da: 31 c0 xor %eax,%eax 1105dc: e9 61 ff ff ff jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1105e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 1105e4: ff 31 pushl (%ecx) 1105e6: 9d popf return 0; 1105e7: 31 c0 xor %eax,%eax 1105e9: e9 54 ff ff ff jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c214 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 53 push %ebx 10c218: 83 ec 04 sub $0x4,%esp 10c21b: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c21e: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c221: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c225: 74 15 je 10c23c <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c227: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10c22d: 74 0d je 10c23c <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c22f: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c234: 8b 5d fc mov -0x4(%ebp),%ebx 10c237: c9 leave 10c238: c3 ret 10c239: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c23c: 8b 53 54 mov 0x54(%ebx),%edx 10c23f: 85 d2 test %edx,%edx 10c241: 74 51 je 10c294 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c243: 4a dec %edx 10c244: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c247: 85 d2 test %edx,%edx 10c249: 75 49 jne 10c294 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c24b: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c24e: 83 fa 02 cmp $0x2,%edx 10c251: 74 69 je 10c2bc <_CORE_mutex_Surrender+0xa8> 10c253: 83 fa 03 cmp $0x3,%edx 10c256: 74 64 je 10c2bc <_CORE_mutex_Surrender+0xa8> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; 10c258: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c25f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c266: 83 ec 0c sub $0xc,%esp 10c269: 53 push %ebx 10c26a: e8 d5 16 00 00 call 10d944 <_Thread_queue_Dequeue> 10c26f: 83 c4 10 add $0x10,%esp 10c272: 85 c0 test %eax,%eax 10c274: 74 7a je 10c2f0 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c276: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c279: 8b 50 08 mov 0x8(%eax),%edx 10c27c: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c27f: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c286: 8b 53 48 mov 0x48(%ebx),%edx 10c289: 83 fa 02 cmp $0x2,%edx 10c28c: 74 56 je 10c2e4 <_CORE_mutex_Surrender+0xd0> 10c28e: 83 fa 03 cmp $0x3,%edx 10c291: 74 09 je 10c29c <_CORE_mutex_Surrender+0x88> 10c293: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c294: 31 c0 xor %eax,%eax } 10c296: 8b 5d fc mov -0x4(%ebp),%ebx 10c299: c9 leave 10c29a: c3 ret 10c29b: 90 nop <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c29c: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c29f: 8b 53 4c mov 0x4c(%ebx),%edx 10c2a2: 3b 50 14 cmp 0x14(%eax),%edx 10c2a5: 73 ed jae 10c294 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c2a7: 51 push %ecx 10c2a8: 6a 00 push $0x0 10c2aa: 52 push %edx 10c2ab: 50 push %eax 10c2ac: e8 f3 0d 00 00 call 10d0a4 <_Thread_Change_priority> 10c2b1: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2b4: 31 c0 xor %eax,%eax 10c2b6: e9 79 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> 10c2bb: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c2bc: 8b 50 1c mov 0x1c(%eax),%edx 10c2bf: 4a dec %edx 10c2c0: 89 50 1c mov %edx,0x1c(%eax) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( holder->resource_count == 0 && 10c2c3: 85 d2 test %edx,%edx 10c2c5: 75 91 jne 10c258 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c2c7: 8b 50 18 mov 0x18(%eax),%edx /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( holder->resource_count == 0 && 10c2ca: 3b 50 14 cmp 0x14(%eax),%edx 10c2cd: 74 89 je 10c258 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c2cf: 51 push %ecx 10c2d0: 6a 01 push $0x1 10c2d2: 52 push %edx 10c2d3: 50 push %eax 10c2d4: e8 cb 0d 00 00 call 10d0a4 <_Thread_Change_priority> 10c2d9: 83 c4 10 add $0x10,%esp 10c2dc: e9 77 ff ff ff jmp 10c258 <_CORE_mutex_Surrender+0x44> 10c2e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c2e4: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2e7: 31 c0 xor %eax,%eax case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; 10c2e9: e9 46 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> 10c2ee: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c2f0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2f7: 31 c0 xor %eax,%eax 10c2f9: e9 36 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c34c <_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 ) { 10c34c: 55 push %ebp 10c34d: 89 e5 mov %esp,%ebp 10c34f: 53 push %ebx 10c350: 83 ec 10 sub $0x10,%esp 10c353: 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)) ) { 10c356: 53 push %ebx 10c357: e8 e8 15 00 00 call 10d944 <_Thread_queue_Dequeue> 10c35c: 83 c4 10 add $0x10,%esp 10c35f: 85 c0 test %eax,%eax 10c361: 74 09 je 10c36c <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c363: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c365: 8b 5d fc mov -0x4(%ebp),%ebx 10c368: c9 leave 10c369: c3 ret 10c36a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c36c: 9c pushf 10c36d: fa cli 10c36e: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c36f: 8b 43 48 mov 0x48(%ebx),%eax 10c372: 3b 43 40 cmp 0x40(%ebx),%eax 10c375: 72 0d jb 10c384 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c377: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c37c: 52 push %edx 10c37d: 9d popf } return status; } 10c37e: 8b 5d fc mov -0x4(%ebp),%ebx 10c381: c9 leave 10c382: c3 ret 10c383: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c384: 40 inc %eax 10c385: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c388: 31 c0 xor %eax,%eax 10c38a: eb f0 jmp 10c37c <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010bf9c <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bf9c: 55 push %ebp 10bf9d: 89 e5 mov %esp,%ebp 10bf9f: 53 push %ebx 10bfa0: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bfa3: 9c pushf 10bfa4: fa cli 10bfa5: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bfa6: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bfa8: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10bfab: 39 c8 cmp %ecx,%eax 10bfad: 74 0d je 10bfbc <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bfaf: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bfb1: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bfb3: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10bfb6: 53 push %ebx 10bfb7: 9d popf return return_node; } 10bfb8: 5b pop %ebx 10bfb9: c9 leave 10bfba: c3 ret 10bfbb: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10bfbc: 31 c0 xor %eax,%eax 10bfbe: eb f6 jmp 10bfb6 <_Chain_Get+0x1a> =============================================================================== 0010c504 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c504: 55 push %ebp 10c505: 89 e5 mov %esp,%ebp 10c507: 57 push %edi 10c508: 56 push %esi 10c509: 53 push %ebx 10c50a: 8b 45 08 mov 0x8(%ebp),%eax 10c50d: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c510: 9c pushf 10c511: fa cli 10c512: 5e pop %esi Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; 10c513: 8b 10 mov (%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c515: 8d 58 04 lea 0x4(%eax),%ebx ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; if ( first != _Chain_Tail( the_chain ) ) { 10c518: 39 da cmp %ebx,%edx 10c51a: 74 18 je 10c534 <_Chain_Get_with_empty_check+0x30><== NEVER TAKEN Chain_Node *new_first = first->next; 10c51c: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 10c51e: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head( the_chain ); 10c520: 89 41 04 mov %eax,0x4(%ecx) *the_node = first; 10c523: 89 17 mov %edx,(%edi) is_empty_now = new_first == _Chain_Tail( the_chain ); 10c525: 39 cb cmp %ecx,%ebx 10c527: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c52a: 56 push %esi 10c52b: 9d popf return is_empty_now; } 10c52c: 5b pop %ebx 10c52d: 5e pop %esi 10c52e: 5f pop %edi 10c52f: c9 leave 10c530: c3 ret 10c531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else *the_node = NULL; 10c534: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10c53a: b0 01 mov $0x1,%al <== NOT EXECUTED 10c53c: eb ec jmp 10c52a <_Chain_Get_with_empty_check+0x26><== NOT EXECUTED =============================================================================== 00110454 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110454: 55 push %ebp 110455: 89 e5 mov %esp,%ebp 110457: 57 push %edi 110458: 56 push %esi 110459: 53 push %ebx 11045a: 83 ec 04 sub $0x4,%esp 11045d: 8b 7d 08 mov 0x8(%ebp),%edi 110460: 8b 4d 10 mov 0x10(%ebp),%ecx 110463: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110466: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110468: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 11046f: 85 c9 test %ecx,%ecx 110471: 74 23 je 110496 <_Chain_Initialize+0x42><== NEVER TAKEN 110473: 49 dec %ecx 110474: 89 4d f0 mov %ecx,-0x10(%ebp) Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110477: 8b 45 0c mov 0xc(%ebp),%eax 11047a: eb 05 jmp 110481 <_Chain_Initialize+0x2d> while ( count-- ) { 11047c: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 11047e: 89 d8 mov %ebx,%eax 110480: 49 dec %ecx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 110481: 89 02 mov %eax,(%edx) next->previous = current; 110483: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110486: 8d 1c 30 lea (%eax,%esi,1),%ebx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110489: 85 c9 test %ecx,%ecx 11048b: 75 ef jne 11047c <_Chain_Initialize+0x28> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 11048d: 8b 55 f0 mov -0x10(%ebp),%edx 110490: 0f af d6 imul %esi,%edx 110493: 03 55 0c add 0xc(%ebp),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110496: 8d 47 04 lea 0x4(%edi),%eax 110499: 89 02 mov %eax,(%edx) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 11049b: 89 57 08 mov %edx,0x8(%edi) } 11049e: 58 pop %eax 11049f: 5b pop %ebx 1104a0: 5e pop %esi 1104a1: 5f pop %edi 1104a2: c9 leave 1104a3: c3 ret =============================================================================== 0010b050 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 57 push %edi 10b054: 56 push %esi 10b055: 53 push %ebx 10b056: 83 ec 2c sub $0x2c,%esp 10b059: 8b 45 08 mov 0x8(%ebp),%eax 10b05c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b05f: 8b 55 10 mov 0x10(%ebp),%edx 10b062: 89 55 dc mov %edx,-0x24(%ebp) 10b065: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b068: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b06e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b075: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b07b: 9c pushf 10b07c: fa cli 10b07d: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b080: 8b 16 mov (%esi),%edx 10b082: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b085: 21 c2 and %eax,%edx 10b087: 89 55 e4 mov %edx,-0x1c(%ebp) 10b08a: 74 0d je 10b099 <_Event_Seize+0x49> 10b08c: 39 d0 cmp %edx,%eax 10b08e: 0f 84 84 00 00 00 je 10b118 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b094: f6 c1 02 test $0x2,%cl 10b097: 75 7f jne 10b118 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b099: f6 c1 01 test $0x1,%cl 10b09c: 75 62 jne 10b100 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b09e: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b0a1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b0a4: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b0a7: c7 05 e8 56 12 00 01 movl $0x1,0x1256e8 10b0ae: 00 00 00 _ISR_Enable( level ); 10b0b1: ff 75 e0 pushl -0x20(%ebp) 10b0b4: 9d popf if ( ticks ) { 10b0b5: 8b 45 dc mov -0x24(%ebp),%eax 10b0b8: 85 c0 test %eax,%eax 10b0ba: 0f 85 80 00 00 00 jne 10b140 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b0c0: 83 ec 08 sub $0x8,%esp 10b0c3: 68 00 01 00 00 push $0x100 10b0c8: 53 push %ebx 10b0c9: e8 8e 2d 00 00 call 10de5c <_Thread_Set_state> _ISR_Disable( level ); 10b0ce: 9c pushf 10b0cf: fa cli 10b0d0: 5a pop %edx sync_state = _Event_Sync_state; 10b0d1: a1 e8 56 12 00 mov 0x1256e8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b0d6: c7 05 e8 56 12 00 00 movl $0x0,0x1256e8 10b0dd: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b0e0: 83 c4 10 add $0x10,%esp 10b0e3: 83 f8 01 cmp $0x1,%eax 10b0e6: 74 4c je 10b134 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b0e8: 89 55 10 mov %edx,0x10(%ebp) 10b0eb: 89 5d 0c mov %ebx,0xc(%ebp) 10b0ee: 89 45 08 mov %eax,0x8(%ebp) } 10b0f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b0f4: 5b pop %ebx 10b0f5: 5e pop %esi 10b0f6: 5f pop %edi 10b0f7: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b0f8: e9 5b 1f 00 00 jmp 10d058 <_Thread_blocking_operation_Cancel> 10b0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b100: ff 75 e0 pushl -0x20(%ebp) 10b103: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b104: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b10b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b10e: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b110: 8d 65 f4 lea -0xc(%ebp),%esp 10b113: 5b pop %ebx 10b114: 5e pop %esi 10b115: 5f pop %edi 10b116: c9 leave 10b117: c3 ret 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) ); 10b118: 8b 45 e4 mov -0x1c(%ebp),%eax 10b11b: f7 d0 not %eax 10b11d: 23 45 d4 and -0x2c(%ebp),%eax 10b120: 89 06 mov %eax,(%esi) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b122: ff 75 e0 pushl -0x20(%ebp) 10b125: 9d popf *event_out = seized_events; 10b126: 8b 45 e4 mov -0x1c(%ebp),%eax 10b129: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b12b: 8d 65 f4 lea -0xc(%ebp),%esp 10b12e: 5b pop %ebx 10b12f: 5e pop %esi 10b130: 5f pop %edi 10b131: c9 leave 10b132: c3 ret 10b133: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b134: 52 push %edx 10b135: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b136: 8d 65 f4 lea -0xc(%ebp),%esp 10b139: 5b pop %ebx 10b13a: 5e pop %esi 10b13b: 5f pop %edi 10b13c: c9 leave 10b13d: c3 ret 10b13e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b140: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b143: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b14a: c7 43 64 f4 b2 10 00 movl $0x10b2f4,0x64(%ebx) the_watchdog->id = id; 10b151: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b154: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b15b: 8b 45 dc mov -0x24(%ebp),%eax 10b15e: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b161: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b164: 8d 43 48 lea 0x48(%ebx),%eax 10b167: 50 push %eax 10b168: 68 04 55 12 00 push $0x125504 10b16d: e8 52 33 00 00 call 10e4c4 <_Watchdog_Insert> 10b172: 83 c4 10 add $0x10,%esp 10b175: e9 46 ff ff ff jmp 10b0c0 <_Event_Seize+0x70> =============================================================================== 0010b1d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 57 push %edi 10b1d4: 56 push %esi 10b1d5: 53 push %ebx 10b1d6: 83 ec 2c sub $0x2c,%esp 10b1d9: 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 ]; 10b1dc: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b1e2: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b1e5: 9c pushf 10b1e6: fa cli 10b1e7: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b1ea: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b1ec: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b1ef: 89 c6 mov %eax,%esi 10b1f1: 21 d6 and %edx,%esi 10b1f3: 89 75 e4 mov %esi,-0x1c(%ebp) 10b1f6: 74 74 je 10b26c <_Event_Surrender+0x9c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b1f8: 8b 35 d4 56 12 00 mov 0x1256d4,%esi 10b1fe: 85 f6 test %esi,%esi 10b200: 74 0c je 10b20e <_Event_Surrender+0x3e> 10b202: 3b 1d d8 56 12 00 cmp 0x1256d8,%ebx 10b208: 0f 84 96 00 00 00 je 10b2a4 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b20e: f6 43 11 01 testb $0x1,0x11(%ebx) 10b212: 74 4c je 10b260 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b214: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b217: 74 05 je 10b21e <_Event_Surrender+0x4e> 10b219: 83 e7 02 and $0x2,%edi 10b21c: 74 42 je 10b260 <_Event_Surrender+0x90> <== 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) ); 10b21e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b221: f7 d0 not %eax 10b223: 21 d0 and %edx,%eax 10b225: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b227: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b22e: 8b 43 28 mov 0x28(%ebx),%eax 10b231: 8b 75 e4 mov -0x1c(%ebp),%esi 10b234: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b236: ff 75 d4 pushl -0x2c(%ebp) 10b239: 9d popf 10b23a: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b23b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b23f: 74 37 je 10b278 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b241: ff 75 d4 pushl -0x2c(%ebp) 10b244: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b245: 83 ec 08 sub $0x8,%esp 10b248: 68 f8 ff 03 10 push $0x1003fff8 10b24d: 53 push %ebx 10b24e: e8 91 1f 00 00 call 10d1e4 <_Thread_Clear_state> 10b253: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b256: 8d 65 f4 lea -0xc(%ebp),%esp 10b259: 5b pop %ebx 10b25a: 5e pop %esi 10b25b: 5f pop %edi 10b25c: c9 leave 10b25d: c3 ret 10b25e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b260: ff 75 d4 pushl -0x2c(%ebp) 10b263: 9d popf } 10b264: 8d 65 f4 lea -0xc(%ebp),%esp 10b267: 5b pop %ebx 10b268: 5e pop %esi 10b269: 5f pop %edi 10b26a: c9 leave 10b26b: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b26c: ff 75 d4 pushl -0x2c(%ebp) 10b26f: 9d popf } return; } } _ISR_Enable( level ); } 10b270: 8d 65 f4 lea -0xc(%ebp),%esp 10b273: 5b pop %ebx 10b274: 5e pop %esi 10b275: 5f pop %edi 10b276: c9 leave 10b277: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b278: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b27f: ff 75 d4 pushl -0x2c(%ebp) 10b282: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b283: 83 ec 0c sub $0xc,%esp 10b286: 8d 43 48 lea 0x48(%ebx),%eax 10b289: 50 push %eax 10b28a: e8 6d 33 00 00 call 10e5fc <_Watchdog_Remove> 10b28f: 58 pop %eax 10b290: 5a pop %edx 10b291: 68 f8 ff 03 10 push $0x1003fff8 10b296: 53 push %ebx 10b297: e8 48 1f 00 00 call 10d1e4 <_Thread_Clear_state> 10b29c: 83 c4 10 add $0x10,%esp 10b29f: eb c3 jmp 10b264 <_Event_Surrender+0x94> 10b2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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) || 10b2a4: 8b 35 e8 56 12 00 mov 0x1256e8,%esi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 10b2aa: 83 fe 02 cmp $0x2,%esi 10b2ad: 74 0d je 10b2bc <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b2af: 8b 35 e8 56 12 00 mov 0x1256e8,%esi * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b2b5: 4e dec %esi 10b2b6: 0f 85 52 ff ff ff jne 10b20e <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0xf6> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 22 je 10b2e8 <_Event_Surrender+0x118><== NEVER TAKEN 10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2c9: f7 d0 not %eax 10b2cb: 21 d0 and %edx,%eax 10b2cd: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2d6: 8b 43 28 mov 0x28(%ebx),%eax 10b2d9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2dc: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b2de: c7 05 e8 56 12 00 03 movl $0x3,0x1256e8 10b2e5: 00 00 00 } _ISR_Enable( level ); 10b2e8: ff 75 d4 pushl -0x2c(%ebp) 10b2eb: 9d popf return; 10b2ec: e9 73 ff ff ff jmp 10b264 <_Event_Surrender+0x94> =============================================================================== 0010b2f4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b2f4: 55 push %ebp 10b2f5: 89 e5 mov %esp,%ebp 10b2f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b2fa: 8d 45 f4 lea -0xc(%ebp),%eax 10b2fd: 50 push %eax 10b2fe: ff 75 08 pushl 0x8(%ebp) 10b301: e8 c6 22 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10b306: 83 c4 10 add $0x10,%esp 10b309: 8b 55 f4 mov -0xc(%ebp),%edx 10b30c: 85 d2 test %edx,%edx 10b30e: 75 37 jne 10b347 <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b310: 9c pushf 10b311: fa cli 10b312: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b313: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b31a: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10b320: 74 2a je 10b34c <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b322: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b329: 52 push %edx 10b32a: 9d popf 10b32b: 83 ec 08 sub $0x8,%esp 10b32e: 68 f8 ff 03 10 push $0x1003fff8 10b333: 50 push %eax 10b334: e8 ab 1e 00 00 call 10d1e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b339: a1 34 54 12 00 mov 0x125434,%eax 10b33e: 48 dec %eax 10b33f: a3 34 54 12 00 mov %eax,0x125434 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b344: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b347: c9 leave 10b348: c3 ret 10b349: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b34c: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10b352: 49 dec %ecx 10b353: 75 cd jne 10b322 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b355: c7 05 e8 56 12 00 02 movl $0x2,0x1256e8 10b35c: 00 00 00 10b35f: eb c1 jmp 10b322 <_Event_Timeout+0x2e> =============================================================================== 0011064c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11064c: 55 push %ebp 11064d: 89 e5 mov %esp,%ebp 11064f: 57 push %edi 110650: 56 push %esi 110651: 53 push %ebx 110652: 83 ec 2c sub $0x2c,%esp 110655: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 110658: 8d 47 04 lea 0x4(%edi),%eax 11065b: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 11065e: 8b 55 08 mov 0x8(%ebp),%edx 110661: 8b 52 10 mov 0x10(%edx),%edx 110664: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 110667: 39 c7 cmp %eax,%edi 110669: 0f 87 69 01 00 00 ja 1107d8 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11066f: 8b 5d 14 mov 0x14(%ebp),%ebx 110672: 85 db test %ebx,%ebx 110674: 0f 85 56 01 00 00 jne 1107d0 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11067a: 8b 45 08 mov 0x8(%ebp),%eax 11067d: 8b 48 08 mov 0x8(%eax),%ecx do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 110680: 39 c8 cmp %ecx,%eax 110682: 0f 84 50 01 00 00 je 1107d8 <_Heap_Allocate_aligned_with_boundary+0x18c> 110688: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 11068f: 8b 55 cc mov -0x34(%ebp),%edx 110692: 83 c2 07 add $0x7,%edx 110695: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 110698: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 11069f: 29 7d d0 sub %edi,-0x30(%ebp) 1106a2: eb 1e jmp 1106c2 <_Heap_Allocate_aligned_with_boundary+0x76> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106a4: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1106a7: 85 db test %ebx,%ebx 1106a9: 0f 85 f1 00 00 00 jne 1107a0 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 1106af: 8b 49 08 mov 0x8(%ecx),%ecx 1106b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1106b5: 40 inc %eax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1106b6: 39 4d 08 cmp %ecx,0x8(%ebp) 1106b9: 0f 84 25 01 00 00 je 1107e4 <_Heap_Allocate_aligned_with_boundary+0x198> 1106bf: 89 45 e4 mov %eax,-0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 1106c2: 8b 59 04 mov 0x4(%ecx),%ebx 1106c5: 39 5d dc cmp %ebx,-0x24(%ebp) 1106c8: 73 e5 jae 1106af <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1106ca: 8b 55 10 mov 0x10(%ebp),%edx 1106cd: 85 d2 test %edx,%edx 1106cf: 74 d3 je 1106a4 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1106d1: 8b 45 08 mov 0x8(%ebp),%eax 1106d4: 8b 40 14 mov 0x14(%eax),%eax 1106d7: 89 45 d8 mov %eax,-0x28(%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; 1106da: 83 e3 fe and $0xfffffffe,%ebx uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 1106dd: 8d 1c 19 lea (%ecx,%ebx,1),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106e0: 8d 51 08 lea 0x8(%ecx),%edx 1106e3: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1106e6: 8b 75 c8 mov -0x38(%ebp),%esi 1106e9: 29 c6 sub %eax,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 1106eb: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 1106ed: 03 5d d0 add -0x30(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1106f0: 89 d8 mov %ebx,%eax 1106f2: 31 d2 xor %edx,%edx 1106f4: f7 75 10 divl 0x10(%ebp) 1106f7: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 1106f9: 39 de cmp %ebx,%esi 1106fb: 73 0b jae 110708 <_Heap_Allocate_aligned_with_boundary+0xbc> 1106fd: 89 f0 mov %esi,%eax 1106ff: 31 d2 xor %edx,%edx 110701: f7 75 10 divl 0x10(%ebp) 110704: 89 f3 mov %esi,%ebx 110706: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110708: 8b 45 14 mov 0x14(%ebp),%eax 11070b: 85 c0 test %eax,%eax 11070d: 74 5b je 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 11070f: 8d 34 3b lea (%ebx,%edi,1),%esi 110712: 89 f0 mov %esi,%eax 110714: 31 d2 xor %edx,%edx 110716: f7 75 14 divl 0x14(%ebp) 110719: 89 f0 mov %esi,%eax 11071b: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 11071d: 39 c3 cmp %eax,%ebx 11071f: 73 49 jae 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> 110721: 39 c6 cmp %eax,%esi 110723: 76 45 jbe 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110725: 8b 55 d4 mov -0x2c(%ebp),%edx 110728: 01 fa add %edi,%edx 11072a: 89 55 e0 mov %edx,-0x20(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 11072d: 39 c2 cmp %eax,%edx 11072f: 0f 87 7a ff ff ff ja 1106af <_Heap_Allocate_aligned_with_boundary+0x63> 110735: 89 ce mov %ecx,%esi 110737: eb 10 jmp 110749 <_Heap_Allocate_aligned_with_boundary+0xfd> 110739: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 11073c: 39 c1 cmp %eax,%ecx 11073e: 76 28 jbe 110768 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110740: 39 45 e0 cmp %eax,-0x20(%ebp) 110743: 0f 87 9f 00 00 00 ja 1107e8 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110749: 89 c3 mov %eax,%ebx 11074b: 29 fb sub %edi,%ebx 11074d: 89 d8 mov %ebx,%eax 11074f: 31 d2 xor %edx,%edx 110751: f7 75 10 divl 0x10(%ebp) 110754: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110756: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110759: 89 c8 mov %ecx,%eax 11075b: 31 d2 xor %edx,%edx 11075d: f7 75 14 divl 0x14(%ebp) 110760: 89 c8 mov %ecx,%eax 110762: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110764: 39 c3 cmp %eax,%ebx 110766: 72 d4 jb 11073c <_Heap_Allocate_aligned_with_boundary+0xf0> 110768: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 11076a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11076d: 0f 87 3c ff ff ff ja 1106af <_Heap_Allocate_aligned_with_boundary+0x63> 110773: be f8 ff ff ff mov $0xfffffff8,%esi 110778: 29 ce sub %ecx,%esi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11077a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11077c: 89 d8 mov %ebx,%eax 11077e: 31 d2 xor %edx,%edx 110780: f7 75 cc divl -0x34(%ebp) uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 110783: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110785: 39 75 d8 cmp %esi,-0x28(%ebp) 110788: 0f 86 19 ff ff ff jbe 1106a7 <_Heap_Allocate_aligned_with_boundary+0x5b> 11078e: 85 f6 test %esi,%esi 110790: 0f 85 19 ff ff ff jne 1106af <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 110796: 85 db test %ebx,%ebx 110798: 0f 84 11 ff ff ff je 1106af <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 11079e: 66 90 xchg %ax,%ax search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 1107a0: 8b 45 08 mov 0x8(%ebp),%eax 1107a3: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 1107a6: 8b 55 e4 mov -0x1c(%ebp),%edx 1107a9: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1107ac: 57 push %edi 1107ad: 53 push %ebx 1107ae: 51 push %ecx 1107af: 50 push %eax 1107b0: e8 53 bf ff ff call 10c708 <_Heap_Block_allocate> 1107b5: 89 d8 mov %ebx,%eax 1107b7: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1107ba: 8b 55 e4 mov -0x1c(%ebp),%edx 1107bd: 8b 4d 08 mov 0x8(%ebp),%ecx 1107c0: 39 51 44 cmp %edx,0x44(%ecx) 1107c3: 73 15 jae 1107da <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 1107c5: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1107c8: 8d 65 f4 lea -0xc(%ebp),%esp 1107cb: 5b pop %ebx 1107cc: 5e pop %esi 1107cd: 5f pop %edi 1107ce: c9 leave 1107cf: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1107d0: 3b 7d 14 cmp 0x14(%ebp),%edi 1107d3: 76 1a jbe 1107ef <_Heap_Allocate_aligned_with_boundary+0x1a3> 1107d5: 8d 76 00 lea 0x0(%esi),%esi do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1107d8: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107da: 8d 65 f4 lea -0xc(%ebp),%esp 1107dd: 5b pop %ebx 1107de: 5e pop %esi 1107df: 5f pop %edi 1107e0: c9 leave 1107e1: c3 ret 1107e2: 66 90 xchg %ax,%ax <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1107e4: 31 c0 xor %eax,%eax 1107e6: eb d2 jmp 1107ba <_Heap_Allocate_aligned_with_boundary+0x16e> 1107e8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1107ea: e9 c0 fe ff ff jmp 1106af <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1107ef: 8b 4d 10 mov 0x10(%ebp),%ecx 1107f2: 85 c9 test %ecx,%ecx 1107f4: 0f 85 80 fe ff ff jne 11067a <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 1107fa: 89 55 10 mov %edx,0x10(%ebp) 1107fd: e9 78 fe ff ff jmp 11067a <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 0010c708 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c708: 55 push %ebp 10c709: 89 e5 mov %esp,%ebp 10c70b: 57 push %edi 10c70c: 56 push %esi 10c70d: 53 push %ebx 10c70e: 83 ec 14 sub $0x14,%esp 10c711: 8b 5d 08 mov 0x8(%ebp),%ebx 10c714: 8b 75 0c mov 0xc(%ebp),%esi 10c717: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c71a: 8d 50 f8 lea -0x8(%eax),%edx 10c71d: 89 55 f0 mov %edx,-0x10(%ebp) Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c720: 29 f2 sub %esi,%edx 10c722: 89 55 e4 mov %edx,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c725: 8b 4e 04 mov 0x4(%esi),%ecx 10c728: 89 4d e8 mov %ecx,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c72b: 89 ca mov %ecx,%edx 10c72d: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c730: 8d 0c 16 lea (%esi,%edx,1),%ecx 10c733: 89 4d ec mov %ecx,-0x14(%ebp) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c736: f6 41 04 01 testb $0x1,0x4(%ecx) 10c73a: 0f 85 80 00 00 00 jne 10c7c0 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c740: 8b 4e 0c mov 0xc(%esi),%ecx } _Heap_Protection_block_initialize( heap, block ); return block; } 10c743: 8b 7e 08 mov 0x8(%esi),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 10c746: 89 79 08 mov %edi,0x8(%ecx) next->prev = prev; 10c749: 89 4f 0c mov %ecx,0xc(%edi) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c74c: ff 4b 38 decl 0x38(%ebx) ++stats->used_blocks; 10c74f: ff 43 40 incl 0x40(%ebx) stats->free_size -= _Heap_Block_size( block ); 10c752: 29 53 30 sub %edx,0x30(%ebx) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c755: 8b 53 10 mov 0x10(%ebx),%edx 10c758: 89 55 e0 mov %edx,-0x20(%ebp) 10c75b: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c75e: 72 6d jb 10c7cd <_Heap_Block_allocate+0xc5> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c760: 31 d2 xor %edx,%edx 10c762: f7 75 e0 divl -0x20(%ebp) 10c765: 89 d7 mov %edx,%edi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10c767: 8b 55 f0 mov -0x10(%ebp),%edx 10c76a: 29 fa sub %edi,%edx 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 ) 10c76c: 89 55 f0 mov %edx,-0x10(%ebp) uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; 10c76f: 8b 45 ec mov -0x14(%ebp),%eax 10c772: 29 d0 sub %edx,%eax 10c774: 89 45 ec mov %eax,-0x14(%ebp) block_end = new_block_begin; block_size = block_end - block_begin; 10c777: 89 d0 mov %edx,%eax 10c779: 29 f0 sub %esi,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c77b: 01 43 30 add %eax,0x30(%ebx) if ( _Heap_Is_prev_used( block ) ) { 10c77e: f6 45 e8 01 testb $0x1,-0x18(%ebp) 10c782: 75 60 jne 10c7e4 <_Heap_Block_allocate+0xdc> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c784: 2b 36 sub (%esi),%esi - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c786: 8b 7e 04 mov 0x4(%esi),%edi 10c789: 83 e7 fe and $0xfffffffe,%edi Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10c78c: 01 f8 add %edi,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c78e: 89 c7 mov %eax,%edi 10c790: 83 cf 01 or $0x1,%edi 10c793: 89 7e 04 mov %edi,0x4(%esi) new_block->prev_size = block_size; 10c796: 89 02 mov %eax,(%edx) new_block->size_and_flag = new_block_size; 10c798: 8b 45 ec mov -0x14(%ebp),%eax 10c79b: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c79e: ff 75 14 pushl 0x14(%ebp) 10c7a1: 89 d8 mov %ebx,%eax 10c7a3: e8 f0 fc ff ff call 10c498 <_Heap_Block_split> 10c7a8: 58 pop %eax alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c7a9: 8b 43 30 mov 0x30(%ebx),%eax 10c7ac: 39 43 34 cmp %eax,0x34(%ebx) 10c7af: 76 03 jbe 10c7b4 <_Heap_Block_allocate+0xac> stats->min_free_size = stats->free_size; 10c7b1: 89 43 34 mov %eax,0x34(%ebx) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c7b4: 8b 45 f0 mov -0x10(%ebp),%eax 10c7b7: 8d 65 f4 lea -0xc(%ebp),%esp 10c7ba: 5b pop %ebx 10c7bb: 5e pop %esi 10c7bc: 5f pop %edi 10c7bd: c9 leave 10c7be: c3 ret 10c7bf: 90 nop <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c7c0: 89 d9 mov %ebx,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c7c2: 8b 53 10 mov 0x10(%ebx),%edx 10c7c5: 89 55 e0 mov %edx,-0x20(%ebp) 10c7c8: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c7cb: 73 93 jae 10c760 <_Heap_Block_allocate+0x58> alloc_size += alloc_area_offset; 10c7cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10c7d0: 03 45 14 add 0x14(%ebp),%eax Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c7d3: 50 push %eax 10c7d4: 89 f2 mov %esi,%edx 10c7d6: 89 d8 mov %ebx,%eax 10c7d8: e8 bb fc ff ff call 10c498 <_Heap_Block_split> 10c7dd: 5a pop %edx 10c7de: 89 75 f0 mov %esi,-0x10(%ebp) 10c7e1: eb c6 jmp 10c7a9 <_Heap_Block_allocate+0xa1> 10c7e3: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c7e4: 8b 79 08 mov 0x8(%ecx),%edi new_block->next = next; 10c7e7: 89 7e 08 mov %edi,0x8(%esi) new_block->prev = block_before; 10c7ea: 89 4e 0c mov %ecx,0xc(%esi) block_before->next = new_block; 10c7ed: 89 71 08 mov %esi,0x8(%ecx) next->prev = new_block; 10c7f0: 89 77 0c mov %esi,0xc(%edi) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c7f3: ff 43 38 incl 0x38(%ebx) 10c7f6: 89 f1 mov %esi,%ecx 10c7f8: eb 94 jmp 10c78e <_Heap_Block_allocate+0x86> =============================================================================== 0010c498 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c498: 55 push %ebp 10c499: 89 e5 mov %esp,%ebp 10c49b: 57 push %edi 10c49c: 56 push %esi 10c49d: 53 push %ebx 10c49e: 83 ec 18 sub $0x18,%esp 10c4a1: 89 c3 mov %eax,%ebx 10c4a3: 89 d6 mov %edx,%esi Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c4a5: 8b 78 10 mov 0x10(%eax),%edi uintptr_t const min_block_size = heap->min_block_size; 10c4a8: 8b 40 14 mov 0x14(%eax),%eax 10c4ab: 89 45 e4 mov %eax,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c4ae: 8b 52 04 mov 0x4(%edx),%edx 10c4b1: 89 55 e0 mov %edx,-0x20(%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; 10c4b4: 83 e2 fe and $0xfffffffe,%edx 10c4b7: 89 55 ec mov %edx,-0x14(%ebp) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; 10c4ba: 89 c2 mov %eax,%edx 10c4bc: 83 ea 08 sub $0x8,%edx return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; 10c4bf: 8b 45 08 mov 0x8(%ebp),%eax 10c4c2: 39 d0 cmp %edx,%eax 10c4c4: 73 02 jae 10c4c8 <_Heap_Block_split+0x30> 10c4c6: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c4c8: 83 c0 08 add $0x8,%eax 10c4cb: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c4ce: 31 d2 xor %edx,%edx 10c4d0: f7 f7 div %edi if ( remainder != 0 ) { 10c4d2: 85 d2 test %edx,%edx 10c4d4: 0f 84 8e 00 00 00 je 10c568 <_Heap_Block_split+0xd0> return value - remainder + alignment; 10c4da: 03 7d f0 add -0x10(%ebp),%edi 10c4dd: 29 d7 sub %edx,%edi 10c4df: 89 7d e8 mov %edi,-0x18(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c4e2: 8b 45 ec mov -0x14(%ebp),%eax 10c4e5: 01 f0 add %esi,%eax 10c4e7: 89 45 dc mov %eax,-0x24(%ebp) _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; 10c4ea: 8b 55 ec mov -0x14(%ebp),%edx 10c4ed: 83 c2 04 add $0x4,%edx 10c4f0: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS; 10c4f3: 8b 7d e4 mov -0x1c(%ebp),%edi 10c4f6: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { 10c4f9: 39 fa cmp %edi,%edx 10c4fb: 72 77 jb 10c574 <_Heap_Block_split+0xdc> 10c4fd: 8b 55 e8 mov -0x18(%ebp),%edx 10c500: 01 f2 add %esi,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c502: 8b 7d ec mov -0x14(%ebp),%edi 10c505: 2b 7d e8 sub -0x18(%ebp),%edi 10c508: 89 7d ec mov %edi,-0x14(%ebp) 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; 10c50b: 8b 7d e0 mov -0x20(%ebp),%edi 10c50e: 83 e7 01 and $0x1,%edi 10c511: 89 7d f0 mov %edi,-0x10(%ebp) block->size_and_flag = size | flag; 10c514: 8b 7d e8 mov -0x18(%ebp),%edi 10c517: 09 7d f0 or %edi,-0x10(%ebp) 10c51a: 8b 7d f0 mov -0x10(%ebp),%edi 10c51d: 89 7e 04 mov %edi,0x4(%esi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c520: 8b 75 ec mov -0x14(%ebp),%esi 10c523: 01 73 30 add %esi,0x30(%ebx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c526: 8b 70 04 mov 0x4(%eax),%esi 10c529: 83 e6 fe and $0xfffffffe,%esi if ( _Heap_Is_used( next_block ) ) { 10c52c: f6 44 30 04 01 testb $0x1,0x4(%eax,%esi,1) 10c531: 75 51 jne 10c584 <_Heap_Block_split+0xec> } _Heap_Protection_block_initialize( heap, block ); return block; } 10c533: 8b 48 08 mov 0x8(%eax),%ecx 10c536: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c539: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c53c: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c53f: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c542: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c545: 01 75 ec add %esi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c548: 8b 45 ec mov -0x14(%ebp),%eax 10c54b: 01 d0 add %edx,%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c54d: 8b 4d ec mov -0x14(%ebp),%ecx 10c550: 83 c9 01 or $0x1,%ecx 10c553: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c556: 8b 7d ec mov -0x14(%ebp),%edi 10c559: 89 38 mov %edi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c55b: 83 60 04 fe andl $0xfffffffe,0x4(%eax) _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c55f: 83 c4 18 add $0x18,%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c568: 8b 7d f0 mov -0x10(%ebp),%edi 10c56b: 89 7d e8 mov %edi,-0x18(%ebp) 10c56e: e9 6f ff ff ff jmp 10c4e2 <_Heap_Block_split+0x4a> 10c573: 90 nop <== NOT EXECUTED next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c574: 8b 45 dc mov -0x24(%ebp),%eax 10c577: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c57b: 83 c4 18 add $0x18,%esp 10c57e: 5b pop %ebx 10c57f: 5e pop %esi 10c580: 5f pop %edi 10c581: c9 leave 10c582: c3 ret 10c583: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c584: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10c587: 89 72 08 mov %esi,0x8(%edx) new_block->prev = block_before; 10c58a: 89 4a 0c mov %ecx,0xc(%edx) block_before->next = new_block; 10c58d: 89 51 08 mov %edx,0x8(%ecx) next->prev = new_block; 10c590: 89 56 0c mov %edx,0xc(%esi) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c593: ff 43 38 incl 0x38(%ebx) 10c596: eb b5 jmp 10c54d <_Heap_Block_split+0xb5> =============================================================================== 00110bd0 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110bd0: 55 push %ebp 110bd1: 89 e5 mov %esp,%ebp 110bd3: 57 push %edi 110bd4: 56 push %esi 110bd5: 53 push %ebx 110bd6: 83 ec 4c sub $0x4c,%esp 110bd9: 8b 5d 08 mov 0x8(%ebp),%ebx 110bdc: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110bdf: 8b 43 20 mov 0x20(%ebx),%eax 110be2: 89 45 d0 mov %eax,-0x30(%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; 110be5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110bec: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110bf3: 8b 53 10 mov 0x10(%ebx),%edx 110bf6: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110bf9: 8b 43 14 mov 0x14(%ebx),%eax 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; 110bfc: 8b 73 30 mov 0x30(%ebx),%esi 110bff: 89 75 c0 mov %esi,-0x40(%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 ) { 110c02: 8b 55 0c mov 0xc(%ebp),%edx 110c05: 01 ca add %ecx,%edx 110c07: 89 55 cc mov %edx,-0x34(%ebp) 110c0a: 73 0c jae 110c18 <_Heap_Extend+0x48> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 110c0c: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110c0e: 8d 65 f4 lea -0xc(%ebp),%esp 110c11: 5b pop %ebx 110c12: 5e pop %esi 110c13: 5f pop %edi 110c14: c9 leave 110c15: c3 ret 110c16: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 110c18: 83 ec 08 sub $0x8,%esp 110c1b: 8d 55 e0 lea -0x20(%ebp),%edx 110c1e: 52 push %edx 110c1f: 8d 55 e4 lea -0x1c(%ebp),%edx 110c22: 52 push %edx 110c23: 50 push %eax 110c24: ff 75 d4 pushl -0x2c(%ebp) 110c27: 51 push %ecx 110c28: ff 75 0c pushl 0xc(%ebp) 110c2b: e8 e4 bc ff ff call 10c914 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110c30: 83 c4 20 add $0x20,%esp 110c33: 84 c0 test %al,%al 110c35: 74 d5 je 110c0c <_Heap_Extend+0x3c> 110c37: 8b 7d d0 mov -0x30(%ebp),%edi 110c3a: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110c41: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110c48: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110c4f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110c56: 8b 75 cc mov -0x34(%ebp),%esi 110c59: 89 5d b4 mov %ebx,-0x4c(%ebp) 110c5c: eb 30 jmp 110c8e <_Heap_Extend+0xbe> 110c5e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 110c60: 39 ce cmp %ecx,%esi 110c62: 73 03 jae 110c67 <_Heap_Extend+0x97> 110c64: 89 7d b8 mov %edi,-0x48(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110c67: 8d 59 f8 lea -0x8(%ecx),%ebx 110c6a: 89 c8 mov %ecx,%eax 110c6c: 31 d2 xor %edx,%edx 110c6e: f7 75 d4 divl -0x2c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 110c71: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110c73: 3b 4d 0c cmp 0xc(%ebp),%ecx 110c76: 74 3c je 110cb4 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110c78: 39 4d 0c cmp %ecx,0xc(%ebp) 110c7b: 76 03 jbe 110c80 <_Heap_Extend+0xb0> 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 ) 110c7d: 89 5d bc mov %ebx,-0x44(%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; 110c80: 8b 7b 04 mov 0x4(%ebx),%edi 110c83: 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); 110c86: 8d 3c 3b lea (%ebx,%edi,1),%edi link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110c89: 39 7d d0 cmp %edi,-0x30(%ebp) 110c8c: 74 39 je 110cc7 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110c8e: 3b 7d d0 cmp -0x30(%ebp),%edi 110c91: 0f 84 35 01 00 00 je 110dcc <_Heap_Extend+0x1fc> 110c97: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110c99: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110c9b: 39 4d 0c cmp %ecx,0xc(%ebp) 110c9e: 73 08 jae 110ca8 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110ca0: 39 f0 cmp %esi,%eax 110ca2: 0f 82 64 ff ff ff jb 110c0c <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110ca8: 39 f0 cmp %esi,%eax 110caa: 75 b4 jne 110c60 <_Heap_Extend+0x90> 110cac: 89 7d c4 mov %edi,-0x3c(%ebp) 110caf: eb b6 jmp 110c67 <_Heap_Extend+0x97> 110cb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 110cb4: 89 37 mov %esi,(%edi) 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 ) 110cb6: 89 5d c8 mov %ebx,-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; 110cb9: 8b 7b 04 mov 0x4(%ebx),%edi 110cbc: 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); 110cbf: 8d 3c 3b lea (%ebx,%edi,1),%edi } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110cc2: 39 7d d0 cmp %edi,-0x30(%ebp) 110cc5: 75 c7 jne 110c8e <_Heap_Extend+0xbe> <== NEVER TAKEN 110cc7: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110cca: 8b 75 0c mov 0xc(%ebp),%esi 110ccd: 3b 73 18 cmp 0x18(%ebx),%esi 110cd0: 0f 82 02 01 00 00 jb 110dd8 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110cd6: 8b 45 cc mov -0x34(%ebp),%eax 110cd9: 3b 43 1c cmp 0x1c(%ebx),%eax 110cdc: 76 03 jbe 110ce1 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110cde: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110ce1: 8b 55 e0 mov -0x20(%ebp),%edx 110ce4: 8b 45 e4 mov -0x1c(%ebp),%eax heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 110ce7: 89 d1 mov %edx,%ecx 110ce9: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110ceb: 8b 75 cc mov -0x34(%ebp),%esi 110cee: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110cf0: 89 ce mov %ecx,%esi 110cf2: 83 ce 01 or $0x1,%esi 110cf5: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 110cf8: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110cfa: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 110d01: 39 43 20 cmp %eax,0x20(%ebx) 110d04: 0f 86 d6 00 00 00 jbe 110de0 <_Heap_Extend+0x210> heap->first_block = extend_first_block; 110d0a: 89 43 20 mov %eax,0x20(%ebx) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 110d0d: 8b 75 c4 mov -0x3c(%ebp),%esi 110d10: 85 f6 test %esi,%esi 110d12: 0f 84 04 01 00 00 je 110e1c <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110d18: 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 ); 110d1b: 8b 4d 0c mov 0xc(%ebp),%ecx 110d1e: 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; 110d21: 89 c8 mov %ecx,%eax 110d23: 31 d2 xor %edx,%edx 110d25: f7 f6 div %esi if ( remainder != 0 ) { 110d27: 85 d2 test %edx,%edx 110d29: 74 04 je 110d2f <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 110d2b: 01 f1 add %esi,%ecx <== NOT EXECUTED 110d2d: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 110d2f: 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; 110d32: 8b 75 c4 mov -0x3c(%ebp),%esi 110d35: 8b 06 mov (%esi),%eax 110d37: 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 = 110d3a: 89 f0 mov %esi,%eax 110d3c: 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; 110d3e: 83 c8 01 or $0x1,%eax 110d41: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110d44: 89 d8 mov %ebx,%eax 110d46: e8 69 fe ff ff call 110bb4 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110d4b: 8b 45 c8 mov -0x38(%ebp),%eax 110d4e: 85 c0 test %eax,%eax 110d50: 0f 84 9e 00 00 00 je 110df4 <_Heap_Extend+0x224> ) { 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, 110d56: 8b 4d cc mov -0x34(%ebp),%ecx 110d59: 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( 110d5c: 2b 4d c8 sub -0x38(%ebp),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110d5f: 89 c8 mov %ecx,%eax 110d61: 31 d2 xor %edx,%edx 110d63: f7 73 10 divl 0x10(%ebx) 110d66: 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) 110d68: 8b 55 c8 mov -0x38(%ebp),%edx 110d6b: 8b 42 04 mov 0x4(%edx),%eax 110d6e: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110d70: 83 c8 01 or $0x1,%eax 110d73: 89 44 11 04 mov %eax,0x4(%ecx,%edx,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; 110d77: 8b 42 04 mov 0x4(%edx),%eax 110d7a: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110d7d: 09 c8 or %ecx,%eax 110d7f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110d82: 89 d8 mov %ebx,%eax 110d84: e8 2b fe ff ff call 110bb4 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110d89: 8b 75 c4 mov -0x3c(%ebp),%esi 110d8c: 85 f6 test %esi,%esi 110d8e: 0f 84 a4 00 00 00 je 110e38 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110d94: 8b 53 24 mov 0x24(%ebx),%edx * 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( 110d97: 8b 43 20 mov 0x20(%ebx),%eax 110d9a: 29 d0 sub %edx,%eax 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; 110d9c: 8b 4a 04 mov 0x4(%edx),%ecx 110d9f: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110da2: 09 c8 or %ecx,%eax 110da4: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 110da7: 8b 43 30 mov 0x30(%ebx),%eax 110daa: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110dad: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110db0: 8b 55 14 mov 0x14(%ebp),%edx 110db3: 85 d2 test %edx,%edx 110db5: 0f 84 99 00 00 00 je 110e54 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 110dbb: 8b 55 14 mov 0x14(%ebp),%edx 110dbe: 89 02 mov %eax,(%edx) return true; 110dc0: b0 01 mov $0x1,%al } 110dc2: 8d 65 f4 lea -0xc(%ebp),%esp 110dc5: 5b pop %ebx 110dc6: 5e pop %esi 110dc7: 5f pop %edi 110dc8: c9 leave 110dc9: c3 ret 110dca: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110dcc: 8b 55 b4 mov -0x4c(%ebp),%edx 110dcf: 8b 42 18 mov 0x18(%edx),%eax 110dd2: e9 c2 fe ff ff jmp 110c99 <_Heap_Extend+0xc9> 110dd7: 90 nop <== NOT EXECUTED start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 110dd8: 89 73 18 mov %esi,0x18(%ebx) 110ddb: e9 01 ff ff ff jmp 110ce1 <_Heap_Extend+0x111> extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 110de0: 39 53 24 cmp %edx,0x24(%ebx) 110de3: 0f 83 24 ff ff ff jae 110d0d <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110de9: 89 53 24 mov %edx,0x24(%ebx) 110dec: e9 1c ff ff ff jmp 110d0d <_Heap_Extend+0x13d> 110df1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 110df4: 8b 7d bc mov -0x44(%ebp),%edi 110df7: 85 ff test %edi,%edi 110df9: 74 8e je 110d89 <_Heap_Extend+0x1b9> _Heap_Link_above( 110dfb: 8b 4d e0 mov -0x20(%ebp),%ecx ) { 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 ); 110dfe: 8b 45 e4 mov -0x1c(%ebp),%eax 110e01: 2b 45 bc sub -0x44(%ebp),%eax 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; 110e04: 8b 75 bc mov -0x44(%ebp),%esi 110e07: 8b 56 04 mov 0x4(%esi),%edx 110e0a: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110e0d: 09 d0 or %edx,%eax 110e0f: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110e12: 83 49 04 01 orl $0x1,0x4(%ecx) 110e16: e9 6e ff ff ff jmp 110d89 <_Heap_Extend+0x1b9> 110e1b: 90 nop <== NOT EXECUTED 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 ) { 110e1c: 8b 4d b8 mov -0x48(%ebp),%ecx 110e1f: 85 c9 test %ecx,%ecx 110e21: 0f 84 24 ff ff ff je 110d4b <_Heap_Extend+0x17b> { 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; 110e27: 8b 45 b8 mov -0x48(%ebp),%eax 110e2a: 29 d0 sub %edx,%eax 110e2c: 83 c8 01 or $0x1,%eax 110e2f: 89 42 04 mov %eax,0x4(%edx) 110e32: e9 14 ff ff ff jmp 110d4b <_Heap_Extend+0x17b> 110e37: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110e38: 8b 4d c8 mov -0x38(%ebp),%ecx 110e3b: 85 c9 test %ecx,%ecx 110e3d: 0f 85 51 ff ff ff jne 110d94 <_Heap_Extend+0x1c4> _Heap_Free_block( heap, extend_first_block ); 110e43: 8b 55 e4 mov -0x1c(%ebp),%edx 110e46: 89 d8 mov %ebx,%eax 110e48: e8 67 fd ff ff call 110bb4 <_Heap_Free_block> 110e4d: e9 42 ff ff ff jmp 110d94 <_Heap_Extend+0x1c4> 110e52: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110e54: b0 01 mov $0x1,%al <== NOT EXECUTED 110e56: e9 b3 fd ff ff jmp 110c0e <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110804 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110804: 55 push %ebp 110805: 89 e5 mov %esp,%ebp 110807: 57 push %edi 110808: 56 push %esi 110809: 53 push %ebx 11080a: 83 ec 10 sub $0x10,%esp 11080d: 8b 5d 08 mov 0x8(%ebp),%ebx 110810: 8b 45 0c mov 0xc(%ebp),%eax 110813: 8d 48 f8 lea -0x8(%eax),%ecx 110816: 31 d2 xor %edx,%edx 110818: 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); 11081b: 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 11081d: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 110820: 39 c1 cmp %eax,%ecx 110822: 72 07 jb 11082b <_Heap_Free+0x27> 110824: 8b 73 24 mov 0x24(%ebx),%esi 110827: 39 f1 cmp %esi,%ecx 110829: 76 0d jbe 110838 <_Heap_Free+0x34> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 11082b: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11082d: 83 c4 10 add $0x10,%esp 110830: 5b pop %ebx 110831: 5e pop %esi 110832: 5f pop %edi 110833: c9 leave 110834: c3 ret 110835: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110838: 8b 51 04 mov 0x4(%ecx),%edx 11083b: 89 55 f0 mov %edx,-0x10(%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; 11083e: 83 e2 fe and $0xfffffffe,%edx 110841: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110844: 8d 14 11 lea (%ecx,%edx,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; 110847: 39 d0 cmp %edx,%eax 110849: 77 e0 ja 11082b <_Heap_Free+0x27> <== NEVER TAKEN 11084b: 39 d6 cmp %edx,%esi 11084d: 72 dc jb 11082b <_Heap_Free+0x27> <== NEVER TAKEN 11084f: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 110852: f7 c7 01 00 00 00 test $0x1,%edi 110858: 74 d1 je 11082b <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11085a: 83 e7 fe and $0xfffffffe,%edi 11085d: 89 7d e4 mov %edi,-0x1c(%ebp) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110860: 39 d6 cmp %edx,%esi 110862: 0f 84 c8 00 00 00 je 110930 <_Heap_Free+0x12c> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110868: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 11086d: 0f 94 45 eb sete -0x15(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 110871: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110875: 75 45 jne 1108bc <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 110877: 8b 39 mov (%ecx),%edi 110879: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11087c: 29 f9 sub %edi,%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; 11087e: 39 c8 cmp %ecx,%eax 110880: 77 a9 ja 11082b <_Heap_Free+0x27> <== NEVER TAKEN 110882: 39 ce cmp %ecx,%esi 110884: 72 a5 jb 11082b <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 110886: f6 41 04 01 testb $0x1,0x4(%ecx) 11088a: 74 9f je 11082b <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11088c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 110890: 0f 84 a6 00 00 00 je 11093c <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 110896: 8b 7d e4 mov -0x1c(%ebp),%edi 110899: 03 7d ec add -0x14(%ebp),%edi 11089c: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11089f: 8b 42 08 mov 0x8(%edx),%eax 1108a2: 8b 52 0c mov 0xc(%edx),%edx RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 1108a5: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1108a8: 89 50 0c mov %edx,0xc(%eax) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 1108ab: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108ae: 89 f8 mov %edi,%eax 1108b0: 83 c8 01 or $0x1,%eax 1108b3: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1108b6: 89 3c 39 mov %edi,(%ecx,%edi,1) 1108b9: eb 2a jmp 1108e5 <_Heap_Free+0xe1> 1108bb: 90 nop <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 1108bc: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108c0: 74 3a je 1108fc <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 1108c2: 8b 7d e4 mov -0x1c(%ebp),%edi 1108c5: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108c8: 8b 42 08 mov 0x8(%edx),%eax 1108cb: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1108ce: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1108d1: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1108d4: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1108d7: 89 4a 08 mov %ecx,0x8(%edx) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108da: 89 f8 mov %edi,%eax 1108dc: 83 c8 01 or $0x1,%eax 1108df: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1108e2: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1108e5: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1108e8: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1108eb: 8b 55 ec mov -0x14(%ebp),%edx 1108ee: 01 53 30 add %edx,0x30(%ebx) return( true ); 1108f1: b0 01 mov $0x1,%al } 1108f3: 83 c4 10 add $0x10,%esp 1108f6: 5b pop %ebx 1108f7: 5e pop %esi 1108f8: 5f pop %edi 1108f9: c9 leave 1108fa: c3 ret 1108fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 1108fc: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1108ff: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110902: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110905: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110908: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 11090b: 8b 45 ec mov -0x14(%ebp),%eax 11090e: 83 c8 01 or $0x1,%eax 110911: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110914: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110918: 8b 45 ec mov -0x14(%ebp),%eax 11091b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 11091d: 8b 43 38 mov 0x38(%ebx),%eax 110920: 40 inc %eax 110921: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 110924: 3b 43 3c cmp 0x3c(%ebx),%eax 110927: 76 bc jbe 1108e5 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 110929: 89 43 3c mov %eax,0x3c(%ebx) 11092c: eb b7 jmp 1108e5 <_Heap_Free+0xe1> 11092e: 66 90 xchg %ax,%ax <== NOT EXECUTED return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110930: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110934: e9 38 ff ff ff jmp 110871 <_Heap_Free+0x6d> 110939: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 11093c: 8b 45 ec mov -0x14(%ebp),%eax 11093f: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110942: 89 c6 mov %eax,%esi 110944: 83 ce 01 or $0x1,%esi 110947: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11094a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11094e: 89 02 mov %eax,(%edx) 110950: eb 93 jmp 1108e5 <_Heap_Free+0xe1> =============================================================================== 0010c598 <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 57 push %edi 10c59c: 56 push %esi 10c59d: 53 push %ebx 10c59e: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5a1: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c5a4: 8d 34 1f lea (%edi,%ebx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c5a7: 8d 4b 08 lea 0x8(%ebx),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5aa: 89 c8 mov %ecx,%eax 10c5ac: 31 d2 xor %edx,%edx 10c5ae: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c5b1: 85 d2 test %edx,%edx 10c5b3: 74 05 je 10c5ba <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c5b5: 03 4d 10 add 0x10(%ebp),%ecx 10c5b8: 29 d1 sub %edx,%ecx _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 10c5ba: 39 f3 cmp %esi,%ebx 10c5bc: 77 2e ja 10c5ec <_Heap_Get_first_and_last_block+0x54> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c5be: 8d 71 f8 lea -0x8(%ecx),%esi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 10c5c1: 29 d9 sub %ebx,%ecx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c5c3: 39 cf cmp %ecx,%edi 10c5c5: 76 25 jbe 10c5ec <_Heap_Get_first_and_last_block+0x54> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 10c5c7: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c5c9: 89 f8 mov %edi,%eax 10c5cb: 31 d2 xor %edx,%edx 10c5cd: f7 75 10 divl 0x10(%ebp) 10c5d0: 29 d7 sub %edx,%edi _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 10c5d2: 39 7d 14 cmp %edi,0x14(%ebp) 10c5d5: 77 15 ja 10c5ec <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c5d7: 8b 45 18 mov 0x18(%ebp),%eax 10c5da: 89 30 mov %esi,(%eax) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c5dc: 01 f7 add %esi,%edi 10c5de: 8b 45 1c mov 0x1c(%ebp),%eax 10c5e1: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c5e3: b0 01 mov $0x1,%al } 10c5e5: 5b pop %ebx 10c5e6: 5e pop %esi 10c5e7: 5f pop %edi 10c5e8: c9 leave 10c5e9: c3 ret 10c5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c5ec: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c5ee: 5b pop %ebx 10c5ef: 5e pop %esi 10c5f0: 5f pop %edi 10c5f1: c9 leave 10c5f2: c3 ret =============================================================================== 001144cc <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1144cc: 55 push %ebp 1144cd: 89 e5 mov %esp,%ebp 1144cf: 57 push %edi 1144d0: 56 push %esi 1144d1: 53 push %ebx 1144d2: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1144d5: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1144db: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1144e2: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1144e9: 8b 45 08 mov 0x8(%ebp),%eax 1144ec: 8b 50 08 mov 0x8(%eax),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1144ef: 39 d0 cmp %edx,%eax 1144f1: 74 31 je 114524 <_Heap_Get_free_information+0x58> 1144f3: bb 01 00 00 00 mov $0x1,%ebx 1144f8: 31 f6 xor %esi,%esi 1144fa: 31 c9 xor %ecx,%ecx 1144fc: eb 07 jmp 114505 <_Heap_Get_free_information+0x39> 1144fe: 66 90 xchg %ax,%ax <== NOT EXECUTED 114500: 8b 77 04 mov 0x4(%edi),%esi 114503: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 114505: 8b 42 04 mov 0x4(%edx),%eax 114508: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 11450b: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 11450d: 39 f0 cmp %esi,%eax 11450f: 76 03 jbe 114514 <_Heap_Get_free_information+0x48> info->largest = the_size; 114511: 89 47 04 mov %eax,0x4(%edi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 114514: 8b 52 08 mov 0x8(%edx),%edx 114517: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 11451a: 39 55 08 cmp %edx,0x8(%ebp) 11451d: 75 e1 jne 114500 <_Heap_Get_free_information+0x34> 11451f: 89 1f mov %ebx,(%edi) 114521: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114524: 5b pop %ebx 114525: 5e pop %esi 114526: 5f pop %edi 114527: c9 leave 114528: c3 ret =============================================================================== 0011137c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 11137c: 55 push %ebp 11137d: 89 e5 mov %esp,%ebp 11137f: 57 push %edi 111380: 56 push %esi 111381: 53 push %ebx 111382: 8b 45 08 mov 0x8(%ebp),%eax 111385: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111388: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 11138b: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 11138e: b9 18 00 00 00 mov $0x18,%ecx 111393: 31 c0 xor %eax,%eax 111395: 89 df mov %ebx,%edi 111397: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 111399: 39 f2 cmp %esi,%edx 11139b: 74 33 je 1113d0 <_Heap_Get_information+0x54><== NEVER TAKEN 11139d: 8b 7a 04 mov 0x4(%edx),%edi 1113a0: eb 16 jmp 1113b8 <_Heap_Get_information+0x3c> 1113a2: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 1113a4: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 1113a7: ff 00 incl (%eax) info->total += the_size; 1113a9: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 1113ac: 39 48 04 cmp %ecx,0x4(%eax) 1113af: 73 03 jae 1113b4 <_Heap_Get_information+0x38> info->largest = the_size; 1113b1: 89 48 04 mov %ecx,0x4(%eax) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 1113b4: 39 d6 cmp %edx,%esi 1113b6: 74 18 je 1113d0 <_Heap_Get_information+0x54> - 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; 1113b8: 89 f9 mov %edi,%ecx 1113ba: 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); 1113bd: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1113bf: 8b 7a 04 mov 0x4(%edx),%edi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 1113c2: f7 c7 01 00 00 00 test $0x1,%edi 1113c8: 75 da jne 1113a4 <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 1113ca: 89 d8 mov %ebx,%eax 1113cc: eb d9 jmp 1113a7 <_Heap_Get_information+0x2b> 1113ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1113d0: 5b pop %ebx 1113d1: 5e pop %esi 1113d2: 5f pop %edi 1113d3: c9 leave 1113d4: c3 ret =============================================================================== 0010c5f4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c5f4: 55 push %ebp 10c5f5: 89 e5 mov %esp,%ebp 10c5f7: 57 push %edi 10c5f8: 56 push %esi 10c5f9: 53 push %ebx 10c5fa: 83 ec 18 sub $0x18,%esp 10c5fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c600: 8b 7d 10 mov 0x10(%ebp),%edi 10c603: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t first_block_begin = 0; uintptr_t first_block_size = 0; uintptr_t last_block_begin = 0; uintptr_t min_block_size = 0; bool area_ok = false; Heap_Block *first_block = NULL; 10c606: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c60d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c614: 85 f6 test %esi,%esi 10c616: 74 2c je 10c644 <_Heap_Initialize+0x50> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c618: 89 f0 mov %esi,%eax 10c61a: 83 e0 03 and $0x3,%eax 10c61d: 74 05 je 10c624 <_Heap_Initialize+0x30> return value - remainder + alignment; 10c61f: 83 c6 04 add $0x4,%esi 10c622: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c624: 83 fe 03 cmp $0x3,%esi 10c627: 76 45 jbe 10c66e <_Heap_Initialize+0x7a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c629: b8 10 00 00 00 mov $0x10,%eax 10c62e: 31 d2 xor %edx,%edx 10c630: f7 f6 div %esi 10c632: 89 d1 mov %edx,%ecx if ( remainder != 0 ) { 10c634: 85 d2 test %edx,%edx 10c636: 0f 84 bf 00 00 00 je 10c6fb <_Heap_Initialize+0x107> return value - remainder + alignment; 10c63c: 8d 56 10 lea 0x10(%esi),%edx 10c63f: 29 ca sub %ecx,%edx 10c641: eb 0b jmp 10c64e <_Heap_Initialize+0x5a> 10c643: 90 nop <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c644: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c649: ba 10 00 00 00 mov $0x10,%edx return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c64e: 8d 45 ec lea -0x14(%ebp),%eax 10c651: 50 push %eax 10c652: 8d 45 f0 lea -0x10(%ebp),%eax 10c655: 50 push %eax 10c656: 52 push %edx 10c657: 56 push %esi 10c658: 57 push %edi 10c659: ff 75 0c pushl 0xc(%ebp) 10c65c: 89 55 dc mov %edx,-0x24(%ebp) 10c65f: e8 34 ff ff ff call 10c598 <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c664: 83 c4 18 add $0x18,%esp 10c667: 84 c0 test %al,%al 10c669: 8b 55 dc mov -0x24(%ebp),%edx 10c66c: 75 0a jne 10c678 <_Heap_Initialize+0x84> return 0; 10c66e: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c670: 8d 65 f4 lea -0xc(%ebp),%esp 10c673: 5b pop %ebx 10c674: 5e pop %esi 10c675: 5f pop %edi 10c676: c9 leave 10c677: c3 ret uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c678: 03 7d 0c add 0xc(%ebp),%edi 10c67b: 89 7d e0 mov %edi,-0x20(%ebp) ); if ( !area_ok ) { return 0; } memset(heap, 0, sizeof(*heap)); 10c67e: b9 58 00 00 00 mov $0x58,%ecx 10c683: 31 c0 xor %eax,%eax 10c685: 89 df mov %ebx,%edi 10c687: f3 aa rep stos %al,%es:(%edi) heap->Protection.block_initialize = _Heap_Protection_block_initialize_default; heap->Protection.block_check = _Heap_Protection_block_check_default; heap->Protection.block_error = _Heap_Protection_block_error_default; #endif first_block_begin = (uintptr_t) first_block; 10c689: 8b 4d f0 mov -0x10(%ebp),%ecx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c68c: 8b 45 ec mov -0x14(%ebp),%eax 10c68f: 29 c8 sub %ecx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c691: 8b 7d e0 mov -0x20(%ebp),%edi 10c694: 89 39 mov %edi,(%ecx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c696: 89 c7 mov %eax,%edi 10c698: 83 cf 01 or $0x1,%edi 10c69b: 89 79 04 mov %edi,0x4(%ecx) first_block->next = _Heap_Free_list_tail( heap ); 10c69e: 89 59 08 mov %ebx,0x8(%ecx) first_block->prev = _Heap_Free_list_head( heap ); 10c6a1: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Protection_block_initialize( heap, first_block ); /* Heap control */ heap->page_size = page_size; 10c6a4: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c6a7: 89 53 14 mov %edx,0x14(%ebx) heap->area_begin = heap_area_begin; 10c6aa: 8b 55 0c mov 0xc(%ebp),%edx 10c6ad: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c6b0: 8b 7d e0 mov -0x20(%ebp),%edi 10c6b3: 89 7b 1c mov %edi,0x1c(%ebx) heap->first_block = first_block; 10c6b6: 89 4b 20 mov %ecx,0x20(%ebx) heap->last_block = last_block; 10c6b9: 8b 55 ec mov -0x14(%ebp),%edx 10c6bc: 89 53 24 mov %edx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c6bf: 89 4b 08 mov %ecx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c6c2: 89 4b 0c mov %ecx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c6c5: 89 02 mov %eax,(%edx) * 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( 10c6c7: 29 d1 sub %edx,%ecx 10c6c9: 89 4a 04 mov %ecx,0x4(%edx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); _Heap_Protection_block_initialize( heap, last_block ); /* Statistics */ stats->size = first_block_size; 10c6cc: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c6cf: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c6d2: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c6d5: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c6dc: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->instance = instance++; 10c6e3: 8b 15 a0 50 12 00 mov 0x1250a0,%edx 10c6e9: 89 53 28 mov %edx,0x28(%ebx) 10c6ec: 42 inc %edx 10c6ed: 89 15 a0 50 12 00 mov %edx,0x1250a0 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c6f3: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f6: 5b pop %ebx 10c6f7: 5e pop %esi 10c6f8: 5f pop %edi 10c6f9: c9 leave 10c6fa: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c6fb: ba 10 00 00 00 mov $0x10,%edx 10c700: e9 49 ff ff ff jmp 10c64e <_Heap_Initialize+0x5a> =============================================================================== 0011dc94 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11dc94: 55 push %ebp 11dc95: 89 e5 mov %esp,%ebp 11dc97: 57 push %edi 11dc98: 56 push %esi 11dc99: 53 push %ebx 11dc9a: 83 ec 2c sub $0x2c,%esp 11dc9d: 8b 5d 08 mov 0x8(%ebp),%ebx 11dca0: 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); 11dca3: 8d 4e f8 lea -0x8(%esi),%ecx 11dca6: 89 f0 mov %esi,%eax 11dca8: 31 d2 xor %edx,%edx 11dcaa: 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); 11dcad: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11dcaf: 8b 45 14 mov 0x14(%ebp),%eax 11dcb2: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11dcb8: 8b 55 18 mov 0x18(%ebp),%edx 11dcbb: c7 02 00 00 00 00 movl $0x0,(%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; 11dcc1: 39 4b 20 cmp %ecx,0x20(%ebx) 11dcc4: 77 05 ja 11dccb <_Heap_Resize_block+0x37> 11dcc6: 39 4b 24 cmp %ecx,0x24(%ebx) 11dcc9: 73 0d jae 11dcd8 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11dccb: b8 02 00 00 00 mov $0x2,%eax } } 11dcd0: 8d 65 f4 lea -0xc(%ebp),%esp 11dcd3: 5b pop %ebx 11dcd4: 5e pop %esi 11dcd5: 5f pop %edi 11dcd6: c9 leave 11dcd7: c3 ret - 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; 11dcd8: 8b 41 04 mov 0x4(%ecx),%eax 11dcdb: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11dcde: 8d 3c 01 lea (%ecx,%eax,1),%edi 11dce1: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11dce4: 89 fa mov %edi,%edx 11dce6: 29 f2 sub %esi,%edx 11dce8: 83 c2 04 add $0x4,%edx 11dceb: 89 55 e0 mov %edx,-0x20(%ebp) 11dcee: 8b 57 04 mov 0x4(%edi),%edx 11dcf1: 83 e2 fe and $0xfffffffe,%edx 11dcf4: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11dcf7: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11dcfc: 0f 94 45 df sete -0x21(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11dd00: 8b 55 e0 mov -0x20(%ebp),%edx 11dd03: 8b 7d 14 mov 0x14(%ebp),%edi 11dd06: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11dd08: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11dd0c: 75 6e jne 11dd7c <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11dd0e: 8b 55 e0 mov -0x20(%ebp),%edx 11dd11: 39 55 10 cmp %edx,0x10(%ebp) 11dd14: 77 79 ja 11dd8f <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11dd16: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11dd1a: 74 31 je 11dd4d <_Heap_Resize_block+0xb9> 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; 11dd1c: 8b 79 04 mov 0x4(%ecx),%edi 11dd1f: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11dd22: 09 c7 or %eax,%edi 11dd24: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd27: 8b 7d d4 mov -0x2c(%ebp),%edi 11dd2a: 8b 7f 08 mov 0x8(%edi),%edi 11dd2d: 89 7d e4 mov %edi,-0x1c(%ebp) 11dd30: 8b 55 d4 mov -0x2c(%ebp),%edx 11dd33: 8b 7a 0c mov 0xc(%edx),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 11dd36: 8b 55 e4 mov -0x1c(%ebp),%edx 11dd39: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11dd3c: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11dd3f: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11dd44: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11dd47: 8b 7d d0 mov -0x30(%ebp),%edi 11dd4a: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11dd4d: ff 75 10 pushl 0x10(%ebp) 11dd50: 56 push %esi 11dd51: 51 push %ecx 11dd52: 53 push %ebx 11dd53: e8 b0 e9 fe ff call 10c708 <_Heap_Block_allocate> - 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; 11dd58: 8b 50 04 mov 0x4(%eax),%edx 11dd5b: 83 e2 fe and $0xfffffffe,%edx block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; 11dd5e: 29 f0 sub %esi,%eax 11dd60: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11dd64: 8b 55 18 mov 0x18(%ebp),%edx 11dd67: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11dd69: ff 43 54 incl 0x54(%ebx) 11dd6c: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11dd6f: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd71: 8d 65 f4 lea -0xc(%ebp),%esp 11dd74: 5b pop %ebx 11dd75: 5e pop %esi 11dd76: 5f pop %edi 11dd77: c9 leave 11dd78: c3 ret 11dd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11dd7c: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11dd7f: 8b 7d d0 mov -0x30(%ebp),%edi 11dd82: 01 fa add %edi,%edx 11dd84: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11dd87: 8b 55 e0 mov -0x20(%ebp),%edx 11dd8a: 39 55 10 cmp %edx,0x10(%ebp) 11dd8d: 76 87 jbe 11dd16 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11dd8f: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd94: 8d 65 f4 lea -0xc(%ebp),%esp 11dd97: 5b pop %ebx 11dd98: 5e pop %esi 11dd99: 5f pop %edi 11dd9a: c9 leave 11dd9b: c3 ret =============================================================================== 0011dd9c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11dd9c: 55 push %ebp 11dd9d: 89 e5 mov %esp,%ebp 11dd9f: 56 push %esi 11dda0: 53 push %ebx 11dda1: 8b 5d 08 mov 0x8(%ebp),%ebx 11dda4: 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); 11dda7: 8d 4e f8 lea -0x8(%esi),%ecx 11ddaa: 89 f0 mov %esi,%eax 11ddac: 31 d2 xor %edx,%edx 11ddae: 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); 11ddb1: 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 11ddb3: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11ddb6: 39 c1 cmp %eax,%ecx 11ddb8: 72 07 jb 11ddc1 <_Heap_Size_of_alloc_area+0x25> 11ddba: 8b 53 24 mov 0x24(%ebx),%edx 11ddbd: 39 d1 cmp %edx,%ecx 11ddbf: 76 07 jbe 11ddc8 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11ddc1: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11ddc3: 5b pop %ebx 11ddc4: 5e pop %esi 11ddc5: c9 leave 11ddc6: c3 ret 11ddc7: 90 nop <== NOT EXECUTED - 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; 11ddc8: 8b 59 04 mov 0x4(%ecx),%ebx 11ddcb: 83 e3 fe and $0xfffffffe,%ebx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11ddce: 01 d9 add %ebx,%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; 11ddd0: 39 c8 cmp %ecx,%eax 11ddd2: 77 ed ja 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11ddd4: 39 ca cmp %ecx,%edx 11ddd6: 72 e9 jb 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11ddd8: f6 41 04 01 testb $0x1,0x4(%ecx) 11dddc: 74 e3 je 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11ddde: 29 f1 sub %esi,%ecx 11dde0: 8d 51 04 lea 0x4(%ecx),%edx 11dde3: 8b 45 10 mov 0x10(%ebp),%eax 11dde6: 89 10 mov %edx,(%eax) return true; 11dde8: b0 01 mov $0x1,%al } 11ddea: 5b pop %ebx 11ddeb: 5e pop %esi 11ddec: c9 leave 11dded: c3 ret =============================================================================== 0010d22c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d22c: 55 push %ebp 10d22d: 89 e5 mov %esp,%ebp 10d22f: 57 push %edi 10d230: 56 push %esi 10d231: 53 push %ebx 10d232: 83 ec 4c sub $0x4c,%esp 10d235: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d238: 8b 43 10 mov 0x10(%ebx),%eax 10d23b: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d23e: 8b 53 14 mov 0x14(%ebx),%edx 10d241: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d244: 8b 43 20 mov 0x20(%ebx),%eax 10d247: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d24a: 8b 53 24 mov 0x24(%ebx),%edx 10d24d: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d250: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d254: 74 1a je 10d270 <_Heap_Walk+0x44> 10d256: c7 45 d8 e4 d1 10 00 movl $0x10d1e4,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d25d: 83 3d a0 88 12 00 03 cmpl $0x3,0x1288a0 10d264: 74 1a je 10d280 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d266: b0 01 mov $0x1,%al } 10d268: 8d 65 f4 lea -0xc(%ebp),%esp 10d26b: 5b pop %ebx 10d26c: 5e pop %esi 10d26d: 5f pop %edi 10d26e: c9 leave 10d26f: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d270: c7 45 d8 dc d1 10 00 movl $0x10d1dc,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d277: 83 3d a0 88 12 00 03 cmpl $0x3,0x1288a0 10d27e: 75 e6 jne 10d266 <_Heap_Walk+0x3a> 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)( 10d280: 52 push %edx 10d281: ff 73 0c pushl 0xc(%ebx) 10d284: ff 73 08 pushl 0x8(%ebx) 10d287: ff 75 cc pushl -0x34(%ebp) 10d28a: ff 75 dc pushl -0x24(%ebp) 10d28d: ff 73 1c pushl 0x1c(%ebx) 10d290: ff 73 18 pushl 0x18(%ebx) 10d293: ff 75 d0 pushl -0x30(%ebp) 10d296: ff 75 e0 pushl -0x20(%ebp) 10d299: 68 d4 0c 12 00 push $0x120cd4 10d29e: 6a 00 push $0x0 10d2a0: ff 75 0c pushl 0xc(%ebp) 10d2a3: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d2a6: 83 c4 30 add $0x30,%esp 10d2a9: 8b 45 e0 mov -0x20(%ebp),%eax 10d2ac: 85 c0 test %eax,%eax 10d2ae: 74 70 je 10d320 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d2b0: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d2b4: 75 72 jne 10d328 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2b6: 8b 45 d0 mov -0x30(%ebp),%eax 10d2b9: 31 d2 xor %edx,%edx 10d2bb: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d2be: 85 d2 test %edx,%edx 10d2c0: 75 72 jne 10d334 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d2c2: 8b 45 dc mov -0x24(%ebp),%eax 10d2c5: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2c8: 31 d2 xor %edx,%edx 10d2ca: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d2cd: 85 d2 test %edx,%edx 10d2cf: 75 6f jne 10d340 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d2d1: 8b 45 dc mov -0x24(%ebp),%eax 10d2d4: 8b 40 04 mov 0x4(%eax),%eax 10d2d7: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d2da: a8 01 test $0x1,%al 10d2dc: 0f 84 8e 00 00 00 je 10d370 <_Heap_Walk+0x144> - 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; 10d2e2: 8b 55 cc mov -0x34(%ebp),%edx 10d2e5: 8b 42 04 mov 0x4(%edx),%eax 10d2e8: 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); 10d2eb: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d2ed: f6 40 04 01 testb $0x1,0x4(%eax) 10d2f1: 74 25 je 10d318 <_Heap_Walk+0xec> ); return false; } if ( 10d2f3: 39 45 dc cmp %eax,-0x24(%ebp) 10d2f6: 74 54 je 10d34c <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d2f8: 51 push %ecx <== NOT EXECUTED 10d2f9: 68 f0 0d 12 00 push $0x120df0 <== NOT EXECUTED 10d2fe: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d300: 6a 01 push $0x1 10d302: ff 75 0c pushl 0xc(%ebp) 10d305: ff 55 d8 call *-0x28(%ebp) 10d308: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d30b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d30d: 8d 65 f4 lea -0xc(%ebp),%esp 10d310: 5b pop %ebx 10d311: 5e pop %esi 10d312: 5f pop %edi 10d313: c9 leave 10d314: c3 ret 10d315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d318: 53 push %ebx 10d319: 68 8a 0c 12 00 push $0x120c8a 10d31e: eb e0 jmp 10d300 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d320: 57 push %edi 10d321: 68 59 0c 12 00 push $0x120c59 10d326: eb d8 jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d328: ff 75 e0 pushl -0x20(%ebp) 10d32b: 68 6c 0c 12 00 push $0x120c6c 10d330: eb ce jmp 10d300 <_Heap_Walk+0xd4> 10d332: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d334: ff 75 d0 pushl -0x30(%ebp) 10d337: 68 68 0d 12 00 push $0x120d68 10d33c: eb c2 jmp 10d300 <_Heap_Walk+0xd4> 10d33e: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d340: ff 75 dc pushl -0x24(%ebp) 10d343: 68 8c 0d 12 00 push $0x120d8c 10d348: eb b6 jmp 10d300 <_Heap_Walk+0xd4> 10d34a: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d34c: 8b 43 10 mov 0x10(%ebx),%eax 10d34f: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d352: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d355: 39 cb cmp %ecx,%ebx 10d357: 0f 84 a8 00 00 00 je 10d405 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d35d: 8b 43 20 mov 0x20(%ebx),%eax 10d360: 89 45 d4 mov %eax,-0x2c(%ebp) 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; 10d363: 39 c8 cmp %ecx,%eax 10d365: 76 11 jbe 10d378 <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d367: 90 nop <== NOT EXECUTED 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 ) ) { (*printer)( 10d368: 51 push %ecx 10d369: 68 20 0e 12 00 push $0x120e20 10d36e: eb 90 jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d370: 56 push %esi 10d371: 68 c0 0d 12 00 push $0x120dc0 10d376: eb 88 jmp 10d300 <_Heap_Walk+0xd4> 10d378: 8b 7b 24 mov 0x24(%ebx),%edi 10d37b: 39 cf cmp %ecx,%edi 10d37d: 72 e9 jb 10d368 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d37f: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d382: 31 d2 xor %edx,%edx 10d384: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d387: 85 d2 test %edx,%edx 10d389: 0f 85 44 02 00 00 jne 10d5d3 <_Heap_Walk+0x3a7> <== 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; 10d38f: 8b 41 04 mov 0x4(%ecx),%eax 10d392: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d395: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d39a: 0f 85 3e 02 00 00 jne 10d5de <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d3a0: 89 da mov %ebx,%edx 10d3a2: 89 ce mov %ecx,%esi 10d3a4: eb 37 jmp 10d3dd <_Heap_Walk+0x1b1> 10d3a6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d3a8: 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 ) { 10d3ab: 39 cb cmp %ecx,%ebx 10d3ad: 74 5c je 10d40b <_Heap_Walk+0x1df> 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; 10d3af: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d3b2: 77 b4 ja 10d368 <_Heap_Walk+0x13c> 10d3b4: 39 f9 cmp %edi,%ecx 10d3b6: 77 b0 ja 10d368 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d3b8: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d3bb: 31 d2 xor %edx,%edx 10d3bd: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d3c0: 85 d2 test %edx,%edx 10d3c2: 0f 85 0b 02 00 00 jne 10d5d3 <_Heap_Walk+0x3a7> - 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; 10d3c8: 8b 41 04 mov 0x4(%ecx),%eax 10d3cb: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d3ce: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d3d3: 0f 85 05 02 00 00 jne 10d5de <_Heap_Walk+0x3b2> 10d3d9: 89 f2 mov %esi,%edx 10d3db: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d3dd: 8b 41 0c mov 0xc(%ecx),%eax 10d3e0: 39 d0 cmp %edx,%eax 10d3e2: 74 c4 je 10d3a8 <_Heap_Walk+0x17c> (*printer)( 10d3e4: 83 ec 0c sub $0xc,%esp 10d3e7: 50 push %eax 10d3e8: 51 push %ecx 10d3e9: 68 70 0e 12 00 push $0x120e70 10d3ee: 66 90 xchg %ax,%ax 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d3f0: 6a 01 push $0x1 10d3f2: ff 75 0c pushl 0xc(%ebp) 10d3f5: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d3f8: 83 c4 20 add $0x20,%esp 10d3fb: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d3fd: 8d 65 f4 lea -0xc(%ebp),%esp 10d400: 5b pop %ebx 10d401: 5e pop %esi 10d402: 5f pop %edi 10d403: c9 leave 10d404: c3 ret 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 ) { 10d405: 8b 53 20 mov 0x20(%ebx),%edx 10d408: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d40b: 8b 7d dc mov -0x24(%ebp),%edi 10d40e: 8b 45 d4 mov -0x2c(%ebp),%eax 10d411: 8d 76 00 lea 0x0(%esi),%esi 10d414: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d417: 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); 10d41a: 8d 34 39 lea (%ecx,%edi,1),%esi 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; 10d41d: 39 f0 cmp %esi,%eax 10d41f: 76 0f jbe 10d430 <_Heap_Walk+0x204> <== ALWAYS TAKEN 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d421: 83 ec 0c sub $0xc,%esp 10d424: 56 push %esi 10d425: 57 push %edi 10d426: 68 a4 0e 12 00 push $0x120ea4 10d42b: eb c3 jmp 10d3f0 <_Heap_Walk+0x1c4> 10d42d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d430: 39 73 24 cmp %esi,0x24(%ebx) 10d433: 72 ec jb 10d421 <_Heap_Walk+0x1f5> 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; 10d435: 3b 7d cc cmp -0x34(%ebp),%edi 10d438: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d43c: 89 c8 mov %ecx,%eax 10d43e: 31 d2 xor %edx,%edx 10d440: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d443: 85 d2 test %edx,%edx 10d445: 74 0a je 10d451 <_Heap_Walk+0x225> 10d447: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d44b: 0f 85 52 01 00 00 jne 10d5a3 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d451: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d454: 76 0a jbe 10d460 <_Heap_Walk+0x234> 10d456: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d45a: 0f 85 52 01 00 00 jne 10d5b2 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d460: 39 f7 cmp %esi,%edi 10d462: 72 0a jb 10d46e <_Heap_Walk+0x242> 10d464: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d468: 0f 85 56 01 00 00 jne 10d5c4 <_Heap_Walk+0x398> 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; 10d46e: 8b 55 e4 mov -0x1c(%ebp),%edx 10d471: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d474: f6 46 04 01 testb $0x1,0x4(%esi) 10d478: 74 4e je 10d4c8 <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d47a: 85 d2 test %edx,%edx 10d47c: 74 2e je 10d4ac <_Heap_Walk+0x280> (*printer)( 10d47e: 83 ec 0c sub $0xc,%esp 10d481: 51 push %ecx 10d482: 57 push %edi 10d483: 68 bb 0c 12 00 push $0x120cbb 10d488: 6a 00 push $0x0 10d48a: ff 75 0c pushl 0xc(%ebp) 10d48d: ff 55 d8 call *-0x28(%ebp) 10d490: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d493: 39 75 dc cmp %esi,-0x24(%ebp) 10d496: 0f 84 ca fd ff ff je 10d266 <_Heap_Walk+0x3a> 10d49c: 8b 56 04 mov 0x4(%esi),%edx 10d49f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d4a2: 8b 43 20 mov 0x20(%ebx),%eax 10d4a5: 89 f7 mov %esi,%edi 10d4a7: e9 68 ff ff ff jmp 10d414 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d4ac: 83 ec 08 sub $0x8,%esp 10d4af: ff 37 pushl (%edi) 10d4b1: 51 push %ecx 10d4b2: 57 push %edi 10d4b3: 68 08 10 12 00 push $0x121008 10d4b8: 6a 00 push $0x0 10d4ba: ff 75 0c pushl 0xc(%ebp) 10d4bd: ff 55 d8 call *-0x28(%ebp) 10d4c0: 83 c4 20 add $0x20,%esp 10d4c3: eb ce jmp 10d493 <_Heap_Walk+0x267> 10d4c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d4c8: 8b 43 08 mov 0x8(%ebx),%eax 10d4cb: 89 45 b4 mov %eax,-0x4c(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10d4ce: 8b 47 08 mov 0x8(%edi),%eax 10d4d1: 89 45 e4 mov %eax,-0x1c(%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)( 10d4d4: 39 43 0c cmp %eax,0xc(%ebx) 10d4d7: 0f 84 97 00 00 00 je 10d574 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d4dd: 39 c3 cmp %eax,%ebx 10d4df: 0f 84 9b 00 00 00 je 10d580 <_Heap_Walk+0x354> 10d4e5: c7 45 c8 49 0b 12 00 movl $0x120b49,-0x38(%ebp) 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 ? 10d4ec: 8b 47 0c mov 0xc(%edi),%eax 10d4ef: 89 45 d4 mov %eax,-0x2c(%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)( 10d4f2: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d4f5: 74 75 je 10d56c <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d4f7: 39 c3 cmp %eax,%ebx 10d4f9: 0f 84 8d 00 00 00 je 10d58c <_Heap_Walk+0x360> 10d4ff: b8 49 0b 12 00 mov $0x120b49,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d504: 83 ec 0c sub $0xc,%esp 10d507: ff 75 c8 pushl -0x38(%ebp) 10d50a: ff 75 e4 pushl -0x1c(%ebp) 10d50d: 50 push %eax 10d50e: ff 75 d4 pushl -0x2c(%ebp) 10d511: 51 push %ecx 10d512: 57 push %edi 10d513: 68 64 0f 12 00 push $0x120f64 10d518: 6a 00 push $0x0 10d51a: ff 75 0c pushl 0xc(%ebp) 10d51d: 89 55 c4 mov %edx,-0x3c(%ebp) 10d520: 89 4d c0 mov %ecx,-0x40(%ebp) 10d523: ff 55 d8 call *-0x28(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d526: 8b 06 mov (%esi),%eax 10d528: 83 c4 30 add $0x30,%esp 10d52b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d52e: 39 c1 cmp %eax,%ecx 10d530: 8b 55 c4 mov -0x3c(%ebp),%edx 10d533: 75 27 jne 10d55c <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d535: 85 d2 test %edx,%edx 10d537: 74 5f je 10d598 <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d539: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d53c: 39 c3 cmp %eax,%ebx 10d53e: 74 0f je 10d54f <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d540: 39 c7 cmp %eax,%edi 10d542: 0f 84 4b ff ff ff je 10d493 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d548: 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 ) { 10d54b: 39 c3 cmp %eax,%ebx 10d54d: 75 f1 jne 10d540 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d54f: 57 push %edi 10d550: 68 30 10 12 00 push $0x121030 10d555: e9 a6 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> 10d55a: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d55c: 52 push %edx 10d55d: 56 push %esi 10d55e: 50 push %eax 10d55f: 51 push %ecx 10d560: 57 push %edi 10d561: 68 9c 0f 12 00 push $0x120f9c 10d566: e9 85 fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> 10d56b: 90 nop <== NOT EXECUTED 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)( 10d56c: b8 3f 0c 12 00 mov $0x120c3f,%eax 10d571: eb 91 jmp 10d504 <_Heap_Walk+0x2d8> 10d573: 90 nop <== NOT EXECUTED 10d574: c7 45 c8 26 0c 12 00 movl $0x120c26,-0x38(%ebp) 10d57b: e9 6c ff ff ff jmp 10d4ec <_Heap_Walk+0x2c0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d580: c7 45 c8 35 0c 12 00 movl $0x120c35,-0x38(%ebp) 10d587: e9 60 ff ff ff jmp 10d4ec <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d58c: b8 4f 0c 12 00 mov $0x120c4f,%eax 10d591: e9 6e ff ff ff jmp 10d504 <_Heap_Walk+0x2d8> 10d596: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d598: 57 push %edi 10d599: 68 d8 0f 12 00 push $0x120fd8 10d59e: e9 5d fd ff ff jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d5a3: 83 ec 0c sub $0xc,%esp 10d5a6: 51 push %ecx 10d5a7: 57 push %edi 10d5a8: 68 d4 0e 12 00 push $0x120ed4 10d5ad: e9 3e fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d5b2: 83 ec 08 sub $0x8,%esp 10d5b5: ff 75 d0 pushl -0x30(%ebp) 10d5b8: 51 push %ecx 10d5b9: 57 push %edi 10d5ba: 68 04 0f 12 00 push $0x120f04 10d5bf: e9 2c fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d5c4: 83 ec 0c sub $0xc,%esp 10d5c7: 56 push %esi 10d5c8: 57 push %edi 10d5c9: 68 30 0f 12 00 push $0x120f30 10d5ce: e9 1d fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d5d3: 51 push %ecx 10d5d4: 68 40 0e 12 00 push $0x120e40 10d5d9: e9 22 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d5de: 51 push %ecx 10d5df: 68 9f 0c 12 00 push $0x120c9f 10d5e4: e9 17 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> =============================================================================== 0010bd78 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bd78: 55 push %ebp 10bd79: 89 e5 mov %esp,%ebp 10bd7b: 53 push %ebx 10bd7c: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd7f: 8b 0d 80 57 12 00 mov 0x125780,%ecx 10bd85: 85 c9 test %ecx,%ecx 10bd87: 74 1a je 10bda3 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bd89: 31 db xor %ebx,%ebx 10bd8b: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bd8c: 52 push %edx 10bd8d: 6a 00 push $0x0 10bd8f: 6a 00 push $0x0 10bd91: 53 push %ebx 10bd92: e8 7d 46 00 00 call 110414 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd97: 43 inc %ebx 10bd98: 83 c4 10 add $0x10,%esp 10bd9b: 39 1d 80 57 12 00 cmp %ebx,0x125780 10bda1: 77 e9 ja 10bd8c <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bda3: 8b 5d fc mov -0x4(%ebp),%ebx 10bda6: c9 leave 10bda7: c3 ret =============================================================================== 0010bce0 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bce0: 55 push %ebp 10bce1: 89 e5 mov %esp,%ebp 10bce3: 57 push %edi 10bce4: 56 push %esi 10bce5: 53 push %ebx 10bce6: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10bce9: 8b 1d 54 12 12 00 mov 0x121254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bcef: a1 50 12 12 00 mov 0x121250,%eax 10bcf4: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bcf7: 8b 35 4c 12 12 00 mov 0x12124c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bcfd: 39 f0 cmp %esi,%eax 10bcff: 73 5f jae 10bd60 <_IO_Manager_initialization+0x80> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 10bd01: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd04: c1 e1 03 shl $0x3,%ecx 10bd07: 83 ec 0c sub $0xc,%esp 10bd0a: 51 push %ecx 10bd0b: 89 4d dc mov %ecx,-0x24(%ebp) 10bd0e: e8 45 2a 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10bd13: 89 c2 mov %eax,%edx /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10bd15: a3 84 57 12 00 mov %eax,0x125784 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bd1a: 89 35 80 57 12 00 mov %esi,0x125780 memset( 10bd20: 31 c0 xor %eax,%eax 10bd22: 8b 4d dc mov -0x24(%ebp),%ecx 10bd25: 89 d7 mov %edx,%edi 10bd27: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bd29: 83 c4 10 add $0x10,%esp 10bd2c: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd2f: 85 c0 test %eax,%eax 10bd31: 74 25 je 10bd58 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd33: a1 84 57 12 00 mov 0x125784,%eax 10bd38: 89 45 e0 mov %eax,-0x20(%ebp) 10bd3b: 31 c0 xor %eax,%eax 10bd3d: 31 d2 xor %edx,%edx 10bd3f: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bd40: 8b 7d e0 mov -0x20(%ebp),%edi 10bd43: 01 c7 add %eax,%edi 10bd45: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd48: b9 06 00 00 00 mov $0x6,%ecx 10bd4d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bd4f: 42 inc %edx 10bd50: 83 c0 18 add $0x18,%eax 10bd53: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd56: 77 e8 ja 10bd40 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd58: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5b: 5b pop %ebx 10bd5c: 5e pop %esi 10bd5d: 5f pop %edi 10bd5e: c9 leave 10bd5f: c3 ret * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10bd60: 89 1d 84 57 12 00 mov %ebx,0x125784 _IO_Number_of_drivers = number_of_drivers; 10bd66: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd69: a3 80 57 12 00 mov %eax,0x125780 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd6e: 8d 65 f4 lea -0xc(%ebp),%esp 10bd71: 5b pop %ebx 10bd72: 5e pop %esi 10bd73: 5f pop %edi 10bd74: c9 leave 10bd75: c3 ret =============================================================================== 0010c7fc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c7fc: 55 push %ebp 10c7fd: 89 e5 mov %esp,%ebp 10c7ff: 53 push %ebx 10c800: 83 ec 08 sub $0x8,%esp 10c803: 8b 45 08 mov 0x8(%ebp),%eax 10c806: 8b 55 0c mov 0xc(%ebp),%edx 10c809: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c80c: a3 d4 54 12 00 mov %eax,0x1254d4 _Internal_errors_What_happened.is_internal = is_internal; 10c811: 88 15 d8 54 12 00 mov %dl,0x1254d8 _Internal_errors_What_happened.the_error = the_error; 10c817: 89 1d dc 54 12 00 mov %ebx,0x1254dc _User_extensions_Fatal( the_source, is_internal, the_error ); 10c81d: 53 push %ebx 10c81e: 0f b6 d2 movzbl %dl,%edx 10c821: 52 push %edx 10c822: 50 push %eax 10c823: e8 38 1b 00 00 call 10e360 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c828: c7 05 e0 55 12 00 05 movl $0x5,0x1255e0 <== NOT EXECUTED 10c82f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c832: fa cli <== NOT EXECUTED 10c833: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c835: f4 hlt <== NOT EXECUTED 10c836: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c839: eb fe jmp 10c839 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110954 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110954: 55 push %ebp 110955: 89 e5 mov %esp,%ebp 110957: 8b 45 08 mov 0x8(%ebp),%eax 11095a: 48 dec %eax 11095b: 83 f8 02 cmp $0x2,%eax 11095e: 77 0c ja 11096c <_Objects_API_maximum_class+0x18> 110960: 8b 04 85 10 01 12 00 mov 0x120110(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110967: c9 leave 110968: c3 ret 110969: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11096c: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11096e: c9 leave 11096f: c3 ret =============================================================================== 0010c88c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c88c: 55 push %ebp 10c88d: 89 e5 mov %esp,%ebp 10c88f: 56 push %esi 10c890: 53 push %ebx 10c891: 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 ) 10c894: 8b 43 18 mov 0x18(%ebx),%eax 10c897: 85 c0 test %eax,%eax 10c899: 75 0d jne 10c8a8 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c89b: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c89d: 89 c8 mov %ecx,%eax 10c89f: 8d 65 f8 lea -0x8(%ebp),%esp 10c8a2: 5b pop %ebx 10c8a3: 5e pop %esi 10c8a4: c9 leave 10c8a5: c3 ret 10c8a6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 10c8a8: 8d 73 20 lea 0x20(%ebx),%esi 10c8ab: 83 ec 0c sub $0xc,%esp 10c8ae: 56 push %esi 10c8af: e8 e8 f6 ff ff call 10bf9c <_Chain_Get> 10c8b4: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c8b6: 83 c4 10 add $0x10,%esp 10c8b9: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8bd: 74 de je 10c89d <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c8bf: 85 c0 test %eax,%eax 10c8c1: 74 29 je 10c8ec <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c8c3: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c8c7: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c8cb: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c8cd: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c8d1: 31 d2 xor %edx,%edx 10c8d3: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c8d5: c1 e0 02 shl $0x2,%eax 10c8d8: 03 43 30 add 0x30(%ebx),%eax 10c8db: ff 08 decl (%eax) information->inactive--; 10c8dd: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c8e1: 89 c8 mov %ecx,%eax 10c8e3: 8d 65 f8 lea -0x8(%ebp),%esp 10c8e6: 5b pop %ebx 10c8e7: 5e pop %esi 10c8e8: c9 leave 10c8e9: c3 ret 10c8ea: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c8ec: 83 ec 0c sub $0xc,%esp 10c8ef: 53 push %ebx 10c8f0: e8 3b 00 00 00 call 10c930 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c8f5: 89 34 24 mov %esi,(%esp) 10c8f8: e8 9f f6 ff ff call 10bf9c <_Chain_Get> 10c8fd: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c8ff: 83 c4 10 add $0x10,%esp 10c902: 85 c0 test %eax,%eax 10c904: 74 97 je 10c89d <_Objects_Allocate+0x11> 10c906: eb bb jmp 10c8c3 <_Objects_Allocate+0x37> =============================================================================== 0010c930 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c930: 55 push %ebp 10c931: 89 e5 mov %esp,%ebp 10c933: 57 push %edi 10c934: 56 push %esi 10c935: 53 push %ebx 10c936: 83 ec 4c sub $0x4c,%esp 10c939: 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 ); 10c93c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c940: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c943: 8b 4b 34 mov 0x34(%ebx),%ecx 10c946: 85 c9 test %ecx,%ecx 10c948: 0f 84 66 02 00 00 je 10cbb4 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c94e: 8b 73 10 mov 0x10(%ebx),%esi 10c951: 66 89 75 d0 mov %si,-0x30(%ebp) 10c955: 8b 7b 14 mov 0x14(%ebx),%edi 10c958: 89 f0 mov %esi,%eax 10c95a: 31 d2 xor %edx,%edx 10c95c: 66 f7 f7 div %di 10c95f: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c962: 85 f6 test %esi,%esi 10c964: 0f 84 63 02 00 00 je 10cbcd <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10c96a: 8b 01 mov (%ecx),%eax 10c96c: 85 c0 test %eax,%eax 10c96e: 0f 84 6b 02 00 00 je 10cbdf <_Objects_Extend_information+0x2af><== NEVER TAKEN 10c974: 0f b7 ff movzwl %di,%edi /* * 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 ); 10c977: 8b 55 cc mov -0x34(%ebp),%edx 10c97a: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10c97d: 31 d2 xor %edx,%edx 10c97f: 8b 45 d4 mov -0x2c(%ebp),%eax 10c982: eb 0a jmp 10c98e <_Objects_Extend_information+0x5e> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10c984: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c988: 0f 84 c6 01 00 00 je 10cb54 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10c98e: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c990: 42 inc %edx 10c991: 39 d6 cmp %edx,%esi 10c993: 77 ef ja 10c984 <_Objects_Extend_information+0x54> 10c995: 89 45 d4 mov %eax,-0x2c(%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; 10c998: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c99a: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10c99e: 01 f8 add %edi,%eax 10c9a0: 89 45 d0 mov %eax,-0x30(%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 ) { 10c9a3: 3d ff ff 00 00 cmp $0xffff,%eax 10c9a8: 0f 87 9e 01 00 00 ja 10cb4c <_Objects_Extend_information+0x21c> /* * 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; 10c9ae: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c9b2: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c9b6: 0f 84 a4 01 00 00 je 10cb60 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10c9bc: 83 ec 0c sub $0xc,%esp 10c9bf: 57 push %edi 10c9c0: 89 55 b8 mov %edx,-0x48(%ebp) 10c9c3: 88 4d b4 mov %cl,-0x4c(%ebp) 10c9c6: e8 59 1d 00 00 call 10e724 <_Workspace_Allocate> 10c9cb: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10c9ce: 83 c4 10 add $0x10,%esp 10c9d1: 85 c0 test %eax,%eax 10c9d3: 8b 55 b8 mov -0x48(%ebp),%edx 10c9d6: 8a 4d b4 mov -0x4c(%ebp),%cl 10c9d9: 0f 84 6d 01 00 00 je 10cb4c <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10c9df: 84 c9 test %cl,%cl 10c9e1: 0f 84 ea 00 00 00 je 10cad1 <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10c9e7: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10c9ea: 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 *)) + 10c9ed: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10c9f0: 03 45 d0 add -0x30(%ebp),%eax /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10c9f3: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10c9f6: 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 ); 10c9f9: 50 push %eax 10c9fa: 89 55 b8 mov %edx,-0x48(%ebp) 10c9fd: e8 22 1d 00 00 call 10e724 <_Workspace_Allocate> 10ca02: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10ca05: 83 c4 10 add $0x10,%esp 10ca08: 85 c0 test %eax,%eax 10ca0a: 8b 55 b8 mov -0x48(%ebp),%edx 10ca0d: 0f 84 de 01 00 00 je 10cbf1 <_Objects_Extend_information+0x2c1> 10ca13: 8b 45 c4 mov -0x3c(%ebp),%eax 10ca16: 8d 04 b8 lea (%eax,%edi,4),%eax 10ca19: 89 45 bc mov %eax,-0x44(%ebp) 10ca1c: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca1f: 8d 04 f9 lea (%ecx,%edi,8),%eax * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10ca22: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10ca26: 39 4d cc cmp %ecx,-0x34(%ebp) 10ca29: 0f 82 51 01 00 00 jb 10cb80 <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca2f: 8b 4d cc mov -0x34(%ebp),%ecx 10ca32: 85 c9 test %ecx,%ecx 10ca34: 74 12 je 10ca48 <_Objects_Extend_information+0x118><== NEVER TAKEN 10ca36: 31 c9 xor %ecx,%ecx 10ca38: 8b 7d cc mov -0x34(%ebp),%edi 10ca3b: 90 nop local_table[ index ] = NULL; 10ca3c: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca43: 41 inc %ecx 10ca44: 39 cf cmp %ecx,%edi 10ca46: 77 f4 ja 10ca3c <_Objects_Extend_information+0x10c><== NEVER TAKEN 10ca48: c1 e6 02 shl $0x2,%esi 10ca4b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10ca4e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca51: 8b 75 c0 mov -0x40(%ebp),%esi 10ca54: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10ca5b: 8b 4d bc mov -0x44(%ebp),%ecx 10ca5e: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10ca65: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca69: 03 75 d4 add -0x2c(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10ca6c: 39 75 d4 cmp %esi,-0x2c(%ebp) 10ca6f: 73 0f jae 10ca80 <_Objects_Extend_information+0x150><== NEVER TAKEN 10ca71: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10ca74: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10ca7b: 41 inc %ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10ca7c: 39 f1 cmp %esi,%ecx 10ca7e: 72 f4 jb 10ca74 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10ca80: 9c pushf 10ca81: fa cli 10ca82: 5f pop %edi old_tables = information->object_blocks; 10ca83: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10ca86: 8b 75 c4 mov -0x3c(%ebp),%esi 10ca89: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10ca8c: 8b 75 bc mov -0x44(%ebp),%esi 10ca8f: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10ca92: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10ca95: 8b 45 d0 mov -0x30(%ebp),%eax 10ca98: 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) | 10ca9c: 8b 33 mov (%ebx),%esi 10ca9e: c1 e6 18 shl $0x18,%esi 10caa1: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10caa7: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10caab: c1 e0 1b shl $0x1b,%eax 10caae: 09 c6 or %eax,%esi 10cab0: 0f b7 45 d0 movzwl -0x30(%ebp),%eax uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cab4: 09 c6 or %eax,%esi 10cab6: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cab9: 57 push %edi 10caba: 9d popf if ( old_tables ) 10cabb: 85 c9 test %ecx,%ecx 10cabd: 74 12 je 10cad1 <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cabf: 83 ec 0c sub $0xc,%esp 10cac2: 51 push %ecx 10cac3: 89 55 b8 mov %edx,-0x48(%ebp) 10cac6: e8 75 1c 00 00 call 10e740 <_Workspace_Free> 10cacb: 83 c4 10 add $0x10,%esp 10cace: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cad1: c1 e2 02 shl $0x2,%edx 10cad4: 89 55 d0 mov %edx,-0x30(%ebp) 10cad7: 8b 43 34 mov 0x34(%ebx),%eax 10cada: 8b 4d c8 mov -0x38(%ebp),%ecx 10cadd: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cae0: ff 73 18 pushl 0x18(%ebx) 10cae3: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cae7: 50 push %eax 10cae8: 51 push %ecx 10cae9: 8d 7d dc lea -0x24(%ebp),%edi 10caec: 57 push %edi 10caed: e8 62 39 00 00 call 110454 <_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 ) { 10caf2: 83 c4 10 add $0x10,%esp 10caf5: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10caf8: 8d 43 20 lea 0x20(%ebx),%eax 10cafb: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cafe: eb 29 jmp 10cb29 <_Objects_Extend_information+0x1f9> 10cb00: 8b 13 mov (%ebx),%edx 10cb02: c1 e2 18 shl $0x18,%edx 10cb05: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cb0b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb0f: c1 e1 1b shl $0x1b,%ecx 10cb12: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb14: 09 f2 or %esi,%edx 10cb16: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb19: 83 ec 08 sub $0x8,%esp 10cb1c: 50 push %eax 10cb1d: ff 75 d4 pushl -0x2c(%ebp) 10cb20: e8 3b f4 ff ff call 10bf60 <_Chain_Append> index++; 10cb25: 46 inc %esi 10cb26: 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 ) { 10cb29: 83 ec 0c sub $0xc,%esp 10cb2c: 57 push %edi 10cb2d: e8 6a f4 ff ff call 10bf9c <_Chain_Get> 10cb32: 83 c4 10 add $0x10,%esp 10cb35: 85 c0 test %eax,%eax 10cb37: 75 c7 jne 10cb00 <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cb39: 8b 43 14 mov 0x14(%ebx),%eax 10cb3c: 8b 53 30 mov 0x30(%ebx),%edx 10cb3f: 0f b7 c8 movzwl %ax,%ecx 10cb42: 8b 75 d0 mov -0x30(%ebp),%esi 10cb45: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cb48: 66 01 43 2c add %ax,0x2c(%ebx) } 10cb4c: 8d 65 f4 lea -0xc(%ebp),%esp 10cb4f: 5b pop %ebx 10cb50: 5e pop %esi 10cb51: 5f pop %edi 10cb52: c9 leave 10cb53: c3 ret 10cb54: 89 45 d4 mov %eax,-0x2c(%ebp) else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cb57: 31 c9 xor %ecx,%ecx 10cb59: e9 3c fe ff ff jmp 10c99a <_Objects_Extend_information+0x6a> 10cb5e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cb60: 83 ec 0c sub $0xc,%esp 10cb63: 57 push %edi 10cb64: 89 55 b8 mov %edx,-0x48(%ebp) 10cb67: 88 4d b4 mov %cl,-0x4c(%ebp) 10cb6a: e8 e9 1b 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10cb6f: 89 45 c8 mov %eax,-0x38(%ebp) 10cb72: 83 c4 10 add $0x10,%esp 10cb75: 8a 4d b4 mov -0x4c(%ebp),%cl 10cb78: 8b 55 b8 mov -0x48(%ebp),%edx 10cb7b: e9 5f fe ff ff jmp 10c9df <_Objects_Extend_information+0xaf> /* * 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, 10cb80: c1 e6 02 shl $0x2,%esi 10cb83: 89 75 c0 mov %esi,-0x40(%ebp) 10cb86: 8b 73 34 mov 0x34(%ebx),%esi 10cb89: 8b 7d c4 mov -0x3c(%ebp),%edi 10cb8c: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb8f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cb91: 8b 73 30 mov 0x30(%ebx),%esi 10cb94: 8b 7d bc mov -0x44(%ebp),%edi 10cb97: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb9a: 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 *) ); 10cb9c: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cba0: 03 4d cc add -0x34(%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, 10cba3: c1 e1 02 shl $0x2,%ecx 10cba6: 8b 73 1c mov 0x1c(%ebx),%esi 10cba9: 89 c7 mov %eax,%edi 10cbab: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cbad: e9 9c fe ff ff jmp 10ca4e <_Objects_Extend_information+0x11e> 10cbb2: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cbb4: 8b 53 10 mov 0x10(%ebx),%edx 10cbb7: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cbbb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi /* * 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 ); 10cbbf: 89 45 d4 mov %eax,-0x2c(%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; 10cbc2: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbc4: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cbc6: 31 f6 xor %esi,%esi 10cbc8: e9 cd fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cbcd: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * 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 ); 10cbd0: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cbd3: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * 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; 10cbd6: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbd8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cbda: e9 bb fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10cbdf: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * 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 ); 10cbe2: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cbe5: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cbe8: 31 c9 xor %ecx,%ecx <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbea: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cbec: e9 a9 fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10cbf1: 83 ec 0c sub $0xc,%esp 10cbf4: ff 75 c8 pushl -0x38(%ebp) 10cbf7: e8 44 1b 00 00 call 10e740 <_Workspace_Free> return; 10cbfc: 83 c4 10 add $0x10,%esp 10cbff: e9 48 ff ff ff jmp 10cb4c <_Objects_Extend_information+0x21c> =============================================================================== 0010cd44 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cd44: 55 push %ebp 10cd45: 89 e5 mov %esp,%ebp 10cd47: 53 push %ebx 10cd48: 83 ec 14 sub $0x14,%esp 10cd4b: 8b 55 08 mov 0x8(%ebp),%edx 10cd4e: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cd51: b8 01 00 00 00 mov $0x1,%eax 10cd56: 2b 42 08 sub 0x8(%edx),%eax 10cd59: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10cd5c: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd60: 39 c8 cmp %ecx,%eax 10cd62: 77 24 ja 10cd88 <_Objects_Get+0x44> 10cd64: 8b 0d 34 54 12 00 mov 0x125434,%ecx 10cd6a: 41 inc %ecx 10cd6b: 89 0d 34 54 12 00 mov %ecx,0x125434 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd71: 8b 52 1c mov 0x1c(%edx),%edx 10cd74: 8b 04 82 mov (%edx,%eax,4),%eax 10cd77: 85 c0 test %eax,%eax 10cd79: 74 1b je 10cd96 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cd7b: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd81: 83 c4 14 add $0x14,%esp 10cd84: 5b pop %ebx 10cd85: c9 leave 10cd86: c3 ret 10cd87: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10cd88: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10cd8e: 31 c0 xor %eax,%eax #endif } 10cd90: 83 c4 14 add $0x14,%esp 10cd93: 5b pop %ebx 10cd94: c9 leave 10cd95: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cd96: 89 45 f4 mov %eax,-0xc(%ebp) 10cd99: e8 0a 08 00 00 call 10d5a8 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10cd9e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cda4: 8b 45 f4 mov -0xc(%ebp),%eax 10cda7: eb d8 jmp 10cd81 <_Objects_Get+0x3d> =============================================================================== 0010cc94 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10cc94: 55 push %ebp 10cc95: 89 e5 mov %esp,%ebp 10cc97: 56 push %esi 10cc98: 53 push %ebx 10cc99: 8b 75 08 mov 0x8(%ebp),%esi 10cc9c: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cc9f: 66 85 db test %bx,%bx 10cca2: 75 0c jne 10ccb0 <_Objects_Get_information+0x1c> the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; 10cca4: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cca6: 8d 65 f8 lea -0x8(%ebp),%esp 10cca9: 5b pop %ebx 10ccaa: 5e pop %esi 10ccab: c9 leave 10ccac: c3 ret 10ccad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ); 10ccb0: 83 ec 0c sub $0xc,%esp 10ccb3: 56 push %esi 10ccb4: e8 9b 3c 00 00 call 110954 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10ccb9: 83 c4 10 add $0x10,%esp 10ccbc: 85 c0 test %eax,%eax 10ccbe: 74 e4 je 10cca4 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10ccc0: 0f b7 db movzwl %bx,%ebx 10ccc3: 39 d8 cmp %ebx,%eax 10ccc5: 72 dd jb 10cca4 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ccc7: 8b 14 b5 0c 54 12 00 mov 0x12540c(,%esi,4),%edx return NULL; 10ccce: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ccd0: 85 d2 test %edx,%edx 10ccd2: 74 d2 je 10cca6 <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ccd4: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10ccd7: 85 c0 test %eax,%eax 10ccd9: 74 cb je 10cca6 <_Objects_Get_information+0x12><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10ccdb: 31 d2 xor %edx,%edx 10ccdd: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cce2: 0f 95 c2 setne %dl 10cce5: f7 da neg %edx 10cce7: 21 d0 and %edx,%eax 10cce9: eb bb jmp 10cca6 <_Objects_Get_information+0x12> =============================================================================== 0010ccec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10ccec: 55 push %ebp 10cced: 89 e5 mov %esp,%ebp 10ccef: 56 push %esi 10ccf0: 53 push %ebx 10ccf1: 8b 55 08 mov 0x8(%ebp),%edx 10ccf4: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10ccf7: b8 01 00 00 00 mov $0x1,%eax 10ccfc: 2b 42 08 sub 0x8(%edx),%eax 10ccff: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd02: 9c pushf 10cd03: fa cli 10cd04: 5e pop %esi if ( information->maximum >= index ) { 10cd05: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd09: 39 c8 cmp %ecx,%eax 10cd0b: 77 1b ja 10cd28 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd0d: 8b 52 1c mov 0x1c(%edx),%edx 10cd10: 8b 04 82 mov (%edx,%eax,4),%eax 10cd13: 85 c0 test %eax,%eax 10cd15: 74 21 je 10cd38 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cd17: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cd1d: 8b 55 14 mov 0x14(%ebp),%edx 10cd20: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd22: 5b pop %ebx 10cd23: 5e pop %esi 10cd24: c9 leave 10cd25: c3 ret 10cd26: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cd28: 56 push %esi 10cd29: 9d popf *location = OBJECTS_ERROR; 10cd2a: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10cd30: 31 c0 xor %eax,%eax #endif } 10cd32: 5b pop %ebx 10cd33: 5e pop %esi 10cd34: c9 leave 10cd35: c3 ret 10cd36: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cd38: 56 push %esi 10cd39: 9d popf *location = OBJECTS_ERROR; 10cd3a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cd40: eb e0 jmp 10cd22 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e3c8 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e3c8: 55 push %ebp 10e3c9: 89 e5 mov %esp,%ebp 10e3cb: 57 push %edi 10e3cc: 56 push %esi 10e3cd: 53 push %ebx 10e3ce: 83 ec 2c sub $0x2c,%esp 10e3d1: 8b 7d 08 mov 0x8(%ebp),%edi 10e3d4: 8b 75 0c mov 0xc(%ebp),%esi 10e3d7: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e3da: 85 f6 test %esi,%esi 10e3dc: 75 0e jne 10e3ec <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e3de: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e3e0: 89 d8 mov %ebx,%eax 10e3e2: 8d 65 f4 lea -0xc(%ebp),%esp 10e3e5: 5b pop %ebx 10e3e6: 5e pop %esi 10e3e7: 5f pop %edi 10e3e8: c9 leave 10e3e9: c3 ret 10e3ea: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e3ec: 85 db test %ebx,%ebx 10e3ee: 74 f0 je 10e3e0 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e3f0: 85 ff test %edi,%edi 10e3f2: 75 08 jne 10e3fc <_Objects_Get_name_as_string+0x34> 10e3f4: a1 78 16 13 00 mov 0x131678,%eax 10e3f9: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e3fc: 83 ec 0c sub $0xc,%esp 10e3ff: 57 push %edi 10e400: e8 f3 fe ff ff call 10e2f8 <_Objects_Get_information_id> if ( !information ) 10e405: 83 c4 10 add $0x10,%esp 10e408: 85 c0 test %eax,%eax 10e40a: 74 d2 je 10e3de <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e40c: 51 push %ecx 10e40d: 8d 55 e4 lea -0x1c(%ebp),%edx 10e410: 52 push %edx 10e411: 57 push %edi 10e412: 50 push %eax 10e413: e8 7c 00 00 00 call 10e494 <_Objects_Get> switch ( location ) { 10e418: 83 c4 10 add $0x10,%esp 10e41b: 8b 55 e4 mov -0x1c(%ebp),%edx 10e41e: 85 d2 test %edx,%edx 10e420: 75 bc jne 10e3de <_Objects_Get_name_as_string+0x16> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10e422: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e425: 89 d1 mov %edx,%ecx 10e427: c1 e9 18 shr $0x18,%ecx 10e42a: 88 c8 mov %cl,%al 10e42c: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e42f: 89 d1 mov %edx,%ecx 10e431: c1 e9 10 shr $0x10,%ecx 10e434: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e437: 89 d1 mov %edx,%ecx 10e439: c1 e9 08 shr $0x8,%ecx 10e43c: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e43f: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e442: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e446: 4e dec %esi 10e447: 89 75 d4 mov %esi,-0x2c(%ebp) 10e44a: 74 42 je 10e48e <_Objects_Get_name_as_string+0xc6><== NEVER TAKEN 10e44c: 84 c0 test %al,%al 10e44e: 74 3e je 10e48e <_Objects_Get_name_as_string+0xc6> 10e450: 89 d9 mov %ebx,%ecx 10e452: 31 d2 xor %edx,%edx 10e454: eb 0a jmp 10e460 <_Objects_Get_name_as_string+0x98> 10e456: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e458: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10e45c: 84 c0 test %al,%al 10e45e: 74 21 je 10e481 <_Objects_Get_name_as_string+0xb9> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e460: 0f b6 f0 movzbl %al,%esi 10e463: 8b 3d 08 73 12 00 mov 0x127308,%edi 10e469: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e46e: 81 e6 97 00 00 00 and $0x97,%esi 10e474: 75 02 jne 10e478 <_Objects_Get_name_as_string+0xb0> 10e476: b0 2a mov $0x2a,%al 10e478: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e47a: 42 inc %edx 10e47b: 41 inc %ecx 10e47c: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e47f: 72 d7 jb 10e458 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e481: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e484: e8 6f 08 00 00 call 10ecf8 <_Thread_Enable_dispatch> return name; 10e489: e9 52 ff ff ff jmp 10e3e0 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e48e: 89 d9 mov %ebx,%ecx 10e490: eb ef jmp 10e481 <_Objects_Get_name_as_string+0xb9> =============================================================================== 0010ce8c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 57 push %edi 10ce90: 56 push %esi 10ce91: 53 push %ebx 10ce92: 83 ec 0c sub $0xc,%esp 10ce95: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce98: 8b 75 0c mov 0xc(%ebp),%esi 10ce9b: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10ce9e: 85 db test %ebx,%ebx 10cea0: 75 0a jne 10ceac <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cea2: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cea4: 8d 65 f4 lea -0xc(%ebp),%esp 10cea7: 5b pop %ebx 10cea8: 5e pop %esi 10cea9: 5f pop %edi 10ceaa: c9 leave 10ceab: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10ceac: 85 ff test %edi,%edi 10ceae: 74 f2 je 10cea2 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10ceb0: 8b 45 14 mov 0x14(%ebp),%eax 10ceb3: 85 c0 test %eax,%eax 10ceb5: 74 eb je 10cea2 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10ceb7: 66 85 f6 test %si,%si 10ceba: 75 04 jne 10cec0 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cebc: 8b 73 08 mov 0x8(%ebx),%esi 10cebf: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cec0: 66 39 73 10 cmp %si,0x10(%ebx) 10cec4: 72 22 jb 10cee8 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cec6: 51 push %ecx 10cec7: 57 push %edi 10cec8: 56 push %esi 10cec9: 53 push %ebx 10ceca: e8 2d 00 00 00 call 10cefc <_Objects_Get> next_id++; 10cecf: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10ced0: 83 c4 10 add $0x10,%esp 10ced3: 8b 17 mov (%edi),%edx 10ced5: 85 d2 test %edx,%edx 10ced7: 75 e7 jne 10cec0 <_Objects_Get_next+0x34> *next_id_p = next_id; 10ced9: 8b 55 14 mov 0x14(%ebp),%edx 10cedc: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cede: 8d 65 f4 lea -0xc(%ebp),%esp 10cee1: 5b pop %ebx 10cee2: 5e pop %esi 10cee3: 5f pop %edi 10cee4: c9 leave 10cee5: c3 ret 10cee6: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cee8: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10ceee: 8b 45 14 mov 0x14(%ebp),%eax 10cef1: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cef7: 31 c0 xor %eax,%eax 10cef9: eb a9 jmp 10cea4 <_Objects_Get_next+0x18> =============================================================================== 0011b10c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b10c: 55 push %ebp 11b10d: 89 e5 mov %esp,%ebp 11b10f: 53 push %ebx 11b110: 8b 55 08 mov 0x8(%ebp),%edx 11b113: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 11b116: b8 01 00 00 00 mov $0x1,%eax 11b11b: 2b 42 08 sub 0x8(%edx),%eax 11b11e: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b121: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b125: 39 c8 cmp %ecx,%eax 11b127: 77 13 ja 11b13c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b129: 8b 52 1c mov 0x1c(%edx),%edx 11b12c: 8b 04 82 mov (%edx,%eax,4),%eax 11b12f: 85 c0 test %eax,%eax 11b131: 74 09 je 11b13c <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b133: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11b139: 5b pop %ebx 11b13a: c9 leave 11b13b: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11b13c: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b142: 31 c0 xor %eax,%eax } 11b144: 5b pop %ebx 11b145: c9 leave 11b146: c3 ret =============================================================================== 0010dfec <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10dfec: 55 push %ebp 10dfed: 89 e5 mov %esp,%ebp 10dfef: 83 ec 18 sub $0x18,%esp 10dff2: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10dff5: 85 d2 test %edx,%edx 10dff7: 75 08 jne 10e001 <_Objects_Id_to_name+0x15> 10dff9: a1 18 8c 12 00 mov 0x128c18,%eax 10dffe: 8b 50 08 mov 0x8(%eax),%edx 10e001: 89 d0 mov %edx,%eax 10e003: c1 e8 18 shr $0x18,%eax 10e006: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10e009: 8d 48 ff lea -0x1(%eax),%ecx 10e00c: 83 f9 02 cmp $0x2,%ecx 10e00f: 77 3b ja 10e04c <_Objects_Id_to_name+0x60> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e011: 8b 04 85 4c 89 12 00 mov 0x12894c(,%eax,4),%eax 10e018: 85 c0 test %eax,%eax 10e01a: 74 30 je 10e04c <_Objects_Id_to_name+0x60> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e01c: 89 d1 mov %edx,%ecx 10e01e: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e021: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e024: 85 c0 test %eax,%eax 10e026: 74 24 je 10e04c <_Objects_Id_to_name+0x60><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e028: 51 push %ecx 10e029: 8d 4d f4 lea -0xc(%ebp),%ecx 10e02c: 51 push %ecx 10e02d: 52 push %edx 10e02e: 50 push %eax 10e02f: e8 50 ff ff ff call 10df84 <_Objects_Get> if ( !the_object ) 10e034: 83 c4 10 add $0x10,%esp 10e037: 85 c0 test %eax,%eax 10e039: 74 11 je 10e04c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e03b: 8b 50 0c mov 0xc(%eax),%edx 10e03e: 8b 45 0c mov 0xc(%ebp),%eax 10e041: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e043: e8 08 08 00 00 call 10e850 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e048: 31 c0 xor %eax,%eax } 10e04a: c9 leave 10e04b: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 10e04c: b8 03 00 00 00 mov $0x3,%eax return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e051: c9 leave 10e052: c3 ret =============================================================================== 0010cdac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cdac: 55 push %ebp 10cdad: 89 e5 mov %esp,%ebp 10cdaf: 57 push %edi 10cdb0: 56 push %esi 10cdb1: 53 push %ebx 10cdb2: 83 ec 0c sub $0xc,%esp 10cdb5: 8b 45 08 mov 0x8(%ebp),%eax 10cdb8: 8b 55 0c mov 0xc(%ebp),%edx 10cdbb: 8b 5d 10 mov 0x10(%ebp),%ebx 10cdbe: 8b 75 20 mov 0x20(%ebp),%esi 10cdc1: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10cdc5: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cdc7: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cdcb: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cdce: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cdd5: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cddc: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cde3: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10cde9: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10cdef: 0f b7 db movzwl %bx,%ebx 10cdf2: 8b 3c 95 0c 54 12 00 mov 0x12540c(,%edx,4),%edi 10cdf9: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10cdfc: 8b 7d 14 mov 0x14(%ebp),%edi 10cdff: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10ce02: 89 f9 mov %edi,%ecx 10ce04: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10ce07: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce0a: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10ce10: 85 ff test %edi,%edi 10ce12: 74 04 je 10ce18 <_Objects_Initialize_information+0x6c> 10ce14: 85 c9 test %ecx,%ecx 10ce16: 74 67 je 10ce7f <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10ce18: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10ce1c: c7 40 1c a4 50 12 00 movl $0x1250a4,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce23: c1 e2 18 shl $0x18,%edx 10ce26: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10ce2c: c1 e3 1b shl $0x1b,%ebx 10ce2f: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10ce31: 31 db xor %ebx,%ebx 10ce33: 85 c9 test %ecx,%ecx 10ce35: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce38: 09 da or %ebx,%edx 10ce3a: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10ce3d: f7 c6 03 00 00 00 test $0x3,%esi 10ce43: 75 23 jne 10ce68 <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10ce45: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ce49: 8d 50 24 lea 0x24(%eax),%edx 10ce4c: 89 50 20 mov %edx,0x20(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ce4f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10ce56: 8d 50 20 lea 0x20(%eax),%edx 10ce59: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ce5c: 85 c9 test %ecx,%ecx 10ce5e: 75 10 jne 10ce70 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce60: 8d 65 f4 lea -0xc(%ebp),%esp 10ce63: 5b pop %ebx 10ce64: 5e pop %esi 10ce65: 5f pop %edi 10ce66: c9 leave 10ce67: c3 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10ce68: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ce6b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10ce6e: eb d5 jmp 10ce45 <_Objects_Initialize_information+0x99><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10ce70: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce73: 8d 65 f4 lea -0xc(%ebp),%esp 10ce76: 5b pop %ebx 10ce77: 5e pop %esi 10ce78: 5f pop %edi 10ce79: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10ce7a: e9 b1 fa ff ff jmp 10c930 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10ce7f: 50 push %eax 10ce80: 6a 13 push $0x13 10ce82: 6a 01 push $0x1 10ce84: 6a 00 push $0x0 10ce86: e8 71 f9 ff ff call 10c7fc <_Internal_error_Occurred> =============================================================================== 0010ce9c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10ce9c: 55 push %ebp 10ce9d: 89 e5 mov %esp,%ebp 10ce9f: 57 push %edi 10cea0: 56 push %esi 10cea1: 53 push %ebx 10cea2: 8b 45 08 mov 0x8(%ebp),%eax 10cea5: 8b 4d 0c mov 0xc(%ebp),%ecx 10cea8: 8b 55 10 mov 0x10(%ebp),%edx 10ceab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ceae: 85 ff test %edi,%edi 10ceb0: 74 56 je 10cf08 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ceb2: 85 c9 test %ecx,%ecx 10ceb4: 74 08 je 10cebe <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ceb6: 8b 70 10 mov 0x10(%eax),%esi 10ceb9: 66 85 f6 test %si,%si 10cebc: 75 0a jne 10cec8 <_Objects_Name_to_id_u32+0x2c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 10cebe: b8 01 00 00 00 mov $0x1,%eax #endif } 10cec3: 5b pop %ebx 10cec4: 5e pop %esi 10cec5: 5f pop %edi 10cec6: c9 leave 10cec7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cec8: 85 d2 test %edx,%edx 10ceca: 75 20 jne 10ceec <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cecc: 0f b7 f6 movzwl %si,%esi 10cecf: 8b 58 1c mov 0x1c(%eax),%ebx 10ced2: b8 01 00 00 00 mov $0x1,%eax 10ced7: 90 nop the_object = information->local_table[ index ]; 10ced8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cedb: 85 d2 test %edx,%edx 10cedd: 74 05 je 10cee4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cedf: 39 4a 0c cmp %ecx,0xc(%edx) 10cee2: 74 18 je 10cefc <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cee4: 40 inc %eax 10cee5: 39 c6 cmp %eax,%esi 10cee7: 73 ef jae 10ced8 <_Objects_Name_to_id_u32+0x3c> 10cee9: eb d3 jmp 10cebe <_Objects_Name_to_id_u32+0x22> 10ceeb: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10ceec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cef2: 74 d8 je 10cecc <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cef4: 4a dec %edx 10cef5: 75 c7 jne 10cebe <_Objects_Name_to_id_u32+0x22> 10cef7: eb d3 jmp 10cecc <_Objects_Name_to_id_u32+0x30> 10cef9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cefc: 8b 42 08 mov 0x8(%edx),%eax 10ceff: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf01: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cf03: 5b pop %ebx 10cf04: 5e pop %esi 10cf05: 5f pop %edi 10cf06: c9 leave 10cf07: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf08: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cf0d: 5b pop %ebx 10cf0e: 5e pop %esi 10cf0f: 5f pop %edi 10cf10: c9 leave 10cf11: c3 ret =============================================================================== 0010ed7c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ed7c: 55 push %ebp 10ed7d: 89 e5 mov %esp,%ebp 10ed7f: 53 push %ebx 10ed80: 83 ec 0c sub $0xc,%esp 10ed83: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10ed86: 8b 45 08 mov 0x8(%ebp),%eax 10ed89: 0f b7 40 38 movzwl 0x38(%eax),%eax 10ed8d: 50 push %eax 10ed8e: 53 push %ebx 10ed8f: e8 54 66 00 00 call 1153e8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ed94: 0f be 0b movsbl (%ebx),%ecx 10ed97: c1 e1 18 shl $0x18,%ecx 10ed9a: 83 c4 10 add $0x10,%esp 10ed9d: 83 f8 01 cmp $0x1,%eax 10eda0: 76 32 jbe 10edd4 <_Objects_Set_name+0x58> 10eda2: 0f be 53 01 movsbl 0x1(%ebx),%edx 10eda6: c1 e2 10 shl $0x10,%edx 10eda9: 09 ca or %ecx,%edx 10edab: 83 f8 02 cmp $0x2,%eax 10edae: 74 2c je 10eddc <_Objects_Set_name+0x60> 10edb0: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10edb4: c1 e1 08 shl $0x8,%ecx 10edb7: 09 d1 or %edx,%ecx 10edb9: 83 f8 03 cmp $0x3,%eax 10edbc: 74 37 je 10edf5 <_Objects_Set_name+0x79> 10edbe: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edc2: 09 c1 or %eax,%ecx 10edc4: 8b 55 0c mov 0xc(%ebp),%edx 10edc7: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edca: b0 01 mov $0x1,%al 10edcc: 8b 5d fc mov -0x4(%ebp),%ebx 10edcf: c9 leave 10edd0: c3 ret 10edd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edd4: 89 ca mov %ecx,%edx 10edd6: 81 ca 00 00 20 00 or $0x200000,%edx 10eddc: 89 d1 mov %edx,%ecx 10edde: 80 cd 20 or $0x20,%ch 10ede1: b8 20 00 00 00 mov $0x20,%eax 10ede6: 09 c1 or %eax,%ecx 10ede8: 8b 55 0c mov 0xc(%ebp),%edx 10edeb: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edee: b0 01 mov $0x1,%al 10edf0: 8b 5d fc mov -0x4(%ebp),%ebx 10edf3: c9 leave 10edf4: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edf5: b8 20 00 00 00 mov $0x20,%eax 10edfa: eb c6 jmp 10edc2 <_Objects_Set_name+0x46> =============================================================================== 0010cf14 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cf14: 55 push %ebp 10cf15: 89 e5 mov %esp,%ebp 10cf17: 57 push %edi 10cf18: 56 push %esi 10cf19: 53 push %ebx 10cf1a: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cf1d: 8b 45 08 mov 0x8(%ebp),%eax 10cf20: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cf24: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cf28: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cf2c: 29 d8 sub %ebx,%eax 10cf2e: 31 d2 xor %edx,%edx 10cf30: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cf32: 85 c0 test %eax,%eax 10cf34: 74 21 je 10cf57 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cf36: 8b 55 08 mov 0x8(%ebp),%edx 10cf39: 8b 7a 30 mov 0x30(%edx),%edi 10cf3c: 3b 0f cmp (%edi),%ecx 10cf3e: 74 1f je 10cf5f <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cf40: 31 d2 xor %edx,%edx 10cf42: eb 0e jmp 10cf52 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cf44: 01 cb add %ecx,%ebx 10cf46: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cf4d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cf50: 74 12 je 10cf64 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cf52: 42 inc %edx 10cf53: 39 d0 cmp %edx,%eax 10cf55: 77 ed ja 10cf44 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cf57: 8d 65 f4 lea -0xc(%ebp),%esp 10cf5a: 5b pop %ebx 10cf5b: 5e pop %esi 10cf5c: 5f pop %edi 10cf5d: c9 leave 10cf5e: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cf5f: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cf61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10cf64: 8b 55 08 mov 0x8(%ebp),%edx 10cf67: 8b 42 20 mov 0x20(%edx),%eax 10cf6a: 89 75 e4 mov %esi,-0x1c(%ebp) 10cf6d: eb 07 jmp 10cf76 <_Objects_Shrink_information+0x62> 10cf6f: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cf70: 85 ff test %edi,%edi 10cf72: 74 2c je 10cfa0 <_Objects_Shrink_information+0x8c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cf74: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10cf76: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cf7a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cf7c: 39 da cmp %ebx,%edx 10cf7e: 72 f0 jb 10cf70 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cf80: 8b 75 08 mov 0x8(%ebp),%esi 10cf83: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cf87: 8d 0c 0b lea (%ebx,%ecx,1),%ecx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 10cf8a: 39 ca cmp %ecx,%edx 10cf8c: 73 e2 jae 10cf70 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10cf8e: 83 ec 0c sub $0xc,%esp 10cf91: 50 push %eax 10cf92: e8 ed ef ff ff call 10bf84 <_Chain_Extract> 10cf97: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cf9a: 85 ff test %edi,%edi 10cf9c: 75 d6 jne 10cf74 <_Objects_Shrink_information+0x60> 10cf9e: 66 90 xchg %ax,%ax 10cfa0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cfa3: 83 ec 0c sub $0xc,%esp 10cfa6: 8b 55 08 mov 0x8(%ebp),%edx 10cfa9: 8b 42 34 mov 0x34(%edx),%eax 10cfac: ff 34 30 pushl (%eax,%esi,1) 10cfaf: e8 8c 17 00 00 call 10e740 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cfb4: 8b 55 08 mov 0x8(%ebp),%edx 10cfb7: 8b 42 34 mov 0x34(%edx),%eax 10cfba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cfc1: 8b 42 30 mov 0x30(%edx),%eax 10cfc4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cfcb: 8b 42 14 mov 0x14(%edx),%eax 10cfce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cfd2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cfd5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd8: 5b pop %ebx 10cfd9: 5e pop %esi 10cfda: 5f pop %edi 10cfdb: c9 leave 10cfdc: c3 ret =============================================================================== 0010d73c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d73c: 55 push %ebp 10d73d: 89 e5 mov %esp,%ebp 10d73f: 56 push %esi 10d740: 53 push %ebx 10d741: 8b 5d 08 mov 0x8(%ebp),%ebx 10d744: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d747: 85 db test %ebx,%ebx 10d749: 74 35 je 10d780 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d74b: 85 f6 test %esi,%esi 10d74d: 74 31 je 10d780 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d74f: 83 ec 0c sub $0xc,%esp 10d752: ff 35 a4 65 12 00 pushl 0x1265a4 10d758: e8 7b ee ff ff call 10c5d8 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d75d: 5a pop %edx 10d75e: 59 pop %ecx 10d75f: 56 push %esi 10d760: 53 push %ebx 10d761: e8 16 3c 00 00 call 11137c <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d766: 58 pop %eax 10d767: ff 35 a4 65 12 00 pushl 0x1265a4 10d76d: e8 ae ee ff ff call 10c620 <_API_Mutex_Unlock> return true; 10d772: 83 c4 10 add $0x10,%esp 10d775: b0 01 mov $0x1,%al } 10d777: 8d 65 f8 lea -0x8(%ebp),%esp 10d77a: 5b pop %ebx 10d77b: 5e pop %esi 10d77c: c9 leave 10d77d: c3 ret 10d77e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 10d780: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d782: 8d 65 f8 lea -0x8(%ebp),%esp 10d785: 5b pop %ebx 10d786: 5e pop %esi 10d787: c9 leave 10d788: c3 ret =============================================================================== 00110ac4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110ac4: 55 push %ebp 110ac5: 89 e5 mov %esp,%ebp 110ac7: 56 push %esi 110ac8: 53 push %ebx 110ac9: 83 ec 10 sub $0x10,%esp 110acc: 8b 5d 08 mov 0x8(%ebp),%ebx 110acf: 8b 75 0c mov 0xc(%ebp),%esi 110ad2: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110ad5: 8b 15 54 d2 12 00 mov 0x12d254,%edx 110adb: 85 d2 test %edx,%edx 110add: 74 19 je 110af8 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110adf: 0f b6 c0 movzbl %al,%eax 110ae2: 89 45 10 mov %eax,0x10(%ebp) 110ae5: 89 75 0c mov %esi,0xc(%ebp) 110ae8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110aeb: 8d 65 f8 lea -0x8(%ebp),%esp 110aee: 5b pop %ebx 110aef: 5e pop %esi 110af0: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110af1: e9 76 f2 ff ff jmp 10fd6c <_Heap_Walk> 110af6: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110af8: 83 ec 0c sub $0xc,%esp 110afb: ff 35 04 d3 12 00 pushl 0x12d304 110b01: 88 45 f4 mov %al,-0xc(%ebp) 110b04: e8 83 e4 ff ff call 10ef8c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110b09: 83 c4 0c add $0xc,%esp 110b0c: 8a 45 f4 mov -0xc(%ebp),%al 110b0f: 0f b6 c0 movzbl %al,%eax 110b12: 50 push %eax 110b13: 56 push %esi 110b14: 53 push %ebx 110b15: e8 52 f2 ff ff call 10fd6c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110b1a: 5a pop %edx 110b1b: ff 35 04 d3 12 00 pushl 0x12d304 110b21: 88 45 f4 mov %al,-0xc(%ebp) 110b24: e8 ab e4 ff ff call 10efd4 <_API_Mutex_Unlock> 110b29: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110b2c: 8a 45 f4 mov -0xc(%ebp),%al 110b2f: 8d 65 f8 lea -0x8(%ebp),%esp 110b32: 5b pop %ebx 110b33: 5e pop %esi 110b34: c9 leave 110b35: c3 ret =============================================================================== 00110264 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110264: 55 push %ebp 110265: 89 e5 mov %esp,%ebp 110267: 53 push %ebx 110268: 83 ec 10 sub $0x10,%esp 11026b: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 11026e: 80 3d e4 11 12 00 01 cmpb $0x1,0x1211e4 110275: 19 c0 sbb %eax,%eax 110277: 83 e0 c0 and $0xffffffc0,%eax 11027a: 83 c0 60 add $0x60,%eax if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 11027d: 50 push %eax 11027e: e8 a1 e4 ff ff call 10e724 <_Workspace_Allocate> if ( !api ) 110283: 83 c4 10 add $0x10,%esp 110286: 85 c0 test %eax,%eax 110288: 74 6a je 1102f4 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 11028a: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110290: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 110296: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 11029d: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1102a1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1102a8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1102af: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1102b6: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 1102bd: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 1102c4: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 1102cb: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 1102ce: 80 3d e4 11 12 00 00 cmpb $0x0,0x1211e4 1102d5: 74 13 je 1102ea <_RTEMS_tasks_Create_extension+0x86> 1102d7: 31 d2 xor %edx,%edx 1102d9: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 1102dc: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 1102e3: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 1102e4: 42 inc %edx 1102e5: 83 fa 10 cmp $0x10,%edx 1102e8: 75 f2 jne 1102dc <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 1102ea: b0 01 mov $0x1,%al } 1102ec: 8b 5d fc mov -0x4(%ebp),%ebx 1102ef: c9 leave 1102f0: c3 ret 1102f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 1102f4: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 1102f6: 8b 5d fc mov -0x4(%ebp),%ebx 1102f9: c9 leave 1102fa: c3 ret =============================================================================== 0011020c <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 11020c: 55 push %ebp 11020d: 89 e5 mov %esp,%ebp 11020f: 56 push %esi 110210: 53 push %ebx 110211: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110214: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax deleted->task_variables = NULL; 11021a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 110221: 00 00 00 while (tvp) { 110224: 85 c0 test %eax,%eax 110226: 75 06 jne 11022e <_RTEMS_tasks_Delete_extension+0x22> 110228: eb 17 jmp 110241 <_RTEMS_tasks_Delete_extension+0x35> 11022a: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 11022c: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 11022e: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110230: 83 ec 08 sub $0x8,%esp 110233: 50 push %eax 110234: 53 push %ebx 110235: e8 56 01 00 00 call 110390 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 11023a: 83 c4 10 add $0x10,%esp 11023d: 85 f6 test %esi,%esi 11023f: 75 eb jne 11022c <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110241: 83 ec 0c sub $0xc,%esp 110244: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 11024a: e8 f1 e4 ff ff call 10e740 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 11024f: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 110256: 00 00 00 110259: 83 c4 10 add $0x10,%esp } 11025c: 8d 65 f8 lea -0x8(%ebp),%esp 11025f: 5b pop %ebx 110260: 5e pop %esi 110261: c9 leave 110262: c3 ret =============================================================================== 00110190 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110190: 55 push %ebp 110191: 89 e5 mov %esp,%ebp 110193: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 110196: a1 60 12 12 00 mov 0x121260,%eax 11019b: 85 c0 test %eax,%eax 11019d: 74 05 je 1101a4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 11019f: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1101a0: ff e0 jmp *%eax 1101a2: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1101a4: c9 leave 1101a5: c3 ret =============================================================================== 0010ba60 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10ba60: 55 push %ebp 10ba61: 89 e5 mov %esp,%ebp 10ba63: 57 push %edi 10ba64: 56 push %esi 10ba65: 53 push %ebx 10ba66: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10ba69: 8b 1d 0c 12 12 00 mov 0x12120c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10ba6f: 8b 3d 08 12 12 00 mov 0x121208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10ba75: 85 db test %ebx,%ebx 10ba77: 74 46 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba79: 85 ff test %edi,%edi 10ba7b: 74 42 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10ba7d: 31 f6 xor %esi,%esi 10ba7f: 90 nop return_value = rtems_task_create( 10ba80: 83 ec 08 sub $0x8,%esp 10ba83: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba86: 50 push %eax 10ba87: ff 73 0c pushl 0xc(%ebx) 10ba8a: ff 73 14 pushl 0x14(%ebx) 10ba8d: ff 73 04 pushl 0x4(%ebx) 10ba90: ff 73 08 pushl 0x8(%ebx) 10ba93: ff 33 pushl (%ebx) 10ba95: e8 92 fd ff ff call 10b82c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10ba9a: 83 c4 20 add $0x20,%esp 10ba9d: 85 c0 test %eax,%eax 10ba9f: 75 26 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10baa1: 51 push %ecx 10baa2: ff 73 18 pushl 0x18(%ebx) 10baa5: ff 73 10 pushl 0x10(%ebx) 10baa8: ff 75 e4 pushl -0x1c(%ebp) 10baab: e8 24 00 00 00 call 10bad4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bab0: 83 c4 10 add $0x10,%esp 10bab3: 85 c0 test %eax,%eax 10bab5: 75 10 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bab7: 46 inc %esi 10bab8: 83 c3 1c add $0x1c,%ebx 10babb: 39 f7 cmp %esi,%edi 10babd: 77 c1 ja 10ba80 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10babf: 8d 65 f4 lea -0xc(%ebp),%esp 10bac2: 5b pop %ebx 10bac3: 5e pop %esi 10bac4: 5f pop %edi 10bac5: c9 leave 10bac6: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10bac7: 52 push %edx 10bac8: 50 push %eax 10bac9: 6a 01 push $0x1 10bacb: 6a 01 push $0x1 10bacd: e8 2a 0d 00 00 call 10c7fc <_Internal_error_Occurred> =============================================================================== 001101a8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1101a8: 55 push %ebp 1101a9: 89 e5 mov %esp,%ebp 1101ab: 57 push %edi 1101ac: 56 push %esi 1101ad: 53 push %ebx 1101ae: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1101b1: 8b 45 08 mov 0x8(%ebp),%eax 1101b4: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1101ba: 85 db test %ebx,%ebx 1101bc: 74 45 je 110203 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1101be: 9c pushf 1101bf: fa cli 1101c0: 58 pop %eax signal_set = asr->signals_posted; 1101c1: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1101c4: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1101cb: 50 push %eax 1101cc: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1101cd: 85 f6 test %esi,%esi 1101cf: 74 32 je 110203 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 1101d1: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1101d4: 50 push %eax 1101d5: 8d 7d e4 lea -0x1c(%ebp),%edi 1101d8: 57 push %edi 1101d9: 68 ff ff 00 00 push $0xffff 1101de: ff 73 10 pushl 0x10(%ebx) 1101e1: e8 b2 1c 00 00 call 111e98 (*asr->handler)( signal_set ); 1101e6: 89 34 24 mov %esi,(%esp) 1101e9: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 1101ec: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1101ef: 83 c4 0c add $0xc,%esp 1101f2: 57 push %edi 1101f3: 68 ff ff 00 00 push $0xffff 1101f8: ff 75 e4 pushl -0x1c(%ebp) 1101fb: e8 98 1c 00 00 call 111e98 110200: 83 c4 10 add $0x10,%esp } 110203: 8d 65 f4 lea -0xc(%ebp),%esp 110206: 5b pop %ebx 110207: 5e pop %esi 110208: 5f pop %edi 110209: c9 leave 11020a: c3 ret =============================================================================== 00110148 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110148: 55 push %ebp 110149: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11014b: 8b 45 08 mov 0x8(%ebp),%eax 11014e: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110154: 85 c0 test %eax,%eax 110156: 74 13 je 11016b <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110158: 8b 50 04 mov 0x4(%eax),%edx 11015b: 8b 0a mov (%edx),%ecx 11015d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110160: 8b 48 08 mov 0x8(%eax),%ecx 110163: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110165: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110167: 85 c0 test %eax,%eax 110169: 75 ed jne 110158 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 11016b: 8b 45 0c mov 0xc(%ebp),%eax 11016e: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110174: 85 c0 test %eax,%eax 110176: 74 13 je 11018b <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 110178: 8b 50 04 mov 0x4(%eax),%edx 11017b: 8b 0a mov (%edx),%ecx 11017d: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110180: 8b 48 0c mov 0xc(%eax),%ecx 110183: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110185: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 110187: 85 c0 test %eax,%eax 110189: 75 ed jne 110178 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11018b: c9 leave 11018c: c3 ret =============================================================================== 0010c424 <_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 ) { 10c424: 55 push %ebp 10c425: 89 e5 mov %esp,%ebp 10c427: 57 push %edi 10c428: 56 push %esi 10c429: 53 push %ebx 10c42a: 83 ec 38 sub $0x38,%esp 10c42d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c430: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c433: 8d 75 e0 lea -0x20(%ebp),%esi 10c436: 56 push %esi 10c437: e8 58 18 00 00 call 10dc94 <_TOD_Get_uptime> _Timestamp_Subtract( 10c43c: 83 c4 0c add $0xc,%esp 10c43f: ff 75 0c pushl 0xc(%ebp) 10c442: 56 push %esi 10c443: 8d 43 4c lea 0x4c(%ebx),%eax 10c446: 50 push %eax 10c447: e8 10 39 00 00 call 10fd5c <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c44c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c452: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c458: 89 45 d8 mov %eax,-0x28(%ebp) 10c45b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c45e: 83 c4 10 add $0x10,%esp 10c461: 39 3d 18 88 12 00 cmp %edi,0x128818 10c467: 74 0b je 10c474 <_Rate_monotonic_Get_status+0x50> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c469: b0 01 mov $0x1,%al } 10c46b: 8d 65 f4 lea -0xc(%ebp),%esp 10c46e: 5b pop %ebx 10c46f: 5e pop %esi 10c470: 5f pop %edi 10c471: c9 leave 10c472: c3 ret 10c473: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c474: 52 push %edx 10c475: 8d 7d d0 lea -0x30(%ebp),%edi 10c478: 57 push %edi 10c479: 56 push %esi 10c47a: 68 30 86 12 00 push $0x128630 10c47f: e8 d8 38 00 00 call 10fd5c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c484: 5e pop %esi 10c485: 58 pop %eax 10c486: 57 push %edi 10c487: 8d 75 d8 lea -0x28(%ebp),%esi 10c48a: 56 push %esi 10c48b: e8 d0 37 00 00 call 10fc60 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 10c490: 83 c3 44 add $0x44,%ebx 10c493: 5a pop %edx 10c494: 59 pop %ecx 10c495: 53 push %ebx 10c496: 56 push %esi 10c497: e8 9c 38 00 00 call 10fd38 <_Timespec_Less_than> 10c49c: 83 c4 10 add $0x10,%esp 10c49f: 84 c0 test %al,%al 10c4a1: 74 05 je 10c4a8 <_Rate_monotonic_Get_status+0x84> return false; 10c4a3: 31 c0 xor %eax,%eax 10c4a5: eb c4 jmp 10c46b <_Rate_monotonic_Get_status+0x47> 10c4a7: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c4a8: 50 push %eax 10c4a9: ff 75 10 pushl 0x10(%ebp) 10c4ac: 56 push %esi 10c4ad: 53 push %ebx 10c4ae: e8 a9 38 00 00 call 10fd5c <_Timespec_Subtract> 10c4b3: 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; 10c4b6: b0 01 mov $0x1,%al 10c4b8: eb b1 jmp 10c46b <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c4bc <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c4bc: 55 push %ebp 10c4bd: 89 e5 mov %esp,%ebp 10c4bf: 57 push %edi 10c4c0: 56 push %esi 10c4c1: 53 push %ebx 10c4c2: 83 ec 28 sub $0x28,%esp 10c4c5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c4c8: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 10c4cb: 8d 7d e0 lea -0x20(%ebp),%edi 10c4ce: 57 push %edi 10c4cf: e8 c0 17 00 00 call 10dc94 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 10c4d4: 8b 45 e0 mov -0x20(%ebp),%eax 10c4d7: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4da: 89 43 4c mov %eax,0x4c(%ebx) 10c4dd: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 10c4e0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c4e6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c4ec: 89 43 44 mov %eax,0x44(%ebx) 10c4ef: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c4f2: 83 c4 10 add $0x10,%esp 10c4f5: 39 35 18 88 12 00 cmp %esi,0x128818 10c4fb: 74 0b je 10c508 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c4fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c500: 5b pop %ebx 10c501: 5e pop %esi 10c502: 5f pop %edi 10c503: c9 leave 10c504: c3 ret 10c505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c508: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c509: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c50c: 56 push %esi 10c50d: 57 push %edi 10c50e: 68 30 86 12 00 push $0x128630 10c513: e8 44 38 00 00 call 10fd5c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c518: 59 pop %ecx 10c519: 5f pop %edi 10c51a: 56 push %esi 10c51b: 83 c3 44 add $0x44,%ebx 10c51e: 53 push %ebx 10c51f: e8 3c 37 00 00 call 10fc60 <_Timespec_Add_to> 10c524: 83 c4 10 add $0x10,%esp } #endif } 10c527: 8d 65 f4 lea -0xc(%ebp),%esp 10c52a: 5b pop %ebx 10c52b: 5e pop %esi 10c52c: 5f pop %edi 10c52d: c9 leave 10c52e: c3 ret =============================================================================== 0010ca78 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 2c sub $0x2c,%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 ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: 68 80 84 12 00 push $0x128480 10ca8a: e8 89 1c 00 00 call 10e718 <_Objects_Get> switch ( location ) { 10ca8f: 83 c4 10 add $0x10,%esp 10ca92: 8b 55 f4 mov -0xc(%ebp),%edx 10ca95: 85 d2 test %edx,%edx 10ca97: 75 29 jne 10cac2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10ca99: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10ca9c: f6 42 11 40 testb $0x40,0x11(%edx) 10caa0: 74 08 je 10caaa <_Rate_monotonic_Timeout+0x32> 10caa2: 8b 48 08 mov 0x8(%eax),%ecx 10caa5: 39 4a 20 cmp %ecx,0x20(%edx) 10caa8: 74 4e je 10caf8 <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10caaa: 83 78 38 01 cmpl $0x1,0x38(%eax) 10caae: 74 14 je 10cac4 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10cab0: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10cab7: a1 74 85 12 00 mov 0x128574,%eax 10cabc: 48 dec %eax 10cabd: a3 74 85 12 00 mov %eax,0x128574 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cac2: c9 leave 10cac3: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10cac4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cacb: 83 ec 0c sub $0xc,%esp 10cace: 50 push %eax 10cacf: 89 45 e4 mov %eax,-0x1c(%ebp) 10cad2: e8 e5 f9 ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cad7: 8b 45 e4 mov -0x1c(%ebp),%eax 10cada: 8b 50 3c mov 0x3c(%eax),%edx 10cadd: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cae0: 5a pop %edx 10cae1: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cae2: 83 c0 10 add $0x10,%eax 10cae5: 50 push %eax 10cae6: 68 44 86 12 00 push $0x128644 10caeb: e8 4c 35 00 00 call 11003c <_Watchdog_Insert> 10caf0: 83 c4 10 add $0x10,%esp 10caf3: eb c2 jmp 10cab7 <_Rate_monotonic_Timeout+0x3f> 10caf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10caf8: 83 ec 08 sub $0x8,%esp 10cafb: 68 f8 ff 03 10 push $0x1003fff8 10cb00: 52 push %edx 10cb01: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb04: e8 af 20 00 00 call 10ebb8 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10cb09: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb0c: 89 04 24 mov %eax,(%esp) 10cb0f: eb c1 jmp 10cad2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c530 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c530: 55 push %ebp 10c531: 89 e5 mov %esp,%ebp 10c533: 57 push %edi 10c534: 56 push %esi 10c535: 53 push %ebx 10c536: 83 ec 1c sub $0x1c,%esp 10c539: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c53c: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c53f: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c543: 0f 84 bf 00 00 00 je 10c608 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c549: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54a: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c54d: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54e: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c551: 56 push %esi 10c552: 53 push %ebx 10c553: e8 cc fe ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c558: 83 c4 10 add $0x10,%esp 10c55b: 84 c0 test %al,%al 10c55d: 75 09 jne 10c568 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c55f: 8d 65 f4 lea -0xc(%ebp),%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c568: 83 ec 08 sub $0x8,%esp 10c56b: 57 push %edi 10c56c: 8d 43 6c lea 0x6c(%ebx),%eax 10c56f: 50 push %eax 10c570: e8 eb 36 00 00 call 10fc60 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c575: 58 pop %eax 10c576: 5a pop %edx 10c577: 8d 43 5c lea 0x5c(%ebx),%eax 10c57a: 50 push %eax 10c57b: 57 push %edi 10c57c: e8 b7 37 00 00 call 10fd38 <_Timespec_Less_than> 10c581: 83 c4 10 add $0x10,%esp 10c584: 84 c0 test %al,%al 10c586: 74 0c je 10c594 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c588: 8b 45 e0 mov -0x20(%ebp),%eax 10c58b: 8b 55 e4 mov -0x1c(%ebp),%edx 10c58e: 89 43 5c mov %eax,0x5c(%ebx) 10c591: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c594: 83 ec 08 sub $0x8,%esp 10c597: 8d 43 64 lea 0x64(%ebx),%eax 10c59a: 50 push %eax 10c59b: 57 push %edi 10c59c: e8 73 37 00 00 call 10fd14 <_Timespec_Greater_than> 10c5a1: 83 c4 10 add $0x10,%esp 10c5a4: 84 c0 test %al,%al 10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ae: 89 43 64 mov %eax,0x64(%ebx) 10c5b1: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 10c5b4: 83 ec 08 sub $0x8,%esp 10c5b7: 56 push %esi 10c5b8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5be: 50 push %eax 10c5bf: e8 9c 36 00 00 call 10fc60 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c5c4: 5a pop %edx 10c5c5: 59 pop %ecx 10c5c6: 8d 43 74 lea 0x74(%ebx),%eax 10c5c9: 50 push %eax 10c5ca: 56 push %esi 10c5cb: e8 68 37 00 00 call 10fd38 <_Timespec_Less_than> 10c5d0: 83 c4 10 add $0x10,%esp 10c5d3: 84 c0 test %al,%al 10c5d5: 75 39 jne 10c610 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c5d7: 83 ec 08 sub $0x8,%esp 10c5da: 8d 43 7c lea 0x7c(%ebx),%eax 10c5dd: 50 push %eax 10c5de: 56 push %esi 10c5df: e8 30 37 00 00 call 10fd14 <_Timespec_Greater_than> 10c5e4: 83 c4 10 add $0x10,%esp 10c5e7: 84 c0 test %al,%al 10c5e9: 0f 84 70 ff ff ff je 10c55f <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c5ef: 8b 45 d8 mov -0x28(%ebp),%eax 10c5f2: 8b 55 dc mov -0x24(%ebp),%edx 10c5f5: 89 43 7c mov %eax,0x7c(%ebx) 10c5f8: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c5fe: 8d 65 f4 lea -0xc(%ebp),%esp 10c601: 5b pop %ebx 10c602: 5e pop %esi 10c603: 5f pop %edi 10c604: c9 leave 10c605: c3 ret 10c606: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c608: ff 43 58 incl 0x58(%ebx) 10c60b: e9 39 ff ff ff jmp 10c549 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 10c610: 8b 45 d8 mov -0x28(%ebp),%eax 10c613: 8b 55 dc mov -0x24(%ebp),%edx 10c616: 89 43 74 mov %eax,0x74(%ebx) 10c619: 89 53 78 mov %edx,0x78(%ebx) 10c61c: eb b9 jmp 10c5d7 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010d9d0 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d9d0: 55 push %ebp 10d9d1: 89 e5 mov %esp,%ebp 10d9d3: 53 push %ebx 10d9d4: 83 ec 04 sub $0x4,%esp 10d9d7: 8b 5d 08 mov 0x8(%ebp),%ebx 10d9da: a1 94 13 13 00 mov 0x131394,%eax 10d9df: 40 inc %eax 10d9e0: a3 94 13 13 00 mov %eax,0x131394 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d9e5: a1 28 14 13 00 mov 0x131428,%eax if ( time->tv_sec < seconds ) 10d9ea: 8b 13 mov (%ebx),%edx 10d9ec: 39 d0 cmp %edx,%eax 10d9ee: 7f 34 jg 10da24 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d9f0: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10d9f1: 29 c2 sub %eax,%edx 10d9f3: 52 push %edx 10d9f4: 6a 00 push $0x0 10d9f6: 68 58 14 13 00 push $0x131458 10d9fb: e8 88 24 00 00 call 10fe88 <_Watchdog_Adjust> 10da00: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10da03: 8b 03 mov (%ebx),%eax 10da05: a3 28 14 13 00 mov %eax,0x131428 10da0a: 8b 43 04 mov 0x4(%ebx),%eax 10da0d: a3 2c 14 13 00 mov %eax,0x13142c _TOD_Is_set = true; 10da12: c6 05 a8 13 13 00 01 movb $0x1,0x1313a8 _TOD_Activate(); _Thread_Enable_dispatch(); } 10da19: 8b 5d fc mov -0x4(%ebp),%ebx 10da1c: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10da1d: e9 d6 12 00 00 jmp 10ecf8 <_Thread_Enable_dispatch> 10da22: 66 90 xchg %ax,%ax <== NOT EXECUTED 10da24: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10da25: 29 d0 sub %edx,%eax 10da27: 50 push %eax 10da28: 6a 01 push $0x1 10da2a: 68 58 14 13 00 push $0x131458 10da2f: e8 54 24 00 00 call 10fe88 <_Watchdog_Adjust> 10da34: 83 c4 10 add $0x10,%esp 10da37: eb ca jmp 10da03 <_TOD_Set+0x33> =============================================================================== 0010c41c <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c41c: 55 push %ebp 10c41d: 89 e5 mov %esp,%ebp 10c41f: 53 push %ebx 10c420: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10c423: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c42a: a1 2c 12 12 00 mov 0x12122c,%eax 10c42f: 8d 04 80 lea (%eax,%eax,4),%eax 10c432: 8d 04 80 lea (%eax,%eax,4),%eax 10c435: 8d 04 80 lea (%eax,%eax,4),%eax 10c438: c1 e0 03 shl $0x3,%eax 10c43b: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c43e: a1 84 55 12 00 mov 0x125584,%eax 10c443: 40 inc %eax 10c444: a3 84 55 12 00 mov %eax,0x125584 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c449: 8d 5d f0 lea -0x10(%ebp),%ebx 10c44c: 53 push %ebx 10c44d: 68 b8 54 12 00 push $0x1254b8 10c452: e8 51 1d 00 00 call 10e1a8 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10c457: 58 pop %eax 10c458: 5a pop %edx 10c459: 53 push %ebx 10c45a: 68 c8 54 12 00 push $0x1254c8 10c45f: e8 44 1d 00 00 call 10e1a8 <_Timespec_Add_to> 10c464: 89 c3 mov %eax,%ebx while ( seconds ) { 10c466: 83 c4 10 add $0x10,%esp 10c469: 85 c0 test %eax,%eax 10c46b: 74 16 je 10c483 <_TOD_Tickle_ticks+0x67> 10c46d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c470: 83 ec 0c sub $0xc,%esp 10c473: 68 f8 54 12 00 push $0x1254f8 10c478: e8 eb 21 00 00 call 10e668 <_Watchdog_Tickle> 10c47d: 83 c4 10 add $0x10,%esp 10c480: 4b dec %ebx 10c481: 75 ed jne 10c470 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c483: 8b 5d fc mov -0x4(%ebp),%ebx 10c486: c9 leave 10c487: c3 ret =============================================================================== 0010c1ac <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c1ac: 55 push %ebp 10c1ad: 89 e5 mov %esp,%ebp 10c1af: 56 push %esi 10c1b0: 53 push %ebx 10c1b1: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c1b4: 8b 72 08 mov 0x8(%edx),%esi 10c1b7: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c1b8: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c1ba: 89 c3 mov %eax,%ebx 10c1bc: 83 e3 03 and $0x3,%ebx 10c1bf: 74 67 je 10c228 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c1c1: 8b 4a 04 mov 0x4(%edx),%ecx 10c1c4: 0f b7 8c 09 80 25 12 movzwl 0x122580(%ecx,%ecx,1),%ecx 10c1cb: 00 10c1cc: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1cf: 0f b7 8c 1b b4 25 12 movzwl 0x1225b4(%ebx,%ebx,1),%ecx 10c1d6: 00 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c1d7: 2d c4 07 00 00 sub $0x7c4,%eax 10c1dc: c1 e8 02 shr $0x2,%eax 10c1df: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c1e2: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c1e5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c1e8: 8d 04 98 lea (%eax,%ebx,4),%eax 10c1eb: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1ed: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c1ef: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c1f2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c1f5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c1f8: c1 e0 02 shl $0x2,%eax 10c1fb: 29 c8 sub %ecx,%eax 10c1fd: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c200: 8b 5a 14 mov 0x14(%edx),%ebx 10c203: 8b 4a 0c mov 0xc(%edx),%ecx 10c206: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c209: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c20c: c1 e1 02 shl $0x2,%ecx 10c20f: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c212: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c215: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c218: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c21f: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c222: 5b pop %ebx 10c223: 5e pop %esi 10c224: c9 leave 10c225: c3 ret 10c226: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c228: 8b 4a 04 mov 0x4(%edx),%ecx 10c22b: 0f b7 8c 09 9a 25 12 movzwl 0x12259a(%ecx,%ecx,1),%ecx 10c232: 00 10c233: 8d 34 31 lea (%ecx,%esi,1),%esi 10c236: eb 97 jmp 10c1cf <_TOD_To_seconds+0x23> =============================================================================== 0010c238 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 53 push %ebx 10c23c: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10c23f: 8b 1d 0c 53 12 00 mov 0x12530c,%ebx if ((!the_tod) || 10c245: 85 c9 test %ecx,%ecx 10c247: 74 53 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c249: b8 40 42 0f 00 mov $0xf4240,%eax 10c24e: 31 d2 xor %edx,%edx 10c250: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c252: 3b 41 18 cmp 0x18(%ecx),%eax 10c255: 76 45 jbe 10c29c <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c257: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c25b: 77 3f ja 10c29c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c25d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c261: 77 39 ja 10c29c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c263: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c267: 77 33 ja 10c29c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c269: 8b 41 04 mov 0x4(%ecx),%eax 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) || 10c26c: 85 c0 test %eax,%eax 10c26e: 74 2c je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c270: 83 f8 0c cmp $0xc,%eax 10c273: 77 27 ja 10c29c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c275: 8b 11 mov (%ecx),%edx (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) || 10c277: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c27d: 76 1d jbe 10c29c <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c27f: 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) || 10c282: 85 c9 test %ecx,%ecx 10c284: 74 16 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c286: 83 e2 03 and $0x3,%edx 10c289: 75 16 jne 10c2a1 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c28b: 8b 04 85 f4 25 12 00 mov 0x1225f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c292: 39 c8 cmp %ecx,%eax 10c294: 0f 93 c0 setae %al 10c297: eb 05 jmp 10c29e <_TOD_Validate+0x66> 10c299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (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; 10c29c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c29e: 5b pop %ebx 10c29f: c9 leave 10c2a0: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c2a1: 8b 04 85 c0 25 12 00 mov 0x1225c0(,%eax,4),%eax 10c2a8: eb e8 jmp 10c292 <_TOD_Validate+0x5a> =============================================================================== 0010d0a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d0a4: 55 push %ebp 10d0a5: 89 e5 mov %esp,%ebp 10d0a7: 57 push %edi 10d0a8: 56 push %esi 10d0a9: 53 push %ebx 10d0aa: 83 ec 28 sub $0x28,%esp 10d0ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d0b0: 8b 75 0c mov 0xc(%ebp),%esi 10d0b3: 8a 45 10 mov 0x10(%ebp),%al 10d0b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d0b9: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10d0bc: 53 push %ebx 10d0bd: e8 7a 0e 00 00 call 10df3c <_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 ) 10d0c2: 83 c4 10 add $0x10,%esp 10d0c5: 39 73 14 cmp %esi,0x14(%ebx) 10d0c8: 74 0d je 10d0d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d0ca: 83 ec 08 sub $0x8,%esp 10d0cd: 56 push %esi 10d0ce: 53 push %ebx 10d0cf: e8 1c 0d 00 00 call 10ddf0 <_Thread_Set_priority> 10d0d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d0d7: 9c pushf 10d0d8: fa cli 10d0d9: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d0da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d0dd: 83 f8 04 cmp $0x4,%eax 10d0e0: 74 26 je 10d108 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d0e2: 83 e7 04 and $0x4,%edi 10d0e5: 74 15 je 10d0fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d0e7: 52 push %edx 10d0e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d0e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d0ee: 0f 85 bc 00 00 00 jne 10d1b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d0f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d0f7: 5b pop %ebx 10d0f8: 5e pop %esi 10d0f9: 5f pop %edi 10d0fa: c9 leave 10d0fb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d0fc: 89 c1 mov %eax,%ecx 10d0fe: 83 e1 fb and $0xfffffffb,%ecx 10d101: 89 4b 10 mov %ecx,0x10(%ebx) 10d104: eb e1 jmp 10d0e7 <_Thread_Change_priority+0x43> 10d106: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d108: 83 e7 04 and $0x4,%edi 10d10b: 75 45 jne 10d152 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d10d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d114: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d11a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d121: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d124: 66 a1 e0 54 12 00 mov 0x1254e0,%ax 10d12a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d130: 66 a3 e0 54 12 00 mov %ax,0x1254e0 _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) 10d136: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d13a: 0f 84 88 00 00 00 je 10d1c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d140: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d146: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d149: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d14b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d14d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d14f: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d152: 52 push %edx 10d153: 9d popf 10d154: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d155: 66 8b 1d e0 54 12 00 mov 0x1254e0,%bx 10d15c: 31 c0 xor %eax,%eax 10d15e: 89 c1 mov %eax,%ecx 10d160: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d164: 0f b7 c9 movzwl %cx,%ecx 10d167: 66 8b 9c 09 60 55 12 mov 0x125560(%ecx,%ecx,1),%bx 10d16e: 00 10d16f: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d173: c1 e1 04 shl $0x4,%ecx 10d176: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10d179: 8d 04 01 lea (%ecx,%eax,1),%eax 10d17c: 8d 04 40 lea (%eax,%eax,2),%eax 10d17f: c1 e0 02 shl $0x2,%eax 10d182: 03 05 00 54 12 00 add 0x125400,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d188: 8b 00 mov (%eax),%eax 10d18a: a3 dc 56 12 00 mov %eax,0x1256dc * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d18f: 8b 0d d8 56 12 00 mov 0x1256d8,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d195: 39 c8 cmp %ecx,%eax 10d197: 74 0d je 10d1a6 <_Thread_Change_priority+0x102> 10d199: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d19d: 74 07 je 10d1a6 <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d19f: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 _ISR_Enable( level ); 10d1a6: 52 push %edx 10d1a7: 9d popf } 10d1a8: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ab: 5b pop %ebx 10d1ac: 5e pop %esi 10d1ad: 5f pop %edi 10d1ae: c9 leave 10d1af: c3 ret /* 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 ); 10d1b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d1b3: 8b 43 44 mov 0x44(%ebx),%eax 10d1b6: 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 ); } 10d1b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1bc: 5b pop %ebx 10d1bd: 5e pop %esi 10d1be: 5f pop %edi 10d1bf: c9 leave /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10d1c0: e9 93 0b 00 00 jmp 10dd58 <_Thread_queue_Requeue> 10d1c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d1c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d1ce: 8d 48 04 lea 0x4(%eax),%ecx 10d1d1: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d1d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d1d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d1d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d1db: 89 4b 04 mov %ecx,0x4(%ebx) 10d1de: e9 6f ff ff ff jmp 10d152 <_Thread_Change_priority+0xae> =============================================================================== 0010d1e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d1e4: 55 push %ebp 10d1e5: 89 e5 mov %esp,%ebp 10d1e7: 53 push %ebx 10d1e8: 8b 45 08 mov 0x8(%ebp),%eax 10d1eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d1ee: 9c pushf 10d1ef: fa cli 10d1f0: 5b pop %ebx current_state = the_thread->current_state; 10d1f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d1f4: 85 ca test %ecx,%edx 10d1f6: 74 70 je 10d268 <_Thread_Clear_state+0x84> 10d1f8: f7 d2 not %edx 10d1fa: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d1fc: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d1ff: 85 d2 test %edx,%edx 10d201: 75 65 jne 10d268 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d203: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d209: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d210: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d213: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10d21a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d220: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d227: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d22d: 8d 4a 04 lea 0x4(%edx),%ecx 10d230: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d232: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d235: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d238: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d23a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d23d: 53 push %ebx 10d23e: 9d popf 10d23f: fa cli * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10d240: 8b 50 14 mov 0x14(%eax),%edx 10d243: 8b 0d dc 56 12 00 mov 0x1256dc,%ecx 10d249: 3b 51 14 cmp 0x14(%ecx),%edx 10d24c: 73 1a jae 10d268 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d24e: a3 dc 56 12 00 mov %eax,0x1256dc if ( _Thread_Executing->is_preemptible || 10d253: a1 d8 56 12 00 mov 0x1256d8,%eax 10d258: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d25c: 74 12 je 10d270 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10d25e: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 10d265: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d268: 53 push %ebx 10d269: 9d popf } 10d26a: 5b pop %ebx 10d26b: c9 leave 10d26c: c3 ret 10d26d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d270: 85 d2 test %edx,%edx 10d272: 74 ea je 10d25e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d274: eb f2 jmp 10d268 <_Thread_Clear_state+0x84> =============================================================================== 0010d278 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d278: 55 push %ebp 10d279: 89 e5 mov %esp,%ebp 10d27b: 56 push %esi 10d27c: 53 push %ebx 10d27d: 8b 75 08 mov 0x8(%ebp),%esi 10d280: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 10d283: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d287: 8b 46 1c mov 0x1c(%esi),%eax 10d28a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d291: a1 34 54 12 00 mov 0x125434,%eax 10d296: 48 dec %eax 10d297: a3 34 54 12 00 mov %eax,0x125434 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d29c: 83 ec 0c sub $0xc,%esp 10d29f: 53 push %ebx 10d2a0: e8 5f 11 00 00 call 10e404 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d2a5: a1 34 54 12 00 mov 0x125434,%eax 10d2aa: 40 inc %eax 10d2ab: a3 34 54 12 00 mov %eax,0x125434 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d2b0: 59 pop %ecx 10d2b1: 58 pop %eax 10d2b2: 53 push %ebx 10d2b3: 56 push %esi 10d2b4: e8 4f f6 ff ff call 10c908 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d2b9: 58 pop %eax 10d2ba: 5a pop %edx 10d2bb: 6a 01 push $0x1 10d2bd: 53 push %ebx 10d2be: e8 99 0b 00 00 call 10de5c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d2c3: 89 1c 24 mov %ebx,(%esp) 10d2c6: e8 d1 09 00 00 call 10dc9c <_Thread_queue_Extract_with_proxy> 10d2cb: 83 c4 10 add $0x10,%esp 10d2ce: 84 c0 test %al,%al 10d2d0: 75 06 jne 10d2d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d2d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d2d6: 74 68 je 10d340 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d2d8: 3b 1d c0 54 12 00 cmp 0x1254c0,%ebx 10d2de: 74 74 je 10d354 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d2e0: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d2e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d2ea: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d2f0: 85 c0 test %eax,%eax 10d2f2: 74 0c je 10d300 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d2f4: 83 ec 0c sub $0xc,%esp 10d2f7: 50 push %eax 10d2f8: e8 43 14 00 00 call 10e740 <_Workspace_Free> 10d2fd: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d300: 83 ec 0c sub $0xc,%esp 10d303: 53 push %ebx 10d304: e8 0f 0d 00 00 call 10e018 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d309: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d310: 00 00 00 if ( the_thread->extensions ) 10d313: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d319: 83 c4 10 add $0x10,%esp 10d31c: 85 c0 test %eax,%eax 10d31e: 74 0c je 10d32c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d320: 83 ec 0c sub $0xc,%esp 10d323: 50 push %eax 10d324: e8 17 14 00 00 call 10e740 <_Workspace_Free> 10d329: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d32c: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d333: 00 00 00 } 10d336: 8d 65 f8 lea -0x8(%ebp),%esp 10d339: 5b pop %ebx 10d33a: 5e pop %esi 10d33b: c9 leave 10d33c: c3 ret 10d33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d340: 83 ec 0c sub $0xc,%esp 10d343: 8d 43 48 lea 0x48(%ebx),%eax 10d346: 50 push %eax 10d347: e8 b0 12 00 00 call 10e5fc <_Watchdog_Remove> 10d34c: 83 c4 10 add $0x10,%esp 10d34f: eb 87 jmp 10d2d8 <_Thread_Close+0x60> 10d351: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d354: c7 05 c0 54 12 00 00 movl $0x0,0x1254c0 10d35b: 00 00 00 10d35e: eb 80 jmp 10d2e0 <_Thread_Close+0x68> =============================================================================== 0010d3f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d3f4: 55 push %ebp 10d3f5: 89 e5 mov %esp,%ebp 10d3f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d3fd: 50 push %eax 10d3fe: ff 75 08 pushl 0x8(%ebp) 10d401: e8 c6 01 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10d406: 83 c4 10 add $0x10,%esp 10d409: 8b 55 f4 mov -0xc(%ebp),%edx 10d40c: 85 d2 test %edx,%edx 10d40e: 75 1c jne 10d42c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d410: 83 ec 08 sub $0x8,%esp 10d413: 68 18 00 00 10 push $0x10000018 10d418: 50 push %eax 10d419: e8 c6 fd ff ff call 10d1e4 <_Thread_Clear_state> 10d41e: a1 34 54 12 00 mov 0x125434,%eax 10d423: 48 dec %eax 10d424: a3 34 54 12 00 mov %eax,0x125434 10d429: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d42c: c9 leave 10d42d: c3 ret =============================================================================== 0010d430 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d430: 55 push %ebp 10d431: 89 e5 mov %esp,%ebp 10d433: 57 push %edi 10d434: 56 push %esi 10d435: 53 push %ebx 10d436: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d439: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx _ISR_Disable( level ); 10d43f: 9c pushf 10d440: fa cli 10d441: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d442: 8a 15 e4 56 12 00 mov 0x1256e4,%dl 10d448: 84 d2 test %dl,%dl 10d44a: 0f 84 3c 01 00 00 je 10d58c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d450: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10d456: c7 05 34 54 12 00 01 movl $0x1,0x125434 10d45d: 00 00 00 _Thread_Dispatch_necessary = false; 10d460: c6 05 e4 56 12 00 00 movb $0x0,0x1256e4 _Thread_Executing = heir; 10d467: 89 35 d8 56 12 00 mov %esi,0x1256d8 /* * 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 ) 10d46d: 39 f3 cmp %esi,%ebx 10d46f: 0f 84 17 01 00 00 je 10d58c <_Thread_Dispatch+0x15c> 10d475: 8d 7d d8 lea -0x28(%ebp),%edi 10d478: e9 f5 00 00 00 jmp 10d572 <_Thread_Dispatch+0x142> 10d47d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d480: 50 push %eax 10d481: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d482: 83 ec 0c sub $0xc,%esp 10d485: 8d 45 e0 lea -0x20(%ebp),%eax 10d488: 50 push %eax 10d489: e8 62 31 00 00 call 1105f0 <_TOD_Get_uptime> _Timestamp_Subtract( 10d48e: 83 c4 0c add $0xc,%esp 10d491: 57 push %edi 10d492: 8d 45 e0 lea -0x20(%ebp),%eax 10d495: 50 push %eax 10d496: 68 f0 54 12 00 push $0x1254f0 10d49b: e8 44 0d 00 00 call 10e1e4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d4a0: 58 pop %eax 10d4a1: 5a pop %edx 10d4a2: 57 push %edi 10d4a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d4a9: 50 push %eax 10d4aa: e8 f9 0c 00 00 call 10e1a8 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d4af: 8b 45 e0 mov -0x20(%ebp),%eax 10d4b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d4b5: a3 f0 54 12 00 mov %eax,0x1254f0 10d4ba: 89 15 f4 54 12 00 mov %edx,0x1254f4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d4c0: a1 c4 54 12 00 mov 0x1254c4,%eax 10d4c5: 83 c4 10 add $0x10,%esp 10d4c8: 85 c0 test %eax,%eax 10d4ca: 74 10 je 10d4dc <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d4cc: 8b 10 mov (%eax),%edx 10d4ce: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d4d4: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d4da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d4dc: 83 ec 08 sub $0x8,%esp 10d4df: 56 push %esi 10d4e0: 53 push %ebx 10d4e1: e8 9e 0f 00 00 call 10e484 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d4e6: 5a pop %edx 10d4e7: 59 pop %ecx 10d4e8: 81 c6 d0 00 00 00 add $0xd0,%esi 10d4ee: 56 push %esi 10d4ef: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d4f5: 50 push %eax 10d4f6: e8 95 12 00 00 call 10e790 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d4fb: 83 c4 10 add $0x10,%esp 10d4fe: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax 10d504: 85 c0 test %eax,%eax 10d506: 74 36 je 10d53e <_Thread_Dispatch+0x10e> #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 ); 10d508: a1 c0 54 12 00 mov 0x1254c0,%eax 10d50d: 39 c3 cmp %eax,%ebx 10d50f: 74 2d je 10d53e <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d511: 85 c0 test %eax,%eax 10d513: 74 11 je 10d526 <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d515: 83 ec 0c sub $0xc,%esp 10d518: 05 e8 00 00 00 add $0xe8,%eax 10d51d: 50 push %eax 10d51e: e8 a1 12 00 00 call 10e7c4 <_CPU_Context_save_fp> 10d523: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d526: 83 ec 0c sub $0xc,%esp 10d529: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d52f: 50 push %eax 10d530: e8 99 12 00 00 call 10e7ce <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d535: 89 1d c0 54 12 00 mov %ebx,0x1254c0 10d53b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d53e: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx _ISR_Disable( level ); 10d544: 9c pushf 10d545: fa cli 10d546: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d547: 8a 15 e4 56 12 00 mov 0x1256e4,%dl 10d54d: 84 d2 test %dl,%dl 10d54f: 74 3b je 10d58c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d551: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10d557: c7 05 34 54 12 00 01 movl $0x1,0x125434 10d55e: 00 00 00 _Thread_Dispatch_necessary = false; 10d561: c6 05 e4 56 12 00 00 movb $0x0,0x1256e4 _Thread_Executing = heir; 10d568: 89 35 d8 56 12 00 mov %esi,0x1256d8 /* * 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 ) 10d56e: 39 de cmp %ebx,%esi 10d570: 74 1a je 10d58c <_Thread_Dispatch+0x15c><== NEVER TAKEN */ #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 ) 10d572: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d576: 0f 85 04 ff ff ff jne 10d480 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d57c: 8b 15 04 54 12 00 mov 0x125404,%edx 10d582: 89 56 78 mov %edx,0x78(%esi) 10d585: e9 f6 fe ff ff jmp 10d480 <_Thread_Dispatch+0x50> 10d58a: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d58c: c7 05 34 54 12 00 00 movl $0x0,0x125434 10d593: 00 00 00 _ISR_Enable( level ); 10d596: 50 push %eax 10d597: 9d popf _API_extensions_Run_postswitch(); 10d598: e8 bb e8 ff ff call 10be58 <_API_extensions_Run_postswitch> } 10d59d: 8d 65 f4 lea -0xc(%ebp),%esp 10d5a0: 5b pop %ebx 10d5a1: 5e pop %esi 10d5a2: 5f pop %edi 10d5a3: c9 leave 10d5a4: c3 ret =============================================================================== 0010d5cc <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d5cc: 55 push %ebp 10d5cd: 89 e5 mov %esp,%ebp 10d5cf: 53 push %ebx 10d5d0: 83 ec 04 sub $0x4,%esp 10d5d3: 8b 45 08 mov 0x8(%ebp),%eax 10d5d6: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10d5d9: 85 c0 test %eax,%eax 10d5db: 74 4b je 10d628 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d5dd: 89 c2 mov %eax,%edx 10d5df: c1 ea 18 shr $0x18,%edx 10d5e2: 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 ) 10d5e5: 8d 5a ff lea -0x1(%edx),%ebx 10d5e8: 83 fb 02 cmp $0x2,%ebx 10d5eb: 77 2b ja 10d618 <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d5ed: 89 c3 mov %eax,%ebx 10d5ef: c1 eb 1b shr $0x1b,%ebx *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d5f2: 4b dec %ebx 10d5f3: 75 23 jne 10d618 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d5f5: 8b 14 95 0c 54 12 00 mov 0x12540c(,%edx,4),%edx /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { 10d5fc: 85 d2 test %edx,%edx 10d5fe: 74 18 je 10d618 <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; 10d600: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d603: 85 d2 test %edx,%edx 10d605: 74 11 je 10d618 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d607: 53 push %ebx 10d608: 51 push %ecx 10d609: 50 push %eax 10d60a: 52 push %edx 10d60b: e8 34 f7 ff ff call 10cd44 <_Objects_Get> 10d610: 83 c4 10 add $0x10,%esp done: return tp; } 10d613: 8b 5d fc mov -0x4(%ebp),%ebx 10d616: c9 leave 10d617: c3 ret } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d618: c7 01 01 00 00 00 movl $0x1,(%ecx) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10d61e: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d620: 8b 5d fc mov -0x4(%ebp),%ebx 10d623: c9 leave 10d624: c3 ret 10d625: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d628: a1 34 54 12 00 mov 0x125434,%eax 10d62d: 40 inc %eax 10d62e: a3 34 54 12 00 mov %eax,0x125434 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d633: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d639: a1 d8 56 12 00 mov 0x1256d8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d63e: 8b 5d fc mov -0x4(%ebp),%ebx 10d641: c9 leave 10d642: c3 ret =============================================================================== 0011213c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 11213c: 55 push %ebp 11213d: 89 e5 mov %esp,%ebp 11213f: 53 push %ebx 112140: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112143: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112149: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 11214f: 85 c0 test %eax,%eax 112151: 74 79 je 1121cc <_Thread_Handler+0x90> 112153: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112154: a0 ac 50 12 00 mov 0x1250ac,%al 112159: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 11215c: c6 05 ac 50 12 00 01 movb $0x1,0x1250ac #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112163: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 112169: 85 d2 test %edx,%edx 11216b: 74 24 je 112191 <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 11216d: a1 c0 54 12 00 mov 0x1254c0,%eax 112172: 39 c3 cmp %eax,%ebx 112174: 74 1b je 112191 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112176: 85 c0 test %eax,%eax 112178: 74 11 je 11218b <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11217a: 83 ec 0c sub $0xc,%esp 11217d: 05 e8 00 00 00 add $0xe8,%eax 112182: 50 push %eax 112183: e8 3c c6 ff ff call 10e7c4 <_CPU_Context_save_fp> 112188: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11218b: 89 1d c0 54 12 00 mov %ebx,0x1254c0 /* * 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 ); 112191: 83 ec 0c sub $0xc,%esp 112194: 53 push %ebx 112195: e8 4e c1 ff ff call 10e2e8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11219a: e8 09 b4 ff ff call 10d5a8 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 11219f: 83 c4 10 add $0x10,%esp 1121a2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1121a6: 74 28 je 1121d0 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121a8: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1121ae: 85 c0 test %eax,%eax 1121b0: 74 2d je 1121df <_Thread_Handler+0xa3> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 1121b2: 83 ec 0c sub $0xc,%esp 1121b5: 53 push %ebx 1121b6: e8 69 c1 ff ff call 10e324 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1121bb: 83 c4 0c add $0xc,%esp 1121be: 6a 05 push $0x5 1121c0: 6a 01 push $0x1 1121c2: 6a 00 push $0x0 1121c4: e8 33 a6 ff ff call 10c7fc <_Internal_error_Occurred> 1121c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 1121cc: fb sti 1121cd: eb 85 jmp 112154 <_Thread_Handler+0x18> 1121cf: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 1121d0: e8 1b be 00 00 call 11dff0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121d5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1121db: 85 c0 test %eax,%eax 1121dd: 75 d3 jne 1121b2 <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1121df: 83 ec 0c sub $0xc,%esp 1121e2: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 1121e8: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 1121ee: 89 43 28 mov %eax,0x28(%ebx) 1121f1: 83 c4 10 add $0x10,%esp 1121f4: eb bc jmp 1121b2 <_Thread_Handler+0x76> =============================================================================== 0010d644 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d644: 55 push %ebp 10d645: 89 e5 mov %esp,%ebp 10d647: 57 push %edi 10d648: 56 push %esi 10d649: 53 push %ebx 10d64a: 83 ec 24 sub $0x24,%esp 10d64d: 8b 5d 0c mov 0xc(%ebp),%ebx 10d650: 8b 75 14 mov 0x14(%ebp),%esi 10d653: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d657: 8a 45 20 mov 0x20(%ebp),%al 10d65a: 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; 10d65d: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d664: 00 00 00 10d667: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d66e: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d671: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d678: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d67b: 56 push %esi 10d67c: 53 push %ebx 10d67d: e8 32 09 00 00 call 10dfb4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d682: 83 c4 10 add $0x10,%esp 10d685: 85 c0 test %eax,%eax 10d687: 0f 84 6b 01 00 00 je 10d7f8 <_Thread_Initialize+0x1b4> 10d68d: 39 c6 cmp %eax,%esi 10d68f: 0f 87 63 01 00 00 ja 10d7f8 <_Thread_Initialize+0x1b4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d695: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d69b: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d6a1: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10d6a7: 89 f8 mov %edi,%eax 10d6a9: 84 c0 test %al,%al 10d6ab: 0f 85 5f 01 00 00 jne 10d810 <_Thread_Initialize+0x1cc> 10d6b1: 31 c0 xor %eax,%eax extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10d6b3: 31 ff xor %edi,%edi fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d6b5: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d6bb: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d6c1: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d6c8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d6cf: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d6d6: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d6dd: a1 d0 54 12 00 mov 0x1254d0,%eax 10d6e2: 85 c0 test %eax,%eax 10d6e4: 0f 85 46 01 00 00 jne 10d830 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d6ea: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d6f1: 00 00 00 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d6f4: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d6f6: 8a 45 e7 mov -0x19(%ebp),%al 10d6f9: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d6ff: 8b 45 24 mov 0x24(%ebp),%eax 10d702: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d708: 8b 45 28 mov 0x28(%ebp),%eax 10d70b: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d711: 8b 45 2c mov 0x2c(%ebp),%eax 10d714: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d71a: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d721: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d728: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d72f: 8b 45 1c mov 0x1c(%ebp),%eax 10d732: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d735: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d73b: 83 ec 08 sub $0x8,%esp 10d73e: 50 push %eax 10d73f: 53 push %ebx 10d740: e8 ab 06 00 00 call 10ddf0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d745: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d74c: 00 00 00 10d74f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d756: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d759: 8b 45 08 mov 0x8(%ebp),%eax 10d75c: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d75f: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d763: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d766: 8b 45 30 mov 0x30(%ebp),%eax 10d769: 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 ); 10d76c: 89 1c 24 mov %ebx,(%esp) 10d76f: e8 3c 0c 00 00 call 10e3b0 <_User_extensions_Thread_create> if ( extension_status ) 10d774: 83 c4 10 add $0x10,%esp 10d777: 84 c0 test %al,%al 10d779: 0f 85 85 00 00 00 jne 10d804 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d77f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d785: 85 c0 test %eax,%eax 10d787: 74 0c je 10d795 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d789: 83 ec 0c sub $0xc,%esp 10d78c: 50 push %eax 10d78d: e8 ae 0f 00 00 call 10e740 <_Workspace_Free> 10d792: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d795: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d79b: 85 c0 test %eax,%eax 10d79d: 74 0c je 10d7ab <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d79f: 83 ec 0c sub $0xc,%esp 10d7a2: 50 push %eax 10d7a3: e8 98 0f 00 00 call 10e740 <_Workspace_Free> 10d7a8: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d7ab: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d7b1: 85 c0 test %eax,%eax 10d7b3: 74 0c je 10d7c1 <_Thread_Initialize+0x17d><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10d7b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d7b8: 50 push %eax <== NOT EXECUTED 10d7b9: e8 82 0f 00 00 call 10e740 <_Workspace_Free> <== NOT EXECUTED 10d7be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10d7c1: 85 f6 test %esi,%esi 10d7c3: 74 0c je 10d7d1 <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d7c5: 83 ec 0c sub $0xc,%esp 10d7c8: 56 push %esi 10d7c9: e8 72 0f 00 00 call 10e740 <_Workspace_Free> 10d7ce: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d7d1: 85 ff test %edi,%edi 10d7d3: 74 0c je 10d7e1 <_Thread_Initialize+0x19d> (void) _Workspace_Free( fp_area ); 10d7d5: 83 ec 0c sub $0xc,%esp 10d7d8: 57 push %edi 10d7d9: e8 62 0f 00 00 call 10e740 <_Workspace_Free> 10d7de: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d7e1: 83 ec 0c sub $0xc,%esp 10d7e4: 53 push %ebx 10d7e5: e8 2e 08 00 00 call 10e018 <_Thread_Stack_Free> return false; 10d7ea: 83 c4 10 add $0x10,%esp 10d7ed: 31 c0 xor %eax,%eax } 10d7ef: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f2: 5b pop %ebx 10d7f3: 5e pop %esi 10d7f4: 5f pop %edi 10d7f5: c9 leave 10d7f6: c3 ret 10d7f7: 90 nop <== NOT EXECUTED * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10d7f8: 31 c0 xor %eax,%eax _Thread_Stack_Free( the_thread ); return false; } 10d7fa: 8d 65 f4 lea -0xc(%ebp),%esp 10d7fd: 5b pop %ebx 10d7fe: 5e pop %esi 10d7ff: 5f pop %edi 10d800: c9 leave 10d801: c3 ret 10d802: 66 90 xchg %ax,%ax <== NOT EXECUTED * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10d804: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d806: 8d 65 f4 lea -0xc(%ebp),%esp 10d809: 5b pop %ebx 10d80a: 5e pop %esi 10d80b: 5f pop %edi 10d80c: c9 leave 10d80d: c3 ret 10d80e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d810: 83 ec 0c sub $0xc,%esp 10d813: 6a 6c push $0x6c 10d815: e8 0a 0f 00 00 call 10e724 <_Workspace_Allocate> 10d81a: 89 c7 mov %eax,%edi if ( !fp_area ) 10d81c: 83 c4 10 add $0x10,%esp 10d81f: 85 c0 test %eax,%eax 10d821: 0f 85 8e fe ff ff jne 10d6b5 <_Thread_Initialize+0x71> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d827: 31 f6 xor %esi,%esi 10d829: e9 51 ff ff ff jmp 10d77f <_Thread_Initialize+0x13b> 10d82e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d830: 83 ec 0c sub $0xc,%esp 10d833: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d83a: 50 push %eax 10d83b: e8 e4 0e 00 00 call 10e724 <_Workspace_Allocate> 10d840: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d842: 83 c4 10 add $0x10,%esp 10d845: 85 c0 test %eax,%eax 10d847: 0f 84 32 ff ff ff je 10d77f <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d84d: 89 83 f8 00 00 00 mov %eax,0xf8(%ebx) 10d853: 8b 0d d0 54 12 00 mov 0x1254d0,%ecx * 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++ ) 10d859: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d85b: 31 c0 xor %eax,%eax 10d85d: 8d 76 00 lea 0x0(%esi),%esi * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 10d860: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d867: 40 inc %eax 10d868: 89 c2 mov %eax,%edx 10d86a: 39 c1 cmp %eax,%ecx 10d86c: 73 f2 jae 10d860 <_Thread_Initialize+0x21c> 10d86e: e9 83 fe ff ff jmp 10d6f6 <_Thread_Initialize+0xb2> =============================================================================== 00111910 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111910: 55 push %ebp 111911: 89 e5 mov %esp,%ebp 111913: 53 push %ebx 111914: 83 ec 10 sub $0x10,%esp 111917: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 11191a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 111921: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111927: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 11192a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111930: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111933: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111939: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11193f: 8b 45 0c mov 0xc(%ebp),%eax 111942: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111948: 8b 45 10 mov 0x10(%ebp),%eax 11194b: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111951: 53 push %ebx 111952: e8 7d ce ff ff call 10e7d4 <_Thread_queue_Extract_with_proxy> 111957: 83 c4 10 add $0x10,%esp 11195a: 84 c0 test %al,%al 11195c: 75 06 jne 111964 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11195e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111962: 74 28 je 11198c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111964: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 11196a: 39 43 14 cmp %eax,0x14(%ebx) 11196d: 74 15 je 111984 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11196f: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111972: 89 45 0c mov %eax,0xc(%ebp) 111975: 89 5d 08 mov %ebx,0x8(%ebp) } } 111978: 8b 5d fc mov -0x4(%ebp),%ebx 11197b: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11197c: e9 2f d0 ff ff jmp 10e9b0 <_Thread_Set_priority> 111981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111984: 8b 5d fc mov -0x4(%ebp),%ebx 111987: c9 leave 111988: c3 ret 111989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 11198c: 83 ec 0c sub $0xc,%esp 11198f: 8d 43 48 lea 0x48(%ebx),%eax 111992: 50 push %eax 111993: e8 64 d8 ff ff call 10f1fc <_Watchdog_Remove> 111998: 83 c4 10 add $0x10,%esp 11199b: eb c7 jmp 111964 <_Thread_Reset+0x54> =============================================================================== 0010e928 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e928: 55 push %ebp 10e929: 89 e5 mov %esp,%ebp 10e92b: 53 push %ebx 10e92c: 83 ec 04 sub $0x4,%esp 10e92f: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e932: f6 43 10 01 testb $0x1,0x10(%ebx) 10e936: 74 08 je 10e940 <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10e938: 31 c0 xor %eax,%eax } 10e93a: 8b 5d fc mov -0x4(%ebp),%ebx 10e93d: c9 leave 10e93e: c3 ret 10e93f: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e940: 83 ec 0c sub $0xc,%esp 10e943: 53 push %ebx 10e944: e8 b3 01 00 00 call 10eafc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e949: 83 c4 0c add $0xc,%esp 10e94c: ff 75 10 pushl 0x10(%ebp) 10e94f: ff 75 0c pushl 0xc(%ebp) 10e952: 53 push %ebx 10e953: e8 b8 2f 00 00 call 111910 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e958: 89 1c 24 mov %ebx,(%esp) 10e95b: e8 98 2c 00 00 call 1115f8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e960: 89 1c 24 mov %ebx,(%esp) 10e963: e8 04 2f 00 00 call 11186c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e968: 89 1c 24 mov %ebx,(%esp) 10e96b: e8 94 06 00 00 call 10f004 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e970: 83 c4 10 add $0x10,%esp 10e973: 3b 1d 58 77 12 00 cmp 0x127758,%ebx 10e979: 74 07 je 10e982 <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10e97b: b0 01 mov $0x1,%al } return false; } 10e97d: 8b 5d fc mov -0x4(%ebp),%ebx 10e980: c9 leave 10e981: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e982: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10e989: 74 12 je 10e99d <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e98b: 83 ec 0c sub $0xc,%esp 10e98e: 81 c3 e8 00 00 00 add $0xe8,%ebx 10e994: 53 push %ebx 10e995: e8 34 0a 00 00 call 10f3ce <_CPU_Context_restore_fp> 10e99a: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e99d: 83 ec 0c sub $0xc,%esp 10e9a0: a1 58 77 12 00 mov 0x127758,%eax 10e9a5: 05 d0 00 00 00 add $0xd0,%eax 10e9aa: 50 push %eax 10e9ab: e8 0d 0a 00 00 call 10f3bd <_CPU_Context_restore> =============================================================================== 00111104 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111104: 55 push %ebp 111105: 89 e5 mov %esp,%ebp 111107: 53 push %ebx 111108: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11110b: 9c pushf 11110c: fa cli 11110d: 59 pop %ecx current_state = the_thread->current_state; 11110e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111111: f6 c2 02 test $0x2,%dl 111114: 74 6e je 111184 <_Thread_Resume+0x80> <== NEVER TAKEN 111116: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 111119: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 11111c: 85 d2 test %edx,%edx 11111e: 75 64 jne 111184 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111120: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111126: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 11112d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111130: 66 8b 15 e0 95 12 00 mov 0x1295e0,%dx 111137: 0b 90 94 00 00 00 or 0x94(%eax),%edx 11113d: 66 89 15 e0 95 12 00 mov %dx,0x1295e0 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111144: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11114a: 8d 5a 04 lea 0x4(%edx),%ebx 11114d: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 11114f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111152: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111155: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111157: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11115a: 51 push %ecx 11115b: 9d popf 11115c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 11115d: 8b 50 14 mov 0x14(%eax),%edx 111160: 8b 1d dc 97 12 00 mov 0x1297dc,%ebx 111166: 3b 53 14 cmp 0x14(%ebx),%edx 111169: 73 19 jae 111184 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11116b: a3 dc 97 12 00 mov %eax,0x1297dc if ( _Thread_Executing->is_preemptible || 111170: a1 d8 97 12 00 mov 0x1297d8,%eax 111175: 80 78 74 00 cmpb $0x0,0x74(%eax) 111179: 74 11 je 11118c <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 11117b: c6 05 e4 97 12 00 01 movb $0x1,0x1297e4 111182: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111184: 51 push %ecx 111185: 9d popf } 111186: 5b pop %ebx 111187: c9 leave 111188: c3 ret 111189: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 11118c: 85 d2 test %edx,%edx 11118e: 74 eb je 11117b <_Thread_Resume+0x77> <== NEVER TAKEN 111190: eb f2 jmp 111184 <_Thread_Resume+0x80> =============================================================================== 0010de5c <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10de5c: 55 push %ebp 10de5d: 89 e5 mov %esp,%ebp 10de5f: 56 push %esi 10de60: 53 push %ebx 10de61: 8b 45 08 mov 0x8(%ebp),%eax 10de64: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10de67: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10de6d: 9c pushf 10de6e: fa cli 10de6f: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10de70: 8b 58 10 mov 0x10(%eax),%ebx 10de73: 85 db test %ebx,%ebx 10de75: 75 2d jne 10dea4 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10de77: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10de7a: 8b 5a 08 mov 0x8(%edx),%ebx 10de7d: 39 1a cmp %ebx,(%edx) 10de7f: 74 3b je 10debc <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10de81: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10de83: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10de86: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10de89: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10de8b: 51 push %ecx 10de8c: 9d popf 10de8d: fa cli if ( _Thread_Is_heir( the_thread ) ) 10de8e: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10de94: 74 66 je 10defc <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10de96: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10de9c: 74 12 je 10deb0 <_Thread_Set_state+0x54> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 10de9e: 51 push %ecx 10de9f: 9d popf } 10dea0: 5b pop %ebx 10dea1: 5e pop %esi 10dea2: c9 leave 10dea3: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10dea4: 09 f3 or %esi,%ebx 10dea6: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dea9: 51 push %ecx 10deaa: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10deab: 5b pop %ebx 10deac: 5e pop %esi 10dead: c9 leave 10deae: c3 ret 10deaf: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10deb0: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 10deb7: eb e5 jmp 10de9e <_Thread_Set_state+0x42> 10deb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10debc: 8d 5a 04 lea 0x4(%edx),%ebx 10debf: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dec1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dec8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10decb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10ded1: 66 8b 13 mov (%ebx),%dx 10ded4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10dedb: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10dede: 66 85 d2 test %dx,%dx 10dee1: 75 a8 jne 10de8b <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10dee3: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10deea: 23 90 98 00 00 00 and 0x98(%eax),%edx 10def0: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 10def7: eb 92 jmp 10de8b <_Thread_Set_state+0x2f> 10def9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10defc: 66 8b 35 e0 54 12 00 mov 0x1254e0,%si 10df03: 31 d2 xor %edx,%edx 10df05: 89 d3 mov %edx,%ebx 10df07: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10df0b: 0f b7 db movzwl %bx,%ebx 10df0e: 66 8b b4 1b 60 55 12 mov 0x125560(%ebx,%ebx,1),%si 10df15: 00 10df16: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10df1a: c1 e3 04 shl $0x4,%ebx 10df1d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10df20: 8d 14 13 lea (%ebx,%edx,1),%edx 10df23: 8d 14 52 lea (%edx,%edx,2),%edx 10df26: c1 e2 02 shl $0x2,%edx 10df29: 03 15 00 54 12 00 add 0x125400,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10df2f: 8b 12 mov (%edx),%edx 10df31: 89 15 dc 56 12 00 mov %edx,0x1256dc 10df37: e9 5a ff ff ff jmp 10de96 <_Thread_Set_state+0x3a> =============================================================================== 0010df3c <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10df3c: 55 push %ebp 10df3d: 89 e5 mov %esp,%ebp 10df3f: 56 push %esi 10df40: 53 push %ebx 10df41: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10df44: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10df4a: 9c pushf 10df4b: fa cli 10df4c: 5b pop %ebx old_state = the_thread->current_state; 10df4d: 8b 50 10 mov 0x10(%eax),%edx 10df50: 89 d6 mov %edx,%esi 10df52: 83 ce 04 or $0x4,%esi 10df55: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10df58: 85 d2 test %edx,%edx 10df5a: 75 11 jne 10df6d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10df5c: 8b 51 08 mov 0x8(%ecx),%edx 10df5f: 39 11 cmp %edx,(%ecx) 10df61: 74 11 je 10df74 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df63: 8b 10 mov (%eax),%edx previous = the_node->previous; 10df65: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10df68: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10df6b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10df6d: 53 push %ebx 10df6e: 9d popf } 10df6f: 5b pop %ebx 10df70: 5e pop %esi 10df71: c9 leave 10df72: c3 ret 10df73: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10df74: 8d 51 04 lea 0x4(%ecx),%edx 10df77: 89 11 mov %edx,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10df79: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10df80: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10df83: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10df89: 66 8b 11 mov (%ecx),%dx 10df8c: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10df93: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10df96: 66 85 d2 test %dx,%dx 10df99: 75 d2 jne 10df6d <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10df9b: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10dfa2: 23 90 98 00 00 00 and 0x98(%eax),%edx 10dfa8: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 10dfaf: eb bc jmp 10df6d <_Thread_Set_transient+0x31> =============================================================================== 0010dfb4 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10dfb4: 55 push %ebp 10dfb5: 89 e5 mov %esp,%ebp 10dfb7: 53 push %ebx 10dfb8: 83 ec 04 sub $0x4,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10dfbb: a1 10 12 12 00 mov 0x121210,%eax 10dfc0: 8b 5d 0c mov 0xc(%ebp),%ebx 10dfc3: 39 c3 cmp %eax,%ebx 10dfc5: 73 02 jae 10dfc9 <_Thread_Stack_Allocate+0x15> 10dfc7: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10dfc9: a1 40 12 12 00 mov 0x121240,%eax 10dfce: 85 c0 test %eax,%eax 10dfd0: 74 32 je 10e004 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10dfd2: 83 ec 0c sub $0xc,%esp 10dfd5: 53 push %ebx 10dfd6: ff d0 call *%eax 10dfd8: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10dfdb: 85 c0 test %eax,%eax 10dfdd: 74 11 je 10dff0 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10dfdf: 8b 55 08 mov 0x8(%ebp),%edx 10dfe2: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10dfe8: 89 d8 mov %ebx,%eax 10dfea: 8b 5d fc mov -0x4(%ebp),%ebx 10dfed: c9 leave 10dfee: c3 ret 10dfef: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10dff0: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10dff2: 8b 55 08 mov 0x8(%ebp),%edx 10dff5: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10dffb: 89 d8 mov %ebx,%eax 10dffd: 8b 5d fc mov -0x4(%ebp),%ebx 10e000: c9 leave 10e001: c3 ret 10e002: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e004: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10e007: 83 ec 0c sub $0xc,%esp 10e00a: 53 push %ebx 10e00b: e8 14 07 00 00 call 10e724 <_Workspace_Allocate> 10e010: 83 c4 10 add $0x10,%esp 10e013: eb c6 jmp 10dfdb <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e018 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e018: 55 push %ebp 10e019: 89 e5 mov %esp,%ebp 10e01b: 83 ec 08 sub $0x8,%esp 10e01e: 8b 55 08 mov 0x8(%ebp),%edx * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10e021: a1 44 12 12 00 mov 0x121244,%eax 10e026: 85 c0 test %eax,%eax 10e028: 74 0e je 10e038 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e02a: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e030: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e033: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e034: ff e0 jmp *%eax 10e036: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e038: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e03e: 89 45 08 mov %eax,0x8(%ebp) } 10e041: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e042: e9 f9 06 00 00 jmp 10e740 <_Workspace_Free> =============================================================================== 0010e0a4 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e0a4: 55 push %ebp 10e0a5: 89 e5 mov %esp,%ebp 10e0a7: 53 push %ebx 10e0a8: 83 ec 04 sub $0x4,%esp 10e0ab: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e0ae: f6 43 10 01 testb $0x1,0x10(%ebx) 10e0b2: 75 08 jne 10e0bc <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e0b4: 31 c0 xor %eax,%eax } 10e0b6: 8b 5d fc mov -0x4(%ebp),%ebx 10e0b9: c9 leave 10e0ba: c3 ret 10e0bb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10e0bc: 8b 45 10 mov 0x10(%ebp),%eax 10e0bf: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e0c5: 8b 45 0c mov 0xc(%ebp),%eax 10e0c8: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e0ce: 8b 45 14 mov 0x14(%ebp),%eax 10e0d1: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e0d7: 8b 45 18 mov 0x18(%ebp),%eax 10e0da: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e0e0: 83 ec 0c sub $0xc,%esp 10e0e3: 53 push %ebx 10e0e4: e8 87 28 00 00 call 110970 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e0e9: 89 1c 24 mov %ebx,(%esp) 10e0ec: e8 f3 2a 00 00 call 110be4 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e0f1: 89 1c 24 mov %ebx,(%esp) 10e0f4: e8 4b 03 00 00 call 10e444 <_User_extensions_Thread_start> return true; 10e0f9: 83 c4 10 add $0x10,%esp 10e0fc: b0 01 mov $0x1,%al } return false; } 10e0fe: 8b 5d fc mov -0x4(%ebp),%ebx 10e101: c9 leave 10e102: c3 ret =============================================================================== 00110c88 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 110c88: 55 push %ebp 110c89: 89 e5 mov %esp,%ebp 110c8b: 56 push %esi 110c8c: 53 push %ebx 110c8d: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 110c90: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110c96: 9c pushf 110c97: fa cli 110c98: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 110c99: 8b 58 10 mov 0x10(%eax),%ebx 110c9c: 85 db test %ebx,%ebx 110c9e: 75 34 jne 110cd4 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110ca0: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 110ca7: 8b 5a 08 mov 0x8(%edx),%ebx 110caa: 39 1a cmp %ebx,(%edx) 110cac: 74 3e je 110cec <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110cae: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110cb0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 110cb3: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 110cb6: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110cb8: 51 push %ecx 110cb9: 9d popf 110cba: fa cli if ( _Thread_Is_heir( the_thread ) ) 110cbb: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 110cc1: 74 69 je 110d2c <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 110cc3: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 110cc9: 74 15 je 110ce0 <_Thread_Suspend+0x58> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 110ccb: 51 push %ecx 110ccc: 9d popf } 110ccd: 5b pop %ebx 110cce: 5e pop %esi 110ccf: c9 leave 110cd0: c3 ret 110cd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110cd4: 83 cb 02 or $0x2,%ebx 110cd7: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110cda: 51 push %ecx 110cdb: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 110cdc: 5b pop %ebx 110cdd: 5e pop %esi 110cde: c9 leave 110cdf: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 110ce0: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 110ce7: eb e2 jmp 110ccb <_Thread_Suspend+0x43> 110ce9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110cec: 8d 5a 04 lea 0x4(%edx),%ebx 110cef: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 110cf1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 110cf8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 110cfb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 110d01: 66 8b 13 mov (%ebx),%dx 110d04: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 110d0b: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 110d0e: 66 85 d2 test %dx,%dx 110d11: 75 a5 jne 110cb8 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 110d13: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 110d1a: 23 90 98 00 00 00 and 0x98(%eax),%edx 110d20: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 110d27: eb 8f jmp 110cb8 <_Thread_Suspend+0x30> 110d29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 110d2c: 66 8b 35 e0 54 12 00 mov 0x1254e0,%si 110d33: 31 d2 xor %edx,%edx 110d35: 89 d3 mov %edx,%ebx 110d37: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 110d3b: 0f b7 db movzwl %bx,%ebx 110d3e: 66 8b b4 1b 60 55 12 mov 0x125560(%ebx,%ebx,1),%si 110d45: 00 110d46: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 110d4a: c1 e3 04 shl $0x4,%ebx 110d4d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 110d50: 8d 14 13 lea (%ebx,%edx,1),%edx 110d53: 8d 14 52 lea (%edx,%edx,2),%edx 110d56: c1 e2 02 shl $0x2,%edx 110d59: 03 15 00 54 12 00 add 0x125400,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 110d5f: 8b 12 mov (%edx),%edx 110d61: 89 15 dc 56 12 00 mov %edx,0x1256dc 110d67: e9 57 ff ff ff jmp 110cc3 <_Thread_Suspend+0x3b> =============================================================================== 0010e144 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e144: 55 push %ebp 10e145: 89 e5 mov %esp,%ebp 10e147: 57 push %edi 10e148: 56 push %esi 10e149: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e14a: a1 d8 56 12 00 mov 0x1256d8,%eax ready = executing->ready; 10e14f: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e155: 9c pushf 10e156: fa cli 10e157: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10e158: 8b 4a 08 mov 0x8(%edx),%ecx Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 10e15b: 39 0a cmp %ecx,(%edx) 10e15d: 74 3d je 10e19c <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e15f: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e161: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e164: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e167: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e169: 8d 72 04 lea 0x4(%edx),%esi 10e16c: 89 30 mov %esi,(%eax) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 10e16e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e171: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e173: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e176: 53 push %ebx 10e177: 9d popf 10e178: fa cli if ( _Thread_Is_heir( executing ) ) 10e179: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10e17f: 74 0f je 10e190 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10e181: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 _ISR_Enable( level ); 10e188: 53 push %ebx 10e189: 9d popf } 10e18a: 5b pop %ebx 10e18b: 5e pop %esi 10e18c: 5f pop %edi 10e18d: c9 leave 10e18e: c3 ret 10e18f: 90 nop <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e190: 8b 02 mov (%edx),%eax 10e192: a3 dc 56 12 00 mov %eax,0x1256dc 10e197: eb e8 jmp 10e181 <_Thread_Yield_processor+0x3d> 10e199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e19c: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10e1a2: 75 dd jne 10e181 <_Thread_Yield_processor+0x3d><== NEVER TAKEN 10e1a4: eb e2 jmp 10e188 <_Thread_Yield_processor+0x44> =============================================================================== 0010d058 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d058: 55 push %ebp 10d059: 89 e5 mov %esp,%ebp 10d05b: 53 push %ebx 10d05c: 83 ec 04 sub $0x4,%esp 10d05f: 8b 5d 0c mov 0xc(%ebp),%ebx 10d062: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d065: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10d06c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d070: 74 16 je 10d088 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d072: 50 push %eax 10d073: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d074: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d07b: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10d07e: 8b 5d fc mov -0x4(%ebp),%ebx 10d081: c9 leave 10d082: e9 5d 01 00 00 jmp 10d1e4 <_Thread_Clear_state> 10d087: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d088: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d08f: 50 push %eax 10d090: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d091: 83 ec 0c sub $0xc,%esp 10d094: 8d 43 48 lea 0x48(%ebx),%eax 10d097: 50 push %eax 10d098: e8 5f 15 00 00 call 10e5fc <_Watchdog_Remove> 10d09d: 83 c4 10 add $0x10,%esp 10d0a0: eb d2 jmp 10d074 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010d944 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d944: 55 push %ebp 10d945: 89 e5 mov %esp,%ebp 10d947: 53 push %ebx 10d948: 83 ec 04 sub $0x4,%esp 10d94b: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d94e: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d952: 74 1c je 10d970 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10d954: b8 fc 09 11 00 mov $0x1109fc,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10d959: 83 ec 0c sub $0xc,%esp 10d95c: 53 push %ebx 10d95d: ff d0 call *%eax _ISR_Disable( level ); 10d95f: 9c pushf 10d960: fa cli 10d961: 5a pop %edx if ( !the_thread ) { 10d962: 83 c4 10 add $0x10,%esp 10d965: 85 c0 test %eax,%eax 10d967: 74 0f je 10d978 <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d969: 52 push %edx 10d96a: 9d popf return the_thread; } 10d96b: 8b 5d fc mov -0x4(%ebp),%ebx 10d96e: c9 leave 10d96f: c3 ret Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) dequeue_p = _Thread_queue_Dequeue_priority; 10d970: b8 90 d9 10 00 mov $0x10d990,%eax 10d975: eb e2 jmp 10d959 <_Thread_queue_Dequeue+0x15> 10d977: 90 nop <== NOT EXECUTED the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10d978: 8b 4b 30 mov 0x30(%ebx),%ecx 10d97b: 49 dec %ecx 10d97c: 83 f9 01 cmp $0x1,%ecx 10d97f: 77 e8 ja 10d969 <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d981: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d988: a1 d8 56 12 00 mov 0x1256d8,%eax 10d98d: eb da jmp 10d969 <_Thread_queue_Dequeue+0x25> =============================================================================== 0010d990 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d990: 55 push %ebp 10d991: 89 e5 mov %esp,%ebp 10d993: 57 push %edi 10d994: 56 push %esi 10d995: 53 push %ebx 10d996: 83 ec 2c sub $0x2c,%esp 10d999: 8b 7d 08 mov 0x8(%ebp),%edi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d99c: 9c pushf 10d99d: fa cli 10d99e: 58 pop %eax 10d99f: 89 f9 mov %edi,%ecx for( index=0 ; 10d9a1: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10d9a3: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d9a5: 8d 34 52 lea (%edx,%edx,2),%esi 10d9a8: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10d9ac: 39 f3 cmp %esi,%ebx 10d9ae: 75 18 jne 10d9c8 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d9b0: 42 inc %edx 10d9b1: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d9b4: 83 fa 04 cmp $0x4,%edx 10d9b7: 75 ea jne 10d9a3 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d9b9: 50 push %eax 10d9ba: 9d popf return NULL; 10d9bb: 31 f6 xor %esi,%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d9bd: 89 f0 mov %esi,%eax 10d9bf: 8d 65 f4 lea -0xc(%ebp),%esp 10d9c2: 5b pop %ebx 10d9c3: 5e pop %esi 10d9c4: 5f pop %edi 10d9c5: c9 leave 10d9c6: c3 ret 10d9c7: 90 nop <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10d9c8: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d9ca: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d9d1: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d9d4: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d9d6: 8b 7b 04 mov 0x4(%ebx),%edi 10d9d9: 89 7d d4 mov %edi,-0x2c(%ebp) 10d9dc: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10d9df: 39 fa cmp %edi,%edx 10d9e1: 74 7b je 10da5e <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10d9e3: 8b 7b 40 mov 0x40(%ebx),%edi 10d9e6: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d9e9: 8b 3a mov (%edx),%edi 10d9eb: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10d9ee: 8b 7d d4 mov -0x2c(%ebp),%edi 10d9f1: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10d9f3: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d9f6: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d9f8: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d9fb: 3b 55 e4 cmp -0x1c(%ebp),%edx 10d9fe: 74 17 je 10da17 <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10da00: 8d 4a 38 lea 0x38(%edx),%ecx 10da03: 8b 7d e0 mov -0x20(%ebp),%edi 10da06: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10da09: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10da0c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10da0f: 89 4a 40 mov %ecx,0x40(%edx) 10da12: 83 c2 3c add $0x3c,%edx 10da15: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10da17: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10da1b: 74 17 je 10da34 <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10da1d: 50 push %eax 10da1e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10da1f: 83 ec 08 sub $0x8,%esp 10da22: 68 f8 ff 03 10 push $0x1003fff8 10da27: 53 push %ebx 10da28: e8 b7 f7 ff ff call 10d1e4 <_Thread_Clear_state> 10da2d: 83 c4 10 add $0x10,%esp 10da30: eb 8b jmp 10d9bd <_Thread_queue_Dequeue_priority+0x2d> 10da32: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10da34: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10da3b: 50 push %eax 10da3c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10da3d: 83 ec 0c sub $0xc,%esp 10da40: 8d 43 48 lea 0x48(%ebx),%eax 10da43: 50 push %eax 10da44: e8 b3 0b 00 00 call 10e5fc <_Watchdog_Remove> 10da49: 58 pop %eax 10da4a: 5a pop %edx 10da4b: 68 f8 ff 03 10 push $0x1003fff8 10da50: 53 push %ebx 10da51: e8 8e f7 ff ff call 10d1e4 <_Thread_Clear_state> 10da56: 83 c4 10 add $0x10,%esp 10da59: e9 5f ff ff ff jmp 10d9bd <_Thread_queue_Dequeue_priority+0x2d> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10da5e: 8b 7d d4 mov -0x2c(%ebp),%edi 10da61: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10da63: 89 79 04 mov %edi,0x4(%ecx) 10da66: eb af jmp 10da17 <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00110a74 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 110a74: 55 push %ebp 110a75: 89 e5 mov %esp,%ebp 110a77: 56 push %esi 110a78: 53 push %ebx 110a79: 8b 55 08 mov 0x8(%ebp),%edx 110a7c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 110a7f: 9c pushf 110a80: fa cli 110a81: 59 pop %ecx sync_state = the_thread_queue->sync_state; 110a82: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 110a85: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 110a8c: 83 f8 01 cmp $0x1,%eax 110a8f: 74 0b je 110a9c <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 110a91: 8b 55 10 mov 0x10(%ebp),%edx 110a94: 89 0a mov %ecx,(%edx) return sync_state; } 110a96: 5b pop %ebx 110a97: 5e pop %esi 110a98: c9 leave 110a99: c3 ret 110a9a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110a9c: 8d 72 04 lea 0x4(%edx),%esi 110a9f: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110aa1: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 110aa4: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 110aa7: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 110aa9: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 110aac: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 110aaf: 51 push %ecx 110ab0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 110ab1: 5b pop %ebx 110ab2: 5e pop %esi 110ab3: c9 leave 110ab4: c3 ret =============================================================================== 0010db00 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10db00: 55 push %ebp 10db01: 89 e5 mov %esp,%ebp 10db03: 57 push %edi 10db04: 56 push %esi 10db05: 53 push %ebx 10db06: 83 ec 10 sub $0x10,%esp 10db09: 8b 7d 0c mov 0xc(%ebp),%edi 10db0c: 8d 47 3c lea 0x3c(%edi),%eax 10db0f: 89 47 38 mov %eax,0x38(%edi) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10db12: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 10db19: 8d 47 38 lea 0x38(%edi),%eax 10db1c: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10db1f: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10db22: 89 d0 mov %edx,%eax 10db24: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10db27: 8b 4d 08 mov 0x8(%ebp),%ecx 10db2a: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10db2d: f6 c2 20 test $0x20,%dl 10db30: 75 66 jne 10db98 <_Thread_queue_Enqueue_priority+0x98> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10db32: 8d 04 40 lea (%eax,%eax,2),%eax 10db35: 8d 04 81 lea (%ecx,%eax,4),%eax 10db38: 89 45 f0 mov %eax,-0x10(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10db3b: 83 c0 04 add $0x4,%eax 10db3e: 89 7d e8 mov %edi,-0x18(%ebp) 10db41: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10db43: 9c pushf 10db44: fa cli 10db45: 5e pop %esi 10db46: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10db49: 8b 4d f0 mov -0x10(%ebp),%ecx 10db4c: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10db4e: 39 f8 cmp %edi,%eax 10db50: 75 18 jne 10db6a <_Thread_queue_Enqueue_priority+0x6a> 10db52: e9 32 01 00 00 jmp 10dc89 <_Thread_queue_Enqueue_priority+0x189> 10db57: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10db58: 56 push %esi 10db59: 9d popf 10db5a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db5b: 85 58 10 test %ebx,0x10(%eax) 10db5e: 0f 84 d0 00 00 00 je 10dc34 <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10db64: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10db66: 39 f8 cmp %edi,%eax 10db68: 74 07 je 10db71 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10db6a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10db6d: 39 ca cmp %ecx,%edx 10db6f: 77 e7 ja 10db58 <_Thread_queue_Enqueue_priority+0x58> 10db71: 8b 7d e8 mov -0x18(%ebp),%edi 10db74: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10db77: 8b 75 08 mov 0x8(%ebp),%esi 10db7a: 8b 5e 30 mov 0x30(%esi),%ebx 10db7d: 83 fb 01 cmp $0x1,%ebx 10db80: 0f 84 b6 00 00 00 je 10dc3c <_Thread_queue_Enqueue_priority+0x13c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10db86: 8b 45 10 mov 0x10(%ebp),%eax 10db89: 8b 55 ec mov -0x14(%ebp),%edx 10db8c: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10db8e: 89 d8 mov %ebx,%eax 10db90: 83 c4 10 add $0x10,%esp 10db93: 5b pop %ebx 10db94: 5e pop %esi 10db95: 5f pop %edi 10db96: c9 leave 10db97: c3 ret _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10db98: 8d 04 40 lea (%eax,%eax,2),%eax 10db9b: 8b 4d 08 mov 0x8(%ebp),%ecx 10db9e: 8d 34 81 lea (%ecx,%eax,4),%esi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10dba1: 89 75 f0 mov %esi,-0x10(%ebp) 10dba4: 89 75 e4 mov %esi,-0x1c(%ebp) 10dba7: 89 7d e8 mov %edi,-0x18(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10dbaa: 0f b6 0d 14 12 12 00 movzbl 0x121214,%ecx 10dbb1: 41 inc %ecx _ISR_Disable( level ); 10dbb2: 9c pushf 10dbb3: fa cli 10dbb4: 5f pop %edi 10dbb5: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dbb8: 8b 75 f0 mov -0x10(%ebp),%esi 10dbbb: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dbbe: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dbc1: 74 2b je 10dbee <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dbc3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dbc6: 39 ca cmp %ecx,%edx 10dbc8: 73 24 jae 10dbee <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dbca: 57 push %edi 10dbcb: 9d popf 10dbcc: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbcd: 85 58 10 test %ebx,0x10(%eax) 10dbd0: 74 59 je 10dc2b <_Thread_queue_Enqueue_priority+0x12b> 10dbd2: 8b 75 e4 mov -0x1c(%ebp),%esi 10dbd5: eb 10 jmp 10dbe7 <_Thread_queue_Enqueue_priority+0xe7> 10dbd7: 90 nop <== NOT EXECUTED search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10dbd8: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dbdb: 39 ca cmp %ecx,%edx 10dbdd: 73 0f jae 10dbee <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dbdf: 57 push %edi 10dbe0: 9d popf 10dbe1: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbe2: 85 58 10 test %ebx,0x10(%eax) 10dbe5: 74 41 je 10dc28 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dbe7: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dbea: 39 f0 cmp %esi,%eax 10dbec: 75 ea jne 10dbd8 <_Thread_queue_Enqueue_priority+0xd8> 10dbee: 89 7d f0 mov %edi,-0x10(%ebp) 10dbf1: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dbf4: 8b 75 08 mov 0x8(%ebp),%esi 10dbf7: 8b 5e 30 mov 0x30(%esi),%ebx 10dbfa: 83 fb 01 cmp $0x1,%ebx 10dbfd: 75 87 jne 10db86 <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dbff: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc06: 39 ca cmp %ecx,%edx 10dc08: 74 5b je 10dc65 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dc0a: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dc0c: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dc0e: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dc11: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dc13: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dc16: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dc19: ff 75 f0 pushl -0x10(%ebp) 10dc1c: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc1d: 89 d8 mov %ebx,%eax 10dc1f: 83 c4 10 add $0x10,%esp 10dc22: 5b pop %ebx 10dc23: 5e pop %esi 10dc24: 5f pop %edi 10dc25: c9 leave 10dc26: c3 ret 10dc27: 90 nop <== NOT EXECUTED 10dc28: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dc2b: 57 push %edi 10dc2c: 9d popf goto restart_reverse_search; 10dc2d: e9 78 ff ff ff jmp 10dbaa <_Thread_queue_Enqueue_priority+0xaa> 10dc32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dc34: 56 push %esi 10dc35: 9d popf goto restart_forward_search; 10dc36: e9 08 ff ff ff jmp 10db43 <_Thread_queue_Enqueue_priority+0x43> 10dc3b: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc3c: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc43: 39 ca cmp %ecx,%edx 10dc45: 74 1e je 10dc65 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dc47: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc4a: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc4c: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc4f: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc51: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc54: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dc57: ff 75 f0 pushl -0x10(%ebp) 10dc5a: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc5b: 89 d8 mov %ebx,%eax 10dc5d: 83 c4 10 add $0x10,%esp 10dc60: 5b pop %ebx 10dc61: 5e pop %esi 10dc62: 5f pop %edi 10dc63: c9 leave 10dc64: c3 ret 10dc65: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10dc68: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc6b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc6d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc70: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc72: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc75: 8b 45 08 mov 0x8(%ebp),%eax 10dc78: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dc7b: ff 75 ec pushl -0x14(%ebp) 10dc7e: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dc7f: bb 01 00 00 00 mov $0x1,%ebx 10dc84: e9 05 ff ff ff jmp 10db8e <_Thread_queue_Enqueue_priority+0x8e> 10dc89: 8b 7d e8 mov -0x18(%ebp),%edi 10dc8c: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10dc8f: b9 ff ff ff ff mov $0xffffffff,%ecx 10dc94: e9 de fe ff ff jmp 10db77 <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010da68 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10da68: 55 push %ebp 10da69: 89 e5 mov %esp,%ebp 10da6b: 57 push %edi 10da6c: 56 push %esi 10da6d: 53 push %ebx 10da6e: 83 ec 24 sub $0x24,%esp 10da71: 8b 75 08 mov 0x8(%ebp),%esi 10da74: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10da77: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10da7d: ff 76 38 pushl 0x38(%esi) 10da80: 53 push %ebx 10da81: e8 d6 03 00 00 call 10de5c <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10da86: 83 c4 10 add $0x10,%esp 10da89: 85 ff test %edi,%edi 10da8b: 75 33 jne 10dac0 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10da8d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da91: 74 64 je 10daf7 <_Thread_queue_Enqueue_with_handler+0x8f> enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; 10da93: b8 74 0a 11 00 mov $0x110a74,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10da98: 51 push %ecx 10da99: 8d 55 e4 lea -0x1c(%ebp),%edx 10da9c: 52 push %edx 10da9d: 53 push %ebx 10da9e: 56 push %esi 10da9f: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10daa1: 83 c4 10 add $0x10,%esp 10daa4: 83 f8 01 cmp $0x1,%eax 10daa7: 74 0e je 10dab7 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10daa9: 52 push %edx 10daaa: ff 75 e4 pushl -0x1c(%ebp) 10daad: 53 push %ebx 10daae: 50 push %eax 10daaf: e8 a4 f5 ff ff call 10d058 <_Thread_blocking_operation_Cancel> 10dab4: 83 c4 10 add $0x10,%esp } 10dab7: 8d 65 f4 lea -0xc(%ebp),%esp 10daba: 5b pop %ebx 10dabb: 5e pop %esi 10dabc: 5f pop %edi 10dabd: c9 leave 10dabe: c3 ret 10dabf: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dac0: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dac3: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10daca: 8b 55 10 mov 0x10(%ebp),%edx 10dacd: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10dad0: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10dad3: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dada: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10dadd: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10dae0: 8d 43 48 lea 0x48(%ebx),%eax 10dae3: 50 push %eax 10dae4: 68 04 55 12 00 push $0x125504 10dae9: e8 d6 09 00 00 call 10e4c4 <_Watchdog_Insert> 10daee: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10daf1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10daf5: 75 9c jne 10da93 <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10daf7: b8 00 db 10 00 mov $0x10db00,%eax 10dafc: eb 9a jmp 10da98 <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00110ab8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110ab8: 55 push %ebp 110ab9: 89 e5 mov %esp,%ebp 110abb: 83 ec 08 sub $0x8,%esp 110abe: 8b 45 08 mov 0x8(%ebp),%eax 110ac1: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 110ac4: 83 78 34 01 cmpl $0x1,0x34(%eax) 110ac8: 74 0e je 110ad8 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110aca: 89 55 0c mov %edx,0xc(%ebp) 110acd: 89 45 08 mov %eax,0x8(%ebp) } 110ad0: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110ad1: e9 22 17 00 00 jmp 1121f8 <_Thread_queue_Extract_fifo> 110ad6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 110ad8: 51 push %ecx 110ad9: 6a 00 push $0x0 110adb: 52 push %edx 110adc: 50 push %eax 110add: e8 06 00 00 00 call 110ae8 <_Thread_queue_Extract_priority_helper> 110ae2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110ae5: c9 leave 110ae6: c3 ret =============================================================================== 001121f8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 1121f8: 55 push %ebp 1121f9: 89 e5 mov %esp,%ebp 1121fb: 53 push %ebx 1121fc: 83 ec 04 sub $0x4,%esp 1121ff: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112202: 9c pushf 112203: fa cli 112204: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112205: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 11220c: 74 2e je 11223c <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11220e: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112210: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112213: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112216: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112218: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 11221f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112223: 74 1f je 112244 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112225: 50 push %eax 112226: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112227: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11222e: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112231: 8b 5d fc mov -0x4(%ebp),%ebx 112234: c9 leave 112235: e9 aa af ff ff jmp 10d1e4 <_Thread_Clear_state> 11223a: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 11223c: 50 push %eax 11223d: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11223e: 8b 5d fc mov -0x4(%ebp),%ebx 112241: c9 leave 112242: c3 ret 112243: 90 nop <== NOT EXECUTED 112244: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 11224b: 50 push %eax 11224c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 11224d: 83 ec 0c sub $0xc,%esp 112250: 8d 43 48 lea 0x48(%ebx),%eax 112253: 50 push %eax 112254: e8 a3 c3 ff ff call 10e5fc <_Watchdog_Remove> 112259: 83 c4 10 add $0x10,%esp 11225c: eb c9 jmp 112227 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110ae8 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 110ae8: 55 push %ebp 110ae9: 89 e5 mov %esp,%ebp 110aeb: 57 push %edi 110aec: 56 push %esi 110aed: 53 push %ebx 110aee: 83 ec 1c sub $0x1c,%esp 110af1: 8b 5d 0c mov 0xc(%ebp),%ebx 110af4: 8a 45 10 mov 0x10(%ebp),%al 110af7: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 110afa: 9c pushf 110afb: fa cli 110afc: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110aff: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110b06: 74 68 je 110b70 <_Thread_queue_Extract_priority_helper+0x88> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110b08: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 110b0a: 8b 73 04 mov 0x4(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110b0d: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110b10: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 110b13: 39 d0 cmp %edx,%eax 110b15: 74 65 je 110b7c <_Thread_queue_Extract_priority_helper+0x94> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 110b17: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 110b1a: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 110b1c: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 110b1e: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 110b21: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 110b23: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110b26: 39 c2 cmp %eax,%edx 110b28: 74 11 je 110b3b <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 110b2a: 8d 48 38 lea 0x38(%eax),%ecx 110b2d: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 110b30: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 110b33: 89 50 40 mov %edx,0x40(%eax) 110b36: 83 c0 3c add $0x3c,%eax 110b39: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110b3b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110b3f: 75 23 jne 110b64 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110b41: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110b45: 74 3d je 110b84 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 110b47: ff 75 e4 pushl -0x1c(%ebp) 110b4a: 9d popf 110b4b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110b52: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b55: 8d 65 f4 lea -0xc(%ebp),%esp 110b58: 5b pop %ebx 110b59: 5e pop %esi 110b5a: 5f pop %edi 110b5b: c9 leave 110b5c: e9 83 c6 ff ff jmp 10d1e4 <_Thread_Clear_state> 110b61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 110b64: ff 75 e4 pushl -0x1c(%ebp) 110b67: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b68: 8d 65 f4 lea -0xc(%ebp),%esp 110b6b: 5b pop %ebx 110b6c: 5e pop %esi 110b6d: 5f pop %edi 110b6e: c9 leave 110b6f: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 110b70: ff 75 e4 pushl -0x1c(%ebp) 110b73: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b74: 8d 65 f4 lea -0xc(%ebp),%esp 110b77: 5b pop %ebx 110b78: 5e pop %esi 110b79: 5f pop %edi 110b7a: c9 leave 110b7b: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 110b7c: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 110b7e: 89 71 04 mov %esi,0x4(%ecx) 110b81: eb b8 jmp 110b3b <_Thread_queue_Extract_priority_helper+0x53> 110b83: 90 nop <== NOT EXECUTED 110b84: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110b8b: ff 75 e4 pushl -0x1c(%ebp) 110b8e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110b8f: 83 ec 0c sub $0xc,%esp 110b92: 8d 43 48 lea 0x48(%ebx),%eax 110b95: 50 push %eax 110b96: e8 61 da ff ff call 10e5fc <_Watchdog_Remove> 110b9b: 83 c4 10 add $0x10,%esp 110b9e: eb ab jmp 110b4b <_Thread_queue_Extract_priority_helper+0x63> =============================================================================== 0010dc9c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dc9c: 55 push %ebp 10dc9d: 89 e5 mov %esp,%ebp 10dc9f: 83 ec 08 sub $0x8,%esp 10dca2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10dca5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dcac: 75 06 jne 10dcb4 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10dcae: 31 c0 xor %eax,%eax } 10dcb0: c9 leave 10dcb1: c3 ret 10dcb2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dcb4: 83 ec 08 sub $0x8,%esp 10dcb7: 50 push %eax 10dcb8: ff 70 44 pushl 0x44(%eax) 10dcbb: e8 f8 2d 00 00 call 110ab8 <_Thread_queue_Extract> return true; 10dcc0: 83 c4 10 add $0x10,%esp 10dcc3: b0 01 mov $0x1,%al } return false; } 10dcc5: c9 leave 10dcc6: c3 ret =============================================================================== 0011efb4 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11efb4: 55 push %ebp 11efb5: 89 e5 mov %esp,%ebp 11efb7: 83 ec 08 sub $0x8,%esp 11efba: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11efbd: 83 78 34 01 cmpl $0x1,0x34(%eax) 11efc1: 74 0d je 11efd0 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11efc3: ba d8 03 12 00 mov $0x1203d8,%edx return (*first_p)( the_thread_queue ); 11efc8: 89 45 08 mov %eax,0x8(%ebp) } 11efcb: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11efcc: ff e2 jmp *%edx 11efce: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 11efd0: ba dc ef 11 00 mov $0x11efdc,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11efd5: 89 45 08 mov %eax,0x8(%ebp) } 11efd8: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11efd9: ff e2 jmp *%edx =============================================================================== 001203d8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1203d8: 55 push %ebp 1203d9: 89 e5 mov %esp,%ebp 1203db: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1203de: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1203e0: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1203e3: 39 d0 cmp %edx,%eax 1203e5: 74 05 je 1203ec <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1203e7: c9 leave 1203e8: c3 ret 1203e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; 1203ec: 31 c0 xor %eax,%eax } 1203ee: c9 leave 1203ef: c3 ret =============================================================================== 0010dcc8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dcc8: 55 push %ebp 10dcc9: 89 e5 mov %esp,%ebp 10dccb: 56 push %esi 10dccc: 53 push %ebx 10dccd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dcd0: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dcd3: eb 06 jmp 10dcdb <_Thread_queue_Flush+0x13> 10dcd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10dcd8: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dcdb: 83 ec 0c sub $0xc,%esp 10dcde: 53 push %ebx 10dcdf: e8 60 fc ff ff call 10d944 <_Thread_queue_Dequeue> 10dce4: 83 c4 10 add $0x10,%esp 10dce7: 85 c0 test %eax,%eax 10dce9: 75 ed jne 10dcd8 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dceb: 8d 65 f8 lea -0x8(%ebp),%esp 10dcee: 5b pop %ebx 10dcef: 5e pop %esi 10dcf0: c9 leave 10dcf1: c3 ret =============================================================================== 0010dcf4 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dcf4: 55 push %ebp 10dcf5: 89 e5 mov %esp,%ebp 10dcf7: 56 push %esi 10dcf8: 53 push %ebx 10dcf9: 8b 45 08 mov 0x8(%ebp),%eax 10dcfc: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dcff: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd02: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dd05: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dd08: 8b 4d 14 mov 0x14(%ebp),%ecx 10dd0b: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd0e: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd15: 83 fa 01 cmp $0x1,%edx 10dd18: 74 16 je 10dd30 <_Thread_queue_Initialize+0x3c> 10dd1a: 8d 50 04 lea 0x4(%eax),%edx 10dd1d: 89 10 mov %edx,(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dd1f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dd26: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dd29: 5b pop %ebx 10dd2a: 5e pop %esi 10dd2b: c9 leave 10dd2c: c3 ret 10dd2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd30: 89 c1 mov %eax,%ecx 10dd32: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dd34: 8d 1c 52 lea (%edx,%edx,2),%ebx 10dd37: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10dd3a: 8d 73 04 lea 0x4(%ebx),%esi 10dd3d: 89 31 mov %esi,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dd3f: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 10dd46: 89 59 08 mov %ebx,0x8(%ecx) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10dd49: 42 inc %edx 10dd4a: 83 c1 0c add $0xc,%ecx the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10dd4d: 83 fa 04 cmp $0x4,%edx 10dd50: 75 e2 jne 10dd34 <_Thread_queue_Initialize+0x40> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dd52: 5b pop %ebx 10dd53: 5e pop %esi 10dd54: c9 leave 10dd55: c3 ret =============================================================================== 00110ba0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 110ba0: 55 push %ebp 110ba1: 89 e5 mov %esp,%ebp 110ba3: 83 ec 08 sub $0x8,%esp 110ba6: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 110ba9: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 110bac: 8b 4a 30 mov 0x30(%edx),%ecx 110baf: 85 c9 test %ecx,%ecx 110bb1: 74 08 je 110bbb <_Thread_queue_Process_timeout+0x1b> 110bb3: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 110bb9: 74 15 je 110bd0 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110bbb: 8b 4a 3c mov 0x3c(%edx),%ecx 110bbe: 89 48 34 mov %ecx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 110bc1: 83 ec 08 sub $0x8,%esp 110bc4: 50 push %eax 110bc5: 52 push %edx 110bc6: e8 ed fe ff ff call 110ab8 <_Thread_queue_Extract> 110bcb: 83 c4 10 add $0x10,%esp } } 110bce: c9 leave 110bcf: c3 ret * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 110bd0: 83 f9 03 cmp $0x3,%ecx 110bd3: 74 f9 je 110bce <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110bd5: 8b 4a 3c mov 0x3c(%edx),%ecx 110bd8: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 110bdb: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 110be2: c9 leave 110be3: c3 ret =============================================================================== 0010dd58 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dd58: 55 push %ebp 10dd59: 89 e5 mov %esp,%ebp 10dd5b: 57 push %edi 10dd5c: 56 push %esi 10dd5d: 53 push %ebx 10dd5e: 83 ec 1c sub $0x1c,%esp 10dd61: 8b 75 08 mov 0x8(%ebp),%esi 10dd64: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10dd67: 85 f6 test %esi,%esi 10dd69: 74 06 je 10dd71 <_Thread_queue_Requeue+0x19><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd6b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dd6f: 74 0b je 10dd7c <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10dd71: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dd74: 5b pop %ebx <== NOT EXECUTED 10dd75: 5e pop %esi <== NOT EXECUTED 10dd76: 5f pop %edi <== NOT EXECUTED 10dd77: c9 leave <== NOT EXECUTED 10dd78: c3 ret <== NOT EXECUTED 10dd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10dd7c: 9c pushf 10dd7d: fa cli 10dd7e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dd7f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dd86: 75 0c jne 10dd94 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10dd88: 53 push %ebx 10dd89: 9d popf } } 10dd8a: 8d 65 f4 lea -0xc(%ebp),%esp 10dd8d: 5b pop %ebx 10dd8e: 5e pop %esi 10dd8f: 5f pop %edi 10dd90: c9 leave 10dd91: c3 ret 10dd92: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 10dd94: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10dd9b: 50 push %eax 10dd9c: 6a 01 push $0x1 10dd9e: 57 push %edi 10dd9f: 56 push %esi 10dda0: e8 43 2d 00 00 call 110ae8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dda5: 83 c4 0c add $0xc,%esp 10dda8: 8d 45 e4 lea -0x1c(%ebp),%eax 10ddab: 50 push %eax 10ddac: 57 push %edi 10ddad: 56 push %esi 10ddae: e8 4d fd ff ff call 10db00 <_Thread_queue_Enqueue_priority> 10ddb3: 83 c4 10 add $0x10,%esp 10ddb6: eb d0 jmp 10dd88 <_Thread_queue_Requeue+0x30> =============================================================================== 0010ddb8 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ddb8: 55 push %ebp 10ddb9: 89 e5 mov %esp,%ebp 10ddbb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ddbe: 8d 45 f4 lea -0xc(%ebp),%eax 10ddc1: 50 push %eax 10ddc2: ff 75 08 pushl 0x8(%ebp) 10ddc5: e8 02 f8 ff ff call 10d5cc <_Thread_Get> switch ( location ) { 10ddca: 83 c4 10 add $0x10,%esp 10ddcd: 8b 55 f4 mov -0xc(%ebp),%edx 10ddd0: 85 d2 test %edx,%edx 10ddd2: 75 17 jne 10ddeb <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10ddd4: 83 ec 0c sub $0xc,%esp 10ddd7: 50 push %eax 10ddd8: e8 c3 2d 00 00 call 110ba0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10dddd: a1 34 54 12 00 mov 0x125434,%eax 10dde2: 48 dec %eax 10dde3: a3 34 54 12 00 mov %eax,0x125434 10dde8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10ddeb: c9 leave 10ddec: c3 ret =============================================================================== 00118d94 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118d94: 55 push %ebp 118d95: 89 e5 mov %esp,%ebp 118d97: 57 push %edi 118d98: 56 push %esi 118d99: 53 push %ebx 118d9a: 83 ec 4c sub $0x4c,%esp 118d9d: 8b 5d 08 mov 0x8(%ebp),%ebx 118da0: 8d 45 e0 lea -0x20(%ebp),%eax 118da3: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118da6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118da9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 118db0: 8d 4d dc lea -0x24(%ebp),%ecx 118db3: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118db6: 8d 7d d0 lea -0x30(%ebp),%edi 118db9: 8d 45 d4 lea -0x2c(%ebp),%eax 118dbc: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118dbf: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118dc2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118dc9: 89 7d d8 mov %edi,-0x28(%ebp) 118dcc: 8d 73 30 lea 0x30(%ebx),%esi 118dcf: 8d 4b 68 lea 0x68(%ebx),%ecx 118dd2: 89 4d c4 mov %ecx,-0x3c(%ebp) 118dd5: 8d 43 08 lea 0x8(%ebx),%eax 118dd8: 89 45 c0 mov %eax,-0x40(%ebp) 118ddb: 8d 53 40 lea 0x40(%ebx),%edx 118dde: 89 55 bc mov %edx,-0x44(%ebp) 118de1: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118de4: 8d 4d dc lea -0x24(%ebp),%ecx 118de7: 89 4b 78 mov %ecx,0x78(%ebx) 118dea: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118dec: a1 e4 0a 14 00 mov 0x140ae4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df1: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118df4: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118df7: 51 push %ecx 118df8: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df9: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118dfb: 50 push %eax 118dfc: 56 push %esi 118dfd: e8 c2 3d 00 00 call 11cbc4 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118e02: a1 28 0a 14 00 mov 0x140a28,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e07: 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 ) { 118e0a: 83 c4 10 add $0x10,%esp 118e0d: 39 d0 cmp %edx,%eax 118e0f: 77 63 ja 118e74 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118e11: 72 7d jb 118e90 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e13: 89 43 74 mov %eax,0x74(%ebx) 118e16: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118e18: 8b 43 78 mov 0x78(%ebx),%eax 118e1b: 83 ec 0c sub $0xc,%esp 118e1e: 50 push %eax 118e1f: e8 a0 09 00 00 call 1197c4 <_Chain_Get> if ( timer == NULL ) { 118e24: 83 c4 10 add $0x10,%esp 118e27: 85 c0 test %eax,%eax 118e29: 74 35 je 118e60 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118e2b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e2e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e31: 74 19 je 118e4c <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118e33: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e36: 75 e0 jne 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118e38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e3b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e3e: 50 push %eax <== NOT EXECUTED 118e3f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e42: e8 09 3e 00 00 call 11cc50 <_Watchdog_Insert> <== NOT EXECUTED 118e47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e4a: eb cc jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118e4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e4f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e52: 50 push %eax <== NOT EXECUTED 118e53: 56 push %esi <== NOT EXECUTED 118e54: e8 f7 3d 00 00 call 11cc50 <_Watchdog_Insert> <== NOT EXECUTED 118e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e5c: eb ba jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED 118e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 118e60: 9c pushf 118e61: fa cli 118e62: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118e63: 8b 55 b4 mov -0x4c(%ebp),%edx 118e66: 3b 55 dc cmp -0x24(%ebp),%edx 118e69: 74 41 je 118eac <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118e6b: 50 push %eax <== NOT EXECUTED 118e6c: 9d popf <== NOT EXECUTED 118e6d: e9 7a ff ff ff jmp 118dec <_Timer_server_Body+0x58><== NOT EXECUTED 118e72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e74: 51 push %ecx 118e75: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 118e76: 89 c1 mov %eax,%ecx 118e78: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e7a: 51 push %ecx 118e7b: ff 75 c4 pushl -0x3c(%ebp) 118e7e: 89 45 b8 mov %eax,-0x48(%ebp) 118e81: e8 3e 3d 00 00 call 11cbc4 <_Watchdog_Adjust_to_chain> 118e86: 83 c4 10 add $0x10,%esp 118e89: 8b 45 b8 mov -0x48(%ebp),%eax 118e8c: eb 85 jmp 118e13 <_Timer_server_Body+0x7f> 118e8e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 118e90: 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; 118e91: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118e93: 52 push %edx 118e94: 6a 01 push $0x1 118e96: ff 75 c4 pushl -0x3c(%ebp) 118e99: 89 45 b8 mov %eax,-0x48(%ebp) 118e9c: e8 ab 3c 00 00 call 11cb4c <_Watchdog_Adjust> 118ea1: 83 c4 10 add $0x10,%esp 118ea4: 8b 45 b8 mov -0x48(%ebp),%eax 118ea7: e9 67 ff ff ff jmp 118e13 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118eac: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118eb3: 50 push %eax 118eb4: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 118eb5: 8b 4d b0 mov -0x50(%ebp),%ecx 118eb8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118ebb: 75 23 jne 118ee0 <_Timer_server_Body+0x14c> 118ebd: eb 33 jmp 118ef2 <_Timer_server_Body+0x15e> 118ebf: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118ec0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118ec2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118ec5: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 118ec8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118ecf: 51 push %ecx 118ed0: 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 ); 118ed1: 83 ec 08 sub $0x8,%esp 118ed4: ff 70 24 pushl 0x24(%eax) 118ed7: ff 70 20 pushl 0x20(%eax) 118eda: ff 50 1c call *0x1c(%eax) } 118edd: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 118ee0: 9c pushf 118ee1: fa cli 118ee2: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118ee3: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 118ee6: 39 45 b0 cmp %eax,-0x50(%ebp) 118ee9: 75 d5 jne 118ec0 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118eeb: 51 push %ecx 118eec: 9d popf 118eed: e9 f2 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118ef2: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118ef6: a1 94 09 14 00 mov 0x140994,%eax 118efb: 40 inc %eax 118efc: a3 94 09 14 00 mov %eax,0x140994 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118f01: 83 ec 08 sub $0x8,%esp 118f04: 6a 08 push $0x8 118f06: ff 33 pushl (%ebx) 118f08: e8 6b 34 00 00 call 11c378 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f0d: 89 d8 mov %ebx,%eax 118f0f: e8 e0 fd ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f14: 89 d8 mov %ebx,%eax 118f16: e8 29 fe ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118f1b: e8 8c 2a 00 00 call 11b9ac <_Thread_Enable_dispatch> ts->active = true; 118f20: 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 ); 118f24: 5a pop %edx 118f25: ff 75 c0 pushl -0x40(%ebp) 118f28: e8 5b 3e 00 00 call 11cd88 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118f2d: 58 pop %eax 118f2e: ff 75 bc pushl -0x44(%ebp) 118f31: e8 52 3e 00 00 call 11cd88 <_Watchdog_Remove> 118f36: 83 c4 10 add $0x10,%esp 118f39: e9 a6 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> =============================================================================== 00118cf4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118cf4: 55 push %ebp 118cf5: 89 e5 mov %esp,%ebp 118cf7: 56 push %esi 118cf8: 53 push %ebx 118cf9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118cfb: 8d 70 08 lea 0x8(%eax),%esi 118cfe: 83 ec 0c sub $0xc,%esp 118d01: 56 push %esi 118d02: e8 81 40 00 00 call 11cd88 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118d07: 9c pushf 118d08: fa cli 118d09: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d0a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d0d: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118d10: 83 c4 10 add $0x10,%esp 118d13: 39 d0 cmp %edx,%eax 118d15: 74 21 je 118d38 <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d17: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d1a: 51 push %ecx 118d1b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d1c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118d1f: 83 ec 08 sub $0x8,%esp 118d22: 56 push %esi 118d23: 68 64 0a 14 00 push $0x140a64 118d28: e8 23 3f 00 00 call 11cc50 <_Watchdog_Insert> 118d2d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d30: 8d 65 f8 lea -0x8(%ebp),%esp 118d33: 5b pop %ebx 118d34: 5e pop %esi 118d35: c9 leave 118d36: c3 ret 118d37: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d38: 51 push %ecx 118d39: 9d popf } } 118d3a: 8d 65 f8 lea -0x8(%ebp),%esp 118d3d: 5b pop %ebx 118d3e: 5e pop %esi 118d3f: c9 leave 118d40: c3 ret =============================================================================== 00118d44 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118d44: 55 push %ebp 118d45: 89 e5 mov %esp,%ebp 118d47: 56 push %esi 118d48: 53 push %ebx 118d49: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118d4b: 8d 70 40 lea 0x40(%eax),%esi 118d4e: 83 ec 0c sub $0xc,%esp 118d51: 56 push %esi 118d52: e8 31 40 00 00 call 11cd88 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118d57: 9c pushf 118d58: fa cli 118d59: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d5a: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d5d: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118d60: 83 c4 10 add $0x10,%esp 118d63: 39 d0 cmp %edx,%eax 118d65: 74 21 je 118d88 <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d67: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d6a: 51 push %ecx 118d6b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d6c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118d6f: 83 ec 08 sub $0x8,%esp 118d72: 56 push %esi 118d73: 68 58 0a 14 00 push $0x140a58 118d78: e8 d3 3e 00 00 call 11cc50 <_Watchdog_Insert> 118d7d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d80: 8d 65 f8 lea -0x8(%ebp),%esp 118d83: 5b pop %ebx 118d84: 5e pop %esi 118d85: c9 leave 118d86: c3 ret 118d87: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d88: 51 push %ecx 118d89: 9d popf } } 118d8a: 8d 65 f8 lea -0x8(%ebp),%esp 118d8d: 5b pop %ebx 118d8e: 5e pop %esi 118d8f: c9 leave 118d90: c3 ret =============================================================================== 00118f40 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 57 push %edi 118f44: 56 push %esi 118f45: 53 push %ebx 118f46: 83 ec 2c sub $0x2c,%esp 118f49: 8b 5d 08 mov 0x8(%ebp),%ebx 118f4c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118f4f: 8b 53 78 mov 0x78(%ebx),%edx 118f52: 85 d2 test %edx,%edx 118f54: 74 16 je 118f6c <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118f56: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f59: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f5c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118f5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f62: 5b pop %ebx <== NOT EXECUTED 118f63: 5e pop %esi <== NOT EXECUTED 118f64: 5f pop %edi <== NOT EXECUTED 118f65: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118f66: e9 1d 08 00 00 jmp 119788 <_Chain_Append> <== NOT EXECUTED 118f6b: 90 nop <== NOT EXECUTED 118f6c: 8b 15 94 09 14 00 mov 0x140994,%edx 118f72: 42 inc %edx 118f73: 89 15 94 09 14 00 mov %edx,0x140994 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118f79: 8b 50 38 mov 0x38(%eax),%edx 118f7c: 83 fa 01 cmp $0x1,%edx 118f7f: 74 7b je 118ffc <_Timer_server_Schedule_operation_method+0xbc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118f81: 83 fa 03 cmp $0x3,%edx 118f84: 74 0e je 118f94 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 118f86: 8d 65 f4 lea -0xc(%ebp),%esp 118f89: 5b pop %ebx 118f8a: 5e pop %esi 118f8b: 5f pop %edi 118f8c: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118f8d: e9 1a 2a 00 00 jmp 11b9ac <_Thread_Enable_dispatch> 118f92: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118f94: 9c pushf 118f95: fa cli 118f96: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118f99: 8b 0d 28 0a 14 00 mov 0x140a28,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118f9f: 8b 53 74 mov 0x74(%ebx),%edx 118fa2: 89 55 d4 mov %edx,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118fa5: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118fa8: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118fab: 39 fa cmp %edi,%edx 118fad: 74 21 je 118fd0 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118faf: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 118fb2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118fb5: 0f 86 a1 00 00 00 jbe 11905c <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118fbb: 89 ce mov %ecx,%esi 118fbd: 2b 75 d4 sub -0x2c(%ebp),%esi 118fc0: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 118fc3: 39 f7 cmp %esi,%edi 118fc5: 0f 86 9b 00 00 00 jbe 119066 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118fcb: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118fcd: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118fd0: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118fd3: ff 75 e4 pushl -0x1c(%ebp) 118fd6: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118fd7: 83 ec 08 sub $0x8,%esp 118fda: 83 c0 10 add $0x10,%eax 118fdd: 50 push %eax 118fde: 8d 43 68 lea 0x68(%ebx),%eax 118fe1: 50 push %eax 118fe2: e8 69 3c 00 00 call 11cc50 <_Watchdog_Insert> if ( !ts->active ) { 118fe7: 8a 43 7c mov 0x7c(%ebx),%al 118fea: 83 c4 10 add $0x10,%esp 118fed: 84 c0 test %al,%al 118fef: 75 95 jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118ff1: 89 d8 mov %ebx,%eax 118ff3: e8 4c fd ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> 118ff8: eb 8c jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 118ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118ffc: 9c pushf 118ffd: fa cli 118ffe: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119001: 8b 0d e4 0a 14 00 mov 0x140ae4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119007: 8b 7b 3c mov 0x3c(%ebx),%edi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11900a: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11900d: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119010: 39 f2 cmp %esi,%edx 119012: 74 10 je 119024 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119014: 89 ce mov %ecx,%esi 119016: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 119018: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11901b: 39 fe cmp %edi,%esi 11901d: 73 39 jae 119058 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11901f: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119021: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119024: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119027: ff 75 e4 pushl -0x1c(%ebp) 11902a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11902b: 83 ec 08 sub $0x8,%esp 11902e: 83 c0 10 add $0x10,%eax 119031: 50 push %eax 119032: 8d 43 30 lea 0x30(%ebx),%eax 119035: 50 push %eax 119036: e8 15 3c 00 00 call 11cc50 <_Watchdog_Insert> if ( !ts->active ) { 11903b: 8a 43 7c mov 0x7c(%ebx),%al 11903e: 83 c4 10 add $0x10,%esp 119041: 84 c0 test %al,%al 119043: 0f 85 3d ff ff ff jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119049: 89 d8 mov %ebx,%eax 11904b: e8 a4 fc ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> 119050: e9 31 ff ff ff jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 119055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119058: 31 ff xor %edi,%edi 11905a: eb c5 jmp 119021 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11905c: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 11905f: 29 cf sub %ecx,%edi 119061: e9 67 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119066: 31 ff xor %edi,%edi <== NOT EXECUTED 119068: e9 60 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010e1a8 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10e1a8: 55 push %ebp 10e1a9: 89 e5 mov %esp,%ebp 10e1ab: 53 push %ebx 10e1ac: 8b 5d 08 mov 0x8(%ebp),%ebx 10e1af: 8b 55 0c mov 0xc(%ebp),%edx uint32_t seconds = add->tv_sec; 10e1b2: 8b 02 mov (%edx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10e1b4: 01 03 add %eax,(%ebx) time->tv_nsec += add->tv_nsec; 10e1b6: 8b 52 04 mov 0x4(%edx),%edx 10e1b9: 03 53 04 add 0x4(%ebx),%edx 10e1bc: 89 53 04 mov %edx,0x4(%ebx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e1bf: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e1c5: 76 1a jbe 10e1e1 <_Timespec_Add_to+0x39> 10e1c7: 8b 0b mov (%ebx),%ecx 10e1c9: 8d 76 00 lea 0x0(%esi),%esi time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10e1cc: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 10e1d2: 41 inc %ecx /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; 10e1d3: 40 inc %eax /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e1d4: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e1da: 77 f0 ja 10e1cc <_Timespec_Add_to+0x24> <== NEVER TAKEN 10e1dc: 89 53 04 mov %edx,0x4(%ebx) 10e1df: 89 0b mov %ecx,(%ebx) time->tv_sec++; seconds++; } return seconds; } 10e1e1: 5b pop %ebx 10e1e2: c9 leave 10e1e3: c3 ret =============================================================================== 0010faa8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10faa8: 55 push %ebp 10faa9: 89 e5 mov %esp,%ebp 10faab: 57 push %edi 10faac: 56 push %esi 10faad: 53 push %ebx 10faae: 83 ec 2c sub $0x2c,%esp 10fab1: 8b 45 08 mov 0x8(%ebp),%eax 10fab4: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fab7: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fab9: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fabc: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fac1: 8b 01 mov (%ecx),%eax 10fac3: f7 eb imul %ebx 10fac5: 89 45 e0 mov %eax,-0x20(%ebp) 10fac8: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10facb: 8b 41 04 mov 0x4(%ecx),%eax 10face: 99 cltd 10facf: 01 45 e0 add %eax,-0x20(%ebp) 10fad2: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fad5: 8b 55 e4 mov -0x1c(%ebp),%edx 10fad8: 0b 55 e0 or -0x20(%ebp),%edx 10fadb: 74 73 je 10fb50 <_Timespec_Divide+0xa8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fadd: 89 f8 mov %edi,%eax 10fadf: f7 eb imul %ebx 10fae1: 89 45 d0 mov %eax,-0x30(%ebp) 10fae4: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fae7: 89 f7 mov %esi,%edi 10fae9: c1 ff 1f sar $0x1f,%edi 10faec: 01 75 d0 add %esi,-0x30(%ebp) 10faef: 11 7d d4 adc %edi,-0x2c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10faf2: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10faf9: bb a0 86 01 00 mov $0x186a0,%ebx 10fafe: 8b 45 d0 mov -0x30(%ebp),%eax 10fb01: f7 e3 mul %ebx 10fb03: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb06: ff 75 e4 pushl -0x1c(%ebp) 10fb09: ff 75 e0 pushl -0x20(%ebp) 10fb0c: 56 push %esi 10fb0d: 50 push %eax 10fb0e: e8 49 fb 00 00 call 11f65c <__udivdi3> 10fb13: 83 c4 10 add $0x10,%esp 10fb16: 89 c3 mov %eax,%ebx 10fb18: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fb1a: 6a 00 push $0x0 10fb1c: 68 e8 03 00 00 push $0x3e8 10fb21: 52 push %edx 10fb22: 50 push %eax 10fb23: e8 34 fb 00 00 call 11f65c <__udivdi3> 10fb28: 83 c4 10 add $0x10,%esp 10fb2b: 8b 55 10 mov 0x10(%ebp),%edx 10fb2e: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fb30: 6a 00 push $0x0 10fb32: 68 e8 03 00 00 push $0x3e8 10fb37: 56 push %esi 10fb38: 53 push %ebx 10fb39: e8 2e fc 00 00 call 11f76c <__umoddi3> 10fb3e: 83 c4 10 add $0x10,%esp 10fb41: 8b 55 14 mov 0x14(%ebp),%edx 10fb44: 89 02 mov %eax,(%edx) } 10fb46: 8d 65 f4 lea -0xc(%ebp),%esp 10fb49: 5b pop %ebx 10fb4a: 5e pop %esi 10fb4b: 5f pop %edi 10fb4c: c9 leave 10fb4d: c3 ret 10fb4e: 66 90 xchg %ax,%ax <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fb50: 8b 45 10 mov 0x10(%ebp),%eax 10fb53: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fb59: 8b 55 14 mov 0x14(%ebp),%edx 10fb5c: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fb62: 8d 65 f4 lea -0xc(%ebp),%esp 10fb65: 5b pop %ebx 10fb66: 5e pop %esi 10fb67: 5f pop %edi 10fb68: c9 leave 10fb69: c3 ret =============================================================================== 0010fd14 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10fd14: 55 push %ebp 10fd15: 89 e5 mov %esp,%ebp 10fd17: 8b 55 08 mov 0x8(%ebp),%edx 10fd1a: 8b 45 0c mov 0xc(%ebp),%eax if ( lhs->tv_sec > rhs->tv_sec ) 10fd1d: 8b 08 mov (%eax),%ecx 10fd1f: 39 0a cmp %ecx,(%edx) 10fd21: 7f 11 jg 10fd34 <_Timespec_Greater_than+0x20> return true; if ( lhs->tv_sec < rhs->tv_sec ) 10fd23: 7c 0b jl 10fd30 <_Timespec_Greater_than+0x1c><== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 10fd25: 8b 48 04 mov 0x4(%eax),%ecx 10fd28: 39 4a 04 cmp %ecx,0x4(%edx) 10fd2b: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd2e: c9 leave 10fd2f: c3 ret { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 10fd30: 31 c0 xor %eax,%eax <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd32: c9 leave <== NOT EXECUTED 10fd33: c3 ret <== NOT EXECUTED const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; 10fd34: b0 01 mov $0x1,%al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd36: c9 leave 10fd37: c3 ret =============================================================================== 0010edf0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10edf0: 55 push %ebp 10edf1: 89 e5 mov %esp,%ebp 10edf3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10edf6: 85 c0 test %eax,%eax 10edf8: 74 1a je 10ee14 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10edfa: 8b 10 mov (%eax),%edx 10edfc: 85 d2 test %edx,%edx 10edfe: 78 14 js 10ee14 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10ee00: 8b 40 04 mov 0x4(%eax),%eax 10ee03: 85 c0 test %eax,%eax 10ee05: 78 0d js 10ee14 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10ee07: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10ee0c: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ee0f: c9 leave 10ee10: c3 ret 10ee11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 10ee14: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ee16: c9 leave 10ee17: c3 ret =============================================================================== 0010e1e4 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e1e4: 55 push %ebp 10e1e5: 89 e5 mov %esp,%ebp 10e1e7: 56 push %esi 10e1e8: 53 push %ebx 10e1e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e1ec: 8b 75 0c mov 0xc(%ebp),%esi 10e1ef: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e1f2: 8b 4e 04 mov 0x4(%esi),%ecx 10e1f5: 8b 53 04 mov 0x4(%ebx),%edx 10e1f8: 39 d1 cmp %edx,%ecx 10e1fa: 7c 10 jl 10e20c <_Timespec_Subtract+0x28> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10e1fc: 8b 36 mov (%esi),%esi 10e1fe: 2b 33 sub (%ebx),%esi 10e200: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e202: 29 d1 sub %edx,%ecx 10e204: 89 48 04 mov %ecx,0x4(%eax) } } 10e207: 5b pop %ebx 10e208: 5e pop %esi 10e209: c9 leave 10e20a: c3 ret 10e20b: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e20c: 8b 36 mov (%esi),%esi 10e20e: 4e dec %esi 10e20f: 2b 33 sub (%ebx),%esi 10e211: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e213: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e219: 29 d1 sub %edx,%ecx 10e21b: 89 48 04 mov %ecx,0x4(%eax) } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } } 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: c9 leave 10e221: c3 ret =============================================================================== 0010ee58 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10ee58: 55 push %ebp 10ee59: 89 e5 mov %esp,%ebp 10ee5b: 56 push %esi 10ee5c: 53 push %ebx 10ee5d: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10ee60: 8b 33 mov (%ebx),%esi 10ee62: 85 f6 test %esi,%esi 10ee64: 75 07 jne 10ee6d <_Timespec_To_ticks+0x15> 10ee66: 8b 43 04 mov 0x4(%ebx),%eax 10ee69: 85 c0 test %eax,%eax 10ee6b: 74 37 je 10eea4 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10ee6d: e8 da 24 00 00 call 11134c 10ee72: 89 c1 mov %eax,%ecx 10ee74: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10ee77: a1 2c 32 12 00 mov 0x12322c,%eax 10ee7c: 8d 04 80 lea (%eax,%eax,4),%eax 10ee7f: 8d 04 80 lea (%eax,%eax,4),%eax 10ee82: 8d 34 80 lea (%eax,%eax,4),%esi 10ee85: c1 e6 03 shl $0x3,%esi 10ee88: 8b 43 04 mov 0x4(%ebx),%eax 10ee8b: 31 d2 xor %edx,%edx 10ee8d: f7 f6 div %esi if (ticks) 10ee8f: 01 c8 add %ecx,%eax 10ee91: 74 05 je 10ee98 <_Timespec_To_ticks+0x40> return ticks; return 1; } 10ee93: 5b pop %ebx 10ee94: 5e pop %esi 10ee95: c9 leave 10ee96: c3 ret 10ee97: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 10ee98: b8 01 00 00 00 mov $0x1,%eax } 10ee9d: 5b pop %ebx 10ee9e: 5e pop %esi 10ee9f: c9 leave 10eea0: c3 ret 10eea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 10eea4: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10eea6: 5b pop %ebx 10eea7: 5e pop %esi 10eea8: c9 leave 10eea9: c3 ret =============================================================================== 0010e360 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e360: 55 push %ebp 10e361: 89 e5 mov %esp,%ebp 10e363: 57 push %edi 10e364: 56 push %esi 10e365: 53 push %ebx 10e366: 83 ec 1c sub $0x1c,%esp 10e369: 8b 75 08 mov 0x8(%ebp),%esi 10e36c: 8b 7d 10 mov 0x10(%ebp),%edi 10e36f: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e372: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e378: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e37e: 74 25 je 10e3a5 <_User_extensions_Fatal+0x45><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e380: 0f b6 c0 movzbl %al,%eax 10e383: 89 45 e4 mov %eax,-0x1c(%ebp) 10e386: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e388: 8b 43 30 mov 0x30(%ebx),%eax 10e38b: 85 c0 test %eax,%eax 10e38d: 74 0b je 10e39a <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e38f: 52 push %edx 10e390: 57 push %edi 10e391: ff 75 e4 pushl -0x1c(%ebp) 10e394: 56 push %esi 10e395: ff d0 call *%eax 10e397: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e39a: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e39d: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e3a3: 75 e3 jne 10e388 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e3a5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e3a8: 5b pop %ebx <== NOT EXECUTED 10e3a9: 5e pop %esi <== NOT EXECUTED 10e3aa: 5f pop %edi <== NOT EXECUTED 10e3ab: c9 leave <== NOT EXECUTED 10e3ac: c3 ret <== NOT EXECUTED =============================================================================== 0010e224 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e224: 55 push %ebp 10e225: 89 e5 mov %esp,%ebp 10e227: 57 push %edi 10e228: 56 push %esi 10e229: 53 push %ebx 10e22a: 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; 10e22d: a1 58 12 12 00 mov 0x121258,%eax 10e232: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e235: 8b 35 5c 12 12 00 mov 0x12125c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e23b: c7 05 6c 56 12 00 70 movl $0x125670,0x12566c 10e242: 56 12 00 the_chain->permanent_null = NULL; 10e245: c7 05 70 56 12 00 00 movl $0x0,0x125670 10e24c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e24f: c7 05 74 56 12 00 6c movl $0x12566c,0x125674 10e256: 56 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e259: c7 05 38 54 12 00 3c movl $0x12543c,0x125438 10e260: 54 12 00 the_chain->permanent_null = NULL; 10e263: c7 05 3c 54 12 00 00 movl $0x0,0x12543c 10e26a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e26d: c7 05 40 54 12 00 38 movl $0x125438,0x125440 10e274: 54 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e277: 85 f6 test %esi,%esi 10e279: 74 64 je 10e2df <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e27b: 89 c2 mov %eax,%edx 10e27d: 8d 04 40 lea (%eax,%eax,2),%eax 10e280: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e283: c1 e1 02 shl $0x2,%ecx 10e286: 83 ec 0c sub $0xc,%esp 10e289: 51 push %ecx 10e28a: 89 4d d8 mov %ecx,-0x28(%ebp) 10e28d: e8 c6 04 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10e292: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e294: 31 c0 xor %eax,%eax 10e296: 8b 4d d8 mov -0x28(%ebp),%ecx 10e299: 89 df mov %ebx,%edi 10e29b: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e29d: 83 c4 10 add $0x10,%esp 10e2a0: 8b 45 dc mov -0x24(%ebp),%eax 10e2a3: 85 c0 test %eax,%eax 10e2a5: 74 38 je 10e2df <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e2a7: 89 75 e4 mov %esi,-0x1c(%ebp) 10e2aa: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e2b1: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e2b4: 8d 7b 14 lea 0x14(%ebx),%edi 10e2b7: 8b 75 e4 mov -0x1c(%ebp),%esi 10e2ba: b9 08 00 00 00 mov $0x8,%ecx 10e2bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e2c1: 83 ec 0c sub $0xc,%esp 10e2c4: 53 push %ebx 10e2c5: e8 a2 2a 00 00 call 110d6c <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e2ca: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e2cd: ff 45 e0 incl -0x20(%ebp) 10e2d0: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e2d4: 83 c4 10 add $0x10,%esp 10e2d7: 8b 45 e0 mov -0x20(%ebp),%eax 10e2da: 39 45 dc cmp %eax,-0x24(%ebp) 10e2dd: 77 d5 ja 10e2b4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e2df: 8d 65 f4 lea -0xc(%ebp),%esp 10e2e2: 5b pop %ebx 10e2e3: 5e pop %esi 10e2e4: 5f pop %edi 10e2e5: c9 leave 10e2e6: c3 ret =============================================================================== 0010f89c <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f89c: 55 push %ebp 10f89d: 89 e5 mov %esp,%ebp 10f89f: 53 push %ebx 10f8a0: 83 ec 10 sub $0x10,%esp 10f8a3: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f8a6: 53 push %ebx 10f8a7: e8 70 da ff ff call 10d31c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f8ac: 83 c4 10 add $0x10,%esp 10f8af: 8b 43 24 mov 0x24(%ebx),%eax 10f8b2: 85 c0 test %eax,%eax 10f8b4: 74 12 je 10f8c8 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f8b6: 83 c3 08 add $0x8,%ebx 10f8b9: 89 5d 08 mov %ebx,0x8(%ebp) } 10f8bc: 8b 5d fc mov -0x4(%ebp),%ebx 10f8bf: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f8c0: e9 57 da ff ff jmp 10d31c <_Chain_Extract> 10f8c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10f8c8: 8b 5d fc mov -0x4(%ebp),%ebx 10f8cb: c9 leave 10f8cc: c3 ret =============================================================================== 0010e2e8 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e2e8: 55 push %ebp 10e2e9: 89 e5 mov %esp,%ebp 10e2eb: 56 push %esi 10e2ec: 53 push %ebx 10e2ed: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e2f0: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e2f6: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e2fc: 74 1c je 10e31a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e2fe: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e300: 8b 43 28 mov 0x28(%ebx),%eax 10e303: 85 c0 test %eax,%eax 10e305: 74 09 je 10e310 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e307: 83 ec 0c sub $0xc,%esp 10e30a: 56 push %esi 10e30b: ff d0 call *%eax 10e30d: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e310: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e312: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e318: 75 e6 jne 10e300 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e31a: 8d 65 f8 lea -0x8(%ebp),%esp 10e31d: 5b pop %ebx 10e31e: 5e pop %esi 10e31f: c9 leave 10e320: c3 ret =============================================================================== 0010e3b0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e3b0: 55 push %ebp 10e3b1: 89 e5 mov %esp,%ebp 10e3b3: 56 push %esi 10e3b4: 53 push %ebx 10e3b5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e3b8: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e3be: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e3c4: 74 26 je 10e3ec <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e3c6: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e3c8: 8b 43 14 mov 0x14(%ebx),%eax 10e3cb: 85 c0 test %eax,%eax 10e3cd: 74 13 je 10e3e2 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e3cf: 83 ec 08 sub $0x8,%esp 10e3d2: 56 push %esi 10e3d3: ff 35 d8 56 12 00 pushl 0x1256d8 10e3d9: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e3db: 83 c4 10 add $0x10,%esp 10e3de: 84 c0 test %al,%al 10e3e0: 74 16 je 10e3f8 <_User_extensions_Thread_create+0x48> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e3e2: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e3e4: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e3ea: 75 dc jne 10e3c8 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e3ec: b0 01 mov $0x1,%al } 10e3ee: 8d 65 f8 lea -0x8(%ebp),%esp 10e3f1: 5b pop %ebx 10e3f2: 5e pop %esi 10e3f3: c9 leave 10e3f4: c3 ret 10e3f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e3f8: 31 c0 xor %eax,%eax } } return true; } 10e3fa: 8d 65 f8 lea -0x8(%ebp),%esp 10e3fd: 5b pop %ebx 10e3fe: 5e pop %esi 10e3ff: c9 leave 10e400: c3 ret =============================================================================== 0010e404 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e404: 55 push %ebp 10e405: 89 e5 mov %esp,%ebp 10e407: 56 push %esi 10e408: 53 push %ebx 10e409: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e40c: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e412: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e418: 74 23 je 10e43d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e41a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e41c: 8b 43 20 mov 0x20(%ebx),%eax 10e41f: 85 c0 test %eax,%eax 10e421: 74 0f je 10e432 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e423: 83 ec 08 sub $0x8,%esp 10e426: 56 push %esi 10e427: ff 35 d8 56 12 00 pushl 0x1256d8 10e42d: ff d0 call *%eax 10e42f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e432: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e435: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e43b: 75 df jne 10e41c <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e43d: 8d 65 f8 lea -0x8(%ebp),%esp 10e440: 5b pop %ebx 10e441: 5e pop %esi 10e442: c9 leave 10e443: c3 ret =============================================================================== 0010e324 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 56 push %esi 10e328: 53 push %ebx 10e329: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e32c: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e332: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e338: 74 1d je 10e357 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e33a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e33c: 8b 43 2c mov 0x2c(%ebx),%eax 10e33f: 85 c0 test %eax,%eax 10e341: 74 09 je 10e34c <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e343: 83 ec 0c sub $0xc,%esp 10e346: 56 push %esi 10e347: ff d0 call *%eax 10e349: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e34c: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e34f: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e355: 75 e5 jne 10e33c <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e357: 8d 65 f8 lea -0x8(%ebp),%esp 10e35a: 5b pop %ebx 10e35b: 5e pop %esi 10e35c: c9 leave 10e35d: c3 ret =============================================================================== 0010f004 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f004: 55 push %ebp 10f005: 89 e5 mov %esp,%ebp 10f007: 56 push %esi 10f008: 53 push %ebx 10f009: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f00c: 8b 1d ec 76 12 00 mov 0x1276ec,%ebx 10f012: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10f018: 74 22 je 10f03c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f01a: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10f01c: 8b 43 1c mov 0x1c(%ebx),%eax 10f01f: 85 c0 test %eax,%eax 10f021: 74 0f je 10f032 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f023: 83 ec 08 sub $0x8,%esp 10f026: 56 push %esi 10f027: ff 35 58 77 12 00 pushl 0x127758 10f02d: ff d0 call *%eax 10f02f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f032: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f034: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10f03a: 75 e0 jne 10f01c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f03c: 8d 65 f8 lea -0x8(%ebp),%esp 10f03f: 5b pop %ebx 10f040: 5e pop %esi 10f041: c9 leave 10f042: c3 ret =============================================================================== 0010e444 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e444: 55 push %ebp 10e445: 89 e5 mov %esp,%ebp 10e447: 56 push %esi 10e448: 53 push %ebx 10e449: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e44c: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e452: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e458: 74 22 je 10e47c <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e45a: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10e45c: 8b 43 18 mov 0x18(%ebx),%eax 10e45f: 85 c0 test %eax,%eax 10e461: 74 0f je 10e472 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e463: 83 ec 08 sub $0x8,%esp 10e466: 56 push %esi 10e467: ff 35 d8 56 12 00 pushl 0x1256d8 10e46d: ff d0 call *%eax 10e46f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e472: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e474: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e47a: 75 e0 jne 10e45c <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e47c: 8d 65 f8 lea -0x8(%ebp),%esp 10e47f: 5b pop %ebx 10e480: 5e pop %esi 10e481: c9 leave 10e482: c3 ret =============================================================================== 0010e484 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e484: 55 push %ebp 10e485: 89 e5 mov %esp,%ebp 10e487: 57 push %edi 10e488: 56 push %esi 10e489: 53 push %ebx 10e48a: 83 ec 0c sub $0xc,%esp 10e48d: 8b 7d 08 mov 0x8(%ebp),%edi 10e490: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e493: 8b 1d 38 54 12 00 mov 0x125438,%ebx 10e499: 81 fb 3c 54 12 00 cmp $0x12543c,%ebx 10e49f: 74 18 je 10e4b9 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e4a1: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10e4a4: 83 ec 08 sub $0x8,%esp 10e4a7: 56 push %esi 10e4a8: 57 push %edi 10e4a9: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10e4ac: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e4ae: 83 c4 10 add $0x10,%esp 10e4b1: 81 fb 3c 54 12 00 cmp $0x12543c,%ebx 10e4b7: 75 eb jne 10e4a4 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e4b9: 8d 65 f4 lea -0xc(%ebp),%esp 10e4bc: 5b pop %ebx 10e4bd: 5e pop %esi 10e4be: 5f pop %edi 10e4bf: c9 leave 10e4c0: c3 ret =============================================================================== 0010fe88 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fe88: 55 push %ebp 10fe89: 89 e5 mov %esp,%ebp 10fe8b: 57 push %edi 10fe8c: 56 push %esi 10fe8d: 53 push %ebx 10fe8e: 83 ec 1c sub $0x1c,%esp 10fe91: 8b 75 08 mov 0x8(%ebp),%esi 10fe94: 8b 4d 0c mov 0xc(%ebp),%ecx 10fe97: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fe9a: 9c pushf 10fe9b: fa cli 10fe9c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe9d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fe9f: 8d 7e 04 lea 0x4(%esi),%edi 10fea2: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10fea5: 39 fa cmp %edi,%edx 10fea7: 74 3d je 10fee6 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fea9: 85 c9 test %ecx,%ecx 10feab: 75 43 jne 10fef0 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fead: 85 db test %ebx,%ebx 10feaf: 74 35 je 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10feb1: 8b 7a 10 mov 0x10(%edx),%edi 10feb4: 39 fb cmp %edi,%ebx 10feb6: 73 0f jae 10fec7 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10feb8: eb 3e jmp 10fef8 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10feba: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10febc: 29 fb sub %edi,%ebx 10febe: 74 26 je 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fec0: 8b 7a 10 mov 0x10(%edx),%edi 10fec3: 39 df cmp %ebx,%edi 10fec5: 77 31 ja 10fef8 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fec7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fece: 50 push %eax 10fecf: 9d popf _Watchdog_Tickle( header ); 10fed0: 83 ec 0c sub $0xc,%esp 10fed3: 56 push %esi 10fed4: e8 cb 01 00 00 call 1100a4 <_Watchdog_Tickle> _ISR_Disable( level ); 10fed9: 9c pushf 10feda: fa cli 10fedb: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fedc: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fede: 83 c4 10 add $0x10,%esp 10fee1: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fee4: 75 d6 jne 10febc <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fee6: 50 push %eax 10fee7: 9d popf } 10fee8: 8d 65 f4 lea -0xc(%ebp),%esp 10feeb: 5b pop %ebx 10feec: 5e pop %esi 10feed: 5f pop %edi 10feee: c9 leave 10feef: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fef0: 49 dec %ecx 10fef1: 75 f3 jne 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fef3: 01 5a 10 add %ebx,0x10(%edx) break; 10fef6: eb ee jmp 10fee6 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fef8: 29 df sub %ebx,%edi 10fefa: 89 7a 10 mov %edi,0x10(%edx) break; 10fefd: eb e7 jmp 10fee6 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e4c4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e4c4: 55 push %ebp 10e4c5: 89 e5 mov %esp,%ebp 10e4c7: 57 push %edi 10e4c8: 56 push %esi 10e4c9: 53 push %ebx 10e4ca: 83 ec 04 sub $0x4,%esp 10e4cd: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e4d0: 8b 3d d4 56 12 00 mov 0x1256d4,%edi _ISR_Disable( level ); 10e4d6: 9c pushf 10e4d7: fa cli 10e4d8: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10e4db: 8b 43 08 mov 0x8(%ebx),%eax 10e4de: 85 c0 test %eax,%eax 10e4e0: 0f 85 9e 00 00 00 jne 10e584 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e4e6: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e4ed: a1 80 55 12 00 mov 0x125580,%eax 10e4f2: 40 inc %eax 10e4f3: a3 80 55 12 00 mov %eax,0x125580 restart: delta_interval = the_watchdog->initial; 10e4f8: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e4fb: 8b 4d 08 mov 0x8(%ebp),%ecx 10e4fe: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e500: 85 c0 test %eax,%eax 10e502: 74 5d je 10e561 <_Watchdog_Insert+0x9d> 10e504: 8b 32 mov (%edx),%esi 10e506: 85 f6 test %esi,%esi 10e508: 74 57 je 10e561 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e50a: 8b 4a 10 mov 0x10(%edx),%ecx 10e50d: 39 c8 cmp %ecx,%eax 10e50f: 73 22 jae 10e533 <_Watchdog_Insert+0x6f> 10e511: eb 49 jmp 10e55c <_Watchdog_Insert+0x98> 10e513: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e514: 8b 35 e8 54 12 00 mov 0x1254e8,%esi 10e51a: 39 f7 cmp %esi,%edi 10e51c: 72 72 jb 10e590 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e51e: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e520: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e522: 85 c0 test %eax,%eax 10e524: 74 3b je 10e561 <_Watchdog_Insert+0x9d> 10e526: 8b 0a mov (%edx),%ecx 10e528: 85 c9 test %ecx,%ecx 10e52a: 74 35 je 10e561 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e52c: 8b 4a 10 mov 0x10(%edx),%ecx 10e52f: 39 c1 cmp %eax,%ecx 10e531: 77 29 ja 10e55c <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10e533: ff 75 f0 pushl -0x10(%ebp) 10e536: 9d popf 10e537: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e538: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e53c: 74 d6 je 10e514 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e53e: 89 3d e8 54 12 00 mov %edi,0x1254e8 _Watchdog_Sync_count--; 10e544: a1 80 55 12 00 mov 0x125580,%eax 10e549: 48 dec %eax 10e54a: a3 80 55 12 00 mov %eax,0x125580 _ISR_Enable( level ); 10e54f: ff 75 f0 pushl -0x10(%ebp) 10e552: 9d popf } 10e553: 58 pop %eax 10e554: 5b pop %ebx 10e555: 5e pop %esi 10e556: 5f pop %edi 10e557: c9 leave 10e558: c3 ret 10e559: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e55c: 29 c1 sub %eax,%ecx 10e55e: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e561: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e568: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e56b: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e56e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e571: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e573: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e575: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e577: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e57a: a1 84 55 12 00 mov 0x125584,%eax 10e57f: 89 43 14 mov %eax,0x14(%ebx) 10e582: eb ba jmp 10e53e <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e584: ff 75 f0 pushl -0x10(%ebp) 10e587: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e588: 58 pop %eax 10e589: 5b pop %ebx 10e58a: 5e pop %esi 10e58b: 5f pop %edi 10e58c: c9 leave 10e58d: c3 ret 10e58e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e590: 89 3d e8 54 12 00 mov %edi,0x1254e8 goto restart; 10e596: e9 5d ff ff ff jmp 10e4f8 <_Watchdog_Insert+0x34> =============================================================================== 0010e5fc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e5fc: 55 push %ebp 10e5fd: 89 e5 mov %esp,%ebp 10e5ff: 56 push %esi 10e600: 53 push %ebx 10e601: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e604: 9c pushf 10e605: fa cli 10e606: 59 pop %ecx previous_state = the_watchdog->state; 10e607: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e60a: 83 f8 01 cmp $0x1,%eax 10e60d: 74 4d je 10e65c <_Watchdog_Remove+0x60> 10e60f: 73 0f jae 10e620 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e611: 8b 1d 84 55 12 00 mov 0x125584,%ebx 10e617: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e61a: 51 push %ecx 10e61b: 9d popf return( previous_state ); } 10e61c: 5b pop %ebx 10e61d: 5e pop %esi 10e61e: c9 leave 10e61f: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e620: 83 f8 03 cmp $0x3,%eax 10e623: 77 ec ja 10e611 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e625: 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 ); } 10e62c: 8b 1a mov (%edx),%ebx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e62e: 8b 33 mov (%ebx),%esi 10e630: 85 f6 test %esi,%esi 10e632: 74 06 je 10e63a <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e634: 8b 72 10 mov 0x10(%edx),%esi 10e637: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e63a: 8b 35 80 55 12 00 mov 0x125580,%esi 10e640: 85 f6 test %esi,%esi 10e642: 74 0c je 10e650 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e644: 8b 35 d4 56 12 00 mov 0x1256d4,%esi 10e64a: 89 35 e8 54 12 00 mov %esi,0x1254e8 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e650: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e653: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e656: 89 1e mov %ebx,(%esi) 10e658: eb b7 jmp 10e611 <_Watchdog_Remove+0x15> 10e65a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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; 10e65c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e663: eb ac jmp 10e611 <_Watchdog_Remove+0x15> =============================================================================== 0010fa90 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fa90: 55 push %ebp 10fa91: 89 e5 mov %esp,%ebp 10fa93: 57 push %edi 10fa94: 56 push %esi 10fa95: 53 push %ebx 10fa96: 83 ec 2c sub $0x2c,%esp 10fa99: 8b 55 08 mov 0x8(%ebp),%edx 10fa9c: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fa9f: 8b 78 24 mov 0x24(%eax),%edi 10faa2: 8b 70 20 mov 0x20(%eax),%esi 10faa5: 8b 58 1c mov 0x1c(%eax),%ebx 10faa8: 8b 48 0c mov 0xc(%eax),%ecx 10faab: 89 4d d4 mov %ecx,-0x2c(%ebp) 10faae: 8b 48 10 mov 0x10(%eax),%ecx 10fab1: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fab4: 85 d2 test %edx,%edx 10fab6: 74 2c je 10fae4 <_Watchdog_Report+0x54> 10fab8: b9 83 17 12 00 mov $0x121783,%ecx 10fabd: 83 ec 0c sub $0xc,%esp 10fac0: 57 push %edi 10fac1: 56 push %esi 10fac2: 53 push %ebx 10fac3: 50 push %eax 10fac4: ff 75 d4 pushl -0x2c(%ebp) 10fac7: ff 75 e4 pushl -0x1c(%ebp) 10faca: 51 push %ecx 10facb: 52 push %edx 10facc: 68 e6 21 12 00 push $0x1221e6 10fad1: e8 8e 9f ff ff call 109a64 10fad6: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fad9: 8d 65 f4 lea -0xc(%ebp),%esp 10fadc: 5b pop %ebx 10fadd: 5e pop %esi 10fade: 5f pop %edi 10fadf: c9 leave 10fae0: c3 ret 10fae1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fae4: b9 49 20 12 00 mov $0x122049,%ecx 10fae9: 89 ca mov %ecx,%edx 10faeb: eb d0 jmp 10fabd <_Watchdog_Report+0x2d> =============================================================================== 0010fa20 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fa20: 55 push %ebp 10fa21: 89 e5 mov %esp,%ebp 10fa23: 57 push %edi 10fa24: 56 push %esi 10fa25: 53 push %ebx 10fa26: 83 ec 20 sub $0x20,%esp 10fa29: 8b 7d 08 mov 0x8(%ebp),%edi 10fa2c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fa2f: 9c pushf 10fa30: fa cli 10fa31: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fa34: 56 push %esi 10fa35: 57 push %edi 10fa36: 68 b0 21 12 00 push $0x1221b0 10fa3b: e8 24 a0 ff ff call 109a64 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fa40: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fa42: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fa45: 83 c4 10 add $0x10,%esp 10fa48: 39 f3 cmp %esi,%ebx 10fa4a: 74 31 je 10fa7d <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fa4c: 83 ec 08 sub $0x8,%esp 10fa4f: 53 push %ebx 10fa50: 6a 00 push $0x0 10fa52: e8 39 00 00 00 call 10fa90 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10fa57: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10fa59: 83 c4 10 add $0x10,%esp 10fa5c: 39 f3 cmp %esi,%ebx 10fa5e: 75 ec jne 10fa4c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fa60: 83 ec 08 sub $0x8,%esp 10fa63: 57 push %edi 10fa64: 68 c7 21 12 00 push $0x1221c7 10fa69: e8 f6 9f ff ff call 109a64 10fa6e: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fa71: ff 75 e4 pushl -0x1c(%ebp) 10fa74: 9d popf } 10fa75: 8d 65 f4 lea -0xc(%ebp),%esp 10fa78: 5b pop %ebx 10fa79: 5e pop %esi 10fa7a: 5f pop %edi 10fa7b: c9 leave 10fa7c: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fa7d: 83 ec 0c sub $0xc,%esp 10fa80: 68 d6 21 12 00 push $0x1221d6 10fa85: e8 da 9f ff ff call 109a64 10fa8a: 83 c4 10 add $0x10,%esp 10fa8d: eb e2 jmp 10fa71 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e668 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e668: 55 push %ebp 10e669: 89 e5 mov %esp,%ebp 10e66b: 57 push %edi 10e66c: 56 push %esi 10e66d: 53 push %ebx 10e66e: 83 ec 1c sub $0x1c,%esp 10e671: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10e674: 9c pushf 10e675: fa cli 10e676: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e677: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e679: 8d 47 04 lea 0x4(%edi),%eax 10e67c: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e67f: 39 c3 cmp %eax,%ebx 10e681: 74 11 je 10e694 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10e683: 8b 43 10 mov 0x10(%ebx),%eax 10e686: 85 c0 test %eax,%eax 10e688: 74 34 je 10e6be <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e68a: 48 dec %eax 10e68b: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e68e: 85 c0 test %eax,%eax 10e690: 74 2c je 10e6be <_Watchdog_Tickle+0x56> 10e692: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e694: 56 push %esi 10e695: 9d popf } 10e696: 8d 65 f4 lea -0xc(%ebp),%esp 10e699: 5b pop %ebx 10e69a: 5e pop %esi 10e69b: 5f pop %edi 10e69c: c9 leave 10e69d: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e69e: 83 ec 08 sub $0x8,%esp 10e6a1: ff 73 24 pushl 0x24(%ebx) 10e6a4: ff 73 20 pushl 0x20(%ebx) 10e6a7: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e6aa: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e6ad: 9c pushf 10e6ae: fa cli 10e6af: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e6b0: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e6b2: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e6b5: 74 dd je 10e694 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e6b7: 8b 43 10 mov 0x10(%ebx),%eax 10e6ba: 85 c0 test %eax,%eax 10e6bc: 75 d6 jne 10e694 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e6be: 83 ec 0c sub $0xc,%esp 10e6c1: 53 push %ebx 10e6c2: e8 35 ff ff ff call 10e5fc <_Watchdog_Remove> _ISR_Enable( level ); 10e6c7: 56 push %esi 10e6c8: 9d popf switch( watchdog_state ) { 10e6c9: 83 c4 10 add $0x10,%esp 10e6cc: 83 f8 02 cmp $0x2,%eax 10e6cf: 75 dc jne 10e6ad <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e6d1: eb cb jmp 10e69e <_Watchdog_Tickle+0x36> =============================================================================== 0010e6d4 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e6d4: 55 push %ebp 10e6d5: 89 e5 mov %esp,%ebp 10e6d7: 57 push %edi 10e6d8: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e6d9: 8b 1d 20 12 12 00 mov 0x121220,%ebx uintptr_t size = Configuration.work_space_size; 10e6df: 8b 15 24 12 12 00 mov 0x121224,%edx if ( Configuration.do_zero_of_workspace ) 10e6e5: 80 3d 48 12 12 00 00 cmpb $0x0,0x121248 10e6ec: 75 1e jne 10e70c <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e6ee: 6a 04 push $0x4 10e6f0: 52 push %edx 10e6f1: 53 push %ebx 10e6f2: 68 60 54 12 00 push $0x125460 10e6f7: e8 f8 de ff ff call 10c5f4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e6fc: 83 c4 10 add $0x10,%esp 10e6ff: 85 c0 test %eax,%eax 10e701: 74 13 je 10e716 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e703: 8d 65 f8 lea -0x8(%ebp),%esp 10e706: 5b pop %ebx 10e707: 5f pop %edi 10e708: c9 leave 10e709: c3 ret 10e70a: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e70c: 31 c0 xor %eax,%eax 10e70e: 89 df mov %ebx,%edi 10e710: 89 d1 mov %edx,%ecx 10e712: f3 aa rep stos %al,%es:(%edi) 10e714: eb d8 jmp 10e6ee <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e716: 50 push %eax 10e717: 6a 02 push $0x2 10e719: 6a 01 push $0x1 10e71b: 6a 00 push $0x0 10e71d: e8 da e0 ff ff call 10c7fc <_Internal_error_Occurred> =============================================================================== 00122e40 <__kill>: #endif int __kill( pid_t pid, int sig ) { 122e40: 55 push %ebp <== NOT EXECUTED 122e41: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 122e43: 31 c0 xor %eax,%eax <== NOT EXECUTED 122e45: c9 leave <== NOT EXECUTED 122e46: c3 ret <== NOT EXECUTED =============================================================================== 00108184 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 108184: 55 push %ebp <== NOT EXECUTED 108185: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108187: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10818a: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10818b: e9 80 ff ff ff jmp 108110 <== NOT EXECUTED =============================================================================== 0010c47c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10c47c: 55 push %ebp 10c47d: 89 e5 mov %esp,%ebp 10c47f: 57 push %edi 10c480: 56 push %esi 10c481: 53 push %ebx 10c482: 83 ec 78 sub $0x78,%esp 10c485: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10c488: 53 push %ebx 10c489: e8 52 ea ff ff call 10aee0 if ( old_parent_pathlen == 0 ) 10c48e: 83 c4 10 add $0x10,%esp 10c491: 85 c0 test %eax,%eax 10c493: 0f 85 57 01 00 00 jne 10c5f0 <_rename_r+0x174> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10c499: 52 push %edx 10c49a: 8d 45 b8 lea -0x48(%ebp),%eax 10c49d: 89 45 94 mov %eax,-0x6c(%ebp) 10c4a0: 50 push %eax 10c4a1: 8d 45 e4 lea -0x1c(%ebp),%eax 10c4a4: 50 push %eax 10c4a5: 53 push %ebx 10c4a6: e8 e1 03 00 00 call 10c88c 10c4ab: 83 c4 10 add $0x10,%esp 10c4ae: 31 d2 xor %edx,%edx rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 10c4b0: c6 45 93 00 movb $0x0,-0x6d(%ebp) /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10c4b4: 8d 7d cc lea -0x34(%ebp),%edi 10c4b7: b9 05 00 00 00 mov $0x5,%ecx 10c4bc: 8b 75 94 mov -0x6c(%ebp),%esi 10c4bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10c4c1: 01 d3 add %edx,%ebx 10c4c3: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10c4c6: be ff ff ff ff mov $0xffffffff,%esi 10c4cb: 89 f1 mov %esi,%ecx 10c4cd: 89 df mov %ebx,%edi 10c4cf: 31 c0 xor %eax,%eax 10c4d1: f2 ae repnz scas %es:(%edi),%al 10c4d3: f7 d1 not %ecx 10c4d5: 49 dec %ecx 10c4d6: 83 ec 08 sub $0x8,%esp 10c4d9: 51 push %ecx 10c4da: 53 push %ebx 10c4db: e8 44 ea ff ff call 10af24 10c4e0: 01 c3 add %eax,%ebx 10c4e2: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10c4e5: 89 f1 mov %esi,%ecx 10c4e7: 89 df mov %ebx,%edi 10c4e9: 31 c0 xor %eax,%eax 10c4eb: f2 ae repnz scas %es:(%edi),%al 10c4ed: f7 d1 not %ecx 10c4ef: 49 dec %ecx 10c4f0: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c4f7: 8d 75 cc lea -0x34(%ebp),%esi 10c4fa: 56 push %esi 10c4fb: 6a 00 push $0x0 10c4fd: 51 push %ecx 10c4fe: 53 push %ebx 10c4ff: e8 30 e9 ff ff call 10ae34 0, &old_loc, false ); if ( result != 0 ) { 10c504: 83 c4 20 add $0x20,%esp 10c507: 85 c0 test %eax,%eax 10c509: 0f 85 c9 00 00 00 jne 10c5d8 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10c50f: 50 push %eax 10c510: 8d 5d a4 lea -0x5c(%ebp),%ebx 10c513: 53 push %ebx 10c514: 8d 45 e4 lea -0x1c(%ebp),%eax 10c517: 50 push %eax 10c518: ff 75 10 pushl 0x10(%ebp) 10c51b: e8 6c 03 00 00 call 10c88c result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10c520: 83 c4 0c add $0xc,%esp 10c523: 8d 45 e0 lea -0x20(%ebp),%eax 10c526: 50 push %eax 10c527: 53 push %ebx 10c528: 8b 45 10 mov 0x10(%ebp),%eax 10c52b: 03 45 e4 add -0x1c(%ebp),%eax 10c52e: 50 push %eax 10c52f: 8b 45 b0 mov -0x50(%ebp),%eax 10c532: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10c535: 83 c4 10 add $0x10,%esp 10c538: 85 c0 test %eax,%eax 10c53a: 0f 85 e0 00 00 00 jne 10c620 <_rename_r+0x1a4> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 10c540: 8b 45 b4 mov -0x4c(%ebp),%eax 10c543: 39 45 c8 cmp %eax,-0x38(%ebp) 10c546: 75 48 jne 10c590 <_rename_r+0x114> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10c548: ff 75 e0 pushl -0x20(%ebp) 10c54b: 53 push %ebx 10c54c: 56 push %esi 10c54d: ff 75 94 pushl -0x6c(%ebp) 10c550: 8b 45 b0 mov -0x50(%ebp),%eax 10c553: ff 50 40 call *0x40(%eax) 10c556: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 10c558: 89 1c 24 mov %ebx,(%esp) 10c55b: e8 f0 eb ff ff call 10b150 if ( free_old_parentloc ) 10c560: 83 c4 10 add $0x10,%esp 10c563: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c567: 75 17 jne 10c580 <_rename_r+0x104> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 10c569: 83 ec 0c sub $0xc,%esp 10c56c: 56 push %esi 10c56d: e8 de eb ff ff call 10b150 return result; 10c572: 83 c4 10 add $0x10,%esp } 10c575: 89 f8 mov %edi,%eax 10c577: 8d 65 f4 lea -0xc(%ebp),%esp 10c57a: 5b pop %ebx 10c57b: 5e pop %esi 10c57c: 5f pop %edi 10c57d: c9 leave 10c57e: c3 ret 10c57f: 90 nop <== NOT EXECUTED result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 10c580: 83 ec 0c sub $0xc,%esp 10c583: ff 75 94 pushl -0x6c(%ebp) 10c586: e8 c5 eb ff ff call 10b150 10c58b: 83 c4 10 add $0x10,%esp 10c58e: eb d9 jmp 10c569 <_rename_r+0xed> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 10c590: 83 ec 0c sub $0xc,%esp 10c593: 53 push %ebx 10c594: e8 b7 eb ff ff call 10b150 if ( free_old_parentloc ) 10c599: 83 c4 10 add $0x10,%esp 10c59c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c5a0: 74 0e je 10c5b0 <_rename_r+0x134> rtems_filesystem_freenode( &old_parent_loc ); 10c5a2: 83 ec 0c sub $0xc,%esp 10c5a5: ff 75 94 pushl -0x6c(%ebp) 10c5a8: e8 a3 eb ff ff call 10b150 10c5ad: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c5b0: 83 ec 0c sub $0xc,%esp 10c5b3: 56 push %esi 10c5b4: e8 97 eb ff ff call 10b150 rtems_set_errno_and_return_minus_one( EXDEV ); 10c5b9: e8 22 99 00 00 call 115ee0 <__errno> 10c5be: c7 00 12 00 00 00 movl $0x12,(%eax) 10c5c4: 83 c4 10 add $0x10,%esp 10c5c7: bf ff ff ff ff mov $0xffffffff,%edi if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c5cc: 89 f8 mov %edi,%eax 10c5ce: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d1: 5b pop %ebx 10c5d2: 5e pop %esi 10c5d3: 5f pop %edi 10c5d4: c9 leave 10c5d5: c3 ret 10c5d6: 66 90 xchg %ax,%ax <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 10c5d8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c5dc: 75 78 jne 10c656 <_rename_r+0x1da> <== ALWAYS TAKEN rtems_filesystem_freenode( &old_parent_loc ); return -1; 10c5de: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c5e3: 89 f8 mov %edi,%eax <== NOT EXECUTED 10c5e5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c5e8: 5b pop %ebx <== NOT EXECUTED 10c5e9: 5e pop %esi <== NOT EXECUTED 10c5ea: 5f pop %edi <== NOT EXECUTED 10c5eb: c9 leave <== NOT EXECUTED 10c5ec: c3 ret <== NOT EXECUTED 10c5ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 10c5f0: 89 c2 mov %eax,%edx 10c5f2: 83 ec 0c sub $0xc,%esp 10c5f5: 6a 00 push $0x0 10c5f7: 8d 45 b8 lea -0x48(%ebp),%eax 10c5fa: 89 45 94 mov %eax,-0x6c(%ebp) 10c5fd: 50 push %eax 10c5fe: 6a 02 push $0x2 10c600: 52 push %edx 10c601: 53 push %ebx 10c602: 89 55 8c mov %edx,-0x74(%ebp) 10c605: e8 92 e8 ff ff call 10ae9c RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10c60a: 83 c4 20 add $0x20,%esp 10c60d: 85 c0 test %eax,%eax 10c60f: 8b 55 8c mov -0x74(%ebp),%edx 10c612: 75 ca jne 10c5de <_rename_r+0x162> <== NEVER TAKEN return -1; free_old_parentloc = true; 10c614: c6 45 93 01 movb $0x1,-0x6d(%ebp) 10c618: e9 97 fe ff ff jmp 10c4b4 <_rename_r+0x38> 10c61d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 10c620: 83 ec 0c sub $0xc,%esp 10c623: 53 push %ebx 10c624: e8 27 eb ff ff call 10b150 if ( free_old_parentloc ) 10c629: 83 c4 10 add $0x10,%esp 10c62c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c630: 74 0e je 10c640 <_rename_r+0x1c4> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c632: 83 ec 0c sub $0xc,%esp 10c635: ff 75 94 pushl -0x6c(%ebp) 10c638: e8 13 eb ff ff call 10b150 10c63d: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c640: 83 ec 0c sub $0xc,%esp 10c643: 56 push %esi 10c644: e8 07 eb ff ff call 10b150 return -1; 10c649: 83 c4 10 add $0x10,%esp 10c64c: bf ff ff ff ff mov $0xffffffff,%edi 10c651: e9 1f ff ff ff jmp 10c575 <_rename_r+0xf9> result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 10c656: 83 ec 0c sub $0xc,%esp 10c659: ff 75 94 pushl -0x6c(%ebp) 10c65c: e8 ef ea ff ff call 10b150 10c661: 83 c4 10 add $0x10,%esp return -1; 10c664: bf ff ff ff ff mov $0xffffffff,%edi 10c669: e9 07 ff ff ff jmp 10c575 <_rename_r+0xf9> =============================================================================== 0010ad4c <_times>: #endif clock_t _times( struct tms *ptms ) { 10ad4c: 55 push %ebp 10ad4d: 89 e5 mov %esp,%ebp 10ad4f: 56 push %esi 10ad50: 53 push %ebx 10ad51: 83 ec 10 sub $0x10,%esp 10ad54: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_interval ticks; if ( !ptms ) 10ad57: 85 db test %ebx,%ebx 10ad59: 74 75 je 10add0 <_times+0x84> /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 10ad5b: e8 88 04 00 00 call 10b1e8 10ad60: 89 c6 mov %eax,%esi { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 10ad62: 8b 0d 2c 23 12 00 mov 0x12232c,%ecx 10ad68: ba 83 de 1b 43 mov $0x431bde83,%edx 10ad6d: 89 c8 mov %ecx,%eax 10ad6f: f7 e2 mul %edx 10ad71: c1 ea 12 shr $0x12,%edx 10ad74: 89 55 e8 mov %edx,-0x18(%ebp) 10ad77: 8d 04 89 lea (%ecx,%ecx,4),%eax 10ad7a: 8d 04 80 lea (%eax,%eax,4),%eax 10ad7d: 8d 04 80 lea (%eax,%eax,4),%eax 10ad80: c1 e0 03 shl $0x3,%eax 10ad83: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10ad88: 31 d2 xor %edx,%edx 10ad8a: f7 f1 div %ecx 10ad8c: 89 55 ec mov %edx,-0x14(%ebp) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 10ad8f: 8d 45 f0 lea -0x10(%ebp),%eax 10ad92: 50 push %eax 10ad93: 8d 45 f4 lea -0xc(%ebp),%eax 10ad96: 50 push %eax 10ad97: 8d 45 e8 lea -0x18(%ebp),%eax 10ad9a: 50 push %eax 10ad9b: a1 d8 67 12 00 mov 0x1267d8,%eax 10ada0: 05 84 00 00 00 add $0x84,%eax 10ada5: 50 push %eax 10ada6: e8 51 36 00 00 call 10e3fc <_Timespec_Divide> &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 10adab: 8b 45 f4 mov -0xc(%ebp),%eax 10adae: 89 03 mov %eax,(%ebx) } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 10adb0: 89 73 04 mov %esi,0x4(%ebx) ptms->tms_cutime = 0; 10adb3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) ptms->tms_cstime = 0; 10adba: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return ticks; 10adc1: 83 c4 10 add $0x10,%esp } 10adc4: 89 f0 mov %esi,%eax 10adc6: 8d 65 f8 lea -0x8(%ebp),%esp 10adc9: 5b pop %ebx 10adca: 5e pop %esi 10adcb: c9 leave 10adcc: c3 ret 10adcd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 10add0: e8 ab 77 00 00 call 112580 <__errno> 10add5: c7 00 0e 00 00 00 movl $0xe,(%eax) 10addb: be ff ff ff ff mov $0xffffffff,%esi ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 10ade0: 89 f0 mov %esi,%eax 10ade2: 8d 65 f8 lea -0x8(%ebp),%esp 10ade5: 5b pop %ebx 10ade6: 5e pop %esi 10ade7: c9 leave 10ade8: c3 ret =============================================================================== 00109b0c : int access( const char *path, int amode ) { 109b0c: 55 push %ebp 109b0d: 89 e5 mov %esp,%ebp 109b0f: 53 push %ebx 109b10: 83 ec 5c sub $0x5c,%esp 109b13: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 109b16: 8d 45 b0 lea -0x50(%ebp),%eax 109b19: 50 push %eax 109b1a: ff 75 08 pushl 0x8(%ebp) 109b1d: e8 42 17 00 00 call 10b264 109b22: 83 c4 10 add $0x10,%esp 109b25: 85 c0 test %eax,%eax 109b27: 75 1f jne 109b48 return -1; if ( amode & R_OK ) { 109b29: f6 c3 04 test $0x4,%bl 109b2c: 75 26 jne 109b54 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 109b2e: f6 c3 02 test $0x2,%bl 109b31: 75 0d jne 109b40 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 109b33: 83 e3 01 and $0x1,%ebx 109b36: 75 24 jne 109b5c if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; 109b38: 31 c0 xor %eax,%eax } 109b3a: 8b 5d fc mov -0x4(%ebp),%ebx 109b3d: c9 leave 109b3e: c3 ret 109b3f: 90 nop <== NOT EXECUTED if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 109b40: f6 45 bc 80 testb $0x80,-0x44(%ebp) 109b44: 75 ed jne 109b33 109b46: 66 90 xchg %ax,%ax return -1; 109b48: b8 ff ff ff ff mov $0xffffffff,%eax if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 109b4d: 8b 5d fc mov -0x4(%ebp),%ebx 109b50: c9 leave 109b51: c3 ret 109b52: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 109b54: f6 45 bd 01 testb $0x1,-0x43(%ebp) 109b58: 75 d4 jne 109b2e 109b5a: eb ec jmp 109b48 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109b5c: 8b 45 bc mov -0x44(%ebp),%eax 109b5f: 83 e0 40 and $0x40,%eax return -1; } return 0; 109b62: 83 f8 01 cmp $0x1,%eax 109b65: 19 c0 sbb %eax,%eax 109b67: eb d1 jmp 109b3a =============================================================================== 001092d0 : int cfsetospeed( struct termios *tp, speed_t speed ) { 1092d0: 55 push %ebp 1092d1: 89 e5 mov %esp,%ebp 1092d3: 83 ec 08 sub $0x8,%esp 1092d6: 8b 4d 08 mov 0x8(%ebp),%ecx 1092d9: 8b 55 0c mov 0xc(%ebp),%edx if ( speed & ~CBAUD ) 1092dc: f7 c2 f0 ef ff ff test $0xffffeff0,%edx 1092e2: 75 14 jne 1092f8 rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 1092e4: 8b 41 08 mov 0x8(%ecx),%eax 1092e7: 25 f0 ef ff ff and $0xffffeff0,%eax 1092ec: 09 d0 or %edx,%eax 1092ee: 89 41 08 mov %eax,0x8(%ecx) return 0; 1092f1: 31 c0 xor %eax,%eax } 1092f3: c9 leave 1092f4: c3 ret 1092f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 1092f8: e8 1b ab 00 00 call 113e18 <__errno> 1092fd: c7 00 16 00 00 00 movl $0x16,(%eax) 109303: b8 ff ff ff ff mov $0xffffffff,%eax tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 109308: c9 leave 109309: c3 ret =============================================================================== 001103f0 : #include int chdir( const char *pathname ) { 1103f0: 55 push %ebp 1103f1: 89 e5 mov %esp,%ebp 1103f3: 57 push %edi 1103f4: 56 push %esi 1103f5: 83 ec 20 sub $0x20,%esp 1103f8: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 1103fb: 85 d2 test %edx,%edx 1103fd: 74 75 je 110474 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1103ff: 31 c0 xor %eax,%eax 110401: b9 ff ff ff ff mov $0xffffffff,%ecx 110406: 89 d7 mov %edx,%edi 110408: f2 ae repnz scas %es:(%edi),%al 11040a: f7 d1 not %ecx 11040c: 49 dec %ecx 11040d: 83 ec 0c sub $0xc,%esp 110410: 6a 01 push $0x1 110412: 8d 75 e4 lea -0x1c(%ebp),%esi 110415: 56 push %esi 110416: 6a 01 push $0x1 110418: 51 push %ecx 110419: 52 push %edx 11041a: e8 b9 7f ff ff call 1083d8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 11041f: 83 c4 20 add $0x20,%esp 110422: 85 c0 test %eax,%eax 110424: 74 0e je 110434 return -1; 110426: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 11042b: 8d 65 f8 lea -0x8(%ebp),%esp 11042e: 5e pop %esi 11042f: 5f pop %edi 110430: c9 leave 110431: c3 ret 110432: 66 90 xchg %ax,%ax <== NOT EXECUTED return -1; /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 110434: 83 ec 0c sub $0xc,%esp 110437: 56 push %esi 110438: 8b 45 f0 mov -0x10(%ebp),%eax 11043b: ff 50 10 call *0x10(%eax) 11043e: 83 c4 10 add $0x10,%esp 110441: 48 dec %eax 110442: 75 48 jne 11048c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 110444: 83 ec 0c sub $0xc,%esp 110447: a1 30 41 12 00 mov 0x124130,%eax 11044c: 83 c0 04 add $0x4,%eax 11044f: 50 push %eax 110450: e8 5b 80 ff ff call 1084b0 rtems_filesystem_current = loc; 110455: 8b 3d 30 41 12 00 mov 0x124130,%edi 11045b: 83 c7 04 add $0x4,%edi 11045e: b9 05 00 00 00 mov $0x5,%ecx 110463: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 110465: 83 c4 10 add $0x10,%esp 110468: 31 c0 xor %eax,%eax } 11046a: 8d 65 f8 lea -0x8(%ebp),%esp 11046d: 5e pop %esi 11046e: 5f pop %edi 11046f: c9 leave 110470: c3 ret 110471: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 110474: e8 c3 26 00 00 call 112b3c <__errno> 110479: c7 00 0e 00 00 00 movl $0xe,(%eax) 11047f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 110484: 8d 65 f8 lea -0x8(%ebp),%esp 110487: 5e pop %esi 110488: 5f pop %edi 110489: c9 leave 11048a: c3 ret 11048b: 90 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 11048c: 83 ec 0c sub $0xc,%esp 11048f: 56 push %esi 110490: e8 1b 80 ff ff call 1084b0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 110495: e8 a2 26 00 00 call 112b3c <__errno> 11049a: c7 00 14 00 00 00 movl $0x14,(%eax) 1104a0: 83 c4 10 add $0x10,%esp 1104a3: b8 ff ff ff ff mov $0xffffffff,%eax 1104a8: eb 81 jmp 11042b =============================================================================== 001096e8 : int chmod( const char *path, mode_t mode ) { 1096e8: 55 push %ebp 1096e9: 89 e5 mov %esp,%ebp 1096eb: 57 push %edi 1096ec: 53 push %ebx 1096ed: 83 ec 3c sub $0x3c,%esp 1096f0: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 1096f3: 31 c0 xor %eax,%eax 1096f5: b9 ff ff ff ff mov $0xffffffff,%ecx 1096fa: 89 d7 mov %edx,%edi 1096fc: f2 ae repnz scas %es:(%edi),%al 1096fe: f7 d1 not %ecx 109700: 49 dec %ecx 109701: 6a 01 push $0x1 109703: 8d 5d e4 lea -0x1c(%ebp),%ebx 109706: 53 push %ebx 109707: 6a 00 push $0x0 109709: 51 push %ecx 10970a: 52 push %edx 10970b: e8 30 01 00 00 call 109840 if ( status != 0 ) 109710: 83 c4 20 add $0x20,%esp 109713: 85 c0 test %eax,%eax 109715: 74 0d je 109724 return -1; 109717: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 10971c: 8d 65 f8 lea -0x8(%ebp),%esp 10971f: 5b pop %ebx 109720: 5f pop %edi 109721: c9 leave 109722: c3 ret 109723: 90 nop <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; result = (*loc.handlers->fchmod_h)( &loc, mode ); 109724: 83 ec 08 sub $0x8,%esp 109727: ff 75 0c pushl 0xc(%ebp) 10972a: 53 push %ebx 10972b: 8b 45 ec mov -0x14(%ebp),%eax 10972e: ff 50 1c call *0x1c(%eax) rtems_filesystem_freenode( &loc ); 109731: 89 1c 24 mov %ebx,(%esp) 109734: 89 45 d4 mov %eax,-0x2c(%ebp) 109737: e8 dc 01 00 00 call 109918 return result; 10973c: 83 c4 10 add $0x10,%esp 10973f: 8b 45 d4 mov -0x2c(%ebp),%eax } 109742: 8d 65 f8 lea -0x8(%ebp),%esp 109745: 5b pop %ebx 109746: 5f pop %edi 109747: c9 leave 109748: c3 ret =============================================================================== 00108240 : #include int chroot( const char *pathname ) { 108240: 55 push %ebp 108241: 89 e5 mov %esp,%ebp 108243: 57 push %edi 108244: 56 push %esi 108245: 83 ec 20 sub $0x20,%esp int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 108248: 81 3d 30 41 12 00 20 cmpl $0x126320,0x124130 10824f: 63 12 00 108252: 74 60 je 1082b4 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 108254: 83 ec 0c sub $0xc,%esp 108257: ff 75 08 pushl 0x8(%ebp) 10825a: e8 91 81 00 00 call 1103f0 if (result) { 10825f: 83 c4 10 add $0x10,%esp 108262: 85 c0 test %eax,%eax 108264: 75 72 jne 1082d8 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108266: 83 ec 0c sub $0xc,%esp 108269: 6a 00 push $0x0 10826b: 8d 75 e4 lea -0x1c(%ebp),%esi 10826e: 56 push %esi 10826f: 6a 00 push $0x0 108271: 6a 01 push $0x1 108273: 68 f6 08 12 00 push $0x1208f6 108278: e8 5b 01 00 00 call 1083d8 10827d: 83 c4 20 add $0x20,%esp 108280: 85 c0 test %eax,%eax 108282: 75 54 jne 1082d8 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 108284: 83 ec 0c sub $0xc,%esp 108287: a1 30 41 12 00 mov 0x124130,%eax 10828c: 83 c0 18 add $0x18,%eax 10828f: 50 push %eax 108290: e8 1b 02 00 00 call 1084b0 rtems_filesystem_root = loc; 108295: 8b 3d 30 41 12 00 mov 0x124130,%edi 10829b: 83 c7 18 add $0x18,%edi 10829e: b9 05 00 00 00 mov $0x5,%ecx 1082a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1082a5: 83 c4 10 add $0x10,%esp 1082a8: 31 c0 xor %eax,%eax } 1082aa: 8d 65 f8 lea -0x8(%ebp),%esp 1082ad: 5e pop %esi 1082ae: 5f pop %edi 1082af: c9 leave 1082b0: c3 ret 1082b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 1082b4: e8 a7 12 00 00 call 109560 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1082b9: 81 3d 30 41 12 00 20 cmpl $0x126320,0x124130 1082c0: 63 12 00 1082c3: 75 8f jne 108254 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1082c5: e8 72 a8 00 00 call 112b3c <__errno> 1082ca: c7 00 86 00 00 00 movl $0x86,(%eax) 1082d0: 83 c8 ff or $0xffffffff,%eax 1082d3: eb d5 jmp 1082aa 1082d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 1082d8: e8 5f a8 00 00 call 112b3c <__errno> 1082dd: 89 c6 mov %eax,%esi 1082df: e8 58 a8 00 00 call 112b3c <__errno> 1082e4: 8b 00 mov (%eax),%eax 1082e6: 89 06 mov %eax,(%esi) 1082e8: b8 ff ff ff ff mov $0xffffffff,%eax 1082ed: eb bb jmp 1082aa =============================================================================== 0010f974 : #include int close( int fd ) { 10f974: 55 push %ebp 10f975: 89 e5 mov %esp,%ebp 10f977: 53 push %ebx 10f978: 83 ec 14 sub $0x14,%esp 10f97b: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10f97e: 3b 05 4c 11 12 00 cmp 0x12114c,%eax 10f984: 73 46 jae 10f9cc iop = rtems_libio_iop(fd); 10f986: c1 e0 03 shl $0x3,%eax 10f989: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10f990: 29 c3 sub %eax,%ebx 10f992: 03 1d c0 52 12 00 add 0x1252c0,%ebx rtems_libio_check_is_open(iop); 10f998: f6 43 15 01 testb $0x1,0x15(%ebx) 10f99c: 74 2e je 10f9cc rc = RTEMS_SUCCESSFUL; rc = (*iop->pathinfo.handlers->close_h)( iop ); 10f99e: 83 ec 0c sub $0xc,%esp 10f9a1: 8b 43 20 mov 0x20(%ebx),%eax 10f9a4: 53 push %ebx 10f9a5: ff 50 04 call *0x4(%eax) rtems_filesystem_freenode( &iop->pathinfo ); 10f9a8: 8d 53 18 lea 0x18(%ebx),%edx 10f9ab: 89 14 24 mov %edx,(%esp) 10f9ae: 89 45 f4 mov %eax,-0xc(%ebp) 10f9b1: e8 ca 86 ff ff call 108080 rtems_libio_free( iop ); 10f9b6: 89 1c 24 mov %ebx,(%esp) 10f9b9: e8 06 02 00 00 call 10fbc4 return rc; 10f9be: 83 c4 10 add $0x10,%esp 10f9c1: 8b 45 f4 mov -0xc(%ebp),%eax } 10f9c4: 8b 5d fc mov -0x4(%ebp),%ebx 10f9c7: c9 leave 10f9c8: c3 ret 10f9c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 10f9cc: e8 df 28 00 00 call 1122b0 <__errno> 10f9d1: c7 00 09 00 00 00 movl $0x9,(%eax) 10f9d7: b8 ff ff ff ff mov $0xffffffff,%eax 10f9dc: eb e6 jmp 10f9c4 =============================================================================== 001081dc : static char *ctermid_name = "/dev/console"; char *ctermid( char *s ) { 1081dc: 55 push %ebp 1081dd: 89 e5 mov %esp,%ebp 1081df: 57 push %edi 1081e0: 56 push %esi 1081e1: 8b 45 08 mov 0x8(%ebp),%eax if ( !s ) 1081e4: 85 c0 test %eax,%eax 1081e6: 74 14 je 1081fc /* * We have no way of knowing the length of the user provided buffer. * It may not be large enough but there is no way to know that. :( * So this is a potential buffer owerrun that we can do nothing about. */ strcpy( s, ctermid_name ); 1081e8: be 63 c6 11 00 mov $0x11c663,%esi 1081ed: b9 0d 00 00 00 mov $0xd,%ecx 1081f2: 89 c7 mov %eax,%edi 1081f4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) return s; } 1081f6: 5e pop %esi 1081f7: 5f pop %edi 1081f8: c9 leave 1081f9: c3 ret 1081fa: 66 90 xchg %ax,%ax <== NOT EXECUTED char *ctermid( char *s ) { if ( !s ) return ctermid_name; 1081fc: b8 63 c6 11 00 mov $0x11c663,%eax * It may not be large enough but there is no way to know that. :( * So this is a potential buffer owerrun that we can do nothing about. */ strcpy( s, ctermid_name ); return s; } 108201: 5e pop %esi 108202: 5f pop %edi 108203: c9 leave 108204: c3 ret =============================================================================== 0010ec08 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10ec08: 55 push %ebp 10ec09: 89 e5 mov %esp,%ebp 10ec0b: 57 push %edi 10ec0c: 56 push %esi 10ec0d: 53 push %ebx 10ec0e: 83 ec 1c sub $0x1c,%esp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10ec11: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10ec18: 0f 85 96 00 00 00 jne 10ecb4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ec1e: 8b 45 14 mov 0x14(%ebp),%eax 10ec21: 8b 00 mov (%eax),%eax 10ec23: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ec26: 85 c0 test %eax,%eax 10ec28: 0f 84 98 00 00 00 je 10ecc6 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ec2e: 8b 15 50 f1 11 00 mov 0x11f150,%edx 10ec34: 89 55 e0 mov %edx,-0x20(%ebp) 10ec37: 85 d2 test %edx,%edx 10ec39: 74 38 je 10ec73 <== NEVER TAKEN 10ec3b: 31 c0 xor %eax,%eax 10ec3d: 31 db xor %ebx,%ebx if (!device_name_table[i].device_name) 10ec3f: 8d 04 80 lea (%eax,%eax,4),%eax 10ec42: 8b 55 e4 mov -0x1c(%ebp),%edx 10ec45: 8d 3c 82 lea (%edx,%eax,4),%edi 10ec48: 8b 37 mov (%edi),%esi 10ec4a: 85 f6 test %esi,%esi 10ec4c: 74 1d je 10ec6b continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10ec4e: 50 push %eax 10ec4f: ff 75 0c pushl 0xc(%ebp) 10ec52: 56 push %esi 10ec53: ff 75 08 pushl 0x8(%ebp) 10ec56: e8 d9 24 00 00 call 111134 10ec5b: 83 c4 10 add $0x10,%esp 10ec5e: 85 c0 test %eax,%eax 10ec60: 75 09 jne 10ec6b continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10ec62: 8b 45 0c mov 0xc(%ebp),%eax 10ec65: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10ec69: 74 21 je 10ec8c <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ec6b: 43 inc %ebx 10ec6c: 89 d8 mov %ebx,%eax 10ec6e: 39 5d e0 cmp %ebx,-0x20(%ebp) 10ec71: 77 cc ja 10ec3f pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10ec73: e8 84 18 00 00 call 1104fc <__errno> 10ec78: c7 00 02 00 00 00 movl $0x2,(%eax) 10ec7e: b8 ff ff ff ff mov $0xffffffff,%eax } 10ec83: 8d 65 f4 lea -0xc(%ebp),%esp 10ec86: 5b pop %ebx 10ec87: 5e pop %esi 10ec88: 5f pop %edi 10ec89: c9 leave 10ec8a: c3 ret 10ec8b: 90 nop <== NOT EXECUTED if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10ec8c: 8b 55 14 mov 0x14(%ebp),%edx 10ec8f: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10ec91: c7 42 08 80 10 12 00 movl $0x121080,0x8(%edx) pathloc->ops = &devFS_ops; 10ec98: c7 42 0c 20 10 12 00 movl $0x121020,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10ec9f: a1 f0 11 12 00 mov 0x1211f0,%eax 10eca4: 8b 40 28 mov 0x28(%eax),%eax 10eca7: 89 42 10 mov %eax,0x10(%edx) return 0; 10ecaa: 31 c0 xor %eax,%eax } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10ecac: 8d 65 f4 lea -0xc(%ebp),%esp 10ecaf: 5b pop %ebx 10ecb0: 5e pop %esi 10ecb1: 5f pop %edi 10ecb2: c9 leave 10ecb3: c3 ret int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 10ecb4: e8 43 18 00 00 call 1104fc <__errno> <== NOT EXECUTED 10ecb9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10ecbf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ecc4: eb e6 jmp 10ecac <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10ecc6: e8 31 18 00 00 call 1104fc <__errno> 10eccb: c7 00 0e 00 00 00 movl $0xe,(%eax) 10ecd1: 83 c8 ff or $0xffffffff,%eax 10ecd4: eb d6 jmp 10ecac =============================================================================== 00107ab0 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107ab0: 55 push %ebp 107ab1: 89 e5 mov %esp,%ebp 107ab3: 83 ec 1c sub $0x1c,%esp 107ab6: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107ab9: 8b 42 18 mov 0x18(%edx),%eax args.iop = iop; 107abc: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107abf: 8b 55 0c mov 0xc(%ebp),%edx 107ac2: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107ac5: 8b 55 10 mov 0x10(%ebp),%edx 107ac8: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( np->major, np->minor, (void *) &args 107acb: 8d 55 e8 lea -0x18(%ebp),%edx args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 107ace: 52 push %edx 107acf: ff 70 0c pushl 0xc(%eax) 107ad2: ff 70 08 pushl 0x8(%eax) 107ad5: e8 0e 40 00 00 call 10bae8 np->major, np->minor, (void *) &args ); if ( status ) 107ada: 83 c4 10 add $0x10,%esp 107add: 85 c0 test %eax,%eax 107adf: 75 07 jne 107ae8 return rtems_deviceio_errno(status); return args.ioctl_return; 107ae1: 8b 45 f4 mov -0xc(%ebp),%eax } 107ae4: c9 leave 107ae5: c3 ret 107ae6: 66 90 xchg %ax,%ax <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ae8: 83 ec 0c sub $0xc,%esp 107aeb: 50 push %eax 107aec: e8 f7 71 00 00 call 10ece8 107af1: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 107af4: c9 leave 107af5: c3 ret =============================================================================== 001078f4 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1078f4: 55 push %ebp 1078f5: 89 e5 mov %esp,%ebp 1078f7: 57 push %edi 1078f8: 56 push %esi 1078f9: 53 push %ebx 1078fa: 83 ec 1c sub $0x1c,%esp 1078fd: 8b 7d 08 mov 0x8(%ebp),%edi 107900: 8b 4d 10 mov 0x10(%ebp),%ecx 107903: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107906: 80 3f 64 cmpb $0x64,(%edi) 107909: 0f 84 dd 00 00 00 je 1079ec (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 10790f: 8b 45 0c mov 0xc(%ebp),%eax 107912: 25 00 f0 00 00 and $0xf000,%eax 107917: 3d 00 60 00 00 cmp $0x6000,%eax 10791c: 74 0b je 107929 10791e: 3d 00 20 00 00 cmp $0x2000,%eax 107923: 0f 85 e5 00 00 00 jne 107a0e ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107929: 89 4d dc mov %ecx,-0x24(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10792c: 89 55 d8 mov %edx,-0x28(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10792f: 8b 45 18 mov 0x18(%ebp),%eax 107932: 8b 30 mov (%eax),%esi if (!device_name_table) 107934: 85 f6 test %esi,%esi 107936: 0f 84 f4 00 00 00 je 107a30 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 10793c: 8b 15 50 f1 11 00 mov 0x11f150,%edx 107942: 85 d2 test %edx,%edx 107944: 0f 84 d6 00 00 00 je 107a20 10794a: 31 c0 xor %eax,%eax 10794c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107953: 31 db xor %ebx,%ebx 107955: 89 7d e4 mov %edi,-0x1c(%ebp) 107958: 89 d7 mov %edx,%edi 10795a: eb 1a jmp 107976 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 10795c: 83 ec 08 sub $0x8,%esp 10795f: 50 push %eax 107960: ff 75 e4 pushl -0x1c(%ebp) 107963: e8 74 97 00 00 call 1110dc 107968: 83 c4 10 add $0x10,%esp 10796b: 85 c0 test %eax,%eax 10796d: 74 65 je 1079d4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 10796f: 43 inc %ebx 107970: 89 d8 mov %ebx,%eax 107972: 39 fb cmp %edi,%ebx 107974: 73 16 jae 10798c if (device_name_table[i].device_name == NULL) 107976: 8d 04 80 lea (%eax,%eax,4),%eax 107979: 8b 04 86 mov (%esi,%eax,4),%eax 10797c: 85 c0 test %eax,%eax 10797e: 75 dc jne 10795c 107980: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107983: 43 inc %ebx 107984: 89 d8 mov %ebx,%eax 107986: 39 fb cmp %edi,%ebx 107988: 72 ec jb 107976 10798a: 66 90 xchg %ax,%ax 10798c: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 10798f: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107993: 0f 84 87 00 00 00 je 107a20 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107999: 9c pushf 10799a: fa cli 10799b: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 10799c: 8b 55 e0 mov -0x20(%ebp),%edx 10799f: 8d 04 92 lea (%edx,%edx,4),%eax 1079a2: 8d 14 86 lea (%esi,%eax,4),%edx 1079a5: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 1079a7: 31 c0 xor %eax,%eax 1079a9: b9 ff ff ff ff mov $0xffffffff,%ecx 1079ae: f2 ae repnz scas %es:(%edi),%al 1079b0: f7 d1 not %ecx 1079b2: 49 dec %ecx 1079b3: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 1079b6: 8b 45 dc mov -0x24(%ebp),%eax 1079b9: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 1079bc: 8b 45 d8 mov -0x28(%ebp),%eax 1079bf: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 1079c2: 8b 45 0c mov 0xc(%ebp),%eax 1079c5: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 1079c8: 53 push %ebx 1079c9: 9d popf return 0; 1079ca: 31 c0 xor %eax,%eax } 1079cc: 8d 65 f4 lea -0xc(%ebp),%esp 1079cf: 5b pop %ebx 1079d0: 5e pop %esi 1079d1: 5f pop %edi 1079d2: c9 leave 1079d3: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 1079d4: e8 23 8b 00 00 call 1104fc <__errno> 1079d9: c7 00 11 00 00 00 movl $0x11,(%eax) 1079df: b8 ff ff ff ff mov $0xffffffff,%eax device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 1079e4: 8d 65 f4 lea -0xc(%ebp),%esp 1079e7: 5b pop %ebx 1079e8: 5e pop %esi 1079e9: 5f pop %edi 1079ea: c9 leave 1079eb: c3 ret * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 1079ec: 80 7f 01 65 cmpb $0x65,0x1(%edi) 1079f0: 0f 85 19 ff ff ff jne 10790f <== NEVER TAKEN 1079f6: 80 7f 02 76 cmpb $0x76,0x2(%edi) 1079fa: 0f 85 0f ff ff ff jne 10790f <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107a00: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107a04: 0f 85 05 ff ff ff jne 10790f return 0; 107a0a: 31 c0 xor %eax,%eax 107a0c: eb be jmp 1079cc /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107a0e: e8 e9 8a 00 00 call 1104fc <__errno> 107a13: c7 00 16 00 00 00 movl $0x16,(%eax) 107a19: b8 ff ff ff ff mov $0xffffffff,%eax 107a1e: eb ac jmp 1079cc if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107a20: e8 d7 8a 00 00 call 1104fc <__errno> 107a25: c7 00 0c 00 00 00 movl $0xc,(%eax) 107a2b: 83 c8 ff or $0xffffffff,%eax 107a2e: eb 9c jmp 1079cc rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107a30: e8 c7 8a 00 00 call 1104fc <__errno> 107a35: c7 00 0e 00 00 00 movl $0xe,(%eax) 107a3b: 83 c8 ff or $0xffffffff,%eax 107a3e: eb 8c jmp 1079cc =============================================================================== 00107b2c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107b2c: 55 push %ebp 107b2d: 89 e5 mov %esp,%ebp 107b2f: 53 push %ebx 107b30: 83 ec 28 sub $0x28,%esp 107b33: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107b36: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 107b39: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107b3c: 8b 48 0c mov 0xc(%eax),%ecx 107b3f: 8b 58 10 mov 0x10(%eax),%ebx 107b42: 89 4d e0 mov %ecx,-0x20(%ebp) 107b45: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 107b48: 8b 4d 0c mov 0xc(%ebp),%ecx 107b4b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107b4e: 8b 4d 10 mov 0x10(%ebp),%ecx 107b51: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107b54: 8b 40 14 mov 0x14(%eax),%eax 107b57: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107b5a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( np->major, np->minor, (void *) &args 107b61: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 107b64: 50 push %eax 107b65: ff 72 0c pushl 0xc(%edx) 107b68: ff 72 08 pushl 0x8(%edx) 107b6b: e8 c0 40 00 00 call 10bc30 np->major, np->minor, (void *) &args ); if ( status ) 107b70: 83 c4 10 add $0x10,%esp 107b73: 85 c0 test %eax,%eax 107b75: 75 09 jne 107b80 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107b77: 8b 45 f4 mov -0xc(%ebp),%eax } 107b7a: 8b 5d fc mov -0x4(%ebp),%ebx 107b7d: c9 leave 107b7e: c3 ret 107b7f: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107b80: 83 ec 0c sub $0xc,%esp 107b83: 50 push %eax 107b84: e8 5f 71 00 00 call 10ece8 107b89: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 107b8c: 8b 5d fc mov -0x4(%ebp),%ebx 107b8f: c9 leave 107b90: c3 ret =============================================================================== 00107bb8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107bb8: 55 push %ebp 107bb9: 89 e5 mov %esp,%ebp 107bbb: 53 push %ebx 107bbc: 83 ec 28 sub $0x28,%esp 107bbf: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107bc2: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 107bc5: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107bc8: 8b 48 0c mov 0xc(%eax),%ecx 107bcb: 8b 58 10 mov 0x10(%eax),%ebx 107bce: 89 4d e0 mov %ecx,-0x20(%ebp) 107bd1: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107bd4: 8b 4d 0c mov 0xc(%ebp),%ecx 107bd7: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107bda: 8b 4d 10 mov 0x10(%ebp),%ecx 107bdd: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107be0: 8b 40 14 mov 0x14(%eax),%eax 107be3: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107be6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( np->major, np->minor, (void *) &args 107bed: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 107bf0: 50 push %eax 107bf1: ff 72 0c pushl 0xc(%edx) 107bf4: ff 72 08 pushl 0x8(%edx) 107bf7: e8 74 40 00 00 call 10bc70 np->major, np->minor, (void *) &args ); if ( status ) 107bfc: 83 c4 10 add $0x10,%esp 107bff: 85 c0 test %eax,%eax 107c01: 75 09 jne 107c0c return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107c03: 8b 45 f4 mov -0xc(%ebp),%eax } 107c06: 8b 5d fc mov -0x4(%ebp),%ebx 107c09: c9 leave 107c0a: c3 ret 107c0b: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107c0c: 83 ec 0c sub $0xc,%esp 107c0f: 50 push %eax 107c10: e8 d3 70 00 00 call 10ece8 107c15: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 107c18: 8b 5d fc mov -0x4(%ebp),%ebx 107c1b: c9 leave 107c1c: c3 ret =============================================================================== 00111a7c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 111a7c: 55 push %ebp 111a7d: 89 e5 mov %esp,%ebp 111a7f: 83 ec 1c sub $0x1c,%esp 111a82: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 111a85: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 111a88: 8b 55 0c mov 0xc(%ebp),%edx 111a8b: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 111a8e: 8b 55 10 mov 0x10(%ebp),%edx 111a91: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->pathinfo.node_access; 111a94: 8b 40 18 mov 0x18(%eax),%eax status = rtems_io_control( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 111a97: 8d 55 e8 lea -0x18(%ebp),%edx args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 111a9a: 52 push %edx 111a9b: ff 70 54 pushl 0x54(%eax) 111a9e: ff 70 50 pushl 0x50(%eax) 111aa1: e8 96 05 00 00 call 11203c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111aa6: 83 c4 10 add $0x10,%esp 111aa9: 85 c0 test %eax,%eax 111aab: 75 07 jne 111ab4 return rtems_deviceio_errno(status); return args.ioctl_return; 111aad: 8b 45 f4 mov -0xc(%ebp),%eax } 111ab0: c9 leave 111ab1: c3 ret 111ab2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111ab4: 83 ec 0c sub $0xc,%esp 111ab7: 50 push %eax 111ab8: e8 a3 07 00 00 call 112260 111abd: 83 c4 10 add $0x10,%esp return args.ioctl_return; } 111ac0: c9 leave 111ac1: c3 ret =============================================================================== 001119ac : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1119ac: 55 push %ebp 1119ad: 89 e5 mov %esp,%ebp 1119af: 53 push %ebx 1119b0: 83 ec 28 sub $0x28,%esp 1119b3: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1119b6: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 1119b9: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 1119bc: 8b 48 0c mov 0xc(%eax),%ecx 1119bf: 8b 58 10 mov 0x10(%eax),%ebx 1119c2: 89 4d e0 mov %ecx,-0x20(%ebp) 1119c5: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 1119c8: 8b 4d 0c mov 0xc(%ebp),%ecx 1119cb: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 1119ce: 8b 4d 10 mov 0x10(%ebp),%ecx 1119d1: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 1119d4: 8b 40 14 mov 0x14(%eax),%eax 1119d7: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 1119da: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 1119e1: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1119e4: 50 push %eax 1119e5: ff 72 54 pushl 0x54(%edx) 1119e8: ff 72 50 pushl 0x50(%edx) 1119eb: e8 cc 06 00 00 call 1120bc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 1119f0: 83 c4 10 add $0x10,%esp 1119f3: 85 c0 test %eax,%eax 1119f5: 75 09 jne 111a00 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1119f7: 8b 45 f4 mov -0xc(%ebp),%eax } 1119fa: 8b 5d fc mov -0x4(%ebp),%ebx 1119fd: c9 leave 1119fe: c3 ret 1119ff: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111a00: 83 ec 0c sub $0xc,%esp 111a03: 50 push %eax 111a04: e8 57 08 00 00 call 112260 111a09: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 111a0c: 8b 5d fc mov -0x4(%ebp),%ebx 111a0f: c9 leave 111a10: c3 ret =============================================================================== 00111a14 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 111a14: 55 push %ebp 111a15: 89 e5 mov %esp,%ebp 111a17: 53 push %ebx 111a18: 83 ec 28 sub $0x28,%esp 111a1b: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111a1e: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 111a21: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 111a24: 8b 48 0c mov 0xc(%eax),%ecx 111a27: 8b 58 10 mov 0x10(%eax),%ebx 111a2a: 89 4d e0 mov %ecx,-0x20(%ebp) 111a2d: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 111a30: 8b 4d 0c mov 0xc(%ebp),%ecx 111a33: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 111a36: 8b 4d 10 mov 0x10(%ebp),%ecx 111a39: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 111a3c: 8b 40 14 mov 0x14(%eax),%eax 111a3f: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111a42: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 111a49: 8d 45 dc lea -0x24(%ebp),%eax args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 111a4c: 50 push %eax 111a4d: ff 72 54 pushl 0x54(%edx) 111a50: ff 72 50 pushl 0x50(%edx) 111a53: e8 a4 06 00 00 call 1120fc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111a58: 83 c4 10 add $0x10,%esp 111a5b: 85 c0 test %eax,%eax 111a5d: 75 09 jne 111a68 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 111a5f: 8b 45 f4 mov -0xc(%ebp),%eax } 111a62: 8b 5d fc mov -0x4(%ebp),%ebx 111a65: c9 leave 111a66: c3 ret 111a67: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111a68: 83 ec 0c sub $0xc,%esp 111a6b: 50 push %eax 111a6c: e8 ef 07 00 00 call 112260 111a71: 83 c4 10 add $0x10,%esp return (ssize_t) args.bytes_moved; } 111a74: 8b 5d fc mov -0x4(%ebp),%ebx 111a77: c9 leave 111a78: c3 ret =============================================================================== 00108f84 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 108f84: 55 push %ebp 108f85: 89 e5 mov %esp,%ebp 108f87: 53 push %ebx 108f88: 83 ec 04 sub $0x4,%esp 108f8b: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 108f8d: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 108f93: 85 d2 test %edx,%edx 108f95: 74 4d je 108fe4 rtems_interrupt_disable (level); 108f97: 9c pushf 108f98: fa cli 108f99: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 108f9a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108fa0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108fa6: 39 d1 cmp %edx,%ecx 108fa8: 74 38 je 108fe2 108faa: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 108fac: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108fb3: 00 00 00 rtems_interrupt_enable (level); 108fb6: 50 push %eax 108fb7: 9d popf sc = rtems_semaphore_obtain( 108fb8: 50 push %eax 108fb9: 6a 00 push $0x0 108fbb: 6a 00 push $0x0 108fbd: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108fc3: e8 c8 26 00 00 call 10b690 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108fc8: 83 c4 10 add $0x10,%esp 108fcb: 85 c0 test %eax,%eax 108fcd: 75 1a jne 108fe9 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 108fcf: 9c pushf 108fd0: fa cli 108fd1: 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) { 108fd2: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108fd8: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 108fde: 39 d1 cmp %edx,%ecx 108fe0: 75 ca jne 108fac <== NEVER TAKEN 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); 108fe2: 50 push %eax 108fe3: 9d popf } } 108fe4: 8b 5d fc mov -0x4(%ebp),%ebx 108fe7: c9 leave 108fe8: c3 ret tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 108fe9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108fec: 50 push %eax <== NOT EXECUTED 108fed: e8 da 2c 00 00 call 10bccc <== NOT EXECUTED =============================================================================== 00109d1c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109d1c: 55 push %ebp 109d1d: 89 e5 mov %esp,%ebp 109d1f: 53 push %ebx 109d20: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 109d23: f6 42 3d 02 testb $0x2,0x3d(%edx) 109d27: 74 1b je 109d44 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 109d29: 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) && 109d2c: 8b 1d b4 31 12 00 mov 0x1231b4,%ebx 109d32: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 109d37: 74 0b je 109d44 iscntrl(c) && (c != '\t') && (c != '\n')) { 109d39: 3c 09 cmp $0x9,%al 109d3b: 74 07 je 109d44 109d3d: 3c 0a cmp $0xa,%al 109d3f: 75 13 jne 109d54 109d41: 8d 76 00 lea 0x0(%esi),%esi echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109d44: 0f b6 c0 movzbl %al,%eax 109d47: e8 94 fe ff ff call 109be0 } } 109d4c: 8b 5d fc mov -0x4(%ebp),%ebx 109d4f: c9 leave 109d50: c3 ret 109d51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109d54: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 109d58: 83 f0 40 xor $0x40,%eax 109d5b: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 109d5e: 53 push %ebx 109d5f: 52 push %edx 109d60: 6a 02 push $0x2 109d62: 8d 45 f6 lea -0xa(%ebp),%eax 109d65: 50 push %eax 109d66: 89 55 e4 mov %edx,-0x1c(%ebp) 109d69: e8 3e fd ff ff call 109aac tty->column += 2; 109d6e: 8b 55 e4 mov -0x1c(%ebp),%edx 109d71: 83 42 28 02 addl $0x2,0x28(%edx) */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109d75: 83 c4 10 add $0x10,%esp rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); } } 109d78: 8b 5d fc mov -0x4(%ebp),%ebx 109d7b: c9 leave 109d7c: c3 ret =============================================================================== 00108f44 : void endgrent(void) { 108f44: 55 push %ebp 108f45: 89 e5 mov %esp,%ebp 108f47: 83 ec 08 sub $0x8,%esp if (group_fp != NULL) 108f4a: a1 a0 6f 12 00 mov 0x126fa0,%eax 108f4f: 85 c0 test %eax,%eax 108f51: 74 0c je 108f5f <== NEVER TAKEN fclose(group_fp); 108f53: 83 ec 0c sub $0xc,%esp 108f56: 50 push %eax 108f57: e8 1c a3 00 00 call 113278 108f5c: 83 c4 10 add $0x10,%esp } 108f5f: c9 leave 108f60: c3 ret =============================================================================== 00108dec : void endpwent(void) { 108dec: 55 push %ebp 108ded: 89 e5 mov %esp,%ebp 108def: 83 ec 08 sub $0x8,%esp if (passwd_fp != NULL) 108df2: a1 88 70 12 00 mov 0x127088,%eax 108df7: 85 c0 test %eax,%eax 108df9: 74 0c je 108e07 <== NEVER TAKEN fclose(passwd_fp); 108dfb: 83 ec 0c sub $0xc,%esp 108dfe: 50 push %eax 108dff: e8 74 a4 00 00 call 113278 108e04: 83 c4 10 add $0x10,%esp } 108e07: c9 leave 108e08: c3 ret =============================================================================== 00109d80 : * 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) { 109d80: 55 push %ebp 109d81: 89 e5 mov %esp,%ebp 109d83: 57 push %edi 109d84: 56 push %esi 109d85: 53 push %ebx 109d86: 83 ec 1c sub $0x1c,%esp 109d89: 89 c3 mov %eax,%ebx 109d8b: 89 d7 mov %edx,%edi if (tty->ccount == 0) 109d8d: 8b 48 20 mov 0x20(%eax),%ecx 109d90: 85 c9 test %ecx,%ecx 109d92: 0f 84 84 00 00 00 je 109e1c return; if (lineFlag) { 109d98: 85 d2 test %edx,%edx 109d9a: 0f 85 84 00 00 00 jne 109e24 echo ('\n', tty); return; } } while (tty->ccount) { 109da0: 8b 50 3c mov 0x3c(%eax),%edx 109da3: 89 7d e4 mov %edi,-0x1c(%ebp) 109da6: eb 1d jmp 109dc5 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109da8: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109dab: 0f 85 37 01 00 00 jne 109ee8 <== NOT EXECUTED 109db1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109db4: 8b 75 e4 mov -0x1c(%ebp),%esi 109db7: 85 f6 test %esi,%esi 109db9: 74 61 je 109e1c <== NEVER TAKEN echo ('\n', tty); return; } } while (tty->ccount) { 109dbb: 8b 4b 20 mov 0x20(%ebx),%ecx 109dbe: 85 c9 test %ecx,%ecx 109dc0: 74 5a je 109e1c } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 109dc2: 8b 53 3c mov 0x3c(%ebx),%edx return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 109dc5: 8b 7b 1c mov 0x1c(%ebx),%edi 109dc8: 49 dec %ecx 109dc9: 89 4b 20 mov %ecx,0x20(%ebx) 109dcc: 8a 04 0f mov (%edi,%ecx,1),%al if (tty->termios.c_lflag & ECHO) { 109dcf: f6 c2 08 test $0x8,%dl 109dd2: 74 e0 je 109db4 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109dd4: 8b 75 e4 mov -0x1c(%ebp),%esi 109dd7: 85 f6 test %esi,%esi 109dd9: 75 09 jne 109de4 109ddb: f6 c2 10 test $0x10,%dl 109dde: 0f 84 f0 00 00 00 je 109ed4 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109de4: 3c 09 cmp $0x9,%al 109de6: 74 58 je 109e40 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109de8: 0f b6 c0 movzbl %al,%eax 109deb: 8d 70 01 lea 0x1(%eax),%esi 109dee: a1 b4 31 12 00 mov 0x1231b4,%eax 109df3: f6 04 30 20 testb $0x20,(%eax,%esi,1) 109df7: 75 af jne 109da8 <== NEVER TAKEN rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109df9: 57 push %edi 109dfa: 53 push %ebx 109dfb: 6a 03 push $0x3 109dfd: 68 46 fb 11 00 push $0x11fb46 109e02: e8 a5 fc ff ff call 109aac if (tty->column) 109e07: 8b 43 28 mov 0x28(%ebx),%eax 109e0a: 83 c4 10 add $0x10,%esp 109e0d: 85 c0 test %eax,%eax 109e0f: 74 a3 je 109db4 <== NEVER TAKEN tty->column--; 109e11: 48 dec %eax 109e12: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 109e15: 8b 75 e4 mov -0x1c(%ebp),%esi 109e18: 85 f6 test %esi,%esi 109e1a: 75 9f jne 109dbb break; } } 109e1c: 8d 65 f4 lea -0xc(%ebp),%esp 109e1f: 5b pop %ebx 109e20: 5e pop %esi 109e21: 5f pop %edi 109e22: c9 leave 109e23: c3 ret erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109e24: 8b 50 3c mov 0x3c(%eax),%edx 109e27: f6 c2 08 test $0x8,%dl 109e2a: 0f 84 94 00 00 00 je 109ec4 <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109e30: f6 c2 10 test $0x10,%dl 109e33: 0f 84 eb 00 00 00 je 109f24 <== NEVER TAKEN 109e39: 89 7d e4 mov %edi,-0x1c(%ebp) 109e3c: eb 87 jmp 109dc5 109e3e: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109e40: 8b 73 2c mov 0x2c(%ebx),%esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e43: 85 c9 test %ecx,%ecx 109e45: 74 46 je 109e8d c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109e47: a1 b4 31 12 00 mov 0x1231b4,%eax 109e4c: 89 45 dc mov %eax,-0x24(%ebp) if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; 109e4f: 31 c0 xor %eax,%eax 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) 109e51: 81 e2 00 02 00 00 and $0x200,%edx 109e57: 89 55 e0 mov %edx,-0x20(%ebp) 109e5a: 89 5d d8 mov %ebx,-0x28(%ebp) 109e5d: 8b 5d dc mov -0x24(%ebp),%ebx 109e60: eb 10 jmp 109e72 109e62: 66 90 xchg %ax,%ax <== NOT EXECUTED 109e64: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109e67: 85 d2 test %edx,%edx <== NOT EXECUTED 109e69: 74 03 je 109e6e <== NOT EXECUTED col += 2; 109e6b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e6e: 39 c1 cmp %eax,%ecx 109e70: 74 18 je 109e8a <== NEVER TAKEN c = tty->cbuf[i++]; 109e72: 8a 14 07 mov (%edi,%eax,1),%dl 109e75: 40 inc %eax if (c == '\t') { 109e76: 80 fa 09 cmp $0x9,%dl 109e79: 74 41 je 109ebc col = (col | 7) + 1; } else if (iscntrl (c)) { 109e7b: 0f b6 d2 movzbl %dl,%edx 109e7e: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) 109e83: 75 df jne 109e64 <== NEVER TAKEN if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109e85: 46 inc %esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109e86: 39 c1 cmp %eax,%ecx 109e88: 75 e8 jne 109e72 109e8a: 8b 5d d8 mov -0x28(%ebp),%ebx } /* * Back up over the tab */ while (tty->column > col) { 109e8d: 3b 73 28 cmp 0x28(%ebx),%esi 109e90: 0f 8d 1e ff ff ff jge 109db4 <== NEVER TAKEN 109e96: 66 90 xchg %ax,%ax rtems_termios_puts ("\b", 1, tty); 109e98: 52 push %edx 109e99: 53 push %ebx 109e9a: 6a 01 push $0x1 109e9c: 68 48 fb 11 00 push $0x11fb48 109ea1: e8 06 fc ff ff call 109aac tty->column--; 109ea6: 8b 43 28 mov 0x28(%ebx),%eax 109ea9: 48 dec %eax 109eaa: 89 43 28 mov %eax,0x28(%ebx) } /* * Back up over the tab */ while (tty->column > col) { 109ead: 83 c4 10 add $0x10,%esp 109eb0: 39 f0 cmp %esi,%eax 109eb2: 7f e4 jg 109e98 109eb4: e9 fb fe ff ff jmp 109db4 109eb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 109ebc: 83 ce 07 or $0x7,%esi 109ebf: 46 inc %esi 109ec0: eb ac jmp 109e6e 109ec2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109ec4: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109ecb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ece: 5b pop %ebx <== NOT EXECUTED 109ecf: 5e pop %esi <== NOT EXECUTED 109ed0: 5f pop %edi <== NOT EXECUTED 109ed1: c9 leave <== NOT EXECUTED 109ed2: c3 ret <== NOT EXECUTED 109ed3: 90 nop <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 109ed4: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 109ed8: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 109eda: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109edd: 5b pop %ebx <== NOT EXECUTED 109ede: 5e pop %esi <== NOT EXECUTED 109edf: 5f pop %edi <== NOT EXECUTED 109ee0: c9 leave <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 109ee1: e9 36 fe ff ff jmp 109d1c <== NOT EXECUTED 109ee6: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109ee8: 50 push %eax <== NOT EXECUTED 109ee9: 53 push %ebx <== NOT EXECUTED 109eea: 6a 03 push $0x3 <== NOT EXECUTED 109eec: 68 46 fb 11 00 push $0x11fb46 <== NOT EXECUTED 109ef1: e8 b6 fb ff ff call 109aac <== NOT EXECUTED if (tty->column) 109ef6: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109ef9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109efc: 85 c0 test %eax,%eax <== NOT EXECUTED 109efe: 74 04 je 109f04 <== NOT EXECUTED tty->column--; 109f00: 48 dec %eax <== NOT EXECUTED 109f01: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 109f04: a1 b4 31 12 00 mov 0x1231b4,%eax <== NOT EXECUTED 109f09: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f0d: 0f 84 e6 fe ff ff je 109df9 <== NOT EXECUTED 109f13: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 109f17: 0f 85 dc fe ff ff jne 109df9 <== NOT EXECUTED 109f1d: e9 92 fe ff ff jmp 109db4 <== NOT EXECUTED 109f22: 66 90 xchg %ax,%ax <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 109f24: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 109f2b: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 109f2f: 89 da mov %ebx,%edx <== NOT EXECUTED 109f31: e8 e6 fd ff ff call 109d1c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 109f36: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 109f3a: 0f 84 dc fe ff ff je 109e1c <== NOT EXECUTED echo ('\n', tty); 109f40: 89 da mov %ebx,%edx <== NOT EXECUTED 109f42: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 109f47: eb 91 jmp 109eda <== NOT EXECUTED =============================================================================== 00108b10 : #include int fchdir( int fd ) { 108b10: 55 push %ebp 108b11: 89 e5 mov %esp,%ebp 108b13: 57 push %edi 108b14: 56 push %esi 108b15: 53 push %ebx 108b16: 83 ec 4c sub $0x4c,%esp 108b19: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 108b1c: 3b 05 6c 33 12 00 cmp 0x12336c,%eax 108b22: 0f 83 d0 00 00 00 jae 108bf8 iop = rtems_libio_iop( fd ); 108b28: c1 e0 03 shl $0x3,%eax 108b2b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 108b32: 29 c3 sub %eax,%ebx 108b34: 03 1d e0 74 12 00 add 0x1274e0,%ebx rtems_libio_check_is_open(iop); 108b3a: 8b 43 14 mov 0x14(%ebx),%eax 108b3d: f6 c4 01 test $0x1,%ah 108b40: 0f 84 b2 00 00 00 je 108bf8 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108b46: a8 02 test $0x2,%al 108b48: 0f 84 be 00 00 00 je 108c0c /* * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 108b4e: 83 ec 0c sub $0xc,%esp 108b51: 8b 43 24 mov 0x24(%ebx),%eax 108b54: 83 c3 18 add $0x18,%ebx 108b57: 53 push %ebx 108b58: ff 50 10 call *0x10(%eax) 108b5b: 83 c4 10 add $0x10,%esp 108b5e: 48 dec %eax 108b5f: 75 67 jne 108bc8 * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 108b61: a1 50 53 12 00 mov 0x125350,%eax 108b66: 8d 55 c0 lea -0x40(%ebp),%edx 108b69: 89 55 b4 mov %edx,-0x4c(%ebp) 108b6c: 8d 70 04 lea 0x4(%eax),%esi 108b6f: b9 05 00 00 00 mov $0x5,%ecx 108b74: 89 d7 mov %edx,%edi 108b76: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = iop->pathinfo; 108b78: 8d 78 04 lea 0x4(%eax),%edi 108b7b: b1 05 mov $0x5,%cl 108b7d: 89 de mov %ebx,%esi 108b7f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108b81: 83 ec 0c sub $0xc,%esp 108b84: 6a 00 push $0x0 108b86: 8d 75 d4 lea -0x2c(%ebp),%esi 108b89: 56 push %esi 108b8a: 6a 00 push $0x0 108b8c: 6a 01 push $0x1 108b8e: 68 36 14 12 00 push $0x121436 108b93: e8 a0 fe ff ff call 108a38 108b98: 83 c4 20 add $0x20,%esp 108b9b: 85 c0 test %eax,%eax 108b9d: 75 3d jne 108bdc /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 108b9f: 83 ec 0c sub $0xc,%esp 108ba2: 8d 45 c0 lea -0x40(%ebp),%eax 108ba5: 50 push %eax 108ba6: e8 61 01 00 00 call 108d0c rtems_filesystem_current = loc; 108bab: 8b 3d 50 53 12 00 mov 0x125350,%edi 108bb1: 83 c7 04 add $0x4,%edi 108bb4: b9 05 00 00 00 mov $0x5,%ecx 108bb9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 108bbb: 83 c4 10 add $0x10,%esp 108bbe: 31 c0 xor %eax,%eax } 108bc0: 8d 65 f4 lea -0xc(%ebp),%esp 108bc3: 5b pop %ebx 108bc4: 5e pop %esi 108bc5: 5f pop %edi 108bc6: c9 leave 108bc7: c3 ret * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 108bc8: e8 93 a5 00 00 call 113160 <__errno> 108bcd: c7 00 14 00 00 00 movl $0x14,(%eax) 108bd3: b8 ff ff ff ff mov $0xffffffff,%eax 108bd8: eb e6 jmp 108bc0 108bda: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 108bdc: 8b 3d 50 53 12 00 mov 0x125350,%edi 108be2: 83 c7 04 add $0x4,%edi 108be5: b9 05 00 00 00 mov $0x5,%ecx 108bea: 8b 75 b4 mov -0x4c(%ebp),%esi 108bed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return -1; 108bef: b8 ff ff ff ff mov $0xffffffff,%eax 108bf4: eb ca jmp 108bc0 108bf6: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108bf8: e8 63 a5 00 00 call 113160 <__errno> 108bfd: c7 00 09 00 00 00 movl $0x9,(%eax) 108c03: b8 ff ff ff ff mov $0xffffffff,%eax 108c08: eb b6 jmp 108bc0 108c0a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108c0c: e8 4f a5 00 00 call 113160 <__errno> 108c11: c7 00 16 00 00 00 movl $0x16,(%eax) 108c17: b8 ff ff ff ff mov $0xffffffff,%eax 108c1c: eb a2 jmp 108bc0 =============================================================================== 00108c20 : int fchmod( int fd, mode_t mode ) { 108c20: 55 push %ebp 108c21: 89 e5 mov %esp,%ebp 108c23: 83 ec 08 sub $0x8,%esp 108c26: 8b 45 08 mov 0x8(%ebp),%eax 108c29: 8b 4d 0c mov 0xc(%ebp),%ecx rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108c2c: 3b 05 6c 33 12 00 cmp 0x12336c,%eax 108c32: 73 38 jae 108c6c iop = rtems_libio_iop( fd ); 108c34: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108c3b: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108c42: 29 d0 sub %edx,%eax 108c44: 03 05 e0 74 12 00 add 0x1274e0,%eax rtems_libio_check_is_open(iop); 108c4a: 8b 50 14 mov 0x14(%eax),%edx 108c4d: f6 c6 01 test $0x1,%dh 108c50: 74 1a je 108c6c /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108c52: 83 e2 04 and $0x4,%edx 108c55: 74 29 je 108c80 return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108c57: 8b 50 20 mov 0x20(%eax),%edx 108c5a: 89 4d 0c mov %ecx,0xc(%ebp) 108c5d: 83 c0 18 add $0x18,%eax 108c60: 89 45 08 mov %eax,0x8(%ebp) 108c63: 8b 42 1c mov 0x1c(%edx),%eax } 108c66: c9 leave * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108c67: ff e0 jmp *%eax 108c69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108c6c: e8 ef a4 00 00 call 113160 <__errno> 108c71: c7 00 09 00 00 00 movl $0x9,(%eax) */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 108c77: b8 ff ff ff ff mov $0xffffffff,%eax 108c7c: c9 leave 108c7d: c3 ret 108c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108c80: e8 db a4 00 00 call 113160 <__errno> 108c85: c7 00 16 00 00 00 movl $0x16,(%eax) 108c8b: eb ea jmp 108c77 =============================================================================== 00108ac0 : int fcntl( int fd, int cmd, ... ) { 108ac0: 55 push %ebp 108ac1: 89 e5 mov %esp,%ebp 108ac3: 57 push %edi 108ac4: 56 push %esi 108ac5: 53 push %ebx 108ac6: 83 ec 1c sub $0x1c,%esp 108ac9: 8b 5d 08 mov 0x8(%ebp),%ebx 108acc: 8b 55 0c mov 0xc(%ebp),%edx int ret; va_list ap; va_start( ap, cmd ); 108acf: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 108ad2: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 108ad8: 39 cb cmp %ecx,%ebx 108ada: 0f 83 5c 01 00 00 jae 108c3c iop = rtems_libio_iop( fd ); 108ae0: a1 c0 72 12 00 mov 0x1272c0,%eax 108ae5: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 108aec: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 108af3: 29 f3 sub %esi,%ebx 108af5: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108af8: 8b 73 14 mov 0x14(%ebx),%esi 108afb: f7 c6 00 01 00 00 test $0x100,%esi 108b01: 0f 84 35 01 00 00 je 108c3c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108b07: 83 fa 09 cmp $0x9,%edx 108b0a: 76 10 jbe 108b1c errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 108b0c: e8 ff a8 00 00 call 113410 <__errno> 108b11: c7 00 16 00 00 00 movl $0x16,(%eax) 108b17: eb 16 jmp 108b2f 108b19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108b1c: ff 24 95 30 16 12 00 jmp *0x121630(,%edx,4) 108b23: 90 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 108b24: e8 e7 a8 00 00 call 113410 <__errno> 108b29: c7 00 86 00 00 00 movl $0x86,(%eax) if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; 108b2f: be ff ff ff ff mov $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 108b34: 89 f0 mov %esi,%eax 108b36: 8d 65 f4 lea -0xc(%ebp),%esp 108b39: 5b pop %ebx 108b3a: 5e pop %esi 108b3b: 5f pop %edi 108b3c: c9 leave 108b3d: c3 ret 108b3e: 66 90 xchg %ax,%ax <== NOT EXECUTED case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 108b40: 83 ec 0c sub $0xc,%esp 108b43: ff 37 pushl (%edi) 108b45: 89 55 e0 mov %edx,-0x20(%ebp) 108b48: e8 33 05 00 00 call 109080 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 108b4d: 25 01 02 00 00 and $0x201,%eax 108b52: 8b 4b 14 mov 0x14(%ebx),%ecx 108b55: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 108b5b: 09 c8 or %ecx,%eax 108b5d: 89 43 14 mov %eax,0x14(%ebx) 108b60: 83 c4 10 add $0x10,%esp rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108b63: 31 f6 xor %esi,%esi 108b65: 8b 55 e0 mov -0x20(%ebp),%edx * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 108b68: 83 ec 08 sub $0x8,%esp 108b6b: 8b 43 20 mov 0x20(%ebx),%eax 108b6e: 53 push %ebx 108b6f: 52 push %edx 108b70: ff 50 30 call *0x30(%eax) 108b73: 89 c3 mov %eax,%ebx if (err) { 108b75: 83 c4 10 add $0x10,%esp 108b78: 85 c0 test %eax,%eax 108b7a: 74 b8 je 108b34 <== ALWAYS TAKEN errno = err; 108b7c: e8 8f a8 00 00 call 113410 <__errno> <== NOT EXECUTED 108b81: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 108b83: eb aa jmp 108b2f <== NOT EXECUTED 108b85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 108b88: 83 ec 0c sub $0xc,%esp 108b8b: 56 push %esi 108b8c: 89 55 e0 mov %edx,-0x20(%ebp) 108b8f: e8 24 05 00 00 call 1090b8 108b94: 89 c6 mov %eax,%esi 108b96: 83 c4 10 add $0x10,%esp 108b99: 8b 55 e0 mov -0x20(%ebp),%edx /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 108b9c: 85 f6 test %esi,%esi 108b9e: 79 c8 jns 108b68 <== ALWAYS TAKEN 108ba0: eb 92 jmp 108b34 <== NOT EXECUTED 108ba2: 66 90 xchg %ax,%ax <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 108ba4: 8b 07 mov (%edi),%eax 108ba6: 85 c0 test %eax,%eax 108ba8: 74 6a je 108c14 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 108baa: 81 ce 00 08 00 00 or $0x800,%esi 108bb0: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108bb3: 31 f6 xor %esi,%esi 108bb5: eb b1 jmp 108b68 108bb7: 90 nop <== NOT EXECUTED diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 108bb8: 31 c0 xor %eax,%eax 108bba: f7 c6 00 08 00 00 test $0x800,%esi 108bc0: 0f 95 c0 setne %al 108bc3: 89 c6 mov %eax,%esi 108bc5: eb a1 jmp 108b68 108bc7: 90 nop <== NOT EXECUTED * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 108bc8: 8b 3f mov (%edi),%edi if ( fd2 ) 108bca: 85 ff test %edi,%edi 108bcc: 0f 84 82 00 00 00 je 108c54 diop = rtems_libio_iop( fd2 ); 108bd2: 39 f9 cmp %edi,%ecx 108bd4: 77 4e ja 108c24 <== ALWAYS TAKEN 108bd6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108bdd: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 108bdf: 89 77 14 mov %esi,0x14(%edi) diop->pathinfo = iop->pathinfo; 108be2: 83 c7 18 add $0x18,%edi 108be5: 8d 73 18 lea 0x18(%ebx),%esi 108be8: b9 05 00 00 00 mov $0x5,%ecx 108bed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 108bef: 8b 4d e4 mov -0x1c(%ebp),%ecx 108bf2: 29 c1 sub %eax,%ecx 108bf4: 89 c8 mov %ecx,%eax 108bf6: c1 f8 03 sar $0x3,%eax 108bf9: 8d 0c c0 lea (%eax,%eax,8),%ecx 108bfc: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108bff: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108c02: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108c05: 89 ce mov %ecx,%esi 108c07: c1 e6 0f shl $0xf,%esi 108c0a: 01 f1 add %esi,%ecx 108c0c: 8d 34 c8 lea (%eax,%ecx,8),%esi 108c0f: f7 de neg %esi 108c11: eb 89 jmp 108b9c 108c13: 90 nop <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 108c14: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi 108c1a: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108c1d: 31 f6 xor %esi,%esi 108c1f: e9 44 ff ff ff jmp 108b68 switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 108c24: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx 108c2b: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi 108c32: 29 cf sub %ecx,%edi 108c34: 8d 3c 38 lea (%eax,%edi,1),%edi 108c37: 89 7d e4 mov %edi,-0x1c(%ebp) 108c3a: eb a3 jmp 108bdf int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108c3c: e8 cf a7 00 00 call 113410 <__errno> 108c41: c7 00 09 00 00 00 movl $0x9,(%eax) 108c47: be ff ff ff ff mov $0xffffffff,%esi 108c4c: e9 e3 fe ff ff jmp 108b34 108c51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 108c54: 89 55 e0 mov %edx,-0x20(%ebp) 108c57: e8 a0 04 00 00 call 1090fc 108c5c: 89 c7 mov %eax,%edi if ( diop == 0 ) { 108c5e: 85 c0 test %eax,%eax 108c60: 8b 55 e0 mov -0x20(%ebp),%edx 108c63: 0f 84 c6 fe ff ff je 108b2f <== NEVER TAKEN 108c69: 8b 73 14 mov 0x14(%ebx),%esi 108c6c: 89 45 e4 mov %eax,-0x1c(%ebp) 108c6f: a1 c0 72 12 00 mov 0x1272c0,%eax 108c74: e9 66 ff ff ff jmp 108bdf =============================================================================== 00108c9c : #include int fdatasync( int fd ) { 108c9c: 55 push %ebp 108c9d: 89 e5 mov %esp,%ebp 108c9f: 83 ec 08 sub $0x8,%esp 108ca2: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108ca5: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108cab: 73 2f jae 108cdc iop = rtems_libio_iop( fd ); 108cad: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108cb4: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108cbb: 29 d0 sub %edx,%eax 108cbd: 03 05 c0 72 12 00 add 0x1272c0,%eax rtems_libio_check_is_open(iop); 108cc3: 8b 50 14 mov 0x14(%eax),%edx 108cc6: f6 c6 01 test $0x1,%dh 108cc9: 74 11 je 108cdc rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108ccb: 83 e2 04 and $0x4,%edx 108cce: 74 20 je 108cf0 /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108cd0: 8b 50 20 mov 0x20(%eax),%edx 108cd3: 89 45 08 mov %eax,0x8(%ebp) 108cd6: 8b 42 2c mov 0x2c(%edx),%eax } 108cd9: c9 leave /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108cda: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108cdc: e8 2f a7 00 00 call 113410 <__errno> 108ce1: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); } 108ce7: b8 ff ff ff ff mov $0xffffffff,%eax 108cec: c9 leave 108ced: c3 ret 108cee: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108cf0: e8 1b a7 00 00 call 113410 <__errno> 108cf5: c7 00 16 00 00 00 movl $0x16,(%eax) 108cfb: eb ea jmp 108ce7 =============================================================================== 0011179c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 11179c: 55 push %ebp 11179d: 89 e5 mov %esp,%ebp 11179f: 57 push %edi 1117a0: 56 push %esi 1117a1: 53 push %ebx 1117a2: 83 ec 2c sub $0x2c,%esp 1117a5: 8b 75 08 mov 0x8(%ebp),%esi static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 1117a8: a1 6c 83 12 00 mov 0x12836c,%eax 1117ad: 85 c0 test %eax,%eax 1117af: 0f 84 8b 00 00 00 je 111840 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1117b5: 51 push %ecx 1117b6: 6a 00 push $0x0 1117b8: 6a 00 push $0x0 1117ba: 50 push %eax 1117bb: e8 50 bc ff ff call 10d410 } if (sc == RTEMS_SUCCESSFUL) { 1117c0: 83 c4 10 add $0x10,%esp 1117c3: 85 c0 test %eax,%eax 1117c5: 0f 85 0c 03 00 00 jne 111ad7 <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; 1117cb: 8b 1e mov (%esi),%ebx if (pipe == NULL) { 1117cd: 85 db test %ebx,%ebx 1117cf: 0f 84 df 01 00 00 je 1119b4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 1117d5: 52 push %edx 1117d6: 6a 00 push $0x0 1117d8: 6a 00 push $0x0 1117da: ff 73 28 pushl 0x28(%ebx) 1117dd: e8 2e bc ff ff call 10d410 1117e2: 83 c4 10 add $0x10,%esp 1117e5: 83 f8 01 cmp $0x1,%eax 1117e8: 19 ff sbb %edi,%edi 1117ea: f7 d7 not %edi 1117ec: 83 e7 fc and $0xfffffffc,%edi err = -EINTR; if (*pipep == NULL) { 1117ef: 8b 06 mov (%esi),%eax 1117f1: 85 c0 test %eax,%eax 1117f3: 0f 84 97 02 00 00 je 111a90 else *pipep = pipe; } out: pipe_unlock(); 1117f9: e8 aa fe ff ff call 1116a8 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 1117fe: 85 ff test %edi,%edi 111800: 75 32 jne 111834 <== NEVER TAKEN return err; pipe = *pipep; 111802: 8b 1e mov (%esi),%ebx switch (LIBIO_ACCMODE(iop)) { 111804: 8b 55 0c mov 0xc(%ebp),%edx 111807: 8b 42 14 mov 0x14(%edx),%eax 11180a: 83 e0 06 and $0x6,%eax 11180d: 83 f8 04 cmp $0x4,%eax 111810: 74 6a je 11187c 111812: 83 f8 06 cmp $0x6,%eax 111815: 0f 84 59 01 00 00 je 111974 11181b: 83 f8 02 cmp $0x2,%eax 11181e: 0f 84 dc 00 00 00 je 111900 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 111824: 83 ec 0c sub $0xc,%esp 111827: ff 73 28 pushl 0x28(%ebx) 11182a: e8 dd bc ff ff call 10d50c return 0; 11182f: 83 c4 10 add $0x10,%esp 111832: 31 ff xor %edi,%edi out_error: pipe_release(pipep, iop); return err; } 111834: 89 f8 mov %edi,%eax 111836: 8d 65 f4 lea -0xc(%ebp),%esp 111839: 5b pop %ebx 11183a: 5e pop %esi 11183b: 5f pop %edi 11183c: c9 leave 11183d: c3 ret 11183e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 111840: 57 push %edi 111841: 6a 00 push $0x0 111843: 6a 00 push $0x0 111845: ff 35 88 85 12 00 pushl 0x128588 11184b: e8 c0 bb ff ff call 10d410 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 111850: 83 c4 10 add $0x10,%esp 111853: 8b 1d 6c 83 12 00 mov 0x12836c,%ebx 111859: 85 db test %ebx,%ebx 11185b: 0f 84 43 02 00 00 je 111aa4 <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111861: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111864: ff 35 88 85 12 00 pushl 0x128588 <== NOT EXECUTED 11186a: e8 9d bc ff ff call 10d50c <== NOT EXECUTED 11186f: a1 6c 83 12 00 mov 0x12836c,%eax <== NOT EXECUTED 111874: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111877: e9 39 ff ff ff jmp 1117b5 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 11187c: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 11187f: 8b 43 14 mov 0x14(%ebx),%eax 111882: 8d 50 01 lea 0x1(%eax),%edx 111885: 89 53 14 mov %edx,0x14(%ebx) 111888: 85 c0 test %eax,%eax 11188a: 0f 84 84 02 00 00 je 111b14 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 111890: 8b 4b 10 mov 0x10(%ebx),%ecx 111893: 85 c9 test %ecx,%ecx 111895: 75 8d jne 111824 111897: 8b 55 0c mov 0xc(%ebp),%edx 11189a: f6 42 14 01 testb $0x1,0x14(%edx) 11189e: 0f 85 c4 02 00 00 jne 111b68 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 1118a4: 8b 7b 20 mov 0x20(%ebx),%edi 1118a7: eb 20 jmp 1118c9 1118a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 1118ac: 51 push %ecx 1118ad: 6a 00 push $0x0 1118af: 6a 00 push $0x0 1118b1: ff 73 28 pushl 0x28(%ebx) 1118b4: e8 57 bb ff ff call 10d410 1118b9: 83 c4 10 add $0x10,%esp 1118bc: 85 c0 test %eax,%eax 1118be: 75 27 jne 1118e7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 1118c0: 39 7b 20 cmp %edi,0x20(%ebx) 1118c3: 0f 85 5b ff ff ff jne 111824 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 1118c9: 83 ec 0c sub $0xc,%esp 1118cc: ff 73 28 pushl 0x28(%ebx) 1118cf: e8 38 bc ff ff call 10d50c if (! PIPE_WRITEWAIT(pipe)) 1118d4: 58 pop %eax 1118d5: 5a pop %edx 1118d6: 6a 00 push $0x0 1118d8: ff 73 30 pushl 0x30(%ebx) 1118db: e8 c4 12 00 00 call 112ba4 1118e0: 83 c4 10 add $0x10,%esp 1118e3: 85 c0 test %eax,%eax 1118e5: 74 c5 je 1118ac <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 1118e7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 1118ec: 83 ec 08 sub $0x8,%esp 1118ef: ff 75 0c pushl 0xc(%ebp) 1118f2: 56 push %esi 1118f3: e8 c8 fd ff ff call 1116c0 return err; 1118f8: 83 c4 10 add $0x10,%esp 1118fb: e9 34 ff ff ff jmp 111834 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 111900: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111903: 8b 43 10 mov 0x10(%ebx),%eax 111906: 8d 50 01 lea 0x1(%eax),%edx 111909: 89 53 10 mov %edx,0x10(%ebx) 11190c: 85 c0 test %eax,%eax 11190e: 0f 84 d0 01 00 00 je 111ae4 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 111914: 8b 7b 14 mov 0x14(%ebx),%edi 111917: 85 ff test %edi,%edi 111919: 0f 85 05 ff ff ff jne 111824 /* Not an error */ if (LIBIO_NODELAY(iop)) 11191f: 8b 45 0c mov 0xc(%ebp),%eax 111922: f6 40 14 01 testb $0x1,0x14(%eax) 111926: 0f 85 f8 fe ff ff jne 111824 break; prevCounter = pipe->writerCounter; 11192c: 8b 7b 24 mov 0x24(%ebx),%edi 11192f: eb 20 jmp 111951 111931: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 111934: 50 push %eax 111935: 6a 00 push $0x0 111937: 6a 00 push $0x0 111939: ff 73 28 pushl 0x28(%ebx) 11193c: e8 cf ba ff ff call 10d410 111941: 83 c4 10 add $0x10,%esp 111944: 85 c0 test %eax,%eax 111946: 75 9f jne 1118e7 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 111948: 39 7b 24 cmp %edi,0x24(%ebx) 11194b: 0f 85 d3 fe ff ff jne 111824 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 111951: 83 ec 0c sub $0xc,%esp 111954: ff 73 28 pushl 0x28(%ebx) 111957: e8 b0 bb ff ff call 10d50c if (! PIPE_READWAIT(pipe)) 11195c: 5a pop %edx 11195d: 59 pop %ecx 11195e: 6a 00 push $0x0 111960: ff 73 2c pushl 0x2c(%ebx) 111963: e8 3c 12 00 00 call 112ba4 111968: 83 c4 10 add $0x10,%esp 11196b: 85 c0 test %eax,%eax 11196d: 74 c5 je 111934 <== ALWAYS TAKEN 11196f: e9 73 ff ff ff jmp 1118e7 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111974: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 111977: 8b 43 10 mov 0x10(%ebx),%eax 11197a: 8d 50 01 lea 0x1(%eax),%edx 11197d: 89 53 10 mov %edx,0x10(%ebx) 111980: 85 c0 test %eax,%eax 111982: 0f 84 74 01 00 00 je 111afc <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 111988: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 11198b: 8b 43 14 mov 0x14(%ebx),%eax 11198e: 8d 50 01 lea 0x1(%eax),%edx 111991: 89 53 14 mov %edx,0x14(%ebx) 111994: 85 c0 test %eax,%eax 111996: 0f 85 88 fe ff ff jne 111824 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 11199c: 83 ec 08 sub $0x8,%esp 11199f: 8d 45 e4 lea -0x1c(%ebp),%eax 1119a2: 50 push %eax 1119a3: ff 73 2c pushl 0x2c(%ebx) 1119a6: e8 95 11 00 00 call 112b40 1119ab: 83 c4 10 add $0x10,%esp 1119ae: e9 71 fe ff ff jmp 111824 1119b3: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 1119b4: 83 ec 0c sub $0xc,%esp 1119b7: 6a 34 push $0x34 1119b9: e8 3e 86 ff ff call 109ffc 1119be: 89 c3 mov %eax,%ebx 1119c0: 89 45 d4 mov %eax,-0x2c(%ebp) if (pipe == NULL) 1119c3: 83 c4 10 add $0x10,%esp 1119c6: 85 c0 test %eax,%eax 1119c8: 0f 84 f2 01 00 00 je 111bc0 return err; memset(pipe, 0, sizeof(pipe_control_t)); 1119ce: b9 34 00 00 00 mov $0x34,%ecx 1119d3: 31 c0 xor %eax,%eax 1119d5: 89 df mov %ebx,%edi 1119d7: f3 aa rep stos %al,%es:(%edi) pipe->Size = PIPE_BUF; 1119d9: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 1119e0: 83 ec 0c sub $0xc,%esp 1119e3: 68 00 02 00 00 push $0x200 1119e8: e8 0f 86 ff ff call 109ffc 1119ed: 89 03 mov %eax,(%ebx) if (! pipe->Buffer) 1119ef: 83 c4 10 add $0x10,%esp 1119f2: 85 c0 test %eax,%eax 1119f4: 0f 84 b8 01 00 00 je 111bb2 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 1119fa: 8d 43 2c lea 0x2c(%ebx),%eax 1119fd: 50 push %eax 1119fe: 6a 00 push $0x0 111a00: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 111a02: 0f be 05 d4 63 12 00 movsbl 0x1263d4,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111a09: 0d 00 72 49 50 or $0x50497200,%eax 111a0e: 50 push %eax 111a0f: e8 b0 0f 00 00 call 1129c4 111a14: 83 c4 10 add $0x10,%esp 111a17: 85 c0 test %eax,%eax 111a19: 0f 85 83 01 00 00 jne 111ba2 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 111a1f: 8d 43 30 lea 0x30(%ebx),%eax 111a22: 50 push %eax 111a23: 6a 00 push $0x0 111a25: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 111a27: 0f be 05 d4 63 12 00 movsbl 0x1263d4,%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( 111a2e: 0d 00 77 49 50 or $0x50497700,%eax 111a33: 50 push %eax 111a34: e8 8b 0f 00 00 call 1129c4 111a39: 83 c4 10 add $0x10,%esp 111a3c: 85 c0 test %eax,%eax 111a3e: 0f 85 4d 01 00 00 jne 111b91 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 111a44: 83 ec 0c sub $0xc,%esp 111a47: 8d 43 28 lea 0x28(%ebx),%eax 111a4a: 50 push %eax 111a4b: 6a 00 push $0x0 111a4d: 6a 10 push $0x10 111a4f: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 111a51: 0f be 05 d4 63 12 00 movsbl 0x1263d4,%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( 111a58: 0d 00 73 49 50 or $0x50497300,%eax 111a5d: 50 push %eax 111a5e: e8 31 b7 ff ff call 10d194 111a63: 83 c4 20 add $0x20,%esp 111a66: 85 c0 test %eax,%eax 111a68: 0f 85 12 01 00 00 jne 111b80 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 111a6e: a0 d4 63 12 00 mov 0x1263d4,%al 111a73: 8d 50 01 lea 0x1(%eax),%edx 111a76: 88 15 d4 63 12 00 mov %dl,0x1263d4 111a7c: 3c 7a cmp $0x7a,%al 111a7e: 0f 85 51 fd ff ff jne 1117d5 c = 'a'; 111a84: c6 05 d4 63 12 00 61 movb $0x61,0x1263d4 111a8b: e9 45 fd ff ff jmp 1117d5 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 111a90: 85 ff test %edi,%edi 111a92: 0f 85 94 00 00 00 jne 111b2c <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; 111a98: 89 1e mov %ebx,(%esi) } out: pipe_unlock(); 111a9a: e8 09 fc ff ff call 1116a8 111a9f: e9 5e fd ff ff jmp 111802 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 111aa4: 83 ec 0c sub $0xc,%esp 111aa7: 68 6c 83 12 00 push $0x12836c 111aac: 6a 00 push $0x0 111aae: 6a 54 push $0x54 111ab0: 6a 01 push $0x1 111ab2: 68 45 50 49 50 push $0x50495045 111ab7: e8 d8 b6 ff ff call 10d194 111abc: 89 c3 mov %eax,%ebx 111abe: 83 c4 14 add $0x14,%esp 111ac1: ff 35 88 85 12 00 pushl 0x128588 111ac7: e8 40 ba ff ff call 10d50c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 111acc: 83 c4 10 add $0x10,%esp 111acf: 85 db test %ebx,%ebx 111ad1: 0f 84 f0 00 00 00 je 111bc7 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111ad7: bf f4 ff ff ff mov $0xfffffff4,%edi 111adc: e9 53 fd ff ff jmp 111834 111ae1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111ae4: 83 ec 08 sub $0x8,%esp 111ae7: 8d 45 e4 lea -0x1c(%ebp),%eax 111aea: 50 push %eax 111aeb: ff 73 30 pushl 0x30(%ebx) 111aee: e8 4d 10 00 00 call 112b40 111af3: 83 c4 10 add $0x10,%esp 111af6: e9 19 fe ff ff jmp 111914 111afb: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111afc: 83 ec 08 sub $0x8,%esp 111aff: 8d 45 e4 lea -0x1c(%ebp),%eax 111b02: 50 push %eax 111b03: ff 73 30 pushl 0x30(%ebx) 111b06: e8 35 10 00 00 call 112b40 111b0b: 83 c4 10 add $0x10,%esp 111b0e: e9 75 fe ff ff jmp 111988 111b13: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111b14: 83 ec 08 sub $0x8,%esp 111b17: 8d 45 e4 lea -0x1c(%ebp),%eax 111b1a: 50 push %eax 111b1b: ff 73 2c pushl 0x2c(%ebx) 111b1e: e8 1d 10 00 00 call 112b40 111b23: 83 c4 10 add $0x10,%esp 111b26: e9 65 fd ff ff jmp 111890 111b2b: 90 nop <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111b2c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b2f: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 111b32: e8 79 0f 00 00 call 112ab0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 111b37: 59 pop %ecx <== NOT EXECUTED 111b38: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 111b3b: e8 70 0f 00 00 call 112ab0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111b40: 5a pop %edx <== NOT EXECUTED 111b41: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 111b44: e8 23 b8 ff ff call 10d36c <== NOT EXECUTED free(pipe->Buffer); 111b49: 58 pop %eax <== NOT EXECUTED 111b4a: ff 33 pushl (%ebx) <== NOT EXECUTED 111b4c: e8 db 7d ff ff call 10992c <== NOT EXECUTED free(pipe); 111b51: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 111b54: e8 d3 7d ff ff call 10992c <== NOT EXECUTED 111b59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); 111b5c: e8 47 fb ff ff call 1116a8 111b61: e9 ce fc ff ff jmp 111834 111b66: 66 90 xchg %ax,%ax <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 111b68: 83 ec 0c sub $0xc,%esp 111b6b: ff 73 28 pushl 0x28(%ebx) 111b6e: e8 99 b9 ff ff call 10d50c err = -ENXIO; goto out_error; 111b73: 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; 111b76: bf fa ff ff ff mov $0xfffffffa,%edi goto out_error; 111b7b: e9 6c fd ff ff jmp 1118ec if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 111b80: 83 ec 0c sub $0xc,%esp 111b83: 8b 45 d4 mov -0x2c(%ebp),%eax 111b86: ff 70 30 pushl 0x30(%eax) 111b89: e8 22 0f 00 00 call 112ab0 111b8e: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 111b91: 83 ec 0c sub $0xc,%esp 111b94: 8b 55 d4 mov -0x2c(%ebp),%edx 111b97: ff 72 2c pushl 0x2c(%edx) 111b9a: e8 11 0f 00 00 call 112ab0 111b9f: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 111ba2: 83 ec 0c sub $0xc,%esp 111ba5: 8b 45 d4 mov -0x2c(%ebp),%eax 111ba8: ff 30 pushl (%eax) 111baa: e8 7d 7d ff ff call 10992c 111baf: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 111bb2: 83 ec 0c sub $0xc,%esp 111bb5: ff 75 d4 pushl -0x2c(%ebp) 111bb8: e8 6f 7d ff ff call 10992c 111bbd: 83 c4 10 add $0x10,%esp ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111bc0: bf f4 ff ff ff mov $0xfffffff4,%edi 111bc5: eb 95 jmp 111b5c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 111bc7: a1 6c 83 12 00 mov 0x12836c,%eax 111bcc: e9 e4 fb ff ff jmp 1117b5 =============================================================================== 0010fce4 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 10fce4: 55 push %ebp 10fce5: 89 e5 mov %esp,%ebp 10fce7: 56 push %esi 10fce8: 53 push %ebx 10fce9: 8b 75 08 mov 0x8(%ebp),%esi 10fcec: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 10fcef: 83 ec 08 sub $0x8,%esp 10fcf2: ff 33 pushl (%ebx) 10fcf4: ff 36 pushl (%esi) 10fcf6: e8 21 32 00 00 call 112f1c 10fcfb: 83 c4 10 add $0x10,%esp 10fcfe: 85 c0 test %eax,%eax 10fd00: 75 12 jne 10fd14 return false; } else { fa->mount_h = entry->mount_h; 10fd02: 8b 46 04 mov 0x4(%esi),%eax 10fd05: 89 43 04 mov %eax,0x4(%ebx) return true; 10fd08: b0 01 mov $0x1,%al } } 10fd0a: 8d 65 f8 lea -0x8(%ebp),%esp 10fd0d: 5b pop %ebx 10fd0e: 5e pop %esi 10fd0f: c9 leave 10fd10: c3 ret 10fd11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { return false; 10fd14: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 10fd16: 8d 65 f8 lea -0x8(%ebp),%esp 10fd19: 5b pop %ebx 10fd1a: 5e pop %esi 10fd1b: c9 leave 10fd1c: c3 ret =============================================================================== 00108d00 : long fpathconf( int fd, int name ) { 108d00: 55 push %ebp 108d01: 89 e5 mov %esp,%ebp 108d03: 83 ec 08 sub $0x8,%esp 108d06: 8b 45 08 mov 0x8(%ebp),%eax 108d09: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 108d0c: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108d12: 0f 83 ac 00 00 00 jae 108dc4 iop = rtems_libio_iop(fd); 108d18: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 108d1f: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax 108d26: 29 c8 sub %ecx,%eax 108d28: 03 05 c0 72 12 00 add 0x1272c0,%eax rtems_libio_check_is_open(iop); 108d2e: 8b 48 14 mov 0x14(%eax),%ecx 108d31: f6 c5 01 test $0x1,%ch 108d34: 0f 84 8a 00 00 00 je 108dc4 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 108d3a: 83 e1 02 and $0x2,%ecx 108d3d: 74 08 je 108d47 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108d3f: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108d42: 83 fa 0b cmp $0xb,%edx 108d45: 76 15 jbe 108d5c break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 108d47: e8 c4 a6 00 00 call 113410 <__errno> 108d4c: c7 00 16 00 00 00 movl $0x16,(%eax) 108d52: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 108d57: c9 leave 108d58: c3 ret 108d59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 108d5c: ff 24 95 58 16 12 00 jmp *0x121658(,%edx,4) 108d63: 90 nop <== NOT EXECUTED break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 108d64: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d67: c9 leave 108d68: c3 ret 108d69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 108d6c: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d6f: c9 leave 108d70: c3 ret 108d71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 108d74: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d77: c9 leave 108d78: c3 ret 108d79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 108d7c: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d7f: c9 leave 108d80: c3 ret 108d81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 108d84: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d87: c9 leave 108d88: c3 ret 108d89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 108d8c: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d8f: c9 leave 108d90: c3 ret 108d91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 108d94: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d97: c9 leave 108d98: c3 ret 108d99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 108d9c: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108d9f: c9 leave 108da0: c3 ret 108da1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 108da4: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108da7: c9 leave 108da8: c3 ret 108da9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 108dac: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108daf: c9 leave 108db0: c3 ret 108db1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 108db4: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108db7: c9 leave 108db8: c3 ret 108db9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 108dbc: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108dbf: c9 leave 108dc0: c3 ret 108dc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 108dc4: e8 47 a6 00 00 call 113410 <__errno> 108dc9: c7 00 09 00 00 00 movl $0x9,(%eax) 108dcf: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108dd4: c9 leave 108dd5: c3 ret =============================================================================== 00108094 : #include void free( void *ptr ) { 108094: 55 push %ebp 108095: 89 e5 mov %esp,%ebp 108097: 53 push %ebx 108098: 83 ec 04 sub $0x4,%esp 10809b: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 10809e: ff 05 ec 52 12 00 incl 0x1252ec if ( !ptr ) 1080a4: 85 db test %ebx,%ebx 1080a6: 74 4b je 1080f3 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1080a8: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 1080af: 74 47 je 1080f8 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1080b1: a1 c8 36 12 00 mov 0x1236c8,%eax 1080b6: 85 c0 test %eax,%eax 1080b8: 74 0a je 1080c4 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1080ba: 83 ec 0c sub $0xc,%esp 1080bd: 53 push %ebx 1080be: ff 50 08 call *0x8(%eax) 1080c1: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1080c4: 83 ec 08 sub $0x8,%esp 1080c7: 53 push %ebx 1080c8: ff 35 58 11 12 00 pushl 0x121158 1080ce: e8 45 4f 00 00 call 10d018 <_Protected_heap_Free> 1080d3: 83 c4 10 add $0x10,%esp 1080d6: 84 c0 test %al,%al 1080d8: 75 19 jne 1080f3 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1080da: a1 58 11 12 00 mov 0x121158,%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", 1080df: ff 70 1c pushl 0x1c(%eax) 1080e2: ff 70 18 pushl 0x18(%eax) 1080e5: 53 push %ebx 1080e6: 68 50 fa 11 00 push $0x11fa50 1080eb: e8 8c 0d 00 00 call 108e7c 1080f0: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1080f3: 8b 5d fc mov -0x4(%ebp),%ebx 1080f6: c9 leave 1080f7: c3 ret /* * 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() ) { 1080f8: e8 3b 01 00 00 call 108238 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1080fd: 84 c0 test %al,%al 1080ff: 75 b0 jne 1080b1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 108101: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 108104: 8b 5d fc mov -0x4(%ebp),%ebx 108107: 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); 108108: e9 97 01 00 00 jmp 1082a4 =============================================================================== 00109520 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 109520: 55 push %ebp 109521: 89 e5 mov %esp,%ebp 109523: 53 push %ebx 109524: 83 ec 04 sub $0x4,%esp 109527: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 10952a: 81 fb 20 63 12 00 cmp $0x126320,%ebx 109530: 74 26 je 109558 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 109532: 83 ec 0c sub $0xc,%esp 109535: 8d 43 04 lea 0x4(%ebx),%eax 109538: 50 push %eax 109539: e8 72 ef ff ff call 1084b0 rtems_filesystem_freenode( &env->root_directory); 10953e: 8d 43 18 lea 0x18(%ebx),%eax 109541: 89 04 24 mov %eax,(%esp) 109544: e8 67 ef ff ff call 1084b0 free(env); 109549: 83 c4 10 add $0x10,%esp 10954c: 89 5d 08 mov %ebx,0x8(%ebp) } } 10954f: 8b 5d fc mov -0x4(%ebp),%ebx 109552: c9 leave && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 109553: e9 6c ef ff ff jmp 1084c4 } } 109558: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10955b: c9 leave <== NOT EXECUTED 10955c: c3 ret <== NOT EXECUTED =============================================================================== 0011d72c : int fstat( int fd, struct stat *sbuf ) { 11d72c: 55 push %ebp 11d72d: 89 e5 mov %esp,%ebp 11d72f: 57 push %edi 11d730: 53 push %ebx 11d731: 8b 45 08 mov 0x8(%ebp),%eax 11d734: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11d737: 85 db test %ebx,%ebx 11d739: 74 55 je 11d790 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11d73b: 3b 05 4c 11 12 00 cmp 0x12114c,%eax 11d741: 73 39 jae 11d77c 11d743: c1 e0 03 shl $0x3,%eax 11d746: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 11d74d: 29 c2 sub %eax,%edx 11d74f: 03 15 c0 52 12 00 add 0x1252c0,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11d755: f6 42 15 01 testb $0x1,0x15(%edx) 11d759: 74 21 je 11d77c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11d75b: b9 48 00 00 00 mov $0x48,%ecx 11d760: 31 c0 xor %eax,%eax 11d762: 89 df mov %ebx,%edi 11d764: f3 aa rep stos %al,%es:(%edi) return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11d766: 8b 42 20 mov 0x20(%edx),%eax 11d769: 89 5d 0c mov %ebx,0xc(%ebp) 11d76c: 83 c2 18 add $0x18,%edx 11d76f: 89 55 08 mov %edx,0x8(%ebp) 11d772: 8b 40 18 mov 0x18(%eax),%eax } 11d775: 5b pop %ebx 11d776: 5f pop %edi 11d777: c9 leave * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11d778: ff e0 jmp *%eax 11d77a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11d77c: e8 2f 4b ff ff call 1122b0 <__errno> 11d781: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 11d787: b8 ff ff ff ff mov $0xffffffff,%eax 11d78c: 5b pop %ebx 11d78d: 5f pop %edi 11d78e: c9 leave 11d78f: c3 ret /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11d790: e8 1b 4b ff ff call 1122b0 <__errno> 11d795: c7 00 0e 00 00 00 movl $0xe,(%eax) 11d79b: eb ea jmp 11d787 =============================================================================== 00108ef4 : #include int fsync( int fd ) { 108ef4: 55 push %ebp 108ef5: 89 e5 mov %esp,%ebp 108ef7: 83 ec 08 sub $0x8,%esp 108efa: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108efd: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108f03: 73 2f jae 108f34 iop = rtems_libio_iop( fd ); 108f05: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108f0c: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108f13: 29 d0 sub %edx,%eax 108f15: 03 05 c0 72 12 00 add 0x1272c0,%eax rtems_libio_check_is_open(iop); 108f1b: 8b 50 14 mov 0x14(%eax),%edx 108f1e: f6 c6 01 test $0x1,%dh 108f21: 74 11 je 108f34 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108f23: 83 e2 04 and $0x4,%edx 108f26: 74 20 je 108f48 /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108f28: 8b 50 20 mov 0x20(%eax),%edx 108f2b: 89 45 08 mov %eax,0x8(%ebp) 108f2e: 8b 42 28 mov 0x28(%edx),%eax } 108f31: c9 leave /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108f32: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108f34: e8 d7 a4 00 00 call 113410 <__errno> 108f39: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 108f3f: b8 ff ff ff ff mov $0xffffffff,%eax 108f44: c9 leave 108f45: c3 ret 108f46: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108f48: e8 c3 a4 00 00 call 113410 <__errno> 108f4d: c7 00 16 00 00 00 movl $0x16,(%eax) 108f53: eb ea jmp 108f3f =============================================================================== 0010f9f4 : int ftruncate( int fd, off_t length ) { 10f9f4: 55 push %ebp 10f9f5: 89 e5 mov %esp,%ebp 10f9f7: 57 push %edi 10f9f8: 56 push %esi 10f9f9: 53 push %ebx 10f9fa: 83 ec 3c sub $0x3c,%esp 10f9fd: 8b 45 08 mov 0x8(%ebp),%eax 10fa00: 8b 55 0c mov 0xc(%ebp),%edx 10fa03: 8b 4d 10 mov 0x10(%ebp),%ecx 10fa06: 89 55 c0 mov %edx,-0x40(%ebp) 10fa09: 89 4d c4 mov %ecx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10fa0c: 3b 05 4c 11 12 00 cmp 0x12114c,%eax 10fa12: 73 58 jae 10fa6c iop = rtems_libio_iop( fd ); 10fa14: c1 e0 03 shl $0x3,%eax 10fa17: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10fa1e: 29 c3 sub %eax,%ebx 10fa20: 03 1d c0 52 12 00 add 0x1252c0,%ebx rtems_libio_check_is_open(iop); 10fa26: f6 43 15 01 testb $0x1,0x15(%ebx) 10fa2a: 74 40 je 10fa6c /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10fa2c: 8d 7d d4 lea -0x2c(%ebp),%edi 10fa2f: 8d 73 18 lea 0x18(%ebx),%esi 10fa32: b9 05 00 00 00 mov $0x5,%ecx 10fa37: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10fa39: 83 ec 0c sub $0xc,%esp 10fa3c: 8d 45 d4 lea -0x2c(%ebp),%eax 10fa3f: 50 push %eax 10fa40: 8b 45 e0 mov -0x20(%ebp),%eax 10fa43: ff 50 10 call *0x10(%eax) 10fa46: 83 c4 10 add $0x10,%esp 10fa49: 48 dec %eax 10fa4a: 74 46 je 10fa92 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fa4c: f6 43 14 04 testb $0x4,0x14(%ebx) 10fa50: 74 2e je 10fa80 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 10fa52: 50 push %eax 10fa53: 8b 43 20 mov 0x20(%ebx),%eax 10fa56: ff 75 c4 pushl -0x3c(%ebp) 10fa59: ff 75 c0 pushl -0x40(%ebp) 10fa5c: 53 push %ebx 10fa5d: ff 50 20 call *0x20(%eax) 10fa60: 83 c4 10 add $0x10,%esp } 10fa63: 8d 65 f4 lea -0xc(%ebp),%esp 10fa66: 5b pop %ebx 10fa67: 5e pop %esi 10fa68: 5f pop %edi 10fa69: c9 leave 10fa6a: c3 ret 10fa6b: 90 nop <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 10fa6c: e8 3f 28 00 00 call 1122b0 <__errno> 10fa71: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa77: b8 ff ff ff ff mov $0xffffffff,%eax 10fa7c: eb e5 jmp 10fa63 10fa7e: 66 90 xchg %ax,%ax <== NOT EXECUTED loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fa80: e8 2b 28 00 00 call 1122b0 <__errno> 10fa85: c7 00 16 00 00 00 movl $0x16,(%eax) 10fa8b: b8 ff ff ff ff mov $0xffffffff,%eax 10fa90: eb d1 jmp 10fa63 * Make sure we are not working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 10fa92: e8 19 28 00 00 call 1122b0 <__errno> 10fa97: c7 00 15 00 00 00 movl $0x15,(%eax) 10fa9d: b8 ff ff ff ff mov $0xffffffff,%eax 10faa2: eb bf jmp 10fa63 =============================================================================== 001082d0 : #include #include int getchark(void) { 1082d0: 55 push %ebp 1082d1: 89 e5 mov %esp,%ebp 1082d3: 83 ec 08 sub $0x8,%esp if ( BSP_poll_char ) 1082d6: a1 c8 23 12 00 mov 0x1223c8,%eax 1082db: 85 c0 test %eax,%eax 1082dd: 74 05 je 1082e4 return (*BSP_poll_char)(); return -1; } 1082df: c9 leave #include int getchark(void) { if ( BSP_poll_char ) return (*BSP_poll_char)(); 1082e0: ff e0 jmp *%eax 1082e2: 66 90 xchg %ax,%ax <== NOT EXECUTED return -1; } 1082e4: b8 ff ff ff ff mov $0xffffffff,%eax 1082e9: c9 leave 1082ea: c3 ret =============================================================================== 0011f120 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11f120: 55 push %ebp 11f121: 89 e5 mov %esp,%ebp 11f123: 57 push %edi 11f124: 56 push %esi 11f125: 53 push %ebx 11f126: 83 ec 2c sub $0x2c,%esp 11f129: 8b 45 08 mov 0x8(%ebp),%eax rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 11f12c: 3b 05 4c 41 12 00 cmp 0x12414c,%eax 11f132: 73 4c jae 11f180 <== NEVER TAKEN 11f134: c1 e0 03 shl $0x3,%eax 11f137: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 11f13e: 29 c3 sub %eax,%ebx 11f140: 03 1d 00 84 12 00 add 0x128400,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11f146: 8d 7d d4 lea -0x2c(%ebp),%edi 11f149: 8d 73 18 lea 0x18(%ebx),%esi 11f14c: b9 05 00 00 00 mov $0x5,%ecx 11f151: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11f153: 83 ec 0c sub $0xc,%esp 11f156: 8d 45 d4 lea -0x2c(%ebp),%eax 11f159: 50 push %eax 11f15a: 8b 45 e0 mov -0x20(%ebp),%eax 11f15d: ff 50 10 call *0x10(%eax) 11f160: 83 c4 10 add $0x10,%esp 11f163: 48 dec %eax 11f164: 75 1e jne 11f184 /* * 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 ); 11f166: 50 push %eax 11f167: 8b 43 20 mov 0x20(%ebx),%eax 11f16a: ff 75 10 pushl 0x10(%ebp) 11f16d: ff 75 0c pushl 0xc(%ebp) 11f170: 53 push %ebx 11f171: ff 50 08 call *0x8(%eax) 11f174: 83 c4 10 add $0x10,%esp } 11f177: 8d 65 f4 lea -0xc(%ebp),%esp 11f17a: 5b pop %ebx 11f17b: 5e pop %esi 11f17c: 5f pop %edi 11f17d: c9 leave 11f17e: c3 ret 11f17f: 90 nop <== NOT EXECUTED rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 11f180: 31 db xor %ebx,%ebx <== NOT EXECUTED 11f182: eb c2 jmp 11f146 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 11f184: e8 67 41 ff ff call 1132f0 <__errno> 11f189: c7 00 14 00 00 00 movl $0x14,(%eax) 11f18f: b8 ff ff ff ff mov $0xffffffff,%eax 11f194: eb e1 jmp 11f177 =============================================================================== 00108b14 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108b14: 55 push %ebp 108b15: 89 e5 mov %esp,%ebp 108b17: 57 push %edi 108b18: 56 push %esi 108b19: 53 push %ebx 108b1a: 83 ec 1c sub $0x1c,%esp 108b1d: 89 c3 mov %eax,%ebx 108b1f: 89 55 e4 mov %edx,-0x1c(%ebp) 108b22: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108b24: e8 eb fe ff ff call 108a14 if ((fp = fopen("/etc/group", "r")) == NULL) 108b29: 83 ec 08 sub $0x8,%esp 108b2c: 68 32 ff 11 00 push $0x11ff32 108b31: 68 19 14 12 00 push $0x121419 108b36: e8 41 ae 00 00 call 11397c 108b3b: 89 c7 mov %eax,%edi 108b3d: 83 c4 10 add $0x10,%esp 108b40: 85 c0 test %eax,%eax 108b42: 75 22 jne 108b66 108b44: e9 8b 00 00 00 jmp 108bd4 108b49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 108b4c: 83 ec 08 sub $0x8,%esp 108b4f: 53 push %ebx 108b50: ff 36 pushl (%esi) 108b52: e8 a5 bc 00 00 call 1147fc 108b57: 83 c4 10 add $0x10,%esp 108b5a: 85 c0 test %eax,%eax 108b5c: 0f 94 c0 sete %al 108b5f: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108b62: 85 c0 test %eax,%eax 108b64: 75 2e jne 108b94 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 108b66: 83 ec 0c sub $0xc,%esp 108b69: ff 75 0c pushl 0xc(%ebp) 108b6c: 8b 4d 08 mov 0x8(%ebp),%ecx 108b6f: 89 f2 mov %esi,%edx 108b71: 89 f8 mov %edi,%eax 108b73: e8 88 fc ff ff call 108800 108b78: 83 c4 10 add $0x10,%esp 108b7b: 85 c0 test %eax,%eax 108b7d: 74 31 je 108bb0 goto error_einval; if (name) { 108b7f: 85 db test %ebx,%ebx 108b81: 75 c9 jne 108b4c match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108b83: 0f b7 46 08 movzwl 0x8(%esi),%eax 108b87: 3b 45 e4 cmp -0x1c(%ebp),%eax 108b8a: 0f 94 c0 sete %al 108b8d: 0f b6 c0 movzbl %al,%eax } if (match) { 108b90: 85 c0 test %eax,%eax 108b92: 74 d2 je 108b66 fclose(fp); 108b94: 83 ec 0c sub $0xc,%esp 108b97: 57 push %edi 108b98: e8 db a6 00 00 call 113278 *result = grp; 108b9d: 8b 45 10 mov 0x10(%ebp),%eax 108ba0: 89 30 mov %esi,(%eax) return 0; 108ba2: 83 c4 10 add $0x10,%esp 108ba5: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108ba7: 8d 65 f4 lea -0xc(%ebp),%esp 108baa: 5b pop %ebx 108bab: 5e pop %esi 108bac: 5f pop %edi 108bad: c9 leave 108bae: c3 ret 108baf: 90 nop <== NOT EXECUTED *result = grp; return 0; } } error_einval: fclose(fp); 108bb0: 83 ec 0c sub $0xc,%esp 108bb3: 57 push %edi 108bb4: e8 bf a6 00 00 call 113278 rtems_set_errno_and_return_minus_one( EINVAL ); 108bb9: e8 62 a5 00 00 call 113120 <__errno> 108bbe: c7 00 16 00 00 00 movl $0x16,(%eax) 108bc4: 83 c4 10 add $0x10,%esp 108bc7: b8 ff ff ff ff mov $0xffffffff,%eax } 108bcc: 8d 65 f4 lea -0xc(%ebp),%esp 108bcf: 5b pop %ebx 108bd0: 5e pop %esi 108bd1: 5f pop %edi 108bd2: c9 leave 108bd3: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108bd4: e8 47 a5 00 00 call 113120 <__errno> 108bd9: c7 00 16 00 00 00 movl $0x16,(%eax) 108bdf: 83 c8 ff or $0xffffffff,%eax 108be2: eb c3 jmp 108ba7 =============================================================================== 00108ecc : struct group *getgrent(void) { 108ecc: 55 push %ebp 108ecd: 89 e5 mov %esp,%ebp 108ecf: 83 ec 08 sub $0x8,%esp if (group_fp == NULL) 108ed2: a1 a0 6f 12 00 mov 0x126fa0,%eax 108ed7: 85 c0 test %eax,%eax 108ed9: 75 05 jne 108ee0 return NULL; 108edb: 31 c0 xor %eax,%eax if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 108edd: c9 leave 108ede: c3 ret 108edf: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108ee0: 83 ec 0c sub $0xc,%esp 108ee3: 68 c8 00 00 00 push $0xc8 108ee8: b9 c0 6f 12 00 mov $0x126fc0,%ecx 108eed: ba a4 6f 12 00 mov $0x126fa4,%edx 108ef2: e8 09 f9 ff ff call 108800 108ef7: 83 c4 10 add $0x10,%esp 108efa: 85 c0 test %eax,%eax 108efc: 74 df je 108edd return NULL; return &grent; 108efe: b8 a4 6f 12 00 mov $0x126fa4,%eax } 108f03: c9 leave 108f04: c3 ret =============================================================================== 00108e98 : } struct group *getgrgid( gid_t gid ) { 108e98: 55 push %ebp 108e99: 89 e5 mov %esp,%ebp 108e9b: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108e9e: 8d 45 f4 lea -0xc(%ebp),%eax 108ea1: 50 push %eax 108ea2: 68 c8 00 00 00 push $0xc8 108ea7: 68 c0 6f 12 00 push $0x126fc0 108eac: 68 a4 6f 12 00 push $0x126fa4 108eb1: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108eb5: 50 push %eax 108eb6: e8 b1 ff ff ff call 108e6c 108ebb: 83 c4 20 add $0x20,%esp 108ebe: 85 c0 test %eax,%eax 108ec0: 75 06 jne 108ec8 return NULL; return p; 108ec2: 8b 45 f4 mov -0xc(%ebp),%eax } 108ec5: c9 leave 108ec6: c3 ret 108ec7: 90 nop <== NOT EXECUTED ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108ec8: 31 c0 xor %eax,%eax return p; } 108eca: c9 leave 108ecb: c3 ret =============================================================================== 00108e38 : } struct group *getgrnam( const char *name ) { 108e38: 55 push %ebp 108e39: 89 e5 mov %esp,%ebp 108e3b: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e3e: 8d 45 f4 lea -0xc(%ebp),%eax 108e41: 50 push %eax 108e42: 68 c8 00 00 00 push $0xc8 108e47: 68 c0 6f 12 00 push $0x126fc0 108e4c: 68 a4 6f 12 00 push $0x126fa4 108e51: ff 75 08 pushl 0x8(%ebp) 108e54: e8 b3 ff ff ff call 108e0c 108e59: 83 c4 20 add $0x20,%esp 108e5c: 85 c0 test %eax,%eax 108e5e: 75 08 jne 108e68 return NULL; return p; 108e60: 8b 45 f4 mov -0xc(%ebp),%eax } 108e63: c9 leave 108e64: c3 ret 108e65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108e68: 31 c0 xor %eax,%eax return p; } 108e6a: c9 leave 108e6b: c3 ret =============================================================================== 001085d8 : */ int getlogin_r( char *name, size_t namesize ) { 1085d8: 55 push %ebp 1085d9: 89 e5 mov %esp,%ebp 1085db: 53 push %ebx 1085dc: 83 ec 04 sub $0x4,%esp 1085df: 8b 5d 08 mov 0x8(%ebp),%ebx struct passwd *pw; char *pname; if ( !name ) 1085e2: 85 db test %ebx,%ebx 1085e4: 74 42 je 108628 return EFAULT; if ( namesize < LOGIN_NAME_MAX ) 1085e6: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 1085ea: 77 0c ja 1085f8 return ERANGE; 1085ec: b8 22 00 00 00 mov $0x22,%eax if ( pw ) pname = pw->pw_name; strncpy( name, pname, LOGIN_NAME_MAX ); return 0; } 1085f1: 8b 5d fc mov -0x4(%ebp),%ebx 1085f4: c9 leave 1085f5: c3 ret 1085f6: 66 90 xchg %ax,%ax <== NOT EXECUTED return ERANGE; /* Set the pointer to a default name */ pname = ""; pw = getpwuid(getuid()); 1085f8: e8 e7 09 00 00 call 108fe4 1085fd: 83 ec 0c sub $0xc,%esp 108600: 0f b7 c0 movzwl %ax,%eax 108603: 50 push %eax 108604: e8 37 07 00 00 call 108d40 if ( pw ) 108609: 83 c4 10 add $0x10,%esp 10860c: 85 c0 test %eax,%eax 10860e: 74 20 je 108630 pname = pw->pw_name; 108610: 8b 00 mov (%eax),%eax strncpy( name, pname, LOGIN_NAME_MAX ); 108612: 52 push %edx 108613: 6a 09 push $0x9 108615: 50 push %eax 108616: 53 push %ebx 108617: e8 60 c3 00 00 call 11497c return 0; 10861c: 83 c4 10 add $0x10,%esp 10861f: 31 c0 xor %eax,%eax } 108621: 8b 5d fc mov -0x4(%ebp),%ebx 108624: c9 leave 108625: c3 ret 108626: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct passwd *pw; char *pname; if ( !name ) return EFAULT; 108628: b8 0e 00 00 00 mov $0xe,%eax 10862d: eb c2 jmp 1085f1 10862f: 90 nop <== NOT EXECUTED if ( namesize < LOGIN_NAME_MAX ) return ERANGE; /* Set the pointer to a default name */ pname = ""; 108630: b8 69 15 12 00 mov $0x121569,%eax 108635: eb db jmp 108612 =============================================================================== 00108be4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108be4: 55 push %ebp 108be5: 89 e5 mov %esp,%ebp 108be7: 57 push %edi 108be8: 56 push %esi 108be9: 53 push %ebx 108bea: 83 ec 1c sub $0x1c,%esp 108bed: 89 c3 mov %eax,%ebx 108bef: 89 55 e4 mov %edx,-0x1c(%ebp) 108bf2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108bf4: e8 1b fe ff ff call 108a14 if ((fp = fopen("/etc/passwd", "r")) == NULL) 108bf9: 83 ec 08 sub $0x8,%esp 108bfc: 68 32 ff 11 00 push $0x11ff32 108c01: 68 0d 14 12 00 push $0x12140d 108c06: e8 71 ad 00 00 call 11397c 108c0b: 89 c7 mov %eax,%edi 108c0d: 83 c4 10 add $0x10,%esp 108c10: 85 c0 test %eax,%eax 108c12: 75 22 jne 108c36 108c14: e9 8b 00 00 00 jmp 108ca4 108c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); 108c1c: 83 ec 08 sub $0x8,%esp 108c1f: 53 push %ebx 108c20: ff 36 pushl (%esi) 108c22: e8 d5 bb 00 00 call 1147fc 108c27: 83 c4 10 add $0x10,%esp 108c2a: 85 c0 test %eax,%eax 108c2c: 0f 94 c0 sete %al 108c2f: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 108c32: 85 c0 test %eax,%eax 108c34: 75 2e jne 108c64 if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 108c36: 83 ec 0c sub $0xc,%esp 108c39: ff 75 0c pushl 0xc(%ebp) 108c3c: 8b 4d 08 mov 0x8(%ebp),%ecx 108c3f: 89 f2 mov %esi,%edx 108c41: 89 f8 mov %edi,%eax 108c43: e8 d0 fc ff ff call 108918 108c48: 83 c4 10 add $0x10,%esp 108c4b: 85 c0 test %eax,%eax 108c4d: 74 31 je 108c80 goto error_einval; if (name) { 108c4f: 85 db test %ebx,%ebx 108c51: 75 c9 jne 108c1c match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 108c53: 0f b7 46 08 movzwl 0x8(%esi),%eax 108c57: 3b 45 e4 cmp -0x1c(%ebp),%eax 108c5a: 0f 94 c0 sete %al 108c5d: 0f b6 c0 movzbl %al,%eax } if (match) { 108c60: 85 c0 test %eax,%eax 108c62: 74 d2 je 108c36 fclose(fp); 108c64: 83 ec 0c sub $0xc,%esp 108c67: 57 push %edi 108c68: e8 0b a6 00 00 call 113278 *result = pwd; 108c6d: 8b 45 10 mov 0x10(%ebp),%eax 108c70: 89 30 mov %esi,(%eax) return 0; 108c72: 83 c4 10 add $0x10,%esp 108c75: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108c77: 8d 65 f4 lea -0xc(%ebp),%esp 108c7a: 5b pop %ebx 108c7b: 5e pop %esi 108c7c: 5f pop %edi 108c7d: c9 leave 108c7e: c3 ret 108c7f: 90 nop <== NOT EXECUTED *result = pwd; return 0; } } error_einval: fclose(fp); 108c80: 83 ec 0c sub $0xc,%esp 108c83: 57 push %edi 108c84: e8 ef a5 00 00 call 113278 rtems_set_errno_and_return_minus_one( EINVAL ); 108c89: e8 92 a4 00 00 call 113120 <__errno> 108c8e: c7 00 16 00 00 00 movl $0x16,(%eax) 108c94: 83 c4 10 add $0x10,%esp 108c97: b8 ff ff ff ff mov $0xffffffff,%eax } 108c9c: 8d 65 f4 lea -0xc(%ebp),%esp 108c9f: 5b pop %ebx 108ca0: 5e pop %esi 108ca1: 5f pop %edi 108ca2: c9 leave 108ca3: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108ca4: e8 77 a4 00 00 call 113120 <__errno> 108ca9: c7 00 16 00 00 00 movl $0x16,(%eax) 108caf: 83 c8 ff or $0xffffffff,%eax 108cb2: eb c3 jmp 108c77 =============================================================================== 00108d74 : struct passwd *getpwent(void) { 108d74: 55 push %ebp 108d75: 89 e5 mov %esp,%ebp 108d77: 83 ec 08 sub $0x8,%esp if (passwd_fp == NULL) 108d7a: a1 88 70 12 00 mov 0x127088,%eax 108d7f: 85 c0 test %eax,%eax 108d81: 75 05 jne 108d88 return NULL; 108d83: 31 c0 xor %eax,%eax if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 108d85: c9 leave 108d86: c3 ret 108d87: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108d88: 83 ec 0c sub $0xc,%esp 108d8b: 68 c8 00 00 00 push $0xc8 108d90: b9 c0 70 12 00 mov $0x1270c0,%ecx 108d95: ba 8c 70 12 00 mov $0x12708c,%edx 108d9a: e8 79 fb ff ff call 108918 108d9f: 83 c4 10 add $0x10,%esp 108da2: 85 c0 test %eax,%eax 108da4: 74 df je 108d85 return NULL; return &pwent; 108da6: b8 8c 70 12 00 mov $0x12708c,%eax } 108dab: c9 leave 108dac: c3 ret =============================================================================== 00108ce0 : } struct passwd *getpwnam( const char *name ) { 108ce0: 55 push %ebp 108ce1: 89 e5 mov %esp,%ebp 108ce3: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108ce6: 8d 45 f4 lea -0xc(%ebp),%eax 108ce9: 50 push %eax 108cea: 68 c8 00 00 00 push $0xc8 108cef: 68 c0 70 12 00 push $0x1270c0 108cf4: 68 8c 70 12 00 push $0x12708c 108cf9: ff 75 08 pushl 0x8(%ebp) 108cfc: e8 b3 ff ff ff call 108cb4 108d01: 83 c4 20 add $0x20,%esp 108d04: 85 c0 test %eax,%eax 108d06: 75 08 jne 108d10 return NULL; return p; 108d08: 8b 45 f4 mov -0xc(%ebp),%eax } 108d0b: c9 leave 108d0c: c3 ret 108d0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108d10: 31 c0 xor %eax,%eax return p; } 108d12: c9 leave 108d13: c3 ret =============================================================================== 00108d40 : } struct passwd *getpwuid( uid_t uid ) { 108d40: 55 push %ebp 108d41: 89 e5 mov %esp,%ebp 108d43: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108d46: 8d 45 f4 lea -0xc(%ebp),%eax 108d49: 50 push %eax 108d4a: 68 c8 00 00 00 push $0xc8 108d4f: 68 c0 70 12 00 push $0x1270c0 108d54: 68 8c 70 12 00 push $0x12708c 108d59: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108d5d: 50 push %eax 108d5e: e8 b1 ff ff ff call 108d14 108d63: 83 c4 20 add $0x20,%esp 108d66: 85 c0 test %eax,%eax 108d68: 75 06 jne 108d70 return NULL; return p; 108d6a: 8b 45 f4 mov -0xc(%ebp),%eax } 108d6d: c9 leave 108d6e: c3 ret 108d6f: 90 nop <== NOT EXECUTED ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108d70: 31 c0 xor %eax,%eax return p; } 108d72: c9 leave 108d73: c3 ret =============================================================================== 001082b0 : #include #include int getrusage(int who, struct rusage *usage) { 1082b0: 55 push %ebp 1082b1: 89 e5 mov %esp,%ebp 1082b3: 56 push %esi 1082b4: 53 push %ebx 1082b5: 83 ec 10 sub $0x10,%esp 1082b8: 8b 45 08 mov 0x8(%ebp),%eax 1082bb: 8b 5d 0c mov 0xc(%ebp),%ebx struct timespec uptime; struct timeval rtime; if ( !usage ) 1082be: 85 db test %ebx,%ebx 1082c0: 74 70 je 108332 * RTEMS only has a single process so there are no children. * The single process has been running since the system * was booted and since there is no distinction between system * and user time, we will just report the uptime. */ if (who == RUSAGE_SELF) { 1082c2: 85 c0 test %eax,%eax 1082c4: 74 32 je 1082f8 usage->ru_stime = rtime; return 0; } if (who == RUSAGE_CHILDREN) { 1082c6: 40 inc %eax 1082c7: 74 17 je 1082e0 rtems_set_errno_and_return_minus_one( ENOSYS ); } rtems_set_errno_and_return_minus_one( EINVAL ); 1082c9: e8 12 a2 00 00 call 1124e0 <__errno> 1082ce: c7 00 16 00 00 00 movl $0x16,(%eax) 1082d4: b8 ff ff ff ff mov $0xffffffff,%eax } 1082d9: 8d 65 f8 lea -0x8(%ebp),%esp 1082dc: 5b pop %ebx 1082dd: 5e pop %esi 1082de: c9 leave 1082df: c3 ret return 0; } if (who == RUSAGE_CHILDREN) { rtems_set_errno_and_return_minus_one( ENOSYS ); 1082e0: e8 fb a1 00 00 call 1124e0 <__errno> 1082e5: c7 00 58 00 00 00 movl $0x58,(%eax) 1082eb: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_set_errno_and_return_minus_one( EINVAL ); } 1082f0: 8d 65 f8 lea -0x8(%ebp),%esp 1082f3: 5b pop %ebx 1082f4: 5e pop %esi 1082f5: c9 leave 1082f6: c3 ret 1082f7: 90 nop <== NOT EXECUTED * The single process has been running since the system * was booted and since there is no distinction between system * and user time, we will just report the uptime. */ if (who == RUSAGE_SELF) { rtems_clock_get_uptime( &uptime ); 1082f8: 83 ec 0c sub $0xc,%esp 1082fb: 8d 45 f0 lea -0x10(%ebp),%eax 1082fe: 50 push %eax 1082ff: e8 c4 2e 00 00 call 10b1c8 rtime.tv_sec = uptime.tv_sec; 108304: 8b 4d f0 mov -0x10(%ebp),%ecx rtime.tv_usec = uptime.tv_nsec / 1000; 108307: 8b 75 f4 mov -0xc(%ebp),%esi 10830a: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10830f: f7 ee imul %esi 108311: 89 d0 mov %edx,%eax 108313: c1 f8 06 sar $0x6,%eax 108316: c1 fe 1f sar $0x1f,%esi 108319: 29 f0 sub %esi,%eax 10831b: 89 0b mov %ecx,(%ebx) 10831d: 89 43 04 mov %eax,0x4(%ebx) 108320: 89 4b 08 mov %ecx,0x8(%ebx) 108323: 89 43 0c mov %eax,0xc(%ebx) usage->ru_utime = rtime; usage->ru_stime = rtime; return 0; 108326: 83 c4 10 add $0x10,%esp 108329: 31 c0 xor %eax,%eax if (who == RUSAGE_CHILDREN) { rtems_set_errno_and_return_minus_one( ENOSYS ); } rtems_set_errno_and_return_minus_one( EINVAL ); } 10832b: 8d 65 f8 lea -0x8(%ebp),%esp 10832e: 5b pop %ebx 10832f: 5e pop %esi 108330: c9 leave 108331: c3 ret { struct timespec uptime; struct timeval rtime; if ( !usage ) rtems_set_errno_and_return_minus_one( EFAULT ); 108332: e8 a9 a1 00 00 call 1124e0 <__errno> 108337: c7 00 0e 00 00 00 movl $0xe,(%eax) 10833d: b8 ff ff ff ff mov $0xffffffff,%eax 108342: eb 95 jmp 1082d9 =============================================================================== 00108110 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 108110: 55 push %ebp 108111: 89 e5 mov %esp,%ebp 108113: 56 push %esi 108114: 53 push %ebx 108115: 83 ec 10 sub $0x10,%esp 108118: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 10811b: 85 db test %ebx,%ebx 10811d: 74 39 je 108158 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10811f: 9c pushf 108120: fa cli 108121: 5e pop %esi _TOD_Get( &now ); 108122: 83 ec 0c sub $0xc,%esp 108125: 8d 45 f0 lea -0x10(%ebp),%eax 108128: 50 push %eax 108129: e8 5e 42 00 00 call 10c38c <_TOD_Get> _ISR_Enable(level); 10812e: 56 push %esi 10812f: 9d popf useconds = (suseconds_t)now.tv_nsec; 108130: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 108133: 8b 45 f0 mov -0x10(%ebp),%eax 108136: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 108138: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10813d: f7 e9 imul %ecx 10813f: 89 d0 mov %edx,%eax 108141: c1 f8 06 sar $0x6,%eax 108144: c1 f9 1f sar $0x1f,%ecx 108147: 29 c8 sub %ecx,%eax 108149: 89 43 04 mov %eax,0x4(%ebx) * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 10814c: 83 c4 10 add $0x10,%esp 10814f: 31 c0 xor %eax,%eax } 108151: 8d 65 f8 lea -0x8(%ebp),%esp 108154: 5b pop %ebx 108155: 5e pop %esi 108156: c9 leave 108157: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 108158: e8 53 a1 00 00 call 1122b0 <__errno> <== NOT EXECUTED 10815d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 108163: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108168: eb e7 jmp 108151 <== NOT EXECUTED =============================================================================== 00111c74 : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111c74: 55 push %ebp 111c75: 89 e5 mov %esp,%ebp 111c77: 57 push %edi 111c78: 56 push %esi 111c79: 53 push %ebx 111c7a: 83 ec 1c sub $0x1c,%esp 111c7d: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 111c80: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 111c84: 76 1e jbe 111ca4 break; case SEEK_END: /* Movement past the end of the directory via lseek */ /* is not a permitted operation */ default: rtems_set_errno_and_return_minus_one( EINVAL ); 111c86: e8 25 06 00 00 call 1122b0 <__errno> 111c8b: c7 00 16 00 00 00 movl $0x16,(%eax) 111c91: b8 ff ff ff ff mov $0xffffffff,%eax 111c96: ba ff ff ff ff mov $0xffffffff,%edx break; } return 0; } 111c9b: 8d 65 f4 lea -0xc(%ebp),%esp 111c9e: 5b pop %ebx 111c9f: 5e pop %esi 111ca0: 5f pop %edi 111ca1: c9 leave 111ca2: c3 ret 111ca3: 90 nop <== NOT EXECUTED ) { switch( whence ) { case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 111ca4: 6a 00 push $0x0 111ca6: 68 10 01 00 00 push $0x110 111cab: ff 73 10 pushl 0x10(%ebx) 111cae: ff 73 0c pushl 0xc(%ebx) 111cb1: e8 2a b5 00 00 call 11d1e0 <__divdi3> 111cb6: 83 c4 10 add $0x10,%esp 111cb9: 69 ca 10 01 00 00 imul $0x110,%edx,%ecx 111cbf: be 10 01 00 00 mov $0x110,%esi 111cc4: f7 e6 mul %esi 111cc6: 89 45 e0 mov %eax,-0x20(%ebp) 111cc9: 01 ca add %ecx,%edx 111ccb: 89 55 e4 mov %edx,-0x1c(%ebp) 111cce: 8b 45 e0 mov -0x20(%ebp),%eax 111cd1: 8b 55 e4 mov -0x1c(%ebp),%edx 111cd4: 89 43 0c mov %eax,0xc(%ebx) 111cd7: 89 53 10 mov %edx,0x10(%ebx) default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 111cda: 31 c0 xor %eax,%eax 111cdc: 31 d2 xor %edx,%edx } 111cde: 8d 65 f4 lea -0xc(%ebp),%esp 111ce1: 5b pop %ebx 111ce2: 5e pop %esi 111ce3: 5f pop %edi 111ce4: c9 leave 111ce5: c3 ret =============================================================================== 00111ad8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111ad8: 55 push %ebp 111ad9: 89 e5 mov %esp,%ebp 111adb: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 111ade: 8b 50 18 mov 0x18(%eax),%edx 111ae1: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 111ae5: 74 09 je 111af0 <== ALWAYS TAKEN return -1; /* It wasn't a directory --> return error */ 111ae7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED iop->offset = 0; return 0; } 111aec: c9 leave <== NOT EXECUTED 111aed: c3 ret <== NOT EXECUTED 111aee: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 111af0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 111af7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) return 0; 111afe: 31 c0 xor %eax,%eax } 111b00: c9 leave 111b01: c3 ret =============================================================================== 00111b04 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111b04: 55 push %ebp 111b05: 89 e5 mov %esp,%ebp 111b07: 57 push %edi 111b08: 56 push %esi 111b09: 53 push %ebx 111b0a: 81 ec 4c 01 00 00 sub $0x14c,%esp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 111b10: 8b 55 08 mov 0x8(%ebp),%edx 111b13: 8b 42 18 mov 0x18(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111b16: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111b19: 83 c0 54 add $0x54,%eax 111b1c: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 111b22: 39 c3 cmp %eax,%ebx 111b24: 0f 84 2a 01 00 00 je 111c54 <== NEVER TAKEN /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 111b2a: 8b 42 0c mov 0xc(%edx),%eax 111b2d: 89 85 d4 fe ff ff mov %eax,-0x12c(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 111b33: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 111b38: 8b 45 10 mov 0x10(%ebp),%eax 111b3b: f7 e2 mul %edx 111b3d: c1 ea 08 shr $0x8,%edx 111b40: 89 d0 mov %edx,%eax 111b42: c1 e0 04 shl $0x4,%eax 111b45: c1 e2 08 shl $0x8,%edx 111b48: 8d 14 10 lea (%eax,%edx,1),%edx 111b4b: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx 111b51: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111b57: 85 d2 test %edx,%edx 111b59: 0f 8e f5 00 00 00 jle 111c54 <== NEVER TAKEN 111b5f: 31 d2 xor %edx,%edx 111b61: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 111b68: 00 00 00 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 111b6b: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 111b71: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 111b77: eb 23 jmp 111b9c 111b79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 111b7c: 8b 1b mov (%ebx),%ebx * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 111b7e: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111b84: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 111b8a: 0f 8e b4 00 00 00 jle 111c44 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 111b90: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111b96: 0f 84 a8 00 00 00 je 111c44 <== NEVER TAKEN /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 111b9c: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 111ba2: 7f d8 jg 111b7c <== ALWAYS TAKEN /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 111ba4: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 111baa: 89 d0 mov %edx,%eax 111bac: c1 f8 1f sar $0x1f,%eax 111baf: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 111bb5: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 111bbc: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 111bbe: 8b 43 38 mov 0x38(%ebx),%eax 111bc1: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 111bc7: 8d 73 0c lea 0xc(%ebx),%esi 111bca: 31 c0 xor %eax,%eax 111bcc: b9 ff ff ff ff mov $0xffffffff,%ecx 111bd1: 89 f7 mov %esi,%edi 111bd3: f2 ae repnz scas %es:(%edi),%al 111bd5: f7 d1 not %ecx 111bd7: 49 dec %ecx 111bd8: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 111bdf: 83 ec 08 sub $0x8,%esp 111be2: 56 push %esi 111be3: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 111be9: 50 push %eax 111bea: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 111bf0: e8 7f 13 00 00 call 112f74 memcpy( 111bf5: 8b 45 0c mov 0xc(%ebp),%eax 111bf8: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 111bfe: b9 44 00 00 00 mov $0x44,%ecx 111c03: 89 c7 mov %eax,%edi 111c05: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 111c0b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 111c0d: 8b 45 08 mov 0x8(%ebp),%eax 111c10: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 111c17: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 111c1b: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 111c22: 01 00 00 111c25: 83 c4 10 add $0x10,%esp 111c28: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 111c2e: 8b 1b mov (%ebx),%ebx * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 111c30: 81 c2 10 01 00 00 add $0x110,%edx /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 111c36: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 111c3c: 0f 8f 4e ff ff ff jg 111b90 <== NEVER TAKEN 111c42: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 111c44: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111c4a: 8d 65 f4 lea -0xc(%ebp),%esp 111c4d: 5b pop %ebx 111c4e: 5e pop %esi 111c4f: 5f pop %edi 111c50: c9 leave 111c51: c3 ret 111c52: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; 111c54: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 111c5b: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 111c5e: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111c64: 8d 65 f4 lea -0xc(%ebp),%esp 111c67: 5b pop %ebx 111c68: 5e pop %esi 111c69: 5f pop %edi 111c6a: c9 leave 111c6b: c3 ret =============================================================================== 00111d9c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 111d9c: 55 push %ebp 111d9d: 89 e5 mov %esp,%ebp 111d9f: 53 push %ebx 111da0: 83 ec 04 sub $0x4,%esp 111da3: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 111da6: 8b 18 mov (%eax),%ebx 111da8: 8d 53 54 lea 0x54(%ebx),%edx /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 111dab: 39 53 50 cmp %edx,0x50(%ebx) 111dae: 75 44 jne 111df4 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 111db0: 8b 40 10 mov 0x10(%eax),%eax 111db3: 3b 58 1c cmp 0x1c(%eax),%ebx 111db6: 74 24 je 111ddc /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 111db8: 8b 4b 5c mov 0x5c(%ebx),%ecx 111dbb: 85 c9 test %ecx,%ecx 111dbd: 75 1d jne 111ddc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 111dbf: 83 ec 0c sub $0xc,%esp 111dc2: 53 push %ebx 111dc3: e8 8c d9 ff ff call 10f754 IMFS_check_node_remove( the_jnode ); 111dc8: 89 1c 24 mov %ebx,(%esp) 111dcb: e8 c8 d9 ff ff call 10f798 return 0; 111dd0: 83 c4 10 add $0x10,%esp 111dd3: 31 c0 xor %eax,%eax } 111dd5: 8b 5d fc mov -0x4(%ebp),%ebx 111dd8: c9 leave 111dd9: c3 ret 111dda: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 111ddc: e8 cf 04 00 00 call 1122b0 <__errno> 111de1: c7 00 10 00 00 00 movl $0x10,(%eax) 111de7: b8 ff ff ff ff mov $0xffffffff,%eax IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 111dec: 8b 5d fc mov -0x4(%ebp),%ebx 111def: c9 leave 111df0: c3 ret 111df1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 111df4: e8 b7 04 00 00 call 1122b0 <__errno> 111df9: c7 00 5a 00 00 00 movl $0x5a,(%eax) 111dff: b8 ff ff ff ff mov $0xffffffff,%eax 111e04: eb cf jmp 111dd5 =============================================================================== 00108a14 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 108a14: 55 push %ebp 108a15: 89 e5 mov %esp,%ebp 108a17: 53 push %ebx 108a18: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 108a1b: 80 3d 88 71 12 00 00 cmpb $0x0,0x127188 108a22: 74 08 je 108a2c fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108a24: 8b 5d fc mov -0x4(%ebp),%ebx 108a27: c9 leave 108a28: c3 ret 108a29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 108a2c: c6 05 88 71 12 00 01 movb $0x1,0x127188 mkdir("/etc", 0777); 108a33: 83 ec 08 sub $0x8,%esp 108a36: 68 ff 01 00 00 push $0x1ff 108a3b: 68 08 14 12 00 push $0x121408 108a40: e8 37 08 00 00 call 10927c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 108a45: 59 pop %ecx 108a46: 5b pop %ebx 108a47: 68 32 ff 11 00 push $0x11ff32 108a4c: 68 0d 14 12 00 push $0x12140d 108a51: e8 26 af 00 00 call 11397c 108a56: 83 c4 10 add $0x10,%esp 108a59: 85 c0 test %eax,%eax 108a5b: 74 77 je 108ad4 fclose(fp); 108a5d: 83 ec 0c sub $0xc,%esp 108a60: 50 push %eax 108a61: e8 12 a8 00 00 call 113278 108a66: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108a69: 83 ec 08 sub $0x8,%esp 108a6c: 68 32 ff 11 00 push $0x11ff32 108a71: 68 19 14 12 00 push $0x121419 108a76: e8 01 af 00 00 call 11397c 108a7b: 83 c4 10 add $0x10,%esp 108a7e: 85 c0 test %eax,%eax 108a80: 74 12 je 108a94 fclose(fp); 108a82: 83 ec 0c sub $0xc,%esp 108a85: 50 push %eax 108a86: e8 ed a7 00 00 call 113278 108a8b: 83 c4 10 add $0x10,%esp fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108a8e: 8b 5d fc mov -0x4(%ebp),%ebx 108a91: c9 leave 108a92: c3 ret 108a93: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108a94: 83 ec 08 sub $0x8,%esp 108a97: 68 14 fe 11 00 push $0x11fe14 108a9c: 68 19 14 12 00 push $0x121419 108aa1: e8 d6 ae 00 00 call 11397c 108aa6: 89 c3 mov %eax,%ebx 108aa8: 83 c4 10 add $0x10,%esp 108aab: 85 c0 test %eax,%eax 108aad: 0f 84 71 ff ff ff je 108a24 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108ab3: 50 push %eax 108ab4: 6a 2a push $0x2a 108ab6: 6a 01 push $0x1 108ab8: 68 8c 14 12 00 push $0x12148c 108abd: e8 8e b6 00 00 call 114150 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108ac2: 89 1c 24 mov %ebx,(%esp) 108ac5: e8 ae a7 00 00 call 113278 108aca: 83 c4 10 add $0x10,%esp 108acd: e9 52 ff ff ff jmp 108a24 108ad2: 66 90 xchg %ax,%ax <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 108ad4: 83 ec 08 sub $0x8,%esp 108ad7: 68 14 fe 11 00 push $0x11fe14 108adc: 68 0d 14 12 00 push $0x12140d 108ae1: e8 96 ae 00 00 call 11397c 108ae6: 89 c3 mov %eax,%ebx 108ae8: 83 c4 10 add $0x10,%esp 108aeb: 85 c0 test %eax,%eax 108aed: 0f 84 76 ff ff ff je 108a69 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108af3: 50 push %eax 108af4: 6a 66 push $0x66 108af6: 6a 01 push $0x1 108af8: 68 24 14 12 00 push $0x121424 108afd: e8 4e b6 00 00 call 114150 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 108b02: 89 1c 24 mov %ebx,(%esp) 108b05: e8 6e a7 00 00 call 113278 108b0a: 83 c4 10 add $0x10,%esp 108b0d: e9 57 ff ff ff jmp 108a69 =============================================================================== 00109f4c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 109f4c: 55 push %ebp 109f4d: 89 e5 mov %esp,%ebp 109f4f: 56 push %esi 109f50: 53 push %ebx 109f51: 89 d6 mov %edx,%esi 109f53: 88 c3 mov %al,%bl if (tty->termios.c_iflag & ISTRIP) 109f55: 8b 42 30 mov 0x30(%edx),%eax 109f58: a8 20 test $0x20,%al 109f5a: 74 03 je 109f5f <== ALWAYS TAKEN c &= 0x7f; 109f5c: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 109f5f: f6 c4 02 test $0x2,%ah 109f62: 74 18 je 109f7c c = tolower (c); 109f64: 0f b6 db movzbl %bl,%ebx 109f67: 8b 15 b4 31 12 00 mov 0x1231b4,%edx 109f6d: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx 109f72: 83 e2 03 and $0x3,%edx 109f75: 4a dec %edx 109f76: 0f 84 9c 00 00 00 je 10a018 if (c == '\r') { 109f7c: 80 fb 0d cmp $0xd,%bl 109f7f: 74 33 je 109fb4 if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 109f81: 80 fb 0a cmp $0xa,%bl 109f84: 0f 84 86 00 00 00 je 10a010 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109f8a: 84 db test %bl,%bl 109f8c: 75 3a jne 109fc8 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 109f8e: 8b 46 20 mov 0x20(%esi),%eax 109f91: 8b 15 20 31 12 00 mov 0x123120,%edx 109f97: 4a dec %edx 109f98: 39 d0 cmp %edx,%eax 109f9a: 7d 1c jge 109fb8 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 109f9c: f6 46 3c 08 testb $0x8,0x3c(%esi) 109fa0: 75 7e jne 10a020 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 109fa2: 8b 56 1c mov 0x1c(%esi),%edx 109fa5: 88 1c 02 mov %bl,(%edx,%eax,1) 109fa8: 40 inc %eax 109fa9: 89 46 20 mov %eax,0x20(%esi) } return 0; 109fac: 31 c0 xor %eax,%eax } 109fae: 5b pop %ebx 109faf: 5e pop %esi 109fb0: c9 leave 109fb1: c3 ret 109fb2: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 109fb4: a8 80 test $0x80,%al 109fb6: 74 08 je 109fc0 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 109fb8: 31 c0 xor %eax,%eax <== NOT EXECUTED } 109fba: 5b pop %ebx <== NOT EXECUTED 109fbb: 5e pop %esi <== NOT EXECUTED 109fbc: c9 leave <== NOT EXECUTED 109fbd: c3 ret <== NOT EXECUTED 109fbe: 66 90 xchg %ax,%ax <== NOT EXECUTED c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 109fc0: f6 c4 01 test $0x1,%ah 109fc3: 74 03 je 109fc8 <== NEVER TAKEN c = '\n'; 109fc5: b3 0a mov $0xa,%bl 109fc7: 90 nop } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 109fc8: 8b 46 3c mov 0x3c(%esi),%eax 109fcb: a8 02 test $0x2,%al 109fcd: 74 bf je 109f8e if (c == tty->termios.c_cc[VERASE]) { 109fcf: 38 5e 43 cmp %bl,0x43(%esi) 109fd2: 0f 84 b0 00 00 00 je 10a088 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 109fd8: 38 5e 44 cmp %bl,0x44(%esi) 109fdb: 74 63 je 10a040 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 109fdd: 38 5e 45 cmp %bl,0x45(%esi) 109fe0: 0f 84 96 00 00 00 je 10a07c <== NEVER TAKEN return 1; } else if (c == '\n') { 109fe6: 80 fb 0a cmp $0xa,%bl 109fe9: 74 69 je 10a054 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 109feb: 38 5e 4c cmp %bl,0x4c(%esi) 109fee: 74 05 je 109ff5 <== NEVER TAKEN 109ff0: 38 5e 51 cmp %bl,0x51(%esi) 109ff3: 75 99 jne 109f8e <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 109ff5: a8 08 test $0x8,%al <== NOT EXECUTED 109ff7: 75 3b jne 10a034 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 109ff9: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 109ffc: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 109fff: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a002: 40 inc %eax <== NOT EXECUTED 10a003: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED return 1; 10a006: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a00b: eb a1 jmp 109fae <== NOT EXECUTED 10a00d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a010: a8 40 test $0x40,%al 10a012: 74 b4 je 109fc8 <== ALWAYS TAKEN c = '\r'; 10a014: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a016: eb b0 jmp 109fc8 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a018: 83 c3 20 add $0x20,%ebx 10a01b: e9 5c ff ff ff jmp 109f7c /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a020: 0f b6 c3 movzbl %bl,%eax 10a023: 89 f2 mov %esi,%edx 10a025: e8 f2 fc ff ff call 109d1c 10a02a: 8b 46 20 mov 0x20(%esi),%eax 10a02d: e9 70 ff ff ff jmp 109fa2 10a032: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a034: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a037: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a039: e8 de fc ff ff call 109d1c <== NOT EXECUTED 10a03e: eb b9 jmp 109ff9 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 10a040: ba 01 00 00 00 mov $0x1,%edx 10a045: 89 f0 mov %esi,%eax 10a047: e8 34 fd ff ff call 109d80 return 0; 10a04c: 31 c0 xor %eax,%eax 10a04e: e9 5b ff ff ff jmp 109fae 10a053: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10a054: a8 48 test $0x48,%al 10a056: 74 0c je 10a064 <== NEVER TAKEN echo (c, tty); 10a058: 89 f2 mov %esi,%edx 10a05a: b8 0a 00 00 00 mov $0xa,%eax 10a05f: e8 b8 fc ff ff call 109d1c tty->cbuf[tty->ccount++] = c; 10a064: 8b 46 20 mov 0x20(%esi),%eax 10a067: 8b 56 1c mov 0x1c(%esi),%edx 10a06a: c6 04 02 0a movb $0xa,(%edx,%eax,1) 10a06e: 40 inc %eax 10a06f: 89 46 20 mov %eax,0x20(%esi) return 1; 10a072: b8 01 00 00 00 mov $0x1,%eax 10a077: e9 32 ff ff ff jmp 109fae else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 10a07c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a081: e9 28 ff ff ff jmp 109fae <== NOT EXECUTED 10a086: 66 90 xchg %ax,%ax <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a088: 31 d2 xor %edx,%edx 10a08a: 89 f0 mov %esi,%eax 10a08c: e8 ef fc ff ff call 109d80 return 0; 10a091: 31 c0 xor %eax,%eax 10a093: e9 16 ff ff ff jmp 109fae =============================================================================== 00122e30 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 122e30: 55 push %ebp <== NOT EXECUTED 122e31: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 122e33: 31 c0 xor %eax,%eax <== NOT EXECUTED 122e35: c9 leave <== NOT EXECUTED 122e36: c3 ret <== NOT EXECUTED =============================================================================== 0011d8f4 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11d8f4: 55 push %ebp 11d8f5: 89 e5 mov %esp,%ebp 11d8f7: 53 push %ebx 11d8f8: 83 ec 04 sub $0x4,%esp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 11d8fb: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 11d902: 74 08 je 11d90c <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 11d904: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11d907: c9 leave <== NOT EXECUTED 11d908: c3 ret <== NOT EXECUTED 11d909: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11d90c: 8b 1d 40 04 12 00 mov 0x120440,%ebx 11d912: 39 1d c0 31 12 00 cmp %ebx,0x1231c0 11d918: 74 12 je 11d92c _wrapup_reent(_global_impure_ptr); 11d91a: 83 ec 0c sub $0xc,%esp 11d91d: 53 push %ebx 11d91e: e8 f5 05 00 00 call 11df18 <_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; 11d923: 89 1d c0 31 12 00 mov %ebx,0x1231c0 11d929: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11d92c: 83 ec 0c sub $0xc,%esp 11d92f: ff 73 04 pushl 0x4(%ebx) 11d932: e8 d1 4a ff ff call 112408 fclose (stdout); 11d937: 5a pop %edx 11d938: a1 c0 31 12 00 mov 0x1231c0,%eax 11d93d: ff 70 08 pushl 0x8(%eax) 11d940: e8 c3 4a ff ff call 112408 fclose (stderr); 11d945: 58 pop %eax 11d946: a1 c0 31 12 00 mov 0x1231c0,%eax 11d94b: ff 70 0c pushl 0xc(%eax) 11d94e: e8 b5 4a ff ff call 112408 11d953: 83 c4 10 add $0x10,%esp } 11d956: 8b 5d fc mov -0x4(%ebp),%ebx 11d959: c9 leave 11d95a: c3 ret =============================================================================== 0010b548 : int link( const char *existing, const char *new ) { 10b548: 55 push %ebp 10b549: 89 e5 mov %esp,%ebp 10b54b: 57 push %edi 10b54c: 56 push %esi 10b54d: 53 push %ebx 10b54e: 83 ec 58 sub $0x58,%esp 10b551: 8b 55 08 mov 0x8(%ebp),%edx 10b554: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 10b557: 31 c0 xor %eax,%eax 10b559: b9 ff ff ff ff mov $0xffffffff,%ecx 10b55e: 89 d7 mov %edx,%edi 10b560: f2 ae repnz scas %es:(%edi),%al 10b562: f7 d1 not %ecx 10b564: 49 dec %ecx 10b565: 6a 01 push $0x1 10b567: 8d 75 cc lea -0x34(%ebp),%esi 10b56a: 56 push %esi 10b56b: 6a 00 push $0x0 10b56d: 51 push %ecx 10b56e: 52 push %edx 10b56f: e8 28 f9 ff ff call 10ae9c 0, &existing_loc, true ); if ( result != 0 ) 10b574: 83 c4 20 add $0x20,%esp 10b577: 85 c0 test %eax,%eax 10b579: 74 0d je 10b588 return -1; 10b57b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10b580: 8d 65 f4 lea -0xc(%ebp),%esp 10b583: 5b pop %ebx 10b584: 5e pop %esi 10b585: 5f pop %edi 10b586: c9 leave 10b587: c3 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 10b588: 52 push %edx 10b589: 8d 7d b8 lea -0x48(%ebp),%edi 10b58c: 57 push %edi 10b58d: 8d 45 e4 lea -0x1c(%ebp),%eax 10b590: 50 push %eax 10b591: 53 push %ebx 10b592: e8 f5 12 00 00 call 10c88c result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 10b597: 83 c4 0c add $0xc,%esp 10b59a: 8d 45 e0 lea -0x20(%ebp),%eax 10b59d: 50 push %eax 10b59e: 57 push %edi 10b59f: 03 5d e4 add -0x1c(%ebp),%ebx 10b5a2: 53 push %ebx 10b5a3: 8b 45 c4 mov -0x3c(%ebp),%eax 10b5a6: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10b5a9: 83 c4 10 add $0x10,%esp 10b5ac: 85 c0 test %eax,%eax 10b5ae: 75 61 jne 10b611 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 10b5b0: 8b 45 dc mov -0x24(%ebp),%eax 10b5b3: 39 45 c8 cmp %eax,-0x38(%ebp) 10b5b6: 75 30 jne 10b5e8 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 10b5b8: 50 push %eax 10b5b9: ff 75 e0 pushl -0x20(%ebp) 10b5bc: 57 push %edi 10b5bd: 56 push %esi 10b5be: 8b 45 c4 mov -0x3c(%ebp),%eax 10b5c1: ff 50 08 call *0x8(%eax) rtems_filesystem_freenode( &existing_loc ); 10b5c4: 89 34 24 mov %esi,(%esp) 10b5c7: 89 45 b4 mov %eax,-0x4c(%ebp) 10b5ca: e8 81 fb ff ff call 10b150 rtems_filesystem_freenode( &parent_loc ); 10b5cf: 89 3c 24 mov %edi,(%esp) 10b5d2: e8 79 fb ff ff call 10b150 return result; 10b5d7: 83 c4 10 add $0x10,%esp 10b5da: 8b 45 b4 mov -0x4c(%ebp),%eax } 10b5dd: 8d 65 f4 lea -0xc(%ebp),%esp 10b5e0: 5b pop %ebx 10b5e1: 5e pop %esi 10b5e2: 5f pop %edi 10b5e3: c9 leave 10b5e4: c3 ret 10b5e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 10b5e8: 83 ec 0c sub $0xc,%esp 10b5eb: 56 push %esi 10b5ec: e8 5f fb ff ff call 10b150 rtems_filesystem_freenode( &parent_loc ); 10b5f1: 89 3c 24 mov %edi,(%esp) 10b5f4: e8 57 fb ff ff call 10b150 rtems_set_errno_and_return_minus_one( EXDEV ); 10b5f9: e8 e2 a8 00 00 call 115ee0 <__errno> 10b5fe: c7 00 12 00 00 00 movl $0x12,(%eax) 10b604: 83 c4 10 add $0x10,%esp 10b607: b8 ff ff ff ff mov $0xffffffff,%eax 10b60c: e9 6f ff ff ff jmp 10b580 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 10b611: 83 ec 0c sub $0xc,%esp 10b614: 56 push %esi 10b615: e8 36 fb ff ff call 10b150 return -1; 10b61a: 83 c4 10 add $0x10,%esp 10b61d: b8 ff ff ff ff mov $0xffffffff,%eax 10b622: e9 59 ff ff ff jmp 10b580 =============================================================================== 0011d7cc : off_t lseek( int fd, off_t offset, int whence ) { 11d7cc: 55 push %ebp 11d7cd: 89 e5 mov %esp,%ebp 11d7cf: 57 push %edi 11d7d0: 56 push %esi 11d7d1: 53 push %ebx 11d7d2: 83 ec 1c sub $0x1c,%esp 11d7d5: 8b 5d 08 mov 0x8(%ebp),%ebx 11d7d8: 8b 55 0c mov 0xc(%ebp),%edx 11d7db: 8b 4d 10 mov 0x10(%ebp),%ecx 11d7de: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11d7e1: 3b 1d 4c 11 12 00 cmp 0x12114c,%ebx 11d7e7: 0f 83 b3 00 00 00 jae 11d8a0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11d7ed: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 11d7f4: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 11d7fb: 29 f3 sub %esi,%ebx 11d7fd: 03 1d c0 52 12 00 add 0x1252c0,%ebx rtems_libio_check_is_open(iop); 11d803: f6 43 15 01 testb $0x1,0x15(%ebx) 11d807: 0f 84 93 00 00 00 je 11d8a0 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 11d80d: 8b 73 0c mov 0xc(%ebx),%esi 11d810: 8b 7b 10 mov 0x10(%ebx),%edi 11d813: 89 75 e0 mov %esi,-0x20(%ebp) 11d816: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11d819: 83 f8 01 cmp $0x1,%eax 11d81c: 74 6e je 11d88c 11d81e: 83 f8 02 cmp $0x2,%eax 11d821: 74 35 je 11d858 11d823: 85 c0 test %eax,%eax 11d825: 75 45 jne 11d86c case SEEK_SET: iop->offset = offset; 11d827: 89 53 0c mov %edx,0xc(%ebx) 11d82a: 89 4b 10 mov %ecx,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 11d82d: 8b 73 20 mov 0x20(%ebx),%esi 11d830: 50 push %eax 11d831: 51 push %ecx 11d832: 52 push %edx 11d833: 53 push %ebx 11d834: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11d837: 83 c4 10 add $0x10,%esp 11d83a: 89 c1 mov %eax,%ecx 11d83c: 21 d1 and %edx,%ecx 11d83e: 41 inc %ecx 11d83f: 75 0c jne 11d84d iop->offset = old_offset; 11d841: 8b 75 e0 mov -0x20(%ebp),%esi 11d844: 8b 7d e4 mov -0x1c(%ebp),%edi 11d847: 89 73 0c mov %esi,0xc(%ebx) 11d84a: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11d84d: 8d 65 f4 lea -0xc(%ebp),%esp 11d850: 5b pop %ebx 11d851: 5e pop %esi 11d852: 5f pop %edi 11d853: c9 leave 11d854: c3 ret 11d855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11d858: 89 d6 mov %edx,%esi 11d85a: 89 cf mov %ecx,%edi 11d85c: 03 73 04 add 0x4(%ebx),%esi 11d85f: 13 7b 08 adc 0x8(%ebx),%edi 11d862: 89 73 0c mov %esi,0xc(%ebx) 11d865: 89 7b 10 mov %edi,0x10(%ebx) break; 11d868: eb c3 jmp 11d82d 11d86a: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 11d86c: e8 3f 4a ff ff call 1122b0 <__errno> 11d871: c7 00 16 00 00 00 movl $0x16,(%eax) 11d877: b8 ff ff ff ff mov $0xffffffff,%eax 11d87c: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11d881: 8d 65 f4 lea -0xc(%ebp),%esp 11d884: 5b pop %ebx 11d885: 5e pop %esi 11d886: 5f pop %edi 11d887: c9 leave 11d888: c3 ret 11d889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11d88c: 8b 75 e0 mov -0x20(%ebp),%esi 11d88f: 8b 7d e4 mov -0x1c(%ebp),%edi 11d892: 01 d6 add %edx,%esi 11d894: 11 cf adc %ecx,%edi 11d896: 89 73 0c mov %esi,0xc(%ebx) 11d899: 89 7b 10 mov %edi,0x10(%ebx) break; 11d89c: eb 8f jmp 11d82d 11d89e: 66 90 xchg %ax,%ax <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 11d8a0: e8 0b 4a ff ff call 1122b0 <__errno> 11d8a5: c7 00 09 00 00 00 movl $0x9,(%eax) 11d8ab: b8 ff ff ff ff mov $0xffffffff,%eax 11d8b0: ba ff ff ff ff mov $0xffffffff,%edx 11d8b5: eb 96 jmp 11d84d =============================================================================== 00109e08 : int _STAT_NAME( const char *path, struct stat *buf ) { 109e08: 55 push %ebp 109e09: 89 e5 mov %esp,%ebp 109e0b: 57 push %edi 109e0c: 56 push %esi 109e0d: 53 push %ebx 109e0e: 83 ec 3c sub $0x3c,%esp 109e11: 8b 55 08 mov 0x8(%ebp),%edx 109e14: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 109e17: 85 f6 test %esi,%esi 109e19: 74 65 je 109e80 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 109e1b: b9 ff ff ff ff mov $0xffffffff,%ecx 109e20: 89 d7 mov %edx,%edi 109e22: 31 c0 xor %eax,%eax 109e24: f2 ae repnz scas %es:(%edi),%al 109e26: f7 d1 not %ecx 109e28: 49 dec %ecx 109e29: 83 ec 0c sub $0xc,%esp 109e2c: 6a 00 push $0x0 109e2e: 8d 5d d4 lea -0x2c(%ebp),%ebx 109e31: 53 push %ebx 109e32: 6a 00 push $0x0 109e34: 51 push %ecx 109e35: 52 push %edx 109e36: e8 05 fa ff ff call 109840 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 109e3b: 83 c4 20 add $0x20,%esp 109e3e: 85 c0 test %eax,%eax 109e40: 74 0e je 109e50 return -1; 109e42: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 109e47: 8d 65 f4 lea -0xc(%ebp),%esp 109e4a: 5b pop %ebx 109e4b: 5e pop %esi 109e4c: 5f pop %edi 109e4d: c9 leave 109e4e: c3 ret 109e4f: 90 nop <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 109e50: b9 48 00 00 00 mov $0x48,%ecx 109e55: 89 f7 mov %esi,%edi 109e57: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 109e59: 83 ec 08 sub $0x8,%esp 109e5c: 56 push %esi 109e5d: 53 push %ebx 109e5e: 8b 45 dc mov -0x24(%ebp),%eax 109e61: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 109e64: 89 1c 24 mov %ebx,(%esp) 109e67: 89 45 c4 mov %eax,-0x3c(%ebp) 109e6a: e8 a9 fa ff ff call 109918 return status; 109e6f: 83 c4 10 add $0x10,%esp 109e72: 8b 45 c4 mov -0x3c(%ebp),%eax } 109e75: 8d 65 f4 lea -0xc(%ebp),%esp 109e78: 5b pop %ebx 109e79: 5e pop %esi 109e7a: 5f pop %edi 109e7b: c9 leave 109e7c: c3 ret 109e7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 109e80: e8 cf a0 00 00 call 113f54 <__errno> 109e85: c7 00 0e 00 00 00 movl $0xe,(%eax) 109e8b: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 109e90: 8d 65 f4 lea -0xc(%ebp),%esp 109e93: 5b pop %ebx 109e94: 5e pop %esi 109e95: 5f pop %edi 109e96: c9 leave 109e97: c3 ret =============================================================================== 00108368 : #include "malloc_p.h" void *malloc( size_t size ) { 108368: 55 push %ebp 108369: 89 e5 mov %esp,%ebp 10836b: 56 push %esi 10836c: 53 push %ebx 10836d: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 108370: ff 05 e4 52 12 00 incl 0x1252e4 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 108376: e8 fd fe ff ff call 108278 /* * Validate the parameters */ if ( !size ) 10837b: 85 f6 test %esi,%esi 10837d: 74 5d je 1083dc return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 10837f: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 108386: 74 48 je 1083d0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108388: 6a 00 push $0x0 10838a: 6a 00 push $0x0 10838c: 56 push %esi 10838d: ff 35 58 11 12 00 pushl 0x121158 108393: e8 48 4c 00 00 call 10cfe0 <_Protected_heap_Allocate_aligned_with_boundary> 108398: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10839a: 83 c4 10 add $0x10,%esp 10839d: 85 c0 test %eax,%eax 10839f: 74 47 je 1083e8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1083a1: a1 d0 36 12 00 mov 0x1236d0,%eax 1083a6: 85 c0 test %eax,%eax 1083a8: 74 0a je 1083b4 (*rtems_malloc_dirty_helper)( return_this, size ); 1083aa: 83 ec 08 sub $0x8,%esp 1083ad: 56 push %esi 1083ae: 53 push %ebx 1083af: ff d0 call *%eax 1083b1: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1083b4: a1 c8 36 12 00 mov 0x1236c8,%eax 1083b9: 85 c0 test %eax,%eax 1083bb: 74 0a je 1083c7 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1083bd: 83 ec 0c sub $0xc,%esp 1083c0: 53 push %ebx 1083c1: ff 50 04 call *0x4(%eax) 1083c4: 83 c4 10 add $0x10,%esp return return_this; } 1083c7: 89 d8 mov %ebx,%eax 1083c9: 8d 65 f8 lea -0x8(%ebp),%esp 1083cc: 5b pop %ebx 1083cd: 5e pop %esi 1083ce: c9 leave 1083cf: c3 ret /* * 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() ) 1083d0: e8 63 fe ff ff call 108238 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1083d5: 84 c0 test %al,%al 1083d7: 75 af jne 108388 <== ALWAYS TAKEN 1083d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED !malloc_is_system_state_OK() ) return NULL; 1083dc: 31 db xor %ebx,%ebx */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 1083de: 89 d8 mov %ebx,%eax 1083e0: 8d 65 f8 lea -0x8(%ebp),%esp 1083e3: 5b pop %ebx 1083e4: 5e pop %esi 1083e5: c9 leave 1083e6: c3 ret 1083e7: 90 nop <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1083e8: a1 cc 36 12 00 mov 0x1236cc,%eax 1083ed: 85 c0 test %eax,%eax 1083ef: 74 12 je 108403 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1083f1: 83 ec 0c sub $0xc,%esp 1083f4: 56 push %esi 1083f5: ff 50 04 call *0x4(%eax) if ( !return_this ) { 1083f8: 83 c4 10 add $0x10,%esp 1083fb: 85 c0 test %eax,%eax 1083fd: 74 04 je 108403 1083ff: 89 c3 mov %eax,%ebx 108401: eb 9e jmp 1083a1 errno = ENOMEM; 108403: e8 a8 9e 00 00 call 1122b0 <__errno> 108408: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 10840e: eb b7 jmp 1083c7 =============================================================================== 001082dc : #include "malloc_p.h" int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { 1082dc: 55 push %ebp 1082dd: 89 e5 mov %esp,%ebp 1082df: 57 push %edi 1082e0: 56 push %esi 1082e1: 53 push %ebx 1082e2: 83 ec 0c sub $0xc,%esp 1082e5: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !stats ) 1082e8: 85 db test %ebx,%ebx 1082ea: 74 38 je 108324 return -1; _RTEMS_Lock_allocator(); 1082ec: 83 ec 0c sub $0xc,%esp 1082ef: ff 35 e4 54 12 00 pushl 0x1254e4 1082f5: e8 1e 3c 00 00 call 10bf18 <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 1082fa: be e0 52 12 00 mov $0x1252e0,%esi 1082ff: b9 0b 00 00 00 mov $0xb,%ecx 108304: 89 df mov %ebx,%edi 108306: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _RTEMS_Unlock_allocator(); 108308: 58 pop %eax 108309: ff 35 e4 54 12 00 pushl 0x1254e4 10830f: e8 4c 3c 00 00 call 10bf60 <_API_Mutex_Unlock> return 0; 108314: 83 c4 10 add $0x10,%esp 108317: 31 c0 xor %eax,%eax } 108319: 8d 65 f4 lea -0xc(%ebp),%esp 10831c: 5b pop %ebx 10831d: 5e pop %esi 10831e: 5f pop %edi 10831f: c9 leave 108320: c3 ret 108321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { if ( !stats ) return -1; 108324: b8 ff ff ff ff mov $0xffffffff,%eax _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; _RTEMS_Unlock_allocator(); return 0; } 108329: 8d 65 f4 lea -0xc(%ebp),%esp 10832c: 5b pop %ebx 10832d: 5e pop %esi 10832e: 5f pop %edi 10832f: c9 leave 108330: c3 ret =============================================================================== 0010ac6c : */ int malloc_info( Heap_Information_block *the_info ) { 10ac6c: 55 push %ebp 10ac6d: 89 e5 mov %esp,%ebp 10ac6f: 83 ec 08 sub $0x8,%esp 10ac72: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 10ac75: 85 c0 test %eax,%eax 10ac77: 74 17 je 10ac90 return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 10ac79: 83 ec 08 sub $0x8,%esp 10ac7c: 50 push %eax 10ac7d: ff 35 38 86 12 00 pushl 0x128638 10ac83: e8 98 5d 00 00 call 110a20 <_Protected_heap_Get_information> return 0; 10ac88: 83 c4 10 add $0x10,%esp 10ac8b: 31 c0 xor %eax,%eax } 10ac8d: c9 leave 10ac8e: c3 ret 10ac8f: 90 nop <== NOT EXECUTED int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) return -1; 10ac90: b8 ff ff ff ff mov $0xffffffff,%eax _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 10ac95: c9 leave 10ac96: c3 ret =============================================================================== 001086fc : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 1086fc: 55 push %ebp 1086fd: 89 e5 mov %esp,%ebp 1086ff: 56 push %esi 108700: 53 push %ebx 108701: 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; 108704: 8b 0d ac 68 12 00 mov 0x1268ac,%ecx if ( sbrk_amount == 0 ) 10870a: 85 c9 test %ecx,%ecx 10870c: 75 0a jne 108718 <== ALWAYS TAKEN the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 10870e: 31 c0 xor %eax,%eax MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 108710: 8d 65 f8 lea -0x8(%ebp),%esp 108713: 5b pop %ebx 108714: 5e pop %esi 108715: c9 leave 108716: c3 ret 108717: 90 nop <== NOT EXECUTED sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 108718: 8d 04 0e lea (%esi,%ecx,1),%eax 10871b: 31 d2 xor %edx,%edx 10871d: f7 f1 div %ecx 10871f: 89 c3 mov %eax,%ebx 108721: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 108724: 83 ec 0c sub $0xc,%esp 108727: 53 push %ebx 108728: e8 2f 7d ff ff call 10045c if ( starting_address == (void*) -1 ) 10872d: 83 c4 10 add $0x10,%esp 108730: 83 f8 ff cmp $0xffffffff,%eax 108733: 74 d9 je 10870e return (void *) 0; if ( !_Protected_heap_Extend( 108735: 52 push %edx 108736: 53 push %ebx 108737: 50 push %eax 108738: ff 35 98 25 12 00 pushl 0x122598 10873e: e8 51 4c 00 00 call 10d394 <_Protected_heap_Extend> 108743: 83 c4 10 add $0x10,%esp 108746: 84 c0 test %al,%al 108748: 74 1b je 108765 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 10874a: 01 1d 80 68 12 00 add %ebx,0x126880 108750: 6a 00 push $0x0 108752: 6a 00 push $0x0 108754: 56 push %esi 108755: ff 35 98 25 12 00 pushl 0x122598 10875b: e8 fc 4b 00 00 call 10d35c <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 108760: 83 c4 10 add $0x10,%esp 108763: eb ab jmp 108710 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 108765: 83 ec 0c sub $0xc,%esp 108768: f7 db neg %ebx 10876a: 53 push %ebx 10876b: e8 ec 7c ff ff call 10045c errno = ENOMEM; 108770: e8 93 a1 00 00 call 112908 <__errno> 108775: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 10877b: 83 c4 10 add $0x10,%esp 10877e: 31 c0 xor %eax,%eax 108780: eb 8e jmp 108710 =============================================================================== 00111224 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 111224: 55 push %ebp 111225: 89 e5 mov %esp,%ebp 111227: 57 push %edi 111228: 56 push %esi 111229: 53 push %ebx 11122a: 83 ec 0c sub $0xc,%esp 11122d: 8b 7d 0c mov 0xc(%ebp),%edi IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 111230: 8b 45 08 mov 0x8(%ebp),%eax 111233: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 111239: 31 db xor %ebx,%ebx 11123b: 90 nop if ( b[i] ) { 11123c: 8b 04 9e mov (%esi,%ebx,4),%eax 11123f: 85 c0 test %eax,%eax 111241: 74 13 je 111256 memfile_free_block( b[i] ); 111243: 83 ec 0c sub $0xc,%esp 111246: 50 push %eax 111247: e8 bc ff ff ff call 111208 b[i] = 0; 11124c: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 111253: 83 c4 10 add $0x10,%esp /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 11125b: 8b 45 08 mov 0x8(%ebp),%eax 11125e: 8b 30 mov (%eax),%esi /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 111260: 83 ec 0c sub $0xc,%esp 111263: 56 push %esi 111264: e8 9f ff ff ff call 111208 *block_table = 0; 111269: 8b 45 08 mov 0x8(%ebp),%eax 11126c: c7 00 00 00 00 00 movl $0x0,(%eax) 111272: 83 c4 10 add $0x10,%esp } 111275: 8d 65 f4 lea -0xc(%ebp),%esp 111278: 5b pop %ebx 111279: 5e pop %esi 11127a: 5f pop %edi 11127b: c9 leave 11127c: c3 ret =============================================================================== 001117ac : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 1117ac: 55 push %ebp 1117ad: 89 e5 mov %esp,%ebp 1117af: 53 push %ebx 1117b0: 83 ec 14 sub $0x14,%esp 1117b3: 8b 4d 08 mov 0x8(%ebp),%ecx 1117b6: 8b 45 0c mov 0xc(%ebp),%eax 1117b9: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1117bc: 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 ) 1117bf: 39 53 54 cmp %edx,0x54(%ebx) 1117c2: 7f 19 jg 1117dd <== NEVER TAKEN 1117c4: 7d 12 jge 1117d8 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 1117c6: 51 push %ecx 1117c7: 52 push %edx 1117c8: 50 push %eax 1117c9: 53 push %ebx 1117ca: e8 39 fc ff ff call 111408 1117cf: 83 c4 10 add $0x10,%esp iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 1117d2: 8b 5d fc mov -0x4(%ebp),%ebx 1117d5: c9 leave 1117d6: c3 ret 1117d7: 90 nop <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 1117d8: 39 43 50 cmp %eax,0x50(%ebx) 1117db: 72 e9 jb 1117c6 /* * 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; 1117dd: 89 43 50 mov %eax,0x50(%ebx) 1117e0: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 1117e3: 89 41 04 mov %eax,0x4(%ecx) 1117e6: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 1117e9: 83 ec 08 sub $0x8,%esp 1117ec: 6a 00 push $0x0 1117ee: 8d 45 f0 lea -0x10(%ebp),%eax 1117f1: 50 push %eax 1117f2: e8 19 69 ff ff call 108110 1117f7: 8b 45 f0 mov -0x10(%ebp),%eax 1117fa: 89 43 40 mov %eax,0x40(%ebx) return 0; 1117fd: 83 c4 10 add $0x10,%esp 111800: 31 c0 xor %eax,%eax } 111802: 8b 5d fc mov -0x4(%ebp),%ebx 111805: c9 leave 111806: c3 ret =============================================================================== 00111808 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111808: 55 push %ebp 111809: 89 e5 mov %esp,%ebp 11180b: 57 push %edi 11180c: 56 push %esi 11180d: 53 push %ebx 11180e: 83 ec 0c sub $0xc,%esp 111811: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111814: 8b 73 18 mov 0x18(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 111817: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 11181b: 74 2f je 11184c if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 11181d: 57 push %edi 11181e: ff 73 10 pushl 0x10(%ebx) 111821: ff 73 0c pushl 0xc(%ebx) 111824: 56 push %esi 111825: e8 de fb ff ff call 111408 11182a: 83 c4 10 add $0x10,%esp 11182d: 85 c0 test %eax,%eax 11182f: 75 45 jne 111876 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 111831: 8b 46 50 mov 0x50(%esi),%eax 111834: 8b 56 54 mov 0x54(%esi),%edx 111837: 89 43 04 mov %eax,0x4(%ebx) 11183a: 89 53 08 mov %edx,0x8(%ebx) 11183d: 8b 43 0c mov 0xc(%ebx),%eax 111840: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 111843: 8d 65 f4 lea -0xc(%ebp),%esp 111846: 5b pop %ebx 111847: 5e pop %esi 111848: 5f pop %edi 111849: c9 leave 11184a: c3 ret 11184b: 90 nop <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 11184c: 8b 43 0c mov 0xc(%ebx),%eax 11184f: 8b 53 10 mov 0x10(%ebx),%edx 111852: 8b 7e 50 mov 0x50(%esi),%edi 111855: 8b 4e 54 mov 0x54(%esi),%ecx 111858: 39 ca cmp %ecx,%edx 11185a: 7c e7 jl 111843 <== NEVER TAKEN 11185c: 7e 12 jle 111870 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 11185e: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED 111861: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED 111864: 89 f8 mov %edi,%eax <== NOT EXECUTED 111866: 89 ca mov %ecx,%edx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 111868: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11186b: 5b pop %ebx <== NOT EXECUTED 11186c: 5e pop %esi <== NOT EXECUTED 11186d: 5f pop %edi <== NOT EXECUTED 11186e: c9 leave <== NOT EXECUTED 11186f: c3 ret <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 111870: 39 f8 cmp %edi,%eax 111872: 76 cf jbe 111843 <== ALWAYS TAKEN 111874: eb e8 jmp 11185e <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 111876: e8 35 0a 00 00 call 1122b0 <__errno> 11187b: c7 00 1c 00 00 00 movl $0x1c,(%eax) 111881: b8 ff ff ff ff mov $0xffffffff,%eax 111886: ba ff ff ff ff mov $0xffffffff,%edx 11188b: eb b6 jmp 111843 =============================================================================== 00111704 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111704: 55 push %ebp 111705: 89 e5 mov %esp,%ebp 111707: 56 push %esi 111708: 53 push %ebx 111709: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 11170c: 8b 73 18 mov 0x18(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11170f: 8b 43 14 mov 0x14(%ebx),%eax 111712: a9 04 02 00 00 test $0x204,%eax 111717: 74 06 je 11171f && (the_jnode->type == IMFS_LINEAR_FILE)) { 111719: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 11171d: 74 2d je 11174c <== NEVER TAKEN the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11171f: 8b 56 50 mov 0x50(%esi),%edx 111722: 8b 4e 54 mov 0x54(%esi),%ecx return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 111725: f6 c4 02 test $0x2,%ah 111728: 75 12 jne 11173c iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 11172a: 89 53 04 mov %edx,0x4(%ebx) 11172d: 89 4b 08 mov %ecx,0x8(%ebx) return 0; 111730: 31 c0 xor %eax,%eax } 111732: 8d 65 f8 lea -0x8(%ebp),%esp 111735: 5b pop %ebx 111736: 5e pop %esi 111737: c9 leave 111738: c3 ret 111739: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 11173c: 89 53 0c mov %edx,0xc(%ebx) 11173f: 89 4b 10 mov %ecx,0x10(%ebx) 111742: 8b 56 50 mov 0x50(%esi),%edx 111745: 8b 4e 54 mov 0x54(%esi),%ecx 111748: eb e0 jmp 11172a 11174a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 11174c: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 11174f: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 111752: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 111759: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 111760: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 111767: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11176e: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 111775: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 11177c: 85 c0 test %eax,%eax <== NOT EXECUTED 11177e: 75 09 jne 111789 <== NOT EXECUTED 111780: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111783: 31 d2 xor %edx,%edx <== NOT EXECUTED 111785: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 111787: eb 9c jmp 111725 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 111789: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11178c: 50 push %eax <== NOT EXECUTED 11178d: 52 push %edx <== NOT EXECUTED 11178e: 6a 00 push $0x0 <== NOT EXECUTED 111790: 6a 00 push $0x0 <== NOT EXECUTED 111792: 56 push %esi <== NOT EXECUTED 111793: e8 88 fd ff ff call 111520 <== NOT EXECUTED 111798: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 11179b: 40 inc %eax <== NOT EXECUTED 11179c: 74 08 je 1117a6 <== NOT EXECUTED 11179e: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 1117a1: e9 79 ff ff ff jmp 11171f <== NOT EXECUTED return -1; 1117a6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1117a9: eb 87 jmp 111732 <== NOT EXECUTED =============================================================================== 0010842c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 10842c: 55 push %ebp 10842d: 89 e5 mov %esp,%ebp 10842f: 57 push %edi 108430: 56 push %esi 108431: 53 push %ebx 108432: 83 ec 3c sub $0x3c,%esp 108435: 8b 7d 08 mov 0x8(%ebp),%edi 108438: 8b 5d 0c mov 0xc(%ebp),%ebx 10843b: 8b 55 10 mov 0x10(%ebp),%edx 10843e: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 108441: f6 c7 f0 test $0xf0,%bh 108444: 75 1a jne 108460 rtems_set_errno_and_return_minus_one( EINVAL ); 108446: e8 65 9e 00 00 call 1122b0 <__errno> 10844b: c7 00 16 00 00 00 movl $0x16,(%eax) 108451: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108456: 8d 65 f4 lea -0xc(%ebp),%esp 108459: 5b pop %ebx 10845a: 5e pop %esi 10845b: 5f pop %edi 10845c: c9 leave 10845d: c3 ret 10845e: 66 90 xchg %ax,%ax <== NOT EXECUTED int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 108460: 50 push %eax 108461: 8d 75 cc lea -0x34(%ebp),%esi 108464: 56 push %esi 108465: 8d 45 e4 lea -0x1c(%ebp),%eax 108468: 50 push %eax 108469: 57 push %edi 10846a: 89 55 c4 mov %edx,-0x3c(%ebp) 10846d: 89 4d c0 mov %ecx,-0x40(%ebp) 108470: e8 1f 0a 00 00 call 108e94 result = (*temp_loc.ops->evalformake_h)( 108475: 83 c4 0c add $0xc,%esp 108478: 8d 45 e0 lea -0x20(%ebp),%eax 10847b: 50 push %eax 10847c: 56 push %esi 10847d: 03 7d e4 add -0x1c(%ebp),%edi 108480: 57 push %edi 108481: 8b 45 d8 mov -0x28(%ebp),%eax 108484: ff 50 04 call *0x4(%eax) &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108487: 83 c4 10 add $0x10,%esp 10848a: 85 c0 test %eax,%eax 10848c: 8b 55 c4 mov -0x3c(%ebp),%edx 10848f: 8b 4d c0 mov -0x40(%ebp),%ecx 108492: 74 10 je 1084a4 return -1; 108494: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 108499: 8d 65 f4 lea -0xc(%ebp),%esp 10849c: 5b pop %ebx 10849d: 5e pop %esi 10849e: 5f pop %edi 10849f: c9 leave 1084a0: c3 ret 1084a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED &name_start ); if ( result != 0 ) return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1084a4: 83 ec 0c sub $0xc,%esp 1084a7: 56 push %esi 1084a8: 51 push %ecx 1084a9: 52 push %edx 1084aa: 53 push %ebx 1084ab: ff 75 e0 pushl -0x20(%ebp) 1084ae: 8b 45 d8 mov -0x28(%ebp),%eax 1084b1: ff 50 14 call *0x14(%eax) rtems_filesystem_freenode( &temp_loc ); 1084b4: 83 c4 14 add $0x14,%esp 1084b7: 56 push %esi 1084b8: 89 45 c4 mov %eax,-0x3c(%ebp) 1084bb: e8 c0 fb ff ff call 108080 return result; 1084c0: 83 c4 10 add $0x10,%esp 1084c3: 8b 45 c4 mov -0x3c(%ebp),%eax } 1084c6: 8d 65 f4 lea -0xc(%ebp),%esp 1084c9: 5b pop %ebx 1084ca: 5e pop %esi 1084cb: 5f pop %edi 1084cc: c9 leave 1084cd: c3 ret =============================================================================== 00108554 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108554: 55 push %ebp 108555: 89 e5 mov %esp,%ebp 108557: 57 push %edi 108558: 56 push %esi 108559: 53 push %ebx 10855a: 83 ec 4c sub $0x4c,%esp 10855d: 8b 75 10 mov 0x10(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108560: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108564: 0f 87 36 02 00 00 ja 1087a0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 10856a: 83 ec 0c sub $0xc,%esp 10856d: 56 push %esi 10856e: e8 51 78 00 00 call 10fdc4 108573: 89 45 b8 mov %eax,-0x48(%ebp) if ( !mount_h ) 108576: 83 c4 10 add $0x10,%esp 108579: 85 c0 test %eax,%eax 10857b: 0f 84 1f 02 00 00 je 1087a0 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 108581: 8b 45 0c mov 0xc(%ebp),%eax 108584: 85 c0 test %eax,%eax const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108586: 0f 95 45 b7 setne -0x49(%ebp) 10858a: 0f 84 e8 01 00 00 je 108778 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 108590: 31 c0 xor %eax,%eax 108592: b9 ff ff ff ff mov $0xffffffff,%ecx 108597: 8b 7d 0c mov 0xc(%ebp),%edi 10859a: f2 ae repnz scas %es:(%edi),%al 10859c: f7 d1 not %ecx 10859e: 8d 41 ff lea -0x1(%ecx),%eax 1085a1: 89 45 ac mov %eax,-0x54(%ebp) 1085a4: 89 4d bc mov %ecx,-0x44(%ebp) 1085a7: 8b 55 0c mov 0xc(%ebp),%edx 1085aa: 89 55 b0 mov %edx,-0x50(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 1085ad: ba ff ff ff ff mov $0xffffffff,%edx 1085b2: 31 c0 xor %eax,%eax 1085b4: 89 d1 mov %edx,%ecx 1085b6: 89 f7 mov %esi,%edi 1085b8: f2 ae repnz scas %es:(%edi),%al 1085ba: f7 d1 not %ecx 1085bc: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 1085bf: 8b 7d 08 mov 0x8(%ebp),%edi 1085c2: 85 ff test %edi,%edi 1085c4: 0f 84 ca 01 00 00 je 108794 1085ca: 89 d1 mov %edx,%ecx 1085cc: 8b 7d 08 mov 0x8(%ebp),%edi 1085cf: f2 ae repnz scas %es:(%edi),%al 1085d1: f7 d1 not %ecx 1085d3: 89 4d c0 mov %ecx,-0x40(%ebp) size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 1085d6: 83 ec 08 sub $0x8,%esp 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; 1085d9: 8b 55 bc mov -0x44(%ebp),%edx 1085dc: 8b 7d c4 mov -0x3c(%ebp),%edi 1085df: 8d 44 3a 74 lea 0x74(%edx,%edi,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 ) 1085e3: 03 45 c0 add -0x40(%ebp),%eax + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 1085e6: 50 push %eax 1085e7: 6a 01 push $0x1 1085e9: e8 16 f9 ff ff call 107f04 1085ee: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 1085f0: 83 c4 10 add $0x10,%esp 1085f3: 85 c0 test %eax,%eax 1085f5: 0f 84 65 01 00 00 je 108760 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 1085fb: 8d 40 74 lea 0x74(%eax),%eax memcpy( str, filesystemtype, filesystemtype_size ); 1085fe: 89 c7 mov %eax,%edi 108600: 8b 4d c4 mov -0x3c(%ebp),%ecx 108603: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 108605: 89 fa mov %edi,%edx mt_entry->type = str; 108607: 89 43 6c mov %eax,0x6c(%ebx) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 10860a: 8b 75 08 mov 0x8(%ebp),%esi 10860d: 8b 4d c0 mov -0x40(%ebp),%ecx 108610: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 108612: 89 f8 mov %edi,%eax mt_entry->dev = str; 108614: 89 53 70 mov %edx,0x70(%ebx) str += source_size; memcpy( str, target, target_size ); 108617: 8b 75 b0 mov -0x50(%ebp),%esi 10861a: 8b 4d bc mov -0x44(%ebp),%ecx 10861d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) mt_entry->target = str; 10861f: 89 43 68 mov %eax,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 108622: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108625: 8b 45 14 mov 0x14(%ebp),%eax 108628: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 10862b: 8d 7b 38 lea 0x38(%ebx),%edi 10862e: be a0 fa 11 00 mov $0x11faa0,%esi 108633: b1 0c mov $0xc,%cl 108635: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 108637: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 10863b: 0f 85 83 00 00 00 jne 1086c4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 108641: 81 3d 04 30 12 00 08 cmpl $0x123008,0x123004 108648: 30 12 00 10864b: 0f 85 67 01 00 00 jne 1087b8 <== NEVER TAKEN ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 108651: 31 f6 xor %esi,%esi * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 108653: 83 ec 08 sub $0x8,%esp 108656: ff 75 18 pushl 0x18(%ebp) 108659: 53 push %ebx 10865a: ff 55 b8 call *-0x48(%ebp) 10865d: 83 c4 10 add $0x10,%esp 108660: 85 c0 test %eax,%eax 108662: 0f 85 74 01 00 00 jne 1087dc rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 108668: 56 push %esi 108669: 6a 00 push $0x0 10866b: 6a 00 push $0x0 10866d: ff 35 c8 52 12 00 pushl 0x1252c8 108673: e8 18 30 00 00 call 10b690 108678: 5a pop %edx 108679: 59 pop %ecx 10867a: 53 push %ebx 10867b: 68 04 30 12 00 push $0x123004 108680: e8 db 38 00 00 call 10bf60 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108685: 58 pop %eax 108686: ff 35 c8 52 12 00 pushl 0x1252c8 10868c: e8 fb 30 00 00 call 10b78c */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108691: 83 c4 10 add $0x10,%esp 108694: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 108698: 74 0a je 1086a4 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 10869a: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 10869c: 8d 65 f4 lea -0xc(%ebp),%esp 10869f: 5b pop %ebx 1086a0: 5e pop %esi 1086a1: 5f pop %edi 1086a2: c9 leave 1086a3: c3 ret rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 1086a4: 8b 3d 30 31 12 00 mov 0x123130,%edi 1086aa: 83 c7 18 add $0x18,%edi 1086ad: 8d 73 1c lea 0x1c(%ebx),%esi 1086b0: b9 05 00 00 00 mov $0x5,%ecx 1086b5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1086b7: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1086b9: 8d 65 f4 lea -0xc(%ebp),%esp 1086bc: 5b pop %ebx 1086bd: 5e pop %esi 1086be: 5f pop %edi 1086bf: c9 leave 1086c0: c3 ret 1086c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 1086c4: 83 ec 0c sub $0xc,%esp 1086c7: 6a 01 push $0x1 1086c9: 8d 75 d4 lea -0x2c(%ebp),%esi 1086cc: 56 push %esi 1086cd: 6a 07 push $0x7 1086cf: ff 75 ac pushl -0x54(%ebp) 1086d2: ff 75 0c pushl 0xc(%ebp) 1086d5: e8 ce f8 ff ff call 107fa8 1086da: 83 c4 20 add $0x20,%esp 1086dd: 40 inc %eax 1086de: 0f 84 df 00 00 00 je 1087c3 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1086e4: 83 ec 0c sub $0xc,%esp 1086e7: 56 push %esi 1086e8: 8b 45 e0 mov -0x20(%ebp),%eax 1086eb: ff 50 10 call *0x10(%eax) 1086ee: 83 c4 10 add $0x10,%esp 1086f1: 48 dec %eax 1086f2: 0f 85 0c 01 00 00 jne 108804 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 1086f8: 83 ec 08 sub $0x8,%esp 1086fb: ff 75 d4 pushl -0x2c(%ebp) 1086fe: 68 d0 84 10 00 push $0x1084d0 108703: e8 dc fd ff ff call 1084e4 108708: 83 c4 10 add $0x10,%esp 10870b: 84 c0 test %al,%al 10870d: 0f 85 01 01 00 00 jne 108814 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 108713: 8b 45 d4 mov -0x2c(%ebp),%eax 108716: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108719: 8b 45 dc mov -0x24(%ebp),%eax 10871c: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 10871f: 8b 45 e0 mov -0x20(%ebp),%eax 108722: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108725: 8b 55 e4 mov -0x1c(%ebp),%edx 108728: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 10872b: 83 ec 0c sub $0xc,%esp 10872e: 53 push %ebx 10872f: ff 50 20 call *0x20(%eax) 108732: 83 c4 10 add $0x10,%esp 108735: 85 c0 test %eax,%eax 108737: 0f 84 16 ff ff ff je 108653 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 10873d: 83 ec 0c sub $0xc,%esp 108740: 53 push %ebx 108741: e8 4e f9 ff ff call 108094 108746: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108749: 83 ec 0c sub $0xc,%esp 10874c: 56 push %esi 10874d: e8 2e f9 ff ff call 108080 108752: 83 c4 10 add $0x10,%esp return -1; 108755: b8 ff ff ff ff mov $0xffffffff,%eax 10875a: e9 3d ff ff ff jmp 10869c 10875f: 90 nop <== NOT EXECUTED target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108760: e8 4b 9b 00 00 call 1122b0 <__errno> <== NOT EXECUTED 108765: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10876b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108770: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108773: 5b pop %ebx <== NOT EXECUTED 108774: 5e pop %esi <== NOT EXECUTED 108775: 5f pop %edi <== NOT EXECUTED 108776: c9 leave <== NOT EXECUTED 108777: c3 ret <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108778: c7 45 bc 02 00 00 00 movl $0x2,-0x44(%ebp) 10877f: c7 45 ac 01 00 00 00 movl $0x1,-0x54(%ebp) 108786: c7 45 b0 47 fa 11 00 movl $0x11fa47,-0x50(%ebp) 10878d: e9 1b fe ff ff jmp 1085ad 108792: 66 90 xchg %ax,%ax <== NOT EXECUTED size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108794: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10879b: e9 36 fe ff ff jmp 1085d6 /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 1087a0: e8 0b 9b 00 00 call 1122b0 <__errno> 1087a5: c7 00 16 00 00 00 movl $0x16,(%eax) 1087ab: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 1087b0: 8d 65 f4 lea -0xc(%ebp),%esp 1087b3: 5b pop %ebx 1087b4: 5e pop %esi 1087b5: 5f pop %edi 1087b6: c9 leave 1087b7: c3 ret } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 1087b8: e8 f3 9a 00 00 call 1122b0 <__errno> <== NOT EXECUTED 1087bd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 1087c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087c6: 53 push %ebx <== NOT EXECUTED 1087c7: e8 c8 f8 ff ff call 108094 <== NOT EXECUTED 1087cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 1087cf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1087d4: e9 c3 fe ff ff jmp 10869c <== NOT EXECUTED 1087d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 1087dc: 83 ec 0c sub $0xc,%esp 1087df: 53 push %ebx 1087e0: 8b 45 e0 mov -0x20(%ebp),%eax 1087e3: ff 50 28 call *0x28(%eax) return 0; cleanup_and_bail: free( mt_entry ); 1087e6: 89 1c 24 mov %ebx,(%esp) 1087e9: e8 a6 f8 ff ff call 108094 if ( loc_to_free ) 1087ee: 83 c4 10 add $0x10,%esp 1087f1: 85 f6 test %esi,%esi 1087f3: 0f 85 50 ff ff ff jne 108749 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); return -1; 1087f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1087fe: e9 99 fe ff ff jmp 10869c <== NOT EXECUTED 108803: 90 nop <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108804: e8 a7 9a 00 00 call 1122b0 <__errno> 108809: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 10880f: e9 29 ff ff ff jmp 10873d /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; 108814: e8 97 9a 00 00 call 1122b0 <__errno> 108819: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 10881f: e9 19 ff ff ff jmp 10873d =============================================================================== 00108b48 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108b48: 55 push %ebp 108b49: 89 e5 mov %esp,%ebp 108b4b: 57 push %edi 108b4c: 56 push %esi 108b4d: 53 push %ebx 108b4e: 83 ec 1c sub $0x1c,%esp 108b51: 8b 45 08 mov 0x8(%ebp),%eax 108b54: 89 45 e4 mov %eax,-0x1c(%ebp) 108b57: 8b 5d 0c mov 0xc(%ebp),%ebx 108b5a: 8b 75 10 mov 0x10(%ebp),%esi 108b5d: 8b 7d 14 mov 0x14(%ebp),%edi 108b60: 8b 45 18 mov 0x18(%ebp),%eax 108b63: 89 45 e0 mov %eax,-0x20(%ebp) int rv = -1; if (target != NULL) { 108b66: 85 db test %ebx,%ebx 108b68: 74 3f je 108ba9 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 108b6a: 83 ec 08 sub $0x8,%esp 108b6d: 68 ff 01 00 00 push $0x1ff 108b72: 53 push %ebx 108b73: e8 08 0a 00 00 call 109580 if (rv == 0) { 108b78: 83 c4 10 add $0x10,%esp 108b7b: 85 c0 test %eax,%eax 108b7d: 74 09 je 108b88 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 108b7f: 8d 65 f4 lea -0xc(%ebp),%esp 108b82: 5b pop %ebx 108b83: 5e pop %esi 108b84: 5f pop %edi 108b85: c9 leave 108b86: c3 ret 108b87: 90 nop <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108b88: 8b 45 e0 mov -0x20(%ebp),%eax 108b8b: 89 45 18 mov %eax,0x18(%ebp) 108b8e: 89 7d 14 mov %edi,0x14(%ebp) 108b91: 89 75 10 mov %esi,0x10(%ebp) 108b94: 89 5d 0c mov %ebx,0xc(%ebp) 108b97: 8b 45 e4 mov -0x1c(%ebp),%eax 108b9a: 89 45 08 mov %eax,0x8(%ebp) } else { errno = EINVAL; } return rv; } 108b9d: 8d 65 f4 lea -0xc(%ebp),%esp 108ba0: 5b pop %ebx 108ba1: 5e pop %esi 108ba2: 5f pop %edi 108ba3: c9 leave int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108ba4: e9 97 00 00 00 jmp 108c40 options, data ); } } else { errno = EINVAL; 108ba9: e8 c6 9d 00 00 call 112974 <__errno> 108bae: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 108bb4: b8 ff ff ff ff mov $0xffffffff,%eax 108bb9: eb c4 jmp 108b7f =============================================================================== 00108888 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108888: 55 push %ebp 108889: 89 e5 mov %esp,%ebp 10888b: 57 push %edi 10888c: 56 push %esi 10888d: 53 push %ebx 10888e: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 108891: a1 c4 54 12 00 mov 0x1254c4,%eax 108896: 85 c0 test %eax,%eax 108898: 0f 84 52 02 00 00 je 108af0 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 10889e: 83 ec 0c sub $0xc,%esp 1088a1: 68 24 04 00 00 push $0x424 1088a6: e8 79 5e 00 00 call 10e724 <_Workspace_Allocate> 1088ab: 89 c2 mov %eax,%edx #endif if (ptr) { 1088ad: 83 c4 10 add $0x10,%esp 1088b0: 85 c0 test %eax,%eax 1088b2: 0f 84 2c 02 00 00 je 108ae4 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 1088b8: c7 00 00 00 00 00 movl $0x0,(%eax) 1088be: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 1088c4: 89 58 04 mov %ebx,0x4(%eax) 1088c7: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 1088cd: 89 42 08 mov %eax,0x8(%edx) 1088d0: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 1088d6: 89 42 0c mov %eax,0xc(%edx) 1088d9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 1088e0: 8d 72 14 lea 0x14(%edx),%esi 1088e3: 31 c0 xor %eax,%eax 1088e5: b9 19 00 00 00 mov $0x19,%ecx 1088ea: 89 f7 mov %esi,%edi 1088ec: f3 aa rep stos %al,%es:(%edi) 1088ee: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 1088f5: c7 42 34 ca f7 11 00 movl $0x11f7ca,0x34(%edx) 1088fc: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 108903: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 10890a: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 108911: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 108918: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 10891f: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108926: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 10892d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108934: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 10893b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 108942: c6 42 60 00 movb $0x0,0x60(%edx) 108946: 8d 72 7c lea 0x7c(%edx),%esi 108949: b1 24 mov $0x24,%cl 10894b: 89 f7 mov %esi,%edi 10894d: f3 aa rep stos %al,%es:(%edi) 10894f: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108956: 00 00 00 108959: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 108960: 00 00 00 108963: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 10896a: 00 00 00 10896d: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108974: 0e 33 108976: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 10897d: cd ab 10897f: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108986: 34 12 108988: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 10898f: 6d e6 108991: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108998: ec de 10899a: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 1089a1: 05 00 1089a3: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 1089aa: 0b 00 1089ac: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 1089b3: 00 00 00 1089b6: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 1089bd: 00 00 00 1089c0: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 1089c7: 00 00 00 1089ca: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 1089d1: 00 00 00 1089d4: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 1089db: 00 00 00 1089de: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 1089e5: 00 00 00 1089e8: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 1089ef: 00 00 00 1089f2: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 1089f9: 00 00 00 1089fc: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 108a03: 00 00 00 108a06: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 108a0d: 00 00 00 108a10: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 108a17: 00 00 00 108a1a: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 108a21: 00 00 00 108a24: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 108a2b: 00 00 00 108a2e: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 108a35: 00 00 00 108a38: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 108a3f: 00 00 00 108a42: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 108a49: 00 00 00 108a4c: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 108a53: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108a5a: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 108a61: 00 00 00 108a64: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 108a6b: 00 00 00 108a6e: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 108a75: 00 00 00 108a78: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 108a7f: 00 00 00 108a82: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 108a89: 00 00 00 108a8c: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 108a93: 00 00 00 108a96: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 108a9d: 00 00 00 108aa0: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 108aa7: 00 00 00 108aaa: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 108ab1: 00 00 00 108ab4: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 108abb: 00 00 00 108abe: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 108ac5: 00 00 00 108ac8: 66 b9 38 01 mov $0x138,%cx 108acc: 89 df mov %ebx,%edi 108ace: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108ad0: 8b 45 0c mov 0xc(%ebp),%eax 108ad3: 89 90 ec 00 00 00 mov %edx,0xec(%eax) return TRUE; 108ad9: b0 01 mov $0x1,%al } return FALSE; } 108adb: 8d 65 f4 lea -0xc(%ebp),%esp 108ade: 5b pop %ebx 108adf: 5e pop %esi 108ae0: 5f pop %edi 108ae1: c9 leave 108ae2: c3 ret 108ae3: 90 nop <== NOT EXECUTED _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; return TRUE; } return FALSE; 108ae4: 31 c0 xor %eax,%eax } 108ae6: 8d 65 f4 lea -0xc(%ebp),%esp 108ae9: 5b pop %ebx 108aea: 5e pop %esi 108aeb: 5f pop %edi 108aec: c9 leave 108aed: c3 ret 108aee: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 108af0: a1 40 04 12 00 mov 0x120440,%eax 108af5: a3 c0 31 12 00 mov %eax,0x1231c0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 108afa: c7 05 c4 54 12 00 c0 movl $0x1231c0,0x1254c4 108b01: 31 12 00 108b04: e9 95 fd ff ff jmp 10889e =============================================================================== 00108b0c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 57 push %edi 108b10: 56 push %esi 108b11: 53 push %ebx 108b12: 83 ec 0c sub $0xc,%esp 108b15: 8b 7d 08 mov 0x8(%ebp),%edi 108b18: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108b1b: 39 df cmp %ebx,%edi 108b1d: 74 55 je 108b74 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 108b1f: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108b25: 85 f6 test %esi,%esi 108b27: 74 21 je 108b4a <== NEVER TAKEN 108b29: 3b 35 40 04 12 00 cmp 0x120440,%esi 108b2f: 74 19 je 108b4a _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 108b31: 83 ec 08 sub $0x8,%esp 108b34: 68 2c 88 10 00 push $0x10882c 108b39: 56 push %esi 108b3a: e8 59 9f 00 00 call 112a98 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108b3f: 89 34 24 mov %esi,(%esp) 108b42: e8 f9 5b 00 00 call 10e740 <_Workspace_Free> 108b47: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108b4a: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 108b51: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108b54: 39 df cmp %ebx,%edi 108b56: 74 08 je 108b60 _REENT = 0; } } 108b58: 8d 65 f4 lea -0xc(%ebp),%esp 108b5b: 5b pop %ebx 108b5c: 5e pop %esi 108b5d: 5f pop %edi 108b5e: c9 leave 108b5f: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108b60: c7 05 c0 31 12 00 00 movl $0x0,0x1231c0 108b67: 00 00 00 } } 108b6a: 8d 65 f4 lea -0xc(%ebp),%esp 108b6d: 5b pop %ebx 108b6e: 5e pop %esi 108b6f: 5f pop %edi 108b70: c9 leave 108b71: c3 ret 108b72: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108b74: 8b 35 c0 31 12 00 mov 0x1231c0,%esi 108b7a: eb a9 jmp 108b25 =============================================================================== 0010882c : */ int newlib_free_buffers( FILE *fp ) { 10882c: 55 push %ebp 10882d: 89 e5 mov %esp,%ebp 10882f: 53 push %ebx 108830: 83 ec 10 sub $0x10,%esp 108833: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108836: 53 push %ebx 108837: e8 48 9e 00 00 call 112684 10883c: 83 c4 10 add $0x10,%esp 10883f: 83 f8 02 cmp $0x2,%eax 108842: 76 14 jbe 108858 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108844: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108847: 53 push %ebx <== NOT EXECUTED 108848: e8 bb 9b 00 00 call 112408 <== NOT EXECUTED 10884d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 108850: 31 c0 xor %eax,%eax 108852: 8b 5d fc mov -0x4(%ebp),%ebx 108855: c9 leave 108856: c3 ret 108857: 90 nop <== NOT EXECUTED { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108858: f6 43 0c 80 testb $0x80,0xc(%ebx) 10885c: 74 f2 je 108850 <== ALWAYS TAKEN free( fp->_bf._base ); 10885e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108861: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108864: e8 2b f8 ff ff call 108094 <== NOT EXECUTED fp->_flags &= ~__SMBF; 108869: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 10886f: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108875: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 10887c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 10887f: 31 c0 xor %eax,%eax <== NOT EXECUTED 108881: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108884: c9 leave <== NOT EXECUTED 108885: c3 ret <== NOT EXECUTED =============================================================================== 00107ca4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 107ca4: 55 push %ebp 107ca5: 89 e5 mov %esp,%ebp 107ca7: 53 push %ebx 107ca8: 83 ec 04 sub $0x4,%esp 107cab: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 107cae: 80 3d 60 30 12 00 00 cmpb $0x0,0x123060 107cb5: 74 09 je 107cc0 NULL_major = major; } return RTEMS_SUCCESSFUL; } 107cb7: 31 c0 xor %eax,%eax 107cb9: 8b 5d fc mov -0x4(%ebp),%ebx 107cbc: c9 leave 107cbd: c3 ret 107cbe: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 107cc0: c6 05 60 30 12 00 01 movb $0x1,0x123060 status = rtems_io_register_name( 107cc7: 50 push %eax 107cc8: 6a 00 push $0x0 107cca: 53 push %ebx 107ccb: 68 1a c1 11 00 push $0x11c11a 107cd0: e8 7b 01 00 00 call 107e50 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 107cd5: 83 c4 10 add $0x10,%esp 107cd8: 85 c0 test %eax,%eax 107cda: 75 0d jne 107ce9 rtems_fatal_error_occurred(status); NULL_major = major; 107cdc: 89 1d a0 33 12 00 mov %ebx,0x1233a0 } return RTEMS_SUCCESSFUL; } 107ce2: 31 c0 xor %eax,%eax 107ce4: 8b 5d fc mov -0x4(%ebp),%ebx 107ce7: c9 leave 107ce8: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 107ce9: 83 ec 0c sub $0xc,%esp 107cec: 50 push %eax 107ced: e8 a6 41 00 00 call 10be98 =============================================================================== 00108bdc : int open( const char *pathname, int flags, ... ) { 108bdc: 55 push %ebp 108bdd: 89 e5 mov %esp,%ebp 108bdf: 57 push %edi 108be0: 56 push %esi 108be1: 53 push %ebx 108be2: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108be5: 8b 45 0c mov 0xc(%ebp),%eax 108be8: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108be9: 89 c3 mov %eax,%ebx 108beb: 83 e3 01 and $0x1,%ebx eval_flags |= RTEMS_LIBIO_PERMS_READ; 108bee: f7 db neg %ebx 108bf0: 83 e3 04 and $0x4,%ebx if ( ( status & _FWRITE ) == _FWRITE ) 108bf3: a8 02 test $0x2,%al 108bf5: 74 03 je 108bfa eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108bf7: 83 cb 02 or $0x2,%ebx va_start(ap, flags); mode = va_arg( ap, int ); 108bfa: 8b 45 10 mov 0x10(%ebp),%eax 108bfd: 89 45 c4 mov %eax,-0x3c(%ebp) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 108c00: e8 1b 6f 00 00 call 10fb20 108c05: 89 c2 mov %eax,%edx if ( iop == 0 ) { 108c07: 85 c0 test %eax,%eax 108c09: 0f 84 c5 00 00 00 je 108cd4 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108c0f: 31 f6 xor %esi,%esi 108c11: b9 ff ff ff ff mov $0xffffffff,%ecx 108c16: 8b 7d 08 mov 0x8(%ebp),%edi 108c19: 89 f0 mov %esi,%eax 108c1b: f2 ae repnz scas %es:(%edi),%al 108c1d: f7 d1 not %ecx 108c1f: 49 dec %ecx 108c20: 83 ec 0c sub $0xc,%esp 108c23: 6a 01 push $0x1 108c25: 8d 45 d4 lea -0x2c(%ebp),%eax 108c28: 89 45 b4 mov %eax,-0x4c(%ebp) 108c2b: 50 push %eax 108c2c: 53 push %ebx 108c2d: 51 push %ecx 108c2e: ff 75 08 pushl 0x8(%ebp) 108c31: 89 55 c0 mov %edx,-0x40(%ebp) 108c34: e8 6f f3 ff ff call 107fa8 108c39: 89 c3 mov %eax,%ebx pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108c3b: 83 c4 20 add $0x20,%esp 108c3e: 83 f8 ff cmp $0xffffffff,%eax 108c41: 8b 55 c0 mov -0x40(%ebp),%edx 108c44: 0f 84 de 00 00 00 je 108d28 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108c4a: 8b 45 0c mov 0xc(%ebp),%eax 108c4d: 25 00 0a 00 00 and $0xa00,%eax 108c52: 3d 00 0a 00 00 cmp $0xa00,%eax 108c57: 0f 84 8b 00 00 00 je 108ce8 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 108c5d: 8b 5a 14 mov 0x14(%edx),%ebx 108c60: 83 ec 0c sub $0xc,%esp 108c63: ff 75 0c pushl 0xc(%ebp) 108c66: 89 55 c0 mov %edx,-0x40(%ebp) 108c69: e8 36 6e 00 00 call 10faa4 108c6e: 09 d8 or %ebx,%eax 108c70: 8b 55 c0 mov -0x40(%ebp),%edx 108c73: 89 42 14 mov %eax,0x14(%edx) iop->pathinfo = loc; 108c76: 8d 7a 18 lea 0x18(%edx),%edi 108c79: b9 05 00 00 00 mov $0x5,%ecx 108c7e: 8b 75 b4 mov -0x4c(%ebp),%esi 108c81: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 108c83: 8b 42 20 mov 0x20(%edx),%eax 108c86: ff 75 c4 pushl -0x3c(%ebp) 108c89: ff 75 0c pushl 0xc(%ebp) 108c8c: ff 75 08 pushl 0x8(%ebp) 108c8f: 52 push %edx 108c90: ff 10 call *(%eax) if ( rc ) { 108c92: 83 c4 20 add $0x20,%esp 108c95: 85 c0 test %eax,%eax 108c97: 8b 55 c0 mov -0x40(%ebp),%edx 108c9a: 75 78 jne 108d14 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108c9c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 108ca3: 0f 85 9f 00 00 00 jne 108d48 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108ca9: 2b 15 c0 52 12 00 sub 0x1252c0,%edx 108caf: c1 fa 03 sar $0x3,%edx 108cb2: 8d 04 d2 lea (%edx,%edx,8),%eax 108cb5: 8d 04 c2 lea (%edx,%eax,8),%eax 108cb8: 8d 04 c2 lea (%edx,%eax,8),%eax 108cbb: 8d 04 c2 lea (%edx,%eax,8),%eax 108cbe: 89 c1 mov %eax,%ecx 108cc0: c1 e1 0f shl $0xf,%ecx 108cc3: 01 c8 add %ecx,%eax 108cc5: 8d 04 c2 lea (%edx,%eax,8),%eax 108cc8: f7 d8 neg %eax } 108cca: 8d 65 f4 lea -0xc(%ebp),%esp 108ccd: 5b pop %ebx 108cce: 5e pop %esi 108ccf: 5f pop %edi 108cd0: c9 leave 108cd1: c3 ret 108cd2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 108cd4: bb 17 00 00 00 mov $0x17,%ebx if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 108cd9: e8 d2 95 00 00 call 1122b0 <__errno> 108cde: 89 18 mov %ebx,(%eax) 108ce0: b8 ff ff ff ff mov $0xffffffff,%eax 108ce5: eb e3 jmp 108cca 108ce7: 90 nop <== NOT EXECUTED } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; loc_to_free = &loc; 108ce8: 8d 75 d4 lea -0x2c(%ebp),%esi goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; 108ceb: bb 11 00 00 00 mov $0x11,%ebx */ done: va_end(ap); if ( rc ) { if ( iop ) 108cf0: 85 d2 test %edx,%edx 108cf2: 74 0c je 108d00 rtems_libio_free( iop ); 108cf4: 83 ec 0c sub $0xc,%esp 108cf7: 52 push %edx 108cf8: e8 c7 6e 00 00 call 10fbc4 108cfd: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108d00: 85 f6 test %esi,%esi 108d02: 74 d5 je 108cd9 rtems_filesystem_freenode( loc_to_free ); 108d04: 83 ec 0c sub $0xc,%esp 108d07: 56 push %esi 108d08: e8 73 f3 ff ff call 108080 108d0d: 83 c4 10 add $0x10,%esp 108d10: eb c7 jmp 108cd9 108d12: 66 90 xchg %ax,%ax <== NOT EXECUTED iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 108d14: e8 97 95 00 00 call 1122b0 <__errno> 108d19: 8b 18 mov (%eax),%ebx rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 108d1b: 8d 75 d4 lea -0x2c(%ebp),%esi iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; goto done; 108d1e: 8b 55 c0 mov -0x40(%ebp),%edx * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 108d21: 85 db test %ebx,%ebx 108d23: 74 84 je 108ca9 <== NEVER TAKEN 108d25: eb c9 jmp 108cf0 108d27: 90 nop <== NOT EXECUTED */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 108d28: e8 83 95 00 00 call 1122b0 <__errno> 108d2d: 83 38 02 cmpl $0x2,(%eax) 108d30: 8b 55 c0 mov -0x40(%ebp),%edx 108d33: 0f 84 9b 00 00 00 je 108dd4 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108d39: e8 72 95 00 00 call 1122b0 <__errno> 108d3e: 8b 18 mov (%eax),%ebx int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108d40: 31 f6 xor %esi,%esi /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; goto done; 108d42: 8b 55 c0 mov -0x40(%ebp),%edx 108d45: eb da jmp 108d21 108d47: 90 nop <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 108d48: 51 push %ecx 108d49: 6a 00 push $0x0 108d4b: 6a 00 push $0x0 108d4d: 89 d0 mov %edx,%eax 108d4f: 2b 05 c0 52 12 00 sub 0x1252c0,%eax 108d55: c1 f8 03 sar $0x3,%eax 108d58: 8d 0c c0 lea (%eax,%eax,8),%ecx 108d5b: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d5e: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d61: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d64: 89 cb mov %ecx,%ebx 108d66: c1 e3 0f shl $0xf,%ebx 108d69: 01 d9 add %ebx,%ecx 108d6b: 8d 04 c8 lea (%eax,%ecx,8),%eax 108d6e: f7 d8 neg %eax 108d70: 50 push %eax 108d71: 89 55 c0 mov %edx,-0x40(%ebp) 108d74: e8 7b 6c 00 00 call 10f9f4 108d79: 89 c3 mov %eax,%ebx if ( rc ) { 108d7b: 83 c4 10 add $0x10,%esp 108d7e: 85 c0 test %eax,%eax 108d80: 8b 55 c0 mov -0x40(%ebp),%edx 108d83: 0f 84 20 ff ff ff je 108ca9 if(errno) rc = errno; 108d89: e8 22 95 00 00 call 1122b0 <__errno> 108d8e: 8b 00 mov (%eax),%eax 108d90: 85 c0 test %eax,%eax 108d92: 8b 55 c0 mov -0x40(%ebp),%edx 108d95: 0f 85 b2 00 00 00 jne 108e4d <== ALWAYS TAKEN close( iop - rtems_libio_iops ); 108d9b: 83 ec 0c sub $0xc,%esp 108d9e: 2b 15 c0 52 12 00 sub 0x1252c0,%edx 108da4: c1 fa 03 sar $0x3,%edx 108da7: 8d 04 d2 lea (%edx,%edx,8),%eax 108daa: 8d 04 c2 lea (%edx,%eax,8),%eax 108dad: 8d 04 c2 lea (%edx,%eax,8),%eax 108db0: 8d 04 c2 lea (%edx,%eax,8),%eax 108db3: 89 c1 mov %eax,%ecx 108db5: c1 e1 0f shl $0xf,%ecx 108db8: 01 c8 add %ecx,%eax 108dba: 8d 04 c2 lea (%edx,%eax,8),%eax 108dbd: f7 d8 neg %eax 108dbf: 50 push %eax 108dc0: e8 af 6b 00 00 call 10f974 108dc5: 83 c4 10 add $0x10,%esp /* those are released by close(): */ iop = 0; loc_to_free = NULL; 108dc8: 31 f6 xor %esi,%esi rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); /* those are released by close(): */ iop = 0; 108dca: 31 d2 xor %edx,%edx 108dcc: e9 50 ff ff ff jmp 108d21 108dd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 108dd4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 108ddb: 75 0f jne 108dec int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108ddd: 31 f6 xor %esi,%esi goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; 108ddf: bb 02 00 00 00 mov $0x2,%ebx 108de4: e9 07 ff ff ff jmp 108cf0 108de9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 108dec: 6a 00 push $0x0 108dee: 6a 00 push $0x0 108df0: 8b 45 c4 mov -0x3c(%ebp),%eax 108df3: 80 cc 80 or $0x80,%ah 108df6: 50 push %eax 108df7: ff 75 08 pushl 0x8(%ebp) 108dfa: 89 55 c0 mov %edx,-0x40(%ebp) 108dfd: e8 2a f6 ff ff call 10842c if ( rc ) { 108e02: 83 c4 10 add $0x10,%esp 108e05: 85 c0 test %eax,%eax 108e07: 8b 55 c0 mov -0x40(%ebp),%edx 108e0a: 0f 85 29 ff ff ff jne 108d39 <== NEVER TAKEN /* * After we do the mknod(), we have to evaluate the path to get the * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( 108e10: 89 d9 mov %ebx,%ecx 108e12: 8b 7d 08 mov 0x8(%ebp),%edi 108e15: 89 f0 mov %esi,%eax 108e17: f2 ae repnz scas %es:(%edi),%al 108e19: f7 d1 not %ecx 108e1b: 49 dec %ecx 108e1c: 83 ec 0c sub $0xc,%esp 108e1f: 6a 01 push $0x1 108e21: 8d 45 d4 lea -0x2c(%ebp),%eax 108e24: 50 push %eax 108e25: 6a 00 push $0x0 108e27: 51 push %ecx 108e28: ff 75 08 pushl 0x8(%ebp) 108e2b: 89 55 c0 mov %edx,-0x40(%ebp) 108e2e: e8 75 f1 ff ff call 107fa8 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 108e33: 83 c4 20 add $0x20,%esp 108e36: 85 c0 test %eax,%eax 108e38: 8b 55 c0 mov -0x40(%ebp),%edx 108e3b: 0f 84 1c fe ff ff je 108c5d <== ALWAYS TAKEN int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; 108e41: 31 f6 xor %esi,%esi <== NOT EXECUTED * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; 108e43: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED 108e48: e9 a3 fe ff ff jmp 108cf0 <== NOT EXECUTED * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 108e4d: e8 5e 94 00 00 call 1122b0 <__errno> 108e52: 8b 18 mov (%eax),%ebx 108e54: 8b 55 c0 mov -0x40(%ebp),%edx 108e57: e9 3f ff ff ff jmp 108d9b =============================================================================== 00109be0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109be0: 55 push %ebp 109be1: 89 e5 mov %esp,%ebp 109be3: 56 push %esi 109be4: 53 push %ebx 109be5: 83 ec 10 sub $0x10,%esp 109be8: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 109beb: 8b 4a 34 mov 0x34(%edx),%ecx 109bee: f6 c1 01 test $0x1,%cl 109bf1: 74 31 je 109c24 <== NEVER TAKEN switch (c) { 109bf3: 3c 09 cmp $0x9,%al 109bf5: 0f 84 b1 00 00 00 je 109cac 109bfb: 76 3f jbe 109c3c <== NEVER TAKEN 109bfd: 3c 0a cmp $0xa,%al 109bff: 74 4f je 109c50 109c01: 3c 0d cmp $0xd,%al 109c03: 74 7f je 109c84 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109c05: 83 e1 02 and $0x2,%ecx 109c08: 0f 85 c6 00 00 00 jne 109cd4 <== NEVER TAKEN 109c0e: 8b 0d b4 31 12 00 mov 0x1231b4,%ecx c = toupper(c); if (!iscntrl(c)) 109c14: 0f b6 c0 movzbl %al,%eax 109c17: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109c1c: 75 06 jne 109c24 <== NEVER TAKEN tty->column++; 109c1e: ff 42 28 incl 0x28(%edx) 109c21: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109c24: 53 push %ebx 109c25: 52 push %edx 109c26: 6a 01 push $0x1 109c28: 8d 45 f4 lea -0xc(%ebp),%eax 109c2b: 50 push %eax 109c2c: e8 7b fe ff ff call 109aac 109c31: 83 c4 10 add $0x10,%esp } 109c34: 8d 65 f8 lea -0x8(%ebp),%esp 109c37: 5b pop %ebx 109c38: 5e pop %esi 109c39: c9 leave 109c3a: c3 ret 109c3b: 90 nop <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109c3c: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109c3e: 75 c5 jne 109c05 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109c40: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109c43: 85 c0 test %eax,%eax <== NOT EXECUTED 109c45: 7e dd jle 109c24 <== NOT EXECUTED tty->column--; 109c47: 48 dec %eax <== NOT EXECUTED 109c48: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109c4b: eb d7 jmp 109c24 <== NOT EXECUTED 109c4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 109c50: f6 c1 20 test $0x20,%cl 109c53: 74 07 je 109c5c <== ALWAYS TAKEN tty->column = 0; 109c55: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109c5c: 83 e1 04 and $0x4,%ecx 109c5f: 74 c3 je 109c24 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109c61: 51 push %ecx 109c62: 52 push %edx 109c63: 6a 01 push $0x1 109c65: 68 44 fb 11 00 push $0x11fb44 109c6a: 89 55 f0 mov %edx,-0x10(%ebp) 109c6d: e8 3a fe ff ff call 109aac tty->column = 0; 109c72: 8b 55 f0 mov -0x10(%ebp),%edx 109c75: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109c7c: 83 c4 10 add $0x10,%esp 109c7f: eb a3 jmp 109c24 109c81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109c84: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 109c87: 74 07 je 109c90 <== NOT EXECUTED 109c89: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109c8c: 85 c0 test %eax,%eax <== NOT EXECUTED 109c8e: 74 a4 je 109c34 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109c90: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109c93: 74 09 je 109c9e <== NOT EXECUTED c = '\n'; 109c95: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109c99: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109c9c: 74 86 je 109c24 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109c9e: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109ca5: e9 7a ff ff ff jmp 109c24 <== NOT EXECUTED 109caa: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109cac: 8b 5a 28 mov 0x28(%edx),%ebx 109caf: 89 de mov %ebx,%esi 109cb1: 83 e6 07 and $0x7,%esi 109cb4: b8 08 00 00 00 mov $0x8,%eax 109cb9: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109cbb: 81 e1 00 18 00 00 and $0x1800,%ecx 109cc1: 81 f9 00 18 00 00 cmp $0x1800,%ecx 109cc7: 74 37 je 109d00 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109cc9: 01 d8 add %ebx,%eax <== NOT EXECUTED 109ccb: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109cce: e9 51 ff ff ff jmp 109c24 <== NOT EXECUTED 109cd3: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109cd4: 8b 0d b4 31 12 00 mov 0x1231b4,%ecx <== NOT EXECUTED 109cda: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109cdd: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109ce2: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109ce5: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 109ce8: 74 0e je 109cf8 <== NOT EXECUTED 109cea: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109cec: 88 d8 mov %bl,%al <== NOT EXECUTED 109cee: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109cf1: e9 1e ff ff ff jmp 109c14 <== NOT EXECUTED 109cf6: 66 90 xchg %ax,%ax <== NOT EXECUTED 109cf8: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 109cfb: eb ef jmp 109cec <== NOT EXECUTED 109cfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 109d00: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109d03: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 109d06: 56 push %esi 109d07: 52 push %edx 109d08: 50 push %eax 109d09: 68 dc f6 11 00 push $0x11f6dc 109d0e: e8 99 fd ff ff call 109aac return; 109d13: 83 c4 10 add $0x10,%esp 109d16: e9 19 ff ff ff jmp 109c34 =============================================================================== 0010a018 : long pathconf( const char *path, int name ) { 10a018: 55 push %ebp 10a019: 89 e5 mov %esp,%ebp 10a01b: 56 push %esi 10a01c: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a01d: 83 ec 08 sub $0x8,%esp 10a020: 6a 00 push $0x0 10a022: ff 75 08 pushl 0x8(%ebp) 10a025: e8 4e fd ff ff call 109d78 10a02a: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a02c: 83 c4 10 add $0x10,%esp 10a02f: 83 f8 ff cmp $0xffffffff,%eax 10a032: 74 24 je 10a058 return -1; status = fpathconf( fd, name ); 10a034: 83 ec 08 sub $0x8,%esp 10a037: ff 75 0c pushl 0xc(%ebp) 10a03a: 50 push %eax 10a03b: e8 c0 ec ff ff call 108d00 10a040: 89 c6 mov %eax,%esi (void) close( fd ); 10a042: 89 1c 24 mov %ebx,(%esp) 10a045: e8 56 e8 ff ff call 1088a0 return status; 10a04a: 83 c4 10 add $0x10,%esp } 10a04d: 89 f0 mov %esi,%eax 10a04f: 8d 65 f8 lea -0x8(%ebp),%esp 10a052: 5b pop %ebx 10a053: 5e pop %esi 10a054: c9 leave 10a055: c3 ret 10a056: 66 90 xchg %ax,%ax <== NOT EXECUTED int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) return -1; 10a058: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a05d: 89 f0 mov %esi,%eax 10a05f: 8d 65 f8 lea -0x8(%ebp),%esp 10a062: 5b pop %ebx 10a063: 5e pop %esi 10a064: c9 leave 10a065: c3 ret =============================================================================== 00110a98 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110a98: 55 push %ebp 110a99: 89 e5 mov %esp,%ebp 110a9b: 57 push %edi 110a9c: 56 push %esi 110a9d: 53 push %ebx 110a9e: 83 ec 24 sub $0x24,%esp rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 110aa1: 68 ff 01 00 00 push $0x1ff 110aa6: 68 8c 17 12 00 push $0x12178c 110aab: e8 ac 16 00 00 call 11215c 110ab0: 83 c4 10 add $0x10,%esp 110ab3: 85 c0 test %eax,%eax 110ab5: 74 0d je 110ac4 <== ALWAYS TAKEN return -1; 110ab7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; } 110abc: 8d 65 f4 lea -0xc(%ebp),%esp 110abf: 5b pop %ebx 110ac0: 5e pop %esi 110ac1: 5f pop %edi 110ac2: c9 leave 110ac3: c3 ret if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 110ac4: 8d 5d d9 lea -0x27(%ebp),%ebx 110ac7: be 91 17 12 00 mov $0x121791,%esi 110acc: b9 0a 00 00 00 mov $0xa,%ecx 110ad1: 89 df mov %ebx,%edi 110ad3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 110ad5: 0f b7 05 ec 75 12 00 movzwl 0x1275ec,%eax 110adc: 8d 50 01 lea 0x1(%eax),%edx 110adf: 66 89 15 ec 75 12 00 mov %dx,0x1275ec 110ae6: 51 push %ecx 110ae7: 50 push %eax 110ae8: 68 9c 17 12 00 push $0x12179c 110aed: 8d 45 e3 lea -0x1d(%ebp),%eax 110af0: 50 push %eax 110af1: e8 c6 37 00 00 call 1142bc /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 110af6: 58 pop %eax 110af7: 5a pop %edx 110af8: 68 80 01 00 00 push $0x180 110afd: 53 push %ebx 110afe: e8 a1 13 00 00 call 111ea4 110b03: 83 c4 10 add $0x10,%esp 110b06: 85 c0 test %eax,%eax 110b08: 0f 85 a6 00 00 00 jne 110bb4 return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 110b0e: 83 ec 08 sub $0x8,%esp 110b11: 68 00 40 00 00 push $0x4000 110b16: 53 push %ebx 110b17: e8 00 93 ff ff call 109e1c 110b1c: 8b 55 08 mov 0x8(%ebp),%edx 110b1f: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110b21: 83 c4 10 add $0x10,%esp 110b24: 85 c0 test %eax,%eax 110b26: 78 58 js 110b80 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 110b28: 3b 05 4c 36 12 00 cmp 0x12364c,%eax 110b2e: 72 3c jb 110b6c <== ALWAYS TAKEN 110b30: 31 d2 xor %edx,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110b32: 83 62 14 fe andl $0xfffffffe,0x14(%edx) filsdes[1] = open(fifopath, O_WRONLY); 110b36: 83 ec 08 sub $0x8,%esp 110b39: 6a 01 push $0x1 110b3b: 53 push %ebx 110b3c: e8 db 92 ff ff call 109e1c 110b41: 8b 55 08 mov 0x8(%ebp),%edx 110b44: 89 42 04 mov %eax,0x4(%edx) if (filsdes[1] < 0) { 110b47: 83 c4 10 add $0x10,%esp 110b4a: 85 c0 test %eax,%eax 110b4c: 78 4a js 110b98 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 110b4e: 31 f6 xor %esi,%esi if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 110b50: 83 ec 0c sub $0xc,%esp 110b53: 53 push %ebx 110b54: e8 0f b3 ff ff call 10be68 110b59: 83 c4 10 add $0x10,%esp } if(err != 0) 110b5c: 85 f6 test %esi,%esi 110b5e: 75 63 jne 110bc3 rtems_set_errno_and_return_minus_one(err); return 0; 110b60: 31 c0 xor %eax,%eax } 110b62: 8d 65 f4 lea -0xc(%ebp),%esp 110b65: 5b pop %ebx 110b66: 5e pop %esi 110b67: 5f pop %edi 110b68: c9 leave 110b69: c3 ret 110b6a: 66 90 xchg %ax,%ax <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 110b6c: c1 e0 03 shl $0x3,%eax 110b6f: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 110b76: 29 c2 sub %eax,%edx 110b78: 03 15 20 78 12 00 add 0x127820,%edx 110b7e: eb b2 jmp 110b32 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 110b80: e8 9f 2d 00 00 call 113924 <__errno> 110b85: 8b 30 mov (%eax),%esi /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 110b87: 83 ec 0c sub $0xc,%esp 110b8a: 53 push %ebx 110b8b: e8 d8 b2 ff ff call 10be68 110b90: 83 c4 10 add $0x10,%esp 110b93: eb c7 jmp 110b5c 110b95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 110b98: e8 87 2d 00 00 call 113924 <__errno> 110b9d: 8b 30 mov (%eax),%esi close(filsdes[0]); 110b9f: 83 ec 0c sub $0xc,%esp 110ba2: 8b 45 08 mov 0x8(%ebp),%eax 110ba5: ff 30 pushl (%eax) 110ba7: e8 f8 82 ff ff call 108ea4 110bac: 83 c4 10 add $0x10,%esp 110baf: eb 9f jmp 110b50 110bb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 110bb4: e8 6b 2d 00 00 call 113924 <__errno> return -1; 110bb9: b8 ff ff ff ff mov $0xffffffff,%eax 110bbe: e9 f9 fe ff ff jmp 110abc close(filsdes[0]); } unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); 110bc3: e8 5c 2d 00 00 call 113924 <__errno> 110bc8: 89 30 mov %esi,(%eax) 110bca: b8 ff ff ff ff mov $0xffffffff,%eax 110bcf: e9 e8 fe ff ff jmp 110abc =============================================================================== 00111f78 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 111f78: 55 push %ebp 111f79: 89 e5 mov %esp,%ebp 111f7b: 56 push %esi 111f7c: 53 push %ebx 111f7d: 8b 75 08 mov 0x8(%ebp),%esi 111f80: 8b 5d 10 mov 0x10(%ebp),%ebx if (cmd == FIONREAD) { 111f83: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) 111f8a: 74 0c je 111f98 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 111f8c: b8 ea ff ff ff mov $0xffffffea,%eax } 111f91: 8d 65 f8 lea -0x8(%ebp),%esp 111f94: 5b pop %ebx 111f95: 5e pop %esi 111f96: c9 leave 111f97: c3 ret void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 111f98: 85 db test %ebx,%ebx 111f9a: 75 07 jne 111fa3 return -EFAULT; 111f9c: b8 f2 ff ff ff mov $0xfffffff2,%eax 111fa1: eb ee jmp 111f91 if (! PIPE_LOCK(pipe)) 111fa3: 50 push %eax 111fa4: 6a 00 push $0x0 111fa6: 6a 00 push $0x0 111fa8: ff 76 28 pushl 0x28(%esi) 111fab: e8 60 b4 ff ff call 10d410 111fb0: 83 c4 10 add $0x10,%esp 111fb3: 85 c0 test %eax,%eax 111fb5: 74 07 je 111fbe <== ALWAYS TAKEN return -EINTR; 111fb7: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 111fbc: eb d3 jmp 111f91 <== NOT EXECUTED /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 111fbe: 8b 46 0c mov 0xc(%esi),%eax 111fc1: 89 03 mov %eax,(%ebx) PIPE_UNLOCK(pipe); 111fc3: 83 ec 0c sub $0xc,%esp 111fc6: ff 76 28 pushl 0x28(%esi) 111fc9: e8 3e b5 ff ff call 10d50c return 0; 111fce: 83 c4 10 add $0x10,%esp 111fd1: 31 c0 xor %eax,%eax 111fd3: eb bc jmp 111f91 =============================================================================== 00111bd4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 111bd4: 55 push %ebp 111bd5: 89 e5 mov %esp,%ebp 111bd7: 57 push %edi 111bd8: 56 push %esi 111bd9: 53 push %ebx 111bda: 83 ec 30 sub $0x30,%esp 111bdd: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 111be0: 6a 00 push $0x0 111be2: 6a 00 push $0x0 111be4: ff 73 28 pushl 0x28(%ebx) 111be7: e8 24 b8 ff ff call 10d410 111bec: 83 c4 10 add $0x10,%esp 111bef: 85 c0 test %eax,%eax 111bf1: 0f 85 b1 00 00 00 jne 111ca8 <== NEVER TAKEN return -EINTR; while (read < count) { 111bf7: 8b 45 10 mov 0x10(%ebp),%eax 111bfa: 85 c0 test %eax,%eax 111bfc: 0f 84 82 01 00 00 je 111d84 <== NEVER TAKEN 111c02: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111c09: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) while (PIPE_EMPTY(pipe)) { 111c10: 8b 53 0c mov 0xc(%ebx),%edx 111c13: 85 d2 test %edx,%edx 111c15: 0f 85 a1 00 00 00 jne 111cbc /* Not an error */ if (pipe->Writers == 0) 111c1b: 8b 7b 14 mov 0x14(%ebx),%edi 111c1e: 85 ff test %edi,%edi 111c20: 0f 84 06 01 00 00 je 111d2c goto out_locked; if (LIBIO_NODELAY(iop)) { 111c26: 8b 45 14 mov 0x14(%ebp),%eax 111c29: f6 40 14 01 testb $0x1,0x14(%eax) 111c2d: 0f 85 01 01 00 00 jne 111d34 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 111c33: ff 43 18 incl 0x18(%ebx) PIPE_UNLOCK(pipe); 111c36: 83 ec 0c sub $0xc,%esp 111c39: ff 73 28 pushl 0x28(%ebx) 111c3c: e8 cb b8 ff ff call 10d50c if (! PIPE_READWAIT(pipe)) 111c41: 59 pop %ecx 111c42: 5e pop %esi 111c43: 6a 00 push $0x0 111c45: ff 73 2c pushl 0x2c(%ebx) 111c48: e8 57 0f 00 00 call 112ba4 111c4d: 83 c4 0c add $0xc,%esp 111c50: 83 f8 01 cmp $0x1,%eax 111c53: 19 f6 sbb %esi,%esi 111c55: f7 d6 not %esi 111c57: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111c5a: 6a 00 push $0x0 111c5c: 6a 00 push $0x0 111c5e: ff 73 28 pushl 0x28(%ebx) 111c61: e8 aa b7 ff ff call 10d410 111c66: 83 c4 10 add $0x10,%esp 111c69: 85 c0 test %eax,%eax 111c6b: 0f 85 cf 00 00 00 jne 111d40 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 111c71: ff 4b 18 decl 0x18(%ebx) if (ret != 0) 111c74: 85 f6 test %esi,%esi 111c76: 74 98 je 111c10 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 111c78: 83 ec 0c sub $0xc,%esp 111c7b: ff 73 28 pushl 0x28(%ebx) 111c7e: e8 89 b8 ff ff call 10d50c 111c83: 83 c4 10 add $0x10,%esp out_nolock: if (read > 0) 111c86: 8b 45 d4 mov -0x2c(%ebp),%eax 111c89: 85 c0 test %eax,%eax 111c8b: 7e 0b jle 111c98 return read; return ret; } 111c8d: 8b 45 d4 mov -0x2c(%ebp),%eax 111c90: 8d 65 f4 lea -0xc(%ebp),%esp 111c93: 5b pop %ebx 111c94: 5e pop %esi 111c95: 5f pop %edi 111c96: c9 leave 111c97: c3 ret PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 111c98: 89 75 d4 mov %esi,-0x2c(%ebp) } 111c9b: 8b 45 d4 mov -0x2c(%ebp),%eax 111c9e: 8d 65 f4 lea -0xc(%ebp),%esp 111ca1: 5b pop %ebx 111ca2: 5e pop %esi 111ca3: 5f pop %edi 111ca4: c9 leave 111ca5: c3 ret 111ca6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 111ca8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 111caf: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 111cb2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111cb5: 5b pop %ebx <== NOT EXECUTED 111cb6: 5e pop %esi <== NOT EXECUTED 111cb7: 5f pop %edi <== NOT EXECUTED 111cb8: c9 leave <== NOT EXECUTED 111cb9: c3 ret <== NOT EXECUTED 111cba: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 111cbc: 8b 45 10 mov 0x10(%ebp),%eax 111cbf: 2b 45 d0 sub -0x30(%ebp),%eax 111cc2: 89 55 cc mov %edx,-0x34(%ebp) 111cc5: 39 c2 cmp %eax,%edx 111cc7: 76 03 jbe 111ccc 111cc9: 89 45 cc mov %eax,-0x34(%ebp) chunk1 = pipe->Size - pipe->Start; 111ccc: 8b 73 08 mov 0x8(%ebx),%esi 111ccf: 8b 43 04 mov 0x4(%ebx),%eax 111cd2: 29 f0 sub %esi,%eax if (chunk > chunk1) { 111cd4: 39 45 cc cmp %eax,-0x34(%ebp) 111cd7: 7f 71 jg 111d4a memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 111cd9: 8b 45 0c mov 0xc(%ebp),%eax 111cdc: 03 45 d0 add -0x30(%ebp),%eax 111cdf: 03 33 add (%ebx),%esi 111ce1: 89 c7 mov %eax,%edi 111ce3: 8b 4d cc mov -0x34(%ebp),%ecx 111ce6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start += chunk; 111ce8: 8b 45 cc mov -0x34(%ebp),%eax 111ceb: 03 43 08 add 0x8(%ebx),%eax pipe->Start %= pipe->Size; 111cee: 31 d2 xor %edx,%edx 111cf0: f7 73 04 divl 0x4(%ebx) 111cf3: 89 53 08 mov %edx,0x8(%ebx) pipe->Length -= chunk; 111cf6: 8b 43 0c mov 0xc(%ebx),%eax 111cf9: 2b 45 cc sub -0x34(%ebp),%eax 111cfc: 89 43 0c mov %eax,0xc(%ebx) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 111cff: 85 c0 test %eax,%eax 111d01: 75 07 jne 111d0a pipe->Start = 0; 111d03: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 111d0a: 8b 53 1c mov 0x1c(%ebx),%edx 111d0d: 85 d2 test %edx,%edx 111d0f: 75 5f jne 111d70 PIPE_WAKEUPWRITERS(pipe); read += chunk; 111d11: 8b 45 cc mov -0x34(%ebp),%eax 111d14: 01 45 d4 add %eax,-0x2c(%ebp) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111d17: 8b 45 d4 mov -0x2c(%ebp),%eax 111d1a: 89 45 d0 mov %eax,-0x30(%ebp) 111d1d: 8b 45 10 mov 0x10(%ebp),%eax 111d20: 39 45 d4 cmp %eax,-0x2c(%ebp) 111d23: 0f 82 e7 fe ff ff jb 111c10 <== NEVER TAKEN 111d29: 8d 76 00 lea 0x0(%esi),%esi while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 111d2c: 31 f6 xor %esi,%esi 111d2e: e9 45 ff ff ff jmp 111c78 111d33: 90 nop <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 111d34: be f5 ff ff ff mov $0xfffffff5,%esi 111d39: e9 3a ff ff ff jmp 111c78 111d3e: 66 90 xchg %ax,%ax <== NOT EXECUTED PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 111d40: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111d45: e9 3c ff ff ff jmp 111c86 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 111d4a: 8b 55 0c mov 0xc(%ebp),%edx 111d4d: 03 55 d0 add -0x30(%ebp),%edx 111d50: 03 33 add (%ebx),%esi 111d52: 89 d7 mov %edx,%edi 111d54: 89 c1 mov %eax,%ecx 111d56: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 111d58: 8b 55 d0 mov -0x30(%ebp),%edx 111d5b: 01 c2 add %eax,%edx 111d5d: 03 55 0c add 0xc(%ebp),%edx 111d60: 8b 4d cc mov -0x34(%ebp),%ecx 111d63: 29 c1 sub %eax,%ecx 111d65: 8b 33 mov (%ebx),%esi 111d67: 89 d7 mov %edx,%edi 111d69: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111d6b: e9 78 ff ff ff jmp 111ce8 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 111d70: 83 ec 08 sub $0x8,%esp 111d73: 8d 45 e4 lea -0x1c(%ebp),%eax 111d76: 50 push %eax 111d77: ff 73 30 pushl 0x30(%ebx) 111d7a: e8 c1 0d 00 00 call 112b40 111d7f: 83 c4 10 add $0x10,%esp 111d82: eb 8d jmp 111d11 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111d84: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 111d8b: 31 f6 xor %esi,%esi <== NOT EXECUTED 111d8d: e9 e6 fe ff ff jmp 111c78 <== NOT EXECUTED =============================================================================== 001116c0 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 1116c0: 55 push %ebp 1116c1: 89 e5 mov %esp,%ebp 1116c3: 57 push %edi 1116c4: 56 push %esi 1116c5: 53 push %ebx 1116c6: 83 ec 1c sub $0x1c,%esp 1116c9: 8b 7d 08 mov 0x8(%ebp),%edi pipe_control_t *pipe = *pipep; 1116cc: 8b 1f mov (%edi),%ebx /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); 1116ce: 8b 45 0c mov 0xc(%ebp),%eax 1116d1: 8b 40 14 mov 0x14(%eax),%eax 1116d4: 89 c6 mov %eax,%esi 1116d6: 83 e6 06 and $0x6,%esi if (mode & LIBIO_FLAGS_READ) 1116d9: a8 02 test $0x2,%al 1116db: 74 03 je 1116e0 pipe->Readers --; 1116dd: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 1116e0: f7 c6 04 00 00 00 test $0x4,%esi 1116e6: 74 03 je 1116eb pipe->Writers --; 1116e8: ff 4b 14 decl 0x14(%ebx) PIPE_UNLOCK(pipe); 1116eb: 83 ec 0c sub $0xc,%esp 1116ee: ff 73 28 pushl 0x28(%ebx) 1116f1: e8 16 be ff ff call 10d50c if (pipe->Readers == 0 && pipe->Writers == 0) { 1116f6: 83 c4 10 add $0x10,%esp 1116f9: 8b 53 10 mov 0x10(%ebx),%edx 1116fc: 85 d2 test %edx,%edx 1116fe: 74 2c je 11172c *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 111700: 8b 43 14 mov 0x14(%ebx),%eax 111703: 85 c0 test %eax,%eax 111705: 75 17 jne 11171e <== NEVER TAKEN 111707: 83 fe 02 cmp $0x2,%esi 11170a: 74 12 je 11171e <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 11170c: 83 ec 08 sub $0x8,%esp 11170f: 8d 45 e4 lea -0x1c(%ebp),%eax 111712: 50 push %eax 111713: ff 73 2c pushl 0x2c(%ebx) 111716: e8 25 14 00 00 call 112b40 11171b: 83 c4 10 add $0x10,%esp pipe_unlock(); 11171e: e8 85 ff ff ff call 1116a8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 111723: 8d 65 f4 lea -0xc(%ebp),%esp 111726: 5b pop %ebx 111727: 5e pop %esi 111728: 5f pop %edi 111729: c9 leave 11172a: c3 ret 11172b: 90 nop <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 11172c: 8b 43 14 mov 0x14(%ebx),%eax 11172f: 85 c0 test %eax,%eax 111731: 74 25 je 111758 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 111733: 83 fe 04 cmp $0x4,%esi 111736: 74 e6 je 11171e <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 111738: 83 ec 08 sub $0x8,%esp 11173b: 8d 45 e4 lea -0x1c(%ebp),%eax 11173e: 50 push %eax 11173f: ff 73 30 pushl 0x30(%ebx) 111742: e8 f9 13 00 00 call 112b40 111747: 83 c4 10 add $0x10,%esp else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 11174a: e8 59 ff ff ff call 1116a8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 11174f: 8d 65 f4 lea -0xc(%ebp),%esp 111752: 5b pop %ebx 111753: 5e pop %esi 111754: 5f pop %edi 111755: c9 leave 111756: c3 ret 111757: 90 nop <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 111758: 83 ec 0c sub $0xc,%esp 11175b: ff 73 2c pushl 0x2c(%ebx) 11175e: e8 4d 13 00 00 call 112ab0 rtems_barrier_delete(pipe->writeBarrier); 111763: 5e pop %esi 111764: ff 73 30 pushl 0x30(%ebx) 111767: e8 44 13 00 00 call 112ab0 rtems_semaphore_delete(pipe->Semaphore); 11176c: 59 pop %ecx 11176d: ff 73 28 pushl 0x28(%ebx) 111770: e8 f7 bb ff ff call 10d36c free(pipe->Buffer); 111775: 5a pop %edx 111776: ff 33 pushl (%ebx) 111778: e8 af 81 ff ff call 10992c free(pipe); 11177d: 89 1c 24 mov %ebx,(%esp) 111780: e8 a7 81 ff ff call 10992c /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 111785: c7 07 00 00 00 00 movl $0x0,(%edi) 11178b: 83 c4 10 add $0x10,%esp /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 11178e: e8 15 ff ff ff call 1116a8 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 111793: 8d 65 f4 lea -0xc(%ebp),%esp 111796: 5b pop %ebx 111797: 5e pop %esi 111798: 5f pop %edi 111799: c9 leave 11179a: c3 ret =============================================================================== 00111d94 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 111d94: 55 push %ebp 111d95: 89 e5 mov %esp,%ebp 111d97: 57 push %edi 111d98: 56 push %esi 111d99: 53 push %ebx 111d9a: 83 ec 2c sub $0x2c,%esp int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 111d9d: 8b 5d 10 mov 0x10(%ebp),%ebx 111da0: 85 db test %ebx,%ebx 111da2: 75 0c jne 111db0 <== ALWAYS TAKEN return 0; 111da4: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 111da6: 89 d8 mov %ebx,%eax 111da8: 8d 65 f4 lea -0xc(%ebp),%esp 111dab: 5b pop %ebx 111dac: 5e pop %esi 111dad: 5f pop %edi 111dae: c9 leave 111daf: c3 ret /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 111db0: 51 push %ecx 111db1: 6a 00 push $0x0 111db3: 6a 00 push $0x0 111db5: 8b 45 08 mov 0x8(%ebp),%eax 111db8: ff 70 28 pushl 0x28(%eax) 111dbb: e8 50 b6 ff ff call 10d410 111dc0: 83 c4 10 add $0x10,%esp 111dc3: 85 c0 test %eax,%eax 111dc5: 0f 85 1d 01 00 00 jne 111ee8 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 111dcb: 8b 45 08 mov 0x8(%ebp),%eax 111dce: 8b 50 10 mov 0x10(%eax),%edx 111dd1: 85 d2 test %edx,%edx 111dd3: 0f 84 4b 01 00 00 je 111f24 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 111dd9: 8b 48 04 mov 0x4(%eax),%ecx 111ddc: 39 4d 10 cmp %ecx,0x10(%ebp) 111ddf: 0f 87 35 01 00 00 ja 111f1a <== NEVER TAKEN 111de5: 8b 7d 10 mov 0x10(%ebp),%edi 111de8: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111def: 31 db xor %ebx,%ebx else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 111df1: 89 5d d4 mov %ebx,-0x2c(%ebp) 111df4: 8b 5d 08 mov 0x8(%ebp),%ebx /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 111df7: 8b 43 0c mov 0xc(%ebx),%eax 111dfa: 89 ca mov %ecx,%edx 111dfc: 29 c2 sub %eax,%edx 111dfe: 39 fa cmp %edi,%edx 111e00: 73 6f jae 111e71 if (LIBIO_NODELAY(iop)) { 111e02: 8b 45 14 mov 0x14(%ebp),%eax 111e05: f6 40 14 01 testb $0x1,0x14(%eax) 111e09: 0f 85 28 01 00 00 jne 111f37 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 111e0f: ff 43 1c incl 0x1c(%ebx) PIPE_UNLOCK(pipe); 111e12: 83 ec 0c sub $0xc,%esp 111e15: ff 73 28 pushl 0x28(%ebx) 111e18: e8 ef b6 ff ff call 10d50c if (! PIPE_WRITEWAIT(pipe)) 111e1d: 5e pop %esi 111e1e: 58 pop %eax 111e1f: 6a 00 push $0x0 111e21: ff 73 30 pushl 0x30(%ebx) 111e24: e8 7b 0d 00 00 call 112ba4 111e29: 83 c4 0c add $0xc,%esp 111e2c: 83 f8 01 cmp $0x1,%eax 111e2f: 19 f6 sbb %esi,%esi 111e31: f7 d6 not %esi 111e33: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111e36: 6a 00 push $0x0 111e38: 6a 00 push $0x0 111e3a: ff 73 28 pushl 0x28(%ebx) 111e3d: e8 ce b5 ff ff call 10d410 111e42: 83 c4 10 add $0x10,%esp 111e45: 85 c0 test %eax,%eax 111e47: 0f 85 e0 00 00 00 jne 111f2d <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 111e4d: ff 4b 1c decl 0x1c(%ebx) if (ret != 0) 111e50: 85 f6 test %esi,%esi 111e52: 0f 85 e9 00 00 00 jne 111f41 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 111e58: 8b 4b 10 mov 0x10(%ebx),%ecx 111e5b: 85 c9 test %ecx,%ecx 111e5d: 0f 84 8f 00 00 00 je 111ef2 <== NEVER TAKEN 111e63: 8b 4b 04 mov 0x4(%ebx),%ecx /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 111e66: 8b 43 0c mov 0xc(%ebx),%eax 111e69: 89 ca mov %ecx,%edx 111e6b: 29 c2 sub %eax,%edx 111e6d: 39 fa cmp %edi,%edx 111e6f: 72 91 jb 111e02 <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 111e71: 8b 75 10 mov 0x10(%ebp),%esi 111e74: 2b 75 d0 sub -0x30(%ebp),%esi 111e77: 89 55 cc mov %edx,-0x34(%ebp) 111e7a: 39 f2 cmp %esi,%edx 111e7c: 76 03 jbe 111e81 111e7e: 89 75 cc mov %esi,-0x34(%ebp) chunk1 = pipe->Size - PIPE_WSTART(pipe); 111e81: 03 43 08 add 0x8(%ebx),%eax 111e84: 31 d2 xor %edx,%edx 111e86: f7 f1 div %ecx 111e88: 89 c8 mov %ecx,%eax 111e8a: 29 d0 sub %edx,%eax if (chunk > chunk1) { 111e8c: 39 45 cc cmp %eax,-0x34(%ebp) 111e8f: 0f 8e b1 00 00 00 jle 111f46 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 111e95: 03 13 add (%ebx),%edx 111e97: 8b 75 0c mov 0xc(%ebp),%esi 111e9a: 03 75 d0 add -0x30(%ebp),%esi 111e9d: 89 d7 mov %edx,%edi 111e9f: 89 c1 mov %eax,%ecx 111ea1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 111ea3: 8b 13 mov (%ebx),%edx 111ea5: 8b 4d cc mov -0x34(%ebp),%ecx 111ea8: 29 c1 sub %eax,%ecx 111eaa: 03 45 d0 add -0x30(%ebp),%eax 111ead: 8b 75 0c mov 0xc(%ebp),%esi 111eb0: 01 c6 add %eax,%esi 111eb2: 89 d7 mov %edx,%edi 111eb4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 111eb6: 8b 45 cc mov -0x34(%ebp),%eax 111eb9: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 111ebc: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 111ec0: 0f 85 94 00 00 00 jne 111f5a PIPE_WAKEUPREADERS(pipe); written += chunk; 111ec6: 8b 45 cc mov -0x34(%ebp),%eax 111ec9: 01 45 d4 add %eax,-0x2c(%ebp) } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111ecc: 8b 45 d4 mov -0x2c(%ebp),%eax 111ecf: 89 45 d0 mov %eax,-0x30(%ebp) 111ed2: 39 45 10 cmp %eax,0x10(%ebp) 111ed5: 0f 86 95 00 00 00 jbe 111f70 <== ALWAYS TAKEN 111edb: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); written += chunk; /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 111ede: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 111ee3: e9 0f ff ff ff jmp 111df7 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) return -EINTR; 111ee8: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 111eed: e9 b4 fe ff ff jmp 111da6 <== NOT EXECUTED 111ef2: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 111ef5: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 111efa: 83 ec 0c sub $0xc,%esp 111efd: 8b 45 08 mov 0x8(%ebp),%eax 111f00: ff 70 28 pushl 0x28(%eax) 111f03: e8 04 b6 ff ff call 10d50c 111f08: 83 c4 10 add $0x10,%esp /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 111f0b: 85 db test %ebx,%ebx 111f0d: 0f 8f 93 fe ff ff jg 111da6 return written; return ret; 111f13: 89 f3 mov %esi,%ebx 111f15: e9 8c fe ff ff jmp 111da6 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 111f1a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 111f1f: e9 c4 fe ff ff jmp 111de8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 111f24: be e0 ff ff ff mov $0xffffffe0,%esi const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; 111f29: 31 db xor %ebx,%ebx 111f2b: eb cd jmp 111efa 111f2d: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 111f30: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111f35: eb d4 jmp 111f0b <== NOT EXECUTED 111f37: 8b 5d d4 mov -0x2c(%ebp),%ebx chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 111f3a: be f5 ff ff ff mov $0xfffffff5,%esi 111f3f: eb b9 jmp 111efa 111f41: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 111f44: eb b4 jmp 111efa <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 111f46: 03 13 add (%ebx),%edx 111f48: 8b 75 0c mov 0xc(%ebp),%esi 111f4b: 03 75 d0 add -0x30(%ebp),%esi 111f4e: 89 d7 mov %edx,%edi 111f50: 8b 4d cc mov -0x34(%ebp),%ecx 111f53: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111f55: e9 5c ff ff ff jmp 111eb6 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 111f5a: 52 push %edx 111f5b: 52 push %edx 111f5c: 8d 45 e4 lea -0x1c(%ebp),%eax 111f5f: 50 push %eax 111f60: ff 73 2c pushl 0x2c(%ebx) 111f63: e8 d8 0b 00 00 call 112b40 111f68: 83 c4 10 add $0x10,%esp 111f6b: e9 56 ff ff ff jmp 111ec6 111f70: 8b 5d d4 mov -0x2c(%ebp),%ebx } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 111f73: 31 f6 xor %esi,%esi 111f75: eb 83 jmp 111efa =============================================================================== 0010baac : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10baac: 55 push %ebp 10baad: 89 e5 mov %esp,%ebp 10baaf: 53 push %ebx 10bab0: 83 ec 04 sub $0x4,%esp 10bab3: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10bab6: ff 05 08 d1 12 00 incl 0x12d108 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10babc: 8d 50 ff lea -0x1(%eax),%edx 10babf: 85 c2 test %eax,%edx 10bac1: 75 05 jne 10bac8 <== NEVER TAKEN 10bac3: 83 f8 03 cmp $0x3,%eax 10bac6: 77 0c ja 10bad4 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10bac8: b8 16 00 00 00 mov $0x16,%eax 10bacd: 5a pop %edx 10bace: 5b pop %ebx 10bacf: c9 leave 10bad0: c3 ret 10bad1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10bad4: 59 pop %ecx 10bad5: 5b pop %ebx 10bad6: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10bad7: e9 78 01 00 00 jmp 10bc54 =============================================================================== 0011d978 : ssize_t read( int fd, void *buffer, size_t count ) { 11d978: 55 push %ebp 11d979: 89 e5 mov %esp,%ebp 11d97b: 53 push %ebx 11d97c: 83 ec 04 sub $0x4,%esp 11d97f: 8b 4d 08 mov 0x8(%ebp),%ecx 11d982: 8b 45 0c mov 0xc(%ebp),%eax 11d985: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11d988: 3b 0d 4c 11 12 00 cmp 0x12114c,%ecx 11d98e: 73 50 jae 11d9e0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11d990: c1 e1 03 shl $0x3,%ecx 11d993: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx 11d99a: 29 cb sub %ecx,%ebx 11d99c: 03 1d c0 52 12 00 add 0x1252c0,%ebx rtems_libio_check_is_open( iop ); 11d9a2: 8b 4b 14 mov 0x14(%ebx),%ecx 11d9a5: f6 c5 01 test $0x1,%ch 11d9a8: 74 36 je 11d9e0 rtems_libio_check_buffer( buffer ); 11d9aa: 85 c0 test %eax,%eax 11d9ac: 74 46 je 11d9f4 <== NEVER TAKEN rtems_libio_check_count( count ); 11d9ae: 85 d2 test %edx,%edx 11d9b0: 74 26 je 11d9d8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11d9b2: 83 e1 02 and $0x2,%ecx 11d9b5: 74 3d je 11d9f4 /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 11d9b7: 51 push %ecx 11d9b8: 8b 4b 20 mov 0x20(%ebx),%ecx 11d9bb: 52 push %edx 11d9bc: 50 push %eax 11d9bd: 53 push %ebx 11d9be: ff 51 08 call *0x8(%ecx) if ( rc > 0 ) 11d9c1: 83 c4 10 add $0x10,%esp 11d9c4: 85 c0 test %eax,%eax 11d9c6: 7e 0b jle 11d9d3 iop->offset += rc; 11d9c8: 89 c1 mov %eax,%ecx 11d9ca: c1 f9 1f sar $0x1f,%ecx 11d9cd: 01 43 0c add %eax,0xc(%ebx) 11d9d0: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11d9d3: 8b 5d fc mov -0x4(%ebp),%ebx 11d9d6: c9 leave 11d9d7: c3 ret rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 11d9d8: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 11d9da: 8b 5d fc mov -0x4(%ebp),%ebx 11d9dd: c9 leave 11d9de: c3 ret 11d9df: 90 nop <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 11d9e0: e8 cb 48 ff ff call 1122b0 <__errno> 11d9e5: c7 00 09 00 00 00 movl $0x9,(%eax) 11d9eb: b8 ff ff ff ff mov $0xffffffff,%eax 11d9f0: eb e1 jmp 11d9d3 11d9f2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11d9f4: e8 b7 48 ff ff call 1122b0 <__errno> 11d9f9: c7 00 16 00 00 00 movl $0x16,(%eax) 11d9ff: b8 ff ff ff ff mov $0xffffffff,%eax 11da04: eb cd jmp 11d9d3 =============================================================================== 0010b038 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10b038: 55 push %ebp 10b039: 89 e5 mov %esp,%ebp 10b03b: 57 push %edi 10b03c: 56 push %esi 10b03d: 53 push %ebx 10b03e: 83 ec 3c sub $0x3c,%esp 10b041: 8b 55 08 mov 0x8(%ebp),%edx 10b044: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10b047: 85 db test %ebx,%ebx 10b049: 74 6d je 10b0b8 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10b04b: 31 c0 xor %eax,%eax 10b04d: b9 ff ff ff ff mov $0xffffffff,%ecx 10b052: 89 d7 mov %edx,%edi 10b054: f2 ae repnz scas %es:(%edi),%al 10b056: f7 d1 not %ecx 10b058: 49 dec %ecx 10b059: 83 ec 0c sub $0xc,%esp 10b05c: 6a 00 push $0x0 10b05e: 8d 75 d4 lea -0x2c(%ebp),%esi 10b061: 56 push %esi 10b062: 6a 00 push $0x0 10b064: 51 push %ecx 10b065: 52 push %edx 10b066: e8 79 ee ff ff call 109ee4 0, &loc, false ); if ( result != 0 ) 10b06b: 83 c4 20 add $0x20,%esp 10b06e: 85 c0 test %eax,%eax 10b070: 74 0e je 10b080 <== ALWAYS TAKEN return -1; 10b072: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b077: 8d 65 f4 lea -0xc(%ebp),%esp 10b07a: 5b pop %ebx 10b07b: 5e pop %esi 10b07c: 5f pop %edi 10b07d: c9 leave 10b07e: c3 ret 10b07f: 90 nop <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10b080: 83 ec 0c sub $0xc,%esp 10b083: 56 push %esi 10b084: 8b 45 e0 mov -0x20(%ebp),%eax 10b087: ff 50 10 call *0x10(%eax) 10b08a: 83 c4 10 add $0x10,%esp 10b08d: 83 f8 04 cmp $0x4,%eax 10b090: 75 3e jne 10b0d0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10b092: 50 push %eax 10b093: ff 75 10 pushl 0x10(%ebp) 10b096: 53 push %ebx 10b097: 56 push %esi 10b098: 8b 45 e0 mov -0x20(%ebp),%eax 10b09b: ff 50 3c call *0x3c(%eax) rtems_filesystem_freenode( &loc ); 10b09e: 89 34 24 mov %esi,(%esp) 10b0a1: 89 45 c4 mov %eax,-0x3c(%ebp) 10b0a4: e8 13 ef ff ff call 109fbc return result; 10b0a9: 83 c4 10 add $0x10,%esp 10b0ac: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b0af: 8d 65 f4 lea -0xc(%ebp),%esp 10b0b2: 5b pop %ebx 10b0b3: 5e pop %esi 10b0b4: 5f pop %edi 10b0b5: c9 leave 10b0b6: c3 ret 10b0b7: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10b0b8: e8 1f 9d 00 00 call 114ddc <__errno> 10b0bd: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b0c3: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b0c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b0cb: 5b pop %ebx 10b0cc: 5e pop %esi 10b0cd: 5f pop %edi 10b0ce: c9 leave 10b0cf: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 10b0d0: 83 ec 0c sub $0xc,%esp 10b0d3: 56 push %esi 10b0d4: e8 e3 ee ff ff call 109fbc rtems_set_errno_and_return_minus_one( EINVAL ); 10b0d9: e8 fe 9c 00 00 call 114ddc <__errno> 10b0de: c7 00 16 00 00 00 movl $0x16,(%eax) 10b0e4: 83 c4 10 add $0x10,%esp 10b0e7: b8 ff ff ff ff mov $0xffffffff,%eax 10b0ec: eb 89 jmp 10b077 =============================================================================== 00109cfc : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109cfc: 55 push %ebp 109cfd: 89 e5 mov %esp,%ebp 109cff: 57 push %edi 109d00: 56 push %esi 109d01: 53 push %ebx 109d02: 83 ec 1c sub $0x1c,%esp 109d05: 8b 45 08 mov 0x8(%ebp),%eax 109d08: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109d0b: 3b 05 2c 35 12 00 cmp 0x12352c,%eax 109d11: 0f 83 ef 00 00 00 jae 109e06 iop = rtems_libio_iop( fd ); 109d17: c1 e0 03 shl $0x3,%eax 109d1a: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi 109d21: 29 c6 sub %eax,%esi 109d23: 03 35 a0 76 12 00 add 0x1276a0,%esi rtems_libio_check_is_open( iop ); 109d29: 8b 46 14 mov 0x14(%esi),%eax 109d2c: f6 c4 01 test $0x1,%ah 109d2f: 0f 84 d1 00 00 00 je 109e06 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109d35: a8 02 test $0x2,%al 109d37: 0f 84 97 00 00 00 je 109dd4 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109d3d: 85 db test %ebx,%ebx 109d3f: 0f 84 8f 00 00 00 je 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109d45: 8b 7d 10 mov 0x10(%ebp),%edi 109d48: 85 ff test %edi,%edi 109d4a: 0f 8e 84 00 00 00 jle 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109d50: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109d57: 7f 7b jg 109dd4 <== NEVER TAKEN 109d59: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109d5d: 31 c0 xor %eax,%eax 109d5f: 31 d2 xor %edx,%edx 109d61: eb 03 jmp 109d66 109d63: 90 nop <== NOT EXECUTED if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d64: 89 fa mov %edi,%edx /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) 109d66: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109d69: 85 c9 test %ecx,%ecx 109d6b: 74 67 je 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d6d: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109d71: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109d74: 39 fa cmp %edi,%edx 109d76: 7f 5c jg 109dd4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109d78: 85 c9 test %ecx,%ecx 109d7a: 74 04 je 109d80 all_zeros = false; 109d7c: c6 45 e4 00 movb $0x0,-0x1c(%ebp) * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109d80: 40 inc %eax 109d81: 39 45 10 cmp %eax,0x10(%ebp) 109d84: 7f de jg 109d64 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 109d86: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) 109d8a: 75 68 jne 109df4 109d8c: 31 ff xor %edi,%edi 109d8e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 109d95: eb 1d jmp 109db4 109d97: 90 nop <== NOT EXECUTED ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109d98: 74 0e je 109da8 <== NEVER TAKEN iop->offset += bytes; 109d9a: 89 c1 mov %eax,%ecx 109d9c: c1 f9 1f sar $0x1f,%ecx 109d9f: 01 46 0c add %eax,0xc(%esi) 109da2: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 109da5: 01 45 e4 add %eax,-0x1c(%ebp) } if (bytes != iov[ v ].iov_len) 109da8: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax 109dac: 75 38 jne 109de6 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109dae: 47 inc %edi 109daf: 39 7d 10 cmp %edi,0x10(%ebp) 109db2: 7e 32 jle 109de6 bytes = (*iop->pathinfo.handlers->read_h)( 109db4: 50 push %eax 109db5: 8b 46 20 mov 0x20(%esi),%eax 109db8: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) 109dbc: ff 34 fb pushl (%ebx,%edi,8) 109dbf: 56 push %esi 109dc0: ff 50 08 call *0x8(%eax) iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 109dc3: 83 c4 10 add $0x10,%esp 109dc6: 83 f8 00 cmp $0x0,%eax 109dc9: 7d cd jge 109d98 <== ALWAYS TAKEN return -1; 109dcb: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109dd2: eb 12 jmp 109de6 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109dd4: e8 57 92 00 00 call 113030 <__errno> 109dd9: c7 00 16 00 00 00 movl $0x16,(%eax) 109ddf: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109de6: 8b 45 e4 mov -0x1c(%ebp),%eax 109de9: 8d 65 f4 lea -0xc(%ebp),%esp 109dec: 5b pop %ebx 109ded: 5e pop %esi 109dee: 5f pop %edi 109def: c9 leave 109df0: c3 ret 109df1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { return 0; 109df4: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109dfb: 8b 45 e4 mov -0x1c(%ebp),%eax 109dfe: 8d 65 f4 lea -0xc(%ebp),%esp 109e01: 5b pop %ebx 109e02: 5e pop %esi 109e03: 5f pop %edi 109e04: c9 leave 109e05: c3 ret rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 109e06: e8 25 92 00 00 call 113030 <__errno> 109e0b: c7 00 09 00 00 00 movl $0x9,(%eax) 109e11: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) 109e18: eb cc jmp 109de6 =============================================================================== 0011da94 : void *realloc( void *ptr, size_t size ) { 11da94: 55 push %ebp 11da95: 89 e5 mov %esp,%ebp 11da97: 57 push %edi 11da98: 56 push %esi 11da99: 53 push %ebx 11da9a: 83 ec 2c sub $0x2c,%esp 11da9d: 8b 5d 08 mov 0x8(%ebp),%ebx 11daa0: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11daa3: ff 05 f0 52 12 00 incl 0x1252f0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11daa9: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 11dab0: 74 72 je 11db24 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11dab2: 85 db test %ebx,%ebx 11dab4: 74 5e je 11db14 return malloc( size ); if ( !size ) { 11dab6: 85 f6 test %esi,%esi 11dab8: 74 3a je 11daf4 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11daba: 52 push %edx 11dabb: 8d 45 e4 lea -0x1c(%ebp),%eax 11dabe: 50 push %eax 11dabf: 53 push %ebx 11dac0: ff 35 58 11 12 00 pushl 0x121158 11dac6: e8 49 01 00 00 call 11dc14 <_Protected_heap_Get_block_size> 11dacb: 83 c4 10 add $0x10,%esp 11dace: 84 c0 test %al,%al 11dad0: 74 32 je 11db04 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11dad2: 50 push %eax 11dad3: 56 push %esi 11dad4: 53 push %ebx 11dad5: ff 35 58 11 12 00 pushl 0x121158 11dadb: e8 6c 01 00 00 call 11dc4c <_Protected_heap_Resize_block> 11dae0: 83 c4 10 add $0x10,%esp 11dae3: 84 c0 test %al,%al 11dae5: 74 5d je 11db44 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11dae7: 89 d8 mov %ebx,%eax 11dae9: 8d 65 f4 lea -0xc(%ebp),%esp 11daec: 5b pop %ebx 11daed: 5e pop %esi 11daee: 5f pop %edi 11daef: c9 leave 11daf0: c3 ret 11daf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11daf4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11daf7: 53 push %ebx <== NOT EXECUTED 11daf8: e8 97 a5 fe ff call 108094 <== NOT EXECUTED return (void *) 0; 11dafd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11db00: 31 db xor %ebx,%ebx <== NOT EXECUTED 11db02: eb e3 jmp 11dae7 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11db04: e8 a7 47 ff ff call 1122b0 <__errno> 11db09: c7 00 16 00 00 00 movl $0x16,(%eax) return (void *) 0; 11db0f: 31 db xor %ebx,%ebx 11db11: eb d4 jmp 11dae7 11db13: 90 nop <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11db14: 83 ec 0c sub $0xc,%esp 11db17: 56 push %esi 11db18: e8 4b a8 fe ff call 108368 11db1d: 89 c3 mov %eax,%ebx 11db1f: 83 c4 10 add $0x10,%esp 11db22: eb c3 jmp 11dae7 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 11db24: a1 34 54 12 00 mov 0x125434,%eax 11db29: 85 c0 test %eax,%eax 11db2b: 74 04 je 11db31 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11db2d: 31 db xor %ebx,%ebx 11db2f: eb b6 jmp 11dae7 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11db31: 8b 0d d4 56 12 00 mov 0x1256d4,%ecx 11db37: 85 c9 test %ecx,%ecx 11db39: 0f 84 73 ff ff ff je 11dab2 <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11db3f: 31 db xor %ebx,%ebx <== NOT EXECUTED 11db41: eb a4 jmp 11dae7 <== NOT EXECUTED 11db43: 90 nop <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 11db44: 83 ec 0c sub $0xc,%esp 11db47: 56 push %esi 11db48: e8 1b a8 fe ff call 108368 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11db4d: ff 0d e4 52 12 00 decl 0x1252e4 if ( !new_area ) { 11db53: 83 c4 10 add $0x10,%esp 11db56: 85 c0 test %eax,%eax 11db58: 74 d3 je 11db2d return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11db5a: 8b 55 e4 mov -0x1c(%ebp),%edx 11db5d: 89 f1 mov %esi,%ecx 11db5f: 39 d6 cmp %edx,%esi 11db61: 76 02 jbe 11db65 <== NEVER TAKEN 11db63: 89 d1 mov %edx,%ecx 11db65: 89 c7 mov %eax,%edi 11db67: 89 de mov %ebx,%esi 11db69: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11db6b: 83 ec 0c sub $0xc,%esp 11db6e: 53 push %ebx 11db6f: 89 45 d4 mov %eax,-0x2c(%ebp) 11db72: e8 1d a5 fe ff call 108094 return new_area; 11db77: 83 c4 10 add $0x10,%esp 11db7a: 8b 45 d4 mov -0x2c(%ebp),%eax 11db7d: 89 c3 mov %eax,%ebx 11db7f: e9 63 ff ff ff jmp 11dae7 =============================================================================== 001092e0 : #include int rmdir( const char *pathname ) { 1092e0: 55 push %ebp 1092e1: 89 e5 mov %esp,%ebp 1092e3: 57 push %edi 1092e4: 56 push %esi 1092e5: 53 push %ebx 1092e6: 83 ec 58 sub $0x58,%esp 1092e9: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 1092ec: 53 push %ebx 1092ed: e8 46 f1 ff ff call 108438 if ( parentpathlen == 0 ) 1092f2: 83 c4 10 add $0x10,%esp 1092f5: 85 c0 test %eax,%eax 1092f7: 0f 85 0f 01 00 00 jne 10940c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 1092fd: 50 push %eax 1092fe: 8d 45 d0 lea -0x30(%ebp),%eax 109301: 89 45 b4 mov %eax,-0x4c(%ebp) 109304: 50 push %eax 109305: 8d 45 e4 lea -0x1c(%ebp),%eax 109308: 50 push %eax 109309: 53 push %ebx 10930a: e8 45 01 00 00 call 109454 10930f: 83 c4 10 add $0x10,%esp 109312: 31 d2 xor %edx,%edx const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 109314: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 109318: 8d 7d bc lea -0x44(%ebp),%edi 10931b: b9 05 00 00 00 mov $0x5,%ecx 109320: 8b 75 b4 mov -0x4c(%ebp),%esi 109323: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 109325: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 109327: be ff ff ff ff mov $0xffffffff,%esi 10932c: 89 f1 mov %esi,%ecx 10932e: 89 df mov %ebx,%edi 109330: 31 c0 xor %eax,%eax 109332: f2 ae repnz scas %es:(%edi),%al 109334: f7 d1 not %ecx 109336: 49 dec %ecx 109337: 83 ec 08 sub $0x8,%esp 10933a: 51 push %ecx 10933b: 53 push %ebx 10933c: e8 3b f1 ff ff call 10847c 109341: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 109343: 89 f1 mov %esi,%ecx 109345: 89 df mov %ebx,%edi 109347: 31 c0 xor %eax,%eax 109349: f2 ae repnz scas %es:(%edi),%al 10934b: f7 d1 not %ecx 10934d: 49 dec %ecx 10934e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 109355: 8d 75 bc lea -0x44(%ebp),%esi 109358: 56 push %esi 109359: 6a 00 push $0x0 10935b: 51 push %ecx 10935c: 53 push %ebx 10935d: e8 2a f0 ff ff call 10838c 0, &loc, false ); if ( result != 0 ) { 109362: 83 c4 20 add $0x20,%esp 109365: 85 c0 test %eax,%eax 109367: 75 5b jne 1093c4 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 109369: 83 ec 0c sub $0xc,%esp 10936c: 56 push %esi 10936d: 8b 45 c8 mov -0x38(%ebp),%eax 109370: ff 50 10 call *0x10(%eax) 109373: 83 c4 10 add $0x10,%esp 109376: 48 dec %eax 109377: 75 5f jne 1093d8 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 109379: 83 ec 08 sub $0x8,%esp 10937c: 56 push %esi 10937d: ff 75 b4 pushl -0x4c(%ebp) 109380: 8b 45 c4 mov -0x3c(%ebp),%eax 109383: ff 50 34 call *0x34(%eax) rtems_filesystem_freenode( &loc ); 109386: 89 34 24 mov %esi,(%esp) 109389: 89 45 ac mov %eax,-0x54(%ebp) 10938c: e8 3b f1 ff ff call 1084cc if ( free_parentloc ) 109391: 83 c4 10 add $0x10,%esp 109394: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 109398: 8b 45 ac mov -0x54(%ebp),%eax 10939b: 75 0b jne 1093a8 rtems_filesystem_freenode( &parentloc ); return result; } 10939d: 8d 65 f4 lea -0xc(%ebp),%esp 1093a0: 5b pop %ebx 1093a1: 5e pop %esi 1093a2: 5f pop %edi 1093a3: c9 leave 1093a4: c3 ret 1093a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 1093a8: 83 ec 0c sub $0xc,%esp 1093ab: ff 75 b4 pushl -0x4c(%ebp) 1093ae: e8 19 f1 ff ff call 1084cc 1093b3: 83 c4 10 add $0x10,%esp 1093b6: 8b 45 ac mov -0x54(%ebp),%eax return result; } 1093b9: 8d 65 f4 lea -0xc(%ebp),%esp 1093bc: 5b pop %ebx 1093bd: 5e pop %esi 1093be: 5f pop %edi 1093bf: c9 leave 1093c0: c3 ret 1093c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 1093c4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1093c8: 75 6f jne 109439 rtems_filesystem_freenode( &parentloc ); return -1; 1093ca: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 1093cf: 8d 65 f4 lea -0xc(%ebp),%esp 1093d2: 5b pop %ebx 1093d3: 5e pop %esi 1093d4: 5f pop %edi 1093d5: c9 leave 1093d6: c3 ret 1093d7: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 1093d8: 83 ec 0c sub $0xc,%esp 1093db: 56 push %esi 1093dc: e8 eb f0 ff ff call 1084cc if ( free_parentloc ) 1093e1: 83 c4 10 add $0x10,%esp 1093e4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1093e8: 74 0e je 1093f8 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1093ea: 83 ec 0c sub $0xc,%esp 1093ed: ff 75 b4 pushl -0x4c(%ebp) 1093f0: e8 d7 f0 ff ff call 1084cc 1093f5: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 1093f8: e8 3f 97 00 00 call 112b3c <__errno> 1093fd: c7 00 14 00 00 00 movl $0x14,(%eax) 109403: b8 ff ff ff ff mov $0xffffffff,%eax 109408: eb 93 jmp 10939d 10940a: 66 90 xchg %ax,%ax <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10940c: 89 c2 mov %eax,%edx 10940e: 83 ec 0c sub $0xc,%esp 109411: 6a 00 push $0x0 109413: 8d 45 d0 lea -0x30(%ebp),%eax 109416: 89 45 b4 mov %eax,-0x4c(%ebp) 109419: 50 push %eax 10941a: 6a 02 push $0x2 10941c: 52 push %edx 10941d: 53 push %ebx 10941e: 89 55 ac mov %edx,-0x54(%ebp) 109421: e8 ce ef ff ff call 1083f4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 109426: 83 c4 20 add $0x20,%esp 109429: 85 c0 test %eax,%eax 10942b: 8b 55 ac mov -0x54(%ebp),%edx 10942e: 75 9a jne 1093ca <== NEVER TAKEN return -1; free_parentloc = true; 109430: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 109434: e9 df fe ff ff jmp 109318 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 109439: 83 ec 0c sub $0xc,%esp 10943c: ff 75 b4 pushl -0x4c(%ebp) 10943f: e8 88 f0 ff ff call 1084cc 109444: 83 c4 10 add $0x10,%esp return -1; 109447: b8 ff ff ff ff mov $0xffffffff,%eax 10944c: e9 4c ff ff ff jmp 10939d =============================================================================== 001087cc : uint32_t rtems_assoc_local_by_name( const rtems_assoc_t *ap, const char *name ) { 1087cc: 55 push %ebp 1087cd: 89 e5 mov %esp,%ebp 1087cf: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 1087d2: ff 75 0c pushl 0xc(%ebp) 1087d5: ff 75 08 pushl 0x8(%ebp) 1087d8: e8 13 02 00 00 call 1089f0 if (nap) 1087dd: 83 c4 10 add $0x10,%esp 1087e0: 85 c0 test %eax,%eax 1087e2: 74 08 je 1087ec return nap->local_value; 1087e4: 8b 40 04 mov 0x4(%eax),%eax return 0; } 1087e7: c9 leave 1087e8: c3 ret 1087e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->local_value; return 0; 1087ec: 31 c0 xor %eax,%eax } 1087ee: c9 leave 1087ef: c3 ret =============================================================================== 0010f8f8 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f8f8: 55 push %ebp 10f8f9: 89 e5 mov %esp,%ebp 10f8fb: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 10f8fe: ff 75 0c pushl 0xc(%ebp) 10f901: ff 75 08 pushl 0x8(%ebp) 10f904: e8 13 00 00 00 call 10f91c if (nap) 10f909: 83 c4 10 add $0x10,%esp 10f90c: 85 c0 test %eax,%eax 10f90e: 74 08 je 10f918 return nap->local_value; 10f910: 8b 40 04 mov 0x4(%eax),%eax return 0; } 10f913: c9 leave 10f914: c3 ret 10f915: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->local_value; return 0; 10f918: 31 c0 xor %eax,%eax } 10f91a: c9 leave 10f91b: c3 ret =============================================================================== 00111e4c : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 111e4c: 55 push %ebp 111e4d: 89 e5 mov %esp,%ebp 111e4f: 57 push %edi 111e50: 56 push %esi 111e51: 53 push %ebx 111e52: 83 ec 1c sub $0x1c,%esp 111e55: 8b 7d 0c mov 0xc(%ebp),%edi 111e58: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t local_value = 0; 111e5d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) { 111e64: bb 01 00 00 00 mov $0x1,%ebx 111e69: eb 06 jmp 111e71 111e6b: 90 nop <== NOT EXECUTED 111e6c: d1 e3 shl %ebx 111e6e: 4e dec %esi 111e6f: 74 1b je 111e8c if (b & remote_value) 111e71: 85 fb test %edi,%ebx 111e73: 74 f7 je 111e6c local_value |= rtems_assoc_local_by_remote(ap, b); 111e75: 83 ec 08 sub $0x8,%esp 111e78: 53 push %ebx 111e79: ff 75 08 pushl 0x8(%ebp) 111e7c: e8 77 da ff ff call 10f8f8 111e81: 09 45 e4 or %eax,-0x1c(%ebp) 111e84: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 111e87: d1 e3 shl %ebx 111e89: 4e dec %esi 111e8a: 75 e5 jne 111e71 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 111e8c: 8b 45 e4 mov -0x1c(%ebp),%eax 111e8f: 8d 65 f4 lea -0xc(%ebp),%esp 111e92: 5b pop %ebx 111e93: 5e pop %esi 111e94: 5f pop %edi 111e95: c9 leave 111e96: c3 ret =============================================================================== 001149fc : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 1149fc: 55 push %ebp 1149fd: 89 e5 mov %esp,%ebp 1149ff: 53 push %ebx 114a00: 83 ec 0c sub $0xc,%esp 114a03: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 114a06: 53 push %ebx 114a07: ff 75 08 pushl 0x8(%ebp) 114a0a: e8 1d 00 00 00 call 114a2c if (nap) 114a0f: 83 c4 10 add $0x10,%esp 114a12: 85 c0 test %eax,%eax 114a14: 74 0a je 114a20 return nap->name; 114a16: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 114a18: 8b 5d fc mov -0x4(%ebp),%ebx 114a1b: c9 leave 114a1c: c3 ret 114a1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 114a20: 89 5d 08 mov %ebx,0x8(%ebp) } 114a23: 8b 5d fc mov -0x4(%ebp),%ebx 114a26: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 114a27: e9 30 27 00 00 jmp 11715c =============================================================================== 00108860 : char *rtems_assoc_name_by_local_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 108860: 55 push %ebp 108861: 89 e5 mov %esp,%ebp 108863: 57 push %edi 108864: 56 push %esi 108865: 53 push %ebx 108866: 83 ec 1c sub $0x1c,%esp 108869: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 10886c: c6 06 00 movb $0x0,(%esi) 10886f: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 108874: bb 01 00 00 00 mov $0x1,%ebx 108879: eb 24 jmp 10889f 10887b: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_local(ap, b)); 10887c: 83 ec 08 sub $0x8,%esp 10887f: 53 push %ebx 108880: ff 75 08 pushl 0x8(%ebp) 108883: 89 55 e4 mov %edx,-0x1c(%ebp) 108886: e8 41 00 00 00 call 1088cc 10888b: 5a pop %edx 10888c: 59 pop %ecx 10888d: 50 push %eax 10888e: 56 push %esi 10888f: e8 2c b1 00 00 call 1139c0 108894: 83 c4 10 add $0x10,%esp 108897: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 10889a: d1 e3 shl %ebx 10889c: 4a dec %edx 10889d: 74 21 je 1088c0 if (b & value) { 10889f: 85 5d 0c test %ebx,0xc(%ebp) 1088a2: 74 f6 je 10889a if (*buffer) 1088a4: 80 3e 00 cmpb $0x0,(%esi) 1088a7: 74 d3 je 10887c strcat(buffer, " "); 1088a9: b9 ff ff ff ff mov $0xffffffff,%ecx 1088ae: 89 f7 mov %esi,%edi 1088b0: 31 c0 xor %eax,%eax 1088b2: f2 ae repnz scas %es:(%edi),%al 1088b4: f7 d1 not %ecx 1088b6: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 1088bd: eb bd jmp 10887c 1088bf: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_local(ap, b)); } } return buffer; } 1088c0: 89 f0 mov %esi,%eax 1088c2: 8d 65 f4 lea -0xc(%ebp),%esp 1088c5: 5b pop %ebx 1088c6: 5e pop %esi 1088c7: 5f pop %edi 1088c8: c9 leave 1088c9: c3 ret =============================================================================== 00108968 : const char *rtems_assoc_name_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 108968: 55 push %ebp 108969: 89 e5 mov %esp,%ebp 10896b: 53 push %ebx 10896c: 83 ec 0c sub $0xc,%esp 10896f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 108972: 53 push %ebx 108973: ff 75 08 pushl 0x8(%ebp) 108976: e8 ed 00 00 00 call 108a68 if (nap) 10897b: 83 c4 10 add $0x10,%esp 10897e: 85 c0 test %eax,%eax 108980: 74 0a je 10898c return nap->name; 108982: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(remote_value); } 108984: 8b 5d fc mov -0x4(%ebp),%ebx 108987: c9 leave 108988: c3 ret 108989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 10898c: 89 5d 08 mov %ebx,0x8(%ebp) } 10898f: 8b 5d fc mov -0x4(%ebp),%ebx 108992: c9 leave nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 108993: e9 50 7c 00 00 jmp 1105e8 =============================================================================== 001088fc : char *rtems_assoc_name_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 1088fc: 55 push %ebp 1088fd: 89 e5 mov %esp,%ebp 1088ff: 57 push %edi 108900: 56 push %esi 108901: 53 push %ebx 108902: 83 ec 1c sub $0x1c,%esp 108905: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 108908: c6 06 00 movb $0x0,(%esi) 10890b: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 108910: bb 01 00 00 00 mov $0x1,%ebx 108915: eb 24 jmp 10893b 108917: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_remote(ap, b)); 108918: 83 ec 08 sub $0x8,%esp 10891b: 53 push %ebx 10891c: ff 75 08 pushl 0x8(%ebp) 10891f: 89 55 e4 mov %edx,-0x1c(%ebp) 108922: e8 41 00 00 00 call 108968 108927: 5a pop %edx 108928: 59 pop %ecx 108929: 50 push %eax 10892a: 56 push %esi 10892b: e8 90 b0 00 00 call 1139c0 108930: 83 c4 10 add $0x10,%esp 108933: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 108936: d1 e3 shl %ebx 108938: 4a dec %edx 108939: 74 21 je 10895c if (b & value) { 10893b: 85 5d 0c test %ebx,0xc(%ebp) 10893e: 74 f6 je 108936 if (*buffer) 108940: 80 3e 00 cmpb $0x0,(%esi) 108943: 74 d3 je 108918 strcat(buffer, " "); 108945: b9 ff ff ff ff mov $0xffffffff,%ecx 10894a: 89 f7 mov %esi,%edi 10894c: 31 c0 xor %eax,%eax 10894e: f2 ae repnz scas %es:(%edi),%al 108950: f7 d1 not %ecx 108952: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 108959: eb bd jmp 108918 10895b: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_remote(ap, b)); } } return buffer; } 10895c: 89 f0 mov %esi,%eax 10895e: 8d 65 f4 lea -0xc(%ebp),%esp 108961: 5b pop %ebx 108962: 5e pop %esi 108963: 5f pop %edi 108964: c9 leave 108965: c3 ret =============================================================================== 00114a2c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114a2c: 55 push %ebp 114a2d: 89 e5 mov %esp,%ebp 114a2f: 57 push %edi 114a30: 56 push %esi 114a31: 53 push %ebx 114a32: 8b 45 08 mov 0x8(%ebp),%eax 114a35: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 114a38: 8b 30 mov (%eax),%esi 114a3a: 85 f6 test %esi,%esi 114a3c: 74 3e je 114a7c 114a3e: bf 18 5f 12 00 mov $0x125f18,%edi 114a43: b9 0a 00 00 00 mov $0xa,%ecx 114a48: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 114a4a: 74 18 je 114a64 const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 114a4c: 31 c9 xor %ecx,%ecx 114a4e: eb 09 jmp 114a59 if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 114a50: 83 c0 0c add $0xc,%eax 114a53: 8b 18 mov (%eax),%ebx 114a55: 85 db test %ebx,%ebx 114a57: 74 1b je 114a74 if (ap->local_value == local_value) 114a59: 39 50 04 cmp %edx,0x4(%eax) 114a5c: 75 f2 jne 114a50 return ap; return default_ap; } 114a5e: 5b pop %ebx 114a5f: 5e pop %esi 114a60: 5f pop %edi 114a61: c9 leave 114a62: c3 ret 114a63: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 114a64: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 114a67: 8b 70 0c mov 0xc(%eax),%esi 114a6a: 85 f6 test %esi,%esi 114a6c: 74 f0 je 114a5e <== NEVER TAKEN 114a6e: 89 c1 mov %eax,%ecx 114a70: 89 d8 mov %ebx,%eax 114a72: eb e5 jmp 114a59 114a74: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 114a76: 5b pop %ebx 114a77: 5e pop %esi 114a78: 5f pop %edi 114a79: c9 leave 114a7a: c3 ret 114a7b: 90 nop <== NOT EXECUTED const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; 114a7c: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 114a7e: 5b pop %ebx 114a7f: 5e pop %esi 114a80: 5f pop %edi 114a81: c9 leave 114a82: c3 ret =============================================================================== 001089f0 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 1089f0: 55 push %ebp 1089f1: 89 e5 mov %esp,%ebp 1089f3: 57 push %edi 1089f4: 56 push %esi 1089f5: 53 push %ebx 1089f6: 83 ec 0c sub $0xc,%esp 1089f9: 8b 5d 08 mov 0x8(%ebp),%ebx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1089fc: 8b 03 mov (%ebx),%eax 1089fe: 85 c0 test %eax,%eax 108a00: 74 5a je 108a5c 108a02: bf fd f2 11 00 mov $0x11f2fd,%edi 108a07: b9 0a 00 00 00 mov $0xa,%ecx 108a0c: 89 c6 mov %eax,%esi 108a0e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 108a10: 74 2e je 108a40 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 108a12: 31 f6 xor %esi,%esi 108a14: eb 0b jmp 108a21 108a16: 66 90 xchg %ax,%ax <== NOT EXECUTED if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 108a18: 83 c3 0c add $0xc,%ebx 108a1b: 8b 03 mov (%ebx),%eax 108a1d: 85 c0 test %eax,%eax 108a1f: 74 2f je 108a50 if (strcmp(ap->name, name) == 0) 108a21: 83 ec 08 sub $0x8,%esp 108a24: ff 75 0c pushl 0xc(%ebp) 108a27: 50 push %eax 108a28: e8 ef b0 00 00 call 113b1c 108a2d: 83 c4 10 add $0x10,%esp 108a30: 85 c0 test %eax,%eax 108a32: 75 e4 jne 108a18 return ap; return default_ap; } 108a34: 89 d8 mov %ebx,%eax 108a36: 8d 65 f4 lea -0xc(%ebp),%esp 108a39: 5b pop %ebx 108a3a: 5e pop %esi 108a3b: 5f pop %edi 108a3c: c9 leave 108a3d: c3 ret 108a3e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 108a40: 8d 53 0c lea 0xc(%ebx),%edx for ( ; ap->name; ap++) 108a43: 8b 43 0c mov 0xc(%ebx),%eax 108a46: 85 c0 test %eax,%eax 108a48: 74 ea je 108a34 <== NEVER TAKEN 108a4a: 89 de mov %ebx,%esi 108a4c: 89 d3 mov %edx,%ebx 108a4e: eb d1 jmp 108a21 108a50: 89 f3 mov %esi,%ebx if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 108a52: 89 d8 mov %ebx,%eax 108a54: 8d 65 f4 lea -0xc(%ebp),%esp 108a57: 5b pop %ebx 108a58: 5e pop %esi 108a59: 5f pop %edi 108a5a: c9 leave 108a5b: c3 ret const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 108a5c: 31 db xor %ebx,%ebx for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 108a5e: 89 d8 mov %ebx,%eax 108a60: 8d 65 f4 lea -0xc(%ebp),%esp 108a63: 5b pop %ebx 108a64: 5e pop %esi 108a65: 5f pop %edi 108a66: c9 leave 108a67: c3 ret =============================================================================== 0010f91c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 10f91c: 55 push %ebp 10f91d: 89 e5 mov %esp,%ebp 10f91f: 57 push %edi 10f920: 56 push %esi 10f921: 53 push %ebx 10f922: 8b 45 08 mov 0x8(%ebp),%eax 10f925: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10f928: 8b 30 mov (%eax),%esi 10f92a: 85 f6 test %esi,%esi 10f92c: 74 3e je 10f96c 10f92e: bf 58 00 12 00 mov $0x120058,%edi 10f933: b9 0a 00 00 00 mov $0xa,%ecx 10f938: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f93a: 74 18 je 10f954 const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 10f93c: 31 c9 xor %ecx,%ecx 10f93e: eb 09 jmp 10f949 if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 10f940: 83 c0 0c add $0xc,%eax 10f943: 8b 18 mov (%eax),%ebx 10f945: 85 db test %ebx,%ebx 10f947: 74 1b je 10f964 if (ap->remote_value == remote_value) 10f949: 39 50 08 cmp %edx,0x8(%eax) 10f94c: 75 f2 jne 10f940 return ap; return default_ap; } 10f94e: 5b pop %ebx 10f94f: 5e pop %esi 10f950: 5f pop %edi 10f951: c9 leave 10f952: c3 ret 10f953: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 10f954: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 10f957: 8b 70 0c mov 0xc(%eax),%esi 10f95a: 85 f6 test %esi,%esi 10f95c: 74 f0 je 10f94e <== NEVER TAKEN 10f95e: 89 c1 mov %eax,%ecx 10f960: 89 d8 mov %ebx,%eax 10f962: eb e5 jmp 10f949 10f964: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 10f966: 5b pop %ebx 10f967: 5e pop %esi 10f968: 5f pop %edi 10f969: c9 leave 10f96a: c3 ret 10f96b: 90 nop <== NOT EXECUTED const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; 10f96c: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 10f96e: 5b pop %ebx 10f96f: 5e pop %esi 10f970: 5f pop %edi 10f971: c9 leave 10f972: c3 ret =============================================================================== 00108b0c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 108b0c: 55 push %ebp 108b0d: 89 e5 mov %esp,%ebp 108b0f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 108b12: ff 75 0c pushl 0xc(%ebp) 108b15: ff 75 08 pushl 0x8(%ebp) 108b18: e8 7b fe ff ff call 108998 if (nap) 108b1d: 83 c4 10 add $0x10,%esp 108b20: 85 c0 test %eax,%eax 108b22: 74 08 je 108b2c return nap->remote_value; 108b24: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108b27: c9 leave 108b28: c3 ret 108b29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->remote_value; return 0; 108b2c: 31 c0 xor %eax,%eax } 108b2e: c9 leave 108b2f: c3 ret =============================================================================== 00108ac0 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 108ac0: 55 push %ebp 108ac1: 89 e5 mov %esp,%ebp 108ac3: 57 push %edi 108ac4: 56 push %esi 108ac5: 53 push %ebx 108ac6: 83 ec 1c sub $0x1c,%esp 108ac9: 8b 7d 0c mov 0xc(%ebp),%edi 108acc: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t remote_value = 0; 108ad1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) 108ad8: bb 01 00 00 00 mov $0x1,%ebx 108add: eb 06 jmp 108ae5 108adf: 90 nop <== NOT EXECUTED 108ae0: d1 e3 shl %ebx 108ae2: 4e dec %esi 108ae3: 74 1b je 108b00 if (b & local_value) 108ae5: 85 fb test %edi,%ebx 108ae7: 74 f7 je 108ae0 remote_value |= rtems_assoc_remote_by_local(ap, b); 108ae9: 83 ec 08 sub $0x8,%esp 108aec: 53 push %ebx 108aed: ff 75 08 pushl 0x8(%ebp) 108af0: e8 17 00 00 00 call 108b0c 108af5: 09 45 e4 or %eax,-0x1c(%ebp) 108af8: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 108afb: d1 e3 shl %ebx 108afd: 4e dec %esi 108afe: 75 e5 jne 108ae5 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } 108b00: 8b 45 e4 mov -0x1c(%ebp),%eax 108b03: 8d 65 f4 lea -0xc(%ebp),%esp 108b06: 5b pop %ebx 108b07: 5e pop %esi 108b08: 5f pop %edi 108b09: c9 leave 108b0a: c3 ret =============================================================================== 00108b30 : uint32_t rtems_assoc_remote_by_name( const rtems_assoc_t *ap, const char *name ) { 108b30: 55 push %ebp 108b31: 89 e5 mov %esp,%ebp 108b33: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 108b36: ff 75 0c pushl 0xc(%ebp) 108b39: ff 75 08 pushl 0x8(%ebp) 108b3c: e8 af fe ff ff call 1089f0 if (nap) 108b41: 83 c4 10 add $0x10,%esp 108b44: 85 c0 test %eax,%eax 108b46: 74 08 je 108b50 return nap->remote_value; 108b48: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108b4b: c9 leave 108b4c: c3 ret 108b4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED nap = rtems_assoc_ptr_by_name(ap, name); if (nap) return nap->remote_value; return 0; 108b50: 31 c0 xor %eax,%eax } 108b52: c9 leave 108b53: c3 ret =============================================================================== 001129c4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1129c4: 55 push %ebp 1129c5: 89 e5 mov %esp,%ebp 1129c7: 57 push %edi 1129c8: 56 push %esi 1129c9: 53 push %ebx 1129ca: 83 ec 2c sub $0x2c,%esp 1129cd: 8b 5d 08 mov 0x8(%ebp),%ebx 1129d0: 8b 7d 0c mov 0xc(%ebp),%edi 1129d3: 8b 45 10 mov 0x10(%ebp),%eax 1129d6: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1129d9: 85 db test %ebx,%ebx 1129db: 0f 84 87 00 00 00 je 112a68 return RTEMS_INVALID_NAME; if ( !id ) 1129e1: 85 f6 test %esi,%esi 1129e3: 0f 84 bf 00 00 00 je 112aa8 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1129e9: f7 c7 10 00 00 00 test $0x10,%edi 1129ef: 0f 84 83 00 00 00 je 112a78 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1129f5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1129fc: 85 c0 test %eax,%eax 1129fe: 0f 84 80 00 00 00 je 112a84 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112a04: 89 45 e4 mov %eax,-0x1c(%ebp) 112a07: a1 f4 86 12 00 mov 0x1286f4,%eax 112a0c: 40 inc %eax 112a0d: a3 f4 86 12 00 mov %eax,0x1286f4 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 112a12: 83 ec 0c sub $0xc,%esp 112a15: 68 c0 89 12 00 push $0x1289c0 112a1a: e8 a5 bb ff ff call 10e5c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112a1f: 83 c4 10 add $0x10,%esp 112a22: 85 c0 test %eax,%eax 112a24: 74 6e je 112a94 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112a26: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112a29: 83 ec 08 sub $0x8,%esp 112a2c: 8d 55 e0 lea -0x20(%ebp),%edx 112a2f: 52 push %edx 112a30: 8d 50 14 lea 0x14(%eax),%edx 112a33: 52 push %edx 112a34: 89 45 d4 mov %eax,-0x2c(%ebp) 112a37: e8 b4 07 00 00 call 1131f0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112a3c: 8b 45 d4 mov -0x2c(%ebp),%eax 112a3f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112a42: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112a45: 8b 0d dc 89 12 00 mov 0x1289dc,%ecx 112a4b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112a4e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112a51: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112a53: e8 b8 c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112a58: 83 c4 10 add $0x10,%esp 112a5b: 31 c0 xor %eax,%eax } 112a5d: 8d 65 f4 lea -0xc(%ebp),%esp 112a60: 5b pop %ebx 112a61: 5e pop %esi 112a62: 5f pop %edi 112a63: c9 leave 112a64: c3 ret 112a65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 112a68: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a6d: 8d 65 f4 lea -0xc(%ebp),%esp 112a70: 5b pop %ebx 112a71: 5e pop %esi 112a72: 5f pop %edi 112a73: c9 leave 112a74: c3 ret 112a75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 112a78: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112a7f: eb 83 jmp 112a04 112a81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 112a84: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a89: 8d 65 f4 lea -0xc(%ebp),%esp 112a8c: 5b pop %ebx 112a8d: 5e pop %esi 112a8e: 5f pop %edi 112a8f: c9 leave 112a90: c3 ret 112a91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112a94: e8 77 c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 112a99: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a9e: 8d 65 f4 lea -0xc(%ebp),%esp 112aa1: 5b pop %ebx 112aa2: 5e pop %esi 112aa3: 5f pop %edi 112aa4: c9 leave 112aa5: c3 ret 112aa6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112aa8: b8 09 00 00 00 mov $0x9,%eax 112aad: eb ae jmp 112a5d =============================================================================== 00112ab0 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112ab0: 55 push %ebp 112ab1: 89 e5 mov %esp,%ebp 112ab3: 53 push %ebx 112ab4: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112ab7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 112aba: 50 push %eax 112abb: ff 75 08 pushl 0x8(%ebp) 112abe: 68 c0 89 12 00 push $0x1289c0 112ac3: e8 b4 bf ff ff call 10ea7c <_Objects_Get> 112ac8: 89 c3 mov %eax,%ebx switch ( location ) { 112aca: 83 c4 10 add $0x10,%esp 112acd: 8b 4d f4 mov -0xc(%ebp),%ecx 112ad0: 85 c9 test %ecx,%ecx 112ad2: 75 38 jne 112b0c case OBJECTS_LOCAL: _CORE_barrier_Flush( 112ad4: 52 push %edx 112ad5: 6a 02 push $0x2 112ad7: 6a 00 push $0x0 112ad9: 8d 40 14 lea 0x14(%eax),%eax 112adc: 50 push %eax 112add: e8 4e cf ff ff call 10fa30 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 112ae2: 59 pop %ecx 112ae3: 58 pop %eax 112ae4: 53 push %ebx 112ae5: 68 c0 89 12 00 push $0x1289c0 112aea: e8 51 bb ff ff call 10e640 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 112aef: 58 pop %eax 112af0: 5a pop %edx 112af1: 53 push %ebx 112af2: 68 c0 89 12 00 push $0x1289c0 112af7: e8 40 be ff ff call 10e93c <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 112afc: e8 0f c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112b01: 83 c4 10 add $0x10,%esp 112b04: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112b06: 8b 5d fc mov -0x4(%ebp),%ebx 112b09: c9 leave 112b0a: c3 ret 112b0b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 112b0c: b8 04 00 00 00 mov $0x4,%eax } 112b11: 8b 5d fc mov -0x4(%ebp),%ebx 112b14: c9 leave 112b15: c3 ret =============================================================================== 00112ba4 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 112ba4: 55 push %ebp 112ba5: 89 e5 mov %esp,%ebp 112ba7: 53 push %ebx 112ba8: 83 ec 18 sub $0x18,%esp 112bab: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112bae: 8d 45 f4 lea -0xc(%ebp),%eax 112bb1: 50 push %eax 112bb2: 53 push %ebx 112bb3: 68 c0 89 12 00 push $0x1289c0 112bb8: e8 bf be ff ff call 10ea7c <_Objects_Get> switch ( location ) { 112bbd: 83 c4 10 add $0x10,%esp 112bc0: 8b 55 f4 mov -0xc(%ebp),%edx 112bc3: 85 d2 test %edx,%edx 112bc5: 75 35 jne 112bfc case OBJECTS_LOCAL: _CORE_barrier_Wait( 112bc7: 83 ec 0c sub $0xc,%esp 112bca: 6a 00 push $0x0 112bcc: ff 75 0c pushl 0xc(%ebp) 112bcf: 6a 01 push $0x1 112bd1: 53 push %ebx 112bd2: 83 c0 14 add $0x14,%eax 112bd5: 50 push %eax 112bd6: e8 79 06 00 00 call 113254 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 112bdb: 83 c4 20 add $0x20,%esp 112bde: e8 2d c7 ff ff call 10f310 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 112be3: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 112be6: a1 98 89 12 00 mov 0x128998,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 112beb: ff 70 34 pushl 0x34(%eax) 112bee: e8 99 10 00 00 call 113c8c <_Barrier_Translate_core_barrier_return_code> 112bf3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112bf6: 8b 5d fc mov -0x4(%ebp),%ebx 112bf9: c9 leave 112bfa: c3 ret 112bfb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 112bfc: b8 04 00 00 00 mov $0x4,%eax } 112c01: 8b 5d fc mov -0x4(%ebp),%ebx 112c04: c9 leave 112c05: c3 ret =============================================================================== 00107d1c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 107d1c: 55 push %ebp 107d1d: 89 e5 mov %esp,%ebp 107d1f: 57 push %edi 107d20: 56 push %esi 107d21: 53 push %ebx 107d22: 83 ec 1c sub $0x1c,%esp 107d25: 8b 45 08 mov 0x8(%ebp),%eax 107d28: 8b 5d 0c mov 0xc(%ebp),%ebx 107d2b: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 107d2e: 85 c0 test %eax,%eax 107d30: 75 0e jne 107d40 value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 107d32: 31 db xor %ebx,%ebx copy_string( p, value, length ); return value; } 107d34: 89 d8 mov %ebx,%eax 107d36: 8d 65 f4 lea -0xc(%ebp),%esp 107d39: 5b pop %ebx 107d3a: 5e pop %esi 107d3b: 5f pop %edi 107d3c: c9 leave 107d3d: c3 ret 107d3e: 66 90 xchg %ax,%ax <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !value ) 107d40: 85 db test %ebx,%ebx 107d42: 74 f0 je 107d34 return NULL; if ( !length ) 107d44: 85 f6 test %esi,%esi 107d46: 74 ea je 107d32 return NULL; value[0] = '\0'; 107d48: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 107d4b: 83 ec 0c sub $0xc,%esp 107d4e: 50 push %eax 107d4f: e8 48 00 00 00 call 107d9c if ( !p ) 107d54: 83 c4 10 add $0x10,%esp 107d57: 85 c0 test %eax,%eax 107d59: 74 d7 je 107d32 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 107d61: 4e dec %esi 107d62: 89 75 e4 mov %esi,-0x1c(%ebp) 107d65: 74 cd je 107d34 <== NEVER TAKEN 107d67: 31 f6 xor %esi,%esi 107d69: 31 d2 xor %edx,%edx 107d6b: 31 ff xor %edi,%edi 107d6d: eb 24 jmp 107d93 107d6f: 90 nop <== NOT EXECUTED if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 107d70: f7 c7 01 00 00 00 test $0x1,%edi 107d76: 75 05 jne 107d7d 107d78: 80 f9 20 cmp $0x20,%cl 107d7b: 74 b7 je 107d34 break; value[i++] = *p++; 107d7d: 88 0c 33 mov %cl,(%ebx,%esi,1) 107d80: 42 inc %edx 107d81: 89 d6 mov %edx,%esi value[i] = '\0'; 107d83: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107d8e: 3b 55 e4 cmp -0x1c(%ebp),%edx 107d91: 73 a1 jae 107d34 if ( *p == '\"' ) { 107d93: 80 f9 22 cmp $0x22,%cl 107d96: 75 d8 jne 107d70 quotes++; 107d98: 47 inc %edi 107d99: eb e2 jmp 107d7d =============================================================================== 00107d9c : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 107d9c: 55 push %ebp 107d9d: 89 e5 mov %esp,%ebp 107d9f: 83 ec 08 sub $0x8,%esp 107da2: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 107da5: 85 c0 test %eax,%eax 107da7: 75 07 jne 107db0 return NULL; if ( !bsp_boot_cmdline ) return NULL; 107da9: 31 c0 xor %eax,%eax p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107dab: c9 leave 107dac: c3 ret 107dad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 107db0: 8b 15 18 61 12 00 mov 0x126118,%edx 107db6: 85 d2 test %edx,%edx 107db8: 74 ef je 107da9 return NULL; p = strstr(bsp_boot_cmdline, name); 107dba: 83 ec 08 sub $0x8,%esp 107dbd: 50 push %eax 107dbe: 52 push %edx 107dbf: e8 fc bd 00 00 call 113bc0 107dc4: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107dc7: c9 leave 107dc8: c3 ret =============================================================================== 00107dcc : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 107dcc: 55 push %ebp 107dcd: 89 e5 mov %esp,%ebp 107dcf: 57 push %edi 107dd0: 53 push %ebx 107dd1: 8b 7d 08 mov 0x8(%ebp),%edi 107dd4: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 107dd7: 50 push %eax 107dd8: ff 75 10 pushl 0x10(%ebp) 107ddb: 53 push %ebx 107ddc: 57 push %edi 107ddd: e8 3a ff ff ff call 107d1c 107de2: 89 c2 mov %eax,%edx if ( !p ) 107de4: 83 c4 10 add $0x10,%esp 107de7: 85 c0 test %eax,%eax 107de9: 75 0d jne 107df8 return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 107deb: 31 db xor %ebx,%ebx if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 107ded: 89 d8 mov %ebx,%eax 107def: 8d 65 f8 lea -0x8(%ebp),%esp 107df2: 5b pop %ebx 107df3: 5f pop %edi 107df4: c9 leave 107df5: c3 ret 107df6: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 107df8: 31 c0 xor %eax,%eax 107dfa: b9 ff ff ff ff mov $0xffffffff,%ecx 107dff: f2 ae repnz scas %es:(%edi),%al 107e01: f7 d1 not %ecx 107e03: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 107e07: 80 38 3d cmpb $0x3d,(%eax) 107e0a: 75 df jne 107deb return NULL; rhs++; 107e0c: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 107e0f: 8a 50 01 mov 0x1(%eax),%dl 107e12: 80 fa 22 cmp $0x22,%dl 107e15: 74 29 je 107e40 rhs++; for ( d=value ; *rhs ; ) 107e17: 84 d2 test %dl,%dl 107e19: 74 31 je 107e4c 107e1b: 89 d8 mov %ebx,%eax 107e1d: 8d 76 00 lea 0x0(%esi),%esi *d++ = *rhs++; 107e20: 88 10 mov %dl,(%eax) 107e22: 40 inc %eax 107e23: 41 inc %ecx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107e24: 8a 11 mov (%ecx),%dl 107e26: 84 d2 test %dl,%dl 107e28: 75 f6 jne 107e20 *d++ = *rhs++; if ( *(d-1) == '\"' ) 107e2a: 8d 50 ff lea -0x1(%eax),%edx 107e2d: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 107e31: 74 15 je 107e48 d--; *d = '\0'; 107e33: c6 00 00 movb $0x0,(%eax) return value; } 107e36: 89 d8 mov %ebx,%eax 107e38: 8d 65 f8 lea -0x8(%ebp),%esp 107e3b: 5b pop %ebx 107e3c: 5f pop %edi 107e3d: c9 leave 107e3e: c3 ret 107e3f: 90 nop <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 107e40: 8d 48 02 lea 0x2(%eax),%ecx 107e43: 8a 50 02 mov 0x2(%eax),%dl 107e46: eb cf jmp 107e17 for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) 107e48: 89 d0 mov %edx,%eax 107e4a: eb e7 jmp 107e33 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107e4c: 89 d8 mov %ebx,%eax 107e4e: eb da jmp 107e2a =============================================================================== 0010bff0 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 56 push %esi 10bff4: 53 push %ebx 10bff5: 8b 5d 10 mov 0x10(%ebp),%ebx 10bff8: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10bffb: 83 ec 08 sub $0x8,%esp 10bffe: ff 75 0c pushl 0xc(%ebp) 10c001: ff 75 08 pushl 0x8(%ebp) 10c004: e8 93 04 00 00 call 10c49c <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10c009: 83 c4 10 add $0x10,%esp 10c00c: 84 c0 test %al,%al 10c00e: 75 0c jne 10c01c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c010: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c012: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c015: 5b pop %ebx <== NOT EXECUTED 10c016: 5e pop %esi <== NOT EXECUTED 10c017: c9 leave <== NOT EXECUTED 10c018: c3 ret <== NOT EXECUTED 10c019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c01c: 89 75 0c mov %esi,0xc(%ebp) 10c01f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c022: 8d 65 f8 lea -0x8(%ebp),%esp 10c025: 5b pop %ebx 10c026: 5e pop %esi 10c027: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c028: e9 af f5 ff ff jmp 10b5dc =============================================================================== 0010c030 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c030: 55 push %ebp 10c031: 89 e5 mov %esp,%ebp 10c033: 56 push %esi 10c034: 53 push %ebx 10c035: 8b 5d 0c mov 0xc(%ebp),%ebx 10c038: 8b 75 10 mov 0x10(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 10c03b: 83 ec 08 sub $0x8,%esp 10c03e: ff 75 14 pushl 0x14(%ebp) 10c041: ff 75 08 pushl 0x8(%ebp) 10c044: e8 bb 04 00 00 call 10c504 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 84 c0 test %al,%al 10c04e: 75 0c jne 10c05c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c050: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c052: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c055: 5b pop %ebx <== NOT EXECUTED 10c056: 5e pop %esi <== NOT EXECUTED 10c057: c9 leave <== NOT EXECUTED 10c058: c3 ret <== NOT EXECUTED 10c059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c05c: 89 75 0c mov %esi,0xc(%ebp) 10c05f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c062: 8d 65 f8 lea -0x8(%ebp),%esp 10c065: 5b pop %ebx 10c066: 5e pop %esi 10c067: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c068: e9 6f f5 ff ff jmp 10b5dc =============================================================================== 0010c070 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 1c sub $0x1c,%esp 10c079: 8b 75 08 mov 0x8(%ebp),%esi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10c07c: 8d 7d e4 lea -0x1c(%ebp),%edi 10c07f: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c080: 83 ec 0c sub $0xc,%esp 10c083: 56 push %esi 10c084: e8 b7 04 00 00 call 10c540 <_Chain_Get> 10c089: 89 c3 mov %eax,%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c08b: 83 c4 10 add $0x10,%esp 10c08e: 85 c0 test %eax,%eax 10c090: 75 22 jne 10c0b4 ) { rtems_event_set out; sc = rtems_event_receive( 10c092: 57 push %edi 10c093: ff 75 10 pushl 0x10(%ebp) 10c096: 6a 00 push $0x0 10c098: ff 75 0c pushl 0xc(%ebp) 10c09b: e8 b4 f3 ff ff call 10b454 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c0a0: 83 c4 10 add $0x10,%esp 10c0a3: 85 c0 test %eax,%eax 10c0a5: 74 d9 je 10c080 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c0a7: 8b 55 14 mov 0x14(%ebp),%edx 10c0aa: 89 1a mov %ebx,(%edx) return sc; } 10c0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10c0af: 5b pop %ebx 10c0b0: 5e pop %esi 10c0b1: 5f pop %edi 10c0b2: c9 leave 10c0b3: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c0b4: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c0b6: 8b 55 14 mov 0x14(%ebp),%edx 10c0b9: 89 1a mov %ebx,(%edx) return sc; } 10c0bb: 8d 65 f4 lea -0xc(%ebp),%esp 10c0be: 5b pop %ebx 10c0bf: 5e pop %esi 10c0c0: 5f pop %edi 10c0c1: c9 leave 10c0c2: c3 ret =============================================================================== 0010c0c4 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: 8b 5d 10 mov 0x10(%ebp),%ebx 10c0cc: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10c0cf: 83 ec 08 sub $0x8,%esp 10c0d2: ff 75 0c pushl 0xc(%ebp) 10c0d5: ff 75 08 pushl 0x8(%ebp) 10c0d8: e8 a7 04 00 00 call 10c584 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10c0dd: 83 c4 10 add $0x10,%esp 10c0e0: 84 c0 test %al,%al 10c0e2: 75 0c jne 10c0f0 <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c0e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c0e6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c0e9: 5b pop %ebx <== NOT EXECUTED 10c0ea: 5e pop %esi <== NOT EXECUTED 10c0eb: c9 leave <== NOT EXECUTED 10c0ec: c3 ret <== NOT EXECUTED 10c0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0f0: 89 75 0c mov %esi,0xc(%ebp) 10c0f3: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c0f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c0f9: 5b pop %ebx 10c0fa: 5e pop %esi 10c0fb: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0fc: e9 db f4 ff ff jmp 10b5dc =============================================================================== 00115a3c : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115a3c: 55 push %ebp 115a3d: 89 e5 mov %esp,%ebp 115a3f: 53 push %ebx 115a40: 83 ec 04 sub $0x4,%esp 115a43: 8b 45 08 mov 0x8(%ebp),%eax 115a46: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115a49: 85 db test %ebx,%ebx 115a4b: 74 3b je 115a88 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115a4d: 85 c0 test %eax,%eax 115a4f: 74 2b je 115a7c return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115a51: 83 f8 01 cmp $0x1,%eax 115a54: 74 3e je 115a94 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115a56: 83 f8 02 cmp $0x2,%eax 115a59: 74 45 je 115aa0 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115a5b: 83 f8 03 cmp $0x3,%eax 115a5e: 74 4c je 115aac *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115a60: 83 f8 04 cmp $0x4,%eax 115a63: 74 0b je 115a70 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115a65: b8 0a 00 00 00 mov $0xa,%eax } 115a6a: 5a pop %edx 115a6b: 5b pop %ebx 115a6c: c9 leave 115a6d: c3 ret 115a6e: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115a70: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115a73: 59 pop %ecx 115a74: 5b pop %ebx 115a75: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115a76: e9 41 01 00 00 jmp 115bbc 115a7b: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115a7c: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a7f: 58 pop %eax 115a80: 5b pop %ebx 115a81: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115a82: e9 81 00 00 00 jmp 115b08 115a87: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115a88: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a8d: 5a pop %edx 115a8e: 5b pop %ebx 115a8f: c9 leave 115a90: c3 ret 115a91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115a94: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115a97: 5b pop %ebx 115a98: 5b pop %ebx 115a99: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115a9a: e9 19 00 00 00 jmp 115ab8 115a9f: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115aa0: e8 57 00 00 00 call 115afc 115aa5: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115aa7: 31 c0 xor %eax,%eax 115aa9: eb bf jmp 115a6a 115aab: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115aac: e8 37 00 00 00 call 115ae8 115ab1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115ab3: 31 c0 xor %eax,%eax 115ab5: eb b3 jmp 115a6a =============================================================================== 0010bfc8 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10bfce: 85 c0 test %eax,%eax 10bfd0: 74 1e je 10bff0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bfd2: 80 3d a8 13 13 00 00 cmpb $0x0,0x1313a8 10bfd9: 74 0d je 10bfe8 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10bfdb: 8b 15 28 14 13 00 mov 0x131428,%edx 10bfe1: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10bfe3: 31 c0 xor %eax,%eax } 10bfe5: c9 leave 10bfe6: c3 ret 10bfe7: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bfe8: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bfed: c9 leave 10bfee: c3 ret 10bfef: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10bff0: b8 09 00 00 00 mov $0x9,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bff5: c9 leave 10bff6: c3 ret =============================================================================== 00115bbc : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115bbc: 55 push %ebp 115bbd: 89 e5 mov %esp,%ebp 115bbf: 56 push %esi 115bc0: 53 push %ebx 115bc1: 83 ec 10 sub $0x10,%esp 115bc4: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115bc7: 85 db test %ebx,%ebx 115bc9: 74 51 je 115c1c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115bcb: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 115bd2: 75 0c jne 115be0 return RTEMS_NOT_DEFINED; 115bd4: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115bd9: 8d 65 f8 lea -0x8(%ebp),%esp 115bdc: 5b pop %ebx 115bdd: 5e pop %esi 115bde: c9 leave 115bdf: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115be0: 9c pushf 115be1: fa cli 115be2: 5e pop %esi _TOD_Get( &now ); 115be3: 83 ec 0c sub $0xc,%esp 115be6: 8d 45 f0 lea -0x10(%ebp),%eax 115be9: 50 push %eax 115bea: e8 b1 42 00 00 call 119ea0 <_TOD_Get> _ISR_Enable(level); 115bef: 56 push %esi 115bf0: 9d popf useconds = (suseconds_t)now.tv_nsec; 115bf1: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115bf4: 8b 45 f0 mov -0x10(%ebp),%eax 115bf7: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 115bf9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115bfe: f7 e9 imul %ecx 115c00: 89 d0 mov %edx,%eax 115c02: c1 f8 06 sar $0x6,%eax 115c05: c1 f9 1f sar $0x1f,%ecx 115c08: 29 c8 sub %ecx,%eax 115c0a: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c0d: 83 c4 10 add $0x10,%esp 115c10: 31 c0 xor %eax,%eax } 115c12: 8d 65 f8 lea -0x8(%ebp),%esp 115c15: 5b pop %ebx 115c16: 5e pop %esi 115c17: c9 leave 115c18: c3 ret 115c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c1c: b8 09 00 00 00 mov $0x9,%eax 115c21: eb b6 jmp 115bd9 =============================================================================== 0010b1d0 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 83 ec 08 sub $0x8,%esp 10b1d6: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b1d9: 85 c0 test %eax,%eax 10b1db: 74 13 je 10b1f0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b1dd: 83 ec 0c sub $0xc,%esp 10b1e0: 50 push %eax 10b1e1: e8 9e 15 00 00 call 10c784 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b1e6: 83 c4 10 add $0x10,%esp 10b1e9: 31 c0 xor %eax,%eax } 10b1eb: c9 leave 10b1ec: c3 ret 10b1ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b1f0: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b1f5: c9 leave 10b1f6: c3 ret =============================================================================== 0010c0e8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 66 je 10c15c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c0f6: 83 ec 0c sub $0xc,%esp 10c0f9: 53 push %ebx 10c0fa: e8 39 01 00 00 call 10c238 <_TOD_Validate> 10c0ff: 83 c4 10 add $0x10,%esp 10c102: 84 c0 test %al,%al 10c104: 75 0a jne 10c110 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c106: b8 14 00 00 00 mov $0x14,%eax } 10c10b: 8b 5d fc mov -0x4(%ebp),%ebx 10c10e: c9 leave 10c10f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: 53 push %ebx 10c114: e8 93 00 00 00 call 10c1ac <_TOD_To_seconds> 10c119: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c11c: 8b 43 18 mov 0x18(%ebx),%eax 10c11f: 0f af 05 0c 53 12 00 imul 0x12530c,%eax 10c126: 8d 04 80 lea (%eax,%eax,4),%eax 10c129: 8d 04 80 lea (%eax,%eax,4),%eax 10c12c: 8d 04 80 lea (%eax,%eax,4),%eax 10c12f: c1 e0 03 shl $0x3,%eax 10c132: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c135: a1 94 13 13 00 mov 0x131394,%eax 10c13a: 40 inc %eax 10c13b: a3 94 13 13 00 mov %eax,0x131394 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c140: 8d 45 f0 lea -0x10(%ebp),%eax 10c143: 89 04 24 mov %eax,(%esp) 10c146: e8 85 18 00 00 call 10d9d0 <_TOD_Set> _Thread_Enable_dispatch(); 10c14b: e8 a8 2b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c150: 83 c4 10 add $0x10,%esp 10c153: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c155: 8b 5d fc mov -0x4(%ebp),%ebx 10c158: c9 leave 10c159: c3 ret 10c15a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c15c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c161: 8b 5d fc mov -0x4(%ebp),%ebx 10c164: c9 leave 10c165: c3 ret =============================================================================== 0010af94 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10af94: 55 push %ebp 10af95: 89 e5 mov %esp,%ebp 10af97: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10af9a: 85 c0 test %eax,%eax 10af9c: 74 0a je 10afa8 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10af9e: a3 e4 55 12 00 mov %eax,0x1255e4 return RTEMS_SUCCESSFUL; 10afa3: 31 c0 xor %eax,%eax } 10afa5: c9 leave 10afa6: c3 ret 10afa7: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10afa8: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10afad: c9 leave 10afae: c3 ret =============================================================================== 0010afb0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10afb0: 55 push %ebp 10afb1: 89 e5 mov %esp,%ebp 10afb3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10afb6: e8 61 14 00 00 call 10c41c <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10afbb: 83 ec 0c sub $0xc,%esp 10afbe: 68 04 55 12 00 push $0x125504 10afc3: e8 a0 36 00 00 call 10e668 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10afc8: e8 37 31 00 00 call 10e104 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10afcd: a0 e4 56 12 00 mov 0x1256e4,%al if ( _Thread_Is_context_switch_necessary() && 10afd2: 83 c4 10 add $0x10,%esp 10afd5: 84 c0 test %al,%al 10afd7: 74 09 je 10afe2 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10afd9: a1 34 54 12 00 mov 0x125434,%eax 10afde: 85 c0 test %eax,%eax 10afe0: 74 06 je 10afe8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10afe2: 31 c0 xor %eax,%eax 10afe4: c9 leave 10afe5: c3 ret 10afe6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10afe8: e8 43 24 00 00 call 10d430 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10afed: 31 c0 xor %eax,%eax 10afef: c9 leave 10aff0: c3 ret =============================================================================== 001083e0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1083e0: 55 push %ebp 1083e1: 89 e5 mov %esp,%ebp 1083e3: 57 push %edi 1083e4: 56 push %esi 1083e5: 53 push %ebx 1083e6: 83 ec 6c sub $0x6c,%esp 1083e9: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1083ec: 8b 45 0c mov 0xc(%ebp),%eax 1083ef: 85 c0 test %eax,%eax 1083f1: 0f 84 57 01 00 00 je 10854e <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 1083f7: 83 ec 0c sub $0xc,%esp 1083fa: 8d 45 d8 lea -0x28(%ebp),%eax 1083fd: 50 push %eax 1083fe: e8 3d 55 00 00 call 10d940 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 108403: 83 c4 0c add $0xc,%esp 108406: 8d 55 d0 lea -0x30(%ebp),%edx 108409: 52 push %edx 10840a: 8d 4d d8 lea -0x28(%ebp),%ecx 10840d: 51 push %ecx 10840e: 68 88 16 13 00 push $0x131688 108413: e8 54 77 00 00 call 10fb6c <_Timespec_Subtract> } } } #endif (*print)( 108418: 5b pop %ebx 108419: 5e pop %esi 10841a: 68 f0 1c 12 00 push $0x121cf0 10841f: 57 push %edi 108420: ff 55 0c call *0xc(%ebp) 108423: 83 c4 10 add $0x10,%esp " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108426: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10842d: 8b 5d a4 mov -0x5c(%ebp),%ebx 108430: 8b 04 9d 6c 13 13 00 mov 0x13136c(,%ebx,4),%eax 108437: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10843a: 85 f6 test %esi,%esi 10843c: 0f 84 e2 00 00 00 je 108524 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108442: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 108447: 0f 84 d7 00 00 00 je 108524 <== NEVER TAKEN 10844d: bb 01 00 00 00 mov $0x1,%ebx 108452: 89 5d 94 mov %ebx,-0x6c(%ebp) 108455: eb 4b jmp 1084a2 108457: 90 nop <== NOT EXECUTED _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 108458: 8d 45 e0 lea -0x20(%ebp),%eax 10845b: 50 push %eax 10845c: 8d 55 e4 lea -0x1c(%ebp),%edx 10845f: 52 push %edx 108460: 8d 4d d0 lea -0x30(%ebp),%ecx 108463: 51 push %ecx 108464: 8d 5d c8 lea -0x38(%ebp),%ebx 108467: 53 push %ebx 108468: e8 3b 76 00 00 call 10faa8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 10846d: 58 pop %eax 10846e: 5a pop %edx 10846f: ff 75 e0 pushl -0x20(%ebp) 108472: ff 75 e4 pushl -0x1c(%ebp) 108475: ba d3 4d 62 10 mov $0x10624dd3,%edx 10847a: 8b 45 cc mov -0x34(%ebp),%eax 10847d: f7 e2 mul %edx 10847f: c1 ea 06 shr $0x6,%edx 108482: 52 push %edx 108483: ff 75 c8 pushl -0x38(%ebp) 108486: 68 63 1f 12 00 push $0x121f63 10848b: 57 push %edi 10848c: ff 55 0c call *0xc(%ebp) 10848f: 83 c4 20 add $0x20,%esp continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 108492: ff 45 94 incl -0x6c(%ebp) 108495: 0f b7 46 10 movzwl 0x10(%esi),%eax 108499: 3b 45 94 cmp -0x6c(%ebp),%eax 10849c: 0f 82 82 00 00 00 jb 108524 the_thread = (Thread_Control *)information->local_table[ i ]; 1084a2: 8b 46 1c mov 0x1c(%esi),%eax 1084a5: 8b 4d 94 mov -0x6c(%ebp),%ecx 1084a8: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 1084ab: 85 d2 test %edx,%edx 1084ad: 74 e3 je 108492 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1084af: 51 push %ecx 1084b0: 8d 5d b3 lea -0x4d(%ebp),%ebx 1084b3: 53 push %ebx 1084b4: 6a 0d push $0xd 1084b6: ff 72 08 pushl 0x8(%edx) 1084b9: 89 55 a0 mov %edx,-0x60(%ebp) 1084bc: e8 0b 42 00 00 call 10c6cc (*print)( 1084c1: 53 push %ebx 1084c2: 8b 55 a0 mov -0x60(%ebp),%edx 1084c5: ff 72 08 pushl 0x8(%edx) 1084c8: 68 50 1f 12 00 push $0x121f50 1084cd: 57 push %edi 1084ce: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 1084d1: 8b 55 a0 mov -0x60(%ebp),%edx 1084d4: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1084da: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1084e0: 89 4d c8 mov %ecx,-0x38(%ebp) 1084e3: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1084e6: 83 c4 20 add $0x20,%esp 1084e9: a1 78 16 13 00 mov 0x131678,%eax 1084ee: 8b 5a 08 mov 0x8(%edx),%ebx 1084f1: 39 58 08 cmp %ebx,0x8(%eax) 1084f4: 0f 85 5e ff ff ff jne 108458 Timestamp_Control used; _Timestamp_Subtract( 1084fa: 50 push %eax 1084fb: 8d 45 c0 lea -0x40(%ebp),%eax 1084fe: 50 push %eax 1084ff: 8d 55 d8 lea -0x28(%ebp),%edx 108502: 52 push %edx 108503: 68 50 14 13 00 push $0x131450 108508: e8 5f 76 00 00 call 10fb6c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 10850d: 59 pop %ecx 10850e: 5b pop %ebx 10850f: 8d 4d c0 lea -0x40(%ebp),%ecx 108512: 51 push %ecx 108513: 8d 5d c8 lea -0x38(%ebp),%ebx 108516: 53 push %ebx 108517: e8 50 75 00 00 call 10fa6c <_Timespec_Add_to> 10851c: 83 c4 10 add $0x10,%esp 10851f: e9 34 ff ff ff jmp 108458 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108524: ff 45 a4 incl -0x5c(%ebp) 108527: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp) 10852b: 0f 85 fc fe ff ff jne 10842d } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108531: ba d3 4d 62 10 mov $0x10624dd3,%edx 108536: 8b 45 d4 mov -0x2c(%ebp),%eax 108539: f7 e2 mul %edx 10853b: c1 ea 06 shr $0x6,%edx 10853e: 52 push %edx 10853f: ff 75 d0 pushl -0x30(%ebp) 108542: 68 64 1e 12 00 push $0x121e64 108547: 57 push %edi 108548: ff 55 0c call *0xc(%ebp) 10854b: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 10854e: 8d 65 f4 lea -0xc(%ebp),%esp 108551: 5b pop %ebx 108552: 5e pop %esi 108553: 5f pop %edi 108554: c9 leave 108555: c3 ret =============================================================================== 00112260 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 112260: 55 push %ebp 112261: 89 e5 mov %esp,%ebp 112263: 53 push %ebx 112264: 83 ec 04 sub $0x4,%esp 112267: 8b 45 08 mov 0x8(%ebp),%eax if (sc == RTEMS_SUCCESSFUL) { 11226a: 85 c0 test %eax,%eax 11226c: 75 06 jne 112274 return 0; 11226e: 31 c0 xor %eax,%eax errno = eno; return -1; } } 112270: 5a pop %edx 112271: 5b pop %ebx 112272: c9 leave 112273: c3 ret if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 112274: 83 f8 1c cmp $0x1c,%eax 112277: 77 17 ja 112290 <== NEVER TAKEN eno = status_code_to_errno [sc]; 112279: 8b 1c 85 20 01 12 00 mov 0x120120(,%eax,4),%ebx } errno = eno; 112280: e8 2b 00 00 00 call 1122b0 <__errno> 112285: 89 18 mov %ebx,(%eax) return -1; 112287: b8 ff ff ff ff mov $0xffffffff,%eax 11228c: eb e2 jmp 112270 11228e: 66 90 xchg %ax,%ax <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 112290: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED 112295: eb e9 jmp 112280 <== NOT EXECUTED =============================================================================== 0010b17c : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b17c: 55 push %ebp 10b17d: 89 e5 mov %esp,%ebp 10b17f: 53 push %ebx 10b180: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b183: 8d 45 f4 lea -0xc(%ebp),%eax 10b186: 50 push %eax 10b187: ff 75 08 pushl 0x8(%ebp) 10b18a: e8 3d 24 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10b18f: 83 c4 10 add $0x10,%esp 10b192: 8b 55 f4 mov -0xc(%ebp),%edx 10b195: 85 d2 test %edx,%edx 10b197: 75 2b jne 10b1c4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b199: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b19f: 9c pushf 10b1a0: fa cli 10b1a1: 59 pop %ecx *the_event_set |= the_new_events; 10b1a2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1a5: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b1a7: 51 push %ecx 10b1a8: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b1a9: 83 ec 0c sub $0xc,%esp 10b1ac: 50 push %eax 10b1ad: e8 1e 00 00 00 call 10b1d0 <_Event_Surrender> _Thread_Enable_dispatch(); 10b1b2: e8 f1 23 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1b7: 83 c4 10 add $0x10,%esp 10b1ba: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bf: c9 leave 10b1c0: c3 ret 10b1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1c4: b8 04 00 00 00 mov $0x4,%eax } 10b1c9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1cc: c9 leave 10b1cd: c3 ret =============================================================================== 0010d158 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d158: 55 push %ebp 10d159: 89 e5 mov %esp,%ebp 10d15b: 57 push %edi 10d15c: 56 push %esi 10d15d: 53 push %ebx 10d15e: 83 ec 1c sub $0x1c,%esp 10d161: 8b 75 0c mov 0xc(%ebp),%esi 10d164: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d167: 85 db test %ebx,%ebx 10d169: 0f 84 85 00 00 00 je 10d1f4 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d16f: 8b 45 08 mov 0x8(%ebp),%eax 10d172: 85 c0 test %eax,%eax 10d174: 75 0e jne 10d184 return RTEMS_INVALID_NAME; 10d176: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d17b: 8d 65 f4 lea -0xc(%ebp),%esp 10d17e: 5b pop %ebx 10d17f: 5e pop %esi 10d180: 5f pop %edi 10d181: c9 leave 10d182: c3 ret 10d183: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d184: a1 94 13 13 00 mov 0x131394,%eax 10d189: 40 inc %eax 10d18a: a3 94 13 13 00 mov %eax,0x131394 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d18f: 83 ec 0c sub $0xc,%esp 10d192: 68 00 16 13 00 push $0x131600 10d197: e8 74 0d 00 00 call 10df10 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d19c: 83 c4 10 add $0x10,%esp 10d19f: 85 c0 test %eax,%eax 10d1a1: 74 45 je 10d1e8 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d1a3: 8d 78 24 lea 0x24(%eax),%edi 10d1a6: b9 08 00 00 00 mov $0x8,%ecx 10d1ab: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d1ad: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d1b0: 8d 50 10 lea 0x10(%eax),%edx 10d1b3: 52 push %edx 10d1b4: 89 45 e4 mov %eax,-0x1c(%ebp) 10d1b7: e8 f0 29 00 00 call 10fbac <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d1bc: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1bf: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d1c2: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1c5: 8b 0d 1c 16 13 00 mov 0x13161c,%ecx 10d1cb: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d1ce: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1d1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d1d4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d1d6: e8 1d 1b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d1db: 83 c4 10 add $0x10,%esp 10d1de: 31 c0 xor %eax,%eax } 10d1e0: 8d 65 f4 lea -0xc(%ebp),%esp 10d1e3: 5b pop %ebx 10d1e4: 5e pop %esi 10d1e5: 5f pop %edi 10d1e6: c9 leave 10d1e7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d1e8: e8 0b 1b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d1ed: b8 05 00 00 00 mov $0x5,%eax 10d1f2: eb 87 jmp 10d17b ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d1f4: b8 09 00 00 00 mov $0x9,%eax 10d1f9: eb 80 jmp 10d17b =============================================================================== 0010cfd4 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10cfd4: 55 push %ebp 10cfd5: 89 e5 mov %esp,%ebp 10cfd7: 53 push %ebx 10cfd8: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10cfdb: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10cfde: 50 push %eax 10cfdf: ff 75 08 pushl 0x8(%ebp) 10cfe2: 68 20 05 13 00 push $0x130520 10cfe7: e8 5c 11 00 00 call 10e148 <_Objects_Get> 10cfec: 89 c3 mov %eax,%ebx switch ( location ) { 10cfee: 83 c4 10 add $0x10,%esp 10cff1: 8b 55 f4 mov -0xc(%ebp),%edx 10cff4: 85 d2 test %edx,%edx 10cff6: 75 38 jne 10d030 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10cff8: 83 ec 0c sub $0xc,%esp 10cffb: 8d 40 10 lea 0x10(%eax),%eax 10cffe: 50 push %eax 10cfff: e8 98 28 00 00 call 10f89c <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d004: 59 pop %ecx 10d005: 58 pop %eax 10d006: 53 push %ebx 10d007: 68 20 05 13 00 push $0x130520 10d00c: e8 fb 0c 00 00 call 10dd0c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d011: 58 pop %eax 10d012: 5a pop %edx 10d013: 53 push %ebx 10d014: 68 20 05 13 00 push $0x130520 10d019: e8 ea 0f 00 00 call 10e008 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d01e: e8 89 19 00 00 call 10e9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d023: 83 c4 10 add $0x10,%esp 10d026: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d028: 8b 5d fc mov -0x4(%ebp),%ebx 10d02b: c9 leave 10d02c: c3 ret 10d02d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d030: b8 04 00 00 00 mov $0x4,%eax } 10d035: 8b 5d fc mov -0x4(%ebp),%ebx 10d038: c9 leave 10d039: c3 ret =============================================================================== 00107fec : int rtems_filesystem_dirname( const char *pathname ) { 107fec: 55 push %ebp 107fed: 89 e5 mov %esp,%ebp 107fef: 57 push %edi 107ff0: 56 push %esi 107ff1: 53 push %ebx 107ff2: 83 ec 0c sub $0xc,%esp 107ff5: 8b 5d 08 mov 0x8(%ebp),%ebx int len = strlen( pathname ); 107ff8: 31 c0 xor %eax,%eax 107ffa: b9 ff ff ff ff mov $0xffffffff,%ecx 107fff: 89 df mov %ebx,%edi 108001: f2 ae repnz scas %es:(%edi),%al 108003: f7 d1 not %ecx while ( len ) { 108005: 89 ce mov %ecx,%esi 108007: 4e dec %esi 108008: 75 06 jne 108010 <== ALWAYS TAKEN 10800a: eb 19 jmp 108025 <== NOT EXECUTED 10800c: 85 f6 test %esi,%esi 10800e: 74 15 je 108025 len--; 108010: 4e dec %esi if ( rtems_filesystem_is_separator( pathname[len] ) ) 108011: 83 ec 0c sub $0xc,%esp 108014: 0f be 04 33 movsbl (%ebx,%esi,1),%eax 108018: 50 push %eax 108019: e8 da 0e 00 00 call 108ef8 10801e: 83 c4 10 add $0x10,%esp 108021: 85 c0 test %eax,%eax 108023: 74 e7 je 10800c break; } return len; } 108025: 89 f0 mov %esi,%eax 108027: 8d 65 f4 lea -0xc(%ebp),%esp 10802a: 5b pop %ebx 10802b: 5e pop %esi 10802c: 5f pop %edi 10802d: c9 leave 10802e: c3 ret =============================================================================== 0010fdc4 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10fdc4: 55 push %ebp 10fdc5: 89 e5 mov %esp,%ebp 10fdc7: 83 ec 18 sub $0x18,%esp 10fdca: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { 10fdcd: 89 45 f0 mov %eax,-0x10(%ebp) 10fdd0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) .type = type, .mount_h = NULL }; if ( type != NULL ) { 10fdd7: 85 c0 test %eax,%eax 10fdd9: 74 19 je 10fdf4 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10fddb: 83 ec 08 sub $0x8,%esp 10fdde: 8d 45 f0 lea -0x10(%ebp),%eax 10fde1: 50 push %eax 10fde2: 68 e4 fc 10 00 push $0x10fce4 10fde7: e8 34 ff ff ff call 10fd20 10fdec: 8b 45 f4 mov -0xc(%ebp),%eax 10fdef: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10fdf2: c9 leave 10fdf3: c3 ret find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { 10fdf4: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_filesystem_iterate( find_handler, &fa ); } return fa.mount_h; } 10fdf6: c9 leave <== NOT EXECUTED 10fdf7: c3 ret <== NOT EXECUTED =============================================================================== 0010ff80 : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 10ff80: 55 push %ebp 10ff81: 89 e5 mov %esp,%ebp 10ff83: 57 push %edi 10ff84: 56 push %esi 10ff85: 53 push %ebx 10ff86: 83 ec 18 sub $0x18,%esp 10ff89: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 10ff8c: 8b 45 08 mov 0x8(%ebp),%eax 10ff8f: 0f be 00 movsbl (%eax),%eax 10ff92: 50 push %eax 10ff93: e8 60 8f ff ff call 108ef8 10ff98: 83 c4 10 add $0x10,%esp 10ff9b: 85 c0 test %eax,%eax 10ff9d: 75 11 jne 10ffb0 *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 10ff9f: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 10ffa5: 8d 65 f4 lea -0xc(%ebp),%esp 10ffa8: 5b pop %ebx 10ffa9: 5e pop %esi 10ffaa: 5f pop %edi 10ffab: c9 leave 10ffac: c3 ret 10ffad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { if (rtems_filesystem_is_separator(path[0])) { *loc = rtems_filesystem_root; 10ffb0: 8b 35 30 31 12 00 mov 0x123130,%esi 10ffb6: 83 c6 18 add $0x18,%esi 10ffb9: b9 05 00 00 00 mov $0x5,%ecx 10ffbe: 8b 7d 10 mov 0x10(%ebp),%edi 10ffc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 10ffc3: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 10ffc9: 8d 65 f4 lea -0xc(%ebp),%esp 10ffcc: 5b pop %ebx 10ffcd: 5e pop %esi 10ffce: 5f pop %edi 10ffcf: c9 leave 10ffd0: c3 ret =============================================================================== 00107e1c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107e1c: 55 push %ebp 107e1d: 89 e5 mov %esp,%ebp 107e1f: 57 push %edi 107e20: 56 push %esi 107e21: 53 push %ebx 107e22: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107e25: a1 30 31 12 00 mov 0x123130,%eax 107e2a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 107e31: a1 a0 e0 11 00 mov 0x11e0a0,%eax 107e36: 85 c0 test %eax,%eax 107e38: 0f 84 9f 00 00 00 je 107edd <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 107e3e: a1 54 11 12 00 mov 0x121154,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107e43: 83 ec 0c sub $0xc,%esp 107e46: 6a 00 push $0x0 107e48: ff 70 04 pushl 0x4(%eax) 107e4b: ff 30 pushl (%eax) 107e4d: ff 70 0c pushl 0xc(%eax) 107e50: ff 70 08 pushl 0x8(%eax) 107e53: e8 fc 06 00 00 call 108554 if ( status == -1 ) 107e58: 83 c4 20 add $0x20,%esp 107e5b: 40 inc %eax 107e5c: 0f 84 95 00 00 00 je 107ef7 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107e62: a1 30 31 12 00 mov 0x123130,%eax 107e67: 66 c7 40 30 00 00 movw $0x0,0x30(%eax) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107e6d: 83 ec 0c sub $0xc,%esp 107e70: 6a 00 push $0x0 107e72: 8d 5d d4 lea -0x2c(%ebp),%ebx 107e75: 53 push %ebx 107e76: 6a 00 push $0x0 107e78: 6a 01 push $0x1 107e7a: 68 47 fa 11 00 push $0x11fa47 107e7f: e8 24 01 00 00 call 107fa8 rtems_filesystem_root = loc; 107e84: 8b 3d 30 31 12 00 mov 0x123130,%edi 107e8a: 83 c7 18 add $0x18,%edi 107e8d: b9 05 00 00 00 mov $0x5,%ecx 107e92: 89 de mov %ebx,%esi 107e94: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107e96: 83 c4 14 add $0x14,%esp 107e99: 6a 00 push $0x0 107e9b: 53 push %ebx 107e9c: 6a 00 push $0x0 107e9e: 6a 01 push $0x1 107ea0: 68 47 fa 11 00 push $0x11fa47 107ea5: e8 fe 00 00 00 call 107fa8 rtems_filesystem_current = loc; 107eaa: 8b 3d 30 31 12 00 mov 0x123130,%edi 107eb0: 83 c7 04 add $0x4,%edi 107eb3: b9 05 00 00 00 mov $0x5,%ecx 107eb8: 89 de mov %ebx,%esi 107eba: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 107ebc: 83 c4 18 add $0x18,%esp 107ebf: 68 ff 01 00 00 push $0x1ff 107ec4: 68 49 fa 11 00 push $0x11fa49 107ec9: e8 42 05 00 00 call 108410 if ( status != 0 ) 107ece: 83 c4 10 add $0x10,%esp 107ed1: 85 c0 test %eax,%eax 107ed3: 75 15 jne 107eea <== NEVER TAKEN * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 107ed5: 8d 65 f4 lea -0xc(%ebp),%esp 107ed8: 5b pop %ebx 107ed9: 5e pop %esi 107eda: 5f pop %edi 107edb: c9 leave 107edc: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 107edd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ee0: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107ee5: e8 e2 3d 00 00 call 10bccc <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 107eea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eed: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107ef2: e8 d5 3d 00 00 call 10bccc <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 107ef7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107efa: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107eff: e8 c8 3d 00 00 call 10bccc <== NOT EXECUTED =============================================================================== 0010fd20 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10fd20: 55 push %ebp 10fd21: 89 e5 mov %esp,%ebp 10fd23: 57 push %edi 10fd24: 56 push %esi 10fd25: 53 push %ebx 10fd26: 83 ec 1c sub $0x1c,%esp 10fd29: 8b 75 08 mov 0x8(%ebp),%esi 10fd2c: 8b 7d 0c mov 0xc(%ebp),%edi const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10fd2f: 8b 1d 80 e0 11 00 mov 0x11e080,%ebx 10fd35: 85 db test %ebx,%ebx 10fd37: 74 24 je 10fd5d <== NEVER TAKEN 10fd39: bb 80 e0 11 00 mov $0x11e080,%ebx 10fd3e: eb 04 jmp 10fd44 10fd40: 84 c0 test %al,%al 10fd42: 75 70 jne 10fdb4 stop = (*routine)( table_entry, routine_arg ); 10fd44: 83 ec 08 sub $0x8,%esp 10fd47: 57 push %edi 10fd48: 53 push %ebx 10fd49: ff d6 call *%esi 10fd4b: 88 c2 mov %al,%dl ++table_entry; 10fd4d: 83 c3 08 add $0x8,%ebx { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10fd50: 83 c4 10 add $0x10,%esp 10fd53: 8b 0b mov (%ebx),%ecx 10fd55: 85 c9 test %ecx,%ecx 10fd57: 75 e7 jne 10fd40 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10fd59: 84 c0 test %al,%al 10fd5b: 75 57 jne 10fdb4 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fd5d: 50 push %eax 10fd5e: 6a 00 push $0x0 10fd60: 6a 00 push $0x0 10fd62: ff 35 c8 52 12 00 pushl 0x1252c8 10fd68: e8 23 b9 ff ff call 10b690 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10fd6d: 8b 1d 54 31 12 00 mov 0x123154,%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fd73: 83 c4 10 add $0x10,%esp 10fd76: 81 fb 58 31 12 00 cmp $0x123158,%ebx 10fd7c: 75 06 jne 10fd84 10fd7e: eb 3e jmp 10fdbe node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 10fd80: 84 c0 test %al,%al 10fd82: 75 19 jne 10fd9d <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10fd84: 83 ec 08 sub $0x8,%esp 10fd87: 57 push %edi 10fd88: 8d 43 08 lea 0x8(%ebx),%eax 10fd8b: 50 push %eax 10fd8c: ff d6 call *%esi 10fd8e: 88 c2 mov %al,%dl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10fd90: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fd92: 83 c4 10 add $0x10,%esp 10fd95: 81 fb 58 31 12 00 cmp $0x123158,%ebx 10fd9b: 75 e3 jne 10fd80 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fd9d: 83 ec 0c sub $0xc,%esp 10fda0: ff 35 c8 52 12 00 pushl 0x1252c8 10fda6: 88 55 e4 mov %dl,-0x1c(%ebp) 10fda9: e8 de b9 ff ff call 10b78c 10fdae: 83 c4 10 add $0x10,%esp 10fdb1: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 10fdb4: 88 d0 mov %dl,%al 10fdb6: 8d 65 f4 lea -0xc(%ebp),%esp 10fdb9: 5b pop %ebx 10fdba: 5e pop %esi 10fdbb: 5f pop %edi 10fdbc: c9 leave 10fdbd: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fdbe: 31 d2 xor %edx,%edx 10fdc0: eb db jmp 10fd9d =============================================================================== 001084e4 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 1084e4: 55 push %ebp 1084e5: 89 e5 mov %esp,%ebp 1084e7: 57 push %edi 1084e8: 56 push %esi 1084e9: 53 push %ebx 1084ea: 83 ec 20 sub $0x20,%esp 1084ed: 8b 7d 08 mov 0x8(%ebp),%edi 1084f0: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 1084f3: 6a 00 push $0x0 1084f5: 6a 00 push $0x0 1084f7: ff 35 c8 52 12 00 pushl 0x1252c8 1084fd: e8 8e 31 00 00 call 10b690 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108502: 8b 1d 04 30 12 00 mov 0x123004,%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108508: 83 c4 10 add $0x10,%esp 10850b: 81 fb 08 30 12 00 cmp $0x123008,%ebx 108511: 75 09 jne 10851c <== ALWAYS TAKEN 108513: eb 3b jmp 108550 <== NOT EXECUTED 108515: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 108518: 84 c0 test %al,%al 10851a: 75 16 jne 108532 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); 10851c: 83 ec 08 sub $0x8,%esp 10851f: 56 push %esi 108520: 53 push %ebx 108521: ff d7 call *%edi 108523: 88 c2 mov %al,%dl } rtems_libio_unlock(); return stop; } 108525: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108527: 83 c4 10 add $0x10,%esp 10852a: 81 fb 08 30 12 00 cmp $0x123008,%ebx 108530: 75 e6 jne 108518 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108532: 83 ec 0c sub $0xc,%esp 108535: ff 35 c8 52 12 00 pushl 0x1252c8 10853b: 88 55 e4 mov %dl,-0x1c(%ebp) 10853e: e8 49 32 00 00 call 10b78c stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108543: 8a 55 e4 mov -0x1c(%ebp),%dl 108546: 88 d0 mov %dl,%al 108548: 8d 65 f4 lea -0xc(%ebp),%esp 10854b: 5b pop %ebx 10854c: 5e pop %esi 10854d: 5f pop %edi 10854e: c9 leave 10854f: c3 ret rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 108550: 31 d2 xor %edx,%edx <== NOT EXECUTED 108552: eb de jmp 108532 <== NOT EXECUTED =============================================================================== 00108030 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 108030: 55 push %ebp 108031: 89 e5 mov %esp,%ebp 108033: 57 push %edi 108034: 56 push %esi 108035: 53 push %ebx 108036: 83 ec 0c sub $0xc,%esp 108039: 8b 75 08 mov 0x8(%ebp),%esi 10803c: 8b 7d 0c mov 0xc(%ebp),%edi /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 10803f: 8a 06 mov (%esi),%al 108041: 84 c0 test %al,%al 108043: 74 34 je 108079 <== NEVER TAKEN 108045: 85 ff test %edi,%edi 108047: 74 30 je 108079 <== NEVER TAKEN 108049: 31 db xor %ebx,%ebx 10804b: eb 0f jmp 10805c 10804d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { pathname++; pathnamelen--; stripped++; 108050: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 108051: 8a 04 1e mov (%esi,%ebx,1),%al 108054: 84 c0 test %al,%al 108056: 74 17 je 10806f <== NEVER TAKEN 108058: 39 df cmp %ebx,%edi 10805a: 74 13 je 10806f <== NEVER TAKEN 10805c: 83 ec 0c sub $0xc,%esp 10805f: 0f be c0 movsbl %al,%eax 108062: 50 push %eax 108063: e8 90 0e 00 00 call 108ef8 108068: 83 c4 10 add $0x10,%esp 10806b: 85 c0 test %eax,%eax 10806d: 75 e1 jne 108050 pathname++; pathnamelen--; stripped++; } return stripped; } 10806f: 89 d8 mov %ebx,%eax 108071: 8d 65 f4 lea -0xc(%ebp),%esp 108074: 5b pop %ebx 108075: 5e pop %esi 108076: 5f pop %edi 108077: c9 leave 108078: c3 ret ) { /* * Eat any separators at start of the path. */ int stripped = 0; 108079: 31 db xor %ebx,%ebx <== NOT EXECUTED 10807b: eb f2 jmp 10806f <== NOT EXECUTED =============================================================================== 0010fdf8 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10fdf8: 55 push %ebp 10fdf9: 89 e5 mov %esp,%ebp 10fdfb: 57 push %edi 10fdfc: 56 push %esi 10fdfd: 53 push %ebx 10fdfe: 83 ec 28 sub $0x28,%esp size_t type_size = strlen(type) + 1; 10fe01: 31 c0 xor %eax,%eax 10fe03: b9 ff ff ff ff mov $0xffffffff,%ecx 10fe08: 8b 7d 08 mov 0x8(%ebp),%edi 10fe0b: f2 ae repnz scas %es:(%edi),%al 10fe0d: f7 d1 not %ecx size_t fsn_size = sizeof( filesystem_node ) + type_size; 10fe0f: 8d 41 10 lea 0x10(%ecx),%eax filesystem_node *fsn = malloc( fsn_size ); 10fe12: 50 push %eax 10fe13: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fe16: e8 4d 85 ff ff call 108368 10fe1b: 89 c3 mov %eax,%ebx char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) 10fe1d: 83 c4 10 add $0x10,%esp 10fe20: 85 c0 test %eax,%eax 10fe22: 8b 4d e4 mov -0x1c(%ebp),%ecx 10fe25: 0f 84 8e 00 00 00 je 10feb9 ) { size_t type_size = strlen(type) + 1; size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( *fsn ); 10fe2b: 8d 40 10 lea 0x10(%eax),%eax if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memcpy(type_storage, type, type_size); 10fe2e: 89 c7 mov %eax,%edi 10fe30: 8b 75 08 mov 0x8(%ebp),%esi 10fe33: f3 a4 rep movsb %ds:(%esi),%es:(%edi) fsn->entry.type = type_storage; 10fe35: 89 43 08 mov %eax,0x8(%ebx) fsn->entry.mount_h = mount_h; 10fe38: 8b 45 0c mov 0xc(%ebp),%eax 10fe3b: 89 43 0c mov %eax,0xc(%ebx) rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fe3e: 50 push %eax 10fe3f: 6a 00 push $0x0 10fe41: 6a 00 push $0x0 10fe43: ff 35 c8 52 12 00 pushl 0x1252c8 10fe49: e8 42 b8 ff ff call 10b690 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 10fe4e: 5f pop %edi 10fe4f: ff 75 08 pushl 0x8(%ebp) 10fe52: e8 6d ff ff ff call 10fdc4 10fe57: 83 c4 10 add $0x10,%esp 10fe5a: 85 c0 test %eax,%eax 10fe5c: 75 2a jne 10fe88 10fe5e: 83 ec 08 sub $0x8,%esp 10fe61: 53 push %ebx 10fe62: 68 54 31 12 00 push $0x123154 10fe67: e8 f4 c0 ff ff call 10bf60 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fe6c: 5e pop %esi 10fe6d: ff 35 c8 52 12 00 pushl 0x1252c8 10fe73: e8 14 b9 ff ff call 10b78c 10fe78: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 10fe7b: 31 c0 xor %eax,%eax } 10fe7d: 8d 65 f4 lea -0xc(%ebp),%esp 10fe80: 5b pop %ebx 10fe81: 5e pop %esi 10fe82: 5f pop %edi 10fe83: c9 leave 10fe84: c3 ret 10fe85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10fe88: 83 ec 0c sub $0xc,%esp 10fe8b: ff 35 c8 52 12 00 pushl 0x1252c8 10fe91: e8 f6 b8 ff ff call 10b78c rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 10fe96: 89 1c 24 mov %ebx,(%esp) 10fe99: e8 f6 81 ff ff call 108094 rtems_set_errno_and_return_minus_one( EINVAL ); 10fe9e: e8 0d 24 00 00 call 1122b0 <__errno> 10fea3: c7 00 16 00 00 00 movl $0x16,(%eax) 10fea9: 83 c4 10 add $0x10,%esp 10feac: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_libio_unlock(); return 0; } 10feb1: 8d 65 f4 lea -0xc(%ebp),%esp 10feb4: 5b pop %ebx 10feb5: 5e pop %esi 10feb6: 5f pop %edi 10feb7: c9 leave 10feb8: c3 ret size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10feb9: e8 f2 23 00 00 call 1122b0 <__errno> 10febe: c7 00 0c 00 00 00 movl $0xc,(%eax) 10fec4: b8 ff ff ff ff mov $0xffffffff,%eax 10fec9: eb b2 jmp 10fe7d =============================================================================== 0010fecc : int rtems_filesystem_unregister( const char *type ) { 10fecc: 55 push %ebp 10fecd: 89 e5 mov %esp,%ebp 10fecf: 56 push %esi 10fed0: 53 push %ebx 10fed1: 8b 75 08 mov 0x8(%ebp),%esi rtems_chain_node *node = NULL; if ( type == NULL ) { 10fed4: 85 f6 test %esi,%esi 10fed6: 0f 84 94 00 00 00 je 10ff70 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fedc: 51 push %ecx 10fedd: 6a 00 push $0x0 10fedf: 6a 00 push $0x0 10fee1: ff 35 c8 52 12 00 pushl 0x1252c8 10fee7: e8 a4 b7 ff ff call 10b690 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10feec: 8b 1d 54 31 12 00 mov 0x123154,%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10fef2: 83 c4 10 add $0x10,%esp 10fef5: 81 fb 58 31 12 00 cmp $0x123158,%ebx 10fefb: 75 0d jne 10ff0a 10fefd: eb 49 jmp 10ff48 10feff: 90 nop <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff00: 8b 1b mov (%ebx),%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10ff02: 81 fb 58 31 12 00 cmp $0x123158,%ebx 10ff08: 74 3e je 10ff48 <== ALWAYS TAKEN !rtems_chain_is_tail( &filesystem_chain, node ); node = rtems_chain_next( node ) ) { filesystem_node *fsn = (filesystem_node *) node; if ( strcmp( fsn->entry.type, type ) == 0 ) { 10ff0a: 83 ec 08 sub $0x8,%esp 10ff0d: 56 push %esi 10ff0e: ff 73 08 pushl 0x8(%ebx) 10ff11: e8 06 30 00 00 call 112f1c 10ff16: 83 c4 10 add $0x10,%esp 10ff19: 85 c0 test %eax,%eax 10ff1b: 75 e3 jne 10ff00 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ff1d: 83 ec 0c sub $0xc,%esp 10ff20: 53 push %ebx 10ff21: e8 5e c0 ff ff call 10bf84 <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); 10ff26: 89 1c 24 mov %ebx,(%esp) 10ff29: e8 66 81 ff ff call 108094 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ff2e: 5a pop %edx 10ff2f: ff 35 c8 52 12 00 pushl 0x1252c8 10ff35: e8 52 b8 ff ff call 10b78c 10ff3a: 83 c4 10 add $0x10,%esp rtems_libio_unlock(); return 0; 10ff3d: 31 c0 xor %eax,%eax } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff3f: 8d 65 f8 lea -0x8(%ebp),%esp 10ff42: 5b pop %ebx 10ff43: 5e pop %esi 10ff44: c9 leave 10ff45: c3 ret 10ff46: 66 90 xchg %ax,%ax <== NOT EXECUTED 10ff48: 83 ec 0c sub $0xc,%esp 10ff4b: ff 35 c8 52 12 00 pushl 0x1252c8 10ff51: e8 36 b8 ff ff call 10b78c return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 10ff56: e8 55 23 00 00 call 1122b0 <__errno> 10ff5b: c7 00 02 00 00 00 movl $0x2,(%eax) 10ff61: 83 c4 10 add $0x10,%esp 10ff64: b8 ff ff ff ff mov $0xffffffff,%eax } 10ff69: 8d 65 f8 lea -0x8(%ebp),%esp 10ff6c: 5b pop %ebx 10ff6d: 5e pop %esi 10ff6e: c9 leave 10ff6f: c3 ret ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 10ff70: e8 3b 23 00 00 call 1122b0 <__errno> 10ff75: c7 00 16 00 00 00 movl $0x16,(%eax) 10ff7b: 83 c8 ff or $0xffffffff,%eax 10ff7e: eb e9 jmp 10ff69 =============================================================================== 001089dc : void *rtems_gxx_getspecific(__gthread_key_t key) { 1089dc: 55 push %ebp 1089dd: 89 e5 mov %esp,%ebp 1089df: 53 push %ebx 1089e0: 83 ec 18 sub $0x18,%esp 1089e3: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code status; void *p= 0; 1089e6: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); 1089ed: 8d 45 f4 lea -0xc(%ebp),%eax 1089f0: 50 push %eax 1089f1: 53 push %ebx 1089f2: 6a 00 push $0x0 1089f4: e8 7f 3d 00 00 call 10c778 if ( status == RTEMS_SUCCESSFUL ) { 1089f9: 83 c4 10 add $0x10,%esp 1089fc: 85 c0 test %eax,%eax 1089fe: 75 08 jne 108a08 /* We do not have to do this, but what the heck ! */ p= key->val; 108a00: 8b 03 mov (%ebx),%eax p, rtems_task_self() ); #endif return p; } 108a02: 8b 5d fc mov -0x4(%ebp),%ebx 108a05: c9 leave 108a06: c3 ret 108a07: 90 nop <== NOT EXECUTED p= key->val; } else { /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 108a08: 50 push %eax 108a09: ff 73 04 pushl 0x4(%ebx) 108a0c: 53 push %ebx 108a0d: 6a 00 push $0x0 108a0f: e8 04 3c 00 00 call 10c618 if ( status != RTEMS_SUCCESSFUL ) { 108a14: 83 c4 10 add $0x10,%esp 108a17: 85 c0 test %eax,%eax 108a19: 75 0e jne 108a29 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_GXX_KEY_ADD_FAILED ); } key->val = (void *)0; 108a1b: c7 03 00 00 00 00 movl $0x0,(%ebx) 108a21: 8b 45 f4 mov -0xc(%ebp),%eax p, rtems_task_self() ); #endif return p; } 108a24: 8b 5d fc mov -0x4(%ebp),%ebx 108a27: c9 leave 108a28: c3 ret /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status != RTEMS_SUCCESSFUL ) { _Internal_error_Occurred( 108a29: 53 push %ebx 108a2a: 6a 15 push $0x15 108a2c: 6a 01 push $0x1 108a2e: 6a 00 push $0x0 108a30: e8 bf 4a 00 00 call 10d4f4 <_Internal_error_Occurred> =============================================================================== 001089a8 : int rtems_gxx_key_delete (__gthread_key_t key) { 1089a8: 55 push %ebp 1089a9: 89 e5 mov %esp,%ebp 1089ab: 53 push %ebx 1089ac: 83 ec 0c sub $0xc,%esp 1089af: 8b 5d 08 mov 0x8(%ebp),%ebx #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); 1089b2: 53 push %ebx 1089b3: 6a 00 push $0x0 1089b5: e8 22 3d 00 00 call 10c6dc if ( status == RTEMS_SUCCESSFUL ) { 1089ba: 83 c4 10 add $0x10,%esp 1089bd: 85 c0 test %eax,%eax 1089bf: 75 11 jne 1089d2 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); 1089c1: 85 db test %ebx,%ebx 1089c3: 74 0d je 1089d2 <== NEVER TAKEN 1089c5: 83 ec 0c sub $0xc,%esp 1089c8: ff 33 pushl (%ebx) 1089ca: e8 15 fe ff ff call 1087e4 1089cf: 83 c4 10 add $0x10,%esp return 0; } key = NULL; return 0; } 1089d2: 31 c0 xor %eax,%eax 1089d4: 8b 5d fc mov -0x4(%ebp),%ebx 1089d7: c9 leave 1089d8: c3 ret =============================================================================== 001088e0 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 1088e0: 55 push %ebp 1088e1: 89 e5 mov %esp,%ebp 1088e3: 56 push %esi 1088e4: 53 push %ebx 1088e5: 83 ec 10 sub $0x10,%esp 1088e8: 8b 5d 08 mov 0x8(%ebp),%ebx #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { 1088eb: 8b 03 mov (%ebx),%eax 1088ed: 85 c0 test %eax,%eax 1088ef: 74 0b je 1088fc rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 1088f1: 31 c0 xor %eax,%eax 1088f3: 8d 65 f8 lea -0x8(%ebp),%esp 1088f6: 5b pop %ebx 1088f7: 5e pop %esi 1088f8: c9 leave 1088f9: c3 ret 1088fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( *(volatile __gthread_once_t *)once == 0 ) { rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 1088fc: 51 push %ecx 1088fd: 8d 75 f4 lea -0xc(%ebp),%esi 108900: 56 push %esi 108901: 68 00 01 00 00 push $0x100 108906: 68 00 01 00 00 push $0x100 10890b: e8 30 3b 00 00 call 10c440 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 108910: 8b 03 mov (%ebx),%eax 108912: 83 c4 10 add $0x10,%esp 108915: 85 c0 test %eax,%eax 108917: 75 27 jne 108940 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 108919: c7 03 01 00 00 00 movl $0x1,(%ebx) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10891f: 52 push %edx 108920: 56 push %esi 108921: 68 00 01 00 00 push $0x100 108926: ff 75 f4 pushl -0xc(%ebp) 108929: e8 12 3b 00 00 call 10c440 if ( o == 0 ) (*func)(); 10892e: ff 55 0c call *0xc(%ebp) 108931: 83 c4 10 add $0x10,%esp } return 0; } 108934: 31 c0 xor %eax,%eax 108936: 8d 65 f8 lea -0x8(%ebp),%esp 108939: 5b pop %ebx 10893a: 5e pop %esi 10893b: c9 leave 10893c: c3 ret 10893d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { *(volatile __gthread_once_t *)once = 1; } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 108940: 50 push %eax <== NOT EXECUTED 108941: 56 push %esi <== NOT EXECUTED 108942: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 108947: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10894a: e8 f1 3a 00 00 call 10c440 <== NOT EXECUTED 10894f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } 108952: 31 c0 xor %eax,%eax <== NOT EXECUTED 108954: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108957: 5b pop %ebx <== NOT EXECUTED 108958: 5e pop %esi <== NOT EXECUTED 108959: c9 leave <== NOT EXECUTED 10895a: c3 ret <== NOT EXECUTED =============================================================================== 00108a38 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 108a38: 55 push %ebp 108a39: 89 e5 mov %esp,%ebp 108a3b: 53 push %ebx 108a3c: 83 ec 08 sub $0x8,%esp 108a3f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 108a42: ff 73 04 pushl 0x4(%ebx) 108a45: 53 push %ebx 108a46: 6a 00 push $0x0 108a48: e8 cb 3b 00 00 call 10c618 if ( status == RTEMS_SUCCESSFUL ) { 108a4d: 83 c4 10 add $0x10,%esp 108a50: 85 c0 test %eax,%eax 108a52: 75 0c jne 108a60 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 108a54: 8b 45 0c mov 0xc(%ebp),%eax 108a57: 89 03 mov %eax,(%ebx) return 0; 108a59: 31 c0 xor %eax,%eax } return -1; } 108a5b: 8b 5d fc mov -0x4(%ebp),%ebx 108a5e: c9 leave 108a5f: c3 ret if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 108a60: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 108a65: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108a68: c9 leave <== NOT EXECUTED 108a69: c3 ret <== NOT EXECUTED =============================================================================== 0010bc14 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 10bc14: 55 push %ebp 10bc15: 89 e5 mov %esp,%ebp 10bc17: 83 ec 08 sub $0x8,%esp if ( 10bc1a: 83 3d 00 d4 12 00 03 cmpl $0x3,0x12d400 10bc21: 74 21 je 10bc44 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); 10bc23: e8 e4 ef ff ff call 10ac0c /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 10bc28: ff 75 10 pushl 0x10(%ebp) 10bc2b: ff 75 0c pushl 0xc(%ebp) 10bc2e: ff 75 08 pushl 0x8(%ebp) 10bc31: ff 35 38 86 12 00 pushl 0x128638 10bc37: e8 d4 4c 00 00 call 110910 <_Protected_heap_Allocate_aligned_with_boundary> 10bc3c: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bc3f: c9 leave 10bc40: c3 ret 10bc41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 10bc44: e8 83 ef ff ff call 10abcc 10bc49: 84 c0 test %al,%al 10bc4b: 75 d6 jne 10bc23 ) { return NULL; 10bc4d: 31 c0 xor %eax,%eax RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bc4f: c9 leave 10bc50: c3 ret =============================================================================== 00111ffc : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111ffc: 55 push %ebp 111ffd: 89 e5 mov %esp,%ebp 111fff: 53 push %ebx 112000: 83 ec 04 sub $0x4,%esp 112003: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112006: 39 05 80 57 12 00 cmp %eax,0x125780 11200c: 76 1a jbe 112028 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 11200e: 8d 14 40 lea (%eax,%eax,2),%edx 112011: c1 e2 03 shl $0x3,%edx 112014: 03 15 84 57 12 00 add 0x125784,%edx 11201a: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11201d: 85 d2 test %edx,%edx 11201f: 74 13 je 112034 } 112021: 59 pop %ecx 112022: 5b pop %ebx 112023: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112024: ff e2 jmp *%edx 112026: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112028: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11202d: 5a pop %edx 11202e: 5b pop %ebx 11202f: c9 leave 112030: c3 ret 112031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112034: 31 c0 xor %eax,%eax } 112036: 5a pop %edx 112037: 5b pop %ebx 112038: c9 leave 112039: c3 ret =============================================================================== 0011203c : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11203c: 55 push %ebp 11203d: 89 e5 mov %esp,%ebp 11203f: 53 push %ebx 112040: 83 ec 04 sub $0x4,%esp 112043: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112046: 39 05 80 57 12 00 cmp %eax,0x125780 11204c: 76 1a jbe 112068 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 11204e: 8d 14 40 lea (%eax,%eax,2),%edx 112051: c1 e2 03 shl $0x3,%edx 112054: 03 15 84 57 12 00 add 0x125784,%edx 11205a: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11205d: 85 d2 test %edx,%edx 11205f: 74 13 je 112074 } 112061: 59 pop %ecx 112062: 5b pop %ebx 112063: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112064: ff e2 jmp *%edx 112066: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112068: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11206d: 5a pop %edx 11206e: 5b pop %ebx 11206f: c9 leave 112070: c3 ret 112071: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112074: 31 c0 xor %eax,%eax } 112076: 5a pop %edx 112077: 5b pop %ebx 112078: c9 leave 112079: c3 ret =============================================================================== 00110414 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110414: 55 push %ebp 110415: 89 e5 mov %esp,%ebp 110417: 53 push %ebx 110418: 83 ec 04 sub $0x4,%esp 11041b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11041e: 39 05 80 57 12 00 cmp %eax,0x125780 110424: 76 1a jbe 110440 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110426: 8d 14 40 lea (%eax,%eax,2),%edx 110429: c1 e2 03 shl $0x3,%edx 11042c: 03 15 84 57 12 00 add 0x125784,%edx 110432: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110434: 85 d2 test %edx,%edx 110436: 74 14 je 11044c } 110438: 59 pop %ecx 110439: 5b pop %ebx 11043a: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11043b: ff e2 jmp *%edx 11043d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110440: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110445: 5a pop %edx 110446: 5b pop %ebx 110447: c9 leave 110448: c3 ret 110449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11044c: 31 c0 xor %eax,%eax } 11044e: 5a pop %edx 11044f: 5b pop %ebx 110450: c9 leave 110451: c3 ret =============================================================================== 00107d40 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107d40: 55 push %ebp 107d41: 89 e5 mov %esp,%ebp 107d43: 57 push %edi 107d44: 56 push %esi 107d45: 53 push %ebx 107d46: 83 ec 48 sub $0x48,%esp 107d49: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( 107d4c: b9 ff ff ff ff mov $0xffffffff,%ecx 107d51: 89 f7 mov %esi,%edi 107d53: 31 c0 xor %eax,%eax 107d55: f2 ae repnz scas %es:(%edi),%al 107d57: f7 d1 not %ecx 107d59: 49 dec %ecx 107d5a: 6a 01 push $0x1 107d5c: 8d 5d d4 lea -0x2c(%ebp),%ebx 107d5f: 53 push %ebx 107d60: 6a 00 push $0x0 107d62: 51 push %ecx 107d63: 56 push %esi 107d64: e8 3f 02 00 00 call 107fa8 107d69: 89 c7 mov %eax,%edi name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 107d6b: 8b 55 d4 mov -0x2c(%ebp),%edx 107d6e: 89 55 c4 mov %edx,-0x3c(%ebp) node_type = (*loc.ops->node_type_h)( &loc ); 107d71: 83 c4 14 add $0x14,%esp 107d74: 53 push %ebx 107d75: 8b 45 e0 mov -0x20(%ebp),%eax 107d78: ff 50 10 call *0x10(%eax) if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107d7b: 83 c4 10 add $0x10,%esp 107d7e: 85 ff test %edi,%edi 107d80: 75 05 jne 107d87 <== NEVER TAKEN 107d82: 83 f8 02 cmp $0x2,%eax 107d85: 74 19 je 107da0 rtems_filesystem_freenode( &loc ); 107d87: 83 ec 0c sub $0xc,%esp 107d8a: 53 push %ebx 107d8b: e8 f0 02 00 00 call 108080 return RTEMS_UNSATISFIED; 107d90: 83 c4 10 add $0x10,%esp 107d93: b8 0d 00 00 00 mov $0xd,%eax device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107d98: 8d 65 f4 lea -0xc(%ebp),%esp 107d9b: 5b pop %ebx 107d9c: 5e pop %esi 107d9d: 5f pop %edi 107d9e: c9 leave 107d9f: c3 ret if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107da0: 8b 7d 0c mov 0xc(%ebp),%edi 107da3: 89 37 mov %esi,(%edi) device_info->device_name_length = strlen( name ); 107da5: b9 ff ff ff ff mov $0xffffffff,%ecx 107daa: 89 f7 mov %esi,%edi 107dac: 31 c0 xor %eax,%eax 107dae: f2 ae repnz scas %es:(%edi),%al 107db0: f7 d1 not %ecx 107db2: 49 dec %ecx 107db3: 8b 45 0c mov 0xc(%ebp),%eax 107db6: 89 48 04 mov %ecx,0x4(%eax) device_info->major = the_jnode->info.device.major; 107db9: 8b 55 c4 mov -0x3c(%ebp),%edx 107dbc: 8b 42 50 mov 0x50(%edx),%eax 107dbf: 8b 7d 0c mov 0xc(%ebp),%edi 107dc2: 89 47 08 mov %eax,0x8(%edi) device_info->minor = the_jnode->info.device.minor; 107dc5: 8b 42 54 mov 0x54(%edx),%eax 107dc8: 89 47 0c mov %eax,0xc(%edi) rtems_filesystem_freenode( &loc ); 107dcb: 83 ec 0c sub $0xc,%esp 107dce: 53 push %ebx 107dcf: e8 ac 02 00 00 call 108080 return RTEMS_SUCCESSFUL; 107dd4: 83 c4 10 add $0x10,%esp 107dd7: 31 c0 xor %eax,%eax 107dd9: eb bd jmp 107d98 =============================================================================== 0011207c : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11207c: 55 push %ebp 11207d: 89 e5 mov %esp,%ebp 11207f: 53 push %ebx 112080: 83 ec 04 sub $0x4,%esp 112083: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112086: 39 05 80 57 12 00 cmp %eax,0x125780 11208c: 76 1a jbe 1120a8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 11208e: 8d 14 40 lea (%eax,%eax,2),%edx 112091: c1 e2 03 shl $0x3,%edx 112094: 03 15 84 57 12 00 add 0x125784,%edx 11209a: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11209d: 85 d2 test %edx,%edx 11209f: 74 13 je 1120b4 } 1120a1: 59 pop %ecx 1120a2: 5b pop %ebx 1120a3: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120a4: ff e2 jmp *%edx 1120a6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120a8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120ad: 5a pop %edx 1120ae: 5b pop %ebx 1120af: c9 leave 1120b0: c3 ret 1120b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120b4: 31 c0 xor %eax,%eax } 1120b6: 5a pop %edx 1120b7: 5b pop %ebx 1120b8: c9 leave 1120b9: c3 ret =============================================================================== 001120bc : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120bc: 55 push %ebp 1120bd: 89 e5 mov %esp,%ebp 1120bf: 53 push %ebx 1120c0: 83 ec 04 sub $0x4,%esp 1120c3: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1120c6: 39 05 80 57 12 00 cmp %eax,0x125780 1120cc: 76 1a jbe 1120e8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 1120ce: 8d 14 40 lea (%eax,%eax,2),%edx 1120d1: c1 e2 03 shl $0x3,%edx 1120d4: 03 15 84 57 12 00 add 0x125784,%edx 1120da: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120dd: 85 d2 test %edx,%edx 1120df: 74 13 je 1120f4 } 1120e1: 59 pop %ecx 1120e2: 5b pop %ebx 1120e3: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120e4: ff e2 jmp *%edx 1120e6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120e8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120ed: 5a pop %edx 1120ee: 5b pop %ebx 1120ef: c9 leave 1120f0: c3 ret 1120f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120f4: 31 c0 xor %eax,%eax } 1120f6: 5a pop %edx 1120f7: 5b pop %ebx 1120f8: c9 leave 1120f9: c3 ret =============================================================================== 0010ce88 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 10ce88: 55 push %ebp 10ce89: 89 e5 mov %esp,%ebp 10ce8b: 57 push %edi 10ce8c: 56 push %esi 10ce8d: 53 push %ebx 10ce8e: 83 ec 0c sub $0xc,%esp 10ce91: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce94: 8b 75 0c mov 0xc(%ebp),%esi 10ce97: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ce9a: a1 60 98 12 00 mov 0x129860,%eax if ( rtems_interrupt_is_in_progress() ) 10ce9f: 8b 0d b4 97 12 00 mov 0x1297b4,%ecx 10cea5: 85 c9 test %ecx,%ecx 10cea7: 0f 85 ab 00 00 00 jne 10cf58 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cead: 85 d2 test %edx,%edx 10ceaf: 0f 84 e7 00 00 00 je 10cf9c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ceb5: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10ceb7: 85 f6 test %esi,%esi 10ceb9: 0f 84 dd 00 00 00 je 10cf9c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cebf: 8b 3e mov (%esi),%edi 10cec1: 85 ff test %edi,%edi 10cec3: 0f 84 c7 00 00 00 je 10cf90 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cec9: 39 d8 cmp %ebx,%eax 10cecb: 76 7b jbe 10cf48 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cecd: a1 14 95 12 00 mov 0x129514,%eax 10ced2: 40 inc %eax 10ced3: a3 14 95 12 00 mov %eax,0x129514 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ced8: 85 db test %ebx,%ebx 10ceda: 0f 85 88 00 00 00 jne 10cf68 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cee0: 8b 0d 60 98 12 00 mov 0x129860,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cee6: 85 c9 test %ecx,%ecx 10cee8: 0f 84 bb 00 00 00 je 10cfa9 <== NEVER TAKEN 10ceee: 8b 3d 64 98 12 00 mov 0x129864,%edi 10cef4: 89 f8 mov %edi,%eax 10cef6: eb 08 jmp 10cf00 10cef8: 43 inc %ebx 10cef9: 83 c0 18 add $0x18,%eax 10cefc: 39 d9 cmp %ebx,%ecx 10cefe: 76 0b jbe 10cf0b static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf00: 83 38 00 cmpl $0x0,(%eax) 10cf03: 75 f3 jne 10cef8 10cf05: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf09: 75 ed jne 10cef8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf0b: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf0d: 39 d9 cmp %ebx,%ecx 10cf0f: 0f 84 9b 00 00 00 je 10cfb0 10cf15: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf18: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cf1b: 01 c7 add %eax,%edi 10cf1d: b9 06 00 00 00 mov $0x6,%ecx 10cf22: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cf24: e8 8b 19 00 00 call 10e8b4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cf29: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf30: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf37: 89 5d 08 mov %ebx,0x8(%ebp) } 10cf3a: 83 c4 0c add $0xc,%esp 10cf3d: 5b pop %ebx 10cf3e: 5e pop %esi 10cf3f: 5f pop %edi 10cf40: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cf41: e9 52 72 00 00 jmp 114198 10cf46: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cf48: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf4d: 83 c4 0c add $0xc,%esp 10cf50: 5b pop %ebx 10cf51: 5e pop %esi 10cf52: 5f pop %edi 10cf53: c9 leave 10cf54: c3 ret 10cf55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10cf58: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf5d: 83 c4 0c add $0xc,%esp 10cf60: 5b pop %ebx 10cf61: 5e pop %esi 10cf62: 5f pop %edi 10cf63: c9 leave 10cf64: c3 ret 10cf65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10cf68: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf6b: c1 e0 03 shl $0x3,%eax 10cf6e: 8b 0d 64 98 12 00 mov 0x129864,%ecx 10cf74: 01 c1 add %eax,%ecx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf76: 8b 39 mov (%ecx),%edi 10cf78: 85 ff test %edi,%edi 10cf7a: 74 40 je 10cfbc major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10cf7c: e8 33 19 00 00 call 10e8b4 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10cf81: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cf86: 83 c4 0c add $0xc,%esp 10cf89: 5b pop %ebx 10cf8a: 5e pop %esi 10cf8b: 5f pop %edi 10cf8c: c9 leave 10cf8d: c3 ret 10cf8e: 66 90 xchg %ax,%ax <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf90: 8b 4e 04 mov 0x4(%esi),%ecx 10cf93: 85 c9 test %ecx,%ecx 10cf95: 0f 85 2e ff ff ff jne 10cec9 10cf9b: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10cf9c: b8 09 00 00 00 mov $0x9,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cfa1: 83 c4 0c add $0xc,%esp 10cfa4: 5b pop %ebx 10cfa5: 5e pop %esi 10cfa6: 5f pop %edi 10cfa7: c9 leave 10cfa8: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfa9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfaf: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10cfb0: e8 ff 18 00 00 call 10e8b4 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10cfb5: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10cfba: eb 91 jmp 10cf4d static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfbc: 8b 49 04 mov 0x4(%ecx),%ecx 10cfbf: 85 c9 test %ecx,%ecx 10cfc1: 75 b9 jne 10cf7c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10cfc3: 89 1a mov %ebx,(%edx) 10cfc5: 8b 3d 64 98 12 00 mov 0x129864,%edi 10cfcb: e9 4b ff ff ff jmp 10cf1b =============================================================================== 0010cfd0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10cfd0: 55 push %ebp 10cfd1: 89 e5 mov %esp,%ebp 10cfd3: 57 push %edi 10cfd4: 83 ec 04 sub $0x4,%esp 10cfd7: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10cfda: 8b 0d b4 97 12 00 mov 0x1297b4,%ecx 10cfe0: 85 c9 test %ecx,%ecx 10cfe2: 75 44 jne 10d028 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10cfe4: 39 05 60 98 12 00 cmp %eax,0x129860 10cfea: 77 0c ja 10cff8 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10cfec: b8 0d 00 00 00 mov $0xd,%eax } 10cff1: 5a pop %edx 10cff2: 5f pop %edi 10cff3: c9 leave 10cff4: c3 ret 10cff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cff8: 8b 15 14 95 12 00 mov 0x129514,%edx 10cffe: 42 inc %edx 10cfff: 89 15 14 95 12 00 mov %edx,0x129514 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d005: 8d 14 40 lea (%eax,%eax,2),%edx 10d008: c1 e2 03 shl $0x3,%edx if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d00b: 03 15 64 98 12 00 add 0x129864,%edx 10d011: b9 18 00 00 00 mov $0x18,%ecx 10d016: 31 c0 xor %eax,%eax 10d018: 89 d7 mov %edx,%edi 10d01a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d01c: e8 93 18 00 00 call 10e8b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d021: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d023: 5a pop %edx 10d024: 5f pop %edi 10d025: c9 leave 10d026: c3 ret 10d027: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d028: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d02d: 5a pop %edx 10d02e: 5f pop %edi 10d02f: c9 leave 10d030: c3 ret =============================================================================== 001120fc : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120fc: 55 push %ebp 1120fd: 89 e5 mov %esp,%ebp 1120ff: 53 push %ebx 112100: 83 ec 04 sub $0x4,%esp 112103: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112106: 39 05 80 57 12 00 cmp %eax,0x125780 11210c: 76 1a jbe 112128 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 11210e: 8d 14 40 lea (%eax,%eax,2),%edx 112111: c1 e2 03 shl $0x3,%edx 112114: 03 15 84 57 12 00 add 0x125784,%edx 11211a: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11211d: 85 d2 test %edx,%edx 11211f: 74 13 je 112134 } 112121: 59 pop %ecx 112122: 5b pop %ebx 112123: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112124: ff e2 jmp *%edx 112126: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112128: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11212d: 5a pop %edx 11212e: 5b pop %ebx 11212f: c9 leave 112130: c3 ret 112131: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112134: 31 c0 xor %eax,%eax } 112136: 5a pop %edx 112137: 5b pop %ebx 112138: c9 leave 112139: c3 ret =============================================================================== 0010deac : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10deac: 55 push %ebp 10dead: 89 e5 mov %esp,%ebp 10deaf: 57 push %edi 10deb0: 56 push %esi 10deb1: 53 push %ebx 10deb2: 83 ec 1c sub $0x1c,%esp 10deb5: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10deb8: 85 ff test %edi,%edi 10deba: 74 49 je 10df05 <== NEVER TAKEN 10debc: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10dec3: 8b 55 e4 mov -0x1c(%ebp),%edx 10dec6: 8b 04 95 6c 13 13 00 mov 0x13136c(,%edx,4),%eax 10decd: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10ded0: 85 f6 test %esi,%esi 10ded2: 74 28 je 10defc continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10ded4: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10ded9: 74 21 je 10defc <== NEVER TAKEN 10dedb: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dee0: 8b 46 1c mov 0x1c(%esi),%eax 10dee3: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10dee6: 85 c0 test %eax,%eax 10dee8: 74 09 je 10def3 continue; (*routine)(the_thread); 10deea: 83 ec 0c sub $0xc,%esp 10deed: 50 push %eax 10deee: ff d7 call *%edi 10def0: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10def3: 43 inc %ebx 10def4: 0f b7 46 10 movzwl 0x10(%esi),%eax 10def8: 39 d8 cmp %ebx,%eax 10defa: 73 e4 jae 10dee0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10defc: ff 45 e4 incl -0x1c(%ebp) 10deff: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10df03: 75 be jne 10dec3 (*routine)(the_thread); } } } 10df05: 8d 65 f4 lea -0xc(%ebp),%esp 10df08: 5b pop %ebx 10df09: 5e pop %esi 10df0a: 5f pop %edi 10df0b: c9 leave 10df0c: c3 ret =============================================================================== 0010fbc4 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10fbc4: 55 push %ebp 10fbc5: 89 e5 mov %esp,%ebp 10fbc7: 53 push %ebx 10fbc8: 83 ec 08 sub $0x8,%esp 10fbcb: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fbce: 6a 00 push $0x0 10fbd0: 6a 00 push $0x0 10fbd2: ff 35 c8 52 12 00 pushl 0x1252c8 10fbd8: e8 b3 ba ff ff call 10b690 rtems_libio_lock(); if (iop->sem) 10fbdd: 8b 43 2c mov 0x2c(%ebx),%eax 10fbe0: 83 c4 10 add $0x10,%esp 10fbe3: 85 c0 test %eax,%eax 10fbe5: 74 0c je 10fbf3 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10fbe7: 83 ec 0c sub $0xc,%esp 10fbea: 50 push %eax 10fbeb: e8 fc b9 ff ff call 10b5ec 10fbf0: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10fbf3: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10fbfa: a1 c4 52 12 00 mov 0x1252c4,%eax 10fbff: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10fc02: 89 1d c4 52 12 00 mov %ebx,0x1252c4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fc08: a1 c8 52 12 00 mov 0x1252c8,%eax 10fc0d: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10fc10: 8b 5d fc mov -0x4(%ebp),%ebx 10fc13: c9 leave 10fc14: e9 73 bb ff ff jmp 10b78c =============================================================================== 00108190 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 108190: 55 push %ebp 108191: 89 e5 mov %esp,%ebp 108193: 53 push %ebx 108194: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 108197: 8b 1d 4c 11 12 00 mov 0x12114c,%ebx 10819d: 85 db test %ebx,%ebx 10819f: 74 50 je 1081f1 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1081a1: 83 ec 08 sub $0x8,%esp 1081a4: 6a 38 push $0x38 1081a6: 53 push %ebx 1081a7: e8 58 fd ff ff call 107f04 1081ac: 89 c2 mov %eax,%edx 1081ae: a3 c0 52 12 00 mov %eax,0x1252c0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1081b3: 83 c4 10 add $0x10,%esp 1081b6: 85 c0 test %eax,%eax 1081b8: 74 74 je 10822e rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1081ba: a3 c4 52 12 00 mov %eax,0x1252c4 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081bf: 83 fb 01 cmp $0x1,%ebx 1081c2: 76 26 jbe 1081ea <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 1081c4: 8d 50 38 lea 0x38(%eax),%edx 1081c7: b9 01 00 00 00 mov $0x1,%ecx if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; 1081cc: 89 52 fc mov %edx,-0x4(%edx) 1081cf: 41 inc %ecx 1081d0: 83 c2 38 add $0x38,%edx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081d3: 39 d9 cmp %ebx,%ecx 1081d5: 75 f5 jne 1081cc * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 1081d7: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx 1081de: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx 1081e5: 29 ca sub %ecx,%edx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1081e7: 8d 14 10 lea (%eax,%edx,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 1081ea: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 1081f1: 83 ec 0c sub $0xc,%esp 1081f4: 68 c8 52 12 00 push $0x1252c8 1081f9: 6a 00 push $0x0 1081fb: 6a 54 push $0x54 1081fd: 6a 01 push $0x1 1081ff: 68 4f 49 42 4c push $0x4c42494f 108204: e8 0b 32 00 00 call 10b414 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 108209: 83 c4 20 add $0x20,%esp 10820c: 85 c0 test %eax,%eax 10820e: 75 15 jne 108225 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 108210: a1 48 11 12 00 mov 0x121148,%eax 108215: 85 c0 test %eax,%eax 108217: 74 07 je 108220 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 108219: 8b 5d fc mov -0x4(%ebp),%ebx 10821c: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 10821d: ff e0 jmp *%eax 10821f: 90 nop <== NOT EXECUTED } 108220: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108223: c9 leave <== NOT EXECUTED 108224: c3 ret <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 108225: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108228: 50 push %eax <== NOT EXECUTED 108229: e8 9e 3a 00 00 call 10bccc <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 10822e: 83 ec 0c sub $0xc,%esp 108231: 6a 1a push $0x1a 108233: e8 94 3a 00 00 call 10bccc =============================================================================== 0010fc80 : */ int rtems_libio_is_file_open( void *node_access ) { 10fc80: 55 push %ebp 10fc81: 89 e5 mov %esp,%ebp 10fc83: 53 push %ebx 10fc84: 83 ec 08 sub $0x8,%esp 10fc87: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fc8a: 6a 00 push $0x0 10fc8c: 6a 00 push $0x0 10fc8e: ff 35 c8 52 12 00 pushl 0x1252c8 10fc94: e8 f7 b9 ff ff call 10b690 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc99: a1 c0 52 12 00 mov 0x1252c0,%eax 10fc9e: 8b 0d 4c 11 12 00 mov 0x12114c,%ecx 10fca4: 83 c4 10 add $0x10,%esp 10fca7: 85 c9 test %ecx,%ecx 10fca9: 74 18 je 10fcc3 <== NEVER TAKEN 10fcab: 31 d2 xor %edx,%edx 10fcad: eb 04 jmp 10fcb3 10fcaf: 90 nop <== NOT EXECUTED 10fcb0: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fcb3: f6 40 15 01 testb $0x1,0x15(%eax) 10fcb7: 74 05 je 10fcbe /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10fcb9: 39 58 18 cmp %ebx,0x18(%eax) 10fcbc: 74 1e je 10fcdc /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fcbe: 42 inc %edx 10fcbf: 39 ca cmp %ecx,%edx 10fcc1: 72 ed jb 10fcb0 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 10fcc3: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fcc5: 83 ec 0c sub $0xc,%esp 10fcc8: ff 35 c8 52 12 00 pushl 0x1252c8 10fcce: e8 b9 ba ff ff call 10b78c } rtems_libio_unlock(); return result; } 10fcd3: 89 d8 mov %ebx,%eax 10fcd5: 8b 5d fc mov -0x4(%ebp),%ebx 10fcd8: c9 leave 10fcd9: c3 ret 10fcda: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; 10fcdc: bb 01 00 00 00 mov $0x1,%ebx 10fce1: eb e2 jmp 10fcc5 =============================================================================== 0010fc1c : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10fc1c: 55 push %ebp 10fc1d: 89 e5 mov %esp,%ebp 10fc1f: 53 push %ebx 10fc20: 83 ec 08 sub $0x8,%esp 10fc23: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fc26: 6a 00 push $0x0 10fc28: 6a 00 push $0x0 10fc2a: ff 35 c8 52 12 00 pushl 0x1252c8 10fc30: e8 5b ba ff ff call 10b690 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc35: a1 c0 52 12 00 mov 0x1252c0,%eax 10fc3a: 8b 0d 4c 11 12 00 mov 0x12114c,%ecx 10fc40: 83 c4 10 add $0x10,%esp 10fc43: 85 c9 test %ecx,%ecx 10fc45: 74 18 je 10fc5f <== NEVER TAKEN 10fc47: 31 d2 xor %edx,%edx 10fc49: eb 04 jmp 10fc4f 10fc4b: 90 nop <== NOT EXECUTED 10fc4c: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fc4f: f6 40 15 01 testb $0x1,0x15(%eax) 10fc53: 74 05 je 10fc5a /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10fc55: 39 58 28 cmp %ebx,0x28(%eax) 10fc58: 74 1e je 10fc78 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc5a: 42 inc %edx 10fc5b: 39 ca cmp %ecx,%edx 10fc5d: 72 ed jb 10fc4c int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 10fc5f: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fc61: 83 ec 0c sub $0xc,%esp 10fc64: ff 35 c8 52 12 00 pushl 0x1252c8 10fc6a: e8 1d bb ff ff call 10b78c } rtems_libio_unlock(); return result; } 10fc6f: 89 d8 mov %ebx,%eax 10fc71: 8b 5d fc mov -0x4(%ebp),%ebx 10fc74: c9 leave 10fc75: c3 ret 10fc76: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { result = 1; 10fc78: bb 01 00 00 00 mov $0x1,%ebx 10fc7d: eb e2 jmp 10fc61 =============================================================================== 00109560 : rtems_status_code rtems_libio_set_private_env(void) { 109560: 55 push %ebp 109561: 89 e5 mov %esp,%ebp 109563: 57 push %edi 109564: 56 push %esi 109565: 53 push %ebx 109566: 83 ec 5c sub $0x5c,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); 109569: e8 0e 2e 00 00 call 10c37c 10956e: 89 45 b4 mov %eax,-0x4c(%ebp) rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); 109571: 83 ec 0c sub $0xc,%esp 109574: 6a 00 push $0x0 109576: 8d 5d d4 lea -0x2c(%ebp),%ebx 109579: 53 push %ebx 10957a: 6a 00 push $0x0 10957c: 6a 01 push $0x1 10957e: 68 67 03 12 00 push $0x120367 109583: e8 50 ee ff ff call 1083d8 if (rv != 0) 109588: 83 c4 20 add $0x20,%esp 10958b: 85 c0 test %eax,%eax 10958d: 74 0d je 10959c <== ALWAYS TAKEN error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; 10958f: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED } 109594: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109597: 5b pop %ebx <== NOT EXECUTED 109598: 5e pop %esi <== NOT EXECUTED 109599: 5f pop %edi <== NOT EXECUTED 10959a: c9 leave <== NOT EXECUTED 10959b: c3 ret <== NOT EXECUTED rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); if (rv != 0) goto error_0; rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0); 10959c: 83 ec 0c sub $0xc,%esp 10959f: 6a 00 push $0x0 1095a1: 8d 45 c0 lea -0x40(%ebp),%eax 1095a4: 89 45 a4 mov %eax,-0x5c(%ebp) 1095a7: 50 push %eax 1095a8: 6a 00 push $0x0 1095aa: 6a 01 push $0x1 1095ac: 68 67 03 12 00 push $0x120367 1095b1: e8 22 ee ff ff call 1083d8 if (rv != 0) 1095b6: 83 c4 20 add $0x20,%esp 1095b9: 85 c0 test %eax,%eax 1095bb: 0f 85 9a 00 00 00 jne 10965b <== NEVER TAKEN * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( rtems_current_user_env == &rtems_global_user_env 1095c1: 8b 15 30 41 12 00 mov 0x124130,%edx /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( 1095c7: 81 fa 20 63 12 00 cmp $0x126320,%edx 1095cd: 74 07 je 1095d6 rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id 1095cf: 8b 45 b4 mov -0x4c(%ebp),%eax 1095d2: 39 02 cmp %eax,(%edx) 1095d4: 74 3a je 109610 ) { new_env = malloc(sizeof(rtems_user_env_t)); 1095d6: 83 ec 0c sub $0xc,%esp 1095d9: 6a 48 push $0x48 1095db: e8 14 f4 ff ff call 1089f4 1095e0: 89 c2 mov %eax,%edx 1095e2: 89 c6 mov %eax,%esi if (new_env == NULL) 1095e4: 83 c4 10 add $0x10,%esp 1095e7: 85 c0 test %eax,%eax 1095e9: 74 61 je 10964c #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( 1095eb: 50 push %eax 1095ec: 68 20 95 10 00 push $0x109520 1095f1: 68 30 41 12 00 push $0x124130 1095f6: 6a 00 push $0x0 1095f8: 89 55 b0 mov %edx,-0x50(%ebp) 1095fb: e8 00 2e 00 00 call 10c400 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) 109600: 83 c4 10 add $0x10,%esp 109603: 85 c0 test %eax,%eax 109605: 8b 55 b0 mov -0x50(%ebp),%edx 109608: 75 36 jne 109640 goto error_3; rtems_current_user_env = new_env; 10960a: 89 15 30 41 12 00 mov %edx,0x124130 } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; 109610: be 20 63 12 00 mov $0x126320,%esi 109615: b9 12 00 00 00 mov $0x12,%ecx 10961a: 89 d7 mov %edx,%edi 10961c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id = task_id; 10961e: 8b 75 b4 mov -0x4c(%ebp),%esi 109621: 89 32 mov %esi,(%edx) * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; 109623: 8d 7a 18 lea 0x18(%edx),%edi 109626: b1 05 mov $0x5,%cl 109628: 89 de mov %ebx,%esi 10962a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = current_loc; 10962c: 8d 7a 04 lea 0x4(%edx),%edi 10962f: b1 05 mov $0x5,%cl 109631: 8b 75 a4 mov -0x5c(%ebp),%esi 109634: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 109636: 31 c0 xor %eax,%eax error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; } 109638: 8d 65 f4 lea -0xc(%ebp),%esp 10963b: 5b pop %ebx 10963c: 5e pop %esi 10963d: 5f pop %edi 10963e: c9 leave 10963f: c3 ret rtems_filesystem_current = current_loc; return RTEMS_SUCCESSFUL; error_3: free(new_env); 109640: 83 ec 0c sub $0xc,%esp 109643: 56 push %esi 109644: e8 7b ee ff ff call 1084c4 109649: 83 c4 10 add $0x10,%esp error_2: rtems_filesystem_freenode(¤t_loc); 10964c: 83 ec 0c sub $0xc,%esp 10964f: 8d 45 c0 lea -0x40(%ebp),%eax 109652: 50 push %eax 109653: e8 58 ee ff ff call 1084b0 109658: 83 c4 10 add $0x10,%esp error_1: rtems_filesystem_freenode(&root_loc); 10965b: 83 ec 0c sub $0xc,%esp 10965e: 53 push %ebx 10965f: e8 4c ee ff ff call 1084b0 109664: 83 c4 10 add $0x10,%esp error_0: return RTEMS_NO_MEMORY; 109667: b8 1a 00 00 00 mov $0x1a,%eax } 10966c: 8d 65 f4 lea -0xc(%ebp),%esp 10966f: 5b pop %ebx 109670: 5e pop %esi 109671: 5f pop %edi 109672: c9 leave 109673: c3 ret =============================================================================== 00109674 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 109674: 55 push %ebp 109675: 89 e5 mov %esp,%ebp 109677: 56 push %esi 109678: 53 push %ebx 109679: 83 ec 20 sub $0x20,%esp 10967c: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); 10967f: e8 f8 2c 00 00 call 10c37c 109684: 89 c6 mov %eax,%esi /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) 109686: 39 c3 cmp %eax,%ebx 109688: 74 32 je 1096bc <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 10968a: 52 push %edx task_id, (void*)&rtems_current_user_env, (void*)&shared_user_env ); 10968b: 8d 45 f4 lea -0xc(%ebp),%eax if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( 10968e: 50 push %eax 10968f: 68 30 41 12 00 push $0x124130 109694: 53 push %ebx 109695: e8 2a 2e 00 00 call 10c4c4 (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) 10969a: 83 c4 10 add $0x10,%esp 10969d: 85 c0 test %eax,%eax 10969f: 75 13 jne 1096b4 * If we have a current environment in place, we need to * free it, since we will be sharing the variable with the * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { 1096a1: 8b 15 30 41 12 00 mov 0x124130,%edx 1096a7: 39 32 cmp %esi,(%edx) 1096a9: 74 1d je 1096c8 rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); } /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1096ab: 8b 55 f4 mov -0xc(%ebp),%edx 1096ae: 89 15 30 41 12 00 mov %edx,0x124130 #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 1096b4: 8d 65 f8 lea -0x8(%ebp),%esp 1096b7: 5b pop %ebx 1096b8: 5e pop %esi 1096b9: c9 leave 1096ba: c3 ret 1096bb: 90 nop <== NOT EXECUTED * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; 1096bc: 31 c0 xor %eax,%eax <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } 1096be: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1096c1: 5b pop %ebx <== NOT EXECUTED 1096c2: 5e pop %esi <== NOT EXECUTED 1096c3: c9 leave <== NOT EXECUTED 1096c4: c3 ret <== NOT EXECUTED 1096c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); 1096c8: 83 ec 0c sub $0xc,%esp 1096cb: 52 push %edx 1096cc: 89 45 e4 mov %eax,-0x1c(%ebp) 1096cf: e8 4c fe ff ff call 109520 1096d4: 83 c4 10 add $0x10,%esp 1096d7: 8b 45 e4 mov -0x1c(%ebp),%eax 1096da: eb cf jmp 1096ab =============================================================================== 0010fadc : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10fadc: 55 push %ebp 10fadd: 89 e5 mov %esp,%ebp 10fadf: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fae2: 89 d0 mov %edx,%eax 10fae4: 83 e0 06 and $0x6,%eax 10fae7: 83 f8 06 cmp $0x6,%eax 10faea: 74 2c je 10fb18 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10faec: f6 c2 02 test $0x2,%dl 10faef: 75 23 jne 10fb14 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10faf1: 31 c0 xor %eax,%eax <== NOT EXECUTED 10faf3: f6 c2 04 test $0x4,%dl <== NOT EXECUTED 10faf6: 0f 95 c0 setne %al <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 10faf9: f6 c2 01 test $0x1,%dl 10fafc: 74 03 je 10fb01 fcntl_flags |= O_NONBLOCK; 10fafe: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10fb01: f6 c6 02 test $0x2,%dh 10fb04: 74 03 je 10fb09 fcntl_flags |= O_APPEND; 10fb06: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10fb09: 80 e6 04 and $0x4,%dh 10fb0c: 74 03 je 10fb11 fcntl_flags |= O_CREAT; 10fb0e: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10fb11: c9 leave 10fb12: c3 ret 10fb13: 90 nop <== NOT EXECUTED uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { fcntl_flags |= O_RDONLY; 10fb14: 31 c0 xor %eax,%eax 10fb16: eb e1 jmp 10faf9 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10fb18: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10fb1d: eb da jmp 10faf9 <== NOT EXECUTED =============================================================================== 0010aef0 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10aef0: 55 push %ebp 10aef1: 89 e5 mov %esp,%ebp 10aef3: 83 ec 1c sub $0x1c,%esp uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10aef6: 8d 45 f4 lea -0xc(%ebp),%eax 10aef9: 50 push %eax 10aefa: ff 75 08 pushl 0x8(%ebp) 10aefd: ff 35 38 86 12 00 pushl 0x128638 10af03: e8 b0 5a 00 00 call 1109b8 <_Protected_heap_Get_block_size> 10af08: 83 c4 10 add $0x10,%esp 10af0b: 84 c0 test %al,%al 10af0d: 74 11 je 10af20 <== NEVER TAKEN MSBUMP(lifetime_freed, size); 10af0f: 8b 45 f4 mov -0xc(%ebp),%eax 10af12: 31 d2 xor %edx,%edx 10af14: 01 05 24 d1 12 00 add %eax,0x12d124 10af1a: 11 15 28 d1 12 00 adc %edx,0x12d128 } } 10af20: c9 leave 10af21: c3 ret =============================================================================== 0010af24 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10af24: 55 push %ebp 10af25: 89 e5 mov %esp,%ebp 10af27: 83 ec 18 sub $0x18,%esp 10af2a: 8b 45 08 mov 0x8(%ebp),%eax uintptr_t actual_size = 0; 10af2d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 10af34: 85 c0 test %eax,%eax 10af36: 74 43 je 10af7b <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 10af38: 52 push %edx 10af39: 8d 55 f4 lea -0xc(%ebp),%edx 10af3c: 52 push %edx 10af3d: 50 push %eax 10af3e: ff 35 38 86 12 00 pushl 0x128638 10af44: e8 6f 5a 00 00 call 1109b8 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 10af49: 8b 45 f4 mov -0xc(%ebp),%eax 10af4c: 31 d2 xor %edx,%edx 10af4e: 03 05 1c d1 12 00 add 0x12d11c,%eax 10af54: 13 15 20 d1 12 00 adc 0x12d120,%edx 10af5a: a3 1c d1 12 00 mov %eax,0x12d11c 10af5f: 89 15 20 d1 12 00 mov %edx,0x12d120 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10af65: 2b 05 24 d1 12 00 sub 0x12d124,%eax if (current_depth > s->max_depth) 10af6b: 83 c4 10 add $0x10,%esp 10af6e: 3b 05 18 d1 12 00 cmp 0x12d118,%eax 10af74: 76 05 jbe 10af7b s->max_depth = current_depth; 10af76: a3 18 d1 12 00 mov %eax,0x12d118 } 10af7b: c9 leave 10af7c: c3 ret =============================================================================== 00113ab8 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 113ab8: 55 push %ebp 113ab9: 89 e5 mov %esp,%ebp 113abb: 53 push %ebx 113abc: 83 ec 14 sub $0x14,%esp 113abf: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 113ac2: 85 db test %ebx,%ebx 113ac4: 74 5b je 113b21 return EINVAL; *pointer = NULL; 113ac6: c7 03 00 00 00 00 movl $0x0,(%ebx) /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 113acc: 83 3d c0 96 12 00 03 cmpl $0x3,0x1296c0 113ad3: 74 43 je 113b18 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 113ad5: e8 56 56 ff ff call 109130 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 113ada: 6a 00 push $0x0 113adc: ff 75 0c pushl 0xc(%ebp) 113adf: ff 75 10 pushl 0x10(%ebp) 113ae2: ff 35 58 51 12 00 pushl 0x125158 113ae8: e8 7f a7 ff ff call 10e26c <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 113aed: 83 c4 10 add $0x10,%esp 113af0: 85 c0 test %eax,%eax 113af2: 74 38 je 113b2c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 113af4: 8b 15 08 77 12 00 mov 0x127708,%edx 113afa: 85 d2 test %edx,%edx 113afc: 74 10 je 113b0e (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 113afe: 83 ec 0c sub $0xc,%esp 113b01: 53 push %ebx 113b02: 89 45 f4 mov %eax,-0xc(%ebp) 113b05: ff 52 04 call *0x4(%edx) 113b08: 83 c4 10 add $0x10,%esp 113b0b: 8b 45 f4 mov -0xc(%ebp),%eax *pointer = return_this; 113b0e: 89 03 mov %eax,(%ebx) return 0; 113b10: 31 c0 xor %eax,%eax } 113b12: 8b 5d fc mov -0x4(%ebp),%ebx 113b15: c9 leave 113b16: c3 ret 113b17: 90 nop <== NOT EXECUTED /* * 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() ) 113b18: e8 d3 55 ff ff call 1090f0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 113b1d: 84 c0 test %al,%al 113b1f: 75 b4 jne 113ad5 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return EINVAL; 113b21: b8 16 00 00 00 mov $0x16,%eax if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(pointer); *pointer = return_this; return 0; } 113b26: 8b 5d fc mov -0x4(%ebp),%ebx 113b29: c9 leave 113b2a: c3 ret 113b2b: 90 nop <== NOT EXECUTED RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 113b2c: b8 0c 00 00 00 mov $0xc,%eax 113b31: eb df jmp 113b12 =============================================================================== 00116398 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116398: 55 push %ebp 116399: 89 e5 mov %esp,%ebp 11639b: 57 push %edi 11639c: 56 push %esi 11639d: 53 push %ebx 11639e: 83 ec 1c sub $0x1c,%esp 1163a1: 8b 7d 08 mov 0x8(%ebp),%edi 1163a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1163a7: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 1163aa: 85 db test %ebx,%ebx 1163ac: 74 62 je 116410 return RTEMS_INVALID_ADDRESS; if ( !count ) 1163ae: 85 f6 test %esi,%esi 1163b0: 74 5e je 116410 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1163b2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1163b3: 8d 45 e4 lea -0x1c(%ebp),%eax 1163b6: 50 push %eax 1163b7: 57 push %edi 1163b8: 68 60 0c 14 00 push $0x140c60 1163bd: e8 86 4d 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1163c2: 83 c4 10 add $0x10,%esp 1163c5: 8b 55 e4 mov -0x1c(%ebp),%edx 1163c8: 85 d2 test %edx,%edx 1163ca: 74 10 je 1163dc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163cc: b8 04 00 00 00 mov $0x4,%eax } 1163d1: 8d 65 f4 lea -0xc(%ebp),%esp 1163d4: 5b pop %ebx 1163d5: 5e pop %esi 1163d6: 5f pop %edi 1163d7: c9 leave 1163d8: c3 ret 1163d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 1163dc: 83 ec 08 sub $0x8,%esp 1163df: 56 push %esi 1163e0: 6a 00 push $0x0 1163e2: 57 push %edi 1163e3: ff 75 10 pushl 0x10(%ebp) 1163e6: 53 push %ebx 1163e7: 83 c0 14 add $0x14,%eax 1163ea: 50 push %eax 1163eb: e8 48 34 00 00 call 119838 <_CORE_message_queue_Broadcast> 1163f0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 1163f2: 83 c4 20 add $0x20,%esp 1163f5: e8 b2 55 00 00 call 11b9ac <_Thread_Enable_dispatch> return 1163fa: 83 ec 0c sub $0xc,%esp 1163fd: 53 push %ebx 1163fe: e8 69 03 00 00 call 11676c <_Message_queue_Translate_core_message_queue_return_code> 116403: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116406: 8d 65 f4 lea -0xc(%ebp),%esp 116409: 5b pop %ebx 11640a: 5e pop %esi 11640b: 5f pop %edi 11640c: c9 leave 11640d: c3 ret 11640e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 116410: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret =============================================================================== 00113824 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113824: 55 push %ebp 113825: 89 e5 mov %esp,%ebp 113827: 57 push %edi 113828: 56 push %esi 113829: 53 push %ebx 11382a: 83 ec 2c sub $0x2c,%esp 11382d: 8b 5d 08 mov 0x8(%ebp),%ebx 113830: 8b 75 0c mov 0xc(%ebp),%esi 113833: 8b 4d 10 mov 0x10(%ebp),%ecx 113836: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113839: 85 db test %ebx,%ebx 11383b: 74 2f je 11386c return RTEMS_INVALID_NAME; if ( !id ) 11383d: 85 ff test %edi,%edi 11383f: 0f 84 a3 00 00 00 je 1138e8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113845: 85 f6 test %esi,%esi 113847: 74 13 je 11385c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113849: 85 c9 test %ecx,%ecx 11384b: 75 2f jne 11387c return RTEMS_INVALID_SIZE; 11384d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113852: 8d 65 f4 lea -0xc(%ebp),%esp 113855: 5b pop %ebx 113856: 5e pop %esi 113857: 5f pop %edi 113858: c9 leave 113859: c3 ret 11385a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11385c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113861: 8d 65 f4 lea -0xc(%ebp),%esp 113864: 5b pop %ebx 113865: 5e pop %esi 113866: 5f pop %edi 113867: c9 leave 113868: c3 ret 113869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11386c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113871: 8d 65 f4 lea -0xc(%ebp),%esp 113874: 5b pop %ebx 113875: 5e pop %esi 113876: 5f pop %edi 113877: c9 leave 113878: c3 ret 113879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11387c: a1 54 f8 12 00 mov 0x12f854,%eax 113881: 40 inc %eax 113882: a3 54 f8 12 00 mov %eax,0x12f854 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113887: 89 4d d4 mov %ecx,-0x2c(%ebp) 11388a: e8 8d 53 00 00 call 118c1c <_Message_queue_Allocate> 11388f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113891: 85 c0 test %eax,%eax 113893: 8b 4d d4 mov -0x2c(%ebp),%ecx 113896: 74 7c je 113914 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113898: 8b 45 14 mov 0x14(%ebp),%eax 11389b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11389e: a8 04 test $0x4,%al 1138a0: 0f 95 c0 setne %al 1138a3: 0f b6 c0 movzbl %al,%eax 1138a6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1138a9: 51 push %ecx 1138aa: 56 push %esi 1138ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1138ae: 50 push %eax 1138af: 8d 42 14 lea 0x14(%edx),%eax 1138b2: 50 push %eax 1138b3: 89 55 d4 mov %edx,-0x2c(%ebp) 1138b6: e8 d5 10 00 00 call 114990 <_CORE_message_queue_Initialize> 1138bb: 83 c4 10 add $0x10,%esp 1138be: 84 c0 test %al,%al 1138c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1138c3: 75 2f jne 1138f4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1138c5: 83 ec 08 sub $0x8,%esp 1138c8: 52 push %edx 1138c9: 68 20 fb 12 00 push $0x12fb20 1138ce: e8 79 1e 00 00 call 11574c <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1138d3: e8 98 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1138d8: 83 c4 10 add $0x10,%esp 1138db: b8 0d 00 00 00 mov $0xd,%eax 1138e0: e9 6d ff ff ff jmp 113852 1138e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 1138e8: b8 09 00 00 00 mov $0x9,%eax 1138ed: e9 60 ff ff ff jmp 113852 1138f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1138f4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1138f7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138fa: 8b 0d 3c fb 12 00 mov 0x12fb3c,%ecx 113900: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113903: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113906: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113908: e8 63 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11390d: 31 c0 xor %eax,%eax 11390f: e9 3e ff ff ff jmp 113852 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113914: e8 57 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113919: b8 05 00 00 00 mov $0x5,%eax 11391e: e9 2f ff ff ff jmp 113852 =============================================================================== 00116520 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116520: 55 push %ebp 116521: 89 e5 mov %esp,%ebp 116523: 53 push %ebx 116524: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116527: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11652a: 50 push %eax 11652b: ff 75 08 pushl 0x8(%ebp) 11652e: 68 60 0c 14 00 push $0x140c60 116533: e8 10 4c 00 00 call 11b148 <_Objects_Get> 116538: 89 c3 mov %eax,%ebx switch ( location ) { 11653a: 83 c4 10 add $0x10,%esp 11653d: 8b 4d f4 mov -0xc(%ebp),%ecx 116540: 85 c9 test %ecx,%ecx 116542: 75 3c jne 116580 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116544: 83 ec 08 sub $0x8,%esp 116547: 50 push %eax 116548: 68 60 0c 14 00 push $0x140c60 11654d: e8 7e 47 00 00 call 11acd0 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116552: 83 c4 0c add $0xc,%esp 116555: 6a 05 push $0x5 116557: 6a 00 push $0x0 116559: 8d 43 14 lea 0x14(%ebx),%eax 11655c: 50 push %eax 11655d: e8 5a 33 00 00 call 1198bc <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 116562: 58 pop %eax 116563: 5a pop %edx 116564: 53 push %ebx 116565: 68 60 0c 14 00 push $0x140c60 11656a: e8 5d 4a 00 00 call 11afcc <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11656f: e8 38 54 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116574: 83 c4 10 add $0x10,%esp 116577: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116579: 8b 5d fc mov -0x4(%ebp),%ebx 11657c: c9 leave 11657d: c3 ret 11657e: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116580: b8 04 00 00 00 mov $0x4,%eax } 116585: 8b 5d fc mov -0x4(%ebp),%ebx 116588: c9 leave 116589: c3 ret =============================================================================== 0011658c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 11658c: 55 push %ebp 11658d: 89 e5 mov %esp,%ebp 11658f: 53 push %ebx 116590: 83 ec 14 sub $0x14,%esp 116593: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116596: 85 db test %ebx,%ebx 116598: 74 46 je 1165e0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11659a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11659b: 8d 45 f4 lea -0xc(%ebp),%eax 11659e: 50 push %eax 11659f: ff 75 08 pushl 0x8(%ebp) 1165a2: 68 60 0c 14 00 push $0x140c60 1165a7: e8 9c 4b 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1165ac: 83 c4 10 add $0x10,%esp 1165af: 8b 55 f4 mov -0xc(%ebp),%edx 1165b2: 85 d2 test %edx,%edx 1165b4: 74 0a je 1165c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165b6: b8 04 00 00 00 mov $0x4,%eax } 1165bb: 8b 5d fc mov -0x4(%ebp),%ebx 1165be: c9 leave 1165bf: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 1165c0: 83 ec 0c sub $0xc,%esp 1165c3: 83 c0 14 add $0x14,%eax 1165c6: 50 push %eax 1165c7: e8 2c 33 00 00 call 1198f8 <_CORE_message_queue_Flush> 1165cc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1165ce: e8 d9 53 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165d3: 83 c4 10 add $0x10,%esp 1165d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165d8: 8b 5d fc mov -0x4(%ebp),%ebx 1165db: c9 leave 1165dc: c3 ret 1165dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 1165e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165e5: 8b 5d fc mov -0x4(%ebp),%ebx 1165e8: c9 leave 1165e9: c3 ret =============================================================================== 001165ec : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1165ec: 55 push %ebp 1165ed: 89 e5 mov %esp,%ebp 1165ef: 53 push %ebx 1165f0: 83 ec 14 sub $0x14,%esp 1165f3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1165f6: 85 db test %ebx,%ebx 1165f8: 74 3a je 116634 1165fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1165fb: 8d 45 f4 lea -0xc(%ebp),%eax 1165fe: 50 push %eax 1165ff: ff 75 08 pushl 0x8(%ebp) 116602: 68 60 0c 14 00 push $0x140c60 116607: e8 3c 4b 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11660c: 83 c4 10 add $0x10,%esp 11660f: 8b 55 f4 mov -0xc(%ebp),%edx 116612: 85 d2 test %edx,%edx 116614: 74 0a je 116620 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116616: b8 04 00 00 00 mov $0x4,%eax } 11661b: 8b 5d fc mov -0x4(%ebp),%ebx 11661e: c9 leave 11661f: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 116620: 8b 40 5c mov 0x5c(%eax),%eax 116623: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116625: e8 82 53 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11662a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662c: 8b 5d fc mov -0x4(%ebp),%ebx 11662f: c9 leave 116630: c3 ret 116631: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116634: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116639: 8b 5d fc mov -0x4(%ebp),%ebx 11663c: c9 leave 11663d: c3 ret =============================================================================== 00113948 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113948: 55 push %ebp 113949: 89 e5 mov %esp,%ebp 11394b: 56 push %esi 11394c: 53 push %ebx 11394d: 83 ec 10 sub $0x10,%esp 113950: 8b 5d 0c mov 0xc(%ebp),%ebx 113953: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113956: 85 db test %ebx,%ebx 113958: 74 6e je 1139c8 return RTEMS_INVALID_ADDRESS; if ( !size ) 11395a: 85 f6 test %esi,%esi 11395c: 74 6a je 1139c8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11395e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11395f: 8d 45 f4 lea -0xc(%ebp),%eax 113962: 50 push %eax 113963: ff 75 08 pushl 0x8(%ebp) 113966: 68 20 fb 12 00 push $0x12fb20 11396b: e8 1c 1f 00 00 call 11588c <_Objects_Get> switch ( location ) { 113970: 83 c4 10 add $0x10,%esp 113973: 8b 55 f4 mov -0xc(%ebp),%edx 113976: 85 d2 test %edx,%edx 113978: 75 42 jne 1139bc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11397a: 83 ec 08 sub $0x8,%esp 11397d: ff 75 18 pushl 0x18(%ebp) */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 113980: 8b 55 14 mov 0x14(%ebp),%edx 113983: 83 e2 01 and $0x1,%edx 113986: 83 f2 01 xor $0x1,%edx 113989: 52 push %edx 11398a: 56 push %esi 11398b: 53 push %ebx 11398c: ff 70 08 pushl 0x8(%eax) 11398f: 83 c0 14 add $0x14,%eax 113992: 50 push %eax 113993: e8 98 10 00 00 call 114a30 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113998: 83 c4 20 add $0x20,%esp 11399b: e8 d0 27 00 00 call 116170 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1139a0: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 1139a3: a1 f8 fa 12 00 mov 0x12faf8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1139a8: ff 70 34 pushl 0x34(%eax) 1139ab: e8 a0 00 00 00 call 113a50 <_Message_queue_Translate_core_message_queue_return_code> 1139b0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139b3: 8d 65 f8 lea -0x8(%ebp),%esp 1139b6: 5b pop %ebx 1139b7: 5e pop %esi 1139b8: c9 leave 1139b9: c3 ret 1139ba: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1139bc: b8 04 00 00 00 mov $0x4,%eax } 1139c1: 8d 65 f8 lea -0x8(%ebp),%esp 1139c4: 5b pop %ebx 1139c5: 5e pop %esi 1139c6: c9 leave 1139c7: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 1139c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139cd: 8d 65 f8 lea -0x8(%ebp),%esp 1139d0: 5b pop %ebx 1139d1: 5e pop %esi 1139d2: c9 leave 1139d3: c3 ret =============================================================================== 0010b388 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b388: 55 push %ebp 10b389: 89 e5 mov %esp,%ebp 10b38b: 56 push %esi 10b38c: 53 push %ebx 10b38d: 83 ec 10 sub $0x10,%esp 10b390: 8b 75 08 mov 0x8(%ebp),%esi 10b393: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b396: 85 db test %ebx,%ebx 10b398: 74 5e je 10b3f8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b39a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b39b: 8d 45 f4 lea -0xc(%ebp),%eax 10b39e: 50 push %eax 10b39f: 56 push %esi 10b3a0: 68 00 57 12 00 push $0x125700 10b3a5: e8 9a 19 00 00 call 10cd44 <_Objects_Get> switch ( location ) { 10b3aa: 83 c4 10 add $0x10,%esp 10b3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b0: 85 d2 test %edx,%edx 10b3b2: 74 0c je 10b3c0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b3b4: b8 04 00 00 00 mov $0x4,%eax } 10b3b9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3bc: 5b pop %ebx 10b3bd: 5e pop %esi 10b3be: c9 leave 10b3bf: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b3c0: 6a 00 push $0x0 10b3c2: 6a 00 push $0x0 10b3c4: 68 ff ff ff 7f push $0x7fffffff 10b3c9: 6a 00 push $0x0 10b3cb: 56 push %esi 10b3cc: ff 75 10 pushl 0x10(%ebp) 10b3cf: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b3d0: 83 c0 14 add $0x14,%eax 10b3d3: 50 push %eax 10b3d4: e8 e7 0b 00 00 call 10bfc0 <_CORE_message_queue_Submit> 10b3d9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b3db: 83 c4 20 add $0x20,%esp 10b3de: e8 c5 21 00 00 call 10d5a8 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 10b3e3: 83 ec 0c sub $0xc,%esp 10b3e6: 53 push %ebx 10b3e7: e8 18 00 00 00 call 10b404 <_Message_queue_Translate_core_message_queue_return_code> 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3ef: 8d 65 f8 lea -0x8(%ebp),%esp 10b3f2: 5b pop %ebx 10b3f3: 5e pop %esi 10b3f4: c9 leave 10b3f5: c3 ret 10b3f6: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3fd: 8d 65 f8 lea -0x8(%ebp),%esp 10b400: 5b pop %ebx 10b401: 5e pop %esi 10b402: c9 leave 10b403: c3 ret =============================================================================== 0011677c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11677c: 55 push %ebp 11677d: 89 e5 mov %esp,%ebp 11677f: 56 push %esi 116780: 53 push %ebx 116781: 83 ec 10 sub $0x10,%esp 116784: 8b 75 08 mov 0x8(%ebp),%esi 116787: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11678a: 85 db test %ebx,%ebx 11678c: 74 5e je 1167ec 11678e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11678f: 8d 45 f4 lea -0xc(%ebp),%eax 116792: 50 push %eax 116793: 56 push %esi 116794: 68 60 0c 14 00 push $0x140c60 116799: e8 aa 49 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11679e: 83 c4 10 add $0x10,%esp 1167a1: 8b 55 f4 mov -0xc(%ebp),%edx 1167a4: 85 d2 test %edx,%edx 1167a6: 74 0c je 1167b4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1167a8: b8 04 00 00 00 mov $0x4,%eax } 1167ad: 8d 65 f8 lea -0x8(%ebp),%esp 1167b0: 5b pop %ebx 1167b1: 5e pop %esi 1167b2: c9 leave 1167b3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1167b4: 6a 00 push $0x0 1167b6: 6a 00 push $0x0 1167b8: 68 00 00 00 80 push $0x80000000 1167bd: 6a 00 push $0x0 1167bf: 56 push %esi 1167c0: ff 75 10 pushl 0x10(%ebp) 1167c3: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1167c4: 83 c0 14 add $0x14,%eax 1167c7: 50 push %eax 1167c8: e8 07 33 00 00 call 119ad4 <_CORE_message_queue_Submit> 1167cd: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1167cf: 83 c4 20 add $0x20,%esp 1167d2: e8 d5 51 00 00 call 11b9ac <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 1167d7: 83 ec 0c sub $0xc,%esp 1167da: 53 push %ebx 1167db: e8 8c ff ff ff call 11676c <_Message_queue_Translate_core_message_queue_return_code> 1167e0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167e3: 8d 65 f8 lea -0x8(%ebp),%esp 1167e6: 5b pop %ebx 1167e7: 5e pop %esi 1167e8: c9 leave 1167e9: c3 ret 1167ea: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1167ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167f1: 8d 65 f8 lea -0x8(%ebp),%esp 1167f4: 5b pop %ebx 1167f5: 5e pop %esi 1167f6: c9 leave 1167f7: c3 ret =============================================================================== 0011215c : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 11215c: 55 push %ebp 11215d: 89 e5 mov %esp,%ebp 11215f: 57 push %edi 112160: 56 push %esi 112161: 53 push %ebx 112162: 83 ec 78 sub $0x78,%esp int success = 0; char *dup_path = strdup(path); 112165: ff 75 08 pushl 0x8(%ebp) 112168: e8 37 24 00 00 call 1145a4 11216d: 89 c7 mov %eax,%edi if (dup_path != NULL) { 11216f: 83 c4 10 add $0x10,%esp 112172: 85 c0 test %eax,%eax 112174: 0f 84 0a 01 00 00 je 112284 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 11217a: 8a 10 mov (%eax),%dl 11217c: 80 fa 2f cmp $0x2f,%dl 11217f: 0f 84 0f 01 00 00 je 112294 112185: 89 c3 mov %eax,%ebx 112187: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) 11218e: b8 01 00 00 00 mov $0x1,%eax ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 112193: 84 d2 test %dl,%dl 112195: 74 11 je 1121a8 <== NEVER TAKEN 112197: 90 nop last = 1; else if (p[0] != '/') 112198: 80 fa 2f cmp $0x2f,%dl 11219b: 0f 84 83 00 00 00 je 112224 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 1121a1: 43 inc %ebx 1121a2: 8a 13 mov (%ebx),%dl if (p[0] == '\0') 1121a4: 84 d2 test %dl,%dl 1121a6: 75 f0 jne 112198 last = 1; else if (p[0] != '/') continue; *p = '\0'; 1121a8: c6 03 00 movb $0x0,(%ebx) 1121ab: be 01 00 00 00 mov $0x1,%esi if (!last && p[1] == '\0') last = 1; if (first) { 1121b0: 85 c0 test %eax,%eax 1121b2: 75 54 jne 112208 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 1121b4: 85 f6 test %esi,%esi 1121b6: 75 3c jne 1121f4 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 1121b8: b8 ff 01 00 00 mov $0x1ff,%eax 1121bd: 83 ec 08 sub $0x8,%esp 1121c0: 50 push %eax 1121c1: 57 push %edi 1121c2: e8 89 74 ff ff call 109650 1121c7: 83 c4 10 add $0x10,%esp 1121ca: 85 c0 test %eax,%eax 1121cc: 78 6a js 112238 } else { retval = 0; break; } } if (!last) 1121ce: 85 f6 test %esi,%esi 1121d0: 75 0a jne 1121dc *p = '/'; 1121d2: c6 03 2f movb $0x2f,(%ebx) 1121d5: 31 c0 xor %eax,%eax 1121d7: eb c8 jmp 1121a1 1121d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 1121dc: 83 ec 0c sub $0xc,%esp 1121df: 57 push %edi 1121e0: e8 93 6e ff ff call 109078 1121e5: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 1121e8: 31 c0 xor %eax,%eax } 1121ea: 8d 65 f4 lea -0xc(%ebp),%esp 1121ed: 5b pop %ebx 1121ee: 5e pop %esi 1121ef: 5f pop %edi 1121f0: c9 leave 1121f1: c3 ret 1121f2: 66 90 xchg %ax,%ax <== NOT EXECUTED numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 1121f4: 83 ec 0c sub $0xc,%esp 1121f7: ff 75 94 pushl -0x6c(%ebp) 1121fa: e8 81 01 00 00 call 112380 1121ff: 83 c4 10 add $0x10,%esp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 112202: 8b 45 0c mov 0xc(%ebp),%eax 112205: eb b6 jmp 1121bd 112207: 90 nop <== NOT EXECUTED * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 112208: 83 ec 0c sub $0xc,%esp 11220b: 6a 00 push $0x0 11220d: e8 6e 01 00 00 call 112380 112212: 89 45 94 mov %eax,-0x6c(%ebp) numask = oumask & ~(S_IWUSR | S_IXUSR); 112215: 24 3f and $0x3f,%al (void)umask(numask); 112217: 89 04 24 mov %eax,(%esp) 11221a: e8 61 01 00 00 call 112380 11221f: 83 c4 10 add $0x10,%esp 112222: eb 90 jmp 1121b4 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 112224: c6 03 00 movb $0x0,(%ebx) if (!last && p[1] == '\0') 112227: 31 d2 xor %edx,%edx 112229: 80 7b 01 00 cmpb $0x0,0x1(%ebx) 11222d: 0f 94 c2 sete %dl 112230: 89 d6 mov %edx,%esi 112232: e9 79 ff ff ff jmp 1121b0 112237: 90 nop <== NOT EXECUTED first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { 112238: e8 e7 16 00 00 call 113924 <__errno> 11223d: 83 38 11 cmpl $0x11,(%eax) 112240: 74 0a je 11224c 112242: e8 dd 16 00 00 call 113924 <__errno> 112247: 83 38 15 cmpl $0x15,(%eax) 11224a: 75 53 jne 11229f <== ALWAYS TAKEN if (stat(path, &sb) < 0) { 11224c: 83 ec 08 sub $0x8,%esp 11224f: 8d 45 a0 lea -0x60(%ebp),%eax 112252: 50 push %eax 112253: 57 push %edi 112254: e8 7f 00 00 00 call 1122d8 112259: 83 c4 10 add $0x10,%esp 11225c: 85 c0 test %eax,%eax 11225e: 78 3f js 11229f <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 112260: 8b 45 ac mov -0x54(%ebp),%eax 112263: 25 00 f0 00 00 and $0xf000,%eax 112268: 3d 00 40 00 00 cmp $0x4000,%eax 11226d: 0f 84 5b ff ff ff je 1121ce if (last) 112273: 85 f6 test %esi,%esi 112275: 74 53 je 1122ca errno = EEXIST; 112277: e8 a8 16 00 00 call 113924 <__errno> 11227c: c7 00 11 00 00 00 movl $0x11,(%eax) 112282: eb 2d jmp 1122b1 if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 112284: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 112289: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11228c: 5b pop %ebx <== NOT EXECUTED 11228d: 5e pop %esi <== NOT EXECUTED 11228e: 5f pop %edi <== NOT EXECUTED 11228f: c9 leave <== NOT EXECUTED 112290: c3 ret <== NOT EXECUTED 112291: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 112294: 8d 58 01 lea 0x1(%eax),%ebx 112297: 8a 50 01 mov 0x1(%eax),%dl 11229a: e9 e8 fe ff ff jmp 112187 } } if (!last) *p = '/'; } if (!first && !last) 11229f: 85 f6 test %esi,%esi 1122a1: 75 0e jne 1122b1 <== ALWAYS TAKEN (void)umask(oumask); 1122a3: 83 ec 0c sub $0xc,%esp 1122a6: ff 75 94 pushl -0x6c(%ebp) 1122a9: e8 d2 00 00 00 call 112380 1122ae: 83 c4 10 add $0x10,%esp int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 1122b1: 83 ec 0c sub $0xc,%esp 1122b4: 57 push %edi 1122b5: e8 be 6d ff ff call 109078 1122ba: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 1122bd: b8 ff ff ff ff mov $0xffffffff,%eax } 1122c2: 8d 65 f4 lea -0xc(%ebp),%esp 1122c5: 5b pop %ebx 1122c6: 5e pop %esi 1122c7: 5f pop %edi 1122c8: c9 leave 1122c9: c3 ret break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 1122ca: e8 55 16 00 00 call 113924 <__errno> 1122cf: c7 00 14 00 00 00 movl $0x14,(%eax) 1122d5: eb cc jmp 1122a3 =============================================================================== 0010ce80 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10ce80: 55 push %ebp 10ce81: 89 e5 mov %esp,%ebp 10ce83: 83 ec 08 sub $0x8,%esp 10ce86: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10ce89: 83 f8 01 cmp $0x1,%eax 10ce8c: 74 2a je 10ceb8 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ce8e: 83 f8 02 cmp $0x2,%eax 10ce91: 74 09 je 10ce9c #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10ce93: b8 bb 2f 12 00 mov $0x122fbb,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10ce98: c9 leave 10ce99: c3 ret 10ce9a: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 10ce9c: b8 80 71 12 00 mov $0x127180,%eax else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10cea1: 83 ec 08 sub $0x8,%esp 10cea4: ff 75 0c pushl 0xc(%ebp) 10cea7: 50 push %eax 10cea8: e8 7f 49 00 00 call 11182c if ( class_assoc ) 10cead: 83 c4 10 add $0x10,%esp 10ceb0: 85 c0 test %eax,%eax 10ceb2: 74 0c je 10cec0 return class_assoc->name; 10ceb4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ceb6: c9 leave 10ceb7: c3 ret { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 10ceb8: b8 60 71 12 00 mov $0x127160,%eax 10cebd: eb e2 jmp 10cea1 10cebf: 90 nop <== NOT EXECUTED else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 10cec0: b8 c3 2f 12 00 mov $0x122fc3,%eax } 10cec5: c9 leave 10cec6: c3 ret =============================================================================== 0010cec8 : }; const char *rtems_object_get_api_name( int api ) { 10cec8: 55 push %ebp 10cec9: 89 e5 mov %esp,%ebp 10cecb: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10cece: ff 75 08 pushl 0x8(%ebp) 10ced1: 68 00 72 12 00 push $0x127200 10ced6: e8 51 49 00 00 call 11182c if ( api_assoc ) 10cedb: 83 c4 10 add $0x10,%esp 10cede: 85 c0 test %eax,%eax 10cee0: 74 06 je 10cee8 return api_assoc->name; 10cee2: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cee4: c9 leave 10cee5: c3 ret 10cee6: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) return api_assoc->name; return "BAD CLASS"; 10cee8: b8 c3 2f 12 00 mov $0x122fc3,%eax } 10ceed: c9 leave 10ceee: c3 ret =============================================================================== 0010cf30 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf30: 55 push %ebp 10cf31: 89 e5 mov %esp,%ebp 10cf33: 57 push %edi 10cf34: 56 push %esi 10cf35: 53 push %ebx 10cf36: 83 ec 0c sub $0xc,%esp 10cf39: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf3c: 85 db test %ebx,%ebx 10cf3e: 74 60 je 10cfa0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf40: 83 ec 08 sub $0x8,%esp 10cf43: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf47: 50 push %eax 10cf48: ff 75 08 pushl 0x8(%ebp) 10cf4b: e8 78 1a 00 00 call 10e9c8 <_Objects_Get_information> if ( !obj_info ) 10cf50: 83 c4 10 add $0x10,%esp 10cf53: 85 c0 test %eax,%eax 10cf55: 74 59 je 10cfb0 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf57: 8b 50 08 mov 0x8(%eax),%edx 10cf5a: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf5c: 8b 50 0c mov 0xc(%eax),%edx 10cf5f: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf62: 8a 50 12 mov 0x12(%eax),%dl 10cf65: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf68: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf6c: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf6f: 85 f6 test %esi,%esi 10cf71: 74 44 je 10cfb7 <== NEVER TAKEN 10cf73: 8b 78 1c mov 0x1c(%eax),%edi 10cf76: b9 01 00 00 00 mov $0x1,%ecx 10cf7b: b8 01 00 00 00 mov $0x1,%eax 10cf80: 31 d2 xor %edx,%edx 10cf82: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10cf84: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf88: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf8b: 40 inc %eax 10cf8c: 89 c1 mov %eax,%ecx 10cf8e: 39 c6 cmp %eax,%esi 10cf90: 73 f2 jae 10cf84 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf92: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cf95: 31 c0 xor %eax,%eax } 10cf97: 8d 65 f4 lea -0xc(%ebp),%esp 10cf9a: 5b pop %ebx 10cf9b: 5e pop %esi 10cf9c: 5f pop %edi 10cf9d: c9 leave 10cf9e: c3 ret 10cf9f: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfa0: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfa5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa8: 5b pop %ebx 10cfa9: 5e pop %esi 10cfaa: 5f pop %edi 10cfab: c9 leave 10cfac: c3 ret 10cfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10cfb0: b8 0a 00 00 00 mov $0xa,%eax 10cfb5: eb e0 jmp 10cf97 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cfb7: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfb9: eb d7 jmp 10cf92 <== NOT EXECUTED =============================================================================== 0010c4fc : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 14 sub $0x14,%esp 10c503: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c506: 85 db test %ebx,%ebx 10c508: 74 26 je 10c530 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c50a: 83 ec 08 sub $0x8,%esp 10c50d: 8d 45 f4 lea -0xc(%ebp),%eax 10c510: 50 push %eax 10c511: ff 75 08 pushl 0x8(%ebp) 10c514: e8 d3 1a 00 00 call 10dfec <_Objects_Id_to_name> *name = name_u.name_u32; 10c519: 8b 55 f4 mov -0xc(%ebp),%edx 10c51c: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c51e: 8b 04 85 cc 1a 12 00 mov 0x121acc(,%eax,4),%eax 10c525: 83 c4 10 add $0x10,%esp } 10c528: 8b 5d fc mov -0x4(%ebp),%ebx 10c52b: c9 leave 10c52c: c3 ret 10c52d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c530: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10c535: 8b 5d fc mov -0x4(%ebp),%ebx 10c538: c9 leave 10c539: c3 ret =============================================================================== 0010d014 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d014: 55 push %ebp 10d015: 89 e5 mov %esp,%ebp 10d017: 57 push %edi 10d018: 56 push %esi 10d019: 53 push %ebx 10d01a: 83 ec 1c sub $0x1c,%esp 10d01d: 8b 75 08 mov 0x8(%ebp),%esi 10d020: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d023: 85 ff test %edi,%edi 10d025: 74 61 je 10d088 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d027: 85 f6 test %esi,%esi 10d029: 74 35 je 10d060 information = _Objects_Get_information_id( tmpId ); 10d02b: 83 ec 0c sub $0xc,%esp 10d02e: 56 push %esi 10d02f: e8 74 19 00 00 call 10e9a8 <_Objects_Get_information_id> 10d034: 89 c3 mov %eax,%ebx if ( !information ) 10d036: 83 c4 10 add $0x10,%esp 10d039: 85 c0 test %eax,%eax 10d03b: 74 16 je 10d053 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d03d: 50 push %eax 10d03e: 8d 45 e4 lea -0x1c(%ebp),%eax 10d041: 50 push %eax 10d042: 56 push %esi 10d043: 53 push %ebx 10d044: e8 fb 1a 00 00 call 10eb44 <_Objects_Get> switch ( location ) { 10d049: 83 c4 10 add $0x10,%esp 10d04c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d04f: 85 c9 test %ecx,%ecx 10d051: 74 19 je 10d06c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d053: b8 04 00 00 00 mov $0x4,%eax } 10d058: 8d 65 f4 lea -0xc(%ebp),%esp 10d05b: 5b pop %ebx 10d05c: 5e pop %esi 10d05d: 5f pop %edi 10d05e: c9 leave 10d05f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d060: a1 18 98 12 00 mov 0x129818,%eax 10d065: 8b 70 08 mov 0x8(%eax),%esi 10d068: eb c1 jmp 10d02b 10d06a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d06c: 52 push %edx 10d06d: 57 push %edi 10d06e: 50 push %eax 10d06f: 53 push %ebx 10d070: e8 07 1d 00 00 call 10ed7c <_Objects_Set_name> _Thread_Enable_dispatch(); 10d075: e8 16 24 00 00 call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d07a: 83 c4 10 add $0x10,%esp 10d07d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d07f: 8d 65 f4 lea -0xc(%ebp),%esp 10d082: 5b pop %ebx 10d083: 5e pop %esi 10d084: 5f pop %edi 10d085: c9 leave 10d086: c3 ret 10d087: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d088: b8 09 00 00 00 mov $0x9,%eax 10d08d: eb c9 jmp 10d058 =============================================================================== 001167f8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1167f8: 55 push %ebp 1167f9: 89 e5 mov %esp,%ebp 1167fb: 57 push %edi 1167fc: 56 push %esi 1167fd: 53 push %ebx 1167fe: 83 ec 1c sub $0x1c,%esp 116801: 8b 5d 08 mov 0x8(%ebp),%ebx 116804: 8b 75 0c mov 0xc(%ebp),%esi 116807: 8b 55 10 mov 0x10(%ebp),%edx 11680a: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 11680d: 85 db test %ebx,%ebx 11680f: 74 47 je 116858 return RTEMS_INVALID_NAME; if ( !starting_address ) 116811: 85 f6 test %esi,%esi 116813: 74 23 je 116838 return RTEMS_INVALID_ADDRESS; if ( !id ) 116815: 8b 45 1c mov 0x1c(%ebp),%eax 116818: 85 c0 test %eax,%eax 11681a: 74 1c je 116838 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 11681c: 85 d2 test %edx,%edx 11681e: 74 28 je 116848 116820: 85 ff test %edi,%edi 116822: 74 24 je 116848 116824: 39 fa cmp %edi,%edx 116826: 72 20 jb 116848 116828: f7 c7 03 00 00 00 test $0x3,%edi 11682e: 75 18 jne 116848 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116830: f7 c6 03 00 00 00 test $0x3,%esi 116836: 74 30 je 116868 return RTEMS_INVALID_ADDRESS; 116838: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11683d: 8d 65 f4 lea -0xc(%ebp),%esp 116840: 5b pop %ebx 116841: 5e pop %esi 116842: 5f pop %edi 116843: c9 leave 116844: c3 ret 116845: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 116848: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11684d: 8d 65 f4 lea -0xc(%ebp),%esp 116850: 5b pop %ebx 116851: 5e pop %esi 116852: 5f pop %edi 116853: c9 leave 116854: c3 ret 116855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116858: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11685d: 8d 65 f4 lea -0xc(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: 5f pop %edi 116863: c9 leave 116864: c3 ret 116865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116868: a1 94 09 14 00 mov 0x140994,%eax 11686d: 40 inc %eax 11686e: a3 94 09 14 00 mov %eax,0x140994 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 116873: 83 ec 0c sub $0xc,%esp 116876: 68 20 08 14 00 push $0x140820 11687b: 89 55 e0 mov %edx,-0x20(%ebp) 11687e: e8 d1 43 00 00 call 11ac54 <_Objects_Allocate> 116883: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 116886: 83 c4 10 add $0x10,%esp 116889: 85 c0 test %eax,%eax 11688b: 8b 55 e0 mov -0x20(%ebp),%edx 11688e: 74 58 je 1168e8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116890: 8b 45 e4 mov -0x1c(%ebp),%eax 116893: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116896: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116899: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11689c: 8b 4d 18 mov 0x18(%ebp),%ecx 11689f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1168a2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1168a9: 57 push %edi 1168aa: 89 d0 mov %edx,%eax 1168ac: 31 d2 xor %edx,%edx 1168ae: f7 f7 div %edi 1168b0: 50 push %eax 1168b1: 56 push %esi 1168b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1168b5: 83 c0 24 add $0x24,%eax 1168b8: 50 push %eax 1168b9: e8 2a 2f 00 00 call 1197e8 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1168be: 8b 7d e4 mov -0x1c(%ebp),%edi 1168c1: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1168c4: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1168c7: 8b 15 3c 08 14 00 mov 0x14083c,%edx 1168cd: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1168d0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1168d3: 8b 55 1c mov 0x1c(%ebp),%edx 1168d6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1168d8: e8 cf 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1168dd: 83 c4 10 add $0x10,%esp 1168e0: 31 c0 xor %eax,%eax 1168e2: e9 66 ff ff ff jmp 11684d 1168e7: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1168e8: e8 bf 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1168ed: b8 05 00 00 00 mov $0x5,%eax 1168f2: e9 56 ff ff ff jmp 11684d =============================================================================== 001168f8 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1168f8: 55 push %ebp 1168f9: 89 e5 mov %esp,%ebp 1168fb: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 1168fe: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116901: 50 push %eax 116902: ff 75 08 pushl 0x8(%ebp) 116905: 68 20 08 14 00 push $0x140820 11690a: e8 39 48 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11690f: 83 c4 10 add $0x10,%esp 116912: 8b 55 f4 mov -0xc(%ebp),%edx 116915: 85 d2 test %edx,%edx 116917: 74 07 je 116920 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116919: b8 04 00 00 00 mov $0x4,%eax } 11691e: c9 leave 11691f: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116920: 8b 48 20 mov 0x20(%eax),%ecx 116923: 85 c9 test %ecx,%ecx 116925: 74 0d je 116934 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116927: e8 80 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 11692c: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116931: c9 leave 116932: c3 ret 116933: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 116934: 83 ec 08 sub $0x8,%esp 116937: 50 push %eax 116938: 68 20 08 14 00 push $0x140820 11693d: 89 45 e4 mov %eax,-0x1c(%ebp) 116940: e8 8b 43 00 00 call 11acd0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116945: 58 pop %eax 116946: 5a pop %edx 116947: 8b 45 e4 mov -0x1c(%ebp),%eax 11694a: 50 push %eax 11694b: 68 20 08 14 00 push $0x140820 116950: e8 77 46 00 00 call 11afcc <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116955: e8 52 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11695a: 83 c4 10 add $0x10,%esp 11695d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11695f: c9 leave 116960: c3 ret =============================================================================== 00116964 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116964: 55 push %ebp 116965: 89 e5 mov %esp,%ebp 116967: 56 push %esi 116968: 53 push %ebx 116969: 83 ec 20 sub $0x20,%esp 11696c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11696f: 85 db test %ebx,%ebx 116971: 74 59 je 1169cc Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116973: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116974: 8d 45 f4 lea -0xc(%ebp),%eax 116977: 50 push %eax 116978: ff 75 08 pushl 0x8(%ebp) 11697b: 68 20 08 14 00 push $0x140820 116980: e8 c3 47 00 00 call 11b148 <_Objects_Get> 116985: 89 c6 mov %eax,%esi switch ( location ) { 116987: 83 c4 10 add $0x10,%esp 11698a: 8b 45 f4 mov -0xc(%ebp),%eax 11698d: 85 c0 test %eax,%eax 11698f: 75 2f jne 1169c0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116991: 83 ec 0c sub $0xc,%esp 116994: 8d 46 24 lea 0x24(%esi),%eax 116997: 50 push %eax 116998: e8 27 2e 00 00 call 1197c4 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11699d: 83 c4 10 add $0x10,%esp 1169a0: 85 c0 test %eax,%eax 1169a2: 74 34 je 1169d8 the_partition->number_of_used_blocks += 1; 1169a4: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 1169a7: 89 45 e4 mov %eax,-0x1c(%ebp) 1169aa: e8 fd 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> *buffer = the_buffer; 1169af: 8b 45 e4 mov -0x1c(%ebp),%eax 1169b2: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1169b4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169b6: 8d 65 f8 lea -0x8(%ebp),%esp 1169b9: 5b pop %ebx 1169ba: 5e pop %esi 1169bb: c9 leave 1169bc: c3 ret 1169bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169c0: b8 04 00 00 00 mov $0x4,%eax } 1169c5: 8d 65 f8 lea -0x8(%ebp),%esp 1169c8: 5b pop %ebx 1169c9: 5e pop %esi 1169ca: c9 leave 1169cb: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1169cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169d1: 8d 65 f8 lea -0x8(%ebp),%esp 1169d4: 5b pop %ebx 1169d5: 5e pop %esi 1169d6: c9 leave 1169d7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1169d8: e8 cf 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1169dd: b8 0d 00 00 00 mov $0xd,%eax 1169e2: eb e1 jmp 1169c5 =============================================================================== 00116a08 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a08: 55 push %ebp 116a09: 89 e5 mov %esp,%ebp 116a0b: 56 push %esi 116a0c: 53 push %ebx 116a0d: 83 ec 14 sub $0x14,%esp 116a10: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a13: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a16: 50 push %eax 116a17: ff 75 08 pushl 0x8(%ebp) 116a1a: 68 20 08 14 00 push $0x140820 116a1f: e8 24 47 00 00 call 11b148 <_Objects_Get> 116a24: 89 c3 mov %eax,%ebx switch ( location ) { 116a26: 83 c4 10 add $0x10,%esp 116a29: 8b 45 f4 mov -0xc(%ebp),%eax 116a2c: 85 c0 test %eax,%eax 116a2e: 74 0c je 116a3c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a30: b8 04 00 00 00 mov $0x4,%eax } 116a35: 8d 65 f8 lea -0x8(%ebp),%esp 116a38: 5b pop %ebx 116a39: 5e pop %esi 116a3a: c9 leave 116a3b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116a3c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116a3f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a42: 39 c6 cmp %eax,%esi 116a44: 72 3a jb 116a80 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116a46: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a49: 39 d6 cmp %edx,%esi 116a4b: 77 33 ja 116a80 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116a4d: 89 f2 mov %esi,%edx 116a4f: 29 c2 sub %eax,%edx 116a51: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116a53: 31 d2 xor %edx,%edx 116a55: f7 73 18 divl 0x18(%ebx) starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 116a58: 85 d2 test %edx,%edx 116a5a: 75 24 jne 116a80 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116a5c: 83 ec 08 sub $0x8,%esp 116a5f: 56 push %esi 116a60: 8d 43 24 lea 0x24(%ebx),%eax 116a63: 50 push %eax 116a64: e8 1f 2d 00 00 call 119788 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 116a69: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116a6c: e8 3b 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a71: 83 c4 10 add $0x10,%esp 116a74: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a76: 8d 65 f8 lea -0x8(%ebp),%esp 116a79: 5b pop %ebx 116a7a: 5e pop %esi 116a7b: c9 leave 116a7c: c3 ret 116a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a80: e8 27 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116a85: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8a: 8d 65 f8 lea -0x8(%ebp),%esp 116a8d: 5b pop %ebx 116a8e: 5e pop %esi 116a8f: c9 leave 116a90: c3 ret =============================================================================== 00115e2c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e2c: 55 push %ebp 115e2d: 89 e5 mov %esp,%ebp 115e2f: 57 push %edi 115e30: 56 push %esi 115e31: 53 push %ebx 115e32: 83 ec 1c sub $0x1c,%esp 115e35: 8b 5d 08 mov 0x8(%ebp),%ebx 115e38: 8b 55 0c mov 0xc(%ebp),%edx 115e3b: 8b 7d 10 mov 0x10(%ebp),%edi 115e3e: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115e41: 85 db test %ebx,%ebx 115e43: 74 1b je 115e60 return RTEMS_INVALID_NAME; if ( !id ) 115e45: 85 f6 test %esi,%esi 115e47: 74 08 je 115e51 * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115e49: 89 f8 mov %edi,%eax 115e4b: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115e4d: a8 03 test $0x3,%al 115e4f: 74 1f je 115e70 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115e51: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e56: 8d 65 f4 lea -0xc(%ebp),%esp 115e59: 5b pop %ebx 115e5a: 5e pop %esi 115e5b: 5f pop %edi 115e5c: c9 leave 115e5d: c3 ret 115e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115e60: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e65: 8d 65 f4 lea -0xc(%ebp),%esp 115e68: 5b pop %ebx 115e69: 5e pop %esi 115e6a: 5f pop %edi 115e6b: c9 leave 115e6c: c3 ret 115e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115e70: a1 94 09 14 00 mov 0x140994,%eax 115e75: 40 inc %eax 115e76: a3 94 09 14 00 mov %eax,0x140994 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115e7b: 83 ec 0c sub $0xc,%esp 115e7e: 68 e0 07 14 00 push $0x1407e0 115e83: 89 55 e4 mov %edx,-0x1c(%ebp) 115e86: e8 c9 4d 00 00 call 11ac54 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115e8b: 83 c4 10 add $0x10,%esp 115e8e: 85 c0 test %eax,%eax 115e90: 8b 55 e4 mov -0x1c(%ebp),%edx 115e93: 74 33 je 115ec8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115e95: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115e98: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115e9b: 8b 55 14 mov 0x14(%ebp),%edx 115e9e: 4a dec %edx 115e9f: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115ea2: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115ea5: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ea8: 8b 0d fc 07 14 00 mov 0x1407fc,%ecx 115eae: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115eb1: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115eb4: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115eb6: e8 f1 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115ebb: 31 c0 xor %eax,%eax } 115ebd: 8d 65 f4 lea -0xc(%ebp),%esp 115ec0: 5b pop %ebx 115ec1: 5e pop %esi 115ec2: 5f pop %edi 115ec3: c9 leave 115ec4: c3 ret 115ec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115ec8: e8 df 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ecd: b8 05 00 00 00 mov $0x5,%eax 115ed2: eb 82 jmp 115e56 =============================================================================== 00115ed4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115ed4: 55 push %ebp 115ed5: 89 e5 mov %esp,%ebp 115ed7: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115eda: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115edd: 50 push %eax 115ede: ff 75 08 pushl 0x8(%ebp) 115ee1: 68 e0 07 14 00 push $0x1407e0 115ee6: e8 5d 52 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115eeb: 83 c4 10 add $0x10,%esp 115eee: 8b 4d f4 mov -0xc(%ebp),%ecx 115ef1: 85 c9 test %ecx,%ecx 115ef3: 75 2f jne 115f24 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ef5: 83 ec 08 sub $0x8,%esp 115ef8: 50 push %eax 115ef9: 68 e0 07 14 00 push $0x1407e0 115efe: 89 45 e4 mov %eax,-0x1c(%ebp) 115f01: e8 ca 4d 00 00 call 11acd0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 115f06: 58 pop %eax 115f07: 5a pop %edx 115f08: 8b 45 e4 mov -0x1c(%ebp),%eax 115f0b: 50 push %eax 115f0c: 68 e0 07 14 00 push $0x1407e0 115f11: e8 b6 50 00 00 call 11afcc <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f16: e8 91 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f1b: 83 c4 10 add $0x10,%esp 115f1e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f20: c9 leave 115f21: c3 ret 115f22: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f24: b8 04 00 00 00 mov $0x4,%eax } 115f29: c9 leave 115f2a: c3 ret =============================================================================== 00115f2c : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f2c: 55 push %ebp 115f2d: 89 e5 mov %esp,%ebp 115f2f: 56 push %esi 115f30: 53 push %ebx 115f31: 83 ec 10 sub $0x10,%esp 115f34: 8b 75 0c mov 0xc(%ebp),%esi 115f37: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115f3a: 85 db test %ebx,%ebx 115f3c: 74 4e je 115f8c Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115f3e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115f3f: 8d 45 f4 lea -0xc(%ebp),%eax 115f42: 50 push %eax 115f43: ff 75 08 pushl 0x8(%ebp) 115f46: 68 e0 07 14 00 push $0x1407e0 115f4b: e8 f8 51 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115f50: 83 c4 10 add $0x10,%esp 115f53: 8b 55 f4 mov -0xc(%ebp),%edx 115f56: 85 d2 test %edx,%edx 115f58: 74 0e je 115f68 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f5a: b8 04 00 00 00 mov $0x4,%eax } 115f5f: 8d 65 f8 lea -0x8(%ebp),%esp 115f62: 5b pop %ebx 115f63: 5e pop %esi 115f64: c9 leave 115f65: c3 ret 115f66: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115f68: 89 f2 mov %esi,%edx 115f6a: 2b 50 14 sub 0x14(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 115f6d: 3b 50 18 cmp 0x18(%eax),%edx 115f70: 77 16 ja 115f88 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115f72: 03 50 10 add 0x10(%eax),%edx 115f75: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115f77: e8 30 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f8 lea -0x8(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: c9 leave 115f84: c3 ret 115f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 115f88: 89 33 mov %esi,(%ebx) 115f8a: eb eb jmp 115f77 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115f8c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f91: 8d 65 f8 lea -0x8(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: c9 leave 115f97: c3 ret =============================================================================== 00115fbc : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115fbc: 55 push %ebp 115fbd: 89 e5 mov %esp,%ebp 115fbf: 56 push %esi 115fc0: 53 push %ebx 115fc1: 83 ec 10 sub $0x10,%esp 115fc4: 8b 75 0c mov 0xc(%ebp),%esi 115fc7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115fca: 85 db test %ebx,%ebx 115fcc: 74 4e je 11601c <== NEVER TAKEN 115fce: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115fcf: 8d 45 f4 lea -0xc(%ebp),%eax 115fd2: 50 push %eax 115fd3: ff 75 08 pushl 0x8(%ebp) 115fd6: 68 e0 07 14 00 push $0x1407e0 115fdb: e8 68 51 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115fe0: 83 c4 10 add $0x10,%esp 115fe3: 8b 55 f4 mov -0xc(%ebp),%edx 115fe6: 85 d2 test %edx,%edx 115fe8: 74 0e je 115ff8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115fea: b8 04 00 00 00 mov $0x4,%eax } 115fef: 8d 65 f8 lea -0x8(%ebp),%esp 115ff2: 5b pop %ebx 115ff3: 5e pop %esi 115ff4: c9 leave 115ff5: c3 ret 115ff6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115ff8: 89 f2 mov %esi,%edx 115ffa: 2b 50 10 sub 0x10(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 115ffd: 3b 50 18 cmp 0x18(%eax),%edx 116000: 77 16 ja 116018 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116002: 03 50 14 add 0x14(%eax),%edx 116005: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116007: e8 a0 59 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11600c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11600e: 8d 65 f8 lea -0x8(%ebp),%esp 116011: 5b pop %ebx 116012: 5e pop %esi 116013: c9 leave 116014: c3 ret 116015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 116018: 89 33 mov %esi,(%ebx) 11601a: eb eb jmp 116007 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 11601c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116021: 8d 65 f8 lea -0x8(%ebp),%esp 116024: 5b pop %ebx 116025: 5e pop %esi 116026: c9 leave 116027: c3 ret =============================================================================== 00107800 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 107800: 55 push %ebp 107801: 89 e5 mov %esp,%ebp 107803: 57 push %edi 107804: 56 push %esi 107805: 53 push %ebx 107806: 81 ec 9c 00 00 00 sub $0x9c,%esp 10780c: 8b 75 0c mov 0xc(%ebp),%esi int i, mod, max; if ( !length ) return; 10780f: 85 f6 test %esi,%esi 107811: 0f 84 00 01 00 00 je 107917 mod = length % 16; 107817: 89 f0 mov %esi,%eax 107819: 25 0f 00 00 80 and $0x8000000f,%eax 10781e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) 107824: 0f 88 21 02 00 00 js 107a4b 10782a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 107830: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) max = length - mod; 107836: 29 c6 sub %eax,%esi 107838: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp) for ( i=0 ; i 107846: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp) 10784d: 00 00 00 107850: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107856: 66 90 xchg %ax,%ax static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( 107858: 8b 75 08 mov 0x8(%ebp),%esi 10785b: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi { int i; char line_buffer[120]; line_buffer[0] = '\0'; 107861: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp) for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107886: 31 c0 xor %eax,%eax 107888: b9 ff ff ff ff mov $0xffffffff,%ecx 10788d: 89 df mov %ebx,%edi 10788f: f2 ae repnz scas %es:(%edi),%al 107891: f7 d1 not %ecx 107893: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 1078b3: b8 2e 00 00 00 mov $0x2e,%eax 1078b8: 50 push %eax 1078b9: 53 push %ebx 1078ba: 68 fb fa 11 00 push $0x11fafb 1078bf: 53 push %ebx 1078c0: e8 c3 b5 00 00 call 112e88 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 1078ce: 31 c0 xor %eax,%eax 1078d0: b9 ff ff ff ff mov $0xffffffff,%ecx 1078d5: 89 df mov %ebx,%edi 1078d7: f2 ae repnz scas %es:(%edi),%al 1078d9: f7 d1 not %ecx 1078db: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 1078df: 66 c7 00 7c 0a movw $0xa7c,(%eax) 1078e4: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 1078e8: 83 ec 0c sub $0xc,%esp 1078eb: 53 push %ebx 1078ec: e8 17 18 00 00 call 109108 mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 10790d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx 107913: 85 c9 test %ecx,%ecx 107915: 75 08 jne 10791f Dump_Line( &buffer[ max ], mod ); } 107917: 8d 65 f4 lea -0xc(%ebp),%esp 10791a: 5b pop %ebx 10791b: 5e pop %esi 10791c: 5f pop %edi 10791d: c9 leave 10791e: c3 ret for ( i=0 ; i 10793d: 31 ff xor %edi,%edi 10793f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107945: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 107948: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 10794c: 50 push %eax 10794d: 53 push %ebx 10794e: 68 f3 fa 11 00 push $0x11faf3 107953: 53 push %ebx 107954: e8 2f b5 00 00 call 112e88 int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) 107965: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 10796c: 0f 8f 02 01 00 00 jg 107a74 <== NEVER TAKEN 107972: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx strcat( line_buffer, " " ); 107978: 31 c0 xor %eax,%eax 10797a: 66 90 xchg %ax,%ax 10797c: b9 ff ff ff ff mov $0xffffffff,%ecx 107981: 89 df mov %ebx,%edi 107983: f2 ae repnz scas %es:(%edi),%al 107985: f7 d1 not %ecx 107987: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1) 10798e: 00 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107995: 31 c0 xor %eax,%eax 107997: b9 ff ff ff ff mov $0xffffffff,%ecx 10799c: 89 df mov %ebx,%edi 10799e: f2 ae repnz scas %es:(%edi),%al 1079a0: f7 d1 not %ecx 1079a2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 1079b7: 31 ff xor %edi,%edi 1079b9: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 1079bc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 1079c0: 8b 15 d4 31 12 00 mov 0x1231d4,%edx 1079c6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i 1079d3: b8 2e 00 00 00 mov $0x2e,%eax 1079d8: 50 push %eax 1079d9: 53 push %ebx 1079da: 68 fb fa 11 00 push $0x11fafb 1079df: 53 push %ebx 1079e0: e8 a3 b4 00 00 call 112e88 for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) 1079f1: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 1079f8: 7f 23 jg 107a1d <== NEVER TAKEN strcat( line_buffer, " " ); 1079fa: ba ff ff ff ff mov $0xffffffff,%edx 1079ff: 31 c0 xor %eax,%eax 107a01: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi 107a07: 90 nop 107a08: 89 d1 mov %edx,%ecx 107a0a: 89 df mov %ebx,%edi 107a0c: f2 ae repnz scas %es:(%edi),%al 107a0e: f7 d1 not %ecx 107a10: 66 c7 44 0b ff 20 00 movw $0x20,-0x1(%ebx,%ecx,1) strcat( line_buffer, "|" ); for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 107a1d: 31 c0 xor %eax,%eax 107a1f: b9 ff ff ff ff mov $0xffffffff,%ecx 107a24: 89 df mov %ebx,%edi 107a26: f2 ae repnz scas %es:(%edi),%al 107a28: f7 d1 not %ecx 107a2a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 107a2e: 66 c7 00 7c 0a movw $0xa7c,(%eax) 107a33: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 107a37: 83 ec 0c sub $0xc,%esp 107a3a: 53 push %ebx 107a3b: e8 c8 16 00 00 call 109108 107a40: 83 c4 10 add $0x10,%esp for ( i=0 ; i for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107a74: 31 c0 xor %eax,%eax <== NOT EXECUTED 107a76: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107a79: 89 df mov %ebx,%edi <== NOT EXECUTED 107a7b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107a7d: f7 d1 not %ecx <== NOT EXECUTED 107a7f: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED 107a86: e9 2c ff ff ff jmp 1079b7 <== NOT EXECUTED =============================================================================== 00116a94 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116a94: 55 push %ebp 116a95: 89 e5 mov %esp,%ebp 116a97: 53 push %ebx 116a98: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116a9b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116a9e: 50 push %eax 116a9f: ff 75 08 pushl 0x8(%ebp) 116aa2: 68 60 08 14 00 push $0x140860 116aa7: e8 9c 46 00 00 call 11b148 <_Objects_Get> 116aac: 89 c3 mov %eax,%ebx switch ( location ) { 116aae: 83 c4 10 add $0x10,%esp 116ab1: 8b 45 f4 mov -0xc(%ebp),%eax 116ab4: 85 c0 test %eax,%eax 116ab6: 74 0c je 116ac4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116ab8: b8 04 00 00 00 mov $0x4,%eax } 116abd: 8b 5d fc mov -0x4(%ebp),%ebx 116ac0: c9 leave 116ac1: c3 ret 116ac2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116ac4: a1 38 0c 14 00 mov 0x140c38,%eax 116ac9: 39 43 40 cmp %eax,0x40(%ebx) 116acc: 74 12 je 116ae0 _Thread_Enable_dispatch(); 116ace: e8 d9 4e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116ad3: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ad8: 8b 5d fc mov -0x4(%ebp),%ebx 116adb: c9 leave 116adc: c3 ret 116add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116ae0: 83 ec 0c sub $0xc,%esp 116ae3: 8d 43 10 lea 0x10(%ebx),%eax 116ae6: 50 push %eax 116ae7: e8 9c 62 00 00 call 11cd88 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116aec: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116af3: e8 b4 4e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116af8: 83 c4 10 add $0x10,%esp 116afb: 31 c0 xor %eax,%eax 116afd: eb be jmp 116abd =============================================================================== 0010c30c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c30c: 55 push %ebp 10c30d: 89 e5 mov %esp,%ebp 10c30f: 57 push %edi 10c310: 56 push %esi 10c311: 53 push %ebx 10c312: 83 ec 1c sub $0x1c,%esp 10c315: 8b 5d 08 mov 0x8(%ebp),%ebx 10c318: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c31b: 85 db test %ebx,%ebx 10c31d: 0f 84 a9 00 00 00 je 10c3cc return RTEMS_INVALID_NAME; if ( !id ) 10c323: 85 f6 test %esi,%esi 10c325: 0f 84 c5 00 00 00 je 10c3f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c32b: a1 74 85 12 00 mov 0x128574,%eax 10c330: 40 inc %eax 10c331: a3 74 85 12 00 mov %eax,0x128574 * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); 10c336: 83 ec 0c sub $0xc,%esp 10c339: 68 80 84 12 00 push $0x128480 10c33e: e8 51 1e 00 00 call 10e194 <_Objects_Allocate> 10c343: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c345: 83 c4 10 add $0x10,%esp 10c348: 85 c0 test %eax,%eax 10c34a: 0f 84 8c 00 00 00 je 10c3dc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c350: a1 18 88 12 00 mov 0x128818,%eax 10c355: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c358: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c35f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c366: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c36d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c374: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10c37b: 8d 42 54 lea 0x54(%edx),%eax 10c37e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c381: b9 38 00 00 00 mov $0x38,%ecx 10c386: 31 c0 xor %eax,%eax 10c388: 8b 7d e4 mov -0x1c(%ebp),%edi 10c38b: f3 aa rep stos %al,%es:(%edi) 10c38d: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c394: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c39b: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3a2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c3a9: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3ac: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3af: 8b 0d 9c 84 12 00 mov 0x12849c,%ecx 10c3b5: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3b8: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c3bb: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c3bd: e8 ba 2b 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c3c2: 31 c0 xor %eax,%eax } 10c3c4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c7: 5b pop %ebx 10c3c8: 5e pop %esi 10c3c9: 5f pop %edi 10c3ca: c9 leave 10c3cb: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c3cc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3d4: 5b pop %ebx 10c3d5: 5e pop %esi 10c3d6: 5f pop %edi 10c3d7: c9 leave 10c3d8: c3 ret 10c3d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c3dc: e8 9b 2b 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c3e1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e9: 5b pop %ebx 10c3ea: 5e pop %esi 10c3eb: 5f pop %edi 10c3ec: c9 leave 10c3ed: c3 ret 10c3ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c3f0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: 5f pop %edi 10c3fb: c9 leave 10c3fc: c3 ret =============================================================================== 00111d40 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111d40: 55 push %ebp 111d41: 89 e5 mov %esp,%ebp 111d43: 53 push %ebx 111d44: 83 ec 24 sub $0x24,%esp 111d47: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 111d4a: 85 db test %ebx,%ebx 111d4c: 0f 84 92 00 00 00 je 111de4 111d52: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111d53: 8d 45 f4 lea -0xc(%ebp),%eax 111d56: 50 push %eax 111d57: ff 75 08 pushl 0x8(%ebp) 111d5a: 68 80 84 12 00 push $0x128480 111d5f: e8 b4 c9 ff ff call 10e718 <_Objects_Get> switch ( location ) { 111d64: 83 c4 10 add $0x10,%esp 111d67: 8b 4d f4 mov -0xc(%ebp),%ecx 111d6a: 85 c9 test %ecx,%ecx 111d6c: 74 0a je 111d78 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111d6e: b8 04 00 00 00 mov $0x4,%eax } 111d73: 8b 5d fc mov -0x4(%ebp),%ebx 111d76: c9 leave 111d77: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111d78: 8b 50 40 mov 0x40(%eax),%edx 111d7b: 8b 52 08 mov 0x8(%edx),%edx 111d7e: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111d80: 8b 50 38 mov 0x38(%eax),%edx 111d83: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111d86: 85 d2 test %edx,%edx 111d88: 75 2a jne 111db4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111d8a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111d91: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111d98: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111d9f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 111da6: e8 d1 d1 ff ff call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111dab: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111dad: 8b 5d fc mov -0x4(%ebp),%ebx 111db0: c9 leave 111db1: c3 ret 111db2: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 111db4: 52 push %edx _Rate_monotonic_Get_status( 111db5: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111db8: 52 push %edx _Rate_monotonic_Get_status( 111db9: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111dbc: 52 push %edx 111dbd: 50 push %eax 111dbe: e8 61 a6 ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111dc3: 83 c4 10 add $0x10,%esp 111dc6: 84 c0 test %al,%al 111dc8: 74 26 je 111df0 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111dca: 8b 45 e4 mov -0x1c(%ebp),%eax 111dcd: 8b 55 e8 mov -0x18(%ebp),%edx 111dd0: 89 43 08 mov %eax,0x8(%ebx) 111dd3: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111dd6: 8b 45 ec mov -0x14(%ebp),%eax 111dd9: 8b 55 f0 mov -0x10(%ebp),%edx 111ddc: 89 43 10 mov %eax,0x10(%ebx) 111ddf: 89 53 14 mov %edx,0x14(%ebx) 111de2: eb c2 jmp 111da6 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111de4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111de9: 8b 5d fc mov -0x4(%ebp),%ebx 111dec: c9 leave 111ded: c3 ret 111dee: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 111df0: e8 87 d1 ff ff call 10ef7c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111df5: b8 0b 00 00 00 mov $0xb,%eax 111dfa: e9 74 ff ff ff jmp 111d73 =============================================================================== 0010c620 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c620: 55 push %ebp 10c621: 89 e5 mov %esp,%ebp 10c623: 57 push %edi 10c624: 56 push %esi 10c625: 53 push %ebx 10c626: 83 ec 30 sub $0x30,%esp 10c629: 8b 5d 08 mov 0x8(%ebp),%ebx 10c62c: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10c62f: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c632: 50 push %eax 10c633: 53 push %ebx 10c634: 68 80 84 12 00 push $0x128480 10c639: e8 da 20 00 00 call 10e718 <_Objects_Get> switch ( location ) { 10c63e: 83 c4 10 add $0x10,%esp 10c641: 8b 55 e4 mov -0x1c(%ebp),%edx 10c644: 85 d2 test %edx,%edx 10c646: 74 10 je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c648: b8 04 00 00 00 mov $0x4,%eax } 10c64d: 8d 65 f4 lea -0xc(%ebp),%esp 10c650: 5b pop %ebx 10c651: 5e pop %esi 10c652: 5f pop %edi 10c653: c9 leave 10c654: c3 ret 10c655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10c658: 8b 15 18 88 12 00 mov 0x128818,%edx 10c65e: 39 50 40 cmp %edx,0x40(%eax) 10c661: 74 15 je 10c678 _Thread_Enable_dispatch(); 10c663: e8 14 29 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c668: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10c678: 85 f6 test %esi,%esi 10c67a: 75 1c jne 10c698 switch ( the_period->state ) { 10c67c: 8b 40 38 mov 0x38(%eax),%eax 10c67f: 83 f8 04 cmp $0x4,%eax 10c682: 77 6c ja 10c6f0 <== NEVER TAKEN 10c684: 8b 04 85 7c 1f 12 00 mov 0x121f7c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c68b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c68e: e8 e9 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return( return_value ); 10c693: 8b 45 d4 mov -0x2c(%ebp),%eax 10c696: eb b5 jmp 10c64d } _ISR_Disable( level ); 10c698: 9c pushf 10c699: fa cli 10c69a: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c69b: 8b 50 38 mov 0x38(%eax),%edx 10c69e: 85 d2 test %edx,%edx 10c6a0: 74 52 je 10c6f4 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c6a2: 83 fa 02 cmp $0x2,%edx 10c6a5: 0f 84 9e 00 00 00 je 10c749 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c6ab: 83 fa 04 cmp $0x4,%edx 10c6ae: 75 98 jne 10c648 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c6b0: 83 ec 0c sub $0xc,%esp 10c6b3: 50 push %eax 10c6b4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6b7: e8 74 fe ff ff call 10c530 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c6bc: 57 push %edi 10c6bd: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c6be: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6c1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c6c8: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c6cb: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c6d0: 83 c0 10 add $0x10,%eax 10c6d3: 50 push %eax 10c6d4: 68 44 86 12 00 push $0x128644 10c6d9: e8 5e 39 00 00 call 11003c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c6de: e8 99 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c6e3: 83 c4 10 add $0x10,%esp 10c6e6: b8 06 00 00 00 mov $0x6,%eax 10c6eb: e9 5d ff ff ff jmp 10c64d _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c6f0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c6f2: eb 97 jmp 10c68b <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c6f4: 57 push %edi 10c6f5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c6f6: 83 ec 0c sub $0xc,%esp 10c6f9: 50 push %eax 10c6fa: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6fd: e8 ba fd ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c702: 8b 45 d4 mov -0x2c(%ebp),%eax 10c705: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c70c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c713: c7 40 2c 78 ca 10 00 movl $0x10ca78,0x2c(%eax) the_watchdog->id = id; 10c71a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c71d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c724: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c727: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c72a: 5e pop %esi 10c72b: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c72c: 83 c0 10 add $0x10,%eax 10c72f: 50 push %eax 10c730: 68 44 86 12 00 push $0x128644 10c735: e8 02 39 00 00 call 11003c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c73a: e8 3d 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73f: 83 c4 10 add $0x10,%esp 10c742: 31 c0 xor %eax,%eax 10c744: e9 04 ff ff ff jmp 10c64d if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c749: 83 ec 0c sub $0xc,%esp 10c74c: 50 push %eax 10c74d: 89 45 d4 mov %eax,-0x2c(%ebp) 10c750: e8 db fd ff ff call 10c530 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10c755: 8b 45 d4 mov -0x2c(%ebp),%eax 10c758: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c75f: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c762: 57 push %edi 10c763: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c764: 8b 15 18 88 12 00 mov 0x128818,%edx 10c76a: 8b 48 08 mov 0x8(%eax),%ecx 10c76d: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c770: 59 pop %ecx 10c771: 5b pop %ebx 10c772: 68 00 40 00 00 push $0x4000 10c777: 52 push %edx 10c778: 89 45 d4 mov %eax,-0x2c(%ebp) 10c77b: e8 b0 30 00 00 call 10f830 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c780: 9c pushf 10c781: fa cli 10c782: 59 pop %ecx local_state = the_period->state; 10c783: 8b 45 d4 mov -0x2c(%ebp),%eax 10c786: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c789: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c790: 51 push %ecx 10c791: 9d popf /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 10c792: 83 c4 10 add $0x10,%esp 10c795: 83 fa 03 cmp $0x3,%edx 10c798: 74 0c je 10c7a6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c79a: e8 dd 27 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c79f: 31 c0 xor %eax,%eax 10c7a1: e9 a7 fe ff ff jmp 10c64d /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c7a6: 57 push %edi 10c7a7: 57 push %edi 10c7a8: 68 00 40 00 00 push $0x4000 10c7ad: ff 35 18 88 12 00 pushl 0x128818 10c7b3: e8 00 24 00 00 call 10ebb8 <_Thread_Clear_state> 10c7b8: 83 c4 10 add $0x10,%esp 10c7bb: eb dd jmp 10c79a =============================================================================== 0010c7c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c7c0: 55 push %ebp 10c7c1: 89 e5 mov %esp,%ebp 10c7c3: 57 push %edi 10c7c4: 56 push %esi 10c7c5: 53 push %ebx 10c7c6: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c7cc: 8b 75 08 mov 0x8(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10c7cf: 8b 7d 0c mov 0xc(%ebp),%edi 10c7d2: 85 ff test %edi,%edi 10c7d4: 0f 84 be 00 00 00 je 10c898 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c7da: 83 ec 08 sub $0x8,%esp 10c7dd: 68 90 1f 12 00 push $0x121f90 10c7e2: 56 push %esi 10c7e3: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c7e6: 59 pop %ecx 10c7e7: 5b pop %ebx 10c7e8: 68 c8 1f 12 00 push $0x121fc8 10c7ed: 56 push %esi 10c7ee: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c7f1: 58 pop %eax 10c7f2: 5a pop %edx 10c7f3: 68 ec 1f 12 00 push $0x121fec 10c7f8: 56 push %esi 10c7f9: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c7fc: 5b pop %ebx 10c7fd: 5f pop %edi 10c7fe: 68 10 20 12 00 push $0x122010 10c803: 56 push %esi 10c804: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c807: 5a pop %edx 10c808: 59 pop %ecx 10c809: 68 5c 20 12 00 push $0x12205c 10c80e: 56 push %esi 10c80f: ff 55 0c call *0xc(%ebp) /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c812: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10c818: 83 c4 10 add $0x10,%esp 10c81b: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx 10c821: 77 75 ja 10c898 <== NEVER TAKEN 10c823: 8d 7d 88 lea -0x78(%ebp),%edi 10c826: eb 09 jmp 10c831 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c828: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c829: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c82f: 72 67 jb 10c898 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c831: 83 ec 08 sub $0x8,%esp 10c834: 57 push %edi 10c835: 53 push %ebx 10c836: e8 59 54 00 00 call 111c94 if ( status != RTEMS_SUCCESSFUL ) 10c83b: 83 c4 10 add $0x10,%esp 10c83e: 85 c0 test %eax,%eax 10c840: 75 e6 jne 10c828 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c842: 83 ec 08 sub $0x8,%esp 10c845: 8d 45 c0 lea -0x40(%ebp),%eax 10c848: 50 push %eax 10c849: 53 push %ebx 10c84a: e8 f1 54 00 00 call 111d40 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c84f: 83 c4 0c add $0xc,%esp 10c852: 8d 55 e3 lea -0x1d(%ebp),%edx 10c855: 52 push %edx 10c856: 6a 05 push $0x5 10c858: ff 75 c0 pushl -0x40(%ebp) 10c85b: e8 b4 02 00 00 call 10cb14 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c860: 59 pop %ecx 10c861: 58 pop %eax 10c862: ff 75 8c pushl -0x74(%ebp) 10c865: ff 75 88 pushl -0x78(%ebp) 10c868: 8d 45 e3 lea -0x1d(%ebp),%eax 10c86b: 50 push %eax 10c86c: 53 push %ebx 10c86d: 68 ae 1f 12 00 push $0x121fae 10c872: 56 push %esi 10c873: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c876: 8b 45 88 mov -0x78(%ebp),%eax 10c879: 83 c4 20 add $0x20,%esp 10c87c: 85 c0 test %eax,%eax 10c87e: 75 20 jne 10c8a0 (*print)( context, "\n" ); 10c880: 83 ec 08 sub $0x8,%esp 10c883: 68 b1 00 12 00 push $0x1200b1 10c888: 56 push %esi 10c889: ff 55 0c call *0xc(%ebp) continue; 10c88c: 83 c4 10 add $0x10,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c88f: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c890: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c896: 73 99 jae 10c831 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c898: 8d 65 f4 lea -0xc(%ebp),%esp 10c89b: 5b pop %ebx 10c89c: 5e pop %esi 10c89d: 5f pop %edi 10c89e: c9 leave 10c89f: c3 ret struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10c8a0: 52 push %edx 10c8a1: 8d 55 d8 lea -0x28(%ebp),%edx 10c8a4: 52 push %edx 10c8a5: 50 push %eax 10c8a6: 8d 45 a0 lea -0x60(%ebp),%eax 10c8a9: 50 push %eax 10c8aa: e8 ed 33 00 00 call 10fc9c <_Timespec_Divide_by_integer> (*print)( context, 10c8af: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8b4: 8b 45 dc mov -0x24(%ebp),%eax 10c8b7: f7 e9 imul %ecx 10c8b9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8bf: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8c5: c1 f8 06 sar $0x6,%eax 10c8c8: 8b 55 dc mov -0x24(%ebp),%edx 10c8cb: c1 fa 1f sar $0x1f,%edx 10c8ce: 29 d0 sub %edx,%eax 10c8d0: 50 push %eax 10c8d1: ff 75 d8 pushl -0x28(%ebp) 10c8d4: 8b 45 9c mov -0x64(%ebp),%eax 10c8d7: f7 e9 imul %ecx 10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8e5: c1 f8 06 sar $0x6,%eax 10c8e8: 8b 55 9c mov -0x64(%ebp),%edx 10c8eb: c1 fa 1f sar $0x1f,%edx 10c8ee: 29 d0 sub %edx,%eax 10c8f0: 50 push %eax 10c8f1: ff 75 98 pushl -0x68(%ebp) 10c8f4: 8b 45 94 mov -0x6c(%ebp),%eax 10c8f7: f7 e9 imul %ecx 10c8f9: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c8ff: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c905: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c90b: c1 f8 06 sar $0x6,%eax 10c90e: 8b 55 94 mov -0x6c(%ebp),%edx 10c911: c1 fa 1f sar $0x1f,%edx 10c914: 29 d0 sub %edx,%eax 10c916: 50 push %eax 10c917: ff 75 90 pushl -0x70(%ebp) 10c91a: 68 a8 20 12 00 push $0x1220a8 10c91f: 56 push %esi 10c920: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c923: ff 55 0c call *0xc(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10c926: 83 c4 2c add $0x2c,%esp 10c929: 8d 55 d8 lea -0x28(%ebp),%edx 10c92c: 52 push %edx 10c92d: ff 75 88 pushl -0x78(%ebp) 10c930: 8d 45 b8 lea -0x48(%ebp),%eax 10c933: 50 push %eax 10c934: e8 63 33 00 00 call 10fc9c <_Timespec_Divide_by_integer> (*print)( context, 10c939: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c93c: 8b 45 dc mov -0x24(%ebp),%eax 10c93f: f7 e9 imul %ecx 10c941: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c947: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c94d: c1 f8 06 sar $0x6,%eax 10c950: 8b 55 dc mov -0x24(%ebp),%edx 10c953: c1 fa 1f sar $0x1f,%edx 10c956: 29 d0 sub %edx,%eax 10c958: 50 push %eax 10c959: ff 75 d8 pushl -0x28(%ebp) 10c95c: 8b 45 b4 mov -0x4c(%ebp),%eax 10c95f: f7 e9 imul %ecx 10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c96d: c1 f8 06 sar $0x6,%eax 10c970: 8b 55 b4 mov -0x4c(%ebp),%edx 10c973: c1 fa 1f sar $0x1f,%edx 10c976: 29 d0 sub %edx,%eax 10c978: 50 push %eax 10c979: ff 75 b0 pushl -0x50(%ebp) 10c97c: 8b 45 ac mov -0x54(%ebp),%eax 10c97f: f7 e9 imul %ecx 10c981: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c987: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c98d: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c993: c1 f8 06 sar $0x6,%eax 10c996: 8b 55 ac mov -0x54(%ebp),%edx 10c999: c1 fa 1f sar $0x1f,%edx 10c99c: 29 d0 sub %edx,%eax 10c99e: 50 push %eax 10c99f: ff 75 a8 pushl -0x58(%ebp) 10c9a2: 68 c8 20 12 00 push $0x1220c8 10c9a7: 56 push %esi 10c9a8: ff 55 0c call *0xc(%ebp) 10c9ab: 83 c4 30 add $0x30,%esp 10c9ae: e9 75 fe ff ff jmp 10c828 =============================================================================== 0010c9cc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 53 push %ebx 10c9d0: 83 ec 04 sub $0x4,%esp 10c9d3: a1 74 85 12 00 mov 0x128574,%eax 10c9d8: 40 inc %eax 10c9d9: a3 74 85 12 00 mov %eax,0x128574 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c9de: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10c9e4: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx 10c9ea: 77 15 ja 10ca01 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10c9ec: 83 ec 0c sub $0xc,%esp 10c9ef: 53 push %ebx 10c9f0: e8 17 00 00 00 call 10ca0c * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c9f5: 43 inc %ebx /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c9f6: 83 c4 10 add $0x10,%esp 10c9f9: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c9ff: 73 eb jae 10c9ec /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca01: 8b 5d fc mov -0x4(%ebp),%ebx 10ca04: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca05: e9 72 25 00 00 jmp 10ef7c <_Thread_Enable_dispatch> =============================================================================== 0010ca0c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca0c: 55 push %ebp 10ca0d: 89 e5 mov %esp,%ebp 10ca0f: 57 push %edi 10ca10: 53 push %ebx 10ca11: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca14: 8d 45 f4 lea -0xc(%ebp),%eax 10ca17: 50 push %eax 10ca18: ff 75 08 pushl 0x8(%ebp) 10ca1b: 68 80 84 12 00 push $0x128480 10ca20: e8 f3 1c 00 00 call 10e718 <_Objects_Get> 10ca25: 89 c2 mov %eax,%edx switch ( location ) { 10ca27: 83 c4 10 add $0x10,%esp 10ca2a: 8b 45 f4 mov -0xc(%ebp),%eax 10ca2d: 85 c0 test %eax,%eax 10ca2f: 75 3b jne 10ca6c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10ca31: 8d 5a 54 lea 0x54(%edx),%ebx 10ca34: b9 38 00 00 00 mov $0x38,%ecx 10ca39: 31 c0 xor %eax,%eax 10ca3b: 89 df mov %ebx,%edi 10ca3d: f3 aa rep stos %al,%es:(%edi) 10ca3f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca46: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca4d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca54: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10ca5b: e8 1c 25 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca60: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca62: 8d 65 f8 lea -0x8(%ebp),%esp 10ca65: 5b pop %ebx 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ca6c: b8 04 00 00 00 mov $0x4,%eax } 10ca71: 8d 65 f8 lea -0x8(%ebp),%esp 10ca74: 5b pop %ebx 10ca75: 5f pop %edi 10ca76: c9 leave 10ca77: c3 ret =============================================================================== 00117228 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 57 push %edi 11722c: 56 push %esi 11722d: 53 push %ebx 11722e: 83 ec 1c sub $0x1c,%esp 117231: 8b 7d 08 mov 0x8(%ebp),%edi 117234: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117237: 85 ff test %edi,%edi 117239: 0f 84 c1 00 00 00 je 117300 return RTEMS_INVALID_NAME; if ( !starting_address ) 11723f: 85 f6 test %esi,%esi 117241: 0f 84 e1 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; if ( !id ) 117247: 8b 45 1c mov 0x1c(%ebp),%eax 11724a: 85 c0 test %eax,%eax 11724c: 0f 84 d6 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117252: 83 ec 0c sub $0xc,%esp 117255: ff 35 44 0a 14 00 pushl 0x140a44 11725b: e8 b0 24 00 00 call 119710 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 117260: c7 04 24 a0 08 14 00 movl $0x1408a0,(%esp) 117267: e8 e8 39 00 00 call 11ac54 <_Objects_Allocate> 11726c: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 11726e: 83 c4 10 add $0x10,%esp 117271: 85 c0 test %eax,%eax 117273: 0f 84 bf 00 00 00 je 117338 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117279: ff 75 14 pushl 0x14(%ebp) 11727c: ff 75 10 pushl 0x10(%ebp) 11727f: 56 push %esi 117280: 8d 40 68 lea 0x68(%eax),%eax 117283: 50 push %eax 117284: e8 d7 35 00 00 call 11a860 <_Heap_Initialize> 117289: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 11728c: 83 c4 10 add $0x10,%esp 11728f: 85 c0 test %eax,%eax 117291: 74 7d je 117310 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117293: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 117296: 8b 45 10 mov 0x10(%ebp),%eax 117299: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 11729c: 8b 55 14 mov 0x14(%ebp),%edx 11729f: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1172a2: 8b 45 18 mov 0x18(%ebp),%eax 1172a5: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1172a8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1172af: 6a 06 push $0x6 1172b1: 6a 40 push $0x40 1172b3: a8 04 test $0x4,%al 1172b5: 0f 95 c0 setne %al 1172b8: 0f b6 c0 movzbl %al,%eax 1172bb: 50 push %eax 1172bc: 8d 43 10 lea 0x10(%ebx),%eax 1172bf: 50 push %eax 1172c0: e8 33 4e 00 00 call 11c0f8 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1172c5: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1172c8: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1172cb: 8b 15 bc 08 14 00 mov 0x1408bc,%edx 1172d1: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1172d4: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1172d7: 8b 55 1c mov 0x1c(%ebp),%edx 1172da: 89 02 mov %eax,(%edx) 1172dc: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 1172df: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 1172e1: 83 ec 0c sub $0xc,%esp 1172e4: ff 35 44 0a 14 00 pushl 0x140a44 1172ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1172ed: e8 66 24 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1172f2: 83 c4 10 add $0x10,%esp 1172f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172f8: 8d 65 f4 lea -0xc(%ebp),%esp 1172fb: 5b pop %ebx 1172fc: 5e pop %esi 1172fd: 5f pop %edi 1172fe: c9 leave 1172ff: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 117300: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117305: 8d 65 f4 lea -0xc(%ebp),%esp 117308: 5b pop %ebx 117309: 5e pop %esi 11730a: 5f pop %edi 11730b: c9 leave 11730c: c3 ret 11730d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117310: 83 ec 08 sub $0x8,%esp 117313: 53 push %ebx 117314: 68 a0 08 14 00 push $0x1408a0 117319: e8 ae 3c 00 00 call 11afcc <_Objects_Free> 11731e: 83 c4 10 add $0x10,%esp &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 117321: b8 08 00 00 00 mov $0x8,%eax 117326: eb b9 jmp 1172e1 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 117328: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11732d: 8d 65 f4 lea -0xc(%ebp),%esp 117330: 5b pop %ebx 117331: 5e pop %esi 117332: 5f pop %edi 117333: c9 leave 117334: c3 ret 117335: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 117338: b8 05 00 00 00 mov $0x5,%eax 11733d: eb a2 jmp 1172e1 =============================================================================== 00117340 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117340: 55 push %ebp 117341: 89 e5 mov %esp,%ebp 117343: 53 push %ebx 117344: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117347: ff 35 44 0a 14 00 pushl 0x140a44 11734d: e8 be 23 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117352: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117355: 8d 45 f4 lea -0xc(%ebp),%eax 117358: 50 push %eax 117359: ff 75 08 pushl 0x8(%ebp) 11735c: 68 a0 08 14 00 push $0x1408a0 117361: e8 a6 3d 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117366: 83 c4 10 add $0x10,%esp 117369: 8b 5d f4 mov -0xc(%ebp),%ebx 11736c: 85 db test %ebx,%ebx 11736e: 74 1c je 11738c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117370: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117375: 83 ec 0c sub $0xc,%esp 117378: ff 35 44 0a 14 00 pushl 0x140a44 11737e: e8 d5 23 00 00 call 119758 <_API_Mutex_Unlock> return return_status; } 117383: 89 d8 mov %ebx,%eax 117385: 8b 5d fc mov -0x4(%ebp),%ebx 117388: c9 leave 117389: c3 ret 11738a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 11738c: 8b 48 64 mov 0x64(%eax),%ecx 11738f: 85 c9 test %ecx,%ecx 117391: 74 09 je 11739c return_status = RTEMS_RESOURCE_IN_USE; 117393: bb 0c 00 00 00 mov $0xc,%ebx 117398: eb db jmp 117375 11739a: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 11739c: 83 ec 08 sub $0x8,%esp 11739f: 50 push %eax 1173a0: 68 a0 08 14 00 push $0x1408a0 1173a5: 89 45 e4 mov %eax,-0x1c(%ebp) 1173a8: e8 23 39 00 00 call 11acd0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173ad: 58 pop %eax 1173ae: 5a pop %edx 1173af: 8b 45 e4 mov -0x1c(%ebp),%eax 1173b2: 50 push %eax 1173b3: 68 a0 08 14 00 push $0x1408a0 1173b8: e8 0f 3c 00 00 call 11afcc <_Objects_Free> 1173bd: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1173c0: 31 db xor %ebx,%ebx 1173c2: eb b1 jmp 117375 =============================================================================== 001173c4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 1173c4: 55 push %ebp 1173c5: 89 e5 mov %esp,%ebp 1173c7: 56 push %esi 1173c8: 53 push %ebx 1173c9: 83 ec 10 sub $0x10,%esp 1173cc: 8b 5d 0c mov 0xc(%ebp),%ebx bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 1173cf: 85 db test %ebx,%ebx 1173d1: 74 75 je 117448 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1173d3: 83 ec 0c sub $0xc,%esp 1173d6: ff 35 44 0a 14 00 pushl 0x140a44 1173dc: e8 2f 23 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1173e1: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1173e4: 8d 45 f0 lea -0x10(%ebp),%eax 1173e7: 50 push %eax 1173e8: ff 75 08 pushl 0x8(%ebp) 1173eb: 68 a0 08 14 00 push $0x1408a0 1173f0: e8 17 3d 00 00 call 11b10c <_Objects_Get_no_protection> 1173f5: 89 c6 mov %eax,%esi switch ( location ) { 1173f7: 83 c4 10 add $0x10,%esp 1173fa: 8b 45 f0 mov -0x10(%ebp),%eax 1173fd: 85 c0 test %eax,%eax 1173ff: 74 1f je 117420 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117401: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117406: 83 ec 0c sub $0xc,%esp 117409: ff 35 44 0a 14 00 pushl 0x140a44 11740f: e8 44 23 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 117414: 83 c4 10 add $0x10,%esp } 117417: 89 d8 mov %ebx,%eax 117419: 8d 65 f8 lea -0x8(%ebp),%esp 11741c: 5b pop %ebx 11741d: 5e pop %esi 11741e: c9 leave 11741f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 117420: 8d 45 f4 lea -0xc(%ebp),%eax 117423: 50 push %eax 117424: ff 75 10 pushl 0x10(%ebp) 117427: 53 push %ebx 117428: 8d 46 68 lea 0x68(%esi),%eax 11742b: 50 push %eax 11742c: e8 3b 2e 00 00 call 11a26c <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 117431: 83 c4 10 add $0x10,%esp 117434: 84 c0 test %al,%al 117436: 74 20 je 117458 the_region->length += amount_extended; 117438: 8b 45 f4 mov -0xc(%ebp),%eax 11743b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11743e: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 117441: 31 db xor %ebx,%ebx 117443: eb c1 jmp 117406 117445: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 117448: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11744d: 89 d8 mov %ebx,%eax 11744f: 8d 65 f8 lea -0x8(%ebp),%esp 117452: 5b pop %ebx 117453: 5e pop %esi 117454: c9 leave 117455: c3 ret 117456: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 117458: bb 09 00 00 00 mov $0x9,%ebx 11745d: eb a7 jmp 117406 =============================================================================== 00117460 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117460: 55 push %ebp 117461: 89 e5 mov %esp,%ebp 117463: 53 push %ebx 117464: 83 ec 14 sub $0x14,%esp 117467: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11746a: 85 db test %ebx,%ebx 11746c: 74 76 je 1174e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11746e: 83 ec 0c sub $0xc,%esp 117471: ff 35 44 0a 14 00 pushl 0x140a44 117477: e8 94 22 00 00 call 119710 <_API_Mutex_Lock> 11747c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11747f: 8d 45 f4 lea -0xc(%ebp),%eax 117482: 50 push %eax 117483: ff 75 08 pushl 0x8(%ebp) 117486: 68 a0 08 14 00 push $0x1408a0 11748b: e8 7c 3c 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117490: 83 c4 10 add $0x10,%esp 117493: 8b 55 f4 mov -0xc(%ebp),%edx 117496: 85 d2 test %edx,%edx 117498: 74 1e je 1174b8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11749a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11749f: 83 ec 0c sub $0xc,%esp 1174a2: ff 35 44 0a 14 00 pushl 0x140a44 1174a8: e8 ab 22 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1174ad: 83 c4 10 add $0x10,%esp } 1174b0: 89 d8 mov %ebx,%eax 1174b2: 8b 5d fc mov -0x4(%ebp),%ebx 1174b5: c9 leave 1174b6: c3 ret 1174b7: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1174b8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1174bf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1174c6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1174cd: 83 ec 08 sub $0x8,%esp 1174d0: 53 push %ebx 1174d1: 83 c0 68 add $0x68,%eax 1174d4: 50 push %eax 1174d5: e8 6e 31 00 00 call 11a648 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 1174da: 83 c4 10 add $0x10,%esp the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); return_status = RTEMS_SUCCESSFUL; 1174dd: 31 db xor %ebx,%ebx break; 1174df: eb be jmp 11749f 1174e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 1174e4: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1174e9: 89 d8 mov %ebx,%eax 1174eb: 8b 5d fc mov -0x4(%ebp),%ebx 1174ee: c9 leave 1174ef: c3 ret =============================================================================== 001174f0 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1174f0: 55 push %ebp 1174f1: 89 e5 mov %esp,%ebp 1174f3: 53 push %ebx 1174f4: 83 ec 14 sub $0x14,%esp 1174f7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1174fa: 85 db test %ebx,%ebx 1174fc: 74 5e je 11755c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1174fe: 83 ec 0c sub $0xc,%esp 117501: ff 35 44 0a 14 00 pushl 0x140a44 117507: e8 04 22 00 00 call 119710 <_API_Mutex_Lock> 11750c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11750f: 8d 45 f4 lea -0xc(%ebp),%eax 117512: 50 push %eax 117513: ff 75 08 pushl 0x8(%ebp) 117516: 68 a0 08 14 00 push $0x1408a0 11751b: e8 ec 3b 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117520: 83 c4 10 add $0x10,%esp 117523: 8b 55 f4 mov -0xc(%ebp),%edx 117526: 85 d2 test %edx,%edx 117528: 74 1e je 117548 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11752a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11752f: 83 ec 0c sub $0xc,%esp 117532: ff 35 44 0a 14 00 pushl 0x140a44 117538: e8 1b 22 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 11753d: 83 c4 10 add $0x10,%esp } 117540: 89 d8 mov %ebx,%eax 117542: 8b 5d fc mov -0x4(%ebp),%ebx 117545: c9 leave 117546: c3 ret 117547: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117548: 83 ec 08 sub $0x8,%esp 11754b: 53 push %ebx 11754c: 83 c0 68 add $0x68,%eax 11754f: 50 push %eax 117550: e8 53 31 00 00 call 11a6a8 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117555: 83 c4 10 add $0x10,%esp the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); return_status = RTEMS_SUCCESSFUL; 117558: 31 db xor %ebx,%ebx break; 11755a: eb d3 jmp 11752f Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 11755c: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117561: 89 d8 mov %ebx,%eax 117563: 8b 5d fc mov -0x4(%ebp),%ebx 117566: c9 leave 117567: c3 ret =============================================================================== 00117568 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117568: 55 push %ebp 117569: 89 e5 mov %esp,%ebp 11756b: 57 push %edi 11756c: 56 push %esi 11756d: 53 push %ebx 11756e: 83 ec 2c sub $0x2c,%esp 117571: 8b 75 0c mov 0xc(%ebp),%esi 117574: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117577: 85 db test %ebx,%ebx 117579: 0f 84 a1 00 00 00 je 117620 return RTEMS_INVALID_ADDRESS; *segment = NULL; 11757f: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117585: 85 f6 test %esi,%esi 117587: 75 0f jne 117598 return RTEMS_INVALID_SIZE; 117589: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11758e: 8d 65 f4 lea -0xc(%ebp),%esp 117591: 5b pop %ebx 117592: 5e pop %esi 117593: 5f pop %edi 117594: c9 leave 117595: c3 ret 117596: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117598: 83 ec 0c sub $0xc,%esp 11759b: ff 35 44 0a 14 00 pushl 0x140a44 1175a1: e8 6a 21 00 00 call 119710 <_API_Mutex_Lock> executing = _Thread_Executing; 1175a6: a1 38 0c 14 00 mov 0x140c38,%eax 1175ab: 89 45 d4 mov %eax,-0x2c(%ebp) 1175ae: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175b1: 8d 45 e4 lea -0x1c(%ebp),%eax 1175b4: 50 push %eax 1175b5: ff 75 08 pushl 0x8(%ebp) 1175b8: 68 a0 08 14 00 push $0x1408a0 1175bd: e8 4a 3b 00 00 call 11b10c <_Objects_Get_no_protection> 1175c2: 89 c7 mov %eax,%edi switch ( location ) { 1175c4: 83 c4 10 add $0x10,%esp 1175c7: 8b 45 e4 mov -0x1c(%ebp),%eax 1175ca: 85 c0 test %eax,%eax 1175cc: 75 2a jne 1175f8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1175ce: 3b 77 5c cmp 0x5c(%edi),%esi 1175d1: 76 2d jbe 117600 return_status = RTEMS_INVALID_SIZE; 1175d3: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175d8: 83 ec 0c sub $0xc,%esp 1175db: ff 35 44 0a 14 00 pushl 0x140a44 1175e1: 89 45 d0 mov %eax,-0x30(%ebp) 1175e4: e8 6f 21 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp 1175ec: 8b 45 d0 mov -0x30(%ebp),%eax } 1175ef: 8d 65 f4 lea -0xc(%ebp),%esp 1175f2: 5b pop %ebx 1175f3: 5e pop %esi 1175f4: 5f pop %edi 1175f5: c9 leave 1175f6: c3 ret 1175f7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175f8: b8 04 00 00 00 mov $0x4,%eax 1175fd: eb d9 jmp 1175d8 1175ff: 90 nop <== NOT EXECUTED * @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 ); 117600: 6a 00 push $0x0 117602: 6a 00 push $0x0 117604: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117605: 8d 47 68 lea 0x68(%edi),%eax 117608: 50 push %eax 117609: e8 8a 2a 00 00 call 11a098 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11760e: 83 c4 10 add $0x10,%esp 117611: 85 c0 test %eax,%eax 117613: 74 17 je 11762c the_region->number_of_used_blocks += 1; 117615: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117618: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 11761a: 31 c0 xor %eax,%eax 11761c: eb ba jmp 1175d8 11761e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 117620: b8 09 00 00 00 mov $0x9,%eax 117625: e9 64 ff ff ff jmp 11758e 11762a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 11762c: f6 45 10 01 testb $0x1,0x10(%ebp) 117630: 74 07 je 117639 return_status = RTEMS_UNSATISFIED; 117632: b8 0d 00 00 00 mov $0xd,%eax 117637: eb 9f jmp 1175d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117639: a1 94 09 14 00 mov 0x140994,%eax 11763e: 40 inc %eax 11763f: a3 94 09 14 00 mov %eax,0x140994 * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 117644: 83 ec 0c sub $0xc,%esp 117647: ff 35 44 0a 14 00 pushl 0x140a44 11764d: e8 06 21 00 00 call 119758 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117652: 8d 47 10 lea 0x10(%edi),%eax 117655: 8b 55 d4 mov -0x2c(%ebp),%edx 117658: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11765b: 8b 4d 08 mov 0x8(%ebp),%ecx 11765e: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117661: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117664: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 117667: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 11766e: 83 c4 0c add $0xc,%esp 117671: 68 bc c1 11 00 push $0x11c1bc 117676: ff 75 14 pushl 0x14(%ebp) 117679: 50 push %eax 11767a: e8 ed 47 00 00 call 11be6c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 11767f: e8 28 43 00 00 call 11b9ac <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117684: 8b 55 d4 mov -0x2c(%ebp),%edx 117687: 8b 42 34 mov 0x34(%edx),%eax 11768a: 83 c4 10 add $0x10,%esp 11768d: e9 fc fe ff ff jmp 11758e =============================================================================== 00117694 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117694: 55 push %ebp 117695: 89 e5 mov %esp,%ebp 117697: 56 push %esi 117698: 53 push %ebx 117699: 83 ec 20 sub $0x20,%esp 11769c: 8b 5d 0c mov 0xc(%ebp),%ebx 11769f: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1176a2: 85 db test %ebx,%ebx 1176a4: 74 72 je 117718 return RTEMS_INVALID_ADDRESS; if ( !size ) 1176a6: 85 f6 test %esi,%esi 1176a8: 74 6e je 117718 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1176aa: 83 ec 0c sub $0xc,%esp 1176ad: ff 35 44 0a 14 00 pushl 0x140a44 1176b3: e8 58 20 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1176b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176bb: 8d 45 f4 lea -0xc(%ebp),%eax 1176be: 50 push %eax 1176bf: ff 75 08 pushl 0x8(%ebp) 1176c2: 68 a0 08 14 00 push $0x1408a0 1176c7: e8 40 3a 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 1176cc: 83 c4 10 add $0x10,%esp 1176cf: 8b 55 f4 mov -0xc(%ebp),%edx 1176d2: 85 d2 test %edx,%edx 1176d4: 74 2a je 117700 void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 1176d6: 31 c0 xor %eax,%eax 1176d8: 83 fa 01 cmp $0x1,%edx 1176db: 0f 94 c0 sete %al 1176de: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1176e1: 83 ec 0c sub $0xc,%esp 1176e4: ff 35 44 0a 14 00 pushl 0x140a44 1176ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1176ed: e8 66 20 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1176f2: 83 c4 10 add $0x10,%esp 1176f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1176f8: 8d 65 f8 lea -0x8(%ebp),%esp 1176fb: 5b pop %ebx 1176fc: 5e pop %esi 1176fd: c9 leave 1176fe: c3 ret 1176ff: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117700: 52 push %edx 117701: 56 push %esi 117702: 53 push %ebx 117703: 83 c0 68 add $0x68,%eax 117706: 50 push %eax 117707: e8 64 34 00 00 call 11ab70 <_Heap_Size_of_alloc_area> 11770c: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11770f: 3c 01 cmp $0x1,%al 117711: 19 c0 sbb %eax,%eax 117713: 83 e0 09 and $0x9,%eax 117716: eb c9 jmp 1176e1 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117718: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11771d: 8d 65 f8 lea -0x8(%ebp),%esp 117720: 5b pop %ebx 117721: 5e pop %esi 117722: c9 leave 117723: c3 ret =============================================================================== 00117748 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117748: 55 push %ebp 117749: 89 e5 mov %esp,%ebp 11774b: 56 push %esi 11774c: 53 push %ebx 11774d: 83 ec 20 sub $0x20,%esp 117750: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 117753: 85 db test %ebx,%ebx 117755: 0f 84 89 00 00 00 je 1177e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11775b: 83 ec 0c sub $0xc,%esp 11775e: ff 35 44 0a 14 00 pushl 0x140a44 117764: e8 a7 1f 00 00 call 119710 <_API_Mutex_Lock> 117769: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11776c: 8d 45 f0 lea -0x10(%ebp),%eax 11776f: 50 push %eax 117770: ff 75 08 pushl 0x8(%ebp) 117773: 68 a0 08 14 00 push $0x1408a0 117778: e8 8f 39 00 00 call 11b10c <_Objects_Get_no_protection> 11777d: 89 c6 mov %eax,%esi switch ( location ) { 11777f: 83 c4 10 add $0x10,%esp 117782: 8b 45 f0 mov -0x10(%ebp),%eax 117785: 85 c0 test %eax,%eax 117787: 74 1f je 1177a8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117789: 83 ec 0c sub $0xc,%esp 11778c: ff 35 44 0a 14 00 pushl 0x140a44 117792: e8 c1 1f 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 117797: 83 c4 10 add $0x10,%esp 11779a: b8 04 00 00 00 mov $0x4,%eax } 11779f: 8d 65 f8 lea -0x8(%ebp),%esp 1177a2: 5b pop %ebx 1177a3: 5e pop %esi 1177a4: c9 leave 1177a5: c3 ret 1177a6: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1177a8: 83 ec 0c sub $0xc,%esp 1177ab: 8d 45 f4 lea -0xc(%ebp),%eax 1177ae: 50 push %eax 1177af: 8d 45 ec lea -0x14(%ebp),%eax 1177b2: 50 push %eax 1177b3: ff 75 10 pushl 0x10(%ebp) 1177b6: ff 75 0c pushl 0xc(%ebp) 1177b9: 8d 46 68 lea 0x68(%esi),%eax 1177bc: 50 push %eax 1177bd: e8 a6 32 00 00 call 11aa68 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1177c2: 8b 55 ec mov -0x14(%ebp),%edx 1177c5: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1177c7: 83 c4 20 add $0x20,%esp 1177ca: 85 c0 test %eax,%eax 1177cc: 75 22 jne 1177f0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1177ce: 83 ec 0c sub $0xc,%esp 1177d1: 56 push %esi 1177d2: e8 19 71 00 00 call 11e8f0 <_Region_Process_queue> 1177d7: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 1177da: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177dc: 8d 65 f8 lea -0x8(%ebp),%esp 1177df: 5b pop %ebx 1177e0: 5e pop %esi 1177e1: c9 leave 1177e2: c3 ret 1177e3: 90 nop <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 1177e4: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177e9: 8d 65 f8 lea -0x8(%ebp),%esp 1177ec: 5b pop %ebx 1177ed: 5e pop %esi 1177ee: c9 leave 1177ef: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1177f0: 83 ec 0c sub $0xc,%esp 1177f3: ff 35 44 0a 14 00 pushl 0x140a44 1177f9: 89 45 e4 mov %eax,-0x1c(%ebp) 1177fc: e8 57 1f 00 00 call 119758 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117801: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117804: 8b 45 e4 mov -0x1c(%ebp),%eax 117807: 48 dec %eax 117808: 0f 94 c0 sete %al 11780b: 0f b6 c0 movzbl %al,%eax 11780e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117815: 8d 65 f8 lea -0x8(%ebp),%esp 117818: 5b pop %ebx 117819: 5e pop %esi 11781a: c9 leave 11781b: c3 ret =============================================================================== 0011781c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 11781c: 55 push %ebp 11781d: 89 e5 mov %esp,%ebp 11781f: 53 push %ebx 117820: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117823: ff 35 44 0a 14 00 pushl 0x140a44 117829: e8 e2 1e 00 00 call 119710 <_API_Mutex_Lock> 11782e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117831: 8d 45 f4 lea -0xc(%ebp),%eax 117834: 50 push %eax 117835: ff 75 08 pushl 0x8(%ebp) 117838: 68 a0 08 14 00 push $0x1408a0 11783d: e8 ca 38 00 00 call 11b10c <_Objects_Get_no_protection> 117842: 89 c3 mov %eax,%ebx switch ( location ) { 117844: 83 c4 10 add $0x10,%esp 117847: 8b 45 f4 mov -0xc(%ebp),%eax 11784a: 85 c0 test %eax,%eax 11784c: 75 1e jne 11786c RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11784e: 83 ec 08 sub $0x8,%esp 117851: ff 75 0c pushl 0xc(%ebp) 117854: 8d 43 68 lea 0x68(%ebx),%eax 117857: 50 push %eax 117858: e8 9b 2c 00 00 call 11a4f8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11785d: 83 c4 10 add $0x10,%esp 117860: 84 c0 test %al,%al 117862: 75 28 jne 11788c return_status = RTEMS_INVALID_ADDRESS; 117864: bb 09 00 00 00 mov $0x9,%ebx 117869: eb 06 jmp 117871 11786b: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11786c: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117871: 83 ec 0c sub $0xc,%esp 117874: ff 35 44 0a 14 00 pushl 0x140a44 11787a: e8 d9 1e 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 11787f: 83 c4 10 add $0x10,%esp } 117882: 89 d8 mov %ebx,%eax 117884: 8b 5d fc mov -0x4(%ebp),%ebx 117887: c9 leave 117888: c3 ret 117889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11788c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11788f: 83 ec 0c sub $0xc,%esp 117892: 53 push %ebx 117893: e8 58 70 00 00 call 11e8f0 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 117898: 83 c4 10 add $0x10,%esp 11789b: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11789d: 89 d8 mov %ebx,%eax 11789f: 8b 5d fc mov -0x4(%ebp),%ebx 1178a2: c9 leave 1178a3: c3 ret =============================================================================== 0010b414 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b414: 55 push %ebp 10b415: 89 e5 mov %esp,%ebp 10b417: 57 push %edi 10b418: 56 push %esi 10b419: 53 push %ebx 10b41a: 83 ec 3c sub $0x3c,%esp 10b41d: 8b 75 08 mov 0x8(%ebp),%esi 10b420: 8b 5d 10 mov 0x10(%ebp),%ebx 10b423: 8b 7d 18 mov 0x18(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10b426: 85 f6 test %esi,%esi 10b428: 74 4a je 10b474 return RTEMS_INVALID_NAME; if ( !id ) 10b42a: 85 ff test %edi,%edi 10b42c: 0f 84 f6 00 00 00 je 10b528 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b432: 89 da mov %ebx,%edx 10b434: 81 e2 c0 00 00 00 and $0xc0,%edx 10b43a: 74 48 je 10b484 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b43c: 89 d8 mov %ebx,%eax 10b43e: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b441: 83 f8 10 cmp $0x10,%eax 10b444: 74 0e je 10b454 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b446: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b44b: 8d 65 f4 lea -0xc(%ebp),%esp 10b44e: 5b pop %ebx 10b44f: 5e pop %esi 10b450: 5f pop %edi 10b451: c9 leave 10b452: c3 ret 10b453: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b454: f6 c3 04 test $0x4,%bl 10b457: 74 ed je 10b446 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b459: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b45f: 74 e5 je 10b446 10b461: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b466: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b46a: 76 1f jbe 10b48b return RTEMS_INVALID_NUMBER; 10b46c: b8 0a 00 00 00 mov $0xa,%eax 10b471: eb d8 jmp 10b44b 10b473: 90 nop <== NOT EXECUTED CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b474: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b479: 8d 65 f4 lea -0xc(%ebp),%esp 10b47c: 5b pop %ebx 10b47d: 5e pop %esi 10b47e: 5f pop %edi 10b47f: c9 leave 10b480: c3 ret 10b481: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b484: 89 d9 mov %ebx,%ecx 10b486: 83 e1 30 and $0x30,%ecx 10b489: 75 db jne 10b466 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b48b: a1 34 54 12 00 mov 0x125434,%eax 10b490: 40 inc %eax 10b491: a3 34 54 12 00 mov %eax,0x125434 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 10b496: 83 ec 0c sub $0xc,%esp 10b499: 68 80 53 12 00 push $0x125380 10b49e: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4a1: e8 e6 13 00 00 call 10c88c <_Objects_Allocate> 10b4a6: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b4a8: 83 c4 10 add $0x10,%esp 10b4ab: 85 c0 test %eax,%eax 10b4ad: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b4b0: 0f 84 ba 00 00 00 je 10b570 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b4b6: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b4b9: 85 c9 test %ecx,%ecx 10b4bb: 74 77 je 10b534 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10b4bd: 31 c0 xor %eax,%eax 10b4bf: f6 c3 04 test $0x4,%bl 10b4c2: 0f 95 c0 setne %al 10b4c5: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b4c8: 83 f9 10 cmp $0x10,%ecx 10b4cb: 0f 84 ae 00 00 00 je 10b57f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b4d1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4d8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b4dc: 50 push %eax 10b4dd: 31 c0 xor %eax,%eax 10b4df: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b4e3: 0f 94 c0 sete %al 10b4e6: 50 push %eax 10b4e7: 8d 45 d0 lea -0x30(%ebp),%eax 10b4ea: 50 push %eax 10b4eb: 8d 42 14 lea 0x14(%edx),%eax 10b4ee: 50 push %eax 10b4ef: 89 55 c4 mov %edx,-0x3c(%ebp) 10b4f2: e8 85 0b 00 00 call 10c07c <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: 83 f8 06 cmp $0x6,%eax 10b4fd: 8b 55 c4 mov -0x3c(%ebp),%edx 10b500: 0f 84 a9 00 00 00 je 10b5af Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b506: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b509: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b50c: 8b 0d 9c 53 12 00 mov 0x12539c,%ecx 10b512: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b515: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b518: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b51a: e8 89 20 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b51f: 31 c0 xor %eax,%eax 10b521: e9 25 ff ff ff jmp 10b44b 10b526: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b528: b8 09 00 00 00 mov $0x9,%eax 10b52d: e9 19 ff ff ff jmp 10b44b 10b532: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b534: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10b53b: 31 c0 xor %eax,%eax 10b53d: f6 c3 04 test $0x4,%bl 10b540: 0f 95 c0 setne %al 10b543: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b546: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b54d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b554: 51 push %ecx 10b555: ff 75 0c pushl 0xc(%ebp) 10b558: 8d 45 e0 lea -0x20(%ebp),%eax 10b55b: 50 push %eax 10b55c: 8d 42 14 lea 0x14(%edx),%eax 10b55f: 50 push %eax 10b560: 89 55 c4 mov %edx,-0x3c(%ebp) 10b563: e8 a4 0d 00 00 call 10c30c <_CORE_semaphore_Initialize> 10b568: 83 c4 10 add $0x10,%esp 10b56b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b56e: eb 96 jmp 10b506 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b570: e8 33 20 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b575: b8 05 00 00 00 mov $0x5,%eax 10b57a: e9 cc fe ff ff jmp 10b44b the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b57f: 8b 45 14 mov 0x14(%ebp),%eax 10b582: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b585: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b58c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b590: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b594: 0f 85 42 ff ff ff jne 10b4dc if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b59a: f6 c3 40 test $0x40,%bl 10b59d: 74 30 je 10b5cf the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b59f: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5a6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5aa: e9 2d ff ff ff jmp 10b4dc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5af: 83 ec 08 sub $0x8,%esp 10b5b2: 52 push %edx 10b5b3: 68 80 53 12 00 push $0x125380 10b5b8: e8 47 16 00 00 call 10cc04 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b5bd: e8 e6 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b5c2: 83 c4 10 add $0x10,%esp 10b5c5: b8 13 00 00 00 mov $0x13,%eax 10b5ca: e9 7c fe ff ff jmp 10b44b if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b5cf: 81 e3 80 00 00 00 and $0x80,%ebx 10b5d5: 0f 84 01 ff ff ff je 10b4dc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b5db: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5e2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5e6: e9 f1 fe ff ff jmp 10b4dc =============================================================================== 0010b5ec : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 53 push %ebx 10b5f0: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b5f3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b5f6: 50 push %eax 10b5f7: ff 75 08 pushl 0x8(%ebp) 10b5fa: 68 80 53 12 00 push $0x125380 10b5ff: e8 40 17 00 00 call 10cd44 <_Objects_Get> 10b604: 89 c3 mov %eax,%ebx switch ( location ) { 10b606: 83 c4 10 add $0x10,%esp 10b609: 8b 4d f4 mov -0xc(%ebp),%ecx 10b60c: 85 c9 test %ecx,%ecx 10b60e: 74 0c je 10b61c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b610: b8 04 00 00 00 mov $0x4,%eax } 10b615: 8b 5d fc mov -0x4(%ebp),%ebx 10b618: c9 leave 10b619: c3 ret 10b61a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b61c: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b61f: 83 e0 30 and $0x30,%eax 10b622: 74 58 je 10b67c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b624: 8b 53 64 mov 0x64(%ebx),%edx 10b627: 85 d2 test %edx,%edx 10b629: 75 15 jne 10b640 10b62b: 83 f8 20 cmp $0x20,%eax 10b62e: 74 10 je 10b640 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b630: e8 73 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b635: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b63a: 8b 5d fc mov -0x4(%ebp),%ebx 10b63d: c9 leave 10b63e: c3 ret 10b63f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b640: 50 push %eax 10b641: 6a 04 push $0x4 10b643: 6a 00 push $0x0 10b645: 8d 43 14 lea 0x14(%ebx),%eax 10b648: 50 push %eax 10b649: e8 22 0a 00 00 call 10c070 <_CORE_mutex_Flush> 10b64e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b651: 83 ec 08 sub $0x8,%esp 10b654: 53 push %ebx 10b655: 68 80 53 12 00 push $0x125380 10b65a: e8 a9 12 00 00 call 10c908 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b65f: 58 pop %eax 10b660: 5a pop %edx 10b661: 53 push %ebx 10b662: 68 80 53 12 00 push $0x125380 10b667: e8 98 15 00 00 call 10cc04 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b66c: e8 37 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b671: 83 c4 10 add $0x10,%esp 10b674: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b676: 8b 5d fc mov -0x4(%ebp),%ebx 10b679: c9 leave 10b67a: c3 ret 10b67b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b67c: 51 push %ecx 10b67d: 6a 02 push $0x2 10b67f: 6a 00 push $0x0 10b681: 8d 43 14 lea 0x14(%ebx),%eax 10b684: 50 push %eax 10b685: e8 76 0c 00 00 call 10c300 <_CORE_semaphore_Flush> 10b68a: 83 c4 10 add $0x10,%esp 10b68d: eb c2 jmp 10b651 =============================================================================== 0010b690 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 57 push %edi 10b694: 56 push %esi 10b695: 53 push %ebx 10b696: 83 ec 1c sub $0x1c,%esp 10b699: 8b 5d 08 mov 0x8(%ebp),%ebx 10b69c: 8b 75 0c mov 0xc(%ebp),%esi 10b69f: 8b 7d 10 mov 0x10(%ebp),%edi register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); 10b6a2: 8d 45 e0 lea -0x20(%ebp),%eax Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 10b6a5: 50 push %eax 10b6a6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 80 53 12 00 push $0x125380 10b6b0: e8 37 16 00 00 call 10ccec <_Objects_Get_isr_disable> switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6bb: 85 c9 test %ecx,%ecx 10b6bd: 74 0d je 10b6cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6bf: b8 04 00 00 00 mov $0x4,%eax } 10b6c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6c7: 5b pop %ebx 10b6c8: 5e pop %esi 10b6c9: 5f pop %edi 10b6ca: c9 leave 10b6cb: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 74 36 je 10b708 _CORE_mutex_Seize( 10b6d2: 83 ec 0c sub $0xc,%esp 10b6d5: ff 75 e0 pushl -0x20(%ebp) 10b6d8: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b6d9: 83 e6 01 and $0x1,%esi 10b6dc: 83 f6 01 xor $0x1,%esi 10b6df: 56 push %esi 10b6e0: 53 push %ebx 10b6e1: 83 c0 14 add $0x14,%eax 10b6e4: 50 push %eax 10b6e5: e8 8a 0a 00 00 call 10c174 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6ea: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b6ed: a1 d8 56 12 00 mov 0x1256d8,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6f2: ff 70 34 pushl 0x34(%eax) 10b6f5: e8 12 01 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b6fa: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b6fd: 8d 65 f4 lea -0xc(%ebp),%esp 10b700: 5b pop %ebx 10b701: 5e pop %esi 10b702: 5f pop %edi 10b703: c9 leave 10b704: c3 ret 10b705: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b708: 8b 15 d8 56 12 00 mov 0x1256d8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b70e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b715: 8b 48 5c mov 0x5c(%eax),%ecx 10b718: 85 c9 test %ecx,%ecx 10b71a: 75 2c jne 10b748 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b71c: 83 e6 01 and $0x1,%esi 10b71f: 74 33 je 10b754 _ISR_Enable( *level_p ); 10b721: ff 75 e0 pushl -0x20(%ebp) 10b724: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b725: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b72c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b72f: a1 d8 56 12 00 mov 0x1256d8,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b734: ff 70 34 pushl 0x34(%eax) 10b737: e8 e0 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b73c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b73f: 8d 65 f4 lea -0xc(%ebp),%esp 10b742: 5b pop %ebx 10b743: 5e pop %esi 10b744: 5f pop %edi 10b745: c9 leave 10b746: c3 ret 10b747: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b748: 49 dec %ecx 10b749: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b74c: ff 75 e0 pushl -0x20(%ebp) 10b74f: 9d popf 10b750: eb da jmp 10b72c 10b752: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b754: 8b 0d 34 54 12 00 mov 0x125434,%ecx 10b75a: 41 inc %ecx 10b75b: 89 0d 34 54 12 00 mov %ecx,0x125434 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; 10b761: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b768: 83 c0 14 add $0x14,%eax 10b76b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b76e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b771: ff 75 e0 pushl -0x20(%ebp) 10b774: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b775: 52 push %edx 10b776: 68 b8 dd 10 00 push $0x10ddb8 10b77b: 57 push %edi 10b77c: 50 push %eax 10b77d: e8 e6 22 00 00 call 10da68 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b782: e8 21 1e 00 00 call 10d5a8 <_Thread_Enable_dispatch> 10b787: 83 c4 10 add $0x10,%esp 10b78a: eb a0 jmp 10b72c =============================================================================== 0010b78c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b78c: 55 push %ebp 10b78d: 89 e5 mov %esp,%ebp 10b78f: 53 push %ebx 10b790: 83 ec 18 sub $0x18,%esp 10b793: 8b 5d 08 mov 0x8(%ebp),%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); 10b796: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b799: 50 push %eax 10b79a: 53 push %ebx 10b79b: 68 80 53 12 00 push $0x125380 10b7a0: e8 9f 15 00 00 call 10cd44 <_Objects_Get> switch ( location ) { 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7ab: 85 d2 test %edx,%edx 10b7ad: 74 0d je 10b7bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b7af: b8 04 00 00 00 mov $0x4,%eax } 10b7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7b7: c9 leave 10b7b8: c3 ret 10b7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b7bc: f6 40 10 30 testb $0x30,0x10(%eax) 10b7c0: 75 26 jne 10b7e8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b7c2: 52 push %edx 10b7c3: 6a 00 push $0x0 10b7c5: 53 push %ebx 10b7c6: 83 c0 14 add $0x14,%eax 10b7c9: 50 push %eax 10b7ca: e8 7d 0b 00 00 call 10c34c <_CORE_semaphore_Surrender> 10b7cf: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7d1: e8 d2 1d 00 00 call 10d5a8 <_Thread_Enable_dispatch> return 10b7d6: 89 1c 24 mov %ebx,(%esp) 10b7d9: e8 3e 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b7de: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e4: c9 leave 10b7e5: c3 ret 10b7e6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b7e8: 51 push %ecx 10b7e9: 6a 00 push $0x0 10b7eb: 53 push %ebx 10b7ec: 83 c0 14 add $0x14,%eax 10b7ef: 50 push %eax 10b7f0: e8 1f 0a 00 00 call 10c214 <_CORE_mutex_Surrender> 10b7f5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7f7: e8 ac 1d 00 00 call 10d5a8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b7fc: 89 1c 24 mov %ebx,(%esp) 10b7ff: e8 08 00 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b804: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: c3 ret =============================================================================== 0011da60 : */ void rtems_shutdown_executive( uint32_t result ) { 11da60: 55 push %ebp 11da61: 89 e5 mov %esp,%ebp 11da63: 83 ec 08 sub $0x8,%esp if ( _System_state_Is_up( _System_state_Get() ) ) { 11da66: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 11da6d: 74 0d je 11da7c _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 11da6f: 50 push %eax 11da70: 6a 14 push $0x14 11da72: 6a 01 push $0x1 11da74: 6a 00 push $0x0 11da76: e8 81 ed fe ff call 10c7fc <_Internal_error_Occurred> 11da7b: 90 nop <== NOT EXECUTED 11da7c: c7 05 e0 55 12 00 04 movl $0x4,0x1255e0 11da83: 00 00 00 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 11da86: 83 ec 0c sub $0xc,%esp 11da89: 68 1c 54 12 00 push $0x12541c 11da8e: e8 2a 0d ff ff call 10e7bd <_CPU_Context_restore> =============================================================================== 0010c7a4 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c7a4: 55 push %ebp 10c7a5: 89 e5 mov %esp,%ebp 10c7a7: 83 ec 08 sub $0x8,%esp 10c7aa: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10c7ad: a1 38 8b 12 00 mov 0x128b38,%eax 10c7b2: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c7b8: 8b 0d 94 88 12 00 mov 0x128894,%ecx 10c7be: 41 inc %ecx 10c7bf: 89 0d 94 88 12 00 mov %ecx,0x128894 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c7c5: 85 d2 test %edx,%edx 10c7c7: 74 13 je 10c7dc asr->mode_set = mode_set; 10c7c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7cc: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c7cf: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c7d2: e8 2d 21 00 00 call 10e904 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c7d7: 31 c0 xor %eax,%eax 10c7d9: c9 leave 10c7da: c3 ret 10c7db: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c7dc: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c7e0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c7e7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c7ee: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c7f5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c7fc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c803: e8 fc 20 00 00 call 10e904 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c808: 31 c0 xor %eax,%eax 10c80a: c9 leave 10c80b: c3 ret =============================================================================== 00117d3c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117d3c: 55 push %ebp 117d3d: 89 e5 mov %esp,%ebp 117d3f: 53 push %ebx 117d40: 83 ec 14 sub $0x14,%esp 117d43: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 117d46: 85 db test %ebx,%ebx 117d48: 75 0a jne 117d54 return RTEMS_INVALID_NUMBER; 117d4a: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4f: 8b 5d fc mov -0x4(%ebp),%ebx 117d52: c9 leave 117d53: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117d54: 83 ec 08 sub $0x8,%esp 117d57: 8d 45 f4 lea -0xc(%ebp),%eax 117d5a: 50 push %eax 117d5b: ff 75 08 pushl 0x8(%ebp) 117d5e: e8 6d 3c 00 00 call 11b9d0 <_Thread_Get> switch ( location ) { 117d63: 83 c4 10 add $0x10,%esp 117d66: 8b 55 f4 mov -0xc(%ebp),%edx 117d69: 85 d2 test %edx,%edx 117d6b: 74 0b je 117d78 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d6d: b8 04 00 00 00 mov $0x4,%eax } 117d72: 8b 5d fc mov -0x4(%ebp),%ebx 117d75: c9 leave 117d76: c3 ret 117d77: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117d78: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117d7e: 8b 4a 0c mov 0xc(%edx),%ecx 117d81: 85 c9 test %ecx,%ecx 117d83: 74 3f je 117dc4 if ( asr->is_enabled ) { 117d85: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117d89: 74 25 je 117db0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117d8b: 9c pushf 117d8c: fa cli 117d8d: 59 pop %ecx *signal_set |= signals; 117d8e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117d91: 51 push %ecx 117d92: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117d93: 8b 15 34 0c 14 00 mov 0x140c34,%edx 117d99: 85 d2 test %edx,%edx 117d9b: 74 1b je 117db8 117d9d: 3b 05 38 0c 14 00 cmp 0x140c38,%eax 117da3: 75 13 jne 117db8 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117da5: c6 05 44 0c 14 00 01 movb $0x1,0x140c44 117dac: eb 0a jmp 117db8 117dae: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117db0: 9c pushf 117db1: fa cli 117db2: 58 pop %eax *signal_set |= signals; 117db3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117db6: 50 push %eax 117db7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117db8: e8 ef 3b 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117dbd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117dbf: 8b 5d fc mov -0x4(%ebp),%ebx 117dc2: c9 leave 117dc3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117dc4: e8 e3 3b 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117dc9: b8 0b 00 00 00 mov $0xb,%eax 117dce: e9 7c ff ff ff jmp 117d4f =============================================================================== 001079e0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 1079e0: 55 push %ebp 1079e1: 89 e5 mov %esp,%ebp 1079e3: 57 push %edi 1079e4: 56 push %esi 1079e5: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 1079e8: 8b 48 08 mov 0x8(%eax),%ecx 1079eb: 85 c9 test %ecx,%ecx 1079ed: 74 15 je 107a04 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 1079ef: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 1079f5: 83 c7 08 add $0x8,%edi 1079f8: be 80 66 12 00 mov $0x126680,%esi 1079fd: b9 04 00 00 00 mov $0x4,%ecx 107a02: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107a04: 5e pop %esi 107a05: 5f pop %edi 107a06: c9 leave 107a07: c3 ret =============================================================================== 001079b8 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 1079b8: 55 push %ebp 1079b9: 89 e5 mov %esp,%ebp 1079bb: 57 push %edi 1079bc: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 1079bf: e8 88 ff ff ff call 10794c if (the_thread) 1079c4: 85 ff test %edi,%edi 1079c6: 74 12 je 1079da <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 1079c8: 8b 8f c0 00 00 00 mov 0xc0(%edi),%ecx 1079ce: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx 1079d4: b0 a5 mov $0xa5,%al 1079d6: 89 d7 mov %edx,%edi 1079d8: f3 aa rep stos %al,%es:(%edi) return true; } 1079da: b0 01 mov $0x1,%al 1079dc: 5f pop %edi 1079dd: c9 leave 1079de: c3 ret =============================================================================== 00107b1c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 107b1c: 55 push %ebp 107b1d: 89 e5 mov %esp,%ebp 107b1f: 57 push %edi 107b20: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107b21: a1 b8 6a 12 00 mov 0x126ab8,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107b26: 8b b0 c4 00 00 00 mov 0xc4(%eax),%esi 107b2c: 39 f5 cmp %esi,%ebp 107b2e: 72 3c jb 107b6c <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107b30: 8b 80 c0 00 00 00 mov 0xc0(%eax),%eax 107b36: 8d 04 06 lea (%esi,%eax,1),%eax } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 107b39: 39 c5 cmp %eax,%ebp 107b3b: 0f 96 c0 setbe %al /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107b3e: 8b 15 50 63 12 00 mov 0x126350,%edx 107b44: 85 d2 test %edx,%edx 107b46: 74 30 je 107b78 <== NEVER TAKEN pattern_ok = (!memcmp( (void *) Stack_check_Get_pattern_area(the_stack)->pattern, 107b48: 83 c6 08 add $0x8,%esi /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 107b4b: bf 80 66 12 00 mov $0x126680,%edi 107b50: b9 10 00 00 00 mov $0x10,%ecx 107b55: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107b57: 0f 94 c2 sete %dl /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 107b5a: 84 c0 test %al,%al 107b5c: 74 1e je 107b7c <== NEVER TAKEN 107b5e: 84 d2 test %dl,%dl 107b60: 74 1a je 107b7c <== NEVER TAKEN /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 107b62: 31 c0 xor %eax,%eax 107b64: 8d 65 f8 lea -0x8(%ebp),%esp 107b67: 5e pop %esi 107b68: 5f pop %edi 107b69: c9 leave 107b6a: c3 ret 107b6b: 90 nop <== NOT EXECUTED { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 107b6c: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107b6e: 8b 15 50 63 12 00 mov 0x126350,%edx <== NOT EXECUTED 107b74: 85 d2 test %edx,%edx <== NOT EXECUTED 107b76: 75 d0 jne 107b48 <== NOT EXECUTED */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; 107b78: b2 01 mov $0x1,%dl <== NOT EXECUTED 107b7a: eb de jmp 107b5a <== NOT EXECUTED /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 107b7c: 57 push %edi <== NOT EXECUTED 107b7d: 57 push %edi <== NOT EXECUTED 107b7e: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107b81: 52 push %edx <== NOT EXECUTED 107b82: ff 35 b8 6a 12 00 pushl 0x126ab8 <== NOT EXECUTED 107b88: e8 7b fe ff ff call 107a08 <== NOT EXECUTED =============================================================================== 00107bf8 : void rtems_stack_checker_report_usage( void ) { 107bf8: 55 push %ebp <== NOT EXECUTED 107bf9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107bfb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 107bfe: 68 a4 92 10 00 push $0x1092a4 <== NOT EXECUTED 107c03: 6a 00 push $0x0 <== NOT EXECUTED 107c05: e8 86 ff ff ff call 107b90 <== NOT EXECUTED 107c0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107c0d: c9 leave <== NOT EXECUTED 107c0e: c3 ret <== NOT EXECUTED =============================================================================== 00107b90 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107b90: 55 push %ebp <== NOT EXECUTED 107b91: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107b93: 56 push %esi <== NOT EXECUTED 107b94: 53 push %ebx <== NOT EXECUTED 107b95: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107b98: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED if ( !print ) 107b9b: 85 db test %ebx,%ebx <== NOT EXECUTED 107b9d: 74 50 je 107bef <== NOT EXECUTED return; print_context = context; 107b9f: 89 35 48 63 12 00 mov %esi,0x126348 <== NOT EXECUTED print_handler = print; 107ba5: 89 1d 4c 63 12 00 mov %ebx,0x12634c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 107bab: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107bae: 68 cc fe 11 00 push $0x11fecc <== NOT EXECUTED 107bb3: 56 push %esi <== NOT EXECUTED 107bb4: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107bb6: 59 pop %ecx <== NOT EXECUTED 107bb7: 58 pop %eax <== NOT EXECUTED 107bb8: 68 50 ff 11 00 push $0x11ff50 <== NOT EXECUTED 107bbd: 56 push %esi <== NOT EXECUTED 107bbe: ff d3 call *%ebx <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 107bc0: c7 04 24 e0 77 10 00 movl $0x1077e0,(%esp) <== NOT EXECUTED 107bc7: e8 ac 50 00 00 call 10cc78 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 107bcc: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 107bd3: e8 08 fc ff ff call 1077e0 <== NOT EXECUTED #endif print_context = NULL; 107bd8: c7 05 48 63 12 00 00 movl $0x0,0x126348 <== NOT EXECUTED 107bdf: 00 00 00 print_handler = NULL; 107be2: c7 05 4c 63 12 00 00 movl $0x0,0x12634c <== NOT EXECUTED 107be9: 00 00 00 107bec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107bef: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107bf2: 5b pop %ebx <== NOT EXECUTED 107bf3: 5e pop %esi <== NOT EXECUTED 107bf4: c9 leave <== NOT EXECUTED 107bf5: c3 ret <== NOT EXECUTED =============================================================================== 00107ac4 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 107ac4: 55 push %ebp 107ac5: 89 e5 mov %esp,%ebp 107ac7: 57 push %edi 107ac8: 56 push %esi 107ac9: 8b 45 08 mov 0x8(%ebp),%eax Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 107acc: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 107ad2: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107ad5: 39 d5 cmp %edx,%ebp 107ad7: 72 0a jb 107ae3 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107ad9: 03 90 c0 00 00 00 add 0xc0(%eax),%edx 107adf: 39 d5 cmp %edx,%ebp 107ae1: 76 1d jbe 107b00 <== ALWAYS TAKEN /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 107ae3: bf 80 66 12 00 mov $0x126680,%edi <== NOT EXECUTED 107ae8: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 107aed: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 107aef: 0f 94 c2 sete %dl <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 107af2: 56 push %esi <== NOT EXECUTED 107af3: 56 push %esi <== NOT EXECUTED 107af4: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107af7: 52 push %edx <== NOT EXECUTED 107af8: 50 push %eax <== NOT EXECUTED 107af9: e8 0a ff ff ff call 107a08 <== NOT EXECUTED 107afe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 107b00: bf 80 66 12 00 mov $0x126680,%edi 107b05: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107b0a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107b0c: 75 07 jne 107b15 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); } } 107b0e: 8d 65 f8 lea -0x8(%ebp),%esp 107b11: 5e pop %esi 107b12: 5f pop %edi 107b13: c9 leave 107b14: c3 ret sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107b15: 31 d2 xor %edx,%edx <== NOT EXECUTED 107b17: eb d9 jmp 107af2 <== NOT EXECUTED =============================================================================== 001108e0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1108e0: 55 push %ebp 1108e1: 89 e5 mov %esp,%ebp 1108e3: 57 push %edi 1108e4: 56 push %esi 1108e5: 53 push %ebx 1108e6: 83 ec 2c sub $0x2c,%esp 1108e9: 8b 75 08 mov 0x8(%ebp),%esi 1108ec: 8b 5d 0c mov 0xc(%ebp),%ebx 1108ef: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1108f2: 85 db test %ebx,%ebx 1108f4: 74 72 je 110968 return RTEMS_INVALID_ADDRESS; errno = 0; 1108f6: e8 5d 21 00 00 call 112a58 <__errno> 1108fb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110901: c7 03 00 00 00 00 movl $0x0,(%ebx) 110907: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 11090e: 83 ec 08 sub $0x8,%esp 110911: 8d 45 e4 lea -0x1c(%ebp),%eax 110914: 50 push %eax 110915: 56 push %esi 110916: e8 39 4b 00 00 call 115454 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 11091b: 83 c4 10 add $0x10,%esp 11091e: 85 ff test %edi,%edi 110920: 74 56 je 110978 *endptr = end; 110922: 8b 45 e4 mov -0x1c(%ebp),%eax 110925: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110927: 39 c6 cmp %eax,%esi 110929: 74 55 je 110980 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11092b: dd 05 50 43 12 00 fldl 0x124350 110931: d9 c9 fxch %st(1) 110933: dd e1 fucom %st(1) 110935: df e0 fnstsw %ax 110937: dd d9 fstp %st(1) 110939: f6 c4 45 test $0x45,%ah 11093c: 74 0e je 11094c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 11093e: dd 1b fstpl (%ebx) #endif return RTEMS_SUCCESSFUL; 110940: 31 c0 xor %eax,%eax } 110942: 8d 65 f4 lea -0xc(%ebp),%esp 110945: 5b pop %ebx 110946: 5e pop %esi 110947: 5f pop %edi 110948: c9 leave 110949: c3 ret 11094a: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11094c: dd 5d c8 fstpl -0x38(%ebp) 11094f: e8 04 21 00 00 call 112a58 <__errno> 110954: 83 38 22 cmpl $0x22,(%eax) 110957: dd 45 c8 fldl -0x38(%ebp) 11095a: 75 e2 jne 11093e <== NEVER TAKEN 11095c: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 11095e: b8 0a 00 00 00 mov $0xa,%eax 110963: eb dd jmp 110942 110965: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110968: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 11096d: 8d 65 f4 lea -0xc(%ebp),%esp 110970: 5b pop %ebx 110971: 5e pop %esi 110972: 5f pop %edi 110973: c9 leave 110974: c3 ret 110975: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110978: 8b 45 e4 mov -0x1c(%ebp),%eax 11097b: eb aa jmp 110927 11097d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110980: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110982: b8 0b 00 00 00 mov $0xb,%eax 110987: eb b9 jmp 110942 =============================================================================== 0011098c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11098c: 55 push %ebp 11098d: 89 e5 mov %esp,%ebp 11098f: 57 push %edi 110990: 56 push %esi 110991: 53 push %ebx 110992: 83 ec 2c sub $0x2c,%esp 110995: 8b 75 08 mov 0x8(%ebp),%esi 110998: 8b 5d 0c mov 0xc(%ebp),%ebx 11099b: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11099e: 85 db test %ebx,%ebx 1109a0: 74 6a je 110a0c return RTEMS_INVALID_ADDRESS; errno = 0; 1109a2: e8 b1 20 00 00 call 112a58 <__errno> 1109a7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1109ad: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 1109b3: 83 ec 08 sub $0x8,%esp 1109b6: 8d 45 e4 lea -0x1c(%ebp),%eax 1109b9: 50 push %eax 1109ba: 56 push %esi 1109bb: e8 b0 4a 00 00 call 115470 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1109c0: 83 c4 10 add $0x10,%esp 1109c3: 85 ff test %edi,%edi 1109c5: 74 55 je 110a1c *endptr = end; 1109c7: 8b 45 e4 mov -0x1c(%ebp),%eax 1109ca: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 1109cc: 39 c6 cmp %eax,%esi 1109ce: 74 54 je 110a24 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1109d0: d9 05 58 43 12 00 flds 0x124358 1109d6: d9 c9 fxch %st(1) 1109d8: dd e1 fucom %st(1) 1109da: df e0 fnstsw %ax 1109dc: dd d9 fstp %st(1) 1109de: f6 c4 45 test $0x45,%ah 1109e1: 74 0d je 1109f0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 1109e3: d9 1b fstps (%ebx) #endif return RTEMS_SUCCESSFUL; 1109e5: 31 c0 xor %eax,%eax } 1109e7: 8d 65 f4 lea -0xc(%ebp),%esp 1109ea: 5b pop %ebx 1109eb: 5e pop %esi 1109ec: 5f pop %edi 1109ed: c9 leave 1109ee: c3 ret 1109ef: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1109f0: d9 5d c8 fstps -0x38(%ebp) 1109f3: e8 60 20 00 00 call 112a58 <__errno> 1109f8: 83 38 22 cmpl $0x22,(%eax) 1109fb: d9 45 c8 flds -0x38(%ebp) 1109fe: 75 e3 jne 1109e3 <== NEVER TAKEN 110a00: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 110a02: b8 0a 00 00 00 mov $0xa,%eax 110a07: eb de jmp 1109e7 110a09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110a0c: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110a11: 8d 65 f4 lea -0xc(%ebp),%esp 110a14: 5b pop %ebx 110a15: 5e pop %esi 110a16: 5f pop %edi 110a17: c9 leave 110a18: c3 ret 110a19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110a1c: 8b 45 e4 mov -0x1c(%ebp),%eax 110a1f: eb ab jmp 1109cc 110a21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110a24: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110a26: b8 0b 00 00 00 mov $0xb,%eax 110a2b: eb ba jmp 1109e7 =============================================================================== 00110a30 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110a30: 55 push %ebp 110a31: 89 e5 mov %esp,%ebp 110a33: 57 push %edi 110a34: 56 push %esi 110a35: 53 push %ebx 110a36: 83 ec 2c sub $0x2c,%esp 110a39: 8b 75 08 mov 0x8(%ebp),%esi 110a3c: 8b 5d 0c mov 0xc(%ebp),%ebx 110a3f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110a42: 85 db test %ebx,%ebx 110a44: 74 5e je 110aa4 return RTEMS_INVALID_ADDRESS; errno = 0; 110a46: e8 0d 20 00 00 call 112a58 <__errno> 110a4b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110a51: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110a57: 50 push %eax 110a58: ff 75 14 pushl 0x14(%ebp) 110a5b: 8d 45 e4 lea -0x1c(%ebp),%eax 110a5e: 50 push %eax 110a5f: 56 push %esi 110a60: e8 cf 4b 00 00 call 115634 110a65: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110a67: 83 c4 10 add $0x10,%esp 110a6a: 85 ff test %edi,%edi 110a6c: 74 46 je 110ab4 *endptr = end; 110a6e: 8b 45 e4 mov -0x1c(%ebp),%eax 110a71: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110a73: 39 c6 cmp %eax,%esi 110a75: 74 45 je 110abc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110a77: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 110a7d: 74 0d je 110a8c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110a7f: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110a81: 31 c0 xor %eax,%eax } 110a83: 8d 65 f4 lea -0xc(%ebp),%esp 110a86: 5b pop %ebx 110a87: 5e pop %esi 110a88: 5f pop %edi 110a89: c9 leave 110a8a: c3 ret 110a8b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110a8c: 89 55 d4 mov %edx,-0x2c(%ebp) 110a8f: e8 c4 1f 00 00 call 112a58 <__errno> 110a94: 83 38 22 cmpl $0x22,(%eax) 110a97: 8b 55 d4 mov -0x2c(%ebp),%edx 110a9a: 75 e3 jne 110a7f return RTEMS_INVALID_NUMBER; 110a9c: b8 0a 00 00 00 mov $0xa,%eax 110aa1: eb e0 jmp 110a83 110aa3: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110aa4: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110aa9: 8d 65 f4 lea -0xc(%ebp),%esp 110aac: 5b pop %ebx 110aad: 5e pop %esi 110aae: 5f pop %edi 110aaf: c9 leave 110ab0: c3 ret 110ab1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ab4: 8b 45 e4 mov -0x1c(%ebp),%eax 110ab7: eb ba jmp 110a73 110ab9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110abc: b8 0b 00 00 00 mov $0xb,%eax 110ac1: eb c0 jmp 110a83 =============================================================================== 00110b74 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110b74: 55 push %ebp 110b75: 89 e5 mov %esp,%ebp 110b77: 57 push %edi 110b78: 56 push %esi 110b79: 53 push %ebx 110b7a: 83 ec 1c sub $0x1c,%esp 110b7d: 8b 7d 08 mov 0x8(%ebp),%edi 110b80: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110b83: 85 db test %ebx,%ebx 110b85: 74 69 je 110bf0 return RTEMS_INVALID_ADDRESS; errno = 0; 110b87: e8 cc 1e 00 00 call 112a58 <__errno> 110b8c: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110b92: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110b98: 52 push %edx 110b99: ff 75 14 pushl 0x14(%ebp) 110b9c: 8d 45 e4 lea -0x1c(%ebp),%eax 110b9f: 50 push %eax 110ba0: 57 push %edi 110ba1: e8 8e 4a 00 00 call 115634 110ba6: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ba8: 83 c4 10 add $0x10,%esp 110bab: 8b 45 10 mov 0x10(%ebp),%eax 110bae: 85 c0 test %eax,%eax 110bb0: 74 4e je 110c00 *endptr = end; 110bb2: 8b 45 e4 mov -0x1c(%ebp),%eax 110bb5: 8b 55 10 mov 0x10(%ebp),%edx 110bb8: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 110bba: 39 c7 cmp %eax,%edi 110bbc: 74 4a je 110c08 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110bbe: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 110bc4: 74 16 je 110bdc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110bc6: 81 fe 00 00 00 80 cmp $0x80000000,%esi 110bcc: 74 0e je 110bdc #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110bce: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 110bd0: 31 c0 xor %eax,%eax } 110bd2: 8d 65 f4 lea -0xc(%ebp),%esp 110bd5: 5b pop %ebx 110bd6: 5e pop %esi 110bd7: 5f pop %edi 110bd8: c9 leave 110bd9: c3 ret 110bda: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110bdc: e8 77 1e 00 00 call 112a58 <__errno> 110be1: 83 38 22 cmpl $0x22,(%eax) 110be4: 75 e8 jne 110bce return RTEMS_INVALID_NUMBER; 110be6: b8 0a 00 00 00 mov $0xa,%eax 110beb: eb e5 jmp 110bd2 110bed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110bf0: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110bf5: 8d 65 f4 lea -0xc(%ebp),%esp 110bf8: 5b pop %ebx 110bf9: 5e pop %esi 110bfa: 5f pop %edi 110bfb: c9 leave 110bfc: c3 ret 110bfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110c00: 8b 45 e4 mov -0x1c(%ebp),%eax 110c03: eb b5 jmp 110bba 110c05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110c08: b8 0b 00 00 00 mov $0xb,%eax 110c0d: eb c3 jmp 110bd2 =============================================================================== 00110ac4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110ac4: 55 push %ebp 110ac5: 89 e5 mov %esp,%ebp 110ac7: 57 push %edi 110ac8: 56 push %esi 110ac9: 53 push %ebx 110aca: 83 ec 2c sub $0x2c,%esp 110acd: 8b 5d 0c mov 0xc(%ebp),%ebx 110ad0: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110ad3: 85 db test %ebx,%ebx 110ad5: 74 7d je 110b54 return RTEMS_INVALID_ADDRESS; errno = 0; 110ad7: e8 7c 1f 00 00 call 112a58 <__errno> 110adc: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110ae2: c7 03 00 00 00 00 movl $0x0,(%ebx) 110ae8: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110aef: 50 push %eax 110af0: ff 75 14 pushl 0x14(%ebp) 110af3: 8d 45 e4 lea -0x1c(%ebp),%eax 110af6: 50 push %eax 110af7: ff 75 08 pushl 0x8(%ebp) 110afa: e8 51 4b 00 00 call 115650 110aff: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110b01: 83 c4 10 add $0x10,%esp 110b04: 85 ff test %edi,%edi 110b06: 74 5c je 110b64 *endptr = end; 110b08: 8b 45 e4 mov -0x1c(%ebp),%eax 110b0b: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110b0d: 39 45 08 cmp %eax,0x8(%ebp) 110b10: 74 5a je 110b6c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110b12: 89 d1 mov %edx,%ecx 110b14: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 110b1a: 89 f0 mov %esi,%eax 110b1c: f7 d0 not %eax 110b1e: 09 c1 or %eax,%ecx 110b20: 74 1a je 110b3c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110b22: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 110b28: 09 f0 or %esi,%eax 110b2a: 74 10 je 110b3c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110b2c: 89 33 mov %esi,(%ebx) 110b2e: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110b31: 31 c0 xor %eax,%eax } 110b33: 8d 65 f4 lea -0xc(%ebp),%esp 110b36: 5b pop %ebx 110b37: 5e pop %esi 110b38: 5f pop %edi 110b39: c9 leave 110b3a: c3 ret 110b3b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110b3c: 89 55 d4 mov %edx,-0x2c(%ebp) 110b3f: e8 14 1f 00 00 call 112a58 <__errno> 110b44: 83 38 22 cmpl $0x22,(%eax) 110b47: 8b 55 d4 mov -0x2c(%ebp),%edx 110b4a: 75 e0 jne 110b2c return RTEMS_INVALID_NUMBER; 110b4c: b8 0a 00 00 00 mov $0xa,%eax 110b51: eb e0 jmp 110b33 110b53: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110b54: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110b59: 8d 65 f4 lea -0xc(%ebp),%esp 110b5c: 5b pop %ebx 110b5d: 5e pop %esi 110b5e: 5f pop %edi 110b5f: c9 leave 110b60: c3 ret 110b61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110b64: 8b 45 e4 mov -0x1c(%ebp),%eax 110b67: eb a4 jmp 110b0d 110b69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110b6c: b8 0b 00 00 00 mov $0xb,%eax 110b71: eb c0 jmp 110b33 =============================================================================== 00110c10 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110c10: 55 push %ebp 110c11: 89 e5 mov %esp,%ebp 110c13: 57 push %edi 110c14: 56 push %esi 110c15: 53 push %ebx 110c16: 83 ec 2c sub $0x2c,%esp 110c19: 8b 75 08 mov 0x8(%ebp),%esi 110c1c: 8b 5d 0c mov 0xc(%ebp),%ebx 110c1f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110c22: 85 db test %ebx,%ebx 110c24: 74 5a je 110c80 return RTEMS_INVALID_ADDRESS; errno = 0; 110c26: e8 2d 1e 00 00 call 112a58 <__errno> 110c2b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110c31: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 110c37: 50 push %eax 110c38: 6a 10 push $0x10 110c3a: 8d 45 e4 lea -0x1c(%ebp),%eax 110c3d: 50 push %eax 110c3e: 56 push %esi 110c3f: e8 b8 4e 00 00 call 115afc 110c44: 89 c2 mov %eax,%edx #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110c46: 83 c4 10 add $0x10,%esp 110c49: 85 ff test %edi,%edi 110c4b: 74 43 je 110c90 *endptr = end; 110c4d: 8b 45 e4 mov -0x1c(%ebp),%eax 110c50: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110c52: 39 c6 cmp %eax,%esi 110c54: 74 42 je 110c98 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110c56: 83 fa ff cmp $0xffffffff,%edx 110c59: 74 0d je 110c68 <== NEVER TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 110c5b: 89 13 mov %edx,(%ebx) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 110c5d: 31 c0 xor %eax,%eax } 110c5f: 8d 65 f4 lea -0xc(%ebp),%esp 110c62: 5b pop %ebx 110c63: 5e pop %esi 110c64: 5f pop %edi 110c65: c9 leave 110c66: c3 ret 110c67: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110c68: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 110c6b: e8 e8 1d 00 00 call 112a58 <__errno> <== NOT EXECUTED 110c70: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED 110c73: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 110c76: 75 e3 jne 110c5b <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 110c78: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 110c7d: eb e0 jmp 110c5f <== NOT EXECUTED 110c7f: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110c80: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110c85: 8d 65 f4 lea -0xc(%ebp),%esp 110c88: 5b pop %ebx 110c89: 5e pop %esi 110c8a: 5f pop %edi 110c8b: c9 leave 110c8c: c3 ret 110c8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110c90: 8b 45 e4 mov -0x1c(%ebp),%eax 110c93: eb bd jmp 110c52 110c95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110c98: b8 0b 00 00 00 mov $0xb,%eax 110c9d: eb c0 jmp 110c5f =============================================================================== 00110ca0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110ca0: 55 push %ebp 110ca1: 89 e5 mov %esp,%ebp 110ca3: 57 push %edi 110ca4: 56 push %esi 110ca5: 53 push %ebx 110ca6: 83 ec 1c sub $0x1c,%esp 110ca9: 8b 75 08 mov 0x8(%ebp),%esi 110cac: 8b 5d 0c mov 0xc(%ebp),%ebx 110caf: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110cb2: 85 db test %ebx,%ebx 110cb4: 74 3a je 110cf0 return RTEMS_INVALID_ADDRESS; errno = 0; 110cb6: e8 9d 1d 00 00 call 112a58 <__errno> 110cbb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110cc1: c6 03 00 movb $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110cc4: 50 push %eax 110cc5: ff 75 14 pushl 0x14(%ebp) 110cc8: 8d 45 e4 lea -0x1c(%ebp),%eax 110ccb: 50 push %eax 110ccc: 56 push %esi 110ccd: e8 2a 4e 00 00 call 115afc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110cd2: 83 c4 10 add $0x10,%esp 110cd5: 85 ff test %edi,%edi 110cd7: 74 27 je 110d00 *endptr = end; 110cd9: 8b 55 e4 mov -0x1c(%ebp),%edx 110cdc: 89 17 mov %edx,(%edi) /* nothing was converted */ if ( end == s ) 110cde: 39 d6 cmp %edx,%esi 110ce0: 74 26 je 110d08 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110ce2: 88 03 mov %al,(%ebx) #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 110ce4: 31 c0 xor %eax,%eax } 110ce6: 8d 65 f4 lea -0xc(%ebp),%esp 110ce9: 5b pop %ebx 110cea: 5e pop %esi 110ceb: 5f pop %edi 110cec: c9 leave 110ced: c3 ret 110cee: 66 90 xchg %ax,%ax <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110cf0: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110cf5: 8d 65 f4 lea -0xc(%ebp),%esp 110cf8: 5b pop %ebx 110cf9: 5e pop %esi 110cfa: 5f pop %edi 110cfb: c9 leave 110cfc: c3 ret 110cfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110d00: 8b 55 e4 mov -0x1c(%ebp),%edx 110d03: eb d9 jmp 110cde 110d05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110d08: b8 0b 00 00 00 mov $0xb,%eax 110d0d: eb d7 jmp 110ce6 =============================================================================== 00110d10 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110d10: 55 push %ebp 110d11: 89 e5 mov %esp,%ebp 110d13: 57 push %edi 110d14: 56 push %esi 110d15: 53 push %ebx 110d16: 83 ec 2c sub $0x2c,%esp 110d19: 8b 75 08 mov 0x8(%ebp),%esi 110d1c: 8b 5d 0c mov 0xc(%ebp),%ebx 110d1f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110d22: 85 db test %ebx,%ebx 110d24: 74 5a je 110d80 return RTEMS_INVALID_ADDRESS; errno = 0; 110d26: e8 2d 1d 00 00 call 112a58 <__errno> 110d2b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110d31: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110d37: 50 push %eax 110d38: ff 75 14 pushl 0x14(%ebp) 110d3b: 8d 45 e4 lea -0x1c(%ebp),%eax 110d3e: 50 push %eax 110d3f: 56 push %esi 110d40: e8 b7 4d 00 00 call 115afc 110d45: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110d47: 83 c4 10 add $0x10,%esp 110d4a: 85 ff test %edi,%edi 110d4c: 74 42 je 110d90 *endptr = end; 110d4e: 8b 45 e4 mov -0x1c(%ebp),%eax 110d51: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110d53: 39 c6 cmp %eax,%esi 110d55: 74 41 je 110d98 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d57: 83 fa ff cmp $0xffffffff,%edx 110d5a: 74 0c je 110d68 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110d5c: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110d5e: 31 c0 xor %eax,%eax } 110d60: 8d 65 f4 lea -0xc(%ebp),%esp 110d63: 5b pop %ebx 110d64: 5e pop %esi 110d65: 5f pop %edi 110d66: c9 leave 110d67: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d68: 89 55 d4 mov %edx,-0x2c(%ebp) 110d6b: e8 e8 1c 00 00 call 112a58 <__errno> 110d70: 83 38 22 cmpl $0x22,(%eax) 110d73: 8b 55 d4 mov -0x2c(%ebp),%edx 110d76: 75 e4 jne 110d5c <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110d78: b8 0a 00 00 00 mov $0xa,%eax 110d7d: eb e1 jmp 110d60 110d7f: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110d80: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110d85: 8d 65 f4 lea -0xc(%ebp),%esp 110d88: 5b pop %ebx 110d89: 5e pop %esi 110d8a: 5f pop %edi 110d8b: c9 leave 110d8c: c3 ret 110d8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110d90: 8b 45 e4 mov -0x1c(%ebp),%eax 110d93: eb be jmp 110d53 110d95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110d98: b8 0b 00 00 00 mov $0xb,%eax 110d9d: eb c1 jmp 110d60 =============================================================================== 00110e3c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110e3c: 55 push %ebp 110e3d: 89 e5 mov %esp,%ebp 110e3f: 57 push %edi 110e40: 56 push %esi 110e41: 53 push %ebx 110e42: 83 ec 2c sub $0x2c,%esp 110e45: 8b 75 08 mov 0x8(%ebp),%esi 110e48: 8b 5d 0c mov 0xc(%ebp),%ebx 110e4b: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110e4e: 85 db test %ebx,%ebx 110e50: 74 5a je 110eac return RTEMS_INVALID_ADDRESS; errno = 0; 110e52: e8 01 1c 00 00 call 112a58 <__errno> 110e57: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110e5d: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110e63: 50 push %eax 110e64: ff 75 14 pushl 0x14(%ebp) 110e67: 8d 45 e4 lea -0x1c(%ebp),%eax 110e6a: 50 push %eax 110e6b: 56 push %esi 110e6c: e8 8b 4c 00 00 call 115afc 110e71: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110e73: 83 c4 10 add $0x10,%esp 110e76: 85 ff test %edi,%edi 110e78: 74 42 je 110ebc *endptr = end; 110e7a: 8b 45 e4 mov -0x1c(%ebp),%eax 110e7d: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110e7f: 39 c6 cmp %eax,%esi 110e81: 74 41 je 110ec4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110e83: 83 fa ff cmp $0xffffffff,%edx 110e86: 74 0c je 110e94 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110e88: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110e8a: 31 c0 xor %eax,%eax } 110e8c: 8d 65 f4 lea -0xc(%ebp),%esp 110e8f: 5b pop %ebx 110e90: 5e pop %esi 110e91: 5f pop %edi 110e92: c9 leave 110e93: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110e94: 89 55 d4 mov %edx,-0x2c(%ebp) 110e97: e8 bc 1b 00 00 call 112a58 <__errno> 110e9c: 83 38 22 cmpl $0x22,(%eax) 110e9f: 8b 55 d4 mov -0x2c(%ebp),%edx 110ea2: 75 e4 jne 110e88 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110ea4: b8 0a 00 00 00 mov $0xa,%eax 110ea9: eb e1 jmp 110e8c 110eab: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110eac: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110eb1: 8d 65 f4 lea -0xc(%ebp),%esp 110eb4: 5b pop %ebx 110eb5: 5e pop %esi 110eb6: 5f pop %edi 110eb7: c9 leave 110eb8: c3 ret 110eb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ebc: 8b 45 e4 mov -0x1c(%ebp),%eax 110ebf: eb be jmp 110e7f 110ec1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110ec4: b8 0b 00 00 00 mov $0xb,%eax 110ec9: eb c1 jmp 110e8c =============================================================================== 00110da0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110da0: 55 push %ebp 110da1: 89 e5 mov %esp,%ebp 110da3: 57 push %edi 110da4: 56 push %esi 110da5: 53 push %ebx 110da6: 83 ec 2c sub $0x2c,%esp 110da9: 8b 5d 0c mov 0xc(%ebp),%ebx 110dac: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110daf: 85 db test %ebx,%ebx 110db1: 74 69 je 110e1c return RTEMS_INVALID_ADDRESS; errno = 0; 110db3: e8 a0 1c 00 00 call 112a58 <__errno> 110db8: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110dbe: c7 03 00 00 00 00 movl $0x0,(%ebx) 110dc4: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 110dcb: 50 push %eax 110dcc: ff 75 14 pushl 0x14(%ebp) 110dcf: 8d 45 e4 lea -0x1c(%ebp),%eax 110dd2: 50 push %eax 110dd3: ff 75 08 pushl 0x8(%ebp) 110dd6: e8 3d 4d 00 00 call 115b18 110ddb: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ddd: 83 c4 10 add $0x10,%esp 110de0: 85 ff test %edi,%edi 110de2: 74 48 je 110e2c *endptr = end; 110de4: 8b 45 e4 mov -0x1c(%ebp),%eax 110de7: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110de9: 39 45 08 cmp %eax,0x8(%ebp) 110dec: 74 46 je 110e34 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110dee: 89 f0 mov %esi,%eax 110df0: 21 d0 and %edx,%eax 110df2: 40 inc %eax 110df3: 74 0f je 110e04 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110df5: 89 33 mov %esi,(%ebx) 110df7: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110dfa: 31 c0 xor %eax,%eax } 110dfc: 8d 65 f4 lea -0xc(%ebp),%esp 110dff: 5b pop %ebx 110e00: 5e pop %esi 110e01: 5f pop %edi 110e02: c9 leave 110e03: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110e04: 89 55 d4 mov %edx,-0x2c(%ebp) 110e07: e8 4c 1c 00 00 call 112a58 <__errno> 110e0c: 83 38 22 cmpl $0x22,(%eax) 110e0f: 8b 55 d4 mov -0x2c(%ebp),%edx 110e12: 75 e1 jne 110df5 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110e14: b8 0a 00 00 00 mov $0xa,%eax 110e19: eb e1 jmp 110dfc 110e1b: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110e1c: b8 09 00 00 00 mov $0x9,%eax *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 110e21: 8d 65 f4 lea -0xc(%ebp),%esp 110e24: 5b pop %ebx 110e25: 5e pop %esi 110e26: 5f pop %edi 110e27: c9 leave 110e28: c3 ret 110e29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110e2c: 8b 45 e4 mov -0x1c(%ebp),%eax 110e2f: eb b8 jmp 110de9 110e31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110e34: b8 0b 00 00 00 mov $0xb,%eax 110e39: eb c1 jmp 110dfc =============================================================================== 00107df4 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 107df4: 55 push %ebp 107df5: 89 e5 mov %esp,%ebp 107df7: 57 push %edi 107df8: 56 push %esi 107df9: 53 push %ebx 107dfa: 81 ec d8 01 00 00 sub $0x1d8,%esp int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 107e00: 31 c0 xor %eax,%eax 107e02: b9 ff ff ff ff mov $0xffffffff,%ecx 107e07: 8b 7d 08 mov 0x8(%ebp),%edi 107e0a: f2 ae repnz scas %es:(%edi),%al 107e0c: f7 d1 not %ecx 107e0e: 49 dec %ecx 107e0f: 6a 00 push $0x0 107e11: 8d 45 d0 lea -0x30(%ebp),%eax 107e14: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp) 107e1a: 50 push %eax 107e1b: 6a 00 push $0x0 107e1d: 51 push %ecx 107e1e: ff 75 08 pushl 0x8(%ebp) 107e21: e8 9a 0a 00 00 call 1088c0 107e26: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp) strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 107e2c: 83 c4 20 add $0x20,%esp 107e2f: 85 c0 test %eax,%eax 107e31: 0f 85 61 01 00 00 jne 107f98 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107e37: 8b 45 dc mov -0x24(%ebp),%eax 107e3a: 3d 60 4f 12 00 cmp $0x124f60,%eax 107e3f: 0f 85 47 01 00 00 jne 107f8c 107e45: 31 db xor %ebx,%ebx * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107e47: 8d 45 bc lea -0x44(%ebp),%eax 107e4a: 89 85 30 fe ff ff mov %eax,-0x1d0(%ebp) * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 107e50: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107e56: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp) 107e5c: eb 15 jmp 107e73 107e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED * IMFS_create_node was ONLY passed a NULL when we created the * root node. We added a new IMFS_create_root_node() so this * path no longer existed. The result was simpler code which * should not have this path. */ else if (linkflag == REGTYPE) { 107e60: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp) 107e67: 0f 84 43 01 00 00 je 107fb0 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107e6d: 8b 9d 54 fe ff ff mov -0x1ac(%ebp),%ebx /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 107e73: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax 107e79: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp) 107e7f: 8b 55 10 mov 0x10(%ebp),%edx 107e82: 39 d0 cmp %edx,%eax 107e84: 0f 87 18 01 00 00 ja 107fa2 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 107e8a: 03 5d 0c add 0xc(%ebp),%ebx offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 107e8d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi 107e93: bf a8 4f 12 00 mov $0x124fa8,%edi 107e98: b9 05 00 00 00 mov $0x5,%ecx 107e9d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107e9f: 0f 85 fd 00 00 00 jne 107fa2 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 107ea5: 57 push %edi 107ea6: 6a 63 push $0x63 107ea8: 53 push %ebx 107ea9: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107eaf: 50 push %eax 107eb0: e8 c7 e8 00 00 call 11677c filename[MAX_NAME_FIELD_SIZE] = '\0'; 107eb5: c6 45 bb 00 movb $0x0,-0x45(%ebp) linkflag = hdr_ptr[156]; 107eb9: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl 107ebf: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 107ec5: 59 pop %ecx 107ec6: 5e pop %esi 107ec7: 6a 08 push $0x8 107ec9: 8d 43 64 lea 0x64(%ebx),%eax 107ecc: 50 push %eax 107ecd: e8 3e 7a 00 00 call 10f910 <_rtems_octal2ulong> 107ed2: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp) file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 107ed8: 58 pop %eax 107ed9: 5a pop %edx 107eda: 6a 0c push $0xc 107edc: 8d 43 7c lea 0x7c(%ebx),%eax 107edf: 50 push %eax 107ee0: e8 2b 7a 00 00 call 10f910 <_rtems_octal2ulong> 107ee5: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp) hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 107eeb: 5e pop %esi 107eec: 5f pop %edi 107eed: 6a 08 push $0x8 107eef: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 107ef5: 50 push %eax 107ef6: e8 15 7a 00 00 call 10f910 <_rtems_octal2ulong> 107efb: 89 c6 mov %eax,%esi if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 107efd: 89 1c 24 mov %ebx,(%esp) 107f00: e8 df 7e 00 00 call 10fde4 <_rtems_tar_header_checksum> 107f05: 83 c4 10 add $0x10,%esp 107f08: 39 f0 cmp %esi,%eax 107f0a: 0f 85 92 00 00 00 jne 107fa2 <== NEVER TAKEN * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { 107f10: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp) 107f17: 0f 85 43 ff ff ff jne 107e60 strcpy(full_filename, mountpoint); 107f1d: 83 ec 08 sub $0x8,%esp 107f20: ff 75 08 pushl 0x8(%ebp) 107f23: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107f29: 50 push %eax 107f2a: e8 e5 e4 00 00 call 116414 if (full_filename[strlen(full_filename)-1] != '/') 107f2f: 31 c0 xor %eax,%eax 107f31: b9 ff ff ff ff mov $0xffffffff,%ecx 107f36: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi 107f3c: f2 ae repnz scas %es:(%edi),%al 107f3e: f7 d1 not %ecx 107f40: 49 dec %ecx 107f41: 83 c4 10 add $0x10,%esp 107f44: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1) 107f4b: 2f 107f4c: 74 0a je 107f58 <== ALWAYS TAKEN strcat(full_filename, "/"); 107f4e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED 107f55: ff 2f 00 strcat(full_filename, filename); 107f58: 83 ec 08 sub $0x8,%esp 107f5b: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx 107f61: 52 push %edx 107f62: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107f68: 50 push %eax 107f69: e8 f2 e2 00 00 call 116260 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 107f6e: 5a pop %edx 107f6f: 59 pop %ecx 107f70: 68 ff 01 00 00 push $0x1ff 107f75: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107f7b: 52 push %edx 107f7c: e8 fb 10 00 00 call 10907c 107f81: 83 c4 10 add $0x10,%esp 107f84: e9 e4 fe ff ff jmp 107e6d 107f89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107f8c: 3d e0 59 12 00 cmp $0x1259e0,%eax 107f91: 0f 84 ae fe ff ff je 107e45 <== NEVER TAKEN 107f97: 90 nop return -1; 107f98: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp) 107f9f: ff ff ff nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 107fa2: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax 107fa8: 8d 65 f4 lea -0xc(%ebp),%esp 107fab: 5b pop %ebx 107fac: 5e pop %esi 107fad: 5f pop %edi 107fae: c9 leave 107faf: c3 ret * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107fb0: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi 107fb6: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi 107fbc: b9 05 00 00 00 mov $0x5,%ecx 107fc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 107fc3: 50 push %eax 107fc4: 8d 45 e4 lea -0x1c(%ebp),%eax 107fc7: 50 push %eax 107fc8: 8d 55 bc lea -0x44(%ebp),%edx 107fcb: 52 push %edx 107fcc: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107fd2: 50 push %eax 107fd3: e8 88 85 00 00 call 110560 107fd8: 83 c4 10 add $0x10,%esp 107fdb: 85 c0 test %eax,%eax 107fdd: 74 1d je 107ffc <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 107fdf: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax 107fe5: 05 ff 01 00 00 add $0x1ff,%eax offset += 512 * nblocks; 107fea: 25 00 fe ff ff and $0xfffffe00,%eax 107fef: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp) 107ff5: e9 73 fe ff ff jmp 107e6d 107ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 107ffc: 83 ec 0c sub $0xc,%esp 107fff: 6a 00 push $0x0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 108001: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax 108007: 25 ff 01 00 00 and $0x1ff,%eax else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 10800c: 80 cc 80 or $0x80,%ah 10800f: 50 push %eax 108010: ff 75 e4 pushl -0x1c(%ebp) 108013: 6a 06 push $0x6 108015: 8d 55 bc lea -0x44(%ebp),%edx 108018: 52 push %edx 108019: e8 7a 7f 00 00 call 10ff98 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 10801e: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx 108024: 89 50 50 mov %edx,0x50(%eax) 108027: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = &tar_image[offset]; 10802e: 8b 55 0c mov 0xc(%ebp),%edx 108031: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx 108037: 89 50 58 mov %edx,0x58(%eax) 10803a: 83 c4 20 add $0x20,%esp 10803d: eb a0 jmp 107fdf =============================================================================== 0010b82c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b82c: 55 push %ebp 10b82d: 89 e5 mov %esp,%ebp 10b82f: 57 push %edi 10b830: 56 push %esi 10b831: 53 push %ebx 10b832: 83 ec 1c sub $0x1c,%esp 10b835: 8b 5d 08 mov 0x8(%ebp),%ebx 10b838: 8b 7d 0c mov 0xc(%ebp),%edi 10b83b: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b83e: 85 f6 test %esi,%esi 10b840: 0f 84 3e 01 00 00 je 10b984 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b846: 85 db test %ebx,%ebx 10b848: 0f 84 d2 00 00 00 je 10b920 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b84e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b855: 75 17 jne 10b86e */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b857: 85 ff test %edi,%edi 10b859: 0f 84 b1 00 00 00 je 10b910 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b85f: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b866: 39 c7 cmp %eax,%edi 10b868: 0f 87 a2 00 00 00 ja 10b910 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b86e: 83 ec 0c sub $0xc,%esp 10b871: ff 35 e4 54 12 00 pushl 0x1254e4 10b877: e8 6c 06 00 00 call 10bee8 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10b87c: c7 04 24 c0 53 12 00 movl $0x1253c0,(%esp) 10b883: e8 04 10 00 00 call 10c88c <_Objects_Allocate> 10b888: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b88a: 83 c4 10 add $0x10,%esp 10b88d: 85 c0 test %eax,%eax 10b88f: 0f 84 cf 00 00 00 je 10b964 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b895: 50 push %eax 10b896: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b897: 8b 45 14 mov 0x14(%ebp),%eax 10b89a: 83 e0 01 and $0x1,%eax 10b89d: 50 push %eax 10b89e: 6a 00 push $0x0 10b8a0: 31 c0 xor %eax,%eax 10b8a2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8a9: 0f 95 c0 setne %al 10b8ac: 50 push %eax 10b8ad: 31 c0 xor %eax,%eax 10b8af: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8b6: 0f 94 c0 sete %al 10b8b9: 50 push %eax 10b8ba: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b8bb: 8b 45 18 mov 0x18(%ebp),%eax 10b8be: 83 e0 01 and $0x1,%eax 10b8c1: 50 push %eax 10b8c2: ff 75 10 pushl 0x10(%ebp) 10b8c5: 6a 00 push $0x0 10b8c7: 52 push %edx 10b8c8: 68 c0 53 12 00 push $0x1253c0 10b8cd: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8d0: e8 6f 1d 00 00 call 10d644 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b8d5: 83 c4 30 add $0x30,%esp 10b8d8: 84 c0 test %al,%al 10b8da: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8dd: 74 51 je 10b930 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b8df: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b8e5: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b8ec: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b8f0: 8b 42 08 mov 0x8(%edx),%eax 10b8f3: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b8f5: 83 ec 0c sub $0xc,%esp 10b8f8: ff 35 e4 54 12 00 pushl 0x1254e4 10b8fe: e8 2d 06 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b903: 83 c4 10 add $0x10,%esp 10b906: 31 c0 xor %eax,%eax } 10b908: 8d 65 f4 lea -0xc(%ebp),%esp 10b90b: 5b pop %ebx 10b90c: 5e pop %esi 10b90d: 5f pop %edi 10b90e: c9 leave 10b90f: c3 ret * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) return RTEMS_INVALID_PRIORITY; 10b910: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b915: 8d 65 f4 lea -0xc(%ebp),%esp 10b918: 5b pop %ebx 10b919: 5e pop %esi 10b91a: 5f pop %edi 10b91b: c9 leave 10b91c: c3 ret 10b91d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b920: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b925: 8d 65 f4 lea -0xc(%ebp),%esp 10b928: 5b pop %ebx 10b929: 5e pop %esi 10b92a: 5f pop %edi 10b92b: c9 leave 10b92c: c3 ret 10b92d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b930: 83 ec 0c sub $0xc,%esp 10b933: ff 72 08 pushl 0x8(%edx) 10b936: e8 39 13 00 00 call 10cc74 <_Objects_Get_information_id> 10b93b: 5a pop %edx 10b93c: 59 pop %ecx 10b93d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b940: 52 push %edx 10b941: 50 push %eax 10b942: e8 bd 12 00 00 call 10cc04 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b947: 58 pop %eax 10b948: ff 35 e4 54 12 00 pushl 0x1254e4 10b94e: e8 dd 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b953: 83 c4 10 add $0x10,%esp 10b956: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b95b: 8d 65 f4 lea -0xc(%ebp),%esp 10b95e: 5b pop %ebx 10b95f: 5e pop %esi 10b960: 5f pop %edi 10b961: c9 leave 10b962: c3 ret 10b963: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b964: 83 ec 0c sub $0xc,%esp 10b967: ff 35 e4 54 12 00 pushl 0x1254e4 10b96d: e8 be 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b972: 83 c4 10 add $0x10,%esp 10b975: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97a: 8d 65 f4 lea -0xc(%ebp),%esp 10b97d: 5b pop %ebx 10b97e: 5e pop %esi 10b97f: 5f pop %edi 10b980: c9 leave 10b981: c3 ret 10b982: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b984: b8 09 00 00 00 mov $0x9,%eax 10b989: eb 8a jmp 10b915 =============================================================================== 0010b98c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b98c: 55 push %ebp 10b98d: 89 e5 mov %esp,%ebp 10b98f: 53 push %ebx 10b990: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b993: ff 35 e4 54 12 00 pushl 0x1254e4 10b999: e8 4a 05 00 00 call 10bee8 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b99e: 5a pop %edx 10b99f: 59 pop %ecx 10b9a0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a3: 50 push %eax 10b9a4: ff 75 08 pushl 0x8(%ebp) 10b9a7: e8 20 1c 00 00 call 10d5cc <_Thread_Get> 10b9ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b9ae: 83 c4 10 add $0x10,%esp 10b9b1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9b4: 85 c0 test %eax,%eax 10b9b6: 75 44 jne 10b9fc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b9b8: 83 ec 0c sub $0xc,%esp 10b9bb: ff 73 08 pushl 0x8(%ebx) 10b9be: e8 b1 12 00 00 call 10cc74 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b9c3: 5a pop %edx 10b9c4: 59 pop %ecx 10b9c5: 53 push %ebx 10b9c6: 50 push %eax 10b9c7: e8 ac 18 00 00 call 10d278 <_Thread_Close> 10b9cc: 58 pop %eax 10b9cd: ff 73 08 pushl 0x8(%ebx) 10b9d0: e8 9f 12 00 00 call 10cc74 <_Objects_Get_information_id> 10b9d5: 5a pop %edx 10b9d6: 59 pop %ecx 10b9d7: 53 push %ebx 10b9d8: 50 push %eax 10b9d9: e8 26 12 00 00 call 10cc04 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b9de: 58 pop %eax 10b9df: ff 35 e4 54 12 00 pushl 0x1254e4 10b9e5: e8 46 05 00 00 call 10bf30 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b9ea: e8 b9 1b 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ef: 83 c4 10 add $0x10,%esp 10b9f2: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b9f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f7: c9 leave 10b9f8: c3 ret 10b9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b9fc: 83 ec 0c sub $0xc,%esp 10b9ff: ff 35 e4 54 12 00 pushl 0x1254e4 10ba05: e8 26 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba0a: 83 c4 10 add $0x10,%esp 10ba0d: b8 04 00 00 00 mov $0x4,%eax } 10ba12: 8b 5d fc mov -0x4(%ebp),%ebx 10ba15: c9 leave 10ba16: c3 ret =============================================================================== 0010d4b0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d4b0: 55 push %ebp 10d4b1: 89 e5 mov %esp,%ebp 10d4b3: 56 push %esi 10d4b4: 53 push %ebx 10d4b5: 83 ec 10 sub $0x10,%esp 10d4b8: 8b 45 08 mov 0x8(%ebp),%eax 10d4bb: 8b 75 0c mov 0xc(%ebp),%esi 10d4be: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d4c1: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d4c8: 74 6e je 10d538 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4ca: 85 db test %ebx,%ebx 10d4cc: 74 7e je 10d54c <== NEVER TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d4ce: 83 fe 0f cmp $0xf,%esi 10d4d1: 77 3d ja 10d510 <== NEVER TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4d3: 85 c0 test %eax,%eax 10d4d5: 74 45 je 10d51c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d4d7: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4dd: 3b 42 08 cmp 0x8(%edx),%eax 10d4e0: 74 40 je 10d522 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d4e2: 83 ec 08 sub $0x8,%esp 10d4e5: 8d 55 f4 lea -0xc(%ebp),%edx 10d4e8: 52 push %edx 10d4e9: 50 push %eax 10d4ea: e8 11 1f 00 00 call 10f400 <_Thread_Get> switch ( location ) { 10d4ef: 83 c4 10 add $0x10,%esp 10d4f2: 8b 55 f4 mov -0xc(%ebp),%edx 10d4f5: 85 d2 test %edx,%edx 10d4f7: 75 4b jne 10d544 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d4f9: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d4ff: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d503: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d505: e8 d2 1e 00 00 call 10f3dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d50a: 31 c0 xor %eax,%eax 10d50c: eb 07 jmp 10d515 10d50e: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d510: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d515: 8d 65 f8 lea -0x8(%ebp),%esp 10d518: 5b pop %ebx 10d519: 5e pop %esi 10d51a: c9 leave 10d51b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d51c: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d522: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d528: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d52c: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d52e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d530: 8d 65 f8 lea -0x8(%ebp),%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: c9 leave 10d536: c3 ret 10d537: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d538: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d53d: 8d 65 f8 lea -0x8(%ebp),%esp 10d540: 5b pop %ebx 10d541: 5e pop %esi 10d542: c9 leave 10d543: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d544: b8 04 00 00 00 mov $0x4,%eax 10d549: eb ca jmp 10d515 10d54b: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d54c: b8 09 00 00 00 mov $0x9,%eax 10d551: eb c2 jmp 10d515 =============================================================================== 0010ba18 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 83 ec 08 sub $0x8,%esp 10ba1e: 8b 55 08 mov 0x8(%ebp),%edx 10ba21: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10ba24: 85 c0 test %eax,%eax 10ba26: 74 30 je 10ba58 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10ba28: 85 d2 test %edx,%edx 10ba2a: 75 10 jne 10ba3c *id = _Thread_Executing->Object.id; 10ba2c: 8b 15 d8 56 12 00 mov 0x1256d8,%edx 10ba32: 8b 52 08 mov 0x8(%edx),%edx 10ba35: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10ba37: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba39: c9 leave 10ba3a: c3 ret 10ba3b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10ba3c: 50 push %eax 10ba3d: ff 75 0c pushl 0xc(%ebp) 10ba40: 52 push %edx 10ba41: 68 c0 53 12 00 push $0x1253c0 10ba46: e8 51 14 00 00 call 10ce9c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10ba4b: 8b 04 85 ec fb 11 00 mov 0x11fbec(,%eax,4),%eax 10ba52: 83 c4 10 add $0x10,%esp } 10ba55: c9 leave 10ba56: c3 ret 10ba57: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba58: b8 09 00 00 00 mov $0x9,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba5d: c9 leave 10ba5e: c3 ret =============================================================================== 00118120 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118120: 55 push %ebp 118121: 89 e5 mov %esp,%ebp 118123: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118126: 8d 45 f4 lea -0xc(%ebp),%eax 118129: 50 push %eax 11812a: ff 75 08 pushl 0x8(%ebp) 11812d: e8 9e 38 00 00 call 11b9d0 <_Thread_Get> switch ( location ) { 118132: 83 c4 10 add $0x10,%esp 118135: 8b 55 f4 mov -0xc(%ebp),%edx 118138: 85 d2 test %edx,%edx 11813a: 74 08 je 118144 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11813c: b8 04 00 00 00 mov $0x4,%eax } 118141: c9 leave 118142: c3 ret 118143: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118144: f6 40 10 02 testb $0x2,0x10(%eax) 118148: 74 0e je 118158 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11814a: e8 5d 38 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11814f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118154: c9 leave 118155: c3 ret 118156: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 118158: e8 4f 38 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11815d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11815f: c9 leave 118160: c3 ret =============================================================================== 00111e98 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111e98: 55 push %ebp 111e99: 89 e5 mov %esp,%ebp 111e9b: 57 push %edi 111e9c: 56 push %esi 111e9d: 53 push %ebx 111e9e: 83 ec 1c sub $0x1c,%esp 111ea1: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111ea4: 85 c9 test %ecx,%ecx 111ea6: 0f 84 40 01 00 00 je 111fec return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111eac: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111eb2: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111eb8: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111ebc: 19 f6 sbb %esi,%esi 111ebe: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111ec4: 8b 53 7c mov 0x7c(%ebx),%edx 111ec7: 85 d2 test %edx,%edx 111ec9: 0f 85 f1 00 00 00 jne 111fc0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111ecf: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111ed3: 19 d2 sbb %edx,%edx 111ed5: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 111edb: 89 55 e4 mov %edx,-0x1c(%ebp) 111ede: 89 4d e0 mov %ecx,-0x20(%ebp) 111ee1: e8 46 cc ff ff call 10eb2c <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111ee6: 8b 55 e4 mov -0x1c(%ebp),%edx 111ee9: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 111eeb: 09 f0 or %esi,%eax 111eed: 8b 4d e0 mov -0x20(%ebp),%ecx 111ef0: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111ef2: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111ef9: 74 0b je 111f06 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111efb: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 111f02: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111f06: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111f0d: 74 1c je 111f2b if ( _Modes_Is_timeslice(mode_set) ) { 111f0f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111f16: 0f 84 b8 00 00 00 je 111fd4 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111f1c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111f23: a1 04 54 12 00 mov 0x125404,%eax 111f28: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111f2b: f6 45 0c 01 testb $0x1,0xc(%ebp) 111f2f: 74 0b je 111f3c */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111f31: f6 45 08 01 testb $0x1,0x8(%ebp) 111f35: 0f 84 91 00 00 00 je 111fcc 111f3b: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111f3c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111f43: 74 3f je 111f84 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111f45: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111f4c: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 111f4f: 38 47 08 cmp %al,0x8(%edi) 111f52: 74 30 je 111f84 asr->is_enabled = is_asr_enabled; 111f54: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111f57: 9c pushf 111f58: fa cli 111f59: 58 pop %eax _signals = information->signals_pending; 111f5a: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111f5d: 8b 4f 14 mov 0x14(%edi),%ecx 111f60: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111f63: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111f66: 50 push %eax 111f67: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f68: 8b 47 14 mov 0x14(%edi),%eax 111f6b: 85 c0 test %eax,%eax 111f6d: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f70: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 111f77: 74 16 je 111f8f <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 111f79: 31 c0 xor %eax,%eax } 111f7b: 83 c4 1c add $0x1c,%esp 111f7e: 5b pop %ebx 111f7f: 5e pop %esi 111f80: 5f pop %edi 111f81: c9 leave 111f82: c3 ret 111f83: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f84: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f86: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 111f8d: 75 ea jne 111f79 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 111f8f: 8b 15 d8 56 12 00 mov 0x1256d8,%edx if ( are_signals_pending || 111f95: 84 c0 test %al,%al 111f97: 75 0e jne 111fa7 111f99: 3b 15 dc 56 12 00 cmp 0x1256dc,%edx 111f9f: 74 d8 je 111f79 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 111fa1: 80 7a 74 00 cmpb $0x0,0x74(%edx) 111fa5: 74 d2 je 111f79 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 111fa7: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 111fae: e8 7d b4 ff ff call 10d430 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 111fb3: 31 c0 xor %eax,%eax } 111fb5: 83 c4 1c add $0x1c,%esp 111fb8: 5b pop %ebx 111fb9: 5e pop %esi 111fba: 5f pop %edi 111fbb: c9 leave 111fbc: c3 ret 111fbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 111fc0: 81 ce 00 02 00 00 or $0x200,%esi 111fc6: e9 04 ff ff ff jmp 111ecf 111fcb: 90 nop <== NOT EXECUTED 111fcc: fb sti 111fcd: e9 6a ff ff ff jmp 111f3c 111fd2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111fd4: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111fdb: f6 45 0c 01 testb $0x1,0xc(%ebp) 111fdf: 0f 84 57 ff ff ff je 111f3c 111fe5: e9 47 ff ff ff jmp 111f31 111fea: 66 90 xchg %ax,%ax <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 111fec: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 111ff1: 83 c4 1c add $0x1c,%esp 111ff4: 5b pop %ebx 111ff5: 5e pop %esi 111ff6: 5f pop %edi 111ff7: c9 leave 111ff8: c3 ret =============================================================================== 0010c4f4 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c4f4: 55 push %ebp 10c4f5: 89 e5 mov %esp,%ebp 10c4f7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10c4fd: 50 push %eax 10c4fe: ff 75 08 pushl 0x8(%ebp) 10c501: e8 fe 1b 00 00 call 10e104 <_Thread_Get> switch ( location ) { 10c506: 83 c4 10 add $0x10,%esp 10c509: 8b 4d f4 mov -0xc(%ebp),%ecx 10c50c: 85 c9 test %ecx,%ecx 10c50e: 75 20 jne 10c530 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c510: 52 push %edx 10c511: ff 75 0c pushl 0xc(%ebp) 10c514: 6a 00 push $0x0 10c516: 50 push %eax 10c517: e8 0c 24 00 00 call 10e928 <_Thread_Restart> 10c51c: 83 c4 10 add $0x10,%esp 10c51f: 84 c0 test %al,%al 10c521: 75 15 jne 10c538 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c523: e8 b8 1b 00 00 call 10e0e0 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c528: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c52d: c9 leave 10c52e: c3 ret 10c52f: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c530: b8 04 00 00 00 mov $0x4,%eax } 10c535: c9 leave 10c536: c3 ret 10c537: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c538: e8 a3 1b 00 00 call 10e0e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c53d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c53f: c9 leave 10c540: c3 ret =============================================================================== 0010ec98 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ec98: 55 push %ebp 10ec99: 89 e5 mov %esp,%ebp 10ec9b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ec9e: 8d 45 f4 lea -0xc(%ebp),%eax 10eca1: 50 push %eax 10eca2: ff 75 08 pushl 0x8(%ebp) 10eca5: e8 36 1c 00 00 call 1108e0 <_Thread_Get> switch ( location ) { 10ecaa: 83 c4 10 add $0x10,%esp 10ecad: 8b 55 f4 mov -0xc(%ebp),%edx 10ecb0: 85 d2 test %edx,%edx 10ecb2: 74 08 je 10ecbc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ecb4: b8 04 00 00 00 mov $0x4,%eax } 10ecb9: c9 leave 10ecba: c3 ret 10ecbb: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ecbc: f6 40 10 02 testb $0x2,0x10(%eax) 10ecc0: 75 0e jne 10ecd0 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ecc2: e8 f5 1b 00 00 call 1108bc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ecc7: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eccc: c9 leave 10eccd: c3 ret 10ecce: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10ecd0: 83 ec 08 sub $0x8,%esp 10ecd3: 6a 01 push $0x1 10ecd5: 50 push %eax 10ecd6: e8 29 24 00 00 call 111104 <_Thread_Resume> _Thread_Enable_dispatch(); 10ecdb: e8 dc 1b 00 00 call 1108bc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ece0: 83 c4 10 add $0x10,%esp 10ece3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ece5: c9 leave 10ece6: c3 ret =============================================================================== 0010d628 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d628: 55 push %ebp 10d629: 89 e5 mov %esp,%ebp 10d62b: 56 push %esi 10d62c: 53 push %ebx 10d62d: 83 ec 10 sub $0x10,%esp 10d630: 8b 45 08 mov 0x8(%ebp),%eax 10d633: 8b 5d 0c mov 0xc(%ebp),%ebx 10d636: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d639: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d640: 74 66 je 10d6a8 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d642: 83 fb 0f cmp $0xf,%ebx 10d645: 77 39 ja 10d680 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d647: 85 c0 test %eax,%eax 10d649: 74 41 je 10d68c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d64b: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d651: 3b 42 08 cmp 0x8(%edx),%eax 10d654: 74 3c je 10d692 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d656: 83 ec 08 sub $0x8,%esp 10d659: 8d 55 f4 lea -0xc(%ebp),%edx 10d65c: 52 push %edx 10d65d: 50 push %eax 10d65e: e8 9d 1d 00 00 call 10f400 <_Thread_Get> switch ( location ) { 10d663: 83 c4 10 add $0x10,%esp 10d666: 8b 55 f4 mov -0xc(%ebp),%edx 10d669: 85 d2 test %edx,%edx 10d66b: 75 47 jne 10d6b4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d66d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d673: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d677: e8 60 1d 00 00 call 10f3dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d67c: 31 c0 xor %eax,%eax 10d67e: eb 05 jmp 10d685 * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d680: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d685: 8d 65 f8 lea -0x8(%ebp),%esp 10d688: 5b pop %ebx 10d689: 5e pop %esi 10d68a: c9 leave 10d68b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d68c: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d692: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d698: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d69c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d69e: 8d 65 f8 lea -0x8(%ebp),%esp 10d6a1: 5b pop %ebx 10d6a2: 5e pop %esi 10d6a3: c9 leave 10d6a4: c3 ret 10d6a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d6a8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6ad: 8d 65 f8 lea -0x8(%ebp),%esp 10d6b0: 5b pop %ebx 10d6b1: 5e pop %esi 10d6b2: c9 leave 10d6b3: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d6b4: b8 04 00 00 00 mov $0x4,%eax } 10d6b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6bc: 5b pop %ebx 10d6bd: 5e pop %esi 10d6be: c9 leave 10d6bf: c3 ret =============================================================================== 0010f96c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f96c: 55 push %ebp 10f96d: 89 e5 mov %esp,%ebp 10f96f: 56 push %esi 10f970: 53 push %ebx 10f971: 83 ec 10 sub $0x10,%esp 10f974: 8b 5d 0c mov 0xc(%ebp),%ebx 10f977: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f97a: 85 db test %ebx,%ebx 10f97c: 74 0b je 10f989 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10f97e: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10f985: 39 c3 cmp %eax,%ebx 10f987: 77 5f ja 10f9e8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10f989: 85 f6 test %esi,%esi 10f98b: 74 67 je 10f9f4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10f98d: 83 ec 08 sub $0x8,%esp 10f990: 8d 45 f4 lea -0xc(%ebp),%eax 10f993: 50 push %eax 10f994: ff 75 08 pushl 0x8(%ebp) 10f997: e8 94 1d 00 00 call 111730 <_Thread_Get> switch ( location ) { 10f99c: 83 c4 10 add $0x10,%esp 10f99f: 8b 55 f4 mov -0xc(%ebp),%edx 10f9a2: 85 d2 test %edx,%edx 10f9a4: 75 36 jne 10f9dc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10f9a6: 8b 50 14 mov 0x14(%eax),%edx 10f9a9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10f9ab: 85 db test %ebx,%ebx 10f9ad: 74 1c je 10f9cb the_thread->real_priority = new_priority; 10f9af: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10f9b2: 8b 48 1c mov 0x1c(%eax),%ecx 10f9b5: 85 c9 test %ecx,%ecx 10f9b7: 74 05 je 10f9be 10f9b9: 3b 58 14 cmp 0x14(%eax),%ebx 10f9bc: 73 0d jae 10f9cb <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10f9be: 52 push %edx 10f9bf: 6a 00 push $0x0 10f9c1: 53 push %ebx 10f9c2: 50 push %eax 10f9c3: e8 40 18 00 00 call 111208 <_Thread_Change_priority> 10f9c8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10f9cb: e8 3c 1d 00 00 call 11170c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f9d0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f9d5: 5b pop %ebx 10f9d6: 5e pop %esi 10f9d7: c9 leave 10f9d8: c3 ret 10f9d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f9dc: b8 04 00 00 00 mov $0x4,%eax } 10f9e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f9e4: 5b pop %ebx 10f9e5: 5e pop %esi 10f9e6: c9 leave 10f9e7: c3 ret register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10f9e8: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9ed: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f0: 5b pop %ebx 10f9f1: 5e pop %esi 10f9f2: c9 leave 10f9f3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10f9f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9f9: 8d 65 f8 lea -0x8(%ebp),%esp 10f9fc: 5b pop %ebx 10f9fd: 5e pop %esi 10f9fe: c9 leave 10f9ff: c3 ret =============================================================================== 0010bad4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 53 push %ebx 10bad8: 83 ec 14 sub $0x14,%esp 10badb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bade: 85 db test %ebx,%ebx 10bae0: 74 4e je 10bb30 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bae2: 83 ec 08 sub $0x8,%esp 10bae5: 8d 45 f4 lea -0xc(%ebp),%eax 10bae8: 50 push %eax 10bae9: ff 75 08 pushl 0x8(%ebp) 10baec: e8 db 1a 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10baf1: 83 c4 10 add $0x10,%esp 10baf4: 8b 55 f4 mov -0xc(%ebp),%edx 10baf7: 85 d2 test %edx,%edx 10baf9: 75 29 jne 10bb24 case OBJECTS_LOCAL: if ( _Thread_Start( 10bafb: 83 ec 0c sub $0xc,%esp 10bafe: ff 75 10 pushl 0x10(%ebp) 10bb01: 6a 00 push $0x0 10bb03: 53 push %ebx 10bb04: 6a 00 push $0x0 10bb06: 50 push %eax 10bb07: e8 98 25 00 00 call 10e0a4 <_Thread_Start> 10bb0c: 83 c4 20 add $0x20,%esp 10bb0f: 84 c0 test %al,%al 10bb11: 75 29 jne 10bb3c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb13: e8 90 1a 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb18: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb24: b8 04 00 00 00 mov $0x4,%eax } 10bb29: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2c: c9 leave 10bb2d: c3 ret 10bb2e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb30: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb35: 8b 5d fc mov -0x4(%ebp),%ebx 10bb38: c9 leave 10bb39: c3 ret 10bb3a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10bb3c: e8 67 1a 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bb41: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb43: 8b 5d fc mov -0x4(%ebp),%ebx 10bb46: c9 leave 10bb47: c3 ret =============================================================================== 00110340 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110340: 55 push %ebp 110341: 89 e5 mov %esp,%ebp 110343: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110346: 8d 45 f4 lea -0xc(%ebp),%eax 110349: 50 push %eax 11034a: ff 75 08 pushl 0x8(%ebp) 11034d: e8 7a d2 ff ff call 10d5cc <_Thread_Get> switch ( location ) { 110352: 83 c4 10 add $0x10,%esp 110355: 8b 55 f4 mov -0xc(%ebp),%edx 110358: 85 d2 test %edx,%edx 11035a: 74 08 je 110364 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11035c: b8 04 00 00 00 mov $0x4,%eax } 110361: c9 leave 110362: c3 ret 110363: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110364: f6 40 10 02 testb $0x2,0x10(%eax) 110368: 74 0e je 110378 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11036a: e8 39 d2 ff ff call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11036f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110374: c9 leave 110375: c3 ret 110376: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 110378: 83 ec 0c sub $0xc,%esp 11037b: 50 push %eax 11037c: e8 07 09 00 00 call 110c88 <_Thread_Suspend> _Thread_Enable_dispatch(); 110381: e8 22 d2 ff ff call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110386: 83 c4 10 add $0x10,%esp 110389: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11038b: c9 leave 11038c: c3 ret =============================================================================== 0010c618 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 57 push %edi 10c61c: 56 push %esi 10c61d: 53 push %ebx 10c61e: 83 ec 1c sub $0x1c,%esp 10c621: 8b 5d 0c mov 0xc(%ebp),%ebx 10c624: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c627: 85 db test %ebx,%ebx 10c629: 0f 84 9d 00 00 00 je 10c6cc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c62f: 83 ec 08 sub $0x8,%esp 10c632: 8d 45 e4 lea -0x1c(%ebp),%eax 10c635: 50 push %eax 10c636: ff 75 08 pushl 0x8(%ebp) 10c639: e8 86 1c 00 00 call 10e2c4 <_Thread_Get> 10c63e: 89 c6 mov %eax,%esi switch (location) { 10c640: 83 c4 10 add $0x10,%esp 10c643: 8b 45 e4 mov -0x1c(%ebp),%eax 10c646: 85 c0 test %eax,%eax 10c648: 74 0e je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c64a: b8 04 00 00 00 mov $0x4,%eax } 10c64f: 8d 65 f4 lea -0xc(%ebp),%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c658: 8b 86 fc 00 00 00 mov 0xfc(%esi),%eax while (tvp) { 10c65e: 85 c0 test %eax,%eax 10c660: 75 44 jne 10c6a6 10c662: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 14 push $0x14 10c669: e8 ae 2d 00 00 call 10f41c <_Workspace_Allocate> if (new == NULL) { 10c66e: 83 c4 10 add $0x10,%esp 10c671: 85 c0 test %eax,%eax 10c673: 74 4b je 10c6c0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c675: 8b 13 mov (%ebx),%edx 10c677: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c67a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c67d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c680: 8b 96 fc 00 00 00 mov 0xfc(%esi),%edx 10c686: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c688: 89 86 fc 00 00 00 mov %eax,0xfc(%esi) _Thread_Enable_dispatch(); 10c68e: e8 0d 1c 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c693: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c695: 8d 65 f4 lea -0xc(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: 5f pop %edi 10c69b: c9 leave 10c69c: c3 ret 10c69d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c6a0: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 be je 10c664 if (tvp->ptr == ptr) { 10c6a6: 39 58 04 cmp %ebx,0x4(%eax) 10c6a9: 75 f5 jne 10c6a0 tvp->dtor = dtor; 10c6ab: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c6ae: e8 ed 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6b3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b8: 5b pop %ebx 10c6b9: 5e pop %esi 10c6ba: 5f pop %edi 10c6bb: c9 leave 10c6bc: c3 ret 10c6bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 10c6c0: e8 db 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c6c5: b8 1a 00 00 00 mov $0x1a,%eax 10c6ca: eb 83 jmp 10c64f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c6cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d4: 5b pop %ebx 10c6d5: 5e pop %esi 10c6d6: 5f pop %edi 10c6d7: c9 leave 10c6d8: c3 ret =============================================================================== 0010c6dc : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c6dc: 55 push %ebp 10c6dd: 89 e5 mov %esp,%ebp 10c6df: 53 push %ebx 10c6e0: 83 ec 14 sub $0x14,%esp 10c6e3: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c6e6: 85 db test %ebx,%ebx 10c6e8: 74 76 je 10c760 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c6ea: 83 ec 08 sub $0x8,%esp 10c6ed: 8d 45 f4 lea -0xc(%ebp),%eax 10c6f0: 50 push %eax 10c6f1: ff 75 08 pushl 0x8(%ebp) 10c6f4: e8 cb 1b 00 00 call 10e2c4 <_Thread_Get> switch (location) { 10c6f9: 83 c4 10 add $0x10,%esp 10c6fc: 8b 55 f4 mov -0xc(%ebp),%edx 10c6ff: 85 d2 test %edx,%edx 10c701: 74 0d je 10c710 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c703: b8 04 00 00 00 mov $0x4,%eax } 10c708: 8b 5d fc mov -0x4(%ebp),%ebx 10c70b: c9 leave 10c70c: c3 ret 10c70d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c710: 8b 88 fc 00 00 00 mov 0xfc(%eax),%ecx while (tvp) { 10c716: 85 c9 test %ecx,%ecx 10c718: 74 17 je 10c731 if (tvp->ptr == ptr) { 10c71a: 39 59 04 cmp %ebx,0x4(%ecx) 10c71d: 75 0c jne 10c72b 10c71f: eb 49 jmp 10c76a 10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c724: 39 5a 04 cmp %ebx,0x4(%edx) 10c727: 74 17 je 10c740 10c729: 89 d1 mov %edx,%ecx _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10c72b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c72d: 85 d2 test %edx,%edx 10c72f: 75 f3 jne 10c724 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c731: e8 6a 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c736: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c73b: 8b 5d fc mov -0x4(%ebp),%ebx 10c73e: c9 leave 10c73f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c740: 8b 1a mov (%edx),%ebx 10c742: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10c744: 83 ec 08 sub $0x8,%esp 10c747: 52 push %edx 10c748: 50 push %eax 10c749: e8 b2 00 00 00 call 10c800 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c74e: e8 4d 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c753: 83 c4 10 add $0x10,%esp 10c756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c758: 8b 5d fc mov -0x4(%ebp),%ebx 10c75b: c9 leave 10c75c: c3 ret 10c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c765: 8b 5d fc mov -0x4(%ebp),%ebx 10c768: c9 leave 10c769: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10c76a: 8b 11 mov (%ecx),%edx 10c76c: 89 90 fc 00 00 00 mov %edx,0xfc(%eax) 10c772: 89 ca mov %ecx,%edx 10c774: eb ce jmp 10c744 =============================================================================== 0010c778 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c778: 55 push %ebp 10c779: 89 e5 mov %esp,%ebp 10c77b: 56 push %esi 10c77c: 53 push %ebx 10c77d: 83 ec 10 sub $0x10,%esp 10c780: 8b 5d 0c mov 0xc(%ebp),%ebx 10c783: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c786: 85 db test %ebx,%ebx 10c788: 74 56 je 10c7e0 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c78a: 85 f6 test %esi,%esi 10c78c: 74 52 je 10c7e0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c78e: 83 ec 08 sub $0x8,%esp 10c791: 8d 45 f4 lea -0xc(%ebp),%eax 10c794: 50 push %eax 10c795: ff 75 08 pushl 0x8(%ebp) 10c798: e8 27 1b 00 00 call 10e2c4 <_Thread_Get> switch (location) { 10c79d: 83 c4 10 add $0x10,%esp 10c7a0: 8b 55 f4 mov -0xc(%ebp),%edx 10c7a3: 85 d2 test %edx,%edx 10c7a5: 75 2d jne 10c7d4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c7a7: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 10c7ad: 85 c0 test %eax,%eax 10c7af: 75 09 jne 10c7ba 10c7b1: eb 39 jmp 10c7ec 10c7b3: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c7b4: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 10c7b6: 85 c0 test %eax,%eax 10c7b8: 74 32 je 10c7ec <== NEVER TAKEN if (tvp->ptr == ptr) { 10c7ba: 39 58 04 cmp %ebx,0x4(%eax) 10c7bd: 75 f5 jne 10c7b4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c7bf: 8b 40 0c mov 0xc(%eax),%eax 10c7c2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c7c4: e8 d7 1a 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7cb: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ce: 5b pop %ebx 10c7cf: 5e pop %esi 10c7d0: c9 leave 10c7d1: c3 ret 10c7d2: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c7d4: b8 04 00 00 00 mov $0x4,%eax } 10c7d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c7dc: 5b pop %ebx 10c7dd: 5e pop %esi 10c7de: c9 leave 10c7df: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c7e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7e5: 8d 65 f8 lea -0x8(%ebp),%esp 10c7e8: 5b pop %ebx 10c7e9: 5e pop %esi 10c7ea: c9 leave 10c7eb: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c7ec: e8 af 1a 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c7f1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c7f9: 5b pop %ebx 10c7fa: 5e pop %esi 10c7fb: c9 leave 10c7fc: c3 ret =============================================================================== 0010bb48 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 53 push %ebx 10bb4c: 83 ec 04 sub $0x4,%esp 10bb4f: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb52: a1 34 54 12 00 mov 0x125434,%eax 10bb57: 40 inc %eax 10bb58: a3 34 54 12 00 mov %eax,0x125434 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bb5d: 85 db test %ebx,%ebx 10bb5f: 74 53 je 10bbb4 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bb61: 83 ec 08 sub $0x8,%esp 10bb64: 6a 08 push $0x8 10bb66: ff 35 d8 56 12 00 pushl 0x1256d8 10bb6c: e8 eb 22 00 00 call 10de5c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bb71: a1 d8 56 12 00 mov 0x1256d8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bb76: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bb79: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bb80: c7 40 64 f4 d3 10 00 movl $0x10d3f4,0x64(%eax) the_watchdog->id = id; 10bb87: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bb8a: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bb91: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bb94: 5a pop %edx 10bb95: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bb96: 83 c0 48 add $0x48,%eax 10bb99: 50 push %eax 10bb9a: 68 04 55 12 00 push $0x125504 10bb9f: e8 20 29 00 00 call 10e4c4 <_Watchdog_Insert> 10bba4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bba7: e8 fc 19 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbac: 31 c0 xor %eax,%eax 10bbae: 8b 5d fc mov -0x4(%ebp),%ebx 10bbb1: c9 leave 10bbb2: c3 ret 10bbb3: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bbb4: e8 8b 25 00 00 call 10e144 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bbb9: e8 ea 19 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbbe: 31 c0 xor %eax,%eax 10bbc0: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc3: c9 leave 10bbc4: c3 ret =============================================================================== 0010c98c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c98c: 55 push %ebp 10c98d: 89 e5 mov %esp,%ebp 10c98f: 53 push %ebx 10c990: 83 ec 14 sub $0x14,%esp 10c993: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c996: 80 3d 68 8a 12 00 00 cmpb $0x0,0x128a68 10c99d: 0f 84 a9 00 00 00 je 10ca4c return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9a3: 85 db test %ebx,%ebx 10c9a5: 0f 84 ad 00 00 00 je 10ca58 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c9ab: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c9b2: 83 ec 0c sub $0xc,%esp 10c9b5: 53 push %ebx 10c9b6: e8 d1 f3 ff ff call 10bd8c <_TOD_Validate> 10c9bb: 83 c4 10 add $0x10,%esp 10c9be: 84 c0 test %al,%al 10c9c0: 75 0a jne 10c9cc return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10c9c2: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9c7: 8b 5d fc mov -0x4(%ebp),%ebx 10c9ca: c9 leave 10c9cb: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 53 push %ebx 10c9d0: e8 2b f3 ff ff call 10bd00 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c9d5: 83 c4 10 add $0x10,%esp 10c9d8: 3b 05 e8 8a 12 00 cmp 0x128ae8,%eax 10c9de: 76 e2 jbe 10c9c2 10c9e0: 8b 15 54 8a 12 00 mov 0x128a54,%edx 10c9e6: 42 inc %edx 10c9e7: 89 15 54 8a 12 00 mov %edx,0x128a54 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c9ed: 83 ec 08 sub $0x8,%esp 10c9f0: 6a 10 push $0x10 10c9f2: ff 35 f8 8c 12 00 pushl 0x128cf8 10c9f8: 89 45 f4 mov %eax,-0xc(%ebp) 10c9fb: e8 98 23 00 00 call 10ed98 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca00: 8b 15 f8 8c 12 00 mov 0x128cf8,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10ca06: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca09: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca10: c7 42 64 30 e3 10 00 movl $0x10e330,0x64(%edx) the_watchdog->id = id; 10ca17: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca1a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 10ca21: 8b 45 f4 mov -0xc(%ebp),%eax 10ca24: 2b 05 e8 8a 12 00 sub 0x128ae8,%eax 10ca2a: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10ca2d: 58 pop %eax 10ca2e: 59 pop %ecx 10ca2f: 83 c2 48 add $0x48,%edx 10ca32: 52 push %edx 10ca33: 68 18 8b 12 00 push $0x128b18 10ca38: e8 3b 2a 00 00 call 10f478 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10ca3d: e8 a2 1a 00 00 call 10e4e4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca42: 83 c4 10 add $0x10,%esp 10ca45: 31 c0 xor %eax,%eax 10ca47: e9 7b ff ff ff jmp 10c9c7 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10ca4c: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca51: 8b 5d fc mov -0x4(%ebp),%ebx 10ca54: c9 leave 10ca55: c3 ret 10ca56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10ca58: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca60: c9 leave 10ca61: c3 ret =============================================================================== 0010a8a8 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a8a8: 55 push %ebp 10a8a9: 89 e5 mov %esp,%ebp 10a8ab: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a8ae: 83 f8 09 cmp $0x9,%eax 10a8b1: 0f 84 f1 00 00 00 je 10a9a8 10a8b7: 7e 37 jle 10a8f0 10a8b9: 83 f8 0e cmp $0xe,%eax 10a8bc: 0f 84 f6 00 00 00 je 10a9b8 10a8c2: 7e 5c jle 10a920 10a8c4: 3d 02 10 00 00 cmp $0x1002,%eax 10a8c9: 0f 84 01 01 00 00 je 10a9d0 10a8cf: 0f 8e 97 00 00 00 jle 10a96c 10a8d5: 3d 03 10 00 00 cmp $0x1003,%eax 10a8da: 0f 84 e0 00 00 00 je 10a9c0 10a8e0: 3d 04 10 00 00 cmp $0x1004,%eax 10a8e5: 75 51 jne 10a938 <== NEVER TAKEN case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 10a8e7: b8 13 00 00 00 mov $0x13,%eax default: baud_index = -1; break; } return baud_index; } 10a8ec: c9 leave 10a8ed: c3 ret 10a8ee: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a8f0: 83 f8 04 cmp $0x4,%eax 10a8f3: 0f 84 b7 00 00 00 je 10a9b0 10a8f9: 7f 45 jg 10a940 10a8fb: 83 f8 01 cmp $0x1,%eax 10a8fe: 0f 84 8c 00 00 00 je 10a990 10a904: 0f 8e de 00 00 00 jle 10a9e8 10a90a: 83 f8 02 cmp $0x2,%eax 10a90d: 0f 84 c5 00 00 00 je 10a9d8 10a913: 83 f8 03 cmp $0x3,%eax 10a916: 75 20 jne 10a938 <== NEVER TAKEN case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10a918: b8 03 00 00 00 mov $0x3,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a91d: c9 leave 10a91e: c3 ret 10a91f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a920: 83 f8 0b cmp $0xb,%eax 10a923: 0f 84 9f 00 00 00 je 10a9c8 10a929: 7c 39 jl 10a964 10a92b: 83 f8 0c cmp $0xc,%eax 10a92e: 74 50 je 10a980 10a930: 83 f8 0d cmp $0xd,%eax 10a933: 74 62 je 10a997 <== ALWAYS TAKEN 10a935: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; default: baud_index = -1; break; 10a938: b8 ff ff ff ff mov $0xffffffff,%eax } return baud_index; } 10a93d: c9 leave 10a93e: c3 ret 10a93f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a940: 83 f8 06 cmp $0x6,%eax 10a943: 74 43 je 10a988 10a945: 7c 15 jl 10a95c 10a947: 83 f8 07 cmp $0x7,%eax 10a94a: 0f 84 90 00 00 00 je 10a9e0 10a950: 83 f8 08 cmp $0x8,%eax 10a953: 75 e3 jne 10a938 <== NEVER TAKEN case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 10a955: b8 08 00 00 00 mov $0x8,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a95a: c9 leave 10a95b: c3 ret case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 10a95c: b8 05 00 00 00 mov $0x5,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a961: c9 leave 10a962: c3 ret 10a963: 90 nop <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 10a964: b8 0a 00 00 00 mov $0xa,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a969: c9 leave 10a96a: c3 ret 10a96b: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a96c: 83 f8 0f cmp $0xf,%eax 10a96f: 74 2f je 10a9a0 10a971: 3d 01 10 00 00 cmp $0x1001,%eax 10a976: 75 c0 jne 10a938 <== NEVER TAKEN case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 10a978: b8 10 00 00 00 mov $0x10,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a97d: c9 leave 10a97e: c3 ret 10a97f: 90 nop <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 10a980: b8 0c 00 00 00 mov $0xc,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a985: c9 leave 10a986: c3 ret 10a987: 90 nop <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 10a988: b8 06 00 00 00 mov $0x6,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a98d: c9 leave 10a98e: c3 ret 10a98f: 90 nop <== NOT EXECUTED { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 10a990: b8 01 00 00 00 mov $0x1,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a995: c9 leave 10a996: c3 ret case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 10a997: b8 0d 00 00 00 mov $0xd,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a99c: c9 leave 10a99d: c3 ret 10a99e: 66 90 xchg %ax,%ax <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 10a9a0: b8 0f 00 00 00 mov $0xf,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9a5: c9 leave 10a9a6: c3 ret 10a9a7: 90 nop <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 10a9a8: b8 09 00 00 00 mov $0x9,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9ad: c9 leave 10a9ae: c3 ret 10a9af: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 10a9b0: b8 04 00 00 00 mov $0x4,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9b5: c9 leave 10a9b6: c3 ret 10a9b7: 90 nop <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 10a9b8: b8 0e 00 00 00 mov $0xe,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9bd: c9 leave 10a9be: c3 ret 10a9bf: 90 nop <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 10a9c0: b8 12 00 00 00 mov $0x12,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9c5: c9 leave 10a9c6: c3 ret 10a9c7: 90 nop <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 10a9c8: b8 0b 00 00 00 mov $0xb,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9cd: c9 leave 10a9ce: c3 ret 10a9cf: 90 nop <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 10a9d0: b8 11 00 00 00 mov $0x11,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9d5: c9 leave 10a9d6: c3 ret 10a9d7: 90 nop <== NOT EXECUTED int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a9d8: b8 02 00 00 00 mov $0x2,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9dd: c9 leave 10a9de: c3 ret 10a9df: 90 nop <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 10a9e0: b8 07 00 00 00 mov $0x7,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9e5: c9 leave 10a9e6: c3 ret 10a9e7: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a9e8: 85 c0 test %eax,%eax 10a9ea: 0f 85 48 ff ff ff jne 10a938 case B0: baud_index = 0; break; 10a9f0: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a9f2: c9 leave 10a9f3: c3 ret =============================================================================== 00108f18 : extern rtems_assoc_t termios_assoc_table[]; int32_t rtems_termios_baud_to_number( int termios_baud ) { 108f18: 55 push %ebp 108f19: 89 e5 mov %esp,%ebp 108f1b: 53 push %ebx 108f1c: 83 ec 0c sub $0xc,%esp 108f1f: 8b 5d 08 mov 0x8(%ebp),%ebx int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); 108f22: 53 push %ebx 108f23: 68 20 30 12 00 push $0x123020 108f28: e8 cb 69 00 00 call 10f8f8 if ( baud == 0 && termios_baud != 0 ) 108f2d: 83 c4 10 add $0x10,%esp 108f30: 85 c0 test %eax,%eax 108f32: 74 08 je 108f3c return -1; return baud; } 108f34: 8b 5d fc mov -0x4(%ebp),%ebx 108f37: c9 leave 108f38: c3 ret 108f39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { int baud; baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud ); if ( baud == 0 && termios_baud != 0 ) 108f3c: 85 db test %ebx,%ebx 108f3e: 74 f4 je 108f34 return -1; 108f40: b8 ff ff ff ff mov $0xffffffff,%eax 108f45: eb ed jmp 108f34 =============================================================================== 0010949c : } } rtems_status_code rtems_termios_close (void *arg) { 10949c: 55 push %ebp 10949d: 89 e5 mov %esp,%ebp 10949f: 56 push %esi 1094a0: 53 push %ebx 1094a1: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 1094a4: 8b 06 mov (%esi),%eax 1094a6: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain( 1094a9: 52 push %edx 1094aa: 6a 00 push $0x0 1094ac: 6a 00 push $0x0 1094ae: ff 35 0c 53 12 00 pushl 0x12530c 1094b4: e8 d7 21 00 00 call 10b690 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1094b9: 83 c4 10 add $0x10,%esp 1094bc: 85 c0 test %eax,%eax 1094be: 0f 85 9a 01 00 00 jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 1094c4: 8b 43 08 mov 0x8(%ebx),%eax 1094c7: 48 dec %eax 1094c8: 89 43 08 mov %eax,0x8(%ebx) 1094cb: 85 c0 test %eax,%eax 1094cd: 0f 85 bf 00 00 00 jne 109592 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1094d3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1094d9: c1 e0 05 shl $0x5,%eax 1094dc: 8b 80 a4 4f 12 00 mov 0x124fa4(%eax),%eax 1094e2: 85 c0 test %eax,%eax 1094e4: 0f 84 0a 01 00 00 je 1095f4 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1094ea: 83 ec 0c sub $0xc,%esp 1094ed: 53 push %ebx 1094ee: ff d0 call *%eax 1094f0: 83 c4 10 add $0x10,%esp } drainOutput (tty); rtems_semaphore_release (tty->osem); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1094f3: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1094fa: 0f 84 2c 01 00 00 je 10962c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 109500: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 109506: 85 c0 test %eax,%eax 109508: 74 0d je 109517 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10950a: 51 push %ecx 10950b: 56 push %esi 10950c: ff 73 10 pushl 0x10(%ebx) 10950f: ff 73 0c pushl 0xc(%ebx) 109512: ff d0 call *%eax 109514: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 109517: 8b 03 mov (%ebx),%eax 109519: 85 c0 test %eax,%eax 10951b: 0f 84 b7 00 00 00 je 1095d8 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 109521: 8b 53 04 mov 0x4(%ebx),%edx 109524: 89 50 04 mov %edx,0x4(%eax) 109527: 8b 53 04 mov 0x4(%ebx),%edx } if (tty->back == NULL) { 10952a: 85 d2 test %edx,%edx 10952c: 0f 84 8a 00 00 00 je 1095bc <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 109532: 89 02 mov %eax,(%edx) } rtems_semaphore_delete (tty->isem); 109534: 83 ec 0c sub $0xc,%esp 109537: ff 73 14 pushl 0x14(%ebx) 10953a: e8 ad 20 00 00 call 10b5ec rtems_semaphore_delete (tty->osem); 10953f: 5a pop %edx 109540: ff 73 18 pushl 0x18(%ebx) 109543: e8 a4 20 00 00 call 10b5ec rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 109548: 58 pop %eax 109549: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10954f: e8 98 20 00 00 call 10b5ec if ((tty->device.pollRead == NULL) || 109554: 83 c4 10 add $0x10,%esp 109557: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi 10955d: 85 f6 test %esi,%esi 10955f: 74 4b je 1095ac 109561: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109568: 74 42 je 1095ac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10956a: 83 ec 0c sub $0xc,%esp 10956d: ff 73 58 pushl 0x58(%ebx) 109570: e8 1f eb ff ff call 108094 free (tty->rawOutBuf.theBuf); 109575: 59 pop %ecx 109576: ff 73 7c pushl 0x7c(%ebx) 109579: e8 16 eb ff ff call 108094 free (tty->cbuf); 10957e: 5a pop %edx 10957f: ff 73 1c pushl 0x1c(%ebx) 109582: e8 0d eb ff ff call 108094 free (tty); 109587: 89 1c 24 mov %ebx,(%esp) 10958a: e8 05 eb ff ff call 108094 10958f: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 109592: 83 ec 0c sub $0xc,%esp 109595: ff 35 0c 53 12 00 pushl 0x12530c 10959b: e8 ec 21 00 00 call 10b78c return RTEMS_SUCCESSFUL; } 1095a0: 31 c0 xor %eax,%eax 1095a2: 8d 65 f8 lea -0x8(%ebp),%esp 1095a5: 5b pop %ebx 1095a6: 5e pop %esi 1095a7: c9 leave 1095a8: c3 ret 1095a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 1095ac: 83 ec 0c sub $0xc,%esp 1095af: ff 73 68 pushl 0x68(%ebx) 1095b2: e8 35 20 00 00 call 10b5ec 1095b7: 83 c4 10 add $0x10,%esp 1095ba: eb ae jmp 10956a } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 1095bc: a3 14 53 12 00 mov %eax,0x125314 if ( rtems_termios_ttyHead != NULL ) { 1095c1: 85 c0 test %eax,%eax 1095c3: 0f 84 6b ff ff ff je 109534 rtems_termios_ttyHead->back = NULL; 1095c9: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 1095d0: e9 5f ff ff ff jmp 109534 1095d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 1095d8: 8b 53 04 mov 0x4(%ebx),%edx 1095db: 89 15 10 53 12 00 mov %edx,0x125310 if ( rtems_termios_ttyTail != NULL ) { 1095e1: 85 d2 test %edx,%edx 1095e3: 74 d7 je 1095bc rtems_termios_ttyTail->forw = NULL; 1095e5: c7 02 00 00 00 00 movl $0x0,(%edx) 1095eb: 8b 03 mov (%ebx),%eax 1095ed: e9 40 ff ff ff jmp 109532 1095f2: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1095f4: 50 push %eax 1095f5: 6a 00 push $0x0 1095f7: 6a 00 push $0x0 1095f9: ff 73 18 pushl 0x18(%ebx) 1095fc: e8 8f 20 00 00 call 10b690 if (sc != RTEMS_SUCCESSFUL) { 109601: 83 c4 10 add $0x10,%esp 109604: 85 c0 test %eax,%eax 109606: 75 56 jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 109608: 89 d8 mov %ebx,%eax 10960a: e8 75 f9 ff ff call 108f84 rtems_semaphore_release (tty->osem); 10960f: 83 ec 0c sub $0xc,%esp 109612: ff 73 18 pushl 0x18(%ebx) 109615: e8 72 21 00 00 call 10b78c 10961a: 83 c4 10 add $0x10,%esp } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10961d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109624: 0f 85 d6 fe ff ff jne 109500 10962a: 66 90 xchg %ax,%ax /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 10962c: 83 ec 08 sub $0x8,%esp 10962f: 6a 01 push $0x1 109631: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 109637: e8 40 1b 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 10963c: 83 c4 10 add $0x10,%esp 10963f: 85 c0 test %eax,%eax 109641: 75 1b jne 10965e <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 109643: 83 ec 08 sub $0x8,%esp 109646: 6a 01 push $0x1 109648: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 10964e: e8 29 1b 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 109653: 83 c4 10 add $0x10,%esp 109656: 85 c0 test %eax,%eax 109658: 0f 84 a2 fe ff ff je 109500 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10965e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109661: 50 push %eax <== NOT EXECUTED 109662: e8 65 26 00 00 call 10bccc <== NOT EXECUTED =============================================================================== 0010ab44 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10ab44: 55 push %ebp 10ab45: 89 e5 mov %esp,%ebp 10ab47: 83 ec 08 sub $0x8,%esp 10ab4a: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10ab4d: 8b 55 0c mov 0xc(%ebp),%edx 10ab50: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10ab56: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10ab5d: 74 2d je 10ab8c if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 10ab5f: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10ab66: 74 0c je 10ab74 rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ab68: 89 45 08 mov %eax,0x8(%ebp) } 10ab6b: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ab6c: e9 27 fd ff ff jmp 10a898 10ab71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10ab74: 8b 15 54 50 12 00 mov 0x125054,%edx 10ab7a: 85 d2 test %edx,%edx 10ab7c: 74 09 je 10ab87 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10ab7e: 83 ec 0c sub $0xc,%esp 10ab81: 50 push %eax 10ab82: ff d2 call *%edx 10ab84: 83 c4 10 add $0x10,%esp } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 10ab87: 31 c0 xor %eax,%eax 10ab89: c9 leave 10ab8a: c3 ret 10ab8b: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 10ab8c: 83 ec 08 sub $0x8,%esp 10ab8f: 6a 02 push $0x2 10ab91: ff b0 c8 00 00 00 pushl 0xc8(%eax) 10ab97: e8 e0 05 00 00 call 10b17c if (sc != RTEMS_SUCCESSFUL) 10ab9c: 83 c4 10 add $0x10,%esp 10ab9f: 85 c0 test %eax,%eax 10aba1: 74 e4 je 10ab87 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10aba3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aba6: 50 push %eax <== NOT EXECUTED 10aba7: e8 20 11 00 00 call 10bccc <== NOT EXECUTED =============================================================================== 0010a520 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 10a520: 55 push %ebp 10a521: 89 e5 mov %esp,%ebp 10a523: 57 push %edi 10a524: 56 push %esi 10a525: 53 push %ebx 10a526: 83 ec 3c sub $0x3c,%esp 10a529: 8b 5d 08 mov 0x8(%ebp),%ebx 10a52c: 8b 75 0c mov 0xc(%ebp),%esi char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 10a52f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a535: c1 e0 05 shl $0x5,%eax 10a538: 8b 80 b0 4f 12 00 mov 0x124fb0(%eax),%eax 10a53e: 85 c0 test %eax,%eax 10a540: 0f 84 8a 00 00 00 je 10a5d0 while (len--) { 10a546: 8b 4d 10 mov 0x10(%ebp),%ecx 10a549: 85 c9 test %ecx,%ecx 10a54b: 74 2a je 10a577 <== NEVER TAKEN 10a54d: 31 ff xor %edi,%edi 10a54f: eb 12 jmp 10a563 10a551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10a554: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a55a: c1 e0 05 shl $0x5,%eax 10a55d: 8b 80 b0 4f 12 00 mov 0x124fb0(%eax),%eax c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 10a563: 83 ec 08 sub $0x8,%esp 10a566: 53 push %ebx 10a567: 0f be 14 3e movsbl (%esi,%edi,1),%edx 10a56b: 52 push %edx 10a56c: ff d0 call *%eax 10a56e: 47 inc %edi int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 10a56f: 83 c4 10 add $0x10,%esp 10a572: 3b 7d 10 cmp 0x10(%ebp),%edi 10a575: 75 dd jne 10a554 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10a577: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx 10a57d: 85 d2 test %edx,%edx 10a57f: 75 3b jne 10a5bc <== NEVER TAKEN 10a581: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a587: 85 c0 test %eax,%eax 10a589: 74 31 je 10a5bc <== NEVER TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a58b: 83 ec 08 sub $0x8,%esp 10a58e: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10a594: 8d 53 30 lea 0x30(%ebx),%edx 10a597: 52 push %edx 10a598: ff d0 call *%eax tty->tty_rcvwakeup = 1; 10a59a: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) 10a5a1: 00 00 00 10a5a4: 83 c4 10 add $0x10,%esp } return 0; 10a5a7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a5ae: 8b 45 e0 mov -0x20(%ebp),%eax 10a5b1: 8d 65 f4 lea -0xc(%ebp),%esp 10a5b4: 5b pop %ebx 10a5b5: 5e pop %esi 10a5b6: 5f pop %edi 10a5b7: c9 leave 10a5b8: c3 ret 10a5b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 10a5bc: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a5c3: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a5c6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a5c9: 5b pop %ebx <== NOT EXECUTED 10a5ca: 5e pop %esi <== NOT EXECUTED 10a5cb: 5f pop %edi <== NOT EXECUTED 10a5cc: c9 leave <== NOT EXECUTED 10a5cd: c3 ret <== NOT EXECUTED 10a5ce: 66 90 xchg %ax,%ax <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 10a5d0: 8b 7d 10 mov 0x10(%ebp),%edi 10a5d3: c6 45 db 00 movb $0x0,-0x25(%ebp) 10a5d7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a5de: 8d 43 30 lea 0x30(%ebx),%eax 10a5e1: 89 45 d0 mov %eax,-0x30(%ebp) if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 10a5e4: 8d 53 4a lea 0x4a(%ebx),%edx 10a5e7: 89 55 cc mov %edx,-0x34(%ebp) tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a5ea: 85 ff test %edi,%edi 10a5ec: 0f 84 0b 01 00 00 je 10a6fd <== NEVER TAKEN 10a5f2: 66 90 xchg %ax,%ax c = *buf++; 10a5f4: 8a 06 mov (%esi),%al 10a5f6: 88 45 e7 mov %al,-0x19(%ebp) 10a5f9: 46 inc %esi /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10a5fa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a600: f6 c4 02 test $0x2,%ah 10a603: 74 1c je 10a621 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10a605: 0f be 45 e7 movsbl -0x19(%ebp),%eax 10a609: 0f b6 53 4a movzbl 0x4a(%ebx),%edx 10a60d: 39 d0 cmp %edx,%eax 10a60f: 0f 84 07 01 00 00 je 10a71c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 10a615: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10a619: 39 d0 cmp %edx,%eax 10a61b: 0f 84 4f 01 00 00 je 10a770 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 10a621: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 10a625: 0f 85 0c 01 00 00 jne 10a737 <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 10a62b: 8b 43 60 mov 0x60(%ebx),%eax 10a62e: 8b 53 64 mov 0x64(%ebx),%edx 10a631: 89 55 dc mov %edx,-0x24(%ebp) 10a634: 40 inc %eax 10a635: 31 d2 xor %edx,%edx 10a637: f7 75 dc divl -0x24(%ebp) 10a63a: 89 d1 mov %edx,%ecx /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10a63c: 9c pushf 10a63d: fa cli 10a63e: 8f 45 d4 popl -0x2c(%ebp) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10a641: 8b 43 5c mov 0x5c(%ebx),%eax 10a644: 89 45 c4 mov %eax,-0x3c(%ebp) 10a647: 8b 43 64 mov 0x64(%ebx),%eax % tty->rawInBuf.Size) > tty->highwater) && 10a64a: 8b 53 64 mov 0x64(%ebx),%edx 10a64d: 89 55 dc mov %edx,-0x24(%ebp) } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10a650: 2b 45 c4 sub -0x3c(%ebp),%eax 10a653: 01 c8 add %ecx,%eax % tty->rawInBuf.Size) > tty->highwater) && 10a655: 31 d2 xor %edx,%edx 10a657: f7 75 dc divl -0x24(%ebp) } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10a65a: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx 10a660: 76 46 jbe 10a6a8 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 10a662: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && 10a668: a8 01 test $0x1,%al <== NOT EXECUTED 10a66a: 75 3c jne 10a6a8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10a66c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a672: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 10a675: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10a67b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a681: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 10a686: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10a68b: 0f 84 22 01 00 00 je 10a7b3 <== NOT EXECUTED /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 10a691: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a697: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 10a69c: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 10a6a1: 0f 84 50 01 00 00 je 10a7f7 <== NOT EXECUTED 10a6a7: 90 nop <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 10a6a8: ff 75 d4 pushl -0x2c(%ebp) 10a6ab: 9d popf if (newTail == tty->rawInBuf.Head) { 10a6ac: 8b 43 5c mov 0x5c(%ebx),%eax 10a6af: 39 c8 cmp %ecx,%eax 10a6b1: 0f 84 b1 00 00 00 je 10a768 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 10a6b7: 8b 43 58 mov 0x58(%ebx),%eax 10a6ba: 8a 55 e7 mov -0x19(%ebp),%dl 10a6bd: 88 14 08 mov %dl,(%eax,%ecx,1) tty->rawInBuf.Tail = newTail; 10a6c0: 89 4b 60 mov %ecx,0x60(%ebx) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10a6c3: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax 10a6c9: 85 c0 test %eax,%eax 10a6cb: 75 27 jne 10a6f4 <== NEVER TAKEN 10a6cd: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a6d3: 85 c0 test %eax,%eax 10a6d5: 74 1d je 10a6f4 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a6d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a6da: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10a6e0: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 10a6e3: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10a6e5: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10a6ec: 00 00 00 10a6ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a6f2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10a6f4: 4f dec %edi tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a6f5: 85 ff test %edi,%edi 10a6f7: 0f 85 f7 fe ff ff jne 10a5f4 <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; 10a6fd: 8b 45 e0 mov -0x20(%ebp),%eax 10a700: 01 43 78 add %eax,0x78(%ebx) rtems_semaphore_release (tty->rawInBuf.Semaphore); 10a703: 83 ec 0c sub $0xc,%esp 10a706: ff 73 68 pushl 0x68(%ebx) 10a709: e8 7e 10 00 00 call 10b78c return dropped; 10a70e: 83 c4 10 add $0x10,%esp } 10a711: 8b 45 e0 mov -0x20(%ebp),%eax 10a714: 8d 65 f4 lea -0xc(%ebp),%esp 10a717: 5b pop %ebx 10a718: 5e pop %esi 10a719: 5f pop %edi 10a71a: c9 leave 10a71b: c3 ret /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 10a71c: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10a720: 39 d0 cmp %edx,%eax 10a722: 74 7e je 10a7a2 <== NEVER TAKEN tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 10a724: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a72a: 83 c8 10 or $0x10,%eax 10a72d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 10a733: c6 45 db 01 movb $0x1,-0x25(%ebp) flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 10a737: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a73d: 83 e0 30 and $0x30,%eax 10a740: 83 f8 20 cmp $0x20,%eax 10a743: 75 af jne 10a6f4 <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); 10a745: 9c pushf <== NOT EXECUTED 10a746: fa cli <== NOT EXECUTED 10a747: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a748: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a74e: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a751: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 10a757: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a75d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a75f: 75 20 jne 10a781 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 10a761: 52 push %edx <== NOT EXECUTED 10a762: 9d popf <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 10a763: 4f dec %edi <== NOT EXECUTED 10a764: eb 8f jmp 10a6f5 <== NOT EXECUTED 10a766: 66 90 xchg %ax,%ax <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 10a768: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 10a76b: 4f dec %edi <== NOT EXECUTED 10a76c: eb 87 jmp 10a6f5 <== NOT EXECUTED 10a76e: 66 90 xchg %ax,%ax <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 10a770: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a776: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10a779: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a77f: eb b2 jmp 10a733 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 10a781: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 10a787: 51 push %ecx <== NOT EXECUTED 10a788: 6a 01 push $0x1 <== NOT EXECUTED 10a78a: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 10a78d: 50 push %eax <== NOT EXECUTED 10a78e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a791: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10a794: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a79a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a79d: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10a7a0: eb bf jmp 10a761 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 10a7a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7a8: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10a7ab: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a7b1: eb 80 jmp 10a733 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 10a7b3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7b9: a8 20 test $0x20,%al <== NOT EXECUTED 10a7bb: 75 0e jne 10a7cb <== NOT EXECUTED 10a7bd: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a7c3: 85 c0 test %eax,%eax <== NOT EXECUTED 10a7c5: 0f 85 dd fe ff ff jne 10a6a8 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 10a7cb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7d1: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10a7d4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10a7da: 52 push %edx <== NOT EXECUTED 10a7db: 6a 01 push $0x1 <== NOT EXECUTED 10a7dd: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10a7e0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a7e3: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a7e6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a7ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a7ef: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a7f2: e9 b1 fe ff ff jmp 10a6a8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { tty->flow_ctrl |= FL_IRTSOFF; 10a7f7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7fd: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 10a800: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10a806: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 10a80c: 85 c0 test %eax,%eax <== NOT EXECUTED 10a80e: 0f 84 94 fe ff ff je 10a6a8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 10a814: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a817: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a81a: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a81d: ff d0 call *%eax <== NOT EXECUTED 10a81f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a822: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a825: e9 7e fe ff ff jmp 10a6a8 <== NOT EXECUTED =============================================================================== 00108f48 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 108f48: 55 push %ebp 108f49: 89 e5 mov %esp,%ebp 108f4b: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 108f4e: a1 0c 53 12 00 mov 0x12530c,%eax 108f53: 85 c0 test %eax,%eax 108f55: 74 05 je 108f5c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 108f57: c9 leave 108f58: c3 ret 108f59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 108f5c: 83 ec 0c sub $0xc,%esp 108f5f: 68 0c 53 12 00 push $0x12530c 108f64: 6a 00 push $0x0 108f66: 6a 54 push $0x54 108f68: 6a 01 push $0x1 108f6a: 68 69 6d 52 54 push $0x54526d69 108f6f: e8 a0 24 00 00 call 10b414 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 108f74: 83 c4 20 add $0x20,%esp 108f77: 85 c0 test %eax,%eax 108f79: 74 dc je 108f57 rtems_fatal_error_occurred (sc); 108f7b: 83 ec 0c sub $0xc,%esp 108f7e: 50 push %eax 108f7f: e8 48 2d 00 00 call 10bccc =============================================================================== 00109688 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 109688: 55 push %ebp 109689: 89 e5 mov %esp,%ebp 10968b: 57 push %edi 10968c: 56 push %esi 10968d: 53 push %ebx 10968e: 83 ec 20 sub $0x20,%esp 109691: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109694: 8b 03 mov (%ebx),%eax 109696: 8b 40 34 mov 0x34(%eax),%eax 109699: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10969c: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 10969f: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1096a6: 6a 00 push $0x0 1096a8: 6a 00 push $0x0 1096aa: ff 70 18 pushl 0x18(%eax) 1096ad: e8 de 1f 00 00 call 10b690 1096b2: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 1096b5: 83 c4 10 add $0x10,%esp 1096b8: 85 c0 test %eax,%eax 1096ba: 75 24 jne 1096e0 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 1096bc: 8b 43 04 mov 0x4(%ebx),%eax 1096bf: 83 f8 04 cmp $0x4,%eax 1096c2: 74 70 je 109734 1096c4: 77 2a ja 1096f0 1096c6: 83 f8 02 cmp $0x2,%eax 1096c9: 0f 84 9d 00 00 00 je 10976c 1096cf: 0f 86 3f 02 00 00 jbe 109914 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 1096d5: 8b 45 e4 mov -0x1c(%ebp),%eax 1096d8: e8 a7 f8 ff ff call 108f84 break; 1096dd: eb 69 jmp 109748 1096df: 90 nop <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; 1096e0: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 1096e3: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1096e6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1096e9: 5b pop %ebx <== NOT EXECUTED 1096ea: 5e pop %esi <== NOT EXECUTED 1096eb: 5f pop %edi <== NOT EXECUTED 1096ec: c9 leave <== NOT EXECUTED 1096ed: c3 ret <== NOT EXECUTED 1096ee: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 1096f0: 3d 7f 66 04 40 cmp $0x4004667f,%eax 1096f5: 0f 84 f1 01 00 00 je 1098ec <== NEVER TAKEN 1096fb: 0f 87 33 02 00 00 ja 109934 109701: 83 f8 05 cmp $0x5,%eax 109704: 0f 84 ae 02 00 00 je 1099b8 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10970a: 8b 55 e4 mov -0x1c(%ebp),%edx 10970d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 109713: c1 e0 05 shl $0x5,%eax 109716: 8b 80 b8 4f 12 00 mov 0x124fb8(%eax),%eax 10971c: 85 c0 test %eax,%eax 10971e: 0f 84 b8 02 00 00 je 1099dc <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 109724: 83 ec 08 sub $0x8,%esp 109727: 53 push %ebx 109728: 52 push %edx 109729: ff d0 call *%eax 10972b: 89 45 e0 mov %eax,-0x20(%ebp) 10972e: 83 c4 10 add $0x10,%esp 109731: eb 15 jmp 109748 109733: 90 nop <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 109734: 8b 06 mov (%esi),%eax 109736: 8b 56 04 mov 0x4(%esi),%edx 109739: 8b 4d e4 mov -0x1c(%ebp),%ecx 10973c: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) 109742: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 109748: 83 ec 0c sub $0xc,%esp 10974b: 8b 45 e4 mov -0x1c(%ebp),%eax 10974e: ff 70 18 pushl 0x18(%eax) 109751: e8 36 20 00 00 call 10b78c args->ioctl_return = sc; 109756: 8b 55 e0 mov -0x20(%ebp),%edx 109759: 89 53 0c mov %edx,0xc(%ebx) return sc; 10975c: 83 c4 10 add $0x10,%esp } 10975f: 8b 45 e0 mov -0x20(%ebp),%eax 109762: 8d 65 f4 lea -0xc(%ebp),%esp 109765: 5b pop %ebx 109766: 5e pop %esi 109767: 5f pop %edi 109768: c9 leave 109769: c3 ret 10976a: 66 90 xchg %ax,%ax <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 10976c: 8b 73 08 mov 0x8(%ebx),%esi 10976f: 8b 4d e4 mov -0x1c(%ebp),%ecx 109772: 83 c1 30 add $0x30,%ecx 109775: 89 4d dc mov %ecx,-0x24(%ebp) 109778: b9 09 00 00 00 mov $0x9,%ecx 10977d: 8b 7d dc mov -0x24(%ebp),%edi 109780: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 109782: 8b 55 e4 mov -0x1c(%ebp),%edx 109785: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10978b: f6 c4 02 test $0x2,%ah 10978e: 74 44 je 1097d4 109790: f6 42 31 04 testb $0x4,0x31(%edx) 109794: 75 3e jne 1097d4 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 109796: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10979c: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 1097a1: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 1097a7: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 1097ad: a8 20 test $0x20,%al <== NOT EXECUTED 1097af: 74 23 je 1097d4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 1097b1: 9c pushf <== NOT EXECUTED 1097b2: fa cli <== NOT EXECUTED 1097b3: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 1097b4: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 1097ba: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1097bd: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 1097c3: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 1097c9: 85 ff test %edi,%edi <== NOT EXECUTED 1097cb: 0f 85 bb 02 00 00 jne 109a8c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1097d1: 56 push %esi <== NOT EXECUTED 1097d2: 9d popf <== NOT EXECUTED 1097d3: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 1097d4: 8b 4d e4 mov -0x1c(%ebp),%ecx 1097d7: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 1097dd: f6 c4 04 test $0x4,%ah 1097e0: 74 24 je 109806 1097e2: f6 41 31 10 testb $0x10,0x31(%ecx) 1097e6: 75 1e jne 109806 <== ALWAYS TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 1097e8: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1097ee: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 1097f1: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 1097f7: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1097fd: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 109800: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 109806: 8b 55 e4 mov -0x1c(%ebp),%edx 109809: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10980f: f6 c4 01 test $0x1,%ah 109812: 0f 84 bc 01 00 00 je 1099d4 <== ALWAYS TAKEN 109818: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10981b: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 10981e: 85 c0 test %eax,%eax <== NOT EXECUTED 109820: 0f 88 12 02 00 00 js 109a38 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 109826: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10982c: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED 10982f: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 109835: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10983b: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 10983e: 74 1b je 10985b <== NOT EXECUTED 109840: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED 109846: 85 d2 test %edx,%edx <== NOT EXECUTED 109848: 74 11 je 10985b <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10984a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10984d: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED 109850: ff d2 call *%edx <== NOT EXECUTED 109852: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109855: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 109858: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10985b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10985e: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 109864: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED 109867: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 10986d: 85 c0 test %eax,%eax 10986f: 0f 88 c3 01 00 00 js 109a38 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 109875: 8b 4d e4 mov -0x1c(%ebp),%ecx 109878: 8b 41 30 mov 0x30(%ecx),%eax 10987b: f6 c4 10 test $0x10,%ah 10987e: 74 0f je 10988f tty->flow_ctrl |= FL_MDXOF; 109880: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx 109886: 80 ce 04 or $0x4,%dh 109889: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10988f: f6 c4 04 test $0x4,%ah 109892: 74 12 je 1098a6 tty->flow_ctrl |= FL_MDXON; 109894: 8b 55 e4 mov -0x1c(%ebp),%edx 109897: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10989d: 80 cc 02 or $0x2,%ah 1098a0: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 1098a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 1098a9: f6 41 3c 02 testb $0x2,0x3c(%ecx) 1098ad: 0f 84 41 01 00 00 je 1099f4 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 1098b3: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 1098ba: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 1098c1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 1098c8: 8b 55 e4 mov -0x1c(%ebp),%edx 1098cb: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 1098d1: 85 c0 test %eax,%eax 1098d3: 0f 84 6f fe ff ff je 109748 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 1098d9: 83 ec 08 sub $0x8,%esp 1098dc: ff 75 dc pushl -0x24(%ebp) 1098df: ff 72 10 pushl 0x10(%edx) 1098e2: ff d0 call *%eax 1098e4: 83 c4 10 add $0x10,%esp 1098e7: e9 5c fe ff ff jmp 109748 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 1098ec: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1098ef: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 1098f2: 89 d1 mov %edx,%ecx <== NOT EXECUTED 1098f4: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 1098f7: 29 d0 sub %edx,%eax <== NOT EXECUTED 1098f9: 0f 88 e9 00 00 00 js 1099e8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 1098ff: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 109902: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 109905: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 109908: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10990b: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; 10990d: e9 36 fe ff ff jmp 109748 <== NOT EXECUTED 109912: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 109914: 48 dec %eax 109915: 0f 85 ef fd ff ff jne 10970a <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10991b: 8b 43 08 mov 0x8(%ebx),%eax 10991e: 8b 75 e4 mov -0x1c(%ebp),%esi 109921: 83 c6 30 add $0x30,%esi 109924: b9 09 00 00 00 mov $0x9,%ecx 109929: 89 c7 mov %eax,%edi 10992b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10992d: e9 16 fe ff ff jmp 109748 109932: 66 90 xchg %ax,%ax <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 109934: 3d 1a 74 04 40 cmp $0x4004741a,%eax 109939: 74 69 je 1099a4 10993b: 3d 1b 74 04 80 cmp $0x8004741b,%eax 109940: 0f 85 c4 fd ff ff jne 10970a <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 109946: 8b 55 e4 mov -0x1c(%ebp),%edx 109949: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 10994f: c1 e0 05 shl $0x5,%eax 109952: 8b 80 a4 4f 12 00 mov 0x124fa4(%eax),%eax 109958: 85 c0 test %eax,%eax 10995a: 74 0c je 109968 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10995c: 83 ec 0c sub $0xc,%esp 10995f: 52 push %edx 109960: ff d0 call *%eax 109962: 89 45 e0 mov %eax,-0x20(%ebp) 109965: 83 c4 10 add $0x10,%esp } tty->t_line=*(int*)(args->buffer); 109968: 8b 43 08 mov 0x8(%ebx),%eax 10996b: 8b 00 mov (%eax),%eax 10996d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109970: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) tty->t_sc = NULL; /* ensure that no more valid data */ 109976: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) 10997d: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 109980: c1 e0 05 shl $0x5,%eax 109983: 8b 80 a0 4f 12 00 mov 0x124fa0(%eax),%eax 109989: 85 c0 test %eax,%eax 10998b: 0f 84 b7 fd ff ff je 109748 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109991: 83 ec 0c sub $0xc,%esp 109994: 51 push %ecx 109995: ff d0 call *%eax 109997: 89 45 e0 mov %eax,-0x20(%ebp) 10999a: 83 c4 10 add $0x10,%esp 10999d: e9 a6 fd ff ff jmp 109748 1099a2: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 1099a4: 8b 43 08 mov 0x8(%ebx),%eax 1099a7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1099aa: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx 1099b0: 89 10 mov %edx,(%eax) break; 1099b2: e9 91 fd ff ff jmp 109748 1099b7: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 1099b8: 8b 06 mov (%esi),%eax 1099ba: 8b 56 04 mov 0x4(%esi),%edx 1099bd: 8b 4d e4 mov -0x1c(%ebp),%ecx 1099c0: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) 1099c6: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) break; 1099cc: e9 77 fd ff ff jmp 109748 1099d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 1099d4: 8b 42 38 mov 0x38(%edx),%eax 1099d7: e9 91 fe ff ff jmp 10986d default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 1099dc: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 1099e3: e9 60 fd ff ff jmp 109748 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 1099e8: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 1099eb: 01 d0 add %edx,%eax <== NOT EXECUTED 1099ed: e9 0d ff ff ff jmp 1098ff <== NOT EXECUTED 1099f2: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 1099f4: 8b 45 e4 mov -0x1c(%ebp),%eax 1099f7: 0f b6 70 46 movzbl 0x46(%eax),%esi rtems_clock_get_ticks_per_second() / 10; 1099fb: e8 74 15 00 00 call 10af74 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109a00: 0f af c6 imul %esi,%eax rtems_clock_get_ticks_per_second() / 10; 109a03: ba cd cc cc cc mov $0xcccccccd,%edx 109a08: f7 e2 mul %edx 109a0a: c1 ea 03 shr $0x3,%edx if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 109a0d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a10: 89 51 54 mov %edx,0x54(%ecx) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 109a13: 80 79 46 00 cmpb $0x0,0x46(%ecx) 109a17: 74 36 je 109a4f tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109a19: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 109a20: 89 51 70 mov %edx,0x70(%ecx) if (tty->termios.c_cc[VMIN]) 109a23: 80 79 47 00 cmpb $0x0,0x47(%ecx) 109a27: 74 49 je 109a72 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109a29: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) 109a30: e9 93 fe ff ff jmp 1098c8 109a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 109a38: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109a3b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109a41: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 109a44: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 109a4a: e9 26 fe ff ff jmp 109875 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 109a4f: 8b 55 e4 mov -0x1c(%ebp),%edx 109a52: 80 7a 47 00 cmpb $0x0,0x47(%edx) 109a56: 74 25 je 109a7d <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109a58: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 109a5f: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109a66: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 109a6d: e9 56 fe ff ff jmp 1098c8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 109a72: 8b 45 e4 mov -0x1c(%ebp),%eax 109a75: 89 50 74 mov %edx,0x74(%eax) 109a78: e9 4b fe ff ff jmp 1098c8 if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 109a7d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a80: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) 109a87: e9 3c fe ff ff jmp 1098c8 tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 109a8c: 8b 82 84 00 00 00 mov 0x84(%edx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( 109a92: 51 push %ecx <== NOT EXECUTED 109a93: 6a 01 push $0x1 <== NOT EXECUTED 109a95: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 109a98: 50 push %eax <== NOT EXECUTED 109a99: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 109a9c: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 109aa2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109aa5: e9 27 fd ff ff jmp 1097d1 <== NOT EXECUTED =============================================================================== 0010aa60 : extern rtems_assoc_t termios_assoc_table[]; int rtems_termios_number_to_baud( int32_t baud ) { 10aa60: 55 push %ebp 10aa61: 89 e5 mov %esp,%ebp 10aa63: 53 push %ebx 10aa64: 83 ec 0c sub $0xc,%esp 10aa67: 8b 5d 08 mov 0x8(%ebp),%ebx int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); 10aa6a: 53 push %ebx 10aa6b: 68 e0 71 12 00 push $0x1271e0 10aa70: e8 73 6c 00 00 call 1116e8 if ( termios_baud == 0 && baud != 0 ) 10aa75: 83 c4 10 add $0x10,%esp 10aa78: 85 c0 test %eax,%eax 10aa7a: 74 08 je 10aa84 return -1; return termios_baud; } 10aa7c: 8b 5d fc mov -0x4(%ebp),%ebx 10aa7f: c9 leave 10aa80: c3 ret 10aa81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { int termios_baud; termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud ); if ( termios_baud == 0 && baud != 0 ) 10aa84: 85 db test %ebx,%ebx 10aa86: 74 f4 je 10aa7c return -1; 10aa88: b8 ff ff ff ff mov $0xffffffff,%eax 10aa8d: eb ed jmp 10aa7c =============================================================================== 00108ff4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 108ff4: 55 push %ebp 108ff5: 89 e5 mov %esp,%ebp 108ff7: 57 push %edi 108ff8: 56 push %esi 108ff9: 53 push %ebx 108ffa: 83 ec 40 sub $0x40,%esp 108ffd: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 109000: 6a 00 push $0x0 109002: 6a 00 push $0x0 109004: ff 35 0c 53 12 00 pushl 0x12530c 10900a: 89 55 dc mov %edx,-0x24(%ebp) 10900d: e8 7e 26 00 00 call 10b690 109012: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109015: 83 c4 10 add $0x10,%esp 109018: 85 c0 test %eax,%eax 10901a: 8b 55 dc mov -0x24(%ebp),%edx 10901d: 75 6d jne 10908c <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10901f: 8b 35 14 53 12 00 mov 0x125314,%esi 109025: 85 f6 test %esi,%esi 109027: 0f 84 a7 00 00 00 je 1090d4 10902d: 89 f3 mov %esi,%ebx 10902f: 8b 45 0c mov 0xc(%ebp),%eax 109032: eb 0a jmp 10903e 109034: 8b 1b mov (%ebx),%ebx 109036: 85 db test %ebx,%ebx 109038: 0f 84 96 00 00 00 je 1090d4 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 10903e: 39 53 0c cmp %edx,0xc(%ebx) 109041: 75 f1 jne 109034 109043: 39 43 10 cmp %eax,0x10(%ebx) 109046: 75 ec jne 109034 <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 109048: 8b 75 10 mov 0x10(%ebp),%esi 10904b: 8b 06 mov (%esi),%eax 10904d: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 109050: 8b 43 08 mov 0x8(%ebx),%eax 109053: 8d 48 01 lea 0x1(%eax),%ecx 109056: 89 4b 08 mov %ecx,0x8(%ebx) 109059: 85 c0 test %eax,%eax 10905b: 75 1e jne 10907b if (tty->device.firstOpen) 10905d: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 109063: 85 c0 test %eax,%eax 109065: 74 0b je 109072 (*tty->device.firstOpen)(major, minor, arg); 109067: 57 push %edi 109068: 56 push %esi 109069: ff 75 0c pushl 0xc(%ebp) 10906c: 52 push %edx 10906d: ff d0 call *%eax 10906f: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109072: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109079: 74 1c je 109097 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10907b: 83 ec 0c sub $0xc,%esp 10907e: ff 35 0c 53 12 00 pushl 0x12530c 109084: e8 03 27 00 00 call 10b78c return RTEMS_SUCCESSFUL; 109089: 83 c4 10 add $0x10,%esp } 10908c: 8b 45 e4 mov -0x1c(%ebp),%eax 10908f: 8d 65 f4 lea -0xc(%ebp),%esp 109092: 5b pop %ebx 109093: 5e pop %esi 109094: 5f pop %edi 109095: c9 leave 109096: c3 ret /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 109097: 56 push %esi 109098: 53 push %ebx 109099: 68 2c a8 10 00 push $0x10a82c 10909e: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 1090a4: e8 2b 2a 00 00 call 10bad4 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 1090a9: 83 c4 10 add $0x10,%esp 1090ac: 85 c0 test %eax,%eax 1090ae: 0f 85 3f 03 00 00 jne 1093f3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 1090b4: 51 push %ecx 1090b5: 53 push %ebx 1090b6: 68 dc aa 10 00 push $0x10aadc 1090bb: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 1090c1: e8 0e 2a 00 00 call 10bad4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 1090c6: 83 c4 10 add $0x10,%esp 1090c9: 85 c0 test %eax,%eax 1090cb: 74 ae je 10907b <== ALWAYS TAKEN 1090cd: e9 21 03 00 00 jmp 1093f3 <== NOT EXECUTED 1090d2: 66 90 xchg %ax,%ax <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 1090d4: 83 ec 08 sub $0x8,%esp 1090d7: 68 e8 00 00 00 push $0xe8 1090dc: 6a 01 push $0x1 1090de: 89 55 dc mov %edx,-0x24(%ebp) 1090e1: e8 1e ee ff ff call 107f04 1090e6: 89 45 e0 mov %eax,-0x20(%ebp) 1090e9: 89 c3 mov %eax,%ebx if (tty == NULL) { 1090eb: 83 c4 10 add $0x10,%esp 1090ee: 85 c0 test %eax,%eax 1090f0: 8b 55 dc mov -0x24(%ebp),%edx 1090f3: 0f 84 75 02 00 00 je 10936e return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1090f9: a1 24 31 12 00 mov 0x123124,%eax 1090fe: 8b 4d e0 mov -0x20(%ebp),%ecx 109101: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 109104: 8b 41 64 mov 0x64(%ecx),%eax 109107: 83 ec 0c sub $0xc,%esp 10910a: 50 push %eax 10910b: 89 55 dc mov %edx,-0x24(%ebp) 10910e: e8 55 f2 ff ff call 108368 109113: 89 45 c4 mov %eax,-0x3c(%ebp) 109116: 8b 7d e0 mov -0x20(%ebp),%edi 109119: 89 47 58 mov %eax,0x58(%edi) if (tty->rawInBuf.theBuf == NULL) { 10911c: 83 c4 10 add $0x10,%esp 10911f: 85 c0 test %eax,%eax 109121: 8b 55 dc mov -0x24(%ebp),%edx 109124: 0f 84 61 02 00 00 je 10938b return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10912a: a1 28 31 12 00 mov 0x123128,%eax 10912f: 8b 4d e0 mov -0x20(%ebp),%ecx 109132: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 109138: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10913e: 83 ec 0c sub $0xc,%esp 109141: 50 push %eax 109142: 89 55 dc mov %edx,-0x24(%ebp) 109145: e8 1e f2 ff ff call 108368 10914a: 89 c7 mov %eax,%edi 10914c: 8b 45 e0 mov -0x20(%ebp),%eax 10914f: 89 78 7c mov %edi,0x7c(%eax) if (tty->rawOutBuf.theBuf == NULL) { 109152: 83 c4 10 add $0x10,%esp 109155: 85 ff test %edi,%edi 109157: 8b 55 dc mov -0x24(%ebp),%edx 10915a: 0f 84 4f 02 00 00 je 1093af <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 109160: 83 ec 0c sub $0xc,%esp 109163: ff 35 20 31 12 00 pushl 0x123120 109169: 89 55 dc mov %edx,-0x24(%ebp) 10916c: e8 f7 f1 ff ff call 108368 109171: 8b 4d e0 mov -0x20(%ebp),%ecx 109174: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 109177: 83 c4 10 add $0x10,%esp 10917a: 85 c0 test %eax,%eax 10917c: 8b 55 dc mov -0x24(%ebp),%edx 10917f: 0f 84 77 02 00 00 je 1093fc return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 109185: 8b 7d e0 mov -0x20(%ebp),%edi 109188: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi) 10918f: 00 00 00 tty->tty_snd.sw_arg = NULL; 109192: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi) 109199: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10919c: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi) 1091a3: 00 00 00 tty->tty_rcv.sw_arg = NULL; 1091a6: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi) 1091ad: 00 00 00 tty->tty_rcvwakeup = 0; 1091b0: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi) 1091b7: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 1091ba: 89 37 mov %esi,(%edi) tty->back = NULL; 1091bc: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) if (rtems_termios_ttyHead != NULL) 1091c3: 85 f6 test %esi,%esi 1091c5: 74 03 je 1091ca rtems_termios_ttyHead->back = tty; 1091c7: 89 7e 04 mov %edi,0x4(%esi) rtems_termios_ttyHead = tty; 1091ca: 8b 45 e0 mov -0x20(%ebp),%eax 1091cd: a3 14 53 12 00 mov %eax,0x125314 if (rtems_termios_ttyTail == NULL) 1091d2: 8b 0d 10 53 12 00 mov 0x125310,%ecx 1091d8: 85 c9 test %ecx,%ecx 1091da: 0f 84 af 02 00 00 je 10948f rtems_termios_ttyTail = tty; tty->minor = minor; 1091e0: 8b 75 0c mov 0xc(%ebp),%esi 1091e3: 8b 4d e0 mov -0x20(%ebp),%ecx 1091e6: 89 71 10 mov %esi,0x10(%ecx) tty->major = major; 1091e9: 89 51 0c mov %edx,0xc(%ecx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1091ec: 83 ec 0c sub $0xc,%esp 1091ef: 89 c8 mov %ecx,%eax 1091f1: 83 c0 14 add $0x14,%eax 1091f4: 50 push %eax 1091f5: 6a 00 push $0x0 1091f7: 6a 54 push $0x54 1091f9: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'i', c), 1091fb: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 109202: 0d 00 69 52 54 or $0x54526900,%eax 109207: 50 push %eax 109208: 89 55 dc mov %edx,-0x24(%ebp) 10920b: e8 04 22 00 00 call 10b414 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 109210: 83 c4 20 add $0x20,%esp 109213: 85 c0 test %eax,%eax 109215: 8b 55 dc mov -0x24(%ebp),%edx 109218: 0f 85 d5 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10921e: 83 ec 0c sub $0xc,%esp 109221: 8b 45 e0 mov -0x20(%ebp),%eax 109224: 83 c0 18 add $0x18,%eax 109227: 50 push %eax 109228: 6a 00 push $0x0 10922a: 6a 54 push $0x54 10922c: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'o', c), 10922e: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109235: 0d 00 6f 52 54 or $0x54526f00,%eax 10923a: 50 push %eax 10923b: 89 55 dc mov %edx,-0x24(%ebp) 10923e: e8 d1 21 00 00 call 10b414 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 109243: 83 c4 20 add $0x20,%esp 109246: 85 c0 test %eax,%eax 109248: 8b 55 dc mov -0x24(%ebp),%edx 10924b: 0f 85 a2 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109251: 83 ec 0c sub $0xc,%esp 109254: 8b 45 e0 mov -0x20(%ebp),%eax 109257: 05 8c 00 00 00 add $0x8c,%eax 10925c: 50 push %eax 10925d: 6a 00 push $0x0 10925f: 6a 20 push $0x20 109261: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'x', c), 109263: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10926a: 0d 00 78 52 54 or $0x54527800,%eax 10926f: 50 push %eax 109270: 89 55 dc mov %edx,-0x24(%ebp) 109273: e8 9c 21 00 00 call 10b414 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109278: 83 c4 20 add $0x20,%esp 10927b: 85 c0 test %eax,%eax 10927d: 8b 55 dc mov -0x24(%ebp),%edx 109280: 0f 85 6d 01 00 00 jne 1093f3 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 109286: 8b 7d e0 mov -0x20(%ebp),%edi 109289: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi) 109290: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 109293: 81 c7 98 00 00 00 add $0x98,%edi 109299: b9 08 00 00 00 mov $0x8,%ecx 10929e: 8b 75 14 mov 0x14(%ebp),%esi 1092a1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1092a3: 8b 7d e0 mov -0x20(%ebp),%edi 1092a6: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi) 1092ad: 0f 84 64 01 00 00 je 109417 <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 1092b3: 8b 45 e0 mov -0x20(%ebp),%eax 1092b6: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx 1092bc: 85 c9 test %ecx,%ecx 1092be: 0f 84 fc 00 00 00 je 1093c0 1092c4: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 1092cb: 0f 84 ef 00 00 00 je 1093c0 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 1092d1: 8b 4d e0 mov -0x20(%ebp),%ecx 1092d4: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 1092db: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 1092e2: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx) tty->termios.c_lflag = 1092e9: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 1092f0: c6 41 41 03 movb $0x3,0x41(%ecx) tty->termios.c_cc[VQUIT] = '\034'; 1092f4: c6 41 42 1c movb $0x1c,0x42(%ecx) tty->termios.c_cc[VERASE] = '\177'; 1092f8: c6 41 43 7f movb $0x7f,0x43(%ecx) tty->termios.c_cc[VKILL] = '\025'; 1092fc: c6 41 44 15 movb $0x15,0x44(%ecx) tty->termios.c_cc[VEOF] = '\004'; 109300: c6 41 45 04 movb $0x4,0x45(%ecx) tty->termios.c_cc[VEOL] = '\000'; 109304: c6 41 4c 00 movb $0x0,0x4c(%ecx) tty->termios.c_cc[VEOL2] = '\000'; 109308: c6 41 51 00 movb $0x0,0x51(%ecx) tty->termios.c_cc[VSTART] = '\021'; 10930c: c6 41 49 11 movb $0x11,0x49(%ecx) tty->termios.c_cc[VSTOP] = '\023'; 109310: c6 41 4a 13 movb $0x13,0x4a(%ecx) tty->termios.c_cc[VSUSP] = '\032'; 109314: c6 41 4b 1a movb $0x1a,0x4b(%ecx) tty->termios.c_cc[VREPRINT] = '\022'; 109318: c6 41 4d 12 movb $0x12,0x4d(%ecx) tty->termios.c_cc[VDISCARD] = '\017'; 10931c: c6 41 4e 0f movb $0xf,0x4e(%ecx) tty->termios.c_cc[VWERASE] = '\027'; 109320: c6 41 4f 17 movb $0x17,0x4f(%ecx) tty->termios.c_cc[VLNEXT] = '\026'; 109324: c6 41 50 16 movb $0x16,0x50(%ecx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 109328: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx) 10932f: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 109332: 8b 41 64 mov 0x64(%ecx),%eax 109335: d1 e8 shr %eax 109337: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx) tty->highwater = tty->rawInBuf.Size * 3/4; 10933d: 8b 41 64 mov 0x64(%ecx),%eax 109340: 8d 04 40 lea (%eax,%eax,2),%eax 109343: c1 e8 02 shr $0x2,%eax 109346: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx) /* * Bump name characer */ if (c++ == 'z') 10934c: a0 2c 31 12 00 mov 0x12312c,%al 109351: 8d 48 01 lea 0x1(%eax),%ecx 109354: 88 0d 2c 31 12 00 mov %cl,0x12312c 10935a: 3c 7a cmp $0x7a,%al 10935c: 0f 85 e6 fc ff ff jne 109048 c = 'a'; 109362: c6 05 2c 31 12 00 61 movb $0x61,0x12312c 109369: e9 da fc ff ff jmp 109048 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10936e: 83 ec 0c sub $0xc,%esp 109371: ff 35 0c 53 12 00 pushl 0x12530c 109377: e8 10 24 00 00 call 10b78c return RTEMS_NO_MEMORY; 10937c: 83 c4 10 add $0x10,%esp 10937f: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 109386: e9 01 fd ff ff jmp 10908c * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 10938b: 83 ec 0c sub $0xc,%esp 10938e: 57 push %edi */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); free(tty); 10938f: e8 00 ed ff ff call 108094 rtems_semaphore_release (rtems_termios_ttyMutex); 109394: 5f pop %edi 109395: ff 35 0c 53 12 00 pushl 0x12530c 10939b: e8 ec 23 00 00 call 10b78c return RTEMS_NO_MEMORY; 1093a0: 83 c4 10 add $0x10,%esp 1093a3: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) 1093aa: e9 dd fc ff ff jmp 10908c * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 1093af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1093b2: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1093b5: e8 da ec ff ff call 108094 <== NOT EXECUTED free(tty); 1093ba: 58 pop %eax <== NOT EXECUTED 1093bb: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 1093be: eb cf jmp 10938f <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 1093c0: 83 ec 0c sub $0xc,%esp 1093c3: 8b 45 e0 mov -0x20(%ebp),%eax 1093c6: 83 c0 68 add $0x68,%eax 1093c9: 50 push %eax 1093ca: 6a 00 push $0x0 1093cc: 6a 24 push $0x24 1093ce: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'r', c), 1093d0: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 1093d7: 0d 00 72 52 54 or $0x54527200,%eax 1093dc: 50 push %eax 1093dd: 89 55 dc mov %edx,-0x24(%ebp) 1093e0: e8 2f 20 00 00 call 10b414 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 1093e5: 83 c4 20 add $0x20,%esp 1093e8: 85 c0 test %eax,%eax 1093ea: 8b 55 dc mov -0x24(%ebp),%edx 1093ed: 0f 84 de fe ff ff je 1092d1 rtems_fatal_error_occurred (sc); sc = rtems_task_start( tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 1093f3: 83 ec 0c sub $0xc,%esp 1093f6: 50 push %eax 1093f7: e8 d0 28 00 00 call 10bccc /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 1093fc: 83 ec 0c sub $0xc,%esp 1093ff: 57 push %edi 109400: e8 8f ec ff ff call 108094 free((void *)(tty->rawInBuf.theBuf)); 109405: 5e pop %esi 109406: ff 75 c4 pushl -0x3c(%ebp) 109409: e8 86 ec ff ff call 108094 free(tty); 10940e: 5b pop %ebx 10940f: ff 75 e0 pushl -0x20(%ebp) 109412: e9 78 ff ff ff jmp 10938f /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 109417: 50 push %eax 109418: 50 push %eax 109419: 89 f8 mov %edi,%eax 10941b: 05 c8 00 00 00 add $0xc8,%eax 109420: 50 push %eax 109421: 6a 00 push $0x0 109423: 68 00 05 00 00 push $0x500 109428: 68 00 04 00 00 push $0x400 10942d: 6a 0a push $0xa rtems_build_name ('T', 'x', 'T', c), 10942f: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 109436: 0d 00 54 78 54 or $0x54785400,%eax 10943b: 50 push %eax 10943c: 89 55 dc mov %edx,-0x24(%ebp) 10943f: e8 e8 23 00 00 call 10b82c TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 109444: 83 c4 20 add $0x20,%esp 109447: 85 c0 test %eax,%eax 109449: 8b 55 dc mov -0x24(%ebp),%edx 10944c: 75 a5 jne 1093f3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10944e: 56 push %esi 10944f: 56 push %esi 109450: 8b 45 e0 mov -0x20(%ebp),%eax 109453: 05 c4 00 00 00 add $0xc4,%eax 109458: 50 push %eax 109459: 6a 00 push $0x0 10945b: 68 00 05 00 00 push $0x500 109460: 68 00 04 00 00 push $0x400 109465: 6a 09 push $0x9 rtems_build_name ('R', 'x', 'T', c), 109467: 0f be 05 2c 31 12 00 movsbl 0x12312c,%eax RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10946e: 0d 00 54 78 52 or $0x52785400,%eax 109473: 50 push %eax 109474: 89 55 dc mov %edx,-0x24(%ebp) 109477: e8 b0 23 00 00 call 10b82c TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 10947c: 83 c4 20 add $0x20,%esp 10947f: 85 c0 test %eax,%eax 109481: 8b 55 dc mov -0x24(%ebp),%edx 109484: 0f 84 29 fe ff ff je 1092b3 10948a: e9 64 ff ff ff jmp 1093f3 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 10948f: a3 10 53 12 00 mov %eax,0x125310 109494: e9 47 fd ff ff jmp 1091e0 =============================================================================== 00109aac : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109aac: 55 push %ebp 109aad: 89 e5 mov %esp,%ebp 109aaf: 57 push %edi 109ab0: 56 push %esi 109ab1: 53 push %ebx 109ab2: 83 ec 1c sub $0x1c,%esp 109ab5: 8b 45 08 mov 0x8(%ebp),%eax 109ab8: 8b 55 0c mov 0xc(%ebp),%edx 109abb: 89 55 e4 mov %edx,-0x1c(%ebp) 109abe: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109ac1: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109ac3: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx 109ac9: 85 c9 test %ecx,%ecx 109acb: 0f 84 eb 00 00 00 je 109bbc (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109ad1: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109ad7: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 109ada: 8b 55 e4 mov -0x1c(%ebp),%edx 109add: 85 d2 test %edx,%edx 109adf: 0f 84 cf 00 00 00 je 109bb4 <== NEVER TAKEN 109ae5: 8d 76 00 lea 0x0(%esi),%esi * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 109ae8: 8b 45 e0 mov -0x20(%ebp),%eax 109aeb: 40 inc %eax 109aec: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109af2: 31 d2 xor %edx,%edx 109af4: f7 f1 div %ecx 109af6: 89 55 dc mov %edx,-0x24(%ebp) 109af9: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109afc: 9c pushf 109afd: fa cli 109afe: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109aff: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109b05: 3b 55 e0 cmp -0x20(%ebp),%edx 109b08: 75 3e jne 109b48 109b0a: 89 f8 mov %edi,%eax 109b0c: 89 f7 mov %esi,%edi 109b0e: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109b10: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109b17: 00 00 00 rtems_interrupt_enable (level); 109b1a: 50 push %eax 109b1b: 9d popf sc = rtems_semaphore_obtain( 109b1c: 50 push %eax 109b1d: 6a 00 push $0x0 109b1f: 6a 00 push $0x0 109b21: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109b27: e8 64 1b 00 00 call 10b690 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109b2c: 83 c4 10 add $0x10,%esp 109b2f: 85 c0 test %eax,%eax 109b31: 0f 85 a0 00 00 00 jne 109bd7 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109b37: 9c pushf 109b38: fa cli 109b39: 58 pop %eax * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 109b3a: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109b40: 39 f2 cmp %esi,%edx 109b42: 74 cc je 109b10 <== NEVER TAKEN 109b44: 89 fe mov %edi,%esi 109b46: 89 c7 mov %eax,%edi tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109b48: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109b4e: 8b 4b 7c mov 0x7c(%ebx),%ecx 109b51: 8a 16 mov (%esi),%dl 109b53: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 109b56: 8b 45 dc mov -0x24(%ebp),%eax 109b59: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109b5f: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx 109b65: 85 c9 test %ecx,%ecx 109b67: 75 23 jne 109b8c /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109b69: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109b6f: a8 10 test $0x10,%al 109b71: 74 26 je 109b99 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 109b73: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b79: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109b7c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109b82: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109b89: 00 00 00 } rtems_interrupt_enable (level); 109b8c: 57 push %edi 109b8d: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109b8e: ff 4d e4 decl -0x1c(%ebp) 109b91: 74 21 je 109bb4 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109b93: 46 inc %esi 109b94: e9 4f ff ff ff jmp 109ae8 tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 109b99: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 109b9f: 52 push %edx 109ba0: 6a 01 push $0x1 109ba2: 03 43 7c add 0x7c(%ebx),%eax 109ba5: 50 push %eax 109ba6: ff 73 10 pushl 0x10(%ebx) 109ba9: ff 93 a4 00 00 00 call *0xa4(%ebx) 109baf: 83 c4 10 add $0x10,%esp 109bb2: eb ce jmp 109b82 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109bb4: 8d 65 f4 lea -0xc(%ebp),%esp 109bb7: 5b pop %ebx 109bb8: 5e pop %esi 109bb9: 5f pop %edi 109bba: c9 leave 109bbb: c3 ret unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 109bbc: 89 55 10 mov %edx,0x10(%ebp) 109bbf: 89 45 0c mov %eax,0xc(%ebp) 109bc2: 8b 43 10 mov 0x10(%ebx),%eax 109bc5: 89 45 08 mov %eax,0x8(%ebp) 109bc8: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109bce: 8d 65 f4 lea -0xc(%ebp),%esp 109bd1: 5b pop %ebx 109bd2: 5e pop %esi 109bd3: 5f pop %edi 109bd4: c9 leave unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 109bd5: ff e0 jmp *%eax tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 109bd7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109bda: 50 push %eax <== NOT EXECUTED 109bdb: e8 ec 20 00 00 call 10bccc <== NOT EXECUTED =============================================================================== 0010a1b8 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10a1b8: 55 push %ebp 10a1b9: 89 e5 mov %esp,%ebp 10a1bb: 57 push %edi 10a1bc: 56 push %esi 10a1bd: 53 push %ebx 10a1be: 83 ec 30 sub $0x30,%esp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a1c1: 8b 55 08 mov 0x8(%ebp),%edx 10a1c4: 8b 02 mov (%edx),%eax 10a1c6: 8b 58 34 mov 0x34(%eax),%ebx uint32_t count = args->count; 10a1c9: 8b 4a 10 mov 0x10(%edx),%ecx 10a1cc: 89 4d dc mov %ecx,-0x24(%ebp) char *buffer = args->buffer; 10a1cf: 8b 42 0c mov 0xc(%edx),%eax 10a1d2: 89 45 d8 mov %eax,-0x28(%ebp) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a1d5: 6a 00 push $0x0 10a1d7: 6a 00 push $0x0 10a1d9: ff 73 14 pushl 0x14(%ebx) 10a1dc: e8 af 14 00 00 call 10b690 10a1e1: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a1e4: 83 c4 10 add $0x10,%esp 10a1e7: 85 c0 test %eax,%eax 10a1e9: 75 35 jne 10a220 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 10a1eb: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a1f1: c1 e0 05 shl $0x5,%eax 10a1f4: 8b 80 a8 4f 12 00 mov 0x124fa8(%eax),%eax 10a1fa: 85 c0 test %eax,%eax 10a1fc: 74 2e je 10a22c sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 10a1fe: 83 ec 08 sub $0x8,%esp 10a201: ff 75 08 pushl 0x8(%ebp) 10a204: 53 push %ebx 10a205: ff d0 call *%eax 10a207: 89 45 e0 mov %eax,-0x20(%ebp) tty->tty_rcvwakeup = 0; 10a20a: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a211: 00 00 00 rtems_semaphore_release (tty->isem); 10a214: 59 pop %ecx 10a215: ff 73 14 pushl 0x14(%ebx) 10a218: e8 6f 15 00 00 call 10b78c return sc; 10a21d: 83 c4 10 add $0x10,%esp } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 10a220: 8b 45 e0 mov -0x20(%ebp),%eax 10a223: 8d 65 f4 lea -0xc(%ebp),%esp 10a226: 5b pop %ebx 10a227: 5e pop %esi 10a228: 5f pop %edi 10a229: c9 leave 10a22a: c3 ret 10a22b: 90 nop <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 10a22c: 8b 53 20 mov 0x20(%ebx),%edx 10a22f: 39 53 24 cmp %edx,0x24(%ebx) 10a232: 74 5f je 10a293 <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a234: 8b 45 dc mov -0x24(%ebp),%eax 10a237: 85 c0 test %eax,%eax 10a239: 74 29 je 10a264 <== NEVER TAKEN 10a23b: 8b 43 24 mov 0x24(%ebx),%eax 10a23e: 3b 43 20 cmp 0x20(%ebx),%eax 10a241: 7d 21 jge 10a264 <== NEVER TAKEN 10a243: 8b 55 d8 mov -0x28(%ebp),%edx 10a246: 8b 7d dc mov -0x24(%ebp),%edi 10a249: eb 06 jmp 10a251 10a24b: 90 nop <== NOT EXECUTED 10a24c: 39 43 20 cmp %eax,0x20(%ebx) 10a24f: 7e 10 jle 10a261 *buffer++ = tty->cbuf[tty->cindex++]; 10a251: 8b 73 1c mov 0x1c(%ebx),%esi 10a254: 8a 0c 06 mov (%esi,%eax,1),%cl 10a257: 88 0a mov %cl,(%edx) 10a259: 42 inc %edx 10a25a: 40 inc %eax 10a25b: 89 43 24 mov %eax,0x24(%ebx) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a25e: 4f dec %edi 10a25f: 75 eb jne 10a24c 10a261: 89 7d dc mov %edi,-0x24(%ebp) *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10a264: 8b 55 08 mov 0x8(%ebp),%edx 10a267: 8b 42 10 mov 0x10(%edx),%eax 10a26a: 2b 45 dc sub -0x24(%ebp),%eax 10a26d: 89 42 18 mov %eax,0x18(%edx) tty->tty_rcvwakeup = 0; 10a270: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a277: 00 00 00 rtems_semaphore_release (tty->isem); 10a27a: 83 ec 0c sub $0xc,%esp 10a27d: ff 73 14 pushl 0x14(%ebx) 10a280: e8 07 15 00 00 call 10b78c return sc; 10a285: 83 c4 10 add $0x10,%esp } 10a288: 8b 45 e0 mov -0x20(%ebp),%eax 10a28b: 8d 65 f4 lea -0xc(%ebp),%esp 10a28e: 5b pop %ebx 10a28f: 5e pop %esi 10a290: 5f pop %edi 10a291: c9 leave 10a292: c3 ret rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10a293: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) 10a29a: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) tty->read_start_column = tty->column; 10a2a1: 8b 43 28 mov 0x28(%ebx),%eax 10a2a4: 89 43 2c mov %eax,0x2c(%ebx) if (tty->device.pollRead != NULL && 10a2a7: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10a2ad: 85 c0 test %eax,%eax 10a2af: 74 0e je 10a2bf 10a2b1: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx 10a2b7: 85 d2 test %edx,%edx 10a2b9: 0f 84 82 01 00 00 je 10a441 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 10a2bf: 8b 73 74 mov 0x74(%ebx),%esi rtems_status_code sc; int wait = (int)1; 10a2c2: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 10a2c9: 8d 4b 49 lea 0x49(%ebx),%ecx 10a2cc: 89 4d d4 mov %ecx,-0x2c(%ebp) 10a2cf: 90 nop while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a2d0: 8b 53 5c mov 0x5c(%ebx),%edx 10a2d3: 8b 43 60 mov 0x60(%ebx),%eax 10a2d6: 39 c2 cmp %eax,%edx 10a2d8: 0f 84 06 01 00 00 je 10a3e4 (tty->ccount < (CBUFSIZE-1))) { 10a2de: a1 20 31 12 00 mov 0x123120,%eax 10a2e3: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a2e4: 3b 43 20 cmp 0x20(%ebx),%eax 10a2e7: 7f 3c jg 10a325 <== ALWAYS TAKEN 10a2e9: e9 f6 00 00 00 jmp 10a3e4 <== NOT EXECUTED 10a2ee: 66 90 xchg %ax,%ax <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 10a2f0: 0f b6 c1 movzbl %cl,%eax 10a2f3: 89 da mov %ebx,%edx 10a2f5: e8 9e fd ff ff call 10a098 10a2fa: 85 c0 test %eax,%eax 10a2fc: 74 07 je 10a305 wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; 10a2fe: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } timeout = tty->rawInBufSemaphoreTimeout; 10a305: 8b 73 70 mov 0x70(%ebx),%esi while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a308: 8b 53 5c mov 0x5c(%ebx),%edx 10a30b: 8b 43 60 mov 0x60(%ebx),%eax 10a30e: 39 c2 cmp %eax,%edx 10a310: 0f 84 ce 00 00 00 je 10a3e4 (tty->ccount < (CBUFSIZE-1))) { 10a316: a1 20 31 12 00 mov 0x123120,%eax 10a31b: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a31c: 39 43 20 cmp %eax,0x20(%ebx) 10a31f: 0f 8d bf 00 00 00 jge 10a3e4 <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 10a325: 8b 43 5c mov 0x5c(%ebx),%eax 10a328: 8b 4b 64 mov 0x64(%ebx),%ecx 10a32b: 40 inc %eax 10a32c: 31 d2 xor %edx,%edx 10a32e: f7 f1 div %ecx c = tty->rawInBuf.theBuf[newHead]; 10a330: 8b 43 58 mov 0x58(%ebx),%eax 10a333: 8a 0c 10 mov (%eax,%edx,1),%cl tty->rawInBuf.Head = newHead; 10a336: 89 53 5c mov %edx,0x5c(%ebx) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a339: 8b 43 60 mov 0x60(%ebx),%eax 10a33c: 8b 7b 64 mov 0x64(%ebx),%edi % tty->rawInBuf.Size) 10a33f: 8b 73 64 mov 0x64(%ebx),%esi unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a342: 8d 04 07 lea (%edi,%eax,1),%eax 10a345: 29 d0 sub %edx,%eax % tty->rawInBuf.Size) 10a347: 31 d2 xor %edx,%edx 10a349: f7 f6 div %esi unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a34b: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx 10a351: 73 5d jae 10a3b0 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10a353: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a359: 83 e0 fe and $0xfffffffe,%eax 10a35c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 10a362: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a368: 25 02 02 00 00 and $0x202,%eax 10a36d: 3d 02 02 00 00 cmp $0x202,%eax 10a372: 0f 84 94 00 00 00 je 10a40c <== NEVER TAKEN && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10a378: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a37e: f6 c4 01 test $0x1,%ah 10a381: 74 2d je 10a3b0 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 10a383: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a389: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a38c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10a392: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10a398: 85 c0 test %eax,%eax <== NOT EXECUTED 10a39a: 74 14 je 10a3b0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10a39c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a39f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a3a2: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a3a5: ff d0 call *%eax <== NOT EXECUTED 10a3a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a3aa: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a3ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 10a3b0: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a3b4: 0f 85 36 ff ff ff jne 10a2f0 <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 10a3ba: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a3bd: 89 da mov %ebx,%edx <== NOT EXECUTED 10a3bf: e8 d4 fc ff ff call 10a098 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a3c4: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 10a3c8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a3cb: 0f 8d 2d ff ff ff jge 10a2fe <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a3d1: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a3d4: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a3d7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a3da: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a3dc: 0f 85 34 ff ff ff jne 10a316 <== NOT EXECUTED 10a3e2: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 10a3e4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a3e7: 85 c9 test %ecx,%ecx 10a3e9: 0f 84 45 fe ff ff je 10a234 sc = rtems_semaphore_obtain( 10a3ef: 52 push %edx 10a3f0: 56 push %esi 10a3f1: ff 73 6c pushl 0x6c(%ebx) 10a3f4: ff 73 68 pushl 0x68(%ebx) 10a3f7: e8 94 12 00 00 call 10b690 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 10a3fc: 83 c4 10 add $0x10,%esp 10a3ff: 85 c0 test %eax,%eax 10a401: 0f 84 c9 fe ff ff je 10a2d0 <== ALWAYS TAKEN 10a407: e9 28 fe ff ff jmp 10a234 <== NOT EXECUTED < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 10a40c: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED 10a412: 85 ff test %edi,%edi <== NOT EXECUTED 10a414: 74 0e je 10a424 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 10a416: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a41c: a8 20 test $0x20,%al <== NOT EXECUTED 10a41e: 0f 84 54 ff ff ff je 10a378 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 10a424: 56 push %esi <== NOT EXECUTED 10a425: 6a 01 push $0x1 <== NOT EXECUTED 10a427: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a42a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a42d: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a430: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a436: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a439: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a43c: e9 6f ff ff ff jmp 10a3b0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a441: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a445: 75 1d jne 10a464 10a447: eb 39 jmp 10a482 10a449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 10a44c: 0f b6 c0 movzbl %al,%eax 10a44f: 89 da mov %ebx,%edx 10a451: e8 42 fc ff ff call 10a098 10a456: 85 c0 test %eax,%eax 10a458: 0f 85 d6 fd ff ff jne 10a234 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a45e: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a464: 83 ec 0c sub $0xc,%esp 10a467: ff 73 10 pushl 0x10(%ebx) 10a46a: ff d0 call *%eax if (n < 0) { 10a46c: 83 c4 10 add $0x10,%esp 10a46f: 85 c0 test %eax,%eax 10a471: 79 d9 jns 10a44c rtems_task_wake_after (1); 10a473: 83 ec 0c sub $0xc,%esp 10a476: 6a 01 push $0x1 10a478: e8 cb 16 00 00 call 10bb48 10a47d: 83 c4 10 add $0x10,%esp 10a480: eb dc jmp 10a45e } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10a482: e8 01 0b 00 00 call 10af88 10a487: 89 c6 mov %eax,%esi 10a489: 8d 76 00 lea 0x0(%esi),%esi for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a48c: 83 ec 0c sub $0xc,%esp 10a48f: ff 73 10 pushl 0x10(%ebx) 10a492: ff 93 a0 00 00 00 call *0xa0(%ebx) if (n < 0) { 10a498: 83 c4 10 add $0x10,%esp 10a49b: 85 c0 test %eax,%eax 10a49d: 78 25 js 10a4c4 break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 10a49f: 0f b6 c0 movzbl %al,%eax 10a4a2: 89 da mov %ebx,%edx 10a4a4: e8 ef fb ff ff call 10a098 if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a4a9: 8a 43 47 mov 0x47(%ebx),%al 10a4ac: 0f b6 d0 movzbl %al,%edx 10a4af: 39 53 20 cmp %edx,0x20(%ebx) 10a4b2: 0f 8d 7c fd ff ff jge 10a234 <== NEVER TAKEN break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 10a4b8: 84 c0 test %al,%al 10a4ba: 74 d0 je 10a48c <== NEVER TAKEN 10a4bc: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 10a4c0: 74 ca je 10a48c <== NEVER TAKEN 10a4c2: eb be jmp 10a482 then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 10a4c4: 80 7b 47 00 cmpb $0x0,0x47(%ebx) 10a4c8: 74 1d je 10a4e7 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { 10a4ca: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 10a4ce: 74 08 je 10a4d8 <== NEVER TAKEN 10a4d0: 8b 43 20 mov 0x20(%ebx),%eax 10a4d3: 85 c0 test %eax,%eax 10a4d5: 75 1a jne 10a4f1 10a4d7: 90 nop now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 10a4d8: 83 ec 0c sub $0xc,%esp 10a4db: 6a 01 push $0x1 10a4dd: e8 66 16 00 00 call 10bb48 10a4e2: 83 c4 10 add $0x10,%esp 10a4e5: eb a5 jmp 10a48c if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 10a4e7: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a4eb: 0f 84 43 fd ff ff je 10a234 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10a4f1: e8 92 0a 00 00 call 10af88 if ((now - then) > tty->vtimeTicks) { 10a4f6: 29 f0 sub %esi,%eax 10a4f8: 3b 43 54 cmp 0x54(%ebx),%eax 10a4fb: 76 db jbe 10a4d8 10a4fd: e9 32 fd ff ff jmp 10a234 =============================================================================== 0010a898 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 10a898: 55 push %ebp 10a899: 89 e5 mov %esp,%ebp 10a89b: 57 push %edi 10a89c: 56 push %esi 10a89d: 53 push %ebx 10a89e: 83 ec 0c sub $0xc,%esp 10a8a1: 8b 5d 08 mov 0x8(%ebp),%ebx int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 10a8a4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a8aa: 25 03 04 00 00 and $0x403,%eax 10a8af: 3d 01 04 00 00 cmp $0x401,%eax 10a8b4: 0f 84 62 01 00 00 je 10aa1c <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 10a8ba: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a8c0: 83 e0 03 and $0x3,%eax 10a8c3: 83 f8 02 cmp $0x2,%eax 10a8c6: 0f 84 8c 01 00 00 je 10aa58 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 10a8cc: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a8d2: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a8d8: 39 c2 cmp %eax,%edx 10a8da: 0f 84 a4 00 00 00 je 10a984 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 10a8e0: 9c pushf 10a8e1: fa cli 10a8e2: 58 pop %eax len = tty->t_dqlen; 10a8e3: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi tty->t_dqlen = 0; 10a8e9: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 10a8f0: 00 00 00 rtems_interrupt_enable(level); 10a8f3: 50 push %eax 10a8f4: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 10a8f5: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a8fb: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 10a901: 8d 04 06 lea (%esi,%eax,1),%eax 10a904: 31 d2 xor %edx,%edx 10a906: f7 f1 div %ecx 10a908: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 10a90a: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 10a910: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10a917: 0f 84 e7 00 00 00 je 10aa04 * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 10a91d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a923: 39 f0 cmp %esi,%eax 10a925: 74 79 je 10a9a0 if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 10a927: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a92d: 25 10 02 00 00 and $0x210,%eax 10a932: 3d 10 02 00 00 cmp $0x210,%eax 10a937: 0f 84 57 01 00 00 je 10aa94 <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 10a93d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a943: 39 c6 cmp %eax,%esi 10a945: 0f 87 91 00 00 00 ja 10a9dc nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 10a94b: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 10a951: 29 f7 sub %esi,%edi /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 10a953: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a959: f6 c4 06 test $0x6,%ah 10a95c: 0f 85 91 00 00 00 jne 10a9f3 10a962: 89 f8 mov %edi,%eax nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 10a964: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10a96b: 00 00 00 (*tty->device.write)( 10a96e: 52 push %edx 10a96f: 50 push %eax 10a970: 8b 43 7c mov 0x7c(%ebx),%eax 10a973: 01 f0 add %esi,%eax 10a975: 50 push %eax 10a976: ff 73 10 pushl 0x10(%ebx) 10a979: ff 93 a4 00 00 00 call *0xa4(%ebx) 10a97f: 83 c4 10 add $0x10,%esp 10a982: eb 48 jmp 10a9cc } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 10a984: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10a98b: 0f 84 2b 01 00 00 je 10aabc <== NEVER TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 10a991: 31 ff xor %edi,%edi tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10a993: 89 f8 mov %edi,%eax 10a995: 8d 65 f4 lea -0xc(%ebp),%esp 10a998: 5b pop %ebx 10a999: 5e pop %esi 10a99a: 5f pop %edi 10a99b: c9 leave 10a99c: c3 ret 10a99d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10a9a0: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10a9a7: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10a9aa: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 10a9b0: 85 c0 test %eax,%eax 10a9b2: 0f 84 1c 01 00 00 je 10aad4 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 10a9b8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a9bb: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 10a9c1: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10a9c4: 52 push %edx <== NOT EXECUTED 10a9c5: ff d0 call *%eax <== NOT EXECUTED 10a9c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10a9ca: 31 ff xor %edi,%edi <== NOT EXECUTED } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 10a9cc: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 10a9d2: 89 f8 mov %edi,%eax 10a9d4: 8d 65 f4 lea -0xc(%ebp),%esp 10a9d7: 5b pop %ebx 10a9d8: 5e pop %esi 10a9d9: 5f pop %edi 10a9da: c9 leave 10a9db: c3 ret } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 10a9dc: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 10a9e2: 29 f7 sub %esi,%edi else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 10a9e4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a9ea: f6 c4 06 test $0x6,%ah 10a9ed: 0f 84 6f ff ff ff je 10a962 <== ALWAYS TAKEN 10a9f3: b8 01 00 00 00 mov $0x1,%eax nToSend = 1; 10a9f8: bf 01 00 00 00 mov $0x1,%edi 10a9fd: e9 62 ff ff ff jmp 10a964 10aa02: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10aa04: 83 ec 0c sub $0xc,%esp 10aa07: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10aa0d: e8 7a 0d 00 00 call 10b78c 10aa12: 83 c4 10 add $0x10,%esp 10aa15: e9 03 ff ff ff jmp 10a91d 10aa1a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 10aa1c: 56 push %esi <== NOT EXECUTED 10aa1d: 6a 01 push $0x1 <== NOT EXECUTED 10aa1f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10aa22: 50 push %eax <== NOT EXECUTED 10aa23: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aa26: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10aa2c: 9c pushf <== NOT EXECUTED 10aa2d: fa cli <== NOT EXECUTED 10aa2e: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10aa2f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 10aa35: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa3b: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10aa3e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10aa44: 52 push %edx <== NOT EXECUTED 10aa45: 9d popf <== NOT EXECUTED 10aa46: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10aa49: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aa4e: 89 f8 mov %edi,%eax <== NOT EXECUTED 10aa50: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10aa53: 5b pop %ebx <== NOT EXECUTED 10aa54: 5e pop %esi <== NOT EXECUTED 10aa55: 5f pop %edi <== NOT EXECUTED 10aa56: c9 leave <== NOT EXECUTED 10aa57: c3 ret <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); 10aa58: 51 push %ecx <== NOT EXECUTED 10aa59: 6a 01 push $0x1 <== NOT EXECUTED 10aa5b: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 10aa5e: 50 push %eax <== NOT EXECUTED 10aa5f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aa62: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10aa68: 9c pushf <== NOT EXECUTED 10aa69: fa cli <== NOT EXECUTED 10aa6a: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10aa6b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 10aa71: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa77: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10aa7a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10aa80: 52 push %edx <== NOT EXECUTED 10aa81: 9d popf <== NOT EXECUTED 10aa82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10aa85: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aa8a: 89 f8 mov %edi,%eax <== NOT EXECUTED 10aa8c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10aa8f: 5b pop %ebx <== NOT EXECUTED 10aa90: 5e pop %esi <== NOT EXECUTED 10aa91: 5f pop %edi <== NOT EXECUTED 10aa92: c9 leave <== NOT EXECUTED 10aa93: c3 ret <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 10aa94: 9c pushf <== NOT EXECUTED 10aa95: fa cli <== NOT EXECUTED 10aa96: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10aa97: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aa9d: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10aaa0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 10aaa6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10aaad: 00 00 00 rtems_interrupt_enable(level); 10aab0: 52 push %edx <== NOT EXECUTED 10aab1: 9d popf <== NOT EXECUTED nToSend = 0; 10aab2: 31 ff xor %edi,%edi <== NOT EXECUTED 10aab4: e9 13 ff ff ff jmp 10a9cc <== NOT EXECUTED 10aab9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10aabc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aabf: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10aac5: e8 c2 0c 00 00 call 10b78c <== NOT EXECUTED 10aaca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; 10aacd: 31 ff xor %edi,%edi <== NOT EXECUTED 10aacf: e9 bf fe ff ff jmp 10a993 <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10aad4: 31 ff xor %edi,%edi 10aad6: e9 f1 fe ff ff jmp 10a9cc =============================================================================== 0010a82c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10a82c: 55 push %ebp 10a82d: 89 e5 mov %esp,%ebp 10a82f: 57 push %edi 10a830: 56 push %esi 10a831: 53 push %ebx 10a832: 83 ec 1c sub $0x1c,%esp 10a835: 8b 5d 08 mov 0x8(%ebp),%ebx 10a838: 8d 75 e0 lea -0x20(%ebp),%esi 10a83b: 8d 7d e7 lea -0x19(%ebp),%edi 10a83e: eb 14 jmp 10a854 } /* * do something */ c = tty->device.pollRead(tty->minor); 10a840: 83 ec 0c sub $0xc,%esp 10a843: ff 73 10 pushl 0x10(%ebx) 10a846: ff 93 a0 00 00 00 call *0xa0(%ebx) if (c != EOF) { 10a84c: 83 c4 10 add $0x10,%esp 10a84f: 83 f8 ff cmp $0xffffffff,%eax 10a852: 75 30 jne 10a884 while (1) { /* * wait for rtems event */ rtems_event_receive( 10a854: 56 push %esi 10a855: 6a 00 push $0x0 10a857: 6a 02 push $0x2 10a859: 6a 03 push $0x3 10a85b: e8 94 07 00 00 call 10aff4 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10a860: 83 c4 10 add $0x10,%esp 10a863: f6 45 e0 01 testb $0x1,-0x20(%ebp) 10a867: 74 d7 je 10a840 <== ALWAYS TAKEN tty->rxTaskId = 0; 10a869: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10a870: 00 00 00 rtems_task_delete(RTEMS_SELF); 10a873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a876: 6a 00 push $0x0 <== NOT EXECUTED 10a878: e8 0f 11 00 00 call 10b98c <== NOT EXECUTED 10a87d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a880: eb be jmp 10a840 <== NOT EXECUTED 10a882: 66 90 xchg %ax,%ax <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 10a884: 88 45 e7 mov %al,-0x19(%ebp) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 10a887: 50 push %eax 10a888: 6a 01 push $0x1 10a88a: 57 push %edi 10a88b: 53 push %ebx 10a88c: e8 8f fc ff ff call 10a520 10a891: 83 c4 10 add $0x10,%esp 10a894: eb be jmp 10a854 =============================================================================== 0010c6b8 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 10c6b8: 55 push %ebp 10c6b9: 89 e5 mov %esp,%ebp 10c6bb: 53 push %ebx 10c6bc: 83 ec 10 sub $0x10,%esp 10c6bf: 8b 5d 08 mov 0x8(%ebp),%ebx int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 10c6c2: ff 75 0c pushl 0xc(%ebp) 10c6c5: e8 96 e3 ff ff call 10aa60 if ( cflags_baud == -1 ) 10c6ca: 83 c4 10 add $0x10,%esp 10c6cd: 83 f8 ff cmp $0xffffffff,%eax 10c6d0: 74 16 je 10c6e8 return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 10c6d2: 8b 53 38 mov 0x38(%ebx),%edx 10c6d5: 81 e2 f0 ef ff ff and $0xffffeff0,%edx 10c6db: 09 c2 or %eax,%edx 10c6dd: 89 53 38 mov %edx,0x38(%ebx) return 0; 10c6e0: 31 c0 xor %eax,%eax } 10c6e2: 8b 5d fc mov -0x4(%ebp),%ebx 10c6e5: c9 leave 10c6e6: c3 ret 10c6e7: 90 nop <== NOT EXECUTED { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) return -1; 10c6e8: b8 ff ff ff ff mov $0xffffffff,%eax ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; return 0; } 10c6ed: 8b 5d fc mov -0x4(%ebp),%ebx 10c6f0: c9 leave 10c6f1: c3 ret =============================================================================== 0010aadc : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10aadc: 55 push %ebp 10aadd: 89 e5 mov %esp,%ebp 10aadf: 56 push %esi 10aae0: 53 push %ebx 10aae1: 83 ec 10 sub $0x10,%esp 10aae4: 8b 5d 08 mov 0x8(%ebp),%ebx 10aae7: 8d 75 f4 lea -0xc(%ebp),%esi 10aaea: eb 28 jmp 10ab14 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10aaec: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10aaf2: c1 e0 05 shl $0x5,%eax 10aaf5: 8b 80 b4 4f 12 00 mov 0x124fb4(%eax),%eax 10aafb: 85 c0 test %eax,%eax 10aafd: 74 09 je 10ab08 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10aaff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab02: 53 push %ebx <== NOT EXECUTED 10ab03: ff d0 call *%eax <== NOT EXECUTED 10ab05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10ab08: 83 ec 0c sub $0xc,%esp 10ab0b: 53 push %ebx 10ab0c: e8 87 fd ff ff call 10a898 } 10ab11: 83 c4 10 add $0x10,%esp while (1) { /* * wait for rtems event */ rtems_event_receive( 10ab14: 56 push %esi 10ab15: 6a 00 push $0x0 10ab17: 6a 02 push $0x2 10ab19: 6a 03 push $0x3 10ab1b: e8 d4 04 00 00 call 10aff4 (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10ab20: 83 c4 10 add $0x10,%esp 10ab23: f6 45 f4 01 testb $0x1,-0xc(%ebp) 10ab27: 74 c3 je 10aaec <== ALWAYS TAKEN tty->txTaskId = 0; 10ab29: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10ab30: 00 00 00 rtems_task_delete(RTEMS_SELF); 10ab33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab36: 6a 00 push $0x0 <== NOT EXECUTED 10ab38: e8 4f 0e 00 00 call 10b98c <== NOT EXECUTED 10ab3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ab40: eb aa jmp 10aaec <== NOT EXECUTED =============================================================================== 0010a0ec : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10a0ec: 55 push %ebp 10a0ed: 89 e5 mov %esp,%ebp 10a0ef: 57 push %edi 10a0f0: 56 push %esi 10a0f1: 53 push %ebx 10a0f2: 83 ec 20 sub $0x20,%esp 10a0f5: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a0f8: 8b 07 mov (%edi),%eax 10a0fa: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a0fd: 6a 00 push $0x0 10a0ff: 6a 00 push $0x0 10a101: ff 76 18 pushl 0x18(%esi) 10a104: e8 87 15 00 00 call 10b690 10a109: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a10c: 83 c4 10 add $0x10,%esp 10a10f: 85 c0 test %eax,%eax 10a111: 75 29 jne 10a13c <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 10a113: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10a119: c1 e0 05 shl $0x5,%eax 10a11c: 8b 80 ac 4f 12 00 mov 0x124fac(%eax),%eax 10a122: 85 c0 test %eax,%eax 10a124: 74 22 je 10a148 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10a126: 83 ec 08 sub $0x8,%esp 10a129: 57 push %edi 10a12a: 56 push %esi 10a12b: ff d0 call *%eax 10a12d: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_semaphore_release (tty->osem); 10a130: 5f pop %edi 10a131: ff 76 18 pushl 0x18(%esi) 10a134: e8 53 16 00 00 call 10b78c return sc; 10a139: 83 c4 10 add $0x10,%esp rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 10a13c: 8b 45 e4 mov -0x1c(%ebp),%eax 10a13f: 8d 65 f4 lea -0xc(%ebp),%esp 10a142: 5b pop %ebx 10a143: 5e pop %esi 10a144: 5f pop %edi 10a145: c9 leave 10a146: c3 ret 10a147: 90 nop <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 10a148: f6 46 34 01 testb $0x1,0x34(%esi) 10a14c: 74 4e je 10a19c <== NEVER TAKEN uint32_t count = args->count; 10a14e: 8b 47 10 mov 0x10(%edi),%eax 10a151: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10a154: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10a157: 8b 5d e0 mov -0x20(%ebp),%ebx 10a15a: 85 db test %ebx,%ebx 10a15c: 74 56 je 10a1b4 <== NEVER TAKEN 10a15e: 31 db xor %ebx,%ebx 10a160: 89 7d dc mov %edi,-0x24(%ebp) 10a163: 89 c7 mov %eax,%edi 10a165: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 10a168: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 10a16c: 89 f2 mov %esi,%edx 10a16e: e8 6d fa ff ff call 109be0 10a173: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a174: 39 5d e0 cmp %ebx,-0x20(%ebp) 10a177: 75 ef jne 10a168 10a179: 8b 7d dc mov -0x24(%ebp),%edi 10a17c: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 10a17f: 89 47 18 mov %eax,0x18(%edi) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 10a182: 83 ec 0c sub $0xc,%esp 10a185: ff 76 18 pushl 0x18(%esi) 10a188: e8 ff 15 00 00 call 10b78c return sc; 10a18d: 83 c4 10 add $0x10,%esp } 10a190: 8b 45 e4 mov -0x1c(%ebp),%eax 10a193: 8d 65 f4 lea -0xc(%ebp),%esp 10a196: 5b pop %ebx 10a197: 5e pop %esi 10a198: 5f pop %edi 10a199: c9 leave 10a19a: c3 ret 10a19b: 90 nop <== NOT EXECUTED char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 10a19c: 51 push %ecx <== NOT EXECUTED 10a19d: 56 push %esi <== NOT EXECUTED 10a19e: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 10a1a1: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10a1a4: e8 03 f9 ff ff call 109aac <== NOT EXECUTED args->bytes_moved = args->count; 10a1a9: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 10a1ac: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 10a1af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a1b2: eb ce jmp 10a182 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a1b4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a1b6: eb c7 jmp 10a17f <== NOT EXECUTED =============================================================================== 001186b0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1186b0: 55 push %ebp 1186b1: 89 e5 mov %esp,%ebp 1186b3: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1186b6: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1186b9: 50 push %eax 1186ba: ff 75 08 pushl 0x8(%ebp) 1186bd: 68 a0 0c 14 00 push $0x140ca0 1186c2: e8 81 2a 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1186c7: 83 c4 10 add $0x10,%esp 1186ca: 8b 55 f4 mov -0xc(%ebp),%edx 1186cd: 85 d2 test %edx,%edx 1186cf: 74 07 je 1186d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1186d1: b8 04 00 00 00 mov $0x4,%eax } 1186d6: c9 leave 1186d7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1186d8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1186dc: 74 0f je 1186ed <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1186de: 83 ec 0c sub $0xc,%esp 1186e1: 83 c0 10 add $0x10,%eax 1186e4: 50 push %eax 1186e5: e8 9e 46 00 00 call 11cd88 <_Watchdog_Remove> 1186ea: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1186ed: e8 ba 32 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1186f2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f4: c9 leave 1186f5: c3 ret =============================================================================== 0010bfbc : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bfbc: 55 push %ebp 10bfbd: 89 e5 mov %esp,%ebp 10bfbf: 57 push %edi 10bfc0: 56 push %esi 10bfc1: 53 push %ebx 10bfc2: 83 ec 0c sub $0xc,%esp 10bfc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc8: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bfcb: 85 db test %ebx,%ebx 10bfcd: 74 6d je 10c03c return RTEMS_INVALID_NAME; if ( !id ) 10bfcf: 85 f6 test %esi,%esi 10bfd1: 0f 84 89 00 00 00 je 10c060 10bfd7: a1 94 77 12 00 mov 0x127794,%eax 10bfdc: 40 inc %eax 10bfdd: a3 94 77 12 00 mov %eax,0x127794 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 10bfe2: 83 ec 0c sub $0xc,%esp 10bfe5: 68 a0 7a 12 00 push $0x127aa0 10bfea: e8 59 0e 00 00 call 10ce48 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bfef: 83 c4 10 add $0x10,%esp 10bff2: 85 c0 test %eax,%eax 10bff4: 74 56 je 10c04c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bff6: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bffd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c004: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c00b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c012: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c019: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c01c: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c01f: 8b 0d bc 7a 12 00 mov 0x127abc,%ecx 10c025: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c028: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c02b: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c02d: e8 32 1b 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c032: 31 c0 xor %eax,%eax } 10c034: 8d 65 f4 lea -0xc(%ebp),%esp 10c037: 5b pop %ebx 10c038: 5e pop %esi 10c039: 5f pop %edi 10c03a: c9 leave 10c03b: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c03c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c041: 8d 65 f4 lea -0xc(%ebp),%esp 10c044: 5b pop %ebx 10c045: 5e pop %esi 10c046: 5f pop %edi 10c047: c9 leave 10c048: c3 ret 10c049: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c04c: e8 13 1b 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c051: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c056: 8d 65 f4 lea -0xc(%ebp),%esp 10c059: 5b pop %ebx 10c05a: 5e pop %esi 10c05b: 5f pop %edi 10c05c: c9 leave 10c05d: c3 ret 10c05e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c060: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c065: 8d 65 f4 lea -0xc(%ebp),%esp 10c068: 5b pop %ebx 10c069: 5e pop %esi 10c06a: 5f pop %edi 10c06b: c9 leave 10c06c: c3 ret =============================================================================== 001187ac : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1187ac: 55 push %ebp 1187ad: 89 e5 mov %esp,%ebp 1187af: 53 push %ebx 1187b0: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187b3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187b6: 50 push %eax 1187b7: ff 75 08 pushl 0x8(%ebp) 1187ba: 68 a0 0c 14 00 push $0x140ca0 1187bf: e8 84 29 00 00 call 11b148 <_Objects_Get> 1187c4: 89 c3 mov %eax,%ebx switch ( location ) { 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 8b 4d f4 mov -0xc(%ebp),%ecx 1187cc: 85 c9 test %ecx,%ecx 1187ce: 75 38 jne 118808 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1187d0: 83 ec 08 sub $0x8,%esp 1187d3: 50 push %eax 1187d4: 68 a0 0c 14 00 push $0x140ca0 1187d9: e8 f2 24 00 00 call 11acd0 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1187de: 8d 43 10 lea 0x10(%ebx),%eax 1187e1: 89 04 24 mov %eax,(%esp) 1187e4: e8 9f 45 00 00 call 11cd88 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1187e9: 58 pop %eax 1187ea: 5a pop %edx 1187eb: 53 push %ebx 1187ec: 68 a0 0c 14 00 push $0x140ca0 1187f1: e8 d6 27 00 00 call 11afcc <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1187f6: e8 b1 31 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1187fb: 83 c4 10 add $0x10,%esp 1187fe: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118800: 8b 5d fc mov -0x4(%ebp),%ebx 118803: c9 leave 118804: c3 ret 118805: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118808: b8 04 00 00 00 mov $0x4,%eax } 11880d: 8b 5d fc mov -0x4(%ebp),%ebx 118810: c9 leave 118811: c3 ret =============================================================================== 0010c070 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 2c sub $0x2c,%esp 10c079: 8b 5d 0c mov 0xc(%ebp),%ebx 10c07c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c07f: 85 db test %ebx,%ebx 10c081: 0f 84 99 00 00 00 je 10c120 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c087: 85 f6 test %esi,%esi 10c089: 0f 84 b1 00 00 00 je 10c140 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c08f: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c090: 8d 45 e4 lea -0x1c(%ebp),%eax 10c093: 50 push %eax 10c094: ff 75 08 pushl 0x8(%ebp) 10c097: 68 a0 7a 12 00 push $0x127aa0 10c09c: e8 5f 12 00 00 call 10d300 <_Objects_Get> 10c0a1: 89 c7 mov %eax,%edi switch ( location ) { 10c0a3: 83 c4 10 add $0x10,%esp 10c0a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0a9: 85 c9 test %ecx,%ecx 10c0ab: 74 0f je 10c0bc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c0ad: b8 04 00 00 00 mov $0x4,%eax } 10c0b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c0b5: 5b pop %ebx 10c0b6: 5e pop %esi 10c0b7: 5f pop %edi 10c0b8: c9 leave 10c0b9: c3 ret 10c0ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c0bc: 8d 50 10 lea 0x10(%eax),%edx 10c0bf: 83 ec 0c sub $0xc,%esp 10c0c2: 52 push %edx 10c0c3: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0c6: e8 ed 2a 00 00 call 10ebb8 <_Watchdog_Remove> _ISR_Disable( level ); 10c0cb: 9c pushf 10c0cc: fa cli 10c0cd: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 10c0ce: 83 c4 10 add $0x10,%esp 10c0d1: 8b 57 18 mov 0x18(%edi),%edx 10c0d4: 85 d2 test %edx,%edx 10c0d6: 8b 55 d4 mov -0x2c(%ebp),%edx 10c0d9: 75 55 jne 10c130 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 10c0db: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c0e2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c0e9: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c0ec: 8b 4d 08 mov 0x8(%ebp),%ecx 10c0ef: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c0f2: 8b 4d 14 mov 0x14(%ebp),%ecx 10c0f5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c0f8: 50 push %eax 10c0f9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0fa: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0fd: 83 ec 08 sub $0x8,%esp 10c100: 52 push %edx 10c101: 68 64 78 12 00 push $0x127864 10c106: e8 75 29 00 00 call 10ea80 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c10b: e8 54 1a 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c110: 83 c4 10 add $0x10,%esp 10c113: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c115: 8d 65 f4 lea -0xc(%ebp),%esp 10c118: 5b pop %ebx 10c119: 5e pop %esi 10c11a: 5f pop %edi 10c11b: c9 leave 10c11c: c3 ret 10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c120: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c125: 8d 65 f4 lea -0xc(%ebp),%esp 10c128: 5b pop %ebx 10c129: 5e pop %esi 10c12a: 5f pop %edi 10c12b: c9 leave 10c12c: c3 ret 10c12d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10c130: 50 push %eax 10c131: 9d popf _Thread_Enable_dispatch(); 10c132: e8 2d 1a 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c137: 31 c0 xor %eax,%eax 10c139: e9 74 ff ff ff jmp 10c0b2 10c13e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c140: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c145: 8d 65 f4 lea -0xc(%ebp),%esp 10c148: 5b pop %ebx 10c149: 5e pop %esi 10c14a: 5f pop %edi 10c14b: c9 leave 10c14c: c3 ret =============================================================================== 001188f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1188f4: 55 push %ebp 1188f5: 89 e5 mov %esp,%ebp 1188f7: 57 push %edi 1188f8: 56 push %esi 1188f9: 53 push %ebx 1188fa: 83 ec 2c sub $0x2c,%esp 1188fd: 8b 75 08 mov 0x8(%ebp),%esi 118900: 8b 7d 0c mov 0xc(%ebp),%edi 118903: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118906: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 11890d: 75 0d jne 11891c return RTEMS_NOT_DEFINED; 11890f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118914: 8d 65 f4 lea -0xc(%ebp),%esp 118917: 5b pop %ebx 118918: 5e pop %esi 118919: 5f pop %edi 11891a: c9 leave 11891b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11891c: 83 ec 0c sub $0xc,%esp 11891f: 57 push %edi 118920: e8 93 d4 ff ff call 115db8 <_TOD_Validate> 118925: 83 c4 10 add $0x10,%esp 118928: 84 c0 test %al,%al 11892a: 74 1e je 11894a return RTEMS_INVALID_CLOCK; if ( !routine ) 11892c: 85 db test %ebx,%ebx 11892e: 0f 84 a4 00 00 00 je 1189d8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118934: 83 ec 0c sub $0xc,%esp 118937: 57 push %edi 118938: e8 ef d3 ff ff call 115d2c <_TOD_To_seconds> 11893d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11893f: 83 c4 10 add $0x10,%esp 118942: 3b 05 28 0a 14 00 cmp 0x140a28,%eax 118948: 77 0e ja 118958 return RTEMS_INVALID_CLOCK; 11894a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11894f: 8d 65 f4 lea -0xc(%ebp),%esp 118952: 5b pop %ebx 118953: 5e pop %esi 118954: 5f pop %edi 118955: c9 leave 118956: c3 ret 118957: 90 nop <== NOT EXECUTED 118958: 50 push %eax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118959: 8d 45 e4 lea -0x1c(%ebp),%eax 11895c: 50 push %eax 11895d: 56 push %esi 11895e: 68 a0 0c 14 00 push $0x140ca0 118963: e8 e0 27 00 00 call 11b148 <_Objects_Get> switch ( location ) { 118968: 83 c4 10 add $0x10,%esp 11896b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11896e: 85 c9 test %ecx,%ecx 118970: 75 5a jne 1189cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118972: 8d 48 10 lea 0x10(%eax),%ecx 118975: 83 ec 0c sub $0xc,%esp 118978: 51 push %ecx 118979: 89 45 d0 mov %eax,-0x30(%ebp) 11897c: 89 4d d4 mov %ecx,-0x2c(%ebp) 11897f: e8 04 44 00 00 call 11cd88 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118984: 8b 55 d0 mov -0x30(%ebp),%edx 118987: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11898e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118995: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118998: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 11899b: 8b 45 14 mov 0x14(%ebp),%eax 11899e: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 1189a1: 2b 3d 28 0a 14 00 sub 0x140a28,%edi 1189a7: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1189aa: 58 pop %eax 1189ab: 5a pop %edx 1189ac: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189af: 51 push %ecx 1189b0: 68 58 0a 14 00 push $0x140a58 1189b5: e8 96 42 00 00 call 11cc50 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1189ba: e8 ed 2f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1189bf: 83 c4 10 add $0x10,%esp 1189c2: 31 c0 xor %eax,%eax 1189c4: e9 4b ff ff ff jmp 118914 1189c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1189cc: b8 04 00 00 00 mov $0x4,%eax 1189d1: e9 3e ff ff ff jmp 118914 1189d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1189d8: b8 09 00 00 00 mov $0x9,%eax 1189dd: e9 32 ff ff ff jmp 118914 =============================================================================== 001189e4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1189e4: 55 push %ebp 1189e5: 89 e5 mov %esp,%ebp 1189e7: 53 push %ebx 1189e8: 83 ec 14 sub $0x14,%esp 1189eb: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1189ee: 85 db test %ebx,%ebx 1189f0: 74 4a je 118a3c 1189f2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 1189f3: 8d 45 f4 lea -0xc(%ebp),%eax 1189f6: 50 push %eax 1189f7: ff 75 08 pushl 0x8(%ebp) 1189fa: 68 a0 0c 14 00 push $0x140ca0 1189ff: e8 44 27 00 00 call 11b148 <_Objects_Get> switch ( location ) { 118a04: 83 c4 10 add $0x10,%esp 118a07: 8b 55 f4 mov -0xc(%ebp),%edx 118a0a: 85 d2 test %edx,%edx 118a0c: 74 0a je 118a18 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a0e: b8 04 00 00 00 mov $0x4,%eax } 118a13: 8b 5d fc mov -0x4(%ebp),%ebx 118a16: c9 leave 118a17: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118a18: 8b 50 38 mov 0x38(%eax),%edx 118a1b: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118a1d: 8b 50 1c mov 0x1c(%eax),%edx 118a20: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118a23: 8b 50 24 mov 0x24(%eax),%edx 118a26: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118a29: 8b 40 28 mov 0x28(%eax),%eax 118a2c: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118a2f: e8 78 2f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118a34: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a36: 8b 5d fc mov -0x4(%ebp),%ebx 118a39: c9 leave 118a3a: c3 ret 118a3b: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118a3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a41: 8b 5d fc mov -0x4(%ebp),%ebx 118a44: c9 leave 118a45: c3 ret =============================================================================== 00119070 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119070: 55 push %ebp 119071: 89 e5 mov %esp,%ebp 119073: 56 push %esi 119074: 53 push %ebx 119075: 83 ec 10 sub $0x10,%esp 119078: 8b 45 08 mov 0x8(%ebp),%eax 11907b: 85 c0 test %eax,%eax 11907d: 74 41 je 1190c0 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 11907f: 0f b6 15 34 83 13 00 movzbl 0x138334,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 119086: 39 d0 cmp %edx,%eax 119088: 76 42 jbe 1190cc * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 11908a: 40 inc %eax 11908b: 75 33 jne 1190c0 return RTEMS_INVALID_PRIORITY; _priority = 0; 11908d: 31 f6 xor %esi,%esi 11908f: 8b 15 94 09 14 00 mov 0x140994,%edx 119095: 42 inc %edx 119096: 89 15 94 09 14 00 mov %edx,0x140994 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11909c: 8a 1d c0 c2 13 00 mov 0x13c2c0,%bl initialized = true; 1190a2: c6 05 c0 c2 13 00 01 movb $0x1,0x13c2c0 _Thread_Enable_dispatch(); 1190a9: e8 fe 28 00 00 call 11b9ac <_Thread_Enable_dispatch> if ( tmpInitialized ) 1190ae: 84 db test %bl,%bl 1190b0: 74 1e je 1190d0 return RTEMS_INCORRECT_STATE; 1190b2: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1190b7: 8d 65 f8 lea -0x8(%ebp),%esp 1190ba: 5b pop %ebx 1190bb: 5e pop %esi 1190bc: c9 leave 1190bd: c3 ret 1190be: 66 90 xchg %ax,%ax <== NOT EXECUTED * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 1190c0: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 1190c5: 8d 65 f8 lea -0x8(%ebp),%esp 1190c8: 5b pop %ebx 1190c9: 5e pop %esi 1190ca: c9 leave 1190cb: c3 ret 1190cc: 89 c6 mov %eax,%esi 1190ce: eb bf jmp 11908f * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 1190d0: 83 ec 08 sub $0x8,%esp 1190d3: 8d 45 f4 lea -0xc(%ebp),%eax 1190d6: 50 push %eax 1190d7: 8b 45 10 mov 0x10(%ebp),%eax 1190da: 80 cc 80 or $0x80,%ah 1190dd: 50 push %eax 1190de: 68 00 01 00 00 push $0x100 1190e3: ff 75 0c pushl 0xc(%ebp) 1190e6: 56 push %esi 1190e7: 68 45 4d 49 54 push $0x54494d45 1190ec: e8 e3 ec ff ff call 117dd4 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 1190f1: 83 c4 20 add $0x20,%esp 1190f4: 85 c0 test %eax,%eax 1190f6: 74 10 je 119108 initialized = false; 1190f8: c6 05 c0 c2 13 00 00 movb $0x0,0x13c2c0 initialized = false; } #endif return status; } 1190ff: 8d 65 f8 lea -0x8(%ebp),%esp 119102: 5b pop %ebx 119103: 5e pop %esi 119104: c9 leave 119105: c3 ret 119106: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 119108: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11910b: 0f b7 c8 movzwl %ax,%ecx 11910e: 8b 15 3c 09 14 00 mov 0x14093c,%edx /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 119114: 8b 14 8a mov (%edx,%ecx,4),%edx 119117: 89 15 40 c2 13 00 mov %edx,0x13c240 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11911d: c7 05 70 c2 13 00 74 movl $0x13c274,0x13c270 119124: c2 13 00 the_chain->permanent_null = NULL; 119127: c7 05 74 c2 13 00 00 movl $0x0,0x13c274 11912e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119131: c7 05 78 c2 13 00 70 movl $0x13c270,0x13c278 119138: c2 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11913b: c7 05 a8 c2 13 00 ac movl $0x13c2ac,0x13c2a8 119142: c2 13 00 the_chain->permanent_null = NULL; 119145: c7 05 ac c2 13 00 00 movl $0x0,0x13c2ac 11914c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11914f: c7 05 b0 c2 13 00 a8 movl $0x13c2a8,0x13c2b0 119156: c2 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119159: c7 05 50 c2 13 00 00 movl $0x0,0x13c250 119160: 00 00 00 the_watchdog->routine = routine; 119163: c7 05 64 c2 13 00 f8 movl $0x11b7f8,0x13c264 11916a: b7 11 00 the_watchdog->id = id; 11916d: a3 68 c2 13 00 mov %eax,0x13c268 the_watchdog->user_data = user_data; 119172: c7 05 6c c2 13 00 00 movl $0x0,0x13c26c 119179: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11917c: c7 05 88 c2 13 00 00 movl $0x0,0x13c288 119183: 00 00 00 the_watchdog->routine = routine; 119186: c7 05 9c c2 13 00 f8 movl $0x11b7f8,0x13c29c 11918d: b7 11 00 the_watchdog->id = id; 119190: a3 a0 c2 13 00 mov %eax,0x13c2a0 the_watchdog->user_data = user_data; 119195: c7 05 a4 c2 13 00 00 movl $0x0,0x13c2a4 11919c: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 11919f: c7 05 44 c2 13 00 40 movl $0x118f40,0x13c244 1191a6: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1191a9: 8b 15 e4 0a 14 00 mov 0x140ae4,%edx 1191af: 89 15 7c c2 13 00 mov %edx,0x13c27c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1191b5: 8b 15 28 0a 14 00 mov 0x140a28,%edx 1191bb: 89 15 b4 c2 13 00 mov %edx,0x13c2b4 ts->insert_chain = NULL; 1191c1: c7 05 b8 c2 13 00 00 movl $0x0,0x13c2b8 1191c8: 00 00 00 ts->active = false; 1191cb: c6 05 bc c2 13 00 00 movb $0x0,0x13c2bc /* * The default timer server is now available. */ _Timer_server = ts; 1191d2: c7 05 e0 0c 14 00 40 movl $0x13c240,0x140ce0 1191d9: c2 13 00 /* * Start the timer server */ status = rtems_task_start( 1191dc: 53 push %ebx 1191dd: 68 40 c2 13 00 push $0x13c240 1191e2: 68 94 8d 11 00 push $0x118d94 1191e7: 50 push %eax 1191e8: e8 a7 f2 ff ff call 118494 if (status) { initialized = false; } #endif return status; 1191ed: 83 c4 10 add $0x10,%esp 1191f0: e9 d0 fe ff ff jmp 1190c5 =============================================================================== 00118a6c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118a6c: 55 push %ebp 118a6d: 89 e5 mov %esp,%ebp 118a6f: 56 push %esi 118a70: 53 push %ebx 118a71: 83 ec 24 sub $0x24,%esp Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); 118a74: 8d 45 f4 lea -0xc(%ebp),%eax 118a77: 50 push %eax 118a78: ff 75 08 pushl 0x8(%ebp) 118a7b: 68 a0 0c 14 00 push $0x140ca0 118a80: e8 c3 26 00 00 call 11b148 <_Objects_Get> 118a85: 89 c3 mov %eax,%ebx switch ( location ) { 118a87: 83 c4 10 add $0x10,%esp 118a8a: 8b 45 f4 mov -0xc(%ebp),%eax 118a8d: 85 c0 test %eax,%eax 118a8f: 74 0f je 118aa0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a91: b8 04 00 00 00 mov $0x4,%eax } 118a96: 8d 65 f8 lea -0x8(%ebp),%esp 118a99: 5b pop %ebx 118a9a: 5e pop %esi 118a9b: c9 leave 118a9c: c3 ret 118a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118aa0: 8b 43 38 mov 0x38(%ebx),%eax 118aa3: 85 c0 test %eax,%eax 118aa5: 74 1d je 118ac4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118aa7: 48 dec %eax 118aa8: 74 3a je 118ae4 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 118aaa: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118aaf: 89 45 e4 mov %eax,-0x1c(%ebp) 118ab2: e8 f5 2e 00 00 call 11b9ac <_Thread_Enable_dispatch> return status; 118ab7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 118ac1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118ac4: 83 c3 10 add $0x10,%ebx 118ac7: 83 ec 0c sub $0xc,%esp 118aca: 53 push %ebx 118acb: e8 b8 42 00 00 call 11cd88 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118ad0: 59 pop %ecx 118ad1: 5e pop %esi 118ad2: 53 push %ebx 118ad3: 68 64 0a 14 00 push $0x140a64 118ad8: e8 73 41 00 00 call 11cc50 <_Watchdog_Insert> 118add: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118ae0: 31 c0 xor %eax,%eax 118ae2: eb cb jmp 118aaf case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118ae4: 8b 35 e0 0c 14 00 mov 0x140ce0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118aea: 83 ec 0c sub $0xc,%esp 118aed: 8d 43 10 lea 0x10(%ebx),%eax 118af0: 50 push %eax 118af1: e8 92 42 00 00 call 11cd88 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118af6: 58 pop %eax 118af7: 5a pop %edx 118af8: 53 push %ebx 118af9: 56 push %esi 118afa: ff 56 04 call *0x4(%esi) 118afd: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b00: 31 c0 xor %eax,%eax 118b02: eb ab jmp 118aaf =============================================================================== 00118b04 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 2c sub $0x2c,%esp 118b0d: 8b 7d 0c mov 0xc(%ebp),%edi 118b10: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b13: 8b 1d e0 0c 14 00 mov 0x140ce0,%ebx if ( !timer_server ) 118b19: 85 db test %ebx,%ebx 118b1b: 0f 84 9f 00 00 00 je 118bc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 118b21: 85 f6 test %esi,%esi 118b23: 0f 84 a3 00 00 00 je 118bcc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b29: 85 ff test %edi,%edi 118b2b: 75 0f jne 118b3c return RTEMS_INVALID_NUMBER; 118b2d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b32: 8d 65 f4 lea -0xc(%ebp),%esp 118b35: 5b pop %ebx 118b36: 5e pop %esi 118b37: 5f pop %edi 118b38: c9 leave 118b39: c3 ret 118b3a: 66 90 xchg %ax,%ax <== NOT EXECUTED 118b3c: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118b3d: 8d 45 e4 lea -0x1c(%ebp),%eax 118b40: 50 push %eax 118b41: ff 75 08 pushl 0x8(%ebp) 118b44: 68 a0 0c 14 00 push $0x140ca0 118b49: e8 fa 25 00 00 call 11b148 <_Objects_Get> 118b4e: 89 c2 mov %eax,%edx switch ( location ) { 118b50: 83 c4 10 add $0x10,%esp 118b53: 8b 45 e4 mov -0x1c(%ebp),%eax 118b56: 85 c0 test %eax,%eax 118b58: 75 56 jne 118bb0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118b5a: 83 ec 0c sub $0xc,%esp 118b5d: 8d 42 10 lea 0x10(%edx),%eax 118b60: 50 push %eax 118b61: 89 55 d4 mov %edx,-0x2c(%ebp) 118b64: e8 1f 42 00 00 call 11cd88 <_Watchdog_Remove> _ISR_Disable( level ); 118b69: 9c pushf 118b6a: fa cli 118b6b: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 118b6c: 83 c4 10 add $0x10,%esp 118b6f: 8b 55 d4 mov -0x2c(%ebp),%edx 118b72: 8b 4a 18 mov 0x18(%edx),%ecx 118b75: 85 c9 test %ecx,%ecx 118b77: 75 5f jne 118bd8 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 118b79: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118b80: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118b87: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118b8a: 8b 4d 08 mov 0x8(%ebp),%ecx 118b8d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118b90: 8b 4d 14 mov 0x14(%ebp),%ecx 118b93: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118b96: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118b99: 50 push %eax 118b9a: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118b9b: 83 ec 08 sub $0x8,%esp 118b9e: 52 push %edx 118b9f: 53 push %ebx 118ba0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ba3: e8 04 2e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118ba8: 83 c4 10 add $0x10,%esp 118bab: 31 c0 xor %eax,%eax 118bad: eb 83 jmp 118b32 118baf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bb0: b8 04 00 00 00 mov $0x4,%eax } 118bb5: 8d 65 f4 lea -0xc(%ebp),%esp 118bb8: 5b pop %ebx 118bb9: 5e pop %esi 118bba: 5f pop %edi 118bbb: c9 leave 118bbc: c3 ret 118bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118bc0: b8 0e 00 00 00 mov $0xe,%eax 118bc5: e9 68 ff ff ff jmp 118b32 118bca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118bcc: b8 09 00 00 00 mov $0x9,%eax 118bd1: e9 5c ff ff ff jmp 118b32 118bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 118bd8: 50 push %eax 118bd9: 9d popf _Thread_Enable_dispatch(); 118bda: e8 cd 2d 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118bdf: 31 c0 xor %eax,%eax 118be1: e9 4c ff ff ff jmp 118b32 =============================================================================== 00118be8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118be8: 55 push %ebp 118be9: 89 e5 mov %esp,%ebp 118beb: 57 push %edi 118bec: 56 push %esi 118bed: 53 push %ebx 118bee: 83 ec 2c sub $0x2c,%esp 118bf1: 8b 7d 0c mov 0xc(%ebp),%edi 118bf4: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118bf7: 8b 1d e0 0c 14 00 mov 0x140ce0,%ebx if ( !timer_server ) 118bfd: 85 db test %ebx,%ebx 118bff: 0f 84 d7 00 00 00 je 118cdc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c05: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 118c0c: 0f 84 aa 00 00 00 je 118cbc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c12: 85 f6 test %esi,%esi 118c14: 0f 84 b2 00 00 00 je 118ccc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c1a: 83 ec 0c sub $0xc,%esp 118c1d: 57 push %edi 118c1e: e8 95 d1 ff ff call 115db8 <_TOD_Validate> 118c23: 83 c4 10 add $0x10,%esp 118c26: 84 c0 test %al,%al 118c28: 75 0e jne 118c38 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c2a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c2f: 8d 65 f4 lea -0xc(%ebp),%esp 118c32: 5b pop %ebx 118c33: 5e pop %esi 118c34: 5f pop %edi 118c35: c9 leave 118c36: c3 ret 118c37: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118c38: 83 ec 0c sub $0xc,%esp 118c3b: 57 push %edi 118c3c: e8 eb d0 ff ff call 115d2c <_TOD_To_seconds> 118c41: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118c43: 83 c4 10 add $0x10,%esp 118c46: 3b 05 28 0a 14 00 cmp 0x140a28,%eax 118c4c: 76 dc jbe 118c2a 118c4e: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118c4f: 8d 45 e4 lea -0x1c(%ebp),%eax 118c52: 50 push %eax 118c53: ff 75 08 pushl 0x8(%ebp) 118c56: 68 a0 0c 14 00 push $0x140ca0 118c5b: e8 e8 24 00 00 call 11b148 <_Objects_Get> 118c60: 89 c2 mov %eax,%edx switch ( location ) { 118c62: 83 c4 10 add $0x10,%esp 118c65: 8b 45 e4 mov -0x1c(%ebp),%eax 118c68: 85 c0 test %eax,%eax 118c6a: 75 7c jne 118ce8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c6c: 83 ec 0c sub $0xc,%esp 118c6f: 8d 42 10 lea 0x10(%edx),%eax 118c72: 50 push %eax 118c73: 89 55 d4 mov %edx,-0x2c(%ebp) 118c76: e8 0d 41 00 00 call 11cd88 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118c7b: 8b 55 d4 mov -0x2c(%ebp),%edx 118c7e: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118c85: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118c8c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118c8f: 8b 45 08 mov 0x8(%ebp),%eax 118c92: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118c95: 8b 45 14 mov 0x14(%ebp),%eax 118c98: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118c9b: 2b 3d 28 0a 14 00 sub 0x140a28,%edi 118ca1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118ca4: 58 pop %eax 118ca5: 59 pop %ecx 118ca6: 52 push %edx 118ca7: 53 push %ebx 118ca8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118cab: e8 fc 2c 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 31 c0 xor %eax,%eax 118cb5: e9 75 ff ff ff jmp 118c2f 118cba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118cbc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cc1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cc4: 5b pop %ebx <== NOT EXECUTED 118cc5: 5e pop %esi <== NOT EXECUTED 118cc6: 5f pop %edi <== NOT EXECUTED 118cc7: c9 leave <== NOT EXECUTED 118cc8: c3 ret <== NOT EXECUTED 118cc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118ccc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cd1: 8d 65 f4 lea -0xc(%ebp),%esp 118cd4: 5b pop %ebx 118cd5: 5e pop %esi 118cd6: 5f pop %edi 118cd7: c9 leave 118cd8: c3 ret 118cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118cdc: b8 0e 00 00 00 mov $0xe,%eax 118ce1: e9 49 ff ff ff jmp 118c2f 118ce6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118ce8: b8 04 00 00 00 mov $0x4,%eax 118ced: e9 3d ff ff ff jmp 118c2f =============================================================================== 0010c69c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10c69c: 55 push %ebp 10c69d: 89 e5 mov %esp,%ebp 10c69f: 57 push %edi 10c6a0: 56 push %esi 10c6a1: 53 push %ebx 10c6a2: 83 ec 1c sub $0x1c,%esp 10c6a5: 89 c3 mov %eax,%ebx 10c6a7: 89 d6 mov %edx,%esi 10c6a9: 89 cf mov %ecx,%edi int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 10c6ab: a9 00 00 00 20 test $0x20000000,%eax 10c6b0: 74 2b je 10c6dd if (rtems_panic_in_progress++) 10c6b2: 8b 15 20 c9 12 00 mov 0x12c920,%edx 10c6b8: 8d 42 01 lea 0x1(%edx),%eax 10c6bb: a3 20 c9 12 00 mov %eax,0x12c920 10c6c0: 85 d2 test %edx,%edx 10c6c2: 74 10 je 10c6d4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c6c4: a1 94 ca 12 00 mov 0x12ca94,%eax <== NOT EXECUTED 10c6c9: 40 inc %eax <== NOT EXECUTED 10c6ca: a3 94 ca 12 00 mov %eax,0x12ca94 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10c6cf: a1 20 c9 12 00 mov 0x12c920,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10c6d4: 83 f8 02 cmp $0x2,%eax 10c6d7: 0f 8f af 00 00 00 jg 10c78c <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10c6dd: 83 ec 0c sub $0xc,%esp 10c6e0: a1 20 a7 12 00 mov 0x12a720,%eax 10c6e5: ff 70 08 pushl 0x8(%eax) 10c6e8: e8 e3 b0 00 00 call 1177d0 status = error_flag & ~RTEMS_ERROR_MASK; 10c6ed: 89 d8 mov %ebx,%eax 10c6ef: 25 ff ff ff 8f and $0x8fffffff,%eax 10c6f4: 89 45 e4 mov %eax,-0x1c(%ebp) if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10c6f7: 83 c4 10 add $0x10,%esp 10c6fa: 81 e3 00 00 00 40 and $0x40000000,%ebx 10c700: 0f 85 be 00 00 00 jne 10c7c4 <== NEVER TAKEN rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 10c706: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10c708: 50 push %eax 10c709: 57 push %edi 10c70a: 56 push %esi 10c70b: a1 20 a7 12 00 mov 0x12a720,%eax 10c710: ff 70 0c pushl 0xc(%eax) 10c713: e8 38 0e 01 00 call 11d550 10c718: 89 c6 mov %eax,%esi if (status) 10c71a: 83 c4 10 add $0x10,%esp 10c71d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c720: 85 c9 test %ecx,%ecx 10c722: 75 74 jne 10c798 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 10c724: 83 fb 00 cmp $0x0,%ebx 10c727: 74 30 je 10c759 if ((local_errno > 0) && *strerror(local_errno)) 10c729: 7e 15 jle 10c740 10c72b: 83 ec 0c sub $0xc,%esp 10c72e: 53 push %ebx 10c72f: e8 e8 bc 00 00 call 11841c 10c734: 83 c4 10 add $0x10,%esp 10c737: 80 38 00 cmpb $0x0,(%eax) 10c73a: 0f 85 90 00 00 00 jne 10c7d0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10c740: 52 push %edx 10c741: 53 push %ebx 10c742: 68 c9 54 12 00 push $0x1254c9 10c747: a1 20 a7 12 00 mov 0x12a720,%eax 10c74c: ff 70 0c pushl 0xc(%eax) 10c74f: e8 70 b4 00 00 call 117bc4 10c754: 01 c6 add %eax,%esi 10c756: 83 c4 10 add $0x10,%esp } chars_written += fprintf(stderr, "\n"); 10c759: 83 ec 08 sub $0x8,%esp 10c75c: 68 82 47 12 00 push $0x124782 10c761: a1 20 a7 12 00 mov 0x12a720,%eax 10c766: ff 70 0c pushl 0xc(%eax) 10c769: e8 56 b4 00 00 call 117bc4 10c76e: 8d 34 30 lea (%eax,%esi,1),%esi (void) fflush(stderr); 10c771: 58 pop %eax 10c772: a1 20 a7 12 00 mov 0x12a720,%eax 10c777: ff 70 0c pushl 0xc(%eax) 10c77a: e8 51 b0 00 00 call 1177d0 return chars_written; 10c77f: 83 c4 10 add $0x10,%esp } 10c782: 89 f0 mov %esi,%eax 10c784: 8d 65 f4 lea -0xc(%ebp),%esp 10c787: 5b pop %ebx 10c788: 5e pop %esi 10c789: 5f pop %edi 10c78a: c9 leave 10c78b: c3 ret if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; 10c78c: 31 f6 xor %esi,%esi <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 10c78e: 89 f0 mov %esi,%eax <== NOT EXECUTED 10c790: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c793: 5b pop %ebx <== NOT EXECUTED 10c794: 5e pop %esi <== NOT EXECUTED 10c795: 5f pop %edi <== NOT EXECUTED 10c796: c9 leave <== NOT EXECUTED 10c797: c3 ret <== NOT EXECUTED chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10c798: 83 ec 0c sub $0xc,%esp 10c79b: ff 75 e4 pushl -0x1c(%ebp) 10c79e: e8 e1 fe ff ff call 10c684 10c7a3: 83 c4 0c add $0xc,%esp 10c7a6: 50 push %eax 10c7a7: 68 ae 54 12 00 push $0x1254ae 10c7ac: a1 20 a7 12 00 mov 0x12a720,%eax 10c7b1: ff 70 0c pushl 0xc(%eax) 10c7b4: e8 0b b4 00 00 call 117bc4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 10c7b9: 01 c6 add %eax,%esi 10c7bb: 83 c4 10 add $0x10,%esp 10c7be: e9 61 ff ff ff jmp 10c724 10c7c3: 90 nop <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 10c7c4: e8 6f ac 00 00 call 117438 <__errno> 10c7c9: 8b 18 mov (%eax),%ebx 10c7cb: e9 38 ff ff ff jmp 10c708 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10c7d0: 83 ec 0c sub $0xc,%esp 10c7d3: 53 push %ebx 10c7d4: e8 43 bc 00 00 call 11841c 10c7d9: 83 c4 0c add $0xc,%esp 10c7dc: 50 push %eax 10c7dd: 68 bc 54 12 00 push $0x1254bc 10c7e2: e9 60 ff ff ff jmp 10c747 =============================================================================== 00108694 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 108694: 55 push %ebp 108695: 89 e5 mov %esp,%ebp 108697: 57 push %edi 108698: 56 push %esi 108699: 53 push %ebx 10869a: 83 ec 1c sub $0x1c,%esp 10869d: 89 c6 mov %eax,%esi 10869f: 89 55 e0 mov %edx,-0x20(%ebp) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 1086a2: 31 ff xor %edi,%edi static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 1086a4: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 1086ab: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1086ad: 8b 46 04 mov 0x4(%esi),%eax 1086b0: 48 dec %eax 1086b1: 89 46 04 mov %eax,0x4(%esi) 1086b4: 85 c0 test %eax,%eax 1086b6: 78 52 js 10870a <== NEVER TAKEN 1086b8: 8b 06 mov (%esi),%eax 1086ba: 0f b6 08 movzbl (%eax),%ecx 1086bd: 40 inc %eax 1086be: 89 06 mov %eax,(%esi) if (c == ':') 1086c0: 83 f9 3a cmp $0x3a,%ecx 1086c3: 74 5f je 108724 break; if (sign == 0) { 1086c5: 85 ff test %edi,%edi 1086c7: 75 0e jne 1086d7 if (c == '-') { 1086c9: 83 f9 2d cmp $0x2d,%ecx 1086cc: 0f 84 8a 00 00 00 je 10875c sign = -1; limit++; continue; } sign = 1; 1086d2: bf 01 00 00 00 mov $0x1,%edi } if (!isdigit(c)) 1086d7: a1 b4 51 12 00 mov 0x1251b4,%eax 1086dc: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1086e1: 74 6d je 108750 return 0; d = c - '0'; if ((i > (limit / 10)) 1086e3: b8 cd cc cc cc mov $0xcccccccd,%eax 1086e8: f7 65 e4 mull -0x1c(%ebp) 1086eb: c1 ea 03 shr $0x3,%edx 1086ee: 39 d3 cmp %edx,%ebx 1086f0: 77 5e ja 108750 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1086f2: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 1086f5: 39 d3 cmp %edx,%ebx 1086f7: 74 47 je 108740 return 0; i = i * 10 + d; 1086f9: 8d 04 9b lea (%ebx,%ebx,4),%eax 1086fc: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1086ff: 8b 46 04 mov 0x4(%esi),%eax 108702: 48 dec %eax 108703: 89 46 04 mov %eax,0x4(%esi) 108706: 85 c0 test %eax,%eax 108708: 79 ae jns 1086b8 <== ALWAYS TAKEN 10870a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10870d: 56 push %esi <== NOT EXECUTED 10870e: ff 35 c0 51 12 00 pushl 0x1251c0 <== NOT EXECUTED 108714: e8 e3 bd 00 00 call 1144fc <__srget_r> <== NOT EXECUTED 108719: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10871b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 10871e: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 108721: 75 a2 jne 1086c5 <== NOT EXECUTED 108723: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 108724: 85 ff test %edi,%edi 108726: 74 28 je 108750 <== NEVER TAKEN return 0; *val = i * sign; 108728: 0f af df imul %edi,%ebx 10872b: 8b 45 e0 mov -0x20(%ebp),%eax 10872e: 89 18 mov %ebx,(%eax) return 1; 108730: b8 01 00 00 00 mov $0x1,%eax } 108735: 8d 65 f4 lea -0xc(%ebp),%esp 108738: 5b pop %ebx 108739: 5e pop %esi 10873a: 5f pop %edi 10873b: c9 leave 10873c: c3 ret 10873d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 108740: 8d 04 9b lea (%ebx,%ebx,4),%eax 108743: d1 e0 shl %eax 108745: 8b 55 e4 mov -0x1c(%ebp),%edx 108748: 29 c2 sub %eax,%edx 10874a: 39 d1 cmp %edx,%ecx 10874c: 76 ab jbe 1086f9 <== NEVER TAKEN 10874e: 66 90 xchg %ax,%ax return 0; i = i * 10 + d; } if (sign == 0) return 0; 108750: 31 c0 xor %eax,%eax *val = i * sign; return 1; } 108752: 8d 65 f4 lea -0xc(%ebp),%esp 108755: 5b pop %ebx 108756: 5e pop %esi 108757: 5f pop %edi 108758: c9 leave 108759: c3 ret 10875a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 10875c: ff 45 e4 incl -0x1c(%ebp) c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 10875f: bf ff ff ff ff mov $0xffffffff,%edi limit++; continue; 108764: e9 44 ff ff ff jmp 1086ad =============================================================================== 0010876c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 10876c: 55 push %ebp 10876d: 89 e5 mov %esp,%ebp 10876f: 57 push %edi 108770: 56 push %esi 108771: 53 push %ebx 108772: 83 ec 0c sub $0xc,%esp 108775: 89 c3 mov %eax,%ebx 108777: 89 ce mov %ecx,%esi 108779: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 10877c: 8b 01 mov (%ecx),%eax 10877e: 89 02 mov %eax,(%edx) 108780: eb 26 jmp 1087a8 108782: 66 90 xchg %ax,%ax <== NOT EXECUTED for (;;) { c = getc(fp); 108784: 8b 13 mov (%ebx),%edx 108786: 0f b6 02 movzbl (%edx),%eax 108789: 42 inc %edx 10878a: 89 13 mov %edx,(%ebx) if (c == ':') { 10878c: 83 f8 3a cmp $0x3a,%eax 10878f: 74 3b je 1087cc if (nlFlag) return 0; break; } if (c == '\n') { 108791: 83 f8 0a cmp $0xa,%eax 108794: 74 56 je 1087ec if (!nlFlag) return 0; break; } if (c == EOF) 108796: 83 f8 ff cmp $0xffffffff,%eax 108799: 74 59 je 1087f4 return 0; if (*nleft < 2) 10879b: 83 3f 01 cmpl $0x1,(%edi) 10879e: 76 54 jbe 1087f4 return 0; **bufp = c; 1087a0: 8b 16 mov (%esi),%edx 1087a2: 88 02 mov %al,(%edx) ++(*bufp); 1087a4: ff 06 incl (%esi) --(*nleft); 1087a6: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 1087a8: 8b 43 04 mov 0x4(%ebx),%eax 1087ab: 48 dec %eax 1087ac: 89 43 04 mov %eax,0x4(%ebx) 1087af: 85 c0 test %eax,%eax 1087b1: 79 d1 jns 108784 1087b3: 83 ec 08 sub $0x8,%esp 1087b6: 53 push %ebx 1087b7: ff 35 c0 51 12 00 pushl 0x1251c0 1087bd: e8 3a bd 00 00 call 1144fc <__srget_r> 1087c2: 83 c4 10 add $0x10,%esp if (c == ':') { 1087c5: 83 f8 3a cmp $0x3a,%eax 1087c8: 75 c7 jne 108791 <== ALWAYS TAKEN 1087ca: 66 90 xchg %ax,%ax <== NOT EXECUTED if (nlFlag) 1087cc: 8b 55 0c mov 0xc(%ebp),%edx 1087cf: 85 d2 test %edx,%edx 1087d1: 75 21 jne 1087f4 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 1087d3: 8b 06 mov (%esi),%eax 1087d5: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1087d8: ff 06 incl (%esi) --(*nleft); 1087da: ff 0f decl (%edi) return 1; 1087dc: b8 01 00 00 00 mov $0x1,%eax } 1087e1: 8d 65 f4 lea -0xc(%ebp),%esp 1087e4: 5b pop %ebx 1087e5: 5e pop %esi 1087e6: 5f pop %edi 1087e7: c9 leave 1087e8: c3 ret 1087e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1087ec: 8b 45 0c mov 0xc(%ebp),%eax 1087ef: 85 c0 test %eax,%eax 1087f1: 75 e0 jne 1087d3 1087f3: 90 nop break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 1087f4: 31 c0 xor %eax,%eax } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 1087f6: 8d 65 f4 lea -0xc(%ebp),%esp 1087f9: 5b pop %ebx 1087fa: 5e pop %esi 1087fb: 5f pop %edi 1087fc: c9 leave 1087fd: c3 ret =============================================================================== 00108800 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 108800: 55 push %ebp 108801: 89 e5 mov %esp,%ebp 108803: 57 push %edi 108804: 56 push %esi 108805: 53 push %ebx 108806: 83 ec 34 sub $0x34,%esp 108809: 89 c6 mov %eax,%esi 10880b: 89 d3 mov %edx,%ebx 10880d: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108810: 8d 7d d4 lea -0x2c(%ebp),%edi 108813: 6a 00 push $0x0 108815: 8d 45 08 lea 0x8(%ebp),%eax 108818: 50 push %eax 108819: 89 f9 mov %edi,%ecx 10881b: 89 f0 mov %esi,%eax 10881d: e8 4a ff ff ff call 10876c 108822: 83 c4 10 add $0x10,%esp 108825: 85 c0 test %eax,%eax 108827: 75 0b jne 108834 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 108829: 31 c0 xor %eax,%eax grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 10882b: 8d 65 f4 lea -0xc(%ebp),%esp 10882e: 5b pop %ebx 10882f: 5e pop %esi 108830: 5f pop %edi 108831: c9 leave 108832: c3 ret 108833: 90 nop <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 108834: 83 ec 08 sub $0x8,%esp 108837: 8d 53 04 lea 0x4(%ebx),%edx 10883a: 6a 00 push $0x0 10883c: 8d 45 08 lea 0x8(%ebp),%eax 10883f: 50 push %eax 108840: 89 f9 mov %edi,%ecx 108842: 89 f0 mov %esi,%eax 108844: e8 23 ff ff ff call 10876c 108849: 83 c4 10 add $0x10,%esp 10884c: 85 c0 test %eax,%eax 10884e: 74 d9 je 108829 <== NEVER TAKEN || !scanInt(fp, &grgid) 108850: 8d 55 e4 lea -0x1c(%ebp),%edx 108853: 89 f0 mov %esi,%eax 108855: e8 3a fe ff ff call 108694 10885a: 85 c0 test %eax,%eax 10885c: 74 cb je 108829 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 10885e: 83 ec 08 sub $0x8,%esp 108861: 8d 55 e0 lea -0x20(%ebp),%edx 108864: 6a 01 push $0x1 108866: 8d 45 08 lea 0x8(%ebp),%eax 108869: 50 push %eax 10886a: 89 f9 mov %edi,%ecx 10886c: 89 f0 mov %esi,%eax 10886e: e8 f9 fe ff ff call 10876c 108873: 83 c4 10 add $0x10,%esp 108876: 85 c0 test %eax,%eax 108878: 74 af je 108829 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 10887a: 8b 45 e4 mov -0x1c(%ebp),%eax 10887d: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108881: 8b 7d e0 mov -0x20(%ebp),%edi 108884: 8a 07 mov (%edi),%al 108886: 84 c0 test %al,%al 108888: 74 7d je 108907 <== NEVER TAKEN 10888a: 89 fa mov %edi,%edx 10888c: b9 01 00 00 00 mov $0x1,%ecx 108891: eb 08 jmp 10889b 108893: 90 nop <== NOT EXECUTED 108894: 42 inc %edx 108895: 8a 02 mov (%edx),%al 108897: 84 c0 test %al,%al 108899: 74 09 je 1088a4 if(*cp == ',') 10889b: 3c 2c cmp $0x2c,%al 10889d: 75 f5 jne 108894 memcount++; 10889f: 41 inc %ecx 1088a0: eb f2 jmp 108894 1088a2: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088a4: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 1088ab: 39 45 08 cmp %eax,0x8(%ebp) 1088ae: 0f 82 75 ff ff ff jb 108829 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 1088b4: 8b 75 d4 mov -0x2c(%ebp),%esi 1088b7: 83 c6 0f add $0xf,%esi 1088ba: 83 e6 f0 and $0xfffffff0,%esi 1088bd: 89 73 0c mov %esi,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 1088c0: 89 3e mov %edi,(%esi) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088c2: 8b 45 e0 mov -0x20(%ebp),%eax 1088c5: 8a 10 mov (%eax),%dl 1088c7: 84 d2 test %dl,%dl 1088c9: 74 43 je 10890e <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( 1088cb: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088cc: b9 01 00 00 00 mov $0x1,%ecx 1088d1: eb 08 jmp 1088db 1088d3: 90 nop <== NOT EXECUTED 1088d4: 8a 10 mov (%eax),%dl 1088d6: 40 inc %eax 1088d7: 84 d2 test %dl,%dl 1088d9: 74 15 je 1088f0 if(*cp == ',') { 1088db: 80 fa 2c cmp $0x2c,%dl 1088de: 75 f4 jne 1088d4 *cp = '\0'; 1088e0: c6 40 ff 00 movb $0x0,-0x1(%eax) grp->gr_mem[memcount++] = cp + 1; 1088e4: 8b 53 0c mov 0xc(%ebx),%edx 1088e7: 89 04 8a mov %eax,(%edx,%ecx,4) 1088ea: 41 inc %ecx 1088eb: eb e7 jmp 1088d4 1088ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088f0: 8b 73 0c mov 0xc(%ebx),%esi 1088f3: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1088f6: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1) return 1; 1088fd: b8 01 00 00 00 mov $0x1,%eax 108902: e9 24 ff ff ff jmp 10882b grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108907: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 10890c: eb 9d jmp 1088ab <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10890e: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 108913: eb e1 jmp 1088f6 <== NOT EXECUTED =============================================================================== 00108918 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 108918: 55 push %ebp 108919: 89 e5 mov %esp,%ebp 10891b: 57 push %edi 10891c: 56 push %esi 10891d: 53 push %ebx 10891e: 83 ec 34 sub $0x34,%esp 108921: 89 c6 mov %eax,%esi 108923: 89 d3 mov %edx,%ebx 108925: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108928: 8d 7d d4 lea -0x2c(%ebp),%edi 10892b: 6a 00 push $0x0 10892d: 8d 45 08 lea 0x8(%ebp),%eax 108930: 50 push %eax 108931: 89 f9 mov %edi,%ecx 108933: 89 f0 mov %esi,%eax 108935: e8 32 fe ff ff call 10876c 10893a: 83 c4 10 add $0x10,%esp 10893d: 85 c0 test %eax,%eax 10893f: 75 0b jne 10894c || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; 108941: 31 c0 xor %eax,%eax pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 108943: 8d 65 f4 lea -0xc(%ebp),%esp 108946: 5b pop %ebx 108947: 5e pop %esi 108948: 5f pop %edi 108949: c9 leave 10894a: c3 ret 10894b: 90 nop <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 10894c: 83 ec 08 sub $0x8,%esp 10894f: 8d 53 04 lea 0x4(%ebx),%edx 108952: 6a 00 push $0x0 108954: 8d 45 08 lea 0x8(%ebp),%eax 108957: 50 push %eax 108958: 89 f9 mov %edi,%ecx 10895a: 89 f0 mov %esi,%eax 10895c: e8 0b fe ff ff call 10876c 108961: 83 c4 10 add $0x10,%esp 108964: 85 c0 test %eax,%eax 108966: 74 d9 je 108941 <== NEVER TAKEN || !scanInt(fp, &pwuid) 108968: 8d 55 e4 lea -0x1c(%ebp),%edx 10896b: 89 f0 mov %esi,%eax 10896d: e8 22 fd ff ff call 108694 108972: 85 c0 test %eax,%eax 108974: 74 cb je 108941 || !scanInt(fp, &pwgid) 108976: 8d 55 e0 lea -0x20(%ebp),%edx 108979: 89 f0 mov %esi,%eax 10897b: e8 14 fd ff ff call 108694 108980: 85 c0 test %eax,%eax 108982: 74 bd je 108941 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 108984: 83 ec 08 sub $0x8,%esp 108987: 8d 53 0c lea 0xc(%ebx),%edx 10898a: 6a 00 push $0x0 10898c: 8d 45 08 lea 0x8(%ebp),%eax 10898f: 50 push %eax 108990: 89 f9 mov %edi,%ecx 108992: 89 f0 mov %esi,%eax 108994: e8 d3 fd ff ff call 10876c 108999: 83 c4 10 add $0x10,%esp 10899c: 85 c0 test %eax,%eax 10899e: 74 a1 je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 1089a0: 83 ec 08 sub $0x8,%esp 1089a3: 8d 53 10 lea 0x10(%ebx),%edx 1089a6: 6a 00 push $0x0 1089a8: 8d 45 08 lea 0x8(%ebp),%eax 1089ab: 50 push %eax 1089ac: 89 f9 mov %edi,%ecx 1089ae: 89 f0 mov %esi,%eax 1089b0: e8 b7 fd ff ff call 10876c 1089b5: 83 c4 10 add $0x10,%esp 1089b8: 85 c0 test %eax,%eax 1089ba: 74 85 je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 1089bc: 83 ec 08 sub $0x8,%esp 1089bf: 8d 53 14 lea 0x14(%ebx),%edx 1089c2: 6a 00 push $0x0 1089c4: 8d 45 08 lea 0x8(%ebp),%eax 1089c7: 50 push %eax 1089c8: 89 f9 mov %edi,%ecx 1089ca: 89 f0 mov %esi,%eax 1089cc: e8 9b fd ff ff call 10876c 1089d1: 83 c4 10 add $0x10,%esp 1089d4: 85 c0 test %eax,%eax 1089d6: 0f 84 65 ff ff ff je 108941 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 1089dc: 83 ec 08 sub $0x8,%esp 1089df: 8d 53 18 lea 0x18(%ebx),%edx 1089e2: 6a 01 push $0x1 1089e4: 8d 45 08 lea 0x8(%ebp),%eax 1089e7: 50 push %eax 1089e8: 89 f9 mov %edi,%ecx 1089ea: 89 f0 mov %esi,%eax 1089ec: e8 7b fd ff ff call 10876c 1089f1: 83 c4 10 add $0x10,%esp 1089f4: 85 c0 test %eax,%eax 1089f6: 0f 84 45 ff ff ff je 108941 return 0; pwd->pw_uid = pwuid; 1089fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1089ff: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 108a03: 8b 45 e0 mov -0x20(%ebp),%eax 108a06: 66 89 43 0a mov %ax,0xa(%ebx) return 1; 108a0a: b8 01 00 00 00 mov $0x1,%eax 108a0f: e9 2f ff ff ff jmp 108943 =============================================================================== 0010a098 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 10a098: 55 push %ebp 10a099: 89 e5 mov %esp,%ebp 10a09b: 56 push %esi 10a09c: 53 push %ebx 10a09d: 89 d3 mov %edx,%ebx 10a09f: 89 c6 mov %eax,%esi int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 10a0a1: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) 10a0a8: 75 12 jne 10a0bc <== ALWAYS TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 10a0aa: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a0ad: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 10a0af: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a0b2: 5b pop %ebx <== NOT EXECUTED 10a0b3: 5e pop %esi <== NOT EXECUTED 10a0b4: c9 leave <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 10a0b5: e9 92 fe ff ff jmp 109f4c <== NOT EXECUTED 10a0ba: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a0bc: 52 push %edx 10a0bd: 6a 00 push $0x0 10a0bf: 6a 00 push $0x0 10a0c1: ff 73 18 pushl 0x18(%ebx) 10a0c4: e8 c7 15 00 00 call 10b690 i = iproc (c, tty); 10a0c9: 89 f2 mov %esi,%edx 10a0cb: 0f b6 c2 movzbl %dl,%eax 10a0ce: 89 da mov %ebx,%edx 10a0d0: e8 77 fe ff ff call 109f4c 10a0d5: 89 c6 mov %eax,%esi rtems_semaphore_release (tty->osem); 10a0d7: 58 pop %eax 10a0d8: ff 73 18 pushl 0x18(%ebx) 10a0db: e8 ac 16 00 00 call 10b78c 10a0e0: 83 c4 10 add $0x10,%esp } else { i = iproc (c, tty); } return i; } 10a0e3: 89 f0 mov %esi,%eax 10a0e5: 8d 65 f8 lea -0x8(%ebp),%esp 10a0e8: 5b pop %ebx 10a0e9: 5e pop %esi 10a0ea: c9 leave 10a0eb: c3 ret =============================================================================== 00108e9c : int _STAT_NAME( const char *path, struct stat *buf ) { 108e9c: 55 push %ebp 108e9d: 89 e5 mov %esp,%ebp 108e9f: 57 push %edi 108ea0: 56 push %esi 108ea1: 53 push %ebx 108ea2: 83 ec 3c sub $0x3c,%esp 108ea5: 8b 55 08 mov 0x8(%ebp),%edx 108ea8: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 108eab: 85 f6 test %esi,%esi 108ead: 74 65 je 108f14 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 108eaf: b9 ff ff ff ff mov $0xffffffff,%ecx 108eb4: 89 d7 mov %edx,%edi 108eb6: 31 c0 xor %eax,%eax 108eb8: f2 ae repnz scas %es:(%edi),%al 108eba: f7 d1 not %ecx 108ebc: 49 dec %ecx 108ebd: 83 ec 0c sub $0xc,%esp 108ec0: 6a 01 push $0x1 108ec2: 8d 5d d4 lea -0x2c(%ebp),%ebx 108ec5: 53 push %ebx 108ec6: 6a 00 push $0x0 108ec8: 51 push %ecx 108ec9: 52 push %edx 108eca: e8 45 f1 ff ff call 108014 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 108ecf: 83 c4 20 add $0x20,%esp 108ed2: 85 c0 test %eax,%eax 108ed4: 74 0e je 108ee4 return -1; 108ed6: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 108edb: 8d 65 f4 lea -0xc(%ebp),%esp 108ede: 5b pop %ebx 108edf: 5e pop %esi 108ee0: 5f pop %edi 108ee1: c9 leave 108ee2: c3 ret 108ee3: 90 nop <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 108ee4: b9 48 00 00 00 mov $0x48,%ecx 108ee9: 89 f7 mov %esi,%edi 108eeb: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 108eed: 83 ec 08 sub $0x8,%esp 108ef0: 56 push %esi 108ef1: 53 push %ebx 108ef2: 8b 45 dc mov -0x24(%ebp),%eax 108ef5: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 108ef8: 89 1c 24 mov %ebx,(%esp) 108efb: 89 45 c4 mov %eax,-0x3c(%ebp) 108efe: e8 e9 f1 ff ff call 1080ec return status; 108f03: 83 c4 10 add $0x10,%esp 108f06: 8b 45 c4 mov -0x3c(%ebp),%eax } 108f09: 8d 65 f4 lea -0xc(%ebp),%esp 108f0c: 5b pop %ebx 108f0d: 5e pop %esi 108f0e: 5f pop %edi 108f0f: c9 leave 108f10: c3 ret 108f11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 108f14: e8 43 78 00 00 call 11075c <__errno> 108f19: c7 00 0e 00 00 00 movl $0xe,(%eax) 108f1f: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 108f24: 8d 65 f4 lea -0xc(%ebp),%esp 108f27: 5b pop %ebx 108f28: 5e pop %esi 108f29: 5f pop %edi 108f2a: c9 leave 108f2b: c3 ret =============================================================================== 0010b30c : #include int statvfs (const char *path, struct statvfs *sb) { 10b30c: 55 push %ebp 10b30d: 89 e5 mov %esp,%ebp 10b30f: 57 push %edi 10b310: 56 push %esi 10b311: 53 push %ebx 10b312: 83 ec 48 sub $0x48,%esp 10b315: 8b 55 08 mov 0x8(%ebp),%edx * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 10b318: 31 f6 xor %esi,%esi 10b31a: b9 ff ff ff ff mov $0xffffffff,%ecx 10b31f: 89 d7 mov %edx,%edi 10b321: 89 f0 mov %esi,%eax 10b323: f2 ae repnz scas %es:(%edi),%al 10b325: f7 d1 not %ecx 10b327: 49 dec %ecx 10b328: 6a 01 push $0x1 10b32a: 8d 5d d4 lea -0x2c(%ebp),%ebx 10b32d: 53 push %ebx 10b32e: 6a 00 push $0x0 10b330: 51 push %ecx 10b331: 52 push %edx 10b332: e8 ad eb ff ff call 109ee4 10b337: 83 c4 20 add $0x20,%esp 10b33a: 85 c0 test %eax,%eax 10b33c: 74 0e je 10b34c <== ALWAYS TAKEN return -1; 10b33e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 10b343: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b346: 5b pop %ebx <== NOT EXECUTED 10b347: 5e pop %esi <== NOT EXECUTED 10b348: 5f pop %edi <== NOT EXECUTED 10b349: c9 leave <== NOT EXECUTED 10b34a: c3 ret <== NOT EXECUTED 10b34b: 90 nop <== NOT EXECUTED */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 10b34c: 8b 55 e4 mov -0x1c(%ebp),%edx fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 10b34f: b9 38 00 00 00 mov $0x38,%ecx 10b354: 8b 7d 0c mov 0xc(%ebp),%edi 10b357: 89 f0 mov %esi,%eax 10b359: f3 aa rep stos %al,%es:(%edi) result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b35b: 83 ec 08 sub $0x8,%esp 10b35e: 8b 42 28 mov 0x28(%edx),%eax 10b361: ff 75 0c pushl 0xc(%ebp) if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; 10b364: 83 c2 1c add $0x1c,%edx memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b367: 52 push %edx 10b368: ff 50 44 call *0x44(%eax) rtems_filesystem_freenode( &loc ); 10b36b: 89 1c 24 mov %ebx,(%esp) 10b36e: 89 45 c4 mov %eax,-0x3c(%ebp) 10b371: e8 46 ec ff ff call 109fbc return result; 10b376: 83 c4 10 add $0x10,%esp 10b379: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b37c: 8d 65 f4 lea -0xc(%ebp),%esp 10b37f: 5b pop %ebx 10b380: 5e pop %esi 10b381: 5f pop %edi 10b382: c9 leave 10b383: c3 ret =============================================================================== 0010ac30 : int symlink( const char *actualpath, const char *sympath ) { 10ac30: 55 push %ebp 10ac31: 89 e5 mov %esp,%ebp 10ac33: 56 push %esi 10ac34: 53 push %ebx 10ac35: 83 ec 34 sub $0x34,%esp 10ac38: 8b 75 0c mov 0xc(%ebp),%esi rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 10ac3b: 8d 5d dc lea -0x24(%ebp),%ebx 10ac3e: 53 push %ebx 10ac3f: 8d 45 f4 lea -0xc(%ebp),%eax 10ac42: 50 push %eax 10ac43: 56 push %esi 10ac44: e8 0f ff ff ff call 10ab58 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 10ac49: 83 c4 0c add $0xc,%esp 10ac4c: 8d 45 f0 lea -0x10(%ebp),%eax 10ac4f: 50 push %eax 10ac50: 53 push %ebx 10ac51: 03 75 f4 add -0xc(%ebp),%esi 10ac54: 56 push %esi 10ac55: 8b 45 e8 mov -0x18(%ebp),%eax 10ac58: ff 50 04 call *0x4(%eax) if ( result != 0 ) 10ac5b: 83 c4 10 add $0x10,%esp 10ac5e: 85 c0 test %eax,%eax 10ac60: 74 0e je 10ac70 return -1; 10ac62: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 10ac67: 8d 65 f8 lea -0x8(%ebp),%esp 10ac6a: 5b pop %ebx 10ac6b: 5e pop %esi 10ac6c: c9 leave 10ac6d: c3 ret 10ac6e: 66 90 xchg %ax,%ax <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 10ac70: 50 push %eax 10ac71: ff 75 f0 pushl -0x10(%ebp) 10ac74: ff 75 08 pushl 0x8(%ebp) 10ac77: 53 push %ebx 10ac78: 8b 45 e8 mov -0x18(%ebp),%eax 10ac7b: ff 50 38 call *0x38(%eax) rtems_filesystem_freenode( &loc ); 10ac7e: 89 1c 24 mov %ebx,(%esp) 10ac81: 89 45 d4 mov %eax,-0x2c(%ebp) 10ac84: e8 8f ec ff ff call 109918 return result; 10ac89: 83 c4 10 add $0x10,%esp 10ac8c: 8b 45 d4 mov -0x2c(%ebp),%eax } 10ac8f: 8d 65 f8 lea -0x8(%ebp),%esp 10ac92: 5b pop %ebx 10ac93: 5e pop %esi 10ac94: c9 leave 10ac95: c3 ret =============================================================================== 0010a1ac : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a1ac: 55 push %ebp 10a1ad: 89 e5 mov %esp,%ebp 10a1af: 53 push %ebx 10a1b0: 83 ec 04 sub $0x4,%esp 10a1b3: 8b 45 08 mov 0x8(%ebp),%eax /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 10a1b6: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx if ( this_reent ) { 10a1bc: 85 d2 test %edx,%edx 10a1be: 74 33 je 10a1f3 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 10a1c0: 8b 0d d8 76 12 00 mov 0x1276d8,%ecx 10a1c6: 8b 99 ec 00 00 00 mov 0xec(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a1cc: 89 91 ec 00 00 00 mov %edx,0xec(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a1d2: 83 ec 08 sub $0x8,%esp 10a1d5: 68 f8 a1 10 00 push $0x10a1f8 10a1da: ff b0 ec 00 00 00 pushl 0xec(%eax) 10a1e0: e8 53 a1 00 00 call 114338 <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a1e5: a1 d8 76 12 00 mov 0x1276d8,%eax 10a1ea: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 10a1f0: 83 c4 10 add $0x10,%esp } } 10a1f3: 8b 5d fc mov -0x4(%ebp),%ebx 10a1f6: c9 leave 10a1f7: c3 ret =============================================================================== 0010a850 : int tcsetattr( int fd, int opt, struct termios *tp ) { 10a850: 55 push %ebp 10a851: 89 e5 mov %esp,%ebp 10a853: 56 push %esi 10a854: 53 push %ebx 10a855: 8b 5d 08 mov 0x8(%ebp),%ebx 10a858: 8b 45 0c mov 0xc(%ebp),%eax 10a85b: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10a85e: 85 c0 test %eax,%eax 10a860: 74 2c je 10a88e 10a862: 48 dec %eax 10a863: 74 17 je 10a87c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a865: e8 ae 95 00 00 call 113e18 <__errno> 10a86a: c7 00 86 00 00 00 movl $0x86,(%eax) * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 10a870: b8 ff ff ff ff mov $0xffffffff,%eax 10a875: 8d 65 f8 lea -0x8(%ebp),%esp 10a878: 5b pop %ebx 10a879: 5e pop %esi 10a87a: c9 leave 10a87b: c3 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 10a87c: 50 push %eax 10a87d: 6a 00 push $0x0 10a87f: 6a 03 push $0x3 10a881: 53 push %ebx 10a882: e8 35 6f 00 00 call 1117bc 10a887: 83 c4 10 add $0x10,%esp 10a88a: 85 c0 test %eax,%eax 10a88c: 78 e2 js 10a870 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a88e: 89 75 10 mov %esi,0x10(%ebp) 10a891: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 10a898: 89 5d 08 mov %ebx,0x8(%ebp) } } 10a89b: 8d 65 f8 lea -0x8(%ebp),%esp 10a89e: 5b pop %ebx 10a89f: 5e pop %esi 10a8a0: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a8a1: e9 16 6f 00 00 jmp 1117bc =============================================================================== 0010e5b8 : int truncate( const char *path, off_t length ) { 10e5b8: 55 push %ebp 10e5b9: 89 e5 mov %esp,%ebp 10e5bb: 57 push %edi 10e5bc: 56 push %esi 10e5bd: 53 push %ebx 10e5be: 83 ec 14 sub $0x14,%esp 10e5c1: 8b 75 0c mov 0xc(%ebp),%esi 10e5c4: 8b 7d 10 mov 0x10(%ebp),%edi int status; int fd; fd = open( path, O_WRONLY ); 10e5c7: 6a 01 push $0x1 10e5c9: ff 75 08 pushl 0x8(%ebp) 10e5cc: e8 43 db ff ff call 10c114 10e5d1: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10e5d3: 83 c4 10 add $0x10,%esp 10e5d6: 83 f8 ff cmp $0xffffffff,%eax 10e5d9: 74 21 je 10e5fc return -1; status = ftruncate( fd, length ); 10e5db: 50 push %eax 10e5dc: 57 push %edi 10e5dd: 56 push %esi 10e5de: 53 push %ebx 10e5df: e8 5c 52 00 00 call 113840 10e5e4: 89 c6 mov %eax,%esi (void) close( fd ); 10e5e6: 89 1c 24 mov %ebx,(%esp) 10e5e9: e8 c6 c7 ff ff call 10adb4 return status; 10e5ee: 83 c4 10 add $0x10,%esp } 10e5f1: 89 f0 mov %esi,%eax 10e5f3: 8d 65 f4 lea -0xc(%ebp),%esp 10e5f6: 5b pop %ebx 10e5f7: 5e pop %esi 10e5f8: 5f pop %edi 10e5f9: c9 leave 10e5fa: c3 ret 10e5fb: 90 nop <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) return -1; 10e5fc: be ff ff ff ff mov $0xffffffff,%esi status = ftruncate( fd, length ); (void) close( fd ); return status; } 10e601: 89 f0 mov %esi,%eax 10e603: 8d 65 f4 lea -0xc(%ebp),%esp 10e606: 5b pop %ebx 10e607: 5e pop %esi 10e608: 5f pop %edi 10e609: c9 leave 10e60a: c3 ret =============================================================================== 0010bb54 : #include int unlink( const char *path ) { 10bb54: 55 push %ebp 10bb55: 89 e5 mov %esp,%ebp 10bb57: 57 push %edi 10bb58: 56 push %esi 10bb59: 53 push %ebx 10bb5a: 83 ec 58 sub $0x58,%esp 10bb5d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10bb60: 53 push %ebx 10bb61: e8 3e d3 ff ff call 108ea4 if ( parentpathlen == 0 ) 10bb66: 83 c4 10 add $0x10,%esp 10bb69: 85 c0 test %eax,%eax 10bb6b: 0f 85 d3 00 00 00 jne 10bc44 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10bb71: 50 push %eax 10bb72: 8d 45 d0 lea -0x30(%ebp),%eax 10bb75: 89 45 b4 mov %eax,-0x4c(%ebp) 10bb78: 50 push %eax 10bb79: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb7c: 50 push %eax 10bb7d: 53 push %ebx 10bb7e: e8 b9 e2 ff ff call 109e3c 10bb83: 83 c4 10 add $0x10,%esp 10bb86: 31 d2 xor %edx,%edx const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 10bb88: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10bb8c: 8d 7d bc lea -0x44(%ebp),%edi 10bb8f: b9 05 00 00 00 mov $0x5,%ecx 10bb94: 8b 75 b4 mov -0x4c(%ebp),%esi 10bb97: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 10bb99: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10bb9b: be ff ff ff ff mov $0xffffffff,%esi 10bba0: 89 f1 mov %esi,%ecx 10bba2: 89 df mov %ebx,%edi 10bba4: 31 c0 xor %eax,%eax 10bba6: f2 ae repnz scas %es:(%edi),%al 10bba8: f7 d1 not %ecx 10bbaa: 49 dec %ecx 10bbab: 83 ec 08 sub $0x8,%esp 10bbae: 51 push %ecx 10bbaf: 53 push %ebx 10bbb0: e8 33 d3 ff ff call 108ee8 10bbb5: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10bbb7: 89 f1 mov %esi,%ecx 10bbb9: 89 df mov %ebx,%edi 10bbbb: 31 c0 xor %eax,%eax 10bbbd: f2 ae repnz scas %es:(%edi),%al 10bbbf: f7 d1 not %ecx 10bbc1: 49 dec %ecx 10bbc2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10bbc9: 8d 75 bc lea -0x44(%ebp),%esi 10bbcc: 56 push %esi 10bbcd: 6a 00 push $0x0 10bbcf: 51 push %ecx 10bbd0: 53 push %ebx 10bbd1: e8 22 d2 ff ff call 108df8 0, &loc, false ); if ( result != 0 ) { 10bbd6: 83 c4 20 add $0x20,%esp 10bbd9: 85 c0 test %eax,%eax 10bbdb: 75 53 jne 10bc30 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 10bbdd: 83 ec 0c sub $0xc,%esp 10bbe0: 56 push %esi 10bbe1: 8b 45 c8 mov -0x38(%ebp),%eax 10bbe4: ff 50 10 call *0x10(%eax) 10bbe7: 83 c4 10 add $0x10,%esp 10bbea: 48 dec %eax 10bbeb: 0f 84 83 00 00 00 je 10bc74 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 10bbf1: 83 ec 08 sub $0x8,%esp 10bbf4: 56 push %esi 10bbf5: ff 75 b4 pushl -0x4c(%ebp) 10bbf8: 8b 45 c8 mov -0x38(%ebp),%eax 10bbfb: ff 50 0c call *0xc(%eax) rtems_filesystem_freenode( &loc ); 10bbfe: 89 34 24 mov %esi,(%esp) 10bc01: 89 45 ac mov %eax,-0x54(%ebp) 10bc04: e8 2f d3 ff ff call 108f38 if ( free_parentloc ) 10bc09: 83 c4 10 add $0x10,%esp 10bc0c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc10: 8b 45 ac mov -0x54(%ebp),%eax 10bc13: 74 11 je 10bc26 rtems_filesystem_freenode( &parentloc ); 10bc15: 83 ec 0c sub $0xc,%esp 10bc18: ff 75 b4 pushl -0x4c(%ebp) 10bc1b: e8 18 d3 ff ff call 108f38 10bc20: 83 c4 10 add $0x10,%esp 10bc23: 8b 45 ac mov -0x54(%ebp),%eax return result; } 10bc26: 8d 65 f4 lea -0xc(%ebp),%esp 10bc29: 5b pop %ebx 10bc2a: 5e pop %esi 10bc2b: 5f pop %edi 10bc2c: c9 leave 10bc2d: c3 ret 10bc2e: 66 90 xchg %ax,%ax <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 10bc30: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc34: 75 70 jne 10bca6 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); return -1; 10bc36: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 10bc3b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bc3e: 5b pop %ebx <== NOT EXECUTED 10bc3f: 5e pop %esi <== NOT EXECUTED 10bc40: 5f pop %edi <== NOT EXECUTED 10bc41: c9 leave <== NOT EXECUTED 10bc42: c3 ret <== NOT EXECUTED 10bc43: 90 nop <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 10bc44: 89 c2 mov %eax,%edx 10bc46: 83 ec 0c sub $0xc,%esp 10bc49: 6a 00 push $0x0 10bc4b: 8d 45 d0 lea -0x30(%ebp),%eax 10bc4e: 89 45 b4 mov %eax,-0x4c(%ebp) 10bc51: 50 push %eax 10bc52: 6a 02 push $0x2 10bc54: 52 push %edx 10bc55: 53 push %ebx 10bc56: 89 55 ac mov %edx,-0x54(%ebp) 10bc59: e8 02 d2 ff ff call 108e60 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10bc5e: 83 c4 20 add $0x20,%esp 10bc61: 85 c0 test %eax,%eax 10bc63: 8b 55 ac mov -0x54(%ebp),%edx 10bc66: 75 ce jne 10bc36 <== NEVER TAKEN return -1; free_parentloc = true; 10bc68: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10bc6c: e9 1b ff ff ff jmp 10bb8c 10bc71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 10bc74: 83 ec 0c sub $0xc,%esp 10bc77: 56 push %esi 10bc78: e8 bb d2 ff ff call 108f38 if ( free_parentloc ) 10bc7d: 83 c4 10 add $0x10,%esp 10bc80: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bc84: 74 0e je 10bc94 rtems_filesystem_freenode( &parentloc ); 10bc86: 83 ec 0c sub $0xc,%esp 10bc89: ff 75 b4 pushl -0x4c(%ebp) 10bc8c: e8 a7 d2 ff ff call 108f38 10bc91: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EISDIR ); 10bc94: e8 b3 a3 00 00 call 11604c <__errno> 10bc99: c7 00 15 00 00 00 movl $0x15,(%eax) 10bc9f: b8 ff ff ff ff mov $0xffffffff,%eax 10bca4: eb 80 jmp 10bc26 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10bca6: 83 ec 0c sub $0xc,%esp 10bca9: ff 75 b4 pushl -0x4c(%ebp) 10bcac: e8 87 d2 ff ff call 108f38 10bcb1: 83 c4 10 add $0x10,%esp return -1; 10bcb4: b8 ff ff ff ff mov $0xffffffff,%eax 10bcb9: e9 68 ff ff ff jmp 10bc26 =============================================================================== 0010bd34 : */ int unmount( const char *path ) { 10bd34: 55 push %ebp 10bd35: 89 e5 mov %esp,%ebp 10bd37: 57 push %edi 10bd38: 56 push %esi 10bd39: 53 push %ebx 10bd3a: 83 ec 38 sub $0x38,%esp 10bd3d: 8b 55 08 mov 0x8(%ebp),%edx * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 10bd40: 31 c0 xor %eax,%eax 10bd42: b9 ff ff ff ff mov $0xffffffff,%ecx 10bd47: 89 d7 mov %edx,%edi 10bd49: f2 ae repnz scas %es:(%edi),%al 10bd4b: f7 d1 not %ecx 10bd4d: 49 dec %ecx 10bd4e: 6a 01 push $0x1 10bd50: 8d 75 d4 lea -0x2c(%ebp),%esi 10bd53: 56 push %esi 10bd54: 6a 00 push $0x0 10bd56: 51 push %ecx 10bd57: 52 push %edx 10bd58: e8 77 cf ff ff call 108cd4 10bd5d: 83 c4 20 add $0x20,%esp 10bd60: 85 c0 test %eax,%eax 10bd62: 75 68 jne 10bdcc return -1; mt_entry = loc.mt_entry; 10bd64: 8b 5d e4 mov -0x1c(%ebp),%ebx /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 10bd67: 8b 45 d4 mov -0x2c(%ebp),%eax 10bd6a: 39 43 1c cmp %eax,0x1c(%ebx) 10bd6d: 0f 85 c5 00 00 00 jne 10be38 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10bd73: 83 ec 0c sub $0xc,%esp 10bd76: 56 push %esi 10bd77: e8 30 d0 ff ff call 108dac * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 10bd7c: 83 c4 10 add $0x10,%esp 10bd7f: a1 d0 61 12 00 mov 0x1261d0,%eax 10bd84: 39 58 14 cmp %ebx,0x14(%eax) 10bd87: 0f 84 cf 00 00 00 je 10be5c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10bd8d: 83 ec 08 sub $0x8,%esp 10bd90: ff 73 2c pushl 0x2c(%ebx) 10bd93: 68 20 bd 10 00 push $0x10bd20 10bd98: e8 ab d7 ff ff call 109548 10bd9d: 83 c4 10 add $0x10,%esp 10bda0: 84 c0 test %al,%al 10bda2: 0f 85 b4 00 00 00 jne 10be5c * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 10bda8: 83 ec 0c sub $0xc,%esp 10bdab: 53 push %ebx 10bdac: e8 2b d3 ff ff call 1090dc 10bdb1: 83 c4 10 add $0x10,%esp 10bdb4: 48 dec %eax 10bdb5: 0f 84 a1 00 00 00 je 10be5c * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 10bdbb: 83 ec 0c sub $0xc,%esp 10bdbe: 8b 43 14 mov 0x14(%ebx),%eax 10bdc1: 53 push %ebx 10bdc2: ff 50 28 call *0x28(%eax) 10bdc5: 83 c4 10 add $0x10,%esp 10bdc8: 85 c0 test %eax,%eax 10bdca: 74 10 je 10bddc <== ALWAYS TAKEN */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) rtems_fatal_error_occurred( 0 ); return -1; 10bdcc: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10bdd1: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd4: 5b pop %ebx 10bdd5: 5e pop %esi 10bdd6: 5f pop %edi 10bdd7: c9 leave 10bdd8: c3 ret 10bdd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 10bddc: 83 ec 0c sub $0xc,%esp 10bddf: 8b 43 28 mov 0x28(%ebx),%eax 10bde2: 53 push %ebx 10bde3: ff 50 2c call *0x2c(%eax) 10bde6: 83 c4 10 add $0x10,%esp 10bde9: 85 c0 test %eax,%eax 10bdeb: 0f 85 83 00 00 00 jne 10be74 <== NEVER TAKEN rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10bdf1: 52 push %edx 10bdf2: 6a 00 push $0x0 10bdf4: 6a 00 push $0x0 10bdf6: ff 35 08 84 12 00 pushl 0x128408 10bdfc: e8 77 0b 00 00 call 10c978 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10be01: 89 1c 24 mov %ebx,(%esp) 10be04: e8 1b 14 00 00 call 10d224 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10be09: 58 pop %eax 10be0a: ff 35 08 84 12 00 pushl 0x128408 10be10: e8 5f 0c 00 00 call 10ca74 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 10be15: 8d 43 08 lea 0x8(%ebx),%eax /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 10be18: 89 04 24 mov %eax,(%esp) 10be1b: e8 8c cf ff ff call 108dac free( mt_entry ); 10be20: 89 1c 24 mov %ebx,(%esp) 10be23: e8 98 cf ff ff call 108dc0 return 0; 10be28: 83 c4 10 add $0x10,%esp 10be2b: 31 c0 xor %eax,%eax } 10be2d: 8d 65 f4 lea -0xc(%ebp),%esp 10be30: 5b pop %ebx 10be31: 5e pop %esi 10be32: 5f pop %edi 10be33: c9 leave 10be34: c3 ret 10be35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ rtems_filesystem_freenode( &loc ); 10be38: 83 ec 0c sub $0xc,%esp 10be3b: 56 push %esi 10be3c: e8 6b cf ff ff call 108dac rtems_set_errno_and_return_minus_one( EACCES ); 10be41: e8 aa 74 00 00 call 1132f0 <__errno> 10be46: c7 00 0d 00 00 00 movl $0xd,(%eax) 10be4c: 83 c4 10 add $0x10,%esp 10be4f: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10be54: 8d 65 f4 lea -0xc(%ebp),%esp 10be57: 5b pop %ebx 10be58: 5e pop %esi 10be59: 5f pop %edi 10be5a: c9 leave 10be5b: c3 ret * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 10be5c: e8 8f 74 00 00 call 1132f0 <__errno> 10be61: c7 00 10 00 00 00 movl $0x10,(%eax) 10be67: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10be6c: 8d 65 f4 lea -0xc(%ebp),%esp 10be6f: 5b pop %ebx 10be70: 5e pop %esi 10be71: 5f pop %edi 10be72: c9 leave 10be73: c3 ret * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10be74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be77: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10be7a: 53 push %ebx <== NOT EXECUTED 10be7b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10be7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10be81: 85 c0 test %eax,%eax <== NOT EXECUTED 10be83: 0f 84 43 ff ff ff je 10bdcc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10be89: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10be8c: 6a 00 push $0x0 <== NOT EXECUTED 10be8e: e8 d9 10 00 00 call 10cf6c <== NOT EXECUTED =============================================================================== 0010bef0 : int utime( const char *path, const struct utimbuf *times ) { 10bef0: 55 push %ebp 10bef1: 89 e5 mov %esp,%ebp 10bef3: 57 push %edi 10bef4: 56 push %esi 10bef5: 53 push %ebx 10bef6: 83 ec 48 sub $0x48,%esp 10bef9: 8b 55 08 mov 0x8(%ebp),%edx 10befc: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10beff: 31 c0 xor %eax,%eax 10bf01: b9 ff ff ff ff mov $0xffffffff,%ecx 10bf06: 89 d7 mov %edx,%edi 10bf08: f2 ae repnz scas %es:(%edi),%al 10bf0a: f7 d1 not %ecx 10bf0c: 49 dec %ecx 10bf0d: 6a 01 push $0x1 10bf0f: 8d 75 d4 lea -0x2c(%ebp),%esi 10bf12: 56 push %esi 10bf13: 6a 00 push $0x0 10bf15: 51 push %ecx 10bf16: 52 push %edx 10bf17: e8 cc ca ff ff call 1089e8 10bf1c: 83 c4 20 add $0x20,%esp 10bf1f: 85 c0 test %eax,%eax 10bf21: 75 2d jne 10bf50 return -1; if ( times == NULL ) { 10bf23: 85 db test %ebx,%ebx 10bf25: 74 39 je 10bf60 10bf27: 8b 43 04 mov 0x4(%ebx),%eax 10bf2a: 8b 13 mov (%ebx),%edx now.actime = now.modtime = time( NULL ); times = &now; } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10bf2c: 51 push %ecx 10bf2d: 50 push %eax 10bf2e: 52 push %edx 10bf2f: 56 push %esi 10bf30: 8b 45 e0 mov -0x20(%ebp),%eax 10bf33: ff 50 30 call *0x30(%eax) rtems_filesystem_freenode( &temp_loc ); 10bf36: 89 34 24 mov %esi,(%esp) 10bf39: 89 45 c4 mov %eax,-0x3c(%ebp) 10bf3c: e8 97 ce ff ff call 108dd8 return result; 10bf41: 83 c4 10 add $0x10,%esp 10bf44: 8b 45 c4 mov -0x3c(%ebp),%eax } 10bf47: 8d 65 f4 lea -0xc(%ebp),%esp 10bf4a: 5b pop %ebx 10bf4b: 5e pop %esi 10bf4c: 5f pop %edi 10bf4d: c9 leave 10bf4e: c3 ret 10bf4f: 90 nop <== NOT EXECUTED rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; 10bf50: b8 ff ff ff ff mov $0xffffffff,%eax result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 10bf55: 8d 65 f4 lea -0xc(%ebp),%esp 10bf58: 5b pop %ebx 10bf59: 5e pop %esi 10bf5a: 5f pop %edi 10bf5b: c9 leave 10bf5c: c3 ret 10bf5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( times == NULL ) { now.actime = now.modtime = time( NULL ); 10bf60: 83 ec 0c sub $0xc,%esp 10bf63: 6a 00 push $0x0 10bf65: e8 22 b9 00 00 call 11788c