=============================================================================== 0010eebc : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10eebc: 55 push %ebp 10eebd: 89 e5 mov %esp,%ebp 10eebf: 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; 10eec2: 8b 50 10 mov 0x10(%eax),%edx 10eec5: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10eec8: 8b 10 mov (%eax),%edx 10eeca: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10eece: 77 12 ja 10eee2 <== NEVER TAKEN 10eed0: 8b 52 4c mov 0x4c(%edx),%edx 10eed3: ff 24 95 f0 01 12 00 jmp *0x1201f0(,%edx,4) 10eeda: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10eedc: 8b 51 0c mov 0xc(%ecx),%edx 10eedf: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10eee2: 31 c0 xor %eax,%eax 10eee4: c9 leave 10eee5: c3 ret 10eee6: 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; 10eee8: 8b 51 08 mov 0x8(%ecx),%edx 10eeeb: 89 50 08 mov %edx,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10eeee: 31 c0 xor %eax,%eax 10eef0: c9 leave 10eef1: c3 ret 10eef2: 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; 10eef4: c7 40 08 a0 02 12 00 movl $0x1202a0,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10eefb: 31 c0 xor %eax,%eax 10eefd: c9 leave 10eefe: c3 ret 10eeff: 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; 10ef00: 8b 51 10 mov 0x10(%ecx),%edx 10ef03: 89 50 08 mov %edx,0x8(%eax) break; } return 0; } 10ef06: 31 c0 xor %eax,%eax 10ef08: c9 leave 10ef09: c3 ret 10ef0a: 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; 10ef0c: c7 40 08 20 02 12 00 movl $0x120220,0x8(%eax) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 10ef13: 31 c0 xor %eax,%eax 10ef15: c9 leave 10ef16: c3 ret =============================================================================== 0010f840 : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 10f840: 55 push %ebp 10f841: 89 e5 mov %esp,%ebp 10f843: 53 push %ebx 10f844: 83 ec 10 sub $0x10,%esp 10f847: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 10f84a: 53 push %ebx 10f84b: e8 5c 04 00 00 call 10fcac 10f850: 83 c4 10 add $0x10,%esp 10f853: 85 c0 test %eax,%eax 10f855: 75 2d jne 10f884 10f857: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10f85c: 75 26 jne 10f884 if ( rtems_filesystem_current.node_access == jnode ) 10f85e: a1 c4 40 12 00 mov 0x1240c4,%eax 10f863: 39 58 04 cmp %ebx,0x4(%eax) 10f866: 74 58 je 10f8c0 rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 10f868: 8b 43 4c mov 0x4c(%ebx),%eax 10f86b: 83 f8 04 cmp $0x4,%eax 10f86e: 74 34 je 10f8a4 10f870: 83 f8 05 cmp $0x5,%eax 10f873: 74 17 je 10f88c break; default: break; } free( jnode ); 10f875: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f878: 8b 5d fc mov -0x4(%ebp),%ebx 10f87b: c9 leave break; default: break; } free( jnode ); 10f87c: e9 af 87 ff ff jmp 108030 10f881: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 10f884: 8b 5d fc mov -0x4(%ebp),%ebx 10f887: c9 leave 10f888: c3 ret 10f889: 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 ); 10f88c: 83 ec 0c sub $0xc,%esp 10f88f: 53 push %ebx 10f890: e8 4b 1a 00 00 call 1112e0 break; 10f895: 83 c4 10 add $0x10,%esp break; default: break; } free( jnode ); 10f898: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f89b: 8b 5d fc mov -0x4(%ebp),%ebx 10f89e: c9 leave break; default: break; } free( jnode ); 10f89f: e9 8c 87 ff ff jmp 108030 switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 10f8a4: 83 ec 0c sub $0xc,%esp 10f8a7: ff 73 50 pushl 0x50(%ebx) 10f8aa: e8 81 87 ff ff call 108030 break; 10f8af: 83 c4 10 add $0x10,%esp default: break; } free( jnode ); 10f8b2: 89 5d 08 mov %ebx,0x8(%ebp) } } 10f8b5: 8b 5d fc mov -0x4(%ebp),%ebx 10f8b8: c9 leave break; default: break; } free( jnode ); 10f8b9: e9 72 87 ff ff jmp 108030 10f8be: 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; 10f8c0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10f8c7: eb 9f jmp 10f868 =============================================================================== 0010ed78 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10ed78: 55 push %ebp 10ed79: 89 e5 mov %esp,%ebp 10ed7b: 57 push %edi 10ed7c: 56 push %esi 10ed7d: 53 push %ebx 10ed7e: 83 ec 1c sub $0x1c,%esp 10ed81: 8b 45 08 mov 0x8(%ebp),%eax 10ed84: 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 ) 10ed87: 85 c0 test %eax,%eax 10ed89: 74 66 je 10edf1 <== NEVER TAKEN return NULL; parent = parent_loc->node_access; 10ed8b: 8b 38 mov (%eax),%edi fs_info = parent_loc->mt_entry->fs_info; 10ed8d: 8b 40 10 mov 0x10(%eax),%eax 10ed90: 8b 70 34 mov 0x34(%eax),%esi /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10ed93: 83 fb 07 cmp $0x7,%ebx 10ed96: 74 50 je 10ede8 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10ed98: 50 push %eax 10ed99: a1 c4 40 12 00 mov 0x1240c4,%eax 10ed9e: 8b 40 2c mov 0x2c(%eax),%eax 10eda1: f7 d0 not %eax 10eda3: 23 45 14 and 0x14(%ebp),%eax 10eda6: 50 push %eax 10eda7: ff 75 10 pushl 0x10(%ebp) 10edaa: 53 push %ebx 10edab: e8 5c ff ff ff call 10ed0c if ( !node ) 10edb0: 83 c4 10 add $0x10,%esp 10edb3: 85 c0 test %eax,%eax 10edb5: 74 28 je 10eddf return NULL; /* * Set the type specific information */ switch (type) { 10edb7: 83 fb 07 cmp $0x7,%ebx 10edba: 76 40 jbe 10edfc <== ALWAYS TAKEN /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 10edbc: 89 78 08 mov %edi,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10edbf: 8b 56 04 mov 0x4(%esi),%edx 10edc2: 42 inc %edx 10edc3: 89 56 04 mov %edx,0x4(%esi) 10edc6: 89 50 38 mov %edx,0x38(%eax) 10edc9: 83 ec 08 sub $0x8,%esp 10edcc: 50 push %eax rtems_chain_append( &parent->info.directory.Entries, &node->Node ); 10edcd: 83 c7 50 add $0x50,%edi 10edd0: 57 push %edi 10edd1: 89 45 e4 mov %eax,-0x1c(%ebp) 10edd4: e8 2f d2 ff ff call 10c008 <_Chain_Append> return node; 10edd9: 83 c4 10 add $0x10,%esp 10eddc: 8b 45 e4 mov -0x1c(%ebp),%eax } 10eddf: 8d 65 f4 lea -0xc(%ebp),%esp 10ede2: 5b pop %ebx 10ede3: 5e pop %esi 10ede4: 5f pop %edi 10ede5: c9 leave 10ede6: c3 ret 10ede7: 90 nop <== NOT EXECUTED fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10ede8: 81 7e 10 60 01 12 00 cmpl $0x120160,0x10(%esi) 10edef: 75 a7 jne 10ed98 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 10edf1: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10edf3: 8d 65 f4 lea -0xc(%ebp),%esp 10edf6: 5b pop %ebx 10edf7: 5e pop %esi 10edf8: 5f pop %edi 10edf9: c9 leave 10edfa: c3 ret 10edfb: 90 nop <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 10edfc: ff 24 9d d0 01 12 00 jmp *0x1201d0(,%ebx,4) 10ee03: 90 nop <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 10ee04: 8b 4d 18 mov 0x18(%ebp),%ecx 10ee07: 8b 11 mov (%ecx),%edx 10ee09: 89 50 50 mov %edx,0x50(%eax) break; 10ee0c: eb ae jmp 10edbc 10ee0e: 66 90 xchg %ax,%ax <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10ee10: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ee17: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = 0; 10ee1e: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) case IMFS_MEMORY_FILE: node->info.file.size = 0; 10ee25: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10ee2c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10ee33: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10ee3a: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10ee41: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10ee48: e9 6f ff ff ff jmp 10edbc 10ee4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_FIFO: node->info.fifo.pipe = NULL; 10ee50: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10ee57: e9 60 ff ff ff jmp 10edbc case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 10ee5c: 8b 4d 18 mov 0x18(%ebp),%ecx 10ee5f: 8b 11 mov (%ecx),%edx 10ee61: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10ee64: 8b 51 04 mov 0x4(%ecx),%edx 10ee67: 89 50 54 mov %edx,0x54(%eax) break; 10ee6a: e9 4d ff ff ff jmp 10edbc 10ee6f: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ee70: 8d 50 54 lea 0x54(%eax),%edx 10ee73: 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; 10ee76: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) /* * Set the type specific information */ switch (type) { case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 10ee7d: 8d 50 50 lea 0x50(%eax),%edx 10ee80: 89 50 58 mov %edx,0x58(%eax) 10ee83: e9 34 ff ff ff jmp 10edbc =============================================================================== 0010ee88 : return node; } IMFS_jnode_t *IMFS_create_root_node(void) { 10ee88: 55 push %ebp 10ee89: 89 e5 mov %esp,%ebp 10ee8b: 83 ec 0c sub $0xc,%esp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 10ee8e: 68 ed 41 00 00 push $0x41ed 10ee93: 68 15 fe 11 00 push $0x11fe15 10ee98: 6a 01 push $0x1 10ee9a: e8 6d fe ff ff call 10ed0c if ( !node ) 10ee9f: 83 c4 10 add $0x10,%esp 10eea2: 85 c0 test %eax,%eax 10eea4: 74 13 je 10eeb9 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10eea6: 8d 50 54 lea 0x54(%eax),%edx 10eea9: 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; 10eeac: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) /* * Set the type specific information * * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); 10eeb3: 8d 50 50 lea 0x50(%eax),%edx 10eeb6: 89 50 58 mov %edx,0x58(%eax) return node; } 10eeb9: c9 leave 10eeba: c3 ret =============================================================================== 001094a8 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 1094a8: 55 push %ebp 1094a9: 89 e5 mov %esp,%ebp 1094ab: 57 push %edi 1094ac: 56 push %esi 1094ad: 53 push %ebx 1094ae: 83 ec 1c sub $0x1c,%esp 1094b1: 8b 45 08 mov 0x8(%ebp),%eax 1094b4: 8b 75 0c mov 0xc(%ebp),%esi assert( the_directory->type == IMFS_DIRECTORY ); #endif the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 1094b7: 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; 1094ba: 83 c0 54 add $0x54,%eax 1094bd: 89 45 e4 mov %eax,-0x1c(%ebp) 1094c0: 39 c7 cmp %eax,%edi 1094c2: 74 47 je 10950b <== NEVER TAKEN 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 ); 1094c4: 8d 46 01 lea 0x1(%esi),%eax 1094c7: 89 45 e0 mov %eax,-0x20(%ebp) 1094ca: 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++ ) 1094cc: 85 f6 test %esi,%esi 1094ce: 78 22 js 1094f2 <== NEVER TAKEN 1094d0: 31 db xor %ebx,%ebx 1094d2: 66 90 xchg %ax,%ax fprintf(stdout, "...." ); 1094d4: a1 40 98 12 00 mov 0x129840,%eax 1094d9: ff 70 08 pushl 0x8(%eax) 1094dc: 6a 04 push $0x4 1094de: 6a 01 push $0x1 1094e0: 68 72 49 12 00 push $0x124972 1094e5: e8 2a d1 00 00 call 116614 !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++ ) 1094ea: 43 inc %ebx 1094eb: 83 c4 10 add $0x10,%esp 1094ee: 39 de cmp %ebx,%esi 1094f0: 7d e2 jge 1094d4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 1094f2: 83 ec 0c sub $0xc,%esp 1094f5: 57 push %edi 1094f6: e8 75 fe ff ff call 109370 if ( the_jnode->type == IMFS_DIRECTORY ) 1094fb: 83 c4 10 add $0x10,%esp 1094fe: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109502: 74 10 je 109514 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 ) { 109504: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); #endif the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109506: 3b 7d e4 cmp -0x1c(%ebp),%edi 109509: 75 c1 jne 1094cc <== NEVER TAKEN fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 10950b: 8d 65 f4 lea -0xc(%ebp),%esp 10950e: 5b pop %ebx 10950f: 5e pop %esi 109510: 5f pop %edi 109511: c9 leave 109512: c3 ret 109513: 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 ); 109514: 83 ec 08 sub $0x8,%esp 109517: ff 75 e0 pushl -0x20(%ebp) 10951a: 57 push %edi 10951b: e8 88 ff ff ff call 1094a8 109520: 83 c4 10 add $0x10,%esp 109523: eb df jmp 109504 =============================================================================== 0010ef94 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10ef94: 55 push %ebp 10ef95: 89 e5 mov %esp,%ebp 10ef97: 57 push %edi 10ef98: 56 push %esi 10ef99: 53 push %ebx 10ef9a: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10ef9d: 8b 45 14 mov 0x14(%ebp),%eax 10efa0: 8b 30 mov (%eax),%esi size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 10efa2: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10efa9: 8d 4d e4 lea -0x1c(%ebp),%ecx 10efac: 51 push %ecx 10efad: 8d 45 af lea -0x51(%ebp),%eax 10efb0: 50 push %eax 10efb1: ff 75 0c pushl 0xc(%ebp) 10efb4: 8b 45 08 mov 0x8(%ebp),%eax 10efb7: 03 45 a4 add -0x5c(%ebp),%eax 10efba: 50 push %eax 10efbb: e8 64 07 00 00 call 10f724 10efc0: 89 c7 mov %eax,%edi pathnamelen -= len; 10efc2: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10efc5: 8b 4d 14 mov 0x14(%ebp),%ecx 10efc8: 8b 19 mov (%ecx),%ebx 10efca: 83 c4 10 add $0x10,%esp 10efcd: 85 db test %ebx,%ebx 10efcf: 0f 84 b7 01 00 00 je 10f18c <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10efd5: 29 55 0c sub %edx,0xc(%ebp) i += len; 10efd8: 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 ) 10efdb: 85 c0 test %eax,%eax 10efdd: 75 45 jne 10f024 * 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 ) { 10efdf: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10efe3: 0f 84 27 01 00 00 je 10f110 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10efe9: 83 ec 0c sub $0xc,%esp 10efec: ff 75 14 pushl 0x14(%ebp) 10efef: e8 c8 fe ff ff call 10eebc 10eff4: 89 c3 mov %eax,%ebx 10eff6: 59 pop %ecx 10eff7: 5e pop %esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10eff8: ff 75 10 pushl 0x10(%ebp) 10effb: ff 75 14 pushl 0x14(%ebp) 10effe: e8 15 ff ff ff call 10ef18 10f003: 83 c4 10 add $0x10,%esp 10f006: 85 c0 test %eax,%eax 10f008: 0f 85 d2 00 00 00 jne 10f0e0 rtems_set_errno_and_return_minus_one( EACCES ); 10f00e: e8 d5 33 00 00 call 1123e8 <__errno> 10f013: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f019: bb ff ff ff ff mov $0xffffffff,%ebx 10f01e: e9 bd 00 00 00 jmp 10f0e0 10f023: 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 ) 10f024: 83 7e 4c 01 cmpl $0x1,0x4c(%esi) 10f028: 0f 84 be 00 00 00 je 10f0ec if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10f02e: 89 de mov %ebx,%esi switch( type ) { 10f030: 83 ff 03 cmp $0x3,%edi 10f033: 74 1b je 10f050 10f035: 83 ff 04 cmp $0x4,%edi 10f038: 0f 84 92 00 00 00 je 10f0d0 10f03e: 83 ff 02 cmp $0x2,%edi 10f041: 74 59 je 10f09c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10f043: 83 ff 04 cmp $0x4,%edi 10f046: 0f 85 5d ff ff ff jne 10efa9 <== ALWAYS TAKEN 10f04c: eb 91 jmp 10efdf <== NOT EXECUTED 10f04e: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10f050: 8b 43 4c mov 0x4c(%ebx),%eax 10f053: 83 f8 03 cmp $0x3,%eax 10f056: 0f 84 c8 00 00 00 je 10f124 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10f05c: 83 f8 04 cmp $0x4,%eax 10f05f: 0f 84 6d 01 00 00 je 10f1d2 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f065: 48 dec %eax 10f066: 0f 85 35 01 00 00 jne 10f1a1 /* * 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 ) { 10f06c: 8b 46 5c mov 0x5c(%esi),%eax 10f06f: 85 c0 test %eax,%eax 10f071: 0f 85 3f 01 00 00 jne 10f1b6 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f077: 83 ec 08 sub $0x8,%esp 10f07a: 8d 45 af lea -0x51(%ebp),%eax 10f07d: 50 push %eax 10f07e: 56 push %esi 10f07f: e8 24 06 00 00 call 10f6a8 10f084: 89 c6 mov %eax,%esi if ( !node ) 10f086: 83 c4 10 add $0x10,%esp 10f089: 85 c0 test %eax,%eax 10f08b: 0f 84 fb 00 00 00 je 10f18c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10f091: 8b 4d 14 mov 0x14(%ebp),%ecx 10f094: 89 01 mov %eax,(%ecx) 10f096: e9 0e ff ff ff jmp 10efa9 10f09b: 90 nop <== 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 ) 10f09c: a1 c4 40 12 00 mov 0x1240c4,%eax 10f0a1: 3b 58 18 cmp 0x18(%eax),%ebx 10f0a4: 0f 84 ff fe ff ff je 10efa9 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10f0aa: 8b 4d 14 mov 0x14(%ebp),%ecx 10f0ad: 8b 41 10 mov 0x10(%ecx),%eax /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10f0b0: 3b 58 1c cmp 0x1c(%eax),%ebx 10f0b3: 0f 84 8f 00 00 00 je 10f148 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10f0b9: 8b 73 08 mov 0x8(%ebx),%esi 10f0bc: 85 f6 test %esi,%esi 10f0be: 0f 84 c8 00 00 00 je 10f18c rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; pathloc->node_access = node; 10f0c4: 8b 45 14 mov 0x14(%ebp),%eax 10f0c7: 89 30 mov %esi,(%eax) } pathloc->node_access = node; break; 10f0c9: e9 db fe ff ff jmp 10efa9 10f0ce: 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 ); 10f0d0: e8 13 33 00 00 call 1123e8 <__errno> 10f0d5: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f0db: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f0e0: 89 d8 mov %ebx,%eax 10f0e2: 8d 65 f4 lea -0xc(%ebp),%esp 10f0e5: 5b pop %ebx 10f0e6: 5e pop %esi 10f0e7: 5f pop %edi 10f0e8: c9 leave 10f0e9: c3 ret 10f0ea: 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 ) ) 10f0ec: 83 ec 08 sub $0x8,%esp 10f0ef: 6a 01 push $0x1 10f0f1: ff 75 14 pushl 0x14(%ebp) 10f0f4: 89 55 a0 mov %edx,-0x60(%ebp) 10f0f7: e8 1c fe ff ff call 10ef18 10f0fc: 83 c4 10 add $0x10,%esp 10f0ff: 85 c0 test %eax,%eax 10f101: 8b 55 a0 mov -0x60(%ebp),%edx 10f104: 0f 85 24 ff ff ff jne 10f02e 10f10a: e9 ff fe ff ff jmp 10f00e 10f10f: 90 nop <== 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 ) { 10f110: 8b 43 5c mov 0x5c(%ebx),%eax 10f113: 85 c0 test %eax,%eax 10f115: 0f 84 ce fe ff ff je 10efe9 newloc = node->info.directory.mt_fs->mt_fs_root; 10f11b: 8d 7d d0 lea -0x30(%ebp),%edi 10f11e: 8d 70 1c lea 0x1c(%eax),%esi 10f121: eb 2b jmp 10f14e 10f123: 90 nop <== NOT EXECUTED * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 10f124: 83 ec 08 sub $0x8,%esp 10f127: 6a 00 push $0x0 10f129: ff 75 14 pushl 0x14(%ebp) 10f12c: e8 07 fe ff ff call 10ef38 node = pathloc->node_access; 10f131: 8b 4d 14 mov 0x14(%ebp),%ecx 10f134: 8b 31 mov (%ecx),%esi if ( !node ) 10f136: 83 c4 10 add $0x10,%esp 10f139: 85 f6 test %esi,%esi 10f13b: 74 64 je 10f1a1 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 10f13d: 8b 46 4c mov 0x4c(%esi),%eax 10f140: e9 20 ff ff ff jmp 10f065 10f145: 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; 10f148: 8d 7d d0 lea -0x30(%ebp),%edi 10f14b: 8d 70 08 lea 0x8(%eax),%esi * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 10f14e: b9 05 00 00 00 mov $0x5,%ecx 10f153: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f155: 8d 75 d0 lea -0x30(%ebp),%esi 10f158: b1 05 mov $0x5,%cl 10f15a: 8b 7d 14 mov 0x14(%ebp),%edi 10f15d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10f15f: 8b 4d 14 mov 0x14(%ebp),%ecx 10f162: 8b 41 0c mov 0xc(%ecx),%eax 10f165: 51 push %ecx 10f166: ff 75 10 pushl 0x10(%ebp) 10f169: 8b 4d 0c mov 0xc(%ebp),%ecx 10f16c: 01 d1 add %edx,%ecx 10f16e: 51 push %ecx 10f16f: 8b 4d a4 mov -0x5c(%ebp),%ecx 10f172: 29 d1 sub %edx,%ecx 10f174: 8b 55 08 mov 0x8(%ebp),%edx 10f177: 01 ca add %ecx,%edx 10f179: 52 push %edx 10f17a: ff 10 call *(%eax) 10f17c: 89 c3 mov %eax,%ebx 10f17e: 83 c4 10 add $0x10,%esp if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f181: 89 d8 mov %ebx,%eax 10f183: 8d 65 f4 lea -0xc(%ebp),%esp 10f186: 5b pop %ebx 10f187: 5e pop %esi 10f188: 5f pop %edi 10f189: c9 leave 10f18a: c3 ret 10f18b: 90 nop <== NOT EXECUTED * 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 ); 10f18c: e8 57 32 00 00 call 1123e8 <__errno> 10f191: c7 00 02 00 00 00 movl $0x2,(%eax) 10f197: bb ff ff ff ff mov $0xffffffff,%ebx 10f19c: e9 3f ff ff ff jmp 10f0e0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f1a1: e8 42 32 00 00 call 1123e8 <__errno> 10f1a6: c7 00 14 00 00 00 movl $0x14,(%eax) 10f1ac: bb ff ff ff ff mov $0xffffffff,%ebx 10f1b1: e9 2a ff ff ff jmp 10f0e0 * 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; 10f1b6: 8d 7d d0 lea -0x30(%ebp),%edi 10f1b9: 8d 70 1c lea 0x1c(%eax),%esi 10f1bc: b9 05 00 00 00 mov $0x5,%ecx 10f1c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f1c3: 8d 75 d0 lea -0x30(%ebp),%esi 10f1c6: b1 05 mov $0x5,%cl 10f1c8: 8b 7d 14 mov 0x14(%ebp),%edi 10f1cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10f1cd: 8b 55 e4 mov -0x1c(%ebp),%edx 10f1d0: eb 8d jmp 10f15f if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 10f1d2: 83 ec 08 sub $0x8,%esp 10f1d5: 6a 00 push $0x0 10f1d7: ff 75 14 pushl 0x14(%ebp) 10f1da: e8 19 00 00 00 call 10f1f8 10f1df: 89 c3 mov %eax,%ebx node = pathloc->node_access; 10f1e1: 8b 45 14 mov 0x14(%ebp),%eax 10f1e4: 8b 30 mov (%eax),%esi if ( result == -1 ) 10f1e6: 83 c4 10 add $0x10,%esp 10f1e9: 83 fb ff cmp $0xffffffff,%ebx 10f1ec: 0f 85 4b ff ff ff jne 10f13d <== ALWAYS TAKEN 10f1f2: e9 e9 fe ff ff jmp 10f0e0 <== NOT EXECUTED =============================================================================== 0010f340 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10f340: 55 push %ebp 10f341: 89 e5 mov %esp,%ebp 10f343: 57 push %edi 10f344: 56 push %esi 10f345: 53 push %ebx 10f346: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10f349: 8b 45 0c mov 0xc(%ebp),%eax 10f34c: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10f34e: 31 c0 xor %eax,%eax 10f350: b9 ff ff ff ff mov $0xffffffff,%ecx 10f355: 8b 7d 08 mov 0x8(%ebp),%edi 10f358: f2 ae repnz scas %es:(%edi),%al 10f35a: f7 d1 not %ecx 10f35c: 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; 10f35f: 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 ); 10f366: 8d 55 e4 lea -0x1c(%ebp),%edx 10f369: 52 push %edx 10f36a: 8d 4d af lea -0x51(%ebp),%ecx 10f36d: 51 push %ecx 10f36e: 56 push %esi 10f36f: 8b 45 08 mov 0x8(%ebp),%eax 10f372: 03 45 a4 add -0x5c(%ebp),%eax 10f375: 50 push %eax 10f376: e8 a9 03 00 00 call 10f724 10f37b: 89 c2 mov %eax,%edx pathlen -= len; 10f37d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10f380: 29 ce sub %ecx,%esi i += len; if ( !pathloc->node_access ) 10f382: 8b 45 0c mov 0xc(%ebp),%eax 10f385: 8b 38 mov (%eax),%edi 10f387: 83 c4 10 add $0x10,%esp 10f38a: 85 ff test %edi,%edi 10f38c: 0f 84 e6 00 00 00 je 10f478 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10f392: 85 d2 test %edx,%edx 10f394: 75 1a jne 10f3b0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10f396: e8 4d 30 00 00 call 1123e8 <__errno> 10f39b: c7 00 11 00 00 00 movl $0x11,(%eax) 10f3a1: 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; } 10f3a6: 89 d8 mov %ebx,%eax 10f3a8: 8d 65 f4 lea -0xc(%ebp),%esp 10f3ab: 5b pop %ebx 10f3ac: 5e pop %esi 10f3ad: 5f pop %edi 10f3ae: c9 leave 10f3af: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 10f3b0: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f3b4: 0f 84 d6 00 00 00 je 10f490 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10f3ba: 01 4d a4 add %ecx,-0x5c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10f3bd: 89 fb mov %edi,%ebx switch( type ) { 10f3bf: 83 fa 02 cmp $0x2,%edx 10f3c2: 0f 84 8c 00 00 00 je 10f454 10f3c8: 76 26 jbe 10f3f0 10f3ca: 83 fa 03 cmp $0x3,%edx 10f3cd: 74 2d je 10f3fc 10f3cf: 83 fa 04 cmp $0x4,%edx 10f3d2: 75 92 jne 10f366 <== 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 ); 10f3d4: e8 0f 30 00 00 call 1123e8 <__errno> 10f3d9: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10f3df: 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; } 10f3e4: 89 d8 mov %ebx,%eax 10f3e6: 8d 65 f4 lea -0xc(%ebp),%esp 10f3e9: 5b pop %ebx 10f3ea: 5e pop %esi 10f3eb: 5f pop %edi 10f3ec: c9 leave 10f3ed: c3 ret 10f3ee: 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 ) { 10f3f0: 85 d2 test %edx,%edx 10f3f2: 74 a2 je 10f396 <== NEVER TAKEN 10f3f4: e9 6d ff ff ff jmp 10f366 10f3f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10f3fc: 8b 47 4c mov 0x4c(%edi),%eax 10f3ff: 83 f8 03 cmp $0x3,%eax 10f402: 0f 84 be 01 00 00 je 10f5c6 <== NEVER TAKEN result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10f408: 83 f8 04 cmp $0x4,%eax 10f40b: 0f 84 d4 01 00 00 je 10f5e5 <== NEVER TAKEN if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 10f411: 85 db test %ebx,%ebx 10f413: 0f 84 6b 01 00 00 je 10f584 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10f419: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f41d: 0f 85 61 01 00 00 jne 10f584 /* * 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 ) { 10f423: 8b 43 5c mov 0x5c(%ebx),%eax 10f426: 85 c0 test %eax,%eax 10f428: 0f 85 6b 01 00 00 jne 10f599 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10f42e: 83 ec 08 sub $0x8,%esp 10f431: 8d 4d af lea -0x51(%ebp),%ecx 10f434: 51 push %ecx 10f435: 53 push %ebx 10f436: e8 6d 02 00 00 call 10f6a8 10f43b: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10f43d: 83 c4 10 add $0x10,%esp 10f440: 85 c0 test %eax,%eax 10f442: 0f 84 84 00 00 00 je 10f4cc done = true; else pathloc->node_access = node; 10f448: 8b 45 0c mov 0xc(%ebp),%eax 10f44b: 89 18 mov %ebx,(%eax) 10f44d: e9 14 ff ff ff jmp 10f366 10f452: 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 ) 10f454: a1 c4 40 12 00 mov 0x1240c4,%eax 10f459: 3b 78 18 cmp 0x18(%eax),%edi 10f45c: 0f 84 04 ff ff ff je 10f366 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10f462: 8b 55 0c mov 0xc(%ebp),%edx 10f465: 8b 42 10 mov 0x10(%edx),%eax 10f468: 3b 78 1c cmp 0x1c(%eax),%edi 10f46b: 0f 84 9f 00 00 00 je 10f510 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 10f471: 8b 5f 08 mov 0x8(%edi),%ebx 10f474: 85 db test %ebx,%ebx 10f476: 75 d0 jne 10f448 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 10f478: e8 6b 2f 00 00 call 1123e8 <__errno> 10f47d: c7 00 02 00 00 00 movl $0x2,(%eax) 10f483: bb ff ff ff ff mov $0xffffffff,%ebx 10f488: e9 19 ff ff ff jmp 10f3a6 10f48d: 8d 76 00 lea 0x0(%esi),%esi <== 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 ) ) 10f490: 83 ec 08 sub $0x8,%esp 10f493: 6a 01 push $0x1 10f495: ff 75 0c pushl 0xc(%ebp) 10f498: 89 55 a0 mov %edx,-0x60(%ebp) 10f49b: 89 4d 9c mov %ecx,-0x64(%ebp) 10f49e: e8 75 fa ff ff call 10ef18 10f4a3: 83 c4 10 add $0x10,%esp 10f4a6: 85 c0 test %eax,%eax 10f4a8: 8b 55 a0 mov -0x60(%ebp),%edx 10f4ab: 8b 4d 9c mov -0x64(%ebp),%ecx 10f4ae: 0f 85 06 ff ff ff jne 10f3ba /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10f4b4: e8 2f 2f 00 00 call 1123e8 <__errno> 10f4b9: c7 00 0d 00 00 00 movl $0xd,(%eax) 10f4bf: bb ff ff ff ff mov $0xffffffff,%ebx 10f4c4: e9 dd fe ff ff jmp 10f3a6 10f4c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10f4cc: 8b 45 a4 mov -0x5c(%ebp),%eax 10f4cf: 2b 45 e4 sub -0x1c(%ebp),%eax 10f4d2: 03 45 08 add 0x8(%ebp),%eax 10f4d5: 8b 55 10 mov 0x10(%ebp),%edx 10f4d8: 89 02 mov %eax,(%edx) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 10f4da: 8b 55 08 mov 0x8(%ebp),%edx 10f4dd: 8b 4d a4 mov -0x5c(%ebp),%ecx 10f4e0: 8a 04 0a mov (%edx,%ecx,1),%al 10f4e3: 84 c0 test %al,%al 10f4e5: 74 65 je 10f54c 10f4e7: 89 cb mov %ecx,%ebx 10f4e9: 89 d6 mov %edx,%esi 10f4eb: eb 0b jmp 10f4f8 10f4ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f4f0: 43 inc %ebx 10f4f1: 8a 04 1e mov (%esi,%ebx,1),%al 10f4f4: 84 c0 test %al,%al 10f4f6: 74 54 je 10f54c if ( !IMFS_is_separator( path[ i ] ) ) 10f4f8: 83 ec 0c sub $0xc,%esp 10f4fb: 0f be c0 movsbl %al,%eax 10f4fe: 50 push %eax 10f4ff: e8 a0 99 ff ff call 108ea4 10f504: 83 c4 10 add $0x10,%esp 10f507: 85 c0 test %eax,%eax 10f509: 75 e5 jne 10f4f0 10f50b: e9 68 ff ff ff jmp 10f478 10f510: 89 ca mov %ecx,%edx if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10f512: 8d 7d d0 lea -0x30(%ebp),%edi 10f515: 8d 70 08 lea 0x8(%eax),%esi 10f518: b9 05 00 00 00 mov $0x5,%ecx 10f51d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f51f: 8d 75 d0 lea -0x30(%ebp),%esi 10f522: b1 05 mov $0x5,%cl 10f524: 8b 7d 0c mov 0xc(%ebp),%edi 10f527: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f529: 56 push %esi 10f52a: 8b 4d 0c mov 0xc(%ebp),%ecx 10f52d: 8b 41 0c mov 0xc(%ecx),%eax 10f530: ff 75 10 pushl 0x10(%ebp) 10f533: 51 push %ecx 10f534: 8b 4d a4 mov -0x5c(%ebp),%ecx 10f537: 29 d1 sub %edx,%ecx 10f539: 89 ca mov %ecx,%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 ); 10f53b: 03 55 08 add 0x8(%ebp),%edx 10f53e: 52 push %edx 10f53f: ff 50 04 call *0x4(%eax) 10f542: 89 c3 mov %eax,%ebx 10f544: 83 c4 10 add $0x10,%esp 10f547: e9 5a fe ff ff jmp 10f3a6 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10f54c: 83 ec 0c sub $0xc,%esp 10f54f: ff 75 0c pushl 0xc(%ebp) 10f552: e8 65 f9 ff ff call 10eebc 10f557: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 10f559: 8b 4d 0c mov 0xc(%ebp),%ecx 10f55c: 8b 01 mov (%ecx),%eax 10f55e: 83 c4 10 add $0x10,%esp 10f561: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10f565: 75 1d jne 10f584 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10f567: 83 ec 08 sub $0x8,%esp 10f56a: 6a 03 push $0x3 10f56c: ff 75 0c pushl 0xc(%ebp) 10f56f: e8 a4 f9 ff ff call 10ef18 10f574: 83 c4 10 add $0x10,%esp 10f577: 85 c0 test %eax,%eax 10f579: 0f 85 27 fe ff ff jne 10f3a6 10f57f: e9 30 ff ff ff jmp 10f4b4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10f584: e8 5f 2e 00 00 call 1123e8 <__errno> 10f589: c7 00 14 00 00 00 movl $0x14,(%eax) 10f58f: bb ff ff ff ff mov $0xffffffff,%ebx 10f594: e9 0d fe ff ff jmp 10f3a6 * 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; 10f599: 8d 7d d0 lea -0x30(%ebp),%edi 10f59c: 8d 70 1c lea 0x1c(%eax),%esi 10f59f: b9 05 00 00 00 mov $0x5,%ecx 10f5a4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10f5a6: 8d 75 d0 lea -0x30(%ebp),%esi 10f5a9: b1 05 mov $0x5,%cl 10f5ab: 8b 7d 0c mov 0xc(%ebp),%edi 10f5ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10f5b0: 53 push %ebx 10f5b1: 8b 55 0c mov 0xc(%ebp),%edx 10f5b4: 8b 42 0c mov 0xc(%edx),%eax 10f5b7: ff 75 10 pushl 0x10(%ebp) 10f5ba: 52 push %edx 10f5bb: 8b 55 a4 mov -0x5c(%ebp),%edx 10f5be: 2b 55 e4 sub -0x1c(%ebp),%edx 10f5c1: e9 75 ff ff ff jmp 10f53b case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f5c6: 83 ec 08 sub $0x8,%esp 10f5c9: 6a 00 push $0x0 10f5cb: ff 75 0c pushl 0xc(%ebp) 10f5ce: e8 c1 fc ff ff call 10f294 if ( result == -1 ) 10f5d3: 83 c4 10 add $0x10,%esp 10f5d6: 83 f8 ff cmp $0xffffffff,%eax 10f5d9: 74 29 je 10f604 <== NEVER TAKEN 10f5db: 8b 55 0c mov 0xc(%ebp),%edx 10f5de: 8b 1a mov (%edx),%ebx 10f5e0: e9 2c fe ff ff jmp 10f411 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 10f5e5: 83 ec 08 sub $0x8,%esp 10f5e8: 6a 00 push $0x0 10f5ea: ff 75 0c pushl 0xc(%ebp) 10f5ed: e8 a2 fc ff ff call 10f294 if ( result == -1 ) 10f5f2: 83 c4 10 add $0x10,%esp 10f5f5: 83 f8 ff cmp $0xffffffff,%eax 10f5f8: 74 0a je 10f604 <== NEVER TAKEN 10f5fa: 8b 4d 0c mov 0xc(%ebp),%ecx 10f5fd: 8b 19 mov (%ecx),%ebx 10f5ff: e9 0d fe ff ff jmp 10f411 10f604: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f606: e9 9b fd ff ff jmp 10f3a6 <== NOT EXECUTED =============================================================================== 0010ef38 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ef38: 55 push %ebp 10ef39: 89 e5 mov %esp,%ebp 10ef3b: 53 push %ebx 10ef3c: 83 ec 04 sub $0x4,%esp 10ef3f: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ef42: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10ef44: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10ef48: 75 3c jne 10ef86 <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10ef4a: 8b 40 50 mov 0x50(%eax),%eax 10ef4d: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10ef4f: 83 ec 0c sub $0xc,%esp 10ef52: 53 push %ebx 10ef53: e8 64 ff ff ff call 10eebc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ef58: 58 pop %eax 10ef59: 5a pop %edx 10ef5a: ff 75 0c pushl 0xc(%ebp) 10ef5d: 53 push %ebx 10ef5e: e8 b5 ff ff ff call 10ef18 10ef63: 83 c4 10 add $0x10,%esp 10ef66: 85 c0 test %eax,%eax 10ef68: 74 0a je 10ef74 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; 10ef6a: 31 c0 xor %eax,%eax } 10ef6c: 8b 5d fc mov -0x4(%ebp),%ebx 10ef6f: c9 leave 10ef70: c3 ret 10ef71: 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 ); 10ef74: e8 6f 34 00 00 call 1123e8 <__errno> <== NOT EXECUTED 10ef79: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ef7f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ef84: eb e6 jmp 10ef6c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ef86: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ef89: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ef8e: e8 e1 cd ff ff call 10bd74 <== NOT EXECUTED =============================================================================== 0010f294 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f294: 55 push %ebp 10f295: 89 e5 mov %esp,%ebp 10f297: 57 push %edi 10f298: 56 push %esi 10f299: 53 push %ebx 10f29a: 83 ec 0c sub $0xc,%esp 10f29d: 8b 75 08 mov 0x8(%ebp),%esi 10f2a0: 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 ); 10f2a3: 8b 15 c4 40 12 00 mov 0x1240c4,%edx 10f2a9: eb 0e jmp 10f2b9 10f2ab: 90 nop <== NOT EXECUTED */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 10f2ac: 83 f8 04 cmp $0x4,%eax 10f2af: 74 53 je 10f304 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 10f2b1: 83 e8 03 sub $0x3,%eax 10f2b4: 83 f8 01 cmp $0x1,%eax 10f2b7: 77 3a ja 10f2f3 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 10f2b9: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 10f2bb: 8b 42 30 mov 0x30(%edx),%eax 10f2be: 40 inc %eax 10f2bf: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 10f2c3: 66 83 f8 05 cmp $0x5,%ax 10f2c7: 77 57 ja 10f320 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 10f2c9: 8b 43 4c mov 0x4c(%ebx),%eax 10f2cc: 83 f8 03 cmp $0x3,%eax 10f2cf: 75 db jne 10f2ac result = IMFS_evaluate_hard_link( node, flags ); 10f2d1: 83 ec 08 sub $0x8,%esp 10f2d4: 57 push %edi 10f2d5: 56 push %esi 10f2d6: e8 5d fc ff ff call 10ef38 10f2db: 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 ) ) ); 10f2de: 85 c0 test %eax,%eax 10f2e0: 75 33 jne 10f315 <== NEVER TAKEN 10f2e2: 8b 43 4c mov 0x4c(%ebx),%eax 10f2e5: 8b 15 c4 40 12 00 mov 0x1240c4,%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 ) || 10f2eb: 83 e8 03 sub $0x3,%eax 10f2ee: 83 f8 01 cmp $0x1,%eax 10f2f1: 76 c6 jbe 10f2b9 <== ALWAYS TAKEN 10f2f3: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 10f2f5: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 10f2fb: 8d 65 f4 lea -0xc(%ebp),%esp 10f2fe: 5b pop %ebx 10f2ff: 5e pop %esi 10f300: 5f pop %edi 10f301: c9 leave 10f302: c3 ret 10f303: 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 ); 10f304: 83 ec 08 sub $0x8,%esp 10f307: 57 push %edi 10f308: 56 push %esi 10f309: e8 ea fe ff ff call 10f1f8 10f30e: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 10f311: 85 c0 test %eax,%eax 10f313: 74 cd je 10f2e2 10f315: 8b 15 c4 40 12 00 mov 0x1240c4,%edx 10f31b: eb d8 jmp 10f2f5 10f31d: 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; 10f320: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 10f326: e8 bd 30 00 00 call 1123e8 <__errno> 10f32b: c7 00 5c 00 00 00 movl $0x5c,(%eax) 10f331: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 10f336: 8d 65 f4 lea -0xc(%ebp),%esp 10f339: 5b pop %ebx 10f33a: 5e pop %esi 10f33b: 5f pop %edi 10f33c: c9 leave 10f33d: c3 ret =============================================================================== 0010f1f8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10f1f8: 55 push %ebp 10f1f9: 89 e5 mov %esp,%ebp 10f1fb: 57 push %edi 10f1fc: 56 push %esi 10f1fd: 53 push %ebx 10f1fe: 83 ec 1c sub $0x1c,%esp 10f201: 8b 5d 08 mov 0x8(%ebp),%ebx 10f204: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10f207: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10f209: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10f20d: 75 78 jne 10f287 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10f20f: 8b 47 08 mov 0x8(%edi),%eax 10f212: 85 c0 test %eax,%eax 10f214: 74 64 je 10f27a <== NEVER TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10f216: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10f218: 51 push %ecx 10f219: 53 push %ebx 10f21a: 8d 45 e4 lea -0x1c(%ebp),%eax 10f21d: 50 push %eax 10f21e: ff 77 50 pushl 0x50(%edi) 10f221: e8 86 0d 00 00 call 10ffac /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10f226: 8b 57 50 mov 0x50(%edi),%edx 10f229: 03 55 e4 add -0x1c(%ebp),%edx 10f22c: 31 c0 xor %eax,%eax 10f22e: b9 ff ff ff ff mov $0xffffffff,%ecx 10f233: 89 d7 mov %edx,%edi 10f235: f2 ae repnz scas %es:(%edi),%al 10f237: f7 d1 not %ecx 10f239: 49 dec %ecx 10f23a: 53 push %ebx 10f23b: 56 push %esi 10f23c: 51 push %ecx 10f23d: 52 push %edx 10f23e: e8 51 fd ff ff call 10ef94 10f243: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10f245: 83 c4 14 add $0x14,%esp 10f248: 53 push %ebx 10f249: e8 6e fc ff ff call 10eebc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10f24e: 58 pop %eax 10f24f: 5a pop %edx 10f250: 56 push %esi 10f251: 53 push %ebx 10f252: e8 c1 fc ff ff call 10ef18 10f257: 83 c4 10 add $0x10,%esp 10f25a: 85 c0 test %eax,%eax 10f25c: 74 0a je 10f268 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10f25e: 89 f8 mov %edi,%eax 10f260: 8d 65 f4 lea -0xc(%ebp),%esp 10f263: 5b pop %ebx 10f264: 5e pop %esi 10f265: 5f pop %edi 10f266: c9 leave 10f267: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10f268: e8 7b 31 00 00 call 1123e8 <__errno> <== NOT EXECUTED 10f26d: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10f273: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10f278: eb e4 jmp 10f25e <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 10f27a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f27d: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10f282: e8 ed ca ff ff call 10bd74 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10f287: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f28a: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10f28f: e8 e0 ca ff ff call 10bd74 <== NOT EXECUTED =============================================================================== 001082ec : } int IMFS_fifo_close( rtems_libio_t *iop ) { 1082ec: 55 push %ebp 1082ed: 89 e5 mov %esp,%ebp 1082ef: 57 push %edi 1082f0: 56 push %esi 1082f1: 53 push %ebx 1082f2: 83 ec 14 sub $0x14,%esp 1082f5: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = iop->pathinfo.node_access; 1082f8: 8b 7b 18 mov 0x18(%ebx),%edi int err = pipe_release(&JNODE2PIPE(jnode), iop); 1082fb: 53 push %ebx 1082fc: 8d 47 50 lea 0x50(%edi),%eax 1082ff: 50 push %eax 108300: e8 0f 8e 00 00 call 111114 108305: 89 c6 mov %eax,%esi if (err == 0) { 108307: 83 c4 10 add $0x10,%esp 10830a: 83 f8 00 cmp $0x0,%eax 10830d: 74 0d je 10831c <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_OPEN; IMFS_check_node_remove(jnode); } IMFS_FIFO_RETURN(err); 10830f: 7c 28 jl 108339 <== NOT EXECUTED } 108311: 89 f0 mov %esi,%eax <== NOT EXECUTED 108313: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108316: 5b pop %ebx <== NOT EXECUTED 108317: 5e pop %esi <== NOT EXECUTED 108318: 5f pop %edi <== NOT EXECUTED 108319: c9 leave <== NOT EXECUTED 10831a: c3 ret <== NOT EXECUTED 10831b: 90 nop <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (err == 0) { iop->flags &= ~LIBIO_FLAGS_OPEN; 10831c: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) IMFS_check_node_remove(jnode); 108323: 83 ec 0c sub $0xc,%esp 108326: 57 push %edi 108327: e8 d0 05 00 00 call 1088fc 10832c: 83 c4 10 add $0x10,%esp } IMFS_FIFO_RETURN(err); } 10832f: 89 f0 mov %esi,%eax 108331: 8d 65 f4 lea -0xc(%ebp),%esp 108334: 5b pop %ebx 108335: 5e pop %esi 108336: 5f pop %edi 108337: c9 leave 108338: c3 ret if (err == 0) { iop->flags &= ~LIBIO_FLAGS_OPEN; IMFS_check_node_remove(jnode); } IMFS_FIFO_RETURN(err); 108339: e8 72 b7 00 00 call 113ab0 <__errno> <== NOT EXECUTED 10833e: f7 de neg %esi <== NOT EXECUTED 108340: 89 30 mov %esi,(%eax) <== NOT EXECUTED 108342: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108347: eb c8 jmp 108311 <== NOT EXECUTED =============================================================================== 001081bc : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1081bc: 55 push %ebp 1081bd: 89 e5 mov %esp,%ebp 1081bf: 53 push %ebx 1081c0: 83 ec 04 sub $0x4,%esp 1081c3: 8b 45 08 mov 0x8(%ebp),%eax 1081c6: 8b 55 0c mov 0xc(%ebp),%edx 1081c9: 8b 4d 10 mov 0x10(%ebp),%ecx int err; if (command == FIONBIO) { 1081cc: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx 1081d2: 74 1c je 1081f0 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 1081d4: 50 push %eax 1081d5: 51 push %ecx 1081d6: 52 push %edx 1081d7: 8b 40 18 mov 0x18(%eax),%eax 1081da: ff 70 50 pushl 0x50(%eax) 1081dd: e8 a6 97 00 00 call 111988 IMFS_FIFO_RETURN(err); 1081e2: 83 c4 10 add $0x10,%esp 1081e5: 85 c0 test %eax,%eax 1081e7: 78 3e js 108227 } 1081e9: 8b 5d fc mov -0x4(%ebp),%ebx 1081ec: c9 leave 1081ed: c3 ret 1081ee: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 1081f0: 85 c9 test %ecx,%ecx 1081f2: 74 20 je 108214 err = -EFAULT; else { if (*(int *)buffer) 1081f4: 8b 11 mov (%ecx),%edx 1081f6: 85 d2 test %edx,%edx 1081f8: 74 0e je 108208 iop->flags |= LIBIO_FLAGS_NO_DELAY; 1081fa: 83 48 14 01 orl $0x1,0x14(%eax) else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 1081fe: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 108200: 8b 5d fc mov -0x4(%ebp),%ebx 108203: c9 leave 108204: c3 ret 108205: 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; 108208: 83 60 14 fe andl $0xfffffffe,0x14(%eax) return 0; 10820c: 31 c0 xor %eax,%eax } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 10820e: 8b 5d fc mov -0x4(%ebp),%ebx 108211: c9 leave 108212: c3 ret 108213: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 108214: bb 0e 00 00 00 mov $0xe,%ebx } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 108219: e8 92 b8 00 00 call 113ab0 <__errno> 10821e: 89 18 mov %ebx,(%eax) 108220: b8 ff ff ff ff mov $0xffffffff,%eax 108225: eb c2 jmp 1081e9 108227: 89 c3 mov %eax,%ebx 108229: f7 db neg %ebx 10822b: eb ec jmp 108219 =============================================================================== 00108178 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 108178: 55 push %ebp 108179: 89 e5 mov %esp,%ebp 10817b: 53 push %ebx 10817c: 83 ec 10 sub $0x10,%esp 10817f: 8b 45 08 mov 0x8(%ebp),%eax off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 108182: 50 push %eax 108183: ff 75 14 pushl 0x14(%ebp) 108186: ff 75 10 pushl 0x10(%ebp) 108189: ff 75 0c pushl 0xc(%ebp) 10818c: 8b 40 18 mov 0x18(%eax),%eax 10818f: ff 70 50 pushl 0x50(%eax) 108192: e8 51 98 00 00 call 1119e8 108197: 89 c3 mov %eax,%ebx 108199: 99 cltd IMFS_FIFO_RETURN(err); 10819a: 83 c4 20 add $0x20,%esp 10819d: 85 d2 test %edx,%edx 10819f: 78 05 js 1081a6 <== ALWAYS TAKEN } 1081a1: 8b 5d fc mov -0x4(%ebp),%ebx 1081a4: c9 leave 1081a5: c3 ret rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 1081a6: e8 05 b9 00 00 call 113ab0 <__errno> 1081ab: f7 db neg %ebx 1081ad: 89 18 mov %ebx,(%eax) 1081af: b8 ff ff ff ff mov $0xffffffff,%eax 1081b4: ba ff ff ff ff mov $0xffffffff,%edx 1081b9: eb e6 jmp 1081a1 =============================================================================== 00108290 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 108290: 55 push %ebp 108291: 89 e5 mov %esp,%ebp 108293: 56 push %esi 108294: 53 push %ebx 108295: 83 ec 10 sub $0x10,%esp 108298: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 10829b: 8b 70 18 mov 0x18(%eax),%esi int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10829e: 50 push %eax 10829f: ff 75 10 pushl 0x10(%ebp) 1082a2: ff 75 0c pushl 0xc(%ebp) 1082a5: ff 76 50 pushl 0x50(%esi) 1082a8: e8 37 93 00 00 call 1115e4 1082ad: 89 c3 mov %eax,%ebx if (err > 0) 1082af: 83 c4 10 add $0x10,%esp 1082b2: 83 f8 00 cmp $0x0,%eax 1082b5: 7e 21 jle 1082d8 IMFS_update_atime(jnode); 1082b7: 83 ec 08 sub $0x8,%esp 1082ba: 6a 00 push $0x0 1082bc: 8d 45 f0 lea -0x10(%ebp),%eax 1082bf: 50 push %eax 1082c0: e8 3b 0e 00 00 call 109100 1082c5: 8b 45 f0 mov -0x10(%ebp),%eax 1082c8: 89 46 40 mov %eax,0x40(%esi) 1082cb: 83 c4 10 add $0x10,%esp IMFS_FIFO_RETURN(err); } 1082ce: 89 d8 mov %ebx,%eax 1082d0: 8d 65 f8 lea -0x8(%ebp),%esp 1082d3: 5b pop %ebx 1082d4: 5e pop %esi 1082d5: c9 leave 1082d6: c3 ret 1082d7: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 1082d8: 74 f4 je 1082ce 1082da: e8 d1 b7 00 00 call 113ab0 <__errno> 1082df: f7 db neg %ebx 1082e1: 89 18 mov %ebx,(%eax) 1082e3: bb ff ff ff ff mov $0xffffffff,%ebx 1082e8: eb e4 jmp 1082ce =============================================================================== 00108230 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 108230: 55 push %ebp 108231: 89 e5 mov %esp,%ebp 108233: 56 push %esi 108234: 53 push %ebx 108235: 83 ec 10 sub $0x10,%esp 108238: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 10823b: 8b 58 18 mov 0x18(%eax),%ebx int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10823e: 50 push %eax 10823f: ff 75 10 pushl 0x10(%ebp) 108242: ff 75 0c pushl 0xc(%ebp) 108245: ff 73 50 pushl 0x50(%ebx) 108248: e8 57 95 00 00 call 1117a4 10824d: 89 c6 mov %eax,%esi if (err > 0) { 10824f: 83 c4 10 add $0x10,%esp 108252: 83 f8 00 cmp $0x0,%eax 108255: 7e 25 jle 10827c IMFS_mtime_ctime_update(jnode); 108257: 83 ec 08 sub $0x8,%esp 10825a: 6a 00 push $0x0 10825c: 8d 45 f0 lea -0x10(%ebp),%eax 10825f: 50 push %eax 108260: e8 9b 0e 00 00 call 109100 108265: 8b 45 f0 mov -0x10(%ebp),%eax 108268: 89 43 44 mov %eax,0x44(%ebx) 10826b: 89 43 48 mov %eax,0x48(%ebx) 10826e: 83 c4 10 add $0x10,%esp } IMFS_FIFO_RETURN(err); } 108271: 89 f0 mov %esi,%eax 108273: 8d 65 f8 lea -0x8(%ebp),%esp 108276: 5b pop %ebx 108277: 5e pop %esi 108278: c9 leave 108279: c3 ret 10827a: 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); 10827c: 74 f3 je 108271 <== NEVER TAKEN 10827e: e8 2d b8 00 00 call 113ab0 <__errno> 108283: f7 de neg %esi 108285: 89 30 mov %esi,(%eax) 108287: be ff ff ff ff mov $0xffffffff,%esi 10828c: eb e3 jmp 108271 =============================================================================== 0010f6a8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10f6a8: 55 push %ebp 10f6a9: 89 e5 mov %esp,%ebp 10f6ab: 57 push %edi 10f6ac: 56 push %esi 10f6ad: 53 push %ebx 10f6ae: 83 ec 0c sub $0xc,%esp 10f6b1: 8b 45 08 mov 0x8(%ebp),%eax 10f6b4: 8b 5d 0c mov 0xc(%ebp),%ebx #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) 10f6b7: 85 db test %ebx,%ebx 10f6b9: 75 0d jne 10f6c8 <== ALWAYS TAKEN if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 10f6bb: 31 c0 xor %eax,%eax } 10f6bd: 8d 65 f4 lea -0xc(%ebp),%esp 10f6c0: 5b pop %ebx 10f6c1: 5e pop %esi 10f6c2: 5f pop %edi 10f6c3: c9 leave 10f6c4: c3 ret 10f6c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED assert( name ); #endif if ( !name ) return 0; if ( !directory ) 10f6c8: 85 c0 test %eax,%eax 10f6ca: 74 f1 je 10f6bd <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10f6cc: bf 10 02 12 00 mov $0x120210,%edi 10f6d1: b9 02 00 00 00 mov $0x2,%ecx 10f6d6: 89 de mov %ebx,%esi 10f6d8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f6da: 74 e1 je 10f6bd <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10f6dc: bf 12 02 12 00 mov $0x120212,%edi 10f6e1: b9 03 00 00 00 mov $0x3,%ecx 10f6e6: 89 de mov %ebx,%esi 10f6e8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f6ea: 75 0c jne 10f6f8 <== ALWAYS TAKEN return directory->Parent; 10f6ec: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10f6ef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f6f2: 5b pop %ebx <== NOT EXECUTED 10f6f3: 5e pop %esi <== NOT EXECUTED 10f6f4: 5f pop %edi <== NOT EXECUTED 10f6f5: c9 leave <== NOT EXECUTED 10f6f6: c3 ret <== NOT EXECUTED 10f6f7: 90 nop <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f6f8: 8b 70 50 mov 0x50(%eax),%esi 10f6fb: 8d 78 54 lea 0x54(%eax),%edi 10f6fe: 39 fe cmp %edi,%esi 10f700: 75 08 jne 10f70a 10f702: eb b7 jmp 10f6bb !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10f704: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10f706: 39 fe cmp %edi,%esi 10f708: 74 b1 je 10f6bb !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 ) ) 10f70a: 8d 46 0c lea 0xc(%esi),%eax 10f70d: 83 ec 08 sub $0x8,%esp 10f710: 50 push %eax 10f711: 53 push %ebx 10f712: e8 41 38 00 00 call 112f58 10f717: 83 c4 10 add $0x10,%esp 10f71a: 85 c0 test %eax,%eax 10f71c: 75 e6 jne 10f704 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; 10f71e: 89 f0 mov %esi,%eax 10f720: eb 9b jmp 10f6bd =============================================================================== 0010f60c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10f60c: 55 push %ebp 10f60d: 89 e5 mov %esp,%ebp 10f60f: 57 push %edi 10f610: 56 push %esi 10f611: 53 push %ebx 10f612: 83 ec 3c sub $0x3c,%esp 10f615: 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; 10f618: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10f61b: 8d 55 d4 lea -0x2c(%ebp),%edx 10f61e: 89 55 c4 mov %edx,-0x3c(%ebp) 10f621: 8d 70 1c lea 0x1c(%eax),%esi 10f624: b9 05 00 00 00 mov $0x5,%ecx 10f629: 89 d7 mov %edx,%edi 10f62b: 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; 10f62d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 10f634: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 10f637: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10f63a: 83 ec 0c sub $0xc,%esp 10f63d: 8d 45 d4 lea -0x2c(%ebp),%eax 10f640: 50 push %eax 10f641: e8 76 f8 ff ff call 10eebc if ( jnode->type != IMFS_DIRECTORY ) { 10f646: 83 c4 10 add $0x10,%esp 10f649: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f64d: 75 2d jne 10f67c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f64f: 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 ) ) { 10f652: 39 43 50 cmp %eax,0x50(%ebx) 10f655: 74 3e je 10f695 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 10f657: 85 db test %ebx,%ebx 10f659: 74 15 je 10f670 if ( jnode->type == IMFS_DIRECTORY ) { 10f65b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10f65f: 75 d3 jne 10f634 <== NEVER TAKEN 10f661: 8d 43 54 lea 0x54(%ebx),%eax if ( jnode_has_children( jnode ) ) 10f664: 39 43 50 cmp %eax,0x50(%ebx) 10f667: 74 cb je 10f634 jnode = jnode_get_first_child( jnode ); 10f669: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10f66c: 85 db test %ebx,%ebx 10f66e: 75 c4 jne 10f634 <== ALWAYS TAKEN return 0; 10f670: 31 c0 xor %eax,%eax } 10f672: 8d 65 f4 lea -0xc(%ebp),%esp 10f675: 5b pop %ebx 10f676: 5e pop %esi 10f677: 5f pop %edi 10f678: c9 leave 10f679: c3 ret 10f67a: 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 ); 10f67c: 83 ec 08 sub $0x8,%esp 10f67f: 8d 55 d4 lea -0x2c(%ebp),%edx 10f682: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f683: 6a 00 push $0x0 10f685: e8 92 84 ff ff call 107b1c if (result != 0) 10f68a: 83 c4 10 add $0x10,%esp 10f68d: 85 c0 test %eax,%eax 10f68f: 75 0d jne 10f69e <== NEVER TAKEN return -1; jnode = next; 10f691: 89 f3 mov %esi,%ebx 10f693: eb c2 jmp 10f657 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10f695: 83 ec 08 sub $0x8,%esp 10f698: 8d 45 d4 lea -0x2c(%ebp),%eax 10f69b: 50 push %eax 10f69c: eb e5 jmp 10f683 if (result != 0) return -1; 10f69e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f6a3: eb cd jmp 10f672 <== NOT EXECUTED =============================================================================== 0010f724 : const char *path, int pathlen, char *token, int *token_len ) { 10f724: 55 push %ebp 10f725: 89 e5 mov %esp,%ebp 10f727: 57 push %edi 10f728: 56 push %esi 10f729: 53 push %ebx 10f72a: 83 ec 1c sub $0x1c,%esp 10f72d: 8b 7d 08 mov 0x8(%ebp),%edi 10f730: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10f733: 8a 17 mov (%edi),%dl int pathlen, char *token, int *token_len ) { register int i = 0; 10f735: 31 f6 xor %esi,%esi 10f737: 89 7d e4 mov %edi,-0x1c(%ebp) 10f73a: 89 df mov %ebx,%edi 10f73c: 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) ) { 10f73e: eb 07 jmp 10f747 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10f740: 46 inc %esi 10f741: 8b 45 e4 mov -0x1c(%ebp),%eax 10f744: 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) ) { 10f747: 83 ec 0c sub $0xc,%esp 10f74a: 0f be c3 movsbl %bl,%eax 10f74d: 50 push %eax 10f74e: e8 51 97 ff ff call 108ea4 10f753: 83 c4 10 add $0x10,%esp 10f756: 85 c0 test %eax,%eax 10f758: 75 1a jne 10f774 10f75a: 3b 75 0c cmp 0xc(%ebp),%esi 10f75d: 7d 15 jge 10f774 token[i] = c; 10f75f: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 10f762: 83 fe 20 cmp $0x20,%esi 10f765: 75 d9 jne 10f740 return IMFS_INVALID_TOKEN; 10f767: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f76c: 8d 65 f4 lea -0xc(%ebp),%esp 10f76f: 5b pop %ebx 10f770: 5e pop %esi 10f771: 5f pop %edi 10f772: c9 leave 10f773: c3 ret 10f774: 88 da mov %bl,%dl 10f776: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 10f778: 85 f6 test %esi,%esi 10f77a: 75 25 jne 10f7a1 token[i] = c; 10f77c: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 10f77e: 84 d2 test %dl,%dl 10f780: 74 16 je 10f798 10f782: 8b 45 0c mov 0xc(%ebp),%eax 10f785: 85 c0 test %eax,%eax 10f787: 74 0f je 10f798 i++; type = IMFS_CURRENT_DIR; 10f789: b8 01 00 00 00 mov $0x1,%eax if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 10f78e: be 01 00 00 00 mov $0x1,%esi 10f793: eb 05 jmp 10f79a 10f795: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 10f798: 31 c0 xor %eax,%eax /* * Set token_len to the number of characters copied. */ *token_len = i; 10f79a: 8b 55 14 mov 0x14(%ebp),%edx 10f79d: 89 32 mov %esi,(%edx) 10f79f: eb cb jmp 10f76c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10f7a1: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 10f7a6: 74 04 je 10f7ac <== NEVER TAKEN token[i] = '\0'; 10f7a8: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10f7ac: 8b 45 14 mov 0x14(%ebp),%eax 10f7af: 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 ) 10f7b1: bf 15 02 12 00 mov $0x120215,%edi 10f7b6: b9 03 00 00 00 mov $0x3,%ecx 10f7bb: 89 de mov %ebx,%esi 10f7bd: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f7bf: 75 0f jne 10f7d0 type = IMFS_UP_DIR; 10f7c1: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 10f7c6: 8d 65 f4 lea -0xc(%ebp),%esp 10f7c9: 5b pop %ebx 10f7ca: 5e pop %esi 10f7cb: 5f pop %edi 10f7cc: c9 leave 10f7cd: c3 ret 10f7ce: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10f7d0: bf 16 02 12 00 mov $0x120216,%edi 10f7d5: b9 02 00 00 00 mov $0x2,%ecx 10f7da: 89 de mov %ebx,%esi 10f7dc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10f7de: 0f 97 c0 seta %al 10f7e1: 0f 92 c2 setb %dl 10f7e4: 28 d0 sub %dl,%al 10f7e6: 0f be c0 movsbl %al,%eax 10f7e9: 83 f8 01 cmp $0x1,%eax 10f7ec: 19 c0 sbb %eax,%eax 10f7ee: 83 e0 fe and $0xfffffffe,%eax 10f7f1: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 10f7f4: 8d 65 f4 lea -0xc(%ebp),%esp 10f7f7: 5b pop %ebx 10f7f8: 5e pop %esi 10f7f9: 5f pop %edi 10f7fa: c9 leave 10f7fb: c3 ret =============================================================================== 00107744 : 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 ) { 107744: 55 push %ebp 107745: 89 e5 mov %esp,%ebp 107747: 57 push %edi 107748: 56 push %esi 107749: 53 push %ebx 10774a: 83 ec 1c sub $0x1c,%esp 10774d: 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, 107750: 8b 0d f0 21 12 00 mov 0x1221f0,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107756: 83 f9 10 cmp $0x10,%ecx 107759: 74 18 je 107773 10775b: ba 05 00 00 00 mov $0x5,%edx 107760: b8 20 00 00 00 mov $0x20,%eax 107765: 39 c1 cmp %eax,%ecx 107767: 74 0a je 107773 107769: d1 e0 shl %eax 10776b: 4a dec %edx 10776c: 75 f7 jne 107765 <== ALWAYS TAKEN is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 10776e: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 107773: 89 0d 20 5f 12 00 mov %ecx,0x125f20 /* * 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(); 107779: e8 0a 77 00 00 call 10ee88 10777e: 89 c2 mov %eax,%edx 107780: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 107783: 8b 45 14 mov 0x14(%ebp),%eax 107786: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107789: 8b 45 0c mov 0xc(%ebp),%eax 10778c: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 10778f: 8d 7b 38 lea 0x38(%ebx),%edi 107792: be a0 01 12 00 mov $0x1201a0,%esi 107797: b9 0c 00 00 00 mov $0xc,%ecx 10779c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 10779e: 83 ec 08 sub $0x8,%esp 1077a1: 6a 14 push $0x14 1077a3: 6a 01 push $0x1 1077a5: 89 55 e4 mov %edx,-0x1c(%ebp) 1077a8: e8 97 06 00 00 call 107e44 if ( !fs_info ) { 1077ad: 83 c4 10 add $0x10,%esp 1077b0: 85 c0 test %eax,%eax 1077b2: 8b 55 e4 mov -0x1c(%ebp),%edx 1077b5: 74 3c je 1077f3 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 1077b7: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1077ba: 8b 0d 24 5f 12 00 mov 0x125f24,%ecx 1077c0: 89 08 mov %ecx,(%eax) 1077c2: 41 inc %ecx 1077c3: 89 0d 24 5f 12 00 mov %ecx,0x125f24 fs_info->ino_count = 1; 1077c9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 1077d0: 8b 4d 10 mov 0x10(%ebp),%ecx 1077d3: 89 48 08 mov %ecx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 1077d6: 8b 4d 14 mov 0x14(%ebp),%ecx 1077d9: 89 48 0c mov %ecx,0xc(%eax) fs_info->fifo_handlers = fifo_handlers; 1077dc: 8b 4d 18 mov 0x18(%ebp),%ecx 1077df: 89 48 10 mov %ecx,0x10(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 1077e2: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) return 0; 1077e9: 31 c0 xor %eax,%eax } 1077eb: 8d 65 f4 lea -0xc(%ebp),%esp 1077ee: 5b pop %ebx 1077ef: 5e pop %esi 1077f0: 5f pop %edi 1077f1: c9 leave 1077f2: 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); 1077f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1077f6: 52 push %edx <== NOT EXECUTED 1077f7: e8 34 08 00 00 call 108030 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 1077fc: e8 e7 ab 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107801: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107807: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10780a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10780d: eb dc jmp 1077eb <== NOT EXECUTED =============================================================================== 00107810 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107810: 55 push %ebp 107811: 89 e5 mov %esp,%ebp 107813: 57 push %edi 107814: 53 push %ebx 107815: 83 ec 50 sub $0x50,%esp 107818: 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; 10781b: 8b 45 08 mov 0x8(%ebp),%eax 10781e: 8b 00 mov (%eax),%eax 107820: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107823: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107828: 77 66 ja 107890 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 ); 10782a: 31 c0 xor %eax,%eax 10782c: b9 ff ff ff ff mov $0xffffffff,%ecx 107831: 89 d7 mov %edx,%edi 107833: f2 ae repnz scas %es:(%edi),%al 107835: f7 d1 not %ecx 107837: 49 dec %ecx 107838: 8d 45 f4 lea -0xc(%ebp),%eax 10783b: 50 push %eax 10783c: 8d 5d b7 lea -0x49(%ebp),%ebx 10783f: 53 push %ebx 107840: 51 push %ecx 107841: 52 push %edx 107842: e8 dd 7e 00 00 call 10f724 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 107847: 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( 10784a: 89 04 24 mov %eax,(%esp) 10784d: 68 ff a1 00 00 push $0xa1ff 107852: 53 push %ebx 107853: 6a 03 push $0x3 107855: ff 75 0c pushl 0xc(%ebp) 107858: e8 1b 75 00 00 call 10ed78 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 10785d: 83 c4 20 add $0x20,%esp 107860: 85 c0 test %eax,%eax 107862: 74 3e je 1078a2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107864: 8b 45 d8 mov -0x28(%ebp),%eax 107867: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 10786b: 83 ec 08 sub $0x8,%esp 10786e: 6a 00 push $0x0 107870: 8d 45 ec lea -0x14(%ebp),%eax 107873: 50 push %eax 107874: e8 33 08 00 00 call 1080ac 107879: 8b 55 ec mov -0x14(%ebp),%edx 10787c: 8b 45 d8 mov -0x28(%ebp),%eax 10787f: 89 50 48 mov %edx,0x48(%eax) return 0; 107882: 83 c4 10 add $0x10,%esp 107885: 31 c0 xor %eax,%eax } 107887: 8d 65 f8 lea -0x8(%ebp),%esp 10788a: 5b pop %ebx 10788b: 5f pop %edi 10788c: c9 leave 10788d: c3 ret 10788e: 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 ); 107890: e8 53 ab 00 00 call 1123e8 <__errno> 107895: c7 00 1f 00 00 00 movl $0x1f,(%eax) 10789b: b8 ff ff ff ff mov $0xffffffff,%eax 1078a0: eb e5 jmp 107887 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 1078a2: e8 41 ab 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1078a7: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1078ad: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1078b2: eb d3 jmp 107887 <== NOT EXECUTED =============================================================================== 00111220 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 111220: 55 push %ebp 111221: 89 e5 mov %esp,%ebp 111223: 53 push %ebx 111224: 83 ec 08 sub $0x8,%esp #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 111227: 6a 01 push $0x1 111229: ff 75 0c pushl 0xc(%ebp) 11122c: ff 75 08 pushl 0x8(%ebp) 11122f: e8 ec fb ff ff call 110e20 111234: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 111236: 83 c4 10 add $0x10,%esp 111239: 8b 08 mov (%eax),%ecx 11123b: 85 c9 test %ecx,%ecx 11123d: 74 09 je 111248 return 0; 11123f: 31 c0 xor %eax,%eax if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 111241: 8b 5d fc mov -0x4(%ebp),%ebx 111244: c9 leave 111245: c3 ret 111246: 66 90 xchg %ax,%ax <== NOT EXECUTED #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 111248: e8 af fb ff ff call 110dfc if ( !memory ) 11124d: 85 c0 test %eax,%eax 11124f: 74 07 je 111258 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 111251: 89 03 mov %eax,(%ebx) return 0; 111253: 31 c0 xor %eax,%eax 111255: eb ea jmp 111241 111257: 90 nop <== NOT EXECUTED fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) return 1; 111258: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 11125d: eb e2 jmp 111241 <== NOT EXECUTED =============================================================================== 00111474 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 111474: 55 push %ebp 111475: 89 e5 mov %esp,%ebp 111477: 57 push %edi 111478: 56 push %esi 111479: 53 push %ebx 11147a: 83 ec 2c sub $0x2c,%esp 11147d: 8b 5d 08 mov 0x8(%ebp),%ebx 111480: 8b 45 0c mov 0xc(%ebp),%eax 111483: 8b 55 10 mov 0x10(%ebp),%edx 111486: 89 45 d8 mov %eax,-0x28(%ebp) 111489: 89 55 dc mov %edx,-0x24(%ebp) #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 11148c: a1 20 5f 12 00 mov 0x125f20,%eax 111491: 89 c1 mov %eax,%ecx 111493: c1 e9 02 shr $0x2,%ecx 111496: 8d 51 01 lea 0x1(%ecx),%edx 111499: 0f af d1 imul %ecx,%edx 11149c: 42 inc %edx 11149d: 0f af d1 imul %ecx,%edx 1114a0: 4a dec %edx 1114a1: 0f af d0 imul %eax,%edx 1114a4: 31 c9 xor %ecx,%ecx 1114a6: 3b 4d dc cmp -0x24(%ebp),%ecx 1114a9: 7f 1a jg 1114c5 <== NEVER TAKEN 1114ab: 7d 13 jge 1114c0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1114ad: e8 36 0f 00 00 call 1123e8 <__errno> 1114b2: c7 00 16 00 00 00 movl $0x16,(%eax) 1114b8: b8 ff ff ff ff mov $0xffffffff,%eax 1114bd: eb 19 jmp 1114d8 1114bf: 90 nop <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 1114c0: 3b 55 d8 cmp -0x28(%ebp),%edx 1114c3: 76 e8 jbe 1114ad rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 1114c5: 8b 53 50 mov 0x50(%ebx),%edx 1114c8: 8b 4b 54 mov 0x54(%ebx),%ecx 1114cb: 89 55 e0 mov %edx,-0x20(%ebp) 1114ce: 89 4d e4 mov %ecx,-0x1c(%ebp) 1114d1: 39 4d dc cmp %ecx,-0x24(%ebp) 1114d4: 7d 0a jge 1114e0 <== ALWAYS TAKEN return 0; 1114d6: 31 c0 xor %eax,%eax * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 1114d8: 8d 65 f4 lea -0xc(%ebp),%esp 1114db: 5b pop %ebx 1114dc: 5e pop %esi 1114dd: 5f pop %edi 1114de: c9 leave 1114df: c3 ret #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 1114e0: 7f 05 jg 1114e7 <== NEVER TAKEN 1114e2: 39 55 d8 cmp %edx,-0x28(%ebp) 1114e5: 76 ef jbe 1114d6 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 1114e7: 89 45 d0 mov %eax,-0x30(%ebp) 1114ea: 89 c1 mov %eax,%ecx 1114ec: c1 f9 1f sar $0x1f,%ecx 1114ef: 89 4d d4 mov %ecx,-0x2c(%ebp) 1114f2: ff 75 d4 pushl -0x2c(%ebp) 1114f5: ff 75 d0 pushl -0x30(%ebp) 1114f8: ff 75 dc pushl -0x24(%ebp) 1114fb: ff 75 d8 pushl -0x28(%ebp) 1114fe: e8 15 c0 00 00 call 11d518 <__divdi3> 111503: 83 c4 10 add $0x10,%esp 111506: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 111508: ff 75 d4 pushl -0x2c(%ebp) 11150b: ff 75 d0 pushl -0x30(%ebp) 11150e: ff 75 e4 pushl -0x1c(%ebp) 111511: ff 75 e0 pushl -0x20(%ebp) 111514: e8 ff bf 00 00 call 11d518 <__divdi3> 111519: 83 c4 10 add $0x10,%esp 11151c: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 11151f: 39 c6 cmp %eax,%esi 111521: 72 51 jb 111574 <== NEVER TAKEN 111523: 89 c7 mov %eax,%edi 111525: eb 06 jmp 11152d 111527: 90 nop <== NOT EXECUTED 111528: 47 inc %edi 111529: 39 fe cmp %edi,%esi 11152b: 72 47 jb 111574 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 11152d: 83 ec 08 sub $0x8,%esp 111530: 57 push %edi 111531: 53 push %ebx 111532: e8 e9 fc ff ff call 111220 111537: 83 c4 10 add $0x10,%esp 11153a: 85 c0 test %eax,%eax 11153c: 74 ea je 111528 <== ALWAYS TAKEN for ( ; block>=old_blocks ; block-- ) { 11153e: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 111541: 77 17 ja 11155a <== NOT EXECUTED 111543: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 111546: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 111548: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11154b: 57 push %edi <== NOT EXECUTED 11154c: 53 push %ebx <== NOT EXECUTED 11154d: e8 ea fe ff ff call 11143c <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 111552: 4f dec %edi <== NOT EXECUTED 111553: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111556: 39 fe cmp %edi,%esi <== NOT EXECUTED 111558: 76 ee jbe 111548 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 11155a: e8 89 0e 00 00 call 1123e8 <__errno> <== NOT EXECUTED 11155f: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 111565: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 11156a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11156d: 5b pop %ebx <== NOT EXECUTED 11156e: 5e pop %esi <== NOT EXECUTED 11156f: 5f pop %edi <== NOT EXECUTED 111570: c9 leave <== NOT EXECUTED 111571: c3 ret <== NOT EXECUTED 111572: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 111574: 8b 45 d8 mov -0x28(%ebp),%eax 111577: 8b 55 dc mov -0x24(%ebp),%edx 11157a: 89 43 50 mov %eax,0x50(%ebx) 11157d: 89 53 54 mov %edx,0x54(%ebx) return 0; 111580: 31 c0 xor %eax,%eax } 111582: 8d 65 f4 lea -0xc(%ebp),%esp 111585: 5b pop %ebx 111586: 5e pop %esi 111587: 5f pop %edi 111588: c9 leave 111589: c3 ret =============================================================================== 00110e20 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 110e20: 55 push %ebp 110e21: 89 e5 mov %esp,%ebp 110e23: 57 push %edi 110e24: 56 push %esi 110e25: 53 push %ebx 110e26: 83 ec 1c sub $0x1c,%esp 110e29: 8b 5d 08 mov 0x8(%ebp),%ebx 110e2c: 8b 75 0c mov 0xc(%ebp),%esi 110e2f: 8b 7d 10 mov 0x10(%ebp),%edi /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 110e32: 8b 0d 20 5f 12 00 mov 0x125f20,%ecx 110e38: c1 e9 02 shr $0x2,%ecx 110e3b: 8d 41 ff lea -0x1(%ecx),%eax 110e3e: 39 c6 cmp %eax,%esi 110e40: 77 1a ja 110e5c p = info->indirect; 110e42: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 110e45: 85 ff test %edi,%edi 110e47: 74 53 je 110e9c if ( !p ) { 110e49: 85 c0 test %eax,%eax 110e4b: 0f 84 b6 00 00 00 je 110f07 } if ( !p ) return 0; return &info->indirect[ my_block ]; 110e51: 8d 04 b0 lea (%eax,%esi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 110e54: 83 c4 1c add $0x1c,%esp 110e57: 5b pop %ebx 110e58: 5e pop %esi 110e59: 5f pop %edi 110e5a: c9 leave 110e5b: c3 ret /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 110e5c: 8d 41 01 lea 0x1(%ecx),%eax 110e5f: 0f af c1 imul %ecx,%eax 110e62: 8d 50 ff lea -0x1(%eax),%edx 110e65: 39 d6 cmp %edx,%esi 110e67: 77 3b ja 110ea4 #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 110e69: 29 ce sub %ecx,%esi singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110e6b: 89 f0 mov %esi,%eax 110e6d: 31 d2 xor %edx,%edx 110e6f: f7 f1 div %ecx 110e71: 89 c6 mov %eax,%esi doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 110e73: 8b 43 5c mov 0x5c(%ebx),%eax if ( malloc_it ) { 110e76: 85 ff test %edi,%edi 110e78: 74 7e je 110ef8 if ( !p ) { 110e7a: 85 c0 test %eax,%eax 110e7c: 0f 84 96 00 00 00 je 110f18 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 110e82: 8d 1c b0 lea (%eax,%esi,4),%ebx 110e85: 8b 03 mov (%ebx),%eax if ( !p1 ) { 110e87: 85 c0 test %eax,%eax 110e89: 0f 84 a4 00 00 00 je 110f33 #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 110e8f: 8d 04 90 lea (%eax,%edx,4),%eax /* * This means the requested block number is out of range. */ return 0; } 110e92: 83 c4 1c add $0x1c,%esp 110e95: 5b pop %ebx 110e96: 5e pop %esi 110e97: 5f pop %edi 110e98: c9 leave 110e99: c3 ret 110e9a: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 110e9c: 85 c0 test %eax,%eax 110e9e: 75 b1 jne 110e51 <== ALWAYS TAKEN fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 110ea0: 31 c0 xor %eax,%eax <== NOT EXECUTED 110ea2: eb ee jmp 110e92 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 110ea4: 8d 50 01 lea 0x1(%eax),%edx 110ea7: 0f af d1 imul %ecx,%edx 110eaa: 4a dec %edx 110eab: 39 d6 cmp %edx,%esi 110ead: 77 f1 ja 110ea0 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 110eaf: 29 c6 sub %eax,%esi 110eb1: 89 f0 mov %esi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 110eb3: 31 d2 xor %edx,%edx 110eb5: f7 f1 div %ecx 110eb7: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 110eba: 31 d2 xor %edx,%edx 110ebc: f7 f1 div %ecx 110ebe: 89 c6 mov %eax,%esi doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 110ec0: 8b 4b 60 mov 0x60(%ebx),%ecx if ( malloc_it ) { 110ec3: 85 ff test %edi,%edi 110ec5: 0f 84 82 00 00 00 je 110f4d if ( !p ) { 110ecb: 85 c9 test %ecx,%ecx 110ecd: 0f 84 9f 00 00 00 je 110f72 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 110ed3: 8d 1c b1 lea (%ecx,%esi,4),%ebx 110ed6: 8b 0b mov (%ebx),%ecx if ( !p1 ) { 110ed8: 85 c9 test %ecx,%ecx 110eda: 0f 84 c9 00 00 00 je 110fa9 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 110ee0: 8d 1c 91 lea (%ecx,%edx,4),%ebx 110ee3: 8b 13 mov (%ebx),%edx if ( !p2 ) { 110ee5: 85 d2 test %edx,%edx 110ee7: 0f 84 a4 00 00 00 je 110f91 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 110eed: 8b 4d e4 mov -0x1c(%ebp),%ecx 110ef0: 8d 04 8a lea (%edx,%ecx,4),%eax 110ef3: eb 9d jmp 110e92 110ef5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 110ef8: 85 c0 test %eax,%eax 110efa: 74 a4 je 110ea0 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 110efc: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !p ) 110eff: 85 c0 test %eax,%eax 110f01: 75 8c jne 110e8f <== ALWAYS TAKEN fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; 110f03: 31 c0 xor %eax,%eax <== NOT EXECUTED 110f05: eb 8b jmp 110e92 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110f07: e8 f0 fe ff ff call 110dfc if ( !p ) 110f0c: 85 c0 test %eax,%eax 110f0e: 74 90 je 110ea0 <== NEVER TAKEN return 0; info->indirect = p; 110f10: 89 43 58 mov %eax,0x58(%ebx) 110f13: e9 39 ff ff ff jmp 110e51 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110f18: 89 55 e0 mov %edx,-0x20(%ebp) 110f1b: e8 dc fe ff ff call 110dfc if ( !p ) 110f20: 85 c0 test %eax,%eax 110f22: 8b 55 e0 mov -0x20(%ebp),%edx 110f25: 0f 84 75 ff ff ff je 110ea0 <== NEVER TAKEN return 0; info->doubly_indirect = p; 110f2b: 89 43 5c mov %eax,0x5c(%ebx) 110f2e: e9 4f ff ff ff jmp 110e82 } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 110f33: 89 55 e0 mov %edx,-0x20(%ebp) 110f36: e8 c1 fe ff ff call 110dfc if ( !p1 ) 110f3b: 85 c0 test %eax,%eax 110f3d: 8b 55 e0 mov -0x20(%ebp),%edx 110f40: 0f 84 5a ff ff ff je 110ea0 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 110f46: 89 03 mov %eax,(%ebx) 110f48: e9 42 ff ff ff jmp 110e8f p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 110f4d: 85 c9 test %ecx,%ecx 110f4f: 0f 84 4b ff ff ff je 110ea0 <== NEVER TAKEN #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 110f55: 8b 0c 81 mov (%ecx,%eax,4),%ecx if ( !p1 ) 110f58: 85 c9 test %ecx,%ecx 110f5a: 0f 84 40 ff ff ff je 110ea0 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 110f60: 8b 5d e4 mov -0x1c(%ebp),%ebx 110f63: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax 110f6a: 03 04 91 add (%ecx,%edx,4),%eax 110f6d: e9 20 ff ff ff jmp 110e92 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 110f72: 89 55 e0 mov %edx,-0x20(%ebp) 110f75: e8 82 fe ff ff call 110dfc 110f7a: 89 c1 mov %eax,%ecx if ( !p ) return 0; 110f7c: 31 c0 xor %eax,%eax p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 110f7e: 85 c9 test %ecx,%ecx 110f80: 8b 55 e0 mov -0x20(%ebp),%edx 110f83: 0f 84 09 ff ff ff je 110e92 <== NEVER TAKEN return 0; info->triply_indirect = p; 110f89: 89 4b 60 mov %ecx,0x60(%ebx) 110f8c: e9 42 ff ff ff jmp 110ed3 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 110f91: e8 66 fe ff ff call 110dfc 110f96: 89 c2 mov %eax,%edx if ( !p2 ) return 0; 110f98: 31 c0 xor %eax,%eax } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 110f9a: 85 d2 test %edx,%edx 110f9c: 0f 84 f0 fe ff ff je 110e92 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 110fa2: 89 13 mov %edx,(%ebx) 110fa4: e9 44 ff ff ff jmp 110eed info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 110fa9: 89 55 e0 mov %edx,-0x20(%ebp) 110fac: e8 4b fe ff ff call 110dfc 110fb1: 89 c1 mov %eax,%ecx if ( !p1 ) return 0; 110fb3: 31 c0 xor %eax,%eax } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 110fb5: 85 c9 test %ecx,%ecx 110fb7: 8b 55 e0 mov -0x20(%ebp),%edx 110fba: 0f 84 d2 fe ff ff je 110e92 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 110fc0: 89 0b mov %ecx,(%ebx) 110fc2: e9 19 ff ff ff jmp 110ee0 =============================================================================== 00110fc8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 110fc8: 55 push %ebp 110fc9: 89 e5 mov %esp,%ebp 110fcb: 57 push %edi 110fcc: 56 push %esi 110fcd: 53 push %ebx 110fce: 83 ec 4c sub $0x4c,%esp 110fd1: 8b 75 0c mov 0xc(%ebp),%esi 110fd4: 8b 7d 10 mov 0x10(%ebp),%edi 110fd7: 8b 45 18 mov 0x18(%ebp),%eax /* * Error checks on arguments */ if ( !dest ) 110fda: 8b 55 14 mov 0x14(%ebp),%edx 110fdd: 85 d2 test %edx,%edx 110fdf: 0f 84 06 02 00 00 je 1111eb <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 110fe5: 85 c0 test %eax,%eax 110fe7: 0f 84 fe 01 00 00 je 1111eb <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 110fed: 8b 55 08 mov 0x8(%ebp),%edx 110ff0: 83 7a 4c 06 cmpl $0x6,0x4c(%edx) 110ff4: 0f 84 62 01 00 00 je 11115c /* * 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; 110ffa: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 110ffc: 8b 4d 08 mov 0x8(%ebp),%ecx 110fff: 8b 49 50 mov 0x50(%ecx),%ecx 111002: 89 4d cc mov %ecx,-0x34(%ebp) /* * 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; 111005: 8d 1c 30 lea (%eax,%esi,1),%ebx 111008: 89 5d d0 mov %ebx,-0x30(%ebp) if ( last_byte > the_jnode->info.file.size ) 11100b: 31 c9 xor %ecx,%ecx 11100d: 8b 5d 08 mov 0x8(%ebp),%ebx 111010: 3b 4b 54 cmp 0x54(%ebx),%ecx 111013: 0f 8d cf 00 00 00 jge 1110e8 <== ALWAYS TAKEN 111019: 89 45 cc mov %eax,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 11101c: a1 20 5f 12 00 mov 0x125f20,%eax 111021: 89 45 d0 mov %eax,-0x30(%ebp) 111024: 99 cltd 111025: 89 d3 mov %edx,%ebx 111027: 52 push %edx 111028: 50 push %eax 111029: 57 push %edi 11102a: 56 push %esi 11102b: 89 45 c0 mov %eax,-0x40(%ebp) 11102e: e8 45 c6 00 00 call 11d678 <__moddi3> 111033: 83 c4 10 add $0x10,%esp 111036: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 111039: 8b 4d c0 mov -0x40(%ebp),%ecx 11103c: 53 push %ebx 11103d: 51 push %ecx 11103e: 57 push %edi 11103f: 56 push %esi 111040: e8 d3 c4 00 00 call 11d518 <__divdi3> 111045: 83 c4 10 add $0x10,%esp 111048: 89 c3 mov %eax,%ebx if ( start_offset ) { 11104a: 8b 7d c8 mov -0x38(%ebp),%edi 11104d: 85 ff test %edi,%edi 11104f: 0f 84 a7 00 00 00 je 1110fc 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 ); 111055: 56 push %esi 111056: 6a 00 push $0x0 111058: 50 push %eax 111059: ff 75 08 pushl 0x8(%ebp) 11105c: e8 bf fd ff ff call 110e20 if ( !block_ptr ) 111061: 83 c4 10 add $0x10,%esp 111064: 85 c0 test %eax,%eax 111066: 0f 84 78 01 00 00 je 1111e4 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11106c: 8b 4d d0 mov -0x30(%ebp),%ecx 11106f: 2b 4d c8 sub -0x38(%ebp),%ecx 111072: 8b 55 cc mov -0x34(%ebp),%edx 111075: 39 ca cmp %ecx,%edx 111077: 0f 87 4f 01 00 00 ja 1111cc 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 ); 11107d: 8b 75 c8 mov -0x38(%ebp),%esi 111080: 03 30 add (%eax),%esi dest += to_copy; 111082: 8b 7d 14 mov 0x14(%ebp),%edi 111085: 89 d1 mov %edx,%ecx 111087: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111089: 89 7d c8 mov %edi,-0x38(%ebp) block++; 11108c: 43 inc %ebx my_length -= to_copy; 11108d: 29 55 cc sub %edx,-0x34(%ebp) 111090: a1 20 5f 12 00 mov 0x125f20,%eax 111095: 89 45 d0 mov %eax,-0x30(%ebp) copied += to_copy; 111098: 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 ) { 11109b: 8b 4d d0 mov -0x30(%ebp),%ecx 11109e: 39 4d cc cmp %ecx,-0x34(%ebp) 1110a1: 73 27 jae 1110ca 1110a3: eb 67 jmp 11110c 1110a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 1110a8: 8b 30 mov (%eax),%esi 1110aa: 8b 7d c8 mov -0x38(%ebp),%edi 1110ad: 8b 4d d0 mov -0x30(%ebp),%ecx 1110b0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 1110b2: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1110b5: 43 inc %ebx my_length -= to_copy; 1110b6: 8b 7d d0 mov -0x30(%ebp),%edi 1110b9: 29 7d cc sub %edi,-0x34(%ebp) copied += to_copy; 1110bc: 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 ) { 1110bf: 8b 45 cc mov -0x34(%ebp),%eax 1110c2: 39 05 20 5f 12 00 cmp %eax,0x125f20 1110c8: 77 42 ja 11110c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1110ca: 51 push %ecx 1110cb: 6a 00 push $0x0 1110cd: 53 push %ebx 1110ce: ff 75 08 pushl 0x8(%ebp) 1110d1: e8 4a fd ff ff call 110e20 if ( !block_ptr ) 1110d6: 83 c4 10 add $0x10,%esp 1110d9: 85 c0 test %eax,%eax 1110db: 75 cb jne 1110a8 <== ALWAYS TAKEN #endif if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 1110dd: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 1110e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1110e3: 5b pop %ebx <== NOT EXECUTED 1110e4: 5e pop %esi <== NOT EXECUTED 1110e5: 5f pop %edi <== NOT EXECUTED 1110e6: c9 leave <== NOT EXECUTED 1110e7: 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 ) 1110e8: 0f 8e ca 00 00 00 jle 1111b8 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 1110ee: 8b 5d cc mov -0x34(%ebp),%ebx 1110f1: 29 d3 sub %edx,%ebx 1110f3: 89 5d cc mov %ebx,-0x34(%ebp) 1110f6: e9 21 ff ff ff jmp 11101c 1110fb: 90 nop <== 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 ) { 1110fc: 8b 55 14 mov 0x14(%ebp),%edx 1110ff: 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; 111102: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 111109: eb 90 jmp 11109b 11110b: 90 nop <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { 11110c: 8b 55 cc mov -0x34(%ebp),%edx 11110f: 85 d2 test %edx,%edx 111111: 74 23 je 111136 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111113: 50 push %eax 111114: 6a 00 push $0x0 111116: 53 push %ebx 111117: ff 75 08 pushl 0x8(%ebp) 11111a: e8 01 fd ff ff call 110e20 if ( !block_ptr ) 11111f: 83 c4 10 add $0x10,%esp 111122: 85 c0 test %eax,%eax 111124: 74 b7 je 1110dd <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 111126: 8b 30 mov (%eax),%esi 111128: 8b 7d c8 mov -0x38(%ebp),%edi 11112b: 8b 4d cc mov -0x34(%ebp),%ecx 11112e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 111130: 8b 55 cc mov -0x34(%ebp),%edx 111133: 01 55 c4 add %edx,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 111136: 83 ec 08 sub $0x8,%esp 111139: 6a 00 push $0x0 11113b: 8d 45 e0 lea -0x20(%ebp),%eax 11113e: 50 push %eax 11113f: e8 68 6f ff ff call 1080ac 111144: 8b 45 e0 mov -0x20(%ebp),%eax 111147: 8b 4d 08 mov 0x8(%ebp),%ecx 11114a: 89 41 40 mov %eax,0x40(%ecx) return copied; 11114d: 8b 45 c4 mov -0x3c(%ebp),%eax 111150: 83 c4 10 add $0x10,%esp } 111153: 8d 65 f4 lea -0xc(%ebp),%esp 111156: 5b pop %ebx 111157: 5e pop %esi 111158: 5f pop %edi 111159: c9 leave 11115a: c3 ret 11115b: 90 nop <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 11115c: 8b 4a 58 mov 0x58(%edx),%ecx 11115f: 89 4d cc mov %ecx,-0x34(%ebp) if (my_length > (the_jnode->info.linearfile.size - start)) 111162: 89 d1 mov %edx,%ecx 111164: 8b 52 50 mov 0x50(%edx),%edx 111167: 8b 49 54 mov 0x54(%ecx),%ecx 11116a: 89 55 b0 mov %edx,-0x50(%ebp) 11116d: 89 4d b4 mov %ecx,-0x4c(%ebp) 111170: 29 f2 sub %esi,%edx 111172: 19 f9 sbb %edi,%ecx 111174: 89 55 d0 mov %edx,-0x30(%ebp) 111177: 89 4d d4 mov %ecx,-0x2c(%ebp) 11117a: 31 db xor %ebx,%ebx 11117c: 39 cb cmp %ecx,%ebx 11117e: 7d 54 jge 1111d4 <== ALWAYS TAKEN 111180: 89 c2 mov %eax,%edx <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 111182: 03 75 cc add -0x34(%ebp),%esi 111185: 8b 7d 14 mov 0x14(%ebp),%edi 111188: 89 d1 mov %edx,%ecx 11118a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) IMFS_update_atime( the_jnode ); 11118c: 83 ec 08 sub $0x8,%esp 11118f: 6a 00 push $0x0 111191: 8d 45 e0 lea -0x20(%ebp),%eax 111194: 50 push %eax 111195: 89 55 c0 mov %edx,-0x40(%ebp) 111198: e8 0f 6f ff ff call 1080ac 11119d: 8b 45 e0 mov -0x20(%ebp),%eax 1111a0: 8b 5d 08 mov 0x8(%ebp),%ebx 1111a3: 89 43 40 mov %eax,0x40(%ebx) return my_length; 1111a6: 8b 55 c0 mov -0x40(%ebp),%edx 1111a9: 89 d0 mov %edx,%eax 1111ab: 83 c4 10 add $0x10,%esp } IMFS_update_atime( the_jnode ); return copied; } 1111ae: 8d 65 f4 lea -0xc(%ebp),%esp 1111b1: 5b pop %ebx 1111b2: 5e pop %esi 1111b3: 5f pop %edi 1111b4: c9 leave 1111b5: c3 ret 1111b6: 66 90 xchg %ax,%ax <== 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 ) 1111b8: 8b 4d cc mov -0x34(%ebp),%ecx 1111bb: 39 4d d0 cmp %ecx,-0x30(%ebp) 1111be: 0f 86 55 fe ff ff jbe 111019 1111c4: e9 25 ff ff ff jmp 1110ee 1111c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 1111cc: 89 ca mov %ecx,%edx 1111ce: e9 aa fe ff ff jmp 11107d 1111d3: 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)) 1111d4: 7f 04 jg 1111da <== NEVER TAKEN 1111d6: 39 d0 cmp %edx,%eax 1111d8: 76 a6 jbe 111180 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 1111da: 8b 55 b0 mov -0x50(%ebp),%edx 1111dd: 29 f2 sub %esi,%edx 1111df: eb a1 jmp 111182 1111e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 1111e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1111e6: e9 f5 fe ff ff jmp 1110e0 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 1111eb: e8 f8 11 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1111f0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1111f6: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1111fb: e9 e0 fe ff ff jmp 1110e0 <== NOT EXECUTED =============================================================================== 001112e0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 1112e0: 55 push %ebp 1112e1: 89 e5 mov %esp,%ebp 1112e3: 57 push %edi 1112e4: 56 push %esi 1112e5: 53 push %ebx 1112e6: 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; 1112e9: 8b 3d 20 5f 12 00 mov 0x125f20,%edi 1112ef: c1 ef 02 shr $0x2,%edi * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 1112f2: 8b 45 08 mov 0x8(%ebp),%eax 1112f5: 8b 50 58 mov 0x58(%eax),%edx 1112f8: 85 d2 test %edx,%edx 1112fa: 74 10 je 11130c memfile_free_blocks_in_table( &info->indirect, to_free ); 1112fc: 83 ec 08 sub $0x8,%esp 1112ff: 57 push %edi 111300: 83 c0 58 add $0x58,%eax 111303: 50 push %eax 111304: e8 73 ff ff ff call 11127c 111309: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 11130c: 8b 4d 08 mov 0x8(%ebp),%ecx 11130f: 8b 51 5c mov 0x5c(%ecx),%edx 111312: 85 d2 test %edx,%edx 111314: 74 55 je 11136b <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED 111322: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 111324: 31 db xor %ebx,%ebx <== NOT EXECUTED 111326: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 111329: eb 04 jmp 11132f <== NOT EXECUTED 11132b: 90 nop <== NOT EXECUTED 11132c: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 11132f: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 111332: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 111336: 74 14 je 11134c <== NOT EXECUTED memfile_free_blocks_in_table( 111338: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11133b: 57 push %edi <== NOT EXECUTED 11133c: 01 ca add %ecx,%edx <== NOT EXECUTED 11133e: 52 push %edx <== NOT EXECUTED 11133f: e8 38 ff ff ff call 11127c <== NOT EXECUTED 111344: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111347: a1 20 5f 12 00 mov 0x125f20,%eax <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 111358: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11135b: 57 push %edi <== NOT EXECUTED 11135c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 11135f: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 111362: 50 push %eax <== NOT EXECUTED 111363: e8 14 ff ff ff call 11127c <== NOT EXECUTED 111368: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 11136b: 8b 45 08 mov 0x8(%ebp),%eax 11136e: 8b 50 60 mov 0x60(%eax),%edx 111371: 85 d2 test %edx,%edx 111373: 0f 84 b6 00 00 00 je 11142f <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 111389: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 11138b: 85 f6 test %esi,%esi <== NOT EXECUTED 11138d: 0f 84 89 00 00 00 je 11141c <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 111393: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 11139a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1113a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 1113ab: 31 d2 xor %edx,%edx <== NOT EXECUTED 1113ad: 31 db xor %ebx,%ebx <== NOT EXECUTED 1113af: 90 nop <== NOT EXECUTED if ( p[j] ) { 1113b0: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 1113b3: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 1113b6: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1113b8: 74 15 je 1113cf <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 1113ba: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1113bd: 57 push %edi <== NOT EXECUTED 1113be: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 1113c1: 52 push %edx <== NOT EXECUTED 1113c2: e8 b5 fe ff ff call 11127c <== NOT EXECUTED 1113c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1113ca: a1 20 5f 12 00 mov 0x125f20,%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 1113db: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1113de: 57 push %edi <== NOT EXECUTED 1113df: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1113e2: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1113e5: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 1113e8: 50 push %eax <== NOT EXECUTED 1113e9: e8 8e fe ff ff call 11127c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 111403: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 111406: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 111409: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 11140c: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 11140f: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 111412: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 111415: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 111418: 85 f6 test %esi,%esi <== NOT EXECUTED 11141a: 75 88 jne 1113a4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 11141c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11141f: 57 push %edi <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); 111420: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 111423: 83 c0 60 add $0x60,%eax <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 111426: 50 push %eax <== NOT EXECUTED 111427: e8 50 fe ff ff call 11127c <== NOT EXECUTED 11142c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 11142f: 31 c0 xor %eax,%eax 111431: 8d 65 f4 lea -0xc(%ebp),%esp 111434: 5b pop %ebx 111435: 5e pop %esi 111436: 5f pop %edi 111437: c9 leave 111438: c3 ret =============================================================================== 0011143c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 11143c: 55 push %ebp <== NOT EXECUTED 11143d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11143f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 111442: 6a 00 push $0x0 <== NOT EXECUTED 111444: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 111447: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 11144a: e8 d1 f9 ff ff call 110e20 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { 11144f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111452: 85 c0 test %eax,%eax <== NOT EXECUTED 111454: 74 14 je 11146a <== NOT EXECUTED ptr = *block_ptr; 111456: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 111458: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 11145e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111461: 52 push %edx <== NOT EXECUTED 111462: e8 f9 fd ff ff call 111260 <== NOT EXECUTED 111467: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 1; } 11146a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 11146f: c9 leave <== NOT EXECUTED 111470: c3 ret <== NOT EXECUTED =============================================================================== 0011158c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 11158c: 55 push %ebp 11158d: 89 e5 mov %esp,%ebp 11158f: 57 push %edi 111590: 56 push %esi 111591: 53 push %ebx 111592: 83 ec 3c sub $0x3c,%esp 111595: 8b 5d 0c mov 0xc(%ebp),%ebx 111598: 8b 75 10 mov 0x10(%ebp),%esi /* * Error check arguments */ if ( !source ) 11159b: 8b 45 14 mov 0x14(%ebp),%eax 11159e: 85 c0 test %eax,%eax 1115a0: 0f 84 a8 01 00 00 je 11174e <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 1115a6: 8b 7d 18 mov 0x18(%ebp),%edi 1115a9: 85 ff test %edi,%edi 1115ab: 0f 84 9d 01 00 00 je 11174e <== NEVER TAKEN /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 1115b1: 8b 4d 18 mov 0x18(%ebp),%ecx 1115b4: 01 d9 add %ebx,%ecx if ( last_byte > the_jnode->info.file.size ) { 1115b6: 89 c8 mov %ecx,%eax 1115b8: 31 d2 xor %edx,%edx 1115ba: 8b 7d 08 mov 0x8(%ebp),%edi 1115bd: 3b 57 54 cmp 0x54(%edi),%edx 1115c0: 7c 12 jl 1115d4 <== NEVER TAKEN 1115c2: 0f 8f e8 00 00 00 jg 1116b0 <== NEVER TAKEN 1115c8: 3b 4f 50 cmp 0x50(%edi),%ecx 1115cb: 0f 87 df 00 00 00 ja 1116b0 <== ALWAYS TAKEN 1115d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1115d4: a1 20 5f 12 00 mov 0x125f20,%eax 1115d9: 89 45 d4 mov %eax,-0x2c(%ebp) 1115dc: 99 cltd 1115dd: 89 45 c8 mov %eax,-0x38(%ebp) 1115e0: 89 55 cc mov %edx,-0x34(%ebp) 1115e3: 52 push %edx 1115e4: 50 push %eax 1115e5: 56 push %esi 1115e6: 53 push %ebx 1115e7: e8 8c c0 00 00 call 11d678 <__moddi3> 1115ec: 83 c4 10 add $0x10,%esp 1115ef: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1115f1: ff 75 cc pushl -0x34(%ebp) 1115f4: ff 75 c8 pushl -0x38(%ebp) 1115f7: 56 push %esi 1115f8: 53 push %ebx 1115f9: e8 1a bf 00 00 call 11d518 <__divdi3> 1115fe: 83 c4 10 add $0x10,%esp 111601: 89 c3 mov %eax,%ebx if ( start_offset ) { 111603: 85 ff test %edi,%edi 111605: 75 5d jne 111664 111607: 8b 75 14 mov 0x14(%ebp),%esi 11160a: 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; 11160d: 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 ) { 111614: 3b 55 d4 cmp -0x2c(%ebp),%edx 111617: 73 26 jae 11163f 111619: e9 c2 00 00 00 jmp 1116e0 11161e: 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 ); 111620: 8b 00 mov (%eax),%eax src += to_copy; 111622: 89 c7 mov %eax,%edi 111624: 8b 4d d4 mov -0x2c(%ebp),%ecx 111627: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111629: 43 inc %ebx my_length -= to_copy; 11162a: 2b 55 d4 sub -0x2c(%ebp),%edx * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 11162d: 8b 45 d4 mov -0x2c(%ebp),%eax 111630: 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 ) { 111633: 39 15 20 5f 12 00 cmp %edx,0x125f20 111639: 0f 87 a1 00 00 00 ja 1116e0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11163f: 57 push %edi 111640: 6a 00 push $0x0 111642: 53 push %ebx 111643: ff 75 08 pushl 0x8(%ebp) 111646: 89 55 c4 mov %edx,-0x3c(%ebp) 111649: e8 d2 f7 ff ff call 110e20 if ( !block_ptr ) 11164e: 83 c4 10 add $0x10,%esp 111651: 85 c0 test %eax,%eax 111653: 8b 55 c4 mov -0x3c(%ebp),%edx 111656: 75 c8 jne 111620 <== ALWAYS TAKEN } IMFS_mtime_ctime_update( the_jnode ); return copied; } 111658: 8b 45 c8 mov -0x38(%ebp),%eax 11165b: 8d 65 f4 lea -0xc(%ebp),%esp 11165e: 5b pop %ebx 11165f: 5e pop %esi 111660: 5f pop %edi 111661: c9 leave 111662: c3 ret 111663: 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 ); 111664: 50 push %eax 111665: 6a 00 push $0x0 111667: 53 push %ebx 111668: ff 75 08 pushl 0x8(%ebp) 11166b: e8 b0 f7 ff ff call 110e20 if ( !block_ptr ) 111670: 83 c4 10 add $0x10,%esp 111673: 85 c0 test %eax,%eax 111675: 0f 84 c1 00 00 00 je 11173c <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11167b: 8b 55 d4 mov -0x2c(%ebp),%edx 11167e: 29 fa sub %edi,%edx 111680: 89 55 c8 mov %edx,-0x38(%ebp) 111683: 8b 55 18 mov 0x18(%ebp),%edx 111686: 39 55 c8 cmp %edx,-0x38(%ebp) 111689: 0f 87 a5 00 00 00 ja 111734 <== NEVER TAKEN block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 11168f: 03 38 add (%eax),%edi src += to_copy; 111691: 8b 75 14 mov 0x14(%ebp),%esi 111694: 8b 4d c8 mov -0x38(%ebp),%ecx 111697: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 111699: 43 inc %ebx my_length -= to_copy; 11169a: 8b 55 18 mov 0x18(%ebp),%edx 11169d: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 1116a0: 8b 3d 20 5f 12 00 mov 0x125f20,%edi 1116a6: 89 7d d4 mov %edi,-0x2c(%ebp) 1116a9: e9 66 ff ff ff jmp 111614 1116ae: 66 90 xchg %ax,%ax <== NOT EXECUTED * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 1116b0: 51 push %ecx 1116b1: 52 push %edx 1116b2: 50 push %eax 1116b3: ff 75 08 pushl 0x8(%ebp) 1116b6: e8 b9 fd ff ff call 111474 if ( status ) 1116bb: 83 c4 10 add $0x10,%esp 1116be: 85 c0 test %eax,%eax 1116c0: 0f 84 0e ff ff ff je 1115d4 rtems_set_errno_and_return_minus_one( ENOSPC ); 1116c6: e8 1d 0d 00 00 call 1123e8 <__errno> 1116cb: c7 00 1c 00 00 00 movl $0x1c,(%eax) 1116d1: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) 1116d8: e9 7b ff ff ff jmp 111658 1116dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { 1116e0: 85 d2 test %edx,%edx 1116e2: 74 28 je 11170c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1116e4: 51 push %ecx 1116e5: 6a 00 push $0x0 1116e7: 53 push %ebx 1116e8: ff 75 08 pushl 0x8(%ebp) 1116eb: 89 55 c4 mov %edx,-0x3c(%ebp) 1116ee: e8 2d f7 ff ff call 110e20 if ( !block_ptr ) 1116f3: 83 c4 10 add $0x10,%esp 1116f6: 85 c0 test %eax,%eax 1116f8: 8b 55 c4 mov -0x3c(%ebp),%edx 1116fb: 0f 84 57 ff ff ff je 111658 <== 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 ); 111701: 8b 00 mov (%eax),%eax 111703: 89 c7 mov %eax,%edi 111705: 89 d1 mov %edx,%ecx 111707: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 111709: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 11170c: 83 ec 08 sub $0x8,%esp 11170f: 6a 00 push $0x0 111711: 8d 45 e0 lea -0x20(%ebp),%eax 111714: 50 push %eax 111715: e8 92 69 ff ff call 1080ac 11171a: 8b 45 e0 mov -0x20(%ebp),%eax 11171d: 8b 55 08 mov 0x8(%ebp),%edx 111720: 89 42 44 mov %eax,0x44(%edx) 111723: 89 42 48 mov %eax,0x48(%edx) return copied; 111726: 83 c4 10 add $0x10,%esp } 111729: 8b 45 c8 mov -0x38(%ebp),%eax 11172c: 8d 65 f4 lea -0xc(%ebp),%esp 11172f: 5b pop %ebx 111730: 5e pop %esi 111731: 5f pop %edi 111732: c9 leave 111733: c3 ret */ 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; 111734: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 111737: e9 53 ff ff ff jmp 11168f <== NOT EXECUTED 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; 11173c: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 111743: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 111746: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 111749: 5b pop %ebx <== NOT EXECUTED 11174a: 5e pop %esi <== NOT EXECUTED 11174b: 5f pop %edi <== NOT EXECUTED 11174c: c9 leave <== NOT EXECUTED 11174d: c3 ret <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 11174e: e8 95 0c 00 00 call 1123e8 <__errno> <== NOT EXECUTED 111753: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111759: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 111760: e9 f3 fe ff ff jmp 111658 <== NOT EXECUTED =============================================================================== 001078b4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 1078b4: 55 push %ebp 1078b5: 89 e5 mov %esp,%ebp 1078b7: 57 push %edi 1078b8: 56 push %esi 1078b9: 53 push %ebx 1078ba: 83 ec 5c sub $0x5c,%esp 1078bd: 8b 55 08 mov 0x8(%ebp),%edx 1078c0: 8b 5d 0c mov 0xc(%ebp),%ebx 1078c3: 8b 75 10 mov 0x10(%ebp),%esi 1078c6: 8b 45 14 mov 0x14(%ebp),%eax 1078c9: 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 ); 1078cc: 31 c0 xor %eax,%eax 1078ce: b9 ff ff ff ff mov $0xffffffff,%ecx 1078d3: 89 d7 mov %edx,%edi 1078d5: f2 ae repnz scas %es:(%edi),%al 1078d7: f7 d1 not %ecx 1078d9: 49 dec %ecx 1078da: 8d 45 e4 lea -0x1c(%ebp),%eax 1078dd: 50 push %eax 1078de: 8d 7d af lea -0x51(%ebp),%edi 1078e1: 57 push %edi 1078e2: 51 push %ecx 1078e3: 52 push %edx 1078e4: e8 3b 7e 00 00 call 10f724 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 1078e9: 89 d8 mov %ebx,%eax 1078eb: 25 00 f0 00 00 and $0xf000,%eax 1078f0: 83 c4 10 add $0x10,%esp 1078f3: 3d 00 40 00 00 cmp $0x4000,%eax 1078f8: 74 5e je 107958 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 1078fa: 3d 00 80 00 00 cmp $0x8000,%eax 1078ff: 74 4f je 107950 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107901: 3d 00 60 00 00 cmp $0x6000,%eax 107906: 74 38 je 107940 107908: 3d 00 20 00 00 cmp $0x2000,%eax 10790d: 74 31 je 107940 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 10790f: 3d 00 10 00 00 cmp $0x1000,%eax 107914: 75 4a jne 107960 <== NEVER TAKEN type = IMFS_FIFO; 107916: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 10791b: 83 ec 0c sub $0xc,%esp pathloc, type, new_name, mode, &info 10791e: 8d 45 d0 lea -0x30(%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( 107921: 50 push %eax 107922: 53 push %ebx 107923: 57 push %edi 107924: 52 push %edx 107925: ff 75 18 pushl 0x18(%ebp) 107928: e8 4b 74 00 00 call 10ed78 new_name, mode, &info ); if ( !new_node ) 10792d: 83 c4 20 add $0x20,%esp 107930: 85 c0 test %eax,%eax 107932: 74 3e je 107972 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 107934: 31 c0 xor %eax,%eax } 107936: 8d 65 f4 lea -0xc(%ebp),%esp 107939: 5b pop %ebx 10793a: 5e pop %esi 10793b: 5f pop %edi 10793c: c9 leave 10793d: c3 ret 10793e: 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 ); 107940: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107943: 8b 45 a4 mov -0x5c(%ebp),%eax 107946: 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; 107949: ba 02 00 00 00 mov $0x2,%edx rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 10794e: eb cb jmp 10791b * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 107950: ba 05 00 00 00 mov $0x5,%edx 107955: eb c4 jmp 10791b 107957: 90 nop <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 107958: ba 01 00 00 00 mov $0x1,%edx 10795d: eb bc jmp 10791b 10795f: 90 nop <== NOT EXECUTED rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 107960: e8 83 aa 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107965: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10796b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107970: eb c4 jmp 107936 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107972: e8 71 aa 00 00 call 1123e8 <__errno> 107977: c7 00 0c 00 00 00 movl $0xc,(%eax) 10797d: b8 ff ff ff ff mov $0xffffffff,%eax 107982: eb b2 jmp 107936 =============================================================================== 00107984 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107984: 55 push %ebp 107985: 89 e5 mov %esp,%ebp 107987: 83 ec 08 sub $0x8,%esp 10798a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10798d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107990: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107994: 75 0a jne 1079a0 <== 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; 107996: 89 50 5c mov %edx,0x5c(%eax) return 0; 107999: 31 c0 xor %eax,%eax } 10799b: c9 leave 10799c: c3 ret 10799d: 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 ); 1079a0: e8 43 aa 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1079a5: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 1079ab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 1079b0: c9 leave <== NOT EXECUTED 1079b1: c3 ret <== NOT EXECUTED =============================================================================== 00109370 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109370: 55 push %ebp 109371: 89 e5 mov %esp,%ebp 109373: 53 push %ebx 109374: 83 ec 0c sub $0xc,%esp 109377: 8b 5d 08 mov 0x8(%ebp),%ebx #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 10937a: a1 40 98 12 00 mov 0x129840,%eax 10937f: ff 70 08 pushl 0x8(%eax) 109382: 8d 43 0c lea 0xc(%ebx),%eax 109385: 50 push %eax 109386: e8 69 c6 00 00 call 1159f4 switch( the_jnode->type ) { 10938b: 8b 43 4c mov 0x4c(%ebx),%eax 10938e: 83 c4 10 add $0x10,%esp 109391: 83 f8 07 cmp $0x7,%eax 109394: 76 1e jbe 1093b4 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109396: 52 push %edx <== NOT EXECUTED 109397: 50 push %eax <== NOT EXECUTED 109398: 68 64 49 12 00 push $0x124964 <== NOT EXECUTED 10939d: a1 40 98 12 00 mov 0x129840,%eax <== NOT EXECUTED 1093a2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1093a5: e8 3e c5 00 00 call 1158e8 <== NOT EXECUTED return; 1093aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } puts(""); } 1093ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1093b0: c9 leave <== NOT EXECUTED 1093b1: c3 ret <== NOT EXECUTED 1093b2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 1093b4: ff 24 85 7c 49 12 00 jmp *0x12497c(,%eax,4) 1093bb: 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" ); 1093bc: a1 40 98 12 00 mov 0x129840,%eax <== NOT EXECUTED 1093c1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1093c4: 6a 13 push $0x13 <== NOT EXECUTED 1093c6: 6a 01 push $0x1 <== NOT EXECUTED 1093c8: 68 3d 49 12 00 push $0x12493d <== NOT EXECUTED 1093cd: e8 42 d2 00 00 call 116614 <== NOT EXECUTED return; 1093d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 1093d5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1093d8: c9 leave <== NOT EXECUTED 1093d9: c3 ret <== NOT EXECUTED 1093da: 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" ); 1093dc: a1 40 98 12 00 mov 0x129840,%eax <== NOT EXECUTED 1093e1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 1093e4: 6a 12 push $0x12 <== NOT EXECUTED 1093e6: 6a 01 push $0x1 <== NOT EXECUTED 1093e8: 68 51 49 12 00 push $0x124951 <== NOT EXECUTED 1093ed: e8 22 d2 00 00 call 116614 <== NOT EXECUTED return; 1093f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 1093f5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1093f8: c9 leave <== NOT EXECUTED 1093f9: c3 ret <== NOT EXECUTED 1093fa: 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 ")", 1093fc: 51 push %ecx <== NOT EXECUTED 1093fd: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 109400: 68 31 49 12 00 push $0x124931 <== NOT EXECUTED 109405: a1 40 98 12 00 mov 0x129840,%eax <== NOT EXECUTED 10940a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10940d: e8 d6 c4 00 00 call 1158e8 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 109412: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109415: c7 45 08 d5 4b 12 00 movl $0x124bd5,0x8(%ebp) <== NOT EXECUTED } 10941c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10941f: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109420: e9 ff dd 00 00 jmp 117224 <== NOT EXECUTED 109425: 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)", 109428: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 10942b: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 10942e: 68 22 49 12 00 push $0x124922 <== NOT EXECUTED 109433: a1 40 98 12 00 mov 0x129840,%eax <== NOT EXECUTED 109438: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10943b: e8 a8 c4 00 00 call 1158e8 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 109440: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109443: c7 45 08 d5 4b 12 00 movl $0x124bd5,0x8(%ebp) <== NOT EXECUTED } 10944a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10944d: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 10944e: e9 d1 dd 00 00 jmp 117224 <== NOT EXECUTED 109453: 90 nop <== NOT EXECUTED #endif fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109454: 83 ec 08 sub $0x8,%esp 109457: a1 40 98 12 00 mov 0x129840,%eax 10945c: ff 70 08 pushl 0x8(%eax) 10945f: 6a 2f push $0x2f 109461: e8 e2 c4 00 00 call 115948 break; 109466: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109469: c7 45 08 d5 4b 12 00 movl $0x124bd5,0x8(%ebp) } 109470: 8b 5d fc mov -0x4(%ebp),%ebx 109473: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109474: e9 ab dd 00 00 jmp 117224 109479: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 10947c: ff 73 54 pushl 0x54(%ebx) 10947f: ff 73 50 pushl 0x50(%ebx) 109482: 68 0f 49 12 00 push $0x12490f 109487: a1 40 98 12 00 mov 0x129840,%eax 10948c: ff 70 08 pushl 0x8(%eax) 10948f: e8 54 c4 00 00 call 1158e8 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109494: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 109497: c7 45 08 d5 4b 12 00 movl $0x124bd5,0x8(%ebp) } 10949e: 8b 5d fc mov -0x4(%ebp),%ebx 1094a1: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 1094a2: e9 7d dd 00 00 jmp 117224 =============================================================================== 001079c4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1079c4: 55 push %ebp 1079c5: 89 e5 mov %esp,%ebp 1079c7: 57 push %edi 1079c8: 56 push %esi 1079c9: 53 push %ebx 1079ca: 83 ec 0c sub $0xc,%esp 1079cd: 8b 7d 0c mov 0xc(%ebp),%edi 1079d0: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 1079d3: 8b 45 08 mov 0x8(%ebp),%eax 1079d6: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 1079d8: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 1079dc: 75 36 jne 107a14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1079de: 85 f6 test %esi,%esi 1079e0: 74 2e je 107a10 <== NEVER TAKEN 1079e2: 8b 43 50 mov 0x50(%ebx),%eax 1079e5: 8a 10 mov (%eax),%dl 1079e7: 84 d2 test %dl,%dl 1079e9: 74 25 je 107a10 <== NEVER TAKEN 1079eb: 31 c9 xor %ecx,%ecx 1079ed: 31 c0 xor %eax,%eax 1079ef: eb 0d jmp 1079fe 1079f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1079f4: 8b 53 50 mov 0x50(%ebx),%edx 1079f7: 8a 14 02 mov (%edx,%eax,1),%dl 1079fa: 84 d2 test %dl,%dl 1079fc: 74 0a je 107a08 buf[i] = node->info.sym_link.name[i]; 1079fe: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107a01: 40 inc %eax 107a02: 89 c1 mov %eax,%ecx 107a04: 39 c6 cmp %eax,%esi 107a06: 77 ec ja 1079f4 buf[i] = node->info.sym_link.name[i]; return i; } 107a08: 83 c4 0c add $0xc,%esp 107a0b: 5b pop %ebx 107a0c: 5e pop %esi 107a0d: 5f pop %edi 107a0e: c9 leave 107a0f: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107a10: 31 c0 xor %eax,%eax <== NOT EXECUTED 107a12: eb f4 jmp 107a08 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107a14: e8 cf a9 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107a19: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107a1f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107a24: eb e2 jmp 107a08 <== NOT EXECUTED =============================================================================== 00107a28 : 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 */ ) { 107a28: 55 push %ebp <== NOT EXECUTED 107a29: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107a2b: 53 push %ebx <== NOT EXECUTED 107a2c: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107a2f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 107a32: 8b 18 mov (%eax),%ebx <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107a34: 6a 20 push $0x20 <== NOT EXECUTED 107a36: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 107a39: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED 107a3c: 50 push %eax <== NOT EXECUTED 107a3d: e8 9a b6 00 00 call 1130dc <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 107a42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107a45: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED 107a48: 85 c9 test %ecx,%ecx <== NOT EXECUTED 107a4a: 74 0c je 107a58 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107a4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a4f: 53 push %ebx <== NOT EXECUTED 107a50: e8 d7 45 00 00 call 10c02c <_Chain_Extract> <== NOT EXECUTED 107a55: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107a58: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 107a5b: 8b 00 mov (%eax),%eax <== NOT EXECUTED the_jnode->Parent = new_parent; 107a5d: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107a60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107a63: 53 push %ebx <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); 107a64: 83 c0 50 add $0x50,%eax <== NOT EXECUTED 107a67: 50 push %eax <== NOT EXECUTED 107a68: e8 9b 45 00 00 call 10c008 <_Chain_Append> <== NOT EXECUTED /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107a6d: 58 pop %eax <== NOT EXECUTED 107a6e: 5a pop %edx <== NOT EXECUTED 107a6f: 6a 00 push $0x0 <== NOT EXECUTED 107a71: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 107a74: 50 push %eax <== NOT EXECUTED 107a75: e8 32 06 00 00 call 1080ac <== NOT EXECUTED 107a7a: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 107a7d: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED return 0; } 107a80: 31 c0 xor %eax,%eax <== NOT EXECUTED 107a82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107a85: c9 leave <== NOT EXECUTED 107a86: c3 ret <== NOT EXECUTED =============================================================================== 0010f8f0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10f8f0: 55 push %ebp 10f8f1: 89 e5 mov %esp,%ebp 10f8f3: 56 push %esi 10f8f4: 53 push %ebx 10f8f5: 8b 4d 08 mov 0x8(%ebp),%ecx 10f8f8: 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; 10f8fb: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10f8fd: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10f901: 76 15 jbe 10f918 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10f903: e8 e0 2a 00 00 call 1123e8 <__errno> <== NOT EXECUTED 10f908: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10f90e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 10f913: 5b pop %ebx <== NOT EXECUTED 10f914: 5e pop %esi <== NOT EXECUTED 10f915: c9 leave <== NOT EXECUTED 10f916: c3 ret <== NOT EXECUTED 10f917: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 10f918: 8b 5a 4c mov 0x4c(%edx),%ebx 10f91b: ff 24 9d 18 03 12 00 jmp *0x120318(,%ebx,4) 10f922: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10f924: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) 10f92b: 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; 10f932: 8b 49 10 mov 0x10(%ecx),%ecx buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10f935: 8b 49 34 mov 0x34(%ecx),%ecx 10f938: 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 = 10f93a: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10f940: 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; 10f943: 8b 4a 30 mov 0x30(%edx),%ecx 10f946: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10f949: 8b 4a 34 mov 0x34(%edx),%ecx 10f94c: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10f950: 8b 4a 38 mov 0x38(%edx),%ecx 10f953: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10f956: 8b 4a 3c mov 0x3c(%edx),%ecx 10f959: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10f95d: 66 8b 4a 3e mov 0x3e(%edx),%cx 10f961: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10f965: 8b 4a 40 mov 0x40(%edx),%ecx 10f968: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10f96b: 8b 4a 44 mov 0x44(%edx),%ecx 10f96e: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10f971: 8b 52 48 mov 0x48(%edx),%edx 10f974: 89 50 38 mov %edx,0x38(%eax) return 0; 10f977: 31 c0 xor %eax,%eax } 10f979: 5b pop %ebx 10f97a: 5e pop %esi 10f97b: c9 leave 10f97c: c3 ret 10f97d: 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 ); 10f980: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10f983: 8b 72 50 mov 0x50(%edx),%esi 10f986: 89 70 18 mov %esi,0x18(%eax) 10f989: 89 58 1c mov %ebx,0x1c(%eax) break; 10f98c: eb a4 jmp 10f932 10f98e: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10f990: 8b 5a 50 mov 0x50(%edx),%ebx 10f993: 8b 72 54 mov 0x54(%edx),%esi 10f996: 89 58 20 mov %ebx,0x20(%eax) 10f999: 89 70 24 mov %esi,0x24(%eax) break; 10f99c: eb 94 jmp 10f932 =============================================================================== 00107a88 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107a88: 55 push %ebp 107a89: 89 e5 mov %esp,%ebp 107a8b: 57 push %edi 107a8c: 53 push %ebx 107a8d: 83 ec 40 sub $0x40,%esp 107a90: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 107a93: 31 c0 xor %eax,%eax 107a95: b9 ff ff ff ff mov $0xffffffff,%ecx 107a9a: 89 d7 mov %edx,%edi 107a9c: f2 ae repnz scas %es:(%edi),%al 107a9e: f7 d1 not %ecx 107aa0: 49 dec %ecx 107aa1: 8d 45 f4 lea -0xc(%ebp),%eax 107aa4: 50 push %eax 107aa5: 8d 5d bf lea -0x41(%ebp),%ebx 107aa8: 53 push %ebx 107aa9: 51 push %ecx 107aaa: 52 push %edx 107aab: e8 74 7c 00 00 call 10f724 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107ab0: 58 pop %eax 107ab1: ff 75 0c pushl 0xc(%ebp) 107ab4: e8 47 b5 00 00 call 113000 107ab9: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107abc: 83 c4 10 add $0x10,%esp 107abf: 85 c0 test %eax,%eax 107ac1: 74 27 je 107aea <== NEVER TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107ac3: 83 ec 0c sub $0xc,%esp parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 107ac6: 8d 45 e0 lea -0x20(%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( 107ac9: 50 push %eax 107aca: 68 ff a1 00 00 push $0xa1ff 107acf: 53 push %ebx 107ad0: 6a 04 push $0x4 107ad2: ff 75 08 pushl 0x8(%ebp) 107ad5: e8 9e 72 00 00 call 10ed78 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107ada: 83 c4 20 add $0x20,%esp 107add: 85 c0 test %eax,%eax 107adf: 74 1b je 107afc <== NEVER TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 107ae1: 31 c0 xor %eax,%eax } 107ae3: 8d 65 f8 lea -0x8(%ebp),%esp 107ae6: 5b pop %ebx 107ae7: 5f pop %edi 107ae8: c9 leave 107ae9: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 107aea: e8 f9 a8 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107aef: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107af5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107afa: eb e7 jmp 107ae3 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 107afc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107aff: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107b02: e8 29 05 00 00 call 108030 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107b07: e8 dc a8 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107b0c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107b12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107b15: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107b1a: eb c7 jmp 107ae3 <== NOT EXECUTED =============================================================================== 00107b1c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107b1c: 55 push %ebp 107b1d: 89 e5 mov %esp,%ebp 107b1f: 57 push %edi 107b20: 56 push %esi 107b21: 53 push %ebx 107b22: 83 ec 3c sub $0x3c,%esp 107b25: 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; 107b28: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 107b2a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 107b2e: 74 18 je 107b48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 107b30: 83 ec 08 sub $0x8,%esp 107b33: 8b 43 08 mov 0x8(%ebx),%eax 107b36: 53 push %ebx 107b37: ff 75 08 pushl 0x8(%ebp) 107b3a: ff 50 34 call *0x34(%eax) return result; 107b3d: 83 c4 10 add $0x10,%esp } 107b40: 8d 65 f4 lea -0xc(%ebp),%esp 107b43: 5b pop %ebx 107b44: 5e pop %esi 107b45: 5f pop %edi 107b46: c9 leave 107b47: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 107b48: 8b 42 50 mov 0x50(%edx),%eax 107b4b: 85 c0 test %eax,%eax 107b4d: 74 79 je 107bc8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 107b4f: 8d 7d cc lea -0x34(%ebp),%edi 107b52: b9 05 00 00 00 mov $0x5,%ecx 107b57: 89 de mov %ebx,%esi 107b59: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 107b5b: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 107b5e: 83 ec 0c sub $0xc,%esp 107b61: 8d 75 cc lea -0x34(%ebp),%esi 107b64: 56 push %esi 107b65: 89 55 c4 mov %edx,-0x3c(%ebp) 107b68: e8 4f 73 00 00 call 10eebc /* * 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) 107b6d: 8b 55 c4 mov -0x3c(%ebp),%edx 107b70: 8b 42 50 mov 0x50(%edx),%eax 107b73: 8b 48 34 mov 0x34(%eax),%ecx 107b76: 83 c4 10 add $0x10,%esp 107b79: 66 83 f9 01 cmp $0x1,%cx 107b7d: 74 27 je 107ba6 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 107b7f: 49 dec %ecx 107b80: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107b84: 83 ec 08 sub $0x8,%esp 107b87: 6a 00 push $0x0 107b89: 8d 45 e0 lea -0x20(%ebp),%eax 107b8c: 50 push %eax 107b8d: 89 55 c4 mov %edx,-0x3c(%ebp) 107b90: e8 17 05 00 00 call 1080ac 107b95: 8b 55 c4 mov -0x3c(%ebp),%edx 107b98: 8b 42 50 mov 0x50(%edx),%eax 107b9b: 8b 55 e0 mov -0x20(%ebp),%edx 107b9e: 89 50 48 mov %edx,0x48(%eax) 107ba1: 83 c4 10 add $0x10,%esp 107ba4: eb 8a jmp 107b30 * 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 ); 107ba6: 83 ec 08 sub $0x8,%esp 107ba9: 56 push %esi 107baa: ff 75 08 pushl 0x8(%ebp) 107bad: 8b 45 d4 mov -0x2c(%ebp),%eax 107bb0: ff 50 34 call *0x34(%eax) if ( result != 0 ) 107bb3: 83 c4 10 add $0x10,%esp 107bb6: 85 c0 test %eax,%eax 107bb8: 0f 84 72 ff ff ff je 107b30 return -1; 107bbe: b8 ff ff ff ff mov $0xffffffff,%eax 107bc3: e9 78 ff ff ff jmp 107b40 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 107bc8: e8 1b a8 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107bcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107bd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107bd8: e9 63 ff ff ff jmp 107b40 <== NOT EXECUTED =============================================================================== 00107be0 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107be0: 55 push %ebp 107be1: 89 e5 mov %esp,%ebp 107be3: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107be6: 8b 45 08 mov 0x8(%ebp),%eax 107be9: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107bec: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107bf0: 75 12 jne 107c04 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107bf2: 8b 50 5c mov 0x5c(%eax),%edx 107bf5: 85 d2 test %edx,%edx 107bf7: 74 1d je 107c16 <== 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; 107bf9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) return 0; 107c00: 31 c0 xor %eax,%eax } 107c02: c9 leave 107c03: 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 ); 107c04: e8 df a7 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107c09: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107c0f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107c14: c9 leave <== NOT EXECUTED 107c15: 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 */ 107c16: e8 cd a7 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107c1b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107c21: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 107c26: c9 leave <== NOT EXECUTED 107c27: c3 ret <== NOT EXECUTED =============================================================================== 00108258 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 108258: 55 push %ebp 108259: 89 e5 mov %esp,%ebp 10825b: 57 push %edi 10825c: 56 push %esi 10825d: 53 push %ebx 10825e: 83 ec 0c sub $0xc,%esp 108261: 8b 5d 08 mov 0x8(%ebp),%ebx 108264: 8b 75 0c mov 0xc(%ebp),%esi 108267: 8b 7d 10 mov 0x10(%ebp),%edi /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 10826a: a1 68 46 12 00 mov 0x124668,%eax 10826f: 85 c0 test %eax,%eax 108271: 74 02 je 108275 (*rtems_malloc_statistics_helpers->initialize)(); 108273: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 108275: e8 76 ff ff ff call 1081f0 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 10827a: a1 6c 46 12 00 mov 0x12466c,%eax 10827f: 85 c0 test %eax,%eax 108281: 74 0e je 108291 heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 108283: 83 ec 08 sub $0x8,%esp 108286: 57 push %edi 108287: 53 push %ebx 108288: ff 10 call *(%eax) 10828a: 89 c3 mov %eax,%ebx 10828c: 83 c4 10 add $0x10,%esp heap_begin, sbrk_amount ); heap_size = (uintptr_t) sbrk_amount; 10828f: 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 ( 108291: 80 3d 64 46 12 00 00 cmpb $0x0,0x124664 108298: 75 1f jne 1082b9 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 10829a: 80 3d e8 22 12 00 00 cmpb $0x0,0x1222e8 1082a1: 75 41 jne 1082e4 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1082a3: 6a 04 push $0x4 1082a5: 56 push %esi 1082a6: 53 push %ebx 1082a7: ff 35 f8 21 12 00 pushl 0x1221f8 1082ad: e8 ea 42 00 00 call 10c59c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 1082b2: 83 c4 10 add $0x10,%esp 1082b5: 85 c0 test %eax,%eax 1082b7: 74 3e je 1082f7 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 1082b9: 8b 1d 80 62 12 00 mov 0x126280,%ebx 1082bf: 83 ec 0c sub $0xc,%esp 1082c2: ff 35 f8 21 12 00 pushl 0x1221f8 1082c8: e8 13 4e 00 00 call 10d0e0 <_Protected_heap_Get_size> 1082cd: 8d 1c 18 lea (%eax,%ebx,1),%ebx 1082d0: 89 1d 80 62 12 00 mov %ebx,0x126280 1082d6: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 1082d9: 8d 65 f4 lea -0xc(%ebp),%esp 1082dc: 5b pop %ebx 1082dd: 5e pop %esi 1082de: 5f pop %edi 1082df: c9 leave 1082e0: c3 ret 1082e1: 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 ); 1082e4: 31 c0 xor %eax,%eax 1082e6: 89 df mov %ebx,%edi 1082e8: 89 f1 mov %esi,%ecx 1082ea: 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 ) { 1082ec: 80 3d 64 46 12 00 00 cmpb $0x0,0x124664 1082f3: 74 ae je 1082a3 <== ALWAYS TAKEN 1082f5: eb c2 jmp 1082b9 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 1082f7: 83 ec 0c sub $0xc,%esp 1082fa: 6a 1a push $0x1a 1082fc: e8 73 3a 00 00 call 10bd74 =============================================================================== 00107700 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 107700: 55 push %ebp <== NOT EXECUTED 107701: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107703: 57 push %edi <== NOT EXECUTED 107704: 56 push %esi <== NOT EXECUTED 107705: 53 push %ebx <== NOT EXECUTED 107706: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 107709: 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) { 10770c: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10770f: 0f 84 83 00 00 00 je 107798 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 107715: 8b 35 50 67 12 00 mov 0x126750,%esi <== NOT EXECUTED 10771b: 83 ee 10 sub $0x10,%esi <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 10771e: 85 db test %ebx,%ebx <== NOT EXECUTED 107720: 0f 84 85 00 00 00 je 1077ab <== NOT EXECUTED (*print_handler)( 107726: 8b 3d 0c 64 12 00 mov 0x12640c,%edi <== NOT EXECUTED 10772c: 52 push %edx <== NOT EXECUTED 10772d: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 107730: 50 push %eax <== NOT EXECUTED 107731: 6a 05 push $0x5 <== NOT EXECUTED 107733: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107736: e8 59 40 00 00 call 10b794 <== NOT EXECUTED 10773b: 50 push %eax <== NOT EXECUTED 10773c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10773f: 68 3b 00 12 00 push $0x12003b <== NOT EXECUTED 107744: ff 35 08 64 12 00 pushl 0x126408 <== NOT EXECUTED 10774a: ff d7 call *%edi <== NOT EXECUTED 10774c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 10774f: a1 54 67 12 00 mov 0x126754,%eax <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 107754: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107757: 56 push %esi <== NOT EXECUTED 107758: 6a 00 push $0x0 <== NOT EXECUTED 10775a: 8b 15 50 67 12 00 mov 0x126750,%edx <== NOT EXECUTED 107760: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107764: 52 push %edx <== NOT EXECUTED 107765: 50 push %eax <== NOT EXECUTED 107766: 68 56 00 12 00 push $0x120056 <== NOT EXECUTED 10776b: ff 35 08 64 12 00 pushl 0x126408 <== NOT EXECUTED 107771: ff 15 0c 64 12 00 call *0x12640c <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 107777: 83 c4 18 add $0x18,%esp <== NOT EXECUTED 10777a: 68 74 00 12 00 push $0x120074 <== NOT EXECUTED 10777f: ff 35 08 64 12 00 pushl 0x126408 <== NOT EXECUTED 107785: ff 15 0c 64 12 00 call *0x12640c <== NOT EXECUTED 10778b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 10778e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107791: 5b pop %ebx <== NOT EXECUTED 107792: 5e pop %esi <== NOT EXECUTED 107793: 5f pop %edi <== NOT EXECUTED 107794: c9 leave <== NOT EXECUTED 107795: c3 ret <== NOT EXECUTED 107796: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 107798: 8b 0d 54 67 12 00 mov 0x126754,%ecx <== NOT EXECUTED 10779e: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1077a0: 74 ec je 10778e <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 1077a2: 8b 35 50 67 12 00 mov 0x126750,%esi <== NOT EXECUTED 1077a8: 83 ee 10 sub $0x10,%esi <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 1077ab: 50 push %eax <== NOT EXECUTED 1077ac: 6a ff push $0xffffffff <== NOT EXECUTED 1077ae: 68 48 00 12 00 push $0x120048 <== NOT EXECUTED 1077b3: ff 35 08 64 12 00 pushl 0x126408 <== NOT EXECUTED 1077b9: ff 15 0c 64 12 00 call *0x12640c <== NOT EXECUTED 1077bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1077c2: eb 8b jmp 10774f <== NOT EXECUTED =============================================================================== 001077c4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 1077c4: 55 push %ebp <== NOT EXECUTED 1077c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 1077c7: c9 leave <== NOT EXECUTED 1077c8: c3 ret <== NOT EXECUTED =============================================================================== 00107818 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 107818: 55 push %ebp <== NOT EXECUTED 107819: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10781b: 56 push %esi <== NOT EXECUTED 10781c: 53 push %ebx <== NOT EXECUTED 10781d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 107820: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 107823: 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); 107826: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10782c: 68 81 00 12 00 push $0x120081 <== NOT EXECUTED 107831: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 107834: e8 af 18 00 00 call 1090e8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 107839: 5a pop %edx <== NOT EXECUTED 10783a: 59 pop %ecx <== NOT EXECUTED 10783b: 53 push %ebx <== NOT EXECUTED 10783c: 68 91 00 12 00 push $0x120091 <== NOT EXECUTED 107841: e8 a2 18 00 00 call 1090e8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 107846: 59 pop %ecx <== NOT EXECUTED 107847: 58 pop %eax <== NOT EXECUTED 107848: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10784b: 68 ae 00 12 00 push $0x1200ae <== NOT EXECUTED 107850: e8 93 18 00 00 call 1090e8 <== NOT EXECUTED printk( 107855: 58 pop %eax <== NOT EXECUTED 107856: 5a pop %edx <== NOT EXECUTED 107857: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10785a: 68 c0 00 12 00 push $0x1200c0 <== NOT EXECUTED 10785f: e8 84 18 00 00 call 1090e8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 107864: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 107867: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10786a: 50 push %eax <== NOT EXECUTED 10786b: 6a 20 push $0x20 <== NOT EXECUTED 10786d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107870: e8 1f 3f 00 00 call 10b794 <== NOT EXECUTED 107875: 5a pop %edx <== NOT EXECUTED 107876: 59 pop %ecx <== NOT EXECUTED 107877: 50 push %eax <== NOT EXECUTED 107878: 68 d4 00 12 00 push $0x1200d4 <== NOT EXECUTED 10787d: e8 66 18 00 00 call 1090e8 <== 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) 107882: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 107888: 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( 10788e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107891: 53 push %ebx <== NOT EXECUTED 107892: 51 push %ecx <== NOT EXECUTED 107893: 50 push %eax <== NOT EXECUTED 107894: 68 04 01 12 00 push $0x120104 <== NOT EXECUTED 107899: e8 4a 18 00 00 call 1090e8 <== 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) { 10789e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1078a1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 1078a4: 84 d2 test %dl,%dl <== NOT EXECUTED 1078a6: 74 10 je 1078b8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 1078a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078ab: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 1078b0: e8 5b 47 00 00 call 10c010 <== NOT EXECUTED 1078b5: 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); 1078b8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 1078bb: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 1078be: 56 push %esi <== NOT EXECUTED 1078bf: 50 push %eax <== NOT EXECUTED 1078c0: 6a 10 push $0x10 <== NOT EXECUTED 1078c2: 68 38 01 12 00 push $0x120138 <== NOT EXECUTED 1078c7: e8 1c 18 00 00 call 1090e8 <== NOT EXECUTED 1078cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1078cf: eb d7 jmp 1078a8 <== NOT EXECUTED =============================================================================== 0010bed4 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bed4: 55 push %ebp 10bed5: 89 e5 mov %esp,%ebp 10bed7: 53 push %ebx 10bed8: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bedb: 8b 1d 18 66 12 00 mov 0x126618,%ebx 10bee1: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bee7: 74 10 je 10bef9 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10bee9: 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)(); 10beec: 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 ) { 10beef: 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 ; 10bef1: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bef7: 75 f3 jne 10beec <_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)(); } } 10bef9: 58 pop %eax 10befa: 5b pop %ebx 10befb: c9 leave 10befc: c3 ret =============================================================================== 0010bf00 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bf00: 55 push %ebp 10bf01: 89 e5 mov %esp,%ebp 10bf03: 53 push %ebx 10bf04: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bf07: 8b 1d 18 66 12 00 mov 0x126618,%ebx 10bf0d: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bf13: 74 1c je 10bf31 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10bf15: 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 ); 10bf18: 83 ec 0c sub $0xc,%esp 10bf1b: ff 35 78 66 12 00 pushl 0x126678 10bf21: 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 ) { 10bf24: 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 ; 10bf26: 83 c4 10 add $0x10,%esp 10bf29: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bf2f: 75 e7 jne 10bf18 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bf31: 8b 5d fc mov -0x4(%ebp),%ebx 10bf34: c9 leave 10bf35: c3 ret =============================================================================== 00112e14 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112e14: 55 push %ebp 112e15: 89 e5 mov %esp,%ebp 112e17: 57 push %edi 112e18: 56 push %esi 112e19: 53 push %ebx 112e1a: 83 ec 1c sub $0x1c,%esp 112e1d: 8b 45 08 mov 0x8(%ebp),%eax 112e20: 8b 5d 0c mov 0xc(%ebp),%ebx 112e23: 8b 75 14 mov 0x14(%ebp),%esi 112e26: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112e29: 8b 15 18 76 12 00 mov 0x127618,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112e2f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112e36: 9c pushf 112e37: fa cli 112e38: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112e3b: 8b 48 48 mov 0x48(%eax),%ecx 112e3e: 41 inc %ecx 112e3f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112e42: 83 78 40 00 cmpl $0x0,0x40(%eax) 112e46: 75 05 jne 112e4d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 112e48: 3b 48 44 cmp 0x44(%eax),%ecx 112e4b: 74 2b je 112e78 <_CORE_barrier_Wait+0x64> 112e4d: 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; 112e54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112e57: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112e5a: ff 75 e4 pushl -0x1c(%ebp) 112e5d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112e5e: c7 45 10 f0 f2 10 00 movl $0x10f2f0,0x10(%ebp) 112e65: 89 75 0c mov %esi,0xc(%ebp) 112e68: 89 45 08 mov %eax,0x8(%ebp) } 112e6b: 83 c4 1c add $0x1c,%esp 112e6e: 5b pop %ebx 112e6f: 5e pop %esi 112e70: 5f pop %edi 112e71: 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 ); 112e72: e9 29 c1 ff ff jmp 10efa0 <_Thread_queue_Enqueue_with_handler> 112e77: 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; 112e78: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112e7f: ff 75 e4 pushl -0x1c(%ebp) 112e82: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112e83: 89 7d 10 mov %edi,0x10(%ebp) 112e86: 89 5d 0c mov %ebx,0xc(%ebp) 112e89: 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 ); } 112e8c: 83 c4 1c add $0x1c,%esp 112e8f: 5b pop %ebx 112e90: 5e pop %esi 112e91: 5f pop %edi 112e92: 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 ); 112e93: e9 4c ff ff ff jmp 112de4 <_CORE_barrier_Release> =============================================================================== 0011996c <_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 ) { 11996c: 55 push %ebp 11996d: 89 e5 mov %esp,%ebp 11996f: 57 push %edi 119970: 56 push %esi 119971: 53 push %ebx 119972: 83 ec 1c sub $0x1c,%esp 119975: 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 ) { 119978: 8b 45 10 mov 0x10(%ebp),%eax 11997b: 39 43 4c cmp %eax,0x4c(%ebx) 11997e: 72 60 jb 1199e0 <_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 ) { 119980: 8b 43 48 mov 0x48(%ebx),%eax 119983: 85 c0 test %eax,%eax 119985: 75 45 jne 1199cc <_CORE_message_queue_Broadcast+0x60> 119987: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11998e: eb 18 jmp 1199a8 <_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; 119990: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119993: 8b 42 2c mov 0x2c(%edx),%eax 119996: 89 c7 mov %eax,%edi 119998: 8b 75 0c mov 0xc(%ebp),%esi 11999b: 8b 4d 10 mov 0x10(%ebp),%ecx 11999e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1199a0: 8b 42 28 mov 0x28(%edx),%eax 1199a3: 8b 55 10 mov 0x10(%ebp),%edx 1199a6: 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 = 1199a8: 83 ec 0c sub $0xc,%esp 1199ab: 53 push %ebx 1199ac: e8 ab 24 00 00 call 11be5c <_Thread_queue_Dequeue> 1199b1: 89 c2 mov %eax,%edx 1199b3: 83 c4 10 add $0x10,%esp 1199b6: 85 c0 test %eax,%eax 1199b8: 75 d6 jne 119990 <_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; 1199ba: 8b 55 e4 mov -0x1c(%ebp),%edx 1199bd: 8b 45 1c mov 0x1c(%ebp),%eax 1199c0: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1199c2: 31 c0 xor %eax,%eax } 1199c4: 8d 65 f4 lea -0xc(%ebp),%esp 1199c7: 5b pop %ebx 1199c8: 5e pop %esi 1199c9: 5f pop %edi 1199ca: c9 leave 1199cb: 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; 1199cc: 8b 55 1c mov 0x1c(%ebp),%edx 1199cf: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1199d5: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1199d7: 8d 65 f4 lea -0xc(%ebp),%esp 1199da: 5b pop %ebx 1199db: 5e pop %esi 1199dc: 5f pop %edi 1199dd: c9 leave 1199de: c3 ret 1199df: 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; 1199e0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1199e5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199e8: 5b pop %ebx <== NOT EXECUTED 1199e9: 5e pop %esi <== NOT EXECUTED 1199ea: 5f pop %edi <== NOT EXECUTED 1199eb: c9 leave <== NOT EXECUTED 1199ec: c3 ret <== NOT EXECUTED =============================================================================== 00114a48 <_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 ) { 114a48: 55 push %ebp 114a49: 89 e5 mov %esp,%ebp 114a4b: 57 push %edi 114a4c: 56 push %esi 114a4d: 53 push %ebx 114a4e: 83 ec 0c sub $0xc,%esp 114a51: 8b 5d 08 mov 0x8(%ebp),%ebx 114a54: 8b 75 10 mov 0x10(%ebp),%esi 114a57: 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; 114a5a: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114a5d: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114a64: 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)) { 114a67: a8 03 test $0x3,%al 114a69: 74 15 je 114a80 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 114a6b: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114a6e: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114a71: 39 d0 cmp %edx,%eax 114a73: 76 0d jbe 114a82 <_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; 114a75: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114a77: 8d 65 f4 lea -0xc(%ebp),%esp 114a7a: 5b pop %ebx 114a7b: 5e pop %esi 114a7c: 5f pop %edi 114a7d: c9 leave 114a7e: c3 ret 114a7f: 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)) { 114a80: 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)); 114a82: 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 * 114a85: 89 f8 mov %edi,%eax 114a87: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a8a: 39 d0 cmp %edx,%eax 114a8c: 72 e7 jb 114a75 <_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 ); 114a8e: 83 ec 0c sub $0xc,%esp 114a91: 50 push %eax 114a92: e8 f9 28 00 00 call 117390 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a97: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a9a: 83 c4 10 add $0x10,%esp 114a9d: 85 c0 test %eax,%eax 114a9f: 74 d4 je 114a75 <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114aa1: 57 push %edi 114aa2: 56 push %esi 114aa3: 50 push %eax 114aa4: 8d 43 60 lea 0x60(%ebx),%eax 114aa7: 50 push %eax 114aa8: e8 b7 45 00 00 call 119064 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114aad: 8d 43 54 lea 0x54(%ebx),%eax 114ab0: 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; 114ab3: 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 ); 114aba: 8d 43 50 lea 0x50(%ebx),%eax 114abd: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114ac0: 6a 06 push $0x6 114ac2: 68 80 00 00 00 push $0x80 114ac7: 8b 45 0c mov 0xc(%ebp),%eax 114aca: 83 38 01 cmpl $0x1,(%eax) 114acd: 0f 94 c0 sete %al 114ad0: 0f b6 c0 movzbl %al,%eax 114ad3: 50 push %eax 114ad4: 53 push %ebx 114ad5: e8 86 1e 00 00 call 116960 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114ada: 83 c4 20 add $0x20,%esp 114add: b0 01 mov $0x1,%al } 114adf: 8d 65 f4 lea -0xc(%ebp),%esp 114ae2: 5b pop %ebx 114ae3: 5e pop %esi 114ae4: 5f pop %edi 114ae5: c9 leave 114ae6: c3 ret =============================================================================== 001104cc <_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 ) { 1104cc: 55 push %ebp 1104cd: 89 e5 mov %esp,%ebp 1104cf: 53 push %ebx 1104d0: 8b 45 08 mov 0x8(%ebp),%eax 1104d3: 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 ); 1104d6: 9c pushf 1104d7: fa cli 1104d8: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1104d9: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 1104dc: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 1104e3: 74 17 je 1104fc <_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( 1104e5: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1104e8: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1104eb: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 1104ee: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1104f1: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1104f3: 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 ); 1104f6: 53 push %ebx 1104f7: 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 } 1104f8: 5b pop %ebx 1104f9: c9 leave 1104fa: c3 ret 1104fb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1104fc: 8d 48 54 lea 0x54(%eax),%ecx 1104ff: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110501: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110504: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110507: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110509: 89 4a 04 mov %ecx,0x4(%edx) 11050c: eb e8 jmp 1104f6 <_CORE_message_queue_Insert_message+0x2a> =============================================================================== 00114ae8 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114ae8: 55 push %ebp 114ae9: 89 e5 mov %esp,%ebp 114aeb: 57 push %edi 114aec: 56 push %esi 114aed: 53 push %ebx 114aee: 83 ec 1c sub $0x1c,%esp 114af1: 8b 45 08 mov 0x8(%ebp),%eax 114af4: 8b 55 0c mov 0xc(%ebp),%edx 114af7: 89 55 dc mov %edx,-0x24(%ebp) 114afa: 8b 55 10 mov 0x10(%ebp),%edx 114afd: 89 55 e4 mov %edx,-0x1c(%ebp) 114b00: 8b 7d 14 mov 0x14(%ebp),%edi 114b03: 8b 55 1c mov 0x1c(%ebp),%edx 114b06: 89 55 d8 mov %edx,-0x28(%ebp) 114b09: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114b0c: 8b 0d f8 fc 12 00 mov 0x12fcf8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114b12: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114b19: 9c pushf 114b1a: fa cli 114b1b: 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)); 114b1e: 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; 114b21: 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)) 114b24: 39 f2 cmp %esi,%edx 114b26: 74 44 je 114b6c <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114b28: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114b2a: 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 ); 114b2d: 8d 58 50 lea 0x50(%eax),%ebx 114b30: 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; 114b33: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114b36: ff 75 e0 pushl -0x20(%ebp) 114b39: 9d popf *size_p = the_message->Contents.size; 114b3a: 8b 4a 08 mov 0x8(%edx),%ecx 114b3d: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114b3f: 8b 0d f8 fc 12 00 mov 0x12fcf8,%ecx 114b45: 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, 114b4c: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114b4f: 8b 0f mov (%edi),%ecx 114b51: 8b 7d e4 mov -0x1c(%ebp),%edi 114b54: 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 ); 114b56: 89 55 0c mov %edx,0xc(%ebp) 114b59: 83 c0 60 add $0x60,%eax 114b5c: 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 ); } 114b5f: 83 c4 1c add $0x1c,%esp 114b62: 5b pop %ebx 114b63: 5e pop %esi 114b64: 5f pop %edi 114b65: c9 leave 114b66: e9 5d fe ff ff jmp 1149c8 <_Chain_Append> 114b6b: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114b6c: 84 db test %bl,%bl 114b6e: 75 14 jne 114b84 <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114b70: ff 75 e0 pushl -0x20(%ebp) 114b73: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114b74: 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 ); } 114b7b: 83 c4 1c add $0x1c,%esp 114b7e: 5b pop %ebx 114b7f: 5e pop %esi 114b80: 5f pop %edi 114b81: c9 leave 114b82: c3 ret 114b83: 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; 114b84: 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; 114b8b: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114b8e: 8b 55 dc mov -0x24(%ebp),%edx 114b91: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114b94: 8b 55 e4 mov -0x1c(%ebp),%edx 114b97: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114b9a: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114b9d: ff 75 e0 pushl -0x20(%ebp) 114ba0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114ba1: c7 45 10 24 6a 11 00 movl $0x116a24,0x10(%ebp) 114ba8: 8b 55 d8 mov -0x28(%ebp),%edx 114bab: 89 55 0c mov %edx,0xc(%ebp) 114bae: 89 45 08 mov %eax,0x8(%ebp) } 114bb1: 83 c4 1c add $0x1c,%esp 114bb4: 5b pop %ebx 114bb5: 5e pop %esi 114bb6: 5f pop %edi 114bb7: 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 ); 114bb8: e9 17 1b 00 00 jmp 1166d4 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010c068 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 57 push %edi 10c06c: 56 push %esi 10c06d: 53 push %ebx 10c06e: 83 ec 0c sub $0xc,%esp 10c071: 8b 5d 08 mov 0x8(%ebp),%ebx 10c074: 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 ) { 10c077: 8b 45 10 mov 0x10(%ebp),%eax 10c07a: 39 43 4c cmp %eax,0x4c(%ebx) 10c07d: 72 51 jb 10c0d0 <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c07f: 8b 43 48 mov 0x48(%ebx),%eax 10c082: 85 c0 test %eax,%eax 10c084: 74 5a je 10c0e0 <_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 < 10c086: 39 43 44 cmp %eax,0x44(%ebx) 10c089: 77 0d ja 10c098 <_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; 10c08b: 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 } 10c090: 8d 65 f4 lea -0xc(%ebp),%esp 10c093: 5b pop %ebx 10c094: 5e pop %esi 10c095: 5f pop %edi 10c096: c9 leave 10c097: 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 ); 10c098: 83 ec 0c sub $0xc,%esp 10c09b: 8d 43 60 lea 0x60(%ebx),%eax 10c09e: 50 push %eax 10c09f: e8 a0 ff ff ff call 10c044 <_Chain_Get> 10c0a4: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c0a6: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c0a9: 89 c7 mov %eax,%edi 10c0ab: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0ae: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c0b0: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0b3: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c0b6: 83 c4 0c add $0xc,%esp 10c0b9: ff 75 1c pushl 0x1c(%ebp) 10c0bc: 52 push %edx 10c0bd: 53 push %ebx 10c0be: e8 09 44 00 00 call 1104cc <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c0c3: 83 c4 10 add $0x10,%esp 10c0c6: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c0c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c0cb: 5b pop %ebx 10c0cc: 5e pop %esi 10c0cd: 5f pop %edi 10c0ce: c9 leave 10c0cf: 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; 10c0d0: 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 } 10c0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d8: 5b pop %ebx 10c0d9: 5e pop %esi 10c0da: 5f pop %edi 10c0db: c9 leave 10c0dc: c3 ret 10c0dd: 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 ); 10c0e0: 83 ec 0c sub $0xc,%esp 10c0e3: 53 push %ebx 10c0e4: e8 ef 18 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c0e9: 89 c2 mov %eax,%edx if ( the_thread ) { 10c0eb: 83 c4 10 add $0x10,%esp 10c0ee: 85 c0 test %eax,%eax 10c0f0: 74 1e je 10c110 <_CORE_message_queue_Submit+0xa8> 10c0f2: 8b 40 2c mov 0x2c(%eax),%eax 10c0f5: 89 c7 mov %eax,%edi 10c0f7: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0fa: 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; 10c0fc: 8b 42 28 mov 0x28(%edx),%eax 10c0ff: 8b 4d 10 mov 0x10(%ebp),%ecx 10c102: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c104: 8b 45 1c mov 0x1c(%ebp),%eax 10c107: 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; 10c10a: 31 c0 xor %eax,%eax 10c10c: eb 82 jmp 10c090 <_CORE_message_queue_Submit+0x28> 10c10e: 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 ) { 10c110: 8b 43 48 mov 0x48(%ebx),%eax 10c113: e9 6e ff ff ff jmp 10c086 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c124 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c124: 55 push %ebp 10c125: 89 e5 mov %esp,%ebp 10c127: 57 push %edi 10c128: 56 push %esi 10c129: 53 push %ebx 10c12a: 83 ec 0c sub $0xc,%esp 10c12d: 8b 45 08 mov 0x8(%ebp),%eax 10c130: 8b 5d 0c mov 0xc(%ebp),%ebx 10c133: 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; 10c136: 8d 78 40 lea 0x40(%eax),%edi 10c139: b9 04 00 00 00 mov $0x4,%ecx 10c13e: 89 de mov %ebx,%esi 10c140: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c142: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c145: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c14c: 85 d2 test %edx,%edx 10c14e: 75 30 jne 10c180 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c150: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c157: 8b 15 78 66 12 00 mov 0x126678,%edx 10c15d: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c160: 8b 4a 08 mov 0x8(%edx),%ecx 10c163: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c166: 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 ) || 10c169: 83 f9 02 cmp $0x2,%ecx 10c16c: 74 05 je 10c173 <_CORE_mutex_Initialize+0x4f> 10c16e: 83 f9 03 cmp $0x3,%ecx 10c171: 75 22 jne 10c195 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c173: 8b 48 4c mov 0x4c(%eax),%ecx 10c176: 39 4a 14 cmp %ecx,0x14(%edx) 10c179: 72 41 jb 10c1bc <_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++; 10c17b: ff 42 1c incl 0x1c(%edx) 10c17e: eb 15 jmp 10c195 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c180: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c187: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c18e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c195: 6a 05 push $0x5 10c197: 68 00 04 00 00 push $0x400 10c19c: 31 d2 xor %edx,%edx 10c19e: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c1a2: 0f 95 c2 setne %dl 10c1a5: 52 push %edx 10c1a6: 50 push %eax 10c1a7: e8 dc 1b 00 00 call 10dd88 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c1ac: 83 c4 10 add $0x10,%esp 10c1af: 31 c0 xor %eax,%eax } 10c1b1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1b4: 5b pop %ebx 10c1b5: 5e pop %esi 10c1b6: 5f pop %edi 10c1b7: c9 leave 10c1b8: c3 ret 10c1b9: 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; 10c1bc: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret =============================================================================== 0010c21c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c21c: 55 push %ebp 10c21d: 89 e5 mov %esp,%ebp 10c21f: 53 push %ebx 10c220: 83 ec 14 sub $0x14,%esp 10c223: 8b 5d 08 mov 0x8(%ebp),%ebx 10c226: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c229: a1 d4 63 12 00 mov 0x1263d4,%eax 10c22e: 85 c0 test %eax,%eax 10c230: 74 04 je 10c236 <_CORE_mutex_Seize+0x1a> 10c232: 84 d2 test %dl,%dl 10c234: 75 36 jne 10c26c <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c236: 83 ec 08 sub $0x8,%esp 10c239: 8d 45 18 lea 0x18(%ebp),%eax 10c23c: 50 push %eax 10c23d: 53 push %ebx 10c23e: 88 55 f4 mov %dl,-0xc(%ebp) 10c241: e8 ca 42 00 00 call 110510 <_CORE_mutex_Seize_interrupt_trylock> 10c246: 83 c4 10 add $0x10,%esp 10c249: 85 c0 test %eax,%eax 10c24b: 8a 55 f4 mov -0xc(%ebp),%dl 10c24e: 74 14 je 10c264 <_CORE_mutex_Seize+0x48> 10c250: 84 d2 test %dl,%dl 10c252: 75 30 jne 10c284 <_CORE_mutex_Seize+0x68> 10c254: ff 75 18 pushl 0x18(%ebp) 10c257: 9d popf 10c258: a1 78 66 12 00 mov 0x126678,%eax 10c25d: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c264: 8b 5d fc mov -0x4(%ebp),%ebx 10c267: c9 leave 10c268: c3 ret 10c269: 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 ); 10c26c: 83 3d 80 65 12 00 01 cmpl $0x1,0x126580 10c273: 76 c1 jbe 10c236 <_CORE_mutex_Seize+0x1a> 10c275: 53 push %ebx 10c276: 6a 12 push $0x12 10c278: 6a 00 push $0x0 10c27a: 6a 00 push $0x0 10c27c: e8 17 06 00 00 call 10c898 <_Internal_error_Occurred> 10c281: 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; 10c284: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c28b: a1 78 66 12 00 mov 0x126678,%eax 10c290: 89 58 44 mov %ebx,0x44(%eax) 10c293: 8b 55 0c mov 0xc(%ebp),%edx 10c296: 89 50 20 mov %edx,0x20(%eax) 10c299: a1 d4 63 12 00 mov 0x1263d4,%eax 10c29e: 40 inc %eax 10c29f: a3 d4 63 12 00 mov %eax,0x1263d4 10c2a4: ff 75 18 pushl 0x18(%ebp) 10c2a7: 9d popf 10c2a8: 83 ec 08 sub $0x8,%esp 10c2ab: ff 75 14 pushl 0x14(%ebp) 10c2ae: 53 push %ebx 10c2af: e8 18 ff ff ff call 10c1cc <_CORE_mutex_Seize_interrupt_blocking> 10c2b4: 83 c4 10 add $0x10,%esp } 10c2b7: 8b 5d fc mov -0x4(%ebp),%ebx 10c2ba: c9 leave 10c2bb: c3 ret =============================================================================== 00110510 <_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 ) { 110510: 55 push %ebp 110511: 89 e5 mov %esp,%ebp 110513: 56 push %esi 110514: 53 push %ebx 110515: 8b 45 08 mov 0x8(%ebp),%eax 110518: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11051b: 8b 15 78 66 12 00 mov 0x126678,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110521: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110528: 8b 58 50 mov 0x50(%eax),%ebx 11052b: 85 db test %ebx,%ebx 11052d: 74 31 je 110560 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 11052f: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110536: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110539: 8b 5a 08 mov 0x8(%edx),%ebx 11053c: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11053f: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110546: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110549: 83 fb 02 cmp $0x2,%ebx 11054c: 74 26 je 110574 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11054e: 83 fb 03 cmp $0x3,%ebx 110551: 74 3d je 110590 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110553: ff 31 pushl (%ecx) 110555: 9d popf return 0; 110556: 31 c0 xor %eax,%eax 110558: 8d 65 f8 lea -0x8(%ebp),%esp 11055b: 5b pop %ebx 11055c: 5e pop %esi 11055d: c9 leave 11055e: c3 ret 11055f: 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 ) ) { 110560: 3b 50 5c cmp 0x5c(%eax),%edx 110563: 74 17 je 11057c <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110565: b8 01 00 00 00 mov $0x1,%eax 11056a: 8d 65 f8 lea -0x8(%ebp),%esp 11056d: 5b pop %ebx 11056e: 5e pop %esi 11056f: c9 leave 110570: c3 ret 110571: 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++; 110574: ff 42 1c incl 0x1c(%edx) 110577: eb da jmp 110553 <_CORE_mutex_Seize_interrupt_trylock+0x43> 110579: 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 ) { 11057c: 8b 58 40 mov 0x40(%eax),%ebx 11057f: 85 db test %ebx,%ebx 110581: 75 45 jne 1105c8 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110583: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110586: ff 31 pushl (%ecx) 110588: 9d popf return 0; 110589: 31 c0 xor %eax,%eax 11058b: eb dd jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> 11058d: 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++; 110590: 8b 5a 1c mov 0x1c(%edx),%ebx 110593: 8d 73 01 lea 0x1(%ebx),%esi 110596: 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 ) { 110599: 8b 72 14 mov 0x14(%edx),%esi 11059c: 39 70 4c cmp %esi,0x4c(%eax) 11059f: 74 6b je 11060c <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1105a1: 72 39 jb 1105dc <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1105a3: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1105aa: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1105b1: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1105b8: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1105bb: ff 31 pushl (%ecx) 1105bd: 9d popf return 0; 1105be: 31 c0 xor %eax,%eax 1105c0: 8d 65 f8 lea -0x8(%ebp),%esp 1105c3: 5b pop %ebx 1105c4: 5e pop %esi 1105c5: c9 leave 1105c6: c3 ret 1105c7: 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 ) { 1105c8: 4b dec %ebx 1105c9: 75 9a jne 110565 <_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; 1105cb: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 1105d2: ff 31 pushl (%ecx) <== NOT EXECUTED 1105d4: 9d popf <== NOT EXECUTED return 0; 1105d5: 31 c0 xor %eax,%eax <== NOT EXECUTED 1105d7: eb 91 jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 1105d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1105dc: 8b 15 d4 63 12 00 mov 0x1263d4,%edx 1105e2: 42 inc %edx 1105e3: 89 15 d4 63 12 00 mov %edx,0x1263d4 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1105e9: ff 31 pushl (%ecx) 1105eb: 9d popf _Thread_Change_priority( 1105ec: 52 push %edx 1105ed: 6a 00 push $0x0 1105ef: ff 70 4c pushl 0x4c(%eax) 1105f2: ff 70 5c pushl 0x5c(%eax) 1105f5: e8 3e cb ff ff call 10d138 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1105fa: e8 3d d0 ff ff call 10d63c <_Thread_Enable_dispatch> 1105ff: 83 c4 10 add $0x10,%esp return 0; 110602: 31 c0 xor %eax,%eax 110604: e9 61 ff ff ff jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110609: 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 ); 11060c: ff 31 pushl (%ecx) 11060e: 9d popf return 0; 11060f: 31 c0 xor %eax,%eax 110611: e9 54 ff ff ff jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c2bc <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c2bc: 55 push %ebp 10c2bd: 89 e5 mov %esp,%ebp 10c2bf: 53 push %ebx 10c2c0: 83 ec 04 sub $0x4,%esp 10c2c3: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c2c6: 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 ) { 10c2c9: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c2cd: 74 15 je 10c2e4 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c2cf: 3b 05 78 66 12 00 cmp 0x126678,%eax 10c2d5: 74 0d je 10c2e4 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c2d7: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2dc: 8b 5d fc mov -0x4(%ebp),%ebx 10c2df: c9 leave 10c2e0: c3 ret 10c2e1: 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 ) 10c2e4: 8b 53 54 mov 0x54(%ebx),%edx 10c2e7: 85 d2 test %edx,%edx 10c2e9: 74 51 je 10c33c <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c2eb: 4a dec %edx 10c2ec: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c2ef: 85 d2 test %edx,%edx 10c2f1: 75 49 jne 10c33c <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2f3: 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 ) || 10c2f6: 83 fa 02 cmp $0x2,%edx 10c2f9: 74 69 je 10c364 <_CORE_mutex_Surrender+0xa8> 10c2fb: 83 fa 03 cmp $0x3,%edx 10c2fe: 74 64 je 10c364 <_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; 10c300: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c307: 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 ) ) ) { 10c30e: 83 ec 0c sub $0xc,%esp 10c311: 53 push %ebx 10c312: e8 c1 16 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c317: 83 c4 10 add $0x10,%esp 10c31a: 85 c0 test %eax,%eax 10c31c: 74 7a je 10c398 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c31e: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c321: 8b 50 08 mov 0x8(%eax),%edx 10c324: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c327: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c32e: 8b 53 48 mov 0x48(%ebx),%edx 10c331: 83 fa 02 cmp $0x2,%edx 10c334: 74 56 je 10c38c <_CORE_mutex_Surrender+0xd0> 10c336: 83 fa 03 cmp $0x3,%edx 10c339: 74 09 je 10c344 <_CORE_mutex_Surrender+0x88> 10c33b: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c33c: 31 c0 xor %eax,%eax } 10c33e: 8b 5d fc mov -0x4(%ebp),%ebx 10c341: c9 leave 10c342: c3 ret 10c343: 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++; 10c344: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c347: 8b 53 4c mov 0x4c(%ebx),%edx 10c34a: 3b 50 14 cmp 0x14(%eax),%edx 10c34d: 73 ed jae 10c33c <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c34f: 51 push %ecx 10c350: 6a 00 push $0x0 10c352: 52 push %edx 10c353: 50 push %eax 10c354: e8 df 0d 00 00 call 10d138 <_Thread_Change_priority> 10c359: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c35c: 31 c0 xor %eax,%eax 10c35e: e9 79 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> 10c363: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c364: 8b 50 1c mov 0x1c(%eax),%edx 10c367: 4a dec %edx 10c368: 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 && 10c36b: 85 d2 test %edx,%edx 10c36d: 75 91 jne 10c300 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c36f: 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 && 10c372: 3b 50 14 cmp 0x14(%eax),%edx 10c375: 74 89 je 10c300 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c377: 51 push %ecx 10c378: 6a 01 push $0x1 10c37a: 52 push %edx 10c37b: 50 push %eax 10c37c: e8 b7 0d 00 00 call 10d138 <_Thread_Change_priority> 10c381: 83 c4 10 add $0x10,%esp 10c384: e9 77 ff ff ff jmp 10c300 <_CORE_mutex_Surrender+0x44> 10c389: 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++; 10c38c: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c38f: 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; 10c391: e9 46 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> 10c396: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c398: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c39f: 31 c0 xor %eax,%eax 10c3a1: e9 36 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c3f4 <_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 ) { 10c3f4: 55 push %ebp 10c3f5: 89 e5 mov %esp,%ebp 10c3f7: 53 push %ebx 10c3f8: 83 ec 10 sub $0x10,%esp 10c3fb: 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)) ) { 10c3fe: 53 push %ebx 10c3ff: e8 d4 15 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c404: 83 c4 10 add $0x10,%esp 10c407: 85 c0 test %eax,%eax 10c409: 74 09 je 10c414 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c40b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c40d: 8b 5d fc mov -0x4(%ebp),%ebx 10c410: c9 leave 10c411: c3 ret 10c412: 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 ); 10c414: 9c pushf 10c415: fa cli 10c416: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c417: 8b 43 48 mov 0x48(%ebx),%eax 10c41a: 3b 43 40 cmp 0x40(%ebx),%eax 10c41d: 72 0d jb 10c42c <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c41f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c424: 52 push %edx 10c425: 9d popf } return status; } 10c426: 8b 5d fc mov -0x4(%ebp),%ebx 10c429: c9 leave 10c42a: c3 ret 10c42b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c42c: 40 inc %eax 10c42d: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c430: 31 c0 xor %eax,%eax 10c432: eb f0 jmp 10c424 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010c044 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10c044: 55 push %ebp 10c045: 89 e5 mov %esp,%ebp 10c047: 53 push %ebx 10c048: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10c04b: 9c pushf 10c04c: fa cli 10c04d: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10c04e: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c050: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10c053: 39 c8 cmp %ecx,%eax 10c055: 74 0d je 10c064 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10c057: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10c059: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10c05b: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10c05e: 53 push %ebx 10c05f: 9d popf return return_node; } 10c060: 5b pop %ebx 10c061: c9 leave 10c062: c3 ret 10c063: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10c064: 31 c0 xor %eax,%eax 10c066: eb f6 jmp 10c05e <_Chain_Get+0x1a> =============================================================================== 00110480 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110480: 55 push %ebp 110481: 89 e5 mov %esp,%ebp 110483: 57 push %edi 110484: 56 push %esi 110485: 53 push %ebx 110486: 8b 7d 08 mov 0x8(%ebp),%edi 110489: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 11048c: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 11048e: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110495: 8b 45 10 mov 0x10(%ebp),%eax 110498: 85 c0 test %eax,%eax 11049a: 74 21 je 1104bd <_Chain_Initialize+0x3d><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 11049c: 8b 4d 10 mov 0x10(%ebp),%ecx 11049f: 8b 45 0c mov 0xc(%ebp),%eax 1104a2: eb 04 jmp 1104a8 <_Chain_Initialize+0x28> while ( count-- ) { 1104a4: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 1104a6: 89 d8 mov %ebx,%eax count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 1104a8: 89 02 mov %eax,(%edx) next->previous = current; 1104aa: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1104ad: 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-- ) { 1104b0: 49 dec %ecx 1104b1: 75 f1 jne 1104a4 <_Chain_Initialize+0x24> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1104b3: 8b 55 10 mov 0x10(%ebp),%edx 1104b6: 4a dec %edx 1104b7: 0f af d6 imul %esi,%edx 1104ba: 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; 1104bd: 8d 47 04 lea 0x4(%edi),%eax 1104c0: 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; 1104c2: 89 57 08 mov %edx,0x8(%edi) } 1104c5: 5b pop %ebx 1104c6: 5e pop %esi 1104c7: 5f pop %edi 1104c8: c9 leave 1104c9: c3 ret =============================================================================== 0010b0f8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b0f8: 55 push %ebp 10b0f9: 89 e5 mov %esp,%ebp 10b0fb: 57 push %edi 10b0fc: 56 push %esi 10b0fd: 53 push %ebx 10b0fe: 83 ec 2c sub $0x2c,%esp 10b101: 8b 45 08 mov 0x8(%ebp),%eax 10b104: 8b 4d 0c mov 0xc(%ebp),%ecx 10b107: 8b 55 10 mov 0x10(%ebp),%edx 10b10a: 89 55 dc mov %edx,-0x24(%ebp) 10b10d: 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; 10b110: 8b 1d 78 66 12 00 mov 0x126678,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b116: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b11d: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b123: 9c pushf 10b124: fa cli 10b125: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b128: 8b 16 mov (%esi),%edx 10b12a: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b12d: 21 c2 and %eax,%edx 10b12f: 89 55 e4 mov %edx,-0x1c(%ebp) 10b132: 74 0d je 10b141 <_Event_Seize+0x49> 10b134: 39 d0 cmp %edx,%eax 10b136: 0f 84 84 00 00 00 je 10b1c0 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b13c: f6 c1 02 test $0x2,%cl 10b13f: 75 7f jne 10b1c0 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b141: f6 c1 01 test $0x1,%cl 10b144: 75 62 jne 10b1a8 <_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; 10b146: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b149: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b14c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b14f: c7 05 88 66 12 00 01 movl $0x1,0x126688 10b156: 00 00 00 _ISR_Enable( level ); 10b159: ff 75 e0 pushl -0x20(%ebp) 10b15c: 9d popf if ( ticks ) { 10b15d: 8b 45 dc mov -0x24(%ebp),%eax 10b160: 85 c0 test %eax,%eax 10b162: 0f 85 80 00 00 00 jne 10b1e8 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b168: 83 ec 08 sub $0x8,%esp 10b16b: 68 00 01 00 00 push $0x100 10b170: 53 push %ebx 10b171: e8 7a 2d 00 00 call 10def0 <_Thread_Set_state> _ISR_Disable( level ); 10b176: 9c pushf 10b177: fa cli 10b178: 5a pop %edx sync_state = _Event_Sync_state; 10b179: a1 88 66 12 00 mov 0x126688,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b17e: c7 05 88 66 12 00 00 movl $0x0,0x126688 10b185: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b188: 83 c4 10 add $0x10,%esp 10b18b: 83 f8 01 cmp $0x1,%eax 10b18e: 74 4c je 10b1dc <_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 ); 10b190: 89 55 10 mov %edx,0x10(%ebp) 10b193: 89 5d 0c mov %ebx,0xc(%ebp) 10b196: 89 45 08 mov %eax,0x8(%ebp) } 10b199: 8d 65 f4 lea -0xc(%ebp),%esp 10b19c: 5b pop %ebx 10b19d: 5e pop %esi 10b19e: 5f pop %edi 10b19f: 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 ); 10b1a0: e9 47 1f 00 00 jmp 10d0ec <_Thread_blocking_operation_Cancel> 10b1a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b1a8: ff 75 e0 pushl -0x20(%ebp) 10b1ab: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b1ac: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b1b3: 8b 55 e4 mov -0x1c(%ebp),%edx 10b1b6: 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 ); } 10b1b8: 8d 65 f4 lea -0xc(%ebp),%esp 10b1bb: 5b pop %ebx 10b1bc: 5e pop %esi 10b1bd: 5f pop %edi 10b1be: c9 leave 10b1bf: 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) ); 10b1c0: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1c3: f7 d0 not %eax 10b1c5: 23 45 d4 and -0x2c(%ebp),%eax 10b1c8: 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 ); 10b1ca: ff 75 e0 pushl -0x20(%ebp) 10b1cd: 9d popf *event_out = seized_events; 10b1ce: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1d1: 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 ); } 10b1d3: 8d 65 f4 lea -0xc(%ebp),%esp 10b1d6: 5b pop %ebx 10b1d7: 5e pop %esi 10b1d8: 5f pop %edi 10b1d9: c9 leave 10b1da: c3 ret 10b1db: 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 ); 10b1dc: 52 push %edx 10b1dd: 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 ); } 10b1de: 8d 65 f4 lea -0xc(%ebp),%esp 10b1e1: 5b pop %ebx 10b1e2: 5e pop %esi 10b1e3: 5f pop %edi 10b1e4: c9 leave 10b1e5: c3 ret 10b1e6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b1e8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b1eb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b1f2: c7 43 64 9c b3 10 00 movl $0x10b39c,0x64(%ebx) the_watchdog->id = id; 10b1f9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b1fc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b203: 8b 45 dc mov -0x24(%ebp),%eax 10b206: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b209: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b20c: 8d 43 48 lea 0x48(%ebx),%eax 10b20f: 50 push %eax 10b210: 68 a4 64 12 00 push $0x1264a4 10b215: e8 3e 33 00 00 call 10e558 <_Watchdog_Insert> 10b21a: 83 c4 10 add $0x10,%esp 10b21d: e9 46 ff ff ff jmp 10b168 <_Event_Seize+0x70> =============================================================================== 0010b278 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b278: 55 push %ebp 10b279: 89 e5 mov %esp,%ebp 10b27b: 57 push %edi 10b27c: 56 push %esi 10b27d: 53 push %ebx 10b27e: 83 ec 2c sub $0x2c,%esp 10b281: 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 ]; 10b284: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b28a: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b28d: 9c pushf 10b28e: fa cli 10b28f: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b292: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b294: 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 ) ) { 10b297: 89 c6 mov %eax,%esi 10b299: 21 d6 and %edx,%esi 10b29b: 89 75 e4 mov %esi,-0x1c(%ebp) 10b29e: 74 74 je 10b314 <_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() && 10b2a0: 8b 35 74 66 12 00 mov 0x126674,%esi 10b2a6: 85 f6 test %esi,%esi 10b2a8: 74 0c je 10b2b6 <_Event_Surrender+0x3e> 10b2aa: 3b 1d 78 66 12 00 cmp 0x126678,%ebx 10b2b0: 0f 84 96 00 00 00 je 10b34c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b2b6: f6 43 11 01 testb $0x1,0x11(%ebx) 10b2ba: 74 4c je 10b308 <_Event_Surrender+0x90> 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+0x4e> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 42 je 10b308 <_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) ); 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 75 e4 mov -0x1c(%ebp),%esi 10b2dc: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b2de: ff 75 d4 pushl -0x2c(%ebp) 10b2e1: 9d popf 10b2e2: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b2e3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b2e7: 74 37 je 10b320 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b2e9: ff 75 d4 pushl -0x2c(%ebp) 10b2ec: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b2ed: 83 ec 08 sub $0x8,%esp 10b2f0: 68 f8 ff 03 10 push $0x1003fff8 10b2f5: 53 push %ebx 10b2f6: e8 7d 1f 00 00 call 10d278 <_Thread_Clear_state> 10b2fb: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b2fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b301: 5b pop %ebx 10b302: 5e pop %esi 10b303: 5f pop %edi 10b304: c9 leave 10b305: c3 ret 10b306: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b308: ff 75 d4 pushl -0x2c(%ebp) 10b30b: 9d popf } 10b30c: 8d 65 f4 lea -0xc(%ebp),%esp 10b30f: 5b pop %ebx 10b310: 5e pop %esi 10b311: 5f pop %edi 10b312: c9 leave 10b313: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b314: ff 75 d4 pushl -0x2c(%ebp) 10b317: 9d popf } return; } } _ISR_Enable( level ); } 10b318: 8d 65 f4 lea -0xc(%ebp),%esp 10b31b: 5b pop %ebx 10b31c: 5e pop %esi 10b31d: 5f pop %edi 10b31e: c9 leave 10b31f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b320: 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 ); 10b327: ff 75 d4 pushl -0x2c(%ebp) 10b32a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b32b: 83 ec 0c sub $0xc,%esp 10b32e: 8d 43 48 lea 0x48(%ebx),%eax 10b331: 50 push %eax 10b332: e8 59 33 00 00 call 10e690 <_Watchdog_Remove> 10b337: 58 pop %eax 10b338: 5a pop %edx 10b339: 68 f8 ff 03 10 push $0x1003fff8 10b33e: 53 push %ebx 10b33f: e8 34 1f 00 00 call 10d278 <_Thread_Clear_state> 10b344: 83 c4 10 add $0x10,%esp 10b347: eb c3 jmp 10b30c <_Event_Surrender+0x94> 10b349: 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) || 10b34c: 8b 35 88 66 12 00 mov 0x126688,%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 ) && 10b352: 83 fe 02 cmp $0x2,%esi 10b355: 74 0d je 10b364 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b357: 8b 35 88 66 12 00 mov 0x126688,%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) || 10b35d: 4e dec %esi 10b35e: 0f 85 52 ff ff ff jne 10b2b6 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b364: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b367: 74 05 je 10b36e <_Event_Surrender+0xf6> 10b369: 83 e7 02 and $0x2,%edi 10b36c: 74 22 je 10b390 <_Event_Surrender+0x118><== NEVER TAKEN 10b36e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b371: f7 d0 not %eax 10b373: 21 d0 and %edx,%eax 10b375: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b377: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b37e: 8b 43 28 mov 0x28(%ebx),%eax 10b381: 8b 55 e4 mov -0x1c(%ebp),%edx 10b384: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b386: c7 05 88 66 12 00 03 movl $0x3,0x126688 10b38d: 00 00 00 } _ISR_Enable( level ); 10b390: ff 75 d4 pushl -0x2c(%ebp) 10b393: 9d popf return; 10b394: e9 73 ff ff ff jmp 10b30c <_Event_Surrender+0x94> =============================================================================== 0010b39c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b39c: 55 push %ebp 10b39d: 89 e5 mov %esp,%ebp 10b39f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b3a2: 8d 45 f4 lea -0xc(%ebp),%eax 10b3a5: 50 push %eax 10b3a6: ff 75 08 pushl 0x8(%ebp) 10b3a9: e8 b2 22 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10b3ae: 83 c4 10 add $0x10,%esp 10b3b1: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b4: 85 d2 test %edx,%edx 10b3b6: 75 37 jne 10b3ef <_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 ); 10b3b8: 9c pushf 10b3b9: fa cli 10b3ba: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b3bb: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b3c2: 3b 05 78 66 12 00 cmp 0x126678,%eax 10b3c8: 74 2a je 10b3f4 <_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; 10b3ca: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b3d1: 52 push %edx 10b3d2: 9d popf 10b3d3: 83 ec 08 sub $0x8,%esp 10b3d6: 68 f8 ff 03 10 push $0x1003fff8 10b3db: 50 push %eax 10b3dc: e8 97 1e 00 00 call 10d278 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b3e1: a1 d4 63 12 00 mov 0x1263d4,%eax 10b3e6: 48 dec %eax 10b3e7: a3 d4 63 12 00 mov %eax,0x1263d4 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b3ef: c9 leave 10b3f0: c3 ret 10b3f1: 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 ) 10b3f4: 8b 0d 88 66 12 00 mov 0x126688,%ecx 10b3fa: 49 dec %ecx 10b3fb: 75 cd jne 10b3ca <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b3fd: c7 05 88 66 12 00 02 movl $0x2,0x126688 10b404: 00 00 00 10b407: eb c1 jmp 10b3ca <_Event_Timeout+0x2e> =============================================================================== 00110674 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110674: 55 push %ebp 110675: 89 e5 mov %esp,%ebp 110677: 57 push %edi 110678: 56 push %esi 110679: 53 push %ebx 11067a: 83 ec 2c sub $0x2c,%esp 11067d: 8b 7d 0c mov 0xc(%ebp),%edi if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110680: 8b 45 08 mov 0x8(%ebp),%eax 110683: 8b 48 08 mov 0x8(%eax),%ecx ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 110686: 8d 57 04 lea 0x4(%edi),%edx 110689: 89 55 dc mov %edx,-0x24(%ebp) - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 11068c: 8b 40 10 mov 0x10(%eax),%eax 11068f: 89 45 cc mov %eax,-0x34(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110692: 39 d7 cmp %edx,%edi 110694: 0f 87 5a 01 00 00 ja 1107f4 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11069a: 8b 75 14 mov 0x14(%ebp),%esi 11069d: 85 f6 test %esi,%esi 11069f: 0f 85 48 01 00 00 jne 1107ed <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1106a5: 39 4d 08 cmp %ecx,0x8(%ebp) 1106a8: 0f 84 46 01 00 00 je 1107f4 <_Heap_Allocate_aligned_with_boundary+0x180> 1106ae: c7 45 e4 00 00 00 00 movl $0x0,-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 1106b5: 8b 45 cc mov -0x34(%ebp),%eax 1106b8: 83 c0 07 add $0x7,%eax 1106bb: 89 45 c8 mov %eax,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 1106be: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 1106c5: 29 7d d0 sub %edi,-0x30(%ebp) 1106c8: eb 19 jmp 1106e3 <_Heap_Allocate_aligned_with_boundary+0x6f> 1106ca: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106cc: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 1106cf: 85 db test %ebx,%ebx 1106d1: 0f 85 e9 00 00 00 jne 1107c0 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 1106d7: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1106da: 39 4d 08 cmp %ecx,0x8(%ebp) 1106dd: 0f 84 1d 01 00 00 je 110800 <_Heap_Allocate_aligned_with_boundary+0x18c> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 1106e3: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 1106e6: 8b 59 04 mov 0x4(%ecx),%ebx 1106e9: 39 5d dc cmp %ebx,-0x24(%ebp) 1106ec: 73 e9 jae 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1106ee: 8b 55 10 mov 0x10(%ebp),%edx 1106f1: 85 d2 test %edx,%edx 1106f3: 74 d7 je 1106cc <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1106f5: 8b 55 08 mov 0x8(%ebp),%edx 1106f8: 8b 52 14 mov 0x14(%edx),%edx 1106fb: 89 55 d8 mov %edx,-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; 1106fe: 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; 110701: 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; 110704: 8d 41 08 lea 0x8(%ecx),%eax 110707: 89 45 d4 mov %eax,-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; 11070a: 8b 75 c8 mov -0x38(%ebp),%esi 11070d: 29 d6 sub %edx,%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 11070f: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110711: 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); 110714: 89 d8 mov %ebx,%eax 110716: 31 d2 xor %edx,%edx 110718: f7 75 10 divl 0x10(%ebp) 11071b: 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 ) { 11071d: 39 de cmp %ebx,%esi 11071f: 73 0b jae 11072c <_Heap_Allocate_aligned_with_boundary+0xb8> 110721: 89 f0 mov %esi,%eax 110723: 31 d2 xor %edx,%edx 110725: f7 75 10 divl 0x10(%ebp) 110728: 89 f3 mov %esi,%ebx 11072a: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11072c: 8b 45 14 mov 0x14(%ebp),%eax 11072f: 85 c0 test %eax,%eax 110731: 74 57 je 11078a <_Heap_Allocate_aligned_with_boundary+0x116> /* 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; 110733: 8d 34 3b lea (%ebx,%edi,1),%esi 110736: 89 f0 mov %esi,%eax 110738: 31 d2 xor %edx,%edx 11073a: f7 75 14 divl 0x14(%ebp) 11073d: 89 f0 mov %esi,%eax 11073f: 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 ) { 110741: 39 c3 cmp %eax,%ebx 110743: 73 45 jae 11078a <_Heap_Allocate_aligned_with_boundary+0x116> 110745: 39 c6 cmp %eax,%esi 110747: 76 41 jbe 11078a <_Heap_Allocate_aligned_with_boundary+0x116> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110749: 8b 55 d4 mov -0x2c(%ebp),%edx 11074c: 01 fa add %edi,%edx 11074e: 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 ) { 110751: 39 c2 cmp %eax,%edx 110753: 77 82 ja 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> 110755: 89 ce mov %ecx,%esi 110757: eb 10 jmp 110769 <_Heap_Allocate_aligned_with_boundary+0xf5> 110759: 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 ) { 11075c: 39 c1 cmp %eax,%ecx 11075e: 76 28 jbe 110788 <_Heap_Allocate_aligned_with_boundary+0x114> if ( boundary_line < boundary_floor ) { 110760: 39 45 e0 cmp %eax,-0x20(%ebp) 110763: 0f 87 9b 00 00 00 ja 110804 <_Heap_Allocate_aligned_with_boundary+0x190><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110769: 89 c3 mov %eax,%ebx 11076b: 29 fb sub %edi,%ebx 11076d: 89 d8 mov %ebx,%eax 11076f: 31 d2 xor %edx,%edx 110771: f7 75 10 divl 0x10(%ebp) 110774: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110776: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110779: 89 c8 mov %ecx,%eax 11077b: 31 d2 xor %edx,%edx 11077d: f7 75 14 divl 0x14(%ebp) 110780: 89 c8 mov %ecx,%eax 110782: 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 ) { 110784: 39 c3 cmp %eax,%ebx 110786: 72 d4 jb 11075c <_Heap_Allocate_aligned_with_boundary+0xe8> 110788: 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 ) { 11078a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11078d: 0f 87 44 ff ff ff ja 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> 110793: be f8 ff ff ff mov $0xfffffff8,%esi 110798: 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); 11079a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11079c: 89 d8 mov %ebx,%eax 11079e: 31 d2 xor %edx,%edx 1107a0: 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; 1107a3: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1107a5: 39 75 d8 cmp %esi,-0x28(%ebp) 1107a8: 0f 86 21 ff ff ff jbe 1106cf <_Heap_Allocate_aligned_with_boundary+0x5b> 1107ae: 85 f6 test %esi,%esi 1107b0: 0f 85 21 ff ff ff jne 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 1107b6: 85 db test %ebx,%ebx 1107b8: 0f 84 19 ff ff ff je 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 1107be: 66 90 xchg %ax,%ax block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 1107c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1107c3: 8b 45 08 mov 0x8(%ebp),%eax 1107c6: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1107c9: 57 push %edi 1107ca: 53 push %ebx 1107cb: 51 push %ecx 1107cc: 50 push %eax 1107cd: e8 d2 bf ff ff call 10c7a4 <_Heap_Block_allocate> 1107d2: 89 d8 mov %ebx,%eax 1107d4: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1107d7: 8b 55 e4 mov -0x1c(%ebp),%edx 1107da: 8b 4d 08 mov 0x8(%ebp),%ecx 1107dd: 39 51 44 cmp %edx,0x44(%ecx) 1107e0: 73 14 jae 1107f6 <_Heap_Allocate_aligned_with_boundary+0x182> stats->max_search = search_count; 1107e2: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1107e5: 8d 65 f4 lea -0xc(%ebp),%esp 1107e8: 5b pop %ebx 1107e9: 5e pop %esi 1107ea: 5f pop %edi 1107eb: c9 leave 1107ec: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1107ed: 3b 7d 14 cmp 0x14(%ebp),%edi 1107f0: 76 19 jbe 11080b <_Heap_Allocate_aligned_with_boundary+0x197> 1107f2: 66 90 xchg %ax,%ax if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1107f4: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107f6: 8d 65 f4 lea -0xc(%ebp),%esp 1107f9: 5b pop %ebx 1107fa: 5e pop %esi 1107fb: 5f pop %edi 1107fc: c9 leave 1107fd: c3 ret 1107fe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110800: 31 c0 xor %eax,%eax 110802: eb d3 jmp 1107d7 <_Heap_Allocate_aligned_with_boundary+0x163> 110804: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110806: e9 cc fe ff ff jmp 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 11080b: 8b 5d 10 mov 0x10(%ebp),%ebx 11080e: 85 db test %ebx,%ebx 110810: 0f 85 8f fe ff ff jne 1106a5 <_Heap_Allocate_aligned_with_boundary+0x31> alignment = page_size; 110816: 89 45 10 mov %eax,0x10(%ebp) 110819: e9 87 fe ff ff jmp 1106a5 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010c6c4 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c6c4: 55 push %ebp 10c6c5: 89 e5 mov %esp,%ebp 10c6c7: 57 push %edi 10c6c8: 56 push %esi 10c6c9: 53 push %ebx 10c6ca: 83 ec 14 sub $0x14,%esp 10c6cd: 8b 4d 08 mov 0x8(%ebp),%ecx 10c6d0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c6d3: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c6d6: 8b 41 14 mov 0x14(%ecx),%eax 10c6d9: 89 45 e8 mov %eax,-0x18(%ebp) if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c6dc: 8b 43 04 mov 0x4(%ebx),%eax 10c6df: 89 45 e4 mov %eax,-0x1c(%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; 10c6e2: 89 c6 mov %eax,%esi 10c6e4: 83 e6 fe and $0xfffffffe,%esi { 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; 10c6e7: 8b 55 e8 mov -0x18(%ebp),%edx 10c6ea: 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; 10c6ed: 8b 45 14 mov 0x14(%ebp),%eax 10c6f0: 39 d0 cmp %edx,%eax 10c6f2: 73 02 jae 10c6f6 <_Heap_Block_split+0x32> 10c6f4: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c6f6: 83 c0 08 add $0x8,%eax 10c6f9: 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; 10c6fc: 31 d2 xor %edx,%edx 10c6fe: f7 f7 div %edi if ( remainder != 0 ) { 10c700: 85 d2 test %edx,%edx 10c702: 74 70 je 10c774 <_Heap_Block_split+0xb0> return value - remainder + alignment; 10c704: 03 7d f0 add -0x10(%ebp),%edi 10c707: 29 d7 sub %edx,%edi 10c709: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c70c: 8d 04 33 lea (%ebx,%esi,1),%eax 10c70f: 89 45 e0 mov %eax,-0x20(%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_BLOCK_SIZE_OFFSET - used_size; 10c712: 8d 56 04 lea 0x4(%esi),%edx 10c715: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_BLOCK_SIZE_OFFSET; 10c718: 8b 7d e8 mov -0x18(%ebp),%edi 10c71b: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10c71e: 39 fa cmp %edi,%edx 10c720: 72 5a jb 10c77c <_Heap_Block_split+0xb8> 10c722: 8b 55 ec mov -0x14(%ebp),%edx 10c725: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c727: 2b 75 ec sub -0x14(%ebp),%esi 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; 10c72a: 8b 7d e4 mov -0x1c(%ebp),%edi 10c72d: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 10c730: 0b 7d ec or -0x14(%ebp),%edi 10c733: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c736: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c739: 8b 58 04 mov 0x4(%eax),%ebx 10c73c: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c73f: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c744: 75 46 jne 10c78c <_Heap_Block_split+0xc8> if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c746: 8b 48 08 mov 0x8(%eax),%ecx 10c749: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c74c: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c74f: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c752: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c755: 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; 10c758: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c75a: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c75d: 89 f1 mov %esi,%ecx 10c75f: 83 c9 01 or $0x1,%ecx 10c762: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c765: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c767: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c76b: 83 c4 14 add $0x14,%esp 10c76e: 5b pop %ebx 10c76f: 5e pop %esi 10c770: 5f pop %edi 10c771: c9 leave 10c772: c3 ret 10c773: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c774: 8b 7d f0 mov -0x10(%ebp),%edi 10c777: 89 7d ec mov %edi,-0x14(%ebp) 10c77a: eb 90 jmp 10c70c <_Heap_Block_split+0x48> free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c77c: 8b 45 e0 mov -0x20(%ebp),%eax 10c77f: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c783: 83 c4 14 add $0x14,%esp 10c786: 5b pop %ebx 10c787: 5e pop %esi 10c788: 5f pop %edi 10c789: c9 leave 10c78a: c3 ret 10c78b: 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; 10c78c: 8b 7d 10 mov 0x10(%ebp),%edi 10c78f: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c792: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c795: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c798: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c79b: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c79e: ff 41 38 incl 0x38(%ecx) 10c7a1: eb ba jmp 10c75d <_Heap_Block_split+0x99> =============================================================================== 00110bdc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110bdc: 55 push %ebp 110bdd: 89 e5 mov %esp,%ebp 110bdf: 57 push %edi 110be0: 56 push %esi 110be1: 53 push %ebx 110be2: 83 ec 4c sub $0x4c,%esp 110be5: 8b 5d 08 mov 0x8(%ebp),%ebx 110be8: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110beb: 8b 43 20 mov 0x20(%ebx),%eax 110bee: 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; 110bf1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110bf8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110bff: 8b 53 10 mov 0x10(%ebx),%edx 110c02: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110c05: 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; 110c08: 8b 73 30 mov 0x30(%ebx),%esi 110c0b: 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 ) { 110c0e: 8b 55 0c mov 0xc(%ebp),%edx 110c11: 01 ca add %ecx,%edx 110c13: 89 55 cc mov %edx,-0x34(%ebp) 110c16: 73 0c jae 110c24 <_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; 110c18: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110c1a: 8d 65 f4 lea -0xc(%ebp),%esp 110c1d: 5b pop %ebx 110c1e: 5e pop %esi 110c1f: 5f pop %edi 110c20: c9 leave 110c21: c3 ret 110c22: 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( 110c24: 83 ec 08 sub $0x8,%esp 110c27: 8d 55 e0 lea -0x20(%ebp),%edx 110c2a: 52 push %edx 110c2b: 8d 55 e4 lea -0x1c(%ebp),%edx 110c2e: 52 push %edx 110c2f: 50 push %eax 110c30: ff 75 d4 pushl -0x2c(%ebp) 110c33: 51 push %ecx 110c34: ff 75 0c pushl 0xc(%ebp) 110c37: e8 64 bc ff ff call 10c8a0 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110c3c: 83 c4 20 add $0x20,%esp 110c3f: 84 c0 test %al,%al 110c41: 74 d5 je 110c18 <_Heap_Extend+0x3c> 110c43: 8b 7d d0 mov -0x30(%ebp),%edi 110c46: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110c4d: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110c54: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110c5b: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110c62: 8b 75 cc mov -0x34(%ebp),%esi 110c65: 89 5d b4 mov %ebx,-0x4c(%ebp) 110c68: eb 30 jmp 110c9a <_Heap_Extend+0xbe> 110c6a: 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 ) { 110c6c: 39 ce cmp %ecx,%esi 110c6e: 73 03 jae 110c73 <_Heap_Extend+0x97> 110c70: 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); 110c73: 8d 59 f8 lea -0x8(%ecx),%ebx 110c76: 89 c8 mov %ecx,%eax 110c78: 31 d2 xor %edx,%edx 110c7a: 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); 110c7d: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110c7f: 3b 4d 0c cmp 0xc(%ebp),%ecx 110c82: 74 3c je 110cc0 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110c84: 39 4d 0c cmp %ecx,0xc(%ebp) 110c87: 76 03 jbe 110c8c <_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 ) 110c89: 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; 110c8c: 8b 7b 04 mov 0x4(%ebx),%edi 110c8f: 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); 110c92: 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 ); 110c95: 39 7d d0 cmp %edi,-0x30(%ebp) 110c98: 74 39 je 110cd3 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110c9a: 3b 7d d0 cmp -0x30(%ebp),%edi 110c9d: 0f 84 35 01 00 00 je 110dd8 <_Heap_Extend+0x1fc> 110ca3: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110ca5: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110ca7: 39 4d 0c cmp %ecx,0xc(%ebp) 110caa: 73 08 jae 110cb4 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110cac: 39 f0 cmp %esi,%eax 110cae: 0f 82 64 ff ff ff jb 110c18 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110cb4: 39 f0 cmp %esi,%eax 110cb6: 75 b4 jne 110c6c <_Heap_Extend+0x90> 110cb8: 89 7d c4 mov %edi,-0x3c(%ebp) 110cbb: eb b6 jmp 110c73 <_Heap_Extend+0x97> 110cbd: 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; 110cc0: 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 ) 110cc2: 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; 110cc5: 8b 7b 04 mov 0x4(%ebx),%edi 110cc8: 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); 110ccb: 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 ); 110cce: 39 7d d0 cmp %edi,-0x30(%ebp) 110cd1: 75 c7 jne 110c9a <_Heap_Extend+0xbe> <== NEVER TAKEN 110cd3: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110cd6: 8b 75 0c mov 0xc(%ebp),%esi 110cd9: 3b 73 18 cmp 0x18(%ebx),%esi 110cdc: 0f 82 02 01 00 00 jb 110de4 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110ce2: 8b 45 cc mov -0x34(%ebp),%eax 110ce5: 3b 43 1c cmp 0x1c(%ebx),%eax 110ce8: 76 03 jbe 110ced <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110cea: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110ced: 8b 55 e0 mov -0x20(%ebp),%edx 110cf0: 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 = 110cf3: 89 d1 mov %edx,%ecx 110cf5: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110cf7: 8b 75 cc mov -0x34(%ebp),%esi 110cfa: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110cfc: 89 ce mov %ecx,%esi 110cfe: 83 ce 01 or $0x1,%esi 110d01: 89 70 04 mov %esi,0x4(%eax) extend_last_block->prev_size = extend_first_block_size; 110d04: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110d06: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 110d0d: 39 43 20 cmp %eax,0x20(%ebx) 110d10: 0f 86 d6 00 00 00 jbe 110dec <_Heap_Extend+0x210> heap->first_block = extend_first_block; 110d16: 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 ) { 110d19: 8b 75 c4 mov -0x3c(%ebp),%esi 110d1c: 85 f6 test %esi,%esi 110d1e: 0f 84 04 01 00 00 je 110e28 <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110d24: 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 ); 110d27: 8b 4d 0c mov 0xc(%ebp),%ecx 110d2a: 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; 110d2d: 89 c8 mov %ecx,%eax 110d2f: 31 d2 xor %edx,%edx 110d31: f7 f6 div %esi if ( remainder != 0 ) { 110d33: 85 d2 test %edx,%edx 110d35: 74 04 je 110d3b <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 110d37: 01 f1 add %esi,%ecx <== NOT EXECUTED 110d39: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 110d3b: 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; 110d3e: 8b 75 c4 mov -0x3c(%ebp),%esi 110d41: 8b 06 mov (%esi),%eax 110d43: 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 = 110d46: 89 f0 mov %esi,%eax 110d48: 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; 110d4a: 83 c8 01 or $0x1,%eax 110d4d: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110d50: 89 d8 mov %ebx,%eax 110d52: e8 69 fe ff ff call 110bc0 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110d57: 8b 45 c8 mov -0x38(%ebp),%eax 110d5a: 85 c0 test %eax,%eax 110d5c: 0f 84 9e 00 00 00 je 110e00 <_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, 110d62: 8b 4d cc mov -0x34(%ebp),%ecx 110d65: 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( 110d68: 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); 110d6b: 89 c8 mov %ecx,%eax 110d6d: 31 d2 xor %edx,%edx 110d6f: f7 73 10 divl 0x10(%ebx) 110d72: 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) 110d74: 8b 55 c8 mov -0x38(%ebp),%edx 110d77: 8b 42 04 mov 0x4(%edx),%eax 110d7a: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110d7c: 83 c8 01 or $0x1,%eax 110d7f: 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; 110d83: 8b 42 04 mov 0x4(%edx),%eax 110d86: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110d89: 09 c8 or %ecx,%eax 110d8b: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110d8e: 89 d8 mov %ebx,%eax 110d90: e8 2b fe ff ff call 110bc0 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110d95: 8b 75 c4 mov -0x3c(%ebp),%esi 110d98: 85 f6 test %esi,%esi 110d9a: 0f 84 a4 00 00 00 je 110e44 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110da0: 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( 110da3: 8b 43 20 mov 0x20(%ebx),%eax 110da6: 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; 110da8: 8b 4a 04 mov 0x4(%edx),%ecx 110dab: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110dae: 09 c8 or %ecx,%eax 110db0: 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; 110db3: 8b 43 30 mov 0x30(%ebx),%eax 110db6: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110db9: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110dbc: 8b 55 14 mov 0x14(%ebp),%edx 110dbf: 85 d2 test %edx,%edx 110dc1: 0f 84 99 00 00 00 je 110e60 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 110dc7: 8b 55 14 mov 0x14(%ebp),%edx 110dca: 89 02 mov %eax,(%edx) return true; 110dcc: b0 01 mov $0x1,%al } 110dce: 8d 65 f4 lea -0xc(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: 5f pop %edi 110dd4: c9 leave 110dd5: c3 ret 110dd6: 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; 110dd8: 8b 55 b4 mov -0x4c(%ebp),%edx 110ddb: 8b 42 18 mov 0x18(%edx),%eax 110dde: e9 c2 fe ff ff jmp 110ca5 <_Heap_Extend+0xc9> 110de3: 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; 110de4: 89 73 18 mov %esi,0x18(%ebx) 110de7: e9 01 ff ff ff jmp 110ced <_Heap_Extend+0x111> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; 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 ) { 110dec: 39 53 24 cmp %edx,0x24(%ebx) 110def: 0f 83 24 ff ff ff jae 110d19 <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110df5: 89 53 24 mov %edx,0x24(%ebx) 110df8: e9 1c ff ff ff jmp 110d19 <_Heap_Extend+0x13d> 110dfd: 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 ) { 110e00: 8b 7d bc mov -0x44(%ebp),%edi 110e03: 85 ff test %edi,%edi 110e05: 74 8e je 110d95 <_Heap_Extend+0x1b9> _Heap_Link_above( 110e07: 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 ); 110e0a: 8b 45 e4 mov -0x1c(%ebp),%eax 110e0d: 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; 110e10: 8b 75 bc mov -0x44(%ebp),%esi 110e13: 8b 56 04 mov 0x4(%esi),%edx 110e16: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110e19: 09 d0 or %edx,%eax 110e1b: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110e1e: 83 49 04 01 orl $0x1,0x4(%ecx) 110e22: e9 6e ff ff ff jmp 110d95 <_Heap_Extend+0x1b9> 110e27: 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 ) { 110e28: 8b 4d b8 mov -0x48(%ebp),%ecx 110e2b: 85 c9 test %ecx,%ecx 110e2d: 0f 84 24 ff ff ff je 110d57 <_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; 110e33: 8b 45 b8 mov -0x48(%ebp),%eax 110e36: 29 d0 sub %edx,%eax 110e38: 83 c8 01 or $0x1,%eax 110e3b: 89 42 04 mov %eax,0x4(%edx) 110e3e: e9 14 ff ff ff jmp 110d57 <_Heap_Extend+0x17b> 110e43: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110e44: 8b 4d c8 mov -0x38(%ebp),%ecx 110e47: 85 c9 test %ecx,%ecx 110e49: 0f 85 51 ff ff ff jne 110da0 <_Heap_Extend+0x1c4> _Heap_Free_block( heap, extend_first_block ); 110e4f: 8b 55 e4 mov -0x1c(%ebp),%edx 110e52: 89 d8 mov %ebx,%eax 110e54: e8 67 fd ff ff call 110bc0 <_Heap_Free_block> 110e59: e9 42 ff ff ff jmp 110da0 <_Heap_Extend+0x1c4> 110e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110e60: b0 01 mov $0x1,%al <== NOT EXECUTED 110e62: e9 b3 fd ff ff jmp 110c1a <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110820 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110820: 55 push %ebp 110821: 89 e5 mov %esp,%ebp 110823: 57 push %edi 110824: 56 push %esi 110825: 53 push %ebx 110826: 83 ec 10 sub $0x10,%esp 110829: 8b 5d 08 mov 0x8(%ebp),%ebx 11082c: 8b 45 0c mov 0xc(%ebp),%eax 11082f: 8d 48 f8 lea -0x8(%eax),%ecx 110832: 31 d2 xor %edx,%edx 110834: 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); 110837: 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 110839: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11083c: 39 c1 cmp %eax,%ecx 11083e: 72 07 jb 110847 <_Heap_Free+0x27> 110840: 8b 73 24 mov 0x24(%ebx),%esi 110843: 39 f1 cmp %esi,%ecx 110845: 76 0d jbe 110854 <_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 ); 110847: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110849: 83 c4 10 add $0x10,%esp 11084c: 5b pop %ebx 11084d: 5e pop %esi 11084e: 5f pop %edi 11084f: c9 leave 110850: c3 ret 110851: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110854: 8b 51 04 mov 0x4(%ecx),%edx 110857: 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; 11085a: 83 e2 fe and $0xfffffffe,%edx 11085d: 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); 110860: 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; 110863: 39 d0 cmp %edx,%eax 110865: 77 e0 ja 110847 <_Heap_Free+0x27> <== NEVER TAKEN 110867: 39 d6 cmp %edx,%esi 110869: 72 dc jb 110847 <_Heap_Free+0x27> <== NEVER TAKEN 11086b: 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 ) ) { 11086e: f7 c7 01 00 00 00 test $0x1,%edi 110874: 74 d1 je 110847 <_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; 110876: 83 e7 fe and $0xfffffffe,%edi 110879: 89 7d e4 mov %edi,-0x1c(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 11087c: 39 d6 cmp %edx,%esi 11087e: 0f 84 c8 00 00 00 je 11094c <_Heap_Free+0x12c> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110884: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 110889: 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 ) ) { 11088d: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110891: 75 45 jne 1108d8 <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 110893: 8b 39 mov (%ecx),%edi 110895: 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); 110898: 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; 11089a: 39 c8 cmp %ecx,%eax 11089c: 77 a9 ja 110847 <_Heap_Free+0x27> <== NEVER TAKEN 11089e: 39 ce cmp %ecx,%esi 1108a0: 72 a5 jb 110847 <_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) ) { 1108a2: f6 41 04 01 testb $0x1,0x4(%ecx) 1108a6: 74 9f je 110847 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1108a8: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108ac: 0f 84 a6 00 00 00 je 110958 <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 1108b2: 8b 7d e4 mov -0x1c(%ebp),%edi 1108b5: 03 7d ec add -0x14(%ebp),%edi 1108b8: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108bb: 8b 42 08 mov 0x8(%edx),%eax 1108be: 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; 1108c1: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1108c4: 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; 1108c7: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108ca: 89 f8 mov %edi,%eax 1108cc: 83 c8 01 or $0x1,%eax 1108cf: 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; 1108d2: 89 3c 39 mov %edi,(%ecx,%edi,1) 1108d5: eb 2a jmp 110901 <_Heap_Free+0xe1> 1108d7: 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 */ 1108d8: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108dc: 74 3a je 110918 <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 1108de: 8b 7d e4 mov -0x1c(%ebp),%edi 1108e1: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108e4: 8b 42 08 mov 0x8(%edx),%eax 1108e7: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1108ea: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1108ed: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1108f0: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1108f3: 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; 1108f6: 89 f8 mov %edi,%eax 1108f8: 83 c8 01 or $0x1,%eax 1108fb: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1108fe: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110901: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110904: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110907: 8b 55 ec mov -0x14(%ebp),%edx 11090a: 01 53 30 add %edx,0x30(%ebx) return( true ); 11090d: b0 01 mov $0x1,%al } 11090f: 83 c4 10 add $0x10,%esp 110912: 5b pop %ebx 110913: 5e pop %esi 110914: 5f pop %edi 110915: c9 leave 110916: c3 ret 110917: 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; 110918: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 11091b: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 11091e: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110921: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110924: 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; 110927: 8b 45 ec mov -0x14(%ebp),%eax 11092a: 83 c8 01 or $0x1,%eax 11092d: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110930: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110934: 8b 45 ec mov -0x14(%ebp),%eax 110937: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 110939: 8b 43 38 mov 0x38(%ebx),%eax 11093c: 40 inc %eax 11093d: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 110940: 3b 43 3c cmp 0x3c(%ebx),%eax 110943: 76 bc jbe 110901 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 110945: 89 43 3c mov %eax,0x3c(%ebx) 110948: eb b7 jmp 110901 <_Heap_Free+0xe1> 11094a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 11094c: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110950: e9 38 ff ff ff jmp 11088d <_Heap_Free+0x6d> 110955: 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; 110958: 8b 45 ec mov -0x14(%ebp),%eax 11095b: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11095e: 89 c6 mov %eax,%esi 110960: 83 ce 01 or $0x1,%esi 110963: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110966: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11096a: 89 02 mov %eax,(%edx) 11096c: eb 93 jmp 110901 <_Heap_Free+0xe1> =============================================================================== 0010c540 <_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 ) { 10c540: 55 push %ebp 10c541: 89 e5 mov %esp,%ebp 10c543: 57 push %edi 10c544: 56 push %esi 10c545: 53 push %ebx 10c546: 8b 5d 08 mov 0x8(%ebp),%ebx 10c549: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c54c: 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 ); 10c54f: 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; 10c552: 89 c8 mov %ecx,%eax 10c554: 31 d2 xor %edx,%edx 10c556: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c559: 85 d2 test %edx,%edx 10c55b: 74 05 je 10c562 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c55d: 03 4d 10 add 0x10(%ebp),%ecx 10c560: 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 ( 10c562: 39 f3 cmp %esi,%ebx 10c564: 77 2e ja 10c594 <_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); 10c566: 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 = 10c569: 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 10c56b: 39 cf cmp %ecx,%edi 10c56d: 76 25 jbe 10c594 <_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 ); 10c56f: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c571: 89 f8 mov %edi,%eax 10c573: 31 d2 xor %edx,%edx 10c575: f7 75 10 divl 0x10(%ebp) 10c578: 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 10c57a: 39 7d 14 cmp %edi,0x14(%ebp) 10c57d: 77 15 ja 10c594 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c57f: 8b 45 18 mov 0x18(%ebp),%eax 10c582: 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); 10c584: 01 f7 add %esi,%edi 10c586: 8b 45 1c mov 0x1c(%ebp),%eax 10c589: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c58b: b0 01 mov $0x1,%al } 10c58d: 5b pop %ebx 10c58e: 5e pop %esi 10c58f: 5f pop %edi 10c590: c9 leave 10c591: c3 ret 10c592: 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; 10c594: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c596: 5b pop %ebx 10c597: 5e pop %esi 10c598: 5f pop %edi 10c599: c9 leave 10c59a: c3 ret =============================================================================== 001144e4 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1144e4: 55 push %ebp 1144e5: 89 e5 mov %esp,%ebp 1144e7: 57 push %edi 1144e8: 56 push %esi 1144e9: 53 push %ebx 1144ea: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1144ed: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1144f3: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1144fa: 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; } } 114501: 8b 45 08 mov 0x8(%ebp),%eax 114504: 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); 114507: 39 d0 cmp %edx,%eax 114509: 74 31 je 11453c <_Heap_Get_free_information+0x58> 11450b: bb 01 00 00 00 mov $0x1,%ebx 114510: 31 f6 xor %esi,%esi 114512: 31 c9 xor %ecx,%ecx 114514: eb 07 jmp 11451d <_Heap_Get_free_information+0x39> 114516: 66 90 xchg %ax,%ax <== NOT EXECUTED 114518: 8b 77 04 mov 0x4(%edi),%esi 11451b: 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; 11451d: 8b 42 04 mov 0x4(%edx),%eax 114520: 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; 114523: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 114525: 39 f0 cmp %esi,%eax 114527: 76 03 jbe 11452c <_Heap_Get_free_information+0x48> info->largest = the_size; 114529: 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) 11452c: 8b 52 08 mov 0x8(%edx),%edx 11452f: 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); 114532: 39 55 08 cmp %edx,0x8(%ebp) 114535: 75 e1 jne 114518 <_Heap_Get_free_information+0x34> 114537: 89 1f mov %ebx,(%edi) 114539: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 11453c: 5b pop %ebx 11453d: 5e pop %esi 11453e: 5f pop %edi 11453f: c9 leave 114540: c3 ret =============================================================================== 00114544 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 114544: 55 push %ebp 114545: 89 e5 mov %esp,%ebp 114547: 57 push %edi 114548: 56 push %esi 114549: 53 push %ebx 11454a: 8b 45 08 mov 0x8(%ebp),%eax 11454d: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 114550: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 114553: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 114556: b9 18 00 00 00 mov $0x18,%ecx 11455b: 31 c0 xor %eax,%eax 11455d: 89 df mov %ebx,%edi 11455f: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 114561: 39 f2 cmp %esi,%edx 114563: 74 33 je 114598 <_Heap_Get_information+0x54><== NEVER TAKEN 114565: 8b 7a 04 mov 0x4(%edx),%edi 114568: eb 16 jmp 114580 <_Heap_Get_information+0x3c> 11456a: 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; 11456c: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 11456f: ff 00 incl (%eax) info->total += the_size; 114571: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 114574: 39 48 04 cmp %ecx,0x4(%eax) 114577: 73 03 jae 11457c <_Heap_Get_information+0x38> info->largest = the_size; 114579: 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 ) { 11457c: 39 d6 cmp %edx,%esi 11457e: 74 18 je 114598 <_Heap_Get_information+0x54> 114580: 89 f9 mov %edi,%ecx 114582: 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); 114585: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 114587: 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) ) 11458a: f7 c7 01 00 00 00 test $0x1,%edi 114590: 75 da jne 11456c <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 114592: 89 d8 mov %ebx,%eax 114594: eb d9 jmp 11456f <_Heap_Get_information+0x2b> 114596: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 114598: 5b pop %ebx 114599: 5e pop %esi 11459a: 5f pop %edi 11459b: c9 leave 11459c: c3 ret =============================================================================== 0010c59c <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c59c: 55 push %ebp 10c59d: 89 e5 mov %esp,%ebp 10c59f: 57 push %edi 10c5a0: 56 push %esi 10c5a1: 53 push %ebx 10c5a2: 83 ec 10 sub $0x10,%esp 10c5a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5a8: 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; 10c5ab: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c5b2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c5b9: 85 f6 test %esi,%esi 10c5bb: 74 2b je 10c5e8 <_Heap_Initialize+0x4c> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c5bd: 89 f0 mov %esi,%eax 10c5bf: 83 e0 03 and $0x3,%eax 10c5c2: 74 05 je 10c5c9 <_Heap_Initialize+0x2d> return value - remainder + alignment; 10c5c4: 83 c6 04 add $0x4,%esi 10c5c7: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c5c9: 83 fe 03 cmp $0x3,%esi 10c5cc: 76 40 jbe 10c60e <_Heap_Initialize+0x72> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5ce: b8 10 00 00 00 mov $0x10,%eax 10c5d3: 31 d2 xor %edx,%edx 10c5d5: f7 f6 div %esi if ( remainder != 0 ) { 10c5d7: 85 d2 test %edx,%edx 10c5d9: 0f 84 d8 00 00 00 je 10c6b7 <_Heap_Initialize+0x11b> return value - remainder + alignment; 10c5df: 8d 7e 10 lea 0x10(%esi),%edi 10c5e2: 29 d7 sub %edx,%edi 10c5e4: eb 0c jmp 10c5f2 <_Heap_Initialize+0x56> 10c5e6: 66 90 xchg %ax,%ax <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c5e8: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c5ed: bf 10 00 00 00 mov $0x10,%edi return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c5f2: 8d 45 ec lea -0x14(%ebp),%eax 10c5f5: 50 push %eax 10c5f6: 8d 45 f0 lea -0x10(%ebp),%eax 10c5f9: 50 push %eax 10c5fa: 57 push %edi 10c5fb: 56 push %esi 10c5fc: ff 75 10 pushl 0x10(%ebp) 10c5ff: ff 75 0c pushl 0xc(%ebp) 10c602: e8 39 ff ff ff call 10c540 <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c607: 83 c4 18 add $0x18,%esp 10c60a: 84 c0 test %al,%al 10c60c: 75 0a jne 10c618 <_Heap_Initialize+0x7c> return 0; 10c60e: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c610: 8d 65 f4 lea -0xc(%ebp),%esp 10c613: 5b pop %ebx 10c614: 5e pop %esi 10c615: 5f pop %edi 10c616: c9 leave 10c617: 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; 10c618: 8b 45 10 mov 0x10(%ebp),%eax 10c61b: 03 45 0c add 0xc(%ebp),%eax 10c61e: 89 43 1c mov %eax,0x1c(%ebx) ); if ( !area_ok ) { return 0; } first_block_begin = (uintptr_t) first_block; 10c621: 8b 55 f0 mov -0x10(%ebp),%edx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c624: 8b 45 ec mov -0x14(%ebp),%eax 10c627: 29 d0 sub %edx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c629: 8b 4b 1c mov 0x1c(%ebx),%ecx 10c62c: 89 0a mov %ecx,(%edx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c62e: 89 c1 mov %eax,%ecx 10c630: 83 c9 01 or $0x1,%ecx 10c633: 89 4a 04 mov %ecx,0x4(%edx) first_block->next = _Heap_Free_list_tail( heap ); 10c636: 89 5a 08 mov %ebx,0x8(%edx) first_block->prev = _Heap_Free_list_head( heap ); 10c639: 89 5a 0c mov %ebx,0xc(%edx) /* Heap control */ heap->page_size = page_size; 10c63c: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c63f: 89 7b 14 mov %edi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c642: 8b 4d 0c mov 0xc(%ebp),%ecx 10c645: 89 4b 18 mov %ecx,0x18(%ebx) heap->area_end = heap_area_end; heap->first_block = first_block; 10c648: 89 53 20 mov %edx,0x20(%ebx) heap->last_block = last_block; 10c64b: 8b 4d ec mov -0x14(%ebp),%ecx 10c64e: 89 4b 24 mov %ecx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c651: 89 53 08 mov %edx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c654: 89 53 0c mov %edx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c657: 89 01 mov %eax,(%ecx) * 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( 10c659: 29 ca sub %ecx,%edx 10c65b: 89 51 04 mov %edx,0x4(%ecx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); /* Statistics */ stats->size = first_block_size; 10c65e: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c661: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c664: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c667: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c66e: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c675: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c67c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c683: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c68a: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c691: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c698: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c69f: 8b 15 40 60 12 00 mov 0x126040,%edx 10c6a5: 89 53 28 mov %edx,0x28(%ebx) 10c6a8: 42 inc %edx 10c6a9: 89 15 40 60 12 00 mov %edx,0x126040 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c6af: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b2: 5b pop %ebx 10c6b3: 5e pop %esi 10c6b4: 5f pop %edi 10c6b5: c9 leave 10c6b6: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c6b7: bf 10 00 00 00 mov $0x10,%edi 10c6bc: e9 31 ff ff ff jmp 10c5f2 <_Heap_Initialize+0x56> =============================================================================== 0011dff0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11dff0: 55 push %ebp 11dff1: 89 e5 mov %esp,%ebp 11dff3: 57 push %edi 11dff4: 56 push %esi 11dff5: 53 push %ebx 11dff6: 83 ec 2c sub $0x2c,%esp 11dff9: 8b 5d 08 mov 0x8(%ebp),%ebx 11dffc: 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); 11dfff: 8d 4e f8 lea -0x8(%esi),%ecx 11e002: 89 f0 mov %esi,%eax 11e004: 31 d2 xor %edx,%edx 11e006: 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); 11e009: 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; 11e00b: 8b 45 14 mov 0x14(%ebp),%eax 11e00e: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11e014: 8b 55 18 mov 0x18(%ebp),%edx 11e017: 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; 11e01d: 39 4b 20 cmp %ecx,0x20(%ebx) 11e020: 77 05 ja 11e027 <_Heap_Resize_block+0x37> 11e022: 39 4b 24 cmp %ecx,0x24(%ebx) 11e025: 73 0d jae 11e034 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11e027: b8 02 00 00 00 mov $0x2,%eax } } 11e02c: 8d 65 f4 lea -0xc(%ebp),%esp 11e02f: 5b pop %ebx 11e030: 5e pop %esi 11e031: 5f pop %edi 11e032: c9 leave 11e033: 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; 11e034: 8b 41 04 mov 0x4(%ecx),%eax 11e037: 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; 11e03a: 8d 3c 01 lea (%ecx,%eax,1),%edi 11e03d: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11e040: 89 fa mov %edi,%edx 11e042: 29 f2 sub %esi,%edx 11e044: 83 c2 04 add $0x4,%edx 11e047: 89 55 e0 mov %edx,-0x20(%ebp) 11e04a: 8b 57 04 mov 0x4(%edi),%edx 11e04d: 83 e2 fe and $0xfffffffe,%edx 11e050: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11e053: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11e058: 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; 11e05c: 8b 55 e0 mov -0x20(%ebp),%edx 11e05f: 8b 7d 14 mov 0x14(%ebp),%edi 11e062: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11e064: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e068: 75 6e jne 11e0d8 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11e06a: 8b 55 e0 mov -0x20(%ebp),%edx 11e06d: 39 55 10 cmp %edx,0x10(%ebp) 11e070: 77 79 ja 11e0eb <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11e072: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e076: 74 31 je 11e0a9 <_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; 11e078: 8b 79 04 mov 0x4(%ecx),%edi 11e07b: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11e07e: 09 c7 or %eax,%edi 11e080: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e083: 8b 7d d4 mov -0x2c(%ebp),%edi 11e086: 8b 7f 08 mov 0x8(%edi),%edi 11e089: 89 7d e4 mov %edi,-0x1c(%ebp) 11e08c: 8b 55 d4 mov -0x2c(%ebp),%edx 11e08f: 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; 11e092: 8b 55 e4 mov -0x1c(%ebp),%edx 11e095: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11e098: 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; 11e09b: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11e0a0: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11e0a3: 8b 7d d0 mov -0x30(%ebp),%edi 11e0a6: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11e0a9: ff 75 10 pushl 0x10(%ebp) 11e0ac: 56 push %esi 11e0ad: 51 push %ecx 11e0ae: 53 push %ebx 11e0af: e8 f0 e6 fe ff call 10c7a4 <_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; 11e0b4: 8b 50 04 mov 0x4(%eax),%edx 11e0b7: 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_BLOCK_SIZE_OFFSET; 11e0ba: 29 f0 sub %esi,%eax 11e0bc: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11e0c0: 8b 55 18 mov 0x18(%ebp),%edx 11e0c3: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11e0c5: ff 43 54 incl 0x54(%ebx) 11e0c8: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11e0cb: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e0cd: 8d 65 f4 lea -0xc(%ebp),%esp 11e0d0: 5b pop %ebx 11e0d1: 5e pop %esi 11e0d2: 5f pop %edi 11e0d3: c9 leave 11e0d4: c3 ret 11e0d5: 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; 11e0d8: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11e0db: 8b 7d d0 mov -0x30(%ebp),%edi 11e0de: 01 fa add %edi,%edx 11e0e0: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11e0e3: 8b 55 e0 mov -0x20(%ebp),%edx 11e0e6: 39 55 10 cmp %edx,0x10(%ebp) 11e0e9: 76 87 jbe 11e072 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11e0eb: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e0f0: 8d 65 f4 lea -0xc(%ebp),%esp 11e0f3: 5b pop %ebx 11e0f4: 5e pop %esi 11e0f5: 5f pop %edi 11e0f6: c9 leave 11e0f7: c3 ret =============================================================================== 0011e0f8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e0f8: 55 push %ebp 11e0f9: 89 e5 mov %esp,%ebp 11e0fb: 56 push %esi 11e0fc: 53 push %ebx 11e0fd: 8b 5d 08 mov 0x8(%ebp),%ebx 11e100: 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); 11e103: 8d 4e f8 lea -0x8(%esi),%ecx 11e106: 89 f0 mov %esi,%eax 11e108: 31 d2 xor %edx,%edx 11e10a: 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); 11e10d: 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 11e10f: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e112: 39 c1 cmp %eax,%ecx 11e114: 72 07 jb 11e11d <_Heap_Size_of_alloc_area+0x25> 11e116: 8b 53 24 mov 0x24(%ebx),%edx 11e119: 39 d1 cmp %edx,%ecx 11e11b: 76 07 jbe 11e124 <_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; 11e11d: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; } 11e11f: 5b pop %ebx 11e120: 5e pop %esi 11e121: c9 leave 11e122: c3 ret 11e123: 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; 11e124: 8b 59 04 mov 0x4(%ecx),%ebx 11e127: 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); 11e12a: 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; 11e12c: 39 c8 cmp %ecx,%eax 11e12e: 77 ed ja 11e11d <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11e130: 39 ca cmp %ecx,%edx 11e132: 72 e9 jb 11e11d <_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 ) 11e134: f6 41 04 01 testb $0x1,0x4(%ecx) 11e138: 74 e3 je 11e11d <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11e13a: 29 f1 sub %esi,%ecx 11e13c: 8d 51 04 lea 0x4(%ecx),%edx 11e13f: 8b 45 10 mov 0x10(%ebp),%eax 11e142: 89 10 mov %edx,(%eax) return true; 11e144: b0 01 mov $0x1,%al } 11e146: 5b pop %ebx 11e147: 5e pop %esi 11e148: c9 leave 11e149: c3 ret =============================================================================== 0010d2bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d2bc: 55 push %ebp 10d2bd: 89 e5 mov %esp,%ebp 10d2bf: 57 push %edi 10d2c0: 56 push %esi 10d2c1: 53 push %ebx 10d2c2: 83 ec 4c sub $0x4c,%esp 10d2c5: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d2c8: 8b 43 10 mov 0x10(%ebx),%eax 10d2cb: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d2ce: 8b 53 14 mov 0x14(%ebx),%edx 10d2d1: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d2d4: 8b 43 20 mov 0x20(%ebx),%eax 10d2d7: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d2da: 8b 53 24 mov 0x24(%ebx),%edx 10d2dd: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d2e0: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d2e4: 74 1a je 10d300 <_Heap_Walk+0x44> 10d2e6: c7 45 d8 74 d2 10 00 movl $0x10d274,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d2ed: 83 3d 80 8a 12 00 03 cmpl $0x3,0x128a80 10d2f4: 74 1a je 10d310 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d2f6: b0 01 mov $0x1,%al } 10d2f8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2fb: 5b pop %ebx 10d2fc: 5e pop %esi 10d2fd: 5f pop %edi 10d2fe: c9 leave 10d2ff: 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; 10d300: c7 45 d8 6c d2 10 00 movl $0x10d26c,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d307: 83 3d 80 8a 12 00 03 cmpl $0x3,0x128a80 10d30e: 75 e6 jne 10d2f6 <_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)( 10d310: 52 push %edx 10d311: ff 73 0c pushl 0xc(%ebx) 10d314: ff 73 08 pushl 0x8(%ebx) 10d317: ff 75 cc pushl -0x34(%ebp) 10d31a: ff 75 dc pushl -0x24(%ebp) 10d31d: ff 73 1c pushl 0x1c(%ebx) 10d320: ff 73 18 pushl 0x18(%ebx) 10d323: ff 75 d0 pushl -0x30(%ebp) 10d326: ff 75 e0 pushl -0x20(%ebp) 10d329: 68 94 0f 12 00 push $0x120f94 10d32e: 6a 00 push $0x0 10d330: ff 75 0c pushl 0xc(%ebp) 10d333: 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 ) { 10d336: 83 c4 30 add $0x30,%esp 10d339: 8b 45 e0 mov -0x20(%ebp),%eax 10d33c: 85 c0 test %eax,%eax 10d33e: 74 70 je 10d3b0 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d340: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d344: 75 72 jne 10d3b8 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d346: 8b 45 d0 mov -0x30(%ebp),%eax 10d349: 31 d2 xor %edx,%edx 10d34b: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d34e: 85 d2 test %edx,%edx 10d350: 75 72 jne 10d3c4 <_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; 10d352: 8b 45 dc mov -0x24(%ebp),%eax 10d355: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d358: 31 d2 xor %edx,%edx 10d35a: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d35d: 85 d2 test %edx,%edx 10d35f: 75 6f jne 10d3d0 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d361: 8b 45 dc mov -0x24(%ebp),%eax 10d364: 8b 40 04 mov 0x4(%eax),%eax 10d367: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d36a: a8 01 test $0x1,%al 10d36c: 0f 84 8e 00 00 00 je 10d400 <_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; 10d372: 8b 55 cc mov -0x34(%ebp),%edx 10d375: 8b 42 04 mov 0x4(%edx),%eax 10d378: 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); 10d37b: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d37d: f6 40 04 01 testb $0x1,0x4(%eax) 10d381: 74 25 je 10d3a8 <_Heap_Walk+0xec> ); return false; } if ( 10d383: 39 45 dc cmp %eax,-0x24(%ebp) 10d386: 74 54 je 10d3dc <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d388: 51 push %ecx <== NOT EXECUTED 10d389: 68 b0 10 12 00 push $0x1210b0 <== NOT EXECUTED 10d38e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d390: 6a 01 push $0x1 10d392: ff 75 0c pushl 0xc(%ebp) 10d395: ff 55 d8 call *-0x28(%ebp) 10d398: 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; 10d39b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d39d: 8d 65 f4 lea -0xc(%ebp),%esp 10d3a0: 5b pop %ebx 10d3a1: 5e pop %esi 10d3a2: 5f pop %edi 10d3a3: c9 leave 10d3a4: c3 ret 10d3a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d3a8: 53 push %ebx 10d3a9: 68 4a 0f 12 00 push $0x120f4a 10d3ae: eb e0 jmp 10d390 <_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" ); 10d3b0: 57 push %edi 10d3b1: 68 19 0f 12 00 push $0x120f19 10d3b6: eb d8 jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d3b8: ff 75 e0 pushl -0x20(%ebp) 10d3bb: 68 2c 0f 12 00 push $0x120f2c 10d3c0: eb ce jmp 10d390 <_Heap_Walk+0xd4> 10d3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d3c4: ff 75 d0 pushl -0x30(%ebp) 10d3c7: 68 28 10 12 00 push $0x121028 10d3cc: eb c2 jmp 10d390 <_Heap_Walk+0xd4> 10d3ce: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d3d0: ff 75 dc pushl -0x24(%ebp) 10d3d3: 68 4c 10 12 00 push $0x12104c 10d3d8: eb b6 jmp 10d390 <_Heap_Walk+0xd4> 10d3da: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d3dc: 8b 43 10 mov 0x10(%ebx),%eax 10d3df: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d3e2: 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 ) { 10d3e5: 39 cb cmp %ecx,%ebx 10d3e7: 0f 84 a8 00 00 00 je 10d495 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d3ed: 8b 43 20 mov 0x20(%ebx),%eax 10d3f0: 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; 10d3f3: 39 c8 cmp %ecx,%eax 10d3f5: 76 11 jbe 10d408 <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d3f7: 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)( 10d3f8: 51 push %ecx 10d3f9: 68 e0 10 12 00 push $0x1210e0 10d3fe: eb 90 jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d400: 56 push %esi 10d401: 68 80 10 12 00 push $0x121080 10d406: eb 88 jmp 10d390 <_Heap_Walk+0xd4> 10d408: 8b 7b 24 mov 0x24(%ebx),%edi 10d40b: 39 cf cmp %ecx,%edi 10d40d: 72 e9 jb 10d3f8 <_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; 10d40f: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d412: 31 d2 xor %edx,%edx 10d414: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d417: 85 d2 test %edx,%edx 10d419: 0f 85 44 02 00 00 jne 10d663 <_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; 10d41f: 8b 41 04 mov 0x4(%ecx),%eax 10d422: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d425: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d42a: 0f 85 3e 02 00 00 jne 10d66e <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d430: 89 da mov %ebx,%edx 10d432: 89 ce mov %ecx,%esi 10d434: eb 37 jmp 10d46d <_Heap_Walk+0x1b1> 10d436: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d438: 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 ) { 10d43b: 39 cb cmp %ecx,%ebx 10d43d: 74 5c je 10d49b <_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; 10d43f: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d442: 77 b4 ja 10d3f8 <_Heap_Walk+0x13c> 10d444: 39 f9 cmp %edi,%ecx 10d446: 77 b0 ja 10d3f8 <_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; 10d448: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d44b: 31 d2 xor %edx,%edx 10d44d: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d450: 85 d2 test %edx,%edx 10d452: 0f 85 0b 02 00 00 jne 10d663 <_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; 10d458: 8b 41 04 mov 0x4(%ecx),%eax 10d45b: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d45e: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d463: 0f 85 05 02 00 00 jne 10d66e <_Heap_Walk+0x3b2> 10d469: 89 f2 mov %esi,%edx 10d46b: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d46d: 8b 41 0c mov 0xc(%ecx),%eax 10d470: 39 d0 cmp %edx,%eax 10d472: 74 c4 je 10d438 <_Heap_Walk+0x17c> (*printer)( 10d474: 83 ec 0c sub $0xc,%esp 10d477: 50 push %eax 10d478: 51 push %ecx 10d479: 68 30 11 12 00 push $0x121130 10d47e: 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)( 10d480: 6a 01 push $0x1 10d482: ff 75 0c pushl 0xc(%ebp) 10d485: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d488: 83 c4 20 add $0x20,%esp 10d48b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d48d: 8d 65 f4 lea -0xc(%ebp),%esp 10d490: 5b pop %ebx 10d491: 5e pop %esi 10d492: 5f pop %edi 10d493: c9 leave 10d494: 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 ) { 10d495: 8b 53 20 mov 0x20(%ebx),%edx 10d498: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d49b: 8b 7d dc mov -0x24(%ebp),%edi 10d49e: 8b 45 d4 mov -0x2c(%ebp),%eax 10d4a1: 8d 76 00 lea 0x0(%esi),%esi 10d4a4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d4a7: 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); 10d4aa: 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; 10d4ad: 39 f0 cmp %esi,%eax 10d4af: 76 0f jbe 10d4c0 <_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)( 10d4b1: 83 ec 0c sub $0xc,%esp 10d4b4: 56 push %esi 10d4b5: 57 push %edi 10d4b6: 68 64 11 12 00 push $0x121164 10d4bb: eb c3 jmp 10d480 <_Heap_Walk+0x1c4> 10d4bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d4c0: 39 73 24 cmp %esi,0x24(%ebx) 10d4c3: 72 ec jb 10d4b1 <_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; 10d4c5: 3b 7d cc cmp -0x34(%ebp),%edi 10d4c8: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d4cc: 89 c8 mov %ecx,%eax 10d4ce: 31 d2 xor %edx,%edx 10d4d0: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d4d3: 85 d2 test %edx,%edx 10d4d5: 74 0a je 10d4e1 <_Heap_Walk+0x225> 10d4d7: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4db: 0f 85 52 01 00 00 jne 10d633 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d4e1: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d4e4: 76 0a jbe 10d4f0 <_Heap_Walk+0x234> 10d4e6: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4ea: 0f 85 52 01 00 00 jne 10d642 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d4f0: 39 f7 cmp %esi,%edi 10d4f2: 72 0a jb 10d4fe <_Heap_Walk+0x242> 10d4f4: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4f8: 0f 85 56 01 00 00 jne 10d654 <_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; 10d4fe: 8b 55 e4 mov -0x1c(%ebp),%edx 10d501: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d504: f6 46 04 01 testb $0x1,0x4(%esi) 10d508: 74 4e je 10d558 <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d50a: 85 d2 test %edx,%edx 10d50c: 74 2e je 10d53c <_Heap_Walk+0x280> (*printer)( 10d50e: 83 ec 0c sub $0xc,%esp 10d511: 51 push %ecx 10d512: 57 push %edi 10d513: 68 7b 0f 12 00 push $0x120f7b 10d518: 6a 00 push $0x0 10d51a: ff 75 0c pushl 0xc(%ebp) 10d51d: ff 55 d8 call *-0x28(%ebp) 10d520: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d523: 39 75 dc cmp %esi,-0x24(%ebp) 10d526: 0f 84 ca fd ff ff je 10d2f6 <_Heap_Walk+0x3a> 10d52c: 8b 56 04 mov 0x4(%esi),%edx 10d52f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d532: 8b 43 20 mov 0x20(%ebx),%eax 10d535: 89 f7 mov %esi,%edi 10d537: e9 68 ff ff ff jmp 10d4a4 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d53c: 83 ec 08 sub $0x8,%esp 10d53f: ff 37 pushl (%edi) 10d541: 51 push %ecx 10d542: 57 push %edi 10d543: 68 c8 12 12 00 push $0x1212c8 10d548: 6a 00 push $0x0 10d54a: ff 75 0c pushl 0xc(%ebp) 10d54d: ff 55 d8 call *-0x28(%ebp) 10d550: 83 c4 20 add $0x20,%esp 10d553: eb ce jmp 10d523 <_Heap_Walk+0x267> 10d555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d558: 8b 43 08 mov 0x8(%ebx),%eax 10d55b: 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 ? 10d55e: 8b 47 08 mov 0x8(%edi),%eax 10d561: 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)( 10d564: 39 43 0c cmp %eax,0xc(%ebx) 10d567: 0f 84 97 00 00 00 je 10d604 <_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)" : "") 10d56d: 39 c3 cmp %eax,%ebx 10d56f: 0f 84 9b 00 00 00 je 10d610 <_Heap_Walk+0x354> 10d575: c7 45 c8 15 0e 12 00 movl $0x120e15,-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 ? 10d57c: 8b 47 0c mov 0xc(%edi),%eax 10d57f: 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)( 10d582: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d585: 74 75 je 10d5fc <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d587: 39 c3 cmp %eax,%ebx 10d589: 0f 84 8d 00 00 00 je 10d61c <_Heap_Walk+0x360> 10d58f: b8 15 0e 12 00 mov $0x120e15,%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)( 10d594: 83 ec 0c sub $0xc,%esp 10d597: ff 75 c8 pushl -0x38(%ebp) 10d59a: ff 75 e4 pushl -0x1c(%ebp) 10d59d: 50 push %eax 10d59e: ff 75 d4 pushl -0x2c(%ebp) 10d5a1: 51 push %ecx 10d5a2: 57 push %edi 10d5a3: 68 24 12 12 00 push $0x121224 10d5a8: 6a 00 push $0x0 10d5aa: ff 75 0c pushl 0xc(%ebp) 10d5ad: 89 55 c4 mov %edx,-0x3c(%ebp) 10d5b0: 89 4d c0 mov %ecx,-0x40(%ebp) 10d5b3: 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 ) { 10d5b6: 8b 06 mov (%esi),%eax 10d5b8: 83 c4 30 add $0x30,%esp 10d5bb: 8b 4d c0 mov -0x40(%ebp),%ecx 10d5be: 39 c1 cmp %eax,%ecx 10d5c0: 8b 55 c4 mov -0x3c(%ebp),%edx 10d5c3: 75 27 jne 10d5ec <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d5c5: 85 d2 test %edx,%edx 10d5c7: 74 5f je 10d628 <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d5c9: 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 ) { 10d5cc: 39 c3 cmp %eax,%ebx 10d5ce: 74 0f je 10d5df <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d5d0: 39 c7 cmp %eax,%edi 10d5d2: 0f 84 4b ff ff ff je 10d523 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d5d8: 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 ) { 10d5db: 39 c3 cmp %eax,%ebx 10d5dd: 75 f1 jne 10d5d0 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d5df: 57 push %edi 10d5e0: 68 f0 12 12 00 push $0x1212f0 10d5e5: e9 a6 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> 10d5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d5ec: 52 push %edx 10d5ed: 56 push %esi 10d5ee: 50 push %eax 10d5ef: 51 push %ecx 10d5f0: 57 push %edi 10d5f1: 68 5c 12 12 00 push $0x12125c 10d5f6: e9 85 fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> 10d5fb: 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)( 10d5fc: b8 ff 0e 12 00 mov $0x120eff,%eax 10d601: eb 91 jmp 10d594 <_Heap_Walk+0x2d8> 10d603: 90 nop <== NOT EXECUTED 10d604: c7 45 c8 e6 0e 12 00 movl $0x120ee6,-0x38(%ebp) 10d60b: e9 6c ff ff ff jmp 10d57c <_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)" : "") 10d610: c7 45 c8 f5 0e 12 00 movl $0x120ef5,-0x38(%ebp) 10d617: e9 60 ff ff ff jmp 10d57c <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d61c: b8 0f 0f 12 00 mov $0x120f0f,%eax 10d621: e9 6e ff ff ff jmp 10d594 <_Heap_Walk+0x2d8> 10d626: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d628: 57 push %edi 10d629: 68 98 12 12 00 push $0x121298 10d62e: e9 5d fd ff ff jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d633: 83 ec 0c sub $0xc,%esp 10d636: 51 push %ecx 10d637: 57 push %edi 10d638: 68 94 11 12 00 push $0x121194 10d63d: e9 3e fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d642: 83 ec 08 sub $0x8,%esp 10d645: ff 75 d0 pushl -0x30(%ebp) 10d648: 51 push %ecx 10d649: 57 push %edi 10d64a: 68 c4 11 12 00 push $0x1211c4 10d64f: e9 2c fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d654: 83 ec 0c sub $0xc,%esp 10d657: 56 push %esi 10d658: 57 push %edi 10d659: 68 f0 11 12 00 push $0x1211f0 10d65e: e9 1d fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d663: 51 push %ecx 10d664: 68 00 11 12 00 push $0x121100 10d669: e9 22 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d66e: 51 push %ecx 10d66f: 68 5f 0f 12 00 push $0x120f5f 10d674: e9 17 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> =============================================================================== 0010be20 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10be20: 55 push %ebp 10be21: 89 e5 mov %esp,%ebp 10be23: 53 push %ebx 10be24: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be27: 8b 0d 20 67 12 00 mov 0x126720,%ecx 10be2d: 85 c9 test %ecx,%ecx 10be2f: 74 1a je 10be4b <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10be31: 31 db xor %ebx,%ebx 10be33: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10be34: 52 push %edx 10be35: 6a 00 push $0x0 10be37: 6a 00 push $0x0 10be39: 53 push %ebx 10be3a: e8 01 46 00 00 call 110440 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be3f: 43 inc %ebx 10be40: 83 c4 10 add $0x10,%esp 10be43: 39 1d 20 67 12 00 cmp %ebx,0x126720 10be49: 77 e9 ja 10be34 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10be4b: 8b 5d fc mov -0x4(%ebp),%ebx 10be4e: c9 leave 10be4f: c3 ret =============================================================================== 0010bd88 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bd88: 55 push %ebp 10bd89: 89 e5 mov %esp,%ebp 10bd8b: 57 push %edi 10bd8c: 56 push %esi 10bd8d: 53 push %ebx 10bd8e: 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; 10bd91: 8b 1d f4 22 12 00 mov 0x1222f4,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bd97: a1 f0 22 12 00 mov 0x1222f0,%eax 10bd9c: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bd9f: 8b 35 ec 22 12 00 mov 0x1222ec,%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 ) 10bda5: 39 f0 cmp %esi,%eax 10bda7: 73 5f jae 10be08 <_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( 10bda9: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bdac: c1 e1 03 shl $0x3,%ecx 10bdaf: 83 ec 0c sub $0xc,%esp 10bdb2: 51 push %ecx 10bdb3: 89 4d dc mov %ecx,-0x24(%ebp) 10bdb6: e8 31 2a 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10bdbb: 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 *) 10bdbd: a3 24 67 12 00 mov %eax,0x126724 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bdc2: 89 35 20 67 12 00 mov %esi,0x126720 memset( 10bdc8: 31 c0 xor %eax,%eax 10bdca: 8b 4d dc mov -0x24(%ebp),%ecx 10bdcd: 89 d7 mov %edx,%edi 10bdcf: 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++ ) 10bdd1: 83 c4 10 add $0x10,%esp 10bdd4: 8b 45 e4 mov -0x1c(%ebp),%eax 10bdd7: 85 c0 test %eax,%eax 10bdd9: 74 25 je 10be00 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bddb: a1 24 67 12 00 mov 0x126724,%eax 10bde0: 89 45 e0 mov %eax,-0x20(%ebp) 10bde3: 31 c0 xor %eax,%eax 10bde5: 31 d2 xor %edx,%edx 10bde7: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bde8: 8b 7d e0 mov -0x20(%ebp),%edi 10bdeb: 01 c7 add %eax,%edi 10bded: 8d 34 03 lea (%ebx,%eax,1),%esi 10bdf0: b9 06 00 00 00 mov $0x6,%ecx 10bdf5: 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++ ) 10bdf7: 42 inc %edx 10bdf8: 83 c0 18 add $0x18,%eax 10bdfb: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bdfe: 77 e8 ja 10bde8 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be00: 8d 65 f4 lea -0xc(%ebp),%esp 10be03: 5b pop %ebx 10be04: 5e pop %esi 10be05: 5f pop %edi 10be06: c9 leave 10be07: 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; 10be08: 89 1d 24 67 12 00 mov %ebx,0x126724 _IO_Number_of_drivers = number_of_drivers; 10be0e: 8b 45 e4 mov -0x1c(%ebp),%eax 10be11: a3 20 67 12 00 mov %eax,0x126720 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be16: 8d 65 f4 lea -0xc(%ebp),%esp 10be19: 5b pop %ebx 10be1a: 5e pop %esi 10be1b: 5f pop %edi 10be1c: c9 leave 10be1d: c3 ret =============================================================================== 0010c898 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c898: 55 push %ebp 10c899: 89 e5 mov %esp,%ebp 10c89b: 53 push %ebx 10c89c: 83 ec 08 sub $0x8,%esp 10c89f: 8b 45 08 mov 0x8(%ebp),%eax 10c8a2: 8b 55 0c mov 0xc(%ebp),%edx 10c8a5: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c8a8: a3 74 64 12 00 mov %eax,0x126474 _Internal_errors_What_happened.is_internal = is_internal; 10c8ad: 88 15 78 64 12 00 mov %dl,0x126478 _Internal_errors_What_happened.the_error = the_error; 10c8b3: 89 1d 7c 64 12 00 mov %ebx,0x12647c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c8b9: 53 push %ebx 10c8ba: 0f b6 d2 movzbl %dl,%edx 10c8bd: 52 push %edx 10c8be: 50 push %eax 10c8bf: e8 30 1b 00 00 call 10e3f4 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c8c4: c7 05 80 65 12 00 05 movl $0x5,0x126580 <== NOT EXECUTED 10c8cb: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c8ce: fa cli <== NOT EXECUTED 10c8cf: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c8d1: f4 hlt <== NOT EXECUTED 10c8d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c8d5: eb fe jmp 10c8d5 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110970 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110970: 55 push %ebp 110971: 89 e5 mov %esp,%ebp 110973: 8b 45 08 mov 0x8(%ebp),%eax 110976: 48 dec %eax 110977: 83 f8 02 cmp $0x2,%eax 11097a: 77 0c ja 110988 <_Objects_API_maximum_class+0x18> 11097c: 8b 04 85 d0 03 12 00 mov 0x1203d0(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110983: c9 leave 110984: c3 ret 110985: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110988: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11098a: c9 leave 11098b: c3 ret =============================================================================== 0010c928 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c928: 55 push %ebp 10c929: 89 e5 mov %esp,%ebp 10c92b: 56 push %esi 10c92c: 53 push %ebx 10c92d: 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 ) 10c930: 8b 43 18 mov 0x18(%ebx),%eax 10c933: 85 c0 test %eax,%eax 10c935: 75 0d jne 10c944 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c937: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c939: 89 c8 mov %ecx,%eax 10c93b: 8d 65 f8 lea -0x8(%ebp),%esp 10c93e: 5b pop %ebx 10c93f: 5e pop %esi 10c940: c9 leave 10c941: c3 ret 10c942: 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 ); 10c944: 8d 73 20 lea 0x20(%ebx),%esi 10c947: 83 ec 0c sub $0xc,%esp 10c94a: 56 push %esi 10c94b: e8 f4 f6 ff ff call 10c044 <_Chain_Get> 10c950: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c952: 83 c4 10 add $0x10,%esp 10c955: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c959: 74 de je 10c939 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c95b: 85 c0 test %eax,%eax 10c95d: 74 29 je 10c988 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c95f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c963: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c967: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c969: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c96d: 31 d2 xor %edx,%edx 10c96f: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c971: c1 e0 02 shl $0x2,%eax 10c974: 03 43 30 add 0x30(%ebx),%eax 10c977: ff 08 decl (%eax) information->inactive--; 10c979: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c97d: 89 c8 mov %ecx,%eax 10c97f: 8d 65 f8 lea -0x8(%ebp),%esp 10c982: 5b pop %ebx 10c983: 5e pop %esi 10c984: c9 leave 10c985: c3 ret 10c986: 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 ); 10c988: 83 ec 0c sub $0xc,%esp 10c98b: 53 push %ebx 10c98c: e8 3b 00 00 00 call 10c9cc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c991: 89 34 24 mov %esi,(%esp) 10c994: e8 ab f6 ff ff call 10c044 <_Chain_Get> 10c999: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c99b: 83 c4 10 add $0x10,%esp 10c99e: 85 c0 test %eax,%eax 10c9a0: 74 97 je 10c939 <_Objects_Allocate+0x11> 10c9a2: eb bb jmp 10c95f <_Objects_Allocate+0x37> =============================================================================== 0010c9cc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 57 push %edi 10c9d0: 56 push %esi 10c9d1: 53 push %ebx 10c9d2: 83 ec 4c sub $0x4c,%esp 10c9d5: 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 ); 10c9d8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c9dc: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c9df: 8b 4b 34 mov 0x34(%ebx),%ecx 10c9e2: 85 c9 test %ecx,%ecx 10c9e4: 0f 84 66 02 00 00 je 10cc50 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c9ea: 8b 73 10 mov 0x10(%ebx),%esi 10c9ed: 66 89 75 d0 mov %si,-0x30(%ebp) 10c9f1: 8b 7b 14 mov 0x14(%ebx),%edi 10c9f4: 89 f0 mov %esi,%eax 10c9f6: 31 d2 xor %edx,%edx 10c9f8: 66 f7 f7 div %di 10c9fb: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c9fe: 85 f6 test %esi,%esi 10ca00: 0f 84 63 02 00 00 je 10cc69 <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10ca06: 8b 01 mov (%ecx),%eax 10ca08: 85 c0 test %eax,%eax 10ca0a: 0f 84 6b 02 00 00 je 10cc7b <_Objects_Extend_information+0x2af><== NEVER TAKEN 10ca10: 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 ); 10ca13: 8b 55 cc mov -0x34(%ebp),%edx 10ca16: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10ca19: 31 d2 xor %edx,%edx 10ca1b: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca1e: eb 0a jmp 10ca2a <_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 ) { 10ca20: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10ca24: 0f 84 c6 01 00 00 je 10cbf0 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10ca2a: 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++ ) { 10ca2c: 42 inc %edx 10ca2d: 39 d6 cmp %edx,%esi 10ca2f: 77 ef ja 10ca20 <_Objects_Extend_information+0x54> 10ca31: 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; 10ca34: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10ca36: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10ca3a: 01 f8 add %edi,%eax 10ca3c: 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 ) { 10ca3f: 3d ff ff 00 00 cmp $0xffff,%eax 10ca44: 0f 87 9e 01 00 00 ja 10cbe8 <_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; 10ca4a: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10ca4e: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca52: 0f 84 a4 01 00 00 je 10cbfc <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10ca58: 83 ec 0c sub $0xc,%esp 10ca5b: 57 push %edi 10ca5c: 89 55 b8 mov %edx,-0x48(%ebp) 10ca5f: 88 4d b4 mov %cl,-0x4c(%ebp) 10ca62: e8 51 1d 00 00 call 10e7b8 <_Workspace_Allocate> 10ca67: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10ca6a: 83 c4 10 add $0x10,%esp 10ca6d: 85 c0 test %eax,%eax 10ca6f: 8b 55 b8 mov -0x48(%ebp),%edx 10ca72: 8a 4d b4 mov -0x4c(%ebp),%cl 10ca75: 0f 84 6d 01 00 00 je 10cbe8 <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10ca7b: 84 c9 test %cl,%cl 10ca7d: 0f 84 ea 00 00 00 je 10cb6d <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10ca83: 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 ); 10ca86: 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 *)) + 10ca89: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10ca8c: 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 *)) + 10ca8f: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10ca92: 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 ); 10ca95: 50 push %eax 10ca96: 89 55 b8 mov %edx,-0x48(%ebp) 10ca99: e8 1a 1d 00 00 call 10e7b8 <_Workspace_Allocate> 10ca9e: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10caa1: 83 c4 10 add $0x10,%esp 10caa4: 85 c0 test %eax,%eax 10caa6: 8b 55 b8 mov -0x48(%ebp),%edx 10caa9: 0f 84 de 01 00 00 je 10cc8d <_Objects_Extend_information+0x2c1> 10caaf: 8b 45 c4 mov -0x3c(%ebp),%eax 10cab2: 8d 04 b8 lea (%eax,%edi,4),%eax 10cab5: 89 45 bc mov %eax,-0x44(%ebp) 10cab8: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cabb: 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 ) { 10cabe: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cac2: 39 4d cc cmp %ecx,-0x34(%ebp) 10cac5: 0f 82 51 01 00 00 jb 10cc1c <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cacb: 8b 4d cc mov -0x34(%ebp),%ecx 10cace: 85 c9 test %ecx,%ecx 10cad0: 74 12 je 10cae4 <_Objects_Extend_information+0x118><== NEVER TAKEN 10cad2: 31 c9 xor %ecx,%ecx 10cad4: 8b 7d cc mov -0x34(%ebp),%edi 10cad7: 90 nop local_table[ index ] = NULL; 10cad8: 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++ ) { 10cadf: 41 inc %ecx 10cae0: 39 cf cmp %ecx,%edi 10cae2: 77 f4 ja 10cad8 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cae4: c1 e6 02 shl $0x2,%esi 10cae7: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10caea: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caed: 8b 75 c0 mov -0x40(%ebp),%esi 10caf0: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10caf7: 8b 4d bc mov -0x44(%ebp),%ecx 10cafa: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cb01: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb05: 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 ; 10cb08: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cb0b: 73 0f jae 10cb1c <_Objects_Extend_information+0x150><== NEVER TAKEN 10cb0d: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cb10: 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++ ) { 10cb17: 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 ; 10cb18: 39 f1 cmp %esi,%ecx 10cb1a: 72 f4 jb 10cb10 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10cb1c: 9c pushf 10cb1d: fa cli 10cb1e: 5f pop %edi old_tables = information->object_blocks; 10cb1f: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10cb22: 8b 75 c4 mov -0x3c(%ebp),%esi 10cb25: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cb28: 8b 75 bc mov -0x44(%ebp),%esi 10cb2b: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10cb2e: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cb31: 8b 45 d0 mov -0x30(%ebp),%eax 10cb34: 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) | 10cb38: 8b 33 mov (%ebx),%esi 10cb3a: c1 e6 18 shl $0x18,%esi 10cb3d: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10cb43: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb47: c1 e0 1b shl $0x1b,%eax 10cb4a: 09 c6 or %eax,%esi 10cb4c: 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) | 10cb50: 09 c6 or %eax,%esi 10cb52: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cb55: 57 push %edi 10cb56: 9d popf if ( old_tables ) 10cb57: 85 c9 test %ecx,%ecx 10cb59: 74 12 je 10cb6d <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cb5b: 83 ec 0c sub $0xc,%esp 10cb5e: 51 push %ecx 10cb5f: 89 55 b8 mov %edx,-0x48(%ebp) 10cb62: e8 6d 1c 00 00 call 10e7d4 <_Workspace_Free> 10cb67: 83 c4 10 add $0x10,%esp 10cb6a: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cb6d: c1 e2 02 shl $0x2,%edx 10cb70: 89 55 d0 mov %edx,-0x30(%ebp) 10cb73: 8b 43 34 mov 0x34(%ebx),%eax 10cb76: 8b 4d c8 mov -0x38(%ebp),%ecx 10cb79: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cb7c: ff 73 18 pushl 0x18(%ebx) 10cb7f: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cb83: 50 push %eax 10cb84: 51 push %ecx 10cb85: 8d 7d dc lea -0x24(%ebp),%edi 10cb88: 57 push %edi 10cb89: e8 f2 38 00 00 call 110480 <_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 ) { 10cb8e: 83 c4 10 add $0x10,%esp 10cb91: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb94: 8d 43 20 lea 0x20(%ebx),%eax 10cb97: 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 ) { 10cb9a: eb 29 jmp 10cbc5 <_Objects_Extend_information+0x1f9> 10cb9c: 8b 13 mov (%ebx),%edx 10cb9e: c1 e2 18 shl $0x18,%edx 10cba1: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cba7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cbab: c1 e1 1b shl $0x1b,%ecx 10cbae: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cbb0: 09 f2 or %esi,%edx 10cbb2: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbb5: 83 ec 08 sub $0x8,%esp 10cbb8: 50 push %eax 10cbb9: ff 75 d4 pushl -0x2c(%ebp) 10cbbc: e8 47 f4 ff ff call 10c008 <_Chain_Append> index++; 10cbc1: 46 inc %esi 10cbc2: 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 ) { 10cbc5: 83 ec 0c sub $0xc,%esp 10cbc8: 57 push %edi 10cbc9: e8 76 f4 ff ff call 10c044 <_Chain_Get> 10cbce: 83 c4 10 add $0x10,%esp 10cbd1: 85 c0 test %eax,%eax 10cbd3: 75 c7 jne 10cb9c <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cbd5: 8b 43 14 mov 0x14(%ebx),%eax 10cbd8: 8b 53 30 mov 0x30(%ebx),%edx 10cbdb: 0f b7 c8 movzwl %ax,%ecx 10cbde: 8b 75 d0 mov -0x30(%ebp),%esi 10cbe1: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cbe4: 66 01 43 2c add %ax,0x2c(%ebx) } 10cbe8: 8d 65 f4 lea -0xc(%ebp),%esp 10cbeb: 5b pop %ebx 10cbec: 5e pop %esi 10cbed: 5f pop %edi 10cbee: c9 leave 10cbef: c3 ret 10cbf0: 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; 10cbf3: 31 c9 xor %ecx,%ecx 10cbf5: e9 3c fe ff ff jmp 10ca36 <_Objects_Extend_information+0x6a> 10cbfa: 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 ); 10cbfc: 83 ec 0c sub $0xc,%esp 10cbff: 57 push %edi 10cc00: 89 55 b8 mov %edx,-0x48(%ebp) 10cc03: 88 4d b4 mov %cl,-0x4c(%ebp) 10cc06: e8 e1 1b 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10cc0b: 89 45 c8 mov %eax,-0x38(%ebp) 10cc0e: 83 c4 10 add $0x10,%esp 10cc11: 8a 4d b4 mov -0x4c(%ebp),%cl 10cc14: 8b 55 b8 mov -0x48(%ebp),%edx 10cc17: e9 5f fe ff ff jmp 10ca7b <_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, 10cc1c: c1 e6 02 shl $0x2,%esi 10cc1f: 89 75 c0 mov %esi,-0x40(%ebp) 10cc22: 8b 73 34 mov 0x34(%ebx),%esi 10cc25: 8b 7d c4 mov -0x3c(%ebp),%edi 10cc28: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc2b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cc2d: 8b 73 30 mov 0x30(%ebx),%esi 10cc30: 8b 7d bc mov -0x44(%ebp),%edi 10cc33: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc36: 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 *) ); 10cc38: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cc3c: 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, 10cc3f: c1 e1 02 shl $0x2,%ecx 10cc42: 8b 73 1c mov 0x1c(%ebx),%esi 10cc45: 89 c7 mov %eax,%edi 10cc47: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cc49: e9 9c fe ff ff jmp 10caea <_Objects_Extend_information+0x11e> 10cc4e: 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 ) 10cc50: 8b 53 10 mov 0x10(%ebx),%edx 10cc53: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cc57: 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 ); 10cc5b: 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; 10cc5e: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc60: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cc62: 31 f6 xor %esi,%esi 10cc64: e9 cd fd ff ff jmp 10ca36 <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cc69: 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 ); 10cc6c: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cc6f: 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; 10cc72: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc74: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc76: e9 bb fd ff ff jmp 10ca36 <_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 ) { 10cc7b: 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 ); 10cc7e: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cc81: 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; 10cc84: 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; 10cc86: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc88: e9 a9 fd ff ff jmp 10ca36 <_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 ); 10cc8d: 83 ec 0c sub $0xc,%esp 10cc90: ff 75 c8 pushl -0x38(%ebp) 10cc93: e8 3c 1b 00 00 call 10e7d4 <_Workspace_Free> return; 10cc98: 83 c4 10 add $0x10,%esp 10cc9b: e9 48 ff ff ff jmp 10cbe8 <_Objects_Extend_information+0x21c> =============================================================================== 0010cdd8 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cdd8: 55 push %ebp 10cdd9: 89 e5 mov %esp,%ebp 10cddb: 53 push %ebx 10cddc: 83 ec 14 sub $0x14,%esp 10cddf: 8b 55 08 mov 0x8(%ebp),%edx 10cde2: 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; 10cde5: b8 01 00 00 00 mov $0x1,%eax 10cdea: 2b 42 08 sub 0x8(%edx),%eax 10cded: 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 ) { 10cdf0: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cdf4: 39 c8 cmp %ecx,%eax 10cdf6: 77 24 ja 10ce1c <_Objects_Get+0x44> 10cdf8: 8b 0d d4 63 12 00 mov 0x1263d4,%ecx 10cdfe: 41 inc %ecx 10cdff: 89 0d d4 63 12 00 mov %ecx,0x1263d4 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ce05: 8b 52 1c mov 0x1c(%edx),%edx 10ce08: 8b 04 82 mov (%edx,%eax,4),%eax 10ce0b: 85 c0 test %eax,%eax 10ce0d: 74 1b je 10ce2a <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10ce0f: 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 } 10ce15: 83 c4 14 add $0x14,%esp 10ce18: 5b pop %ebx 10ce19: c9 leave 10ce1a: c3 ret 10ce1b: 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; 10ce1c: 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; 10ce22: 31 c0 xor %eax,%eax #endif } 10ce24: 83 c4 14 add $0x14,%esp 10ce27: 5b pop %ebx 10ce28: c9 leave 10ce29: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10ce2a: 89 45 f4 mov %eax,-0xc(%ebp) 10ce2d: e8 0a 08 00 00 call 10d63c <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10ce32: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce38: 8b 45 f4 mov -0xc(%ebp),%eax 10ce3b: eb d8 jmp 10ce15 <_Objects_Get+0x3d> =============================================================================== 0010cd30 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cd30: 55 push %ebp 10cd31: 89 e5 mov %esp,%ebp 10cd33: 56 push %esi 10cd34: 53 push %ebx 10cd35: 8b 75 08 mov 0x8(%ebp),%esi 10cd38: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cd3b: 85 db test %ebx,%ebx 10cd3d: 75 09 jne 10cd48 <_Objects_Get_information+0x18> 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; 10cd3f: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cd41: 8d 65 f8 lea -0x8(%ebp),%esp 10cd44: 5b pop %ebx 10cd45: 5e pop %esi 10cd46: c9 leave 10cd47: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10cd48: 83 ec 0c sub $0xc,%esp 10cd4b: 56 push %esi 10cd4c: e8 1f 3c 00 00 call 110970 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cd51: 83 c4 10 add $0x10,%esp 10cd54: 85 c0 test %eax,%eax 10cd56: 74 e7 je 10cd3f <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cd58: 39 c3 cmp %eax,%ebx 10cd5a: 77 e3 ja 10cd3f <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd5c: 8b 14 b5 ac 63 12 00 mov 0x1263ac(,%esi,4),%edx return NULL; 10cd63: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd65: 85 d2 test %edx,%edx 10cd67: 74 d8 je 10cd41 <_Objects_Get_information+0x11><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cd69: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10cd6c: 85 c0 test %eax,%eax 10cd6e: 74 d1 je 10cd41 <_Objects_Get_information+0x11><== 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; 10cd70: 31 d2 xor %edx,%edx 10cd72: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cd77: 0f 95 c2 setne %dl 10cd7a: f7 da neg %edx 10cd7c: 21 d0 and %edx,%eax 10cd7e: eb c1 jmp 10cd41 <_Objects_Get_information+0x11> =============================================================================== 0010cd80 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cd80: 55 push %ebp 10cd81: 89 e5 mov %esp,%ebp 10cd83: 56 push %esi 10cd84: 53 push %ebx 10cd85: 8b 55 08 mov 0x8(%ebp),%edx 10cd88: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cd8b: b8 01 00 00 00 mov $0x1,%eax 10cd90: 2b 42 08 sub 0x8(%edx),%eax 10cd93: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd96: 9c pushf 10cd97: fa cli 10cd98: 5e pop %esi if ( information->maximum >= index ) { 10cd99: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd9d: 39 c8 cmp %ecx,%eax 10cd9f: 77 1b ja 10cdbc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cda1: 8b 52 1c mov 0x1c(%edx),%edx 10cda4: 8b 04 82 mov (%edx,%eax,4),%eax 10cda7: 85 c0 test %eax,%eax 10cda9: 74 21 je 10cdcc <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cdab: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cdb1: 8b 55 14 mov 0x14(%ebp),%edx 10cdb4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cdb6: 5b pop %ebx 10cdb7: 5e pop %esi 10cdb8: c9 leave 10cdb9: c3 ret 10cdba: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cdbc: 56 push %esi 10cdbd: 9d popf *location = OBJECTS_ERROR; 10cdbe: 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; 10cdc4: 31 c0 xor %eax,%eax #endif } 10cdc6: 5b pop %ebx 10cdc7: 5e pop %esi 10cdc8: c9 leave 10cdc9: c3 ret 10cdca: 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 ); 10cdcc: 56 push %esi 10cdcd: 9d popf *location = OBJECTS_ERROR; 10cdce: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cdd4: eb e0 jmp 10cdb6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e458 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e458: 55 push %ebp 10e459: 89 e5 mov %esp,%ebp 10e45b: 57 push %edi 10e45c: 56 push %esi 10e45d: 53 push %ebx 10e45e: 83 ec 2c sub $0x2c,%esp 10e461: 8b 7d 08 mov 0x8(%ebp),%edi 10e464: 8b 75 0c mov 0xc(%ebp),%esi 10e467: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e46a: 85 f6 test %esi,%esi 10e46c: 75 0e jne 10e47c <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e46e: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e470: 89 d8 mov %ebx,%eax 10e472: 8d 65 f4 lea -0xc(%ebp),%esp 10e475: 5b pop %ebx 10e476: 5e pop %esi 10e477: 5f pop %edi 10e478: c9 leave 10e479: c3 ret 10e47a: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e47c: 85 db test %ebx,%ebx 10e47e: 74 f0 je 10e470 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e480: 85 ff test %edi,%edi 10e482: 75 08 jne 10e48c <_Objects_Get_name_as_string+0x34> 10e484: a1 98 18 13 00 mov 0x131898,%eax 10e489: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e48c: 83 ec 0c sub $0xc,%esp 10e48f: 57 push %edi 10e490: e8 fb fe ff ff call 10e390 <_Objects_Get_information_id> if ( !information ) 10e495: 83 c4 10 add $0x10,%esp 10e498: 85 c0 test %eax,%eax 10e49a: 74 d2 je 10e46e <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e49c: 51 push %ecx 10e49d: 8d 55 e4 lea -0x1c(%ebp),%edx 10e4a0: 52 push %edx 10e4a1: 57 push %edi 10e4a2: 50 push %eax 10e4a3: e8 7c 00 00 00 call 10e524 <_Objects_Get> switch ( location ) { 10e4a8: 83 c4 10 add $0x10,%esp 10e4ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4ae: 85 d2 test %edx,%edx 10e4b0: 75 bc jne 10e46e <_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; 10e4b2: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e4b5: 89 d1 mov %edx,%ecx 10e4b7: c1 e9 18 shr $0x18,%ecx 10e4ba: 88 c8 mov %cl,%al 10e4bc: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e4bf: 89 d1 mov %edx,%ecx 10e4c1: c1 e9 10 shr $0x10,%ecx 10e4c4: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e4c7: 89 d1 mov %edx,%ecx 10e4c9: c1 e9 08 shr $0x8,%ecx 10e4cc: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e4cf: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e4d2: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e4d6: 4e dec %esi 10e4d7: 89 75 d4 mov %esi,-0x2c(%ebp) 10e4da: 74 42 je 10e51e <_Objects_Get_name_as_string+0xc6><== NEVER TAKEN 10e4dc: 84 c0 test %al,%al 10e4de: 74 3e je 10e51e <_Objects_Get_name_as_string+0xc6> 10e4e0: 89 d9 mov %ebx,%ecx 10e4e2: 31 d2 xor %edx,%edx 10e4e4: eb 0a jmp 10e4f0 <_Objects_Get_name_as_string+0x98> 10e4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e4e8: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10e4ec: 84 c0 test %al,%al 10e4ee: 74 21 je 10e511 <_Objects_Get_name_as_string+0xb9> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e4f0: 0f b6 f0 movzbl %al,%esi 10e4f3: 8b 3d 28 75 12 00 mov 0x127528,%edi 10e4f9: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e4fe: 81 e6 97 00 00 00 and $0x97,%esi 10e504: 75 02 jne 10e508 <_Objects_Get_name_as_string+0xb0> 10e506: b0 2a mov $0x2a,%al 10e508: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e50a: 42 inc %edx 10e50b: 41 inc %ecx 10e50c: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e50f: 72 d7 jb 10e4e8 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e511: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e514: e8 6f 08 00 00 call 10ed88 <_Thread_Enable_dispatch> return name; 10e519: e9 52 ff ff ff jmp 10e470 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e51e: 89 d9 mov %ebx,%ecx 10e520: eb ef jmp 10e511 <_Objects_Get_name_as_string+0xb9> =============================================================================== 0010cf20 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cf20: 55 push %ebp 10cf21: 89 e5 mov %esp,%ebp 10cf23: 57 push %edi 10cf24: 56 push %esi 10cf25: 53 push %ebx 10cf26: 83 ec 0c sub $0xc,%esp 10cf29: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf2c: 8b 75 0c mov 0xc(%ebp),%esi 10cf2f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cf32: 85 db test %ebx,%ebx 10cf34: 75 0a jne 10cf40 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cf36: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf38: 8d 65 f4 lea -0xc(%ebp),%esp 10cf3b: 5b pop %ebx 10cf3c: 5e pop %esi 10cf3d: 5f pop %edi 10cf3e: c9 leave 10cf3f: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cf40: 85 ff test %edi,%edi 10cf42: 74 f2 je 10cf36 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cf44: 8b 45 14 mov 0x14(%ebp),%eax 10cf47: 85 c0 test %eax,%eax 10cf49: 74 eb je 10cf36 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cf4b: 66 85 f6 test %si,%si 10cf4e: 75 04 jne 10cf54 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cf50: 8b 73 08 mov 0x8(%ebx),%esi 10cf53: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cf54: 66 39 73 10 cmp %si,0x10(%ebx) 10cf58: 72 22 jb 10cf7c <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cf5a: 51 push %ecx 10cf5b: 57 push %edi 10cf5c: 56 push %esi 10cf5d: 53 push %ebx 10cf5e: e8 2d 00 00 00 call 10cf90 <_Objects_Get> next_id++; 10cf63: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cf64: 83 c4 10 add $0x10,%esp 10cf67: 8b 17 mov (%edi),%edx 10cf69: 85 d2 test %edx,%edx 10cf6b: 75 e7 jne 10cf54 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cf6d: 8b 55 14 mov 0x14(%ebp),%edx 10cf70: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf72: 8d 65 f4 lea -0xc(%ebp),%esp 10cf75: 5b pop %ebx 10cf76: 5e pop %esi 10cf77: 5f pop %edi 10cf78: c9 leave 10cf79: c3 ret 10cf7a: 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; 10cf7c: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cf82: 8b 45 14 mov 0x14(%ebp),%eax 10cf85: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cf8b: 31 c0 xor %eax,%eax 10cf8d: eb a9 jmp 10cf38 <_Objects_Get_next+0x18> =============================================================================== 0011b220 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b220: 55 push %ebp 11b221: 89 e5 mov %esp,%ebp 11b223: 53 push %ebx 11b224: 8b 55 08 mov 0x8(%ebp),%edx 11b227: 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; 11b22a: b8 01 00 00 00 mov $0x1,%eax 11b22f: 2b 42 08 sub 0x8(%edx),%eax 11b232: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b235: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b239: 39 c8 cmp %ecx,%eax 11b23b: 77 13 ja 11b250 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b23d: 8b 52 1c mov 0x1c(%edx),%edx 11b240: 8b 04 82 mov (%edx,%eax,4),%eax 11b243: 85 c0 test %eax,%eax 11b245: 74 09 je 11b250 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b247: 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; } 11b24d: 5b pop %ebx 11b24e: c9 leave 11b24f: 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; 11b250: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b256: 31 c0 xor %eax,%eax } 11b258: 5b pop %ebx 11b259: c9 leave 11b25a: c3 ret =============================================================================== 0010e068 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e068: 55 push %ebp 10e069: 89 e5 mov %esp,%ebp 10e06b: 83 ec 18 sub $0x18,%esp 10e06e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e071: 85 d2 test %edx,%edx 10e073: 75 08 jne 10e07d <_Objects_Id_to_name+0x15> 10e075: a1 58 86 12 00 mov 0x128658,%eax 10e07a: 8b 50 08 mov 0x8(%eax),%edx 10e07d: 89 d0 mov %edx,%eax 10e07f: c1 e8 18 shr $0x18,%eax 10e082: 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 ) 10e085: 8d 48 ff lea -0x1(%eax),%ecx 10e088: 83 f9 02 cmp $0x2,%ecx 10e08b: 77 3b ja 10e0c8 <_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 ] ) 10e08d: 8b 04 85 8c 83 12 00 mov 0x12838c(,%eax,4),%eax 10e094: 85 c0 test %eax,%eax 10e096: 74 30 je 10e0c8 <_Objects_Id_to_name+0x60><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e098: 89 d1 mov %edx,%ecx 10e09a: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e09d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e0a0: 85 c0 test %eax,%eax 10e0a2: 74 24 je 10e0c8 <_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 ); 10e0a4: 51 push %ecx 10e0a5: 8d 4d f4 lea -0xc(%ebp),%ecx 10e0a8: 51 push %ecx 10e0a9: 52 push %edx 10e0aa: 50 push %eax 10e0ab: e8 50 ff ff ff call 10e000 <_Objects_Get> if ( !the_object ) 10e0b0: 83 c4 10 add $0x10,%esp 10e0b3: 85 c0 test %eax,%eax 10e0b5: 74 11 je 10e0c8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e0b7: 8b 50 0c mov 0xc(%eax),%edx 10e0ba: 8b 45 0c mov 0xc(%ebp),%eax 10e0bd: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e0bf: e8 08 08 00 00 call 10e8cc <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e0c4: 31 c0 xor %eax,%eax } 10e0c6: c9 leave 10e0c7: 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; 10e0c8: 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; } 10e0cd: c9 leave 10e0ce: c3 ret =============================================================================== 0010ce40 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10ce40: 55 push %ebp 10ce41: 89 e5 mov %esp,%ebp 10ce43: 57 push %edi 10ce44: 56 push %esi 10ce45: 53 push %ebx 10ce46: 83 ec 0c sub $0xc,%esp 10ce49: 8b 45 08 mov 0x8(%ebp),%eax 10ce4c: 8b 55 0c mov 0xc(%ebp),%edx 10ce4f: 8b 5d 10 mov 0x10(%ebp),%ebx 10ce52: 8b 75 20 mov 0x20(%ebp),%esi 10ce55: 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; 10ce59: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ce5b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ce5f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10ce62: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10ce69: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ce70: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ce77: 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; 10ce7d: 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; 10ce83: 8b 3c 95 ac 63 12 00 mov 0x1263ac(,%edx,4),%edi 10ce8a: 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; 10ce8d: 8b 7d 14 mov 0x14(%ebp),%edi 10ce90: 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 = 10ce93: 89 f9 mov %edi,%ecx 10ce95: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10ce98: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce9b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cea1: 85 ff test %edi,%edi 10cea3: 74 04 je 10cea9 <_Objects_Initialize_information+0x69> 10cea5: 85 c9 test %ecx,%ecx 10cea7: 74 6a je 10cf13 <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cea9: 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; 10cead: c7 40 1c 44 60 12 00 movl $0x126044,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ceb4: c1 e2 18 shl $0x18,%edx 10ceb7: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cebd: c1 e3 1b shl $0x1b,%ebx 10cec0: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10cec2: 31 db xor %ebx,%ebx 10cec4: 85 c9 test %ecx,%ecx 10cec6: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cec9: 09 da or %ebx,%edx 10cecb: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cece: f7 c6 03 00 00 00 test $0x3,%esi 10ced4: 75 26 jne 10cefc <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10ced6: 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; 10ceda: 8d 50 24 lea 0x24(%eax),%edx 10cedd: 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; 10cee0: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10cee7: 8d 50 20 lea 0x20(%eax),%edx 10ceea: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ceed: 85 c9 test %ecx,%ecx 10ceef: 75 13 jne 10cf04 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cef1: 8d 65 f4 lea -0xc(%ebp),%esp 10cef4: 5b pop %ebx 10cef5: 5e pop %esi 10cef6: 5f pop %edi 10cef7: c9 leave 10cef8: c3 ret 10cef9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cefc: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ceff: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10cf02: eb d2 jmp 10ced6 <_Objects_Initialize_information+0x96><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10cf04: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf07: 8d 65 f4 lea -0xc(%ebp),%esp 10cf0a: 5b pop %ebx 10cf0b: 5e pop %esi 10cf0c: 5f pop %edi 10cf0d: 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 ); 10cf0e: e9 b9 fa ff ff jmp 10c9cc <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cf13: 50 push %eax 10cf14: 6a 13 push $0x13 10cf16: 6a 01 push $0x1 10cf18: 6a 00 push $0x0 10cf1a: e8 79 f9 ff ff call 10c898 <_Internal_error_Occurred> =============================================================================== 0010cf30 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cf30: 55 push %ebp 10cf31: 89 e5 mov %esp,%ebp 10cf33: 57 push %edi 10cf34: 56 push %esi 10cf35: 53 push %ebx 10cf36: 8b 45 08 mov 0x8(%ebp),%eax 10cf39: 8b 4d 0c mov 0xc(%ebp),%ecx 10cf3c: 8b 55 10 mov 0x10(%ebp),%edx 10cf3f: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cf42: 85 ff test %edi,%edi 10cf44: 74 56 je 10cf9c <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cf46: 85 c9 test %ecx,%ecx 10cf48: 74 08 je 10cf52 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf4a: 8b 70 10 mov 0x10(%eax),%esi 10cf4d: 66 85 f6 test %si,%si 10cf50: 75 0a jne 10cf5c <_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; 10cf52: b8 01 00 00 00 mov $0x1,%eax #endif } 10cf57: 5b pop %ebx 10cf58: 5e pop %esi 10cf59: 5f pop %edi 10cf5a: c9 leave 10cf5b: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf5c: 85 d2 test %edx,%edx 10cf5e: 75 20 jne 10cf80 <_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++ ) { 10cf60: 0f b7 f6 movzwl %si,%esi 10cf63: 8b 58 1c mov 0x1c(%eax),%ebx 10cf66: b8 01 00 00 00 mov $0x1,%eax 10cf6b: 90 nop the_object = information->local_table[ index ]; 10cf6c: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cf6f: 85 d2 test %edx,%edx 10cf71: 74 05 je 10cf78 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cf73: 39 4a 0c cmp %ecx,0xc(%edx) 10cf76: 74 18 je 10cf90 <_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++ ) { 10cf78: 40 inc %eax 10cf79: 39 c6 cmp %eax,%esi 10cf7b: 73 ef jae 10cf6c <_Objects_Name_to_id_u32+0x3c> 10cf7d: eb d3 jmp 10cf52 <_Objects_Name_to_id_u32+0x22> 10cf7f: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cf80: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cf86: 74 d8 je 10cf60 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cf88: 4a dec %edx 10cf89: 75 c7 jne 10cf52 <_Objects_Name_to_id_u32+0x22> 10cf8b: eb d3 jmp 10cf60 <_Objects_Name_to_id_u32+0x30> 10cf8d: 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; 10cf90: 8b 42 08 mov 0x8(%edx),%eax 10cf93: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf95: 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 } 10cf97: 5b pop %ebx 10cf98: 5e pop %esi 10cf99: 5f pop %edi 10cf9a: c9 leave 10cf9b: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf9c: 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 } 10cfa1: 5b pop %ebx 10cfa2: 5e pop %esi 10cfa3: 5f pop %edi 10cfa4: c9 leave 10cfa5: c3 ret =============================================================================== 0010ed64 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ed64: 55 push %ebp 10ed65: 89 e5 mov %esp,%ebp 10ed67: 53 push %ebx 10ed68: 83 ec 0c sub $0xc,%esp 10ed6b: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10ed6e: 8b 45 08 mov 0x8(%ebp),%eax 10ed71: 0f b7 40 38 movzwl 0x38(%eax),%eax 10ed75: 50 push %eax 10ed76: 53 push %ebx 10ed77: e8 fc 65 00 00 call 115378 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ed7c: 0f be 0b movsbl (%ebx),%ecx 10ed7f: c1 e1 18 shl $0x18,%ecx 10ed82: 83 c4 10 add $0x10,%esp 10ed85: 83 f8 01 cmp $0x1,%eax 10ed88: 76 32 jbe 10edbc <_Objects_Set_name+0x58> 10ed8a: 0f be 53 01 movsbl 0x1(%ebx),%edx 10ed8e: c1 e2 10 shl $0x10,%edx 10ed91: 09 ca or %ecx,%edx 10ed93: 83 f8 02 cmp $0x2,%eax 10ed96: 74 2c je 10edc4 <_Objects_Set_name+0x60> 10ed98: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10ed9c: c1 e1 08 shl $0x8,%ecx 10ed9f: 09 d1 or %edx,%ecx 10eda1: 83 f8 03 cmp $0x3,%eax 10eda4: 74 37 je 10eddd <_Objects_Set_name+0x79> 10eda6: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edaa: 09 c1 or %eax,%ecx 10edac: 8b 55 0c mov 0xc(%ebp),%edx 10edaf: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edb2: b0 01 mov $0x1,%al 10edb4: 8b 5d fc mov -0x4(%ebp),%ebx 10edb7: c9 leave 10edb8: c3 ret 10edb9: 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( 10edbc: 89 ca mov %ecx,%edx 10edbe: 81 ca 00 00 20 00 or $0x200000,%edx 10edc4: 89 d1 mov %edx,%ecx 10edc6: 80 cd 20 or $0x20,%ch 10edc9: b8 20 00 00 00 mov $0x20,%eax 10edce: 09 c1 or %eax,%ecx 10edd0: 8b 55 0c mov 0xc(%ebp),%edx 10edd3: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edd6: b0 01 mov $0x1,%al 10edd8: 8b 5d fc mov -0x4(%ebp),%ebx 10eddb: c9 leave 10eddc: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eddd: b8 20 00 00 00 mov $0x20,%eax 10ede2: eb c6 jmp 10edaa <_Objects_Set_name+0x46> =============================================================================== 0010cfa8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cfa8: 55 push %ebp 10cfa9: 89 e5 mov %esp,%ebp 10cfab: 57 push %edi 10cfac: 56 push %esi 10cfad: 53 push %ebx 10cfae: 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 ); 10cfb1: 8b 45 08 mov 0x8(%ebp),%eax 10cfb4: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cfb8: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cfbc: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cfc0: 29 d8 sub %ebx,%eax 10cfc2: 31 d2 xor %edx,%edx 10cfc4: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cfc6: 85 c0 test %eax,%eax 10cfc8: 74 21 je 10cfeb <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cfca: 8b 55 08 mov 0x8(%ebp),%edx 10cfcd: 8b 7a 30 mov 0x30(%edx),%edi 10cfd0: 3b 0f cmp (%edi),%ecx 10cfd2: 74 1f je 10cff3 <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cfd4: 31 d2 xor %edx,%edx 10cfd6: eb 0e jmp 10cfe6 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cfd8: 01 cb add %ecx,%ebx 10cfda: 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 ] == 10cfe1: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cfe4: 74 12 je 10cff8 <_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++ ) { 10cfe6: 42 inc %edx 10cfe7: 39 d0 cmp %edx,%eax 10cfe9: 77 ed ja 10cfd8 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cfeb: 8d 65 f4 lea -0xc(%ebp),%esp 10cfee: 5b pop %ebx 10cfef: 5e pop %esi 10cff0: 5f pop %edi 10cff1: c9 leave 10cff2: 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 ] == 10cff3: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cff5: 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; 10cff8: 8b 55 08 mov 0x8(%ebp),%edx 10cffb: 8b 42 20 mov 0x20(%edx),%eax 10cffe: 89 75 e4 mov %esi,-0x1c(%ebp) 10d001: eb 07 jmp 10d00a <_Objects_Shrink_information+0x62> 10d003: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d004: 85 ff test %edi,%edi 10d006: 74 2c je 10d034 <_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; 10d008: 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 ); 10d00a: 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; 10d00e: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d010: 39 da cmp %ebx,%edx 10d012: 72 f0 jb 10d004 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d014: 8b 75 08 mov 0x8(%ebp),%esi 10d017: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d01b: 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) && 10d01e: 39 ca cmp %ecx,%edx 10d020: 73 e2 jae 10d004 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10d022: 83 ec 0c sub $0xc,%esp 10d025: 50 push %eax 10d026: e8 01 f0 ff ff call 10c02c <_Chain_Extract> 10d02b: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d02e: 85 ff test %edi,%edi 10d030: 75 d6 jne 10d008 <_Objects_Shrink_information+0x60> 10d032: 66 90 xchg %ax,%ax 10d034: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d037: 83 ec 0c sub $0xc,%esp 10d03a: 8b 55 08 mov 0x8(%ebp),%edx 10d03d: 8b 42 34 mov 0x34(%edx),%eax 10d040: ff 34 30 pushl (%eax,%esi,1) 10d043: e8 8c 17 00 00 call 10e7d4 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d048: 8b 55 08 mov 0x8(%ebp),%edx 10d04b: 8b 42 34 mov 0x34(%edx),%eax 10d04e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d055: 8b 42 30 mov 0x30(%edx),%eax 10d058: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d05f: 8b 42 14 mov 0x14(%edx),%eax 10d062: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d066: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d069: 8d 65 f4 lea -0xc(%ebp),%esp 10d06c: 5b pop %ebx 10d06d: 5e pop %esi 10d06e: 5f pop %edi 10d06f: c9 leave 10d070: c3 ret =============================================================================== 00110aa0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110aa0: 55 push %ebp 110aa1: 89 e5 mov %esp,%ebp 110aa3: 56 push %esi 110aa4: 53 push %ebx 110aa5: 8b 5d 08 mov 0x8(%ebp),%ebx 110aa8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110aab: 85 db test %ebx,%ebx 110aad: 74 35 je 110ae4 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110aaf: 85 f6 test %esi,%esi 110ab1: 74 31 je 110ae4 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110ab3: 83 ec 0c sub $0xc,%esp 110ab6: ff 35 24 d5 12 00 pushl 0x12d524 110abc: e8 6b e5 ff ff call 10f02c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110ac1: 5a pop %edx 110ac2: 59 pop %ecx 110ac3: 56 push %esi 110ac4: 53 push %ebx 110ac5: e8 7a 3a 00 00 call 114544 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110aca: 58 pop %eax 110acb: ff 35 24 d5 12 00 pushl 0x12d524 110ad1: e8 9e e5 ff ff call 10f074 <_API_Mutex_Unlock> return true; 110ad6: 83 c4 10 add $0x10,%esp 110ad9: b0 01 mov $0x1,%al } 110adb: 8d 65 f8 lea -0x8(%ebp),%esp 110ade: 5b pop %ebx 110adf: 5e pop %esi 110ae0: c9 leave 110ae1: c3 ret 110ae2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 110ae4: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 110ae6: 8d 65 f8 lea -0x8(%ebp),%esp 110ae9: 5b pop %ebx 110aea: 5e pop %esi 110aeb: c9 leave 110aec: c3 ret =============================================================================== 00110b44 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110b44: 55 push %ebp 110b45: 89 e5 mov %esp,%ebp 110b47: 56 push %esi 110b48: 53 push %ebx 110b49: 83 ec 10 sub $0x10,%esp 110b4c: 8b 5d 08 mov 0x8(%ebp),%ebx 110b4f: 8b 75 0c mov 0xc(%ebp),%esi 110b52: 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 ) { 110b55: 8b 15 74 d4 12 00 mov 0x12d474,%edx 110b5b: 85 d2 test %edx,%edx 110b5d: 74 19 je 110b78 <_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 ); 110b5f: 0f b6 c0 movzbl %al,%eax 110b62: 89 45 10 mov %eax,0x10(%ebp) 110b65: 89 75 0c mov %esi,0xc(%ebp) 110b68: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110b6b: 8d 65 f8 lea -0x8(%ebp),%esp 110b6e: 5b pop %ebx 110b6f: 5e pop %esi 110b70: 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 ); 110b71: e9 7e f2 ff ff jmp 10fdf4 <_Heap_Walk> 110b76: 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(); 110b78: 83 ec 0c sub $0xc,%esp 110b7b: ff 35 24 d5 12 00 pushl 0x12d524 110b81: 88 45 f4 mov %al,-0xc(%ebp) 110b84: e8 a3 e4 ff ff call 10f02c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110b89: 83 c4 0c add $0xc,%esp 110b8c: 8a 45 f4 mov -0xc(%ebp),%al 110b8f: 0f b6 c0 movzbl %al,%eax 110b92: 50 push %eax 110b93: 56 push %esi 110b94: 53 push %ebx 110b95: e8 5a f2 ff ff call 10fdf4 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110b9a: 5a pop %edx 110b9b: ff 35 24 d5 12 00 pushl 0x12d524 110ba1: 88 45 f4 mov %al,-0xc(%ebp) 110ba4: e8 cb e4 ff ff call 10f074 <_API_Mutex_Unlock> 110ba9: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110bac: 8a 45 f4 mov -0xc(%ebp),%al 110baf: 8d 65 f8 lea -0x8(%ebp),%esp 110bb2: 5b pop %ebx 110bb3: 5e pop %esi 110bb4: c9 leave 110bb5: c3 ret =============================================================================== 00110290 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110290: 55 push %ebp 110291: 89 e5 mov %esp,%ebp 110293: 53 push %ebx 110294: 83 ec 10 sub $0x10,%esp 110297: 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 ); 11029a: 80 3d 84 22 12 00 01 cmpb $0x1,0x122284 1102a1: 19 c0 sbb %eax,%eax 1102a3: 83 e0 c0 and $0xffffffc0,%eax 1102a6: 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 ); 1102a9: 50 push %eax 1102aa: e8 09 e5 ff ff call 10e7b8 <_Workspace_Allocate> if ( !api ) 1102af: 83 c4 10 add $0x10,%esp 1102b2: 85 c0 test %eax,%eax 1102b4: 74 6a je 110320 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 1102b6: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 1102bc: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 1102c2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 1102c9: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1102cd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1102d4: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1102db: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1102e2: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 1102e9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 1102f0: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 1102f7: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 1102fa: 80 3d 84 22 12 00 00 cmpb $0x0,0x122284 110301: 74 13 je 110316 <_RTEMS_tasks_Create_extension+0x86> 110303: 31 d2 xor %edx,%edx 110305: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110308: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 11030f: 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++) 110310: 42 inc %edx 110311: 83 fa 10 cmp $0x10,%edx 110314: 75 f2 jne 110308 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 110316: b0 01 mov $0x1,%al } 110318: 8b 5d fc mov -0x4(%ebp),%ebx 11031b: c9 leave 11031c: c3 ret 11031d: 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; 110320: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 110322: 8b 5d fc mov -0x4(%ebp),%ebx 110325: c9 leave 110326: c3 ret =============================================================================== 00110238 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110238: 55 push %ebp 110239: 89 e5 mov %esp,%ebp 11023b: 56 push %esi 11023c: 53 push %ebx 11023d: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110240: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax deleted->task_variables = NULL; 110246: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 11024d: 00 00 00 while (tvp) { 110250: 85 c0 test %eax,%eax 110252: 75 06 jne 11025a <_RTEMS_tasks_Delete_extension+0x22> 110254: eb 17 jmp 11026d <_RTEMS_tasks_Delete_extension+0x35> 110256: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110258: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 11025a: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 11025c: 83 ec 08 sub $0x8,%esp 11025f: 50 push %eax 110260: 53 push %ebx 110261: e8 56 01 00 00 call 1103bc <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 110266: 83 c4 10 add $0x10,%esp 110269: 85 f6 test %esi,%esi 11026b: 75 eb jne 110258 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 11026d: 83 ec 0c sub $0xc,%esp 110270: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 110276: e8 59 e5 ff ff call 10e7d4 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 11027b: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 110282: 00 00 00 110285: 83 c4 10 add $0x10,%esp } 110288: 8d 65 f8 lea -0x8(%ebp),%esp 11028b: 5b pop %ebx 11028c: 5e pop %esi 11028d: c9 leave 11028e: c3 ret =============================================================================== 001101bc <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1101bc: 55 push %ebp 1101bd: 89 e5 mov %esp,%ebp 1101bf: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1101c2: a1 00 23 12 00 mov 0x122300,%eax 1101c7: 85 c0 test %eax,%eax 1101c9: 74 05 je 1101d0 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1101cb: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1101cc: ff e0 jmp *%eax 1101ce: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1101d0: c9 leave 1101d1: c3 ret =============================================================================== 0010bb08 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10bb08: 55 push %ebp 10bb09: 89 e5 mov %esp,%ebp 10bb0b: 57 push %edi 10bb0c: 56 push %esi 10bb0d: 53 push %ebx 10bb0e: 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; 10bb11: 8b 1d ac 22 12 00 mov 0x1222ac,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10bb17: 8b 3d a8 22 12 00 mov 0x1222a8,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10bb1d: 85 db test %ebx,%ebx 10bb1f: 74 46 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb21: 85 ff test %edi,%edi 10bb23: 74 42 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10bb25: 31 f6 xor %esi,%esi 10bb27: 90 nop return_value = rtems_task_create( 10bb28: 83 ec 08 sub $0x8,%esp 10bb2b: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb2e: 50 push %eax 10bb2f: ff 73 0c pushl 0xc(%ebx) 10bb32: ff 73 14 pushl 0x14(%ebx) 10bb35: ff 73 04 pushl 0x4(%ebx) 10bb38: ff 73 08 pushl 0x8(%ebx) 10bb3b: ff 33 pushl (%ebx) 10bb3d: e8 92 fd ff ff call 10b8d4 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10bb42: 83 c4 20 add $0x20,%esp 10bb45: 85 c0 test %eax,%eax 10bb47: 75 26 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10bb49: 51 push %ecx 10bb4a: ff 73 18 pushl 0x18(%ebx) 10bb4d: ff 73 10 pushl 0x10(%ebx) 10bb50: ff 75 e4 pushl -0x1c(%ebp) 10bb53: e8 24 00 00 00 call 10bb7c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bb58: 83 c4 10 add $0x10,%esp 10bb5b: 85 c0 test %eax,%eax 10bb5d: 75 10 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb5f: 46 inc %esi 10bb60: 83 c3 1c add $0x1c,%ebx 10bb63: 39 f7 cmp %esi,%edi 10bb65: 77 c1 ja 10bb28 <_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 ); } } 10bb67: 8d 65 f4 lea -0xc(%ebp),%esp 10bb6a: 5b pop %ebx 10bb6b: 5e pop %esi 10bb6c: 5f pop %edi 10bb6d: c9 leave 10bb6e: 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 ); 10bb6f: 52 push %edx 10bb70: 50 push %eax 10bb71: 6a 01 push $0x1 10bb73: 6a 01 push $0x1 10bb75: e8 1e 0d 00 00 call 10c898 <_Internal_error_Occurred> =============================================================================== 001101d4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1101d4: 55 push %ebp 1101d5: 89 e5 mov %esp,%ebp 1101d7: 57 push %edi 1101d8: 56 push %esi 1101d9: 53 push %ebx 1101da: 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 ]; 1101dd: 8b 45 08 mov 0x8(%ebp),%eax 1101e0: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1101e6: 85 db test %ebx,%ebx 1101e8: 74 45 je 11022f <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1101ea: 9c pushf 1101eb: fa cli 1101ec: 58 pop %eax signal_set = asr->signals_posted; 1101ed: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1101f0: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1101f7: 50 push %eax 1101f8: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1101f9: 85 f6 test %esi,%esi 1101fb: 74 32 je 11022f <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 1101fd: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110200: 50 push %eax 110201: 8d 7d e4 lea -0x1c(%ebp),%edi 110204: 57 push %edi 110205: 68 ff ff 00 00 push $0xffff 11020a: ff 73 10 pushl 0x10(%ebx) 11020d: e8 b6 1d 00 00 call 111fc8 (*asr->handler)( signal_set ); 110212: 89 34 24 mov %esi,(%esp) 110215: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110218: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 11021b: 83 c4 0c add $0xc,%esp 11021e: 57 push %edi 11021f: 68 ff ff 00 00 push $0xffff 110224: ff 75 e4 pushl -0x1c(%ebp) 110227: e8 9c 1d 00 00 call 111fc8 11022c: 83 c4 10 add $0x10,%esp } 11022f: 8d 65 f4 lea -0xc(%ebp),%esp 110232: 5b pop %ebx 110233: 5e pop %esi 110234: 5f pop %edi 110235: c9 leave 110236: c3 ret =============================================================================== 00110174 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110174: 55 push %ebp 110175: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 110177: 8b 45 08 mov 0x8(%ebp),%eax 11017a: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110180: 85 c0 test %eax,%eax 110182: 74 13 je 110197 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110184: 8b 50 04 mov 0x4(%eax),%edx 110187: 8b 0a mov (%edx),%ecx 110189: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 11018c: 8b 48 08 mov 0x8(%eax),%ecx 11018f: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110191: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110193: 85 c0 test %eax,%eax 110195: 75 ed jne 110184 <_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; 110197: 8b 45 0c mov 0xc(%ebp),%eax 11019a: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 1101a0: 85 c0 test %eax,%eax 1101a2: 74 13 je 1101b7 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 1101a4: 8b 50 04 mov 0x4(%eax),%edx 1101a7: 8b 0a mov (%edx),%ecx 1101a9: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1101ac: 8b 48 0c mov 0xc(%eax),%ecx 1101af: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1101b1: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1101b3: 85 c0 test %eax,%eax 1101b5: 75 ed jne 1101a4 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1101b7: c9 leave 1101b8: c3 ret =============================================================================== 0010c4d0 <_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 ) { 10c4d0: 55 push %ebp 10c4d1: 89 e5 mov %esp,%ebp 10c4d3: 57 push %edi 10c4d4: 56 push %esi 10c4d5: 53 push %ebx 10c4d6: 83 ec 38 sub $0x38,%esp 10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c4dc: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c4df: 8d 75 e0 lea -0x20(%ebp),%esi 10c4e2: 56 push %esi 10c4e3: e8 60 18 00 00 call 10dd48 <_TOD_Get_uptime> _Timestamp_Subtract( 10c4e8: 83 c4 0c add $0xc,%esp 10c4eb: ff 75 0c pushl 0xc(%ebp) 10c4ee: 56 push %esi 10c4ef: 8d 43 4c lea 0x4c(%ebx),%eax 10c4f2: 50 push %eax 10c4f3: e8 04 39 00 00 call 10fdfc <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c4f8: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c4fe: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c504: 89 45 d8 mov %eax,-0x28(%ebp) 10c507: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c50a: 83 c4 10 add $0x10,%esp 10c50d: 39 3d 18 87 12 00 cmp %edi,0x128718 10c513: 74 0b je 10c520 <_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; 10c515: b0 01 mov $0x1,%al } 10c517: 8d 65 f4 lea -0xc(%ebp),%esp 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: 5f pop %edi 10c51d: c9 leave 10c51e: c3 ret 10c51f: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c520: 52 push %edx 10c521: 8d 7d d0 lea -0x30(%ebp),%edi 10c524: 57 push %edi 10c525: 56 push %esi 10c526: 68 30 85 12 00 push $0x128530 10c52b: e8 cc 38 00 00 call 10fdfc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c530: 5e pop %esi 10c531: 58 pop %eax 10c532: 57 push %edi 10c533: 8d 75 d8 lea -0x28(%ebp),%esi 10c536: 56 push %esi 10c537: e8 c4 37 00 00 call 10fd00 <_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)) 10c53c: 83 c3 44 add $0x44,%ebx 10c53f: 5a pop %edx 10c540: 59 pop %ecx 10c541: 53 push %ebx 10c542: 56 push %esi 10c543: e8 90 38 00 00 call 10fdd8 <_Timespec_Less_than> 10c548: 83 c4 10 add $0x10,%esp 10c54b: 84 c0 test %al,%al 10c54d: 74 05 je 10c554 <_Rate_monotonic_Get_status+0x84> return false; 10c54f: 31 c0 xor %eax,%eax 10c551: eb c4 jmp 10c517 <_Rate_monotonic_Get_status+0x47> 10c553: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c554: 50 push %eax 10c555: ff 75 10 pushl 0x10(%ebp) 10c558: 56 push %esi 10c559: 53 push %ebx 10c55a: e8 9d 38 00 00 call 10fdfc <_Timespec_Subtract> 10c55f: 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; 10c562: b0 01 mov $0x1,%al 10c564: eb b1 jmp 10c517 <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c568 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c568: 55 push %ebp 10c569: 89 e5 mov %esp,%ebp 10c56b: 57 push %edi 10c56c: 56 push %esi 10c56d: 53 push %ebx 10c56e: 83 ec 28 sub $0x28,%esp 10c571: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c574: 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 ); 10c577: 8d 7d e0 lea -0x20(%ebp),%edi 10c57a: 57 push %edi 10c57b: e8 c8 17 00 00 call 10dd48 <_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; 10c580: 8b 45 e0 mov -0x20(%ebp),%eax 10c583: 8b 55 e4 mov -0x1c(%ebp),%edx 10c586: 89 43 4c mov %eax,0x4c(%ebx) 10c589: 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; 10c58c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c592: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c598: 89 43 44 mov %eax,0x44(%ebx) 10c59b: 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) { 10c59e: 83 c4 10 add $0x10,%esp 10c5a1: 39 35 18 87 12 00 cmp %esi,0x128718 10c5a7: 74 0b je 10c5b4 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c5a9: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ac: 5b pop %ebx 10c5ad: 5e pop %esi 10c5ae: 5f pop %edi 10c5af: c9 leave 10c5b0: c3 ret 10c5b1: 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( 10c5b4: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c5b5: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c5b8: 56 push %esi 10c5b9: 57 push %edi 10c5ba: 68 30 85 12 00 push $0x128530 10c5bf: e8 38 38 00 00 call 10fdfc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c5c4: 59 pop %ecx 10c5c5: 5f pop %edi 10c5c6: 56 push %esi 10c5c7: 83 c3 44 add $0x44,%ebx 10c5ca: 53 push %ebx 10c5cb: e8 30 37 00 00 call 10fd00 <_Timespec_Add_to> 10c5d0: 83 c4 10 add $0x10,%esp } #endif } 10c5d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d6: 5b pop %ebx 10c5d7: 5e pop %esi 10c5d8: 5f pop %edi 10c5d9: c9 leave 10c5da: c3 ret =============================================================================== 0010cb30 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10cb30: 55 push %ebp 10cb31: 89 e5 mov %esp,%ebp 10cb33: 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 ); 10cb36: 8d 45 f4 lea -0xc(%ebp),%eax 10cb39: 50 push %eax 10cb3a: ff 75 08 pushl 0x8(%ebp) 10cb3d: 68 80 83 12 00 push $0x128380 10cb42: e8 71 1c 00 00 call 10e7b8 <_Objects_Get> switch ( location ) { 10cb47: 83 c4 10 add $0x10,%esp 10cb4a: 8b 55 f4 mov -0xc(%ebp),%edx 10cb4d: 85 d2 test %edx,%edx 10cb4f: 75 29 jne 10cb7a <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10cb51: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10cb54: f6 42 11 40 testb $0x40,0x11(%edx) 10cb58: 74 08 je 10cb62 <_Rate_monotonic_Timeout+0x32> 10cb5a: 8b 48 08 mov 0x8(%eax),%ecx 10cb5d: 39 4a 20 cmp %ecx,0x20(%edx) 10cb60: 74 4e je 10cbb0 <_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 ) { 10cb62: 83 78 38 01 cmpl $0x1,0x38(%eax) 10cb66: 74 14 je 10cb7c <_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; 10cb68: 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; 10cb6f: a1 74 84 12 00 mov 0x128474,%eax 10cb74: 48 dec %eax 10cb75: a3 74 84 12 00 mov %eax,0x128474 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cb7a: c9 leave 10cb7b: 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; 10cb7c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cb83: 83 ec 0c sub $0xc,%esp 10cb86: 50 push %eax 10cb87: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb8a: e8 d9 f9 ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cb8f: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb92: 8b 50 3c mov 0x3c(%eax),%edx 10cb95: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cb98: 5a pop %edx 10cb99: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cb9a: 83 c0 10 add $0x10,%eax 10cb9d: 50 push %eax 10cb9e: 68 44 85 12 00 push $0x128544 10cba3: e8 34 35 00 00 call 1100dc <_Watchdog_Insert> 10cba8: 83 c4 10 add $0x10,%esp 10cbab: eb c2 jmp 10cb6f <_Rate_monotonic_Timeout+0x3f> 10cbad: 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 ); 10cbb0: 83 ec 08 sub $0x8,%esp 10cbb3: 68 f8 ff 03 10 push $0x1003fff8 10cbb8: 52 push %edx 10cbb9: 89 45 e4 mov %eax,-0x1c(%ebp) 10cbbc: e8 97 20 00 00 call 10ec58 <_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 ); 10cbc1: 8b 45 e4 mov -0x1c(%ebp),%eax 10cbc4: 89 04 24 mov %eax,(%esp) 10cbc7: eb c1 jmp 10cb8a <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c5dc <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c5dc: 55 push %ebp 10c5dd: 89 e5 mov %esp,%ebp 10c5df: 57 push %edi 10c5e0: 56 push %esi 10c5e1: 53 push %ebx 10c5e2: 83 ec 1c sub $0x1c,%esp 10c5e5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c5e8: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c5eb: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c5ef: 0f 84 bf 00 00 00 je 10c6b4 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f5: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5f6: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f9: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5fa: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5fd: 56 push %esi 10c5fe: 53 push %ebx 10c5ff: e8 cc fe ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c604: 83 c4 10 add $0x10,%esp 10c607: 84 c0 test %al,%al 10c609: 75 09 jne 10c614 <_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 } 10c60b: 8d 65 f4 lea -0xc(%ebp),%esp 10c60e: 5b pop %ebx 10c60f: 5e pop %esi 10c610: 5f pop %edi 10c611: c9 leave 10c612: c3 ret 10c613: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c614: 83 ec 08 sub $0x8,%esp 10c617: 57 push %edi 10c618: 8d 43 6c lea 0x6c(%ebx),%eax 10c61b: 50 push %eax 10c61c: e8 df 36 00 00 call 10fd00 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c621: 58 pop %eax 10c622: 5a pop %edx 10c623: 8d 43 5c lea 0x5c(%ebx),%eax 10c626: 50 push %eax 10c627: 57 push %edi 10c628: e8 ab 37 00 00 call 10fdd8 <_Timespec_Less_than> 10c62d: 83 c4 10 add $0x10,%esp 10c630: 84 c0 test %al,%al 10c632: 74 0c je 10c640 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c634: 8b 45 e0 mov -0x20(%ebp),%eax 10c637: 8b 55 e4 mov -0x1c(%ebp),%edx 10c63a: 89 43 5c mov %eax,0x5c(%ebx) 10c63d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c640: 83 ec 08 sub $0x8,%esp 10c643: 8d 43 64 lea 0x64(%ebx),%eax 10c646: 50 push %eax 10c647: 57 push %edi 10c648: e8 67 37 00 00 call 10fdb4 <_Timespec_Greater_than> 10c64d: 83 c4 10 add $0x10,%esp 10c650: 84 c0 test %al,%al 10c652: 74 0c je 10c660 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c654: 8b 45 e0 mov -0x20(%ebp),%eax 10c657: 8b 55 e4 mov -0x1c(%ebp),%edx 10c65a: 89 43 64 mov %eax,0x64(%ebx) 10c65d: 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 ); 10c660: 83 ec 08 sub $0x8,%esp 10c663: 56 push %esi 10c664: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c66a: 50 push %eax 10c66b: e8 90 36 00 00 call 10fd00 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c670: 5a pop %edx 10c671: 59 pop %ecx 10c672: 8d 43 74 lea 0x74(%ebx),%eax 10c675: 50 push %eax 10c676: 56 push %esi 10c677: e8 5c 37 00 00 call 10fdd8 <_Timespec_Less_than> 10c67c: 83 c4 10 add $0x10,%esp 10c67f: 84 c0 test %al,%al 10c681: 75 39 jne 10c6bc <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c683: 83 ec 08 sub $0x8,%esp 10c686: 8d 43 7c lea 0x7c(%ebx),%eax 10c689: 50 push %eax 10c68a: 56 push %esi 10c68b: e8 24 37 00 00 call 10fdb4 <_Timespec_Greater_than> 10c690: 83 c4 10 add $0x10,%esp 10c693: 84 c0 test %al,%al 10c695: 0f 84 70 ff ff ff je 10c60b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c69b: 8b 45 d8 mov -0x28(%ebp),%eax 10c69e: 8b 55 dc mov -0x24(%ebp),%edx 10c6a1: 89 43 7c mov %eax,0x7c(%ebx) 10c6a4: 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 } 10c6aa: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ad: 5b pop %ebx 10c6ae: 5e pop %esi 10c6af: 5f pop %edi 10c6b0: c9 leave 10c6b1: c3 ret 10c6b2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c6b4: ff 43 58 incl 0x58(%ebx) 10c6b7: e9 39 ff ff ff jmp 10c5f5 <_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; 10c6bc: 8b 45 d8 mov -0x28(%ebp),%eax 10c6bf: 8b 55 dc mov -0x24(%ebp),%edx 10c6c2: 89 43 74 mov %eax,0x74(%ebx) 10c6c5: 89 53 78 mov %edx,0x78(%ebx) 10c6c8: eb b9 jmp 10c683 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010da70 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10da70: 55 push %ebp 10da71: 89 e5 mov %esp,%ebp 10da73: 53 push %ebx 10da74: 83 ec 04 sub $0x4,%esp 10da77: 8b 5d 08 mov 0x8(%ebp),%ebx 10da7a: a1 b4 15 13 00 mov 0x1315b4,%eax 10da7f: 40 inc %eax 10da80: a3 b4 15 13 00 mov %eax,0x1315b4 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10da85: a1 48 16 13 00 mov 0x131648,%eax if ( time->tv_sec < seconds ) 10da8a: 8b 13 mov (%ebx),%edx 10da8c: 39 d0 cmp %edx,%eax 10da8e: 7f 34 jg 10dac4 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10da90: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10da91: 29 c2 sub %eax,%edx 10da93: 52 push %edx 10da94: 6a 00 push $0x0 10da96: 68 78 16 13 00 push $0x131678 10da9b: e8 78 24 00 00 call 10ff18 <_Watchdog_Adjust> 10daa0: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10daa3: 8b 03 mov (%ebx),%eax 10daa5: a3 48 16 13 00 mov %eax,0x131648 10daaa: 8b 43 04 mov 0x4(%ebx),%eax 10daad: a3 4c 16 13 00 mov %eax,0x13164c _TOD_Is_set = true; 10dab2: c6 05 c8 15 13 00 01 movb $0x1,0x1315c8 _TOD_Activate(); _Thread_Enable_dispatch(); } 10dab9: 8b 5d fc mov -0x4(%ebp),%ebx 10dabc: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10dabd: e9 c6 12 00 00 jmp 10ed88 <_Thread_Enable_dispatch> 10dac2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dac4: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10dac5: 29 d0 sub %edx,%eax 10dac7: 50 push %eax 10dac8: 6a 01 push $0x1 10daca: 68 78 16 13 00 push $0x131678 10dacf: e8 44 24 00 00 call 10ff18 <_Watchdog_Adjust> 10dad4: 83 c4 10 add $0x10,%esp 10dad7: eb ca jmp 10daa3 <_TOD_Set+0x33> =============================================================================== 0010c4c4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c4c4: 55 push %ebp 10c4c5: 89 e5 mov %esp,%ebp 10c4c7: 53 push %ebx 10c4c8: 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() ); 10c4cb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c4d2: a1 cc 22 12 00 mov 0x1222cc,%eax 10c4d7: 8d 04 80 lea (%eax,%eax,4),%eax 10c4da: 8d 04 80 lea (%eax,%eax,4),%eax 10c4dd: 8d 04 80 lea (%eax,%eax,4),%eax 10c4e0: c1 e0 03 shl $0x3,%eax 10c4e3: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c4e6: a1 24 65 12 00 mov 0x126524,%eax 10c4eb: 40 inc %eax 10c4ec: a3 24 65 12 00 mov %eax,0x126524 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c4f1: 8d 5d f0 lea -0x10(%ebp),%ebx 10c4f4: 53 push %ebx 10c4f5: 68 58 64 12 00 push $0x126458 10c4fa: e8 3d 1d 00 00 call 10e23c <_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 ); 10c4ff: 58 pop %eax 10c500: 5a pop %edx 10c501: 53 push %ebx 10c502: 68 68 64 12 00 push $0x126468 10c507: e8 30 1d 00 00 call 10e23c <_Timespec_Add_to> 10c50c: 89 c3 mov %eax,%ebx while ( seconds ) { 10c50e: 83 c4 10 add $0x10,%esp 10c511: 85 c0 test %eax,%eax 10c513: 74 16 je 10c52b <_TOD_Tickle_ticks+0x67> 10c515: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c518: 83 ec 0c sub $0xc,%esp 10c51b: 68 98 64 12 00 push $0x126498 10c520: e8 d7 21 00 00 call 10e6fc <_Watchdog_Tickle> 10c525: 83 c4 10 add $0x10,%esp 10c528: 4b dec %ebx 10c529: 75 ed jne 10c518 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c52b: 8b 5d fc mov -0x4(%ebp),%ebx 10c52e: c9 leave 10c52f: c3 ret =============================================================================== 0010c250 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c250: 55 push %ebp 10c251: 89 e5 mov %esp,%ebp 10c253: 56 push %esi 10c254: 53 push %ebx 10c255: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c258: 8b 72 08 mov 0x8(%edx),%esi 10c25b: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c25c: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c25e: 89 c3 mov %eax,%ebx 10c260: 83 e3 03 and $0x3,%ebx 10c263: 74 67 je 10c2cc <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c265: 8b 4a 04 mov 0x4(%edx),%ecx 10c268: 0f b7 8c 09 80 28 12 movzwl 0x122880(%ecx,%ecx,1),%ecx 10c26f: 00 10c270: 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 ]; 10c273: 0f b7 8c 1b b4 28 12 movzwl 0x1228b4(%ebx,%ebx,1),%ecx 10c27a: 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 ) * 10c27b: 2d c4 07 00 00 sub $0x7c4,%eax 10c280: c1 e8 02 shr $0x2,%eax 10c283: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c286: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c289: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c28c: 8d 04 98 lea (%eax,%ebx,4),%eax 10c28f: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c291: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c293: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c296: 8d 04 81 lea (%ecx,%eax,4),%eax 10c299: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c29c: c1 e0 02 shl $0x2,%eax 10c29f: 29 c8 sub %ecx,%eax 10c2a1: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c2a4: 8b 5a 14 mov 0x14(%edx),%ebx 10c2a7: 8b 4a 0c mov 0xc(%edx),%ecx 10c2aa: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c2ad: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c2b0: c1 e1 02 shl $0x2,%ecx 10c2b3: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c2b6: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c2b9: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c2bc: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c2c3: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c2c6: 5b pop %ebx 10c2c7: 5e pop %esi 10c2c8: c9 leave 10c2c9: c3 ret 10c2ca: 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 ]; 10c2cc: 8b 4a 04 mov 0x4(%edx),%ecx 10c2cf: 0f b7 8c 09 9a 28 12 movzwl 0x12289a(%ecx,%ecx,1),%ecx 10c2d6: 00 10c2d7: 8d 34 31 lea (%ecx,%esi,1),%esi 10c2da: eb 97 jmp 10c273 <_TOD_To_seconds+0x23> =============================================================================== 0010c2dc <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c2dc: 55 push %ebp 10c2dd: 89 e5 mov %esp,%ebp 10c2df: 53 push %ebx 10c2e0: 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(); 10c2e3: 8b 1d 2c 56 12 00 mov 0x12562c,%ebx if ((!the_tod) || 10c2e9: 85 c9 test %ecx,%ecx 10c2eb: 74 53 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c2ed: b8 40 42 0f 00 mov $0xf4240,%eax 10c2f2: 31 d2 xor %edx,%edx 10c2f4: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c2f6: 3b 41 18 cmp 0x18(%ecx),%eax 10c2f9: 76 45 jbe 10c340 <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c2fb: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c2ff: 77 3f ja 10c340 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c301: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c305: 77 39 ja 10c340 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c307: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c30b: 77 33 ja 10c340 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c30d: 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) || 10c310: 85 c0 test %eax,%eax 10c312: 74 2c je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c314: 83 f8 0c cmp $0xc,%eax 10c317: 77 27 ja 10c340 <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c319: 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) || 10c31b: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c321: 76 1d jbe 10c340 <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c323: 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) || 10c326: 85 c9 test %ecx,%ecx 10c328: 74 16 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c32a: 83 e2 03 and $0x3,%edx 10c32d: 75 16 jne 10c345 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c32f: 8b 04 85 f4 28 12 00 mov 0x1228f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c336: 39 c8 cmp %ecx,%eax 10c338: 0f 93 c0 setae %al 10c33b: eb 05 jmp 10c342 <_TOD_Validate+0x66> 10c33d: 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; 10c340: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c342: 5b pop %ebx 10c343: c9 leave 10c344: 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 ]; 10c345: 8b 04 85 c0 28 12 00 mov 0x1228c0(,%eax,4),%eax 10c34c: eb e8 jmp 10c336 <_TOD_Validate+0x5a> =============================================================================== 0010d138 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d138: 55 push %ebp 10d139: 89 e5 mov %esp,%ebp 10d13b: 57 push %edi 10d13c: 56 push %esi 10d13d: 53 push %ebx 10d13e: 83 ec 28 sub $0x28,%esp 10d141: 8b 5d 08 mov 0x8(%ebp),%ebx 10d144: 8b 75 0c mov 0xc(%ebp),%esi 10d147: 8a 45 10 mov 0x10(%ebp),%al 10d14a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d14d: 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 ); 10d150: 53 push %ebx 10d151: e8 7a 0e 00 00 call 10dfd0 <_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 ) 10d156: 83 c4 10 add $0x10,%esp 10d159: 39 73 14 cmp %esi,0x14(%ebx) 10d15c: 74 0d je 10d16b <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d15e: 83 ec 08 sub $0x8,%esp 10d161: 56 push %esi 10d162: 53 push %ebx 10d163: e8 1c 0d 00 00 call 10de84 <_Thread_Set_priority> 10d168: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d16b: 9c pushf 10d16c: fa cli 10d16d: 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; 10d16e: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d171: 83 f8 04 cmp $0x4,%eax 10d174: 74 26 je 10d19c <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d176: 83 e7 04 and $0x4,%edi 10d179: 74 15 je 10d190 <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d17b: 52 push %edx 10d17c: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d17d: a9 e0 be 03 00 test $0x3bee0,%eax 10d182: 0f 85 bc 00 00 00 jne 10d244 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d188: 8d 65 f4 lea -0xc(%ebp),%esp 10d18b: 5b pop %ebx 10d18c: 5e pop %esi 10d18d: 5f pop %edi 10d18e: c9 leave 10d18f: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d190: 89 c1 mov %eax,%ecx 10d192: 83 e1 fb and $0xfffffffb,%ecx 10d195: 89 4b 10 mov %ecx,0x10(%ebx) 10d198: eb e1 jmp 10d17b <_Thread_Change_priority+0x43> 10d19a: 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 ) ) { 10d19c: 83 e7 04 and $0x4,%edi 10d19f: 75 45 jne 10d1e6 <_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 ); 10d1a1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d1a8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d1ae: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d1b5: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d1b8: 66 a1 80 64 12 00 mov 0x126480,%ax 10d1be: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d1c4: 66 a3 80 64 12 00 mov %ax,0x126480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d1ca: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d1ce: 0f 84 88 00 00 00 je 10d25c <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d1d4: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d1da: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d1dd: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d1df: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d1e1: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d1e3: 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 ); 10d1e6: 52 push %edx 10d1e7: 9d popf 10d1e8: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d1e9: 66 8b 1d 80 64 12 00 mov 0x126480,%bx 10d1f0: 31 c0 xor %eax,%eax 10d1f2: 89 c1 mov %eax,%ecx 10d1f4: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d1f8: 0f b7 c9 movzwl %cx,%ecx 10d1fb: 66 8b 9c 09 00 65 12 mov 0x126500(%ecx,%ecx,1),%bx 10d202: 00 10d203: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d207: c1 e1 04 shl $0x4,%ecx 10d20a: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10d20d: 8d 04 01 lea (%ecx,%eax,1),%eax 10d210: 8d 04 40 lea (%eax,%eax,2),%eax 10d213: c1 e0 02 shl $0x2,%eax 10d216: 03 05 a0 63 12 00 add 0x1263a0,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d21c: 8b 00 mov (%eax),%eax 10d21e: a3 7c 66 12 00 mov %eax,0x12667c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d223: 8b 0d 78 66 12 00 mov 0x126678,%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() && 10d229: 39 c8 cmp %ecx,%eax 10d22b: 74 0d je 10d23a <_Thread_Change_priority+0x102> 10d22d: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d231: 74 07 je 10d23a <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 10d233: c6 05 84 66 12 00 01 movb $0x1,0x126684 _ISR_Enable( level ); 10d23a: 52 push %edx 10d23b: 9d popf } 10d23c: 8d 65 f4 lea -0xc(%ebp),%esp 10d23f: 5b pop %ebx 10d240: 5e pop %esi 10d241: 5f pop %edi 10d242: c9 leave 10d243: 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 ); 10d244: 89 5d 0c mov %ebx,0xc(%ebp) 10d247: 8b 43 44 mov 0x44(%ebx),%eax 10d24a: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d24d: 8d 65 f4 lea -0xc(%ebp),%esp 10d250: 5b pop %ebx 10d251: 5e pop %esi 10d252: 5f pop %edi 10d253: 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 ); 10d254: e9 93 0b 00 00 jmp 10ddec <_Thread_queue_Requeue> 10d259: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d25c: 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; 10d262: 8d 48 04 lea 0x4(%eax),%ecx 10d265: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d267: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d26a: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d26d: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d26f: 89 4b 04 mov %ecx,0x4(%ebx) 10d272: e9 6f ff ff ff jmp 10d1e6 <_Thread_Change_priority+0xae> =============================================================================== 0010d278 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d278: 55 push %ebp 10d279: 89 e5 mov %esp,%ebp 10d27b: 53 push %ebx 10d27c: 8b 45 08 mov 0x8(%ebp),%eax 10d27f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d282: 9c pushf 10d283: fa cli 10d284: 5b pop %ebx current_state = the_thread->current_state; 10d285: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d288: 85 ca test %ecx,%edx 10d28a: 74 70 je 10d2fc <_Thread_Clear_state+0x84> 10d28c: f7 d2 not %edx 10d28e: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d290: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d293: 85 d2 test %edx,%edx 10d295: 75 65 jne 10d2fc <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d297: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d29d: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d2a4: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d2a7: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10d2ae: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d2b4: 66 89 15 80 64 12 00 mov %dx,0x126480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d2bb: 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; 10d2c1: 8d 4a 04 lea 0x4(%edx),%ecx 10d2c4: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d2c6: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d2c9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d2cc: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d2ce: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d2d1: 53 push %ebx 10d2d2: 9d popf 10d2d3: 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 ) { 10d2d4: 8b 50 14 mov 0x14(%eax),%edx 10d2d7: 8b 0d 7c 66 12 00 mov 0x12667c,%ecx 10d2dd: 3b 51 14 cmp 0x14(%ecx),%edx 10d2e0: 73 1a jae 10d2fc <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d2e2: a3 7c 66 12 00 mov %eax,0x12667c if ( _Thread_Executing->is_preemptible || 10d2e7: a1 78 66 12 00 mov 0x126678,%eax 10d2ec: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d2f0: 74 12 je 10d304 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d2f2: c6 05 84 66 12 00 01 movb $0x1,0x126684 10d2f9: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d2fc: 53 push %ebx 10d2fd: 9d popf } 10d2fe: 5b pop %ebx 10d2ff: c9 leave 10d300: c3 ret 10d301: 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 || 10d304: 85 d2 test %edx,%edx 10d306: 74 ea je 10d2f2 <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d308: eb f2 jmp 10d2fc <_Thread_Clear_state+0x84> =============================================================================== 0010d30c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d30c: 55 push %ebp 10d30d: 89 e5 mov %esp,%ebp 10d30f: 56 push %esi 10d310: 53 push %ebx 10d311: 8b 75 08 mov 0x8(%ebp),%esi 10d314: 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( 10d317: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d31b: 8b 46 1c mov 0x1c(%esi),%eax 10d31e: 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; 10d325: a1 d4 63 12 00 mov 0x1263d4,%eax 10d32a: 48 dec %eax 10d32b: a3 d4 63 12 00 mov %eax,0x1263d4 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d330: 83 ec 0c sub $0xc,%esp 10d333: 53 push %ebx 10d334: e8 5f 11 00 00 call 10e498 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d339: a1 d4 63 12 00 mov 0x1263d4,%eax 10d33e: 40 inc %eax 10d33f: a3 d4 63 12 00 mov %eax,0x1263d4 /* * 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 ); 10d344: 59 pop %ecx 10d345: 58 pop %eax 10d346: 53 push %ebx 10d347: 56 push %esi 10d348: e8 57 f6 ff ff call 10c9a4 <_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 ); 10d34d: 58 pop %eax 10d34e: 5a pop %edx 10d34f: 6a 01 push $0x1 10d351: 53 push %ebx 10d352: e8 99 0b 00 00 call 10def0 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d357: 89 1c 24 mov %ebx,(%esp) 10d35a: e8 d1 09 00 00 call 10dd30 <_Thread_queue_Extract_with_proxy> 10d35f: 83 c4 10 add $0x10,%esp 10d362: 84 c0 test %al,%al 10d364: 75 06 jne 10d36c <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d366: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d36a: 74 68 je 10d3d4 <_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 ) ) 10d36c: 3b 1d 60 64 12 00 cmp 0x126460,%ebx 10d372: 74 74 je 10d3e8 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d374: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d37b: 00 00 00 if ( the_thread->Start.fp_context ) 10d37e: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d384: 85 c0 test %eax,%eax 10d386: 74 0c je 10d394 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d388: 83 ec 0c sub $0xc,%esp 10d38b: 50 push %eax 10d38c: e8 43 14 00 00 call 10e7d4 <_Workspace_Free> 10d391: 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 ); 10d394: 83 ec 0c sub $0xc,%esp 10d397: 53 push %ebx 10d398: e8 0f 0d 00 00 call 10e0ac <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d39d: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d3a4: 00 00 00 if ( the_thread->extensions ) 10d3a7: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d3ad: 83 c4 10 add $0x10,%esp 10d3b0: 85 c0 test %eax,%eax 10d3b2: 74 0c je 10d3c0 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d3b4: 83 ec 0c sub $0xc,%esp 10d3b7: 50 push %eax 10d3b8: e8 17 14 00 00 call 10e7d4 <_Workspace_Free> 10d3bd: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d3c0: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d3c7: 00 00 00 } 10d3ca: 8d 65 f8 lea -0x8(%ebp),%esp 10d3cd: 5b pop %ebx 10d3ce: 5e pop %esi 10d3cf: c9 leave 10d3d0: c3 ret 10d3d1: 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 ); 10d3d4: 83 ec 0c sub $0xc,%esp 10d3d7: 8d 43 48 lea 0x48(%ebx),%eax 10d3da: 50 push %eax 10d3db: e8 b0 12 00 00 call 10e690 <_Watchdog_Remove> 10d3e0: 83 c4 10 add $0x10,%esp 10d3e3: eb 87 jmp 10d36c <_Thread_Close+0x60> 10d3e5: 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; 10d3e8: c7 05 60 64 12 00 00 movl $0x0,0x126460 10d3ef: 00 00 00 10d3f2: eb 80 jmp 10d374 <_Thread_Close+0x68> =============================================================================== 0010d488 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d488: 55 push %ebp 10d489: 89 e5 mov %esp,%ebp 10d48b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d48e: 8d 45 f4 lea -0xc(%ebp),%eax 10d491: 50 push %eax 10d492: ff 75 08 pushl 0x8(%ebp) 10d495: e8 c6 01 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10d49a: 83 c4 10 add $0x10,%esp 10d49d: 8b 55 f4 mov -0xc(%ebp),%edx 10d4a0: 85 d2 test %edx,%edx 10d4a2: 75 1c jne 10d4c0 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d4a4: 83 ec 08 sub $0x8,%esp 10d4a7: 68 18 00 00 10 push $0x10000018 10d4ac: 50 push %eax 10d4ad: e8 c6 fd ff ff call 10d278 <_Thread_Clear_state> 10d4b2: a1 d4 63 12 00 mov 0x1263d4,%eax 10d4b7: 48 dec %eax 10d4b8: a3 d4 63 12 00 mov %eax,0x1263d4 10d4bd: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d4c0: c9 leave 10d4c1: c3 ret =============================================================================== 0010d4c4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d4c4: 55 push %ebp 10d4c5: 89 e5 mov %esp,%ebp 10d4c7: 57 push %edi 10d4c8: 56 push %esi 10d4c9: 53 push %ebx 10d4ca: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d4cd: 8b 1d 78 66 12 00 mov 0x126678,%ebx _ISR_Disable( level ); 10d4d3: 9c pushf 10d4d4: fa cli 10d4d5: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d4d6: 8a 15 84 66 12 00 mov 0x126684,%dl 10d4dc: 84 d2 test %dl,%dl 10d4de: 0f 84 3c 01 00 00 je 10d620 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d4e4: 8b 35 7c 66 12 00 mov 0x12667c,%esi _Thread_Dispatch_disable_level = 1; 10d4ea: c7 05 d4 63 12 00 01 movl $0x1,0x1263d4 10d4f1: 00 00 00 _Context_Switch_necessary = false; 10d4f4: c6 05 84 66 12 00 00 movb $0x0,0x126684 _Thread_Executing = heir; 10d4fb: 89 35 78 66 12 00 mov %esi,0x126678 /* * 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 ) 10d501: 39 f3 cmp %esi,%ebx 10d503: 0f 84 17 01 00 00 je 10d620 <_Thread_Dispatch+0x15c> 10d509: 8d 7d d8 lea -0x28(%ebp),%edi 10d50c: e9 f5 00 00 00 jmp 10d606 <_Thread_Dispatch+0x142> 10d511: 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 ); 10d514: 50 push %eax 10d515: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d516: 83 ec 0c sub $0xc,%esp 10d519: 8d 45 e0 lea -0x20(%ebp),%eax 10d51c: 50 push %eax 10d51d: e8 f6 30 00 00 call 110618 <_TOD_Get_uptime> _Timestamp_Subtract( 10d522: 83 c4 0c add $0xc,%esp 10d525: 57 push %edi 10d526: 8d 45 e0 lea -0x20(%ebp),%eax 10d529: 50 push %eax 10d52a: 68 90 64 12 00 push $0x126490 10d52f: e8 44 0d 00 00 call 10e278 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d534: 58 pop %eax 10d535: 5a pop %edx 10d536: 57 push %edi 10d537: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d53d: 50 push %eax 10d53e: e8 f9 0c 00 00 call 10e23c <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d543: 8b 45 e0 mov -0x20(%ebp),%eax 10d546: 8b 55 e4 mov -0x1c(%ebp),%edx 10d549: a3 90 64 12 00 mov %eax,0x126490 10d54e: 89 15 94 64 12 00 mov %edx,0x126494 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d554: a1 64 64 12 00 mov 0x126464,%eax 10d559: 83 c4 10 add $0x10,%esp 10d55c: 85 c0 test %eax,%eax 10d55e: 74 10 je 10d570 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d560: 8b 10 mov (%eax),%edx 10d562: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d568: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d56e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d570: 83 ec 08 sub $0x8,%esp 10d573: 56 push %esi 10d574: 53 push %ebx 10d575: e8 9e 0f 00 00 call 10e518 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d57a: 5a pop %edx 10d57b: 59 pop %ecx 10d57c: 81 c6 d0 00 00 00 add $0xd0,%esi 10d582: 56 push %esi 10d583: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d589: 50 push %eax 10d58a: e8 91 12 00 00 call 10e820 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d58f: 83 c4 10 add $0x10,%esp 10d592: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax 10d598: 85 c0 test %eax,%eax 10d59a: 74 36 je 10d5d2 <_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 ); 10d59c: a1 60 64 12 00 mov 0x126460,%eax 10d5a1: 39 c3 cmp %eax,%ebx 10d5a3: 74 2d je 10d5d2 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d5a5: 85 c0 test %eax,%eax 10d5a7: 74 11 je 10d5ba <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d5a9: 83 ec 0c sub $0xc,%esp 10d5ac: 05 e8 00 00 00 add $0xe8,%eax 10d5b1: 50 push %eax 10d5b2: e8 9d 12 00 00 call 10e854 <_CPU_Context_save_fp> 10d5b7: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d5ba: 83 ec 0c sub $0xc,%esp 10d5bd: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d5c3: 50 push %eax 10d5c4: e8 95 12 00 00 call 10e85e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d5c9: 89 1d 60 64 12 00 mov %ebx,0x126460 10d5cf: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d5d2: 8b 1d 78 66 12 00 mov 0x126678,%ebx _ISR_Disable( level ); 10d5d8: 9c pushf 10d5d9: fa cli 10d5da: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d5db: 8a 15 84 66 12 00 mov 0x126684,%dl 10d5e1: 84 d2 test %dl,%dl 10d5e3: 74 3b je 10d620 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d5e5: 8b 35 7c 66 12 00 mov 0x12667c,%esi _Thread_Dispatch_disable_level = 1; 10d5eb: c7 05 d4 63 12 00 01 movl $0x1,0x1263d4 10d5f2: 00 00 00 _Context_Switch_necessary = false; 10d5f5: c6 05 84 66 12 00 00 movb $0x0,0x126684 _Thread_Executing = heir; 10d5fc: 89 35 78 66 12 00 mov %esi,0x126678 /* * 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 ) 10d602: 39 de cmp %ebx,%esi 10d604: 74 1a je 10d620 <_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 ) 10d606: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d60a: 0f 85 04 ff ff ff jne 10d514 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d610: 8b 15 a4 63 12 00 mov 0x1263a4,%edx 10d616: 89 56 78 mov %edx,0x78(%esi) 10d619: e9 f6 fe ff ff jmp 10d514 <_Thread_Dispatch+0x50> 10d61e: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d620: c7 05 d4 63 12 00 00 movl $0x0,0x1263d4 10d627: 00 00 00 _ISR_Enable( level ); 10d62a: 50 push %eax 10d62b: 9d popf _API_extensions_Run_postswitch(); 10d62c: e8 cf e8 ff ff call 10bf00 <_API_extensions_Run_postswitch> } 10d631: 8d 65 f4 lea -0xc(%ebp),%esp 10d634: 5b pop %ebx 10d635: 5e pop %esi 10d636: 5f pop %edi 10d637: c9 leave 10d638: c3 ret =============================================================================== 0010d660 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d660: 55 push %ebp 10d661: 89 e5 mov %esp,%ebp 10d663: 53 push %ebx 10d664: 83 ec 04 sub $0x4,%esp 10d667: 8b 45 08 mov 0x8(%ebp),%eax 10d66a: 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 ) ) { 10d66d: 85 c0 test %eax,%eax 10d66f: 74 4b je 10d6bc <_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); 10d671: 89 c2 mov %eax,%edx 10d673: c1 ea 18 shr $0x18,%edx 10d676: 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 ) 10d679: 8d 5a ff lea -0x1(%edx),%ebx 10d67c: 83 fb 02 cmp $0x2,%ebx 10d67f: 77 2b ja 10d6ac <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d681: 89 c3 mov %eax,%ebx 10d683: 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 :) */ 10d686: 4b dec %ebx 10d687: 75 23 jne 10d6ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d689: 8b 14 95 ac 63 12 00 mov 0x1263ac(,%edx,4),%edx if ( !api_information ) { 10d690: 85 d2 test %edx,%edx 10d692: 74 18 je 10d6ac <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d694: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d697: 85 d2 test %edx,%edx 10d699: 74 11 je 10d6ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d69b: 53 push %ebx 10d69c: 51 push %ecx 10d69d: 50 push %eax 10d69e: 52 push %edx 10d69f: e8 34 f7 ff ff call 10cdd8 <_Objects_Get> 10d6a4: 83 c4 10 add $0x10,%esp done: return tp; } 10d6a7: 8b 5d fc mov -0x4(%ebp),%ebx 10d6aa: c9 leave 10d6ab: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d6ac: 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; 10d6b2: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d6b4: 8b 5d fc mov -0x4(%ebp),%ebx 10d6b7: c9 leave 10d6b8: c3 ret 10d6b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d6bc: a1 d4 63 12 00 mov 0x1263d4,%eax 10d6c1: 40 inc %eax 10d6c2: a3 d4 63 12 00 mov %eax,0x1263d4 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; 10d6c7: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d6cd: a1 78 66 12 00 mov 0x126678,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d6d2: 8b 5d fc mov -0x4(%ebp),%ebx 10d6d5: c9 leave 10d6d6: c3 ret =============================================================================== 00112274 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112274: 55 push %ebp 112275: 89 e5 mov %esp,%ebp 112277: 53 push %ebx 112278: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 11227b: 8b 1d 78 66 12 00 mov 0x126678,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112281: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112287: 85 c0 test %eax,%eax 112289: 74 79 je 112304 <_Thread_Handler+0x90> 11228b: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11228c: a0 4c 60 12 00 mov 0x12604c,%al 112291: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112294: c6 05 4c 60 12 00 01 movb $0x1,0x12604c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11229b: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 1122a1: 85 d2 test %edx,%edx 1122a3: 74 24 je 1122c9 <_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 ); 1122a5: a1 60 64 12 00 mov 0x126460,%eax 1122aa: 39 c3 cmp %eax,%ebx 1122ac: 74 1b je 1122c9 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1122ae: 85 c0 test %eax,%eax 1122b0: 74 11 je 1122c3 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 1122b2: 83 ec 0c sub $0xc,%esp 1122b5: 05 e8 00 00 00 add $0xe8,%eax 1122ba: 50 push %eax 1122bb: e8 94 c5 ff ff call 10e854 <_CPU_Context_save_fp> 1122c0: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1122c3: 89 1d 60 64 12 00 mov %ebx,0x126460 /* * 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 ); 1122c9: 83 ec 0c sub $0xc,%esp 1122cc: 53 push %ebx 1122cd: e8 aa c0 ff ff call 10e37c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 1122d2: e8 65 b3 ff ff call 10d63c <_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) */ { 1122d7: 83 c4 10 add $0x10,%esp 1122da: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1122de: 74 28 je 112308 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1122e0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1122e6: 85 c0 test %eax,%eax 1122e8: 74 2d je 112317 <_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 ); 1122ea: 83 ec 0c sub $0xc,%esp 1122ed: 53 push %ebx 1122ee: e8 c5 c0 ff ff call 10e3b8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1122f3: 83 c4 0c add $0xc,%esp 1122f6: 6a 05 push $0x5 1122f8: 6a 01 push $0x1 1122fa: 6a 00 push $0x0 1122fc: e8 97 a5 ff ff call 10c898 <_Internal_error_Occurred> 112301: 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); 112304: fb sti 112305: eb 85 jmp 11228c <_Thread_Handler+0x18> 112307: 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 (); 112308: e8 33 c0 00 00 call 11e340 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11230d: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112313: 85 c0 test %eax,%eax 112315: 75 d3 jne 1122ea <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112317: 83 ec 0c sub $0xc,%esp 11231a: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112320: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112326: 89 43 28 mov %eax,0x28(%ebx) 112329: 83 c4 10 add $0x10,%esp 11232c: eb bc jmp 1122ea <_Thread_Handler+0x76> =============================================================================== 0010d6d8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d6d8: 55 push %ebp 10d6d9: 89 e5 mov %esp,%ebp 10d6db: 57 push %edi 10d6dc: 56 push %esi 10d6dd: 53 push %ebx 10d6de: 83 ec 24 sub $0x24,%esp 10d6e1: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6e4: 8b 75 14 mov 0x14(%ebp),%esi 10d6e7: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d6eb: 8a 45 20 mov 0x20(%ebp),%al 10d6ee: 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; 10d6f1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d6f8: 00 00 00 10d6fb: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d702: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d705: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d70c: 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 ); 10d70f: 56 push %esi 10d710: 53 push %ebx 10d711: e8 32 09 00 00 call 10e048 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d716: 83 c4 10 add $0x10,%esp 10d719: 85 c0 test %eax,%eax 10d71b: 0f 84 6b 01 00 00 je 10d88c <_Thread_Initialize+0x1b4> 10d721: 39 c6 cmp %eax,%esi 10d723: 0f 87 63 01 00 00 ja 10d88c <_Thread_Initialize+0x1b4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d729: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d72f: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d735: 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 ) { 10d73b: 89 f8 mov %edi,%eax 10d73d: 84 c0 test %al,%al 10d73f: 0f 85 5f 01 00 00 jne 10d8a4 <_Thread_Initialize+0x1cc> 10d745: 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; 10d747: 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; 10d749: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d74f: 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; 10d755: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d75c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d763: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d76a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d771: a1 70 64 12 00 mov 0x126470,%eax 10d776: 85 c0 test %eax,%eax 10d778: 0f 85 46 01 00 00 jne 10d8c4 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d77e: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d785: 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; 10d788: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d78a: 8a 45 e7 mov -0x19(%ebp),%al 10d78d: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d793: 8b 45 24 mov 0x24(%ebp),%eax 10d796: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d79c: 8b 45 28 mov 0x28(%ebp),%eax 10d79f: 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; 10d7a5: 8b 45 2c mov 0x2c(%ebp),%eax 10d7a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d7ae: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d7b5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d7bc: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d7c3: 8b 45 1c mov 0x1c(%ebp),%eax 10d7c6: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d7c9: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d7cf: 83 ec 08 sub $0x8,%esp 10d7d2: 50 push %eax 10d7d3: 53 push %ebx 10d7d4: e8 ab 06 00 00 call 10de84 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d7d9: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d7e0: 00 00 00 10d7e3: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d7ea: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d7ed: 8b 45 08 mov 0x8(%ebp),%eax 10d7f0: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d7f3: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d7f7: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d7fa: 8b 45 30 mov 0x30(%ebp),%eax 10d7fd: 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 ); 10d800: 89 1c 24 mov %ebx,(%esp) 10d803: e8 3c 0c 00 00 call 10e444 <_User_extensions_Thread_create> if ( extension_status ) 10d808: 83 c4 10 add $0x10,%esp 10d80b: 84 c0 test %al,%al 10d80d: 0f 85 85 00 00 00 jne 10d898 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d813: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d819: 85 c0 test %eax,%eax 10d81b: 74 0c je 10d829 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d81d: 83 ec 0c sub $0xc,%esp 10d820: 50 push %eax 10d821: e8 ae 0f 00 00 call 10e7d4 <_Workspace_Free> 10d826: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d829: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d82f: 85 c0 test %eax,%eax 10d831: 74 0c je 10d83f <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d833: 83 ec 0c sub $0xc,%esp 10d836: 50 push %eax 10d837: e8 98 0f 00 00 call 10e7d4 <_Workspace_Free> 10d83c: 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] ) 10d83f: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d845: 85 c0 test %eax,%eax 10d847: 74 0c je 10d855 <_Thread_Initialize+0x17d><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10d849: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d84c: 50 push %eax <== NOT EXECUTED 10d84d: e8 82 0f 00 00 call 10e7d4 <_Workspace_Free> <== NOT EXECUTED 10d852: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10d855: 85 f6 test %esi,%esi 10d857: 74 0c je 10d865 <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d859: 83 ec 0c sub $0xc,%esp 10d85c: 56 push %esi 10d85d: e8 72 0f 00 00 call 10e7d4 <_Workspace_Free> 10d862: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d865: 85 ff test %edi,%edi 10d867: 74 0c je 10d875 <_Thread_Initialize+0x19d> (void) _Workspace_Free( fp_area ); 10d869: 83 ec 0c sub $0xc,%esp 10d86c: 57 push %edi 10d86d: e8 62 0f 00 00 call 10e7d4 <_Workspace_Free> 10d872: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d875: 83 ec 0c sub $0xc,%esp 10d878: 53 push %ebx 10d879: e8 2e 08 00 00 call 10e0ac <_Thread_Stack_Free> return false; 10d87e: 83 c4 10 add $0x10,%esp 10d881: 31 c0 xor %eax,%eax } 10d883: 8d 65 f4 lea -0xc(%ebp),%esp 10d886: 5b pop %ebx 10d887: 5e pop %esi 10d888: 5f pop %edi 10d889: c9 leave 10d88a: c3 ret 10d88b: 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 */ 10d88c: 31 c0 xor %eax,%eax _Thread_Stack_Free( the_thread ); return false; } 10d88e: 8d 65 f4 lea -0xc(%ebp),%esp 10d891: 5b pop %ebx 10d892: 5e pop %esi 10d893: 5f pop %edi 10d894: c9 leave 10d895: c3 ret 10d896: 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; 10d898: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d89a: 8d 65 f4 lea -0xc(%ebp),%esp 10d89d: 5b pop %ebx 10d89e: 5e pop %esi 10d89f: 5f pop %edi 10d8a0: c9 leave 10d8a1: c3 ret 10d8a2: 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 ); 10d8a4: 83 ec 0c sub $0xc,%esp 10d8a7: 6a 6c push $0x6c 10d8a9: e8 0a 0f 00 00 call 10e7b8 <_Workspace_Allocate> 10d8ae: 89 c7 mov %eax,%edi if ( !fp_area ) 10d8b0: 83 c4 10 add $0x10,%esp 10d8b3: 85 c0 test %eax,%eax 10d8b5: 0f 85 8e fe ff ff jne 10d749 <_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; 10d8bb: 31 f6 xor %esi,%esi 10d8bd: e9 51 ff ff ff jmp 10d813 <_Thread_Initialize+0x13b> 10d8c2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d8c4: 83 ec 0c sub $0xc,%esp 10d8c7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d8ce: 50 push %eax 10d8cf: e8 e4 0e 00 00 call 10e7b8 <_Workspace_Allocate> 10d8d4: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d8d6: 83 c4 10 add $0x10,%esp 10d8d9: 85 c0 test %eax,%eax 10d8db: 0f 84 32 ff ff ff je 10d813 <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d8e1: 89 83 f8 00 00 00 mov %eax,0xf8(%ebx) 10d8e7: 8b 0d 70 64 12 00 mov 0x126470,%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++ ) 10d8ed: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d8ef: 31 c0 xor %eax,%eax 10d8f1: 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; 10d8f4: 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++ ) 10d8fb: 40 inc %eax 10d8fc: 89 c2 mov %eax,%edx 10d8fe: 39 c1 cmp %eax,%ecx 10d900: 73 f2 jae 10d8f4 <_Thread_Initialize+0x21c> 10d902: e9 83 fe ff ff jmp 10d78a <_Thread_Initialize+0xb2> =============================================================================== 0011190c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 11190c: 55 push %ebp 11190d: 89 e5 mov %esp,%ebp 11190f: 53 push %ebx 111910: 83 ec 10 sub $0x10,%esp 111913: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111916: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 11191d: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111923: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111926: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 11192c: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 11192f: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111935: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11193b: 8b 45 0c mov 0xc(%ebp),%eax 11193e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111944: 8b 45 10 mov 0x10(%ebp),%eax 111947: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 11194d: 53 push %ebx 11194e: e8 fd ce ff ff call 10e850 <_Thread_queue_Extract_with_proxy> 111953: 83 c4 10 add $0x10,%esp 111956: 84 c0 test %al,%al 111958: 75 06 jne 111960 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11195a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11195e: 74 28 je 111988 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111960: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111966: 39 43 14 cmp %eax,0x14(%ebx) 111969: 74 15 je 111980 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11196b: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11196e: 89 45 0c mov %eax,0xc(%ebp) 111971: 89 5d 08 mov %ebx,0x8(%ebp) } } 111974: 8b 5d fc mov -0x4(%ebp),%ebx 111977: 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 ); 111978: e9 af d0 ff ff jmp 10ea2c <_Thread_Set_priority> 11197d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111980: 8b 5d fc mov -0x4(%ebp),%ebx 111983: c9 leave 111984: c3 ret 111985: 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 ); 111988: 83 ec 0c sub $0xc,%esp 11198b: 8d 43 48 lea 0x48(%ebx),%eax 11198e: 50 push %eax 11198f: e8 e4 d8 ff ff call 10f278 <_Watchdog_Remove> 111994: 83 c4 10 add $0x10,%esp 111997: eb c7 jmp 111960 <_Thread_Reset+0x54> =============================================================================== 0010e9a4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e9a4: 55 push %ebp 10e9a5: 89 e5 mov %esp,%ebp 10e9a7: 53 push %ebx 10e9a8: 83 ec 04 sub $0x4,%esp 10e9ab: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e9ae: f6 43 10 01 testb $0x1,0x10(%ebx) 10e9b2: 74 08 je 10e9bc <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10e9b4: 31 c0 xor %eax,%eax } 10e9b6: 8b 5d fc mov -0x4(%ebp),%ebx 10e9b9: c9 leave 10e9ba: c3 ret 10e9bb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e9bc: 83 ec 0c sub $0xc,%esp 10e9bf: 53 push %ebx 10e9c0: e8 b3 01 00 00 call 10eb78 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e9c5: 83 c4 0c add $0xc,%esp 10e9c8: ff 75 10 pushl 0x10(%ebp) 10e9cb: ff 75 0c pushl 0xc(%ebp) 10e9ce: 53 push %ebx 10e9cf: e8 38 2f 00 00 call 11190c <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e9d4: 89 1c 24 mov %ebx,(%esp) 10e9d7: e8 18 2c 00 00 call 1115f4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e9dc: 89 1c 24 mov %ebx,(%esp) 10e9df: e8 84 2e 00 00 call 111868 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e9e4: 89 1c 24 mov %ebx,(%esp) 10e9e7: e8 94 06 00 00 call 10f080 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e9ec: 83 c4 10 add $0x10,%esp 10e9ef: 3b 1d 58 76 12 00 cmp 0x127658,%ebx 10e9f5: 74 07 je 10e9fe <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10e9f7: b0 01 mov $0x1,%al } return false; } 10e9f9: 8b 5d fc mov -0x4(%ebp),%ebx 10e9fc: c9 leave 10e9fd: 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 ) 10e9fe: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ea05: 74 12 je 10ea19 <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10ea07: 83 ec 0c sub $0xc,%esp 10ea0a: 81 c3 e8 00 00 00 add $0xe8,%ebx 10ea10: 53 push %ebx 10ea11: e8 28 0a 00 00 call 10f43e <_CPU_Context_restore_fp> 10ea16: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ea19: 83 ec 0c sub $0xc,%esp 10ea1c: a1 58 76 12 00 mov 0x127658,%eax 10ea21: 05 d0 00 00 00 add $0xd0,%eax 10ea26: 50 push %eax 10ea27: e8 01 0a 00 00 call 10f42d <_CPU_Context_restore> =============================================================================== 001111a8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 1111a8: 55 push %ebp 1111a9: 89 e5 mov %esp,%ebp 1111ab: 53 push %ebx 1111ac: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 1111af: 9c pushf 1111b0: fa cli 1111b1: 59 pop %ecx current_state = the_thread->current_state; 1111b2: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 1111b5: f6 c2 02 test $0x2,%dl 1111b8: 74 6e je 111228 <_Thread_Resume+0x80> <== NEVER TAKEN 1111ba: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 1111bd: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 1111c0: 85 d2 test %edx,%edx 1111c2: 75 64 jne 111228 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 1111c4: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1111ca: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 1111d1: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 1111d4: 66 8b 15 00 95 12 00 mov 0x129500,%dx 1111db: 0b 90 94 00 00 00 or 0x94(%eax),%edx 1111e1: 66 89 15 00 95 12 00 mov %dx,0x129500 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 1111e8: 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; 1111ee: 8d 5a 04 lea 0x4(%edx),%ebx 1111f1: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 1111f3: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1111f6: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1111f9: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1111fb: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1111fe: 51 push %ecx 1111ff: 9d popf 111200: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111201: 8b 50 14 mov 0x14(%eax),%edx 111204: 8b 1d fc 96 12 00 mov 0x1296fc,%ebx 11120a: 3b 53 14 cmp 0x14(%ebx),%edx 11120d: 73 19 jae 111228 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11120f: a3 fc 96 12 00 mov %eax,0x1296fc if ( _Thread_Executing->is_preemptible || 111214: a1 f8 96 12 00 mov 0x1296f8,%eax 111219: 80 78 74 00 cmpb $0x0,0x74(%eax) 11121d: 74 11 je 111230 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 11121f: c6 05 04 97 12 00 01 movb $0x1,0x129704 111226: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111228: 51 push %ecx 111229: 9d popf } 11122a: 5b pop %ebx 11122b: c9 leave 11122c: c3 ret 11122d: 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 || 111230: 85 d2 test %edx,%edx 111232: 74 eb je 11121f <_Thread_Resume+0x77> <== NEVER TAKEN 111234: eb f2 jmp 111228 <_Thread_Resume+0x80> =============================================================================== 0010def0 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10def0: 55 push %ebp 10def1: 89 e5 mov %esp,%ebp 10def3: 56 push %esi 10def4: 53 push %ebx 10def5: 8b 45 08 mov 0x8(%ebp),%eax 10def8: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10defb: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df01: 9c pushf 10df02: fa cli 10df03: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10df04: 8b 58 10 mov 0x10(%eax),%ebx 10df07: 85 db test %ebx,%ebx 10df09: 75 2d jne 10df38 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10df0b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10df0e: 8b 5a 08 mov 0x8(%edx),%ebx 10df11: 39 1a cmp %ebx,(%edx) 10df13: 74 3b je 10df50 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df15: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10df17: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10df1a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10df1d: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10df1f: 51 push %ecx 10df20: 9d popf 10df21: fa cli if ( _Thread_Is_heir( the_thread ) ) 10df22: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10df28: 74 66 je 10df90 <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10df2a: 3b 05 78 66 12 00 cmp 0x126678,%eax 10df30: 74 12 je 10df44 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10df32: 51 push %ecx 10df33: 9d popf } 10df34: 5b pop %ebx 10df35: 5e pop %esi 10df36: c9 leave 10df37: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10df38: 09 f3 or %esi,%ebx 10df3a: 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 ); 10df3d: 51 push %ecx 10df3e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10df3f: 5b pop %ebx 10df40: 5e pop %esi 10df41: c9 leave 10df42: c3 ret 10df43: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10df44: c6 05 84 66 12 00 01 movb $0x1,0x126684 10df4b: eb e5 jmp 10df32 <_Thread_Set_state+0x42> 10df4d: 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; 10df50: 8d 5a 04 lea 0x4(%edx),%ebx 10df53: 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; 10df55: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10df5c: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10df5f: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10df65: 66 8b 13 mov (%ebx),%dx 10df68: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10df6f: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10df72: 66 85 d2 test %dx,%dx 10df75: 75 a8 jne 10df1f <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10df77: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10df7e: 23 90 98 00 00 00 and 0x98(%eax),%edx 10df84: 66 89 15 80 64 12 00 mov %dx,0x126480 10df8b: eb 92 jmp 10df1f <_Thread_Set_state+0x2f> 10df8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10df90: 66 8b 35 80 64 12 00 mov 0x126480,%si 10df97: 31 d2 xor %edx,%edx 10df99: 89 d3 mov %edx,%ebx 10df9b: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10df9f: 0f b7 db movzwl %bx,%ebx 10dfa2: 66 8b b4 1b 00 65 12 mov 0x126500(%ebx,%ebx,1),%si 10dfa9: 00 10dfaa: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10dfae: c1 e3 04 shl $0x4,%ebx 10dfb1: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10dfb4: 8d 14 13 lea (%ebx,%edx,1),%edx 10dfb7: 8d 14 52 lea (%edx,%edx,2),%edx 10dfba: c1 e2 02 shl $0x2,%edx 10dfbd: 03 15 a0 63 12 00 add 0x1263a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10dfc3: 8b 12 mov (%edx),%edx 10dfc5: 89 15 7c 66 12 00 mov %edx,0x12667c 10dfcb: e9 5a ff ff ff jmp 10df2a <_Thread_Set_state+0x3a> =============================================================================== 0010dfd0 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10dfd0: 55 push %ebp 10dfd1: 89 e5 mov %esp,%ebp 10dfd3: 56 push %esi 10dfd4: 53 push %ebx 10dfd5: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10dfd8: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10dfde: 9c pushf 10dfdf: fa cli 10dfe0: 5b pop %ebx old_state = the_thread->current_state; 10dfe1: 8b 50 10 mov 0x10(%eax),%edx 10dfe4: 89 d6 mov %edx,%esi 10dfe6: 83 ce 04 or $0x4,%esi 10dfe9: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10dfec: 85 d2 test %edx,%edx 10dfee: 75 11 jne 10e001 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10dff0: 8b 51 08 mov 0x8(%ecx),%edx 10dff3: 39 11 cmp %edx,(%ecx) 10dff5: 74 11 je 10e008 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dff7: 8b 10 mov (%eax),%edx previous = the_node->previous; 10dff9: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10dffc: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10dfff: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10e001: 53 push %ebx 10e002: 9d popf } 10e003: 5b pop %ebx 10e004: 5e pop %esi 10e005: c9 leave 10e006: c3 ret 10e007: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e008: 8d 51 04 lea 0x4(%ecx),%edx 10e00b: 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; 10e00d: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10e014: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e017: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10e01d: 66 8b 11 mov (%ecx),%dx 10e020: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e027: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10e02a: 66 85 d2 test %dx,%dx 10e02d: 75 d2 jne 10e001 <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10e02f: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10e036: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e03c: 66 89 15 80 64 12 00 mov %dx,0x126480 10e043: eb bc jmp 10e001 <_Thread_Set_transient+0x31> =============================================================================== 0010e048 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e048: 55 push %ebp 10e049: 89 e5 mov %esp,%ebp 10e04b: 53 push %ebx 10e04c: 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; 10e04f: a1 b0 22 12 00 mov 0x1222b0,%eax 10e054: 8b 5d 0c mov 0xc(%ebp),%ebx 10e057: 39 c3 cmp %eax,%ebx 10e059: 73 02 jae 10e05d <_Thread_Stack_Allocate+0x15> 10e05b: 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 ) { 10e05d: a1 e0 22 12 00 mov 0x1222e0,%eax 10e062: 85 c0 test %eax,%eax 10e064: 74 32 je 10e098 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e066: 83 ec 0c sub $0xc,%esp 10e069: 53 push %ebx 10e06a: ff d0 call *%eax 10e06c: 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 ) 10e06f: 85 c0 test %eax,%eax 10e071: 74 11 je 10e084 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e073: 8b 55 08 mov 0x8(%ebp),%edx 10e076: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e07c: 89 d8 mov %ebx,%eax 10e07e: 8b 5d fc mov -0x4(%ebp),%ebx 10e081: c9 leave 10e082: c3 ret 10e083: 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; 10e084: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e086: 8b 55 08 mov 0x8(%ebp),%edx 10e089: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e08f: 89 d8 mov %ebx,%eax 10e091: 8b 5d fc mov -0x4(%ebp),%ebx 10e094: c9 leave 10e095: c3 ret 10e096: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e098: 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 ); 10e09b: 83 ec 0c sub $0xc,%esp 10e09e: 53 push %ebx 10e09f: e8 14 07 00 00 call 10e7b8 <_Workspace_Allocate> 10e0a4: 83 c4 10 add $0x10,%esp 10e0a7: eb c6 jmp 10e06f <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e0ac <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e0ac: 55 push %ebp 10e0ad: 89 e5 mov %esp,%ebp 10e0af: 83 ec 08 sub $0x8,%esp 10e0b2: 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 ) 10e0b5: a1 e4 22 12 00 mov 0x1222e4,%eax 10e0ba: 85 c0 test %eax,%eax 10e0bc: 74 0e je 10e0cc <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e0be: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e0c4: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e0c7: 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 ); 10e0c8: ff e0 jmp *%eax 10e0ca: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e0cc: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e0d2: 89 45 08 mov %eax,0x8(%ebp) } 10e0d5: 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 ); 10e0d6: e9 f9 06 00 00 jmp 10e7d4 <_Workspace_Free> =============================================================================== 0010e138 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e138: 55 push %ebp 10e139: 89 e5 mov %esp,%ebp 10e13b: 53 push %ebx 10e13c: 83 ec 04 sub $0x4,%esp 10e13f: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e142: f6 43 10 01 testb $0x1,0x10(%ebx) 10e146: 75 08 jne 10e150 <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e148: 31 c0 xor %eax,%eax } 10e14a: 8b 5d fc mov -0x4(%ebp),%ebx 10e14d: c9 leave 10e14e: c3 ret 10e14f: 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; 10e150: 8b 45 10 mov 0x10(%ebp),%eax 10e153: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e159: 8b 45 0c mov 0xc(%ebp),%eax 10e15c: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e162: 8b 45 14 mov 0x14(%ebp),%eax 10e165: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e16b: 8b 45 18 mov 0x18(%ebp),%eax 10e16e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e174: 83 ec 0c sub $0xc,%esp 10e177: 53 push %ebx 10e178: e8 0f 28 00 00 call 11098c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e17d: 89 1c 24 mov %ebx,(%esp) 10e180: e8 7b 2a 00 00 call 110c00 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e185: 89 1c 24 mov %ebx,(%esp) 10e188: e8 4b 03 00 00 call 10e4d8 <_User_extensions_Thread_start> return true; 10e18d: 83 c4 10 add $0x10,%esp 10e190: b0 01 mov $0x1,%al } return false; } 10e192: 8b 5d fc mov -0x4(%ebp),%ebx 10e195: c9 leave 10e196: c3 ret =============================================================================== 00110ca4 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 110ca4: 55 push %ebp 110ca5: 89 e5 mov %esp,%ebp 110ca7: 56 push %esi 110ca8: 53 push %ebx 110ca9: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 110cac: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110cb2: 9c pushf 110cb3: fa cli 110cb4: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 110cb5: 8b 58 10 mov 0x10(%eax),%ebx 110cb8: 85 db test %ebx,%ebx 110cba: 75 34 jne 110cf0 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110cbc: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 110cc3: 8b 5a 08 mov 0x8(%edx),%ebx 110cc6: 39 1a cmp %ebx,(%edx) 110cc8: 74 3e je 110d08 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110cca: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110ccc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 110ccf: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 110cd2: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110cd4: 51 push %ecx 110cd5: 9d popf 110cd6: fa cli if ( _Thread_Is_heir( the_thread ) ) 110cd7: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 110cdd: 74 69 je 110d48 <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 110cdf: 3b 05 78 66 12 00 cmp 0x126678,%eax 110ce5: 74 15 je 110cfc <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 110ce7: 51 push %ecx 110ce8: 9d popf } 110ce9: 5b pop %ebx 110cea: 5e pop %esi 110ceb: c9 leave 110cec: c3 ret 110ced: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110cf0: 83 cb 02 or $0x2,%ebx 110cf3: 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 ); 110cf6: 51 push %ecx 110cf7: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 110cf8: 5b pop %ebx 110cf9: 5e pop %esi 110cfa: c9 leave 110cfb: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 110cfc: c6 05 84 66 12 00 01 movb $0x1,0x126684 110d03: eb e2 jmp 110ce7 <_Thread_Suspend+0x43> 110d05: 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; 110d08: 8d 5a 04 lea 0x4(%edx),%ebx 110d0b: 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; 110d0d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 110d14: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 110d17: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 110d1d: 66 8b 13 mov (%ebx),%dx 110d20: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 110d27: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 110d2a: 66 85 d2 test %dx,%dx 110d2d: 75 a5 jne 110cd4 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 110d2f: 66 8b 15 80 64 12 00 mov 0x126480,%dx 110d36: 23 90 98 00 00 00 and 0x98(%eax),%edx 110d3c: 66 89 15 80 64 12 00 mov %dx,0x126480 110d43: eb 8f jmp 110cd4 <_Thread_Suspend+0x30> 110d45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 110d48: 66 8b 35 80 64 12 00 mov 0x126480,%si 110d4f: 31 d2 xor %edx,%edx 110d51: 89 d3 mov %edx,%ebx 110d53: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 110d57: 0f b7 db movzwl %bx,%ebx 110d5a: 66 8b b4 1b 00 65 12 mov 0x126500(%ebx,%ebx,1),%si 110d61: 00 110d62: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 110d66: c1 e3 04 shl $0x4,%ebx 110d69: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 110d6c: 8d 14 13 lea (%ebx,%edx,1),%edx 110d6f: 8d 14 52 lea (%edx,%edx,2),%edx 110d72: c1 e2 02 shl $0x2,%edx 110d75: 03 15 a0 63 12 00 add 0x1263a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 110d7b: 8b 12 mov (%edx),%edx 110d7d: 89 15 7c 66 12 00 mov %edx,0x12667c 110d83: e9 57 ff ff ff jmp 110cdf <_Thread_Suspend+0x3b> =============================================================================== 0010e1d8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e1d8: 55 push %ebp 10e1d9: 89 e5 mov %esp,%ebp 10e1db: 57 push %edi 10e1dc: 56 push %esi 10e1dd: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e1de: a1 78 66 12 00 mov 0x126678,%eax ready = executing->ready; 10e1e3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e1e9: 9c pushf 10e1ea: fa cli 10e1eb: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e1ec: 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 ) ) { 10e1ef: 39 0a cmp %ecx,(%edx) 10e1f1: 74 3d je 10e230 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e1f3: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e1f5: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e1f8: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e1fb: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e1fd: 8d 72 04 lea 0x4(%edx),%esi 10e200: 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; 10e202: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e205: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e207: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e20a: 53 push %ebx 10e20b: 9d popf 10e20c: fa cli if ( _Thread_Is_heir( executing ) ) 10e20d: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10e213: 74 0f je 10e224 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e215: c6 05 84 66 12 00 01 movb $0x1,0x126684 _ISR_Enable( level ); 10e21c: 53 push %ebx 10e21d: 9d popf } 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: 5f pop %edi 10e221: c9 leave 10e222: c3 ret 10e223: 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; 10e224: 8b 02 mov (%edx),%eax 10e226: a3 7c 66 12 00 mov %eax,0x12667c 10e22b: eb e8 jmp 10e215 <_Thread_Yield_processor+0x3d> 10e22d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e230: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10e236: 75 dd jne 10e215 <_Thread_Yield_processor+0x3d><== NEVER TAKEN 10e238: eb e2 jmp 10e21c <_Thread_Yield_processor+0x44> =============================================================================== 0010d0ec <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d0ec: 55 push %ebp 10d0ed: 89 e5 mov %esp,%ebp 10d0ef: 53 push %ebx 10d0f0: 83 ec 04 sub $0x4,%esp 10d0f3: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0f6: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d0f9: 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 ) ) { 10d100: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d104: 74 16 je 10d11c <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d106: 50 push %eax 10d107: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d108: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d10f: 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 } 10d112: 8b 5d fc mov -0x4(%ebp),%ebx 10d115: c9 leave 10d116: e9 5d 01 00 00 jmp 10d278 <_Thread_Clear_state> 10d11b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d11c: 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 ); 10d123: 50 push %eax 10d124: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d125: 83 ec 0c sub $0xc,%esp 10d128: 8d 43 48 lea 0x48(%ebx),%eax 10d12b: 50 push %eax 10d12c: e8 5f 15 00 00 call 10e690 <_Watchdog_Remove> 10d131: 83 c4 10 add $0x10,%esp 10d134: eb d2 jmp 10d108 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010d9d8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d9d8: 55 push %ebp 10d9d9: 89 e5 mov %esp,%ebp 10d9db: 53 push %ebx 10d9dc: 83 ec 04 sub $0x4,%esp 10d9df: 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 ) 10d9e2: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d9e6: 74 1c je 10da04 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10d9e8: b8 18 0a 11 00 mov $0x110a18,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10d9ed: 83 ec 0c sub $0xc,%esp 10d9f0: 53 push %ebx 10d9f1: ff d0 call *%eax _ISR_Disable( level ); 10d9f3: 9c pushf 10d9f4: fa cli 10d9f5: 5a pop %edx if ( !the_thread ) { 10d9f6: 83 c4 10 add $0x10,%esp 10d9f9: 85 c0 test %eax,%eax 10d9fb: 74 0f je 10da0c <_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 ); 10d9fd: 52 push %edx 10d9fe: 9d popf return the_thread; } 10d9ff: 8b 5d fc mov -0x4(%ebp),%ebx 10da02: c9 leave 10da03: 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; 10da04: b8 24 da 10 00 mov $0x10da24,%eax 10da09: eb e2 jmp 10d9ed <_Thread_queue_Dequeue+0x15> 10da0b: 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) || 10da0c: 8b 4b 30 mov 0x30(%ebx),%ecx 10da0f: 49 dec %ecx 10da10: 83 f9 01 cmp $0x1,%ecx 10da13: 77 e8 ja 10d9fd <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10da15: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10da1c: a1 78 66 12 00 mov 0x126678,%eax 10da21: eb da jmp 10d9fd <_Thread_queue_Dequeue+0x25> =============================================================================== 0010da24 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10da24: 55 push %ebp 10da25: 89 e5 mov %esp,%ebp 10da27: 57 push %edi 10da28: 56 push %esi 10da29: 53 push %ebx 10da2a: 83 ec 2c sub $0x2c,%esp 10da2d: 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 ); 10da30: 9c pushf 10da31: fa cli 10da32: 58 pop %eax 10da33: 89 f9 mov %edi,%ecx for( index=0 ; 10da35: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10da37: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10da39: 8d 34 52 lea (%edx,%edx,2),%esi 10da3c: 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 ] ) ) { 10da40: 39 f3 cmp %esi,%ebx 10da42: 75 18 jne 10da5c <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10da44: 42 inc %edx 10da45: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10da48: 83 fa 04 cmp $0x4,%edx 10da4b: 75 ea jne 10da37 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10da4d: 50 push %eax 10da4e: 9d popf return NULL; 10da4f: 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 ); } 10da51: 89 f0 mov %esi,%eax 10da53: 8d 65 f4 lea -0xc(%ebp),%esp 10da56: 5b pop %ebx 10da57: 5e pop %esi 10da58: 5f pop %edi 10da59: c9 leave 10da5a: c3 ret 10da5b: 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 *) 10da5c: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10da5e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10da65: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10da68: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10da6a: 8b 7b 04 mov 0x4(%ebx),%edi 10da6d: 89 7d d4 mov %edi,-0x2c(%ebp) 10da70: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10da73: 39 fa cmp %edi,%edx 10da75: 74 7b je 10daf2 <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10da77: 8b 7b 40 mov 0x40(%ebx),%edi 10da7a: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10da7d: 8b 3a mov (%edx),%edi 10da7f: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10da82: 8b 7d d4 mov -0x2c(%ebp),%edi 10da85: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10da87: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10da8a: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10da8c: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10da8f: 3b 55 e4 cmp -0x1c(%ebp),%edx 10da92: 74 17 je 10daab <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10da94: 8d 4a 38 lea 0x38(%edx),%ecx 10da97: 8b 7d e0 mov -0x20(%ebp),%edi 10da9a: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10da9d: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10daa0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10daa3: 89 4a 40 mov %ecx,0x40(%edx) 10daa6: 83 c2 3c add $0x3c,%edx 10daa9: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10daab: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10daaf: 74 17 je 10dac8 <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10dab1: 50 push %eax 10dab2: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10dab3: 83 ec 08 sub $0x8,%esp 10dab6: 68 f8 ff 03 10 push $0x1003fff8 10dabb: 53 push %ebx 10dabc: e8 b7 f7 ff ff call 10d278 <_Thread_Clear_state> 10dac1: 83 c4 10 add $0x10,%esp 10dac4: eb 8b jmp 10da51 <_Thread_queue_Dequeue_priority+0x2d> 10dac6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10dac8: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dacf: 50 push %eax 10dad0: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10dad1: 83 ec 0c sub $0xc,%esp 10dad4: 8d 43 48 lea 0x48(%ebx),%eax 10dad7: 50 push %eax 10dad8: e8 b3 0b 00 00 call 10e690 <_Watchdog_Remove> 10dadd: 58 pop %eax 10dade: 5a pop %edx 10dadf: 68 f8 ff 03 10 push $0x1003fff8 10dae4: 53 push %ebx 10dae5: e8 8e f7 ff ff call 10d278 <_Thread_Clear_state> 10daea: 83 c4 10 add $0x10,%esp 10daed: e9 5f ff ff ff jmp 10da51 <_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; 10daf2: 8b 7d d4 mov -0x2c(%ebp),%edi 10daf5: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10daf7: 89 79 04 mov %edi,0x4(%ecx) 10dafa: eb af jmp 10daab <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00110a90 <_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 ) { 110a90: 55 push %ebp 110a91: 89 e5 mov %esp,%ebp 110a93: 56 push %esi 110a94: 53 push %ebx 110a95: 8b 55 08 mov 0x8(%ebp),%edx 110a98: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 110a9b: 9c pushf 110a9c: fa cli 110a9d: 59 pop %ecx sync_state = the_thread_queue->sync_state; 110a9e: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 110aa1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 110aa8: 83 f8 01 cmp $0x1,%eax 110aab: 74 0b je 110ab8 <_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; 110aad: 8b 55 10 mov 0x10(%ebp),%edx 110ab0: 89 0a mov %ecx,(%edx) return sync_state; } 110ab2: 5b pop %ebx 110ab3: 5e pop %esi 110ab4: c9 leave 110ab5: c3 ret 110ab6: 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; 110ab8: 8d 72 04 lea 0x4(%edx),%esi 110abb: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110abd: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 110ac0: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 110ac3: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 110ac5: 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; 110ac8: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 110acb: 51 push %ecx 110acc: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 110acd: 5b pop %ebx 110ace: 5e pop %esi 110acf: c9 leave 110ad0: c3 ret =============================================================================== 0010db94 <_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 ) { 10db94: 55 push %ebp 10db95: 89 e5 mov %esp,%ebp 10db97: 57 push %edi 10db98: 56 push %esi 10db99: 53 push %ebx 10db9a: 83 ec 10 sub $0x10,%esp 10db9d: 8b 7d 0c mov 0xc(%ebp),%edi 10dba0: 8d 47 3c lea 0x3c(%edi),%eax 10dba3: 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; 10dba6: 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 ); 10dbad: 8d 47 38 lea 0x38(%edi),%eax 10dbb0: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10dbb3: 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); 10dbb6: 89 d0 mov %edx,%eax 10dbb8: 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; 10dbbb: 8b 4d 08 mov 0x8(%ebp),%ecx 10dbbe: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dbc1: f6 c2 20 test $0x20,%dl 10dbc4: 75 66 jne 10dc2c <_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; 10dbc6: 8d 04 40 lea (%eax,%eax,2),%eax 10dbc9: 8d 04 81 lea (%ecx,%eax,4),%eax 10dbcc: 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; 10dbcf: 83 c0 04 add $0x4,%eax 10dbd2: 89 7d e8 mov %edi,-0x18(%ebp) 10dbd5: 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 ); 10dbd7: 9c pushf 10dbd8: fa cli 10dbd9: 5e pop %esi 10dbda: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10dbdd: 8b 4d f0 mov -0x10(%ebp),%ecx 10dbe0: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dbe2: 39 f8 cmp %edi,%eax 10dbe4: 75 18 jne 10dbfe <_Thread_queue_Enqueue_priority+0x6a> 10dbe6: e9 32 01 00 00 jmp 10dd1d <_Thread_queue_Enqueue_priority+0x189> 10dbeb: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dbec: 56 push %esi 10dbed: 9d popf 10dbee: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbef: 85 58 10 test %ebx,0x10(%eax) 10dbf2: 0f 84 d0 00 00 00 je 10dcc8 <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dbf8: 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 ) ) { 10dbfa: 39 f8 cmp %edi,%eax 10dbfc: 74 07 je 10dc05 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10dbfe: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dc01: 39 ca cmp %ecx,%edx 10dc03: 77 e7 ja 10dbec <_Thread_queue_Enqueue_priority+0x58> 10dc05: 8b 7d e8 mov -0x18(%ebp),%edi 10dc08: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dc0b: 8b 75 08 mov 0x8(%ebp),%esi 10dc0e: 8b 5e 30 mov 0x30(%esi),%ebx 10dc11: 83 fb 01 cmp $0x1,%ebx 10dc14: 0f 84 b6 00 00 00 je 10dcd0 <_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; 10dc1a: 8b 45 10 mov 0x10(%ebp),%eax 10dc1d: 8b 55 ec mov -0x14(%ebp),%edx 10dc20: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10dc22: 89 d8 mov %ebx,%eax 10dc24: 83 c4 10 add $0x10,%esp 10dc27: 5b pop %ebx 10dc28: 5e pop %esi 10dc29: 5f pop %edi 10dc2a: c9 leave 10dc2b: 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 ]; 10dc2c: 8d 04 40 lea (%eax,%eax,2),%eax 10dc2f: 8b 4d 08 mov 0x8(%ebp),%ecx 10dc32: 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; 10dc35: 89 75 f0 mov %esi,-0x10(%ebp) 10dc38: 89 75 e4 mov %esi,-0x1c(%ebp) 10dc3b: 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; 10dc3e: 0f b6 0d b4 22 12 00 movzbl 0x1222b4,%ecx 10dc45: 41 inc %ecx _ISR_Disable( level ); 10dc46: 9c pushf 10dc47: fa cli 10dc48: 5f pop %edi 10dc49: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dc4c: 8b 75 f0 mov -0x10(%ebp),%esi 10dc4f: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dc52: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dc55: 74 2b je 10dc82 <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dc57: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dc5a: 39 ca cmp %ecx,%edx 10dc5c: 73 24 jae 10dc82 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dc5e: 57 push %edi 10dc5f: 9d popf 10dc60: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc61: 85 58 10 test %ebx,0x10(%eax) 10dc64: 74 59 je 10dcbf <_Thread_queue_Enqueue_priority+0x12b> 10dc66: 8b 75 e4 mov -0x1c(%ebp),%esi 10dc69: eb 10 jmp 10dc7b <_Thread_queue_Enqueue_priority+0xe7> 10dc6b: 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; 10dc6c: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dc6f: 39 ca cmp %ecx,%edx 10dc71: 73 0f jae 10dc82 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dc73: 57 push %edi 10dc74: 9d popf 10dc75: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc76: 85 58 10 test %ebx,0x10(%eax) 10dc79: 74 41 je 10dcbc <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dc7b: 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 ) ) { 10dc7e: 39 f0 cmp %esi,%eax 10dc80: 75 ea jne 10dc6c <_Thread_queue_Enqueue_priority+0xd8> 10dc82: 89 7d f0 mov %edi,-0x10(%ebp) 10dc85: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dc88: 8b 75 08 mov 0x8(%ebp),%esi 10dc8b: 8b 5e 30 mov 0x30(%esi),%ebx 10dc8e: 83 fb 01 cmp $0x1,%ebx 10dc91: 75 87 jne 10dc1a <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc93: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc9a: 39 ca cmp %ecx,%edx 10dc9c: 74 5b je 10dcf9 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dc9e: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dca0: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dca2: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dca5: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dca7: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dcaa: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dcad: ff 75 f0 pushl -0x10(%ebp) 10dcb0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dcb1: 89 d8 mov %ebx,%eax 10dcb3: 83 c4 10 add $0x10,%esp 10dcb6: 5b pop %ebx 10dcb7: 5e pop %esi 10dcb8: 5f pop %edi 10dcb9: c9 leave 10dcba: c3 ret 10dcbb: 90 nop <== NOT EXECUTED 10dcbc: 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 ); 10dcbf: 57 push %edi 10dcc0: 9d popf goto restart_reverse_search; 10dcc1: e9 78 ff ff ff jmp 10dc3e <_Thread_queue_Enqueue_priority+0xaa> 10dcc6: 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 ); 10dcc8: 56 push %esi 10dcc9: 9d popf goto restart_forward_search; 10dcca: e9 08 ff ff ff jmp 10dbd7 <_Thread_queue_Enqueue_priority+0x43> 10dccf: 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; 10dcd0: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dcd7: 39 ca cmp %ecx,%edx 10dcd9: 74 1e je 10dcf9 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dcdb: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dcde: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dce0: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dce3: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dce5: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dce8: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dceb: ff 75 f0 pushl -0x10(%ebp) 10dcee: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dcef: 89 d8 mov %ebx,%eax 10dcf1: 83 c4 10 add $0x10,%esp 10dcf4: 5b pop %ebx 10dcf5: 5e pop %esi 10dcf6: 5f pop %edi 10dcf7: c9 leave 10dcf8: c3 ret 10dcf9: 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; 10dcfc: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dcff: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd01: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd04: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd06: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd09: 8b 45 08 mov 0x8(%ebp),%eax 10dd0c: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dd0f: ff 75 ec pushl -0x14(%ebp) 10dd12: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dd13: bb 01 00 00 00 mov $0x1,%ebx 10dd18: e9 05 ff ff ff jmp 10dc22 <_Thread_queue_Enqueue_priority+0x8e> 10dd1d: 8b 7d e8 mov -0x18(%ebp),%edi 10dd20: 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; 10dd23: b9 ff ff ff ff mov $0xffffffff,%ecx 10dd28: e9 de fe ff ff jmp 10dc0b <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010dafc <_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 ) { 10dafc: 55 push %ebp 10dafd: 89 e5 mov %esp,%ebp 10daff: 57 push %edi 10db00: 56 push %esi 10db01: 53 push %ebx 10db02: 83 ec 24 sub $0x24,%esp 10db05: 8b 75 08 mov 0x8(%ebp),%esi 10db08: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10db0b: 8b 1d 78 66 12 00 mov 0x126678,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10db11: ff 76 38 pushl 0x38(%esi) 10db14: 53 push %ebx 10db15: e8 d6 03 00 00 call 10def0 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10db1a: 83 c4 10 add $0x10,%esp 10db1d: 85 ff test %edi,%edi 10db1f: 75 33 jne 10db54 <_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 ) 10db21: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db25: 74 64 je 10db8b <_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; 10db27: b8 90 0a 11 00 mov $0x110a90,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10db2c: 51 push %ecx 10db2d: 8d 55 e4 lea -0x1c(%ebp),%edx 10db30: 52 push %edx 10db31: 53 push %ebx 10db32: 56 push %esi 10db33: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10db35: 83 c4 10 add $0x10,%esp 10db38: 83 f8 01 cmp $0x1,%eax 10db3b: 74 0e je 10db4b <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10db3d: 52 push %edx 10db3e: ff 75 e4 pushl -0x1c(%ebp) 10db41: 53 push %ebx 10db42: 50 push %eax 10db43: e8 a4 f5 ff ff call 10d0ec <_Thread_blocking_operation_Cancel> 10db48: 83 c4 10 add $0x10,%esp } 10db4b: 8d 65 f4 lea -0xc(%ebp),%esp 10db4e: 5b pop %ebx 10db4f: 5e pop %esi 10db50: 5f pop %edi 10db51: c9 leave 10db52: c3 ret 10db53: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10db54: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10db57: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10db5e: 8b 55 10 mov 0x10(%ebp),%edx 10db61: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10db64: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10db67: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10db6e: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10db71: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10db74: 8d 43 48 lea 0x48(%ebx),%eax 10db77: 50 push %eax 10db78: 68 a4 64 12 00 push $0x1264a4 10db7d: e8 d6 09 00 00 call 10e558 <_Watchdog_Insert> 10db82: 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 ) 10db85: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db89: 75 9c jne 10db27 <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10db8b: b8 94 db 10 00 mov $0x10db94,%eax 10db90: eb 9a jmp 10db2c <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00110ad4 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110ad4: 55 push %ebp 110ad5: 89 e5 mov %esp,%ebp 110ad7: 83 ec 08 sub $0x8,%esp 110ada: 8b 45 08 mov 0x8(%ebp),%eax 110add: 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 ) 110ae0: 83 78 34 01 cmpl $0x1,0x34(%eax) 110ae4: 74 0e je 110af4 <_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 ); 110ae6: 89 55 0c mov %edx,0xc(%ebp) 110ae9: 89 45 08 mov %eax,0x8(%ebp) } 110aec: 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 ); 110aed: e9 3e 18 00 00 jmp 112330 <_Thread_queue_Extract_fifo> 110af2: 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 ); 110af4: 51 push %ecx 110af5: 6a 00 push $0x0 110af7: 52 push %edx 110af8: 50 push %eax 110af9: e8 06 00 00 00 call 110b04 <_Thread_queue_Extract_priority_helper> 110afe: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110b01: c9 leave 110b02: c3 ret =============================================================================== 00112330 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112330: 55 push %ebp 112331: 89 e5 mov %esp,%ebp 112333: 53 push %ebx 112334: 83 ec 04 sub $0x4,%esp 112337: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 11233a: 9c pushf 11233b: fa cli 11233c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11233d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112344: 74 2e je 112374 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112346: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112348: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 11234b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11234e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112350: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112357: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11235b: 74 1f je 11237c <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 11235d: 50 push %eax 11235e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11235f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112366: 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 } 112369: 8b 5d fc mov -0x4(%ebp),%ebx 11236c: c9 leave 11236d: e9 06 af ff ff jmp 10d278 <_Thread_Clear_state> 112372: 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 ); 112374: 50 push %eax 112375: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112376: 8b 5d fc mov -0x4(%ebp),%ebx 112379: c9 leave 11237a: c3 ret 11237b: 90 nop <== NOT EXECUTED 11237c: 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 ); 112383: 50 push %eax 112384: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112385: 83 ec 0c sub $0xc,%esp 112388: 8d 43 48 lea 0x48(%ebx),%eax 11238b: 50 push %eax 11238c: e8 ff c2 ff ff call 10e690 <_Watchdog_Remove> 112391: 83 c4 10 add $0x10,%esp 112394: eb c9 jmp 11235f <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110b04 <_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 ) { 110b04: 55 push %ebp 110b05: 89 e5 mov %esp,%ebp 110b07: 57 push %edi 110b08: 56 push %esi 110b09: 53 push %ebx 110b0a: 83 ec 1c sub $0x1c,%esp 110b0d: 8b 5d 0c mov 0xc(%ebp),%ebx 110b10: 8a 45 10 mov 0x10(%ebp),%al 110b13: 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 ); 110b16: 9c pushf 110b17: fa cli 110b18: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110b1b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110b22: 74 68 je 110b8c <_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; 110b24: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 110b26: 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)); 110b29: 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; 110b2c: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 110b2f: 39 d0 cmp %edx,%eax 110b31: 74 65 je 110b98 <_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; 110b33: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 110b36: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 110b38: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 110b3a: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 110b3d: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 110b3f: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110b42: 39 c2 cmp %eax,%edx 110b44: 74 11 je 110b57 <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 110b46: 8d 48 38 lea 0x38(%eax),%ecx 110b49: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 110b4c: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 110b4f: 89 50 40 mov %edx,0x40(%eax) 110b52: 83 c0 3c add $0x3c,%eax 110b55: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110b57: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110b5b: 75 23 jne 110b80 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110b5d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110b61: 74 3d je 110ba0 <_Thread_queue_Extract_priority_helper+0x9c><== NEVER TAKEN _ISR_Enable( level ); 110b63: ff 75 e4 pushl -0x1c(%ebp) 110b66: 9d popf 110b67: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110b6e: 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 } 110b71: 8d 65 f4 lea -0xc(%ebp),%esp 110b74: 5b pop %ebx 110b75: 5e pop %esi 110b76: 5f pop %edi 110b77: c9 leave 110b78: e9 fb c6 ff ff jmp 10d278 <_Thread_Clear_state> 110b7d: 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 ); 110b80: ff 75 e4 pushl -0x1c(%ebp) 110b83: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b84: 8d 65 f4 lea -0xc(%ebp),%esp 110b87: 5b pop %ebx 110b88: 5e pop %esi 110b89: 5f pop %edi 110b8a: c9 leave 110b8b: 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 ); 110b8c: ff 75 e4 pushl -0x1c(%ebp) 110b8f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b90: 8d 65 f4 lea -0xc(%ebp),%esp 110b93: 5b pop %ebx 110b94: 5e pop %esi 110b95: 5f pop %edi 110b96: c9 leave 110b97: 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; 110b98: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 110b9a: 89 71 04 mov %esi,0x4(%ecx) 110b9d: eb b8 jmp 110b57 <_Thread_queue_Extract_priority_helper+0x53> 110b9f: 90 nop <== NOT EXECUTED 110ba0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110ba7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 110baa: 9d popf <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 110bab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110bae: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 110bb1: 50 push %eax <== NOT EXECUTED 110bb2: e8 d9 da ff ff call 10e690 <_Watchdog_Remove> <== NOT EXECUTED 110bb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110bba: eb ab jmp 110b67 <_Thread_queue_Extract_priority_helper+0x63><== NOT EXECUTED =============================================================================== 0010dd30 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dd30: 55 push %ebp 10dd31: 89 e5 mov %esp,%ebp 10dd33: 83 ec 08 sub $0x8,%esp 10dd36: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10dd39: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dd40: 75 06 jne 10dd48 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10dd42: 31 c0 xor %eax,%eax } 10dd44: c9 leave 10dd45: c3 ret 10dd46: 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 ); 10dd48: 83 ec 08 sub $0x8,%esp 10dd4b: 50 push %eax 10dd4c: ff 70 44 pushl 0x44(%eax) 10dd4f: e8 80 2d 00 00 call 110ad4 <_Thread_queue_Extract> return true; 10dd54: 83 c4 10 add $0x10,%esp 10dd57: b0 01 mov $0x1,%al } return false; } 10dd59: c9 leave 10dd5a: c3 ret =============================================================================== 0011f070 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11f070: 55 push %ebp 11f071: 89 e5 mov %esp,%ebp 11f073: 83 ec 08 sub $0x8,%esp 11f076: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11f079: 83 78 34 01 cmpl $0x1,0x34(%eax) 11f07d: 74 0d je 11f08c <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11f07f: ba a8 05 12 00 mov $0x1205a8,%edx return (*first_p)( the_thread_queue ); 11f084: 89 45 08 mov %eax,0x8(%ebp) } 11f087: 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 ); 11f088: ff e2 jmp *%edx 11f08a: 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; 11f08c: ba 98 f0 11 00 mov $0x11f098,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f091: 89 45 08 mov %eax,0x8(%ebp) } 11f094: 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 ); 11f095: ff e2 jmp *%edx =============================================================================== 001205a8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1205a8: 55 push %ebp 1205a9: 89 e5 mov %esp,%ebp 1205ab: 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)); 1205ae: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1205b0: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1205b3: 39 d0 cmp %edx,%eax 1205b5: 74 05 je 1205bc <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1205b7: c9 leave 1205b8: c3 ret 1205b9: 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; 1205bc: 31 c0 xor %eax,%eax } 1205be: c9 leave 1205bf: c3 ret =============================================================================== 0010dd5c <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dd5c: 55 push %ebp 10dd5d: 89 e5 mov %esp,%ebp 10dd5f: 56 push %esi 10dd60: 53 push %ebx 10dd61: 8b 5d 08 mov 0x8(%ebp),%ebx 10dd64: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dd67: eb 06 jmp 10dd6f <_Thread_queue_Flush+0x13> 10dd69: 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; 10dd6c: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dd6f: 83 ec 0c sub $0xc,%esp 10dd72: 53 push %ebx 10dd73: e8 60 fc ff ff call 10d9d8 <_Thread_queue_Dequeue> 10dd78: 83 c4 10 add $0x10,%esp 10dd7b: 85 c0 test %eax,%eax 10dd7d: 75 ed jne 10dd6c <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dd7f: 8d 65 f8 lea -0x8(%ebp),%esp 10dd82: 5b pop %ebx 10dd83: 5e pop %esi 10dd84: c9 leave 10dd85: c3 ret =============================================================================== 0010dd88 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dd88: 55 push %ebp 10dd89: 89 e5 mov %esp,%ebp 10dd8b: 56 push %esi 10dd8c: 53 push %ebx 10dd8d: 8b 45 08 mov 0x8(%ebp),%eax 10dd90: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dd93: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd96: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dd99: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dd9c: 8b 4d 14 mov 0x14(%ebp),%ecx 10dd9f: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dda2: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dda9: 83 fa 01 cmp $0x1,%edx 10ddac: 74 16 je 10ddc4 <_Thread_queue_Initialize+0x3c> 10ddae: 8d 50 04 lea 0x4(%eax),%edx 10ddb1: 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; 10ddb3: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10ddba: 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 ); } } 10ddbd: 5b pop %ebx 10ddbe: 5e pop %esi 10ddbf: c9 leave 10ddc0: c3 ret 10ddc1: 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 ) { 10ddc4: 89 c1 mov %eax,%ecx 10ddc6: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ddc8: 8d 1c 52 lea (%edx,%edx,2),%ebx 10ddcb: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10ddce: 8d 73 04 lea 0x4(%ebx),%esi 10ddd1: 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; 10ddd3: 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] ); 10ddda: 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++) 10dddd: 42 inc %edx 10ddde: 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 ; 10dde1: 83 fa 04 cmp $0x4,%edx 10dde4: 75 e2 jne 10ddc8 <_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 ); } } 10dde6: 5b pop %ebx 10dde7: 5e pop %esi 10dde8: c9 leave 10dde9: c3 ret =============================================================================== 0010ddec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10ddec: 55 push %ebp 10dded: 89 e5 mov %esp,%ebp 10ddef: 57 push %edi 10ddf0: 56 push %esi 10ddf1: 53 push %ebx 10ddf2: 83 ec 1c sub $0x1c,%esp 10ddf5: 8b 75 08 mov 0x8(%ebp),%esi 10ddf8: 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 ) 10ddfb: 85 f6 test %esi,%esi 10ddfd: 74 06 je 10de05 <_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 ) { 10ddff: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10de03: 74 0b je 10de10 <_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 ); } } 10de05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10de08: 5b pop %ebx <== NOT EXECUTED 10de09: 5e pop %esi <== NOT EXECUTED 10de0a: 5f pop %edi <== NOT EXECUTED 10de0b: c9 leave <== NOT EXECUTED 10de0c: c3 ret <== NOT EXECUTED 10de0d: 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 ); 10de10: 9c pushf 10de11: fa cli 10de12: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10de13: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10de1a: 75 0c jne 10de28 <_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 ); 10de1c: 53 push %ebx 10de1d: 9d popf } } 10de1e: 8d 65 f4 lea -0xc(%ebp),%esp 10de21: 5b pop %ebx 10de22: 5e pop %esi 10de23: 5f pop %edi 10de24: c9 leave 10de25: c3 ret 10de26: 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; 10de28: 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 ); 10de2f: 50 push %eax 10de30: 6a 01 push $0x1 10de32: 57 push %edi 10de33: 56 push %esi 10de34: e8 cb 2c 00 00 call 110b04 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10de39: 83 c4 0c add $0xc,%esp 10de3c: 8d 45 e4 lea -0x1c(%ebp),%eax 10de3f: 50 push %eax 10de40: 57 push %edi 10de41: 56 push %esi 10de42: e8 4d fd ff ff call 10db94 <_Thread_queue_Enqueue_priority> 10de47: 83 c4 10 add $0x10,%esp 10de4a: eb d0 jmp 10de1c <_Thread_queue_Requeue+0x30> =============================================================================== 0010de4c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10de4c: 55 push %ebp 10de4d: 89 e5 mov %esp,%ebp 10de4f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10de52: 8d 45 f4 lea -0xc(%ebp),%eax 10de55: 50 push %eax 10de56: ff 75 08 pushl 0x8(%ebp) 10de59: e8 02 f8 ff ff call 10d660 <_Thread_Get> switch ( location ) { 10de5e: 83 c4 10 add $0x10,%esp 10de61: 8b 55 f4 mov -0xc(%ebp),%edx 10de64: 85 d2 test %edx,%edx 10de66: 75 17 jne 10de7f <_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 ); 10de68: 83 ec 0c sub $0xc,%esp 10de6b: 50 push %eax 10de6c: e8 4b 2d 00 00 call 110bbc <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10de71: a1 d4 63 12 00 mov 0x1263d4,%eax 10de76: 48 dec %eax 10de77: a3 d4 63 12 00 mov %eax,0x1263d4 10de7c: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10de7f: c9 leave 10de80: c3 ret =============================================================================== 00118ed8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118ed8: 55 push %ebp 118ed9: 89 e5 mov %esp,%ebp 118edb: 57 push %edi 118edc: 56 push %esi 118edd: 53 push %ebx 118ede: 83 ec 4c sub $0x4c,%esp 118ee1: 8b 5d 08 mov 0x8(%ebp),%ebx 118ee4: 8d 45 e0 lea -0x20(%ebp),%eax 118ee7: 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); 118eea: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118eed: 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 ); 118ef4: 8d 4d dc lea -0x24(%ebp),%ecx 118ef7: 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; 118efa: 8d 7d d0 lea -0x30(%ebp),%edi 118efd: 8d 45 d4 lea -0x2c(%ebp),%eax 118f00: 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); 118f03: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118f06: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118f0d: 89 7d d8 mov %edi,-0x28(%ebp) 118f10: 8d 73 30 lea 0x30(%ebx),%esi 118f13: 8d 4b 68 lea 0x68(%ebx),%ecx 118f16: 89 4d c4 mov %ecx,-0x3c(%ebp) 118f19: 8d 43 08 lea 0x8(%ebx),%eax 118f1c: 89 45 c0 mov %eax,-0x40(%ebp) 118f1f: 8d 53 40 lea 0x40(%ebx),%edx 118f22: 89 55 bc mov %edx,-0x44(%ebp) 118f25: 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; 118f28: 8d 4d dc lea -0x24(%ebp),%ecx 118f2b: 89 4b 78 mov %ecx,0x78(%ebx) 118f2e: 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; 118f30: a1 c4 08 14 00 mov 0x1408c4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f35: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118f38: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3b: 51 push %ecx 118f3c: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f3d: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3f: 50 push %eax 118f40: 56 push %esi 118f41: e8 92 3d 00 00 call 11ccd8 <_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(); 118f46: a1 08 08 14 00 mov 0x140808,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118f4b: 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 ) { 118f4e: 83 c4 10 add $0x10,%esp 118f51: 39 d0 cmp %edx,%eax 118f53: 77 63 ja 118fb8 <_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 ) { 118f55: 72 7d jb 118fd4 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118f57: 89 43 74 mov %eax,0x74(%ebx) 118f5a: 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 ); 118f5c: 8b 43 78 mov 0x78(%ebx),%eax 118f5f: 83 ec 0c sub $0xc,%esp 118f62: 50 push %eax 118f63: e8 94 09 00 00 call 1198fc <_Chain_Get> if ( timer == NULL ) { 118f68: 83 c4 10 add $0x10,%esp 118f6b: 85 c0 test %eax,%eax 118f6d: 74 35 je 118fa4 <_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 ) { 118f6f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118f72: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118f75: 74 19 je 118f90 <_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 ) { 118f77: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118f7a: 75 e0 jne 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118f7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f7f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f82: 50 push %eax <== NOT EXECUTED 118f83: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118f86: e8 d9 3d 00 00 call 11cd64 <_Watchdog_Insert> <== NOT EXECUTED 118f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118f8e: eb cc jmp 118f5c <_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 ); 118f90: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f93: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f96: 50 push %eax <== NOT EXECUTED 118f97: 56 push %esi <== NOT EXECUTED 118f98: e8 c7 3d 00 00 call 11cd64 <_Watchdog_Insert> <== NOT EXECUTED 118f9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118fa0: eb ba jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED 118fa2: 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 ); 118fa4: 9c pushf 118fa5: fa cli 118fa6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118fa7: 8b 55 b4 mov -0x4c(%ebp),%edx 118faa: 3b 55 dc cmp -0x24(%ebp),%edx 118fad: 74 41 je 118ff0 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118faf: 50 push %eax <== NOT EXECUTED 118fb0: 9d popf <== NOT EXECUTED 118fb1: e9 7a ff ff ff jmp 118f30 <_Timer_server_Body+0x58><== NOT EXECUTED 118fb6: 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 ); 118fb8: 51 push %ecx 118fb9: 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; 118fba: 89 c1 mov %eax,%ecx 118fbc: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118fbe: 51 push %ecx 118fbf: ff 75 c4 pushl -0x3c(%ebp) 118fc2: 89 45 b8 mov %eax,-0x48(%ebp) 118fc5: e8 0e 3d 00 00 call 11ccd8 <_Watchdog_Adjust_to_chain> 118fca: 83 c4 10 add $0x10,%esp 118fcd: 8b 45 b8 mov -0x48(%ebp),%eax 118fd0: eb 85 jmp 118f57 <_Timer_server_Body+0x7f> 118fd2: 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 ); 118fd4: 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; 118fd5: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118fd7: 52 push %edx 118fd8: 6a 01 push $0x1 118fda: ff 75 c4 pushl -0x3c(%ebp) 118fdd: 89 45 b8 mov %eax,-0x48(%ebp) 118fe0: e8 7b 3c 00 00 call 11cc60 <_Watchdog_Adjust> 118fe5: 83 c4 10 add $0x10,%esp 118fe8: 8b 45 b8 mov -0x48(%ebp),%eax 118feb: e9 67 ff ff ff jmp 118f57 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118ff0: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118ff7: 50 push %eax 118ff8: 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 ) ) { 118ff9: 8b 4d b0 mov -0x50(%ebp),%ecx 118ffc: 3b 4d d0 cmp -0x30(%ebp),%ecx 118fff: 75 23 jne 119024 <_Timer_server_Body+0x14c> 119001: eb 33 jmp 119036 <_Timer_server_Body+0x15e> 119003: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119004: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119006: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119009: 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; 11900c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119013: 51 push %ecx 119014: 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 ); 119015: 83 ec 08 sub $0x8,%esp 119018: ff 70 24 pushl 0x24(%eax) 11901b: ff 70 20 pushl 0x20(%eax) 11901e: ff 50 1c call *0x1c(%eax) } 119021: 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 ); 119024: 9c pushf 119025: fa cli 119026: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119027: 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)) 11902a: 39 45 b0 cmp %eax,-0x50(%ebp) 11902d: 75 d5 jne 119004 <_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 ); 11902f: 51 push %ecx 119030: 9d popf 119031: e9 f2 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119036: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11903a: a1 74 07 14 00 mov 0x140774,%eax 11903f: 40 inc %eax 119040: a3 74 07 14 00 mov %eax,0x140774 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119045: 83 ec 08 sub $0x8,%esp 119048: 6a 08 push $0x8 11904a: ff 33 pushl (%ebx) 11904c: e8 3b 34 00 00 call 11c48c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 119051: 89 d8 mov %ebx,%eax 119053: e8 e0 fd ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 119058: 89 d8 mov %ebx,%eax 11905a: e8 29 fe ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 11905f: e8 5c 2a 00 00 call 11bac0 <_Thread_Enable_dispatch> ts->active = true; 119064: 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 ); 119068: 5a pop %edx 119069: ff 75 c0 pushl -0x40(%ebp) 11906c: e8 2b 3e 00 00 call 11ce9c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 119071: 58 pop %eax 119072: ff 75 bc pushl -0x44(%ebp) 119075: e8 22 3e 00 00 call 11ce9c <_Watchdog_Remove> 11907a: 83 c4 10 add $0x10,%esp 11907d: e9 a6 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> =============================================================================== 00118e38 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118e38: 55 push %ebp 118e39: 89 e5 mov %esp,%ebp 118e3b: 56 push %esi 118e3c: 53 push %ebx 118e3d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118e3f: 8d 70 08 lea 0x8(%eax),%esi 118e42: 83 ec 0c sub $0xc,%esp 118e45: 56 push %esi 118e46: e8 51 40 00 00 call 11ce9c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118e4b: 9c pushf 118e4c: fa cli 118e4d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e4e: 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; 118e51: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118e54: 83 c4 10 add $0x10,%esp 118e57: 39 d0 cmp %edx,%eax 118e59: 74 21 je 118e7c <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118e5b: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118e5e: 51 push %ecx 118e5f: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118e60: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118e63: 83 ec 08 sub $0x8,%esp 118e66: 56 push %esi 118e67: 68 44 08 14 00 push $0x140844 118e6c: e8 f3 3e 00 00 call 11cd64 <_Watchdog_Insert> 118e71: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118e74: 8d 65 f8 lea -0x8(%ebp),%esp 118e77: 5b pop %ebx 118e78: 5e pop %esi 118e79: c9 leave 118e7a: c3 ret 118e7b: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118e7c: 51 push %ecx 118e7d: 9d popf } } 118e7e: 8d 65 f8 lea -0x8(%ebp),%esp 118e81: 5b pop %ebx 118e82: 5e pop %esi 118e83: c9 leave 118e84: c3 ret =============================================================================== 00118e88 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118e88: 55 push %ebp 118e89: 89 e5 mov %esp,%ebp 118e8b: 56 push %esi 118e8c: 53 push %ebx 118e8d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118e8f: 8d 70 40 lea 0x40(%eax),%esi 118e92: 83 ec 0c sub $0xc,%esp 118e95: 56 push %esi 118e96: e8 01 40 00 00 call 11ce9c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118e9b: 9c pushf 118e9c: fa cli 118e9d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e9e: 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; 118ea1: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118ea4: 83 c4 10 add $0x10,%esp 118ea7: 39 d0 cmp %edx,%eax 118ea9: 74 21 je 118ecc <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118eab: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118eae: 51 push %ecx 118eaf: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118eb0: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118eb3: 83 ec 08 sub $0x8,%esp 118eb6: 56 push %esi 118eb7: 68 38 08 14 00 push $0x140838 118ebc: e8 a3 3e 00 00 call 11cd64 <_Watchdog_Insert> 118ec1: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118ec4: 8d 65 f8 lea -0x8(%ebp),%esp 118ec7: 5b pop %ebx 118ec8: 5e pop %esi 118ec9: c9 leave 118eca: c3 ret 118ecb: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118ecc: 51 push %ecx 118ecd: 9d popf } } 118ece: 8d 65 f8 lea -0x8(%ebp),%esp 118ed1: 5b pop %ebx 118ed2: 5e pop %esi 118ed3: c9 leave 118ed4: c3 ret =============================================================================== 00119084 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 119084: 55 push %ebp 119085: 89 e5 mov %esp,%ebp 119087: 57 push %edi 119088: 56 push %esi 119089: 53 push %ebx 11908a: 83 ec 2c sub $0x2c,%esp 11908d: 8b 5d 08 mov 0x8(%ebp),%ebx 119090: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 119093: 8b 53 78 mov 0x78(%ebx),%edx 119096: 85 d2 test %edx,%edx 119098: 74 16 je 1190b0 <_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 ); 11909a: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 11909d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1190a0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1190a3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1190a6: 5b pop %ebx <== NOT EXECUTED 1190a7: 5e pop %esi <== NOT EXECUTED 1190a8: 5f pop %edi <== NOT EXECUTED 1190a9: 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 ); 1190aa: e9 11 08 00 00 jmp 1198c0 <_Chain_Append> <== NOT EXECUTED 1190af: 90 nop <== NOT EXECUTED 1190b0: 8b 15 74 07 14 00 mov 0x140774,%edx 1190b6: 42 inc %edx 1190b7: 89 15 74 07 14 00 mov %edx,0x140774 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1190bd: 8b 50 38 mov 0x38(%eax),%edx 1190c0: 83 fa 01 cmp $0x1,%edx 1190c3: 74 7b je 119140 <_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 ) { 1190c5: 83 fa 03 cmp $0x3,%edx 1190c8: 74 0e je 1190d8 <_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 ); } } 1190ca: 8d 65 f4 lea -0xc(%ebp),%esp 1190cd: 5b pop %ebx 1190ce: 5e pop %esi 1190cf: 5f pop %edi 1190d0: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1190d1: e9 ea 29 00 00 jmp 11bac0 <_Thread_Enable_dispatch> 1190d6: 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 ); 1190d8: 9c pushf 1190d9: fa cli 1190da: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1190dd: 8b 0d 08 08 14 00 mov 0x140808,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 1190e3: 8b 53 74 mov 0x74(%ebx),%edx 1190e6: 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)); 1190e9: 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; 1190ec: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1190ef: 39 fa cmp %edi,%edx 1190f1: 74 21 je 119114 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1190f3: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 1190f6: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1190f9: 0f 86 a1 00 00 00 jbe 1191a0 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1190ff: 89 ce mov %ecx,%esi 119101: 2b 75 d4 sub -0x2c(%ebp),%esi 119104: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 119107: 39 f7 cmp %esi,%edi 119109: 0f 86 9b 00 00 00 jbe 1191aa <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 11910f: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119111: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119114: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119117: ff 75 e4 pushl -0x1c(%ebp) 11911a: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11911b: 83 ec 08 sub $0x8,%esp 11911e: 83 c0 10 add $0x10,%eax 119121: 50 push %eax 119122: 8d 43 68 lea 0x68(%ebx),%eax 119125: 50 push %eax 119126: e8 39 3c 00 00 call 11cd64 <_Watchdog_Insert> if ( !ts->active ) { 11912b: 8a 43 7c mov 0x7c(%ebx),%al 11912e: 83 c4 10 add $0x10,%esp 119131: 84 c0 test %al,%al 119133: 75 95 jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119135: 89 d8 mov %ebx,%eax 119137: e8 4c fd ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> 11913c: eb 8c jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 11913e: 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 ); 119140: 9c pushf 119141: fa cli 119142: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119145: 8b 0d c4 08 14 00 mov 0x1408c4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11914b: 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)); 11914e: 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; 119151: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119154: 39 f2 cmp %esi,%edx 119156: 74 10 je 119168 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119158: 89 ce mov %ecx,%esi 11915a: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 11915c: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11915f: 39 fe cmp %edi,%esi 119161: 73 39 jae 11919c <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 119163: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119165: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119168: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11916b: ff 75 e4 pushl -0x1c(%ebp) 11916e: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11916f: 83 ec 08 sub $0x8,%esp 119172: 83 c0 10 add $0x10,%eax 119175: 50 push %eax 119176: 8d 43 30 lea 0x30(%ebx),%eax 119179: 50 push %eax 11917a: e8 e5 3b 00 00 call 11cd64 <_Watchdog_Insert> if ( !ts->active ) { 11917f: 8a 43 7c mov 0x7c(%ebx),%al 119182: 83 c4 10 add $0x10,%esp 119185: 84 c0 test %al,%al 119187: 0f 85 3d ff ff ff jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 11918d: 89 d8 mov %ebx,%eax 11918f: e8 a4 fc ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> 119194: e9 31 ff ff ff jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 119199: 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; 11919c: 31 ff xor %edi,%edi 11919e: eb c5 jmp 119165 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1191a0: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1191a3: 29 cf sub %ecx,%edi 1191a5: e9 67 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1191aa: 31 ff xor %edi,%edi <== NOT EXECUTED 1191ac: e9 60 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010e23c <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 53 push %ebx 10e240: 8b 5d 08 mov 0x8(%ebp),%ebx 10e243: 8b 55 0c mov 0xc(%ebp),%edx uint32_t seconds = add->tv_sec; 10e246: 8b 02 mov (%edx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10e248: 01 03 add %eax,(%ebx) time->tv_nsec += add->tv_nsec; 10e24a: 8b 52 04 mov 0x4(%edx),%edx 10e24d: 03 53 04 add 0x4(%ebx),%edx 10e250: 89 53 04 mov %edx,0x4(%ebx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e253: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e259: 76 1a jbe 10e275 <_Timespec_Add_to+0x39> 10e25b: 8b 0b mov (%ebx),%ecx 10e25d: 8d 76 00 lea 0x0(%esi),%esi time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10e260: 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( 10e266: 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++; 10e267: 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 ) { 10e268: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e26e: 77 f0 ja 10e260 <_Timespec_Add_to+0x24> <== NEVER TAKEN 10e270: 89 53 04 mov %edx,0x4(%ebx) 10e273: 89 0b mov %ecx,(%ebx) time->tv_sec++; seconds++; } return seconds; } 10e275: 5b pop %ebx 10e276: c9 leave 10e277: c3 ret =============================================================================== 0010fb38 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fb38: 55 push %ebp 10fb39: 89 e5 mov %esp,%ebp 10fb3b: 57 push %edi 10fb3c: 56 push %esi 10fb3d: 53 push %ebx 10fb3e: 83 ec 2c sub $0x2c,%esp 10fb41: 8b 45 08 mov 0x8(%ebp),%eax 10fb44: 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; 10fb47: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fb49: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb4c: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fb51: 8b 01 mov (%ecx),%eax 10fb53: f7 eb imul %ebx 10fb55: 89 45 e0 mov %eax,-0x20(%ebp) 10fb58: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fb5b: 8b 41 04 mov 0x4(%ecx),%eax 10fb5e: 99 cltd 10fb5f: 01 45 e0 add %eax,-0x20(%ebp) 10fb62: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fb65: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb68: 0b 55 e0 or -0x20(%ebp),%edx 10fb6b: 74 73 je 10fbe0 <_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; 10fb6d: 89 f8 mov %edi,%eax 10fb6f: f7 eb imul %ebx 10fb71: 89 45 d0 mov %eax,-0x30(%ebp) 10fb74: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fb77: 89 f7 mov %esi,%edi 10fb79: c1 ff 1f sar $0x1f,%edi 10fb7c: 01 75 d0 add %esi,-0x30(%ebp) 10fb7f: 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; 10fb82: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fb89: bb a0 86 01 00 mov $0x186a0,%ebx 10fb8e: 8b 45 d0 mov -0x30(%ebp),%eax 10fb91: f7 e3 mul %ebx 10fb93: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb96: ff 75 e4 pushl -0x1c(%ebp) 10fb99: ff 75 e0 pushl -0x20(%ebp) 10fb9c: 56 push %esi 10fb9d: 50 push %eax 10fb9e: e8 0d fe 00 00 call 11f9b0 <__udivdi3> 10fba3: 83 c4 10 add $0x10,%esp 10fba6: 89 c3 mov %eax,%ebx 10fba8: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fbaa: 6a 00 push $0x0 10fbac: 68 e8 03 00 00 push $0x3e8 10fbb1: 52 push %edx 10fbb2: 50 push %eax 10fbb3: e8 f8 fd 00 00 call 11f9b0 <__udivdi3> 10fbb8: 83 c4 10 add $0x10,%esp 10fbbb: 8b 55 10 mov 0x10(%ebp),%edx 10fbbe: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fbc0: 6a 00 push $0x0 10fbc2: 68 e8 03 00 00 push $0x3e8 10fbc7: 56 push %esi 10fbc8: 53 push %ebx 10fbc9: e8 f2 fe 00 00 call 11fac0 <__umoddi3> 10fbce: 83 c4 10 add $0x10,%esp 10fbd1: 8b 55 14 mov 0x14(%ebp),%edx 10fbd4: 89 02 mov %eax,(%edx) } 10fbd6: 8d 65 f4 lea -0xc(%ebp),%esp 10fbd9: 5b pop %ebx 10fbda: 5e pop %esi 10fbdb: 5f pop %edi 10fbdc: c9 leave 10fbdd: c3 ret 10fbde: 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; 10fbe0: 8b 45 10 mov 0x10(%ebp),%eax 10fbe3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fbe9: 8b 55 14 mov 0x14(%ebp),%edx 10fbec: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fbf2: 8d 65 f4 lea -0xc(%ebp),%esp 10fbf5: 5b pop %ebx 10fbf6: 5e pop %esi 10fbf7: 5f pop %edi 10fbf8: c9 leave 10fbf9: c3 ret =============================================================================== 0010fdb4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10fdb4: 55 push %ebp 10fdb5: 89 e5 mov %esp,%ebp 10fdb7: 8b 55 08 mov 0x8(%ebp),%edx 10fdba: 8b 45 0c mov 0xc(%ebp),%eax if ( lhs->tv_sec > rhs->tv_sec ) 10fdbd: 8b 08 mov (%eax),%ecx 10fdbf: 39 0a cmp %ecx,(%edx) 10fdc1: 7f 11 jg 10fdd4 <_Timespec_Greater_than+0x20> return true; if ( lhs->tv_sec < rhs->tv_sec ) 10fdc3: 7c 0b jl 10fdd0 <_Timespec_Greater_than+0x1c><== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 10fdc5: 8b 48 04 mov 0x4(%eax),%ecx 10fdc8: 39 4a 04 cmp %ecx,0x4(%edx) 10fdcb: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fdce: c9 leave 10fdcf: c3 ret { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 10fdd0: 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; } 10fdd2: c9 leave <== NOT EXECUTED 10fdd3: c3 ret <== NOT EXECUTED const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; 10fdd4: b0 01 mov $0x1,%al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fdd6: c9 leave 10fdd7: c3 ret =============================================================================== 0010ee84 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10ee84: 55 push %ebp 10ee85: 89 e5 mov %esp,%ebp 10ee87: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10ee8a: 85 c0 test %eax,%eax 10ee8c: 74 1a je 10eea8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10ee8e: 8b 10 mov (%eax),%edx 10ee90: 85 d2 test %edx,%edx 10ee92: 78 14 js 10eea8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10ee94: 8b 40 04 mov 0x4(%eax),%eax 10ee97: 85 c0 test %eax,%eax 10ee99: 78 0d js 10eea8 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10ee9b: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10eea0: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10eea3: c9 leave 10eea4: c3 ret 10eea5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 10eea8: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10eeaa: c9 leave 10eeab: c3 ret =============================================================================== 0010e278 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e278: 55 push %ebp 10e279: 89 e5 mov %esp,%ebp 10e27b: 56 push %esi 10e27c: 53 push %ebx 10e27d: 8b 5d 08 mov 0x8(%ebp),%ebx 10e280: 8b 75 0c mov 0xc(%ebp),%esi 10e283: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e286: 8b 4e 04 mov 0x4(%esi),%ecx 10e289: 8b 53 04 mov 0x4(%ebx),%edx 10e28c: 39 d1 cmp %edx,%ecx 10e28e: 7c 10 jl 10e2a0 <_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; 10e290: 8b 36 mov (%esi),%esi 10e292: 2b 33 sub (%ebx),%esi 10e294: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e296: 29 d1 sub %edx,%ecx 10e298: 89 48 04 mov %ecx,0x4(%eax) } } 10e29b: 5b pop %ebx 10e29c: 5e pop %esi 10e29d: c9 leave 10e29e: c3 ret 10e29f: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e2a0: 8b 36 mov (%esi),%esi 10e2a2: 4e dec %esi 10e2a3: 2b 33 sub (%ebx),%esi 10e2a5: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e2a7: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e2ad: 29 d1 sub %edx,%ecx 10e2af: 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; } } 10e2b2: 5b pop %ebx 10e2b3: 5e pop %esi 10e2b4: c9 leave 10e2b5: c3 ret =============================================================================== 0010eeec <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10eeec: 55 push %ebp 10eeed: 89 e5 mov %esp,%ebp 10eeef: 56 push %esi 10eef0: 53 push %ebx 10eef1: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10eef4: 8b 33 mov (%ebx),%esi 10eef6: 85 f6 test %esi,%esi 10eef8: 75 07 jne 10ef01 <_Timespec_To_ticks+0x15> 10eefa: 8b 43 04 mov 0x4(%ebx),%eax 10eefd: 85 c0 test %eax,%eax 10eeff: 74 37 je 10ef38 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10ef01: e8 6e 24 00 00 call 111374 10ef06: 89 c1 mov %eax,%ecx 10ef08: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10ef0b: a1 cc 42 12 00 mov 0x1242cc,%eax 10ef10: 8d 04 80 lea (%eax,%eax,4),%eax 10ef13: 8d 04 80 lea (%eax,%eax,4),%eax 10ef16: 8d 34 80 lea (%eax,%eax,4),%esi 10ef19: c1 e6 03 shl $0x3,%esi 10ef1c: 8b 43 04 mov 0x4(%ebx),%eax 10ef1f: 31 d2 xor %edx,%edx 10ef21: f7 f6 div %esi if (ticks) 10ef23: 01 c8 add %ecx,%eax 10ef25: 74 05 je 10ef2c <_Timespec_To_ticks+0x40> return ticks; return 1; } 10ef27: 5b pop %ebx 10ef28: 5e pop %esi 10ef29: c9 leave 10ef2a: c3 ret 10ef2b: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 10ef2c: b8 01 00 00 00 mov $0x1,%eax } 10ef31: 5b pop %ebx 10ef32: 5e pop %esi 10ef33: c9 leave 10ef34: c3 ret 10ef35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 10ef38: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10ef3a: 5b pop %ebx 10ef3b: 5e pop %esi 10ef3c: c9 leave 10ef3d: c3 ret =============================================================================== 0010e3f4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e3f4: 55 push %ebp 10e3f5: 89 e5 mov %esp,%ebp 10e3f7: 57 push %edi 10e3f8: 56 push %esi 10e3f9: 53 push %ebx 10e3fa: 83 ec 1c sub $0x1c,%esp 10e3fd: 8b 75 08 mov 0x8(%ebp),%esi 10e400: 8b 7d 10 mov 0x10(%ebp),%edi 10e403: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e406: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e40c: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e412: 74 25 je 10e439 <_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 ); 10e414: 0f b6 c0 movzbl %al,%eax 10e417: 89 45 e4 mov %eax,-0x1c(%ebp) 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.fatal != NULL ) 10e41c: 8b 43 30 mov 0x30(%ebx),%eax 10e41f: 85 c0 test %eax,%eax 10e421: 74 0b je 10e42e <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e423: 52 push %edx 10e424: 57 push %edi 10e425: ff 75 e4 pushl -0x1c(%ebp) 10e428: 56 push %esi 10e429: ff d0 call *%eax 10e42b: 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 ) { 10e42e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e431: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e437: 75 e3 jne 10e41c <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e439: 8d 65 f4 lea -0xc(%ebp),%esp 10e43c: 5b pop %ebx 10e43d: 5e pop %esi 10e43e: 5f pop %edi 10e43f: c9 leave 10e440: c3 ret =============================================================================== 0010e2b8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e2b8: 55 push %ebp 10e2b9: 89 e5 mov %esp,%ebp 10e2bb: 57 push %edi 10e2bc: 56 push %esi 10e2bd: 53 push %ebx 10e2be: 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; 10e2c1: a1 f8 22 12 00 mov 0x1222f8,%eax 10e2c6: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e2c9: 8b 35 fc 22 12 00 mov 0x1222fc,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e2cf: c7 05 0c 66 12 00 10 movl $0x126610,0x12660c 10e2d6: 66 12 00 the_chain->permanent_null = NULL; 10e2d9: c7 05 10 66 12 00 00 movl $0x0,0x126610 10e2e0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e2e3: c7 05 14 66 12 00 0c movl $0x12660c,0x126614 10e2ea: 66 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e2ed: c7 05 d8 63 12 00 dc movl $0x1263dc,0x1263d8 10e2f4: 63 12 00 the_chain->permanent_null = NULL; 10e2f7: c7 05 dc 63 12 00 00 movl $0x0,0x1263dc 10e2fe: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e301: c7 05 e0 63 12 00 d8 movl $0x1263d8,0x1263e0 10e308: 63 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e30b: 85 f6 test %esi,%esi 10e30d: 74 64 je 10e373 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e30f: 89 c2 mov %eax,%edx 10e311: 8d 04 40 lea (%eax,%eax,2),%eax 10e314: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e317: c1 e1 02 shl $0x2,%ecx 10e31a: 83 ec 0c sub $0xc,%esp 10e31d: 51 push %ecx 10e31e: 89 4d d8 mov %ecx,-0x28(%ebp) 10e321: e8 c6 04 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10e326: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e328: 31 c0 xor %eax,%eax 10e32a: 8b 4d d8 mov -0x28(%ebp),%ecx 10e32d: 89 df mov %ebx,%edi 10e32f: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e331: 83 c4 10 add $0x10,%esp 10e334: 8b 45 dc mov -0x24(%ebp),%eax 10e337: 85 c0 test %eax,%eax 10e339: 74 38 je 10e373 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e33b: 89 75 e4 mov %esi,-0x1c(%ebp) 10e33e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e345: 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; 10e348: 8d 7b 14 lea 0x14(%ebx),%edi 10e34b: 8b 75 e4 mov -0x1c(%ebp),%esi 10e34e: b9 08 00 00 00 mov $0x8,%ecx 10e353: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e355: 83 ec 0c sub $0xc,%esp 10e358: 53 push %ebx 10e359: e8 2a 2a 00 00 call 110d88 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e35e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e361: ff 45 e0 incl -0x20(%ebp) 10e364: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e368: 83 c4 10 add $0x10,%esp 10e36b: 8b 45 e0 mov -0x20(%ebp),%eax 10e36e: 39 45 dc cmp %eax,-0x24(%ebp) 10e371: 77 d5 ja 10e348 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e373: 8d 65 f4 lea -0xc(%ebp),%esp 10e376: 5b pop %ebx 10e377: 5e pop %esi 10e378: 5f pop %edi 10e379: c9 leave 10e37a: c3 ret =============================================================================== 0010f930 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f930: 55 push %ebp 10f931: 89 e5 mov %esp,%ebp 10f933: 53 push %ebx 10f934: 83 ec 10 sub $0x10,%esp 10f937: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f93a: 53 push %ebx 10f93b: e8 84 da ff ff call 10d3c4 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f940: 83 c4 10 add $0x10,%esp 10f943: 8b 43 24 mov 0x24(%ebx),%eax 10f946: 85 c0 test %eax,%eax 10f948: 74 12 je 10f95c <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f94a: 83 c3 08 add $0x8,%ebx 10f94d: 89 5d 08 mov %ebx,0x8(%ebp) } 10f950: 8b 5d fc mov -0x4(%ebp),%ebx 10f953: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f954: e9 6b da ff ff jmp 10d3c4 <_Chain_Extract> 10f959: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10f95c: 8b 5d fc mov -0x4(%ebp),%ebx 10f95f: c9 leave 10f960: c3 ret =============================================================================== 0010e37c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e37c: 55 push %ebp 10e37d: 89 e5 mov %esp,%ebp 10e37f: 56 push %esi 10e380: 53 push %ebx 10e381: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e384: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e38a: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e390: 74 1c je 10e3ae <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e392: 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 ) 10e394: 8b 43 28 mov 0x28(%ebx),%eax 10e397: 85 c0 test %eax,%eax 10e399: 74 09 je 10e3a4 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e39b: 83 ec 0c sub $0xc,%esp 10e39e: 56 push %esi 10e39f: ff d0 call *%eax 10e3a1: 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 ) { 10e3a4: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e3a6: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e3ac: 75 e6 jne 10e394 <_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 ); } } 10e3ae: 8d 65 f8 lea -0x8(%ebp),%esp 10e3b1: 5b pop %ebx 10e3b2: 5e pop %esi 10e3b3: c9 leave 10e3b4: c3 ret =============================================================================== 0010e444 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( 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; bool status; for ( the_node = _User_extensions_List.first ; 10e44c: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e452: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e458: 74 26 je 10e480 <_User_extensions_Thread_create+0x3c><== 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_create != NULL ) { 10e45c: 8b 43 14 mov 0x14(%ebx),%eax 10e45f: 85 c0 test %eax,%eax 10e461: 74 13 je 10e476 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e463: 83 ec 08 sub $0x8,%esp 10e466: 56 push %esi 10e467: ff 35 78 66 12 00 pushl 0x126678 10e46d: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e46f: 83 c4 10 add $0x10,%esp 10e472: 84 c0 test %al,%al 10e474: 74 16 je 10e48c <_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 ) { 10e476: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e478: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e47e: 75 dc jne 10e45c <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e480: b0 01 mov $0x1,%al } 10e482: 8d 65 f8 lea -0x8(%ebp),%esp 10e485: 5b pop %ebx 10e486: 5e pop %esi 10e487: c9 leave 10e488: c3 ret 10e489: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e48c: 31 c0 xor %eax,%eax } } return true; } 10e48e: 8d 65 f8 lea -0x8(%ebp),%esp 10e491: 5b pop %ebx 10e492: 5e pop %esi 10e493: c9 leave 10e494: c3 ret =============================================================================== 0010e498 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e498: 55 push %ebp 10e499: 89 e5 mov %esp,%ebp 10e49b: 56 push %esi 10e49c: 53 push %ebx 10e49d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4a0: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e4a6: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e4ac: 74 23 je 10e4d1 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e4ae: 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 ) 10e4b0: 8b 43 20 mov 0x20(%ebx),%eax 10e4b3: 85 c0 test %eax,%eax 10e4b5: 74 0f je 10e4c6 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e4b7: 83 ec 08 sub $0x8,%esp 10e4ba: 56 push %esi 10e4bb: ff 35 78 66 12 00 pushl 0x126678 10e4c1: ff d0 call *%eax 10e4c3: 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 ) { 10e4c6: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4c9: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e4cf: 75 df jne 10e4b0 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e4d1: 8d 65 f8 lea -0x8(%ebp),%esp 10e4d4: 5b pop %ebx 10e4d5: 5e pop %esi 10e4d6: c9 leave 10e4d7: c3 ret =============================================================================== 0010e3b8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e3b8: 55 push %ebp 10e3b9: 89 e5 mov %esp,%ebp 10e3bb: 56 push %esi 10e3bc: 53 push %ebx 10e3bd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e3c0: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e3c6: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e3cc: 74 1d je 10e3eb <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e3ce: 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 ) 10e3d0: 8b 43 2c mov 0x2c(%ebx),%eax 10e3d3: 85 c0 test %eax,%eax 10e3d5: 74 09 je 10e3e0 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e3d7: 83 ec 0c sub $0xc,%esp 10e3da: 56 push %esi 10e3db: ff d0 call *%eax 10e3dd: 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 ) { 10e3e0: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e3e3: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e3e9: 75 e5 jne 10e3d0 <_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 ); } } 10e3eb: 8d 65 f8 lea -0x8(%ebp),%esp 10e3ee: 5b pop %ebx 10e3ef: 5e pop %esi 10e3f0: c9 leave 10e3f1: c3 ret =============================================================================== 0010f080 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f080: 55 push %ebp 10f081: 89 e5 mov %esp,%ebp 10f083: 56 push %esi 10f084: 53 push %ebx 10f085: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f088: 8b 1d ec 75 12 00 mov 0x1275ec,%ebx 10f08e: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10f094: 74 22 je 10f0b8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f096: 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 ) 10f098: 8b 43 1c mov 0x1c(%ebx),%eax 10f09b: 85 c0 test %eax,%eax 10f09d: 74 0f je 10f0ae <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f09f: 83 ec 08 sub $0x8,%esp 10f0a2: 56 push %esi 10f0a3: ff 35 58 76 12 00 pushl 0x127658 10f0a9: ff d0 call *%eax 10f0ab: 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 ) { 10f0ae: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f0b0: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10f0b6: 75 e0 jne 10f098 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f0b8: 8d 65 f8 lea -0x8(%ebp),%esp 10f0bb: 5b pop %ebx 10f0bc: 5e pop %esi 10f0bd: c9 leave 10f0be: c3 ret =============================================================================== 0010e4d8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e4d8: 55 push %ebp 10e4d9: 89 e5 mov %esp,%ebp 10e4db: 56 push %esi 10e4dc: 53 push %ebx 10e4dd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e4e0: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e4e6: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e4ec: 74 22 je 10e510 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e4ee: 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 ) 10e4f0: 8b 43 18 mov 0x18(%ebx),%eax 10e4f3: 85 c0 test %eax,%eax 10e4f5: 74 0f je 10e506 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e4f7: 83 ec 08 sub $0x8,%esp 10e4fa: 56 push %esi 10e4fb: ff 35 78 66 12 00 pushl 0x126678 10e501: ff d0 call *%eax 10e503: 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 ) { 10e506: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e508: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e50e: 75 e0 jne 10e4f0 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e510: 8d 65 f8 lea -0x8(%ebp),%esp 10e513: 5b pop %ebx 10e514: 5e pop %esi 10e515: c9 leave 10e516: c3 ret =============================================================================== 0010e518 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e518: 55 push %ebp 10e519: 89 e5 mov %esp,%ebp 10e51b: 57 push %edi 10e51c: 56 push %esi 10e51d: 53 push %ebx 10e51e: 83 ec 0c sub $0xc,%esp 10e521: 8b 7d 08 mov 0x8(%ebp),%edi 10e524: 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 ; 10e527: 8b 1d d8 63 12 00 mov 0x1263d8,%ebx 10e52d: 81 fb dc 63 12 00 cmp $0x1263dc,%ebx 10e533: 74 18 je 10e54d <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e535: 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 ); 10e538: 83 ec 08 sub $0x8,%esp 10e53b: 56 push %esi 10e53c: 57 push %edi 10e53d: 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 ) { 10e540: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e542: 83 c4 10 add $0x10,%esp 10e545: 81 fb dc 63 12 00 cmp $0x1263dc,%ebx 10e54b: 75 eb jne 10e538 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e54d: 8d 65 f4 lea -0xc(%ebp),%esp 10e550: 5b pop %ebx 10e551: 5e pop %esi 10e552: 5f pop %edi 10e553: c9 leave 10e554: c3 ret =============================================================================== 0010ff18 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10ff18: 55 push %ebp 10ff19: 89 e5 mov %esp,%ebp 10ff1b: 57 push %edi 10ff1c: 56 push %esi 10ff1d: 53 push %ebx 10ff1e: 83 ec 1c sub $0x1c,%esp 10ff21: 8b 75 08 mov 0x8(%ebp),%esi 10ff24: 8b 4d 0c mov 0xc(%ebp),%ecx 10ff27: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10ff2a: 9c pushf 10ff2b: fa cli 10ff2c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff2d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ff2f: 8d 7e 04 lea 0x4(%esi),%edi 10ff32: 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 ) ) { 10ff35: 39 fa cmp %edi,%edx 10ff37: 74 3d je 10ff76 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10ff39: 85 c9 test %ecx,%ecx 10ff3b: 75 43 jne 10ff80 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff3d: 85 db test %ebx,%ebx 10ff3f: 74 35 je 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff41: 8b 7a 10 mov 0x10(%edx),%edi 10ff44: 39 fb cmp %edi,%ebx 10ff46: 73 0f jae 10ff57 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10ff48: eb 3e jmp 10ff88 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10ff4a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff4c: 29 fb sub %edi,%ebx 10ff4e: 74 26 je 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff50: 8b 7a 10 mov 0x10(%edx),%edi 10ff53: 39 df cmp %ebx,%edi 10ff55: 77 31 ja 10ff88 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10ff57: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10ff5e: 50 push %eax 10ff5f: 9d popf _Watchdog_Tickle( header ); 10ff60: 83 ec 0c sub $0xc,%esp 10ff63: 56 push %esi 10ff64: e8 cb 01 00 00 call 110134 <_Watchdog_Tickle> _ISR_Disable( level ); 10ff69: 9c pushf 10ff6a: fa cli 10ff6b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff6c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10ff6e: 83 c4 10 add $0x10,%esp 10ff71: 39 55 e4 cmp %edx,-0x1c(%ebp) 10ff74: 75 d6 jne 10ff4c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10ff76: 50 push %eax 10ff77: 9d popf } 10ff78: 8d 65 f4 lea -0xc(%ebp),%esp 10ff7b: 5b pop %ebx 10ff7c: 5e pop %esi 10ff7d: 5f pop %edi 10ff7e: c9 leave 10ff7f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10ff80: 49 dec %ecx 10ff81: 75 f3 jne 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10ff83: 01 5a 10 add %ebx,0x10(%edx) break; 10ff86: eb ee jmp 10ff76 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10ff88: 29 df sub %ebx,%edi 10ff8a: 89 7a 10 mov %edi,0x10(%edx) break; 10ff8d: eb e7 jmp 10ff76 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e558 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e558: 55 push %ebp 10e559: 89 e5 mov %esp,%ebp 10e55b: 57 push %edi 10e55c: 56 push %esi 10e55d: 53 push %ebx 10e55e: 83 ec 04 sub $0x4,%esp 10e561: 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; 10e564: 8b 3d 74 66 12 00 mov 0x126674,%edi _ISR_Disable( level ); 10e56a: 9c pushf 10e56b: fa cli 10e56c: 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 ) { 10e56f: 8b 43 08 mov 0x8(%ebx),%eax 10e572: 85 c0 test %eax,%eax 10e574: 0f 85 9e 00 00 00 jne 10e618 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e57a: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e581: a1 20 65 12 00 mov 0x126520,%eax 10e586: 40 inc %eax 10e587: a3 20 65 12 00 mov %eax,0x126520 restart: delta_interval = the_watchdog->initial; 10e58c: 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 ; 10e58f: 8b 4d 08 mov 0x8(%ebp),%ecx 10e592: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e594: 85 c0 test %eax,%eax 10e596: 74 5d je 10e5f5 <_Watchdog_Insert+0x9d> 10e598: 8b 32 mov (%edx),%esi 10e59a: 85 f6 test %esi,%esi 10e59c: 74 57 je 10e5f5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e59e: 8b 4a 10 mov 0x10(%edx),%ecx 10e5a1: 39 c8 cmp %ecx,%eax 10e5a3: 73 22 jae 10e5c7 <_Watchdog_Insert+0x6f> 10e5a5: eb 49 jmp 10e5f0 <_Watchdog_Insert+0x98> 10e5a7: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e5a8: 8b 35 88 64 12 00 mov 0x126488,%esi 10e5ae: 39 f7 cmp %esi,%edi 10e5b0: 72 72 jb 10e624 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e5b2: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e5b4: 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 ) ) 10e5b6: 85 c0 test %eax,%eax 10e5b8: 74 3b je 10e5f5 <_Watchdog_Insert+0x9d> 10e5ba: 8b 0a mov (%edx),%ecx 10e5bc: 85 c9 test %ecx,%ecx 10e5be: 74 35 je 10e5f5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e5c0: 8b 4a 10 mov 0x10(%edx),%ecx 10e5c3: 39 c1 cmp %eax,%ecx 10e5c5: 77 29 ja 10e5f0 <_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 ); 10e5c7: ff 75 f0 pushl -0x10(%ebp) 10e5ca: 9d popf 10e5cb: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e5cc: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e5d0: 74 d6 je 10e5a8 <_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; 10e5d2: 89 3d 88 64 12 00 mov %edi,0x126488 _Watchdog_Sync_count--; 10e5d8: a1 20 65 12 00 mov 0x126520,%eax 10e5dd: 48 dec %eax 10e5de: a3 20 65 12 00 mov %eax,0x126520 _ISR_Enable( level ); 10e5e3: ff 75 f0 pushl -0x10(%ebp) 10e5e6: 9d popf } 10e5e7: 58 pop %eax 10e5e8: 5b pop %ebx 10e5e9: 5e pop %esi 10e5ea: 5f pop %edi 10e5eb: c9 leave 10e5ec: c3 ret 10e5ed: 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; 10e5f0: 29 c1 sub %eax,%ecx 10e5f2: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e5f5: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e5fc: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e5ff: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e602: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e605: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e607: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e609: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e60b: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e60e: a1 24 65 12 00 mov 0x126524,%eax 10e613: 89 43 14 mov %eax,0x14(%ebx) 10e616: eb ba jmp 10e5d2 <_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 ); 10e618: ff 75 f0 pushl -0x10(%ebp) 10e61b: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e61c: 58 pop %eax 10e61d: 5b pop %ebx 10e61e: 5e pop %esi 10e61f: 5f pop %edi 10e620: c9 leave 10e621: c3 ret 10e622: 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; 10e624: 89 3d 88 64 12 00 mov %edi,0x126488 goto restart; 10e62a: e9 5d ff ff ff jmp 10e58c <_Watchdog_Insert+0x34> =============================================================================== 0010e690 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e690: 55 push %ebp 10e691: 89 e5 mov %esp,%ebp 10e693: 56 push %esi 10e694: 53 push %ebx 10e695: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e698: 9c pushf 10e699: fa cli 10e69a: 59 pop %ecx previous_state = the_watchdog->state; 10e69b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e69e: 83 f8 01 cmp $0x1,%eax 10e6a1: 74 4d je 10e6f0 <_Watchdog_Remove+0x60> 10e6a3: 73 0f jae 10e6b4 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e6a5: 8b 1d 24 65 12 00 mov 0x126524,%ebx 10e6ab: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e6ae: 51 push %ecx 10e6af: 9d popf return( previous_state ); } 10e6b0: 5b pop %ebx 10e6b1: 5e pop %esi 10e6b2: c9 leave 10e6b3: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e6b4: 83 f8 03 cmp $0x3,%eax 10e6b7: 77 ec ja 10e6a5 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e6b9: 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 ); } 10e6c0: 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) ) 10e6c2: 8b 33 mov (%ebx),%esi 10e6c4: 85 f6 test %esi,%esi 10e6c6: 74 06 je 10e6ce <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e6c8: 8b 72 10 mov 0x10(%edx),%esi 10e6cb: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e6ce: 8b 35 20 65 12 00 mov 0x126520,%esi 10e6d4: 85 f6 test %esi,%esi 10e6d6: 74 0c je 10e6e4 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e6d8: 8b 35 74 66 12 00 mov 0x126674,%esi 10e6de: 89 35 88 64 12 00 mov %esi,0x126488 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e6e4: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e6e7: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e6ea: 89 1e mov %ebx,(%esi) 10e6ec: eb b7 jmp 10e6a5 <_Watchdog_Remove+0x15> 10e6ee: 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; 10e6f0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e6f7: eb ac jmp 10e6a5 <_Watchdog_Remove+0x15> =============================================================================== 0010fb1c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fb1c: 55 push %ebp 10fb1d: 89 e5 mov %esp,%ebp 10fb1f: 57 push %edi 10fb20: 56 push %esi 10fb21: 53 push %ebx 10fb22: 83 ec 2c sub $0x2c,%esp 10fb25: 8b 55 08 mov 0x8(%ebp),%edx 10fb28: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fb2b: 8b 78 24 mov 0x24(%eax),%edi 10fb2e: 8b 70 20 mov 0x20(%eax),%esi 10fb31: 8b 58 1c mov 0x1c(%eax),%ebx 10fb34: 8b 48 0c mov 0xc(%eax),%ecx 10fb37: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fb3a: 8b 48 10 mov 0x10(%eax),%ecx 10fb3d: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fb40: 85 d2 test %edx,%edx 10fb42: 74 2c je 10fb70 <_Watchdog_Report+0x54> 10fb44: b9 c3 1a 12 00 mov $0x121ac3,%ecx 10fb49: 83 ec 0c sub $0xc,%esp 10fb4c: 57 push %edi 10fb4d: 56 push %esi 10fb4e: 53 push %ebx 10fb4f: 50 push %eax 10fb50: ff 75 d4 pushl -0x2c(%ebp) 10fb53: ff 75 e4 pushl -0x1c(%ebp) 10fb56: 51 push %ecx 10fb57: 52 push %edx 10fb58: 68 c6 24 12 00 push $0x1224c6 10fb5d: e8 b2 9e ff ff call 109a14 10fb62: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fb65: 8d 65 f4 lea -0xc(%ebp),%esp 10fb68: 5b pop %ebx 10fb69: 5e pop %esi 10fb6a: 5f pop %edi 10fb6b: c9 leave 10fb6c: c3 ret 10fb6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fb70: b9 15 23 12 00 mov $0x122315,%ecx 10fb75: 89 ca mov %ecx,%edx 10fb77: eb d0 jmp 10fb49 <_Watchdog_Report+0x2d> =============================================================================== 0010faac <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10faac: 55 push %ebp 10faad: 89 e5 mov %esp,%ebp 10faaf: 57 push %edi 10fab0: 56 push %esi 10fab1: 53 push %ebx 10fab2: 83 ec 20 sub $0x20,%esp 10fab5: 8b 7d 08 mov 0x8(%ebp),%edi 10fab8: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fabb: 9c pushf 10fabc: fa cli 10fabd: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fac0: 56 push %esi 10fac1: 57 push %edi 10fac2: 68 90 24 12 00 push $0x122490 10fac7: e8 48 9f ff ff call 109a14 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10facc: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10face: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fad1: 83 c4 10 add $0x10,%esp 10fad4: 39 f3 cmp %esi,%ebx 10fad6: 74 31 je 10fb09 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fad8: 83 ec 08 sub $0x8,%esp 10fadb: 53 push %ebx 10fadc: 6a 00 push $0x0 10fade: e8 39 00 00 00 call 10fb1c <_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 ) 10fae3: 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 ; 10fae5: 83 c4 10 add $0x10,%esp 10fae8: 39 f3 cmp %esi,%ebx 10faea: 75 ec jne 10fad8 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10faec: 83 ec 08 sub $0x8,%esp 10faef: 57 push %edi 10faf0: 68 a7 24 12 00 push $0x1224a7 10faf5: e8 1a 9f ff ff call 109a14 10fafa: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fafd: ff 75 e4 pushl -0x1c(%ebp) 10fb00: 9d popf } 10fb01: 8d 65 f4 lea -0xc(%ebp),%esp 10fb04: 5b pop %ebx 10fb05: 5e pop %esi 10fb06: 5f pop %edi 10fb07: c9 leave 10fb08: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fb09: 83 ec 0c sub $0xc,%esp 10fb0c: 68 b6 24 12 00 push $0x1224b6 10fb11: e8 fe 9e ff ff call 109a14 10fb16: 83 c4 10 add $0x10,%esp 10fb19: eb e2 jmp 10fafd <_Watchdog_Report_chain+0x51> =============================================================================== 0010e6fc <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e6fc: 55 push %ebp 10e6fd: 89 e5 mov %esp,%ebp 10e6ff: 57 push %edi 10e700: 56 push %esi 10e701: 53 push %ebx 10e702: 83 ec 1c sub $0x1c,%esp 10e705: 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 ); 10e708: 9c pushf 10e709: fa cli 10e70a: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e70b: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e70d: 8d 47 04 lea 0x4(%edi),%eax 10e710: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e713: 39 c3 cmp %eax,%ebx 10e715: 74 11 je 10e728 <_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) { 10e717: 8b 43 10 mov 0x10(%ebx),%eax 10e71a: 85 c0 test %eax,%eax 10e71c: 74 34 je 10e752 <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e71e: 48 dec %eax 10e71f: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e722: 85 c0 test %eax,%eax 10e724: 74 2c je 10e752 <_Watchdog_Tickle+0x56> 10e726: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e728: 56 push %esi 10e729: 9d popf } 10e72a: 8d 65 f4 lea -0xc(%ebp),%esp 10e72d: 5b pop %ebx 10e72e: 5e pop %esi 10e72f: 5f pop %edi 10e730: c9 leave 10e731: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e732: 83 ec 08 sub $0x8,%esp 10e735: ff 73 24 pushl 0x24(%ebx) 10e738: ff 73 20 pushl 0x20(%ebx) 10e73b: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e73e: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e741: 9c pushf 10e742: fa cli 10e743: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e744: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e746: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e749: 74 dd je 10e728 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e74b: 8b 43 10 mov 0x10(%ebx),%eax 10e74e: 85 c0 test %eax,%eax 10e750: 75 d6 jne 10e728 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e752: 83 ec 0c sub $0xc,%esp 10e755: 53 push %ebx 10e756: e8 35 ff ff ff call 10e690 <_Watchdog_Remove> _ISR_Enable( level ); 10e75b: 56 push %esi 10e75c: 9d popf switch( watchdog_state ) { 10e75d: 83 c4 10 add $0x10,%esp 10e760: 83 f8 02 cmp $0x2,%eax 10e763: 75 dc jne 10e741 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e765: eb cb jmp 10e732 <_Watchdog_Tickle+0x36> =============================================================================== 0010e768 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e768: 55 push %ebp 10e769: 89 e5 mov %esp,%ebp 10e76b: 57 push %edi 10e76c: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e76d: 8b 1d c0 22 12 00 mov 0x1222c0,%ebx uintptr_t size = Configuration.work_space_size; 10e773: 8b 15 c4 22 12 00 mov 0x1222c4,%edx if ( Configuration.do_zero_of_workspace ) 10e779: 80 3d e8 22 12 00 00 cmpb $0x0,0x1222e8 10e780: 75 1e jne 10e7a0 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e782: 6a 04 push $0x4 10e784: 52 push %edx 10e785: 53 push %ebx 10e786: 68 00 64 12 00 push $0x126400 10e78b: e8 0c de ff ff call 10c59c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e790: 83 c4 10 add $0x10,%esp 10e793: 85 c0 test %eax,%eax 10e795: 74 13 je 10e7aa <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e797: 8d 65 f8 lea -0x8(%ebp),%esp 10e79a: 5b pop %ebx 10e79b: 5f pop %edi 10e79c: c9 leave 10e79d: c3 ret 10e79e: 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 ); 10e7a0: 31 c0 xor %eax,%eax 10e7a2: 89 df mov %ebx,%edi 10e7a4: 89 d1 mov %edx,%ecx 10e7a6: f3 aa rep stos %al,%es:(%edi) 10e7a8: eb d8 jmp 10e782 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e7aa: 50 push %eax 10e7ab: 6a 02 push $0x2 10e7ad: 6a 01 push $0x1 10e7af: 6a 00 push $0x0 10e7b1: e8 e2 e0 ff ff call 10c898 <_Internal_error_Occurred> =============================================================================== 00123184 <__kill>: #endif int __kill( pid_t pid, int sig ) { 123184: 55 push %ebp <== NOT EXECUTED 123185: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 123187: 31 c0 xor %eax,%eax <== NOT EXECUTED 123189: c9 leave <== NOT EXECUTED 12318a: c3 ret <== NOT EXECUTED =============================================================================== 0011dcc0 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 11dcc0: 55 push %ebp 11dcc1: 89 e5 mov %esp,%ebp 11dcc3: 83 ec 08 sub $0x8,%esp /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11dcc6: e8 82 06 00 00 call 11e34d <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 11dccb: e8 88 ff ff ff call 11dc58 rtems_shutdown_executive(status); 11dcd0: 83 ec 0c sub $0xc,%esp 11dcd3: ff 75 08 pushl 0x8(%ebp) 11dcd6: e8 ed 00 00 00 call 11ddc8 11dcdb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11dcde: eb fe jmp 11dcde <_exit+0x1e> <== NOT EXECUTED =============================================================================== 00108120 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 108120: 55 push %ebp <== NOT EXECUTED 108121: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108123: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 108126: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 108127: e9 80 ff ff ff jmp 1080ac <== NOT EXECUTED =============================================================================== 0010b31c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10b31c: 55 push %ebp <== NOT EXECUTED 10b31d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b31f: 57 push %edi <== NOT EXECUTED 10b320: 56 push %esi <== NOT EXECUTED 10b321: 53 push %ebx <== NOT EXECUTED 10b322: 83 ec 78 sub $0x78,%esp <== NOT EXECUTED 10b325: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10b328: 53 push %ebx <== NOT EXECUTED 10b329: e8 1e ec ff ff call 109f4c <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 10b32e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b331: 85 c0 test %eax,%eax <== NOT EXECUTED 10b333: 0f 85 57 01 00 00 jne 10b490 <_rename_r+0x174> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10b339: 52 push %edx <== NOT EXECUTED 10b33a: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10b33d: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED 10b340: 50 push %eax <== NOT EXECUTED 10b341: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10b344: 50 push %eax <== NOT EXECUTED 10b345: 53 push %ebx <== NOT EXECUTED 10b346: e8 e1 03 00 00 call 10b72c <== NOT EXECUTED 10b34b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b34e: 31 d2 xor %edx,%edx <== NOT EXECUTED 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; 10b350: c6 45 93 00 movb $0x0,-0x6d(%ebp) <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10b354: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED 10b357: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 10b35c: 8b 75 94 mov -0x6c(%ebp),%esi <== NOT EXECUTED 10b35f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 10b361: 01 d3 add %edx,%ebx <== NOT EXECUTED 10b363: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10b366: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 10b36b: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10b36d: 89 df mov %ebx,%edi <== NOT EXECUTED 10b36f: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b371: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10b373: f7 d1 not %ecx <== NOT EXECUTED 10b375: 49 dec %ecx <== NOT EXECUTED 10b376: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b379: 51 push %ecx <== NOT EXECUTED 10b37a: 53 push %ebx <== NOT EXECUTED 10b37b: e8 10 ec ff ff call 109f90 <== NOT EXECUTED 10b380: 01 c3 add %eax,%ebx <== NOT EXECUTED 10b382: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10b385: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10b387: 89 df mov %ebx,%edi <== NOT EXECUTED 10b389: 31 c0 xor %eax,%eax <== NOT EXECUTED 10b38b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10b38d: f7 d1 not %ecx <== NOT EXECUTED 10b38f: 49 dec %ecx <== NOT EXECUTED 10b390: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 10b397: 8d 75 cc lea -0x34(%ebp),%esi <== NOT EXECUTED 10b39a: 56 push %esi <== NOT EXECUTED 10b39b: 6a 00 push $0x0 <== NOT EXECUTED 10b39d: 51 push %ecx <== NOT EXECUTED 10b39e: 53 push %ebx <== NOT EXECUTED 10b39f: e8 a0 ea ff ff call 109e44 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 10b3a4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b3a7: 85 c0 test %eax,%eax <== NOT EXECUTED 10b3a9: 0f 85 c9 00 00 00 jne 10b478 <_rename_r+0x15c> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10b3af: 50 push %eax <== NOT EXECUTED 10b3b0: 8d 5d a4 lea -0x5c(%ebp),%ebx <== NOT EXECUTED 10b3b3: 53 push %ebx <== NOT EXECUTED 10b3b4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10b3b7: 50 push %eax <== NOT EXECUTED 10b3b8: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10b3bb: e8 6c 03 00 00 call 10b72c <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10b3c0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b3c3: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 10b3c6: 50 push %eax <== NOT EXECUTED 10b3c7: 53 push %ebx <== NOT EXECUTED 10b3c8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10b3cb: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 10b3ce: 50 push %eax <== NOT EXECUTED 10b3cf: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 10b3d2: ff 50 04 call *0x4(%eax) <== NOT EXECUTED if ( result != 0 ) { 10b3d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b3d8: 85 c0 test %eax,%eax <== NOT EXECUTED 10b3da: 0f 85 e0 00 00 00 jne 10b4c0 <_rename_r+0x1a4> <== NOT EXECUTED /* * 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 ) { 10b3e0: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 10b3e3: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED 10b3e6: 75 48 jne 10b430 <_rename_r+0x114> <== NOT EXECUTED 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 ); 10b3e8: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10b3eb: 53 push %ebx <== NOT EXECUTED 10b3ec: 56 push %esi <== NOT EXECUTED 10b3ed: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10b3f0: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 10b3f3: ff 50 40 call *0x40(%eax) <== NOT EXECUTED 10b3f6: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 10b3f8: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10b3fb: e8 e0 eb ff ff call 109fe0 <== NOT EXECUTED if ( free_old_parentloc ) 10b400: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b403: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED 10b407: 75 17 jne 10b420 <_rename_r+0x104> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 10b409: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b40c: 56 push %esi <== NOT EXECUTED 10b40d: e8 ce eb ff ff call 109fe0 <== NOT EXECUTED return result; 10b412: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b415: 89 f8 mov %edi,%eax <== NOT EXECUTED 10b417: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b41a: 5b pop %ebx <== NOT EXECUTED 10b41b: 5e pop %esi <== NOT EXECUTED 10b41c: 5f pop %edi <== NOT EXECUTED 10b41d: c9 leave <== NOT EXECUTED 10b41e: c3 ret <== NOT EXECUTED 10b41f: 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 ); 10b420: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b423: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10b426: e8 b5 eb ff ff call 109fe0 <== NOT EXECUTED 10b42b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b42e: eb d9 jmp 10b409 <_rename_r+0xed> <== NOT EXECUTED * 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 ); 10b430: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b433: 53 push %ebx <== NOT EXECUTED 10b434: e8 a7 eb ff ff call 109fe0 <== NOT EXECUTED if ( free_old_parentloc ) 10b439: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b43c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED 10b440: 74 0e je 10b450 <_rename_r+0x134> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10b442: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b445: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10b448: e8 93 eb ff ff call 109fe0 <== NOT EXECUTED 10b44d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 10b450: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b453: 56 push %esi <== NOT EXECUTED 10b454: e8 87 eb ff ff call 109fe0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 10b459: e8 ba 9a 00 00 call 114f18 <__errno> <== NOT EXECUTED 10b45e: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 10b464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b467: 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; } 10b46c: 89 f8 mov %edi,%eax <== NOT EXECUTED 10b46e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b471: 5b pop %ebx <== NOT EXECUTED 10b472: 5e pop %esi <== NOT EXECUTED 10b473: 5f pop %edi <== NOT EXECUTED 10b474: c9 leave <== NOT EXECUTED 10b475: c3 ret <== NOT EXECUTED 10b476: 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 ) 10b478: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED 10b47c: 75 78 jne 10b4f6 <_rename_r+0x1da> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); return -1; 10b47e: 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; } 10b483: 89 f8 mov %edi,%eax <== NOT EXECUTED 10b485: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b488: 5b pop %ebx <== NOT EXECUTED 10b489: 5e pop %esi <== NOT EXECUTED 10b48a: 5f pop %edi <== NOT EXECUTED 10b48b: c9 leave <== NOT EXECUTED 10b48c: c3 ret <== NOT EXECUTED 10b48d: 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, 10b490: 89 c2 mov %eax,%edx <== NOT EXECUTED 10b492: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b495: 6a 00 push $0x0 <== NOT EXECUTED 10b497: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10b49a: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED 10b49d: 50 push %eax <== NOT EXECUTED 10b49e: 6a 02 push $0x2 <== NOT EXECUTED 10b4a0: 52 push %edx <== NOT EXECUTED 10b4a1: 53 push %ebx <== NOT EXECUTED 10b4a2: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED 10b4a5: e8 32 ea ff ff call 109edc <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10b4aa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b4ad: 85 c0 test %eax,%eax <== NOT EXECUTED 10b4af: 8b 55 8c mov -0x74(%ebp),%edx <== NOT EXECUTED 10b4b2: 75 ca jne 10b47e <_rename_r+0x162> <== NOT EXECUTED return -1; free_old_parentloc = true; 10b4b4: c6 45 93 01 movb $0x1,-0x6d(%ebp) <== NOT EXECUTED 10b4b8: e9 97 fe ff ff jmp 10b354 <_rename_r+0x38> <== NOT EXECUTED 10b4bd: 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 ); 10b4c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b4c3: 53 push %ebx <== NOT EXECUTED 10b4c4: e8 17 eb ff ff call 109fe0 <== NOT EXECUTED if ( free_old_parentloc ) 10b4c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b4cc: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED 10b4d0: 74 0e je 10b4e0 <_rename_r+0x1c4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10b4d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b4d5: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10b4d8: e8 03 eb ff ff call 109fe0 <== NOT EXECUTED 10b4dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 10b4e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b4e3: 56 push %esi <== NOT EXECUTED 10b4e4: e8 f7 ea ff ff call 109fe0 <== NOT EXECUTED return -1; 10b4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b4ec: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10b4f1: e9 1f ff ff ff jmp 10b415 <_rename_r+0xf9> <== NOT EXECUTED 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 ); 10b4f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b4f9: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10b4fc: e8 df ea ff ff call 109fe0 <== NOT EXECUTED 10b501: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 10b504: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 10b509: e9 07 ff ff ff jmp 10b415 <_rename_r+0xf9> <== NOT EXECUTED =============================================================================== 0010adf4 <_times>: #endif clock_t _times( struct tms *ptms ) { 10adf4: 55 push %ebp 10adf5: 89 e5 mov %esp,%ebp 10adf7: 56 push %esi 10adf8: 53 push %ebx 10adf9: 83 ec 10 sub $0x10,%esp 10adfc: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_interval ticks; if ( !ptms ) 10adff: 85 db test %ebx,%ebx 10ae01: 74 75 je 10ae78 <_times+0x84> /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 10ae03: e8 88 04 00 00 call 10b290 10ae08: 89 c6 mov %eax,%esi { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 10ae0a: 8b 0d 2c 26 12 00 mov 0x12262c,%ecx 10ae10: ba 83 de 1b 43 mov $0x431bde83,%edx 10ae15: 89 c8 mov %ecx,%eax 10ae17: f7 e2 mul %edx 10ae19: c1 ea 12 shr $0x12,%edx 10ae1c: 89 55 e8 mov %edx,-0x18(%ebp) 10ae1f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10ae22: 8d 04 80 lea (%eax,%eax,4),%eax 10ae25: 8d 04 80 lea (%eax,%eax,4),%eax 10ae28: c1 e0 03 shl $0x3,%eax 10ae2b: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10ae30: 31 d2 xor %edx,%edx 10ae32: f7 f1 div %ecx 10ae34: 89 55 ec mov %edx,-0x14(%ebp) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 10ae37: 8d 45 f0 lea -0x10(%ebp),%eax 10ae3a: 50 push %eax 10ae3b: 8d 45 f4 lea -0xc(%ebp),%eax 10ae3e: 50 push %eax 10ae3f: 8d 45 e8 lea -0x18(%ebp),%eax 10ae42: 50 push %eax 10ae43: a1 d8 69 12 00 mov 0x1269d8,%eax 10ae48: 05 84 00 00 00 add $0x84,%eax 10ae4d: 50 push %eax 10ae4e: e8 3d 36 00 00 call 10e490 <_Timespec_Divide> &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 10ae53: 8b 45 f4 mov -0xc(%ebp),%eax 10ae56: 89 03 mov %eax,(%ebx) } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 10ae58: 89 73 04 mov %esi,0x4(%ebx) ptms->tms_cutime = 0; 10ae5b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) ptms->tms_cstime = 0; 10ae62: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return ticks; 10ae69: 83 c4 10 add $0x10,%esp } 10ae6c: 89 f0 mov %esi,%eax 10ae6e: 8d 65 f8 lea -0x8(%ebp),%esp 10ae71: 5b pop %ebx 10ae72: 5e pop %esi 10ae73: c9 leave 10ae74: c3 ret 10ae75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 10ae78: e8 4b 78 00 00 call 1126c8 <__errno> 10ae7d: c7 00 0e 00 00 00 movl $0xe,(%eax) 10ae83: be ff ff ff ff mov $0xffffffff,%esi ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 10ae88: 89 f0 mov %esi,%eax 10ae8a: 8d 65 f8 lea -0x8(%ebp),%esp 10ae8d: 5b pop %ebx 10ae8e: 5e pop %esi 10ae8f: c9 leave 10ae90: c3 ret =============================================================================== 0010bd6c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 10bd6c: 55 push %ebp <== NOT EXECUTED 10bd6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bd6f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 10bd72: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10bd75: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10bd78: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 10bd79: e9 82 fe ff ff jmp 10bc00 <== NOT EXECUTED =============================================================================== 001099ec : int access( const char *path, int amode ) { 1099ec: 55 push %ebp 1099ed: 89 e5 mov %esp,%ebp 1099ef: 53 push %ebx 1099f0: 83 ec 5c sub $0x5c,%esp 1099f3: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 1099f6: 8d 45 b0 lea -0x50(%ebp),%eax 1099f9: 50 push %eax 1099fa: ff 75 08 pushl 0x8(%ebp) 1099fd: e8 ae 17 00 00 call 10b1b0 109a02: 83 c4 10 add $0x10,%esp 109a05: 85 c0 test %eax,%eax 109a07: 75 1f jne 109a28 return -1; if ( amode & R_OK ) { 109a09: f6 c3 04 test $0x4,%bl 109a0c: 75 26 jne 109a34 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 109a0e: f6 c3 02 test $0x2,%bl 109a11: 75 0d jne 109a20 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 109a13: 83 e3 01 and $0x1,%ebx 109a16: 75 24 jne 109a3c if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; 109a18: 31 c0 xor %eax,%eax } 109a1a: 8b 5d fc mov -0x4(%ebp),%ebx 109a1d: c9 leave 109a1e: c3 ret 109a1f: 90 nop <== NOT EXECUTED if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 109a20: f6 45 bc 80 testb $0x80,-0x44(%ebp) 109a24: 75 ed jne 109a13 109a26: 66 90 xchg %ax,%ax return -1; 109a28: b8 ff ff ff ff mov $0xffffffff,%eax if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 109a2d: 8b 5d fc mov -0x4(%ebp),%ebx 109a30: c9 leave 109a31: c3 ret 109a32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 109a34: f6 45 bd 01 testb $0x1,-0x43(%ebp) 109a38: 75 d4 jne 109a0e 109a3a: eb ec jmp 109a28 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109a3c: 8b 45 bc mov -0x44(%ebp),%eax 109a3f: 83 e0 40 and $0x40,%eax return -1; } return 0; 109a42: 83 f8 01 cmp $0x1,%eax 109a45: 19 c0 sbb %eax,%eax 109a47: eb d1 jmp 109a1a =============================================================================== 00108f50 : #include speed_t cfgetispeed( const struct termios *tp ) { 108f50: 55 push %ebp <== NOT EXECUTED 108f51: 89 e5 mov %esp,%ebp <== NOT EXECUTED return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 108f53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108f56: 0f b7 40 0a movzwl 0xa(%eax),%eax <== NOT EXECUTED 108f5a: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED } 108f5f: c9 leave <== NOT EXECUTED 108f60: c3 ret <== NOT EXECUTED =============================================================================== 00108f64 : #include speed_t cfgetospeed( const struct termios *tp ) { 108f64: 55 push %ebp <== NOT EXECUTED 108f65: 89 e5 mov %esp,%ebp <== NOT EXECUTED return tp->c_cflag & CBAUD; 108f67: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 108f6a: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED 108f6d: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED } 108f72: c9 leave <== NOT EXECUTED 108f73: c3 ret <== NOT EXECUTED =============================================================================== 00108f74 : int cfsetispeed( struct termios *tp, speed_t speed ) { 108f74: 55 push %ebp <== NOT EXECUTED 108f75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f77: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108f7a: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108f7d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED if ( speed & ~CBAUD ) 108f80: a9 f0 ef ff ff test $0xffffeff0,%eax <== NOT EXECUTED 108f85: 75 15 jne 108f9c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 108f87: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED 108f8a: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 108f8d: 81 e2 ff ff f0 ef and $0xeff0ffff,%edx <== NOT EXECUTED 108f93: 09 d0 or %edx,%eax <== NOT EXECUTED 108f95: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED return 0; 108f98: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108f9a: c9 leave <== NOT EXECUTED 108f9b: c3 ret <== NOT EXECUTED struct termios *tp, speed_t speed ) { if ( speed & ~CBAUD ) rtems_set_errno_and_return_minus_one( EINVAL ); 108f9c: e8 bb ad 00 00 call 113d5c <__errno> <== NOT EXECUTED 108fa1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108fa7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); return 0; } 108fac: c9 leave <== NOT EXECUTED 108fad: c3 ret <== NOT EXECUTED =============================================================================== 00108fb0 : int cfsetospeed( struct termios *tp, speed_t speed ) { 108fb0: 55 push %ebp <== NOT EXECUTED 108fb1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108fb3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108fb6: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108fb9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED if ( speed & ~CBAUD ) 108fbc: f7 c2 f0 ef ff ff test $0xffffeff0,%edx <== NOT EXECUTED 108fc2: 75 14 jne 108fd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 108fc4: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED 108fc7: 25 f0 ef ff ff and $0xffffeff0,%eax <== NOT EXECUTED 108fcc: 09 d0 or %edx,%eax <== NOT EXECUTED 108fce: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED return 0; 108fd1: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108fd3: c9 leave <== NOT EXECUTED 108fd4: c3 ret <== NOT EXECUTED 108fd5: 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 ); 108fd8: e8 7f ad 00 00 call 113d5c <__errno> <== NOT EXECUTED 108fdd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108fe3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; return 0; } 108fe8: c9 leave <== NOT EXECUTED 108fe9: c3 ret <== NOT EXECUTED =============================================================================== 001104a8 : #include int chdir( const char *pathname ) { 1104a8: 55 push %ebp 1104a9: 89 e5 mov %esp,%ebp 1104ab: 57 push %edi 1104ac: 56 push %esi 1104ad: 83 ec 20 sub $0x20,%esp 1104b0: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 1104b3: 85 d2 test %edx,%edx 1104b5: 74 75 je 11052c rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1104b7: 31 c0 xor %eax,%eax 1104b9: b9 ff ff ff ff mov $0xffffffff,%ecx 1104be: 89 d7 mov %edx,%edi 1104c0: f2 ae repnz scas %es:(%edi),%al 1104c2: f7 d1 not %ecx 1104c4: 49 dec %ecx 1104c5: 83 ec 0c sub $0xc,%esp 1104c8: 6a 01 push $0x1 1104ca: 8d 75 e4 lea -0x1c(%ebp),%esi 1104cd: 56 push %esi 1104ce: 6a 01 push $0x1 1104d0: 51 push %ecx 1104d1: 52 push %edx 1104d2: e8 91 7d ff ff call 108268 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1104d7: 83 c4 20 add $0x20,%esp 1104da: 85 c0 test %eax,%eax 1104dc: 74 0e je 1104ec return -1; 1104de: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 1104e3: 8d 65 f8 lea -0x8(%ebp),%esp 1104e6: 5e pop %esi 1104e7: 5f pop %edi 1104e8: c9 leave 1104e9: c3 ret 1104ea: 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 ) { 1104ec: 83 ec 0c sub $0xc,%esp 1104ef: 56 push %esi 1104f0: 8b 45 f0 mov -0x10(%ebp),%eax 1104f3: ff 50 10 call *0x10(%eax) 1104f6: 83 c4 10 add $0x10,%esp 1104f9: 48 dec %eax 1104fa: 75 48 jne 110544 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 1104fc: 83 ec 0c sub $0xc,%esp 1104ff: a1 24 40 12 00 mov 0x124024,%eax 110504: 83 c0 04 add $0x4,%eax 110507: 50 push %eax 110508: e8 5f 7e ff ff call 10836c rtems_filesystem_current = loc; 11050d: 8b 3d 24 40 12 00 mov 0x124024,%edi 110513: 83 c7 04 add $0x4,%edi 110516: b9 05 00 00 00 mov $0x5,%ecx 11051b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 11051d: 83 c4 10 add $0x10,%esp 110520: 31 c0 xor %eax,%eax } 110522: 8d 65 f8 lea -0x8(%ebp),%esp 110525: 5e pop %esi 110526: 5f pop %edi 110527: c9 leave 110528: c3 ret 110529: 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 ); 11052c: e8 b3 26 00 00 call 112be4 <__errno> 110531: c7 00 0e 00 00 00 movl $0xe,(%eax) 110537: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 11053c: 8d 65 f8 lea -0x8(%ebp),%esp 11053f: 5e pop %esi 110540: 5f pop %edi 110541: c9 leave 110542: c3 ret 110543: 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 ); 110544: 83 ec 0c sub $0xc,%esp 110547: 56 push %esi 110548: e8 1f 7e ff ff call 10836c rtems_set_errno_and_return_minus_one( ENOTDIR ); 11054d: e8 92 26 00 00 call 112be4 <__errno> 110552: c7 00 14 00 00 00 movl $0x14,(%eax) 110558: 83 c4 10 add $0x10,%esp 11055b: b8 ff ff ff ff mov $0xffffffff,%eax 110560: eb 81 jmp 1104e3 =============================================================================== 00109c6c : int chmod( const char *path, mode_t mode ) { 109c6c: 55 push %ebp 109c6d: 89 e5 mov %esp,%ebp 109c6f: 57 push %edi 109c70: 53 push %ebx 109c71: 83 ec 3c sub $0x3c,%esp 109c74: 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 ); 109c77: 31 c0 xor %eax,%eax 109c79: b9 ff ff ff ff mov $0xffffffff,%ecx 109c7e: 89 d7 mov %edx,%edi 109c80: f2 ae repnz scas %es:(%edi),%al 109c82: f7 d1 not %ecx 109c84: 49 dec %ecx 109c85: 6a 01 push $0x1 109c87: 8d 5d e4 lea -0x1c(%ebp),%ebx 109c8a: 53 push %ebx 109c8b: 6a 00 push $0x0 109c8d: 51 push %ecx 109c8e: 52 push %edx 109c8f: e8 60 01 00 00 call 109df4 if ( status != 0 ) 109c94: 83 c4 20 add $0x20,%esp 109c97: 85 c0 test %eax,%eax 109c99: 74 0d je 109ca8 return -1; 109c9b: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 109ca0: 8d 65 f8 lea -0x8(%ebp),%esp 109ca3: 5b pop %ebx 109ca4: 5f pop %edi 109ca5: c9 leave 109ca6: c3 ret 109ca7: 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 ); 109ca8: 83 ec 08 sub $0x8,%esp 109cab: ff 75 0c pushl 0xc(%ebp) 109cae: 53 push %ebx 109caf: 8b 45 ec mov -0x14(%ebp),%eax 109cb2: ff 50 1c call *0x1c(%eax) rtems_filesystem_freenode( &loc ); 109cb5: 89 1c 24 mov %ebx,(%esp) 109cb8: 89 45 d4 mov %eax,-0x2c(%ebp) 109cbb: e8 38 02 00 00 call 109ef8 return result; 109cc0: 83 c4 10 add $0x10,%esp 109cc3: 8b 45 d4 mov -0x2c(%ebp),%eax } 109cc6: 8d 65 f8 lea -0x8(%ebp),%esp 109cc9: 5b pop %ebx 109cca: 5f pop %edi 109ccb: c9 leave 109ccc: c3 ret =============================================================================== 001080a0 : #include int chroot( const char *pathname ) { 1080a0: 55 push %ebp 1080a1: 89 e5 mov %esp,%ebp 1080a3: 57 push %edi 1080a4: 56 push %esi 1080a5: 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) { 1080a8: 81 3d 24 40 12 00 20 cmpl $0x126220,0x124024 1080af: 62 12 00 1080b2: 74 60 je 108114 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 1080b4: 83 ec 0c sub $0xc,%esp 1080b7: ff 75 08 pushl 0x8(%ebp) 1080ba: e8 e9 83 00 00 call 1104a8 if (result) { 1080bf: 83 c4 10 add $0x10,%esp 1080c2: 85 c0 test %eax,%eax 1080c4: 75 72 jne 108138 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1080c6: 83 ec 0c sub $0xc,%esp 1080c9: 6a 00 push $0x0 1080cb: 8d 75 e4 lea -0x1c(%ebp),%esi 1080ce: 56 push %esi 1080cf: 6a 00 push $0x0 1080d1: 6a 01 push $0x1 1080d3: 68 76 0a 12 00 push $0x120a76 1080d8: e8 8b 01 00 00 call 108268 1080dd: 83 c4 20 add $0x20,%esp 1080e0: 85 c0 test %eax,%eax 1080e2: 75 54 jne 108138 <== 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); 1080e4: 83 ec 0c sub $0xc,%esp 1080e7: a1 24 40 12 00 mov 0x124024,%eax 1080ec: 83 c0 18 add $0x18,%eax 1080ef: 50 push %eax 1080f0: e8 77 02 00 00 call 10836c rtems_filesystem_root = loc; 1080f5: 8b 3d 24 40 12 00 mov 0x124024,%edi 1080fb: 83 c7 18 add $0x18,%edi 1080fe: b9 05 00 00 00 mov $0x5,%ecx 108103: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 108105: 83 c4 10 add $0x10,%esp 108108: 31 c0 xor %eax,%eax } 10810a: 8d 65 f8 lea -0x8(%ebp),%esp 10810d: 5e pop %esi 10810e: 5f pop %edi 10810f: c9 leave 108110: c3 ret 108111: 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*/ 108114: e8 f7 12 00 00 call 109410 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 108119: 81 3d 24 40 12 00 20 cmpl $0x126220,0x124024 108120: 62 12 00 108123: 75 8f jne 1080b4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108125: e8 ba aa 00 00 call 112be4 <__errno> <== NOT EXECUTED 10812a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108130: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108133: eb d5 jmp 10810a <== NOT EXECUTED 108135: 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 ); 108138: e8 a7 aa 00 00 call 112be4 <__errno> <== NOT EXECUTED 10813d: 89 c6 mov %eax,%esi <== NOT EXECUTED 10813f: e8 a0 aa 00 00 call 112be4 <__errno> <== NOT EXECUTED 108144: 8b 00 mov (%eax),%eax <== NOT EXECUTED 108146: 89 06 mov %eax,(%esi) <== NOT EXECUTED 108148: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10814d: eb bb jmp 10810a <== NOT EXECUTED =============================================================================== 0010f9a0 : #include int close( int fd ) { 10f9a0: 55 push %ebp 10f9a1: 89 e5 mov %esp,%ebp 10f9a3: 53 push %ebx 10f9a4: 83 ec 14 sub $0x14,%esp 10f9a7: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10f9aa: 3b 05 ec 21 12 00 cmp 0x1221ec,%eax 10f9b0: 73 46 jae 10f9f8 iop = rtems_libio_iop(fd); 10f9b2: c1 e0 03 shl $0x3,%eax 10f9b5: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10f9bc: 29 c3 sub %eax,%ebx 10f9be: 03 1d 60 62 12 00 add 0x126260,%ebx rtems_libio_check_is_open(iop); 10f9c4: f6 43 15 01 testb $0x1,0x15(%ebx) 10f9c8: 74 2e je 10f9f8 rc = RTEMS_SUCCESSFUL; rc = (*iop->pathinfo.handlers->close_h)( iop ); 10f9ca: 83 ec 0c sub $0xc,%esp 10f9cd: 8b 43 20 mov 0x20(%ebx),%eax 10f9d0: 53 push %ebx 10f9d1: ff 50 04 call *0x4(%eax) rtems_filesystem_freenode( &iop->pathinfo ); 10f9d4: 8d 53 18 lea 0x18(%ebx),%edx 10f9d7: 89 14 24 mov %edx,(%esp) 10f9da: 89 45 f4 mov %eax,-0xc(%ebp) 10f9dd: e8 3a 86 ff ff call 10801c rtems_libio_free( iop ); 10f9e2: 89 1c 24 mov %ebx,(%esp) 10f9e5: e8 06 02 00 00 call 10fbf0 return rc; 10f9ea: 83 c4 10 add $0x10,%esp 10f9ed: 8b 45 f4 mov -0xc(%ebp),%eax } 10f9f0: 8b 5d fc mov -0x4(%ebp),%ebx 10f9f3: c9 leave 10f9f4: c3 ret 10f9f5: 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); 10f9f8: e8 eb 29 00 00 call 1123e8 <__errno> 10f9fd: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa03: b8 ff ff ff ff mov $0xffffffff,%eax 10fa08: eb e6 jmp 10f9f0 =============================================================================== 00108118 : static char *ctermid_name = "/dev/console"; char *ctermid( char *s ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 57 push %edi 10811c: 56 push %esi 10811d: 8b 45 08 mov 0x8(%ebp),%eax if ( !s ) 108120: 85 c0 test %eax,%eax 108122: 74 14 je 108138 return ctermid_name; strcpy( s, ctermid_name ); 108124: be 03 c9 11 00 mov $0x11c903,%esi 108129: b9 0d 00 00 00 mov $0xd,%ecx 10812e: 89 c7 mov %eax,%edi 108130: f3 a4 rep movsb %ds:(%esi),%es:(%edi) return s; } 108132: 5e pop %esi 108133: 5f pop %edi 108134: c9 leave 108135: c3 ret 108136: 66 90 xchg %ax,%ax <== NOT EXECUTED char *ctermid( char *s ) { if ( !s ) return ctermid_name; 108138: b8 03 c9 11 00 mov $0x11c903,%eax strcpy( s, ctermid_name ); return s; } 10813d: 5e pop %esi 10813e: 5f pop %edi 10813f: c9 leave 108140: c3 ret =============================================================================== 0010eca8 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10eca8: 55 push %ebp 10eca9: 89 e5 mov %esp,%ebp 10ecab: 57 push %edi 10ecac: 56 push %esi 10ecad: 53 push %ebx 10ecae: 83 ec 1c sub $0x1c,%esp assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10ecb1: 8b 45 14 mov 0x14(%ebp),%eax 10ecb4: 8b 00 mov (%eax),%eax 10ecb6: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10ecb9: 85 c0 test %eax,%eax 10ecbb: 0f 84 87 00 00 00 je 10ed48 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10ecc1: 8b 15 50 f1 11 00 mov 0x11f150,%edx 10ecc7: 89 55 e0 mov %edx,-0x20(%ebp) 10ecca: 85 d2 test %edx,%edx 10eccc: 74 38 je 10ed06 <== NEVER TAKEN 10ecce: 31 c0 xor %eax,%eax 10ecd0: 31 db xor %ebx,%ebx if (!device_name_table[i].device_name) 10ecd2: 8d 04 80 lea (%eax,%eax,4),%eax 10ecd5: 8b 55 e4 mov -0x1c(%ebp),%edx 10ecd8: 8d 3c 82 lea (%edx,%eax,4),%edi 10ecdb: 8b 37 mov (%edi),%esi 10ecdd: 85 f6 test %esi,%esi 10ecdf: 74 1d je 10ecfe continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10ece1: 50 push %eax 10ece2: ff 75 0c pushl 0xc(%ebp) 10ece5: 56 push %esi 10ece6: ff 75 08 pushl 0x8(%ebp) 10ece9: e8 0a 24 00 00 call 1110f8 10ecee: 83 c4 10 add $0x10,%esp 10ecf1: 85 c0 test %eax,%eax 10ecf3: 75 09 jne 10ecfe <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10ecf5: 8b 45 0c mov 0xc(%ebp),%eax 10ecf8: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10ecfc: 74 22 je 10ed20 <== 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++) { 10ecfe: 43 inc %ebx 10ecff: 89 d8 mov %ebx,%eax 10ed01: 39 5d e0 cmp %ebx,-0x20(%ebp) 10ed04: 77 cc ja 10ecd2 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10ed06: e8 69 18 00 00 call 110574 <__errno> 10ed0b: c7 00 02 00 00 00 movl $0x2,(%eax) 10ed11: b8 ff ff ff ff mov $0xffffffff,%eax } 10ed16: 8d 65 f4 lea -0xc(%ebp),%esp 10ed19: 5b pop %ebx 10ed1a: 5e pop %esi 10ed1b: 5f pop %edi 10ed1c: c9 leave 10ed1d: c3 ret 10ed1e: 66 90 xchg %ax,%ax <== 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]; 10ed20: 8b 55 14 mov 0x14(%ebp),%edx 10ed23: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10ed25: c7 42 08 80 10 12 00 movl $0x121080,0x8(%edx) pathloc->ops = &devFS_ops; 10ed2c: c7 42 0c 20 10 12 00 movl $0x121020,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10ed33: a1 d8 10 12 00 mov 0x1210d8,%eax 10ed38: 8b 40 28 mov 0x28(%eax),%eax 10ed3b: 89 42 10 mov %eax,0x10(%edx) return 0; 10ed3e: 31 c0 xor %eax,%eax } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10ed40: 8d 65 f4 lea -0xc(%ebp),%esp 10ed43: 5b pop %ebx 10ed44: 5e pop %esi 10ed45: 5f pop %edi 10ed46: c9 leave 10ed47: c3 ret } /* 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 ); 10ed48: e8 27 18 00 00 call 110574 <__errno> <== NOT EXECUTED 10ed4d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10ed53: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10ed56: eb e8 jmp 10ed40 <== NOT EXECUTED =============================================================================== 001077b0 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 1077b0: 55 push %ebp 1077b1: 89 e5 mov %esp,%ebp 1077b3: 57 push %edi 1077b4: 53 push %ebx 1077b5: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 1077b8: 83 ec 0c sub $0xc,%esp 1077bb: a1 50 f1 11 00 mov 0x11f150,%eax 1077c0: 8d 04 80 lea (%eax,%eax,4),%eax 1077c3: c1 e0 02 shl $0x2,%eax 1077c6: 50 push %eax 1077c7: e8 7c 6e 00 00 call 10e648 <_Workspace_Allocate> 1077cc: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 1077ce: 83 c4 10 add $0x10,%esp 1077d1: 85 c0 test %eax,%eax 1077d3: 74 2b je 107800 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 1077d5: a1 50 f1 11 00 mov 0x11f150,%eax 1077da: 8d 0c 80 lea (%eax,%eax,4),%ecx 1077dd: c1 e1 02 shl $0x2,%ecx 1077e0: 31 c0 xor %eax,%eax 1077e2: 89 d7 mov %edx,%edi 1077e4: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 1077e6: c7 43 24 80 10 12 00 movl $0x121080,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 1077ed: c7 43 28 20 10 12 00 movl $0x121020,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 1077f4: 89 53 1c mov %edx,0x1c(%ebx) return 0; 1077f7: 31 c0 xor %eax,%eax } 1077f9: 8d 65 f8 lea -0x8(%ebp),%esp 1077fc: 5b pop %ebx 1077fd: 5f pop %edi 1077fe: c9 leave 1077ff: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107800: e8 6f 8d 00 00 call 110574 <__errno> <== NOT EXECUTED 107805: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10780b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107810: eb e7 jmp 1077f9 <== NOT EXECUTED =============================================================================== 001079d0 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 1079d0: 55 push %ebp 1079d1: 89 e5 mov %esp,%ebp 1079d3: 83 ec 1c sub $0x1c,%esp 1079d6: 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; 1079d9: 8b 42 18 mov 0x18(%edx),%eax args.iop = iop; 1079dc: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 1079df: 8b 55 0c mov 0xc(%ebp),%edx 1079e2: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 1079e5: 8b 55 10 mov 0x10(%ebp),%edx 1079e8: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( np->major, np->minor, (void *) &args 1079eb: 8d 55 e8 lea -0x18(%ebp),%edx args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 1079ee: 52 push %edx 1079ef: ff 70 0c pushl 0xc(%eax) 1079f2: ff 70 08 pushl 0x8(%eax) 1079f5: e8 92 41 00 00 call 10bb8c np->major, np->minor, (void *) &args ); if ( status ) 1079fa: 83 c4 10 add $0x10,%esp 1079fd: 85 c0 test %eax,%eax 1079ff: 75 07 jne 107a08 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107a01: 8b 45 f4 mov -0xc(%ebp),%eax } 107a04: c9 leave 107a05: c3 ret 107a06: 66 90 xchg %ax,%ax <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107a08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a0b: 50 push %eax <== NOT EXECUTED 107a0c: e8 57 73 00 00 call 10ed68 <== NOT EXECUTED 107a11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107a14: c9 leave <== NOT EXECUTED 107a15: c3 ret <== NOT EXECUTED =============================================================================== 00107814 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107814: 55 push %ebp 107815: 89 e5 mov %esp,%ebp 107817: 57 push %edi 107818: 56 push %esi 107819: 53 push %ebx 10781a: 83 ec 1c sub $0x1c,%esp 10781d: 8b 7d 08 mov 0x8(%ebp),%edi 107820: 8b 4d 10 mov 0x10(%ebp),%ecx 107823: 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') && 107826: 80 3f 64 cmpb $0x64,(%edi) 107829: 0f 84 dd 00 00 00 je 10790c <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 10782f: 8b 45 0c mov 0xc(%ebp),%eax 107832: 25 00 f0 00 00 and $0xf000,%eax 107837: 3d 00 60 00 00 cmp $0x6000,%eax 10783c: 74 0b je 107849 <== NEVER TAKEN 10783e: 3d 00 20 00 00 cmp $0x2000,%eax 107843: 0f 85 e5 00 00 00 jne 10792e <== NEVER TAKEN dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107849: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 10784c: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10784f: 8b 45 18 mov 0x18(%ebp),%eax 107852: 8b 30 mov (%eax),%esi if (!device_name_table) 107854: 85 f6 test %esi,%esi 107856: 0f 84 f4 00 00 00 je 107950 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 10785c: 8b 15 50 f1 11 00 mov 0x11f150,%edx 107862: 85 d2 test %edx,%edx 107864: 0f 84 d6 00 00 00 je 107940 <== NEVER TAKEN 10786a: 31 c0 xor %eax,%eax 10786c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107873: 31 db xor %ebx,%ebx 107875: 89 7d e4 mov %edi,-0x1c(%ebp) 107878: 89 d7 mov %edx,%edi 10787a: eb 1a jmp 107896 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 10787c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10787f: 50 push %eax <== NOT EXECUTED 107880: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107883: e8 c8 97 00 00 call 111050 <== NOT EXECUTED 107888: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10788b: 85 c0 test %eax,%eax <== NOT EXECUTED 10788d: 74 65 je 1078f4 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 10788f: 43 inc %ebx <== NOT EXECUTED 107890: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107892: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107894: 73 16 jae 1078ac <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107896: 8d 04 80 lea (%eax,%eax,4),%eax 107899: 8b 04 86 mov (%esi,%eax,4),%eax 10789c: 85 c0 test %eax,%eax 10789e: 75 dc jne 10787c <== NEVER TAKEN 1078a0: 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++){ 1078a3: 43 inc %ebx 1078a4: 89 d8 mov %ebx,%eax 1078a6: 39 fb cmp %edi,%ebx 1078a8: 72 ec jb 107896 1078aa: 66 90 xchg %ax,%ax 1078ac: 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) 1078af: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 1078b3: 0f 84 87 00 00 00 je 107940 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 1078b9: 9c pushf 1078ba: fa cli 1078bb: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 1078bc: 8b 55 e0 mov -0x20(%ebp),%edx 1078bf: 8d 04 92 lea (%edx,%edx,4),%eax 1078c2: 8d 14 86 lea (%esi,%eax,4),%edx 1078c5: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 1078c7: 31 c0 xor %eax,%eax 1078c9: b9 ff ff ff ff mov $0xffffffff,%ecx 1078ce: f2 ae repnz scas %es:(%edi),%al 1078d0: f7 d1 not %ecx 1078d2: 49 dec %ecx 1078d3: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 1078d6: 8b 45 d8 mov -0x28(%ebp),%eax 1078d9: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 1078dc: 8b 45 dc mov -0x24(%ebp),%eax 1078df: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 1078e2: 8b 45 0c mov 0xc(%ebp),%eax 1078e5: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 1078e8: 53 push %ebx 1078e9: 9d popf return 0; 1078ea: 31 c0 xor %eax,%eax } 1078ec: 8d 65 f4 lea -0xc(%ebp),%esp 1078ef: 5b pop %ebx 1078f0: 5e pop %esi 1078f1: 5f pop %edi 1078f2: c9 leave 1078f3: 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 ); 1078f4: e8 7b 8c 00 00 call 110574 <__errno> <== NOT EXECUTED 1078f9: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 1078ff: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107904: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107907: 5b pop %ebx <== NOT EXECUTED 107908: 5e pop %esi <== NOT EXECUTED 107909: 5f pop %edi <== NOT EXECUTED 10790a: c9 leave <== NOT EXECUTED 10790b: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 10790c: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107910: 0f 85 19 ff ff ff jne 10782f <== NEVER TAKEN 107916: 80 7f 02 76 cmpb $0x76,0x2(%edi) 10791a: 0f 85 0f ff ff ff jne 10782f <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107920: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107924: 0f 85 05 ff ff ff jne 10782f return 0; 10792a: 31 c0 xor %eax,%eax 10792c: eb be jmp 1078ec /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 10792e: e8 41 8c 00 00 call 110574 <__errno> <== NOT EXECUTED 107933: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107939: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10793e: eb ac jmp 1078ec <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107940: e8 2f 8c 00 00 call 110574 <__errno> <== NOT EXECUTED 107945: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 10794b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10794e: eb 9c jmp 1078ec <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107950: e8 1f 8c 00 00 call 110574 <__errno> <== NOT EXECUTED 107955: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10795b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10795e: eb 8c jmp 1078ec <== NOT EXECUTED =============================================================================== 00107a4c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107a4c: 55 push %ebp <== NOT EXECUTED 107a4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107a4f: 53 push %ebx <== NOT EXECUTED 107a50: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107a53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 107a56: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED args.iop = iop; 107a59: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107a5c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107a5f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107a62: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107a65: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107a68: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107a6b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107a6e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107a71: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107a74: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107a77: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107a7a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( np->major, np->minor, (void *) &args 107a81: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 107a84: 50 push %eax <== NOT EXECUTED 107a85: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107a88: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107a8b: e8 44 42 00 00 call 10bcd4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107a90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107a93: 85 c0 test %eax,%eax <== NOT EXECUTED 107a95: 75 09 jne 107aa0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107a97: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107a9a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107a9d: c9 leave <== NOT EXECUTED 107a9e: c3 ret <== NOT EXECUTED 107a9f: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107aa0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107aa3: 50 push %eax <== NOT EXECUTED 107aa4: e8 bf 72 00 00 call 10ed68 <== NOT EXECUTED 107aa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107aac: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107aaf: c9 leave <== NOT EXECUTED 107ab0: c3 ret <== NOT EXECUTED =============================================================================== 00107ab4 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107ab4: 55 push %ebp 107ab5: 89 e5 mov %esp,%ebp 107ab7: 53 push %ebx 107ab8: 83 ec 04 sub $0x4,%esp 107abb: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107abe: 8b 45 08 mov 0x8(%ebp),%eax 107ac1: 8b 00 mov (%eax),%eax if (!the_dev) 107ac3: 85 c0 test %eax,%eax 107ac5: 74 18 je 107adf <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107ac7: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107aca: 8b 58 08 mov 0x8(%eax),%ebx 107acd: 89 5a 18 mov %ebx,0x18(%edx) 107ad0: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107ad3: 8b 40 10 mov 0x10(%eax),%eax 107ad6: 89 42 0c mov %eax,0xc(%edx) return 0; 107ad9: 31 c0 xor %eax,%eax } 107adb: 5a pop %edx 107adc: 5b pop %ebx 107add: c9 leave 107ade: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107adf: e8 90 8a 00 00 call 110574 <__errno> <== NOT EXECUTED 107ae4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107aea: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107aef: eb ea jmp 107adb <== NOT EXECUTED =============================================================================== 00107af4 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107af4: 55 push %ebp 107af5: 89 e5 mov %esp,%ebp 107af7: 53 push %ebx 107af8: 83 ec 28 sub $0x28,%esp 107afb: 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; 107afe: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 107b01: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107b04: 8b 48 0c mov 0xc(%eax),%ecx 107b07: 8b 58 10 mov 0x10(%eax),%ebx 107b0a: 89 4d e0 mov %ecx,-0x20(%ebp) 107b0d: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107b10: 8b 4d 0c mov 0xc(%ebp),%ecx 107b13: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107b16: 8b 4d 10 mov 0x10(%ebp),%ecx 107b19: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107b1c: 8b 40 14 mov 0x14(%eax),%eax 107b1f: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107b22: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( np->major, np->minor, (void *) &args 107b29: 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( 107b2c: 50 push %eax 107b2d: ff 72 0c pushl 0xc(%edx) 107b30: ff 72 08 pushl 0x8(%edx) 107b33: e8 dc 41 00 00 call 10bd14 np->major, np->minor, (void *) &args ); if ( status ) 107b38: 83 c4 10 add $0x10,%esp 107b3b: 85 c0 test %eax,%eax 107b3d: 75 09 jne 107b48 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107b3f: 8b 45 f4 mov -0xc(%ebp),%eax } 107b42: 8b 5d fc mov -0x4(%ebp),%ebx 107b45: c9 leave 107b46: c3 ret 107b47: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107b48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107b4b: 50 push %eax <== NOT EXECUTED 107b4c: e8 17 72 00 00 call 10ed68 <== NOT EXECUTED 107b51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107b54: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107b57: c9 leave <== NOT EXECUTED 107b58: c3 ret <== NOT EXECUTED =============================================================================== 00111b7c : int device_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 111b7c: 55 push %ebp <== NOT EXECUTED 111b7d: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 111b7f: 31 c0 xor %eax,%eax <== NOT EXECUTED 111b81: c9 leave <== NOT EXECUTED 111b82: c3 ret <== NOT EXECUTED =============================================================================== 00111b28 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 111b28: 55 push %ebp 111b29: 89 e5 mov %esp,%ebp 111b2b: 83 ec 1c sub $0x1c,%esp 111b2e: 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; 111b31: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 111b34: 8b 55 0c mov 0xc(%ebp),%edx 111b37: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 111b3a: 8b 55 10 mov 0x10(%ebp),%edx 111b3d: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->pathinfo.node_access; 111b40: 8b 40 18 mov 0x18(%eax),%eax status = rtems_io_control( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 111b43: 8d 55 e8 lea -0x18(%ebp),%edx args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 111b46: 52 push %edx 111b47: ff 70 54 pushl 0x54(%eax) 111b4a: ff 70 50 pushl 0x50(%eax) 111b4d: e8 22 06 00 00 call 112174 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111b52: 83 c4 10 add $0x10,%esp 111b55: 85 c0 test %eax,%eax 111b57: 75 07 jne 111b60 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 111b59: 8b 45 f4 mov -0xc(%ebp),%eax } 111b5c: c9 leave 111b5d: c3 ret 111b5e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111b60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b63: 50 push %eax <== NOT EXECUTED 111b64: e8 2f 08 00 00 call 112398 <== NOT EXECUTED 111b69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 111b6c: c9 leave <== NOT EXECUTED 111b6d: c3 ret <== NOT EXECUTED =============================================================================== 00111a58 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111a58: 55 push %ebp 111a59: 89 e5 mov %esp,%ebp 111a5b: 53 push %ebx 111a5c: 83 ec 28 sub $0x28,%esp 111a5f: 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; 111a62: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 111a65: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 111a68: 8b 48 0c mov 0xc(%eax),%ecx 111a6b: 8b 58 10 mov 0x10(%eax),%ebx 111a6e: 89 4d e0 mov %ecx,-0x20(%ebp) 111a71: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 111a74: 8b 4d 0c mov 0xc(%ebp),%ecx 111a77: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 111a7a: 8b 4d 10 mov 0x10(%ebp),%ecx 111a7d: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 111a80: 8b 40 14 mov 0x14(%eax),%eax 111a83: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111a86: 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 111a8d: 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( 111a90: 50 push %eax 111a91: ff 72 54 pushl 0x54(%edx) 111a94: ff 72 50 pushl 0x50(%edx) 111a97: e8 58 07 00 00 call 1121f4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111a9c: 83 c4 10 add $0x10,%esp 111a9f: 85 c0 test %eax,%eax 111aa1: 75 09 jne 111aac <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 111aa3: 8b 45 f4 mov -0xc(%ebp),%eax } 111aa6: 8b 5d fc mov -0x4(%ebp),%ebx 111aa9: c9 leave 111aaa: c3 ret 111aab: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111aac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111aaf: 50 push %eax <== NOT EXECUTED 111ab0: e8 e3 08 00 00 call 112398 <== NOT EXECUTED 111ab5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 111ab8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111abb: c9 leave <== NOT EXECUTED 111abc: c3 ret <== NOT EXECUTED =============================================================================== 00111ac0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 111ac0: 55 push %ebp 111ac1: 89 e5 mov %esp,%ebp 111ac3: 53 push %ebx 111ac4: 83 ec 28 sub $0x28,%esp 111ac7: 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; 111aca: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 111acd: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 111ad0: 8b 48 0c mov 0xc(%eax),%ecx 111ad3: 8b 58 10 mov 0x10(%eax),%ebx 111ad6: 89 4d e0 mov %ecx,-0x20(%ebp) 111ad9: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 111adc: 8b 4d 0c mov 0xc(%ebp),%ecx 111adf: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 111ae2: 8b 4d 10 mov 0x10(%ebp),%ecx 111ae5: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 111ae8: 8b 40 14 mov 0x14(%eax),%eax 111aeb: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 111aee: 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 111af5: 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( 111af8: 50 push %eax 111af9: ff 72 54 pushl 0x54(%edx) 111afc: ff 72 50 pushl 0x50(%edx) 111aff: e8 30 07 00 00 call 112234 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 111b04: 83 c4 10 add $0x10,%esp 111b07: 85 c0 test %eax,%eax 111b09: 75 09 jne 111b14 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 111b0b: 8b 45 f4 mov -0xc(%ebp),%eax } 111b0e: 8b 5d fc mov -0x4(%ebp),%ebx 111b11: c9 leave 111b12: c3 ret 111b13: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 111b14: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111b17: 50 push %eax <== NOT EXECUTED 111b18: e8 7b 08 00 00 call 112398 <== NOT EXECUTED 111b1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 111b20: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111b23: c9 leave <== NOT EXECUTED 111b24: c3 ret <== NOT EXECUTED =============================================================================== 0010904c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10904c: 55 push %ebp 10904d: 89 e5 mov %esp,%ebp 10904f: 53 push %ebx 109050: 83 ec 04 sub $0x4,%esp 109053: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 109055: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10905b: 85 d2 test %edx,%edx 10905d: 74 4d je 1090ac rtems_interrupt_disable (level); 10905f: 9c pushf 109060: fa cli 109061: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 109062: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 109068: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10906e: 39 d1 cmp %edx,%ecx 109070: 74 38 je 1090aa 109072: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 109074: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10907b: 00 00 00 rtems_interrupt_enable (level); 10907e: 50 push %eax 10907f: 9d popf sc = rtems_semaphore_obtain( 109080: 50 push %eax 109081: 6a 00 push $0x0 109083: 6a 00 push $0x0 109085: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10908b: e8 a8 26 00 00 call 10b738 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109090: 83 c4 10 add $0x10,%esp 109093: 85 c0 test %eax,%eax 109095: 75 1a jne 1090b1 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109097: 9c pushf 109098: fa cli 109099: 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) { 10909a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 1090a0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1090a6: 39 d1 cmp %edx,%ecx 1090a8: 75 ca jne 109074 <== 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); 1090aa: 50 push %eax 1090ab: 9d popf } } 1090ac: 8b 5d fc mov -0x4(%ebp),%ebx 1090af: c9 leave 1090b0: 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); 1090b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1090b4: 50 push %eax <== NOT EXECUTED 1090b5: e8 ba 2c 00 00 call 10bd74 <== NOT EXECUTED =============================================================================== 001087e0 : int dup2( int fildes, int fildes2 ) { 1087e0: 55 push %ebp 1087e1: 89 e5 mov %esp,%ebp 1087e3: 57 push %edi 1087e4: 56 push %esi 1087e5: 53 push %ebx 1087e6: 83 ec 64 sub $0x64,%esp 1087e9: 8b 75 08 mov 0x8(%ebp),%esi 1087ec: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1087ef: 8d 5d a0 lea -0x60(%ebp),%ebx 1087f2: 53 push %ebx 1087f3: 56 push %esi 1087f4: e8 8b 05 00 00 call 108d84 if ( status == -1 ) 1087f9: 83 c4 10 add $0x10,%esp 1087fc: 40 inc %eax 1087fd: 75 0d jne 10880c <== ALWAYS TAKEN * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); if ( status == -1 ) return -1; 1087ff: b8 ff ff ff ff mov $0xffffffff,%eax /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 108804: 8d 65 f4 lea -0xc(%ebp),%esp 108807: 5b pop %ebx 108808: 5e pop %esi 108809: 5f pop %edi 10880a: c9 leave 10880b: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 10880c: 83 ec 08 sub $0x8,%esp 10880f: 53 push %ebx 108810: 57 push %edi 108811: e8 6e 05 00 00 call 108d84 if ( status == -1 ) 108816: 83 c4 10 add $0x10,%esp 108819: 40 inc %eax 10881a: 74 e3 je 1087ff <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 10881c: 50 push %eax <== NOT EXECUTED 10881d: 57 push %edi <== NOT EXECUTED 10881e: 6a 00 push $0x0 <== NOT EXECUTED 108820: 56 push %esi <== NOT EXECUTED 108821: e8 b6 01 00 00 call 1089dc <== NOT EXECUTED 108826: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108829: eb d9 jmp 108804 <== NOT EXECUTED =============================================================================== 00109dd4 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109dd4: 55 push %ebp 109dd5: 89 e5 mov %esp,%ebp 109dd7: 53 push %ebx 109dd8: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 109ddb: f6 42 3d 02 testb $0x2,0x3d(%edx) 109ddf: 74 1b je 109dfc <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 109de1: 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) && 109de4: 8b 1d 54 41 12 00 mov 0x124154,%ebx 109dea: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 109def: 74 0b je 109dfc iscntrl(c) && (c != '\t') && (c != '\n')) { 109df1: 3c 09 cmp $0x9,%al 109df3: 74 07 je 109dfc 109df5: 3c 0a cmp $0xa,%al 109df7: 75 13 jne 109e0c 109df9: 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); 109dfc: 0f b6 c0 movzbl %al,%eax 109dff: e8 94 fe ff ff call 109c98 } } 109e04: 8b 5d fc mov -0x4(%ebp),%ebx 109e07: c9 leave 109e08: c3 ret 109e09: 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] = '^'; 109e0c: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 109e10: 83 f0 40 xor $0x40,%eax 109e13: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 109e16: 53 push %ebx 109e17: 52 push %edx 109e18: 6a 02 push $0x2 109e1a: 8d 45 f6 lea -0xa(%ebp),%eax 109e1d: 50 push %eax 109e1e: 89 55 e4 mov %edx,-0x1c(%ebp) 109e21: e8 3e fd ff ff call 109b64 tty->column += 2; 109e26: 8b 55 e4 mov -0x1c(%ebp),%edx 109e29: 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')) { 109e2d: 83 c4 10 add $0x10,%esp rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); } } 109e30: 8b 5d fc mov -0x4(%ebp),%ebx 109e33: c9 leave 109e34: c3 ret =============================================================================== 00108ee4 : void endgrent(void) { 108ee4: 55 push %ebp 108ee5: 89 e5 mov %esp,%ebp 108ee7: 83 ec 08 sub $0x8,%esp if (group_fp != NULL) 108eea: a1 a0 6e 12 00 mov 0x126ea0,%eax 108eef: 85 c0 test %eax,%eax 108ef1: 74 0c je 108eff <== NEVER TAKEN fclose(group_fp); 108ef3: 83 ec 0c sub $0xc,%esp 108ef6: 50 push %eax 108ef7: e8 b4 a4 00 00 call 1133b0 108efc: 83 c4 10 add $0x10,%esp } 108eff: c9 leave 108f00: c3 ret =============================================================================== 00108d8c : void endpwent(void) { 108d8c: 55 push %ebp 108d8d: 89 e5 mov %esp,%ebp 108d8f: 83 ec 08 sub $0x8,%esp if (passwd_fp != NULL) 108d92: a1 88 6f 12 00 mov 0x126f88,%eax 108d97: 85 c0 test %eax,%eax 108d99: 74 0c je 108da7 <== NEVER TAKEN fclose(passwd_fp); 108d9b: 83 ec 0c sub $0xc,%esp 108d9e: 50 push %eax 108d9f: e8 0c a6 00 00 call 1133b0 108da4: 83 c4 10 add $0x10,%esp } 108da7: c9 leave 108da8: c3 ret =============================================================================== 00109e38 : * 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) { 109e38: 55 push %ebp 109e39: 89 e5 mov %esp,%ebp 109e3b: 57 push %edi 109e3c: 56 push %esi 109e3d: 53 push %ebx 109e3e: 83 ec 1c sub $0x1c,%esp 109e41: 89 c3 mov %eax,%ebx 109e43: 89 d7 mov %edx,%edi if (tty->ccount == 0) 109e45: 8b 48 20 mov 0x20(%eax),%ecx 109e48: 85 c9 test %ecx,%ecx 109e4a: 0f 84 84 00 00 00 je 109ed4 return; if (lineFlag) { 109e50: 85 d2 test %edx,%edx 109e52: 0f 85 84 00 00 00 jne 109edc echo ('\n', tty); return; } } while (tty->ccount) { 109e58: 8b 50 3c mov 0x3c(%eax),%edx 109e5b: 89 7d e4 mov %edi,-0x1c(%ebp) 109e5e: eb 1d jmp 109e7d rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109e60: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109e63: 0f 85 37 01 00 00 jne 109fa0 <== NOT EXECUTED 109e69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109e6c: 8b 75 e4 mov -0x1c(%ebp),%esi 109e6f: 85 f6 test %esi,%esi 109e71: 74 61 je 109ed4 <== NEVER TAKEN echo ('\n', tty); return; } } while (tty->ccount) { 109e73: 8b 4b 20 mov 0x20(%ebx),%ecx 109e76: 85 c9 test %ecx,%ecx 109e78: 74 5a je 109ed4 } 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); 109e7a: 8b 53 3c mov 0x3c(%ebx),%edx return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 109e7d: 8b 7b 1c mov 0x1c(%ebx),%edi 109e80: 49 dec %ecx 109e81: 89 4b 20 mov %ecx,0x20(%ebx) 109e84: 8a 04 0f mov (%edi,%ecx,1),%al if (tty->termios.c_lflag & ECHO) { 109e87: f6 c2 08 test $0x8,%dl 109e8a: 74 e0 je 109e6c <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109e8c: 8b 75 e4 mov -0x1c(%ebp),%esi 109e8f: 85 f6 test %esi,%esi 109e91: 75 09 jne 109e9c 109e93: f6 c2 10 test $0x10,%dl 109e96: 0f 84 f0 00 00 00 je 109f8c <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109e9c: 3c 09 cmp $0x9,%al 109e9e: 74 58 je 109ef8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109ea0: 0f b6 c0 movzbl %al,%eax 109ea3: 8d 70 01 lea 0x1(%eax),%esi 109ea6: a1 54 41 12 00 mov 0x124154,%eax 109eab: f6 04 30 20 testb $0x20,(%eax,%esi,1) 109eaf: 75 af jne 109e60 <== 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); 109eb1: 57 push %edi 109eb2: 53 push %ebx 109eb3: 6a 03 push $0x3 109eb5: 68 12 fe 11 00 push $0x11fe12 109eba: e8 a5 fc ff ff call 109b64 if (tty->column) 109ebf: 8b 43 28 mov 0x28(%ebx),%eax 109ec2: 83 c4 10 add $0x10,%esp 109ec5: 85 c0 test %eax,%eax 109ec7: 74 a3 je 109e6c <== NEVER TAKEN tty->column--; 109ec9: 48 dec %eax 109eca: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 109ecd: 8b 75 e4 mov -0x1c(%ebp),%esi 109ed0: 85 f6 test %esi,%esi 109ed2: 75 9f jne 109e73 break; } } 109ed4: 8d 65 f4 lea -0xc(%ebp),%esp 109ed7: 5b pop %ebx 109ed8: 5e pop %esi 109ed9: 5f pop %edi 109eda: c9 leave 109edb: c3 ret erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109edc: 8b 50 3c mov 0x3c(%eax),%edx 109edf: f6 c2 08 test $0x8,%dl 109ee2: 0f 84 94 00 00 00 je 109f7c <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109ee8: f6 c2 10 test $0x10,%dl 109eeb: 0f 84 eb 00 00 00 je 109fdc <== NEVER TAKEN 109ef1: 89 7d e4 mov %edi,-0x1c(%ebp) 109ef4: eb 87 jmp 109e7d 109ef6: 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; 109ef8: 8b 73 2c mov 0x2c(%ebx),%esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109efb: 85 c9 test %ecx,%ecx 109efd: 74 46 je 109f45 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109eff: a1 54 41 12 00 mov 0x124154,%eax 109f04: 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; 109f07: 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) 109f09: 81 e2 00 02 00 00 and $0x200,%edx 109f0f: 89 55 e0 mov %edx,-0x20(%ebp) 109f12: 89 5d d8 mov %ebx,-0x28(%ebp) 109f15: 8b 5d dc mov -0x24(%ebp),%ebx 109f18: eb 10 jmp 109f2a 109f1a: 66 90 xchg %ax,%ax <== NOT EXECUTED 109f1c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109f1f: 85 d2 test %edx,%edx <== NOT EXECUTED 109f21: 74 03 je 109f26 <== NOT EXECUTED col += 2; 109f23: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f26: 39 c1 cmp %eax,%ecx 109f28: 74 18 je 109f42 <== NEVER TAKEN c = tty->cbuf[i++]; 109f2a: 8a 14 07 mov (%edi,%eax,1),%dl 109f2d: 40 inc %eax if (c == '\t') { 109f2e: 80 fa 09 cmp $0x9,%dl 109f31: 74 41 je 109f74 col = (col | 7) + 1; } else if (iscntrl (c)) { 109f33: 0f b6 d2 movzbl %dl,%edx 109f36: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) 109f3b: 75 df jne 109f1c <== NEVER TAKEN if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109f3d: 46 inc %esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f3e: 39 c1 cmp %eax,%ecx 109f40: 75 e8 jne 109f2a 109f42: 8b 5d d8 mov -0x28(%ebp),%ebx } /* * Back up over the tab */ while (tty->column > col) { 109f45: 3b 73 28 cmp 0x28(%ebx),%esi 109f48: 0f 8d 1e ff ff ff jge 109e6c <== NEVER TAKEN 109f4e: 66 90 xchg %ax,%ax rtems_termios_puts ("\b", 1, tty); 109f50: 52 push %edx 109f51: 53 push %ebx 109f52: 6a 01 push $0x1 109f54: 68 14 fe 11 00 push $0x11fe14 109f59: e8 06 fc ff ff call 109b64 tty->column--; 109f5e: 8b 43 28 mov 0x28(%ebx),%eax 109f61: 48 dec %eax 109f62: 89 43 28 mov %eax,0x28(%ebx) } /* * Back up over the tab */ while (tty->column > col) { 109f65: 83 c4 10 add $0x10,%esp 109f68: 39 f0 cmp %esi,%eax 109f6a: 7f e4 jg 109f50 109f6c: e9 fb fe ff ff jmp 109e6c 109f71: 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; 109f74: 83 ce 07 or $0x7,%esi 109f77: 46 inc %esi 109f78: eb ac jmp 109f26 109f7a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109f7c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109f83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f86: 5b pop %ebx <== NOT EXECUTED 109f87: 5e pop %esi <== NOT EXECUTED 109f88: 5f pop %edi <== NOT EXECUTED 109f89: c9 leave <== NOT EXECUTED 109f8a: c3 ret <== NOT EXECUTED 109f8b: 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); 109f8c: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 109f90: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 109f92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f95: 5b pop %ebx <== NOT EXECUTED 109f96: 5e pop %esi <== NOT EXECUTED 109f97: 5f pop %edi <== NOT EXECUTED 109f98: 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); 109f99: e9 36 fe ff ff jmp 109dd4 <== NOT EXECUTED 109f9e: 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); 109fa0: 50 push %eax <== NOT EXECUTED 109fa1: 53 push %ebx <== NOT EXECUTED 109fa2: 6a 03 push $0x3 <== NOT EXECUTED 109fa4: 68 12 fe 11 00 push $0x11fe12 <== NOT EXECUTED 109fa9: e8 b6 fb ff ff call 109b64 <== NOT EXECUTED if (tty->column) 109fae: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109fb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109fb4: 85 c0 test %eax,%eax <== NOT EXECUTED 109fb6: 74 04 je 109fbc <== NOT EXECUTED tty->column--; 109fb8: 48 dec %eax <== NOT EXECUTED 109fb9: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 109fbc: a1 54 41 12 00 mov 0x124154,%eax <== NOT EXECUTED 109fc1: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109fc5: 0f 84 e6 fe ff ff je 109eb1 <== NOT EXECUTED 109fcb: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 109fcf: 0f 85 dc fe ff ff jne 109eb1 <== NOT EXECUTED 109fd5: e9 92 fe ff ff jmp 109e6c <== NOT EXECUTED 109fda: 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; 109fdc: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 109fe3: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 109fe7: 89 da mov %ebx,%edx <== NOT EXECUTED 109fe9: e8 e6 fd ff ff call 109dd4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 109fee: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 109ff2: 0f 84 dc fe ff ff je 109ed4 <== NOT EXECUTED echo ('\n', tty); 109ff8: 89 da mov %ebx,%edx <== NOT EXECUTED 109ffa: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 109fff: eb 91 jmp 109f92 <== NOT EXECUTED =============================================================================== 00108aac : #include int fchdir( int fd ) { 108aac: 55 push %ebp 108aad: 89 e5 mov %esp,%ebp 108aaf: 57 push %edi 108ab0: 56 push %esi 108ab1: 53 push %ebx 108ab2: 83 ec 4c sub $0x4c,%esp 108ab5: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 108ab8: 3b 05 4c 36 12 00 cmp 0x12364c,%eax 108abe: 0f 83 d0 00 00 00 jae 108b94 iop = rtems_libio_iop( fd ); 108ac4: c1 e0 03 shl $0x3,%eax 108ac7: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 108ace: 29 c3 sub %eax,%ebx 108ad0: 03 1d c0 76 12 00 add 0x1276c0,%ebx rtems_libio_check_is_open(iop); 108ad6: 8b 43 14 mov 0x14(%ebx),%eax 108ad9: f6 c4 01 test $0x1,%ah 108adc: 0f 84 b2 00 00 00 je 108b94 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108ae2: a8 02 test $0x2,%al 108ae4: 0f 84 be 00 00 00 je 108ba8 /* * Verify you can change directory into this node. */ if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 108aea: 83 ec 0c sub $0xc,%esp 108aed: 8b 43 24 mov 0x24(%ebx),%eax 108af0: 83 c3 18 add $0x18,%ebx 108af3: 53 push %ebx 108af4: ff 50 10 call *0x10(%eax) 108af7: 83 c4 10 add $0x10,%esp 108afa: 48 dec %eax 108afb: 75 67 jne 108b64 * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 108afd: a1 24 55 12 00 mov 0x125524,%eax 108b02: 8d 55 c0 lea -0x40(%ebp),%edx 108b05: 89 55 b4 mov %edx,-0x4c(%ebp) 108b08: 8d 70 04 lea 0x4(%eax),%esi 108b0b: b9 05 00 00 00 mov $0x5,%ecx 108b10: 89 d7 mov %edx,%edi 108b12: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_current = iop->pathinfo; 108b14: 8d 78 04 lea 0x4(%eax),%edi 108b17: b1 05 mov $0x5,%cl 108b19: 89 de mov %ebx,%esi 108b1b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 108b1d: 83 ec 0c sub $0xc,%esp 108b20: 6a 00 push $0x0 108b22: 8d 75 d4 lea -0x2c(%ebp),%esi 108b25: 56 push %esi 108b26: 6a 00 push $0x0 108b28: 6a 01 push $0x1 108b2a: 68 16 17 12 00 push $0x121716 108b2f: e8 74 fe ff ff call 1089a8 108b34: 83 c4 20 add $0x20,%esp 108b37: 85 c0 test %eax,%eax 108b39: 75 3d jne 108b78 /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 108b3b: 83 ec 0c sub $0xc,%esp 108b3e: 8d 45 c0 lea -0x40(%ebp),%eax 108b41: 50 push %eax 108b42: e8 61 01 00 00 call 108ca8 rtems_filesystem_current = loc; 108b47: 8b 3d 24 55 12 00 mov 0x125524,%edi 108b4d: 83 c7 04 add $0x4,%edi 108b50: b9 05 00 00 00 mov $0x5,%ecx 108b55: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 108b57: 83 c4 10 add $0x10,%esp 108b5a: 31 c0 xor %eax,%eax } 108b5c: 8d 65 f4 lea -0xc(%ebp),%esp 108b5f: 5b pop %ebx 108b60: 5e pop %esi 108b61: 5f pop %edi 108b62: c9 leave 108b63: 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 ); 108b64: e8 2f a7 00 00 call 113298 <__errno> 108b69: c7 00 14 00 00 00 movl $0x14,(%eax) 108b6f: b8 ff ff ff ff mov $0xffffffff,%eax 108b74: eb e6 jmp 108b5c 108b76: 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; 108b78: 8b 3d 24 55 12 00 mov 0x125524,%edi 108b7e: 83 c7 04 add $0x4,%edi 108b81: b9 05 00 00 00 mov $0x5,%ecx 108b86: 8b 75 b4 mov -0x4c(%ebp),%esi 108b89: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return -1; 108b8b: b8 ff ff ff ff mov $0xffffffff,%eax 108b90: eb ca jmp 108b5c 108b92: 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); 108b94: e8 ff a6 00 00 call 113298 <__errno> 108b99: c7 00 09 00 00 00 movl $0x9,(%eax) 108b9f: b8 ff ff ff ff mov $0xffffffff,%eax 108ba4: eb b6 jmp 108b5c 108ba6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108ba8: e8 eb a6 00 00 call 113298 <__errno> 108bad: c7 00 16 00 00 00 movl $0x16,(%eax) 108bb3: b8 ff ff ff ff mov $0xffffffff,%eax 108bb8: eb a2 jmp 108b5c =============================================================================== 00108bbc : int fchmod( int fd, mode_t mode ) { 108bbc: 55 push %ebp 108bbd: 89 e5 mov %esp,%ebp 108bbf: 83 ec 08 sub $0x8,%esp 108bc2: 8b 45 08 mov 0x8(%ebp),%eax 108bc5: 8b 4d 0c mov 0xc(%ebp),%ecx rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108bc8: 3b 05 4c 36 12 00 cmp 0x12364c,%eax 108bce: 73 38 jae 108c08 iop = rtems_libio_iop( fd ); 108bd0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108bd7: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108bde: 29 d0 sub %edx,%eax 108be0: 03 05 c0 76 12 00 add 0x1276c0,%eax rtems_libio_check_is_open(iop); 108be6: 8b 50 14 mov 0x14(%eax),%edx 108be9: f6 c6 01 test $0x1,%dh 108bec: 74 1a je 108c08 /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108bee: 83 e2 04 and $0x4,%edx 108bf1: 74 29 je 108c1c return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108bf3: 8b 50 20 mov 0x20(%eax),%edx 108bf6: 89 4d 0c mov %ecx,0xc(%ebp) 108bf9: 83 c0 18 add $0x18,%eax 108bfc: 89 45 08 mov %eax,0x8(%ebp) 108bff: 8b 42 1c mov 0x1c(%edx),%eax } 108c02: c9 leave * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 108c03: ff e0 jmp *%eax 108c05: 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); 108c08: e8 8b a6 00 00 call 113298 <__errno> 108c0d: 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 ); } 108c13: b8 ff ff ff ff mov $0xffffffff,%eax 108c18: c9 leave 108c19: c3 ret 108c1a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108c1c: e8 77 a6 00 00 call 113298 <__errno> 108c21: c7 00 16 00 00 00 movl $0x16,(%eax) 108c27: eb ea jmp 108c13 =============================================================================== 001089dc : int fcntl( int fd, int cmd, ... ) { 1089dc: 55 push %ebp 1089dd: 89 e5 mov %esp,%ebp 1089df: 57 push %edi 1089e0: 56 push %esi 1089e1: 53 push %ebx 1089e2: 83 ec 1c sub $0x1c,%esp 1089e5: 8b 5d 08 mov 0x8(%ebp),%ebx 1089e8: 8b 55 0c mov 0xc(%ebp),%edx int ret; va_list ap; va_start( ap, cmd ); 1089eb: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 1089ee: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx 1089f4: 39 cb cmp %ecx,%ebx 1089f6: 0f 83 5c 01 00 00 jae 108b58 iop = rtems_libio_iop( fd ); 1089fc: a1 c0 71 12 00 mov 0x1271c0,%eax 108a01: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 108a08: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 108a0f: 29 f3 sub %esi,%ebx 108a11: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108a14: 8b 73 14 mov 0x14(%ebx),%esi 108a17: f7 c6 00 01 00 00 test $0x100,%esi 108a1d: 0f 84 35 01 00 00 je 108b58 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108a23: 83 fa 09 cmp $0x9,%edx 108a26: 76 10 jbe 108a38 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 108a28: e8 9b aa 00 00 call 1134c8 <__errno> 108a2d: c7 00 16 00 00 00 movl $0x16,(%eax) 108a33: eb 16 jmp 108a4b 108a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108a38: ff 24 95 10 19 12 00 jmp *0x121910(,%edx,4) 108a3f: 90 nop <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 108a40: e8 83 aa 00 00 call 1134c8 <__errno> 108a45: 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; 108a4b: 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; } 108a50: 89 f0 mov %esi,%eax 108a52: 8d 65 f4 lea -0xc(%ebp),%esp 108a55: 5b pop %ebx 108a56: 5e pop %esi 108a57: 5f pop %edi 108a58: c9 leave 108a59: c3 ret 108a5a: 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 ) ); 108a5c: 83 ec 0c sub $0xc,%esp 108a5f: ff 37 pushl (%edi) 108a61: 89 55 e0 mov %edx,-0x20(%ebp) 108a64: e8 33 05 00 00 call 108f9c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 108a69: 25 01 02 00 00 and $0x201,%eax 108a6e: 8b 4b 14 mov 0x14(%ebx),%ecx 108a71: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 108a77: 09 c8 or %ecx,%eax 108a79: 89 43 14 mov %eax,0x14(%ebx) 108a7c: 83 c4 10 add $0x10,%esp rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108a7f: 31 f6 xor %esi,%esi 108a81: 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 ); 108a84: 83 ec 08 sub $0x8,%esp 108a87: 8b 43 20 mov 0x20(%ebx),%eax 108a8a: 53 push %ebx 108a8b: 52 push %edx 108a8c: ff 50 30 call *0x30(%eax) 108a8f: 89 c3 mov %eax,%ebx if (err) { 108a91: 83 c4 10 add $0x10,%esp 108a94: 85 c0 test %eax,%eax 108a96: 74 b8 je 108a50 <== ALWAYS TAKEN errno = err; 108a98: e8 2b aa 00 00 call 1134c8 <__errno> <== NOT EXECUTED 108a9d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 108a9f: eb aa jmp 108a4b <== NOT EXECUTED 108aa1: 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 ); 108aa4: 83 ec 0c sub $0xc,%esp 108aa7: 56 push %esi 108aa8: 89 55 e0 mov %edx,-0x20(%ebp) 108aab: e8 24 05 00 00 call 108fd4 108ab0: 89 c6 mov %eax,%esi 108ab2: 83 c4 10 add $0x10,%esp 108ab5: 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) { 108ab8: 85 f6 test %esi,%esi 108aba: 79 c8 jns 108a84 <== ALWAYS TAKEN 108abc: eb 92 jmp 108a50 <== NOT EXECUTED 108abe: 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 ) ) 108ac0: 8b 07 mov (%edi),%eax 108ac2: 85 c0 test %eax,%eax 108ac4: 74 6a je 108b30 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 108ac6: 81 ce 00 08 00 00 or $0x800,%esi 108acc: 89 73 14 mov %esi,0x14(%ebx) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108acf: 31 f6 xor %esi,%esi 108ad1: eb b1 jmp 108a84 108ad3: 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); 108ad4: 31 c0 xor %eax,%eax 108ad6: f7 c6 00 08 00 00 test $0x800,%esi 108adc: 0f 95 c0 setne %al 108adf: 89 c6 mov %eax,%esi 108ae1: eb a1 jmp 108a84 108ae3: 90 nop <== NOT EXECUTED * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 108ae4: 8b 3f mov (%edi),%edi if ( fd2 ) 108ae6: 85 ff test %edi,%edi 108ae8: 0f 84 82 00 00 00 je 108b70 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 108aee: 39 f9 cmp %edi,%ecx <== NOT EXECUTED 108af0: 77 4e ja 108b40 <== NOT EXECUTED 108af2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108af9: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 108afb: 89 77 14 mov %esi,0x14(%edi) diop->pathinfo = iop->pathinfo; 108afe: 83 c7 18 add $0x18,%edi 108b01: 8d 73 18 lea 0x18(%ebx),%esi 108b04: b9 05 00 00 00 mov $0x5,%ecx 108b09: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 108b0b: 8b 4d e4 mov -0x1c(%ebp),%ecx 108b0e: 29 c1 sub %eax,%ecx 108b10: 89 c8 mov %ecx,%eax 108b12: c1 f8 03 sar $0x3,%eax 108b15: 8d 0c c0 lea (%eax,%eax,8),%ecx 108b18: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108b1b: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108b1e: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108b21: 89 ce mov %ecx,%esi 108b23: c1 e6 0f shl $0xf,%esi 108b26: 01 f1 add %esi,%ecx 108b28: 8d 34 c8 lea (%eax,%ecx,8),%esi 108b2b: f7 de neg %esi 108b2d: eb 89 jmp 108ab8 108b2f: 90 nop <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 108b30: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 108b36: 89 73 14 mov %esi,0x14(%ebx) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 108b39: 31 f6 xor %esi,%esi <== NOT EXECUTED 108b3b: e9 44 ff ff ff jmp 108a84 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 108b40: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx <== NOT EXECUTED 108b47: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi <== NOT EXECUTED 108b4e: 29 cf sub %ecx,%edi <== NOT EXECUTED 108b50: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 108b53: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 108b56: eb a3 jmp 108afb <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108b58: e8 6b a9 00 00 call 1134c8 <__errno> 108b5d: c7 00 09 00 00 00 movl $0x9,(%eax) 108b63: be ff ff ff ff mov $0xffffffff,%esi 108b68: e9 e3 fe ff ff jmp 108a50 108b6d: 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(); 108b70: 89 55 e0 mov %edx,-0x20(%ebp) 108b73: e8 a0 04 00 00 call 109018 108b78: 89 c7 mov %eax,%edi if ( diop == 0 ) { 108b7a: 85 c0 test %eax,%eax 108b7c: 8b 55 e0 mov -0x20(%ebp),%edx 108b7f: 0f 84 c6 fe ff ff je 108a4b <== NEVER TAKEN 108b85: 8b 73 14 mov 0x14(%ebx),%esi 108b88: 89 45 e4 mov %eax,-0x1c(%ebp) 108b8b: a1 c0 71 12 00 mov 0x1271c0,%eax 108b90: e9 66 ff ff ff jmp 108afb =============================================================================== 00108bb8 : #include int fdatasync( int fd ) { 108bb8: 55 push %ebp 108bb9: 89 e5 mov %esp,%ebp 108bbb: 83 ec 08 sub $0x8,%esp 108bbe: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108bc1: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108bc7: 73 2f jae 108bf8 iop = rtems_libio_iop( fd ); 108bc9: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108bd0: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108bd7: 29 d0 sub %edx,%eax 108bd9: 03 05 c0 71 12 00 add 0x1271c0,%eax rtems_libio_check_is_open(iop); 108bdf: 8b 50 14 mov 0x14(%eax),%edx 108be2: f6 c6 01 test $0x1,%dh 108be5: 74 11 je 108bf8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108be7: 83 e2 04 and $0x4,%edx 108bea: 74 20 je 108c0c /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108bec: 8b 50 20 mov 0x20(%eax),%edx 108bef: 89 45 08 mov %eax,0x8(%ebp) 108bf2: 8b 42 2c mov 0x2c(%edx),%eax } 108bf5: c9 leave /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); 108bf6: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108bf8: e8 cb a8 00 00 call 1134c8 <__errno> 108bfd: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fdatasync(). */ return (*iop->pathinfo.handlers->fdatasync_h)( iop ); } 108c03: b8 ff ff ff ff mov $0xffffffff,%eax 108c08: c9 leave 108c09: c3 ret 108c0a: 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 ); 108c0c: e8 b7 a8 00 00 call 1134c8 <__errno> 108c11: c7 00 16 00 00 00 movl $0x16,(%eax) 108c17: eb ea jmp 108c03 =============================================================================== 0011122c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 11122c: 55 push %ebp 11122d: 89 e5 mov %esp,%ebp 11122f: 57 push %edi 111230: 56 push %esi 111231: 53 push %ebx 111232: 83 ec 2c sub $0x2c,%esp ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 111235: e8 0a fe ff ff call 111044 11123a: 89 c3 mov %eax,%ebx if (err) 11123c: 85 c0 test %eax,%eax 11123e: 75 74 jne 1112b4 return err; pipe = *pipep; 111240: 8b 45 08 mov 0x8(%ebp),%eax 111243: 8b 30 mov (%eax),%esi if (pipe == NULL) { 111245: 85 f6 test %esi,%esi 111247: 74 77 je 1112c0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 111249: 52 push %edx 11124a: 6a 00 push $0x0 11124c: 6a 00 push $0x0 11124e: ff 76 28 pushl 0x28(%esi) 111251: e8 72 b9 ff ff call 10cbc8 111256: 83 c4 10 add $0x10,%esp 111259: 83 f8 01 cmp $0x1,%eax 11125c: 19 ff sbb %edi,%edi 11125e: f7 d7 not %edi 111260: 83 e7 fc and $0xfffffffc,%edi err = -EINTR; if (*pipep == NULL) { 111263: 8b 45 08 mov 0x8(%ebp),%eax 111266: 8b 00 mov (%eax),%eax 111268: 85 c0 test %eax,%eax 11126a: 0f 84 70 02 00 00 je 1114e0 else *pipep = pipe; } out: pipe_unlock(); 111270: e8 77 fe ff ff call 1110ec pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 111275: 85 ff test %edi,%edi 111277: 0f 85 5d 03 00 00 jne 1115da <== NEVER TAKEN return err; pipe = *pipep; 11127d: 8b 45 08 mov 0x8(%ebp),%eax 111280: 8b 30 mov (%eax),%esi switch (LIBIO_ACCMODE(iop)) { 111282: 8b 55 0c mov 0xc(%ebp),%edx 111285: 8b 42 14 mov 0x14(%edx),%eax 111288: 83 e0 06 and $0x6,%eax 11128b: 83 f8 04 cmp $0x4,%eax 11128e: 0f 84 d4 01 00 00 je 111468 111294: 83 f8 06 cmp $0x6,%eax 111297: 0f 84 8b 01 00 00 je 111428 11129d: 83 f8 02 cmp $0x2,%eax 1112a0: 0f 84 f6 00 00 00 je 11139c <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 1112a6: 83 ec 0c sub $0xc,%esp 1112a9: ff 76 28 pushl 0x28(%esi) 1112ac: e8 13 ba ff ff call 10ccc4 return 0; 1112b1: 83 c4 10 add $0x10,%esp out_error: pipe_release(pipep, iop); return err; } 1112b4: 89 d8 mov %ebx,%eax 1112b6: 8d 65 f4 lea -0xc(%ebp),%esp 1112b9: 5b pop %ebx 1112ba: 5e pop %esi 1112bb: 5f pop %edi 1112bc: c9 leave 1112bd: c3 ret 1112be: 66 90 xchg %ax,%ax <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 1112c0: 83 ec 0c sub $0xc,%esp 1112c3: 6a 34 push $0x34 1112c5: e8 ce 82 ff ff call 109598 1112ca: 89 c6 mov %eax,%esi 1112cc: 89 45 d4 mov %eax,-0x2c(%ebp) if (pipe == NULL) 1112cf: 83 c4 10 add $0x10,%esp 1112d2: 85 c0 test %eax,%eax 1112d4: 0f 84 f6 02 00 00 je 1115d0 return err; memset(pipe, 0, sizeof(pipe_control_t)); 1112da: b9 34 00 00 00 mov $0x34,%ecx 1112df: 31 c0 xor %eax,%eax 1112e1: 89 f7 mov %esi,%edi 1112e3: f3 aa rep stos %al,%es:(%edi) pipe->Size = PIPE_BUF; 1112e5: c7 46 04 00 02 00 00 movl $0x200,0x4(%esi) pipe->Buffer = malloc(pipe->Size); 1112ec: 83 ec 0c sub $0xc,%esp 1112ef: 68 00 02 00 00 push $0x200 1112f4: e8 9f 82 ff ff call 109598 1112f9: 89 06 mov %eax,(%esi) if (! pipe->Buffer) 1112fb: 83 c4 10 add $0x10,%esp 1112fe: 85 c0 test %eax,%eax 111300: 0f 84 bc 02 00 00 je 1115c2 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111306: 8d 46 2c lea 0x2c(%esi),%eax 111309: 50 push %eax 11130a: 6a 00 push $0x0 11130c: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 11130e: 0f be 05 48 50 12 00 movsbl 0x125048,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 111315: 0d 00 72 49 50 or $0x50497200,%eax 11131a: 50 push %eax 11131b: e8 68 12 00 00 call 112588 111320: 83 c4 10 add $0x10,%esp 111323: 85 c0 test %eax,%eax 111325: 0f 85 87 02 00 00 jne 1115b2 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 11132b: 8d 46 30 lea 0x30(%esi),%eax 11132e: 50 push %eax 11132f: 6a 00 push $0x0 111331: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 111333: 0f be 05 48 50 12 00 movsbl 0x125048,%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( 11133a: 0d 00 77 49 50 or $0x50497700,%eax 11133f: 50 push %eax 111340: e8 43 12 00 00 call 112588 111345: 83 c4 10 add $0x10,%esp 111348: 85 c0 test %eax,%eax 11134a: 0f 85 51 02 00 00 jne 1115a1 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 111350: 83 ec 0c sub $0xc,%esp 111353: 8d 46 28 lea 0x28(%esi),%eax 111356: 50 push %eax 111357: 6a 00 push $0x0 111359: 6a 10 push $0x10 11135b: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 11135d: 0f be 05 48 50 12 00 movsbl 0x125048,%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( 111364: 0d 00 73 49 50 or $0x50497300,%eax 111369: 50 push %eax 11136a: e8 dd b5 ff ff call 10c94c 11136f: 83 c4 20 add $0x20,%esp 111372: 85 c0 test %eax,%eax 111374: 0f 85 16 02 00 00 jne 111590 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 11137a: a0 48 50 12 00 mov 0x125048,%al 11137f: 8d 50 01 lea 0x1(%eax),%edx 111382: 88 15 48 50 12 00 mov %dl,0x125048 111388: 3c 7a cmp $0x7a,%al 11138a: 0f 85 b9 fe ff ff jne 111249 c = 'a'; 111390: c6 05 48 50 12 00 61 movb $0x61,0x125048 111397: e9 ad fe ff ff jmp 111249 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 11139c: ff 46 20 incl 0x20(%esi) if (pipe->Readers ++ == 0) 11139f: 8b 46 10 mov 0x10(%esi),%eax 1113a2: 8d 50 01 lea 0x1(%eax),%edx 1113a5: 89 56 10 mov %edx,0x10(%esi) 1113a8: 85 c0 test %eax,%eax 1113aa: 0f 84 80 01 00 00 je 111530 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 1113b0: 8b 7e 14 mov 0x14(%esi),%edi 1113b3: 85 ff test %edi,%edi 1113b5: 0f 85 eb fe ff ff jne 1112a6 /* Not an error */ if (LIBIO_NODELAY(iop)) 1113bb: 8b 45 0c mov 0xc(%ebp),%eax 1113be: f6 40 14 01 testb $0x1,0x14(%eax) 1113c2: 0f 85 de fe ff ff jne 1112a6 break; prevCounter = pipe->writerCounter; 1113c8: 8b 7e 24 mov 0x24(%esi),%edi 1113cb: eb 20 jmp 1113ed 1113cd: 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)) 1113d0: 50 push %eax 1113d1: 6a 00 push $0x0 1113d3: 6a 00 push $0x0 1113d5: ff 76 28 pushl 0x28(%esi) 1113d8: e8 eb b7 ff ff call 10cbc8 1113dd: 83 c4 10 add $0x10,%esp 1113e0: 85 c0 test %eax,%eax 1113e2: 75 27 jne 11140b <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 1113e4: 39 7e 24 cmp %edi,0x24(%esi) 1113e7: 0f 85 b9 fe ff ff jne 1112a6 <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 1113ed: 83 ec 0c sub $0xc,%esp 1113f0: ff 76 28 pushl 0x28(%esi) 1113f3: e8 cc b8 ff ff call 10ccc4 if (! PIPE_READWAIT(pipe)) 1113f8: 5a pop %edx 1113f9: 59 pop %ecx 1113fa: 6a 00 push $0x0 1113fc: ff 76 2c pushl 0x2c(%esi) 1113ff: e8 64 13 00 00 call 112768 111404: 83 c4 10 add $0x10,%esp 111407: 85 c0 test %eax,%eax 111409: 74 c5 je 1113d0 <== ALWAYS TAKEN goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 11140b: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 111410: 83 ec 08 sub $0x8,%esp 111413: ff 75 0c pushl 0xc(%ebp) 111416: ff 75 08 pushl 0x8(%ebp) 111419: e8 f6 fc ff ff call 111114 return err; 11141e: 83 c4 10 add $0x10,%esp 111421: e9 8e fe ff ff jmp 1112b4 111426: 66 90 xchg %ax,%ax <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 111428: ff 46 20 incl 0x20(%esi) if (pipe->Readers ++ == 0) 11142b: 8b 46 10 mov 0x10(%esi),%eax 11142e: 8d 50 01 lea 0x1(%eax),%edx 111431: 89 56 10 mov %edx,0x10(%esi) 111434: 85 c0 test %eax,%eax 111436: 0f 84 0c 01 00 00 je 111548 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 11143c: ff 46 24 incl 0x24(%esi) if (pipe->Writers ++ == 0) 11143f: 8b 46 14 mov 0x14(%esi),%eax 111442: 8d 50 01 lea 0x1(%eax),%edx 111445: 89 56 14 mov %edx,0x14(%esi) 111448: 85 c0 test %eax,%eax 11144a: 0f 85 56 fe ff ff jne 1112a6 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 111450: 83 ec 08 sub $0x8,%esp 111453: 8d 45 e4 lea -0x1c(%ebp),%eax 111456: 50 push %eax 111457: ff 76 2c pushl 0x2c(%esi) 11145a: e8 a5 12 00 00 call 112704 11145f: 83 c4 10 add $0x10,%esp 111462: e9 3f fe ff ff jmp 1112a6 111467: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 111468: ff 46 24 incl 0x24(%esi) if (pipe->Writers ++ == 0) 11146b: 8b 46 14 mov 0x14(%esi),%eax 11146e: 8d 50 01 lea 0x1(%eax),%edx 111471: 89 56 14 mov %edx,0x14(%esi) 111474: 85 c0 test %eax,%eax 111476: 0f 84 e4 00 00 00 je 111560 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 11147c: 8b 7e 10 mov 0x10(%esi),%edi 11147f: 85 ff test %edi,%edi 111481: 0f 85 1f fe ff ff jne 1112a6 111487: 8b 55 0c mov 0xc(%ebp),%edx 11148a: f6 42 14 01 testb $0x1,0x14(%edx) 11148e: 0f 85 e4 00 00 00 jne 111578 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 111494: 8b 7e 20 mov 0x20(%esi),%edi 111497: eb 24 jmp 1114bd 111499: 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)) 11149c: 50 push %eax 11149d: 6a 00 push $0x0 11149f: 6a 00 push $0x0 1114a1: ff 76 28 pushl 0x28(%esi) 1114a4: e8 1f b7 ff ff call 10cbc8 1114a9: 83 c4 10 add $0x10,%esp 1114ac: 85 c0 test %eax,%eax 1114ae: 0f 85 57 ff ff ff jne 11140b <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 1114b4: 39 7e 20 cmp %edi,0x20(%esi) 1114b7: 0f 85 e9 fd ff ff jne 1112a6 <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 1114bd: 83 ec 0c sub $0xc,%esp 1114c0: ff 76 28 pushl 0x28(%esi) 1114c3: e8 fc b7 ff ff call 10ccc4 if (! PIPE_WRITEWAIT(pipe)) 1114c8: 5a pop %edx 1114c9: 59 pop %ecx 1114ca: 6a 00 push $0x0 1114cc: ff 76 30 pushl 0x30(%esi) 1114cf: e8 94 12 00 00 call 112768 1114d4: 83 c4 10 add $0x10,%esp 1114d7: 85 c0 test %eax,%eax 1114d9: 74 c1 je 11149c <== ALWAYS TAKEN 1114db: e9 2b ff ff ff jmp 11140b <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 1114e0: 85 ff test %edi,%edi 1114e2: 75 10 jne 1114f4 <== NEVER TAKEN pipe_free(pipe); else *pipep = pipe; 1114e4: 8b 55 08 mov 0x8(%ebp),%edx 1114e7: 89 32 mov %esi,(%edx) } out: pipe_unlock(); 1114e9: e8 fe fb ff ff call 1110ec 1114ee: e9 8a fd ff ff jmp 11127d 1114f3: 90 nop <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 1114f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1114f7: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 1114fa: e8 75 11 00 00 call 112674 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 1114ff: 59 pop %ecx <== NOT EXECUTED 111500: ff 76 30 pushl 0x30(%esi) <== NOT EXECUTED 111503: e8 6c 11 00 00 call 112674 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 111508: 5a pop %edx <== NOT EXECUTED 111509: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 11150c: e8 13 b6 ff ff call 10cb24 <== NOT EXECUTED free(pipe->Buffer); 111511: 58 pop %eax <== NOT EXECUTED 111512: ff 36 pushl (%esi) <== NOT EXECUTED 111514: e8 6b 7b ff ff call 109084 <== NOT EXECUTED free(pipe); 111519: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 11151c: e8 63 7b ff ff call 109084 <== NOT EXECUTED 111521: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 111524: 89 fb mov %edi,%ebx <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); 111526: e8 c1 fb ff ff call 1110ec 11152b: e9 84 fd ff ff jmp 1112b4 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111530: 83 ec 08 sub $0x8,%esp 111533: 8d 45 e4 lea -0x1c(%ebp),%eax 111536: 50 push %eax 111537: ff 76 30 pushl 0x30(%esi) 11153a: e8 c5 11 00 00 call 112704 11153f: 83 c4 10 add $0x10,%esp 111542: e9 69 fe ff ff jmp 1113b0 111547: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 111548: 83 ec 08 sub $0x8,%esp 11154b: 8d 45 e4 lea -0x1c(%ebp),%eax 11154e: 50 push %eax 11154f: ff 76 30 pushl 0x30(%esi) 111552: e8 ad 11 00 00 call 112704 111557: 83 c4 10 add $0x10,%esp 11155a: e9 dd fe ff ff jmp 11143c 11155f: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 111560: 83 ec 08 sub $0x8,%esp 111563: 8d 45 e4 lea -0x1c(%ebp),%eax 111566: 50 push %eax 111567: ff 76 2c pushl 0x2c(%esi) 11156a: e8 95 11 00 00 call 112704 11156f: 83 c4 10 add $0x10,%esp 111572: e9 05 ff ff ff jmp 11147c 111577: 90 nop <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 111578: 83 ec 0c sub $0xc,%esp 11157b: ff 76 28 pushl 0x28(%esi) 11157e: e8 41 b7 ff ff call 10ccc4 err = -ENXIO; goto out_error; 111583: 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; 111586: bb fa ff ff ff mov $0xfffffffa,%ebx goto out_error; 11158b: e9 80 fe ff ff jmp 111410 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 111590: 83 ec 0c sub $0xc,%esp 111593: 8b 55 d4 mov -0x2c(%ebp),%edx 111596: ff 72 30 pushl 0x30(%edx) 111599: e8 d6 10 00 00 call 112674 11159e: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 1115a1: 83 ec 0c sub $0xc,%esp 1115a4: 8b 45 d4 mov -0x2c(%ebp),%eax 1115a7: ff 70 2c pushl 0x2c(%eax) 1115aa: e8 c5 10 00 00 call 112674 1115af: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 1115b2: 83 ec 0c sub $0xc,%esp 1115b5: 8b 55 d4 mov -0x2c(%ebp),%edx 1115b8: ff 32 pushl (%edx) 1115ba: e8 c5 7a ff ff call 109084 1115bf: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 1115c2: 83 ec 0c sub $0xc,%esp 1115c5: ff 75 d4 pushl -0x2c(%ebp) 1115c8: e8 b7 7a ff ff call 109084 1115cd: 83 c4 10 add $0x10,%esp { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 1115d0: bb f4 ff ff ff mov $0xfffffff4,%ebx 1115d5: e9 4c ff ff ff jmp 111526 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 1115da: 89 fb mov %edi,%ebx <== NOT EXECUTED 1115dc: e9 d3 fc ff ff jmp 1112b4 <== NOT EXECUTED =============================================================================== 0010fd10 : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 10fd10: 55 push %ebp 10fd11: 89 e5 mov %esp,%ebp 10fd13: 56 push %esi 10fd14: 53 push %ebx 10fd15: 8b 75 08 mov 0x8(%ebp),%esi 10fd18: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 10fd1b: 83 ec 08 sub $0x8,%esp 10fd1e: ff 33 pushl (%ebx) 10fd20: ff 36 pushl (%esi) 10fd22: e8 31 32 00 00 call 112f58 10fd27: 83 c4 10 add $0x10,%esp 10fd2a: 85 c0 test %eax,%eax 10fd2c: 75 12 jne 10fd40 return false; } else { fa->mount_h = entry->mount_h; 10fd2e: 8b 46 04 mov 0x4(%esi),%eax 10fd31: 89 43 04 mov %eax,0x4(%ebx) return true; 10fd34: b0 01 mov $0x1,%al } } 10fd36: 8d 65 f8 lea -0x8(%ebp),%esp 10fd39: 5b pop %ebx 10fd3a: 5e pop %esi 10fd3b: c9 leave 10fd3c: c3 ret 10fd3d: 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; 10fd40: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 10fd42: 8d 65 f8 lea -0x8(%ebp),%esp 10fd45: 5b pop %ebx 10fd46: 5e pop %esi 10fd47: c9 leave 10fd48: c3 ret =============================================================================== 00108c1c : long fpathconf( int fd, int name ) { 108c1c: 55 push %ebp 108c1d: 89 e5 mov %esp,%ebp 108c1f: 83 ec 08 sub $0x8,%esp 108c22: 8b 45 08 mov 0x8(%ebp),%eax 108c25: 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); 108c28: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108c2e: 0f 83 ac 00 00 00 jae 108ce0 iop = rtems_libio_iop(fd); 108c34: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx 108c3b: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax 108c42: 29 c8 sub %ecx,%eax 108c44: 03 05 c0 71 12 00 add 0x1271c0,%eax rtems_libio_check_is_open(iop); 108c4a: 8b 48 14 mov 0x14(%eax),%ecx 108c4d: f6 c5 01 test $0x1,%ch 108c50: 0f 84 8a 00 00 00 je 108ce0 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 108c56: 83 e1 02 and $0x2,%ecx 108c59: 74 08 je 108c63 <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108c5b: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108c5e: 83 fa 0b cmp $0xb,%edx 108c61: 76 15 jbe 108c78 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 108c63: e8 60 a8 00 00 call 1134c8 <__errno> 108c68: c7 00 16 00 00 00 movl $0x16,(%eax) 108c6e: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 108c73: c9 leave 108c74: c3 ret 108c75: 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 ) { 108c78: ff 24 95 38 19 12 00 jmp *0x121938(,%edx,4) 108c7f: 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; 108c80: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108c83: c9 leave 108c84: c3 ret 108c85: 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; 108c88: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108c8b: c9 leave 108c8c: c3 ret 108c8d: 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; 108c90: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108c93: c9 leave 108c94: c3 ret 108c95: 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; 108c98: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108c9b: c9 leave 108c9c: c3 ret 108c9d: 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; 108ca0: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108ca3: c9 leave 108ca4: c3 ret 108ca5: 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; 108ca8: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cab: c9 leave 108cac: c3 ret 108cad: 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; 108cb0: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cb3: c9 leave 108cb4: c3 ret 108cb5: 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; 108cb8: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cbb: c9 leave 108cbc: c3 ret 108cbd: 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; 108cc0: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cc3: c9 leave 108cc4: c3 ret 108cc5: 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; 108cc8: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108ccb: c9 leave 108ccc: c3 ret 108ccd: 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; 108cd0: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cd3: c9 leave 108cd4: c3 ret 108cd5: 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; 108cd8: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cdb: c9 leave 108cdc: c3 ret 108cdd: 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); 108ce0: e8 e3 a7 00 00 call 1134c8 <__errno> 108ce5: c7 00 09 00 00 00 movl $0x9,(%eax) 108ceb: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 108cf0: c9 leave 108cf1: c3 ret =============================================================================== 00108030 : #include void free( void *ptr ) { 108030: 55 push %ebp 108031: 89 e5 mov %esp,%ebp 108033: 53 push %ebx 108034: 83 ec 04 sub $0x4,%esp 108037: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 10803a: ff 05 8c 62 12 00 incl 0x12628c if ( !ptr ) 108040: 85 db test %ebx,%ebx 108042: 74 4b je 10808f #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108044: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 10804b: 74 47 je 108094 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 10804d: a1 68 46 12 00 mov 0x124668,%eax 108052: 85 c0 test %eax,%eax 108054: 74 0a je 108060 (*rtems_malloc_statistics_helpers->at_free)(ptr); 108056: 83 ec 0c sub $0xc,%esp 108059: 53 push %ebx 10805a: ff 50 08 call *0x8(%eax) 10805d: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 108060: 83 ec 08 sub $0x8,%esp 108063: 53 push %ebx 108064: ff 35 f8 21 12 00 pushl 0x1221f8 10806a: e8 3d 50 00 00 call 10d0ac <_Protected_heap_Free> 10806f: 83 c4 10 add $0x10,%esp 108072: 84 c0 test %al,%al 108074: 75 19 jne 10808f printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 108076: a1 f8 21 12 00 mov 0x1221f8,%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", 10807b: ff 70 1c pushl 0x1c(%eax) 10807e: ff 70 18 pushl 0x18(%eax) 108081: 53 push %ebx 108082: 68 90 fd 11 00 push $0x11fd90 108087: e8 9c 0d 00 00 call 108e28 10808c: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10808f: 8b 5d fc mov -0x4(%ebp),%ebx 108092: c9 leave 108093: 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() ) { 108094: e8 3b 01 00 00 call 1081d4 #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108099: 84 c0 test %al,%al 10809b: 75 b0 jne 10804d !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 10809d: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1080a0: 8b 5d fc mov -0x4(%ebp),%ebx 1080a3: 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); 1080a4: e9 97 01 00 00 jmp 108240 =============================================================================== 001093d0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 1093d0: 55 push %ebp <== NOT EXECUTED 1093d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1093d3: 53 push %ebx <== NOT EXECUTED 1093d4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1093d7: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 1093da: 81 fb 20 62 12 00 cmp $0x126220,%ebx <== NOT EXECUTED 1093e0: 74 26 je 109408 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 1093e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1093e5: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED 1093e8: 50 push %eax <== NOT EXECUTED 1093e9: e8 7e ef ff ff call 10836c <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 1093ee: 8d 43 18 lea 0x18(%ebx),%eax <== NOT EXECUTED 1093f1: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED 1093f4: e8 73 ef ff ff call 10836c <== NOT EXECUTED free(env); 1093f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1093fc: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1093ff: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109402: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 109403: e9 78 ef ff ff jmp 108380 <== NOT EXECUTED } } 109408: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10940b: c9 leave <== NOT EXECUTED 10940c: c3 ret <== NOT EXECUTED =============================================================================== 0011da90 : int fstat( int fd, struct stat *sbuf ) { 11da90: 55 push %ebp 11da91: 89 e5 mov %esp,%ebp 11da93: 57 push %edi 11da94: 53 push %ebx 11da95: 8b 45 08 mov 0x8(%ebp),%eax 11da98: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11da9b: 85 db test %ebx,%ebx 11da9d: 74 55 je 11daf4 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11da9f: 3b 05 ec 21 12 00 cmp 0x1221ec,%eax 11daa5: 73 39 jae 11dae0 11daa7: c1 e0 03 shl $0x3,%eax 11daaa: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 11dab1: 29 c2 sub %eax,%edx 11dab3: 03 15 60 62 12 00 add 0x126260,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11dab9: f6 42 15 01 testb $0x1,0x15(%edx) 11dabd: 74 21 je 11dae0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11dabf: b9 48 00 00 00 mov $0x48,%ecx 11dac4: 31 c0 xor %eax,%eax 11dac6: 89 df mov %ebx,%edi 11dac8: f3 aa rep stos %al,%es:(%edi) return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 11daca: 8b 42 20 mov 0x20(%edx),%eax 11dacd: 89 5d 0c mov %ebx,0xc(%ebp) 11dad0: 83 c2 18 add $0x18,%edx 11dad3: 89 55 08 mov %edx,0x8(%ebp) 11dad6: 8b 40 18 mov 0x18(%eax),%eax } 11dad9: 5b pop %ebx 11dada: 5f pop %edi 11dadb: 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 ); 11dadc: ff e0 jmp *%eax 11dade: 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); 11dae0: e8 03 49 ff ff call 1123e8 <__errno> 11dae5: 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 ); } 11daeb: b8 ff ff ff ff mov $0xffffffff,%eax 11daf0: 5b pop %ebx 11daf1: 5f pop %edi 11daf2: c9 leave 11daf3: c3 ret /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 11daf4: e8 ef 48 ff ff call 1123e8 <__errno> 11daf9: c7 00 0e 00 00 00 movl $0xe,(%eax) 11daff: eb ea jmp 11daeb =============================================================================== 00108e10 : #include int fsync( int fd ) { 108e10: 55 push %ebp 108e11: 89 e5 mov %esp,%ebp 108e13: 83 ec 08 sub $0x8,%esp 108e16: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108e19: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 108e1f: 73 2f jae 108e50 iop = rtems_libio_iop( fd ); 108e21: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 108e28: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax 108e2f: 29 d0 sub %edx,%eax 108e31: 03 05 c0 71 12 00 add 0x1271c0,%eax rtems_libio_check_is_open(iop); 108e37: 8b 50 14 mov 0x14(%eax),%edx 108e3a: f6 c6 01 test $0x1,%dh 108e3d: 74 11 je 108e50 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 108e3f: 83 e2 04 and $0x4,%edx 108e42: 74 20 je 108e64 /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108e44: 8b 50 20 mov 0x20(%eax),%edx 108e47: 89 45 08 mov %eax,0x8(%ebp) 108e4a: 8b 42 28 mov 0x28(%edx),%eax } 108e4d: c9 leave /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 108e4e: ff e0 jmp *%eax { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 108e50: e8 73 a6 00 00 call 1134c8 <__errno> 108e55: c7 00 09 00 00 00 movl $0x9,(%eax) /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 108e5b: b8 ff ff ff ff mov $0xffffffff,%eax 108e60: c9 leave 108e61: c3 ret 108e62: 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 ); 108e64: e8 5f a6 00 00 call 1134c8 <__errno> 108e69: c7 00 16 00 00 00 movl $0x16,(%eax) 108e6f: eb ea jmp 108e5b =============================================================================== 0010fa20 : int ftruncate( int fd, off_t length ) { 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 3c sub $0x3c,%esp 10fa29: 8b 45 08 mov 0x8(%ebp),%eax 10fa2c: 8b 55 0c mov 0xc(%ebp),%edx 10fa2f: 8b 4d 10 mov 0x10(%ebp),%ecx 10fa32: 89 55 c0 mov %edx,-0x40(%ebp) 10fa35: 89 4d c4 mov %ecx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10fa38: 3b 05 ec 21 12 00 cmp 0x1221ec,%eax 10fa3e: 73 58 jae 10fa98 iop = rtems_libio_iop( fd ); 10fa40: c1 e0 03 shl $0x3,%eax 10fa43: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 10fa4a: 29 c3 sub %eax,%ebx 10fa4c: 03 1d 60 62 12 00 add 0x126260,%ebx rtems_libio_check_is_open(iop); 10fa52: f6 43 15 01 testb $0x1,0x15(%ebx) 10fa56: 74 40 je 10fa98 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10fa58: 8d 7d d4 lea -0x2c(%ebp),%edi 10fa5b: 8d 73 18 lea 0x18(%ebx),%esi 10fa5e: b9 05 00 00 00 mov $0x5,%ecx 10fa63: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10fa65: 83 ec 0c sub $0xc,%esp 10fa68: 8d 45 d4 lea -0x2c(%ebp),%eax 10fa6b: 50 push %eax 10fa6c: 8b 45 e0 mov -0x20(%ebp),%eax 10fa6f: ff 50 10 call *0x10(%eax) 10fa72: 83 c4 10 add $0x10,%esp 10fa75: 48 dec %eax 10fa76: 74 46 je 10fabe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10fa78: f6 43 14 04 testb $0x4,0x14(%ebx) 10fa7c: 74 2e je 10faac return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 10fa7e: 50 push %eax 10fa7f: 8b 43 20 mov 0x20(%ebx),%eax 10fa82: ff 75 c4 pushl -0x3c(%ebp) 10fa85: ff 75 c0 pushl -0x40(%ebp) 10fa88: 53 push %ebx 10fa89: ff 50 20 call *0x20(%eax) 10fa8c: 83 c4 10 add $0x10,%esp } 10fa8f: 8d 65 f4 lea -0xc(%ebp),%esp 10fa92: 5b pop %ebx 10fa93: 5e pop %esi 10fa94: 5f pop %edi 10fa95: c9 leave 10fa96: c3 ret 10fa97: 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); 10fa98: e8 4b 29 00 00 call 1123e8 <__errno> 10fa9d: c7 00 09 00 00 00 movl $0x9,(%eax) 10faa3: b8 ff ff ff ff mov $0xffffffff,%eax 10faa8: eb e5 jmp 10fa8f 10faaa: 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 ); 10faac: e8 37 29 00 00 call 1123e8 <__errno> 10fab1: c7 00 16 00 00 00 movl $0x16,(%eax) 10fab7: b8 ff ff ff ff mov $0xffffffff,%eax 10fabc: eb d1 jmp 10fa8f * 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 ); 10fabe: e8 25 29 00 00 call 1123e8 <__errno> <== NOT EXECUTED 10fac3: c7 00 15 00 00 00 movl $0x15,(%eax) <== NOT EXECUTED 10fac9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10face: eb bf jmp 10fa8f <== NOT EXECUTED =============================================================================== 0010826c : #include #include int getchark(void) { 10826c: 55 push %ebp 10826d: 89 e5 mov %esp,%ebp 10826f: 83 ec 08 sub $0x8,%esp if ( BSP_poll_char ) 108272: a1 c8 26 12 00 mov 0x1226c8,%eax 108277: 85 c0 test %eax,%eax 108279: 74 05 je 108280 return (*BSP_poll_char)(); return -1; } 10827b: c9 leave #include int getchark(void) { if ( BSP_poll_char ) return (*BSP_poll_char)(); 10827c: ff e0 jmp *%eax 10827e: 66 90 xchg %ax,%ax <== NOT EXECUTED return -1; } 108280: b8 ff ff ff ff mov $0xffffffff,%eax 108285: c9 leave 108286: c3 ret =============================================================================== 0011f448 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11f448: 55 push %ebp 11f449: 89 e5 mov %esp,%ebp 11f44b: 57 push %edi 11f44c: 56 push %esi 11f44d: 53 push %ebx 11f44e: 83 ec 2c sub $0x2c,%esp 11f451: 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 ); 11f454: 3b 05 4c 41 12 00 cmp 0x12414c,%eax 11f45a: 73 4c jae 11f4a8 <== NEVER TAKEN 11f45c: c1 e0 03 shl $0x3,%eax 11f45f: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 11f466: 29 c3 sub %eax,%ebx 11f468: 03 1d 00 83 12 00 add 0x128300,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11f46e: 8d 7d d4 lea -0x2c(%ebp),%edi 11f471: 8d 73 18 lea 0x18(%ebx),%esi 11f474: b9 05 00 00 00 mov $0x5,%ecx 11f479: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11f47b: 83 ec 0c sub $0xc,%esp 11f47e: 8d 45 d4 lea -0x2c(%ebp),%eax 11f481: 50 push %eax 11f482: 8b 45 e0 mov -0x20(%ebp),%eax 11f485: ff 50 10 call *0x10(%eax) 11f488: 83 c4 10 add $0x10,%esp 11f48b: 48 dec %eax 11f48c: 75 1e jne 11f4ac /* * 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 ); 11f48e: 50 push %eax 11f48f: 8b 43 20 mov 0x20(%ebx),%eax 11f492: ff 75 10 pushl 0x10(%ebp) 11f495: ff 75 0c pushl 0xc(%ebp) 11f498: 53 push %ebx 11f499: ff 50 08 call *0x8(%eax) 11f49c: 83 c4 10 add $0x10,%esp } 11f49f: 8d 65 f4 lea -0xc(%ebp),%esp 11f4a2: 5b pop %ebx 11f4a3: 5e pop %esi 11f4a4: 5f pop %edi 11f4a5: c9 leave 11f4a6: c3 ret 11f4a7: 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 ); 11f4a8: 31 db xor %ebx,%ebx <== NOT EXECUTED 11f4aa: eb c2 jmp 11f46e <== 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 ); 11f4ac: e8 67 3f ff ff call 113418 <__errno> 11f4b1: c7 00 14 00 00 00 movl $0x14,(%eax) 11f4b7: b8 ff ff ff ff mov $0xffffffff,%eax 11f4bc: eb e1 jmp 11f49f =============================================================================== 00108ab4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108ab4: 55 push %ebp 108ab5: 89 e5 mov %esp,%ebp 108ab7: 57 push %edi 108ab8: 56 push %esi 108ab9: 53 push %ebx 108aba: 83 ec 1c sub $0x1c,%esp 108abd: 89 c3 mov %eax,%ebx 108abf: 89 55 e4 mov %edx,-0x1c(%ebp) 108ac2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108ac4: e8 eb fe ff ff call 1089b4 if ((fp = fopen("/etc/group", "r")) == NULL) 108ac9: 83 ec 08 sub $0x8,%esp 108acc: 68 72 02 12 00 push $0x120272 108ad1: 68 59 17 12 00 push $0x121759 108ad6: e8 d9 af 00 00 call 113ab4 108adb: 89 c7 mov %eax,%edi 108add: 83 c4 10 add $0x10,%esp 108ae0: 85 c0 test %eax,%eax 108ae2: 75 22 jne 108b06 108ae4: e9 8b 00 00 00 jmp 108b74 108ae9: 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); 108aec: 83 ec 08 sub $0x8,%esp 108aef: 53 push %ebx 108af0: ff 36 pushl (%esi) 108af2: e8 35 bd 00 00 call 11482c 108af7: 83 c4 10 add $0x10,%esp 108afa: 85 c0 test %eax,%eax 108afc: 0f 94 c0 sete %al 108aff: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108b02: 85 c0 test %eax,%eax 108b04: 75 2e jne 108b34 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 108b06: 83 ec 0c sub $0xc,%esp 108b09: ff 75 0c pushl 0xc(%ebp) 108b0c: 8b 4d 08 mov 0x8(%ebp),%ecx 108b0f: 89 f2 mov %esi,%edx 108b11: 89 f8 mov %edi,%eax 108b13: e8 88 fc ff ff call 1087a0 108b18: 83 c4 10 add $0x10,%esp 108b1b: 85 c0 test %eax,%eax 108b1d: 74 31 je 108b50 goto error_einval; if (name) { 108b1f: 85 db test %ebx,%ebx 108b21: 75 c9 jne 108aec match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108b23: 0f b7 46 08 movzwl 0x8(%esi),%eax 108b27: 3b 45 e4 cmp -0x1c(%ebp),%eax 108b2a: 0f 94 c0 sete %al 108b2d: 0f b6 c0 movzbl %al,%eax } if (match) { 108b30: 85 c0 test %eax,%eax 108b32: 74 d2 je 108b06 fclose(fp); 108b34: 83 ec 0c sub $0xc,%esp 108b37: 57 push %edi 108b38: e8 73 a8 00 00 call 1133b0 *result = grp; 108b3d: 8b 45 10 mov 0x10(%ebp),%eax 108b40: 89 30 mov %esi,(%eax) return 0; 108b42: 83 c4 10 add $0x10,%esp 108b45: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108b47: 8d 65 f4 lea -0xc(%ebp),%esp 108b4a: 5b pop %ebx 108b4b: 5e pop %esi 108b4c: 5f pop %edi 108b4d: c9 leave 108b4e: c3 ret 108b4f: 90 nop <== NOT EXECUTED *result = grp; return 0; } } error_einval: fclose(fp); 108b50: 83 ec 0c sub $0xc,%esp 108b53: 57 push %edi 108b54: e8 57 a8 00 00 call 1133b0 rtems_set_errno_and_return_minus_one( EINVAL ); 108b59: e8 fa a6 00 00 call 113258 <__errno> 108b5e: c7 00 16 00 00 00 movl $0x16,(%eax) 108b64: 83 c4 10 add $0x10,%esp 108b67: b8 ff ff ff ff mov $0xffffffff,%eax } 108b6c: 8d 65 f4 lea -0xc(%ebp),%esp 108b6f: 5b pop %ebx 108b70: 5e pop %esi 108b71: 5f pop %edi 108b72: c9 leave 108b73: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108b74: e8 df a6 00 00 call 113258 <__errno> 108b79: c7 00 16 00 00 00 movl $0x16,(%eax) 108b7f: 83 c8 ff or $0xffffffff,%eax 108b82: eb c3 jmp 108b47 =============================================================================== 00108e6c : struct group *getgrent(void) { 108e6c: 55 push %ebp 108e6d: 89 e5 mov %esp,%ebp 108e6f: 83 ec 08 sub $0x8,%esp if (group_fp == NULL) 108e72: a1 a0 6e 12 00 mov 0x126ea0,%eax 108e77: 85 c0 test %eax,%eax 108e79: 75 05 jne 108e80 return NULL; 108e7b: 31 c0 xor %eax,%eax if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } 108e7d: c9 leave 108e7e: c3 ret 108e7f: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108e80: 83 ec 0c sub $0xc,%esp 108e83: 68 c8 00 00 00 push $0xc8 108e88: b9 c0 6e 12 00 mov $0x126ec0,%ecx 108e8d: ba a4 6e 12 00 mov $0x126ea4,%edx 108e92: e8 09 f9 ff ff call 1087a0 108e97: 83 c4 10 add $0x10,%esp 108e9a: 85 c0 test %eax,%eax 108e9c: 74 df je 108e7d return NULL; return &grent; 108e9e: b8 a4 6e 12 00 mov $0x126ea4,%eax } 108ea3: c9 leave 108ea4: c3 ret =============================================================================== 00108e38 : } struct group *getgrgid( gid_t gid ) { 108e38: 55 push %ebp 108e39: 89 e5 mov %esp,%ebp 108e3b: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrgid_r(gid, &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 6e 12 00 push $0x126ec0 108e4c: 68 a4 6e 12 00 push $0x126ea4 108e51: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108e55: 50 push %eax 108e56: e8 b1 ff ff ff call 108e0c 108e5b: 83 c4 20 add $0x20,%esp 108e5e: 85 c0 test %eax,%eax 108e60: 75 06 jne 108e68 return NULL; return p; 108e62: 8b 45 f4 mov -0xc(%ebp),%eax } 108e65: c9 leave 108e66: c3 ret 108e67: 90 nop <== NOT EXECUTED ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108e68: 31 c0 xor %eax,%eax return p; } 108e6a: c9 leave 108e6b: c3 ret =============================================================================== 00108dd8 : } struct group *getgrnam( const char *name ) { 108dd8: 55 push %ebp 108dd9: 89 e5 mov %esp,%ebp 108ddb: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108dde: 8d 45 f4 lea -0xc(%ebp),%eax 108de1: 50 push %eax 108de2: 68 c8 00 00 00 push $0xc8 108de7: 68 c0 6e 12 00 push $0x126ec0 108dec: 68 a4 6e 12 00 push $0x126ea4 108df1: ff 75 08 pushl 0x8(%ebp) 108df4: e8 b3 ff ff ff call 108dac 108df9: 83 c4 20 add $0x20,%esp 108dfc: 85 c0 test %eax,%eax 108dfe: 75 08 jne 108e08 return NULL; return p; 108e00: 8b 45 f4 mov -0xc(%ebp),%eax } 108e03: c9 leave 108e04: c3 ret 108e05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) return NULL; 108e08: 31 c0 xor %eax,%eax return p; } 108e0a: c9 leave 108e0b: c3 ret =============================================================================== 00108578 : */ int getlogin_r( char *name, size_t namesize ) { 108578: 55 push %ebp 108579: 89 e5 mov %esp,%ebp 10857b: 53 push %ebx 10857c: 83 ec 04 sub $0x4,%esp 10857f: 8b 5d 08 mov 0x8(%ebp),%ebx struct passwd *pw; if ( !name ) 108582: 85 db test %ebx,%ebx 108584: 74 42 je 1085c8 return EFAULT; if ( namesize < LOGIN_NAME_MAX ) 108586: 83 7d 0c 08 cmpl $0x8,0xc(%ebp) 10858a: 77 0c ja 108598 return ERANGE; 10858c: b8 22 00 00 00 mov $0x22,%eax strcpy( name, "" ); } else { strncpy( name, pw->pw_name, LOGIN_NAME_MAX ); } return 0; } 108591: 8b 5d fc mov -0x4(%ebp),%ebx 108594: c9 leave 108595: c3 ret 108596: 66 90 xchg %ax,%ax <== NOT EXECUTED return EFAULT; if ( namesize < LOGIN_NAME_MAX ) return ERANGE; pw = getpwuid(getuid()); 108598: e8 e7 09 00 00 call 108f84 10859d: 83 ec 0c sub $0xc,%esp 1085a0: 0f b7 c0 movzwl %ax,%eax 1085a3: 50 push %eax 1085a4: e8 37 07 00 00 call 108ce0 if ( !pw ) { 1085a9: 83 c4 10 add $0x10,%esp 1085ac: 85 c0 test %eax,%eax 1085ae: 74 20 je 1085d0 strcpy( name, "" ); } else { strncpy( name, pw->pw_name, LOGIN_NAME_MAX ); 1085b0: 52 push %edx 1085b1: 6a 09 push $0x9 1085b3: ff 30 pushl (%eax) 1085b5: 53 push %ebx 1085b6: e8 f1 c3 00 00 call 1149ac 1085bb: 83 c4 10 add $0x10,%esp } return 0; 1085be: 31 c0 xor %eax,%eax } 1085c0: 8b 5d fc mov -0x4(%ebp),%ebx 1085c3: c9 leave 1085c4: c3 ret 1085c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct passwd *pw; if ( !name ) return EFAULT; 1085c8: b8 0e 00 00 00 mov $0xe,%eax 1085cd: eb c2 jmp 108591 1085cf: 90 nop <== NOT EXECUTED if ( namesize < LOGIN_NAME_MAX ) return ERANGE; pw = getpwuid(getuid()); if ( !pw ) { strcpy( name, "" ); 1085d0: c6 03 00 movb $0x0,(%ebx) 1085d3: eb bc jmp 108591 =============================================================================== 00108b84 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108b84: 55 push %ebp 108b85: 89 e5 mov %esp,%ebp 108b87: 57 push %edi 108b88: 56 push %esi 108b89: 53 push %ebx 108b8a: 83 ec 1c sub $0x1c,%esp 108b8d: 89 c3 mov %eax,%ebx 108b8f: 89 55 e4 mov %edx,-0x1c(%ebp) 108b92: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108b94: e8 1b fe ff ff call 1089b4 if ((fp = fopen("/etc/passwd", "r")) == NULL) 108b99: 83 ec 08 sub $0x8,%esp 108b9c: 68 72 02 12 00 push $0x120272 108ba1: 68 4d 17 12 00 push $0x12174d 108ba6: e8 09 af 00 00 call 113ab4 108bab: 89 c7 mov %eax,%edi 108bad: 83 c4 10 add $0x10,%esp 108bb0: 85 c0 test %eax,%eax 108bb2: 75 22 jne 108bd6 108bb4: e9 8b 00 00 00 jmp 108c44 108bb9: 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); 108bbc: 83 ec 08 sub $0x8,%esp 108bbf: 53 push %ebx 108bc0: ff 36 pushl (%esi) 108bc2: e8 65 bc 00 00 call 11482c 108bc7: 83 c4 10 add $0x10,%esp 108bca: 85 c0 test %eax,%eax 108bcc: 0f 94 c0 sete %al 108bcf: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 108bd2: 85 c0 test %eax,%eax 108bd4: 75 2e jne 108c04 if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 108bd6: 83 ec 0c sub $0xc,%esp 108bd9: ff 75 0c pushl 0xc(%ebp) 108bdc: 8b 4d 08 mov 0x8(%ebp),%ecx 108bdf: 89 f2 mov %esi,%edx 108be1: 89 f8 mov %edi,%eax 108be3: e8 d0 fc ff ff call 1088b8 108be8: 83 c4 10 add $0x10,%esp 108beb: 85 c0 test %eax,%eax 108bed: 74 31 je 108c20 goto error_einval; if (name) { 108bef: 85 db test %ebx,%ebx 108bf1: 75 c9 jne 108bbc match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 108bf3: 0f b7 46 08 movzwl 0x8(%esi),%eax 108bf7: 3b 45 e4 cmp -0x1c(%ebp),%eax 108bfa: 0f 94 c0 sete %al 108bfd: 0f b6 c0 movzbl %al,%eax } if (match) { 108c00: 85 c0 test %eax,%eax 108c02: 74 d2 je 108bd6 fclose(fp); 108c04: 83 ec 0c sub $0xc,%esp 108c07: 57 push %edi 108c08: e8 a3 a7 00 00 call 1133b0 *result = pwd; 108c0d: 8b 45 10 mov 0x10(%ebp),%eax 108c10: 89 30 mov %esi,(%eax) return 0; 108c12: 83 c4 10 add $0x10,%esp 108c15: 31 c0 xor %eax,%eax } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 108c17: 8d 65 f4 lea -0xc(%ebp),%esp 108c1a: 5b pop %ebx 108c1b: 5e pop %esi 108c1c: 5f pop %edi 108c1d: c9 leave 108c1e: c3 ret 108c1f: 90 nop <== NOT EXECUTED *result = pwd; return 0; } } error_einval: fclose(fp); 108c20: 83 ec 0c sub $0xc,%esp 108c23: 57 push %edi 108c24: e8 87 a7 00 00 call 1133b0 rtems_set_errno_and_return_minus_one( EINVAL ); 108c29: e8 2a a6 00 00 call 113258 <__errno> 108c2e: c7 00 16 00 00 00 movl $0x16,(%eax) 108c34: 83 c4 10 add $0x10,%esp 108c37: b8 ff ff ff ff mov $0xffffffff,%eax } 108c3c: 8d 65 f4 lea -0xc(%ebp),%esp 108c3f: 5b pop %ebx 108c40: 5e pop %esi 108c41: 5f pop %edi 108c42: c9 leave 108c43: c3 ret int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 108c44: e8 0f a6 00 00 call 113258 <__errno> 108c49: c7 00 16 00 00 00 movl $0x16,(%eax) 108c4f: 83 c8 ff or $0xffffffff,%eax 108c52: eb c3 jmp 108c17 =============================================================================== 00108d14 : struct passwd *getpwent(void) { 108d14: 55 push %ebp 108d15: 89 e5 mov %esp,%ebp 108d17: 83 ec 08 sub $0x8,%esp if (passwd_fp == NULL) 108d1a: a1 88 6f 12 00 mov 0x126f88,%eax 108d1f: 85 c0 test %eax,%eax 108d21: 75 05 jne 108d28 return NULL; 108d23: 31 c0 xor %eax,%eax if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } 108d25: c9 leave 108d26: c3 ret 108d27: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108d28: 83 ec 0c sub $0xc,%esp 108d2b: 68 c8 00 00 00 push $0xc8 108d30: b9 c0 6f 12 00 mov $0x126fc0,%ecx 108d35: ba 8c 6f 12 00 mov $0x126f8c,%edx 108d3a: e8 79 fb ff ff call 1088b8 108d3f: 83 c4 10 add $0x10,%esp 108d42: 85 c0 test %eax,%eax 108d44: 74 df je 108d25 return NULL; return &pwent; 108d46: b8 8c 6f 12 00 mov $0x126f8c,%eax } 108d4b: c9 leave 108d4c: c3 ret =============================================================================== 00108c80 : } struct passwd *getpwnam( const char *name ) { 108c80: 55 push %ebp 108c81: 89 e5 mov %esp,%ebp 108c83: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108c86: 8d 45 f4 lea -0xc(%ebp),%eax 108c89: 50 push %eax 108c8a: 68 c8 00 00 00 push $0xc8 108c8f: 68 c0 6f 12 00 push $0x126fc0 108c94: 68 8c 6f 12 00 push $0x126f8c 108c99: ff 75 08 pushl 0x8(%ebp) 108c9c: e8 b3 ff ff ff call 108c54 108ca1: 83 c4 20 add $0x20,%esp 108ca4: 85 c0 test %eax,%eax 108ca6: 75 08 jne 108cb0 return NULL; return p; 108ca8: 8b 45 f4 mov -0xc(%ebp),%eax } 108cab: c9 leave 108cac: c3 ret 108cad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108cb0: 31 c0 xor %eax,%eax return p; } 108cb2: c9 leave 108cb3: c3 ret =============================================================================== 00108ce0 : } struct passwd *getpwuid( uid_t uid ) { 108ce0: 55 push %ebp 108ce1: 89 e5 mov %esp,%ebp 108ce3: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwuid_r(uid, &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 6f 12 00 push $0x126fc0 108cf4: 68 8c 6f 12 00 push $0x126f8c 108cf9: 0f b7 45 08 movzwl 0x8(%ebp),%eax 108cfd: 50 push %eax 108cfe: e8 b1 ff ff ff call 108cb4 108d03: 83 c4 20 add $0x20,%esp 108d06: 85 c0 test %eax,%eax 108d08: 75 06 jne 108d10 return NULL; return p; 108d0a: 8b 45 f4 mov -0xc(%ebp),%eax } 108d0d: c9 leave 108d0e: c3 ret 108d0f: 90 nop <== NOT EXECUTED ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) return NULL; 108d10: 31 c0 xor %eax,%eax return p; } 108d12: c9 leave 108d13: c3 ret =============================================================================== 0010823c : #include #include int getrusage(int who, struct rusage *usage) { 10823c: 55 push %ebp 10823d: 89 e5 mov %esp,%ebp 10823f: 56 push %esi 108240: 53 push %ebx 108241: 83 ec 10 sub $0x10,%esp 108244: 8b 45 08 mov 0x8(%ebp),%eax 108247: 8b 5d 0c mov 0xc(%ebp),%ebx struct timespec uptime; struct timeval rtime; if ( !usage ) 10824a: 85 db test %ebx,%ebx 10824c: 74 70 je 1082be * 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) { 10824e: 85 c0 test %eax,%eax 108250: 74 32 je 108284 usage->ru_stime = rtime; return 0; } if (who == RUSAGE_CHILDREN) { 108252: 40 inc %eax 108253: 74 17 je 10826c rtems_set_errno_and_return_minus_one( ENOSYS ); } rtems_set_errno_and_return_minus_one( EINVAL ); 108255: e8 ae a3 00 00 call 112608 <__errno> 10825a: c7 00 16 00 00 00 movl $0x16,(%eax) 108260: b8 ff ff ff ff mov $0xffffffff,%eax } 108265: 8d 65 f8 lea -0x8(%ebp),%esp 108268: 5b pop %ebx 108269: 5e pop %esi 10826a: c9 leave 10826b: c3 ret return 0; } if (who == RUSAGE_CHILDREN) { rtems_set_errno_and_return_minus_one( ENOSYS ); 10826c: e8 97 a3 00 00 call 112608 <__errno> 108271: c7 00 58 00 00 00 movl $0x58,(%eax) 108277: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_set_errno_and_return_minus_one( EINVAL ); } 10827c: 8d 65 f8 lea -0x8(%ebp),%esp 10827f: 5b pop %ebx 108280: 5e pop %esi 108281: c9 leave 108282: c3 ret 108283: 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 ); 108284: 83 ec 0c sub $0xc,%esp 108287: 8d 45 f0 lea -0x10(%ebp),%eax 10828a: 50 push %eax 10828b: e8 d0 2f 00 00 call 10b260 rtime.tv_sec = uptime.tv_sec; 108290: 8b 4d f0 mov -0x10(%ebp),%ecx rtime.tv_usec = uptime.tv_nsec / 1000; 108293: 8b 75 f4 mov -0xc(%ebp),%esi 108296: b8 d3 4d 62 10 mov $0x10624dd3,%eax 10829b: f7 ee imul %esi 10829d: 89 d0 mov %edx,%eax 10829f: c1 f8 06 sar $0x6,%eax 1082a2: c1 fe 1f sar $0x1f,%esi 1082a5: 29 f0 sub %esi,%eax 1082a7: 89 0b mov %ecx,(%ebx) 1082a9: 89 43 04 mov %eax,0x4(%ebx) 1082ac: 89 4b 08 mov %ecx,0x8(%ebx) 1082af: 89 43 0c mov %eax,0xc(%ebx) usage->ru_utime = rtime; usage->ru_stime = rtime; return 0; 1082b2: 83 c4 10 add $0x10,%esp 1082b5: 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 ); } 1082b7: 8d 65 f8 lea -0x8(%ebp),%esp 1082ba: 5b pop %ebx 1082bb: 5e pop %esi 1082bc: c9 leave 1082bd: c3 ret { struct timespec uptime; struct timeval rtime; if ( !usage ) rtems_set_errno_and_return_minus_one( EFAULT ); 1082be: e8 45 a3 00 00 call 112608 <__errno> 1082c3: c7 00 0e 00 00 00 movl $0xe,(%eax) 1082c9: b8 ff ff ff ff mov $0xffffffff,%eax 1082ce: eb 95 jmp 108265 =============================================================================== 001080ac : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 1080ac: 55 push %ebp 1080ad: 89 e5 mov %esp,%ebp 1080af: 56 push %esi 1080b0: 53 push %ebx 1080b1: 83 ec 10 sub $0x10,%esp 1080b4: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 1080b7: 85 db test %ebx,%ebx 1080b9: 74 39 je 1080f4 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 1080bb: 9c pushf 1080bc: fa cli 1080bd: 5e pop %esi _TOD_Get( &now ); 1080be: 83 ec 0c sub $0xc,%esp 1080c1: 8d 45 f0 lea -0x10(%ebp),%eax 1080c4: 50 push %eax 1080c5: e8 6a 43 00 00 call 10c434 <_TOD_Get> _ISR_Enable(level); 1080ca: 56 push %esi 1080cb: 9d popf useconds = (suseconds_t)now.tv_nsec; 1080cc: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1080cf: 8b 45 f0 mov -0x10(%ebp),%eax 1080d2: 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; 1080d4: b8 d3 4d 62 10 mov $0x10624dd3,%eax 1080d9: f7 e9 imul %ecx 1080db: 89 d0 mov %edx,%eax 1080dd: c1 f8 06 sar $0x6,%eax 1080e0: c1 f9 1f sar $0x1f,%ecx 1080e3: 29 c8 sub %ecx,%eax 1080e5: 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; 1080e8: 83 c4 10 add $0x10,%esp 1080eb: 31 c0 xor %eax,%eax } 1080ed: 8d 65 f8 lea -0x8(%ebp),%esp 1080f0: 5b pop %ebx 1080f1: 5e pop %esi 1080f2: c9 leave 1080f3: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 1080f4: e8 ef a2 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1080f9: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1080ff: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108104: eb e7 jmp 1080ed <== NOT EXECUTED =============================================================================== 00111d20 : rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111d20: 55 push %ebp 111d21: 89 e5 mov %esp,%ebp 111d23: 57 push %edi 111d24: 56 push %esi 111d25: 53 push %ebx 111d26: 83 ec 1c sub $0x1c,%esp 111d29: 8b 5d 08 mov 0x8(%ebp),%ebx switch( whence ) { 111d2c: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 111d30: 76 1e jbe 111d50 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 ); 111d32: e8 b1 06 00 00 call 1123e8 <__errno> 111d37: c7 00 16 00 00 00 movl $0x16,(%eax) 111d3d: b8 ff ff ff ff mov $0xffffffff,%eax 111d42: ba ff ff ff ff mov $0xffffffff,%edx break; } return 0; } 111d47: 8d 65 f4 lea -0xc(%ebp),%esp 111d4a: 5b pop %ebx 111d4b: 5e pop %esi 111d4c: 5f pop %edi 111d4d: c9 leave 111d4e: c3 ret 111d4f: 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)) * 111d50: 6a 00 push $0x0 111d52: 68 10 01 00 00 push $0x110 111d57: ff 73 10 pushl 0x10(%ebx) 111d5a: ff 73 0c pushl 0xc(%ebx) 111d5d: e8 b6 b7 00 00 call 11d518 <__divdi3> 111d62: 83 c4 10 add $0x10,%esp 111d65: 69 ca 10 01 00 00 imul $0x110,%edx,%ecx 111d6b: be 10 01 00 00 mov $0x110,%esi 111d70: f7 e6 mul %esi 111d72: 89 45 e0 mov %eax,-0x20(%ebp) 111d75: 01 ca add %ecx,%edx 111d77: 89 55 e4 mov %edx,-0x1c(%ebp) 111d7a: 8b 45 e0 mov -0x20(%ebp),%eax 111d7d: 8b 55 e4 mov -0x1c(%ebp),%edx 111d80: 89 43 0c mov %eax,0xc(%ebx) 111d83: 89 53 10 mov %edx,0x10(%ebx) default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 111d86: 31 c0 xor %eax,%eax 111d88: 31 d2 xor %edx,%edx } 111d8a: 8d 65 f4 lea -0xc(%ebp),%esp 111d8d: 5b pop %ebx 111d8e: 5e pop %esi 111d8f: 5f pop %edi 111d90: c9 leave 111d91: c3 ret =============================================================================== 00111b84 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 111b84: 55 push %ebp 111b85: 89 e5 mov %esp,%ebp 111b87: 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 ) 111b8a: 8b 50 18 mov 0x18(%eax),%edx 111b8d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 111b91: 74 09 je 111b9c <== ALWAYS TAKEN return -1; /* It wasn't a directory --> return error */ 111b93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED iop->offset = 0; return 0; } 111b98: c9 leave <== NOT EXECUTED 111b99: c3 ret <== NOT EXECUTED 111b9a: 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; 111b9c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 111ba3: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) return 0; 111baa: 31 c0 xor %eax,%eax } 111bac: c9 leave 111bad: c3 ret =============================================================================== 00111bb0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 111bb0: 55 push %ebp 111bb1: 89 e5 mov %esp,%ebp 111bb3: 57 push %edi 111bb4: 56 push %esi 111bb5: 53 push %ebx 111bb6: 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; 111bbc: 8b 55 08 mov 0x8(%ebp),%edx 111bbf: 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)); 111bc2: 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; 111bc5: 83 c0 54 add $0x54,%eax 111bc8: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 111bce: 39 c3 cmp %eax,%ebx 111bd0: 0f 84 2a 01 00 00 je 111d00 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 111bd6: 8b 42 0c mov 0xc(%edx),%eax 111bd9: 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); 111bdf: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 111be4: 8b 45 10 mov 0x10(%ebp),%eax 111be7: f7 e2 mul %edx 111be9: c1 ea 08 shr $0x8,%edx 111bec: 89 d0 mov %edx,%eax 111bee: c1 e0 04 shl $0x4,%eax 111bf1: c1 e2 08 shl $0x8,%edx 111bf4: 8d 14 10 lea (%eax,%edx,1),%edx 111bf7: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx 111bfd: 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 ( 111c03: 85 d2 test %edx,%edx 111c05: 0f 8e f5 00 00 00 jle 111d00 <== NEVER TAKEN 111c0b: 31 d2 xor %edx,%edx 111c0d: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 111c14: 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 ); 111c17: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 111c1d: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 111c23: eb 23 jmp 111c48 111c25: 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; 111c28: 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( 111c2a: 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 ( 111c30: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 111c36: 0f 8e b4 00 00 00 jle 111cf0 <== 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 ) ){ 111c3c: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 111c42: 0f 84 a8 00 00 00 je 111cf0 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 111c48: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 111c4e: 7f d8 jg 111c28 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 111c50: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 111c56: 89 d0 mov %edx,%eax 111c58: c1 f8 1f sar $0x1f,%eax 111c5b: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 111c61: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 111c68: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 111c6a: 8b 43 38 mov 0x38(%ebx),%eax 111c6d: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 111c73: 8d 73 0c lea 0xc(%ebx),%esi 111c76: 31 c0 xor %eax,%eax 111c78: b9 ff ff ff ff mov $0xffffffff,%ecx 111c7d: 89 f7 mov %esi,%edi 111c7f: f2 ae repnz scas %es:(%edi),%al 111c81: f7 d1 not %ecx 111c83: 49 dec %ecx 111c84: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 111c8b: 83 ec 08 sub $0x8,%esp 111c8e: 56 push %esi 111c8f: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 111c95: 50 push %eax 111c96: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 111c9c: e8 0f 13 00 00 call 112fb0 memcpy( 111ca1: 8b 45 0c mov 0xc(%ebp),%eax 111ca4: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 111caa: b9 44 00 00 00 mov $0x44,%ecx 111caf: 89 c7 mov %eax,%edi 111cb1: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 111cb7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 111cb9: 8b 45 08 mov 0x8(%ebp),%eax 111cbc: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 111cc3: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 111cc7: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 111cce: 01 00 00 111cd1: 83 c4 10 add $0x10,%esp 111cd4: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 111cda: 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( 111cdc: 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 ( 111ce2: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 111ce8: 0f 8f 4e ff ff ff jg 111c3c <== NEVER TAKEN 111cee: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 111cf0: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111cf6: 8d 65 f4 lea -0xc(%ebp),%esp 111cf9: 5b pop %ebx 111cfa: 5e pop %esi 111cfb: 5f pop %edi 111cfc: c9 leave 111cfd: c3 ret 111cfe: 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; 111d00: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 111d07: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 111d0a: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 111d10: 8d 65 f4 lea -0xc(%ebp),%esp 111d13: 5b pop %ebx 111d14: 5e pop %esi 111d15: 5f pop %edi 111d16: c9 leave 111d17: c3 ret =============================================================================== 00111e48 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 111e48: 55 push %ebp 111e49: 89 e5 mov %esp,%ebp 111e4b: 53 push %ebx 111e4c: 83 ec 04 sub $0x4,%esp 111e4f: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 111e52: 8b 18 mov (%eax),%ebx 111e54: 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 ) ) 111e57: 39 53 50 cmp %edx,0x50(%ebx) 111e5a: 75 44 jne 111ea0 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 111e5c: 8b 40 10 mov 0x10(%eax),%eax 111e5f: 3b 58 1c cmp 0x1c(%eax),%ebx 111e62: 74 24 je 111e88 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 111e64: 8b 4b 5c mov 0x5c(%ebx),%ecx 111e67: 85 c9 test %ecx,%ecx 111e69: 75 1d jne 111e88 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 111e6b: 83 ec 0c sub $0xc,%esp 111e6e: 53 push %ebx 111e6f: e8 88 d9 ff ff call 10f7fc IMFS_check_node_remove( the_jnode ); 111e74: 89 1c 24 mov %ebx,(%esp) 111e77: e8 c4 d9 ff ff call 10f840 return 0; 111e7c: 83 c4 10 add $0x10,%esp 111e7f: 31 c0 xor %eax,%eax } 111e81: 8b 5d fc mov -0x4(%ebp),%ebx 111e84: c9 leave 111e85: c3 ret 111e86: 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 ); 111e88: e8 5b 05 00 00 call 1123e8 <__errno> 111e8d: c7 00 10 00 00 00 movl $0x10,(%eax) 111e93: b8 ff ff ff ff mov $0xffffffff,%eax IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 111e98: 8b 5d fc mov -0x4(%ebp),%ebx 111e9b: c9 leave 111e9c: c3 ret 111e9d: 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 ); 111ea0: e8 43 05 00 00 call 1123e8 <__errno> 111ea5: c7 00 5a 00 00 00 movl $0x5a,(%eax) 111eab: b8 ff ff ff ff mov $0xffffffff,%eax 111eb0: eb cf jmp 111e81 =============================================================================== 001089b4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1089b4: 55 push %ebp 1089b5: 89 e5 mov %esp,%ebp 1089b7: 53 push %ebx 1089b8: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1089bb: 80 3d 88 70 12 00 00 cmpb $0x0,0x127088 1089c2: 74 08 je 1089cc fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 1089c4: 8b 5d fc mov -0x4(%ebp),%ebx 1089c7: c9 leave 1089c8: c3 ret 1089c9: 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; 1089cc: c6 05 88 70 12 00 01 movb $0x1,0x127088 mkdir("/etc", 0777); 1089d3: 83 ec 08 sub $0x8,%esp 1089d6: 68 ff 01 00 00 push $0x1ff 1089db: 68 48 17 12 00 push $0x121748 1089e0: e8 4b 08 00 00 call 109230 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 1089e5: 59 pop %ecx 1089e6: 5b pop %ebx 1089e7: 68 72 02 12 00 push $0x120272 1089ec: 68 4d 17 12 00 push $0x12174d 1089f1: e8 be b0 00 00 call 113ab4 1089f6: 83 c4 10 add $0x10,%esp 1089f9: 85 c0 test %eax,%eax 1089fb: 74 77 je 108a74 fclose(fp); 1089fd: 83 ec 0c sub $0xc,%esp 108a00: 50 push %eax 108a01: e8 aa a9 00 00 call 1133b0 108a06: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108a09: 83 ec 08 sub $0x8,%esp 108a0c: 68 72 02 12 00 push $0x120272 108a11: 68 59 17 12 00 push $0x121759 108a16: e8 99 b0 00 00 call 113ab4 108a1b: 83 c4 10 add $0x10,%esp 108a1e: 85 c0 test %eax,%eax 108a20: 74 12 je 108a34 fclose(fp); 108a22: 83 ec 0c sub $0xc,%esp 108a25: 50 push %eax 108a26: e8 85 a9 00 00 call 1133b0 108a2b: 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); } } 108a2e: 8b 5d fc mov -0x4(%ebp),%ebx 108a31: c9 leave 108a32: c3 ret 108a33: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108a34: 83 ec 08 sub $0x8,%esp 108a37: 68 54 01 12 00 push $0x120154 108a3c: 68 59 17 12 00 push $0x121759 108a41: e8 6e b0 00 00 call 113ab4 108a46: 89 c3 mov %eax,%ebx 108a48: 83 c4 10 add $0x10,%esp 108a4b: 85 c0 test %eax,%eax 108a4d: 0f 84 71 ff ff ff je 1089c4 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108a53: 50 push %eax 108a54: 6a 2a push $0x2a 108a56: 6a 01 push $0x1 108a58: 68 cc 17 12 00 push $0x1217cc 108a5d: e8 26 b8 00 00 call 114288 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108a62: 89 1c 24 mov %ebx,(%esp) 108a65: e8 46 a9 00 00 call 1133b0 108a6a: 83 c4 10 add $0x10,%esp 108a6d: e9 52 ff ff ff jmp 1089c4 108a72: 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) { 108a74: 83 ec 08 sub $0x8,%esp 108a77: 68 54 01 12 00 push $0x120154 108a7c: 68 4d 17 12 00 push $0x12174d 108a81: e8 2e b0 00 00 call 113ab4 108a86: 89 c3 mov %eax,%ebx 108a88: 83 c4 10 add $0x10,%esp 108a8b: 85 c0 test %eax,%eax 108a8d: 0f 84 76 ff ff ff je 108a09 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108a93: 50 push %eax 108a94: 6a 66 push $0x66 108a96: 6a 01 push $0x1 108a98: 68 64 17 12 00 push $0x121764 108a9d: e8 e6 b7 00 00 call 114288 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 108aa2: 89 1c 24 mov %ebx,(%esp) 108aa5: e8 06 a9 00 00 call 1133b0 108aaa: 83 c4 10 add $0x10,%esp 108aad: e9 57 ff ff ff jmp 108a09 =============================================================================== 0010a004 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 10a004: 55 push %ebp 10a005: 89 e5 mov %esp,%ebp 10a007: 56 push %esi 10a008: 53 push %ebx 10a009: 89 d6 mov %edx,%esi 10a00b: 88 c3 mov %al,%bl if (tty->termios.c_iflag & ISTRIP) 10a00d: 8b 42 30 mov 0x30(%edx),%eax 10a010: a8 20 test $0x20,%al 10a012: 74 03 je 10a017 <== ALWAYS TAKEN c &= 0x7f; 10a014: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 10a017: f6 c4 02 test $0x2,%ah 10a01a: 74 18 je 10a034 c = tolower (c); 10a01c: 0f b6 db movzbl %bl,%ebx 10a01f: 8b 15 54 41 12 00 mov 0x124154,%edx 10a025: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx 10a02a: 83 e2 03 and $0x3,%edx 10a02d: 4a dec %edx 10a02e: 0f 84 9c 00 00 00 je 10a0d0 if (c == '\r') { 10a034: 80 fb 0d cmp $0xd,%bl 10a037: 74 33 je 10a06c 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)) { 10a039: 80 fb 0a cmp $0xa,%bl 10a03c: 0f 84 86 00 00 00 je 10a0c8 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a042: 84 db test %bl,%bl 10a044: 75 3a jne 10a080 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 10a046: 8b 46 20 mov 0x20(%esi),%eax 10a049: 8b 15 b4 40 12 00 mov 0x1240b4,%edx 10a04f: 4a dec %edx 10a050: 39 d0 cmp %edx,%eax 10a052: 7d 1c jge 10a070 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 10a054: f6 46 3c 08 testb $0x8,0x3c(%esi) 10a058: 75 7e jne 10a0d8 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a05a: 8b 56 1c mov 0x1c(%esi),%edx 10a05d: 88 1c 02 mov %bl,(%edx,%eax,1) 10a060: 40 inc %eax 10a061: 89 46 20 mov %eax,0x20(%esi) } return 0; 10a064: 31 c0 xor %eax,%eax } 10a066: 5b pop %ebx 10a067: 5e pop %esi 10a068: c9 leave 10a069: c3 ret 10a06a: 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) 10a06c: a8 80 test $0x80,%al 10a06e: 74 08 je 10a078 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 10a070: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10a072: 5b pop %ebx <== NOT EXECUTED 10a073: 5e pop %esi <== NOT EXECUTED 10a074: c9 leave <== NOT EXECUTED 10a075: c3 ret <== NOT EXECUTED 10a076: 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) 10a078: f6 c4 01 test $0x1,%ah 10a07b: 74 03 je 10a080 <== NEVER TAKEN c = '\n'; 10a07d: b3 0a mov $0xa,%bl 10a07f: 90 nop } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a080: 8b 46 3c mov 0x3c(%esi),%eax 10a083: a8 02 test $0x2,%al 10a085: 74 bf je 10a046 <== NEVER TAKEN if (c == tty->termios.c_cc[VERASE]) { 10a087: 38 5e 43 cmp %bl,0x43(%esi) 10a08a: 0f 84 b0 00 00 00 je 10a140 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10a090: 38 5e 44 cmp %bl,0x44(%esi) 10a093: 74 63 je 10a0f8 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 10a095: 38 5e 45 cmp %bl,0x45(%esi) 10a098: 0f 84 96 00 00 00 je 10a134 <== NEVER TAKEN return 1; } else if (c == '\n') { 10a09e: 80 fb 0a cmp $0xa,%bl 10a0a1: 74 69 je 10a10c 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]) || 10a0a3: 38 5e 4c cmp %bl,0x4c(%esi) 10a0a6: 74 05 je 10a0ad <== NEVER TAKEN 10a0a8: 38 5e 51 cmp %bl,0x51(%esi) 10a0ab: 75 99 jne 10a046 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 10a0ad: a8 08 test $0x8,%al <== NOT EXECUTED 10a0af: 75 3b jne 10a0ec <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a0b1: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a0b4: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a0b7: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a0ba: 40 inc %eax <== NOT EXECUTED 10a0bb: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED return 1; 10a0be: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a0c3: eb a1 jmp 10a066 <== NOT EXECUTED 10a0c5: 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)) { 10a0c8: a8 40 test $0x40,%al 10a0ca: 74 b4 je 10a080 <== ALWAYS TAKEN c = '\r'; 10a0cc: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a0ce: eb b0 jmp 10a080 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a0d0: 83 c3 20 add $0x20,%ebx 10a0d3: e9 5c ff ff ff jmp 10a034 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a0d8: 0f b6 c3 movzbl %bl,%eax 10a0db: 89 f2 mov %esi,%edx 10a0dd: e8 f2 fc ff ff call 109dd4 10a0e2: 8b 46 20 mov 0x20(%esi),%eax 10a0e5: e9 70 ff ff ff jmp 10a05a 10a0ea: 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); 10a0ec: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a0ef: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a0f1: e8 de fc ff ff call 109dd4 <== NOT EXECUTED 10a0f6: eb b9 jmp 10a0b1 <== 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); 10a0f8: ba 01 00 00 00 mov $0x1,%edx 10a0fd: 89 f0 mov %esi,%eax 10a0ff: e8 34 fd ff ff call 109e38 return 0; 10a104: 31 c0 xor %eax,%eax 10a106: e9 5b ff ff ff jmp 10a066 10a10b: 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)) 10a10c: a8 48 test $0x48,%al 10a10e: 74 0c je 10a11c <== NEVER TAKEN echo (c, tty); 10a110: 89 f2 mov %esi,%edx 10a112: b8 0a 00 00 00 mov $0xa,%eax 10a117: e8 b8 fc ff ff call 109dd4 tty->cbuf[tty->ccount++] = c; 10a11c: 8b 46 20 mov 0x20(%esi),%eax 10a11f: 8b 56 1c mov 0x1c(%esi),%edx 10a122: c6 04 02 0a movb $0xa,(%edx,%eax,1) 10a126: 40 inc %eax 10a127: 89 46 20 mov %eax,0x20(%esi) return 1; 10a12a: b8 01 00 00 00 mov $0x1,%eax 10a12f: e9 32 ff ff ff jmp 10a066 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 10a134: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10a139: e9 28 ff ff ff jmp 10a066 <== NOT EXECUTED 10a13e: 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); 10a140: 31 d2 xor %edx,%edx 10a142: 89 f0 mov %esi,%eax 10a144: e8 ef fc ff ff call 109e38 return 0; 10a149: 31 c0 xor %eax,%eax 10a14b: e9 16 ff ff ff jmp 10a066 =============================================================================== 00123174 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 123174: 55 push %ebp <== NOT EXECUTED 123175: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 123177: 31 c0 xor %eax,%eax <== NOT EXECUTED 123179: c9 leave <== NOT EXECUTED 12317a: c3 ret <== NOT EXECUTED =============================================================================== 0011dc58 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11dc58: 55 push %ebp 11dc59: 89 e5 mov %esp,%ebp 11dc5b: 53 push %ebx 11dc5c: 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())) 11dc5f: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 11dc66: 74 08 je 11dc70 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 11dc68: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11dc6b: c9 leave <== NOT EXECUTED 11dc6c: c3 ret <== NOT EXECUTED 11dc6d: 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) { 11dc70: 8b 1d 20 07 12 00 mov 0x120720,%ebx 11dc76: 39 1d 60 41 12 00 cmp %ebx,0x124160 11dc7c: 74 12 je 11dc90 _wrapup_reent(_global_impure_ptr); 11dc7e: 83 ec 0c sub $0xc,%esp 11dc81: 53 push %ebx 11dc82: e8 ed 05 00 00 call 11e274 <_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; 11dc87: 89 1d 60 41 12 00 mov %ebx,0x124160 11dc8d: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11dc90: 83 ec 0c sub $0xc,%esp 11dc93: ff 73 04 pushl 0x4(%ebx) 11dc96: e8 a5 48 ff ff call 112540 fclose (stdout); 11dc9b: 5a pop %edx 11dc9c: a1 60 41 12 00 mov 0x124160,%eax 11dca1: ff 70 08 pushl 0x8(%eax) 11dca4: e8 97 48 ff ff call 112540 fclose (stderr); 11dca9: 58 pop %eax 11dcaa: a1 60 41 12 00 mov 0x124160,%eax 11dcaf: ff 70 0c pushl 0xc(%eax) 11dcb2: e8 89 48 ff ff call 112540 11dcb7: 83 c4 10 add $0x10,%esp } 11dcba: 8b 5d fc mov -0x4(%ebp),%ebx 11dcbd: c9 leave 11dcbe: c3 ret =============================================================================== 0010a3d8 : int link( const char *existing, const char *new ) { 10a3d8: 55 push %ebp 10a3d9: 89 e5 mov %esp,%ebp 10a3db: 57 push %edi 10a3dc: 56 push %esi 10a3dd: 53 push %ebx 10a3de: 83 ec 58 sub $0x58,%esp 10a3e1: 8b 55 08 mov 0x8(%ebp),%edx 10a3e4: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 10a3e7: 31 c0 xor %eax,%eax 10a3e9: b9 ff ff ff ff mov $0xffffffff,%ecx 10a3ee: 89 d7 mov %edx,%edi 10a3f0: f2 ae repnz scas %es:(%edi),%al 10a3f2: f7 d1 not %ecx 10a3f4: 49 dec %ecx 10a3f5: 6a 01 push $0x1 10a3f7: 8d 75 cc lea -0x34(%ebp),%esi 10a3fa: 56 push %esi 10a3fb: 6a 00 push $0x0 10a3fd: 51 push %ecx 10a3fe: 52 push %edx 10a3ff: e8 d8 fa ff ff call 109edc 0, &existing_loc, true ); if ( result != 0 ) 10a404: 83 c4 20 add $0x20,%esp 10a407: 85 c0 test %eax,%eax 10a409: 74 0d je 10a418 return -1; 10a40b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10a410: 8d 65 f4 lea -0xc(%ebp),%esp 10a413: 5b pop %ebx 10a414: 5e pop %esi 10a415: 5f pop %edi 10a416: c9 leave 10a417: c3 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 10a418: 52 push %edx 10a419: 8d 7d b8 lea -0x48(%ebp),%edi 10a41c: 57 push %edi 10a41d: 8d 45 e4 lea -0x1c(%ebp),%eax 10a420: 50 push %eax 10a421: 53 push %ebx 10a422: e8 05 13 00 00 call 10b72c result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 10a427: 83 c4 0c add $0xc,%esp 10a42a: 8d 45 e0 lea -0x20(%ebp),%eax 10a42d: 50 push %eax 10a42e: 57 push %edi 10a42f: 03 5d e4 add -0x1c(%ebp),%ebx 10a432: 53 push %ebx 10a433: 8b 45 c4 mov -0x3c(%ebp),%eax 10a436: ff 50 04 call *0x4(%eax) if ( result != 0 ) { 10a439: 83 c4 10 add $0x10,%esp 10a43c: 85 c0 test %eax,%eax 10a43e: 75 61 jne 10a4a1 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 10a440: 8b 45 dc mov -0x24(%ebp),%eax 10a443: 39 45 c8 cmp %eax,-0x38(%ebp) 10a446: 75 30 jne 10a478 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 ); 10a448: 50 push %eax 10a449: ff 75 e0 pushl -0x20(%ebp) 10a44c: 57 push %edi 10a44d: 56 push %esi 10a44e: 8b 45 c4 mov -0x3c(%ebp),%eax 10a451: ff 50 08 call *0x8(%eax) rtems_filesystem_freenode( &existing_loc ); 10a454: 89 34 24 mov %esi,(%esp) 10a457: 89 45 b4 mov %eax,-0x4c(%ebp) 10a45a: e8 81 fb ff ff call 109fe0 rtems_filesystem_freenode( &parent_loc ); 10a45f: 89 3c 24 mov %edi,(%esp) 10a462: e8 79 fb ff ff call 109fe0 return result; 10a467: 83 c4 10 add $0x10,%esp 10a46a: 8b 45 b4 mov -0x4c(%ebp),%eax } 10a46d: 8d 65 f4 lea -0xc(%ebp),%esp 10a470: 5b pop %ebx 10a471: 5e pop %esi 10a472: 5f pop %edi 10a473: c9 leave 10a474: c3 ret 10a475: 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 ); 10a478: 83 ec 0c sub $0xc,%esp 10a47b: 56 push %esi 10a47c: e8 5f fb ff ff call 109fe0 rtems_filesystem_freenode( &parent_loc ); 10a481: 89 3c 24 mov %edi,(%esp) 10a484: e8 57 fb ff ff call 109fe0 rtems_set_errno_and_return_minus_one( EXDEV ); 10a489: e8 8a aa 00 00 call 114f18 <__errno> 10a48e: c7 00 12 00 00 00 movl $0x12,(%eax) 10a494: 83 c4 10 add $0x10,%esp 10a497: b8 ff ff ff ff mov $0xffffffff,%eax 10a49c: e9 6f ff ff ff jmp 10a410 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 ); 10a4a1: 83 ec 0c sub $0xc,%esp 10a4a4: 56 push %esi 10a4a5: e8 36 fb ff ff call 109fe0 return -1; 10a4aa: 83 c4 10 add $0x10,%esp 10a4ad: b8 ff ff ff ff mov $0xffffffff,%eax 10a4b2: e9 59 ff ff ff jmp 10a410 =============================================================================== 0011db30 : off_t lseek( int fd, off_t offset, int whence ) { 11db30: 55 push %ebp 11db31: 89 e5 mov %esp,%ebp 11db33: 57 push %edi 11db34: 56 push %esi 11db35: 53 push %ebx 11db36: 83 ec 1c sub $0x1c,%esp 11db39: 8b 5d 08 mov 0x8(%ebp),%ebx 11db3c: 8b 55 0c mov 0xc(%ebp),%edx 11db3f: 8b 4d 10 mov 0x10(%ebp),%ecx 11db42: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11db45: 3b 1d ec 21 12 00 cmp 0x1221ec,%ebx 11db4b: 0f 83 b3 00 00 00 jae 11dc04 iop = rtems_libio_iop( fd ); 11db51: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 11db58: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx 11db5f: 29 f3 sub %esi,%ebx 11db61: 03 1d 60 62 12 00 add 0x126260,%ebx rtems_libio_check_is_open(iop); 11db67: f6 43 15 01 testb $0x1,0x15(%ebx) 11db6b: 0f 84 93 00 00 00 je 11dc04 /* * Now process the lseek(). */ old_offset = iop->offset; 11db71: 8b 73 0c mov 0xc(%ebx),%esi 11db74: 8b 7b 10 mov 0x10(%ebx),%edi 11db77: 89 75 e0 mov %esi,-0x20(%ebp) 11db7a: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11db7d: 83 f8 01 cmp $0x1,%eax 11db80: 74 6e je 11dbf0 11db82: 83 f8 02 cmp $0x2,%eax 11db85: 74 35 je 11dbbc 11db87: 85 c0 test %eax,%eax 11db89: 75 45 jne 11dbd0 case SEEK_SET: iop->offset = offset; 11db8b: 89 53 0c mov %edx,0xc(%ebx) 11db8e: 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 ); 11db91: 8b 73 20 mov 0x20(%ebx),%esi 11db94: 50 push %eax 11db95: 51 push %ecx 11db96: 52 push %edx 11db97: 53 push %ebx 11db98: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11db9b: 83 c4 10 add $0x10,%esp 11db9e: 89 c1 mov %eax,%ecx 11dba0: 21 d1 and %edx,%ecx 11dba2: 41 inc %ecx 11dba3: 75 0c jne 11dbb1 iop->offset = old_offset; 11dba5: 8b 75 e0 mov -0x20(%ebp),%esi 11dba8: 8b 7d e4 mov -0x1c(%ebp),%edi 11dbab: 89 73 0c mov %esi,0xc(%ebx) 11dbae: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11dbb1: 8d 65 f4 lea -0xc(%ebp),%esp 11dbb4: 5b pop %ebx 11dbb5: 5e pop %esi 11dbb6: 5f pop %edi 11dbb7: c9 leave 11dbb8: c3 ret 11dbb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 11dbbc: 89 d6 mov %edx,%esi 11dbbe: 89 cf mov %ecx,%edi 11dbc0: 03 73 04 add 0x4(%ebx),%esi 11dbc3: 13 7b 08 adc 0x8(%ebx),%edi 11dbc6: 89 73 0c mov %esi,0xc(%ebx) 11dbc9: 89 7b 10 mov %edi,0x10(%ebx) break; 11dbcc: eb c3 jmp 11db91 11dbce: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 11dbd0: e8 13 48 ff ff call 1123e8 <__errno> 11dbd5: c7 00 16 00 00 00 movl $0x16,(%eax) 11dbdb: b8 ff ff ff ff mov $0xffffffff,%eax 11dbe0: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11dbe5: 8d 65 f4 lea -0xc(%ebp),%esp 11dbe8: 5b pop %ebx 11dbe9: 5e pop %esi 11dbea: 5f pop %edi 11dbeb: c9 leave 11dbec: c3 ret 11dbed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 11dbf0: 8b 75 e0 mov -0x20(%ebp),%esi 11dbf3: 8b 7d e4 mov -0x1c(%ebp),%edi 11dbf6: 01 d6 add %edx,%esi 11dbf8: 11 cf adc %ecx,%edi 11dbfa: 89 73 0c mov %esi,0xc(%ebx) 11dbfd: 89 7b 10 mov %edi,0x10(%ebx) break; 11dc00: eb 8f jmp 11db91 11dc02: 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); 11dc04: e8 df 47 ff ff call 1123e8 <__errno> 11dc09: c7 00 09 00 00 00 movl $0x9,(%eax) 11dc0f: b8 ff ff ff ff mov $0xffffffff,%eax 11dc14: ba ff ff ff ff mov $0xffffffff,%edx 11dc19: eb 96 jmp 11dbb1 =============================================================================== 0010a270 : int _STAT_NAME( const char *path, struct stat *buf ) { 10a270: 55 push %ebp 10a271: 89 e5 mov %esp,%ebp 10a273: 57 push %edi 10a274: 56 push %esi 10a275: 53 push %ebx 10a276: 83 ec 3c sub $0x3c,%esp 10a279: 8b 55 08 mov 0x8(%ebp),%edx 10a27c: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10a27f: 85 f6 test %esi,%esi 10a281: 74 65 je 10a2e8 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10a283: b9 ff ff ff ff mov $0xffffffff,%ecx 10a288: 89 d7 mov %edx,%edi 10a28a: 31 c0 xor %eax,%eax 10a28c: f2 ae repnz scas %es:(%edi),%al 10a28e: f7 d1 not %ecx 10a290: 49 dec %ecx 10a291: 83 ec 0c sub $0xc,%esp 10a294: 6a 00 push $0x0 10a296: 8d 5d d4 lea -0x2c(%ebp),%ebx 10a299: 53 push %ebx 10a29a: 6a 00 push $0x0 10a29c: 51 push %ecx 10a29d: 52 push %edx 10a29e: e8 51 fb ff ff call 109df4 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10a2a3: 83 c4 20 add $0x20,%esp 10a2a6: 85 c0 test %eax,%eax 10a2a8: 74 0e je 10a2b8 return -1; 10a2aa: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a2af: 8d 65 f4 lea -0xc(%ebp),%esp 10a2b2: 5b pop %ebx 10a2b3: 5e pop %esi 10a2b4: 5f pop %edi 10a2b5: c9 leave 10a2b6: c3 ret 10a2b7: 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) ); 10a2b8: b9 48 00 00 00 mov $0x48,%ecx 10a2bd: 89 f7 mov %esi,%edi 10a2bf: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10a2c1: 83 ec 08 sub $0x8,%esp 10a2c4: 56 push %esi 10a2c5: 53 push %ebx 10a2c6: 8b 45 dc mov -0x24(%ebp),%eax 10a2c9: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 10a2cc: 89 1c 24 mov %ebx,(%esp) 10a2cf: 89 45 c4 mov %eax,-0x3c(%ebp) 10a2d2: e8 21 fc ff ff call 109ef8 return status; 10a2d7: 83 c4 10 add $0x10,%esp 10a2da: 8b 45 c4 mov -0x3c(%ebp),%eax } 10a2dd: 8d 65 f4 lea -0xc(%ebp),%esp 10a2e0: 5b pop %ebx 10a2e1: 5e pop %esi 10a2e2: 5f pop %edi 10a2e3: c9 leave 10a2e4: c3 ret 10a2e5: 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 ); 10a2e8: e8 d7 ab 00 00 call 114ec4 <__errno> 10a2ed: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a2f3: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a2f8: 8d 65 f4 lea -0xc(%ebp),%esp 10a2fb: 5b pop %ebx 10a2fc: 5e pop %esi 10a2fd: 5f pop %edi 10a2fe: c9 leave 10a2ff: c3 ret =============================================================================== 00108304 : #include "malloc_p.h" void *malloc( size_t size ) { 108304: 55 push %ebp 108305: 89 e5 mov %esp,%ebp 108307: 56 push %esi 108308: 53 push %ebx 108309: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 10830c: ff 05 84 62 12 00 incl 0x126284 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 108312: e8 fd fe ff ff call 108214 /* * Validate the parameters */ if ( !size ) 108317: 85 f6 test %esi,%esi 108319: 74 5d je 108378 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 10831b: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 108322: 74 48 je 10836c RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108324: 6a 00 push $0x0 108326: 6a 00 push $0x0 108328: 56 push %esi 108329: ff 35 f8 21 12 00 pushl 0x1221f8 10832f: e8 40 4d 00 00 call 10d074 <_Protected_heap_Allocate_aligned_with_boundary> 108334: 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 ) { 108336: 83 c4 10 add $0x10,%esp 108339: 85 c0 test %eax,%eax 10833b: 74 47 je 108384 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10833d: a1 70 46 12 00 mov 0x124670,%eax 108342: 85 c0 test %eax,%eax 108344: 74 0a je 108350 (*rtems_malloc_dirty_helper)( return_this, size ); 108346: 83 ec 08 sub $0x8,%esp 108349: 56 push %esi 10834a: 53 push %ebx 10834b: ff d0 call *%eax 10834d: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 108350: a1 68 46 12 00 mov 0x124668,%eax 108355: 85 c0 test %eax,%eax 108357: 74 0a je 108363 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 108359: 83 ec 0c sub $0xc,%esp 10835c: 53 push %ebx 10835d: ff 50 04 call *0x4(%eax) 108360: 83 c4 10 add $0x10,%esp return return_this; } 108363: 89 d8 mov %ebx,%eax 108365: 8d 65 f8 lea -0x8(%ebp),%esp 108368: 5b pop %ebx 108369: 5e pop %esi 10836a: c9 leave 10836b: 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() ) 10836c: e8 63 fe ff ff call 1081d4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 108371: 84 c0 test %al,%al 108373: 75 af jne 108324 <== ALWAYS TAKEN 108375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED !malloc_is_system_state_OK() ) return NULL; 108378: 31 db xor %ebx,%ebx */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 10837a: 89 d8 mov %ebx,%eax 10837c: 8d 65 f8 lea -0x8(%ebp),%esp 10837f: 5b pop %ebx 108380: 5e pop %esi 108381: c9 leave 108382: c3 ret 108383: 90 nop <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 108384: a1 6c 46 12 00 mov 0x12466c,%eax 108389: 85 c0 test %eax,%eax 10838b: 74 12 je 10839f return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10838d: 83 ec 0c sub $0xc,%esp 108390: 56 push %esi 108391: ff 50 04 call *0x4(%eax) if ( !return_this ) { 108394: 83 c4 10 add $0x10,%esp 108397: 85 c0 test %eax,%eax 108399: 74 04 je 10839f 10839b: 89 c3 mov %eax,%ebx 10839d: eb 9e jmp 10833d errno = ENOMEM; 10839f: e8 44 a0 00 00 call 1123e8 <__errno> 1083a4: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1083aa: eb b7 jmp 108363 =============================================================================== 00108278 : #include "malloc_p.h" int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { 108278: 55 push %ebp 108279: 89 e5 mov %esp,%ebp 10827b: 57 push %edi 10827c: 56 push %esi 10827d: 53 push %ebx 10827e: 83 ec 0c sub $0xc,%esp 108281: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !stats ) 108284: 85 db test %ebx,%ebx 108286: 74 38 je 1082c0 return -1; _RTEMS_Lock_allocator(); 108288: 83 ec 0c sub $0xc,%esp 10828b: ff 35 44 64 12 00 pushl 0x126444 108291: e8 2a 3d 00 00 call 10bfc0 <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 108296: be 40 62 12 00 mov $0x126240,%esi 10829b: b9 0b 00 00 00 mov $0xb,%ecx 1082a0: 89 df mov %ebx,%edi 1082a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _RTEMS_Unlock_allocator(); 1082a4: 58 pop %eax 1082a5: ff 35 44 64 12 00 pushl 0x126444 1082ab: e8 58 3d 00 00 call 10c008 <_API_Mutex_Unlock> return 0; 1082b0: 83 c4 10 add $0x10,%esp 1082b3: 31 c0 xor %eax,%eax } 1082b5: 8d 65 f4 lea -0xc(%ebp),%esp 1082b8: 5b pop %ebx 1082b9: 5e pop %esi 1082ba: 5f pop %edi 1082bb: c9 leave 1082bc: c3 ret 1082bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { if ( !stats ) return -1; 1082c0: b8 ff ff ff ff mov $0xffffffff,%eax _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; _RTEMS_Unlock_allocator(); return 0; } 1082c5: 8d 65 f4 lea -0xc(%ebp),%esp 1082c8: 5b pop %ebx 1082c9: 5e pop %esi 1082ca: 5f pop %edi 1082cb: c9 leave 1082cc: c3 ret =============================================================================== 0010ac08 : */ int malloc_info( Heap_Information_block *the_info ) { 10ac08: 55 push %ebp 10ac09: 89 e5 mov %esp,%ebp 10ac0b: 83 ec 08 sub $0x8,%esp 10ac0e: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_info ) 10ac11: 85 c0 test %eax,%eax 10ac13: 74 17 je 10ac2c return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 10ac15: 83 ec 08 sub $0x8,%esp 10ac18: 50 push %eax 10ac19: ff 35 58 89 12 00 pushl 0x128958 10ac1f: e8 7c 5e 00 00 call 110aa0 <_Protected_heap_Get_information> return 0; 10ac24: 83 c4 10 add $0x10,%esp 10ac27: 31 c0 xor %eax,%eax } 10ac29: c9 leave 10ac2a: c3 ret 10ac2b: 90 nop <== NOT EXECUTED int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) return -1; 10ac2c: b8 ff ff ff ff mov $0xffffffff,%eax _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 10ac31: c9 leave 10ac32: c3 ret =============================================================================== 0010868c : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 10868c: 55 push %ebp 10868d: 89 e5 mov %esp,%ebp 10868f: 56 push %esi 108690: 53 push %ebx 108691: 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; 108694: 8b 0d 0c 63 12 00 mov 0x12630c,%ecx if ( sbrk_amount == 0 ) 10869a: 85 c9 test %ecx,%ecx 10869c: 75 0a jne 1086a8 <== 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; 10869e: 31 c0 xor %eax,%eax MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 1086a0: 8d 65 f8 lea -0x8(%ebp),%esp 1086a3: 5b pop %ebx 1086a4: 5e pop %esi 1086a5: c9 leave 1086a6: c3 ret 1086a7: 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); 1086a8: 8d 04 0e lea (%esi,%ecx,1),%eax 1086ab: 31 d2 xor %edx,%edx 1086ad: f7 f1 div %ecx 1086af: 89 c3 mov %eax,%ebx 1086b1: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 1086b4: 83 ec 0c sub $0xc,%esp 1086b7: 53 push %ebx 1086b8: e8 ab 7d ff ff call 100468 if ( starting_address == (void*) -1 ) 1086bd: 83 c4 10 add $0x10,%esp 1086c0: 83 f8 ff cmp $0xffffffff,%eax 1086c3: 74 d9 je 10869e return (void *) 0; if ( !_Protected_heap_Extend( 1086c5: 52 push %edx 1086c6: 53 push %ebx 1086c7: 50 push %eax 1086c8: ff 35 58 21 12 00 pushl 0x122158 1086ce: e8 39 4d 00 00 call 10d40c <_Protected_heap_Extend> 1086d3: 83 c4 10 add $0x10,%esp 1086d6: 84 c0 test %al,%al 1086d8: 74 1b je 1086f5 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 1086da: 01 1d e0 62 12 00 add %ebx,0x1262e0 1086e0: 6a 00 push $0x0 1086e2: 6a 00 push $0x0 1086e4: 56 push %esi 1086e5: ff 35 58 21 12 00 pushl 0x122158 1086eb: e8 e4 4c 00 00 call 10d3d4 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 1086f0: 83 c4 10 add $0x10,%esp 1086f3: eb ab jmp 1086a0 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 1086f5: 83 ec 0c sub $0xc,%esp 1086f8: f7 db neg %ebx 1086fa: 53 push %ebx 1086fb: e8 68 7d ff ff call 100468 errno = ENOMEM; 108700: e8 2b a3 00 00 call 112a30 <__errno> 108705: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 10870b: 83 c4 10 add $0x10,%esp 10870e: 31 c0 xor %eax,%eax 108710: eb 8e jmp 1086a0 =============================================================================== 00110dfc : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 110dfc: 55 push %ebp 110dfd: 89 e5 mov %esp,%ebp 110dff: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 110e02: ff 35 20 5f 12 00 pushl 0x125f20 110e08: 6a 01 push $0x1 110e0a: e8 35 70 ff ff call 107e44 if ( memory ) 110e0f: 83 c4 10 add $0x10,%esp 110e12: 85 c0 test %eax,%eax 110e14: 74 06 je 110e1c <== NEVER TAKEN memfile_blocks_allocated++; 110e16: ff 05 48 60 12 00 incl 0x126048 return memory; } 110e1c: c9 leave 110e1d: c3 ret =============================================================================== 0011127c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 11127c: 55 push %ebp 11127d: 89 e5 mov %esp,%ebp 11127f: 57 push %edi 111280: 56 push %esi 111281: 53 push %ebx 111282: 83 ec 0c sub $0xc,%esp 111285: 8b 7d 0c mov 0xc(%ebp),%edi */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) 111288: 8b 5d 08 mov 0x8(%ebp),%ebx 11128b: 85 db test %ebx,%ebx 11128d: 74 46 je 1112d5 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 11128f: 8b 45 08 mov 0x8(%ebp),%eax 111292: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 111298: 31 db xor %ebx,%ebx 11129a: 66 90 xchg %ax,%ax if ( b[i] ) { 11129c: 8b 04 9e mov (%esi,%ebx,4),%eax 11129f: 85 c0 test %eax,%eax 1112a1: 74 13 je 1112b6 memfile_free_block( b[i] ); 1112a3: 83 ec 0c sub $0xc,%esp 1112a6: 50 push %eax 1112a7: e8 b4 ff ff ff call 111260 b[i] = 0; 1112ac: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 1112b3: 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 1112bb: 8b 45 08 mov 0x8(%ebp),%eax 1112be: 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 ); 1112c0: 83 ec 0c sub $0xc,%esp 1112c3: 56 push %esi 1112c4: e8 97 ff ff ff call 111260 *block_table = 0; 1112c9: 8b 45 08 mov 0x8(%ebp),%eax 1112cc: c7 00 00 00 00 00 movl $0x0,(%eax) 1112d2: 83 c4 10 add $0x10,%esp } 1112d5: 8d 65 f4 lea -0xc(%ebp),%esp 1112d8: 5b pop %ebx 1112d9: 5e pop %esi 1112da: 5f pop %edi 1112db: c9 leave 1112dc: c3 ret =============================================================================== 00111838 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 111838: 55 push %ebp 111839: 89 e5 mov %esp,%ebp 11183b: 53 push %ebx 11183c: 83 ec 14 sub $0x14,%esp 11183f: 8b 4d 08 mov 0x8(%ebp),%ecx 111842: 8b 45 0c mov 0xc(%ebp),%eax 111845: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 111848: 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 ) 11184b: 39 53 54 cmp %edx,0x54(%ebx) 11184e: 7f 19 jg 111869 <== NEVER TAKEN 111850: 7d 12 jge 111864 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 111852: 51 push %ecx <== NOT EXECUTED 111853: 52 push %edx <== NOT EXECUTED 111854: 50 push %eax <== NOT EXECUTED 111855: 53 push %ebx <== NOT EXECUTED 111856: e8 19 fc ff ff call 111474 <== NOT EXECUTED 11185b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 11185e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 111861: c9 leave <== NOT EXECUTED 111862: c3 ret <== NOT EXECUTED 111863: 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 ) 111864: 39 43 50 cmp %eax,0x50(%ebx) 111867: 72 e9 jb 111852 <== NEVER TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 111869: 89 43 50 mov %eax,0x50(%ebx) 11186c: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 11186f: 89 41 04 mov %eax,0x4(%ecx) 111872: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 111875: 83 ec 08 sub $0x8,%esp 111878: 6a 00 push $0x0 11187a: 8d 45 f0 lea -0x10(%ebp),%eax 11187d: 50 push %eax 11187e: e8 29 68 ff ff call 1080ac 111883: 8b 45 f0 mov -0x10(%ebp),%eax 111886: 89 43 40 mov %eax,0x40(%ebx) return 0; 111889: 83 c4 10 add $0x10,%esp 11188c: 31 c0 xor %eax,%eax } 11188e: 8b 5d fc mov -0x4(%ebp),%ebx 111891: c9 leave 111892: c3 ret =============================================================================== 00111894 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 111894: 55 push %ebp 111895: 89 e5 mov %esp,%ebp 111897: 57 push %edi 111898: 56 push %esi 111899: 53 push %ebx 11189a: 83 ec 0c sub $0xc,%esp 11189d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1118a0: 8b 73 18 mov 0x18(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 1118a3: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1118a7: 74 2f je 1118d8 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 )) 1118a9: 57 push %edi 1118aa: ff 73 10 pushl 0x10(%ebx) 1118ad: ff 73 0c pushl 0xc(%ebx) 1118b0: 56 push %esi 1118b1: e8 be fb ff ff call 111474 1118b6: 83 c4 10 add $0x10,%esp 1118b9: 85 c0 test %eax,%eax 1118bb: 75 45 jne 111902 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 1118bd: 8b 46 50 mov 0x50(%esi),%eax 1118c0: 8b 56 54 mov 0x54(%esi),%edx 1118c3: 89 43 04 mov %eax,0x4(%ebx) 1118c6: 89 53 08 mov %edx,0x8(%ebx) 1118c9: 8b 43 0c mov 0xc(%ebx),%eax 1118cc: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 1118cf: 8d 65 f4 lea -0xc(%ebp),%esp 1118d2: 5b pop %ebx 1118d3: 5e pop %esi 1118d4: 5f pop %edi 1118d5: c9 leave 1118d6: c3 ret 1118d7: 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) 1118d8: 8b 43 0c mov 0xc(%ebx),%eax 1118db: 8b 53 10 mov 0x10(%ebx),%edx 1118de: 8b 7e 50 mov 0x50(%esi),%edi 1118e1: 8b 4e 54 mov 0x54(%esi),%ecx 1118e4: 39 ca cmp %ecx,%edx 1118e6: 7c e7 jl 1118cf <== NEVER TAKEN 1118e8: 7e 12 jle 1118fc <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 1118ea: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED 1118ed: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED 1118f0: 89 f8 mov %edi,%eax <== NOT EXECUTED 1118f2: 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; } 1118f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1118f7: 5b pop %ebx <== NOT EXECUTED 1118f8: 5e pop %esi <== NOT EXECUTED 1118f9: 5f pop %edi <== NOT EXECUTED 1118fa: c9 leave <== NOT EXECUTED 1118fb: 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) 1118fc: 39 f8 cmp %edi,%eax 1118fe: 76 cf jbe 1118cf <== ALWAYS TAKEN 111900: eb e8 jmp 1118ea <== 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 ); 111902: e8 e1 0a 00 00 call 1123e8 <__errno> <== NOT EXECUTED 111907: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11190d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 111912: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 111917: eb b6 jmp 1118cf <== NOT EXECUTED =============================================================================== 0011179c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 11179c: 55 push %ebp 11179d: 89 e5 mov %esp,%ebp 11179f: 56 push %esi 1117a0: 53 push %ebx 1117a1: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 1117a4: 8b 73 18 mov 0x18(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1117a7: 8b 43 14 mov 0x14(%ebx),%eax 1117aa: a9 04 02 00 00 test $0x204,%eax 1117af: 74 06 je 1117b7 && (the_jnode->type == IMFS_LINEAR_FILE)) { 1117b1: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1117b5: 74 2d je 1117e4 <== NEVER TAKEN the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1117b7: f6 c4 02 test $0x2,%ah 1117ba: 75 18 jne 1117d4 1117bc: 8b 46 50 mov 0x50(%esi),%eax 1117bf: 8b 56 54 mov 0x54(%esi),%edx iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 1117c2: 89 43 04 mov %eax,0x4(%ebx) 1117c5: 89 53 08 mov %edx,0x8(%ebx) return 0; 1117c8: 31 c0 xor %eax,%eax } 1117ca: 8d 65 f8 lea -0x8(%ebp),%esp 1117cd: 5b pop %ebx 1117ce: 5e pop %esi 1117cf: c9 leave 1117d0: c3 ret 1117d1: 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; 1117d4: 8b 46 50 mov 0x50(%esi),%eax 1117d7: 8b 56 54 mov 0x54(%esi),%edx 1117da: 89 43 0c mov %eax,0xc(%ebx) 1117dd: 89 53 10 mov %edx,0x10(%ebx) 1117e0: eb e0 jmp 1117c2 1117e2: 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; 1117e4: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1117e7: 8b 4e 58 mov 0x58(%esi),%ecx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 1117ea: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 1117f1: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 1117f8: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 1117ff: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 111806: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 11180d: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 111814: 85 d2 test %edx,%edx <== NOT EXECUTED 111816: 74 9f je 1117b7 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 111818: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11181b: 52 push %edx <== NOT EXECUTED 11181c: 51 push %ecx <== NOT EXECUTED 11181d: 6a 00 push $0x0 <== NOT EXECUTED 11181f: 6a 00 push $0x0 <== NOT EXECUTED 111821: 56 push %esi <== NOT EXECUTED 111822: e8 65 fd ff ff call 11158c <== NOT EXECUTED 111827: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 11182a: 40 inc %eax <== NOT EXECUTED 11182b: 74 05 je 111832 <== NOT EXECUTED 11182d: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 111830: eb 85 jmp 1117b7 <== NOT EXECUTED return -1; 111832: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 111835: eb 93 jmp 1117ca <== NOT EXECUTED =============================================================================== 001083c8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1083c8: 55 push %ebp 1083c9: 89 e5 mov %esp,%ebp 1083cb: 57 push %edi 1083cc: 56 push %esi 1083cd: 53 push %ebx 1083ce: 83 ec 3c sub $0x3c,%esp 1083d1: 8b 7d 08 mov 0x8(%ebp),%edi 1083d4: 8b 5d 0c mov 0xc(%ebp),%ebx 1083d7: 8b 55 10 mov 0x10(%ebp),%edx 1083da: 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) ) ) 1083dd: f6 c7 f0 test $0xf0,%bh 1083e0: 75 1a jne 1083fc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1083e2: e8 01 a0 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1083e7: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1083ed: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 1083f2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1083f5: 5b pop %ebx <== NOT EXECUTED 1083f6: 5e pop %esi <== NOT EXECUTED 1083f7: 5f pop %edi <== NOT EXECUTED 1083f8: c9 leave <== NOT EXECUTED 1083f9: c3 ret <== NOT EXECUTED 1083fa: 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 ); 1083fc: 50 push %eax 1083fd: 8d 75 cc lea -0x34(%ebp),%esi 108400: 56 push %esi 108401: 8d 45 e4 lea -0x1c(%ebp),%eax 108404: 50 push %eax 108405: 57 push %edi 108406: 89 55 c4 mov %edx,-0x3c(%ebp) 108409: 89 4d c0 mov %ecx,-0x40(%ebp) 10840c: e8 2f 0a 00 00 call 108e40 result = (*temp_loc.ops->evalformake_h)( 108411: 83 c4 0c add $0xc,%esp 108414: 8d 45 e0 lea -0x20(%ebp),%eax 108417: 50 push %eax 108418: 56 push %esi 108419: 03 7d e4 add -0x1c(%ebp),%edi 10841c: 57 push %edi 10841d: 8b 45 d8 mov -0x28(%ebp),%eax 108420: ff 50 04 call *0x4(%eax) &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108423: 83 c4 10 add $0x10,%esp 108426: 85 c0 test %eax,%eax 108428: 8b 55 c4 mov -0x3c(%ebp),%edx 10842b: 8b 4d c0 mov -0x40(%ebp),%ecx 10842e: 74 10 je 108440 return -1; 108430: 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; } 108435: 8d 65 f4 lea -0xc(%ebp),%esp 108438: 5b pop %ebx 108439: 5e pop %esi 10843a: 5f pop %edi 10843b: c9 leave 10843c: c3 ret 10843d: 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 ); 108440: 83 ec 0c sub $0xc,%esp 108443: 56 push %esi 108444: 51 push %ecx 108445: 52 push %edx 108446: 53 push %ebx 108447: ff 75 e0 pushl -0x20(%ebp) 10844a: 8b 45 d8 mov -0x28(%ebp),%eax 10844d: ff 50 14 call *0x14(%eax) rtems_filesystem_freenode( &temp_loc ); 108450: 83 c4 14 add $0x14,%esp 108453: 56 push %esi 108454: 89 45 c4 mov %eax,-0x3c(%ebp) 108457: e8 c0 fb ff ff call 10801c return result; 10845c: 83 c4 10 add $0x10,%esp 10845f: 8b 45 c4 mov -0x3c(%ebp),%eax } 108462: 8d 65 f4 lea -0xc(%ebp),%esp 108465: 5b pop %ebx 108466: 5e pop %esi 108467: 5f pop %edi 108468: c9 leave 108469: c3 ret =============================================================================== 001084f0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 1084f0: 55 push %ebp 1084f1: 89 e5 mov %esp,%ebp 1084f3: 57 push %edi 1084f4: 56 push %esi 1084f5: 53 push %ebx 1084f6: 83 ec 4c sub $0x4c,%esp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 1084f9: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 1084fd: 0f 87 49 02 00 00 ja 10874c rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 108503: 83 ec 0c sub $0xc,%esp 108506: ff 75 10 pushl 0x10(%ebp) 108509: e8 e2 78 00 00 call 10fdf0 10850e: 89 45 c0 mov %eax,-0x40(%ebp) if ( !mount_h ) 108511: 83 c4 10 add $0x10,%esp 108514: 85 c0 test %eax,%eax 108516: 0f 84 30 02 00 00 je 10874c { 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; 10851c: 8b 5d 0c mov 0xc(%ebp),%ebx 10851f: 85 db test %ebx,%ebx const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108521: 0f 95 45 bf setne -0x41(%ebp) 108525: 0f 84 05 02 00 00 je 108730 * 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( 10852b: 31 c0 xor %eax,%eax 10852d: b9 ff ff ff ff mov $0xffffffff,%ecx 108532: 8b 7d 0c mov 0xc(%ebp),%edi 108535: f2 ae repnz scas %es:(%edi),%al 108537: f7 d1 not %ecx 108539: 49 dec %ecx 10853a: 89 4d b8 mov %ecx,-0x48(%ebp) 10853d: 8b 45 0c mov 0xc(%ebp),%eax 108540: 89 45 b4 mov %eax,-0x4c(%ebp) const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 108543: ba ff ff ff ff mov $0xffffffff,%edx 108548: 31 c0 xor %eax,%eax 10854a: 89 d1 mov %edx,%ecx 10854c: 8b 7d 10 mov 0x10(%ebp),%edi 10854f: f2 ae repnz scas %es:(%edi),%al 108551: f7 d1 not %ecx 108553: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108556: 8b 4d 08 mov 0x8(%ebp),%ecx 108559: 85 c9 test %ecx,%ecx 10855b: 0f 84 e3 01 00 00 je 108744 108561: 89 d1 mov %edx,%ecx 108563: 8b 7d 08 mov 0x8(%ebp),%edi 108566: f2 ae repnz scas %es:(%edi),%al 108568: 89 ce mov %ecx,%esi 10856a: f7 d6 not %esi size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 10856c: 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_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 10856f: 8b 4d b8 mov -0x48(%ebp),%ecx 108572: 8b 55 c4 mov -0x3c(%ebp),%edx 108575: 8d 44 11 75 lea 0x75(%ecx,%edx,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_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) 108579: 01 f0 add %esi,%eax + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 10857b: 50 push %eax 10857c: 6a 01 push $0x1 10857e: e8 c1 f8 ff ff call 107e44 108583: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 108585: 83 c4 10 add $0x10,%esp 108588: 85 c0 test %eax,%eax 10858a: 0f 84 88 01 00 00 je 108718 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 108590: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 108593: 83 ec 08 sub $0x8,%esp 108596: ff 75 10 pushl 0x10(%ebp) 108599: 57 push %edi 10859a: e8 11 aa 00 00 call 112fb0 mt_entry->type = str; 10859f: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 1085a2: 03 7d c4 add -0x3c(%ebp),%edi if ( source_or_null != NULL ) { 1085a5: 83 c4 10 add $0x10,%esp 1085a8: 8b 45 08 mov 0x8(%ebp),%eax 1085ab: 85 c0 test %eax,%eax 1085ad: 74 14 je 1085c3 strcpy( str, source_or_null ); 1085af: 83 ec 08 sub $0x8,%esp 1085b2: ff 75 08 pushl 0x8(%ebp) 1085b5: 57 push %edi 1085b6: e8 f5 a9 00 00 call 112fb0 mt_entry->dev = str; 1085bb: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 1085be: 01 f7 add %esi,%edi 1085c0: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 1085c3: 83 ec 08 sub $0x8,%esp 1085c6: ff 75 b4 pushl -0x4c(%ebp) 1085c9: 57 push %edi 1085ca: e8 e1 a9 00 00 call 112fb0 mt_entry->target = str; 1085cf: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 1085d2: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 1085d5: 8b 45 14 mov 0x14(%ebp),%eax 1085d8: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 1085db: 8d 7b 38 lea 0x38(%ebx),%edi 1085de: be e0 fd 11 00 mov $0x11fde0,%esi 1085e3: b9 0c 00 00 00 mov $0xc,%ecx 1085e8: 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 ) { 1085ea: 83 c4 10 add $0x10,%esp 1085ed: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 1085f1: 0f 85 85 00 00 00 jne 10867c } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 1085f7: 81 3d a4 40 12 00 a8 cmpl $0x1240a8,0x1240a4 1085fe: 40 12 00 108601: 0f 85 5d 01 00 00 jne 108764 <== 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; 108607: 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 ) ) { 108609: 83 ec 08 sub $0x8,%esp 10860c: ff 75 18 pushl 0x18(%ebp) 10860f: 53 push %ebx 108610: ff 55 c0 call *-0x40(%ebp) 108613: 83 c4 10 add $0x10,%esp 108616: 85 c0 test %eax,%eax 108618: 0f 85 6a 01 00 00 jne 108788 <== 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 ); 10861e: 56 push %esi 10861f: 6a 00 push $0x0 108621: 6a 00 push $0x0 108623: ff 35 68 62 12 00 pushl 0x126268 108629: e8 0a 31 00 00 call 10b738 10862e: 5a pop %edx 10862f: 59 pop %ecx 108630: 53 push %ebx 108631: 68 a4 40 12 00 push $0x1240a4 108636: e8 cd 39 00 00 call 10c008 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10863b: 58 pop %eax 10863c: ff 35 68 62 12 00 pushl 0x126268 108642: e8 ed 31 00 00 call 10b834 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108647: 83 c4 10 add $0x10,%esp 10864a: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 10864e: 74 0c je 10865c rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 108650: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108652: 8d 65 f4 lea -0xc(%ebp),%esp 108655: 5b pop %ebx 108656: 5e pop %esi 108657: 5f pop %edi 108658: c9 leave 108659: c3 ret 10865a: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 10865c: 8b 3d c4 40 12 00 mov 0x1240c4,%edi 108662: 83 c7 18 add $0x18,%edi 108665: 8d 73 1c lea 0x1c(%ebx),%esi 108668: b9 05 00 00 00 mov $0x5,%ecx 10866d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 10866f: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108671: 8d 65 f4 lea -0xc(%ebp),%esp 108674: 5b pop %ebx 108675: 5e pop %esi 108676: 5f pop %edi 108677: c9 leave 108678: c3 ret 108679: 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( 10867c: 83 ec 0c sub $0xc,%esp 10867f: 6a 01 push $0x1 108681: 8d 75 d4 lea -0x2c(%ebp),%esi 108684: 56 push %esi 108685: 6a 07 push $0x7 108687: ff 75 b8 pushl -0x48(%ebp) 10868a: ff 75 0c pushl 0xc(%ebp) 10868d: e8 86 f8 ff ff call 107f18 108692: 83 c4 20 add $0x20,%esp 108695: 40 inc %eax 108696: 0f 84 d3 00 00 00 je 10876f <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10869c: 83 ec 0c sub $0xc,%esp 10869f: 56 push %esi 1086a0: 8b 45 e0 mov -0x20(%ebp),%eax 1086a3: ff 50 10 call *0x10(%eax) 1086a6: 83 c4 10 add $0x10,%esp 1086a9: 48 dec %eax 1086aa: 0f 85 00 01 00 00 jne 1087b0 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 1086b0: 83 ec 08 sub $0x8,%esp 1086b3: ff 75 d4 pushl -0x2c(%ebp) 1086b6: 68 6c 84 10 00 push $0x10846c 1086bb: e8 c0 fd ff ff call 108480 1086c0: 83 c4 10 add $0x10,%esp 1086c3: 84 c0 test %al,%al 1086c5: 0f 85 f5 00 00 00 jne 1087c0 * 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; 1086cb: 8b 45 d4 mov -0x2c(%ebp),%eax 1086ce: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 1086d1: 8b 45 dc mov -0x24(%ebp),%eax 1086d4: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 1086d7: 8b 45 e0 mov -0x20(%ebp),%eax 1086da: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 1086dd: 8b 55 e4 mov -0x1c(%ebp),%edx 1086e0: 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 ) ) { 1086e3: 83 ec 0c sub $0xc,%esp 1086e6: 53 push %ebx 1086e7: ff 50 20 call *0x20(%eax) 1086ea: 83 c4 10 add $0x10,%esp 1086ed: 85 c0 test %eax,%eax 1086ef: 0f 84 14 ff ff ff je 108609 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 1086f5: 83 ec 0c sub $0xc,%esp 1086f8: 53 push %ebx 1086f9: e8 32 f9 ff ff call 108030 1086fe: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108701: 83 ec 0c sub $0xc,%esp 108704: 56 push %esi 108705: e8 12 f9 ff ff call 10801c 10870a: 83 c4 10 add $0x10,%esp return -1; 10870d: b8 ff ff ff ff mov $0xffffffff,%eax 108712: e9 3b ff ff ff jmp 108652 108717: 90 nop <== NOT EXECUTED target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108718: e8 cb 9c 00 00 call 1123e8 <__errno> <== NOT EXECUTED 10871d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108723: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108728: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10872b: 5b pop %ebx <== NOT EXECUTED 10872c: 5e pop %esi <== NOT EXECUTED 10872d: 5f pop %edi <== NOT EXECUTED 10872e: c9 leave <== NOT EXECUTED 10872f: 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 : "/"; 108730: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp) 108737: c7 45 b4 87 fd 11 00 movl $0x11fd87,-0x4c(%ebp) 10873e: e9 00 fe ff ff jmp 108543 108743: 90 nop <== NOT EXECUTED size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108744: 31 f6 xor %esi,%esi 108746: e9 21 fe ff ff jmp 10856c 10874b: 90 nop <== NOT EXECUTED /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 10874c: e8 97 9c 00 00 call 1123e8 <__errno> 108751: c7 00 16 00 00 00 movl $0x16,(%eax) 108757: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 10875c: 8d 65 f4 lea -0xc(%ebp),%esp 10875f: 5b pop %ebx 108760: 5e pop %esi 108761: 5f pop %edi 108762: c9 leave 108763: c3 ret } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 108764: e8 7f 9c 00 00 call 1123e8 <__errno> <== NOT EXECUTED 108769: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 10876f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108772: 53 push %ebx <== NOT EXECUTED 108773: e8 b8 f8 ff ff call 108030 <== NOT EXECUTED 108778: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 10877b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108780: e9 cd fe ff ff jmp 108652 <== NOT EXECUTED 108785: 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 ); 108788: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10878b: 53 push %ebx <== NOT EXECUTED 10878c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10878f: ff 50 28 call *0x28(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108792: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 108795: e8 96 f8 ff ff call 108030 <== NOT EXECUTED if ( loc_to_free ) 10879a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10879d: 85 f6 test %esi,%esi <== NOT EXECUTED 10879f: 0f 85 5c ff ff ff jne 108701 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); return -1; 1087a5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1087aa: e9 a3 fe ff ff jmp 108652 <== NOT EXECUTED 1087af: 90 nop <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 1087b0: e8 33 9c 00 00 call 1123e8 <__errno> 1087b5: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 1087bb: e9 35 ff ff ff jmp 1086f5 /* * 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; 1087c0: e8 23 9c 00 00 call 1123e8 <__errno> 1087c5: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 1087cb: e9 25 ff ff ff jmp 1086f5 =============================================================================== 00108ad8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108ad8: 55 push %ebp 108ad9: 89 e5 mov %esp,%ebp 108adb: 57 push %edi 108adc: 56 push %esi 108add: 53 push %ebx 108ade: 83 ec 1c sub $0x1c,%esp 108ae1: 8b 45 08 mov 0x8(%ebp),%eax 108ae4: 89 45 e4 mov %eax,-0x1c(%ebp) 108ae7: 8b 5d 0c mov 0xc(%ebp),%ebx 108aea: 8b 75 10 mov 0x10(%ebp),%esi 108aed: 8b 7d 14 mov 0x14(%ebp),%edi 108af0: 8b 45 18 mov 0x18(%ebp),%eax 108af3: 89 45 e0 mov %eax,-0x20(%ebp) int rv = -1; if (target != NULL) { 108af6: 85 db test %ebx,%ebx 108af8: 74 3f je 108b39 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 108afa: 83 ec 08 sub $0x8,%esp 108afd: 68 ff 01 00 00 push $0x1ff 108b02: 53 push %ebx 108b03: e8 18 0a 00 00 call 109520 if (rv == 0) { 108b08: 83 c4 10 add $0x10,%esp 108b0b: 85 c0 test %eax,%eax 108b0d: 74 09 je 108b18 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 108b0f: 8d 65 f4 lea -0xc(%ebp),%esp 108b12: 5b pop %ebx 108b13: 5e pop %esi 108b14: 5f pop %edi 108b15: c9 leave 108b16: c3 ret 108b17: 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( 108b18: 8b 45 e0 mov -0x20(%ebp),%eax 108b1b: 89 45 18 mov %eax,0x18(%ebp) 108b1e: 89 7d 14 mov %edi,0x14(%ebp) 108b21: 89 75 10 mov %esi,0x10(%ebp) 108b24: 89 5d 0c mov %ebx,0xc(%ebp) 108b27: 8b 45 e4 mov -0x1c(%ebp),%eax 108b2a: 89 45 08 mov %eax,0x8(%ebp) } else { errno = EINVAL; } return rv; } 108b2d: 8d 65 f4 lea -0xc(%ebp),%esp 108b30: 5b pop %ebx 108b31: 5e pop %esi 108b32: 5f pop %edi 108b33: c9 leave int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 108b34: e9 97 00 00 00 jmp 108bd0 options, data ); } } else { errno = EINVAL; 108b39: e8 3e 9f 00 00 call 112a7c <__errno> 108b3e: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 108b44: b8 ff ff ff ff mov $0xffffffff,%eax 108b49: eb c4 jmp 108b0f =============================================================================== 00108834 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108834: 55 push %ebp 108835: 89 e5 mov %esp,%ebp 108837: 57 push %edi 108838: 56 push %esi 108839: 53 push %ebx 10883a: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 10883d: a1 64 64 12 00 mov 0x126464,%eax 108842: 85 c0 test %eax,%eax 108844: 0f 84 52 02 00 00 je 108a9c 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)); 10884a: 83 ec 0c sub $0xc,%esp 10884d: 68 24 04 00 00 push $0x424 108852: e8 61 5f 00 00 call 10e7b8 <_Workspace_Allocate> 108857: 89 c2 mov %eax,%edx #endif if (ptr) { 108859: 83 c4 10 add $0x10,%esp 10885c: 85 c0 test %eax,%eax 10885e: 0f 84 2c 02 00 00 je 108a90 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 108864: c7 00 00 00 00 00 movl $0x0,(%eax) 10886a: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 108870: 89 58 04 mov %ebx,0x4(%eax) 108873: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 108879: 89 42 08 mov %eax,0x8(%edx) 10887c: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 108882: 89 42 0c mov %eax,0xc(%edx) 108885: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 10888c: 8d 72 14 lea 0x14(%edx),%esi 10888f: 31 c0 xor %eax,%eax 108891: b9 19 00 00 00 mov $0x19,%ecx 108896: 89 f7 mov %esi,%edi 108898: f3 aa rep stos %al,%es:(%edi) 10889a: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 1088a1: c7 42 34 0a fb 11 00 movl $0x11fb0a,0x34(%edx) 1088a8: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 1088af: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 1088b6: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 1088bd: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 1088c4: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 1088cb: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 1088d2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 1088d9: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 1088e0: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 1088e7: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 1088ee: c6 42 60 00 movb $0x0,0x60(%edx) 1088f2: 8d 72 7c lea 0x7c(%edx),%esi 1088f5: b1 24 mov $0x24,%cl 1088f7: 89 f7 mov %esi,%edi 1088f9: f3 aa rep stos %al,%es:(%edi) 1088fb: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108902: 00 00 00 108905: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 10890c: 00 00 00 10890f: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 108916: 00 00 00 108919: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108920: 0e 33 108922: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 108929: cd ab 10892b: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108932: 34 12 108934: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 10893b: 6d e6 10893d: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108944: ec de 108946: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 10894d: 05 00 10894f: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 108956: 0b 00 108958: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 10895f: 00 00 00 108962: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 108969: 00 00 00 10896c: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 108973: 00 00 00 108976: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 10897d: 00 00 00 108980: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 108987: 00 00 00 10898a: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 108991: 00 00 00 108994: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 10899b: 00 00 00 10899e: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 1089a5: 00 00 00 1089a8: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 1089af: 00 00 00 1089b2: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 1089b9: 00 00 00 1089bc: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 1089c3: 00 00 00 1089c6: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 1089cd: 00 00 00 1089d0: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 1089d7: 00 00 00 1089da: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 1089e1: 00 00 00 1089e4: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 1089eb: 00 00 00 1089ee: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 1089f5: 00 00 00 1089f8: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 1089ff: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 108a06: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 108a0d: 00 00 00 108a10: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 108a17: 00 00 00 108a1a: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 108a21: 00 00 00 108a24: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 108a2b: 00 00 00 108a2e: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 108a35: 00 00 00 108a38: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 108a3f: 00 00 00 108a42: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 108a49: 00 00 00 108a4c: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 108a53: 00 00 00 108a56: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 108a5d: 00 00 00 108a60: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 108a67: 00 00 00 108a6a: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 108a71: 00 00 00 108a74: 66 b9 38 01 mov $0x138,%cx 108a78: 89 df mov %ebx,%edi 108a7a: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 108a7c: 8b 45 0c mov 0xc(%ebp),%eax 108a7f: 89 90 ec 00 00 00 mov %edx,0xec(%eax) return TRUE; 108a85: b0 01 mov $0x1,%al } return FALSE; } 108a87: 8d 65 f4 lea -0xc(%ebp),%esp 108a8a: 5b pop %ebx 108a8b: 5e pop %esi 108a8c: 5f pop %edi 108a8d: c9 leave 108a8e: c3 ret 108a8f: 90 nop <== NOT EXECUTED _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; return TRUE; } return FALSE; 108a90: 31 c0 xor %eax,%eax } 108a92: 8d 65 f4 lea -0xc(%ebp),%esp 108a95: 5b pop %ebx 108a96: 5e pop %esi 108a97: 5f pop %edi 108a98: c9 leave 108a99: c3 ret 108a9a: 66 90 xchg %ax,%ax <== NOT EXECUTED { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 108a9c: a1 20 07 12 00 mov 0x120720,%eax 108aa1: a3 60 41 12 00 mov %eax,0x124160 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 108aa6: c7 05 64 64 12 00 60 movl $0x124160,0x126464 108aad: 41 12 00 108ab0: e9 95 fd ff ff jmp 10884a =============================================================================== 00108ab8 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108ab8: 55 push %ebp 108ab9: 89 e5 mov %esp,%ebp 108abb: 57 push %edi 108abc: 56 push %esi 108abd: 53 push %ebx 108abe: 83 ec 0c sub $0xc,%esp 108ac1: 8b 7d 08 mov 0x8(%ebp),%edi 108ac4: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108ac7: 39 df cmp %ebx,%edi 108ac9: 74 55 je 108b20 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 108acb: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108ad1: 85 f6 test %esi,%esi 108ad3: 74 21 je 108af6 <== NEVER TAKEN 108ad5: 3b 35 20 07 12 00 cmp 0x120720,%esi 108adb: 74 19 je 108af6 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 108add: 83 ec 08 sub $0x8,%esp 108ae0: 68 d8 87 10 00 push $0x1087d8 108ae5: 56 push %esi 108ae6: e8 e5 a0 00 00 call 112bd0 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108aeb: 89 34 24 mov %esi,(%esp) 108aee: e8 e1 5c 00 00 call 10e7d4 <_Workspace_Free> 108af3: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108af6: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 108afd: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108b00: 39 df cmp %ebx,%edi 108b02: 74 08 je 108b0c _REENT = 0; } } 108b04: 8d 65 f4 lea -0xc(%ebp),%esp 108b07: 5b pop %ebx 108b08: 5e pop %esi 108b09: 5f pop %edi 108b0a: c9 leave 108b0b: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108b0c: c7 05 60 41 12 00 00 movl $0x0,0x124160 108b13: 00 00 00 } } 108b16: 8d 65 f4 lea -0xc(%ebp),%esp 108b19: 5b pop %ebx 108b1a: 5e pop %esi 108b1b: 5f pop %edi 108b1c: c9 leave 108b1d: c3 ret 108b1e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108b20: 8b 35 60 41 12 00 mov 0x124160,%esi 108b26: eb a9 jmp 108ad1 =============================================================================== 001087d8 : */ int newlib_free_buffers( FILE *fp ) { 1087d8: 55 push %ebp 1087d9: 89 e5 mov %esp,%ebp 1087db: 53 push %ebx 1087dc: 83 ec 10 sub $0x10,%esp 1087df: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 1087e2: 53 push %ebx 1087e3: e8 d4 9f 00 00 call 1127bc 1087e8: 83 c4 10 add $0x10,%esp 1087eb: 83 f8 02 cmp $0x2,%eax 1087ee: 76 14 jbe 108804 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 1087f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087f3: 53 push %ebx <== NOT EXECUTED 1087f4: e8 47 9d 00 00 call 112540 <== NOT EXECUTED 1087f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 1087fc: 31 c0 xor %eax,%eax 1087fe: 8b 5d fc mov -0x4(%ebp),%ebx 108801: c9 leave 108802: c3 ret 108803: 90 nop <== NOT EXECUTED { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108804: f6 43 0c 80 testb $0x80,0xc(%ebx) 108808: 74 f2 je 1087fc <== ALWAYS TAKEN free( fp->_bf._base ); 10880a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10880d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108810: e8 1b f8 ff ff call 108030 <== NOT EXECUTED fp->_flags &= ~__SMBF; 108815: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 10881b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108821: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 108828: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 10882b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10882d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108830: c9 leave <== NOT EXECUTED 108831: c3 ret <== NOT EXECUTED =============================================================================== 001082e0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 1082e0: 55 push %ebp 1082e1: 89 e5 mov %esp,%ebp 1082e3: 53 push %ebx 1082e4: 83 ec 04 sub $0x4,%esp 1082e7: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 1082ea: 80 3d c0 85 12 00 00 cmpb $0x0,0x1285c0 1082f1: 74 09 je 1082fc NULL_major = major; } return RTEMS_SUCCESSFUL; } 1082f3: 31 c0 xor %eax,%eax 1082f5: 8b 5d fc mov -0x4(%ebp),%ebx 1082f8: c9 leave 1082f9: c3 ret 1082fa: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 1082fc: c6 05 c0 85 12 00 01 movb $0x1,0x1285c0 status = rtems_io_register_name( 108303: 50 push %eax 108304: 6a 00 push $0x0 108306: 53 push %ebx 108307: 68 79 fd 11 00 push $0x11fd79 10830c: e8 87 05 00 00 call 108898 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 108311: 83 c4 10 add $0x10,%esp 108314: 85 c0 test %eax,%eax 108316: 75 0d jne 108325 <== NEVER TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 108318: 89 1d 00 89 12 00 mov %ebx,0x128900 } return RTEMS_SUCCESSFUL; } 10831e: 31 c0 xor %eax,%eax 108320: 8b 5d fc mov -0x4(%ebp),%ebx 108323: c9 leave 108324: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 108325: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108328: 50 push %eax <== NOT EXECUTED 108329: e8 e6 48 00 00 call 10cc14 <== NOT EXECUTED =============================================================================== 00108348 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 108348: 55 push %ebp 108349: 89 e5 mov %esp,%ebp 10834b: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10834e: 85 c0 test %eax,%eax 108350: 74 06 je 108358 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 108352: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 108355: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 108358: 31 c0 xor %eax,%eax 10835a: c9 leave 10835b: c3 ret =============================================================================== 00108b88 : int open( const char *pathname, int flags, ... ) { 108b88: 55 push %ebp 108b89: 89 e5 mov %esp,%ebp 108b8b: 57 push %edi 108b8c: 56 push %esi 108b8d: 53 push %ebx 108b8e: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 108b91: 8b 45 0c mov 0xc(%ebp),%eax 108b94: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 108b95: 89 c3 mov %eax,%ebx 108b97: 83 e3 01 and $0x1,%ebx eval_flags |= RTEMS_LIBIO_PERMS_READ; 108b9a: f7 db neg %ebx 108b9c: 83 e3 04 and $0x4,%ebx if ( ( status & _FWRITE ) == _FWRITE ) 108b9f: a8 02 test $0x2,%al 108ba1: 74 03 je 108ba6 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 108ba3: 83 cb 02 or $0x2,%ebx va_start(ap, flags); mode = va_arg( ap, int ); 108ba6: 8b 45 10 mov 0x10(%ebp),%eax 108ba9: 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(); 108bac: e8 9b 6f 00 00 call 10fb4c 108bb1: 89 c2 mov %eax,%edx if ( iop == 0 ) { 108bb3: 85 c0 test %eax,%eax 108bb5: 0f 84 c5 00 00 00 je 108c80 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 108bbb: 31 f6 xor %esi,%esi 108bbd: b9 ff ff ff ff mov $0xffffffff,%ecx 108bc2: 8b 7d 08 mov 0x8(%ebp),%edi 108bc5: 89 f0 mov %esi,%eax 108bc7: f2 ae repnz scas %es:(%edi),%al 108bc9: f7 d1 not %ecx 108bcb: 49 dec %ecx 108bcc: 83 ec 0c sub $0xc,%esp 108bcf: 6a 01 push $0x1 108bd1: 8d 45 d4 lea -0x2c(%ebp),%eax 108bd4: 89 45 b4 mov %eax,-0x4c(%ebp) 108bd7: 50 push %eax 108bd8: 53 push %ebx 108bd9: 51 push %ecx 108bda: ff 75 08 pushl 0x8(%ebp) 108bdd: 89 55 c0 mov %edx,-0x40(%ebp) 108be0: e8 33 f3 ff ff call 107f18 108be5: 89 c3 mov %eax,%ebx pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 108be7: 83 c4 20 add $0x20,%esp 108bea: 83 f8 ff cmp $0xffffffff,%eax 108bed: 8b 55 c0 mov -0x40(%ebp),%edx 108bf0: 0f 84 de 00 00 00 je 108cd4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 108bf6: 8b 45 0c mov 0xc(%ebp),%eax 108bf9: 25 00 0a 00 00 and $0xa00,%eax 108bfe: 3d 00 0a 00 00 cmp $0xa00,%eax 108c03: 0f 84 8b 00 00 00 je 108c94 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 108c09: 8b 5a 14 mov 0x14(%edx),%ebx 108c0c: 83 ec 0c sub $0xc,%esp 108c0f: ff 75 0c pushl 0xc(%ebp) 108c12: 89 55 c0 mov %edx,-0x40(%ebp) 108c15: e8 b6 6e 00 00 call 10fad0 108c1a: 09 d8 or %ebx,%eax 108c1c: 8b 55 c0 mov -0x40(%ebp),%edx 108c1f: 89 42 14 mov %eax,0x14(%edx) iop->pathinfo = loc; 108c22: 8d 7a 18 lea 0x18(%edx),%edi 108c25: b9 05 00 00 00 mov $0x5,%ecx 108c2a: 8b 75 b4 mov -0x4c(%ebp),%esi 108c2d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 108c2f: 8b 42 20 mov 0x20(%edx),%eax 108c32: ff 75 c4 pushl -0x3c(%ebp) 108c35: ff 75 0c pushl 0xc(%ebp) 108c38: ff 75 08 pushl 0x8(%ebp) 108c3b: 52 push %edx 108c3c: ff 10 call *(%eax) if ( rc ) { 108c3e: 83 c4 20 add $0x20,%esp 108c41: 85 c0 test %eax,%eax 108c43: 8b 55 c0 mov -0x40(%ebp),%edx 108c46: 75 78 jne 108cc0 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 108c48: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 108c4f: 0f 85 9f 00 00 00 jne 108cf4 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 108c55: 2b 15 60 62 12 00 sub 0x126260,%edx 108c5b: c1 fa 03 sar $0x3,%edx 108c5e: 8d 04 d2 lea (%edx,%edx,8),%eax 108c61: 8d 04 c2 lea (%edx,%eax,8),%eax 108c64: 8d 04 c2 lea (%edx,%eax,8),%eax 108c67: 8d 04 c2 lea (%edx,%eax,8),%eax 108c6a: 89 c1 mov %eax,%ecx 108c6c: c1 e1 0f shl $0xf,%ecx 108c6f: 01 c8 add %ecx,%eax 108c71: 8d 04 c2 lea (%edx,%eax,8),%eax 108c74: f7 d8 neg %eax } 108c76: 8d 65 f4 lea -0xc(%ebp),%esp 108c79: 5b pop %ebx 108c7a: 5e pop %esi 108c7b: 5f pop %edi 108c7c: c9 leave 108c7d: c3 ret 108c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 108c80: 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 ); 108c85: e8 5e 97 00 00 call 1123e8 <__errno> 108c8a: 89 18 mov %ebx,(%eax) 108c8c: b8 ff ff ff ff mov $0xffffffff,%eax 108c91: eb e3 jmp 108c76 108c93: 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; 108c94: 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; 108c97: bb 11 00 00 00 mov $0x11,%ebx */ done: va_end(ap); if ( rc ) { if ( iop ) 108c9c: 85 d2 test %edx,%edx 108c9e: 74 0c je 108cac rtems_libio_free( iop ); 108ca0: 83 ec 0c sub $0xc,%esp 108ca3: 52 push %edx 108ca4: e8 47 6f 00 00 call 10fbf0 108ca9: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 108cac: 85 f6 test %esi,%esi 108cae: 74 d5 je 108c85 rtems_filesystem_freenode( loc_to_free ); 108cb0: 83 ec 0c sub $0xc,%esp 108cb3: 56 push %esi 108cb4: e8 63 f3 ff ff call 10801c 108cb9: 83 c4 10 add $0x10,%esp 108cbc: eb c7 jmp 108c85 108cbe: 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; 108cc0: e8 23 97 00 00 call 1123e8 <__errno> 108cc5: 8b 18 mov (%eax),%ebx rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 108cc7: 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; 108cca: 8b 55 c0 mov -0x40(%ebp),%edx * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 108ccd: 85 db test %ebx,%ebx 108ccf: 74 84 je 108c55 <== NEVER TAKEN 108cd1: eb c9 jmp 108c9c 108cd3: 90 nop <== NOT EXECUTED */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 108cd4: e8 0f 97 00 00 call 1123e8 <__errno> 108cd9: 83 38 02 cmpl $0x2,(%eax) 108cdc: 8b 55 c0 mov -0x40(%ebp),%edx 108cdf: 0f 84 9b 00 00 00 je 108d80 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 108ce5: e8 fe 96 00 00 call 1123e8 <__errno> 108cea: 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; 108cec: 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; 108cee: 8b 55 c0 mov -0x40(%ebp),%edx 108cf1: eb da jmp 108ccd 108cf3: 90 nop <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 108cf4: 51 push %ecx 108cf5: 6a 00 push $0x0 108cf7: 6a 00 push $0x0 108cf9: 89 d0 mov %edx,%eax 108cfb: 2b 05 60 62 12 00 sub 0x126260,%eax 108d01: c1 f8 03 sar $0x3,%eax 108d04: 8d 0c c0 lea (%eax,%eax,8),%ecx 108d07: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d0a: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d0d: 8d 0c c8 lea (%eax,%ecx,8),%ecx 108d10: 89 cb mov %ecx,%ebx 108d12: c1 e3 0f shl $0xf,%ebx 108d15: 01 d9 add %ebx,%ecx 108d17: 8d 04 c8 lea (%eax,%ecx,8),%eax 108d1a: f7 d8 neg %eax 108d1c: 50 push %eax 108d1d: 89 55 c0 mov %edx,-0x40(%ebp) 108d20: e8 fb 6c 00 00 call 10fa20 108d25: 89 c3 mov %eax,%ebx if ( rc ) { 108d27: 83 c4 10 add $0x10,%esp 108d2a: 85 c0 test %eax,%eax 108d2c: 8b 55 c0 mov -0x40(%ebp),%edx 108d2f: 0f 84 20 ff ff ff je 108c55 if(errno) rc = errno; 108d35: e8 ae 96 00 00 call 1123e8 <__errno> 108d3a: 8b 00 mov (%eax),%eax 108d3c: 85 c0 test %eax,%eax 108d3e: 8b 55 c0 mov -0x40(%ebp),%edx 108d41: 0f 85 b2 00 00 00 jne 108df9 <== ALWAYS TAKEN close( iop - rtems_libio_iops ); 108d47: 83 ec 0c sub $0xc,%esp 108d4a: 2b 15 60 62 12 00 sub 0x126260,%edx 108d50: c1 fa 03 sar $0x3,%edx 108d53: 8d 04 d2 lea (%edx,%edx,8),%eax 108d56: 8d 04 c2 lea (%edx,%eax,8),%eax 108d59: 8d 04 c2 lea (%edx,%eax,8),%eax 108d5c: 8d 04 c2 lea (%edx,%eax,8),%eax 108d5f: 89 c1 mov %eax,%ecx 108d61: c1 e1 0f shl $0xf,%ecx 108d64: 01 c8 add %ecx,%eax 108d66: 8d 04 c2 lea (%edx,%eax,8),%eax 108d69: f7 d8 neg %eax 108d6b: 50 push %eax 108d6c: e8 2f 6c 00 00 call 10f9a0 108d71: 83 c4 10 add $0x10,%esp /* those are released by close(): */ iop = 0; loc_to_free = NULL; 108d74: 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; 108d76: 31 d2 xor %edx,%edx 108d78: e9 50 ff ff ff jmp 108ccd 108d7d: 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) ) { 108d80: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 108d87: 75 0f jne 108d98 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; 108d89: 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; 108d8b: bb 02 00 00 00 mov $0x2,%ebx 108d90: e9 07 ff ff ff jmp 108c9c 108d95: 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 ); 108d98: 6a 00 push $0x0 108d9a: 6a 00 push $0x0 108d9c: 8b 45 c4 mov -0x3c(%ebp),%eax 108d9f: 80 cc 80 or $0x80,%ah 108da2: 50 push %eax 108da3: ff 75 08 pushl 0x8(%ebp) 108da6: 89 55 c0 mov %edx,-0x40(%ebp) 108da9: e8 1a f6 ff ff call 1083c8 if ( rc ) { 108dae: 83 c4 10 add $0x10,%esp 108db1: 85 c0 test %eax,%eax 108db3: 8b 55 c0 mov -0x40(%ebp),%edx 108db6: 0f 85 29 ff ff ff jne 108ce5 <== 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( 108dbc: 89 d9 mov %ebx,%ecx 108dbe: 8b 7d 08 mov 0x8(%ebp),%edi 108dc1: 89 f0 mov %esi,%eax 108dc3: f2 ae repnz scas %es:(%edi),%al 108dc5: f7 d1 not %ecx 108dc7: 49 dec %ecx 108dc8: 83 ec 0c sub $0xc,%esp 108dcb: 6a 01 push $0x1 108dcd: 8d 45 d4 lea -0x2c(%ebp),%eax 108dd0: 50 push %eax 108dd1: 6a 00 push $0x0 108dd3: 51 push %ecx 108dd4: ff 75 08 pushl 0x8(%ebp) 108dd7: 89 55 c0 mov %edx,-0x40(%ebp) 108dda: e8 39 f1 ff ff call 107f18 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 108ddf: 83 c4 20 add $0x20,%esp 108de2: 85 c0 test %eax,%eax 108de4: 8b 55 c0 mov -0x40(%ebp),%edx 108de7: 0f 84 1c fe ff ff je 108c09 <== 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; 108ded: 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; 108def: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED 108df4: e9 a3 fe ff ff jmp 108c9c <== 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; 108df9: e8 ea 95 00 00 call 1123e8 <__errno> 108dfe: 8b 18 mov (%eax),%ebx 108e00: 8b 55 c0 mov -0x40(%ebp),%edx 108e03: e9 3f ff ff ff jmp 108d47 =============================================================================== 00109c98 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109c98: 55 push %ebp 109c99: 89 e5 mov %esp,%ebp 109c9b: 56 push %esi 109c9c: 53 push %ebx 109c9d: 83 ec 10 sub $0x10,%esp 109ca0: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 109ca3: 8b 4a 34 mov 0x34(%edx),%ecx 109ca6: f6 c1 01 test $0x1,%cl 109ca9: 74 31 je 109cdc <== NEVER TAKEN switch (c) { 109cab: 3c 09 cmp $0x9,%al 109cad: 0f 84 b1 00 00 00 je 109d64 109cb3: 76 3f jbe 109cf4 <== NEVER TAKEN 109cb5: 3c 0a cmp $0xa,%al 109cb7: 74 4f je 109d08 109cb9: 3c 0d cmp $0xd,%al 109cbb: 74 7f je 109d3c <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109cbd: 83 e1 02 and $0x2,%ecx 109cc0: 0f 85 c6 00 00 00 jne 109d8c <== NEVER TAKEN 109cc6: 8b 0d 54 41 12 00 mov 0x124154,%ecx c = toupper(c); if (!iscntrl(c)) 109ccc: 0f b6 c0 movzbl %al,%eax 109ccf: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109cd4: 75 06 jne 109cdc <== NEVER TAKEN tty->column++; 109cd6: ff 42 28 incl 0x28(%edx) 109cd9: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109cdc: 53 push %ebx 109cdd: 52 push %edx 109cde: 6a 01 push $0x1 109ce0: 8d 45 f4 lea -0xc(%ebp),%eax 109ce3: 50 push %eax 109ce4: e8 7b fe ff ff call 109b64 109ce9: 83 c4 10 add $0x10,%esp } 109cec: 8d 65 f8 lea -0x8(%ebp),%esp 109cef: 5b pop %ebx 109cf0: 5e pop %esi 109cf1: c9 leave 109cf2: c3 ret 109cf3: 90 nop <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109cf4: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109cf6: 75 c5 jne 109cbd <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109cf8: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109cfb: 85 c0 test %eax,%eax <== NOT EXECUTED 109cfd: 7e dd jle 109cdc <== NOT EXECUTED tty->column--; 109cff: 48 dec %eax <== NOT EXECUTED 109d00: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109d03: eb d7 jmp 109cdc <== NOT EXECUTED 109d05: 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) 109d08: f6 c1 20 test $0x20,%cl 109d0b: 74 07 je 109d14 <== ALWAYS TAKEN tty->column = 0; 109d0d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109d14: 83 e1 04 and $0x4,%ecx 109d17: 74 c3 je 109cdc <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109d19: 51 push %ecx 109d1a: 52 push %edx 109d1b: 6a 01 push $0x1 109d1d: 68 10 fe 11 00 push $0x11fe10 109d22: 89 55 f0 mov %edx,-0x10(%ebp) 109d25: e8 3a fe ff ff call 109b64 tty->column = 0; 109d2a: 8b 55 f0 mov -0x10(%ebp),%edx 109d2d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109d34: 83 c4 10 add $0x10,%esp 109d37: eb a3 jmp 109cdc 109d39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109d3c: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 109d3f: 74 07 je 109d48 <== NOT EXECUTED 109d41: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109d44: 85 c0 test %eax,%eax <== NOT EXECUTED 109d46: 74 a4 je 109cec <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109d48: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109d4b: 74 09 je 109d56 <== NOT EXECUTED c = '\n'; 109d4d: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109d51: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109d54: 74 86 je 109cdc <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109d56: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109d5d: e9 7a ff ff ff jmp 109cdc <== NOT EXECUTED 109d62: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109d64: 8b 5a 28 mov 0x28(%edx),%ebx 109d67: 89 de mov %ebx,%esi 109d69: 83 e6 07 and $0x7,%esi 109d6c: b8 08 00 00 00 mov $0x8,%eax 109d71: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109d73: 81 e1 00 18 00 00 and $0x1800,%ecx 109d79: 81 f9 00 18 00 00 cmp $0x1800,%ecx 109d7f: 74 37 je 109db8 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109d81: 01 d8 add %ebx,%eax <== NOT EXECUTED 109d83: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109d86: e9 51 ff ff ff jmp 109cdc <== NOT EXECUTED 109d8b: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109d8c: 8b 0d 54 41 12 00 mov 0x124154,%ecx <== NOT EXECUTED 109d92: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109d95: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109d9a: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109d9d: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 109da0: 74 0e je 109db0 <== NOT EXECUTED 109da2: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109da4: 88 d8 mov %bl,%al <== NOT EXECUTED 109da6: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109da9: e9 1e ff ff ff jmp 109ccc <== NOT EXECUTED 109dae: 66 90 xchg %ax,%ax <== NOT EXECUTED 109db0: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 109db3: eb ef jmp 109da4 <== NOT EXECUTED 109db5: 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; 109db8: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109dbb: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 109dbe: 56 push %esi 109dbf: 52 push %edx 109dc0: 50 push %eax 109dc1: 68 1c fa 11 00 push $0x11fa1c 109dc6: e8 99 fd ff ff call 109b64 return; 109dcb: 83 c4 10 add $0x10,%esp 109dce: e9 19 ff ff ff jmp 109cec =============================================================================== 00109f44 : long pathconf( const char *path, int name ) { 109f44: 55 push %ebp 109f45: 89 e5 mov %esp,%ebp 109f47: 56 push %esi 109f48: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 109f49: 83 ec 08 sub $0x8,%esp 109f4c: 6a 00 push $0x0 109f4e: ff 75 08 pushl 0x8(%ebp) 109f51: e8 4e fd ff ff call 109ca4 109f56: 89 c3 mov %eax,%ebx if ( fd == -1 ) 109f58: 83 c4 10 add $0x10,%esp 109f5b: 83 f8 ff cmp $0xffffffff,%eax 109f5e: 74 24 je 109f84 return -1; status = fpathconf( fd, name ); 109f60: 83 ec 08 sub $0x8,%esp 109f63: ff 75 0c pushl 0xc(%ebp) 109f66: 50 push %eax 109f67: e8 b0 ec ff ff call 108c1c 109f6c: 89 c6 mov %eax,%esi (void) close( fd ); 109f6e: 89 1c 24 mov %ebx,(%esp) 109f71: e8 ea e7 ff ff call 108760 return status; 109f76: 83 c4 10 add $0x10,%esp } 109f79: 89 f0 mov %esi,%eax 109f7b: 8d 65 f8 lea -0x8(%ebp),%esp 109f7e: 5b pop %ebx 109f7f: 5e pop %esi 109f80: c9 leave 109f81: c3 ret 109f82: 66 90 xchg %ax,%ax <== NOT EXECUTED int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) return -1; 109f84: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 109f89: 89 f0 mov %esi,%eax 109f8b: 8d 65 f8 lea -0x8(%ebp),%esp 109f8e: 5b pop %ebx 109f8f: 5e pop %esi 109f90: c9 leave 109f91: c3 ret =============================================================================== 00110c18 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 110c18: 55 push %ebp 110c19: 89 e5 mov %esp,%ebp 110c1b: 57 push %edi 110c1c: 56 push %esi 110c1d: 53 push %ebx 110c1e: 83 ec 24 sub $0x24,%esp rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 110c21: 68 ff 01 00 00 push $0x1ff 110c26: 68 ac 1a 12 00 push $0x121aac 110c2b: e8 20 17 00 00 call 112350 110c30: 83 c4 10 add $0x10,%esp 110c33: 85 c0 test %eax,%eax 110c35: 74 0d je 110c44 <== ALWAYS TAKEN return -1; 110c37: 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; } 110c3c: 8d 65 f4 lea -0xc(%ebp),%esp 110c3f: 5b pop %ebx 110c40: 5e pop %esi 110c41: 5f pop %edi 110c42: c9 leave 110c43: 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); 110c44: 8d 5d d9 lea -0x27(%ebp),%ebx 110c47: be b1 1a 12 00 mov $0x121ab1,%esi 110c4c: b9 0a 00 00 00 mov $0xa,%ecx 110c51: 89 df mov %ebx,%edi 110c53: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 110c55: 0f b7 05 cc 6f 12 00 movzwl 0x126fcc,%eax 110c5c: 8d 50 01 lea 0x1(%eax),%edx 110c5f: 66 89 15 cc 6f 12 00 mov %dx,0x126fcc 110c66: 51 push %ecx 110c67: 50 push %eax 110c68: 68 bc 1a 12 00 push $0x121abc 110c6d: 8d 45 e3 lea -0x1d(%ebp),%eax 110c70: 50 push %eax 110c71: e8 d2 37 00 00 call 114448 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 110c76: 58 pop %eax 110c77: 5a pop %edx 110c78: 68 80 01 00 00 push $0x180 110c7d: 53 push %ebx 110c7e: e8 15 14 00 00 call 112098 110c83: 83 c4 10 add $0x10,%esp 110c86: 85 c0 test %eax,%eax 110c88: 0f 85 a6 00 00 00 jne 110d34 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); 110c8e: 83 ec 08 sub $0x8,%esp 110c91: 68 00 40 00 00 push $0x4000 110c96: 53 push %ebx 110c97: e8 80 91 ff ff call 109e1c 110c9c: 8b 55 08 mov 0x8(%ebp),%edx 110c9f: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 110ca1: 83 c4 10 add $0x10,%esp 110ca4: 85 c0 test %eax,%eax 110ca6: 78 58 js 110d00 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]); 110ca8: 3b 05 4c 31 12 00 cmp 0x12314c,%eax 110cae: 72 3c jb 110cec <== ALWAYS TAKEN 110cb0: 31 d2 xor %edx,%edx <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110cb2: 83 62 14 fe andl $0xfffffffe,0x14(%edx) filsdes[1] = open(fifopath, O_WRONLY); 110cb6: 83 ec 08 sub $0x8,%esp 110cb9: 6a 01 push $0x1 110cbb: 53 push %ebx 110cbc: e8 5b 91 ff ff call 109e1c 110cc1: 8b 55 08 mov 0x8(%ebp),%edx 110cc4: 89 42 04 mov %eax,0x4(%edx) if (filsdes[1] < 0) { 110cc7: 83 c4 10 add $0x10,%esp 110cca: 85 c0 test %eax,%eax 110ccc: 78 4a js 110d18 int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 110cce: 31 f6 xor %esi,%esi if (filsdes[1] < 0) { err = errno; close(filsdes[0]); } unlink(fifopath); 110cd0: 83 ec 0c sub $0xc,%esp 110cd3: 53 push %ebx 110cd4: e8 8b b2 ff ff call 10bf64 110cd9: 83 c4 10 add $0x10,%esp } if(err != 0) 110cdc: 85 f6 test %esi,%esi 110cde: 75 63 jne 110d43 rtems_set_errno_and_return_minus_one(err); return 0; 110ce0: 31 c0 xor %eax,%eax } 110ce2: 8d 65 f4 lea -0xc(%ebp),%esp 110ce5: 5b pop %ebx 110ce6: 5e pop %esi 110ce7: 5f pop %edi 110ce8: c9 leave 110ce9: c3 ret 110cea: 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]); 110cec: c1 e0 03 shl $0x3,%eax 110cef: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 110cf6: 29 c2 sub %eax,%edx 110cf8: 03 15 00 72 12 00 add 0x127200,%edx 110cfe: eb b2 jmp 110cb2 } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 110d00: e8 ab 2d 00 00 call 113ab0 <__errno> 110d05: 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); 110d07: 83 ec 0c sub $0xc,%esp 110d0a: 53 push %ebx 110d0b: e8 54 b2 ff ff call 10bf64 110d10: 83 c4 10 add $0x10,%esp 110d13: eb c7 jmp 110cdc 110d15: 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; 110d18: e8 93 2d 00 00 call 113ab0 <__errno> 110d1d: 8b 30 mov (%eax),%esi close(filsdes[0]); 110d1f: 83 ec 0c sub $0xc,%esp 110d22: 8b 45 08 mov 0x8(%ebp),%eax 110d25: ff 30 pushl (%eax) 110d27: e8 28 81 ff ff call 108e54 110d2c: 83 c4 10 add $0x10,%esp 110d2f: eb 9f jmp 110cd0 110d31: 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){ 110d34: e8 77 2d 00 00 call 113ab0 <__errno> return -1; 110d39: b8 ff ff ff ff mov $0xffffffff,%eax 110d3e: e9 f9 fe ff ff jmp 110c3c close(filsdes[0]); } unlink(fifopath); } if(err != 0) rtems_set_errno_and_return_minus_one(err); 110d43: e8 68 2d 00 00 call 113ab0 <__errno> 110d48: 89 30 mov %esi,(%eax) 110d4a: b8 ff ff ff ff mov $0xffffffff,%eax 110d4f: e9 e8 fe ff ff jmp 110c3c =============================================================================== 00111988 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 111988: 55 push %ebp 111989: 89 e5 mov %esp,%ebp 11198b: 56 push %esi 11198c: 53 push %ebx 11198d: 8b 75 08 mov 0x8(%ebp),%esi 111990: 8b 5d 10 mov 0x10(%ebp),%ebx if (cmd == FIONREAD) { 111993: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) 11199a: 74 0c je 1119a8 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 11199c: b8 ea ff ff ff mov $0xffffffea,%eax } 1119a1: 8d 65 f8 lea -0x8(%ebp),%esp 1119a4: 5b pop %ebx 1119a5: 5e pop %esi 1119a6: c9 leave 1119a7: c3 ret void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 1119a8: 85 db test %ebx,%ebx 1119aa: 75 07 jne 1119b3 return -EFAULT; 1119ac: b8 f2 ff ff ff mov $0xfffffff2,%eax 1119b1: eb ee jmp 1119a1 if (! PIPE_LOCK(pipe)) 1119b3: 50 push %eax 1119b4: 6a 00 push $0x0 1119b6: 6a 00 push $0x0 1119b8: ff 76 28 pushl 0x28(%esi) 1119bb: e8 08 b2 ff ff call 10cbc8 1119c0: 83 c4 10 add $0x10,%esp 1119c3: 85 c0 test %eax,%eax 1119c5: 74 07 je 1119ce <== ALWAYS TAKEN return -EINTR; 1119c7: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 1119cc: eb d3 jmp 1119a1 <== NOT EXECUTED /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 1119ce: 8b 46 0c mov 0xc(%esi),%eax 1119d1: 89 03 mov %eax,(%ebx) PIPE_UNLOCK(pipe); 1119d3: 83 ec 0c sub $0xc,%esp 1119d6: ff 76 28 pushl 0x28(%esi) 1119d9: e8 e6 b2 ff ff call 10ccc4 return 0; 1119de: 83 c4 10 add $0x10,%esp 1119e1: 31 c0 xor %eax,%eax 1119e3: eb bc jmp 1119a1 =============================================================================== 00111044 : free(pipe->Buffer); free(pipe); } static rtems_status_code pipe_lock(void) { 111044: 55 push %ebp 111045: 89 e5 mov %esp,%ebp 111047: 53 push %ebx 111048: 83 ec 04 sub $0x4,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 11104b: a1 d0 6f 12 00 mov 0x126fd0,%eax 111050: 85 c0 test %eax,%eax 111052: 74 20 je 111074 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 111054: 52 push %edx 111055: 6a 00 push $0x0 111057: 6a 00 push $0x0 111059: 50 push %eax 11105a: e8 69 bb ff ff call 10cbc8 } if (sc == RTEMS_SUCCESSFUL) { 11105f: 83 c4 10 add $0x10,%esp return 0; } else { return -ENOMEM; 111062: 83 f8 01 cmp $0x1,%eax 111065: 19 c0 sbb %eax,%eax 111067: f7 d0 not %eax 111069: 83 e0 f4 and $0xfffffff4,%eax } } 11106c: 8b 5d fc mov -0x4(%ebp),%ebx 11106f: c9 leave 111070: c3 ret 111071: 8d 76 00 lea 0x0(%esi),%esi <== 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 ); 111074: 53 push %ebx 111075: 6a 00 push $0x0 111077: 6a 00 push $0x0 111079: ff 35 08 72 12 00 pushl 0x127208 11107f: e8 44 bb ff ff call 10cbc8 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 111084: 83 c4 10 add $0x10,%esp 111087: 8b 0d d0 6f 12 00 mov 0x126fd0,%ecx 11108d: 85 c9 test %ecx,%ecx 11108f: 74 1b je 1110ac <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111091: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111094: ff 35 08 72 12 00 pushl 0x127208 <== NOT EXECUTED 11109a: e8 25 bc ff ff call 10ccc4 <== NOT EXECUTED 11109f: a1 d0 6f 12 00 mov 0x126fd0,%eax <== NOT EXECUTED 1110a4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1110a7: eb ab jmp 111054 <== NOT EXECUTED 1110a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED sc = rtems_semaphore_create( 1110ac: 83 ec 0c sub $0xc,%esp 1110af: 68 d0 6f 12 00 push $0x126fd0 1110b4: 6a 00 push $0x0 1110b6: 6a 54 push $0x54 1110b8: 6a 01 push $0x1 1110ba: 68 45 50 49 50 push $0x50495045 1110bf: e8 88 b8 ff ff call 10c94c 1110c4: 89 c3 mov %eax,%ebx 1110c6: 83 c4 14 add $0x14,%esp 1110c9: ff 35 08 72 12 00 pushl 0x127208 1110cf: e8 f0 bb ff ff call 10ccc4 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 1110d4: 83 c4 10 add $0x10,%esp 1110d7: 85 db test %ebx,%ebx 1110d9: 74 07 je 1110e2 } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 1110db: b8 f4 ff ff ff mov $0xfffffff4,%eax 1110e0: eb 8a jmp 11106c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 1110e2: a1 d0 6f 12 00 mov 0x126fd0,%eax 1110e7: e9 68 ff ff ff jmp 111054 =============================================================================== 001115e4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 1115e4: 55 push %ebp 1115e5: 89 e5 mov %esp,%ebp 1115e7: 57 push %edi 1115e8: 56 push %esi 1115e9: 53 push %ebx 1115ea: 83 ec 30 sub $0x30,%esp 1115ed: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 1115f0: 6a 00 push $0x0 1115f2: 6a 00 push $0x0 1115f4: ff 73 28 pushl 0x28(%ebx) 1115f7: e8 cc b5 ff ff call 10cbc8 1115fc: 83 c4 10 add $0x10,%esp 1115ff: 85 c0 test %eax,%eax 111601: 0f 85 b1 00 00 00 jne 1116b8 <== NEVER TAKEN return -EINTR; while (read < count) { 111607: 8b 4d 10 mov 0x10(%ebp),%ecx 11160a: 85 c9 test %ecx,%ecx 11160c: 0f 84 82 01 00 00 je 111794 <== NEVER TAKEN 111612: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 111619: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) while (PIPE_EMPTY(pipe)) { 111620: 8b 53 0c mov 0xc(%ebx),%edx 111623: 85 d2 test %edx,%edx 111625: 0f 85 a1 00 00 00 jne 1116cc /* Not an error */ if (pipe->Writers == 0) 11162b: 8b 53 14 mov 0x14(%ebx),%edx 11162e: 85 d2 test %edx,%edx 111630: 0f 84 06 01 00 00 je 11173c goto out_locked; if (LIBIO_NODELAY(iop)) { 111636: 8b 45 14 mov 0x14(%ebp),%eax 111639: f6 40 14 01 testb $0x1,0x14(%eax) 11163d: 0f 85 01 01 00 00 jne 111744 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 111643: ff 43 18 incl 0x18(%ebx) PIPE_UNLOCK(pipe); 111646: 83 ec 0c sub $0xc,%esp 111649: ff 73 28 pushl 0x28(%ebx) 11164c: e8 73 b6 ff ff call 10ccc4 if (! PIPE_READWAIT(pipe)) 111651: 5f pop %edi 111652: 58 pop %eax 111653: 6a 00 push $0x0 111655: ff 73 2c pushl 0x2c(%ebx) 111658: e8 0b 11 00 00 call 112768 11165d: 83 c4 0c add $0xc,%esp 111660: 83 f8 01 cmp $0x1,%eax 111663: 19 f6 sbb %esi,%esi 111665: f7 d6 not %esi 111667: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 11166a: 6a 00 push $0x0 11166c: 6a 00 push $0x0 11166e: ff 73 28 pushl 0x28(%ebx) 111671: e8 52 b5 ff ff call 10cbc8 111676: 83 c4 10 add $0x10,%esp 111679: 85 c0 test %eax,%eax 11167b: 0f 85 cf 00 00 00 jne 111750 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 111681: ff 4b 18 decl 0x18(%ebx) if (ret != 0) 111684: 85 f6 test %esi,%esi 111686: 74 98 je 111620 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 111688: 83 ec 0c sub $0xc,%esp 11168b: ff 73 28 pushl 0x28(%ebx) 11168e: e8 31 b6 ff ff call 10ccc4 111693: 83 c4 10 add $0x10,%esp out_nolock: if (read > 0) 111696: 8b 4d d4 mov -0x2c(%ebp),%ecx 111699: 85 c9 test %ecx,%ecx 11169b: 7e 0b jle 1116a8 return read; return ret; } 11169d: 8b 45 d4 mov -0x2c(%ebp),%eax 1116a0: 8d 65 f4 lea -0xc(%ebp),%esp 1116a3: 5b pop %ebx 1116a4: 5e pop %esi 1116a5: 5f pop %edi 1116a6: c9 leave 1116a7: c3 ret PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 1116a8: 89 75 d4 mov %esi,-0x2c(%ebp) } 1116ab: 8b 45 d4 mov -0x2c(%ebp),%eax 1116ae: 8d 65 f4 lea -0xc(%ebp),%esp 1116b1: 5b pop %ebx 1116b2: 5e pop %esi 1116b3: 5f pop %edi 1116b4: c9 leave 1116b5: c3 ret 1116b6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 1116b8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 1116bf: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 1116c2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1116c5: 5b pop %ebx <== NOT EXECUTED 1116c6: 5e pop %esi <== NOT EXECUTED 1116c7: 5f pop %edi <== NOT EXECUTED 1116c8: c9 leave <== NOT EXECUTED 1116c9: c3 ret <== NOT EXECUTED 1116ca: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 1116cc: 8b 45 10 mov 0x10(%ebp),%eax 1116cf: 2b 45 d0 sub -0x30(%ebp),%eax 1116d2: 89 55 cc mov %edx,-0x34(%ebp) 1116d5: 39 c2 cmp %eax,%edx 1116d7: 76 03 jbe 1116dc 1116d9: 89 45 cc mov %eax,-0x34(%ebp) chunk1 = pipe->Size - pipe->Start; 1116dc: 8b 73 08 mov 0x8(%ebx),%esi 1116df: 8b 43 04 mov 0x4(%ebx),%eax 1116e2: 29 f0 sub %esi,%eax if (chunk > chunk1) { 1116e4: 39 45 cc cmp %eax,-0x34(%ebp) 1116e7: 7f 71 jg 11175a 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); 1116e9: 8b 45 0c mov 0xc(%ebp),%eax 1116ec: 03 45 d0 add -0x30(%ebp),%eax 1116ef: 03 33 add (%ebx),%esi 1116f1: 89 c7 mov %eax,%edi 1116f3: 8b 4d cc mov -0x34(%ebp),%ecx 1116f6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start += chunk; 1116f8: 8b 45 cc mov -0x34(%ebp),%eax 1116fb: 03 43 08 add 0x8(%ebx),%eax pipe->Start %= pipe->Size; 1116fe: 31 d2 xor %edx,%edx 111700: f7 73 04 divl 0x4(%ebx) 111703: 89 53 08 mov %edx,0x8(%ebx) pipe->Length -= chunk; 111706: 8b 43 0c mov 0xc(%ebx),%eax 111709: 2b 45 cc sub -0x34(%ebp),%eax 11170c: 89 43 0c mov %eax,0xc(%ebx) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 11170f: 85 c0 test %eax,%eax 111711: 75 07 jne 11171a pipe->Start = 0; 111713: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 11171a: 8b 73 1c mov 0x1c(%ebx),%esi 11171d: 85 f6 test %esi,%esi 11171f: 75 5f jne 111780 PIPE_WAKEUPWRITERS(pipe); read += chunk; 111721: 8b 45 cc mov -0x34(%ebp),%eax 111724: 01 45 d4 add %eax,-0x2c(%ebp) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111727: 8b 45 d4 mov -0x2c(%ebp),%eax 11172a: 89 45 d0 mov %eax,-0x30(%ebp) 11172d: 8b 45 10 mov 0x10(%ebp),%eax 111730: 39 45 d4 cmp %eax,-0x2c(%ebp) 111733: 0f 82 e7 fe ff ff jb 111620 <== NEVER TAKEN 111739: 8d 76 00 lea 0x0(%esi),%esi while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 11173c: 31 f6 xor %esi,%esi 11173e: e9 45 ff ff ff jmp 111688 111743: 90 nop <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 111744: be f5 ff ff ff mov $0xfffffff5,%esi 111749: e9 3a ff ff ff jmp 111688 11174e: 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; 111750: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111755: e9 3c ff ff ff jmp 111696 <== 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); 11175a: 8b 55 0c mov 0xc(%ebp),%edx 11175d: 03 55 d0 add -0x30(%ebp),%edx 111760: 03 33 add (%ebx),%esi 111762: 89 d7 mov %edx,%edi 111764: 89 c1 mov %eax,%ecx 111766: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 111768: 8b 55 d0 mov -0x30(%ebp),%edx 11176b: 01 c2 add %eax,%edx 11176d: 03 55 0c add 0xc(%ebp),%edx 111770: 8b 4d cc mov -0x34(%ebp),%ecx 111773: 29 c1 sub %eax,%ecx 111775: 8b 33 mov (%ebx),%esi 111777: 89 d7 mov %edx,%edi 111779: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 11177b: e9 78 ff ff ff jmp 1116f8 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 111780: 83 ec 08 sub $0x8,%esp 111783: 8d 45 e4 lea -0x1c(%ebp),%eax 111786: 50 push %eax 111787: ff 73 30 pushl 0x30(%ebx) 11178a: e8 75 0f 00 00 call 112704 11178f: 83 c4 10 add $0x10,%esp 111792: eb 8d jmp 111721 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 111794: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 11179b: 31 f6 xor %esi,%esi <== NOT EXECUTED 11179d: e9 e6 fe ff ff jmp 111688 <== NOT EXECUTED =============================================================================== 00111114 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 111114: 55 push %ebp 111115: 89 e5 mov %esp,%ebp 111117: 57 push %edi 111118: 56 push %esi 111119: 53 push %ebx 11111a: 83 ec 1c sub $0x1c,%esp 11111d: 8b 7d 08 mov 0x8(%ebp),%edi pipe_control_t *pipe = *pipep; 111120: 8b 1f mov (%edi),%ebx uint32_t mode; if (pipe_lock()) 111122: e8 1d ff ff ff call 111044 111127: 85 c0 test %eax,%eax 111129: 0f 85 ee 00 00 00 jne 11121d <== NEVER TAKEN /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) 11112f: 51 push %ecx 111130: 6a 00 push $0x0 111132: 6a 00 push $0x0 111134: ff 73 28 pushl 0x28(%ebx) 111137: e8 8c ba ff ff call 10cbc8 11113c: 83 c4 10 add $0x10,%esp 11113f: 85 c0 test %eax,%eax 111141: 0f 85 d6 00 00 00 jne 11121d <== NEVER TAKEN /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); 111147: 8b 45 0c mov 0xc(%ebp),%eax 11114a: 8b 40 14 mov 0x14(%eax),%eax 11114d: 89 c6 mov %eax,%esi 11114f: 83 e6 06 and $0x6,%esi if (mode & LIBIO_FLAGS_READ) 111152: a8 02 test $0x2,%al 111154: 74 03 je 111159 pipe->Readers --; 111156: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 111159: f7 c6 04 00 00 00 test $0x4,%esi 11115f: 74 03 je 111164 pipe->Writers --; 111161: ff 4b 14 decl 0x14(%ebx) PIPE_UNLOCK(pipe); 111164: 83 ec 0c sub $0xc,%esp 111167: ff 73 28 pushl 0x28(%ebx) 11116a: e8 55 bb ff ff call 10ccc4 if (pipe->Readers == 0 && pipe->Writers == 0) { 11116f: 83 c4 10 add $0x10,%esp 111172: 8b 53 10 mov 0x10(%ebx),%edx 111175: 85 d2 test %edx,%edx 111177: 74 2f je 1111a8 *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) 111179: 8b 7b 14 mov 0x14(%ebx),%edi 11117c: 85 ff test %edi,%edi 11117e: 75 17 jne 111197 <== NEVER TAKEN 111180: 83 fe 02 cmp $0x2,%esi 111183: 74 12 je 111197 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 111185: 83 ec 08 sub $0x8,%esp 111188: 8d 45 e4 lea -0x1c(%ebp),%eax 11118b: 50 push %eax 11118c: ff 73 2c pushl 0x2c(%ebx) 11118f: e8 70 15 00 00 call 112704 111194: 83 c4 10 add $0x10,%esp pipe_unlock(); 111197: e8 50 ff ff ff call 1110ec if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 11119c: 31 c0 xor %eax,%eax 11119e: 8d 65 f4 lea -0xc(%ebp),%esp 1111a1: 5b pop %ebx 1111a2: 5e pop %esi 1111a3: 5f pop %edi 1111a4: c9 leave 1111a5: c3 ret 1111a6: 66 90 xchg %ax,%ax <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 1111a8: 8b 43 14 mov 0x14(%ebx),%eax 1111ab: 85 c0 test %eax,%eax 1111ad: 74 29 je 1111d8 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 1111af: 83 fe 04 cmp $0x4,%esi 1111b2: 74 e3 je 111197 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 1111b4: 83 ec 08 sub $0x8,%esp 1111b7: 8d 45 e4 lea -0x1c(%ebp),%eax 1111ba: 50 push %eax 1111bb: ff 73 30 pushl 0x30(%ebx) 1111be: e8 41 15 00 00 call 112704 1111c3: 83 c4 10 add $0x10,%esp else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); pipe_unlock(); 1111c6: e8 21 ff ff ff call 1110ec if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 1111cb: 31 c0 xor %eax,%eax 1111cd: 8d 65 f4 lea -0xc(%ebp),%esp 1111d0: 5b pop %ebx 1111d1: 5e pop %esi 1111d2: 5f pop %edi 1111d3: c9 leave 1111d4: c3 ret 1111d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 1111d8: 83 ec 0c sub $0xc,%esp 1111db: ff 73 2c pushl 0x2c(%ebx) 1111de: e8 91 14 00 00 call 112674 rtems_barrier_delete(pipe->writeBarrier); 1111e3: 59 pop %ecx 1111e4: ff 73 30 pushl 0x30(%ebx) 1111e7: e8 88 14 00 00 call 112674 rtems_semaphore_delete(pipe->Semaphore); 1111ec: 5a pop %edx 1111ed: ff 73 28 pushl 0x28(%ebx) 1111f0: e8 2f b9 ff ff call 10cb24 free(pipe->Buffer); 1111f5: 58 pop %eax 1111f6: ff 33 pushl (%ebx) 1111f8: e8 87 7e ff ff call 109084 free(pipe); 1111fd: 89 1c 24 mov %ebx,(%esp) 111200: e8 7f 7e ff ff call 109084 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 111205: c7 07 00 00 00 00 movl $0x0,(%edi) 11120b: 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(); 11120e: e8 d9 fe ff ff call 1110ec if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 111213: 31 c0 xor %eax,%eax 111215: 8d 65 f4 lea -0xc(%ebp),%esp 111218: 5b pop %ebx 111219: 5e pop %esi 11121a: 5f pop %edi 11121b: c9 leave 11121c: c3 ret rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 11121d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111220: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 111225: e8 92 bf ff ff call 10d1bc <== NOT EXECUTED =============================================================================== 001110ec : return -ENOMEM; } } static void pipe_unlock(void) { 1110ec: 55 push %ebp 1110ed: 89 e5 mov %esp,%ebp 1110ef: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 1110f2: ff 35 d0 6f 12 00 pushl 0x126fd0 1110f8: e8 c7 bb ff ff call 10ccc4 if (sc != RTEMS_SUCCESSFUL) { 1110fd: 83 c4 10 add $0x10,%esp 111100: 85 c0 test %eax,%eax 111102: 75 02 jne 111106 <== NEVER TAKEN /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); } } 111104: c9 leave 111105: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) { /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 111106: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111109: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 11110e: e8 a9 c0 ff ff call 10d1bc <== NOT EXECUTED =============================================================================== 001117a4 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 1117a4: 55 push %ebp 1117a5: 89 e5 mov %esp,%ebp 1117a7: 57 push %edi 1117a8: 56 push %esi 1117a9: 53 push %ebx 1117aa: 83 ec 2c sub $0x2c,%esp int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 1117ad: 8b 7d 10 mov 0x10(%ebp),%edi 1117b0: 85 ff test %edi,%edi 1117b2: 75 0c jne 1117c0 <== ALWAYS TAKEN return 0; 1117b4: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 1117b6: 89 d8 mov %ebx,%eax 1117b8: 8d 65 f4 lea -0xc(%ebp),%esp 1117bb: 5b pop %ebx 1117bc: 5e pop %esi 1117bd: 5f pop %edi 1117be: c9 leave 1117bf: c3 ret /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 1117c0: 56 push %esi 1117c1: 6a 00 push $0x0 1117c3: 6a 00 push $0x0 1117c5: 8b 45 08 mov 0x8(%ebp),%eax 1117c8: ff 70 28 pushl 0x28(%eax) 1117cb: e8 f8 b3 ff ff call 10cbc8 1117d0: 83 c4 10 add $0x10,%esp 1117d3: 85 c0 test %eax,%eax 1117d5: 0f 85 1d 01 00 00 jne 1118f8 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 1117db: 8b 45 08 mov 0x8(%ebp),%eax 1117de: 8b 58 10 mov 0x10(%eax),%ebx 1117e1: 85 db test %ebx,%ebx 1117e3: 0f 84 4b 01 00 00 je 111934 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 1117e9: 8b 48 04 mov 0x4(%eax),%ecx 1117ec: 39 4d 10 cmp %ecx,0x10(%ebp) 1117ef: 0f 87 35 01 00 00 ja 11192a <== NEVER TAKEN 1117f5: 8b 7d 10 mov 0x10(%ebp),%edi 1117f8: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) 1117ff: 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); 111801: 89 5d d4 mov %ebx,-0x2c(%ebp) 111804: 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) { 111807: 8b 43 0c mov 0xc(%ebx),%eax 11180a: 89 ca mov %ecx,%edx 11180c: 29 c2 sub %eax,%edx 11180e: 39 fa cmp %edi,%edx 111810: 73 6f jae 111881 if (LIBIO_NODELAY(iop)) { 111812: 8b 45 14 mov 0x14(%ebp),%eax 111815: f6 40 14 01 testb $0x1,0x14(%eax) 111819: 0f 85 28 01 00 00 jne 111947 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 11181f: ff 43 1c incl 0x1c(%ebx) PIPE_UNLOCK(pipe); 111822: 83 ec 0c sub $0xc,%esp 111825: ff 73 28 pushl 0x28(%ebx) 111828: e8 97 b4 ff ff call 10ccc4 if (! PIPE_WRITEWAIT(pipe)) 11182d: 5a pop %edx 11182e: 59 pop %ecx 11182f: 6a 00 push $0x0 111831: ff 73 30 pushl 0x30(%ebx) 111834: e8 2f 0f 00 00 call 112768 111839: 83 c4 0c add $0xc,%esp 11183c: 83 f8 01 cmp $0x1,%eax 11183f: 19 f6 sbb %esi,%esi 111841: f7 d6 not %esi 111843: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 111846: 6a 00 push $0x0 111848: 6a 00 push $0x0 11184a: ff 73 28 pushl 0x28(%ebx) 11184d: e8 76 b3 ff ff call 10cbc8 111852: 83 c4 10 add $0x10,%esp 111855: 85 c0 test %eax,%eax 111857: 0f 85 e0 00 00 00 jne 11193d <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 11185d: ff 4b 1c decl 0x1c(%ebx) if (ret != 0) 111860: 85 f6 test %esi,%esi 111862: 0f 85 e9 00 00 00 jne 111951 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 111868: 8b 43 10 mov 0x10(%ebx),%eax 11186b: 85 c0 test %eax,%eax 11186d: 0f 84 8f 00 00 00 je 111902 <== NEVER TAKEN 111873: 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) { 111876: 8b 43 0c mov 0xc(%ebx),%eax 111879: 89 ca mov %ecx,%edx 11187b: 29 c2 sub %eax,%edx 11187d: 39 fa cmp %edi,%edx 11187f: 72 91 jb 111812 <== NEVER TAKEN ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 111881: 8b 75 10 mov 0x10(%ebp),%esi 111884: 2b 75 d0 sub -0x30(%ebp),%esi 111887: 89 55 cc mov %edx,-0x34(%ebp) 11188a: 39 f2 cmp %esi,%edx 11188c: 76 03 jbe 111891 11188e: 89 75 cc mov %esi,-0x34(%ebp) chunk1 = pipe->Size - PIPE_WSTART(pipe); 111891: 03 43 08 add 0x8(%ebx),%eax 111894: 31 d2 xor %edx,%edx 111896: f7 f1 div %ecx 111898: 89 c8 mov %ecx,%eax 11189a: 29 d0 sub %edx,%eax if (chunk > chunk1) { 11189c: 39 45 cc cmp %eax,-0x34(%ebp) 11189f: 0f 8e b1 00 00 00 jle 111956 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 1118a5: 03 13 add (%ebx),%edx 1118a7: 8b 75 0c mov 0xc(%ebp),%esi 1118aa: 03 75 d0 add -0x30(%ebp),%esi 1118ad: 89 d7 mov %edx,%edi 1118af: 89 c1 mov %eax,%ecx 1118b1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 1118b3: 8b 13 mov (%ebx),%edx 1118b5: 8b 4d cc mov -0x34(%ebp),%ecx 1118b8: 29 c1 sub %eax,%ecx 1118ba: 03 45 d0 add -0x30(%ebp),%eax 1118bd: 8b 75 0c mov 0xc(%ebp),%esi 1118c0: 01 c6 add %eax,%esi 1118c2: 89 d7 mov %edx,%edi 1118c4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 1118c6: 8b 45 cc mov -0x34(%ebp),%eax 1118c9: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 1118cc: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 1118d0: 0f 85 94 00 00 00 jne 11196a PIPE_WAKEUPREADERS(pipe); written += chunk; 1118d6: 8b 45 cc mov -0x34(%ebp),%eax 1118d9: 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) { 1118dc: 8b 45 d4 mov -0x2c(%ebp),%eax 1118df: 89 45 d0 mov %eax,-0x30(%ebp) 1118e2: 39 45 10 cmp %eax,0x10(%ebp) 1118e5: 0f 86 95 00 00 00 jbe 111980 <== ALWAYS TAKEN 1118eb: 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; 1118ee: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1118f3: e9 0f ff ff ff jmp 111807 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) return -EINTR; 1118f8: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 1118fd: e9 b4 fe ff ff jmp 1117b6 <== NOT EXECUTED 111902: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 111905: 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); 11190a: 83 ec 0c sub $0xc,%esp 11190d: 8b 45 08 mov 0x8(%ebp),%eax 111910: ff 70 28 pushl 0x28(%eax) 111913: e8 ac b3 ff ff call 10ccc4 111918: 83 c4 10 add $0x10,%esp /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 11191b: 85 db test %ebx,%ebx 11191d: 0f 8f 93 fe ff ff jg 1117b6 return written; return ret; 111923: 89 f3 mov %esi,%ebx 111925: e9 8c fe ff ff jmp 1117b6 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 11192a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 11192f: e9 c4 fe ff ff jmp 1117f8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 111934: 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; 111939: 31 db xor %ebx,%ebx 11193b: eb cd jmp 11190a 11193d: 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; 111940: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 111945: eb d4 jmp 11191b <== NOT EXECUTED 111947: 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; 11194a: be f5 ff ff ff mov $0xfffffff5,%esi 11194f: eb b9 jmp 11190a 111951: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 111954: eb b4 jmp 11190a <== 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); 111956: 03 13 add (%ebx),%edx 111958: 8b 75 0c mov 0xc(%ebp),%esi 11195b: 03 75 d0 add -0x30(%ebp),%esi 11195e: 89 d7 mov %edx,%edi 111960: 8b 4d cc mov -0x34(%ebp),%ecx 111963: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 111965: e9 5c ff ff ff jmp 1118c6 pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 11196a: 56 push %esi 11196b: 56 push %esi 11196c: 8d 45 e4 lea -0x1c(%ebp),%eax 11196f: 50 push %eax 111970: ff 73 2c pushl 0x2c(%ebx) 111973: e8 8c 0d 00 00 call 112704 111978: 83 c4 10 add $0x10,%esp 11197b: e9 56 ff ff ff jmp 1118d6 111980: 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) { 111983: 31 f6 xor %esi,%esi 111985: eb 83 jmp 11190a =============================================================================== 0010ba5c : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10ba5c: 55 push %ebp 10ba5d: 89 e5 mov %esp,%ebp 10ba5f: 53 push %ebx 10ba60: 83 ec 04 sub $0x4,%esp 10ba63: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10ba66: ff 05 28 d3 12 00 incl 0x12d328 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10ba6c: 8d 50 ff lea -0x1(%eax),%edx 10ba6f: 85 c2 test %eax,%edx 10ba71: 75 05 jne 10ba78 <== NEVER TAKEN 10ba73: 83 f8 03 cmp $0x3,%eax 10ba76: 77 0c ja 10ba84 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10ba78: b8 16 00 00 00 mov $0x16,%eax 10ba7d: 5a pop %edx 10ba7e: 5b pop %ebx 10ba7f: c9 leave 10ba80: c3 ret 10ba81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10ba84: 59 pop %ecx 10ba85: 5b pop %ebx 10ba86: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10ba87: e9 78 01 00 00 jmp 10bc04 =============================================================================== 0011dce0 : ssize_t read( int fd, void *buffer, size_t count ) { 11dce0: 55 push %ebp 11dce1: 89 e5 mov %esp,%ebp 11dce3: 53 push %ebx 11dce4: 83 ec 04 sub $0x4,%esp 11dce7: 8b 45 08 mov 0x8(%ebp),%eax 11dcea: 8b 55 0c mov 0xc(%ebp),%edx 11dced: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11dcf0: 3b 05 ec 21 12 00 cmp 0x1221ec,%eax 11dcf6: 73 50 jae 11dd48 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11dcf8: c1 e0 03 shl $0x3,%eax 11dcfb: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx 11dd02: 29 c3 sub %eax,%ebx 11dd04: 03 1d 60 62 12 00 add 0x126260,%ebx rtems_libio_check_is_open( iop ); 11dd0a: 8b 43 14 mov 0x14(%ebx),%eax 11dd0d: f6 c4 01 test $0x1,%ah 11dd10: 74 36 je 11dd48 rtems_libio_check_buffer( buffer ); 11dd12: 85 d2 test %edx,%edx 11dd14: 74 46 je 11dd5c <== NEVER TAKEN rtems_libio_check_count( count ); 11dd16: 85 c9 test %ecx,%ecx 11dd18: 74 26 je 11dd40 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11dd1a: a8 02 test $0x2,%al 11dd1c: 74 3e je 11dd5c <== NEVER TAKEN return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 11dd1e: 50 push %eax 11dd1f: 8b 43 20 mov 0x20(%ebx),%eax 11dd22: 51 push %ecx 11dd23: 52 push %edx 11dd24: 53 push %ebx 11dd25: ff 50 08 call *0x8(%eax) if ( rc > 0 ) 11dd28: 83 c4 10 add $0x10,%esp 11dd2b: 85 c0 test %eax,%eax 11dd2d: 7e 0b jle 11dd3a iop->offset += rc; 11dd2f: 89 c1 mov %eax,%ecx 11dd31: c1 f9 1f sar $0x1f,%ecx 11dd34: 01 43 0c add %eax,0xc(%ebx) 11dd37: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11dd3a: 8b 5d fc mov -0x4(%ebp),%ebx 11dd3d: c9 leave 11dd3e: c3 ret 11dd3f: 90 nop <== NOT EXECUTED 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 ); 11dd40: 31 c0 xor %eax,%eax <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 11dd42: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11dd45: c9 leave <== NOT EXECUTED 11dd46: c3 ret <== NOT EXECUTED 11dd47: 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 ); 11dd48: e8 9b 46 ff ff call 1123e8 <__errno> 11dd4d: c7 00 09 00 00 00 movl $0x9,(%eax) 11dd53: b8 ff ff ff ff mov $0xffffffff,%eax 11dd58: eb e0 jmp 11dd3a 11dd5a: 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 ); 11dd5c: e8 87 46 ff ff call 1123e8 <__errno> <== NOT EXECUTED 11dd61: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11dd67: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11dd6c: eb cc jmp 11dd3a <== NOT EXECUTED =============================================================================== 0010af84 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10af84: 55 push %ebp 10af85: 89 e5 mov %esp,%ebp 10af87: 57 push %edi 10af88: 56 push %esi 10af89: 53 push %ebx 10af8a: 83 ec 3c sub $0x3c,%esp 10af8d: 8b 55 08 mov 0x8(%ebp),%edx 10af90: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10af93: 85 db test %ebx,%ebx 10af95: 74 6d je 10b004 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10af97: 31 c0 xor %eax,%eax 10af99: b9 ff ff ff ff mov $0xffffffff,%ecx 10af9e: 89 d7 mov %edx,%edi 10afa0: f2 ae repnz scas %es:(%edi),%al 10afa2: f7 d1 not %ecx 10afa4: 49 dec %ecx 10afa5: 83 ec 0c sub $0xc,%esp 10afa8: 6a 00 push $0x0 10afaa: 8d 75 d4 lea -0x2c(%ebp),%esi 10afad: 56 push %esi 10afae: 6a 00 push $0x0 10afb0: 51 push %ecx 10afb1: 52 push %edx 10afb2: e8 3d ee ff ff call 109df4 0, &loc, false ); if ( result != 0 ) 10afb7: 83 c4 20 add $0x20,%esp 10afba: 85 c0 test %eax,%eax 10afbc: 74 0e je 10afcc <== ALWAYS TAKEN return -1; 10afbe: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10afc3: 8d 65 f4 lea -0xc(%ebp),%esp 10afc6: 5b pop %ebx 10afc7: 5e pop %esi 10afc8: 5f pop %edi 10afc9: c9 leave 10afca: c3 ret 10afcb: 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 ){ 10afcc: 83 ec 0c sub $0xc,%esp 10afcf: 56 push %esi 10afd0: 8b 45 e0 mov -0x20(%ebp),%eax 10afd3: ff 50 10 call *0x10(%eax) 10afd6: 83 c4 10 add $0x10,%esp 10afd9: 83 f8 04 cmp $0x4,%eax 10afdc: 75 3e jne 10b01c <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10afde: 50 push %eax 10afdf: ff 75 10 pushl 0x10(%ebp) 10afe2: 53 push %ebx 10afe3: 56 push %esi 10afe4: 8b 45 e0 mov -0x20(%ebp),%eax 10afe7: ff 50 3c call *0x3c(%eax) rtems_filesystem_freenode( &loc ); 10afea: 89 34 24 mov %esi,(%esp) 10afed: 89 45 c4 mov %eax,-0x3c(%ebp) 10aff0: e8 03 ef ff ff call 109ef8 return result; 10aff5: 83 c4 10 add $0x10,%esp 10aff8: 8b 45 c4 mov -0x3c(%ebp),%eax } 10affb: 8d 65 f4 lea -0xc(%ebp),%esp 10affe: 5b pop %ebx 10afff: 5e pop %esi 10b000: 5f pop %edi 10b001: c9 leave 10b002: c3 ret 10b003: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10b004: e8 bb 9e 00 00 call 114ec4 <__errno> <== NOT EXECUTED 10b009: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10b00f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b014: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b017: 5b pop %ebx <== NOT EXECUTED 10b018: 5e pop %esi <== NOT EXECUTED 10b019: 5f pop %edi <== NOT EXECUTED 10b01a: c9 leave <== NOT EXECUTED 10b01b: c3 ret <== NOT EXECUTED 0, &loc, false ); if ( result != 0 ) return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 10b01c: 83 ec 0c sub $0xc,%esp 10b01f: 56 push %esi 10b020: e8 d3 ee ff ff call 109ef8 rtems_set_errno_and_return_minus_one( EINVAL ); 10b025: e8 9a 9e 00 00 call 114ec4 <__errno> 10b02a: c7 00 16 00 00 00 movl $0x16,(%eax) 10b030: 83 c4 10 add $0x10,%esp 10b033: b8 ff ff ff ff mov $0xffffffff,%eax 10b038: eb 89 jmp 10afc3 =============================================================================== 00109ca8 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109ca8: 55 push %ebp 109ca9: 89 e5 mov %esp,%ebp 109cab: 57 push %edi 109cac: 56 push %esi 109cad: 53 push %ebx 109cae: 83 ec 1c sub $0x1c,%esp 109cb1: 8b 45 08 mov 0x8(%ebp),%eax 109cb4: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109cb7: 3b 05 2c 38 12 00 cmp 0x12382c,%eax 109cbd: 0f 83 ef 00 00 00 jae 109db2 iop = rtems_libio_iop( fd ); 109cc3: c1 e0 03 shl $0x3,%eax 109cc6: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi 109ccd: 29 c6 sub %eax,%esi 109ccf: 03 35 a0 78 12 00 add 0x1278a0,%esi rtems_libio_check_is_open( iop ); 109cd5: 8b 46 14 mov 0x14(%esi),%eax 109cd8: f6 c4 01 test $0x1,%ah 109cdb: 0f 84 d1 00 00 00 je 109db2 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109ce1: a8 02 test $0x2,%al 109ce3: 0f 84 97 00 00 00 je 109d80 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109ce9: 85 db test %ebx,%ebx 109ceb: 0f 84 8f 00 00 00 je 109d80 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109cf1: 8b 7d 10 mov 0x10(%ebp),%edi 109cf4: 85 ff test %edi,%edi 109cf6: 0f 8e 84 00 00 00 jle 109d80 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109cfc: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109d03: 7f 7b jg 109d80 <== NEVER TAKEN 109d05: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109d09: 31 c0 xor %eax,%eax 109d0b: 31 d2 xor %edx,%edx 109d0d: eb 03 jmp 109d12 109d0f: 90 nop <== NOT EXECUTED if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d10: 89 fa mov %edi,%edx all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 109d12: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109d15: 85 c9 test %ecx,%ecx 109d17: 74 67 je 109d80 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109d19: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109d1d: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109d20: 39 fa cmp %edi,%edx 109d22: 7f 5c jg 109d80 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109d24: 85 c9 test %ecx,%ecx 109d26: 74 04 je 109d2c all_zeros = false; 109d28: 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++ ) { 109d2c: 40 inc %eax 109d2d: 39 45 10 cmp %eax,0x10(%ebp) 109d30: 7f de jg 109d10 /* * 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 ) { 109d32: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) 109d36: 75 68 jne 109da0 109d38: 31 ff xor %edi,%edi 109d3a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 109d41: eb 1d jmp 109d60 109d43: 90 nop <== NOT EXECUTED ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109d44: 74 0e je 109d54 <== NEVER TAKEN iop->offset += bytes; 109d46: 89 c1 mov %eax,%ecx 109d48: c1 f9 1f sar $0x1f,%ecx 109d4b: 01 46 0c add %eax,0xc(%esi) 109d4e: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 109d51: 01 45 e4 add %eax,-0x1c(%ebp) } if (bytes != iov[ v ].iov_len) 109d54: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax 109d58: 75 38 jne 109d92 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109d5a: 47 inc %edi 109d5b: 39 7d 10 cmp %edi,0x10(%ebp) 109d5e: 7e 32 jle 109d92 bytes = (*iop->pathinfo.handlers->read_h)( 109d60: 50 push %eax 109d61: 8b 46 20 mov 0x20(%esi),%eax 109d64: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) 109d68: ff 34 fb pushl (%ebx,%edi,8) 109d6b: 56 push %esi 109d6c: ff 50 08 call *0x8(%eax) iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 109d6f: 83 c4 10 add $0x10,%esp 109d72: 83 f8 00 cmp $0x0,%eax 109d75: 7d cd jge 109d44 <== ALWAYS TAKEN return -1; 109d77: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109d7e: eb 12 jmp 109d92 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109d80: e8 e3 93 00 00 call 113168 <__errno> 109d85: c7 00 16 00 00 00 movl $0x16,(%eax) 109d8b: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109d92: 8b 45 e4 mov -0x1c(%ebp),%eax 109d95: 8d 65 f4 lea -0xc(%ebp),%esp 109d98: 5b pop %ebx 109d99: 5e pop %esi 109d9a: 5f pop %edi 109d9b: c9 leave 109d9c: c3 ret 109d9d: 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; 109da0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109da7: 8b 45 e4 mov -0x1c(%ebp),%eax 109daa: 8d 65 f4 lea -0xc(%ebp),%esp 109dad: 5b pop %ebx 109dae: 5e pop %esi 109daf: 5f pop %edi 109db0: c9 leave 109db1: 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 ); 109db2: e8 b1 93 00 00 call 113168 <__errno> 109db7: c7 00 09 00 00 00 movl $0x9,(%eax) 109dbd: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) 109dc4: eb cc jmp 109d92 =============================================================================== 0011ddf0 : void *realloc( void *ptr, size_t size ) { 11ddf0: 55 push %ebp 11ddf1: 89 e5 mov %esp,%ebp 11ddf3: 57 push %edi 11ddf4: 56 push %esi 11ddf5: 53 push %ebx 11ddf6: 83 ec 2c sub $0x2c,%esp 11ddf9: 8b 5d 08 mov 0x8(%ebp),%ebx 11ddfc: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11ddff: ff 05 90 62 12 00 incl 0x126290 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11de05: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 11de0c: 74 72 je 11de80 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11de0e: 85 db test %ebx,%ebx 11de10: 74 5e je 11de70 return malloc( size ); if ( !size ) { 11de12: 85 f6 test %esi,%esi 11de14: 74 3a je 11de50 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11de16: 52 push %edx 11de17: 8d 45 e4 lea -0x1c(%ebp),%eax 11de1a: 50 push %eax 11de1b: 53 push %ebx 11de1c: ff 35 f8 21 12 00 pushl 0x1221f8 11de22: e8 49 01 00 00 call 11df70 <_Protected_heap_Get_block_size> 11de27: 83 c4 10 add $0x10,%esp 11de2a: 84 c0 test %al,%al 11de2c: 74 32 je 11de60 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11de2e: 50 push %eax 11de2f: 56 push %esi 11de30: 53 push %ebx 11de31: ff 35 f8 21 12 00 pushl 0x1221f8 11de37: e8 6c 01 00 00 call 11dfa8 <_Protected_heap_Resize_block> 11de3c: 83 c4 10 add $0x10,%esp 11de3f: 84 c0 test %al,%al 11de41: 74 5d je 11dea0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11de43: 89 d8 mov %ebx,%eax 11de45: 8d 65 f4 lea -0xc(%ebp),%esp 11de48: 5b pop %ebx 11de49: 5e pop %esi 11de4a: 5f pop %edi 11de4b: c9 leave 11de4c: c3 ret 11de4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 11de50: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11de53: 53 push %ebx <== NOT EXECUTED 11de54: e8 d7 a1 fe ff call 108030 <== NOT EXECUTED return (void *) 0; 11de59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11de5c: 31 db xor %ebx,%ebx <== NOT EXECUTED 11de5e: eb e3 jmp 11de43 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 11de60: e8 83 45 ff ff call 1123e8 <__errno> 11de65: c7 00 16 00 00 00 movl $0x16,(%eax) return (void *) 0; 11de6b: 31 db xor %ebx,%ebx 11de6d: eb d4 jmp 11de43 11de6f: 90 nop <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 11de70: 83 ec 0c sub $0xc,%esp 11de73: 56 push %esi 11de74: e8 8b a4 fe ff call 108304 11de79: 89 c3 mov %eax,%ebx 11de7b: 83 c4 10 add $0x10,%esp 11de7e: eb c3 jmp 11de43 /* * 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) 11de80: a1 d4 63 12 00 mov 0x1263d4,%eax 11de85: 85 c0 test %eax,%eax 11de87: 74 04 je 11de8d <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11de89: 31 db xor %ebx,%ebx 11de8b: eb b6 jmp 11de43 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 11de8d: 8b 0d 74 66 12 00 mov 0x126674,%ecx 11de93: 85 c9 test %ecx,%ecx 11de95: 0f 84 73 ff ff ff je 11de0e <== ALWAYS TAKEN new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11de9b: 31 db xor %ebx,%ebx <== NOT EXECUTED 11de9d: eb a4 jmp 11de43 <== NOT EXECUTED 11de9f: 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 ); 11dea0: 83 ec 0c sub $0xc,%esp 11dea3: 56 push %esi 11dea4: e8 5b a4 fe ff call 108304 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11dea9: ff 0d 84 62 12 00 decl 0x126284 if ( !new_area ) { 11deaf: 83 c4 10 add $0x10,%esp 11deb2: 85 c0 test %eax,%eax 11deb4: 74 d3 je 11de89 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11deb6: 8b 55 e4 mov -0x1c(%ebp),%edx 11deb9: 89 f1 mov %esi,%ecx 11debb: 39 d6 cmp %edx,%esi 11debd: 76 02 jbe 11dec1 <== NEVER TAKEN 11debf: 89 d1 mov %edx,%ecx 11dec1: 89 c7 mov %eax,%edi 11dec3: 89 de mov %ebx,%esi 11dec5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11dec7: 83 ec 0c sub $0xc,%esp 11deca: 53 push %ebx 11decb: 89 45 d4 mov %eax,-0x2c(%ebp) 11dece: e8 5d a1 fe ff call 108030 return new_area; 11ded3: 83 c4 10 add $0x10,%esp 11ded6: 8b 45 d4 mov -0x2c(%ebp),%eax 11ded9: 89 c3 mov %eax,%ebx 11dedb: e9 63 ff ff ff jmp 11de43 =============================================================================== 00109d0c : #include int rmdir( const char *pathname ) { 109d0c: 55 push %ebp 109d0d: 89 e5 mov %esp,%ebp 109d0f: 57 push %edi 109d10: 56 push %esi 109d11: 53 push %ebx 109d12: 83 ec 58 sub $0x58,%esp 109d15: 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 ); 109d18: 53 push %ebx 109d19: e8 fa ec ff ff call 108a18 if ( parentpathlen == 0 ) 109d1e: 83 c4 10 add $0x10,%esp 109d21: 85 c0 test %eax,%eax 109d23: 0f 85 0f 01 00 00 jne 109e38 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 109d29: 50 push %eax 109d2a: 8d 45 d0 lea -0x30(%ebp),%eax 109d2d: 89 45 b4 mov %eax,-0x4c(%ebp) 109d30: 50 push %eax 109d31: 8d 45 e4 lea -0x1c(%ebp),%eax 109d34: 50 push %eax 109d35: 53 push %ebx 109d36: e8 45 01 00 00 call 109e80 109d3b: 83 c4 10 add $0x10,%esp 109d3e: 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; 109d40: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 109d44: 8d 7d bc lea -0x44(%ebp),%edi 109d47: b9 05 00 00 00 mov $0x5,%ecx 109d4c: 8b 75 b4 mov -0x4c(%ebp),%esi 109d4f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 109d51: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 109d53: be ff ff ff ff mov $0xffffffff,%esi 109d58: 89 f1 mov %esi,%ecx 109d5a: 89 df mov %ebx,%edi 109d5c: 31 c0 xor %eax,%eax 109d5e: f2 ae repnz scas %es:(%edi),%al 109d60: f7 d1 not %ecx 109d62: 49 dec %ecx 109d63: 83 ec 08 sub $0x8,%esp 109d66: 51 push %ecx 109d67: 53 push %ebx 109d68: e8 ef ec ff ff call 108a5c 109d6d: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 109d6f: 89 f1 mov %esi,%ecx 109d71: 89 df mov %ebx,%edi 109d73: 31 c0 xor %eax,%eax 109d75: f2 ae repnz scas %es:(%edi),%al 109d77: f7 d1 not %ecx 109d79: 49 dec %ecx 109d7a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 109d81: 8d 75 bc lea -0x44(%ebp),%esi 109d84: 56 push %esi 109d85: 6a 00 push $0x0 109d87: 51 push %ecx 109d88: 53 push %ebx 109d89: e8 82 eb ff ff call 108910 0, &loc, false ); if ( result != 0 ) { 109d8e: 83 c4 20 add $0x20,%esp 109d91: 85 c0 test %eax,%eax 109d93: 75 5b jne 109df0 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 109d95: 83 ec 0c sub $0xc,%esp 109d98: 56 push %esi 109d99: 8b 45 c8 mov -0x38(%ebp),%eax 109d9c: ff 50 10 call *0x10(%eax) 109d9f: 83 c4 10 add $0x10,%esp 109da2: 48 dec %eax 109da3: 75 5f jne 109e04 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 109da5: 83 ec 08 sub $0x8,%esp 109da8: 56 push %esi 109da9: ff 75 b4 pushl -0x4c(%ebp) 109dac: 8b 45 c4 mov -0x3c(%ebp),%eax 109daf: ff 50 34 call *0x34(%eax) rtems_filesystem_freenode( &loc ); 109db2: 89 34 24 mov %esi,(%esp) 109db5: 89 45 ac mov %eax,-0x54(%ebp) 109db8: e8 eb ee ff ff call 108ca8 if ( free_parentloc ) 109dbd: 83 c4 10 add $0x10,%esp 109dc0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 109dc4: 8b 45 ac mov -0x54(%ebp),%eax 109dc7: 75 0b jne 109dd4 rtems_filesystem_freenode( &parentloc ); return result; } 109dc9: 8d 65 f4 lea -0xc(%ebp),%esp 109dcc: 5b pop %ebx 109dcd: 5e pop %esi 109dce: 5f pop %edi 109dcf: c9 leave 109dd0: c3 ret 109dd1: 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 ); 109dd4: 83 ec 0c sub $0xc,%esp 109dd7: ff 75 b4 pushl -0x4c(%ebp) 109dda: e8 c9 ee ff ff call 108ca8 109ddf: 83 c4 10 add $0x10,%esp 109de2: 8b 45 ac mov -0x54(%ebp),%eax return result; } 109de5: 8d 65 f4 lea -0xc(%ebp),%esp 109de8: 5b pop %ebx 109de9: 5e pop %esi 109dea: 5f pop %edi 109deb: c9 leave 109dec: c3 ret 109ded: 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 ) 109df0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 109df4: 75 6f jne 109e65 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); return -1; 109df6: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 109dfb: 8d 65 f4 lea -0xc(%ebp),%esp 109dfe: 5b pop %ebx 109dff: 5e pop %esi 109e00: 5f pop %edi 109e01: c9 leave 109e02: c3 ret 109e03: 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 ); 109e04: 83 ec 0c sub $0xc,%esp 109e07: 56 push %esi 109e08: e8 9b ee ff ff call 108ca8 if ( free_parentloc ) 109e0d: 83 c4 10 add $0x10,%esp 109e10: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 109e14: 74 0e je 109e24 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 109e16: 83 ec 0c sub $0xc,%esp 109e19: ff 75 b4 pushl -0x4c(%ebp) 109e1c: e8 87 ee ff ff call 108ca8 109e21: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 109e24: e8 6f 94 00 00 call 113298 <__errno> 109e29: c7 00 14 00 00 00 movl $0x14,(%eax) 109e2f: b8 ff ff ff ff mov $0xffffffff,%eax 109e34: eb 93 jmp 109dc9 109e36: 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, 109e38: 89 c2 mov %eax,%edx 109e3a: 83 ec 0c sub $0xc,%esp 109e3d: 6a 00 push $0x0 109e3f: 8d 45 d0 lea -0x30(%ebp),%eax 109e42: 89 45 b4 mov %eax,-0x4c(%ebp) 109e45: 50 push %eax 109e46: 6a 02 push $0x2 109e48: 52 push %edx 109e49: 53 push %ebx 109e4a: 89 55 ac mov %edx,-0x54(%ebp) 109e4d: e8 56 eb ff ff call 1089a8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 109e52: 83 c4 20 add $0x20,%esp 109e55: 85 c0 test %eax,%eax 109e57: 8b 55 ac mov -0x54(%ebp),%edx 109e5a: 75 9a jne 109df6 <== NEVER TAKEN return -1; free_parentloc = true; 109e5c: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 109e60: e9 df fe ff ff jmp 109d44 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 109e65: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109e68: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 109e6b: e8 38 ee ff ff call 108ca8 <== NOT EXECUTED 109e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 109e73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 109e78: e9 4c ff ff ff jmp 109dc9 <== NOT EXECUTED =============================================================================== 001086fc : uint32_t rtems_assoc_local_by_name( const rtems_assoc_t *ap, const char *name ) { 1086fc: 55 push %ebp 1086fd: 89 e5 mov %esp,%ebp 1086ff: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 108702: ff 75 0c pushl 0xc(%ebp) 108705: ff 75 08 pushl 0x8(%ebp) 108708: e8 13 02 00 00 call 108920 if (nap) 10870d: 83 c4 10 add $0x10,%esp 108710: 85 c0 test %eax,%eax 108712: 74 08 je 10871c return nap->local_value; 108714: 8b 40 04 mov 0x4(%eax),%eax return 0; } 108717: c9 leave 108718: c3 ret 108719: 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; 10871c: 31 c0 xor %eax,%eax } 10871e: c9 leave 10871f: c3 ret =============================================================================== 00111f4c : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 111f4c: 55 push %ebp 111f4d: 89 e5 mov %esp,%ebp 111f4f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 111f52: ff 75 0c pushl 0xc(%ebp) 111f55: ff 75 08 pushl 0x8(%ebp) 111f58: e8 13 00 00 00 call 111f70 if (nap) 111f5d: 83 c4 10 add $0x10,%esp 111f60: 85 c0 test %eax,%eax 111f62: 74 08 je 111f6c return nap->local_value; 111f64: 8b 40 04 mov 0x4(%eax),%eax return 0; } 111f67: c9 leave 111f68: c3 ret 111f69: 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; 111f6c: 31 c0 xor %eax,%eax } 111f6e: c9 leave 111f6f: c3 ret =============================================================================== 00111f00 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 111f00: 55 push %ebp 111f01: 89 e5 mov %esp,%ebp 111f03: 57 push %edi 111f04: 56 push %esi 111f05: 53 push %ebx 111f06: 83 ec 1c sub $0x1c,%esp 111f09: 8b 7d 0c mov 0xc(%ebp),%edi 111f0c: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t local_value = 0; 111f11: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) { 111f18: bb 01 00 00 00 mov $0x1,%ebx 111f1d: eb 06 jmp 111f25 111f1f: 90 nop <== NOT EXECUTED 111f20: d1 e3 shl %ebx 111f22: 4e dec %esi 111f23: 74 1b je 111f40 if (b & remote_value) 111f25: 85 fb test %edi,%ebx 111f27: 74 f7 je 111f20 local_value |= rtems_assoc_local_by_remote(ap, b); 111f29: 83 ec 08 sub $0x8,%esp 111f2c: 53 push %ebx 111f2d: ff 75 08 pushl 0x8(%ebp) 111f30: e8 17 00 00 00 call 111f4c 111f35: 09 45 e4 or %eax,-0x1c(%ebp) 111f38: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 111f3b: d1 e3 shl %ebx 111f3d: 4e dec %esi 111f3e: 75 e5 jne 111f25 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 111f40: 8b 45 e4 mov -0x1c(%ebp),%eax 111f43: 8d 65 f4 lea -0xc(%ebp),%esp 111f46: 5b pop %ebx 111f47: 5e pop %esi 111f48: 5f pop %edi 111f49: c9 leave 111f4a: c3 ret =============================================================================== 00114a80 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114a80: 55 push %ebp 114a81: 89 e5 mov %esp,%ebp 114a83: 53 push %ebx 114a84: 83 ec 0c sub $0xc,%esp 114a87: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 114a8a: 53 push %ebx 114a8b: ff 75 08 pushl 0x8(%ebp) 114a8e: e8 1d 00 00 00 call 114ab0 if (nap) 114a93: 83 c4 10 add $0x10,%esp 114a96: 85 c0 test %eax,%eax 114a98: 74 0a je 114aa4 return nap->name; 114a9a: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 114a9c: 8b 5d fc mov -0x4(%ebp),%ebx 114a9f: c9 leave 114aa0: c3 ret 114aa1: 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); 114aa4: 89 5d 08 mov %ebx,0x8(%ebp) } 114aa7: 8b 5d fc mov -0x4(%ebp),%ebx 114aaa: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 114aab: e9 84 27 00 00 jmp 117234 =============================================================================== 00108790 : char *rtems_assoc_name_by_local_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 108790: 55 push %ebp 108791: 89 e5 mov %esp,%ebp 108793: 57 push %edi 108794: 56 push %esi 108795: 53 push %ebx 108796: 83 ec 1c sub $0x1c,%esp 108799: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 10879c: c6 06 00 movb $0x0,(%esi) 10879f: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 1087a4: bb 01 00 00 00 mov $0x1,%ebx 1087a9: eb 24 jmp 1087cf 1087ab: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_local(ap, b)); 1087ac: 83 ec 08 sub $0x8,%esp 1087af: 53 push %ebx 1087b0: ff 75 08 pushl 0x8(%ebp) 1087b3: 89 55 e4 mov %edx,-0x1c(%ebp) 1087b6: e8 41 00 00 00 call 1087fc 1087bb: 5a pop %edx 1087bc: 59 pop %ecx 1087bd: 50 push %eax 1087be: 56 push %esi 1087bf: e8 24 b3 00 00 call 113ae8 1087c4: 83 c4 10 add $0x10,%esp 1087c7: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 1087ca: d1 e3 shl %ebx 1087cc: 4a dec %edx 1087cd: 74 21 je 1087f0 if (b & value) { 1087cf: 85 5d 0c test %ebx,0xc(%ebp) 1087d2: 74 f6 je 1087ca if (*buffer) 1087d4: 80 3e 00 cmpb $0x0,(%esi) 1087d7: 74 d3 je 1087ac strcat(buffer, " "); 1087d9: b9 ff ff ff ff mov $0xffffffff,%ecx 1087de: 89 f7 mov %esi,%edi 1087e0: 31 c0 xor %eax,%eax 1087e2: f2 ae repnz scas %es:(%edi),%al 1087e4: f7 d1 not %ecx 1087e6: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 1087ed: eb bd jmp 1087ac 1087ef: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_local(ap, b)); } } return buffer; } 1087f0: 89 f0 mov %esi,%eax 1087f2: 8d 65 f4 lea -0xc(%ebp),%esp 1087f5: 5b pop %ebx 1087f6: 5e pop %esi 1087f7: 5f pop %edi 1087f8: c9 leave 1087f9: c3 ret =============================================================================== 00108898 : const char *rtems_assoc_name_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 108898: 55 push %ebp 108899: 89 e5 mov %esp,%ebp 10889b: 53 push %ebx 10889c: 83 ec 0c sub $0xc,%esp 10889f: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 1088a2: 53 push %ebx 1088a3: ff 75 08 pushl 0x8(%ebp) 1088a6: e8 ed 00 00 00 call 108998 if (nap) 1088ab: 83 c4 10 add $0x10,%esp 1088ae: 85 c0 test %eax,%eax 1088b0: 74 0a je 1088bc return nap->name; 1088b2: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(remote_value); } 1088b4: 8b 5d fc mov -0x4(%ebp),%ebx 1088b7: c9 leave 1088b8: c3 ret 1088b9: 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); 1088bc: 89 5d 08 mov %ebx,0x8(%ebp) } 1088bf: 8b 5d fc mov -0x4(%ebp),%ebx 1088c2: c9 leave nap = rtems_assoc_ptr_by_remote(ap, remote_value); if (nap) return nap->name; return rtems_assoc_name_bad(remote_value); 1088c3: e9 b8 7d 00 00 jmp 110680 =============================================================================== 0010882c : char *rtems_assoc_name_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t value, char *buffer ) { 10882c: 55 push %ebp 10882d: 89 e5 mov %esp,%ebp 10882f: 57 push %edi 108830: 56 push %esi 108831: 53 push %ebx 108832: 83 ec 1c sub $0x1c,%esp 108835: 8b 75 10 mov 0x10(%ebp),%esi uint32_t b; *buffer = 0; 108838: c6 06 00 movb $0x0,(%esi) 10883b: ba 20 00 00 00 mov $0x20,%edx for (b = 1; b; b <<= 1) { 108840: bb 01 00 00 00 mov $0x1,%ebx 108845: eb 24 jmp 10886b 108847: 90 nop <== NOT EXECUTED if (b & value) { if (*buffer) strcat(buffer, " "); strcat(buffer, rtems_assoc_name_by_remote(ap, b)); 108848: 83 ec 08 sub $0x8,%esp 10884b: 53 push %ebx 10884c: ff 75 08 pushl 0x8(%ebp) 10884f: 89 55 e4 mov %edx,-0x1c(%ebp) 108852: e8 41 00 00 00 call 108898 108857: 5a pop %edx 108858: 59 pop %ecx 108859: 50 push %eax 10885a: 56 push %esi 10885b: e8 88 b2 00 00 call 113ae8 108860: 83 c4 10 add $0x10,%esp 108863: 8b 55 e4 mov -0x1c(%ebp),%edx { uint32_t b; *buffer = 0; for (b = 1; b; b <<= 1) { 108866: d1 e3 shl %ebx 108868: 4a dec %edx 108869: 74 21 je 10888c if (b & value) { 10886b: 85 5d 0c test %ebx,0xc(%ebp) 10886e: 74 f6 je 108866 if (*buffer) 108870: 80 3e 00 cmpb $0x0,(%esi) 108873: 74 d3 je 108848 strcat(buffer, " "); 108875: b9 ff ff ff ff mov $0xffffffff,%ecx 10887a: 89 f7 mov %esi,%edi 10887c: 31 c0 xor %eax,%eax 10887e: f2 ae repnz scas %es:(%edi),%al 108880: f7 d1 not %ecx 108882: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1) 108889: eb bd jmp 108848 10888b: 90 nop <== NOT EXECUTED strcat(buffer, rtems_assoc_name_by_remote(ap, b)); } } return buffer; } 10888c: 89 f0 mov %esi,%eax 10888e: 8d 65 f4 lea -0xc(%ebp),%esp 108891: 5b pop %ebx 108892: 5e pop %esi 108893: 5f pop %edi 108894: c9 leave 108895: c3 ret =============================================================================== 00114ab0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114ab0: 55 push %ebp 114ab1: 89 e5 mov %esp,%ebp 114ab3: 57 push %edi 114ab4: 56 push %esi 114ab5: 53 push %ebx 114ab6: 8b 45 08 mov 0x8(%ebp),%eax 114ab9: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 114abc: 8b 30 mov (%eax),%esi 114abe: 85 f6 test %esi,%esi 114ac0: 74 3e je 114b00 114ac2: bf f8 61 12 00 mov $0x1261f8,%edi 114ac7: b9 0a 00 00 00 mov $0xa,%ecx 114acc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 114ace: 74 18 je 114ae8 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; 114ad0: 31 c9 xor %ecx,%ecx 114ad2: eb 09 jmp 114add if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 114ad4: 83 c0 0c add $0xc,%eax 114ad7: 8b 18 mov (%eax),%ebx 114ad9: 85 db test %ebx,%ebx 114adb: 74 1b je 114af8 if (ap->local_value == local_value) 114add: 39 50 04 cmp %edx,0x4(%eax) 114ae0: 75 f2 jne 114ad4 return ap; return default_ap; } 114ae2: 5b pop %ebx 114ae3: 5e pop %esi 114ae4: 5f pop %edi 114ae5: c9 leave 114ae6: c3 ret 114ae7: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 114ae8: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 114aeb: 8b 70 0c mov 0xc(%eax),%esi 114aee: 85 f6 test %esi,%esi 114af0: 74 f0 je 114ae2 <== NEVER TAKEN 114af2: 89 c1 mov %eax,%ecx 114af4: 89 d8 mov %ebx,%eax 114af6: eb e5 jmp 114add 114af8: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 114afa: 5b pop %ebx 114afb: 5e pop %esi 114afc: 5f pop %edi 114afd: c9 leave 114afe: c3 ret 114aff: 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; 114b00: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 114b02: 5b pop %ebx 114b03: 5e pop %esi 114b04: 5f pop %edi 114b05: c9 leave 114b06: c3 ret =============================================================================== 00108920 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 108920: 55 push %ebp 108921: 89 e5 mov %esp,%ebp 108923: 57 push %edi 108924: 56 push %esi 108925: 53 push %ebx 108926: 83 ec 0c sub $0xc,%esp 108929: 8b 5d 08 mov 0x8(%ebp),%ebx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 10892c: 8b 03 mov (%ebx),%eax 10892e: 85 c0 test %eax,%eax 108930: 74 5a je 10898c 108932: bf 1d f6 11 00 mov $0x11f61d,%edi 108937: b9 0a 00 00 00 mov $0xa,%ecx 10893c: 89 c6 mov %eax,%esi 10893e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 108940: 74 2e je 108970 const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { const rtems_assoc_t *default_ap = 0; 108942: 31 f6 xor %esi,%esi 108944: eb 0b jmp 108951 108946: 66 90 xchg %ax,%ax <== NOT EXECUTED if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 108948: 83 c3 0c add $0xc,%ebx 10894b: 8b 03 mov (%ebx),%eax 10894d: 85 c0 test %eax,%eax 10894f: 74 2f je 108980 if (strcmp(ap->name, name) == 0) 108951: 83 ec 08 sub $0x8,%esp 108954: ff 75 0c pushl 0xc(%ebp) 108957: 50 push %eax 108958: e8 df b1 00 00 call 113b3c 10895d: 83 c4 10 add $0x10,%esp 108960: 85 c0 test %eax,%eax 108962: 75 e4 jne 108948 return ap; return default_ap; } 108964: 89 d8 mov %ebx,%eax 108966: 8d 65 f4 lea -0xc(%ebp),%esp 108969: 5b pop %ebx 10896a: 5e pop %esi 10896b: 5f pop %edi 10896c: c9 leave 10896d: c3 ret 10896e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 108970: 8d 53 0c lea 0xc(%ebx),%edx for ( ; ap->name; ap++) 108973: 8b 43 0c mov 0xc(%ebx),%eax 108976: 85 c0 test %eax,%eax 108978: 74 ea je 108964 <== NEVER TAKEN 10897a: 89 de mov %ebx,%esi 10897c: 89 d3 mov %edx,%ebx 10897e: eb d1 jmp 108951 108980: 89 f3 mov %esi,%ebx if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 108982: 89 d8 mov %ebx,%eax 108984: 8d 65 f4 lea -0xc(%ebp),%esp 108987: 5b pop %ebx 108988: 5e pop %esi 108989: 5f pop %edi 10898a: c9 leave 10898b: 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; 10898c: 31 db xor %ebx,%ebx for ( ; ap->name; ap++) if (strcmp(ap->name, name) == 0) return ap; return default_ap; } 10898e: 89 d8 mov %ebx,%eax 108990: 8d 65 f4 lea -0xc(%ebp),%esp 108993: 5b pop %ebx 108994: 5e pop %esi 108995: 5f pop %edi 108996: c9 leave 108997: c3 ret =============================================================================== 00111f70 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 111f70: 55 push %ebp 111f71: 89 e5 mov %esp,%ebp 111f73: 57 push %edi 111f74: 56 push %esi 111f75: 53 push %ebx 111f76: 8b 45 08 mov 0x8(%ebp),%eax 111f79: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 111f7c: 8b 30 mov (%eax),%esi 111f7e: 85 f6 test %esi,%esi 111f80: 74 3e je 111fc0 111f82: bf dc 03 12 00 mov $0x1203dc,%edi 111f87: b9 0a 00 00 00 mov $0xa,%ecx 111f8c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 111f8e: 74 18 je 111fa8 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; 111f90: 31 c9 xor %ecx,%ecx 111f92: eb 09 jmp 111f9d if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 111f94: 83 c0 0c add $0xc,%eax 111f97: 8b 18 mov (%eax),%ebx 111f99: 85 db test %ebx,%ebx 111f9b: 74 1b je 111fb8 if (ap->remote_value == remote_value) 111f9d: 39 50 08 cmp %edx,0x8(%eax) 111fa0: 75 f2 jne 111f94 return ap; return default_ap; } 111fa2: 5b pop %ebx 111fa3: 5e pop %esi 111fa4: 5f pop %edi 111fa5: c9 leave 111fa6: c3 ret 111fa7: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 111fa8: 8d 58 0c lea 0xc(%eax),%ebx for ( ; ap->name; ap++) 111fab: 8b 70 0c mov 0xc(%eax),%esi 111fae: 85 f6 test %esi,%esi 111fb0: 74 f0 je 111fa2 <== NEVER TAKEN 111fb2: 89 c1 mov %eax,%ecx 111fb4: 89 d8 mov %ebx,%eax 111fb6: eb e5 jmp 111f9d 111fb8: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 111fba: 5b pop %ebx 111fbb: 5e pop %esi 111fbc: 5f pop %edi 111fbd: c9 leave 111fbe: c3 ret 111fbf: 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; 111fc0: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 111fc2: 5b pop %ebx 111fc3: 5e pop %esi 111fc4: 5f pop %edi 111fc5: c9 leave 111fc6: c3 ret =============================================================================== 00108a3c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 108a3c: 55 push %ebp 108a3d: 89 e5 mov %esp,%ebp 108a3f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 108a42: ff 75 0c pushl 0xc(%ebp) 108a45: ff 75 08 pushl 0x8(%ebp) 108a48: e8 7b fe ff ff call 1088c8 if (nap) 108a4d: 83 c4 10 add $0x10,%esp 108a50: 85 c0 test %eax,%eax 108a52: 74 08 je 108a5c return nap->remote_value; 108a54: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108a57: c9 leave 108a58: c3 ret 108a59: 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; 108a5c: 31 c0 xor %eax,%eax } 108a5e: c9 leave 108a5f: c3 ret =============================================================================== 001089f0 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 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 1c sub $0x1c,%esp 1089f9: 8b 7d 0c mov 0xc(%ebp),%edi 1089fc: be 20 00 00 00 mov $0x20,%esi uint32_t b; uint32_t remote_value = 0; 108a01: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) for (b = 1; b; b <<= 1) 108a08: bb 01 00 00 00 mov $0x1,%ebx 108a0d: eb 06 jmp 108a15 108a0f: 90 nop <== NOT EXECUTED 108a10: d1 e3 shl %ebx 108a12: 4e dec %esi 108a13: 74 1b je 108a30 if (b & local_value) 108a15: 85 fb test %edi,%ebx 108a17: 74 f7 je 108a10 remote_value |= rtems_assoc_remote_by_local(ap, b); 108a19: 83 ec 08 sub $0x8,%esp 108a1c: 53 push %ebx 108a1d: ff 75 08 pushl 0x8(%ebp) 108a20: e8 17 00 00 00 call 108a3c 108a25: 09 45 e4 or %eax,-0x1c(%ebp) 108a28: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t remote_value = 0; for (b = 1; b; b <<= 1) 108a2b: d1 e3 shl %ebx 108a2d: 4e dec %esi 108a2e: 75 e5 jne 108a15 <== ALWAYS TAKEN if (b & local_value) remote_value |= rtems_assoc_remote_by_local(ap, b); return remote_value; } 108a30: 8b 45 e4 mov -0x1c(%ebp),%eax 108a33: 8d 65 f4 lea -0xc(%ebp),%esp 108a36: 5b pop %ebx 108a37: 5e pop %esi 108a38: 5f pop %edi 108a39: c9 leave 108a3a: c3 ret =============================================================================== 00108a60 : uint32_t rtems_assoc_remote_by_name( const rtems_assoc_t *ap, const char *name ) { 108a60: 55 push %ebp 108a61: 89 e5 mov %esp,%ebp 108a63: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_name(ap, name); 108a66: ff 75 0c pushl 0xc(%ebp) 108a69: ff 75 08 pushl 0x8(%ebp) 108a6c: e8 af fe ff ff call 108920 if (nap) 108a71: 83 c4 10 add $0x10,%esp 108a74: 85 c0 test %eax,%eax 108a76: 74 08 je 108a80 return nap->remote_value; 108a78: 8b 40 08 mov 0x8(%eax),%eax return 0; } 108a7b: c9 leave 108a7c: c3 ret 108a7d: 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; 108a80: 31 c0 xor %eax,%eax } 108a82: c9 leave 108a83: c3 ret =============================================================================== 00112588 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112588: 55 push %ebp 112589: 89 e5 mov %esp,%ebp 11258b: 57 push %edi 11258c: 56 push %esi 11258d: 53 push %ebx 11258e: 83 ec 2c sub $0x2c,%esp 112591: 8b 5d 08 mov 0x8(%ebp),%ebx 112594: 8b 7d 0c mov 0xc(%ebp),%edi 112597: 8b 45 10 mov 0x10(%ebp),%eax 11259a: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 11259d: 85 db test %ebx,%ebx 11259f: 0f 84 87 00 00 00 je 11262c <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 1125a5: 85 f6 test %esi,%esi 1125a7: 0f 84 bf 00 00 00 je 11266c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1125ad: f7 c7 10 00 00 00 test $0x10,%edi 1125b3: 0f 84 83 00 00 00 je 11263c the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1125b9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1125c0: 85 c0 test %eax,%eax 1125c2: 0f 84 80 00 00 00 je 112648 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1125c8: 89 45 e4 mov %eax,-0x1c(%ebp) 1125cb: a1 74 73 12 00 mov 0x127374,%eax 1125d0: 40 inc %eax 1125d1: a3 74 73 12 00 mov %eax,0x127374 * 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 ); 1125d6: 83 ec 0c sub $0xc,%esp 1125d9: 68 40 76 12 00 push $0x127640 1125de: e8 e9 b7 ff ff call 10ddcc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1125e3: 83 c4 10 add $0x10,%esp 1125e6: 85 c0 test %eax,%eax 1125e8: 74 6e je 112658 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 1125ea: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1125ed: 83 ec 08 sub $0x8,%esp 1125f0: 8d 55 e0 lea -0x20(%ebp),%edx 1125f3: 52 push %edx 1125f4: 8d 50 14 lea 0x14(%eax),%edx 1125f7: 52 push %edx 1125f8: 89 45 d4 mov %eax,-0x2c(%ebp) 1125fb: e8 b0 07 00 00 call 112db0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112600: 8b 45 d4 mov -0x2c(%ebp),%eax 112603: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112606: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112609: 8b 0d 5c 76 12 00 mov 0x12765c,%ecx 11260f: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112612: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112615: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112617: e8 c4 c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11261c: 83 c4 10 add $0x10,%esp 11261f: 31 c0 xor %eax,%eax } 112621: 8d 65 f4 lea -0xc(%ebp),%esp 112624: 5b pop %ebx 112625: 5e pop %esi 112626: 5f pop %edi 112627: c9 leave 112628: c3 ret 112629: 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; 11262c: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112631: 8d 65 f4 lea -0xc(%ebp),%esp 112634: 5b pop %ebx 112635: 5e pop %esi 112636: 5f pop %edi 112637: c9 leave 112638: c3 ret 112639: 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; 11263c: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112643: eb 83 jmp 1125c8 112645: 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; 112648: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11264d: 8d 65 f4 lea -0xc(%ebp),%esp 112650: 5b pop %ebx 112651: 5e pop %esi 112652: 5f pop %edi 112653: c9 leave 112654: c3 ret 112655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112658: e8 83 c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 11265d: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112662: 8d 65 f4 lea -0xc(%ebp),%esp 112665: 5b pop %ebx 112666: 5e pop %esi 112667: 5f pop %edi 112668: c9 leave 112669: c3 ret 11266a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 11266c: b8 09 00 00 00 mov $0x9,%eax 112671: eb ae jmp 112621 =============================================================================== 00112674 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112674: 55 push %ebp 112675: 89 e5 mov %esp,%ebp 112677: 53 push %ebx 112678: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 11267b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11267e: 50 push %eax 11267f: ff 75 08 pushl 0x8(%ebp) 112682: 68 40 76 12 00 push $0x127640 112687: e8 f0 bb ff ff call 10e27c <_Objects_Get> 11268c: 89 c3 mov %eax,%ebx switch ( location ) { 11268e: 83 c4 10 add $0x10,%esp 112691: 8b 4d f4 mov -0xc(%ebp),%ecx 112694: 85 c9 test %ecx,%ecx 112696: 75 38 jne 1126d0 case OBJECTS_LOCAL: _CORE_barrier_Flush( 112698: 52 push %edx 112699: 6a 02 push $0x2 11269b: 6a 00 push $0x0 11269d: 8d 40 14 lea 0x14(%eax),%eax 1126a0: 50 push %eax 1126a1: e8 5a cb ff ff call 10f200 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1126a6: 59 pop %ecx 1126a7: 58 pop %eax 1126a8: 53 push %ebx 1126a9: 68 40 76 12 00 push $0x127640 1126ae: e8 95 b7 ff ff call 10de48 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 1126b3: 58 pop %eax 1126b4: 5a pop %edx 1126b5: 53 push %ebx 1126b6: 68 40 76 12 00 push $0x127640 1126bb: e8 84 ba ff ff call 10e144 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1126c0: e8 1b c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1126c5: 83 c4 10 add $0x10,%esp 1126c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1126ca: 8b 5d fc mov -0x4(%ebp),%ebx 1126cd: c9 leave 1126ce: c3 ret 1126cf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1126d0: b8 04 00 00 00 mov $0x4,%eax } 1126d5: 8b 5d fc mov -0x4(%ebp),%ebx 1126d8: c9 leave 1126d9: c3 ret =============================================================================== 00112768 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 112768: 55 push %ebp 112769: 89 e5 mov %esp,%ebp 11276b: 53 push %ebx 11276c: 83 ec 18 sub $0x18,%esp 11276f: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112772: 8d 45 f4 lea -0xc(%ebp),%eax 112775: 50 push %eax 112776: 53 push %ebx 112777: 68 40 76 12 00 push $0x127640 11277c: e8 fb ba ff ff call 10e27c <_Objects_Get> switch ( location ) { 112781: 83 c4 10 add $0x10,%esp 112784: 8b 55 f4 mov -0xc(%ebp),%edx 112787: 85 d2 test %edx,%edx 112789: 75 35 jne 1127c0 case OBJECTS_LOCAL: _CORE_barrier_Wait( 11278b: 83 ec 0c sub $0xc,%esp 11278e: 6a 00 push $0x0 112790: ff 75 0c pushl 0xc(%ebp) 112793: 6a 01 push $0x1 112795: 53 push %ebx 112796: 83 c0 14 add $0x14,%eax 112799: 50 push %eax 11279a: e8 75 06 00 00 call 112e14 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 11279f: 83 c4 20 add $0x20,%esp 1127a2: e8 39 c3 ff ff call 10eae0 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1127a7: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 1127aa: a1 18 76 12 00 mov 0x127618,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 1127af: ff 70 34 pushl 0x34(%eax) 1127b2: e8 29 10 00 00 call 1137e0 <_Barrier_Translate_core_barrier_return_code> 1127b7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127ba: 8b 5d fc mov -0x4(%ebp),%ebx 1127bd: c9 leave 1127be: c3 ret 1127bf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1127c0: b8 04 00 00 00 mov $0x4,%eax } 1127c5: 8b 5d fc mov -0x4(%ebp),%ebx 1127c8: c9 leave 1127c9: c3 ret =============================================================================== 00107bac : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 107bac: 55 push %ebp 107bad: 89 e5 mov %esp,%ebp 107baf: 57 push %edi 107bb0: 56 push %esi 107bb1: 53 push %ebx 107bb2: 83 ec 1c sub $0x1c,%esp 107bb5: 8b 45 08 mov 0x8(%ebp),%eax 107bb8: 8b 5d 0c mov 0xc(%ebp),%ebx 107bbb: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 107bbe: 85 c0 test %eax,%eax 107bc0: 75 0e jne 107bd0 value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 107bc2: 31 db xor %ebx,%ebx copy_string( p, value, length ); return value; } 107bc4: 89 d8 mov %ebx,%eax 107bc6: 8d 65 f4 lea -0xc(%ebp),%esp 107bc9: 5b pop %ebx 107bca: 5e pop %esi 107bcb: 5f pop %edi 107bcc: c9 leave 107bcd: c3 ret 107bce: 66 90 xchg %ax,%ax <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !value ) 107bd0: 85 db test %ebx,%ebx 107bd2: 74 f0 je 107bc4 return NULL; if ( !length ) 107bd4: 85 f6 test %esi,%esi 107bd6: 74 ea je 107bc2 return NULL; value[0] = '\0'; 107bd8: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 107bdb: 83 ec 0c sub $0xc,%esp 107bde: 50 push %eax 107bdf: e8 48 00 00 00 call 107c2c if ( !p ) 107be4: 83 c4 10 add $0x10,%esp 107be7: 85 c0 test %eax,%eax 107be9: 74 d7 je 107bc2 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 107bf1: 4e dec %esi 107bf2: 89 75 e4 mov %esi,-0x1c(%ebp) 107bf5: 74 cd je 107bc4 <== NEVER TAKEN 107bf7: 31 f6 xor %esi,%esi 107bf9: 31 d2 xor %edx,%edx 107bfb: 31 ff xor %edi,%edi 107bfd: eb 24 jmp 107c23 107bff: 90 nop <== NOT EXECUTED if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 107c00: f7 c7 01 00 00 00 test $0x1,%edi 107c06: 75 05 jne 107c0d 107c08: 80 f9 20 cmp $0x20,%cl 107c0b: 74 b7 je 107bc4 break; value[i++] = *p++; 107c0d: 88 0c 33 mov %cl,(%ebx,%esi,1) 107c10: 42 inc %edx 107c11: 89 d6 mov %edx,%esi value[i] = '\0'; 107c13: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 107c1e: 3b 55 e4 cmp -0x1c(%ebp),%edx 107c21: 73 a1 jae 107bc4 <== NEVER TAKEN if ( *p == '\"' ) { 107c23: 80 f9 22 cmp $0x22,%cl 107c26: 75 d8 jne 107c00 quotes++; 107c28: 47 inc %edi 107c29: eb e2 jmp 107c0d =============================================================================== 00107c2c : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 107c2c: 55 push %ebp 107c2d: 89 e5 mov %esp,%ebp 107c2f: 83 ec 08 sub $0x8,%esp 107c32: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 107c35: 85 c0 test %eax,%eax 107c37: 75 07 jne 107c40 return NULL; if ( !bsp_boot_cmdline ) return NULL; 107c39: 31 c0 xor %eax,%eax p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107c3b: c9 leave 107c3c: c3 ret 107c3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 107c40: 8b 15 18 60 12 00 mov 0x126018,%edx 107c46: 85 d2 test %edx,%edx 107c48: 74 ef je 107c39 return NULL; p = strstr(bsp_boot_cmdline, name); 107c4a: 83 ec 08 sub $0x8,%esp 107c4d: 50 push %eax 107c4e: 52 push %edx 107c4f: e8 10 bf 00 00 call 113b64 107c54: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 107c57: c9 leave 107c58: c3 ret =============================================================================== 00107c5c : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 107c5c: 55 push %ebp 107c5d: 89 e5 mov %esp,%ebp 107c5f: 57 push %edi 107c60: 53 push %ebx 107c61: 8b 7d 08 mov 0x8(%ebp),%edi 107c64: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 107c67: 50 push %eax 107c68: ff 75 10 pushl 0x10(%ebp) 107c6b: 53 push %ebx 107c6c: 57 push %edi 107c6d: e8 3a ff ff ff call 107bac 107c72: 89 c2 mov %eax,%edx if ( !p ) 107c74: 83 c4 10 add $0x10,%esp 107c77: 85 c0 test %eax,%eax 107c79: 75 0d jne 107c88 return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 107c7b: 31 db xor %ebx,%ebx if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 107c7d: 89 d8 mov %ebx,%eax 107c7f: 8d 65 f8 lea -0x8(%ebp),%esp 107c82: 5b pop %ebx 107c83: 5f pop %edi 107c84: c9 leave 107c85: c3 ret 107c86: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 107c88: 31 c0 xor %eax,%eax 107c8a: b9 ff ff ff ff mov $0xffffffff,%ecx 107c8f: f2 ae repnz scas %es:(%edi),%al 107c91: f7 d1 not %ecx 107c93: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 107c97: 80 38 3d cmpb $0x3d,(%eax) 107c9a: 75 df jne 107c7b <== NEVER TAKEN return NULL; rhs++; 107c9c: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 107c9f: 8a 50 01 mov 0x1(%eax),%dl 107ca2: 80 fa 22 cmp $0x22,%dl 107ca5: 74 29 je 107cd0 rhs++; for ( d=value ; *rhs ; ) 107ca7: 84 d2 test %dl,%dl 107ca9: 74 31 je 107cdc 107cab: 89 d8 mov %ebx,%eax 107cad: 8d 76 00 lea 0x0(%esi),%esi *d++ = *rhs++; 107cb0: 88 10 mov %dl,(%eax) 107cb2: 40 inc %eax 107cb3: 41 inc %ecx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107cb4: 8a 11 mov (%ecx),%dl 107cb6: 84 d2 test %dl,%dl 107cb8: 75 f6 jne 107cb0 *d++ = *rhs++; if ( *(d-1) == '\"' ) 107cba: 8d 50 ff lea -0x1(%eax),%edx 107cbd: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 107cc1: 74 15 je 107cd8 d--; *d = '\0'; 107cc3: c6 00 00 movb $0x0,(%eax) return value; } 107cc6: 89 d8 mov %ebx,%eax 107cc8: 8d 65 f8 lea -0x8(%ebp),%esp 107ccb: 5b pop %ebx 107ccc: 5f pop %edi 107ccd: c9 leave 107cce: c3 ret 107ccf: 90 nop <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 107cd0: 8d 48 02 lea 0x2(%eax),%ecx 107cd3: 8a 50 02 mov 0x2(%eax),%dl 107cd6: eb cf jmp 107ca7 for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) 107cd8: 89 d0 mov %edx,%eax 107cda: eb e7 jmp 107cc3 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 107cdc: 89 d8 mov %ebx,%eax 107cde: eb da jmp 107cba =============================================================================== 00115b68 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115b68: 55 push %ebp 115b69: 89 e5 mov %esp,%ebp 115b6b: 53 push %ebx 115b6c: 83 ec 04 sub $0x4,%esp 115b6f: 8b 45 08 mov 0x8(%ebp),%eax 115b72: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115b75: 85 db test %ebx,%ebx 115b77: 74 3b je 115bb4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115b79: 85 c0 test %eax,%eax 115b7b: 74 2b je 115ba8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115b7d: 83 f8 01 cmp $0x1,%eax 115b80: 74 3e je 115bc0 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115b82: 83 f8 02 cmp $0x2,%eax 115b85: 74 45 je 115bcc *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115b87: 83 f8 03 cmp $0x3,%eax 115b8a: 74 4c je 115bd8 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115b8c: 83 f8 04 cmp $0x4,%eax 115b8f: 74 0b je 115b9c return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115b91: b8 0a 00 00 00 mov $0xa,%eax } 115b96: 5a pop %edx 115b97: 5b pop %ebx 115b98: c9 leave 115b99: c3 ret 115b9a: 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 ); 115b9c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115b9f: 59 pop %ecx 115ba0: 5b pop %ebx 115ba1: 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 ); 115ba2: e9 41 01 00 00 jmp 115ce8 115ba7: 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 ); 115ba8: 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; } 115bab: 58 pop %eax 115bac: 5b pop %ebx 115bad: 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 ); 115bae: e9 81 00 00 00 jmp 115c34 115bb3: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115bb4: 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; } 115bb9: 5a pop %edx 115bba: 5b pop %ebx 115bbb: c9 leave 115bbc: c3 ret 115bbd: 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); 115bc0: 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; } 115bc3: 5b pop %ebx 115bc4: 5b pop %ebx 115bc5: 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); 115bc6: e9 19 00 00 00 jmp 115be4 115bcb: 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(); 115bcc: e8 57 00 00 00 call 115c28 115bd1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bd3: 31 c0 xor %eax,%eax 115bd5: eb bf jmp 115b96 115bd7: 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(); 115bd8: e8 37 00 00 00 call 115c14 115bdd: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bdf: 31 c0 xor %eax,%eax 115be1: eb b3 jmp 115b96 =============================================================================== 0010c06c : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10c06c: 55 push %ebp 10c06d: 89 e5 mov %esp,%ebp 10c06f: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10c072: 85 c0 test %eax,%eax 10c074: 74 1e je 10c094 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c076: 80 3d c8 15 13 00 00 cmpb $0x0,0x1315c8 10c07d: 74 0d je 10c08c return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10c07f: 8b 15 48 16 13 00 mov 0x131648,%edx 10c085: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10c087: 31 c0 xor %eax,%eax } 10c089: c9 leave 10c08a: c3 ret 10c08b: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10c08c: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10c091: c9 leave 10c092: c3 ret 10c093: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10c094: 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; } 10c099: c9 leave 10c09a: c3 ret =============================================================================== 00115ce8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115ce8: 55 push %ebp 115ce9: 89 e5 mov %esp,%ebp 115ceb: 56 push %esi 115cec: 53 push %ebx 115ced: 83 ec 10 sub $0x10,%esp 115cf0: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115cf3: 85 db test %ebx,%ebx 115cf5: 74 51 je 115d48 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115cf7: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 115cfe: 75 0c jne 115d0c return RTEMS_NOT_DEFINED; 115d00: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115d05: 8d 65 f8 lea -0x8(%ebp),%esp 115d08: 5b pop %ebx 115d09: 5e pop %esi 115d0a: c9 leave 115d0b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115d0c: 9c pushf 115d0d: fa cli 115d0e: 5e pop %esi _TOD_Get( &now ); 115d0f: 83 ec 0c sub $0xc,%esp 115d12: 8d 45 f0 lea -0x10(%ebp),%eax 115d15: 50 push %eax 115d16: e8 b9 42 00 00 call 119fd4 <_TOD_Get> _ISR_Enable(level); 115d1b: 56 push %esi 115d1c: 9d popf useconds = (suseconds_t)now.tv_nsec; 115d1d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115d20: 8b 45 f0 mov -0x10(%ebp),%eax 115d23: 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; 115d25: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115d2a: f7 e9 imul %ecx 115d2c: 89 d0 mov %edx,%eax 115d2e: c1 f8 06 sar $0x6,%eax 115d31: c1 f9 1f sar $0x1f,%ecx 115d34: 29 c8 sub %ecx,%eax 115d36: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115d39: 83 c4 10 add $0x10,%esp 115d3c: 31 c0 xor %eax,%eax } 115d3e: 8d 65 f8 lea -0x8(%ebp),%esp 115d41: 5b pop %ebx 115d42: 5e pop %esi 115d43: c9 leave 115d44: c3 ret 115d45: 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; 115d48: b8 09 00 00 00 mov $0x9,%eax 115d4d: eb b6 jmp 115d05 =============================================================================== 0010b268 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b268: 55 push %ebp 10b269: 89 e5 mov %esp,%ebp 10b26b: 83 ec 08 sub $0x8,%esp 10b26e: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b271: 85 c0 test %eax,%eax 10b273: 74 13 je 10b288 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b275: 83 ec 0c sub $0xc,%esp 10b278: 50 push %eax 10b279: e8 9e 15 00 00 call 10c81c <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b27e: 83 c4 10 add $0x10,%esp 10b281: 31 c0 xor %eax,%eax } 10b283: c9 leave 10b284: c3 ret 10b285: 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; 10b288: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b28d: c9 leave 10b28e: c3 ret =============================================================================== 0010c18c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c18c: 55 push %ebp 10c18d: 89 e5 mov %esp,%ebp 10c18f: 53 push %ebx 10c190: 83 ec 14 sub $0x14,%esp 10c193: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c196: 85 db test %ebx,%ebx 10c198: 74 66 je 10c200 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c19a: 83 ec 0c sub $0xc,%esp 10c19d: 53 push %ebx 10c19e: e8 39 01 00 00 call 10c2dc <_TOD_Validate> 10c1a3: 83 c4 10 add $0x10,%esp 10c1a6: 84 c0 test %al,%al 10c1a8: 75 0a jne 10c1b4 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c1aa: b8 14 00 00 00 mov $0x14,%eax } 10c1af: 8b 5d fc mov -0x4(%ebp),%ebx 10c1b2: c9 leave 10c1b3: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c1b4: 83 ec 0c sub $0xc,%esp 10c1b7: 53 push %ebx 10c1b8: e8 93 00 00 00 call 10c250 <_TOD_To_seconds> 10c1bd: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c1c0: 8b 43 18 mov 0x18(%ebx),%eax 10c1c3: 0f af 05 2c 56 12 00 imul 0x12562c,%eax 10c1ca: 8d 04 80 lea (%eax,%eax,4),%eax 10c1cd: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d0: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d3: c1 e0 03 shl $0x3,%eax 10c1d6: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d9: a1 b4 15 13 00 mov 0x1315b4,%eax 10c1de: 40 inc %eax 10c1df: a3 b4 15 13 00 mov %eax,0x1315b4 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c1e4: 8d 45 f0 lea -0x10(%ebp),%eax 10c1e7: 89 04 24 mov %eax,(%esp) 10c1ea: e8 81 18 00 00 call 10da70 <_TOD_Set> _Thread_Enable_dispatch(); 10c1ef: e8 94 2b 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1f4: 83 c4 10 add $0x10,%esp 10c1f7: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c1f9: 8b 5d fc mov -0x4(%ebp),%ebx 10c1fc: c9 leave 10c1fd: c3 ret 10c1fe: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c200: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c205: 8b 5d fc mov -0x4(%ebp),%ebx 10c208: c9 leave 10c209: c3 ret =============================================================================== 0010b03c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10b03c: 55 push %ebp 10b03d: 89 e5 mov %esp,%ebp 10b03f: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10b042: 85 c0 test %eax,%eax 10b044: 74 0a je 10b050 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10b046: a3 84 65 12 00 mov %eax,0x126584 return RTEMS_SUCCESSFUL; 10b04b: 31 c0 xor %eax,%eax } 10b04d: c9 leave 10b04e: c3 ret 10b04f: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10b050: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10b055: c9 leave 10b056: c3 ret =============================================================================== 0010b058 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b058: 55 push %ebp 10b059: 89 e5 mov %esp,%ebp 10b05b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b05e: e8 61 14 00 00 call 10c4c4 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b063: 83 ec 0c sub $0xc,%esp 10b066: 68 a4 64 12 00 push $0x1264a4 10b06b: e8 8c 36 00 00 call 10e6fc <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b070: e8 23 31 00 00 call 10e198 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b075: a0 84 66 12 00 mov 0x126684,%al if ( _Thread_Is_context_switch_necessary() && 10b07a: 83 c4 10 add $0x10,%esp 10b07d: 84 c0 test %al,%al 10b07f: 74 09 je 10b08a * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b081: a1 d4 63 12 00 mov 0x1263d4,%eax 10b086: 85 c0 test %eax,%eax 10b088: 74 06 je 10b090 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b08a: 31 c0 xor %eax,%eax 10b08c: c9 leave 10b08d: c3 ret 10b08e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b090: e8 2f 24 00 00 call 10d4c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b095: 31 c0 xor %eax,%eax 10b097: c9 leave 10b098: c3 ret =============================================================================== 001082f0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1082f0: 55 push %ebp 1082f1: 89 e5 mov %esp,%ebp 1082f3: 57 push %edi 1082f4: 56 push %esi 1082f5: 53 push %ebx 1082f6: 83 ec 6c sub $0x6c,%esp 1082f9: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1082fc: 8b 45 0c mov 0xc(%ebp),%eax 1082ff: 85 c0 test %eax,%eax 108301: 0f 84 5f 01 00 00 je 108466 <== 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 ); 108307: 83 ec 0c sub $0xc,%esp 10830a: 8d 45 d8 lea -0x28(%ebp),%eax 10830d: 50 push %eax 10830e: e8 cd 56 00 00 call 10d9e0 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 108313: 83 c4 0c add $0xc,%esp 108316: 8d 55 d0 lea -0x30(%ebp),%edx 108319: 52 push %edx 10831a: 8d 4d d8 lea -0x28(%ebp),%ecx 10831d: 51 push %ecx 10831e: 68 a8 18 13 00 push $0x1318a8 108323: e8 d4 78 00 00 call 10fbfc <_Timespec_Subtract> } } } #endif (*print)( 108328: 5b pop %ebx 108329: 5e pop %esi 10832a: 68 54 20 12 00 push $0x122054 10832f: 57 push %edi 108330: ff 55 0c call *0xc(%ebp) 108333: 83 c4 10 add $0x10,%esp " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 108336: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10833d: 8b 5d a4 mov -0x5c(%ebp),%ebx 108340: 8b 04 9d 8c 15 13 00 mov 0x13158c(,%ebx,4),%eax 108347: 85 c0 test %eax,%eax 108349: 0f 84 ed 00 00 00 je 10843c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10834f: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 108352: 85 f6 test %esi,%esi 108354: 0f 84 e2 00 00 00 je 10843c <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 10835a: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10835f: 0f 84 d7 00 00 00 je 10843c <== NEVER TAKEN 108365: bb 01 00 00 00 mov $0x1,%ebx 10836a: 89 5d 94 mov %ebx,-0x6c(%ebp) 10836d: eb 4b jmp 1083ba 10836f: 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 ); 108370: 8d 45 e0 lea -0x20(%ebp),%eax 108373: 50 push %eax 108374: 8d 55 e4 lea -0x1c(%ebp),%edx 108377: 52 push %edx 108378: 8d 4d d0 lea -0x30(%ebp),%ecx 10837b: 51 push %ecx 10837c: 8d 5d c8 lea -0x38(%ebp),%ebx 10837f: 53 push %ebx 108380: e8 b3 77 00 00 call 10fb38 <_Timespec_Divide> /* * Print the information */ (*print)( context, 108385: 58 pop %eax 108386: 5a pop %edx 108387: ff 75 e0 pushl -0x20(%ebp) 10838a: ff 75 e4 pushl -0x1c(%ebp) 10838d: ba d3 4d 62 10 mov $0x10624dd3,%edx 108392: 8b 45 cc mov -0x34(%ebp),%eax 108395: f7 e2 mul %edx 108397: c1 ea 06 shr $0x6,%edx 10839a: 52 push %edx 10839b: ff 75 c8 pushl -0x38(%ebp) 10839e: 68 c7 22 12 00 push $0x1222c7 1083a3: 57 push %edi 1083a4: ff 55 0c call *0xc(%ebp) 1083a7: 83 c4 20 add $0x20,%esp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 1083aa: ff 45 94 incl -0x6c(%ebp) 1083ad: 0f b7 46 10 movzwl 0x10(%esi),%eax 1083b1: 3b 45 94 cmp -0x6c(%ebp),%eax 1083b4: 0f 82 82 00 00 00 jb 10843c the_thread = (Thread_Control *)information->local_table[ i ]; 1083ba: 8b 46 1c mov 0x1c(%esi),%eax 1083bd: 8b 4d 94 mov -0x6c(%ebp),%ecx 1083c0: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 1083c3: 85 d2 test %edx,%edx 1083c5: 74 e3 je 1083aa <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1083c7: 51 push %ecx 1083c8: 8d 5d b3 lea -0x4d(%ebp),%ebx 1083cb: 53 push %ebx 1083cc: 6a 0d push $0xd 1083ce: ff 72 08 pushl 0x8(%edx) 1083d1: 89 55 a0 mov %edx,-0x60(%ebp) 1083d4: e8 97 43 00 00 call 10c770 (*print)( 1083d9: 53 push %ebx 1083da: 8b 55 a0 mov -0x60(%ebp),%edx 1083dd: ff 72 08 pushl 0x8(%edx) 1083e0: 68 b4 22 12 00 push $0x1222b4 1083e5: 57 push %edi 1083e6: 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; 1083e9: 8b 55 a0 mov -0x60(%ebp),%edx 1083ec: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1083f2: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1083f8: 89 4d c8 mov %ecx,-0x38(%ebp) 1083fb: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1083fe: 83 c4 20 add $0x20,%esp 108401: a1 98 18 13 00 mov 0x131898,%eax 108406: 8b 5a 08 mov 0x8(%edx),%ebx 108409: 39 58 08 cmp %ebx,0x8(%eax) 10840c: 0f 85 5e ff ff ff jne 108370 Timestamp_Control used; _Timestamp_Subtract( 108412: 50 push %eax 108413: 8d 45 c0 lea -0x40(%ebp),%eax 108416: 50 push %eax 108417: 8d 55 d8 lea -0x28(%ebp),%edx 10841a: 52 push %edx 10841b: 68 70 16 13 00 push $0x131670 108420: e8 d7 77 00 00 call 10fbfc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108425: 59 pop %ecx 108426: 5b pop %ebx 108427: 8d 4d c0 lea -0x40(%ebp),%ecx 10842a: 51 push %ecx 10842b: 8d 5d c8 lea -0x38(%ebp),%ebx 10842e: 53 push %ebx 10842f: e8 c8 76 00 00 call 10fafc <_Timespec_Add_to> 108434: 83 c4 10 add $0x10,%esp 108437: e9 34 ff ff ff jmp 108370 "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10843c: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10843f: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp) 108443: 0f 85 f4 fe ff ff jne 10833d } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108449: ba d3 4d 62 10 mov $0x10624dd3,%edx 10844e: 8b 45 d4 mov -0x2c(%ebp),%eax 108451: f7 e2 mul %edx 108453: c1 ea 06 shr $0x6,%edx 108456: 52 push %edx 108457: ff 75 d0 pushl -0x30(%ebp) 10845a: 68 c8 21 12 00 push $0x1221c8 10845f: 57 push %edi 108460: ff 55 0c call *0xc(%ebp) 108463: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 108466: 8d 65 f4 lea -0xc(%ebp),%esp 108469: 5b pop %ebx 10846a: 5e pop %esi 10846b: 5f pop %edi 10846c: c9 leave 10846d: c3 ret =============================================================================== 00112398 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 112398: 55 push %ebp 112399: 89 e5 mov %esp,%ebp 11239b: 53 push %ebx 11239c: 83 ec 04 sub $0x4,%esp 11239f: 8b 45 08 mov 0x8(%ebp),%eax if (sc == RTEMS_SUCCESSFUL) { 1123a2: 85 c0 test %eax,%eax 1123a4: 75 06 jne 1123ac <== NEVER TAKEN return 0; 1123a6: 31 c0 xor %eax,%eax errno = eno; return -1; } } 1123a8: 5a pop %edx 1123a9: 5b pop %ebx 1123aa: c9 leave 1123ab: c3 ret if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 1123ac: 83 f8 1c cmp $0x1c,%eax <== NOT EXECUTED 1123af: 77 17 ja 1123c8 <== NOT EXECUTED eno = status_code_to_errno [sc]; 1123b1: 8b 1c 85 00 04 12 00 mov 0x120400(,%eax,4),%ebx <== NOT EXECUTED } errno = eno; 1123b8: e8 2b 00 00 00 call 1123e8 <__errno> <== NOT EXECUTED 1123bd: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; 1123bf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1123c4: eb e2 jmp 1123a8 <== NOT EXECUTED 1123c6: 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; 1123c8: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED 1123cd: eb e9 jmp 1123b8 <== NOT EXECUTED =============================================================================== 0010b224 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b224: 55 push %ebp 10b225: 89 e5 mov %esp,%ebp 10b227: 53 push %ebx 10b228: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b22b: 8d 45 f4 lea -0xc(%ebp),%eax 10b22e: 50 push %eax 10b22f: ff 75 08 pushl 0x8(%ebp) 10b232: e8 29 24 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10b237: 83 c4 10 add $0x10,%esp 10b23a: 8b 55 f4 mov -0xc(%ebp),%edx 10b23d: 85 d2 test %edx,%edx 10b23f: 75 2b jne 10b26c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b241: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b247: 9c pushf 10b248: fa cli 10b249: 59 pop %ecx *the_event_set |= the_new_events; 10b24a: 8b 5d 0c mov 0xc(%ebp),%ebx 10b24d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b24f: 51 push %ecx 10b250: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b251: 83 ec 0c sub $0xc,%esp 10b254: 50 push %eax 10b255: e8 1e 00 00 00 call 10b278 <_Event_Surrender> _Thread_Enable_dispatch(); 10b25a: e8 dd 23 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b25f: 83 c4 10 add $0x10,%esp 10b262: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b264: 8b 5d fc mov -0x4(%ebp),%ebx 10b267: c9 leave 10b268: c3 ret 10b269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b26c: b8 04 00 00 00 mov $0x4,%eax } 10b271: 8b 5d fc mov -0x4(%ebp),%ebx 10b274: c9 leave 10b275: c3 ret =============================================================================== 0010d1f8 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d1f8: 55 push %ebp 10d1f9: 89 e5 mov %esp,%ebp 10d1fb: 57 push %edi 10d1fc: 56 push %esi 10d1fd: 53 push %ebx 10d1fe: 83 ec 1c sub $0x1c,%esp 10d201: 8b 75 0c mov 0xc(%ebp),%esi 10d204: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d207: 85 db test %ebx,%ebx 10d209: 0f 84 85 00 00 00 je 10d294 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d20f: 8b 45 08 mov 0x8(%ebp),%eax 10d212: 85 c0 test %eax,%eax 10d214: 75 0e jne 10d224 return RTEMS_INVALID_NAME; 10d216: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d21b: 8d 65 f4 lea -0xc(%ebp),%esp 10d21e: 5b pop %ebx 10d21f: 5e pop %esi 10d220: 5f pop %edi 10d221: c9 leave 10d222: c3 ret 10d223: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d224: a1 b4 15 13 00 mov 0x1315b4,%eax 10d229: 40 inc %eax 10d22a: a3 b4 15 13 00 mov %eax,0x1315b4 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d22f: 83 ec 0c sub $0xc,%esp 10d232: 68 20 18 13 00 push $0x131820 10d237: e8 6c 0d 00 00 call 10dfa8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d23c: 83 c4 10 add $0x10,%esp 10d23f: 85 c0 test %eax,%eax 10d241: 74 45 je 10d288 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d243: 8d 78 24 lea 0x24(%eax),%edi 10d246: b9 08 00 00 00 mov $0x8,%ecx 10d24b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d24d: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d250: 8d 50 10 lea 0x10(%eax),%edx 10d253: 52 push %edx 10d254: 89 45 e4 mov %eax,-0x1c(%ebp) 10d257: e8 e0 29 00 00 call 10fc3c <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d25c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d25f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d262: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d265: 8b 0d 3c 18 13 00 mov 0x13183c,%ecx 10d26b: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d26e: 8b 4d 08 mov 0x8(%ebp),%ecx 10d271: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d274: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d276: e8 0d 1b 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d27b: 83 c4 10 add $0x10,%esp 10d27e: 31 c0 xor %eax,%eax } 10d280: 8d 65 f4 lea -0xc(%ebp),%esp 10d283: 5b pop %ebx 10d284: 5e pop %esi 10d285: 5f pop %edi 10d286: c9 leave 10d287: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d288: e8 fb 1a 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d28d: b8 05 00 00 00 mov $0x5,%eax 10d292: eb 87 jmp 10d21b ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d294: b8 09 00 00 00 mov $0x9,%eax 10d299: eb 80 jmp 10d21b =============================================================================== 0010d07c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d07c: 55 push %ebp 10d07d: 89 e5 mov %esp,%ebp 10d07f: 53 push %ebx 10d080: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10d083: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10d086: 50 push %eax 10d087: ff 75 08 pushl 0x8(%ebp) 10d08a: 68 20 04 13 00 push $0x130420 10d08f: e8 48 11 00 00 call 10e1dc <_Objects_Get> 10d094: 89 c3 mov %eax,%ebx switch ( location ) { 10d096: 83 c4 10 add $0x10,%esp 10d099: 8b 55 f4 mov -0xc(%ebp),%edx 10d09c: 85 d2 test %edx,%edx 10d09e: 75 38 jne 10d0d8 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d0a0: 83 ec 0c sub $0xc,%esp 10d0a3: 8d 40 10 lea 0x10(%eax),%eax 10d0a6: 50 push %eax 10d0a7: e8 84 28 00 00 call 10f930 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d0ac: 59 pop %ecx 10d0ad: 58 pop %eax 10d0ae: 53 push %ebx 10d0af: 68 20 04 13 00 push $0x130420 10d0b4: e8 ef 0c 00 00 call 10dda8 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d0b9: 58 pop %eax 10d0ba: 5a pop %edx 10d0bb: 53 push %ebx 10d0bc: 68 20 04 13 00 push $0x130420 10d0c1: e8 de 0f 00 00 call 10e0a4 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d0c6: e8 75 19 00 00 call 10ea40 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0cb: 83 c4 10 add $0x10,%esp 10d0ce: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d0d0: 8b 5d fc mov -0x4(%ebp),%ebx 10d0d3: c9 leave 10d0d4: c3 ret 10d0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d0d8: b8 04 00 00 00 mov $0x4,%eax } 10d0dd: 8b 5d fc mov -0x4(%ebp),%ebx 10d0e0: c9 leave 10d0e1: c3 ret =============================================================================== 00107f88 : } int rtems_filesystem_dirname( const char *pathname ) { 107f88: 55 push %ebp 107f89: 89 e5 mov %esp,%ebp 107f8b: 57 push %edi 107f8c: 56 push %esi 107f8d: 53 push %ebx 107f8e: 83 ec 0c sub $0xc,%esp 107f91: 8b 5d 08 mov 0x8(%ebp),%ebx int len = strlen( pathname ); 107f94: 31 c0 xor %eax,%eax 107f96: b9 ff ff ff ff mov $0xffffffff,%ecx 107f9b: 89 df mov %ebx,%edi 107f9d: f2 ae repnz scas %es:(%edi),%al 107f9f: f7 d1 not %ecx while ( len ) { 107fa1: 89 ce mov %ecx,%esi 107fa3: 4e dec %esi 107fa4: 75 06 jne 107fac <== ALWAYS TAKEN 107fa6: eb 19 jmp 107fc1 <== NOT EXECUTED 107fa8: 85 f6 test %esi,%esi 107faa: 74 15 je 107fc1 len--; 107fac: 4e dec %esi if ( rtems_filesystem_is_separator( pathname[len] ) ) 107fad: 83 ec 0c sub $0xc,%esp 107fb0: 0f be 04 33 movsbl (%ebx,%esi,1),%eax 107fb4: 50 push %eax 107fb5: e8 ea 0e 00 00 call 108ea4 107fba: 83 c4 10 add $0x10,%esp 107fbd: 85 c0 test %eax,%eax 107fbf: 74 e7 je 107fa8 break; } return len; } 107fc1: 89 f0 mov %esi,%eax 107fc3: 8d 65 f4 lea -0xc(%ebp),%esp 107fc6: 5b pop %ebx 107fc7: 5e pop %esi 107fc8: 5f pop %edi 107fc9: c9 leave 107fca: c3 ret =============================================================================== 00107f18 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107f18: 55 push %ebp 107f19: 89 e5 mov %esp,%ebp 107f1b: 56 push %esi 107f1c: 53 push %ebx 107f1d: 83 ec 10 sub $0x10,%esp 107f20: 8b 5d 08 mov 0x8(%ebp),%ebx 107f23: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 107f26: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107f2d: 85 db test %ebx,%ebx 107f2f: 74 45 je 107f76 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107f31: 85 f6 test %esi,%esi 107f33: 74 2f je 107f64 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107f35: 51 push %ecx 107f36: 56 push %esi 107f37: 8d 45 f4 lea -0xc(%ebp),%eax 107f3a: 50 push %eax 107f3b: 53 push %ebx 107f3c: e8 ff 0e 00 00 call 108e40 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 107f41: 8b 45 f4 mov -0xc(%ebp),%eax 107f44: 5a pop %edx 107f45: ff 75 18 pushl 0x18(%ebp) 107f48: 56 push %esi 107f49: ff 75 10 pushl 0x10(%ebp) 107f4c: 8b 55 0c mov 0xc(%ebp),%edx 107f4f: 29 c2 sub %eax,%edx 107f51: 52 push %edx 107f52: 01 c3 add %eax,%ebx 107f54: 53 push %ebx 107f55: e8 26 ff ff ff call 107e80 107f5a: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 107f5d: 8d 65 f8 lea -0x8(%ebp),%esp 107f60: 5b pop %ebx 107f61: 5e pop %esi 107f62: c9 leave 107f63: c3 ret if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107f64: e8 7f a4 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107f69: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107f6f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107f74: eb e7 jmp 107f5d <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 107f76: e8 6d a4 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107f7b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107f81: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107f86: eb d5 jmp 107f5d <== NOT EXECUTED =============================================================================== 00107e80 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107e80: 55 push %ebp 107e81: 89 e5 mov %esp,%ebp 107e83: 57 push %edi 107e84: 56 push %esi 107e85: 53 push %ebx 107e86: 83 ec 1c sub $0x1c,%esp 107e89: 8b 45 08 mov 0x8(%ebp),%eax 107e8c: 8b 55 0c mov 0xc(%ebp),%edx 107e8f: 8b 7d 10 mov 0x10(%ebp),%edi 107e92: 8b 5d 14 mov 0x14(%ebp),%ebx 107e95: 8b 4d 18 mov 0x18(%ebp),%ecx 107e98: 89 4d e4 mov %ecx,-0x1c(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 107e9b: 85 c0 test %eax,%eax 107e9d: 74 65 je 107f04 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 107e9f: 85 db test %ebx,%ebx 107ea1: 74 4f je 107ef2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 107ea3: 8b 4b 0c mov 0xc(%ebx),%ecx 107ea6: 53 push %ebx 107ea7: 57 push %edi 107ea8: 52 push %edx 107ea9: 50 push %eax 107eaa: ff 11 call *(%ecx) 107eac: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 107eae: 83 c4 10 add $0x10,%esp 107eb1: 85 c0 test %eax,%eax 107eb3: 75 07 jne 107ebc 107eb5: 8b 45 e4 mov -0x1c(%ebp),%eax 107eb8: 85 c0 test %eax,%eax 107eba: 75 0c jne 107ec8 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 107ebc: 89 f0 mov %esi,%eax 107ebe: 8d 65 f4 lea -0xc(%ebp),%esp 107ec1: 5b pop %ebx 107ec2: 5e pop %esi 107ec3: 5f pop %edi 107ec4: c9 leave 107ec5: c3 ret 107ec6: 66 90 xchg %ax,%ax <== NOT EXECUTED * not. */ if ( (result == 0) && follow_link ) { type = (*pathloc->ops->node_type_h)( pathloc ); 107ec8: 83 ec 0c sub $0xc,%esp 107ecb: 8b 43 0c mov 0xc(%ebx),%eax 107ece: 53 push %ebx 107ecf: ff 50 10 call *0x10(%eax) if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 107ed2: 83 e8 03 sub $0x3,%eax 107ed5: 83 c4 10 add $0x10,%esp 107ed8: 83 f8 01 cmp $0x1,%eax 107edb: 77 df ja 107ebc * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107edd: 8b 43 0c mov 0xc(%ebx),%eax 107ee0: 89 7d 0c mov %edi,0xc(%ebp) 107ee3: 89 5d 08 mov %ebx,0x8(%ebp) 107ee6: 8b 40 34 mov 0x34(%eax),%eax } } return result; } 107ee9: 8d 65 f4 lea -0xc(%ebp),%esp 107eec: 5b pop %ebx 107eed: 5e pop %esi 107eee: 5f pop %edi 107eef: c9 leave * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 107ef0: ff e0 jmp *%eax if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107ef2: e8 f1 a4 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107ef7: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 107efd: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107f02: eb b8 jmp 107ebc <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 107f04: e8 df a4 00 00 call 1123e8 <__errno> <== NOT EXECUTED 107f09: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107f0f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 107f14: eb a6 jmp 107ebc <== NOT EXECUTED =============================================================================== 0010fdf0 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10fdf0: 55 push %ebp 10fdf1: 89 e5 mov %esp,%ebp 10fdf3: 83 ec 18 sub $0x18,%esp 10fdf6: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { 10fdf9: 89 45 f0 mov %eax,-0x10(%ebp) 10fdfc: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) .type = type, .mount_h = NULL }; if ( type != NULL ) { 10fe03: 85 c0 test %eax,%eax 10fe05: 74 19 je 10fe20 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10fe07: 83 ec 08 sub $0x8,%esp 10fe0a: 8d 45 f0 lea -0x10(%ebp),%eax 10fe0d: 50 push %eax 10fe0e: 68 10 fd 10 00 push $0x10fd10 10fe13: e8 34 ff ff ff call 10fd4c 10fe18: 8b 45 f4 mov -0xc(%ebp),%eax 10fe1b: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10fe1e: c9 leave 10fe1f: c3 ret find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { 10fe20: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_filesystem_iterate( find_handler, &fa ); } return fa.mount_h; } 10fe22: c9 leave <== NOT EXECUTED 10fe23: c3 ret <== NOT EXECUTED =============================================================================== 0010ffac : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 10ffac: 55 push %ebp 10ffad: 89 e5 mov %esp,%ebp 10ffaf: 57 push %edi 10ffb0: 56 push %esi 10ffb1: 53 push %ebx 10ffb2: 83 ec 18 sub $0x18,%esp 10ffb5: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 10ffb8: 8b 45 08 mov 0x8(%ebp),%eax 10ffbb: 0f be 00 movsbl (%eax),%eax 10ffbe: 50 push %eax 10ffbf: e8 e0 8e ff ff call 108ea4 10ffc4: 83 c4 10 add $0x10,%esp 10ffc7: 85 c0 test %eax,%eax 10ffc9: 75 11 jne 10ffdc *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 10ffcb: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 10ffd1: 8d 65 f4 lea -0xc(%ebp),%esp 10ffd4: 5b pop %ebx 10ffd5: 5e pop %esi 10ffd6: 5f pop %edi 10ffd7: c9 leave 10ffd8: c3 ret 10ffd9: 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; 10ffdc: 8b 35 c4 40 12 00 mov 0x1240c4,%esi 10ffe2: 83 c6 18 add $0x18,%esi 10ffe5: b9 05 00 00 00 mov $0x5,%ecx 10ffea: 8b 7d 10 mov 0x10(%ebp),%edi 10ffed: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 10ffef: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 10fff5: 8d 65 f4 lea -0xc(%ebp),%esp 10fff8: 5b pop %ebx 10fff9: 5e pop %esi 10fffa: 5f pop %edi 10fffb: c9 leave 10fffc: c3 ret =============================================================================== 00107d5c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107d5c: 55 push %ebp 107d5d: 89 e5 mov %esp,%ebp 107d5f: 57 push %edi 107d60: 56 push %esi 107d61: 53 push %ebx 107d62: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107d65: a1 c4 40 12 00 mov 0x1240c4,%eax 107d6a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 107d71: a1 e0 e3 11 00 mov 0x11e3e0,%eax 107d76: 85 c0 test %eax,%eax 107d78: 0f 84 9f 00 00 00 je 107e1d <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 107d7e: a1 f4 21 12 00 mov 0x1221f4,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107d83: 83 ec 0c sub $0xc,%esp 107d86: 6a 00 push $0x0 107d88: ff 70 04 pushl 0x4(%eax) 107d8b: ff 30 pushl (%eax) 107d8d: ff 70 0c pushl 0xc(%eax) 107d90: ff 70 08 pushl 0x8(%eax) 107d93: e8 58 07 00 00 call 1084f0 if ( status == -1 ) 107d98: 83 c4 20 add $0x20,%esp 107d9b: 40 inc %eax 107d9c: 0f 84 95 00 00 00 je 107e37 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 107da2: a1 c4 40 12 00 mov 0x1240c4,%eax 107da7: 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); 107dad: 83 ec 0c sub $0xc,%esp 107db0: 6a 00 push $0x0 107db2: 8d 5d d4 lea -0x2c(%ebp),%ebx 107db5: 53 push %ebx 107db6: 6a 00 push $0x0 107db8: 6a 01 push $0x1 107dba: 68 87 fd 11 00 push $0x11fd87 107dbf: e8 54 01 00 00 call 107f18 rtems_filesystem_root = loc; 107dc4: 8b 3d c4 40 12 00 mov 0x1240c4,%edi 107dca: 83 c7 18 add $0x18,%edi 107dcd: b9 05 00 00 00 mov $0x5,%ecx 107dd2: 89 de mov %ebx,%esi 107dd4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 107dd6: 83 c4 14 add $0x14,%esp 107dd9: 6a 00 push $0x0 107ddb: 53 push %ebx 107ddc: 6a 00 push $0x0 107dde: 6a 01 push $0x1 107de0: 68 87 fd 11 00 push $0x11fd87 107de5: e8 2e 01 00 00 call 107f18 rtems_filesystem_current = loc; 107dea: 8b 3d c4 40 12 00 mov 0x1240c4,%edi 107df0: 83 c7 04 add $0x4,%edi 107df3: b9 05 00 00 00 mov $0x5,%ecx 107df8: 89 de mov %ebx,%esi 107dfa: 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); 107dfc: 83 c4 18 add $0x18,%esp 107dff: 68 ff 01 00 00 push $0x1ff 107e04: 68 89 fd 11 00 push $0x11fd89 107e09: e8 9e 05 00 00 call 1083ac if ( status != 0 ) 107e0e: 83 c4 10 add $0x10,%esp 107e11: 85 c0 test %eax,%eax 107e13: 75 15 jne 107e2a <== 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. */ } 107e15: 8d 65 f4 lea -0xc(%ebp),%esp 107e18: 5b pop %ebx 107e19: 5e pop %esi 107e1a: 5f pop %edi 107e1b: c9 leave 107e1c: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 107e1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e20: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 107e25: e8 4a 3f 00 00 call 10bd74 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 107e2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e2d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107e32: e8 3d 3f 00 00 call 10bd74 <== 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 ); 107e37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e3a: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107e3f: e8 30 3f 00 00 call 10bd74 <== NOT EXECUTED =============================================================================== 0010fd4c : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10fd4c: 55 push %ebp 10fd4d: 89 e5 mov %esp,%ebp 10fd4f: 57 push %edi 10fd50: 56 push %esi 10fd51: 53 push %ebx 10fd52: 83 ec 1c sub $0x1c,%esp 10fd55: 8b 75 08 mov 0x8(%ebp),%esi 10fd58: 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 ) { 10fd5b: 8b 1d c0 e3 11 00 mov 0x11e3c0,%ebx 10fd61: 85 db test %ebx,%ebx 10fd63: 74 24 je 10fd89 <== NEVER TAKEN 10fd65: bb c0 e3 11 00 mov $0x11e3c0,%ebx 10fd6a: eb 04 jmp 10fd70 10fd6c: 84 c0 test %al,%al <== NOT EXECUTED 10fd6e: 75 70 jne 10fde0 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); 10fd70: 83 ec 08 sub $0x8,%esp 10fd73: 57 push %edi 10fd74: 53 push %ebx 10fd75: ff d6 call *%esi 10fd77: 88 c2 mov %al,%dl ++table_entry; 10fd79: 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 ) { 10fd7c: 83 c4 10 add $0x10,%esp 10fd7f: 8b 0b mov (%ebx),%ecx 10fd81: 85 c9 test %ecx,%ecx 10fd83: 75 e7 jne 10fd6c <== NEVER TAKEN stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10fd85: 84 c0 test %al,%al 10fd87: 75 57 jne 10fde0 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 ); 10fd89: 50 push %eax 10fd8a: 6a 00 push $0x0 10fd8c: 6a 00 push $0x0 10fd8e: ff 35 68 62 12 00 pushl 0x126268 10fd94: e8 9f b9 ff ff call 10b738 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10fd99: 8b 1d e8 40 12 00 mov 0x1240e8,%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fd9f: 83 c4 10 add $0x10,%esp 10fda2: 81 fb ec 40 12 00 cmp $0x1240ec,%ebx 10fda8: 75 06 jne 10fdb0 10fdaa: eb 3e jmp 10fdea node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 10fdac: 84 c0 test %al,%al 10fdae: 75 19 jne 10fdc9 <== NEVER TAKEN node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10fdb0: 83 ec 08 sub $0x8,%esp 10fdb3: 57 push %edi 10fdb4: 8d 43 08 lea 0x8(%ebx),%eax 10fdb7: 50 push %eax 10fdb8: ff d6 call *%esi 10fdba: 88 c2 mov %al,%dl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10fdbc: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fdbe: 83 c4 10 add $0x10,%esp 10fdc1: 81 fb ec 40 12 00 cmp $0x1240ec,%ebx 10fdc7: 75 e3 jne 10fdac } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fdc9: 83 ec 0c sub $0xc,%esp 10fdcc: ff 35 68 62 12 00 pushl 0x126268 10fdd2: 88 55 e4 mov %dl,-0x1c(%ebp) 10fdd5: e8 5a ba ff ff call 10b834 10fdda: 83 c4 10 add $0x10,%esp 10fddd: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 10fde0: 88 d0 mov %dl,%al 10fde2: 8d 65 f4 lea -0xc(%ebp),%esp 10fde5: 5b pop %ebx 10fde6: 5e pop %esi 10fde7: 5f pop %edi 10fde8: c9 leave 10fde9: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10fdea: 31 d2 xor %edx,%edx 10fdec: eb db jmp 10fdc9 =============================================================================== 00108480 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 108480: 55 push %ebp 108481: 89 e5 mov %esp,%ebp 108483: 57 push %edi 108484: 56 push %esi 108485: 53 push %ebx 108486: 83 ec 20 sub $0x20,%esp 108489: 8b 7d 08 mov 0x8(%ebp),%edi 10848c: 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 ); 10848f: 6a 00 push $0x0 108491: 6a 00 push $0x0 108493: ff 35 68 62 12 00 pushl 0x126268 108499: e8 9a 32 00 00 call 10b738 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 10849e: 8b 1d a4 40 12 00 mov 0x1240a4,%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 1084a4: 83 c4 10 add $0x10,%esp 1084a7: 81 fb a8 40 12 00 cmp $0x1240a8,%ebx 1084ad: 75 09 jne 1084b8 <== ALWAYS TAKEN 1084af: eb 3b jmp 1084ec <== NOT EXECUTED 1084b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 1084b4: 84 c0 test %al,%al 1084b6: 75 16 jne 1084ce <== 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 ); 1084b8: 83 ec 08 sub $0x8,%esp 1084bb: 56 push %esi 1084bc: 53 push %ebx 1084bd: ff d7 call *%edi 1084bf: 88 c2 mov %al,%dl } rtems_libio_unlock(); return stop; } 1084c1: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 1084c3: 83 c4 10 add $0x10,%esp 1084c6: 81 fb a8 40 12 00 cmp $0x1240a8,%ebx 1084cc: 75 e6 jne 1084b4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 1084ce: 83 ec 0c sub $0xc,%esp 1084d1: ff 35 68 62 12 00 pushl 0x126268 1084d7: 88 55 e4 mov %dl,-0x1c(%ebp) 1084da: e8 55 33 00 00 call 10b834 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 1084df: 8a 55 e4 mov -0x1c(%ebp),%dl 1084e2: 88 d0 mov %dl,%al 1084e4: 8d 65 f4 lea -0xc(%ebp),%esp 1084e7: 5b pop %ebx 1084e8: 5e pop %esi 1084e9: 5f pop %edi 1084ea: c9 leave 1084eb: c3 ret rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 1084ec: 31 d2 xor %edx,%edx <== NOT EXECUTED 1084ee: eb de jmp 1084ce <== NOT EXECUTED =============================================================================== 00107fcc : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 107fcc: 55 push %ebp 107fcd: 89 e5 mov %esp,%ebp 107fcf: 57 push %edi 107fd0: 56 push %esi 107fd1: 53 push %ebx 107fd2: 83 ec 0c sub $0xc,%esp 107fd5: 8b 75 08 mov 0x8(%ebp),%esi 107fd8: 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 ) ) 107fdb: 8a 06 mov (%esi),%al 107fdd: 84 c0 test %al,%al 107fdf: 74 34 je 108015 <== NEVER TAKEN 107fe1: 85 ff test %edi,%edi 107fe3: 74 30 je 108015 <== NEVER TAKEN 107fe5: 31 db xor %ebx,%ebx 107fe7: eb 0f jmp 107ff8 107fe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { pathname++; pathnamelen--; stripped++; 107fec: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 107fed: 8a 04 1e mov (%esi,%ebx,1),%al 107ff0: 84 c0 test %al,%al 107ff2: 74 17 je 10800b <== NEVER TAKEN 107ff4: 39 df cmp %ebx,%edi 107ff6: 74 13 je 10800b <== NEVER TAKEN 107ff8: 83 ec 0c sub $0xc,%esp 107ffb: 0f be c0 movsbl %al,%eax 107ffe: 50 push %eax 107fff: e8 a0 0e 00 00 call 108ea4 108004: 83 c4 10 add $0x10,%esp 108007: 85 c0 test %eax,%eax 108009: 75 e1 jne 107fec pathname++; pathnamelen--; stripped++; } return stripped; } 10800b: 89 d8 mov %ebx,%eax 10800d: 8d 65 f4 lea -0xc(%ebp),%esp 108010: 5b pop %ebx 108011: 5e pop %esi 108012: 5f pop %edi 108013: c9 leave 108014: c3 ret ) { /* * Eat any separators at start of the path. */ int stripped = 0; 108015: 31 db xor %ebx,%ebx <== NOT EXECUTED 108017: eb f2 jmp 10800b <== NOT EXECUTED =============================================================================== 0010fe24 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 10fe24: 55 push %ebp 10fe25: 89 e5 mov %esp,%ebp 10fe27: 57 push %edi 10fe28: 56 push %esi 10fe29: 53 push %ebx 10fe2a: 83 ec 18 sub $0x18,%esp 10fe2d: 8b 5d 08 mov 0x8(%ebp),%ebx size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 10fe30: 31 c0 xor %eax,%eax 10fe32: b9 ff ff ff ff mov $0xffffffff,%ecx 10fe37: 89 df mov %ebx,%edi 10fe39: f2 ae repnz scas %es:(%edi),%al 10fe3b: f7 d1 not %ecx 10fe3d: 83 c1 10 add $0x10,%ecx filesystem_node *fsn = malloc( fsn_size ); 10fe40: 51 push %ecx 10fe41: e8 be 84 ff ff call 108304 10fe46: 89 c6 mov %eax,%esi char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 10fe48: 83 c4 10 add $0x10,%esp 10fe4b: 85 c0 test %eax,%eax 10fe4d: 0f 84 92 00 00 00 je 10fee5 rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); 10fe53: 8d 78 10 lea 0x10(%eax),%edi if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 10fe56: 83 ec 08 sub $0x8,%esp 10fe59: 53 push %ebx 10fe5a: 57 push %edi 10fe5b: e8 50 31 00 00 call 112fb0 fsn->entry.type = type_storage; 10fe60: 89 7e 08 mov %edi,0x8(%esi) fsn->entry.mount_h = mount_h; 10fe63: 8b 45 0c mov 0xc(%ebp),%eax 10fe66: 89 46 0c mov %eax,0xc(%esi) rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 10fe69: 83 c4 0c add $0xc,%esp 10fe6c: 6a 00 push $0x0 10fe6e: 6a 00 push $0x0 10fe70: ff 35 68 62 12 00 pushl 0x126268 10fe76: e8 bd b8 ff ff call 10b738 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 10fe7b: 89 1c 24 mov %ebx,(%esp) 10fe7e: e8 6d ff ff ff call 10fdf0 10fe83: 83 c4 10 add $0x10,%esp 10fe86: 85 c0 test %eax,%eax 10fe88: 75 2a jne 10feb4 10fe8a: 83 ec 08 sub $0x8,%esp 10fe8d: 56 push %esi 10fe8e: 68 e8 40 12 00 push $0x1240e8 10fe93: e8 70 c1 ff ff call 10c008 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fe98: 5e pop %esi 10fe99: ff 35 68 62 12 00 pushl 0x126268 10fe9f: e8 90 b9 ff ff call 10b834 10fea4: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 10fea7: 31 c0 xor %eax,%eax } 10fea9: 8d 65 f4 lea -0xc(%ebp),%esp 10feac: 5b pop %ebx 10fead: 5e pop %esi 10feae: 5f pop %edi 10feaf: c9 leave 10feb0: c3 ret 10feb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10feb4: 83 ec 0c sub $0xc,%esp 10feb7: ff 35 68 62 12 00 pushl 0x126268 10febd: e8 72 b9 ff ff call 10b834 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 10fec2: 89 34 24 mov %esi,(%esp) 10fec5: e8 66 81 ff ff call 108030 rtems_set_errno_and_return_minus_one( EINVAL ); 10feca: e8 19 25 00 00 call 1123e8 <__errno> 10fecf: c7 00 16 00 00 00 movl $0x16,(%eax) 10fed5: 83 c4 10 add $0x10,%esp 10fed8: b8 ff ff ff ff mov $0xffffffff,%eax } rtems_libio_unlock(); return 0; } 10fedd: 8d 65 f4 lea -0xc(%ebp),%esp 10fee0: 5b pop %ebx 10fee1: 5e pop %esi 10fee2: 5f pop %edi 10fee3: c9 leave 10fee4: c3 ret size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 10fee5: e8 fe 24 00 00 call 1123e8 <__errno> 10feea: c7 00 0c 00 00 00 movl $0xc,(%eax) 10fef0: b8 ff ff ff ff mov $0xffffffff,%eax 10fef5: eb b2 jmp 10fea9 =============================================================================== 0010fef8 : int rtems_filesystem_unregister( const char *type ) { 10fef8: 55 push %ebp 10fef9: 89 e5 mov %esp,%ebp 10fefb: 56 push %esi 10fefc: 53 push %ebx 10fefd: 8b 75 08 mov 0x8(%ebp),%esi rtems_chain_node *node = NULL; if ( type == NULL ) { 10ff00: 85 f6 test %esi,%esi 10ff02: 0f 84 94 00 00 00 je 10ff9c 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 ); 10ff08: 52 push %edx 10ff09: 6a 00 push $0x0 10ff0b: 6a 00 push $0x0 10ff0d: ff 35 68 62 12 00 pushl 0x126268 10ff13: e8 20 b8 ff ff call 10b738 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff18: 8b 1d e8 40 12 00 mov 0x1240e8,%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10ff1e: 83 c4 10 add $0x10,%esp 10ff21: 81 fb ec 40 12 00 cmp $0x1240ec,%ebx 10ff27: 75 0d jne 10ff36 10ff29: eb 49 jmp 10ff74 10ff2b: 90 nop <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff2c: 8b 1b mov (%ebx),%ebx if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 10ff2e: 81 fb ec 40 12 00 cmp $0x1240ec,%ebx 10ff34: 74 3e je 10ff74 <== 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 ) { 10ff36: 83 ec 08 sub $0x8,%esp 10ff39: 56 push %esi 10ff3a: ff 73 08 pushl 0x8(%ebx) 10ff3d: e8 16 30 00 00 call 112f58 10ff42: 83 c4 10 add $0x10,%esp 10ff45: 85 c0 test %eax,%eax 10ff47: 75 e3 jne 10ff2c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ff49: 83 ec 0c sub $0xc,%esp 10ff4c: 53 push %ebx 10ff4d: e8 da c0 ff ff call 10c02c <_Chain_Extract> rtems_chain_extract( node ); free( fsn ); 10ff52: 89 1c 24 mov %ebx,(%esp) 10ff55: e8 d6 80 ff ff call 108030 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10ff5a: 58 pop %eax 10ff5b: ff 35 68 62 12 00 pushl 0x126268 10ff61: e8 ce b8 ff ff call 10b834 10ff66: 83 c4 10 add $0x10,%esp rtems_libio_unlock(); return 0; 10ff69: 31 c0 xor %eax,%eax } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10ff6b: 8d 65 f8 lea -0x8(%ebp),%esp 10ff6e: 5b pop %ebx 10ff6f: 5e pop %esi 10ff70: c9 leave 10ff71: c3 ret 10ff72: 66 90 xchg %ax,%ax <== NOT EXECUTED 10ff74: 83 ec 0c sub $0xc,%esp 10ff77: ff 35 68 62 12 00 pushl 0x126268 10ff7d: e8 b2 b8 ff ff call 10b834 return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 10ff82: e8 61 24 00 00 call 1123e8 <__errno> 10ff87: c7 00 02 00 00 00 movl $0x2,(%eax) 10ff8d: 83 c4 10 add $0x10,%esp 10ff90: b8 ff ff ff ff mov $0xffffffff,%eax } 10ff95: 8d 65 f8 lea -0x8(%ebp),%esp 10ff98: 5b pop %ebx 10ff99: 5e pop %esi 10ff9a: c9 leave 10ff9b: c3 ret ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 10ff9c: e8 47 24 00 00 call 1123e8 <__errno> 10ffa1: c7 00 16 00 00 00 movl $0x16,(%eax) 10ffa7: 83 c8 ff or $0xffffffff,%eax 10ffaa: eb e9 jmp 10ff95 =============================================================================== 00108784 : void *rtems_gxx_getspecific(__gthread_key_t key) { 108784: 55 push %ebp 108785: 89 e5 mov %esp,%ebp 108787: 53 push %ebx 108788: 83 ec 18 sub $0x18,%esp 10878b: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code status; void *p= 0; 10878e: 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 ); 108795: 8d 45 f4 lea -0xc(%ebp),%eax 108798: 50 push %eax 108799: 53 push %ebx 10879a: 6a 00 push $0x0 10879c: e8 93 3e 00 00 call 10c634 if ( status == RTEMS_SUCCESSFUL ) { 1087a1: 83 c4 10 add $0x10,%esp 1087a4: 85 c0 test %eax,%eax 1087a6: 75 08 jne 1087b0 <== NEVER TAKEN /* We do not have to do this, but what the heck ! */ p= key->val; 1087a8: 8b 03 mov (%ebx),%eax p, rtems_task_self() ); #endif return p; } 1087aa: 8b 5d fc mov -0x4(%ebp),%ebx 1087ad: c9 leave 1087ae: c3 ret 1087af: 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 ); 1087b0: 50 push %eax <== NOT EXECUTED 1087b1: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED 1087b4: 53 push %ebx <== NOT EXECUTED 1087b5: 6a 00 push $0x0 <== NOT EXECUTED 1087b7: e8 18 3d 00 00 call 10c4d4 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 1087bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1087bf: 85 c0 test %eax,%eax <== NOT EXECUTED 1087c1: 75 0e jne 1087d1 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); } key->val = (void *)0; 1087c3: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 1087c9: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 1087cc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1087cf: c9 leave <== NOT EXECUTED 1087d0: c3 ret <== NOT EXECUTED /* 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 ) { rtems_panic ("rtems_gxx_getspecific"); 1087d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087d4: 68 48 0e 12 00 push $0x120e48 <== NOT EXECUTED 1087d9: e8 12 7f 00 00 call 1106f0 <== NOT EXECUTED =============================================================================== 00108754 : int rtems_gxx_key_delete (__gthread_key_t key) { 108754: 55 push %ebp 108755: 89 e5 mov %esp,%ebp 108757: 53 push %ebx 108758: 83 ec 0c sub $0xc,%esp 10875b: 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 ); 10875e: 53 push %ebx 10875f: 6a 00 push $0x0 108761: e8 32 3e 00 00 call 10c598 if ( status == RTEMS_SUCCESSFUL ) { 108766: 83 c4 10 add $0x10,%esp 108769: 85 c0 test %eax,%eax 10876b: 75 10 jne 10877d <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( (void *)key ); 10876d: 85 db test %ebx,%ebx 10876f: 74 0c je 10877d <== NEVER TAKEN 108771: 83 ec 0c sub $0xc,%esp 108774: 53 push %ebx 108775: e8 16 fe ff ff call 108590 10877a: 83 c4 10 add $0x10,%esp return 0; } return 0; } 10877d: 31 c0 xor %eax,%eax 10877f: 8b 5d fc mov -0x4(%ebp),%ebx 108782: c9 leave 108783: c3 ret =============================================================================== 00108744 : int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr) { 108744: 55 push %ebp <== NOT EXECUTED 108745: 89 e5 mov %esp,%ebp <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 108747: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10874a: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED return 0; } 108750: 31 c0 xor %eax,%eax <== NOT EXECUTED 108752: c9 leave <== NOT EXECUTED 108753: c3 ret <== NOT EXECUTED =============================================================================== 00108864 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 108864: 55 push %ebp <== NOT EXECUTED 108865: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108867: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: destroy mutex=%X\n", *mutex ); #endif status = rtems_semaphore_delete(*(rtems_id *)mutex); 10886a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10886d: ff 30 pushl (%eax) <== NOT EXECUTED 10886f: e8 e0 35 00 00 call 10be54 <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) 108874: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; 108877: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10887a: 19 c0 sbb %eax,%eax <== NOT EXECUTED 10887c: f7 d0 not %eax <== NOT EXECUTED return -1; } 10887e: c9 leave <== NOT EXECUTED 10887f: c3 ret <== NOT EXECUTED =============================================================================== 00108814 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 108814: 55 push %ebp 108815: 89 e5 mov %esp,%ebp 108817: 83 ec 14 sub $0x14,%esp #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 10881a: ff 75 08 pushl 0x8(%ebp) 10881d: 6a 00 push $0x0 10881f: 6a 54 push $0x54 108821: 6a 01 push $0x1 108823: 68 32 43 43 47 push $0x47434332 108828: e8 4f 34 00 00 call 10bc7c RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { 10882d: 83 c4 20 add $0x20,%esp 108830: 85 c0 test %eax,%eax 108832: 75 02 jne 108836 <== NEVER TAKEN rtems_panic ("rtems_gxx_mutex_init"); } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } 108834: c9 leave 108835: c3 ret "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(status), status ); #endif rtems_panic ("rtems_gxx_mutex_init"); 108836: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108839: 68 5e 0e 12 00 push $0x120e5e <== NOT EXECUTED 10883e: e8 ad 7e 00 00 call 1106f0 <== NOT EXECUTED =============================================================================== 0010868c : typedef int __gthread_once_t; typedef void *__gthread_mutex_t; typedef void *__gthread_recursive_mutex_t; int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { 10868c: 55 push %ebp 10868d: 89 e5 mov %esp,%ebp 10868f: 56 push %esi 108690: 53 push %ebx 108691: 83 ec 10 sub $0x10,%esp 108694: 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 ) { 108697: 8b 03 mov (%ebx),%eax 108699: 85 c0 test %eax,%eax 10869b: 74 0b je 1086a8 rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); if ( o == 0 ) (*func)(); } return 0; } 10869d: 31 c0 xor %eax,%eax 10869f: 8d 65 f8 lea -0x8(%ebp),%esp 1086a2: 5b pop %ebx 1086a3: 5e pop %esi 1086a4: c9 leave 1086a5: c3 ret 1086a6: 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); 1086a8: 51 push %ecx 1086a9: 8d 75 f4 lea -0xc(%ebp),%esi 1086ac: 56 push %esi 1086ad: 68 00 01 00 00 push $0x100 1086b2: 68 00 01 00 00 push $0x100 1086b7: e8 38 3c 00 00 call 10c2f4 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 1086bc: 8b 03 mov (%ebx),%eax 1086be: 83 c4 10 add $0x10,%esp 1086c1: 85 c0 test %eax,%eax 1086c3: 75 27 jne 1086ec <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 1086c5: c7 03 01 00 00 00 movl $0x1,(%ebx) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 1086cb: 52 push %edx 1086cc: 56 push %esi 1086cd: 68 00 01 00 00 push $0x100 1086d2: ff 75 f4 pushl -0xc(%ebp) 1086d5: e8 1a 3c 00 00 call 10c2f4 if ( o == 0 ) (*func)(); 1086da: ff 55 0c call *0xc(%ebp) 1086dd: 83 c4 10 add $0x10,%esp } return 0; } 1086e0: 31 c0 xor %eax,%eax 1086e2: 8d 65 f8 lea -0x8(%ebp),%esp 1086e5: 5b pop %ebx 1086e6: 5e pop %esi 1086e7: c9 leave 1086e8: c3 ret 1086e9: 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); 1086ec: 50 push %eax <== NOT EXECUTED 1086ed: 56 push %esi <== NOT EXECUTED 1086ee: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 1086f3: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 1086f6: e8 f9 3b 00 00 call 10c2f4 <== NOT EXECUTED 1086fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( o == 0 ) (*func)(); } return 0; } 1086fe: 31 c0 xor %eax,%eax <== NOT EXECUTED 108700: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108703: 5b pop %ebx <== NOT EXECUTED 108704: 5e pop %esi <== NOT EXECUTED 108705: c9 leave <== NOT EXECUTED 108706: c3 ret <== NOT EXECUTED =============================================================================== 001087e0 : #endif return p; } int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 1087e0: 55 push %ebp 1087e1: 89 e5 mov %esp,%ebp 1087e3: 53 push %ebx 1087e4: 83 ec 08 sub $0x8,%esp 1087e7: 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 ); 1087ea: ff 73 04 pushl 0x4(%ebx) 1087ed: 53 push %ebx 1087ee: 6a 00 push $0x0 1087f0: e8 df 3c 00 00 call 10c4d4 if ( status == RTEMS_SUCCESSFUL ) { 1087f5: 83 c4 10 add $0x10,%esp 1087f8: 85 c0 test %eax,%eax 1087fa: 75 0c jne 108808 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 1087fc: 8b 45 0c mov 0xc(%ebp),%eax 1087ff: 89 03 mov %eax,(%ebx) return 0; 108801: 31 c0 xor %eax,%eax } return -1; } 108803: 8b 5d fc mov -0x4(%ebp),%ebx 108806: c9 leave 108807: c3 ret if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 108808: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 10880d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108810: c9 leave <== NOT EXECUTED 108811: c3 ret <== NOT EXECUTED =============================================================================== 0010bbc4 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 10bbc4: 55 push %ebp 10bbc5: 89 e5 mov %esp,%ebp 10bbc7: 83 ec 08 sub $0x8,%esp if ( 10bbca: 83 3d 20 d6 12 00 03 cmpl $0x3,0x12d620 10bbd1: 74 21 je 10bbf4 <== ALWAYS TAKEN && !malloc_is_system_state_OK() ) { return NULL; } malloc_deferred_frees_process(); 10bbd3: e8 d0 ef ff ff call 10aba8 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 10bbd8: ff 75 10 pushl 0x10(%ebp) 10bbdb: ff 75 0c pushl 0xc(%ebp) 10bbde: ff 75 08 pushl 0x8(%ebp) 10bbe1: ff 35 58 89 12 00 pushl 0x128958 10bbe7: e8 a4 4d 00 00 call 110990 <_Protected_heap_Allocate_aligned_with_boundary> 10bbec: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bbef: c9 leave 10bbf0: c3 ret 10bbf1: 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() 10bbf4: e8 6f ef ff ff call 10ab68 10bbf9: 84 c0 test %al,%al 10bbfb: 75 d6 jne 10bbd3 ) { return NULL; 10bbfd: 31 c0 xor %eax,%eax RTEMS_Malloc_Heap, size, alignment, boundary ); } 10bbff: c9 leave 10bc00: c3 ret =============================================================================== 00112134 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112134: 55 push %ebp 112135: 89 e5 mov %esp,%ebp 112137: 53 push %ebx 112138: 83 ec 04 sub $0x4,%esp 11213b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11213e: 39 05 20 67 12 00 cmp %eax,0x126720 112144: 76 1a jbe 112160 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112146: 8d 14 40 lea (%eax,%eax,2),%edx 112149: c1 e2 03 shl $0x3,%edx 11214c: 03 15 24 67 12 00 add 0x126724,%edx 112152: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112155: 85 d2 test %edx,%edx 112157: 74 13 je 11216c } 112159: 59 pop %ecx 11215a: 5b pop %ebx 11215b: 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; 11215c: ff e2 jmp *%edx 11215e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112160: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112165: 5a pop %edx 112166: 5b pop %ebx 112167: c9 leave 112168: c3 ret 112169: 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; 11216c: 31 c0 xor %eax,%eax } 11216e: 5a pop %edx 11216f: 5b pop %ebx 112170: c9 leave 112171: c3 ret =============================================================================== 00112174 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112174: 55 push %ebp 112175: 89 e5 mov %esp,%ebp 112177: 53 push %ebx 112178: 83 ec 04 sub $0x4,%esp 11217b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11217e: 39 05 20 67 12 00 cmp %eax,0x126720 112184: 76 1a jbe 1121a0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112186: 8d 14 40 lea (%eax,%eax,2),%edx 112189: c1 e2 03 shl $0x3,%edx 11218c: 03 15 24 67 12 00 add 0x126724,%edx 112192: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112195: 85 d2 test %edx,%edx 112197: 74 13 je 1121ac } 112199: 59 pop %ecx 11219a: 5b pop %ebx 11219b: 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; 11219c: ff e2 jmp *%edx 11219e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1121a0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1121a5: 5a pop %edx 1121a6: 5b pop %ebx 1121a7: c9 leave 1121a8: c3 ret 1121a9: 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; 1121ac: 31 c0 xor %eax,%eax } 1121ae: 5a pop %edx 1121af: 5b pop %ebx 1121b0: c9 leave 1121b1: c3 ret =============================================================================== 00110440 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110440: 55 push %ebp 110441: 89 e5 mov %esp,%ebp 110443: 53 push %ebx 110444: 83 ec 04 sub $0x4,%esp 110447: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11044a: 39 05 20 67 12 00 cmp %eax,0x126720 110450: 76 1a jbe 11046c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110452: 8d 14 40 lea (%eax,%eax,2),%edx 110455: c1 e2 03 shl $0x3,%edx 110458: 03 15 24 67 12 00 add 0x126724,%edx 11045e: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110460: 85 d2 test %edx,%edx 110462: 74 14 je 110478 } 110464: 59 pop %ecx 110465: 5b pop %ebx 110466: 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; 110467: ff e2 jmp *%edx 110469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11046c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110471: 5a pop %edx 110472: 5b pop %ebx 110473: c9 leave 110474: c3 ret 110475: 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; 110478: 31 c0 xor %eax,%eax } 11047a: 5a pop %edx 11047b: 5b pop %ebx 11047c: c9 leave 11047d: c3 ret =============================================================================== 00107c80 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 107c80: 55 push %ebp 107c81: 89 e5 mov %esp,%ebp 107c83: 57 push %edi 107c84: 56 push %esi 107c85: 53 push %ebx 107c86: 83 ec 48 sub $0x48,%esp 107c89: 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( 107c8c: b9 ff ff ff ff mov $0xffffffff,%ecx 107c91: 89 f7 mov %esi,%edi 107c93: 31 c0 xor %eax,%eax 107c95: f2 ae repnz scas %es:(%edi),%al 107c97: f7 d1 not %ecx 107c99: 49 dec %ecx 107c9a: 6a 01 push $0x1 107c9c: 8d 5d d4 lea -0x2c(%ebp),%ebx 107c9f: 53 push %ebx 107ca0: 6a 00 push $0x0 107ca2: 51 push %ecx 107ca3: 56 push %esi 107ca4: e8 6f 02 00 00 call 107f18 107ca9: 89 c7 mov %eax,%edi name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 107cab: 8b 55 d4 mov -0x2c(%ebp),%edx 107cae: 89 55 c4 mov %edx,-0x3c(%ebp) node_type = (*loc.ops->node_type_h)( &loc ); 107cb1: 83 c4 14 add $0x14,%esp 107cb4: 53 push %ebx 107cb5: 8b 45 e0 mov -0x20(%ebp),%eax 107cb8: ff 50 10 call *0x10(%eax) if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 107cbb: 83 c4 10 add $0x10,%esp 107cbe: 85 ff test %edi,%edi 107cc0: 75 05 jne 107cc7 <== NEVER TAKEN 107cc2: 83 f8 02 cmp $0x2,%eax 107cc5: 74 19 je 107ce0 rtems_filesystem_freenode( &loc ); 107cc7: 83 ec 0c sub $0xc,%esp 107cca: 53 push %ebx 107ccb: e8 4c 03 00 00 call 10801c return RTEMS_UNSATISFIED; 107cd0: 83 c4 10 add $0x10,%esp 107cd3: b8 0d 00 00 00 mov $0xd,%eax device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 107cd8: 8d 65 f4 lea -0xc(%ebp),%esp 107cdb: 5b pop %ebx 107cdc: 5e pop %esi 107cdd: 5f pop %edi 107cde: c9 leave 107cdf: c3 ret if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 107ce0: 8b 7d 0c mov 0xc(%ebp),%edi 107ce3: 89 37 mov %esi,(%edi) device_info->device_name_length = strlen( name ); 107ce5: b9 ff ff ff ff mov $0xffffffff,%ecx 107cea: 89 f7 mov %esi,%edi 107cec: 31 c0 xor %eax,%eax 107cee: f2 ae repnz scas %es:(%edi),%al 107cf0: f7 d1 not %ecx 107cf2: 49 dec %ecx 107cf3: 8b 45 0c mov 0xc(%ebp),%eax 107cf6: 89 48 04 mov %ecx,0x4(%eax) device_info->major = the_jnode->info.device.major; 107cf9: 8b 55 c4 mov -0x3c(%ebp),%edx 107cfc: 8b 42 50 mov 0x50(%edx),%eax 107cff: 8b 7d 0c mov 0xc(%ebp),%edi 107d02: 89 47 08 mov %eax,0x8(%edi) device_info->minor = the_jnode->info.device.minor; 107d05: 8b 42 54 mov 0x54(%edx),%eax 107d08: 89 47 0c mov %eax,0xc(%edi) rtems_filesystem_freenode( &loc ); 107d0b: 83 ec 0c sub $0xc,%esp 107d0e: 53 push %ebx 107d0f: e8 08 03 00 00 call 10801c return RTEMS_SUCCESSFUL; 107d14: 83 c4 10 add $0x10,%esp 107d17: 31 c0 xor %eax,%eax 107d19: eb bd jmp 107cd8 =============================================================================== 001121b4 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1121b4: 55 push %ebp 1121b5: 89 e5 mov %esp,%ebp 1121b7: 53 push %ebx 1121b8: 83 ec 04 sub $0x4,%esp 1121bb: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1121be: 39 05 20 67 12 00 cmp %eax,0x126720 1121c4: 76 1a jbe 1121e0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 1121c6: 8d 14 40 lea (%eax,%eax,2),%edx 1121c9: c1 e2 03 shl $0x3,%edx 1121cc: 03 15 24 67 12 00 add 0x126724,%edx 1121d2: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1121d5: 85 d2 test %edx,%edx 1121d7: 74 13 je 1121ec } 1121d9: 59 pop %ecx 1121da: 5b pop %ebx 1121db: 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; 1121dc: ff e2 jmp *%edx 1121de: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1121e0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1121e5: 5a pop %edx 1121e6: 5b pop %ebx 1121e7: c9 leave 1121e8: c3 ret 1121e9: 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; 1121ec: 31 c0 xor %eax,%eax } 1121ee: 5a pop %edx 1121ef: 5b pop %ebx 1121f0: c9 leave 1121f1: c3 ret =============================================================================== 001121f4 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1121f4: 55 push %ebp 1121f5: 89 e5 mov %esp,%ebp 1121f7: 53 push %ebx 1121f8: 83 ec 04 sub $0x4,%esp 1121fb: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1121fe: 39 05 20 67 12 00 cmp %eax,0x126720 112204: 76 1a jbe 112220 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112206: 8d 14 40 lea (%eax,%eax,2),%edx 112209: c1 e2 03 shl $0x3,%edx 11220c: 03 15 24 67 12 00 add 0x126724,%edx 112212: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112215: 85 d2 test %edx,%edx 112217: 74 13 je 11222c } 112219: 59 pop %ecx 11221a: 5b pop %ebx 11221b: 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; 11221c: ff e2 jmp *%edx 11221e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112220: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112225: 5a pop %edx 112226: 5b pop %ebx 112227: c9 leave 112228: c3 ret 112229: 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; 11222c: 31 c0 xor %eax,%eax } 11222e: 5a pop %edx 11222f: 5b pop %ebx 112230: c9 leave 112231: c3 ret =============================================================================== 0010cf34 : 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 ) { 10cf34: 55 push %ebp 10cf35: 89 e5 mov %esp,%ebp 10cf37: 57 push %edi 10cf38: 56 push %esi 10cf39: 53 push %ebx 10cf3a: 83 ec 0c sub $0xc,%esp 10cf3d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf40: 8b 75 0c mov 0xc(%ebp),%esi 10cf43: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10cf46: a1 60 97 12 00 mov 0x129760,%eax if ( rtems_interrupt_is_in_progress() ) 10cf4b: 8b 0d b4 96 12 00 mov 0x1296b4,%ecx 10cf51: 85 c9 test %ecx,%ecx 10cf53: 0f 85 ab 00 00 00 jne 10d004 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cf59: 85 d2 test %edx,%edx 10cf5b: 0f 84 e7 00 00 00 je 10d048 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10cf61: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cf63: 85 f6 test %esi,%esi 10cf65: 0f 84 dd 00 00 00 je 10d048 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf6b: 8b 3e mov (%esi),%edi 10cf6d: 85 ff test %edi,%edi 10cf6f: 0f 84 c7 00 00 00 je 10d03c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cf75: 39 d8 cmp %ebx,%eax 10cf77: 76 7b jbe 10cff4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cf79: a1 14 94 12 00 mov 0x129414,%eax 10cf7e: 40 inc %eax 10cf7f: a3 14 94 12 00 mov %eax,0x129414 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cf84: 85 db test %ebx,%ebx 10cf86: 0f 85 88 00 00 00 jne 10d014 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cf8c: 8b 0d 60 97 12 00 mov 0x129760,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cf92: 85 c9 test %ecx,%ecx 10cf94: 0f 84 bb 00 00 00 je 10d055 <== NEVER TAKEN 10cf9a: 8b 3d 64 97 12 00 mov 0x129764,%edi 10cfa0: 89 f8 mov %edi,%eax 10cfa2: eb 08 jmp 10cfac 10cfa4: 43 inc %ebx 10cfa5: 83 c0 18 add $0x18,%eax 10cfa8: 39 d9 cmp %ebx,%ecx 10cfaa: 76 0b jbe 10cfb7 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfac: 83 38 00 cmpl $0x0,(%eax) 10cfaf: 75 f3 jne 10cfa4 10cfb1: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cfb5: 75 ed jne 10cfa4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfb7: 89 1a mov %ebx,(%edx) if ( m != n ) 10cfb9: 39 d9 cmp %ebx,%ecx 10cfbb: 0f 84 9b 00 00 00 je 10d05c 10cfc1: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cfc4: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cfc7: 01 c7 add %eax,%edi 10cfc9: b9 06 00 00 00 mov $0x6,%ecx 10cfce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cfd0: e8 77 19 00 00 call 10e94c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cfd5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cfdc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cfe3: 89 5d 08 mov %ebx,0x8(%ebp) } 10cfe6: 83 c4 0c add $0xc,%esp 10cfe9: 5b pop %ebx 10cfea: 5e pop %esi 10cfeb: 5f pop %edi 10cfec: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cfed: e9 ee 71 00 00 jmp 1141e0 10cff2: 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; 10cff4: 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 ); } 10cff9: 83 c4 0c add $0xc,%esp 10cffc: 5b pop %ebx 10cffd: 5e pop %esi 10cffe: 5f pop %edi 10cfff: c9 leave 10d000: c3 ret 10d001: 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; 10d004: 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 ); } 10d009: 83 c4 0c add $0xc,%esp 10d00c: 5b pop %ebx 10d00d: 5e pop %esi 10d00e: 5f pop %edi 10d00f: c9 leave 10d010: c3 ret 10d011: 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; 10d014: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d017: c1 e0 03 shl $0x3,%eax 10d01a: 8b 0d 64 97 12 00 mov 0x129764,%ecx 10d020: 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; 10d022: 8b 39 mov (%ecx),%edi 10d024: 85 ff test %edi,%edi 10d026: 74 40 je 10d068 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(); 10d028: e8 1f 19 00 00 call 10e94c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10d02d: 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 ); } 10d032: 83 c4 0c add $0xc,%esp 10d035: 5b pop %ebx 10d036: 5e pop %esi 10d037: 5f pop %edi 10d038: c9 leave 10d039: c3 ret 10d03a: 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; 10d03c: 8b 4e 04 mov 0x4(%esi),%ecx 10d03f: 85 c9 test %ecx,%ecx 10d041: 0f 85 2e ff ff ff jne 10cf75 10d047: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10d048: 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 ); } 10d04d: 83 c4 0c add $0xc,%esp 10d050: 5b pop %ebx 10d051: 5e pop %esi 10d052: 5f pop %edi 10d053: c9 leave 10d054: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d055: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d05b: 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(); 10d05c: e8 eb 18 00 00 call 10e94c <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10d061: 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; 10d066: eb 91 jmp 10cff9 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d068: 8b 49 04 mov 0x4(%ecx),%ecx 10d06b: 85 c9 test %ecx,%ecx 10d06d: 75 b9 jne 10d028 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d06f: 89 1a mov %ebx,(%edx) 10d071: 8b 3d 64 97 12 00 mov 0x129764,%edi 10d077: e9 4b ff ff ff jmp 10cfc7 =============================================================================== 0010d07c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d07c: 55 push %ebp 10d07d: 89 e5 mov %esp,%ebp 10d07f: 57 push %edi 10d080: 83 ec 04 sub $0x4,%esp 10d083: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d086: 8b 0d b4 96 12 00 mov 0x1296b4,%ecx 10d08c: 85 c9 test %ecx,%ecx 10d08e: 75 44 jne 10d0d4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d090: 39 05 60 97 12 00 cmp %eax,0x129760 10d096: 77 0c ja 10d0a4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10d098: b8 0d 00 00 00 mov $0xd,%eax } 10d09d: 5a pop %edx 10d09e: 5f pop %edi 10d09f: c9 leave 10d0a0: c3 ret 10d0a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d0a4: 8b 15 14 94 12 00 mov 0x129414,%edx 10d0aa: 42 inc %edx 10d0ab: 89 15 14 94 12 00 mov %edx,0x129414 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d0b1: 8d 14 40 lea (%eax,%eax,2),%edx 10d0b4: 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( 10d0b7: 03 15 64 97 12 00 add 0x129764,%edx 10d0bd: b9 18 00 00 00 mov $0x18,%ecx 10d0c2: 31 c0 xor %eax,%eax 10d0c4: 89 d7 mov %edx,%edi 10d0c6: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d0c8: e8 7f 18 00 00 call 10e94c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0cd: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d0cf: 5a pop %edx 10d0d0: 5f pop %edi 10d0d1: c9 leave 10d0d2: c3 ret 10d0d3: 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; 10d0d4: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d0d9: 5a pop %edx 10d0da: 5f pop %edi 10d0db: c9 leave 10d0dc: c3 ret =============================================================================== 00112234 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112234: 55 push %ebp 112235: 89 e5 mov %esp,%ebp 112237: 53 push %ebx 112238: 83 ec 04 sub $0x4,%esp 11223b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11223e: 39 05 20 67 12 00 cmp %eax,0x126720 112244: 76 1a jbe 112260 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112246: 8d 14 40 lea (%eax,%eax,2),%edx 112249: c1 e2 03 shl $0x3,%edx 11224c: 03 15 24 67 12 00 add 0x126724,%edx 112252: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112255: 85 d2 test %edx,%edx 112257: 74 13 je 11226c } 112259: 59 pop %ecx 11225a: 5b pop %ebx 11225b: 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; 11225c: ff e2 jmp *%edx 11225e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112260: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112265: 5a pop %edx 112266: 5b pop %ebx 112267: c9 leave 112268: c3 ret 112269: 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; 11226c: 31 c0 xor %eax,%eax } 11226e: 5a pop %edx 11226f: 5b pop %ebx 112270: c9 leave 112271: c3 ret =============================================================================== 0010df40 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10df40: 55 push %ebp 10df41: 89 e5 mov %esp,%ebp 10df43: 57 push %edi 10df44: 56 push %esi 10df45: 53 push %ebx 10df46: 83 ec 1c sub $0x1c,%esp 10df49: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10df4c: 85 ff test %edi,%edi 10df4e: 74 4d je 10df9d <== NEVER TAKEN 10df50: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10df57: 8b 55 e4 mov -0x1c(%ebp),%edx 10df5a: 8b 04 95 8c 15 13 00 mov 0x13158c(,%edx,4),%eax 10df61: 85 c0 test %eax,%eax 10df63: 74 2f je 10df94 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10df65: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10df68: 85 f6 test %esi,%esi 10df6a: 74 28 je 10df94 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df6c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10df71: 74 21 je 10df94 <== NEVER TAKEN 10df73: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10df78: 8b 46 1c mov 0x1c(%esi),%eax 10df7b: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10df7e: 85 c0 test %eax,%eax 10df80: 74 09 je 10df8b <== NEVER TAKEN continue; (*routine)(the_thread); 10df82: 83 ec 0c sub $0xc,%esp 10df85: 50 push %eax 10df86: ff d7 call *%edi 10df88: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df8b: 43 inc %ebx 10df8c: 0f b7 46 10 movzwl 0x10(%esi),%eax 10df90: 39 d8 cmp %ebx,%eax 10df92: 73 e4 jae 10df78 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10df94: ff 45 e4 incl -0x1c(%ebp) 10df97: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10df9b: 75 ba jne 10df57 (*routine)(the_thread); } } } 10df9d: 8d 65 f4 lea -0xc(%ebp),%esp 10dfa0: 5b pop %ebx 10dfa1: 5e pop %esi 10dfa2: 5f pop %edi 10dfa3: c9 leave 10dfa4: c3 ret =============================================================================== 0010fbf0 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10fbf0: 55 push %ebp 10fbf1: 89 e5 mov %esp,%ebp 10fbf3: 53 push %ebx 10fbf4: 83 ec 08 sub $0x8,%esp 10fbf7: 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 ); 10fbfa: 6a 00 push $0x0 10fbfc: 6a 00 push $0x0 10fbfe: ff 35 68 62 12 00 pushl 0x126268 10fc04: e8 2f bb ff ff call 10b738 rtems_libio_lock(); if (iop->sem) 10fc09: 8b 43 2c mov 0x2c(%ebx),%eax 10fc0c: 83 c4 10 add $0x10,%esp 10fc0f: 85 c0 test %eax,%eax 10fc11: 74 0c je 10fc1f <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10fc13: 83 ec 0c sub $0xc,%esp 10fc16: 50 push %eax 10fc17: e8 78 ba ff ff call 10b694 10fc1c: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10fc1f: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10fc26: a1 64 62 12 00 mov 0x126264,%eax 10fc2b: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10fc2e: 89 1d 64 62 12 00 mov %ebx,0x126264 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fc34: a1 68 62 12 00 mov 0x126268,%eax 10fc39: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 10fc3c: 8b 5d fc mov -0x4(%ebp),%ebx 10fc3f: c9 leave 10fc40: e9 ef bb ff ff jmp 10b834 =============================================================================== 0010812c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 10812c: 55 push %ebp 10812d: 89 e5 mov %esp,%ebp 10812f: 53 push %ebx 108130: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 108133: 8b 1d ec 21 12 00 mov 0x1221ec,%ebx 108139: 85 db test %ebx,%ebx 10813b: 74 50 je 10818d <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 10813d: 83 ec 08 sub $0x8,%esp 108140: 6a 38 push $0x38 108142: 53 push %ebx 108143: e8 fc fc ff ff call 107e44 108148: 89 c2 mov %eax,%edx 10814a: a3 60 62 12 00 mov %eax,0x126260 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 10814f: 83 c4 10 add $0x10,%esp 108152: 85 c0 test %eax,%eax 108154: 74 74 je 1081ca rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 108156: a3 64 62 12 00 mov %eax,0x126264 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 10815b: 83 fb 01 cmp $0x1,%ebx 10815e: 76 26 jbe 108186 <== NEVER TAKEN * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 108160: 8d 50 38 lea 0x38(%eax),%edx 108163: 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; 108168: 89 52 fc mov %edx,-0x4(%edx) 10816b: 41 inc %ecx 10816c: 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++) 10816f: 39 d9 cmp %ebx,%ecx 108171: 75 f5 jne 108168 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) 108173: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx 10817a: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx 108181: 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++) 108183: 8d 14 10 lea (%eax,%edx,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 108186: 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( 10818d: 83 ec 0c sub $0xc,%esp 108190: 68 68 62 12 00 push $0x126268 108195: 6a 00 push $0x0 108197: 6a 54 push $0x54 108199: 6a 01 push $0x1 10819b: 68 4f 49 42 4c push $0x4c42494f 1081a0: e8 17 33 00 00 call 10b4bc 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1081a5: 83 c4 20 add $0x20,%esp 1081a8: 85 c0 test %eax,%eax 1081aa: 75 15 jne 1081c1 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 1081ac: a1 e8 21 12 00 mov 0x1221e8,%eax 1081b1: 85 c0 test %eax,%eax 1081b3: 74 07 je 1081bc <== NEVER TAKEN (* rtems_fs_init_helper)(); } 1081b5: 8b 5d fc mov -0x4(%ebp),%ebx 1081b8: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 1081b9: ff e0 jmp *%eax 1081bb: 90 nop <== NOT EXECUTED } 1081bc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1081bf: c9 leave <== NOT EXECUTED 1081c0: 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 ); 1081c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081c4: 50 push %eax <== NOT EXECUTED 1081c5: e8 aa 3b 00 00 call 10bd74 <== 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); 1081ca: 83 ec 0c sub $0xc,%esp 1081cd: 6a 1a push $0x1a 1081cf: e8 a0 3b 00 00 call 10bd74 =============================================================================== 0010fcac : */ int rtems_libio_is_file_open( void *node_access ) { 10fcac: 55 push %ebp 10fcad: 89 e5 mov %esp,%ebp 10fcaf: 53 push %ebx 10fcb0: 83 ec 08 sub $0x8,%esp 10fcb3: 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 ); 10fcb6: 6a 00 push $0x0 10fcb8: 6a 00 push $0x0 10fcba: ff 35 68 62 12 00 pushl 0x126268 10fcc0: e8 73 ba ff ff call 10b738 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fcc5: a1 60 62 12 00 mov 0x126260,%eax 10fcca: 8b 0d ec 21 12 00 mov 0x1221ec,%ecx 10fcd0: 83 c4 10 add $0x10,%esp 10fcd3: 85 c9 test %ecx,%ecx 10fcd5: 74 18 je 10fcef <== NEVER TAKEN 10fcd7: 31 d2 xor %edx,%edx 10fcd9: eb 04 jmp 10fcdf 10fcdb: 90 nop <== NOT EXECUTED 10fcdc: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fcdf: f6 40 15 01 testb $0x1,0x15(%eax) 10fce3: 74 05 je 10fcea /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 10fce5: 39 58 18 cmp %ebx,0x18(%eax) 10fce8: 74 1e je 10fd08 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fcea: 42 inc %edx 10fceb: 39 ca cmp %ecx,%edx 10fced: 72 ed jb 10fcdc int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; 10fcef: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fcf1: 83 ec 0c sub $0xc,%esp 10fcf4: ff 35 68 62 12 00 pushl 0x126268 10fcfa: e8 35 bb ff ff call 10b834 } rtems_libio_unlock(); return result; } 10fcff: 89 d8 mov %ebx,%eax 10fd01: 8b 5d fc mov -0x4(%ebp),%ebx 10fd04: c9 leave 10fd05: c3 ret 10fd06: 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; 10fd08: bb 01 00 00 00 mov $0x1,%ebx 10fd0d: eb e2 jmp 10fcf1 =============================================================================== 0010fc48 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 10fc48: 55 push %ebp 10fc49: 89 e5 mov %esp,%ebp 10fc4b: 53 push %ebx 10fc4c: 83 ec 08 sub $0x8,%esp 10fc4f: 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 ); 10fc52: 6a 00 push $0x0 10fc54: 6a 00 push $0x0 10fc56: ff 35 68 62 12 00 pushl 0x126268 10fc5c: e8 d7 ba ff ff call 10b738 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc61: a1 60 62 12 00 mov 0x126260,%eax 10fc66: 8b 0d ec 21 12 00 mov 0x1221ec,%ecx 10fc6c: 83 c4 10 add $0x10,%esp 10fc6f: 85 c9 test %ecx,%ecx 10fc71: 74 18 je 10fc8b <== NEVER TAKEN 10fc73: 31 d2 xor %edx,%edx 10fc75: eb 04 jmp 10fc7b 10fc77: 90 nop <== NOT EXECUTED 10fc78: 83 c0 38 add $0x38,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 10fc7b: f6 40 15 01 testb $0x1,0x15(%eax) 10fc7f: 74 05 je 10fc86 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 10fc81: 39 58 28 cmp %ebx,0x28(%eax) 10fc84: 74 1e je 10fca4 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 10fc86: 42 inc %edx 10fc87: 39 ca cmp %ecx,%edx 10fc89: 72 ed jb 10fc78 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; 10fc8b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10fc8d: 83 ec 0c sub $0xc,%esp 10fc90: ff 35 68 62 12 00 pushl 0x126268 10fc96: e8 99 bb ff ff call 10b834 } rtems_libio_unlock(); return result; } 10fc9b: 89 d8 mov %ebx,%eax 10fc9d: 8b 5d fc mov -0x4(%ebp),%ebx 10fca0: c9 leave 10fca1: c3 ret 10fca2: 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; 10fca4: bb 01 00 00 00 mov $0x1,%ebx 10fca9: eb e2 jmp 10fc8d =============================================================================== 00109410 : rtems_status_code rtems_libio_set_private_env(void) { 109410: 55 push %ebp 109411: 89 e5 mov %esp,%ebp 109413: 57 push %edi 109414: 56 push %esi 109415: 53 push %ebx 109416: 83 ec 40 sub $0x40,%esp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 109419: 8d 45 e4 lea -0x1c(%ebp),%eax 10941c: 50 push %eax 10941d: 6a 00 push $0x0 10941f: 6a 00 push $0x0 109421: e8 b6 2e 00 00 call 10c2dc 109426: 89 c2 mov %eax,%edx if (sc != RTEMS_SUCCESSFUL) return sc; 109428: 83 c4 10 add $0x10,%esp 10942b: 85 c0 test %eax,%eax 10942d: 75 79 jne 1094a8 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 10942f: 8b 1d 24 40 12 00 mov 0x124024,%ebx 109435: 81 fb 20 62 12 00 cmp $0x126220,%ebx 10943b: 74 77 je 1094b4 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 10943d: be 20 62 12 00 mov $0x126220,%esi 109442: b9 12 00 00 00 mov $0x12,%ecx 109447: 89 df mov %ebx,%edi 109449: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 10944b: 8b 45 e4 mov -0x1c(%ebp),%eax 10944e: 89 03 mov %eax,(%ebx) * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 109450: 83 ec 0c sub $0xc,%esp 109453: 6a 00 push $0x0 109455: 8d 5d d0 lea -0x30(%ebp),%ebx 109458: 53 push %ebx 109459: 6a 00 push $0x0 10945b: 6a 01 push $0x1 10945d: 68 47 05 12 00 push $0x120547 109462: 89 55 c4 mov %edx,-0x3c(%ebp) 109465: e8 fe ed ff ff call 108268 rtems_filesystem_root = loc; 10946a: 8b 3d 24 40 12 00 mov 0x124024,%edi 109470: 83 c7 18 add $0x18,%edi 109473: b9 05 00 00 00 mov $0x5,%ecx 109478: 89 de mov %ebx,%esi 10947a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10947c: 83 c4 14 add $0x14,%esp 10947f: 6a 00 push $0x0 109481: 53 push %ebx 109482: 6a 00 push $0x0 109484: 6a 01 push $0x1 109486: 68 47 05 12 00 push $0x120547 10948b: e8 d8 ed ff ff call 108268 rtems_filesystem_current = loc; 109490: 8b 3d 24 40 12 00 mov 0x124024,%edi 109496: 83 c7 04 add $0x4,%edi 109499: b9 05 00 00 00 mov $0x5,%ecx 10949e: 89 de mov %ebx,%esi 1094a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 1094a2: 83 c4 20 add $0x20,%esp 1094a5: 8b 55 c4 mov -0x3c(%ebp),%edx } 1094a8: 89 d0 mov %edx,%eax 1094aa: 8d 65 f4 lea -0xc(%ebp),%esp 1094ad: 5b pop %ebx 1094ae: 5e pop %esi 1094af: 5f pop %edi 1094b0: c9 leave 1094b1: c3 ret 1094b2: 66 90 xchg %ax,%ax <== NOT EXECUTED sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1094b4: 83 ec 0c sub $0xc,%esp 1094b7: 6a 48 push $0x48 1094b9: 89 45 c4 mov %eax,-0x3c(%ebp) 1094bc: e8 d3 f3 ff ff call 108894 1094c1: 89 c3 mov %eax,%ebx if (!tmp) 1094c3: 83 c4 10 add $0x10,%esp 1094c6: 85 c0 test %eax,%eax 1094c8: 74 2a je 1094f4 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 1094ca: 50 push %eax 1094cb: 68 d0 93 10 00 push $0x1093d0 1094d0: 68 24 40 12 00 push $0x124024 1094d5: 6a 00 push $0x0 1094d7: e8 30 2f 00 00 call 10c40c RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 1094dc: 83 c4 10 add $0x10,%esp 1094df: 85 c0 test %eax,%eax 1094e1: 8b 55 c4 mov -0x3c(%ebp),%edx 1094e4: 75 16 jne 1094fc <== NEVER TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 1094e6: 89 1d 24 40 12 00 mov %ebx,0x124024 1094ec: e9 4c ff ff ff jmp 10943d 1094f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) return RTEMS_NO_MEMORY; 1094f4: ba 1a 00 00 00 mov $0x1a,%edx <== NOT EXECUTED 1094f9: eb ad jmp 1094a8 <== NOT EXECUTED 1094fb: 90 nop <== NOT EXECUTED ); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1094fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1094ff: 53 push %ebx <== NOT EXECUTED 109500: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 109503: e8 78 ee ff ff call 108380 <== NOT EXECUTED return sc; 109508: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10950b: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 10950e: 89 c2 mov %eax,%edx <== NOT EXECUTED 109510: eb 96 jmp 1094a8 <== NOT EXECUTED =============================================================================== 00109514 : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 109514: 55 push %ebp <== NOT EXECUTED 109515: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109517: 53 push %ebx <== NOT EXECUTED 109518: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 10951b: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10951e: 50 push %eax <== NOT EXECUTED 10951f: 6a 00 push $0x0 <== NOT EXECUTED 109521: 6a 00 push $0x0 <== NOT EXECUTED 109523: e8 b4 2d 00 00 call 10c2dc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 109528: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10952b: 85 c0 test %eax,%eax <== NOT EXECUTED 10952d: 75 49 jne 109578 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 10952f: 8b 1d 24 40 12 00 mov 0x124024,%ebx <== NOT EXECUTED 109535: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 109538: 39 03 cmp %eax,(%ebx) <== NOT EXECUTED 10953a: 74 44 je 109580 <== NOT EXECUTED rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); if (sc != RTEMS_SUCCESSFUL) return sc; free_user_env(tmp); } else { sc = rtems_task_variable_get( 10953c: 51 push %ecx <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); 10953d: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); if (sc != RTEMS_SUCCESSFUL) return sc; free_user_env(tmp); } else { sc = rtems_task_variable_get( 109540: 50 push %eax <== NOT EXECUTED 109541: 68 24 40 12 00 push $0x124024 <== NOT EXECUTED 109546: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109549: e8 1e 30 00 00 call 10c56c <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 10954e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109551: 85 c0 test %eax,%eax <== NOT EXECUTED 109553: 75 19 jne 10956e <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 109555: 52 push %edx <== NOT EXECUTED 109556: 68 d0 93 10 00 push $0x1093d0 <== NOT EXECUTED 10955b: 68 24 40 12 00 push $0x124024 <== NOT EXECUTED 109560: 6a 00 push $0x0 <== NOT EXECUTED 109562: e8 a5 2e 00 00 call 10c40c <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 109567: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10956a: 85 c0 test %eax,%eax <== NOT EXECUTED 10956c: 74 36 je 1095a4 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 10956e: c7 05 24 40 12 00 20 movl $0x126220,0x124024 <== NOT EXECUTED 109575: 62 12 00 return sc; } 109578: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10957b: c9 leave <== NOT EXECUTED 10957c: c3 ret <== NOT EXECUTED 10957d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 109580: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109583: 68 24 40 12 00 push $0x124024 <== NOT EXECUTED 109588: 6a 00 push $0x0 <== NOT EXECUTED 10958a: e8 41 2f 00 00 call 10c4d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 10958f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109592: 85 c0 test %eax,%eax <== NOT EXECUTED 109594: 75 e2 jne 109578 <== NOT EXECUTED free_user_env(tmp); 109596: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109599: 53 push %ebx <== NOT EXECUTED 10959a: e8 31 fe ff ff call 1093d0 <== NOT EXECUTED 10959f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095a2: eb b1 jmp 109555 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 1095a4: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 1095a7: 89 15 24 40 12 00 mov %edx,0x124024 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 1095ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1095b0: c9 leave <== NOT EXECUTED 1095b1: c3 ret <== NOT EXECUTED =============================================================================== 0010fb08 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10fb08: 55 push %ebp 10fb09: 89 e5 mov %esp,%ebp 10fb0b: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10fb0e: 89 d0 mov %edx,%eax 10fb10: 83 e0 06 and $0x6,%eax 10fb13: 83 f8 06 cmp $0x6,%eax 10fb16: 74 2c je 10fb44 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 10fb18: f6 c2 02 test $0x2,%dl 10fb1b: 75 23 jne 10fb40 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10fb1d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10fb1f: f6 c2 04 test $0x4,%dl <== NOT EXECUTED 10fb22: 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 ) { 10fb25: f6 c2 01 test $0x1,%dl 10fb28: 74 03 je 10fb2d fcntl_flags |= O_NONBLOCK; 10fb2a: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10fb2d: f6 c6 02 test $0x2,%dh 10fb30: 74 03 je 10fb35 fcntl_flags |= O_APPEND; 10fb32: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10fb35: 80 e6 04 and $0x4,%dh 10fb38: 74 03 je 10fb3d fcntl_flags |= O_CREAT; 10fb3a: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10fb3d: c9 leave 10fb3e: c3 ret 10fb3f: 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; 10fb40: 31 c0 xor %eax,%eax 10fb42: eb e1 jmp 10fb25 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10fb44: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 10fb49: eb da jmp 10fb25 <== NOT EXECUTED =============================================================================== 0010ae8c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 10ae8c: 55 push %ebp 10ae8d: 89 e5 mov %esp,%ebp 10ae8f: 83 ec 1c sub $0x1c,%esp uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 10ae92: 8d 45 f4 lea -0xc(%ebp),%eax 10ae95: 50 push %eax 10ae96: ff 75 08 pushl 0x8(%ebp) 10ae99: ff 35 58 89 12 00 pushl 0x128958 10ae9f: e8 94 5b 00 00 call 110a38 <_Protected_heap_Get_block_size> 10aea4: 83 c4 10 add $0x10,%esp 10aea7: 84 c0 test %al,%al 10aea9: 74 11 je 10aebc <== NEVER TAKEN MSBUMP(lifetime_freed, size); 10aeab: 8b 45 f4 mov -0xc(%ebp),%eax 10aeae: 31 d2 xor %edx,%edx 10aeb0: 01 05 44 d3 12 00 add %eax,0x12d344 10aeb6: 11 15 48 d3 12 00 adc %edx,0x12d348 } } 10aebc: c9 leave 10aebd: c3 ret =============================================================================== 0010aec0 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 10aec0: 55 push %ebp 10aec1: 89 e5 mov %esp,%ebp 10aec3: 83 ec 18 sub $0x18,%esp 10aec6: 8b 45 08 mov 0x8(%ebp),%eax uintptr_t actual_size = 0; 10aec9: 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 ) 10aed0: 85 c0 test %eax,%eax 10aed2: 74 43 je 10af17 <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 10aed4: 52 push %edx 10aed5: 8d 55 f4 lea -0xc(%ebp),%edx 10aed8: 52 push %edx 10aed9: 50 push %eax 10aeda: ff 35 58 89 12 00 pushl 0x128958 10aee0: e8 53 5b 00 00 call 110a38 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 10aee5: 8b 45 f4 mov -0xc(%ebp),%eax 10aee8: 31 d2 xor %edx,%edx 10aeea: 03 05 3c d3 12 00 add 0x12d33c,%eax 10aef0: 13 15 40 d3 12 00 adc 0x12d340,%edx 10aef6: a3 3c d3 12 00 mov %eax,0x12d33c 10aefb: 89 15 40 d3 12 00 mov %edx,0x12d340 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 10af01: 2b 05 44 d3 12 00 sub 0x12d344,%eax if (current_depth > s->max_depth) 10af07: 83 c4 10 add $0x10,%esp 10af0a: 3b 05 38 d3 12 00 cmp 0x12d338,%eax 10af10: 76 05 jbe 10af17 s->max_depth = current_depth; 10af12: a3 38 d3 12 00 mov %eax,0x12d338 } 10af17: c9 leave 10af18: c3 ret =============================================================================== 00113af8 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 113af8: 55 push %ebp 113af9: 89 e5 mov %esp,%ebp 113afb: 53 push %ebx 113afc: 83 ec 14 sub $0x14,%esp 113aff: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 113b02: 85 db test %ebx,%ebx 113b04: 74 5b je 113b61 return EINVAL; *pointer = NULL; 113b06: 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()) && 113b0c: 83 3d c0 95 12 00 03 cmpl $0x3,0x1295c0 113b13: 74 43 je 113b58 <== ALWAYS TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 113b15: e8 b6 55 ff ff call 1090d0 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 113b1a: 6a 00 push $0x0 113b1c: ff 75 0c pushl 0xc(%ebp) 113b1f: ff 75 10 pushl 0x10(%ebp) 113b22: ff 35 58 51 12 00 pushl 0x125158 113b28: e8 d7 a7 ff ff call 10e304 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 113b2d: 83 c4 10 add $0x10,%esp 113b30: 85 c0 test %eax,%eax 113b32: 74 38 je 113b6c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 113b34: 8b 15 08 76 12 00 mov 0x127608,%edx 113b3a: 85 d2 test %edx,%edx 113b3c: 74 10 je 113b4e (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 113b3e: 83 ec 0c sub $0xc,%esp 113b41: 53 push %ebx 113b42: 89 45 f4 mov %eax,-0xc(%ebp) 113b45: ff 52 04 call *0x4(%edx) 113b48: 83 c4 10 add $0x10,%esp 113b4b: 8b 45 f4 mov -0xc(%ebp),%eax *pointer = return_this; 113b4e: 89 03 mov %eax,(%ebx) return 0; 113b50: 31 c0 xor %eax,%eax } 113b52: 8b 5d fc mov -0x4(%ebp),%ebx 113b55: c9 leave 113b56: c3 ret 113b57: 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() ) 113b58: e8 33 55 ff ff call 109090 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 113b5d: 84 c0 test %al,%al 113b5f: 75 b4 jne 113b15 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return EINVAL; 113b61: 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; } 113b66: 8b 5d fc mov -0x4(%ebp),%ebx 113b69: c9 leave 113b6a: c3 ret 113b6b: 90 nop <== NOT EXECUTED RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; 113b6c: b8 0c 00 00 00 mov $0xc,%eax 113b71: eb df jmp 113b52 =============================================================================== 001164c4 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1164c4: 55 push %ebp 1164c5: 89 e5 mov %esp,%ebp 1164c7: 57 push %edi 1164c8: 56 push %esi 1164c9: 53 push %ebx 1164ca: 83 ec 1c sub $0x1c,%esp 1164cd: 8b 7d 08 mov 0x8(%ebp),%edi 1164d0: 8b 5d 0c mov 0xc(%ebp),%ebx 1164d3: 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 ) 1164d6: 85 db test %ebx,%ebx 1164d8: 74 62 je 11653c return RTEMS_INVALID_ADDRESS; if ( !count ) 1164da: 85 f6 test %esi,%esi 1164dc: 74 5e je 11653c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1164de: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1164df: 8d 45 e4 lea -0x1c(%ebp),%eax 1164e2: 50 push %eax 1164e3: 57 push %edi 1164e4: 68 40 0a 14 00 push $0x140a40 1164e9: e8 6e 4d 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1164ee: 83 c4 10 add $0x10,%esp 1164f1: 8b 55 e4 mov -0x1c(%ebp),%edx 1164f4: 85 d2 test %edx,%edx 1164f6: 74 10 je 116508 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1164f8: b8 04 00 00 00 mov $0x4,%eax } 1164fd: 8d 65 f4 lea -0xc(%ebp),%esp 116500: 5b pop %ebx 116501: 5e pop %esi 116502: 5f pop %edi 116503: c9 leave 116504: c3 ret 116505: 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( 116508: 83 ec 08 sub $0x8,%esp 11650b: 56 push %esi 11650c: 6a 00 push $0x0 11650e: 57 push %edi 11650f: ff 75 10 pushl 0x10(%ebp) 116512: 53 push %ebx 116513: 83 c0 14 add $0x14,%eax 116516: 50 push %eax 116517: e8 50 34 00 00 call 11996c <_CORE_message_queue_Broadcast> 11651c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 11651e: 83 c4 20 add $0x20,%esp 116521: e8 9a 55 00 00 call 11bac0 <_Thread_Enable_dispatch> return 116526: 83 ec 0c sub $0xc,%esp 116529: 53 push %ebx 11652a: e8 69 03 00 00 call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11652f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116532: 8d 65 f4 lea -0xc(%ebp),%esp 116535: 5b pop %ebx 116536: 5e pop %esi 116537: 5f pop %edi 116538: c9 leave 116539: c3 ret 11653a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 11653c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116541: 8d 65 f4 lea -0xc(%ebp),%esp 116544: 5b pop %ebx 116545: 5e pop %esi 116546: 5f pop %edi 116547: c9 leave 116548: c3 ret =============================================================================== 001138d4 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 1138d4: 55 push %ebp 1138d5: 89 e5 mov %esp,%ebp 1138d7: 57 push %edi 1138d8: 56 push %esi 1138d9: 53 push %ebx 1138da: 83 ec 2c sub $0x2c,%esp 1138dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1138e0: 8b 75 0c mov 0xc(%ebp),%esi 1138e3: 8b 4d 10 mov 0x10(%ebp),%ecx 1138e6: 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 ) ) 1138e9: 85 db test %ebx,%ebx 1138eb: 74 2f je 11391c return RTEMS_INVALID_NAME; if ( !id ) 1138ed: 85 ff test %edi,%edi 1138ef: 0f 84 a3 00 00 00 je 113998 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1138f5: 85 f6 test %esi,%esi 1138f7: 74 13 je 11390c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1138f9: 85 c9 test %ecx,%ecx 1138fb: 75 2f jne 11392c return RTEMS_INVALID_SIZE; 1138fd: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113902: 8d 65 f4 lea -0xc(%ebp),%esp 113905: 5b pop %ebx 113906: 5e pop %esi 113907: 5f pop %edi 113908: c9 leave 113909: c3 ret 11390a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11390c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113911: 8d 65 f4 lea -0xc(%ebp),%esp 113914: 5b pop %ebx 113915: 5e pop %esi 113916: 5f pop %edi 113917: c9 leave 113918: c3 ret 113919: 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; 11391c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113921: 8d 65 f4 lea -0xc(%ebp),%esp 113924: 5b pop %ebx 113925: 5e pop %esi 113926: 5f pop %edi 113927: c9 leave 113928: c3 ret 113929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11392c: a1 54 fa 12 00 mov 0x12fa54,%eax 113931: 40 inc %eax 113932: a3 54 fa 12 00 mov %eax,0x12fa54 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113937: 89 4d d4 mov %ecx,-0x2c(%ebp) 11393a: e8 19 53 00 00 call 118c58 <_Message_queue_Allocate> 11393f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113941: 85 c0 test %eax,%eax 113943: 8b 4d d4 mov -0x2c(%ebp),%ecx 113946: 74 7c je 1139c4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113948: 8b 45 14 mov 0x14(%ebp),%eax 11394b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11394e: a8 04 test $0x4,%al 113950: 0f 95 c0 setne %al 113953: 0f b6 c0 movzbl %al,%eax 113956: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113959: 51 push %ecx 11395a: 56 push %esi 11395b: 8d 45 e4 lea -0x1c(%ebp),%eax 11395e: 50 push %eax 11395f: 8d 42 14 lea 0x14(%edx),%eax 113962: 50 push %eax 113963: 89 55 d4 mov %edx,-0x2c(%ebp) 113966: e8 dd 10 00 00 call 114a48 <_CORE_message_queue_Initialize> 11396b: 83 c4 10 add $0x10,%esp 11396e: 84 c0 test %al,%al 113970: 8b 55 d4 mov -0x2c(%ebp),%edx 113973: 75 2f jne 1139a4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113975: 83 ec 08 sub $0x8,%esp 113978: 52 push %edx 113979: 68 20 fd 12 00 push $0x12fd20 11397e: e8 75 1e 00 00 call 1157f8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113983: e8 8c 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 113988: 83 c4 10 add $0x10,%esp 11398b: b8 0d 00 00 00 mov $0xd,%eax 113990: e9 6d ff ff ff jmp 113902 113995: 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; 113998: b8 09 00 00 00 mov $0x9,%eax 11399d: e9 60 ff ff ff jmp 113902 1139a2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1139a4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1139a7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139aa: 8b 0d 3c fd 12 00 mov 0x12fd3c,%ecx 1139b0: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1139b3: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1139b6: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 1139b8: e8 57 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1139bd: 31 c0 xor %eax,%eax 1139bf: e9 3e ff ff ff jmp 113902 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 1139c4: e8 4b 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1139c9: b8 05 00 00 00 mov $0x5,%eax 1139ce: e9 2f ff ff ff jmp 113902 =============================================================================== 0011664c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 53 push %ebx 116650: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116653: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 116656: 50 push %eax 116657: ff 75 08 pushl 0x8(%ebp) 11665a: 68 40 0a 14 00 push $0x140a40 11665f: e8 f8 4b 00 00 call 11b25c <_Objects_Get> 116664: 89 c3 mov %eax,%ebx switch ( location ) { 116666: 83 c4 10 add $0x10,%esp 116669: 8b 4d f4 mov -0xc(%ebp),%ecx 11666c: 85 c9 test %ecx,%ecx 11666e: 75 3c jne 1166ac case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116670: 83 ec 08 sub $0x8,%esp 116673: 50 push %eax 116674: 68 40 0a 14 00 push $0x140a40 116679: e8 6e 47 00 00 call 11adec <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11667e: 83 c4 0c add $0xc,%esp 116681: 6a 05 push $0x5 116683: 6a 00 push $0x0 116685: 8d 43 14 lea 0x14(%ebx),%eax 116688: 50 push %eax 116689: e8 62 33 00 00 call 1199f0 <_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 ); 11668e: 58 pop %eax 11668f: 5a pop %edx 116690: 53 push %ebx 116691: 68 40 0a 14 00 push $0x140a40 116696: e8 4d 4a 00 00 call 11b0e8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11669b: e8 20 54 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166a0: 83 c4 10 add $0x10,%esp 1166a3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1166a5: 8b 5d fc mov -0x4(%ebp),%ebx 1166a8: c9 leave 1166a9: c3 ret 1166aa: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166ac: b8 04 00 00 00 mov $0x4,%eax } 1166b1: 8b 5d fc mov -0x4(%ebp),%ebx 1166b4: c9 leave 1166b5: c3 ret =============================================================================== 001166b8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1166b8: 55 push %ebp 1166b9: 89 e5 mov %esp,%ebp 1166bb: 53 push %ebx 1166bc: 83 ec 14 sub $0x14,%esp 1166bf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1166c2: 85 db test %ebx,%ebx 1166c4: 74 46 je 11670c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1166c6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1166c7: 8d 45 f4 lea -0xc(%ebp),%eax 1166ca: 50 push %eax 1166cb: ff 75 08 pushl 0x8(%ebp) 1166ce: 68 40 0a 14 00 push $0x140a40 1166d3: e8 84 4b 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1166d8: 83 c4 10 add $0x10,%esp 1166db: 8b 55 f4 mov -0xc(%ebp),%edx 1166de: 85 d2 test %edx,%edx 1166e0: 74 0a je 1166ec case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166e2: b8 04 00 00 00 mov $0x4,%eax } 1166e7: 8b 5d fc mov -0x4(%ebp),%ebx 1166ea: c9 leave 1166eb: 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 ); 1166ec: 83 ec 0c sub $0xc,%esp 1166ef: 83 c0 14 add $0x14,%eax 1166f2: 50 push %eax 1166f3: e8 34 33 00 00 call 119a2c <_CORE_message_queue_Flush> 1166f8: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1166fa: e8 c1 53 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166ff: 83 c4 10 add $0x10,%esp 116702: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116704: 8b 5d fc mov -0x4(%ebp),%ebx 116707: c9 leave 116708: c3 ret 116709: 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; 11670c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116711: 8b 5d fc mov -0x4(%ebp),%ebx 116714: c9 leave 116715: c3 ret =============================================================================== 00116718 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116718: 55 push %ebp 116719: 89 e5 mov %esp,%ebp 11671b: 53 push %ebx 11671c: 83 ec 14 sub $0x14,%esp 11671f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116722: 85 db test %ebx,%ebx 116724: 74 3a je 116760 116726: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 116727: 8d 45 f4 lea -0xc(%ebp),%eax 11672a: 50 push %eax 11672b: ff 75 08 pushl 0x8(%ebp) 11672e: 68 40 0a 14 00 push $0x140a40 116733: e8 24 4b 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116738: 83 c4 10 add $0x10,%esp 11673b: 8b 55 f4 mov -0xc(%ebp),%edx 11673e: 85 d2 test %edx,%edx 116740: 74 0a je 11674c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116742: b8 04 00 00 00 mov $0x4,%eax } 116747: 8b 5d fc mov -0x4(%ebp),%ebx 11674a: c9 leave 11674b: 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; 11674c: 8b 40 5c mov 0x5c(%eax),%eax 11674f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116751: e8 6a 53 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116758: 8b 5d fc mov -0x4(%ebp),%ebx 11675b: c9 leave 11675c: c3 ret 11675d: 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; 116760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116765: 8b 5d fc mov -0x4(%ebp),%ebx 116768: c9 leave 116769: c3 ret =============================================================================== 001139f8 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1139f8: 55 push %ebp 1139f9: 89 e5 mov %esp,%ebp 1139fb: 56 push %esi 1139fc: 53 push %ebx 1139fd: 83 ec 10 sub $0x10,%esp 113a00: 8b 5d 0c mov 0xc(%ebp),%ebx 113a03: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113a06: 85 db test %ebx,%ebx 113a08: 74 6e je 113a78 return RTEMS_INVALID_ADDRESS; if ( !size ) 113a0a: 85 f6 test %esi,%esi 113a0c: 74 6a je 113a78 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 113a0e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 113a0f: 8d 45 f4 lea -0xc(%ebp),%eax 113a12: 50 push %eax 113a13: ff 75 08 pushl 0x8(%ebp) 113a16: 68 20 fd 12 00 push $0x12fd20 113a1b: e8 10 1f 00 00 call 115930 <_Objects_Get> switch ( location ) { 113a20: 83 c4 10 add $0x10,%esp 113a23: 8b 55 f4 mov -0xc(%ebp),%edx 113a26: 85 d2 test %edx,%edx 113a28: 75 42 jne 113a6c if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113a2a: 83 ec 08 sub $0x8,%esp 113a2d: 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; 113a30: 8b 55 14 mov 0x14(%ebp),%edx 113a33: 83 e2 01 and $0x1,%edx 113a36: 83 f2 01 xor $0x1,%edx 113a39: 52 push %edx 113a3a: 56 push %esi 113a3b: 53 push %ebx 113a3c: ff 70 08 pushl 0x8(%eax) 113a3f: 83 c0 14 add $0x14,%eax 113a42: 50 push %eax 113a43: e8 a0 10 00 00 call 114ae8 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113a48: 83 c4 20 add $0x20,%esp 113a4b: e8 c4 27 00 00 call 116214 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113a50: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 113a53: a1 f8 fc 12 00 mov 0x12fcf8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113a58: ff 70 34 pushl 0x34(%eax) 113a5b: e8 a0 00 00 00 call 113b00 <_Message_queue_Translate_core_message_queue_return_code> 113a60: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a63: 8d 65 f8 lea -0x8(%ebp),%esp 113a66: 5b pop %ebx 113a67: 5e pop %esi 113a68: c9 leave 113a69: c3 ret 113a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 113a6c: b8 04 00 00 00 mov $0x4,%eax } 113a71: 8d 65 f8 lea -0x8(%ebp),%esp 113a74: 5b pop %ebx 113a75: 5e pop %esi 113a76: c9 leave 113a77: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 113a78: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a7d: 8d 65 f8 lea -0x8(%ebp),%esp 113a80: 5b pop %ebx 113a81: 5e pop %esi 113a82: c9 leave 113a83: c3 ret =============================================================================== 0010b430 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b430: 55 push %ebp 10b431: 89 e5 mov %esp,%ebp 10b433: 56 push %esi 10b434: 53 push %ebx 10b435: 83 ec 10 sub $0x10,%esp 10b438: 8b 75 08 mov 0x8(%ebp),%esi 10b43b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b43e: 85 db test %ebx,%ebx 10b440: 74 5e je 10b4a0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b442: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b443: 8d 45 f4 lea -0xc(%ebp),%eax 10b446: 50 push %eax 10b447: 56 push %esi 10b448: 68 a0 66 12 00 push $0x1266a0 10b44d: e8 86 19 00 00 call 10cdd8 <_Objects_Get> switch ( location ) { 10b452: 83 c4 10 add $0x10,%esp 10b455: 8b 55 f4 mov -0xc(%ebp),%edx 10b458: 85 d2 test %edx,%edx 10b45a: 74 0c je 10b468 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b45c: b8 04 00 00 00 mov $0x4,%eax } 10b461: 8d 65 f8 lea -0x8(%ebp),%esp 10b464: 5b pop %ebx 10b465: 5e pop %esi 10b466: c9 leave 10b467: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b468: 6a 00 push $0x0 10b46a: 6a 00 push $0x0 10b46c: 68 ff ff ff 7f push $0x7fffffff 10b471: 6a 00 push $0x0 10b473: 56 push %esi 10b474: ff 75 10 pushl 0x10(%ebp) 10b477: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b478: 83 c0 14 add $0x14,%eax 10b47b: 50 push %eax 10b47c: e8 e7 0b 00 00 call 10c068 <_CORE_message_queue_Submit> 10b481: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b483: 83 c4 20 add $0x20,%esp 10b486: e8 b1 21 00 00 call 10d63c <_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); 10b48b: 83 ec 0c sub $0xc,%esp 10b48e: 53 push %ebx 10b48f: e8 18 00 00 00 call 10b4ac <_Message_queue_Translate_core_message_queue_return_code> 10b494: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b497: 8d 65 f8 lea -0x8(%ebp),%esp 10b49a: 5b pop %ebx 10b49b: 5e pop %esi 10b49c: c9 leave 10b49d: c3 ret 10b49e: 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; 10b4a0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b4a5: 8d 65 f8 lea -0x8(%ebp),%esp 10b4a8: 5b pop %ebx 10b4a9: 5e pop %esi 10b4aa: c9 leave 10b4ab: c3 ret =============================================================================== 001168a8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1168a8: 55 push %ebp 1168a9: 89 e5 mov %esp,%ebp 1168ab: 56 push %esi 1168ac: 53 push %ebx 1168ad: 83 ec 10 sub $0x10,%esp 1168b0: 8b 75 08 mov 0x8(%ebp),%esi 1168b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1168b6: 85 db test %ebx,%ebx 1168b8: 74 5e je 116918 1168ba: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1168bb: 8d 45 f4 lea -0xc(%ebp),%eax 1168be: 50 push %eax 1168bf: 56 push %esi 1168c0: 68 40 0a 14 00 push $0x140a40 1168c5: e8 92 49 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1168ca: 83 c4 10 add $0x10,%esp 1168cd: 8b 55 f4 mov -0xc(%ebp),%edx 1168d0: 85 d2 test %edx,%edx 1168d2: 74 0c je 1168e0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1168d4: b8 04 00 00 00 mov $0x4,%eax } 1168d9: 8d 65 f8 lea -0x8(%ebp),%esp 1168dc: 5b pop %ebx 1168dd: 5e pop %esi 1168de: c9 leave 1168df: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1168e0: 6a 00 push $0x0 1168e2: 6a 00 push $0x0 1168e4: 68 00 00 00 80 push $0x80000000 1168e9: 6a 00 push $0x0 1168eb: 56 push %esi 1168ec: ff 75 10 pushl 0x10(%ebp) 1168ef: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1168f0: 83 c0 14 add $0x14,%eax 1168f3: 50 push %eax 1168f4: e8 0f 33 00 00 call 119c08 <_CORE_message_queue_Submit> 1168f9: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1168fb: 83 c4 20 add $0x20,%esp 1168fe: e8 bd 51 00 00 call 11bac0 <_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); 116903: 83 ec 0c sub $0xc,%esp 116906: 53 push %ebx 116907: e8 8c ff ff ff call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11690c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11690f: 8d 65 f8 lea -0x8(%ebp),%esp 116912: 5b pop %ebx 116913: 5e pop %esi 116914: c9 leave 116915: c3 ret 116916: 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; 116918: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11691d: 8d 65 f8 lea -0x8(%ebp),%esp 116920: 5b pop %ebx 116921: 5e pop %esi 116922: c9 leave 116923: c3 ret =============================================================================== 00112350 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 112350: 55 push %ebp 112351: 89 e5 mov %esp,%ebp 112353: 57 push %edi 112354: 56 push %esi 112355: 53 push %ebx 112356: 83 ec 78 sub $0x78,%esp int success = 0; char *dup_path = strdup(path); 112359: ff 75 08 pushl 0x8(%ebp) 11235c: e8 d3 22 00 00 call 114634 112361: 89 c7 mov %eax,%edi if (dup_path != NULL) { 112363: 83 c4 10 add $0x10,%esp 112366: 85 c0 test %eax,%eax 112368: 0f 84 0a 01 00 00 je 112478 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 11236e: 8a 10 mov (%eax),%dl 112370: 80 fa 2f cmp $0x2f,%dl 112373: 0f 84 0f 01 00 00 je 112488 112379: 89 c3 mov %eax,%ebx 11237b: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) 112382: b8 01 00 00 00 mov $0x1,%eax ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 112387: 84 d2 test %dl,%dl 112389: 74 11 je 11239c <== NEVER TAKEN 11238b: 90 nop last = 1; else if (p[0] != '/') 11238c: 80 fa 2f cmp $0x2f,%dl 11238f: 0f 84 83 00 00 00 je 112418 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 112395: 43 inc %ebx 112396: 8a 13 mov (%ebx),%dl if (p[0] == '\0') 112398: 84 d2 test %dl,%dl 11239a: 75 f0 jne 11238c last = 1; else if (p[0] != '/') continue; *p = '\0'; 11239c: c6 03 00 movb $0x0,(%ebx) 11239f: be 01 00 00 00 mov $0x1,%esi if (!last && p[1] == '\0') last = 1; if (first) { 1123a4: 85 c0 test %eax,%eax 1123a6: 75 54 jne 1123fc oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 1123a8: 85 f6 test %esi,%esi 1123aa: 75 3c jne 1123e8 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 1123ac: b8 ff 01 00 00 mov $0x1ff,%eax 1123b1: 83 ec 08 sub $0x8,%esp 1123b4: 50 push %eax 1123b5: 57 push %edi 1123b6: e8 85 72 ff ff call 109640 1123bb: 83 c4 10 add $0x10,%esp 1123be: 85 c0 test %eax,%eax 1123c0: 78 6a js 11242c } else { retval = 0; break; } } if (!last) 1123c2: 85 f6 test %esi,%esi 1123c4: 75 0a jne 1123d0 *p = '/'; 1123c6: c6 03 2f movb $0x2f,(%ebx) 1123c9: 31 c0 xor %eax,%eax 1123cb: eb c8 jmp 112395 1123cd: 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); 1123d0: 83 ec 0c sub $0xc,%esp 1123d3: 57 push %edi 1123d4: e8 ab 6c ff ff call 109084 1123d9: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 1123dc: 31 c0 xor %eax,%eax } 1123de: 8d 65 f4 lea -0xc(%ebp),%esp 1123e1: 5b pop %ebx 1123e2: 5e pop %esi 1123e3: 5f pop %edi 1123e4: c9 leave 1123e5: c3 ret 1123e6: 66 90 xchg %ax,%ax <== NOT EXECUTED numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask); 1123e8: 83 ec 0c sub $0xc,%esp 1123eb: ff 75 94 pushl -0x6c(%ebp) 1123ee: e8 81 01 00 00 call 112574 1123f3: 83 c4 10 add $0x10,%esp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 1123f6: 8b 45 0c mov 0xc(%ebp),%eax 1123f9: eb b6 jmp 1123b1 1123fb: 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); 1123fc: 83 ec 0c sub $0xc,%esp 1123ff: 6a 00 push $0x0 112401: e8 6e 01 00 00 call 112574 112406: 89 45 94 mov %eax,-0x6c(%ebp) numask = oumask & ~(S_IWUSR | S_IXUSR); 112409: 24 3f and $0x3f,%al (void)umask(numask); 11240b: 89 04 24 mov %eax,(%esp) 11240e: e8 61 01 00 00 call 112574 112413: 83 c4 10 add $0x10,%esp 112416: eb 90 jmp 1123a8 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 112418: c6 03 00 movb $0x0,(%ebx) if (!last && p[1] == '\0') 11241b: 31 d2 xor %edx,%edx 11241d: 80 7b 01 00 cmpb $0x0,0x1(%ebx) 112421: 0f 94 c2 sete %dl 112424: 89 d6 mov %edx,%esi 112426: e9 79 ff ff ff jmp 1123a4 11242b: 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) { 11242c: e8 7f 16 00 00 call 113ab0 <__errno> 112431: 83 38 11 cmpl $0x11,(%eax) 112434: 74 0a je 112440 <== ALWAYS TAKEN 112436: e8 75 16 00 00 call 113ab0 <__errno> <== NOT EXECUTED 11243b: 83 38 15 cmpl $0x15,(%eax) <== NOT EXECUTED 11243e: 75 53 jne 112493 <== NOT EXECUTED if (stat(path, &sb) < 0) { 112440: 83 ec 08 sub $0x8,%esp 112443: 8d 45 a0 lea -0x60(%ebp),%eax 112446: 50 push %eax 112447: 57 push %edi 112448: e8 7f 00 00 00 call 1124cc 11244d: 83 c4 10 add $0x10,%esp 112450: 85 c0 test %eax,%eax 112452: 78 3f js 112493 <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 112454: 8b 45 ac mov -0x54(%ebp),%eax 112457: 25 00 f0 00 00 and $0xf000,%eax 11245c: 3d 00 40 00 00 cmp $0x4000,%eax 112461: 0f 84 5b ff ff ff je 1123c2 if (last) 112467: 85 f6 test %esi,%esi 112469: 74 53 je 1124be <== NEVER TAKEN errno = EEXIST; 11246b: e8 40 16 00 00 call 113ab0 <__errno> 112470: c7 00 11 00 00 00 movl $0x11,(%eax) 112476: eb 2d jmp 1124a5 if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 112478: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED } 11247d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112480: 5b pop %ebx <== NOT EXECUTED 112481: 5e pop %esi <== NOT EXECUTED 112482: 5f pop %edi <== NOT EXECUTED 112483: c9 leave <== NOT EXECUTED 112484: c3 ret <== NOT EXECUTED 112485: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 112488: 8d 58 01 lea 0x1(%eax),%ebx 11248b: 8a 50 01 mov 0x1(%eax),%dl 11248e: e9 e8 fe ff ff jmp 11237b } } if (!last) *p = '/'; } if (!first && !last) 112493: 85 f6 test %esi,%esi <== NOT EXECUTED 112495: 75 0e jne 1124a5 <== NOT EXECUTED (void)umask(oumask); 112497: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11249a: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 11249d: e8 d2 00 00 00 call 112574 <== NOT EXECUTED 1124a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 1124a5: 83 ec 0c sub $0xc,%esp 1124a8: 57 push %edi 1124a9: e8 d6 6b ff ff call 109084 1124ae: 83 c4 10 add $0x10,%esp } return success != 0 ? 0 : -1; 1124b1: b8 ff ff ff ff mov $0xffffffff,%eax } 1124b6: 8d 65 f4 lea -0xc(%ebp),%esp 1124b9: 5b pop %ebx 1124ba: 5e pop %esi 1124bb: 5f pop %edi 1124bc: c9 leave 1124bd: c3 ret break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 1124be: e8 ed 15 00 00 call 113ab0 <__errno> <== NOT EXECUTED 1124c3: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 1124c9: eb cc jmp 112497 <== NOT EXECUTED =============================================================================== 0010ce8c : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 83 ec 08 sub $0x8,%esp 10ce92: 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 ) 10ce95: 83 f8 01 cmp $0x1,%eax 10ce98: 74 2a je 10cec4 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ce9a: 83 f8 02 cmp $0x2,%eax 10ce9d: 74 09 je 10cea8 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10ce9f: b8 a7 31 12 00 mov $0x1231a7,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10cea4: c9 leave 10cea5: c3 ret 10cea6: 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; 10cea8: b8 80 70 12 00 mov $0x127080,%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 ); 10cead: 83 ec 08 sub $0x8,%esp 10ceb0: ff 75 0c pushl 0xc(%ebp) 10ceb3: 50 push %eax 10ceb4: e8 57 49 00 00 call 111810 if ( class_assoc ) 10ceb9: 83 c4 10 add $0x10,%esp 10cebc: 85 c0 test %eax,%eax 10cebe: 74 0c je 10cecc return class_assoc->name; 10cec0: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cec2: c9 leave 10cec3: 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; 10cec4: b8 60 70 12 00 mov $0x127060,%eax 10cec9: eb e2 jmp 10cead 10cecb: 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"; 10cecc: b8 af 31 12 00 mov $0x1231af,%eax } 10ced1: c9 leave 10ced2: c3 ret =============================================================================== 0010ced4 : }; const char *rtems_object_get_api_name( int api ) { 10ced4: 55 push %ebp 10ced5: 89 e5 mov %esp,%ebp 10ced7: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10ceda: ff 75 08 pushl 0x8(%ebp) 10cedd: 68 00 71 12 00 push $0x127100 10cee2: e8 29 49 00 00 call 111810 if ( api_assoc ) 10cee7: 83 c4 10 add $0x10,%esp 10ceea: 85 c0 test %eax,%eax 10ceec: 74 06 je 10cef4 return api_assoc->name; 10ceee: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cef0: c9 leave 10cef1: c3 ret 10cef2: 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"; 10cef4: b8 af 31 12 00 mov $0x1231af,%eax } 10cef9: c9 leave 10cefa: c3 ret =============================================================================== 0010cf3c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf3c: 55 push %ebp 10cf3d: 89 e5 mov %esp,%ebp 10cf3f: 57 push %edi 10cf40: 56 push %esi 10cf41: 53 push %ebx 10cf42: 83 ec 0c sub $0xc,%esp 10cf45: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf48: 85 db test %ebx,%ebx 10cf4a: 74 5c je 10cfa8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf4c: 83 ec 08 sub $0x8,%esp 10cf4f: ff 75 0c pushl 0xc(%ebp) 10cf52: ff 75 08 pushl 0x8(%ebp) 10cf55: e8 5e 1a 00 00 call 10e9b8 <_Objects_Get_information> if ( !obj_info ) 10cf5a: 83 c4 10 add $0x10,%esp 10cf5d: 85 c0 test %eax,%eax 10cf5f: 74 57 je 10cfb8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf61: 8b 50 08 mov 0x8(%eax),%edx 10cf64: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf66: 8b 50 0c mov 0xc(%eax),%edx 10cf69: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf6c: 8a 50 12 mov 0x12(%eax),%dl 10cf6f: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf72: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf76: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf79: 85 f6 test %esi,%esi 10cf7b: 74 42 je 10cfbf <== NEVER TAKEN 10cf7d: 8b 78 1c mov 0x1c(%eax),%edi 10cf80: b9 01 00 00 00 mov $0x1,%ecx 10cf85: b8 01 00 00 00 mov $0x1,%eax 10cf8a: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cf8c: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf90: 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++ ) 10cf93: 40 inc %eax 10cf94: 89 c1 mov %eax,%ecx 10cf96: 39 c6 cmp %eax,%esi 10cf98: 73 f2 jae 10cf8c if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf9a: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cf9d: 31 c0 xor %eax,%eax } 10cf9f: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa2: 5b pop %ebx 10cfa3: 5e pop %esi 10cfa4: 5f pop %edi 10cfa5: c9 leave 10cfa6: c3 ret 10cfa7: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfa8: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfad: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb0: 5b pop %ebx 10cfb1: 5e pop %esi 10cfb2: 5f pop %edi 10cfb3: c9 leave 10cfb4: c3 ret 10cfb5: 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; 10cfb8: b8 0a 00 00 00 mov $0xa,%eax 10cfbd: eb e0 jmp 10cf9f 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++ ) 10cfbf: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfc1: eb d7 jmp 10cf9a <== NOT EXECUTED =============================================================================== 0010c598 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 26 je 10c5cc return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 b3 1a 00 00 call 10e068 <_Objects_Id_to_name> *name = name_u.name_u32; 10c5b5: 8b 55 f4 mov -0xc(%ebp),%edx 10c5b8: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c5ba: 8b 04 85 8c 1d 12 00 mov 0x121d8c(,%eax,4),%eax 10c5c1: 83 c4 10 add $0x10,%esp } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 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; 10c5cc: 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 ]; } 10c5d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c5d4: c9 leave 10c5d5: c3 ret =============================================================================== 0010d01c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d01c: 55 push %ebp 10d01d: 89 e5 mov %esp,%ebp 10d01f: 57 push %edi 10d020: 56 push %esi 10d021: 53 push %ebx 10d022: 83 ec 1c sub $0x1c,%esp 10d025: 8b 75 08 mov 0x8(%ebp),%esi 10d028: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d02b: 85 ff test %edi,%edi 10d02d: 74 61 je 10d090 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d02f: 85 f6 test %esi,%esi 10d031: 74 35 je 10d068 information = _Objects_Get_information_id( tmpId ); 10d033: 83 ec 0c sub $0xc,%esp 10d036: 56 push %esi 10d037: e8 5c 19 00 00 call 10e998 <_Objects_Get_information_id> 10d03c: 89 c3 mov %eax,%ebx if ( !information ) 10d03e: 83 c4 10 add $0x10,%esp 10d041: 85 c0 test %eax,%eax 10d043: 74 16 je 10d05b return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d045: 50 push %eax 10d046: 8d 45 e4 lea -0x1c(%ebp),%eax 10d049: 50 push %eax 10d04a: 56 push %esi 10d04b: 53 push %ebx 10d04c: e8 db 1a 00 00 call 10eb2c <_Objects_Get> switch ( location ) { 10d051: 83 c4 10 add $0x10,%esp 10d054: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d057: 85 c9 test %ecx,%ecx 10d059: 74 19 je 10d074 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d05b: b8 04 00 00 00 mov $0x4,%eax } 10d060: 8d 65 f4 lea -0xc(%ebp),%esp 10d063: 5b pop %ebx 10d064: 5e pop %esi 10d065: 5f pop %edi 10d066: c9 leave 10d067: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d068: a1 18 97 12 00 mov 0x129718,%eax 10d06d: 8b 70 08 mov 0x8(%eax),%esi 10d070: eb c1 jmp 10d033 10d072: 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 ); 10d074: 52 push %edx 10d075: 57 push %edi 10d076: 50 push %eax 10d077: 53 push %ebx 10d078: e8 e7 1c 00 00 call 10ed64 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d07d: e8 f6 23 00 00 call 10f478 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d082: 83 c4 10 add $0x10,%esp 10d085: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d087: 8d 65 f4 lea -0xc(%ebp),%esp 10d08a: 5b pop %ebx 10d08b: 5e pop %esi 10d08c: 5f pop %edi 10d08d: c9 leave 10d08e: c3 ret 10d08f: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d090: b8 09 00 00 00 mov $0x9,%eax 10d095: eb c9 jmp 10d060 =============================================================================== 00116924 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116924: 55 push %ebp 116925: 89 e5 mov %esp,%ebp 116927: 57 push %edi 116928: 56 push %esi 116929: 53 push %ebx 11692a: 83 ec 1c sub $0x1c,%esp 11692d: 8b 5d 08 mov 0x8(%ebp),%ebx 116930: 8b 75 0c mov 0xc(%ebp),%esi 116933: 8b 55 10 mov 0x10(%ebp),%edx 116936: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116939: 85 db test %ebx,%ebx 11693b: 74 47 je 116984 return RTEMS_INVALID_NAME; if ( !starting_address ) 11693d: 85 f6 test %esi,%esi 11693f: 74 23 je 116964 return RTEMS_INVALID_ADDRESS; if ( !id ) 116941: 8b 45 1c mov 0x1c(%ebp),%eax 116944: 85 c0 test %eax,%eax 116946: 74 1c je 116964 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116948: 85 d2 test %edx,%edx 11694a: 74 28 je 116974 11694c: 85 ff test %edi,%edi 11694e: 74 24 je 116974 116950: 39 fa cmp %edi,%edx 116952: 72 20 jb 116974 116954: f7 c7 03 00 00 00 test $0x3,%edi 11695a: 75 18 jne 116974 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11695c: f7 c6 03 00 00 00 test $0x3,%esi 116962: 74 30 je 116994 return RTEMS_INVALID_ADDRESS; 116964: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116969: 8d 65 f4 lea -0xc(%ebp),%esp 11696c: 5b pop %ebx 11696d: 5e pop %esi 11696e: 5f pop %edi 11696f: c9 leave 116970: c3 ret 116971: 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; 116974: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116979: 8d 65 f4 lea -0xc(%ebp),%esp 11697c: 5b pop %ebx 11697d: 5e pop %esi 11697e: 5f pop %edi 11697f: c9 leave 116980: c3 ret 116981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116984: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116989: 8d 65 f4 lea -0xc(%ebp),%esp 11698c: 5b pop %ebx 11698d: 5e pop %esi 11698e: 5f pop %edi 11698f: c9 leave 116990: c3 ret 116991: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116994: a1 74 07 14 00 mov 0x140774,%eax 116999: 40 inc %eax 11699a: a3 74 07 14 00 mov %eax,0x140774 * 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 ); 11699f: 83 ec 0c sub $0xc,%esp 1169a2: 68 00 06 14 00 push $0x140600 1169a7: 89 55 e0 mov %edx,-0x20(%ebp) 1169aa: e8 c1 43 00 00 call 11ad70 <_Objects_Allocate> 1169af: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1169b2: 83 c4 10 add $0x10,%esp 1169b5: 85 c0 test %eax,%eax 1169b7: 8b 55 e0 mov -0x20(%ebp),%edx 1169ba: 74 58 je 116a14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1169bc: 8b 45 e4 mov -0x1c(%ebp),%eax 1169bf: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1169c2: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1169c5: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1169c8: 8b 4d 18 mov 0x18(%ebp),%ecx 1169cb: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1169ce: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1169d5: 57 push %edi 1169d6: 89 d0 mov %edx,%eax 1169d8: 31 d2 xor %edx,%edx 1169da: f7 f7 div %edi 1169dc: 50 push %eax 1169dd: 56 push %esi 1169de: 8b 45 e4 mov -0x1c(%ebp),%eax 1169e1: 83 c0 24 add $0x24,%eax 1169e4: 50 push %eax 1169e5: e8 36 2f 00 00 call 119920 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1169ea: 8b 7d e4 mov -0x1c(%ebp),%edi 1169ed: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1169f0: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1169f3: 8b 15 1c 06 14 00 mov 0x14061c,%edx 1169f9: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1169fc: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1169ff: 8b 55 1c mov 0x1c(%ebp),%edx 116a02: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116a04: e8 b7 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a09: 83 c4 10 add $0x10,%esp 116a0c: 31 c0 xor %eax,%eax 116a0e: e9 66 ff ff ff jmp 116979 116a13: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116a14: e8 a7 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 116a19: b8 05 00 00 00 mov $0x5,%eax 116a1e: e9 56 ff ff ff jmp 116979 =============================================================================== 00116a24 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116a24: 55 push %ebp 116a25: 89 e5 mov %esp,%ebp 116a27: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a2a: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a2d: 50 push %eax 116a2e: ff 75 08 pushl 0x8(%ebp) 116a31: 68 00 06 14 00 push $0x140600 116a36: e8 21 48 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116a3b: 83 c4 10 add $0x10,%esp 116a3e: 8b 55 f4 mov -0xc(%ebp),%edx 116a41: 85 d2 test %edx,%edx 116a43: 74 07 je 116a4c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a45: b8 04 00 00 00 mov $0x4,%eax } 116a4a: c9 leave 116a4b: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116a4c: 8b 48 20 mov 0x20(%eax),%ecx 116a4f: 85 c9 test %ecx,%ecx 116a51: 74 0d je 116a60 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a53: e8 68 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 116a58: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a5d: c9 leave 116a5e: c3 ret 116a5f: 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 ); 116a60: 83 ec 08 sub $0x8,%esp 116a63: 50 push %eax 116a64: 68 00 06 14 00 push $0x140600 116a69: 89 45 e4 mov %eax,-0x1c(%ebp) 116a6c: e8 7b 43 00 00 call 11adec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116a71: 58 pop %eax 116a72: 5a pop %edx 116a73: 8b 45 e4 mov -0x1c(%ebp),%eax 116a76: 50 push %eax 116a77: 68 00 06 14 00 push $0x140600 116a7c: e8 67 46 00 00 call 11b0e8 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116a81: e8 3a 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a86: 83 c4 10 add $0x10,%esp 116a89: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8b: c9 leave 116a8c: c3 ret =============================================================================== 00116a90 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116a90: 55 push %ebp 116a91: 89 e5 mov %esp,%ebp 116a93: 56 push %esi 116a94: 53 push %ebx 116a95: 83 ec 20 sub $0x20,%esp 116a98: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116a9b: 85 db test %ebx,%ebx 116a9d: 74 59 je 116af8 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a9f: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116aa0: 8d 45 f4 lea -0xc(%ebp),%eax 116aa3: 50 push %eax 116aa4: ff 75 08 pushl 0x8(%ebp) 116aa7: 68 00 06 14 00 push $0x140600 116aac: e8 ab 47 00 00 call 11b25c <_Objects_Get> 116ab1: 89 c6 mov %eax,%esi switch ( location ) { 116ab3: 83 c4 10 add $0x10,%esp 116ab6: 8b 45 f4 mov -0xc(%ebp),%eax 116ab9: 85 c0 test %eax,%eax 116abb: 75 2f jne 116aec */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116abd: 83 ec 0c sub $0xc,%esp 116ac0: 8d 46 24 lea 0x24(%esi),%eax 116ac3: 50 push %eax 116ac4: e8 33 2e 00 00 call 1198fc <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116ac9: 83 c4 10 add $0x10,%esp 116acc: 85 c0 test %eax,%eax 116ace: 74 34 je 116b04 the_partition->number_of_used_blocks += 1; 116ad0: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 116ad3: 89 45 e4 mov %eax,-0x1c(%ebp) 116ad6: e8 e5 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> *buffer = the_buffer; 116adb: 8b 45 e4 mov -0x1c(%ebp),%eax 116ade: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116ae0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ae2: 8d 65 f8 lea -0x8(%ebp),%esp 116ae5: 5b pop %ebx 116ae6: 5e pop %esi 116ae7: c9 leave 116ae8: c3 ret 116ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116aec: b8 04 00 00 00 mov $0x4,%eax } 116af1: 8d 65 f8 lea -0x8(%ebp),%esp 116af4: 5b pop %ebx 116af5: 5e pop %esi 116af6: c9 leave 116af7: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116af8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116afd: 8d 65 f8 lea -0x8(%ebp),%esp 116b00: 5b pop %ebx 116b01: 5e pop %esi 116b02: c9 leave 116b03: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116b04: e8 b7 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116b09: b8 0d 00 00 00 mov $0xd,%eax 116b0e: eb e1 jmp 116af1 =============================================================================== 00116b34 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116b34: 55 push %ebp 116b35: 89 e5 mov %esp,%ebp 116b37: 56 push %esi 116b38: 53 push %ebx 116b39: 83 ec 14 sub $0x14,%esp 116b3c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116b3f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116b42: 50 push %eax 116b43: ff 75 08 pushl 0x8(%ebp) 116b46: 68 00 06 14 00 push $0x140600 116b4b: e8 0c 47 00 00 call 11b25c <_Objects_Get> 116b50: 89 c3 mov %eax,%ebx switch ( location ) { 116b52: 83 c4 10 add $0x10,%esp 116b55: 8b 45 f4 mov -0xc(%ebp),%eax 116b58: 85 c0 test %eax,%eax 116b5a: 74 0c je 116b68 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116b5c: b8 04 00 00 00 mov $0x4,%eax } 116b61: 8d 65 f8 lea -0x8(%ebp),%esp 116b64: 5b pop %ebx 116b65: 5e pop %esi 116b66: c9 leave 116b67: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116b68: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116b6b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b6e: 39 c6 cmp %eax,%esi 116b70: 72 3a jb 116bac RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116b72: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b75: 39 d6 cmp %edx,%esi 116b77: 77 33 ja 116bac <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116b79: 89 f2 mov %esi,%edx 116b7b: 29 c2 sub %eax,%edx 116b7d: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116b7f: 31 d2 xor %edx,%edx 116b81: 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 ) && 116b84: 85 d2 test %edx,%edx 116b86: 75 24 jne 116bac RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116b88: 83 ec 08 sub $0x8,%esp 116b8b: 56 push %esi 116b8c: 8d 43 24 lea 0x24(%ebx),%eax 116b8f: 50 push %eax 116b90: e8 2b 2d 00 00 call 1198c0 <_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; 116b95: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116b98: e8 23 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116b9d: 83 c4 10 add $0x10,%esp 116ba0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ba2: 8d 65 f8 lea -0x8(%ebp),%esp 116ba5: 5b pop %ebx 116ba6: 5e pop %esi 116ba7: c9 leave 116ba8: c3 ret 116ba9: 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(); 116bac: e8 0f 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116bb1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116bb6: 8d 65 f8 lea -0x8(%ebp),%esp 116bb9: 5b pop %ebx 116bba: 5e pop %esi 116bbb: c9 leave 116bbc: c3 ret =============================================================================== 00115f58 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115f58: 55 push %ebp 115f59: 89 e5 mov %esp,%ebp 115f5b: 57 push %edi 115f5c: 56 push %esi 115f5d: 53 push %ebx 115f5e: 83 ec 1c sub $0x1c,%esp 115f61: 8b 5d 08 mov 0x8(%ebp),%ebx 115f64: 8b 55 0c mov 0xc(%ebp),%edx 115f67: 8b 7d 10 mov 0x10(%ebp),%edi 115f6a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115f6d: 85 db test %ebx,%ebx 115f6f: 74 1b je 115f8c return RTEMS_INVALID_NAME; if ( !id ) 115f71: 85 f6 test %esi,%esi 115f73: 74 08 je 115f7d * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115f75: 89 f8 mov %edi,%eax 115f77: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115f79: a8 03 test $0x3,%al 115f7b: 74 1f je 115f9c !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115f7d: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f82: 8d 65 f4 lea -0xc(%ebp),%esp 115f85: 5b pop %ebx 115f86: 5e pop %esi 115f87: 5f pop %edi 115f88: c9 leave 115f89: c3 ret 115f8a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115f8c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f91: 8d 65 f4 lea -0xc(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: 5f pop %edi 115f97: c9 leave 115f98: c3 ret 115f99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115f9c: a1 74 07 14 00 mov 0x140774,%eax 115fa1: 40 inc %eax 115fa2: a3 74 07 14 00 mov %eax,0x140774 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115fa7: 83 ec 0c sub $0xc,%esp 115faa: 68 c0 05 14 00 push $0x1405c0 115faf: 89 55 e4 mov %edx,-0x1c(%ebp) 115fb2: e8 b9 4d 00 00 call 11ad70 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115fb7: 83 c4 10 add $0x10,%esp 115fba: 85 c0 test %eax,%eax 115fbc: 8b 55 e4 mov -0x1c(%ebp),%edx 115fbf: 74 33 je 115ff4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115fc1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115fc4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115fc7: 8b 55 14 mov 0x14(%ebp),%edx 115fca: 4a dec %edx 115fcb: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115fce: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115fd1: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115fd4: 8b 0d dc 05 14 00 mov 0x1405dc,%ecx 115fda: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115fdd: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115fe0: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115fe2: e8 d9 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115fe7: 31 c0 xor %eax,%eax } 115fe9: 8d 65 f4 lea -0xc(%ebp),%esp 115fec: 5b pop %ebx 115fed: 5e pop %esi 115fee: 5f pop %edi 115fef: c9 leave 115ff0: c3 ret 115ff1: 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(); 115ff4: e8 c7 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ff9: b8 05 00 00 00 mov $0x5,%eax 115ffe: eb 82 jmp 115f82 =============================================================================== 00116000 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 116006: 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 ); 116009: 50 push %eax 11600a: ff 75 08 pushl 0x8(%ebp) 11600d: 68 c0 05 14 00 push $0x1405c0 116012: e8 45 52 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116017: 83 c4 10 add $0x10,%esp 11601a: 8b 4d f4 mov -0xc(%ebp),%ecx 11601d: 85 c9 test %ecx,%ecx 11601f: 75 2f jne 116050 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 116021: 83 ec 08 sub $0x8,%esp 116024: 50 push %eax 116025: 68 c0 05 14 00 push $0x1405c0 11602a: 89 45 e4 mov %eax,-0x1c(%ebp) 11602d: e8 ba 4d 00 00 call 11adec <_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 ); 116032: 58 pop %eax 116033: 5a pop %edx 116034: 8b 45 e4 mov -0x1c(%ebp),%eax 116037: 50 push %eax 116038: 68 c0 05 14 00 push $0x1405c0 11603d: e8 a6 50 00 00 call 11b0e8 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 116042: e8 79 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116047: 83 c4 10 add $0x10,%esp 11604a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11604c: c9 leave 11604d: c3 ret 11604e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116050: b8 04 00 00 00 mov $0x4,%eax } 116055: c9 leave 116056: c3 ret =============================================================================== 00116058 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116058: 55 push %ebp 116059: 89 e5 mov %esp,%ebp 11605b: 56 push %esi 11605c: 53 push %ebx 11605d: 83 ec 10 sub $0x10,%esp 116060: 8b 75 0c mov 0xc(%ebp),%esi 116063: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116066: 85 db test %ebx,%ebx 116068: 74 4e je 1160b8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 11606a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11606b: 8d 45 f4 lea -0xc(%ebp),%eax 11606e: 50 push %eax 11606f: ff 75 08 pushl 0x8(%ebp) 116072: 68 c0 05 14 00 push $0x1405c0 116077: e8 e0 51 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11607c: 83 c4 10 add $0x10,%esp 11607f: 8b 55 f4 mov -0xc(%ebp),%edx 116082: 85 d2 test %edx,%edx 116084: 74 0e je 116094 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116086: b8 04 00 00 00 mov $0x4,%eax } 11608b: 8d 65 f8 lea -0x8(%ebp),%esp 11608e: 5b pop %ebx 11608f: 5e pop %esi 116090: c9 leave 116091: c3 ret 116092: 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); 116094: 89 f2 mov %esi,%edx 116096: 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 ) 116099: 3b 50 18 cmp 0x18(%eax),%edx 11609c: 77 16 ja 1160b4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11609e: 03 50 10 add 0x10(%eax),%edx 1160a1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 1160a3: e8 18 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1160a8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160aa: 8d 65 f8 lea -0x8(%ebp),%esp 1160ad: 5b pop %ebx 1160ae: 5e pop %esi 1160af: c9 leave 1160b0: c3 ret 1160b1: 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; 1160b4: 89 33 mov %esi,(%ebx) 1160b6: eb eb jmp 1160a3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 1160b8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160bd: 8d 65 f8 lea -0x8(%ebp),%esp 1160c0: 5b pop %ebx 1160c1: 5e pop %esi 1160c2: c9 leave 1160c3: c3 ret =============================================================================== 001160e8 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1160e8: 55 push %ebp 1160e9: 89 e5 mov %esp,%ebp 1160eb: 56 push %esi 1160ec: 53 push %ebx 1160ed: 83 ec 10 sub $0x10,%esp 1160f0: 8b 75 0c mov 0xc(%ebp),%esi 1160f3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1160f6: 85 db test %ebx,%ebx 1160f8: 74 4e je 116148 1160fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 1160fb: 8d 45 f4 lea -0xc(%ebp),%eax 1160fe: 50 push %eax 1160ff: ff 75 08 pushl 0x8(%ebp) 116102: 68 c0 05 14 00 push $0x1405c0 116107: e8 50 51 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11610c: 83 c4 10 add $0x10,%esp 11610f: 8b 55 f4 mov -0xc(%ebp),%edx 116112: 85 d2 test %edx,%edx 116114: 74 0e je 116124 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116116: b8 04 00 00 00 mov $0x4,%eax } 11611b: 8d 65 f8 lea -0x8(%ebp),%esp 11611e: 5b pop %ebx 11611f: 5e pop %esi 116120: c9 leave 116121: c3 ret 116122: 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); 116124: 89 f2 mov %esi,%edx 116126: 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 ) 116129: 3b 50 18 cmp 0x18(%eax),%edx 11612c: 77 16 ja 116144 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11612e: 03 50 14 add 0x14(%eax),%edx 116131: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116133: e8 88 59 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116138: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11613a: 8d 65 f8 lea -0x8(%ebp),%esp 11613d: 5b pop %ebx 11613e: 5e pop %esi 11613f: c9 leave 116140: c3 ret 116141: 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; 116144: 89 33 mov %esi,(%ebx) 116146: eb eb jmp 116133 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 116148: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11614d: 8d 65 f8 lea -0x8(%ebp),%esp 116150: 5b pop %ebx 116151: 5e pop %esi 116152: c9 leave 116153: c3 ret =============================================================================== 00107c30 : void rtems_print_buffer( const unsigned char *buffer, int length ) { 107c30: 55 push %ebp 107c31: 89 e5 mov %esp,%ebp 107c33: 57 push %edi 107c34: 56 push %esi 107c35: 53 push %ebx 107c36: 81 ec 9c 00 00 00 sub $0x9c,%esp 107c3c: 8b 75 0c mov 0xc(%ebp),%esi int i, mod, max; if ( !length ) return; 107c3f: 85 f6 test %esi,%esi 107c41: 0f 84 00 01 00 00 je 107d47 mod = length % 16; 107c47: 89 f0 mov %esi,%eax 107c49: 25 0f 00 00 80 and $0x8000000f,%eax 107c4e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) 107c54: 0f 88 21 02 00 00 js 107e7b <== NEVER TAKEN 107c5a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 107c60: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) max = length - mod; 107c66: 29 c6 sub %eax,%esi 107c68: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp) for ( i=0 ; i 107c76: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp) 107c7d: 00 00 00 107c80: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107c86: 66 90 xchg %ax,%ax static inline void Dump_Line( const unsigned char *buffer, int length ); void rtems_print_buffer( 107c88: 8b 75 08 mov 0x8(%ebp),%esi 107c8b: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi { int i; char line_buffer[120]; line_buffer[0] = '\0'; 107c91: 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, "|" ); 107cb6: 31 c0 xor %eax,%eax 107cb8: b9 ff ff ff ff mov $0xffffffff,%ecx 107cbd: 89 df mov %ebx,%edi 107cbf: f2 ae repnz scas %es:(%edi),%al 107cc1: f7 d1 not %ecx 107cc3: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i 107ce3: b8 2e 00 00 00 mov $0x2e,%eax 107ce8: 50 push %eax 107ce9: 53 push %ebx 107cea: 68 9b 06 12 00 push $0x12069b 107cef: 53 push %ebx 107cf0: e8 df b9 00 00 call 1136d4 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" ); 107cfe: 31 c0 xor %eax,%eax 107d00: b9 ff ff ff ff mov $0xffffffff,%ecx 107d05: 89 df mov %ebx,%edi 107d07: f2 ae repnz scas %es:(%edi),%al 107d09: f7 d1 not %ecx 107d0b: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 107d0f: 66 c7 00 7c 0a movw $0xa7c,(%eax) 107d14: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 107d18: 83 ec 0c sub $0xc,%esp 107d1b: 53 push %ebx 107d1c: e8 63 1b 00 00 call 109884 mod = length % 16; max = length - mod; for ( i=0 ; i Dump_Line( &buffer[ i ], 16 ); if ( mod ) 107d3d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx 107d43: 85 c9 test %ecx,%ecx 107d45: 75 08 jne 107d4f Dump_Line( &buffer[ max ], mod ); } 107d47: 8d 65 f4 lea -0xc(%ebp),%esp 107d4a: 5b pop %ebx 107d4b: 5e pop %esi 107d4c: 5f pop %edi 107d4d: c9 leave 107d4e: c3 ret for ( i=0 ; i<== NEVER TAKEN 107d6d: 31 ff xor %edi,%edi 107d6f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx 107d75: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 107d78: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 107d7c: 50 push %eax 107d7d: 53 push %ebx 107d7e: 68 93 06 12 00 push $0x120693 107d83: 53 push %ebx 107d84: e8 4b b9 00 00 call 1136d4 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++ ) 107d95: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 107d9c: 0f 8f 02 01 00 00 jg 107ea4 <== NEVER TAKEN 107da2: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx strcat( line_buffer, " " ); 107da8: 31 c0 xor %eax,%eax 107daa: 66 90 xchg %ax,%ax 107dac: b9 ff ff ff ff mov $0xffffffff,%ecx 107db1: 89 df mov %ebx,%edi 107db3: f2 ae repnz scas %es:(%edi),%al 107db5: f7 d1 not %ecx 107db7: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1) 107dbe: 00 line_buffer[0] = '\0'; for( i=0 ; i strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107dc5: 31 c0 xor %eax,%eax 107dc7: b9 ff ff ff ff mov $0xffffffff,%ecx 107dcc: 89 df mov %ebx,%edi 107dce: f2 ae repnz scas %es:(%edi),%al 107dd0: f7 d1 not %ecx 107dd2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) for( i=0 ; i<== NEVER TAKEN 107de7: 31 ff xor %edi,%edi 107de9: 8d 76 00 lea 0x0(%esi),%esi sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 107dec: 0f b6 04 3e movzbl (%esi,%edi,1),%eax 107df0: 8b 15 f4 40 12 00 mov 0x1240f4,%edx 107df6: 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 107e03: b8 2e 00 00 00 mov $0x2e,%eax 107e08: 50 push %eax 107e09: 53 push %ebx 107e0a: 68 9b 06 12 00 push $0x12069b 107e0f: 53 push %ebx 107e10: e8 bf b8 00 00 call 1136d4 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++ ) 107e21: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp) 107e28: 7f 23 jg 107e4d <== NEVER TAKEN strcat( line_buffer, " " ); 107e2a: ba ff ff ff ff mov $0xffffffff,%edx 107e2f: 31 c0 xor %eax,%eax 107e31: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi 107e37: 90 nop 107e38: 89 d1 mov %edx,%ecx 107e3a: 89 df mov %ebx,%edi 107e3c: f2 ae repnz scas %es:(%edi),%al 107e3e: f7 d1 not %ecx 107e40: 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" ); 107e4d: 31 c0 xor %eax,%eax 107e4f: b9 ff ff ff ff mov $0xffffffff,%ecx 107e54: 89 df mov %ebx,%edi 107e56: f2 ae repnz scas %es:(%edi),%al 107e58: f7 d1 not %ecx 107e5a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax 107e5e: 66 c7 00 7c 0a movw $0xa7c,(%eax) 107e63: c6 40 02 00 movb $0x0,0x2(%eax) printk( line_buffer ); 107e67: 83 ec 0c sub $0xc,%esp 107e6a: 53 push %ebx 107e6b: e8 14 1a 00 00 call 109884 107e70: 83 c4 10 add $0x10,%esp for ( i=0 ; i<== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i<== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i<== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 107ea4: 31 c0 xor %eax,%eax <== NOT EXECUTED 107ea6: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 107ea9: 89 df mov %ebx,%edi <== NOT EXECUTED 107eab: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 107ead: f7 d1 not %ecx <== NOT EXECUTED 107eaf: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED 107eb6: e9 2c ff ff ff jmp 107de7 <== NOT EXECUTED =============================================================================== 00116bc0 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116bc0: 55 push %ebp 116bc1: 89 e5 mov %esp,%ebp 116bc3: 53 push %ebx 116bc4: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116bc7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116bca: 50 push %eax 116bcb: ff 75 08 pushl 0x8(%ebp) 116bce: 68 40 06 14 00 push $0x140640 116bd3: e8 84 46 00 00 call 11b25c <_Objects_Get> 116bd8: 89 c3 mov %eax,%ebx switch ( location ) { 116bda: 83 c4 10 add $0x10,%esp 116bdd: 8b 45 f4 mov -0xc(%ebp),%eax 116be0: 85 c0 test %eax,%eax 116be2: 74 0c je 116bf0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116be4: b8 04 00 00 00 mov $0x4,%eax } 116be9: 8b 5d fc mov -0x4(%ebp),%ebx 116bec: c9 leave 116bed: c3 ret 116bee: 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 ) ) { 116bf0: a1 18 0a 14 00 mov 0x140a18,%eax 116bf5: 39 43 40 cmp %eax,0x40(%ebx) 116bf8: 74 12 je 116c0c _Thread_Enable_dispatch(); 116bfa: e8 c1 4e 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116bff: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116c04: 8b 5d fc mov -0x4(%ebp),%ebx 116c07: c9 leave 116c08: c3 ret 116c09: 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 ); 116c0c: 83 ec 0c sub $0xc,%esp 116c0f: 8d 43 10 lea 0x10(%ebx),%eax 116c12: 50 push %eax 116c13: e8 84 62 00 00 call 11ce9c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116c18: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116c1f: e8 9c 4e 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116c24: 83 c4 10 add $0x10,%esp 116c27: 31 c0 xor %eax,%eax 116c29: eb be jmp 116be9 =============================================================================== 0010c3b8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c3b8: 55 push %ebp 10c3b9: 89 e5 mov %esp,%ebp 10c3bb: 57 push %edi 10c3bc: 56 push %esi 10c3bd: 53 push %ebx 10c3be: 83 ec 1c sub $0x1c,%esp 10c3c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c3c7: 85 db test %ebx,%ebx 10c3c9: 0f 84 a9 00 00 00 je 10c478 return RTEMS_INVALID_NAME; if ( !id ) 10c3cf: 85 f6 test %esi,%esi 10c3d1: 0f 84 c5 00 00 00 je 10c49c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3d7: a1 74 84 12 00 mov 0x128474,%eax 10c3dc: 40 inc %eax 10c3dd: a3 74 84 12 00 mov %eax,0x128474 * 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 ); 10c3e2: 83 ec 0c sub $0xc,%esp 10c3e5: 68 80 83 12 00 push $0x128380 10c3ea: e8 4d 1e 00 00 call 10e23c <_Objects_Allocate> 10c3ef: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c3f1: 83 c4 10 add $0x10,%esp 10c3f4: 85 c0 test %eax,%eax 10c3f6: 0f 84 8c 00 00 00 je 10c488 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c3fc: a1 18 87 12 00 mov 0x128718,%eax 10c401: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c404: 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; 10c40b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c412: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c419: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c420: 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 ); 10c427: 8d 42 54 lea 0x54(%edx),%eax 10c42a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c42d: b9 38 00 00 00 mov $0x38,%ecx 10c432: 31 c0 xor %eax,%eax 10c434: 8b 7d e4 mov -0x1c(%ebp),%edi 10c437: f3 aa rep stos %al,%es:(%edi) 10c439: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c440: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c447: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c44e: 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 ), 10c455: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c458: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c45b: 8b 0d 9c 83 12 00 mov 0x12839c,%ecx 10c461: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c464: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c467: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c469: e8 ae 2b 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c46e: 31 c0 xor %eax,%eax } 10c470: 8d 65 f4 lea -0xc(%ebp),%esp 10c473: 5b pop %ebx 10c474: 5e pop %esi 10c475: 5f pop %edi 10c476: c9 leave 10c477: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c478: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c47d: 8d 65 f4 lea -0xc(%ebp),%esp 10c480: 5b pop %ebx 10c481: 5e pop %esi 10c482: 5f pop %edi 10c483: c9 leave 10c484: c3 ret 10c485: 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(); 10c488: e8 8f 2b 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c48d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c492: 8d 65 f4 lea -0xc(%ebp),%esp 10c495: 5b pop %ebx 10c496: 5e pop %esi 10c497: 5f pop %edi 10c498: c9 leave 10c499: c3 ret 10c49a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c49c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c4a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c4a4: 5b pop %ebx 10c4a5: 5e pop %esi 10c4a6: 5f pop %edi 10c4a7: c9 leave 10c4a8: c3 ret =============================================================================== 00111d7c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111d7c: 55 push %ebp 111d7d: 89 e5 mov %esp,%ebp 111d7f: 53 push %ebx 111d80: 83 ec 24 sub $0x24,%esp 111d83: 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 ) 111d86: 85 db test %ebx,%ebx 111d88: 0f 84 92 00 00 00 je 111e20 111d8e: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111d8f: 8d 45 f4 lea -0xc(%ebp),%eax 111d92: 50 push %eax 111d93: ff 75 08 pushl 0x8(%ebp) 111d96: 68 80 83 12 00 push $0x128380 111d9b: e8 18 ca ff ff call 10e7b8 <_Objects_Get> switch ( location ) { 111da0: 83 c4 10 add $0x10,%esp 111da3: 8b 4d f4 mov -0xc(%ebp),%ecx 111da6: 85 c9 test %ecx,%ecx 111da8: 74 0a je 111db4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111daa: b8 04 00 00 00 mov $0x4,%eax } 111daf: 8b 5d fc mov -0x4(%ebp),%ebx 111db2: c9 leave 111db3: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111db4: 8b 50 40 mov 0x40(%eax),%edx 111db7: 8b 52 08 mov 0x8(%edx),%edx 111dba: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111dbc: 8b 50 38 mov 0x38(%eax),%edx 111dbf: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111dc2: 85 d2 test %edx,%edx 111dc4: 75 2a jne 111df0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111dc6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111dcd: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111dd4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111ddb: 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(); 111de2: e8 35 d2 ff ff call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111de7: 31 c0 xor %eax,%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 } else { /* * Grab the current status. */ valid_status = 111df0: 52 push %edx _Rate_monotonic_Get_status( 111df1: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111df4: 52 push %edx _Rate_monotonic_Get_status( 111df5: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111df8: 52 push %edx 111df9: 50 push %eax 111dfa: e8 d1 a6 ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111dff: 83 c4 10 add $0x10,%esp 111e02: 84 c0 test %al,%al 111e04: 74 26 je 111e2c _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111e06: 8b 45 e4 mov -0x1c(%ebp),%eax 111e09: 8b 55 e8 mov -0x18(%ebp),%edx 111e0c: 89 43 08 mov %eax,0x8(%ebx) 111e0f: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111e12: 8b 45 ec mov -0x14(%ebp),%eax 111e15: 8b 55 f0 mov -0x10(%ebp),%edx 111e18: 89 43 10 mov %eax,0x10(%ebx) 111e1b: 89 53 14 mov %edx,0x14(%ebx) 111e1e: eb c2 jmp 111de2 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111e20: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e25: 8b 5d fc mov -0x4(%ebp),%ebx 111e28: c9 leave 111e29: c3 ret 111e2a: 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(); 111e2c: e8 eb d1 ff ff call 10f01c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111e31: b8 0b 00 00 00 mov $0xb,%eax 111e36: e9 74 ff ff ff jmp 111daf =============================================================================== 0010c6cc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c6cc: 55 push %ebp 10c6cd: 89 e5 mov %esp,%ebp 10c6cf: 57 push %edi 10c6d0: 56 push %esi 10c6d1: 53 push %ebx 10c6d2: 83 ec 30 sub $0x30,%esp 10c6d5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d8: 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 ); 10c6db: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c6de: 50 push %eax 10c6df: 53 push %ebx 10c6e0: 68 80 83 12 00 push $0x128380 10c6e5: e8 ce 20 00 00 call 10e7b8 <_Objects_Get> switch ( location ) { 10c6ea: 83 c4 10 add $0x10,%esp 10c6ed: 8b 7d e4 mov -0x1c(%ebp),%edi 10c6f0: 85 ff test %edi,%edi 10c6f2: 74 10 je 10c704 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c6f4: b8 04 00 00 00 mov $0x4,%eax } 10c6f9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6fc: 5b pop %ebx 10c6fd: 5e pop %esi 10c6fe: 5f pop %edi 10c6ff: c9 leave 10c700: c3 ret 10c701: 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 ) ) { 10c704: 8b 15 18 87 12 00 mov 0x128718,%edx 10c70a: 39 50 40 cmp %edx,0x40(%eax) 10c70d: 74 15 je 10c724 _Thread_Enable_dispatch(); 10c70f: e8 08 29 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c714: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c719: 8d 65 f4 lea -0xc(%ebp),%esp 10c71c: 5b pop %ebx 10c71d: 5e pop %esi 10c71e: 5f pop %edi 10c71f: c9 leave 10c720: c3 ret 10c721: 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 ) { 10c724: 85 f6 test %esi,%esi 10c726: 0f 84 b0 00 00 00 je 10c7dc } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10c72c: 9c pushf 10c72d: fa cli 10c72e: 5f pop %edi switch ( the_period->state ) { 10c72f: 8b 50 38 mov 0x38(%eax),%edx 10c732: 83 fa 02 cmp $0x2,%edx 10c735: 0f 84 c1 00 00 00 je 10c7fc 10c73b: 83 fa 04 cmp $0x4,%edx 10c73e: 74 5c je 10c79c 10c740: 85 d2 test %edx,%edx 10c742: 75 b0 jne 10c6f4 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10c744: 57 push %edi 10c745: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c746: 83 ec 0c sub $0xc,%esp 10c749: 50 push %eax 10c74a: 89 45 d4 mov %eax,-0x2c(%ebp) 10c74d: e8 16 fe ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c752: 8b 45 d4 mov -0x2c(%ebp),%eax 10c755: 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; 10c75c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c763: c7 40 2c 30 cb 10 00 movl $0x10cb30,0x2c(%eax) the_watchdog->id = id; 10c76a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c76d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c774: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c777: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c77a: 5b pop %ebx 10c77b: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c77c: 83 c0 10 add $0x10,%eax 10c77f: 50 push %eax 10c780: 68 44 85 12 00 push $0x128544 10c785: e8 52 39 00 00 call 1100dc <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c78a: e8 8d 28 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c78f: 83 c4 10 add $0x10,%esp 10c792: 31 c0 xor %eax,%eax 10c794: e9 60 ff ff ff jmp 10c6f9 10c799: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c79c: 83 ec 0c sub $0xc,%esp 10c79f: 50 push %eax 10c7a0: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7a3: e8 34 fe ff ff call 10c5dc <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c7a8: 57 push %edi 10c7a9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c7aa: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7ad: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c7b4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c7b7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c7ba: 5b pop %ebx 10c7bb: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c7bc: 83 c0 10 add $0x10,%eax 10c7bf: 50 push %eax 10c7c0: 68 44 85 12 00 push $0x128544 10c7c5: e8 12 39 00 00 call 1100dc <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c7ca: e8 4d 28 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c7cf: 83 c4 10 add $0x10,%esp 10c7d2: b8 06 00 00 00 mov $0x6,%eax 10c7d7: e9 1d ff ff ff jmp 10c6f9 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c7dc: 8b 40 38 mov 0x38(%eax),%eax 10c7df: 83 f8 04 cmp $0x4,%eax 10c7e2: 77 78 ja 10c85c <== NEVER TAKEN 10c7e4: 8b 04 85 48 22 12 00 mov 0x122248(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c7eb: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7ee: e8 29 28 00 00 call 10f01c <_Thread_Enable_dispatch> return( return_value ); 10c7f3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7f6: e9 fe fe ff ff jmp 10c6f9 10c7fb: 90 nop <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c7fc: 83 ec 0c sub $0xc,%esp 10c7ff: 50 push %eax 10c800: 89 45 d4 mov %eax,-0x2c(%ebp) 10c803: e8 d4 fd ff ff call 10c5dc <_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; 10c808: 8b 45 d4 mov -0x2c(%ebp),%eax 10c80b: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c812: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c815: 57 push %edi 10c816: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c817: 8b 15 18 87 12 00 mov 0x128718,%edx 10c81d: 8b 48 08 mov 0x8(%eax),%ecx 10c820: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c823: 5f pop %edi 10c824: 59 pop %ecx 10c825: 68 00 40 00 00 push $0x4000 10c82a: 52 push %edx 10c82b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c82e: e8 9d 30 00 00 call 10f8d0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c833: 9c pushf 10c834: fa cli 10c835: 59 pop %ecx local_state = the_period->state; 10c836: 8b 45 d4 mov -0x2c(%ebp),%eax 10c839: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c83c: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c843: 51 push %ecx 10c844: 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 ) 10c845: 83 c4 10 add $0x10,%esp 10c848: 83 fa 03 cmp $0x3,%edx 10c84b: 74 13 je 10c860 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c84d: e8 ca 27 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c852: 31 c0 xor %eax,%eax 10c854: e9 a0 fe ff ff jmp 10c6f9 10c859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c85c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c85e: eb 8b jmp 10c7eb <== NOT EXECUTED /* * 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 ); 10c860: 83 ec 08 sub $0x8,%esp 10c863: 68 00 40 00 00 push $0x4000 10c868: ff 35 18 87 12 00 pushl 0x128718 10c86e: e8 e5 23 00 00 call 10ec58 <_Thread_Clear_state> 10c873: 83 c4 10 add $0x10,%esp 10c876: eb d5 jmp 10c84d =============================================================================== 0010c878 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c878: 55 push %ebp 10c879: 89 e5 mov %esp,%ebp 10c87b: 57 push %edi 10c87c: 56 push %esi 10c87d: 53 push %ebx 10c87e: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c884: 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 ) 10c887: 8b 7d 0c mov 0xc(%ebp),%edi 10c88a: 85 ff test %edi,%edi 10c88c: 0f 84 be 00 00 00 je 10c950 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c892: 83 ec 08 sub $0x8,%esp 10c895: 68 5c 22 12 00 push $0x12225c 10c89a: 56 push %esi 10c89b: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c89e: 59 pop %ecx 10c89f: 5b pop %ebx 10c8a0: 68 94 22 12 00 push $0x122294 10c8a5: 56 push %esi 10c8a6: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c8a9: 58 pop %eax 10c8aa: 5a pop %edx 10c8ab: 68 b8 22 12 00 push $0x1222b8 10c8b0: 56 push %esi 10c8b1: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c8b4: 5b pop %ebx 10c8b5: 5f pop %edi 10c8b6: 68 dc 22 12 00 push $0x1222dc 10c8bb: 56 push %esi 10c8bc: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c8bf: 5a pop %edx 10c8c0: 59 pop %ecx 10c8c1: 68 28 23 12 00 push $0x122328 10c8c6: 56 push %esi 10c8c7: 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 ; 10c8ca: 8b 1d 88 83 12 00 mov 0x128388,%ebx 10c8d0: 83 c4 10 add $0x10,%esp 10c8d3: 3b 1d 8c 83 12 00 cmp 0x12838c,%ebx 10c8d9: 77 75 ja 10c950 <== NEVER TAKEN 10c8db: 8d 7d 88 lea -0x78(%ebp),%edi 10c8de: eb 09 jmp 10c8e9 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c8e0: 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 ; 10c8e1: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10c8e7: 72 67 jb 10c950 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c8e9: 83 ec 08 sub $0x8,%esp 10c8ec: 57 push %edi 10c8ed: 53 push %ebx 10c8ee: e8 dd 53 00 00 call 111cd0 if ( status != RTEMS_SUCCESSFUL ) 10c8f3: 83 c4 10 add $0x10,%esp 10c8f6: 85 c0 test %eax,%eax 10c8f8: 75 e6 jne 10c8e0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c8fa: 83 ec 08 sub $0x8,%esp 10c8fd: 8d 45 c0 lea -0x40(%ebp),%eax 10c900: 50 push %eax 10c901: 53 push %ebx 10c902: e8 75 54 00 00 call 111d7c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c907: 83 c4 0c add $0xc,%esp 10c90a: 8d 55 e3 lea -0x1d(%ebp),%edx 10c90d: 52 push %edx 10c90e: 6a 05 push $0x5 10c910: ff 75 c0 pushl -0x40(%ebp) 10c913: e8 b4 02 00 00 call 10cbcc /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c918: 59 pop %ecx 10c919: 58 pop %eax 10c91a: ff 75 8c pushl -0x74(%ebp) 10c91d: ff 75 88 pushl -0x78(%ebp) 10c920: 8d 45 e3 lea -0x1d(%ebp),%eax 10c923: 50 push %eax 10c924: 53 push %ebx 10c925: 68 7a 22 12 00 push $0x12227a 10c92a: 56 push %esi 10c92b: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c92e: 8b 45 88 mov -0x78(%ebp),%eax 10c931: 83 c4 20 add $0x20,%esp 10c934: 85 c0 test %eax,%eax 10c936: 75 20 jne 10c958 (*print)( context, "\n" ); 10c938: 83 ec 08 sub $0x8,%esp 10c93b: 68 f1 03 12 00 push $0x1203f1 10c940: 56 push %esi 10c941: ff 55 0c call *0xc(%ebp) continue; 10c944: 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++ ) { 10c947: 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 ; 10c948: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10c94e: 73 99 jae 10c8e9 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c950: 8d 65 f4 lea -0xc(%ebp),%esp 10c953: 5b pop %ebx 10c954: 5e pop %esi 10c955: 5f pop %edi 10c956: c9 leave 10c957: 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 ); 10c958: 52 push %edx 10c959: 8d 55 d8 lea -0x28(%ebp),%edx 10c95c: 52 push %edx 10c95d: 50 push %eax 10c95e: 8d 45 a0 lea -0x60(%ebp),%eax 10c961: 50 push %eax 10c962: e8 d5 33 00 00 call 10fd3c <_Timespec_Divide_by_integer> (*print)( context, 10c967: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c96c: 8b 45 dc mov -0x24(%ebp),%eax 10c96f: f7 e9 imul %ecx 10c971: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c977: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c97d: c1 f8 06 sar $0x6,%eax 10c980: 8b 55 dc mov -0x24(%ebp),%edx 10c983: c1 fa 1f sar $0x1f,%edx 10c986: 29 d0 sub %edx,%eax 10c988: 50 push %eax 10c989: ff 75 d8 pushl -0x28(%ebp) 10c98c: 8b 45 9c mov -0x64(%ebp),%eax 10c98f: f7 e9 imul %ecx 10c991: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c997: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c99d: c1 f8 06 sar $0x6,%eax 10c9a0: 8b 55 9c mov -0x64(%ebp),%edx 10c9a3: c1 fa 1f sar $0x1f,%edx 10c9a6: 29 d0 sub %edx,%eax 10c9a8: 50 push %eax 10c9a9: ff 75 98 pushl -0x68(%ebp) 10c9ac: 8b 45 94 mov -0x6c(%ebp),%eax 10c9af: f7 e9 imul %ecx 10c9b1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c9b7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9bd: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9c3: c1 f8 06 sar $0x6,%eax 10c9c6: 8b 55 94 mov -0x6c(%ebp),%edx 10c9c9: c1 fa 1f sar $0x1f,%edx 10c9cc: 29 d0 sub %edx,%eax 10c9ce: 50 push %eax 10c9cf: ff 75 90 pushl -0x70(%ebp) 10c9d2: 68 74 23 12 00 push $0x122374 10c9d7: 56 push %esi 10c9d8: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c9db: 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); 10c9de: 83 c4 2c add $0x2c,%esp 10c9e1: 8d 55 d8 lea -0x28(%ebp),%edx 10c9e4: 52 push %edx 10c9e5: ff 75 88 pushl -0x78(%ebp) 10c9e8: 8d 45 b8 lea -0x48(%ebp),%eax 10c9eb: 50 push %eax 10c9ec: e8 4b 33 00 00 call 10fd3c <_Timespec_Divide_by_integer> (*print)( context, 10c9f1: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c9f4: 8b 45 dc mov -0x24(%ebp),%eax 10c9f7: f7 e9 imul %ecx 10c9f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca05: c1 f8 06 sar $0x6,%eax 10ca08: 8b 55 dc mov -0x24(%ebp),%edx 10ca0b: c1 fa 1f sar $0x1f,%edx 10ca0e: 29 d0 sub %edx,%eax 10ca10: 50 push %eax 10ca11: ff 75 d8 pushl -0x28(%ebp) 10ca14: 8b 45 b4 mov -0x4c(%ebp),%eax 10ca17: f7 e9 imul %ecx 10ca19: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca1f: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca25: c1 f8 06 sar $0x6,%eax 10ca28: 8b 55 b4 mov -0x4c(%ebp),%edx 10ca2b: c1 fa 1f sar $0x1f,%edx 10ca2e: 29 d0 sub %edx,%eax 10ca30: 50 push %eax 10ca31: ff 75 b0 pushl -0x50(%ebp) 10ca34: 8b 45 ac mov -0x54(%ebp),%eax 10ca37: f7 e9 imul %ecx 10ca39: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10ca3f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca45: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca4b: c1 f8 06 sar $0x6,%eax 10ca4e: 8b 55 ac mov -0x54(%ebp),%edx 10ca51: c1 fa 1f sar $0x1f,%edx 10ca54: 29 d0 sub %edx,%eax 10ca56: 50 push %eax 10ca57: ff 75 a8 pushl -0x58(%ebp) 10ca5a: 68 94 23 12 00 push $0x122394 10ca5f: 56 push %esi 10ca60: ff 55 0c call *0xc(%ebp) 10ca63: 83 c4 30 add $0x30,%esp 10ca66: e9 75 fe ff ff jmp 10c8e0 =============================================================================== 0010ca84 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10ca84: 55 push %ebp 10ca85: 89 e5 mov %esp,%ebp 10ca87: 53 push %ebx 10ca88: 83 ec 04 sub $0x4,%esp 10ca8b: a1 74 84 12 00 mov 0x128474,%eax 10ca90: 40 inc %eax 10ca91: a3 74 84 12 00 mov %eax,0x128474 /* * 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 ; 10ca96: 8b 1d 88 83 12 00 mov 0x128388,%ebx 10ca9c: 3b 1d 8c 83 12 00 cmp 0x12838c,%ebx 10caa2: 77 15 ja 10cab9 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10caa4: 83 ec 0c sub $0xc,%esp 10caa7: 53 push %ebx 10caa8: e8 17 00 00 00 call 10cac4 * 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++ ) { 10caad: 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 ; 10caae: 83 c4 10 add $0x10,%esp 10cab1: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10cab7: 73 eb jae 10caa4 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10cab9: 8b 5d fc mov -0x4(%ebp),%ebx 10cabc: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10cabd: e9 5a 25 00 00 jmp 10f01c <_Thread_Enable_dispatch> =============================================================================== 0010cac4 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10cac4: 55 push %ebp 10cac5: 89 e5 mov %esp,%ebp 10cac7: 57 push %edi 10cac8: 53 push %ebx 10cac9: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10cacc: 8d 45 f4 lea -0xc(%ebp),%eax 10cacf: 50 push %eax 10cad0: ff 75 08 pushl 0x8(%ebp) 10cad3: 68 80 83 12 00 push $0x128380 10cad8: e8 db 1c 00 00 call 10e7b8 <_Objects_Get> 10cadd: 89 c2 mov %eax,%edx switch ( location ) { 10cadf: 83 c4 10 add $0x10,%esp 10cae2: 8b 45 f4 mov -0xc(%ebp),%eax 10cae5: 85 c0 test %eax,%eax 10cae7: 75 3b jne 10cb24 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10cae9: 8d 5a 54 lea 0x54(%edx),%ebx 10caec: b9 38 00 00 00 mov $0x38,%ecx 10caf1: 31 c0 xor %eax,%eax 10caf3: 89 df mov %ebx,%edi 10caf5: f3 aa rep stos %al,%es:(%edi) 10caf7: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10cafe: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10cb05: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10cb0c: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10cb13: e8 04 25 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cb18: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb1a: 8d 65 f8 lea -0x8(%ebp),%esp 10cb1d: 5b pop %ebx 10cb1e: 5f pop %edi 10cb1f: c9 leave 10cb20: c3 ret 10cb21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cb24: b8 04 00 00 00 mov $0x4,%eax } 10cb29: 8d 65 f8 lea -0x8(%ebp),%esp 10cb2c: 5b pop %ebx 10cb2d: 5f pop %edi 10cb2e: c9 leave 10cb2f: c3 ret =============================================================================== 00117360 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117360: 55 push %ebp 117361: 89 e5 mov %esp,%ebp 117363: 57 push %edi 117364: 56 push %esi 117365: 53 push %ebx 117366: 83 ec 1c sub $0x1c,%esp 117369: 8b 75 08 mov 0x8(%ebp),%esi 11736c: 8b 5d 0c mov 0xc(%ebp),%ebx 11736f: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117372: 85 f6 test %esi,%esi 117374: 0f 84 92 00 00 00 je 11740c return RTEMS_INVALID_NAME; if ( !starting_address ) 11737a: 85 db test %ebx,%ebx 11737c: 74 09 je 117387 return RTEMS_INVALID_ADDRESS; if ( !id ) 11737e: 85 ff test %edi,%edi 117380: 74 05 je 117387 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117382: f6 c3 03 test $0x3,%bl 117385: 74 0d je 117394 return RTEMS_INVALID_ADDRESS; 117387: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11738c: 8d 65 f4 lea -0xc(%ebp),%esp 11738f: 5b pop %ebx 117390: 5e pop %esi 117391: 5f pop %edi 117392: c9 leave 117393: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117394: 83 ec 0c sub $0xc,%esp 117397: ff 35 24 08 14 00 pushl 0x140824 11739d: e8 a6 24 00 00 call 119848 <_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 ); 1173a2: c7 04 24 80 06 14 00 movl $0x140680,(%esp) 1173a9: e8 c2 39 00 00 call 11ad70 <_Objects_Allocate> 1173ae: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 1173b0: 83 c4 10 add $0x10,%esp 1173b3: 85 c0 test %eax,%eax 1173b5: 74 65 je 11741c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1173b7: ff 75 14 pushl 0x14(%ebp) 1173ba: ff 75 10 pushl 0x10(%ebp) 1173bd: 53 push %ebx 1173be: 8d 40 68 lea 0x68(%eax),%eax 1173c1: 50 push %eax 1173c2: 89 55 e4 mov %edx,-0x1c(%ebp) 1173c5: e8 be 34 00 00 call 11a888 <_Heap_Initialize> 1173ca: 8b 55 e4 mov -0x1c(%ebp),%edx 1173cd: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1173d0: 83 c4 10 add $0x10,%esp 1173d3: 85 c0 test %eax,%eax 1173d5: 75 4d jne 117424 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173d7: 83 ec 08 sub $0x8,%esp 1173da: 52 push %edx 1173db: 68 80 06 14 00 push $0x140680 1173e0: e8 03 3d 00 00 call 11b0e8 <_Objects_Free> 1173e5: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 1173e8: b8 08 00 00 00 mov $0x8,%eax *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 1173ed: 83 ec 0c sub $0xc,%esp 1173f0: ff 35 24 08 14 00 pushl 0x140824 1173f6: 89 45 e4 mov %eax,-0x1c(%ebp) 1173f9: e8 92 24 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1173fe: 83 c4 10 add $0x10,%esp 117401: 8b 45 e4 mov -0x1c(%ebp),%eax } 117404: 8d 65 f4 lea -0xc(%ebp),%esp 117407: 5b pop %ebx 117408: 5e pop %esi 117409: 5f pop %edi 11740a: c9 leave 11740b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11740c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117411: 8d 65 f4 lea -0xc(%ebp),%esp 117414: 5b pop %ebx 117415: 5e pop %esi 117416: 5f pop %edi 117417: c9 leave 117418: c3 ret 117419: 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; 11741c: b8 05 00 00 00 mov $0x5,%eax 117421: eb ca jmp 1173ed 117423: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117424: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117427: 8b 45 10 mov 0x10(%ebp),%eax 11742a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 11742d: 8b 45 14 mov 0x14(%ebp),%eax 117430: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117433: 8b 45 18 mov 0x18(%ebp),%eax 117436: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117439: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117440: 6a 06 push $0x6 117442: 6a 40 push $0x40 117444: a8 04 test $0x4,%al 117446: 0f 95 c0 setne %al 117449: 0f b6 c0 movzbl %al,%eax 11744c: 50 push %eax 11744d: 8d 42 10 lea 0x10(%edx),%eax 117450: 50 push %eax 117451: 89 55 e4 mov %edx,-0x1c(%ebp) 117454: e8 b3 4d 00 00 call 11c20c <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 117459: 8b 55 e4 mov -0x1c(%ebp),%edx 11745c: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 11745f: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117462: 8b 0d 9c 06 14 00 mov 0x14069c,%ecx 117468: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11746b: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 11746e: 89 07 mov %eax,(%edi) 117470: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 117473: 31 c0 xor %eax,%eax 117475: e9 73 ff ff ff jmp 1173ed =============================================================================== 0011747c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11747c: 55 push %ebp 11747d: 89 e5 mov %esp,%ebp 11747f: 53 push %ebx 117480: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117483: ff 35 24 08 14 00 pushl 0x140824 117489: e8 ba 23 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11748e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117491: 8d 45 f4 lea -0xc(%ebp),%eax 117494: 50 push %eax 117495: ff 75 08 pushl 0x8(%ebp) 117498: 68 80 06 14 00 push $0x140680 11749d: e8 7e 3d 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 1174a2: 83 c4 10 add $0x10,%esp 1174a5: 8b 5d f4 mov -0xc(%ebp),%ebx 1174a8: 85 db test %ebx,%ebx 1174aa: 74 1c je 1174c8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1174ac: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1174b1: 83 ec 0c sub $0xc,%esp 1174b4: ff 35 24 08 14 00 pushl 0x140824 1174ba: e8 d1 23 00 00 call 119890 <_API_Mutex_Unlock> return return_status; } 1174bf: 89 d8 mov %ebx,%eax 1174c1: 8b 5d fc mov -0x4(%ebp),%ebx 1174c4: c9 leave 1174c5: c3 ret 1174c6: 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 ) 1174c8: 8b 48 64 mov 0x64(%eax),%ecx 1174cb: 85 c9 test %ecx,%ecx 1174cd: 74 09 je 1174d8 return_status = RTEMS_RESOURCE_IN_USE; 1174cf: bb 0c 00 00 00 mov $0xc,%ebx 1174d4: eb db jmp 1174b1 1174d6: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 1174d8: 83 ec 08 sub $0x8,%esp 1174db: 50 push %eax 1174dc: 68 80 06 14 00 push $0x140680 1174e1: 89 45 e4 mov %eax,-0x1c(%ebp) 1174e4: e8 03 39 00 00 call 11adec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1174e9: 58 pop %eax 1174ea: 5a pop %edx 1174eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1174ee: 50 push %eax 1174ef: 68 80 06 14 00 push $0x140680 1174f4: e8 ef 3b 00 00 call 11b0e8 <_Objects_Free> 1174f9: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1174fc: 31 db xor %ebx,%ebx 1174fe: eb b1 jmp 1174b1 =============================================================================== 00117500 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117500: 55 push %ebp 117501: 89 e5 mov %esp,%ebp 117503: 56 push %esi 117504: 53 push %ebx 117505: 83 ec 10 sub $0x10,%esp 117508: 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 ) 11750b: 85 db test %ebx,%ebx 11750d: 74 75 je 117584 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11750f: 83 ec 0c sub $0xc,%esp 117512: ff 35 24 08 14 00 pushl 0x140824 117518: e8 2b 23 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11751d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117520: 8d 45 f0 lea -0x10(%ebp),%eax 117523: 50 push %eax 117524: ff 75 08 pushl 0x8(%ebp) 117527: 68 80 06 14 00 push $0x140680 11752c: e8 ef 3c 00 00 call 11b220 <_Objects_Get_no_protection> 117531: 89 c6 mov %eax,%esi switch ( location ) { 117533: 83 c4 10 add $0x10,%esp 117536: 8b 45 f0 mov -0x10(%ebp),%eax 117539: 85 c0 test %eax,%eax 11753b: 74 1f je 11755c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11753d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117542: 83 ec 0c sub $0xc,%esp 117545: ff 35 24 08 14 00 pushl 0x140824 11754b: e8 40 23 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117550: 83 c4 10 add $0x10,%esp } 117553: 89 d8 mov %ebx,%eax 117555: 8d 65 f8 lea -0x8(%ebp),%esp 117558: 5b pop %ebx 117559: 5e pop %esi 11755a: c9 leave 11755b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 11755c: 8d 45 f4 lea -0xc(%ebp),%eax 11755f: 50 push %eax 117560: ff 75 10 pushl 0x10(%ebp) 117563: 53 push %ebx 117564: 8d 46 68 lea 0x68(%esi),%eax 117567: 50 push %eax 117568: e8 27 2e 00 00 call 11a394 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 11756d: 83 c4 10 add $0x10,%esp 117570: 84 c0 test %al,%al 117572: 74 20 je 117594 the_region->length += amount_extended; 117574: 8b 45 f4 mov -0xc(%ebp),%eax 117577: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11757a: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 11757d: 31 db xor %ebx,%ebx 11757f: eb c1 jmp 117542 117581: 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; 117584: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117589: 89 d8 mov %ebx,%eax 11758b: 8d 65 f8 lea -0x8(%ebp),%esp 11758e: 5b pop %ebx 11758f: 5e pop %esi 117590: c9 leave 117591: c3 ret 117592: 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; 117594: bb 09 00 00 00 mov $0x9,%ebx 117599: eb a7 jmp 117542 =============================================================================== 0011759c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 11759c: 55 push %ebp 11759d: 89 e5 mov %esp,%ebp 11759f: 53 push %ebx 1175a0: 83 ec 14 sub $0x14,%esp 1175a3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1175a6: 85 db test %ebx,%ebx 1175a8: 74 76 je 117620 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1175aa: 83 ec 0c sub $0xc,%esp 1175ad: ff 35 24 08 14 00 pushl 0x140824 1175b3: e8 90 22 00 00 call 119848 <_API_Mutex_Lock> 1175b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175bb: 8d 45 f4 lea -0xc(%ebp),%eax 1175be: 50 push %eax 1175bf: ff 75 08 pushl 0x8(%ebp) 1175c2: 68 80 06 14 00 push $0x140680 1175c7: e8 54 3c 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 1175cc: 83 c4 10 add $0x10,%esp 1175cf: 8b 55 f4 mov -0xc(%ebp),%edx 1175d2: 85 d2 test %edx,%edx 1175d4: 74 1e je 1175f4 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175d6: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1175db: 83 ec 0c sub $0xc,%esp 1175de: ff 35 24 08 14 00 pushl 0x140824 1175e4: e8 a7 22 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp } 1175ec: 89 d8 mov %ebx,%eax 1175ee: 8b 5d fc mov -0x4(%ebp),%ebx 1175f1: c9 leave 1175f2: c3 ret 1175f3: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1175f4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1175fb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117602: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117609: 83 ec 08 sub $0x8,%esp 11760c: 53 push %ebx 11760d: 83 c0 68 add $0x68,%eax 117610: 50 push %eax 117611: e8 5a 31 00 00 call 11a770 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 117616: 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; 117619: 31 db xor %ebx,%ebx break; 11761b: eb be jmp 1175db 11761d: 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; 117620: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117625: 89 d8 mov %ebx,%eax 117627: 8b 5d fc mov -0x4(%ebp),%ebx 11762a: c9 leave 11762b: c3 ret =============================================================================== 0011762c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 11762c: 55 push %ebp 11762d: 89 e5 mov %esp,%ebp 11762f: 53 push %ebx 117630: 83 ec 14 sub $0x14,%esp 117633: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117636: 85 db test %ebx,%ebx 117638: 74 5e je 117698 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11763a: 83 ec 0c sub $0xc,%esp 11763d: ff 35 24 08 14 00 pushl 0x140824 117643: e8 00 22 00 00 call 119848 <_API_Mutex_Lock> 117648: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11764b: 8d 45 f4 lea -0xc(%ebp),%eax 11764e: 50 push %eax 11764f: ff 75 08 pushl 0x8(%ebp) 117652: 68 80 06 14 00 push $0x140680 117657: e8 c4 3b 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 11765c: 83 c4 10 add $0x10,%esp 11765f: 8b 55 f4 mov -0xc(%ebp),%edx 117662: 85 d2 test %edx,%edx 117664: 74 1e je 117684 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117666: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11766b: 83 ec 0c sub $0xc,%esp 11766e: ff 35 24 08 14 00 pushl 0x140824 117674: e8 17 22 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117679: 83 c4 10 add $0x10,%esp } 11767c: 89 d8 mov %ebx,%eax 11767e: 8b 5d fc mov -0x4(%ebp),%ebx 117681: c9 leave 117682: c3 ret 117683: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117684: 83 ec 08 sub $0x8,%esp 117687: 53 push %ebx 117688: 83 c0 68 add $0x68,%eax 11768b: 50 push %eax 11768c: e8 3f 31 00 00 call 11a7d0 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117691: 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; 117694: 31 db xor %ebx,%ebx break; 117696: eb d3 jmp 11766b Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 117698: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11769d: 89 d8 mov %ebx,%eax 11769f: 8b 5d fc mov -0x4(%ebp),%ebx 1176a2: c9 leave 1176a3: c3 ret =============================================================================== 001176a4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1176a4: 55 push %ebp 1176a5: 89 e5 mov %esp,%ebp 1176a7: 57 push %edi 1176a8: 56 push %esi 1176a9: 53 push %ebx 1176aa: 83 ec 2c sub $0x2c,%esp 1176ad: 8b 75 0c mov 0xc(%ebp),%esi 1176b0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1176b3: 85 db test %ebx,%ebx 1176b5: 0f 84 a1 00 00 00 je 11775c return RTEMS_INVALID_ADDRESS; *segment = NULL; 1176bb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1176c1: 85 f6 test %esi,%esi 1176c3: 75 0f jne 1176d4 return RTEMS_INVALID_SIZE; 1176c5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1176ca: 8d 65 f4 lea -0xc(%ebp),%esp 1176cd: 5b pop %ebx 1176ce: 5e pop %esi 1176cf: 5f pop %edi 1176d0: c9 leave 1176d1: c3 ret 1176d2: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1176d4: 83 ec 0c sub $0xc,%esp 1176d7: ff 35 24 08 14 00 pushl 0x140824 1176dd: e8 66 21 00 00 call 119848 <_API_Mutex_Lock> executing = _Thread_Executing; 1176e2: a1 18 0a 14 00 mov 0x140a18,%eax 1176e7: 89 45 d4 mov %eax,-0x2c(%ebp) 1176ea: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1176f0: 50 push %eax 1176f1: ff 75 08 pushl 0x8(%ebp) 1176f4: 68 80 06 14 00 push $0x140680 1176f9: e8 22 3b 00 00 call 11b220 <_Objects_Get_no_protection> 1176fe: 89 c7 mov %eax,%edi switch ( location ) { 117700: 83 c4 10 add $0x10,%esp 117703: 8b 45 e4 mov -0x1c(%ebp),%eax 117706: 85 c0 test %eax,%eax 117708: 75 2a jne 117734 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 11770a: 3b 77 5c cmp 0x5c(%edi),%esi 11770d: 76 2d jbe 11773c return_status = RTEMS_INVALID_SIZE; 11770f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117714: 83 ec 0c sub $0xc,%esp 117717: ff 35 24 08 14 00 pushl 0x140824 11771d: 89 45 d0 mov %eax,-0x30(%ebp) 117720: e8 6b 21 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117725: 83 c4 10 add $0x10,%esp 117728: 8b 45 d0 mov -0x30(%ebp),%eax } 11772b: 8d 65 f4 lea -0xc(%ebp),%esp 11772e: 5b pop %ebx 11772f: 5e pop %esi 117730: 5f pop %edi 117731: c9 leave 117732: c3 ret 117733: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117734: b8 04 00 00 00 mov $0x4,%eax 117739: eb d9 jmp 117714 11773b: 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 ); 11773c: 6a 00 push $0x0 11773e: 6a 00 push $0x0 117740: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117741: 8d 47 68 lea 0x68(%edi),%eax 117744: 50 push %eax 117745: e8 82 2a 00 00 call 11a1cc <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11774a: 83 c4 10 add $0x10,%esp 11774d: 85 c0 test %eax,%eax 11774f: 74 17 je 117768 the_region->number_of_used_blocks += 1; 117751: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117754: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 117756: 31 c0 xor %eax,%eax 117758: eb ba jmp 117714 11775a: 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; 11775c: b8 09 00 00 00 mov $0x9,%eax 117761: e9 64 ff ff ff jmp 1176ca 117766: 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 ) ) { 117768: f6 45 10 01 testb $0x1,0x10(%ebp) 11776c: 74 07 je 117775 return_status = RTEMS_UNSATISFIED; 11776e: b8 0d 00 00 00 mov $0xd,%eax 117773: eb 9f jmp 117714 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117775: a1 74 07 14 00 mov 0x140774,%eax 11777a: 40 inc %eax 11777b: a3 74 07 14 00 mov %eax,0x140774 * 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(); 117780: 83 ec 0c sub $0xc,%esp 117783: ff 35 24 08 14 00 pushl 0x140824 117789: e8 02 21 00 00 call 119890 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 11778e: 8d 47 10 lea 0x10(%edi),%eax 117791: 8b 55 d4 mov -0x2c(%ebp),%edx 117794: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117797: 8b 4d 08 mov 0x8(%ebp),%ecx 11779a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 11779d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1177a0: 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; 1177a3: 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 ); 1177aa: 83 c4 0c add $0xc,%esp 1177ad: 68 d0 c2 11 00 push $0x11c2d0 1177b2: ff 75 14 pushl 0x14(%ebp) 1177b5: 50 push %eax 1177b6: e8 c5 47 00 00 call 11bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1177bb: e8 00 43 00 00 call 11bac0 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1177c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1177c3: 8b 42 34 mov 0x34(%edx),%eax 1177c6: 83 c4 10 add $0x10,%esp 1177c9: e9 fc fe ff ff jmp 1176ca =============================================================================== 001177d0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 1177d0: 55 push %ebp 1177d1: 89 e5 mov %esp,%ebp 1177d3: 56 push %esi 1177d4: 53 push %ebx 1177d5: 83 ec 20 sub $0x20,%esp 1177d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1177db: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1177de: 85 db test %ebx,%ebx 1177e0: 74 72 je 117854 return RTEMS_INVALID_ADDRESS; if ( !size ) 1177e2: 85 f6 test %esi,%esi 1177e4: 74 6e je 117854 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1177e6: 83 ec 0c sub $0xc,%esp 1177e9: ff 35 24 08 14 00 pushl 0x140824 1177ef: e8 54 20 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1177f4: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1177f7: 8d 45 f4 lea -0xc(%ebp),%eax 1177fa: 50 push %eax 1177fb: ff 75 08 pushl 0x8(%ebp) 1177fe: 68 80 06 14 00 push $0x140680 117803: e8 18 3a 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 117808: 83 c4 10 add $0x10,%esp 11780b: 8b 55 f4 mov -0xc(%ebp),%edx 11780e: 85 d2 test %edx,%edx 117810: 74 2a je 11783c void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 117812: 31 c0 xor %eax,%eax 117814: 83 fa 01 cmp $0x1,%edx 117817: 0f 94 c0 sete %al 11781a: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11781d: 83 ec 0c sub $0xc,%esp 117820: ff 35 24 08 14 00 pushl 0x140824 117826: 89 45 e4 mov %eax,-0x1c(%ebp) 117829: e8 62 20 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 11782e: 83 c4 10 add $0x10,%esp 117831: 8b 45 e4 mov -0x1c(%ebp),%eax } 117834: 8d 65 f8 lea -0x8(%ebp),%esp 117837: 5b pop %ebx 117838: 5e pop %esi 117839: c9 leave 11783a: c3 ret 11783b: 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 ) ) 11783c: 52 push %edx 11783d: 56 push %esi 11783e: 53 push %ebx 11783f: 83 c0 68 add $0x68,%eax 117842: 50 push %eax 117843: e8 44 34 00 00 call 11ac8c <_Heap_Size_of_alloc_area> 117848: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11784b: 3c 01 cmp $0x1,%al 11784d: 19 c0 sbb %eax,%eax 11784f: 83 e0 09 and $0x9,%eax 117852: eb c9 jmp 11781d if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117854: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117859: 8d 65 f8 lea -0x8(%ebp),%esp 11785c: 5b pop %ebx 11785d: 5e pop %esi 11785e: c9 leave 11785f: c3 ret =============================================================================== 00117884 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117884: 55 push %ebp 117885: 89 e5 mov %esp,%ebp 117887: 56 push %esi 117888: 53 push %ebx 117889: 83 ec 20 sub $0x20,%esp 11788c: 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 ) 11788f: 85 db test %ebx,%ebx 117891: 0f 84 89 00 00 00 je 117920 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117897: 83 ec 0c sub $0xc,%esp 11789a: ff 35 24 08 14 00 pushl 0x140824 1178a0: e8 a3 1f 00 00 call 119848 <_API_Mutex_Lock> 1178a5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1178a8: 8d 45 f0 lea -0x10(%ebp),%eax 1178ab: 50 push %eax 1178ac: ff 75 08 pushl 0x8(%ebp) 1178af: 68 80 06 14 00 push $0x140680 1178b4: e8 67 39 00 00 call 11b220 <_Objects_Get_no_protection> 1178b9: 89 c6 mov %eax,%esi switch ( location ) { 1178bb: 83 c4 10 add $0x10,%esp 1178be: 8b 45 f0 mov -0x10(%ebp),%eax 1178c1: 85 c0 test %eax,%eax 1178c3: 74 1f je 1178e4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1178c5: 83 ec 0c sub $0xc,%esp 1178c8: ff 35 24 08 14 00 pushl 0x140824 1178ce: e8 bd 1f 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1178d3: 83 c4 10 add $0x10,%esp 1178d6: b8 04 00 00 00 mov $0x4,%eax } 1178db: 8d 65 f8 lea -0x8(%ebp),%esp 1178de: 5b pop %ebx 1178df: 5e pop %esi 1178e0: c9 leave 1178e1: c3 ret 1178e2: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1178e4: 83 ec 0c sub $0xc,%esp 1178e7: 8d 45 f4 lea -0xc(%ebp),%eax 1178ea: 50 push %eax 1178eb: 8d 45 ec lea -0x14(%ebp),%eax 1178ee: 50 push %eax 1178ef: ff 75 10 pushl 0x10(%ebp) 1178f2: ff 75 0c pushl 0xc(%ebp) 1178f5: 8d 46 68 lea 0x68(%esi),%eax 1178f8: 50 push %eax 1178f9: e8 86 32 00 00 call 11ab84 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1178fe: 8b 55 ec mov -0x14(%ebp),%edx 117901: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117903: 83 c4 20 add $0x20,%esp 117906: 85 c0 test %eax,%eax 117908: 75 22 jne 11792c _Region_Process_queue( the_region ); /* unlocks allocator */ 11790a: 83 ec 0c sub $0xc,%esp 11790d: 56 push %esi 11790e: e8 99 70 00 00 call 11e9ac <_Region_Process_queue> 117913: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 117916: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117918: 8d 65 f8 lea -0x8(%ebp),%esp 11791b: 5b pop %ebx 11791c: 5e pop %esi 11791d: c9 leave 11791e: c3 ret 11791f: 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; 117920: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117925: 8d 65 f8 lea -0x8(%ebp),%esp 117928: 5b pop %ebx 117929: 5e pop %esi 11792a: c9 leave 11792b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11792c: 83 ec 0c sub $0xc,%esp 11792f: ff 35 24 08 14 00 pushl 0x140824 117935: 89 45 e4 mov %eax,-0x1c(%ebp) 117938: e8 53 1f 00 00 call 119890 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 11793d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117940: 8b 45 e4 mov -0x1c(%ebp),%eax 117943: 48 dec %eax 117944: 0f 94 c0 sete %al 117947: 0f b6 c0 movzbl %al,%eax 11794a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117951: 8d 65 f8 lea -0x8(%ebp),%esp 117954: 5b pop %ebx 117955: 5e pop %esi 117956: c9 leave 117957: c3 ret =============================================================================== 00117958 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117958: 55 push %ebp 117959: 89 e5 mov %esp,%ebp 11795b: 53 push %ebx 11795c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11795f: ff 35 24 08 14 00 pushl 0x140824 117965: e8 de 1e 00 00 call 119848 <_API_Mutex_Lock> 11796a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11796d: 8d 45 f4 lea -0xc(%ebp),%eax 117970: 50 push %eax 117971: ff 75 08 pushl 0x8(%ebp) 117974: 68 80 06 14 00 push $0x140680 117979: e8 a2 38 00 00 call 11b220 <_Objects_Get_no_protection> 11797e: 89 c3 mov %eax,%ebx switch ( location ) { 117980: 83 c4 10 add $0x10,%esp 117983: 8b 45 f4 mov -0xc(%ebp),%eax 117986: 85 c0 test %eax,%eax 117988: 75 1e jne 1179a8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11798a: 83 ec 08 sub $0x8,%esp 11798d: ff 75 0c pushl 0xc(%ebp) 117990: 8d 43 68 lea 0x68(%ebx),%eax 117993: 50 push %eax 117994: e8 87 2c 00 00 call 11a620 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 117999: 83 c4 10 add $0x10,%esp 11799c: 84 c0 test %al,%al 11799e: 75 28 jne 1179c8 return_status = RTEMS_INVALID_ADDRESS; 1179a0: bb 09 00 00 00 mov $0x9,%ebx 1179a5: eb 06 jmp 1179ad 1179a7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1179a8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1179ad: 83 ec 0c sub $0xc,%esp 1179b0: ff 35 24 08 14 00 pushl 0x140824 1179b6: e8 d5 1e 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1179bb: 83 c4 10 add $0x10,%esp } 1179be: 89 d8 mov %ebx,%eax 1179c0: 8b 5d fc mov -0x4(%ebp),%ebx 1179c3: c9 leave 1179c4: c3 ret 1179c5: 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; 1179c8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1179cb: 83 ec 0c sub $0xc,%esp 1179ce: 53 push %ebx 1179cf: e8 d8 6f 00 00 call 11e9ac <_Region_Process_queue> return RTEMS_SUCCESSFUL; 1179d4: 83 c4 10 add $0x10,%esp 1179d7: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1179d9: 89 d8 mov %ebx,%eax 1179db: 8b 5d fc mov -0x4(%ebp),%ebx 1179de: c9 leave 1179df: c3 ret =============================================================================== 0010b4bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b4bc: 55 push %ebp 10b4bd: 89 e5 mov %esp,%ebp 10b4bf: 57 push %edi 10b4c0: 56 push %esi 10b4c1: 53 push %ebx 10b4c2: 83 ec 3c sub $0x3c,%esp 10b4c5: 8b 75 08 mov 0x8(%ebp),%esi 10b4c8: 8b 5d 10 mov 0x10(%ebp),%ebx 10b4cb: 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 ) ) 10b4ce: 85 f6 test %esi,%esi 10b4d0: 74 4a je 10b51c return RTEMS_INVALID_NAME; if ( !id ) 10b4d2: 85 ff test %edi,%edi 10b4d4: 0f 84 f6 00 00 00 je 10b5d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b4da: 89 da mov %ebx,%edx 10b4dc: 81 e2 c0 00 00 00 and $0xc0,%edx 10b4e2: 74 48 je 10b52c */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b4e4: 89 d8 mov %ebx,%eax 10b4e6: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4e9: 83 f8 10 cmp $0x10,%eax 10b4ec: 74 0e je 10b4fc } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b4ee: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b4f3: 8d 65 f4 lea -0xc(%ebp),%esp 10b4f6: 5b pop %ebx 10b4f7: 5e pop %esi 10b4f8: 5f pop %edi 10b4f9: c9 leave 10b4fa: c3 ret 10b4fb: 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 ) && 10b4fc: f6 c3 04 test $0x4,%bl 10b4ff: 74 ed je 10b4ee _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b501: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b507: 74 e5 je 10b4ee 10b509: 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 ) ) 10b50e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b512: 76 1f jbe 10b533 return RTEMS_INVALID_NUMBER; 10b514: b8 0a 00 00 00 mov $0xa,%eax 10b519: eb d8 jmp 10b4f3 10b51b: 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; 10b51c: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b521: 8d 65 f4 lea -0xc(%ebp),%esp 10b524: 5b pop %ebx 10b525: 5e pop %esi 10b526: 5f pop %edi 10b527: c9 leave 10b528: c3 ret 10b529: 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 ) ) 10b52c: 89 d9 mov %ebx,%ecx 10b52e: 83 e1 30 and $0x30,%ecx 10b531: 75 db jne 10b50e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b533: a1 d4 63 12 00 mov 0x1263d4,%eax 10b538: 40 inc %eax 10b539: a3 d4 63 12 00 mov %eax,0x1263d4 * 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 ); 10b53e: 83 ec 0c sub $0xc,%esp 10b541: 68 20 63 12 00 push $0x126320 10b546: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b549: e8 da 13 00 00 call 10c928 <_Objects_Allocate> 10b54e: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b550: 83 c4 10 add $0x10,%esp 10b553: 85 c0 test %eax,%eax 10b555: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b558: 0f 84 ba 00 00 00 je 10b618 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b55e: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b561: 85 c9 test %ecx,%ecx 10b563: 74 77 je 10b5dc /* * 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; 10b565: 31 c0 xor %eax,%eax 10b567: f6 c3 04 test $0x4,%bl 10b56a: 0f 95 c0 setne %al 10b56d: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b570: 83 f9 10 cmp $0x10,%ecx 10b573: 0f 84 ae 00 00 00 je 10b627 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; 10b579: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b580: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b584: 50 push %eax 10b585: 31 c0 xor %eax,%eax 10b587: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b58b: 0f 94 c0 sete %al 10b58e: 50 push %eax 10b58f: 8d 45 d0 lea -0x30(%ebp),%eax 10b592: 50 push %eax 10b593: 8d 42 14 lea 0x14(%edx),%eax 10b596: 50 push %eax 10b597: 89 55 c4 mov %edx,-0x3c(%ebp) 10b59a: e8 85 0b 00 00 call 10c124 <_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 ) { 10b59f: 83 c4 10 add $0x10,%esp 10b5a2: 83 f8 06 cmp $0x6,%eax 10b5a5: 8b 55 c4 mov -0x3c(%ebp),%edx 10b5a8: 0f 84 a9 00 00 00 je 10b657 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b5ae: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b5b1: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b5b4: 8b 0d 3c 63 12 00 mov 0x12633c,%ecx 10b5ba: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b5bd: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b5c0: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b5c2: e8 75 20 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b5c7: 31 c0 xor %eax,%eax 10b5c9: e9 25 ff ff ff jmp 10b4f3 10b5ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b5d0: b8 09 00 00 00 mov $0x9,%eax 10b5d5: e9 19 ff ff ff jmp 10b4f3 10b5da: 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; 10b5dc: 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; 10b5e3: 31 c0 xor %eax,%eax 10b5e5: f6 c3 04 test $0x4,%bl 10b5e8: 0f 95 c0 setne %al 10b5eb: 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; 10b5ee: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b5f5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b5fc: 51 push %ecx 10b5fd: ff 75 0c pushl 0xc(%ebp) 10b600: 8d 45 e0 lea -0x20(%ebp),%eax 10b603: 50 push %eax 10b604: 8d 42 14 lea 0x14(%edx),%eax 10b607: 50 push %eax 10b608: 89 55 c4 mov %edx,-0x3c(%ebp) 10b60b: e8 a4 0d 00 00 call 10c3b4 <_CORE_semaphore_Initialize> 10b610: 83 c4 10 add $0x10,%esp 10b613: 8b 55 c4 mov -0x3c(%ebp),%edx 10b616: eb 96 jmp 10b5ae _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b618: e8 1f 20 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b61d: b8 05 00 00 00 mov $0x5,%eax 10b622: e9 cc fe ff ff jmp 10b4f3 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; 10b627: 8b 45 14 mov 0x14(%ebp),%eax 10b62a: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b62d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b634: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b638: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b63c: 0f 85 42 ff ff ff jne 10b584 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b642: f6 c3 40 test $0x40,%bl 10b645: 74 30 je 10b677 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b647: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b64e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b652: e9 2d ff ff ff jmp 10b584 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b657: 83 ec 08 sub $0x8,%esp 10b65a: 52 push %edx 10b65b: 68 20 63 12 00 push $0x126320 10b660: e8 3b 16 00 00 call 10cca0 <_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(); 10b665: e8 d2 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b66a: 83 c4 10 add $0x10,%esp 10b66d: b8 13 00 00 00 mov $0x13,%eax 10b672: e9 7c fe ff ff jmp 10b4f3 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 ) ) { 10b677: 81 e3 80 00 00 00 and $0x80,%ebx 10b67d: 0f 84 01 ff ff ff je 10b584 <== NEVER TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b683: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b68a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b68e: e9 f1 fe ff ff jmp 10b584 =============================================================================== 0010b694 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b694: 55 push %ebp 10b695: 89 e5 mov %esp,%ebp 10b697: 53 push %ebx 10b698: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b69b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b69e: 50 push %eax 10b69f: ff 75 08 pushl 0x8(%ebp) 10b6a2: 68 20 63 12 00 push $0x126320 10b6a7: e8 2c 17 00 00 call 10cdd8 <_Objects_Get> 10b6ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b6ae: 83 c4 10 add $0x10,%esp 10b6b1: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6b4: 85 c9 test %ecx,%ecx 10b6b6: 74 0c je 10b6c4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6b8: b8 04 00 00 00 mov $0x4,%eax } 10b6bd: 8b 5d fc mov -0x4(%ebp),%ebx 10b6c0: c9 leave 10b6c1: c3 ret 10b6c2: 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); 10b6c4: 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) ) { 10b6c7: 83 e0 30 and $0x30,%eax 10b6ca: 74 58 je 10b724 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b6cc: 8b 53 64 mov 0x64(%ebx),%edx 10b6cf: 85 d2 test %edx,%edx 10b6d1: 75 15 jne 10b6e8 10b6d3: 83 f8 20 cmp $0x20,%eax 10b6d6: 74 10 je 10b6e8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b6d8: e8 5f 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b6dd: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6e2: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e5: c9 leave 10b6e6: c3 ret 10b6e7: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b6e8: 50 push %eax 10b6e9: 6a 04 push $0x4 10b6eb: 6a 00 push $0x0 10b6ed: 8d 43 14 lea 0x14(%ebx),%eax 10b6f0: 50 push %eax 10b6f1: e8 22 0a 00 00 call 10c118 <_CORE_mutex_Flush> 10b6f6: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b6f9: 83 ec 08 sub $0x8,%esp 10b6fc: 53 push %ebx 10b6fd: 68 20 63 12 00 push $0x126320 10b702: e8 9d 12 00 00 call 10c9a4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b707: 58 pop %eax 10b708: 5a pop %edx 10b709: 53 push %ebx 10b70a: 68 20 63 12 00 push $0x126320 10b70f: e8 8c 15 00 00 call 10cca0 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b714: e8 23 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b719: 83 c4 10 add $0x10,%esp 10b71c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b71e: 8b 5d fc mov -0x4(%ebp),%ebx 10b721: c9 leave 10b722: c3 ret 10b723: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b724: 51 push %ecx 10b725: 6a 02 push $0x2 10b727: 6a 00 push $0x0 10b729: 8d 43 14 lea 0x14(%ebx),%eax 10b72c: 50 push %eax 10b72d: e8 76 0c 00 00 call 10c3a8 <_CORE_semaphore_Flush> 10b732: 83 c4 10 add $0x10,%esp 10b735: eb c2 jmp 10b6f9 =============================================================================== 0010b738 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b738: 55 push %ebp 10b739: 89 e5 mov %esp,%ebp 10b73b: 57 push %edi 10b73c: 56 push %esi 10b73d: 53 push %ebx 10b73e: 83 ec 1c sub $0x1c,%esp 10b741: 8b 5d 08 mov 0x8(%ebp),%ebx 10b744: 8b 75 0c mov 0xc(%ebp),%esi 10b747: 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 ); 10b74a: 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 ); 10b74d: 50 push %eax 10b74e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b751: 50 push %eax 10b752: 53 push %ebx 10b753: 68 20 63 12 00 push $0x126320 10b758: e8 23 16 00 00 call 10cd80 <_Objects_Get_isr_disable> switch ( location ) { 10b75d: 83 c4 10 add $0x10,%esp 10b760: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b763: 85 c9 test %ecx,%ecx 10b765: 74 0d je 10b774 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b767: b8 04 00 00 00 mov $0x4,%eax } 10b76c: 8d 65 f4 lea -0xc(%ebp),%esp 10b76f: 5b pop %ebx 10b770: 5e pop %esi 10b771: 5f pop %edi 10b772: c9 leave 10b773: 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) ) { 10b774: f6 40 10 30 testb $0x30,0x10(%eax) 10b778: 74 36 je 10b7b0 _CORE_mutex_Seize( 10b77a: 83 ec 0c sub $0xc,%esp 10b77d: ff 75 e0 pushl -0x20(%ebp) 10b780: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b781: 83 e6 01 and $0x1,%esi 10b784: 83 f6 01 xor $0x1,%esi 10b787: 56 push %esi 10b788: 53 push %ebx 10b789: 83 c0 14 add $0x14,%eax 10b78c: 50 push %eax 10b78d: e8 8a 0a 00 00 call 10c21c <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b792: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b795: a1 78 66 12 00 mov 0x126678,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b79a: ff 70 34 pushl 0x34(%eax) 10b79d: e8 12 01 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b7a2: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a8: 5b pop %ebx 10b7a9: 5e pop %esi 10b7aa: 5f pop %edi 10b7ab: c9 leave 10b7ac: c3 ret 10b7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b7b0: 8b 15 78 66 12 00 mov 0x126678,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b7b6: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b7bd: 8b 48 5c mov 0x5c(%eax),%ecx 10b7c0: 85 c9 test %ecx,%ecx 10b7c2: 75 2c jne 10b7f0 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b7c4: 83 e6 01 and $0x1,%esi 10b7c7: 74 33 je 10b7fc _ISR_Enable( *level_p ); 10b7c9: ff 75 e0 pushl -0x20(%ebp) 10b7cc: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b7cd: 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( 10b7d4: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b7d7: a1 78 66 12 00 mov 0x126678,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b7dc: ff 70 34 pushl 0x34(%eax) 10b7df: e8 e0 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b7e4: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7e7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ea: 5b pop %ebx 10b7eb: 5e pop %esi 10b7ec: 5f pop %edi 10b7ed: c9 leave 10b7ee: c3 ret 10b7ef: 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; 10b7f0: 49 dec %ecx 10b7f1: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b7f4: ff 75 e0 pushl -0x20(%ebp) 10b7f7: 9d popf 10b7f8: eb da jmp 10b7d4 10b7fa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b7fc: 8b 0d d4 63 12 00 mov 0x1263d4,%ecx 10b802: 41 inc %ecx 10b803: 89 0d d4 63 12 00 mov %ecx,0x1263d4 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; 10b809: 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; 10b810: 83 c0 14 add $0x14,%eax 10b813: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b816: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b819: ff 75 e0 pushl -0x20(%ebp) 10b81c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b81d: 52 push %edx 10b81e: 68 4c de 10 00 push $0x10de4c 10b823: 57 push %edi 10b824: 50 push %eax 10b825: e8 d2 22 00 00 call 10dafc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b82a: e8 0d 1e 00 00 call 10d63c <_Thread_Enable_dispatch> 10b82f: 83 c4 10 add $0x10,%esp 10b832: eb a0 jmp 10b7d4 =============================================================================== 0010b834 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b834: 55 push %ebp 10b835: 89 e5 mov %esp,%ebp 10b837: 53 push %ebx 10b838: 83 ec 18 sub $0x18,%esp 10b83b: 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 ); 10b83e: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b841: 50 push %eax 10b842: 53 push %ebx 10b843: 68 20 63 12 00 push $0x126320 10b848: e8 8b 15 00 00 call 10cdd8 <_Objects_Get> switch ( location ) { 10b84d: 83 c4 10 add $0x10,%esp 10b850: 8b 55 f4 mov -0xc(%ebp),%edx 10b853: 85 d2 test %edx,%edx 10b855: 74 0d je 10b864 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b857: b8 04 00 00 00 mov $0x4,%eax } 10b85c: 8b 5d fc mov -0x4(%ebp),%ebx 10b85f: c9 leave 10b860: c3 ret 10b861: 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) ) { 10b864: f6 40 10 30 testb $0x30,0x10(%eax) 10b868: 75 26 jne 10b890 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b86a: 52 push %edx 10b86b: 6a 00 push $0x0 10b86d: 53 push %ebx 10b86e: 83 c0 14 add $0x14,%eax 10b871: 50 push %eax 10b872: e8 7d 0b 00 00 call 10c3f4 <_CORE_semaphore_Surrender> 10b877: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b879: e8 be 1d 00 00 call 10d63c <_Thread_Enable_dispatch> return 10b87e: 89 1c 24 mov %ebx,(%esp) 10b881: e8 3e 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b886: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b889: 8b 5d fc mov -0x4(%ebp),%ebx 10b88c: c9 leave 10b88d: c3 ret 10b88e: 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( 10b890: 51 push %ecx 10b891: 6a 00 push $0x0 10b893: 53 push %ebx 10b894: 83 c0 14 add $0x14,%eax 10b897: 50 push %eax 10b898: e8 1f 0a 00 00 call 10c2bc <_CORE_mutex_Surrender> 10b89d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b89f: e8 98 1d 00 00 call 10d63c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b8a4: 89 1c 24 mov %ebx,(%esp) 10b8a7: e8 08 00 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8af: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b2: c9 leave 10b8b3: c3 ret =============================================================================== 0010c850 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 83 ec 08 sub $0x8,%esp 10c856: 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 ]; 10c859: a1 38 8d 12 00 mov 0x128d38,%eax 10c85e: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c864: 8b 0d 94 8a 12 00 mov 0x128a94,%ecx 10c86a: 41 inc %ecx 10c86b: 89 0d 94 8a 12 00 mov %ecx,0x128a94 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c871: 85 d2 test %edx,%edx 10c873: 74 13 je 10c888 asr->mode_set = mode_set; 10c875: 8b 4d 0c mov 0xc(%ebp),%ecx 10c878: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c87b: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c87e: e8 15 21 00 00 call 10e998 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c883: 31 c0 xor %eax,%eax 10c885: c9 leave 10c886: c3 ret 10c887: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c888: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c88c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c893: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c89a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c8a1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c8a8: 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(); 10c8af: e8 e4 20 00 00 call 10e998 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c8b4: 31 c0 xor %eax,%eax 10c8b6: c9 leave 10c8b7: c3 ret =============================================================================== 00117e78 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117e78: 55 push %ebp 117e79: 89 e5 mov %esp,%ebp 117e7b: 53 push %ebx 117e7c: 83 ec 14 sub $0x14,%esp 117e7f: 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 ) 117e82: 85 db test %ebx,%ebx 117e84: 75 0a jne 117e90 return RTEMS_INVALID_NUMBER; 117e86: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e8b: 8b 5d fc mov -0x4(%ebp),%ebx 117e8e: c9 leave 117e8f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117e90: 83 ec 08 sub $0x8,%esp 117e93: 8d 45 f4 lea -0xc(%ebp),%eax 117e96: 50 push %eax 117e97: ff 75 08 pushl 0x8(%ebp) 117e9a: e8 45 3c 00 00 call 11bae4 <_Thread_Get> switch ( location ) { 117e9f: 83 c4 10 add $0x10,%esp 117ea2: 8b 55 f4 mov -0xc(%ebp),%edx 117ea5: 85 d2 test %edx,%edx 117ea7: 74 0b je 117eb4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117ea9: b8 04 00 00 00 mov $0x4,%eax } 117eae: 8b 5d fc mov -0x4(%ebp),%ebx 117eb1: c9 leave 117eb2: c3 ret 117eb3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117eb4: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117eba: 8b 4a 0c mov 0xc(%edx),%ecx 117ebd: 85 c9 test %ecx,%ecx 117ebf: 74 3f je 117f00 if ( asr->is_enabled ) { 117ec1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117ec5: 74 25 je 117eec rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117ec7: 9c pushf 117ec8: fa cli 117ec9: 59 pop %ecx *signal_set |= signals; 117eca: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117ecd: 51 push %ecx 117ece: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117ecf: 8b 15 14 0a 14 00 mov 0x140a14,%edx 117ed5: 85 d2 test %edx,%edx 117ed7: 74 1b je 117ef4 117ed9: 3b 05 18 0a 14 00 cmp 0x140a18,%eax 117edf: 75 13 jne 117ef4 <== NEVER TAKEN _Context_Switch_necessary = true; 117ee1: c6 05 24 0a 14 00 01 movb $0x1,0x140a24 117ee8: eb 0a jmp 117ef4 117eea: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117eec: 9c pushf 117eed: fa cli 117eee: 58 pop %eax *signal_set |= signals; 117eef: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117ef2: 50 push %eax 117ef3: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117ef4: e8 c7 3b 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117ef9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117efb: 8b 5d fc mov -0x4(%ebp),%ebx 117efe: c9 leave 117eff: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117f00: e8 bb 3b 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117f05: b8 0b 00 00 00 mov $0xb,%eax 117f0a: e9 7c ff ff ff jmp 117e8b =============================================================================== 001077f0 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 1077f0: 55 push %ebp 1077f1: 89 e5 mov %esp,%ebp 1077f3: 57 push %edi 1077f4: 56 push %esi 1077f5: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 1077f8: 8b 70 08 mov 0x8(%eax),%esi 1077fb: 85 f6 test %esi,%esi 1077fd: 74 15 je 107814 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 1077ff: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 107805: 83 c7 08 add $0x8,%edi 107808: be 40 67 12 00 mov $0x126740,%esi 10780d: b9 04 00 00 00 mov $0x4,%ecx 107812: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107814: 5e pop %esi 107815: 5f pop %edi 107816: c9 leave 107817: c3 ret =============================================================================== 001077cc : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 1077cc: 55 push %ebp 1077cd: 89 e5 mov %esp,%ebp 1077cf: 57 push %edi 1077d0: 8b 45 0c mov 0xc(%ebp),%eax Stack_check_Initialize(); if (the_thread) 1077d3: 85 c0 test %eax,%eax 1077d5: 74 12 je 1077e9 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 1077d7: 8b 88 c0 00 00 00 mov 0xc0(%eax),%ecx 1077dd: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 1077e3: b0 a5 mov $0xa5,%al 1077e5: 89 d7 mov %edx,%edi 1077e7: f3 aa rep stos %al,%es:(%edi) return true; } 1077e9: b0 01 mov $0x1,%al 1077eb: 5f pop %edi 1077ec: c9 leave 1077ed: c3 ret =============================================================================== 0010792c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 10792c: 55 push %ebp 10792d: 89 e5 mov %esp,%ebp 10792f: 83 ec 08 sub $0x8,%esp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107932: a1 78 6b 12 00 mov 0x126b78,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107937: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 10793d: 39 d5 cmp %edx,%ebp 10793f: 72 0a jb 10794b <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 107941: 03 90 c0 00 00 00 add 0xc0(%eax),%edx 107947: 39 d5 cmp %edx,%ebp 107949: 76 11 jbe 10795c <== ALWAYS TAKEN /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 10794b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10794e: 6a 01 push $0x1 <== NOT EXECUTED 107950: ff 35 78 6b 12 00 pushl 0x126b78 <== NOT EXECUTED 107956: e8 bd fe ff ff call 107818 <== NOT EXECUTED 10795b: 90 nop <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 10795c: 31 c0 xor %eax,%eax 10795e: c9 leave 10795f: c3 ret =============================================================================== 001079c8 : void rtems_stack_checker_report_usage( void ) { 1079c8: 55 push %ebp <== NOT EXECUTED 1079c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1079cb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 1079ce: 68 00 91 10 00 push $0x109100 <== NOT EXECUTED 1079d3: 6a 00 push $0x0 <== NOT EXECUTED 1079d5: e8 86 ff ff ff call 107960 <== NOT EXECUTED 1079da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1079dd: c9 leave <== NOT EXECUTED 1079de: c3 ret <== NOT EXECUTED =============================================================================== 00107960 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107960: 55 push %ebp <== NOT EXECUTED 107961: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107963: 56 push %esi <== NOT EXECUTED 107964: 53 push %ebx <== NOT EXECUTED 107965: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107968: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED if ( !print ) 10796b: 85 db test %ebx,%ebx <== NOT EXECUTED 10796d: 74 50 je 1079bf <== NOT EXECUTED return; print_context = context; 10796f: 89 35 08 64 12 00 mov %esi,0x126408 <== NOT EXECUTED print_handler = print; 107975: 89 1d 0c 64 12 00 mov %ebx,0x12640c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 10797b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10797e: 68 ea 00 12 00 push $0x1200ea <== NOT EXECUTED 107983: 56 push %esi <== NOT EXECUTED 107984: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107986: 58 pop %eax <== NOT EXECUTED 107987: 5a pop %edx <== NOT EXECUTED 107988: 68 70 01 12 00 push $0x120170 <== NOT EXECUTED 10798d: 56 push %esi <== NOT EXECUTED 10798e: 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 ); 107990: c7 04 24 00 77 10 00 movl $0x107700,(%esp) <== NOT EXECUTED 107997: e8 28 52 00 00 call 10cbc4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 10799c: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 1079a3: e8 58 fd ff ff call 107700 <== NOT EXECUTED #endif print_context = NULL; 1079a8: c7 05 08 64 12 00 00 movl $0x0,0x126408 <== NOT EXECUTED 1079af: 00 00 00 print_handler = NULL; 1079b2: c7 05 0c 64 12 00 00 movl $0x0,0x12640c <== NOT EXECUTED 1079b9: 00 00 00 1079bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 1079bf: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1079c2: 5b pop %ebx <== NOT EXECUTED 1079c3: 5e pop %esi <== NOT EXECUTED 1079c4: c9 leave <== NOT EXECUTED 1079c5: c3 ret <== NOT EXECUTED =============================================================================== 001078d4 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1078d4: 55 push %ebp 1078d5: 89 e5 mov %esp,%ebp 1078d7: 57 push %edi 1078d8: 56 push %esi 1078d9: 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; 1078dc: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 1078e2: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1078e5: 39 d5 cmp %edx,%ebp 1078e7: 72 0a jb 1078f3 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 1078e9: 03 90 c0 00 00 00 add 0xc0(%eax),%edx 1078ef: 39 d5 cmp %edx,%ebp 1078f1: 76 1d jbe 107910 <== 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, 1078f3: bf 40 67 12 00 mov $0x126740,%edi <== NOT EXECUTED 1078f8: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 1078fd: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 1078ff: 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 ); 107902: 56 push %esi <== NOT EXECUTED 107903: 56 push %esi <== NOT EXECUTED 107904: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107907: 52 push %edx <== NOT EXECUTED 107908: 50 push %eax <== NOT EXECUTED 107909: e8 0a ff ff ff call 107818 <== NOT EXECUTED 10790e: 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, 107910: bf 40 67 12 00 mov $0x126740,%edi 107915: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 10791a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 10791c: 75 07 jne 107925 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); } } 10791e: 8d 65 f8 lea -0x8(%ebp),%esp 107921: 5e pop %esi 107922: 5f pop %edi 107923: c9 leave 107924: 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 ) { 107925: 31 d2 xor %edx,%edx <== NOT EXECUTED 107927: eb d9 jmp 107902 <== NOT EXECUTED =============================================================================== 001107b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 1107b0: 55 push %ebp 1107b1: 89 e5 mov %esp,%ebp 1107b3: 57 push %edi 1107b4: 56 push %esi 1107b5: 53 push %ebx 1107b6: 83 ec 2c sub $0x2c,%esp 1107b9: 8b 75 08 mov 0x8(%ebp),%esi 1107bc: 8b 5d 0c mov 0xc(%ebp),%ebx 1107bf: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1107c2: 85 db test %ebx,%ebx 1107c4: 74 72 je 110838 return RTEMS_INVALID_ADDRESS; errno = 0; 1107c6: e8 45 21 00 00 call 112910 <__errno> 1107cb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1107d1: c7 03 00 00 00 00 movl $0x0,(%ebx) 1107d7: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 1107de: 83 ec 08 sub $0x8,%esp 1107e1: 8d 45 e4 lea -0x1c(%ebp),%eax 1107e4: 50 push %eax 1107e5: 56 push %esi 1107e6: e8 4d 4c 00 00 call 115438 #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 ) 1107eb: 83 c4 10 add $0x10,%esp 1107ee: 85 ff test %edi,%edi 1107f0: 74 56 je 110848 *endptr = end; 1107f2: 8b 45 e4 mov -0x1c(%ebp),%eax 1107f5: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 1107f7: 39 c6 cmp %eax,%esi 1107f9: 74 55 je 110850 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1107fb: dd 05 70 44 12 00 fldl 0x124470 110801: d9 c9 fxch %st(1) 110803: dd e1 fucom %st(1) 110805: df e0 fnstsw %ax 110807: dd d9 fstp %st(1) 110809: f6 c4 45 test $0x45,%ah 11080c: 74 0e je 11081c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 11080e: dd 1b fstpl (%ebx) #endif return RTEMS_SUCCESSFUL; 110810: 31 c0 xor %eax,%eax } 110812: 8d 65 f4 lea -0xc(%ebp),%esp 110815: 5b pop %ebx 110816: 5e pop %esi 110817: 5f pop %edi 110818: c9 leave 110819: c3 ret 11081a: 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)) 11081c: dd 5d c8 fstpl -0x38(%ebp) 11081f: e8 ec 20 00 00 call 112910 <__errno> 110824: 83 38 22 cmpl $0x22,(%eax) 110827: dd 45 c8 fldl -0x38(%ebp) 11082a: 75 e2 jne 11080e <== NEVER TAKEN 11082c: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 11082e: b8 0a 00 00 00 mov $0xa,%eax 110833: eb dd jmp 110812 110835: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110838: 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; } 11083d: 8d 65 f4 lea -0xc(%ebp),%esp 110840: 5b pop %ebx 110841: 5e pop %esi 110842: 5f pop %edi 110843: c9 leave 110844: c3 ret 110845: 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 ) 110848: 8b 45 e4 mov -0x1c(%ebp),%eax 11084b: eb aa jmp 1107f7 11084d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110850: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110852: b8 0b 00 00 00 mov $0xb,%eax 110857: eb b9 jmp 110812 =============================================================================== 0011085c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 11085c: 55 push %ebp 11085d: 89 e5 mov %esp,%ebp 11085f: 57 push %edi 110860: 56 push %esi 110861: 53 push %ebx 110862: 83 ec 2c sub $0x2c,%esp 110865: 8b 75 08 mov 0x8(%ebp),%esi 110868: 8b 5d 0c mov 0xc(%ebp),%ebx 11086b: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 11086e: 85 db test %ebx,%ebx 110870: 74 6a je 1108dc return RTEMS_INVALID_ADDRESS; errno = 0; 110872: e8 99 20 00 00 call 112910 <__errno> 110877: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11087d: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 110883: 83 ec 08 sub $0x8,%esp 110886: 8d 45 e4 lea -0x1c(%ebp),%eax 110889: 50 push %eax 11088a: 56 push %esi 11088b: e8 c4 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 ) 110890: 83 c4 10 add $0x10,%esp 110893: 85 ff test %edi,%edi 110895: 74 55 je 1108ec *endptr = end; 110897: 8b 45 e4 mov -0x1c(%ebp),%eax 11089a: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 11089c: 39 c6 cmp %eax,%esi 11089e: 74 54 je 1108f4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1108a0: d9 05 78 44 12 00 flds 0x124478 1108a6: d9 c9 fxch %st(1) 1108a8: dd e1 fucom %st(1) 1108aa: df e0 fnstsw %ax 1108ac: dd d9 fstp %st(1) 1108ae: f6 c4 45 test $0x45,%ah 1108b1: 74 0d je 1108c0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 1108b3: d9 1b fstps (%ebx) #endif return RTEMS_SUCCESSFUL; 1108b5: 31 c0 xor %eax,%eax } 1108b7: 8d 65 f4 lea -0xc(%ebp),%esp 1108ba: 5b pop %ebx 1108bb: 5e pop %esi 1108bc: 5f pop %edi 1108bd: c9 leave 1108be: c3 ret 1108bf: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1108c0: d9 5d c8 fstps -0x38(%ebp) 1108c3: e8 48 20 00 00 call 112910 <__errno> 1108c8: 83 38 22 cmpl $0x22,(%eax) 1108cb: d9 45 c8 flds -0x38(%ebp) 1108ce: 75 e3 jne 1108b3 <== NEVER TAKEN 1108d0: dd d8 fstp %st(0) return RTEMS_INVALID_NUMBER; 1108d2: b8 0a 00 00 00 mov $0xa,%eax 1108d7: eb de jmp 1108b7 1108d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 1108dc: 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; } 1108e1: 8d 65 f4 lea -0xc(%ebp),%esp 1108e4: 5b pop %ebx 1108e5: 5e pop %esi 1108e6: 5f pop %edi 1108e7: c9 leave 1108e8: c3 ret 1108e9: 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 ) 1108ec: 8b 45 e4 mov -0x1c(%ebp),%eax 1108ef: eb ab jmp 11089c 1108f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1108f4: dd d8 fstp %st(0) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 1108f6: b8 0b 00 00 00 mov $0xb,%eax 1108fb: eb ba jmp 1108b7 =============================================================================== 00110900 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110900: 55 push %ebp 110901: 89 e5 mov %esp,%ebp 110903: 57 push %edi 110904: 56 push %esi 110905: 53 push %ebx 110906: 83 ec 2c sub $0x2c,%esp 110909: 8b 75 08 mov 0x8(%ebp),%esi 11090c: 8b 5d 0c mov 0xc(%ebp),%ebx 11090f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110912: 85 db test %ebx,%ebx 110914: 74 5e je 110974 return RTEMS_INVALID_ADDRESS; errno = 0; 110916: e8 f5 1f 00 00 call 112910 <__errno> 11091b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110921: 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 ); 110927: 50 push %eax 110928: ff 75 14 pushl 0x14(%ebp) 11092b: 8d 45 e4 lea -0x1c(%ebp),%eax 11092e: 50 push %eax 11092f: 56 push %esi 110930: e8 e3 4c 00 00 call 115618 110935: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110937: 83 c4 10 add $0x10,%esp 11093a: 85 ff test %edi,%edi 11093c: 74 46 je 110984 *endptr = end; 11093e: 8b 45 e4 mov -0x1c(%ebp),%eax 110941: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110943: 39 c6 cmp %eax,%esi 110945: 74 45 je 11098c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110947: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 11094d: 74 0d je 11095c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 11094f: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110951: 31 c0 xor %eax,%eax } 110953: 8d 65 f4 lea -0xc(%ebp),%esp 110956: 5b pop %ebx 110957: 5e pop %esi 110958: 5f pop %edi 110959: c9 leave 11095a: c3 ret 11095b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 11095c: 89 55 d4 mov %edx,-0x2c(%ebp) 11095f: e8 ac 1f 00 00 call 112910 <__errno> 110964: 83 38 22 cmpl $0x22,(%eax) 110967: 8b 55 d4 mov -0x2c(%ebp),%edx 11096a: 75 e3 jne 11094f <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 11096c: b8 0a 00 00 00 mov $0xa,%eax 110971: eb e0 jmp 110953 110973: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110974: 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; } 110979: 8d 65 f4 lea -0xc(%ebp),%esp 11097c: 5b pop %ebx 11097d: 5e pop %esi 11097e: 5f pop %edi 11097f: c9 leave 110980: c3 ret 110981: 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 ) 110984: 8b 45 e4 mov -0x1c(%ebp),%eax 110987: eb ba jmp 110943 110989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 11098c: b8 0b 00 00 00 mov $0xb,%eax 110991: eb c0 jmp 110953 =============================================================================== 00110a44 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110a44: 55 push %ebp 110a45: 89 e5 mov %esp,%ebp 110a47: 57 push %edi 110a48: 56 push %esi 110a49: 53 push %ebx 110a4a: 83 ec 1c sub $0x1c,%esp 110a4d: 8b 7d 08 mov 0x8(%ebp),%edi 110a50: 8b 5d 0c mov 0xc(%ebp),%ebx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110a53: 85 db test %ebx,%ebx 110a55: 74 69 je 110ac0 return RTEMS_INVALID_ADDRESS; errno = 0; 110a57: e8 b4 1e 00 00 call 112910 <__errno> 110a5c: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110a62: 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 ); 110a68: 52 push %edx 110a69: ff 75 14 pushl 0x14(%ebp) 110a6c: 8d 45 e4 lea -0x1c(%ebp),%eax 110a6f: 50 push %eax 110a70: 57 push %edi 110a71: e8 a2 4b 00 00 call 115618 110a76: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110a78: 83 c4 10 add $0x10,%esp 110a7b: 8b 45 10 mov 0x10(%ebp),%eax 110a7e: 85 c0 test %eax,%eax 110a80: 74 4e je 110ad0 *endptr = end; 110a82: 8b 45 e4 mov -0x1c(%ebp),%eax 110a85: 8b 55 10 mov 0x10(%ebp),%edx 110a88: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) 110a8a: 39 c7 cmp %eax,%edi 110a8c: 74 4a je 110ad8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110a8e: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 110a94: 74 16 je 110aac return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110a96: 81 fe 00 00 00 80 cmp $0x80000000,%esi 110a9c: 74 0e je 110aac #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110a9e: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 110aa0: 31 c0 xor %eax,%eax } 110aa2: 8d 65 f4 lea -0xc(%ebp),%esp 110aa5: 5b pop %ebx 110aa6: 5e pop %esi 110aa7: 5f pop %edi 110aa8: c9 leave 110aa9: c3 ret 110aaa: 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)) 110aac: e8 5f 1e 00 00 call 112910 <__errno> 110ab1: 83 38 22 cmpl $0x22,(%eax) 110ab4: 75 e8 jne 110a9e <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110ab6: b8 0a 00 00 00 mov $0xa,%eax 110abb: eb e5 jmp 110aa2 110abd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110ac0: 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; } 110ac5: 8d 65 f4 lea -0xc(%ebp),%esp 110ac8: 5b pop %ebx 110ac9: 5e pop %esi 110aca: 5f pop %edi 110acb: c9 leave 110acc: c3 ret 110acd: 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 ) 110ad0: 8b 45 e4 mov -0x1c(%ebp),%eax 110ad3: eb b5 jmp 110a8a 110ad5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110ad8: b8 0b 00 00 00 mov $0xb,%eax 110add: eb c3 jmp 110aa2 =============================================================================== 00110994 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110994: 55 push %ebp 110995: 89 e5 mov %esp,%ebp 110997: 57 push %edi 110998: 56 push %esi 110999: 53 push %ebx 11099a: 83 ec 2c sub $0x2c,%esp 11099d: 8b 5d 0c mov 0xc(%ebp),%ebx 1109a0: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 1109a3: 85 db test %ebx,%ebx 1109a5: 74 7d je 110a24 return RTEMS_INVALID_ADDRESS; errno = 0; 1109a7: e8 64 1f 00 00 call 112910 <__errno> 1109ac: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1109b2: c7 03 00 00 00 00 movl $0x0,(%ebx) 1109b8: 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 ); 1109bf: 50 push %eax 1109c0: ff 75 14 pushl 0x14(%ebp) 1109c3: 8d 45 e4 lea -0x1c(%ebp),%eax 1109c6: 50 push %eax 1109c7: ff 75 08 pushl 0x8(%ebp) 1109ca: e8 65 4c 00 00 call 115634 1109cf: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 1109d1: 83 c4 10 add $0x10,%esp 1109d4: 85 ff test %edi,%edi 1109d6: 74 5c je 110a34 *endptr = end; 1109d8: 8b 45 e4 mov -0x1c(%ebp),%eax 1109db: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 1109dd: 39 45 08 cmp %eax,0x8(%ebp) 1109e0: 74 5a je 110a3c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 1109e2: 89 d1 mov %edx,%ecx 1109e4: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 1109ea: 89 f0 mov %esi,%eax 1109ec: f7 d0 not %eax 1109ee: 09 c1 or %eax,%ecx 1109f0: 74 1a je 110a0c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 1109f2: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 1109f8: 09 f0 or %esi,%eax 1109fa: 74 10 je 110a0c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 1109fc: 89 33 mov %esi,(%ebx) 1109fe: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110a01: 31 c0 xor %eax,%eax } 110a03: 8d 65 f4 lea -0xc(%ebp),%esp 110a06: 5b pop %ebx 110a07: 5e pop %esi 110a08: 5f pop %edi 110a09: c9 leave 110a0a: c3 ret 110a0b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 110a0c: 89 55 d4 mov %edx,-0x2c(%ebp) 110a0f: e8 fc 1e 00 00 call 112910 <__errno> 110a14: 83 38 22 cmpl $0x22,(%eax) 110a17: 8b 55 d4 mov -0x2c(%ebp),%edx 110a1a: 75 e0 jne 1109fc <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110a1c: b8 0a 00 00 00 mov $0xa,%eax 110a21: eb e0 jmp 110a03 110a23: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110a24: 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; } 110a29: 8d 65 f4 lea -0xc(%ebp),%esp 110a2c: 5b pop %ebx 110a2d: 5e pop %esi 110a2e: 5f pop %edi 110a2f: c9 leave 110a30: c3 ret 110a31: 8d 76 00 lea 0x0(%esi),%esi <== 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 ) 110a34: 8b 45 e4 mov -0x1c(%ebp),%eax 110a37: eb a4 jmp 1109dd 110a39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110a3c: b8 0b 00 00 00 mov $0xb,%eax 110a41: eb c0 jmp 110a03 =============================================================================== 00110ae0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110ae0: 55 push %ebp 110ae1: 89 e5 mov %esp,%ebp 110ae3: 57 push %edi 110ae4: 56 push %esi 110ae5: 53 push %ebx 110ae6: 83 ec 2c sub $0x2c,%esp 110ae9: 8b 75 08 mov 0x8(%ebp),%esi 110aec: 8b 5d 0c mov 0xc(%ebp),%ebx 110aef: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110af2: 85 db test %ebx,%ebx 110af4: 74 5a je 110b50 return RTEMS_INVALID_ADDRESS; errno = 0; 110af6: e8 15 1e 00 00 call 112910 <__errno> 110afb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110b01: 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 ); 110b07: 50 push %eax 110b08: 6a 10 push $0x10 110b0a: 8d 45 e4 lea -0x1c(%ebp),%eax 110b0d: 50 push %eax 110b0e: 56 push %esi 110b0f: e8 cc 4f 00 00 call 115ae0 110b14: 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 ) 110b16: 83 c4 10 add $0x10,%esp 110b19: 85 ff test %edi,%edi 110b1b: 74 43 je 110b60 *endptr = end; 110b1d: 8b 45 e4 mov -0x1c(%ebp),%eax 110b20: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110b22: 39 c6 cmp %eax,%esi 110b24: 74 42 je 110b68 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110b26: 83 fa ff cmp $0xffffffff,%edx 110b29: 74 0d je 110b38 <== 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; 110b2b: 89 13 mov %edx,(%ebx) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 110b2d: 31 c0 xor %eax,%eax } 110b2f: 8d 65 f4 lea -0xc(%ebp),%esp 110b32: 5b pop %ebx 110b33: 5e pop %esi 110b34: 5f pop %edi 110b35: c9 leave 110b36: c3 ret 110b37: 90 nop <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110b38: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 110b3b: e8 d0 1d 00 00 call 112910 <__errno> <== NOT EXECUTED 110b40: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED 110b43: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 110b46: 75 e3 jne 110b2b <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 110b48: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 110b4d: eb e0 jmp 110b2f <== NOT EXECUTED 110b4f: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110b50: 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; } 110b55: 8d 65 f4 lea -0xc(%ebp),%esp 110b58: 5b pop %ebx 110b59: 5e pop %esi 110b5a: 5f pop %edi 110b5b: c9 leave 110b5c: c3 ret 110b5d: 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 ) 110b60: 8b 45 e4 mov -0x1c(%ebp),%eax 110b63: eb bd jmp 110b22 110b65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110b68: b8 0b 00 00 00 mov $0xb,%eax 110b6d: eb c0 jmp 110b2f =============================================================================== 00110b70 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110b70: 55 push %ebp 110b71: 89 e5 mov %esp,%ebp 110b73: 57 push %edi 110b74: 56 push %esi 110b75: 53 push %ebx 110b76: 83 ec 1c sub $0x1c,%esp 110b79: 8b 75 08 mov 0x8(%ebp),%esi 110b7c: 8b 5d 0c mov 0xc(%ebp),%ebx 110b7f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110b82: 85 db test %ebx,%ebx 110b84: 74 3a je 110bc0 return RTEMS_INVALID_ADDRESS; errno = 0; 110b86: e8 85 1d 00 00 call 112910 <__errno> 110b8b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110b91: 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 ); 110b94: 50 push %eax 110b95: ff 75 14 pushl 0x14(%ebp) 110b98: 8d 45 e4 lea -0x1c(%ebp),%eax 110b9b: 50 push %eax 110b9c: 56 push %esi 110b9d: e8 3e 4f 00 00 call 115ae0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110ba2: 83 c4 10 add $0x10,%esp 110ba5: 85 ff test %edi,%edi 110ba7: 74 27 je 110bd0 *endptr = end; 110ba9: 8b 55 e4 mov -0x1c(%ebp),%edx 110bac: 89 17 mov %edx,(%edi) /* nothing was converted */ if ( end == s ) 110bae: 39 d6 cmp %edx,%esi 110bb0: 74 26 je 110bd8 #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 ); 110bb2: 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; 110bb4: 31 c0 xor %eax,%eax } 110bb6: 8d 65 f4 lea -0xc(%ebp),%esp 110bb9: 5b pop %ebx 110bba: 5e pop %esi 110bbb: 5f pop %edi 110bbc: c9 leave 110bbd: c3 ret 110bbe: 66 90 xchg %ax,%ax <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110bc0: 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; } 110bc5: 8d 65 f4 lea -0xc(%ebp),%esp 110bc8: 5b pop %ebx 110bc9: 5e pop %esi 110bca: 5f pop %edi 110bcb: c9 leave 110bcc: c3 ret 110bcd: 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 ) 110bd0: 8b 55 e4 mov -0x1c(%ebp),%edx 110bd3: eb d9 jmp 110bae 110bd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110bd8: b8 0b 00 00 00 mov $0xb,%eax 110bdd: eb d7 jmp 110bb6 =============================================================================== 00110be0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110be0: 55 push %ebp 110be1: 89 e5 mov %esp,%ebp 110be3: 57 push %edi 110be4: 56 push %esi 110be5: 53 push %ebx 110be6: 83 ec 2c sub $0x2c,%esp 110be9: 8b 75 08 mov 0x8(%ebp),%esi 110bec: 8b 5d 0c mov 0xc(%ebp),%ebx 110bef: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110bf2: 85 db test %ebx,%ebx 110bf4: 74 5a je 110c50 return RTEMS_INVALID_ADDRESS; errno = 0; 110bf6: e8 15 1d 00 00 call 112910 <__errno> 110bfb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110c01: 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 ); 110c07: 50 push %eax 110c08: ff 75 14 pushl 0x14(%ebp) 110c0b: 8d 45 e4 lea -0x1c(%ebp),%eax 110c0e: 50 push %eax 110c0f: 56 push %esi 110c10: e8 cb 4e 00 00 call 115ae0 110c15: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110c17: 83 c4 10 add $0x10,%esp 110c1a: 85 ff test %edi,%edi 110c1c: 74 42 je 110c60 *endptr = end; 110c1e: 8b 45 e4 mov -0x1c(%ebp),%eax 110c21: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110c23: 39 c6 cmp %eax,%esi 110c25: 74 41 je 110c68 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110c27: 83 fa ff cmp $0xffffffff,%edx 110c2a: 74 0c je 110c38 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110c2c: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110c2e: 31 c0 xor %eax,%eax } 110c30: 8d 65 f4 lea -0xc(%ebp),%esp 110c33: 5b pop %ebx 110c34: 5e pop %esi 110c35: 5f pop %edi 110c36: c9 leave 110c37: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110c38: 89 55 d4 mov %edx,-0x2c(%ebp) 110c3b: e8 d0 1c 00 00 call 112910 <__errno> 110c40: 83 38 22 cmpl $0x22,(%eax) 110c43: 8b 55 d4 mov -0x2c(%ebp),%edx 110c46: 75 e4 jne 110c2c <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110c48: b8 0a 00 00 00 mov $0xa,%eax 110c4d: eb e1 jmp 110c30 110c4f: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110c50: 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; } 110c55: 8d 65 f4 lea -0xc(%ebp),%esp 110c58: 5b pop %ebx 110c59: 5e pop %esi 110c5a: 5f pop %edi 110c5b: c9 leave 110c5c: c3 ret 110c5d: 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 ) 110c60: 8b 45 e4 mov -0x1c(%ebp),%eax 110c63: eb be jmp 110c23 110c65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110c68: b8 0b 00 00 00 mov $0xb,%eax 110c6d: eb c1 jmp 110c30 =============================================================================== 00110d0c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110d0c: 55 push %ebp 110d0d: 89 e5 mov %esp,%ebp 110d0f: 57 push %edi 110d10: 56 push %esi 110d11: 53 push %ebx 110d12: 83 ec 2c sub $0x2c,%esp 110d15: 8b 75 08 mov 0x8(%ebp),%esi 110d18: 8b 5d 0c mov 0xc(%ebp),%ebx 110d1b: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110d1e: 85 db test %ebx,%ebx 110d20: 74 5a je 110d7c return RTEMS_INVALID_ADDRESS; errno = 0; 110d22: e8 e9 1b 00 00 call 112910 <__errno> 110d27: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110d2d: 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 ); 110d33: 50 push %eax 110d34: ff 75 14 pushl 0x14(%ebp) 110d37: 8d 45 e4 lea -0x1c(%ebp),%eax 110d3a: 50 push %eax 110d3b: 56 push %esi 110d3c: e8 9f 4d 00 00 call 115ae0 110d41: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110d43: 83 c4 10 add $0x10,%esp 110d46: 85 ff test %edi,%edi 110d48: 74 42 je 110d8c *endptr = end; 110d4a: 8b 45 e4 mov -0x1c(%ebp),%eax 110d4d: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110d4f: 39 c6 cmp %eax,%esi 110d51: 74 41 je 110d94 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d53: 83 fa ff cmp $0xffffffff,%edx 110d56: 74 0c je 110d64 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110d58: 89 13 mov %edx,(%ebx) #endif return RTEMS_SUCCESSFUL; 110d5a: 31 c0 xor %eax,%eax } 110d5c: 8d 65 f4 lea -0xc(%ebp),%esp 110d5f: 5b pop %ebx 110d60: 5e pop %esi 110d61: 5f pop %edi 110d62: c9 leave 110d63: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110d64: 89 55 d4 mov %edx,-0x2c(%ebp) 110d67: e8 a4 1b 00 00 call 112910 <__errno> 110d6c: 83 38 22 cmpl $0x22,(%eax) 110d6f: 8b 55 d4 mov -0x2c(%ebp),%edx 110d72: 75 e4 jne 110d58 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110d74: b8 0a 00 00 00 mov $0xa,%eax 110d79: eb e1 jmp 110d5c 110d7b: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110d7c: 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; } 110d81: 8d 65 f4 lea -0xc(%ebp),%esp 110d84: 5b pop %ebx 110d85: 5e pop %esi 110d86: 5f pop %edi 110d87: c9 leave 110d88: c3 ret 110d89: 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 ) 110d8c: 8b 45 e4 mov -0x1c(%ebp),%eax 110d8f: eb be jmp 110d4f 110d91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110d94: b8 0b 00 00 00 mov $0xb,%eax 110d99: eb c1 jmp 110d5c =============================================================================== 00110c70 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 110c70: 55 push %ebp 110c71: 89 e5 mov %esp,%ebp 110c73: 57 push %edi 110c74: 56 push %esi 110c75: 53 push %ebx 110c76: 83 ec 2c sub $0x2c,%esp 110c79: 8b 5d 0c mov 0xc(%ebp),%ebx 110c7c: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 110c7f: 85 db test %ebx,%ebx 110c81: 74 69 je 110cec return RTEMS_INVALID_ADDRESS; errno = 0; 110c83: e8 88 1c 00 00 call 112910 <__errno> 110c88: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110c8e: c7 03 00 00 00 00 movl $0x0,(%ebx) 110c94: 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 ); 110c9b: 50 push %eax 110c9c: ff 75 14 pushl 0x14(%ebp) 110c9f: 8d 45 e4 lea -0x1c(%ebp),%eax 110ca2: 50 push %eax 110ca3: ff 75 08 pushl 0x8(%ebp) 110ca6: e8 51 4e 00 00 call 115afc 110cab: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 110cad: 83 c4 10 add $0x10,%esp 110cb0: 85 ff test %edi,%edi 110cb2: 74 48 je 110cfc *endptr = end; 110cb4: 8b 45 e4 mov -0x1c(%ebp),%eax 110cb7: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) 110cb9: 39 45 08 cmp %eax,0x8(%ebp) 110cbc: 74 46 je 110d04 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110cbe: 89 f0 mov %esi,%eax 110cc0: 21 d0 and %edx,%eax 110cc2: 40 inc %eax 110cc3: 74 0f je 110cd4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 110cc5: 89 33 mov %esi,(%ebx) 110cc7: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 110cca: 31 c0 xor %eax,%eax } 110ccc: 8d 65 f4 lea -0xc(%ebp),%esp 110ccf: 5b pop %ebx 110cd0: 5e pop %esi 110cd1: 5f pop %edi 110cd2: c9 leave 110cd3: c3 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 110cd4: 89 55 d4 mov %edx,-0x2c(%ebp) 110cd7: e8 34 1c 00 00 call 112910 <__errno> 110cdc: 83 38 22 cmpl $0x22,(%eax) 110cdf: 8b 55 d4 mov -0x2c(%ebp),%edx 110ce2: 75 e1 jne 110cc5 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; 110ce4: b8 0a 00 00 00 mov $0xa,%eax 110ce9: eb e1 jmp 110ccc 110ceb: 90 nop <== NOT EXECUTED { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 110cec: 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; } 110cf1: 8d 65 f4 lea -0xc(%ebp),%esp 110cf4: 5b pop %ebx 110cf5: 5e pop %esi 110cf6: 5f pop %edi 110cf7: c9 leave 110cf8: c3 ret 110cf9: 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 ) 110cfc: 8b 45 e4 mov -0x1c(%ebp),%eax 110cff: eb b8 jmp 110cb9 110d01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 110d04: b8 0b 00 00 00 mov $0xb,%eax 110d09: eb c1 jmp 110ccc =============================================================================== 00107ac4 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 107ac4: 55 push %ebp 107ac5: 89 e5 mov %esp,%ebp 107ac7: 57 push %edi 107ac8: 56 push %esi 107ac9: 53 push %ebx 107aca: 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( 107ad0: 31 c0 xor %eax,%eax 107ad2: b9 ff ff ff ff mov $0xffffffff,%ecx 107ad7: 8b 7d 08 mov 0x8(%ebp),%edi 107ada: f2 ae repnz scas %es:(%edi),%al 107adc: f7 d1 not %ecx 107ade: 49 dec %ecx 107adf: 6a 00 push $0x0 107ae1: 8d 45 d0 lea -0x30(%ebp),%eax 107ae4: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp) 107aea: 50 push %eax 107aeb: 6a 00 push $0x0 107aed: 51 push %ecx 107aee: ff 75 08 pushl 0x8(%ebp) 107af1: e8 f2 0a 00 00 call 1085e8 107af6: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp) strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 107afc: 83 c4 20 add $0x20,%esp 107aff: 85 c0 test %eax,%eax 107b01: 0f 85 61 01 00 00 jne 107c68 <== NEVER TAKEN return -1; if (root_loc.ops != &IMFS_ops 107b07: 8b 45 dc mov -0x24(%ebp),%eax 107b0a: 3d 60 4d 12 00 cmp $0x124d60,%eax 107b0f: 0f 85 47 01 00 00 jne 107c5c <== NEVER TAKEN 107b15: 31 db xor %ebx,%ebx * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107b17: 8d 45 bc lea -0x44(%ebp),%eax 107b1a: 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); 107b20: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107b26: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp) 107b2c: eb 15 jmp 107b43 107b2e: 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) { 107b30: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp) 107b37: 0f 84 43 01 00 00 je 107c80 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107b3d: 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) 107b43: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax 107b49: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp) 107b4f: 8b 55 10 mov 0x10(%ebp),%edx 107b52: 39 d0 cmp %edx,%eax 107b54: 0f 87 18 01 00 00 ja 107c72 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 107b5a: 03 5d 0c add 0xc(%ebp),%ebx offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 107b5d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi 107b63: bf a8 4d 12 00 mov $0x124da8,%edi 107b68: b9 07 00 00 00 mov $0x7,%ecx 107b6d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107b6f: 0f 85 fd 00 00 00 jne 107c72 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 107b75: 57 push %edi 107b76: 6a 63 push $0x63 107b78: 53 push %ebx 107b79: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107b7f: 50 push %eax 107b80: e8 b7 e1 00 00 call 115d3c filename[MAX_NAME_FIELD_SIZE] = '\0'; 107b85: c6 45 bb 00 movb $0x0,-0x45(%ebp) linkflag = hdr_ptr[156]; 107b89: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl 107b8f: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 107b95: 59 pop %ecx 107b96: 5e pop %esi 107b97: 6a 08 push $0x8 107b99: 8d 43 64 lea 0x64(%ebx),%eax 107b9c: 50 push %eax 107b9d: e8 be 7b 00 00 call 10f760 <_rtems_octal2ulong> 107ba2: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp) file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 107ba8: 58 pop %eax 107ba9: 5a pop %edx 107baa: 6a 0c push $0xc 107bac: 8d 43 7c lea 0x7c(%ebx),%eax 107baf: 50 push %eax 107bb0: e8 ab 7b 00 00 call 10f760 <_rtems_octal2ulong> 107bb5: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp) hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 107bbb: 5e pop %esi 107bbc: 5f pop %edi 107bbd: 6a 08 push $0x8 107bbf: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 107bc5: 50 push %eax 107bc6: e8 95 7b 00 00 call 10f760 <_rtems_octal2ulong> 107bcb: 89 c6 mov %eax,%esi if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 107bcd: 89 1c 24 mov %ebx,(%esp) 107bd0: e8 53 80 00 00 call 10fc28 <_rtems_tar_header_checksum> 107bd5: 83 c4 10 add $0x10,%esp 107bd8: 39 f0 cmp %esi,%eax 107bda: 0f 85 92 00 00 00 jne 107c72 <== 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) { 107be0: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp) 107be7: 0f 85 43 ff ff ff jne 107b30 strcpy(full_filename, mountpoint); 107bed: 83 ec 08 sub $0x8,%esp 107bf0: ff 75 08 pushl 0x8(%ebp) 107bf3: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107bf9: 50 push %eax 107bfa: e8 d9 dd 00 00 call 1159d8 if (full_filename[strlen(full_filename)-1] != '/') 107bff: 31 c0 xor %eax,%eax 107c01: b9 ff ff ff ff mov $0xffffffff,%ecx 107c06: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi 107c0c: f2 ae repnz scas %es:(%edi),%al 107c0e: f7 d1 not %ecx 107c10: 49 dec %ecx 107c11: 83 c4 10 add $0x10,%esp 107c14: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1) 107c1b: 2f 107c1c: 74 0a je 107c28 <== ALWAYS TAKEN strcat(full_filename, "/"); 107c1e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED 107c25: ff 2f 00 strcat(full_filename, filename); 107c28: 83 ec 08 sub $0x8,%esp 107c2b: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx 107c31: 52 push %edx 107c32: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax 107c38: 50 push %eax 107c39: e8 ee dc 00 00 call 11592c mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 107c3e: 5a pop %edx 107c3f: 59 pop %ecx 107c40: 68 ff 01 00 00 push $0x1ff 107c45: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx 107c4b: 52 push %edx 107c4c: e8 7f 11 00 00 call 108dd0 107c51: 83 c4 10 add $0x10,%esp 107c54: e9 e4 fe ff ff jmp 107b3d 107c59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 107c5c: 3d 80 57 12 00 cmp $0x125780,%eax <== NOT EXECUTED 107c61: 0f 84 ae fe ff ff je 107b15 <== NOT EXECUTED 107c67: 90 nop <== NOT EXECUTED return -1; 107c68: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp) <== NOT EXECUTED 107c6f: ff ff ff nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 107c72: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax 107c78: 8d 65 f4 lea -0xc(%ebp),%esp 107c7b: 5b pop %ebx 107c7c: 5e pop %esi 107c7d: 5f pop %edi 107c7e: c9 leave 107c7f: c3 ret * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 107c80: b9 05 00 00 00 mov $0x5,%ecx 107c85: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi 107c8b: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi 107c91: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 107c93: 50 push %eax 107c94: 8d 45 e4 lea -0x1c(%ebp),%eax 107c97: 50 push %eax 107c98: 8d 55 bc lea -0x44(%ebp),%edx 107c9b: 52 push %edx 107c9c: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 107ca2: 50 push %eax 107ca3: e8 fc 86 00 00 call 1103a4 107ca8: 83 c4 10 add $0x10,%esp 107cab: 85 c0 test %eax,%eax 107cad: 74 1d je 107ccc <== ALWAYS TAKEN ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; } nblocks = (((file_size) + 511) & ~511) / 512; 107caf: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax 107cb5: 05 ff 01 00 00 add $0x1ff,%eax offset += 512 * nblocks; 107cba: 25 00 fe ff ff and $0xfffffe00,%eax 107cbf: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp) 107cc5: e9 73 fe ff ff jmp 107b3d 107cca: 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( 107ccc: 83 ec 0c sub $0xc,%esp 107ccf: 6a 00 push $0x0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 107cd1: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax 107cd7: 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( 107cdc: 80 cc 80 or $0x80,%ah 107cdf: 50 push %eax 107ce0: ff 75 e4 pushl -0x1c(%ebp) 107ce3: 6a 06 push $0x6 107ce5: 8d 55 bc lea -0x44(%ebp),%edx 107ce8: 52 push %edx 107ce9: e8 ee 80 00 00 call 10fddc &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 107cee: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx 107cf4: 89 50 50 mov %edx,0x50(%eax) 107cf7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = &tar_image[offset]; 107cfe: 8b 55 0c mov 0xc(%ebp),%edx 107d01: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx 107d07: 89 50 58 mov %edx,0x58(%eax) 107d0a: 83 c4 20 add $0x20,%esp 107d0d: eb a0 jmp 107caf =============================================================================== 0010b8d4 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b8d4: 55 push %ebp 10b8d5: 89 e5 mov %esp,%ebp 10b8d7: 57 push %edi 10b8d8: 56 push %esi 10b8d9: 53 push %ebx 10b8da: 83 ec 1c sub $0x1c,%esp 10b8dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8e0: 8b 7d 0c mov 0xc(%ebp),%edi 10b8e3: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b8e6: 85 f6 test %esi,%esi 10b8e8: 0f 84 3e 01 00 00 je 10ba2c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b8ee: 85 db test %ebx,%ebx 10b8f0: 0f 84 d2 00 00 00 je 10b9c8 <== NEVER TAKEN /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b8f6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b8fd: 75 17 jne 10b916 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b8ff: 85 ff test %edi,%edi 10b901: 0f 84 b1 00 00 00 je 10b9b8 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b907: 0f b6 05 b4 22 12 00 movzbl 0x1222b4,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b90e: 39 c7 cmp %eax,%edi 10b910: 0f 87 a2 00 00 00 ja 10b9b8 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b916: 83 ec 0c sub $0xc,%esp 10b919: ff 35 84 64 12 00 pushl 0x126484 10b91f: e8 6c 06 00 00 call 10bf90 <_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 ); 10b924: c7 04 24 60 63 12 00 movl $0x126360,(%esp) 10b92b: e8 f8 0f 00 00 call 10c928 <_Objects_Allocate> 10b930: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b932: 83 c4 10 add $0x10,%esp 10b935: 85 c0 test %eax,%eax 10b937: 0f 84 cf 00 00 00 je 10ba0c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b93d: 50 push %eax 10b93e: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b93f: 8b 45 14 mov 0x14(%ebp),%eax 10b942: 83 e0 01 and $0x1,%eax 10b945: 50 push %eax 10b946: 6a 00 push $0x0 10b948: 31 c0 xor %eax,%eax 10b94a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b951: 0f 95 c0 setne %al 10b954: 50 push %eax 10b955: 31 c0 xor %eax,%eax 10b957: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b95e: 0f 94 c0 sete %al 10b961: 50 push %eax 10b962: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b963: 8b 45 18 mov 0x18(%ebp),%eax 10b966: 83 e0 01 and $0x1,%eax 10b969: 50 push %eax 10b96a: ff 75 10 pushl 0x10(%ebp) 10b96d: 6a 00 push $0x0 10b96f: 52 push %edx 10b970: 68 60 63 12 00 push $0x126360 10b975: 89 55 e4 mov %edx,-0x1c(%ebp) 10b978: e8 5b 1d 00 00 call 10d6d8 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b97d: 83 c4 30 add $0x30,%esp 10b980: 84 c0 test %al,%al 10b982: 8b 55 e4 mov -0x1c(%ebp),%edx 10b985: 74 51 je 10b9d8 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b987: 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( 10b98d: 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; 10b994: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b998: 8b 42 08 mov 0x8(%edx),%eax 10b99b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b99d: 83 ec 0c sub $0xc,%esp 10b9a0: ff 35 84 64 12 00 pushl 0x126484 10b9a6: e8 2d 06 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b9ab: 83 c4 10 add $0x10,%esp 10b9ae: 31 c0 xor %eax,%eax } 10b9b0: 8d 65 f4 lea -0xc(%ebp),%esp 10b9b3: 5b pop %ebx 10b9b4: 5e pop %esi 10b9b5: 5f pop %edi 10b9b6: c9 leave 10b9b7: 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; 10b9b8: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9bd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9c0: 5b pop %ebx 10b9c1: 5e pop %esi 10b9c2: 5f pop %edi 10b9c3: c9 leave 10b9c4: c3 ret 10b9c5: 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; 10b9c8: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9cd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9d0: 5b pop %ebx 10b9d1: 5e pop %esi 10b9d2: 5f pop %edi 10b9d3: c9 leave 10b9d4: c3 ret 10b9d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b9d8: 83 ec 0c sub $0xc,%esp 10b9db: ff 72 08 pushl 0x8(%edx) 10b9de: e8 2d 13 00 00 call 10cd10 <_Objects_Get_information_id> 10b9e3: 5a pop %edx 10b9e4: 59 pop %ecx 10b9e5: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9e8: 52 push %edx 10b9e9: 50 push %eax 10b9ea: e8 b1 12 00 00 call 10cca0 <_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(); 10b9ef: 58 pop %eax 10b9f0: ff 35 84 64 12 00 pushl 0x126484 10b9f6: e8 dd 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b9fb: 83 c4 10 add $0x10,%esp 10b9fe: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba03: 8d 65 f4 lea -0xc(%ebp),%esp 10ba06: 5b pop %ebx 10ba07: 5e pop %esi 10ba08: 5f pop %edi 10ba09: c9 leave 10ba0a: c3 ret 10ba0b: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10ba0c: 83 ec 0c sub $0xc,%esp 10ba0f: ff 35 84 64 12 00 pushl 0x126484 10ba15: e8 be 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10ba1a: 83 c4 10 add $0x10,%esp 10ba1d: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba22: 8d 65 f4 lea -0xc(%ebp),%esp 10ba25: 5b pop %ebx 10ba26: 5e pop %esi 10ba27: 5f pop %edi 10ba28: c9 leave 10ba29: c3 ret 10ba2a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba2c: b8 09 00 00 00 mov $0x9,%eax 10ba31: eb 8a jmp 10b9bd =============================================================================== 0010ba34 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10ba34: 55 push %ebp 10ba35: 89 e5 mov %esp,%ebp 10ba37: 53 push %ebx 10ba38: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10ba3b: ff 35 84 64 12 00 pushl 0x126484 10ba41: e8 4a 05 00 00 call 10bf90 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10ba46: 5a pop %edx 10ba47: 59 pop %ecx 10ba48: 8d 45 f4 lea -0xc(%ebp),%eax 10ba4b: 50 push %eax 10ba4c: ff 75 08 pushl 0x8(%ebp) 10ba4f: e8 0c 1c 00 00 call 10d660 <_Thread_Get> 10ba54: 89 c3 mov %eax,%ebx switch ( location ) { 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 8b 45 f4 mov -0xc(%ebp),%eax 10ba5c: 85 c0 test %eax,%eax 10ba5e: 75 44 jne 10baa4 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10ba60: 83 ec 0c sub $0xc,%esp 10ba63: ff 73 08 pushl 0x8(%ebx) 10ba66: e8 a5 12 00 00 call 10cd10 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10ba6b: 5a pop %edx 10ba6c: 59 pop %ecx 10ba6d: 53 push %ebx 10ba6e: 50 push %eax 10ba6f: e8 98 18 00 00 call 10d30c <_Thread_Close> 10ba74: 58 pop %eax 10ba75: ff 73 08 pushl 0x8(%ebx) 10ba78: e8 93 12 00 00 call 10cd10 <_Objects_Get_information_id> 10ba7d: 5a pop %edx 10ba7e: 59 pop %ecx 10ba7f: 53 push %ebx 10ba80: 50 push %eax 10ba81: e8 1a 12 00 00 call 10cca0 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ba86: 58 pop %eax 10ba87: ff 35 84 64 12 00 pushl 0x126484 10ba8d: e8 46 05 00 00 call 10bfd8 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10ba92: e8 a5 1b 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba97: 83 c4 10 add $0x10,%esp 10ba9a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10ba9c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba9f: c9 leave 10baa0: c3 ret 10baa1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10baa4: 83 ec 0c sub $0xc,%esp 10baa7: ff 35 84 64 12 00 pushl 0x126484 10baad: e8 26 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10bab2: 83 c4 10 add $0x10,%esp 10bab5: b8 04 00 00 00 mov $0x4,%eax } 10baba: 8b 5d fc mov -0x4(%ebp),%ebx 10babd: c9 leave 10babe: c3 ret =============================================================================== 0010d55c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d55c: 55 push %ebp 10d55d: 89 e5 mov %esp,%ebp 10d55f: 56 push %esi 10d560: 53 push %ebx 10d561: 83 ec 10 sub $0x10,%esp 10d564: 8b 45 08 mov 0x8(%ebp),%eax 10d567: 8b 75 0c mov 0xc(%ebp),%esi 10d56a: 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() ) 10d56d: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d574: 74 6e je 10d5e4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d576: 85 db test %ebx,%ebx 10d578: 74 7e je 10d5f8 /* * 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 ) 10d57a: 83 fe 0f cmp $0xf,%esi 10d57d: 77 3d ja 10d5bc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d57f: 85 c0 test %eax,%eax 10d581: 74 45 je 10d5c8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d583: 8b 15 18 99 12 00 mov 0x129918,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d589: 3b 42 08 cmp 0x8(%edx),%eax 10d58c: 74 40 je 10d5ce api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d58e: 83 ec 08 sub $0x8,%esp 10d591: 8d 55 f4 lea -0xc(%ebp),%edx 10d594: 52 push %edx 10d595: 50 push %eax 10d596: e8 f1 1e 00 00 call 10f48c <_Thread_Get> switch ( location ) { 10d59b: 83 c4 10 add $0x10,%esp 10d59e: 8b 55 f4 mov -0xc(%ebp),%edx 10d5a1: 85 d2 test %edx,%edx 10d5a3: 75 4b jne 10d5f0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5a5: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d5ab: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5af: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d5b1: e8 b2 1e 00 00 call 10f468 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d5b6: 31 c0 xor %eax,%eax 10d5b8: eb 07 jmp 10d5c1 10d5ba: 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; 10d5bc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5c1: 8d 65 f8 lea -0x8(%ebp),%esp 10d5c4: 5b pop %ebx 10d5c5: 5e pop %esi 10d5c6: c9 leave 10d5c7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5c8: 8b 15 18 99 12 00 mov 0x129918,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5ce: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d5d4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5d8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d5da: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10d5df: 5b pop %ebx 10d5e0: 5e pop %esi 10d5e1: c9 leave 10d5e2: c3 ret 10d5e3: 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; 10d5e4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5e9: 8d 65 f8 lea -0x8(%ebp),%esp 10d5ec: 5b pop %ebx 10d5ed: 5e pop %esi 10d5ee: c9 leave 10d5ef: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d5f0: b8 04 00 00 00 mov $0x4,%eax 10d5f5: eb ca jmp 10d5c1 10d5f7: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d5f8: b8 09 00 00 00 mov $0x9,%eax 10d5fd: eb c2 jmp 10d5c1 =============================================================================== 0010bac0 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10bac0: 55 push %ebp 10bac1: 89 e5 mov %esp,%ebp 10bac3: 83 ec 08 sub $0x8,%esp 10bac6: 8b 55 08 mov 0x8(%ebp),%edx 10bac9: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10bacc: 85 c0 test %eax,%eax 10bace: 74 30 je 10bb00 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10bad0: 85 d2 test %edx,%edx 10bad2: 75 10 jne 10bae4 *id = _Thread_Executing->Object.id; 10bad4: 8b 15 78 66 12 00 mov 0x126678,%edx 10bada: 8b 52 08 mov 0x8(%edx),%edx 10badd: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10badf: 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 ]; } 10bae1: c9 leave 10bae2: c3 ret 10bae3: 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 ); 10bae4: 50 push %eax 10bae5: ff 75 0c pushl 0xc(%ebp) 10bae8: 52 push %edx 10bae9: 68 60 63 12 00 push $0x126360 10baee: e8 3d 14 00 00 call 10cf30 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10baf3: 8b 04 85 ac fe 11 00 mov 0x11feac(,%eax,4),%eax 10bafa: 83 c4 10 add $0x10,%esp } 10bafd: c9 leave 10bafe: c3 ret 10baff: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10bb00: 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 ]; } 10bb05: c9 leave 10bb06: c3 ret =============================================================================== 0011825c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11825c: 55 push %ebp 11825d: 89 e5 mov %esp,%ebp 11825f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118262: 8d 45 f4 lea -0xc(%ebp),%eax 118265: 50 push %eax 118266: ff 75 08 pushl 0x8(%ebp) 118269: e8 76 38 00 00 call 11bae4 <_Thread_Get> switch ( location ) { 11826e: 83 c4 10 add $0x10,%esp 118271: 8b 55 f4 mov -0xc(%ebp),%edx 118274: 85 d2 test %edx,%edx 118276: 74 08 je 118280 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118278: b8 04 00 00 00 mov $0x4,%eax } 11827d: c9 leave 11827e: c3 ret 11827f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118280: f6 40 10 02 testb $0x2,0x10(%eax) 118284: 74 0e je 118294 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118286: e8 35 38 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11828b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118290: c9 leave 118291: c3 ret 118292: 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(); 118294: e8 27 38 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118299: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829b: c9 leave 11829c: c3 ret =============================================================================== 00111fc8 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111fc8: 55 push %ebp 111fc9: 89 e5 mov %esp,%ebp 111fcb: 57 push %edi 111fcc: 56 push %esi 111fcd: 53 push %ebx 111fce: 83 ec 1c sub $0x1c,%esp 111fd1: 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 ) 111fd4: 85 c9 test %ecx,%ecx 111fd6: 0f 84 48 01 00 00 je 112124 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111fdc: 8b 1d 78 66 12 00 mov 0x126678,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111fe2: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111fe8: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111fec: 19 f6 sbb %esi,%esi 111fee: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111ff4: 8b 43 7c mov 0x7c(%ebx),%eax 111ff7: 85 c0 test %eax,%eax 111ff9: 0f 85 e1 00 00 00 jne 1120e0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111fff: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112003: 19 d2 sbb %edx,%edx 112005: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 11200b: 89 55 e4 mov %edx,-0x1c(%ebp) 11200e: 89 4d e0 mov %ecx,-0x20(%ebp) 112011: e8 a6 cb ff ff call 10ebbc <_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; 112016: 8b 55 e4 mov -0x1c(%ebp),%edx 112019: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 11201b: 09 f0 or %esi,%eax 11201d: 8b 4d e0 mov -0x20(%ebp),%ecx 112020: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112022: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112029: 74 0b je 112036 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 11202b: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112032: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112036: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 11203d: 74 1c je 11205b if ( _Modes_Is_timeslice(mode_set) ) { 11203f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112046: 0f 84 c0 00 00 00 je 11210c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 11204c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112053: a1 a4 63 12 00 mov 0x1263a4,%eax 112058: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11205b: f6 45 0c 01 testb $0x1,0xc(%ebp) 11205f: 74 0b je 11206c */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112061: f6 45 08 01 testb $0x1,0x8(%ebp) 112065: 0f 84 99 00 00 00 je 112104 11206b: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 11206c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112073: 74 3f je 1120b4 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112075: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 11207c: 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 ) { 11207f: 38 47 08 cmp %al,0x8(%edi) 112082: 74 30 je 1120b4 asr->is_enabled = is_asr_enabled; 112084: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112087: 9c pushf 112088: fa cli 112089: 58 pop %eax _signals = information->signals_pending; 11208a: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 11208d: 8b 4f 14 mov 0x14(%edi),%ecx 112090: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112093: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112096: 50 push %eax 112097: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112098: 8b 5f 14 mov 0x14(%edi),%ebx 11209b: 85 db test %ebx,%ebx 11209d: 0f 95 c2 setne %dl needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1120a0: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 1120a7: 74 16 je 1120bf <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 1120a9: 31 c0 xor %eax,%eax } 1120ab: 83 c4 1c add $0x1c,%esp 1120ae: 5b pop %ebx 1120af: 5e pop %esi 1120b0: 5f pop %edi 1120b1: c9 leave 1120b2: c3 ret 1120b3: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 1120b4: 31 d2 xor %edx,%edx needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1120b6: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 1120bd: 75 ea jne 1120a9 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 1120bf: a1 78 66 12 00 mov 0x126678,%eax if ( !_States_Is_ready( executing->current_state ) || 1120c4: 8b 48 10 mov 0x10(%eax),%ecx 1120c7: 85 c9 test %ecx,%ecx 1120c9: 75 21 jne 1120ec <== NEVER TAKEN 1120cb: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 1120d1: 74 06 je 1120d9 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1120d3: 80 78 74 00 cmpb $0x0,0x74(%eax) 1120d7: 75 13 jne 1120ec <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 1120d9: 84 d2 test %dl,%dl 1120db: 75 16 jne 1120f3 1120dd: eb ca jmp 1120a9 1120df: 90 nop <== 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; 1120e0: 81 ce 00 02 00 00 or $0x200,%esi 1120e6: e9 14 ff ff ff jmp 111fff 1120eb: 90 nop <== NOT EXECUTED _Context_Switch_necessary = true; 1120ec: c6 05 84 66 12 00 01 movb $0x1,0x126684 } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 1120f3: e8 cc b3 ff ff call 10d4c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 1120f8: 31 c0 xor %eax,%eax } 1120fa: 83 c4 1c add $0x1c,%esp 1120fd: 5b pop %ebx 1120fe: 5e pop %esi 1120ff: 5f pop %edi 112100: c9 leave 112101: c3 ret 112102: 66 90 xchg %ax,%ax <== NOT EXECUTED 112104: fb sti 112105: e9 62 ff ff ff jmp 11206c 11210a: 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; 11210c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112113: f6 45 0c 01 testb $0x1,0xc(%ebp) 112117: 0f 84 4f ff ff ff je 11206c 11211d: e9 3f ff ff ff jmp 112061 112122: 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; 112124: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 112129: 83 c4 1c add $0x1c,%esp 11212c: 5b pop %ebx 11212d: 5e pop %esi 11212e: 5f pop %edi 11212f: c9 leave 112130: c3 ret =============================================================================== 0010c590 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c590: 55 push %ebp 10c591: 89 e5 mov %esp,%ebp 10c593: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c596: 8d 45 f4 lea -0xc(%ebp),%eax 10c599: 50 push %eax 10c59a: ff 75 08 pushl 0x8(%ebp) 10c59d: e8 de 1b 00 00 call 10e180 <_Thread_Get> switch ( location ) { 10c5a2: 83 c4 10 add $0x10,%esp 10c5a5: 8b 4d f4 mov -0xc(%ebp),%ecx 10c5a8: 85 c9 test %ecx,%ecx 10c5aa: 75 20 jne 10c5cc case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c5ac: 52 push %edx 10c5ad: ff 75 0c pushl 0xc(%ebp) 10c5b0: 6a 00 push $0x0 10c5b2: 50 push %eax 10c5b3: e8 ec 23 00 00 call 10e9a4 <_Thread_Restart> 10c5b8: 83 c4 10 add $0x10,%esp 10c5bb: 84 c0 test %al,%al 10c5bd: 75 15 jne 10c5d4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c5bf: e8 98 1b 00 00 call 10e15c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c5c4: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5c9: c9 leave 10c5ca: c3 ret 10c5cb: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5cc: b8 04 00 00 00 mov $0x4,%eax } 10c5d1: c9 leave 10c5d2: c3 ret 10c5d3: 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(); 10c5d4: e8 83 1b 00 00 call 10e15c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c5d9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5db: c9 leave 10c5dc: c3 ret =============================================================================== 0010ed50 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ed50: 55 push %ebp 10ed51: 89 e5 mov %esp,%ebp 10ed53: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ed56: 8d 45 f4 lea -0xc(%ebp),%eax 10ed59: 50 push %eax 10ed5a: ff 75 08 pushl 0x8(%ebp) 10ed5d: e8 22 1c 00 00 call 110984 <_Thread_Get> switch ( location ) { 10ed62: 83 c4 10 add $0x10,%esp 10ed65: 8b 55 f4 mov -0xc(%ebp),%edx 10ed68: 85 d2 test %edx,%edx 10ed6a: 74 08 je 10ed74 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ed6c: b8 04 00 00 00 mov $0x4,%eax } 10ed71: c9 leave 10ed72: c3 ret 10ed73: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ed74: f6 40 10 02 testb $0x2,0x10(%eax) 10ed78: 75 0e jne 10ed88 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ed7a: e8 e1 1b 00 00 call 110960 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ed7f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed84: c9 leave 10ed85: c3 ret 10ed86: 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 ); 10ed88: 83 ec 08 sub $0x8,%esp 10ed8b: 6a 01 push $0x1 10ed8d: 50 push %eax 10ed8e: e8 15 24 00 00 call 1111a8 <_Thread_Resume> _Thread_Enable_dispatch(); 10ed93: e8 c8 1b 00 00 call 110960 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ed98: 83 c4 10 add $0x10,%esp 10ed9b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed9d: c9 leave 10ed9e: c3 ret =============================================================================== 0010d6d4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d6d4: 55 push %ebp 10d6d5: 89 e5 mov %esp,%ebp 10d6d7: 56 push %esi 10d6d8: 53 push %ebx 10d6d9: 83 ec 10 sub $0x10,%esp 10d6dc: 8b 45 08 mov 0x8(%ebp),%eax 10d6df: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6e2: 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() ) 10d6e5: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d6ec: 74 66 je 10d754 /* * 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 ) 10d6ee: 83 fb 0f cmp $0xf,%ebx 10d6f1: 77 39 ja 10d72c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6f3: 85 c0 test %eax,%eax 10d6f5: 74 41 je 10d738 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d6f7: 8b 15 18 99 12 00 mov 0x129918,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6fd: 3b 42 08 cmp 0x8(%edx),%eax 10d700: 74 3c je 10d73e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d702: 83 ec 08 sub $0x8,%esp 10d705: 8d 55 f4 lea -0xc(%ebp),%edx 10d708: 52 push %edx 10d709: 50 push %eax 10d70a: e8 7d 1d 00 00 call 10f48c <_Thread_Get> switch ( location ) { 10d70f: 83 c4 10 add $0x10,%esp 10d712: 8b 55 f4 mov -0xc(%ebp),%edx 10d715: 85 d2 test %edx,%edx 10d717: 75 47 jne 10d760 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d719: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d71f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d723: e8 40 1d 00 00 call 10f468 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d728: 31 c0 xor %eax,%eax 10d72a: eb 05 jmp 10d731 * 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; 10d72c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d731: 8d 65 f8 lea -0x8(%ebp),%esp 10d734: 5b pop %ebx 10d735: 5e pop %esi 10d736: c9 leave 10d737: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d738: 8b 15 18 99 12 00 mov 0x129918,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d73e: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d744: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d748: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d74a: 8d 65 f8 lea -0x8(%ebp),%esp 10d74d: 5b pop %ebx 10d74e: 5e pop %esi 10d74f: c9 leave 10d750: c3 ret 10d751: 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; 10d754: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d759: 8d 65 f8 lea -0x8(%ebp),%esp 10d75c: 5b pop %ebx 10d75d: 5e pop %esi 10d75e: c9 leave 10d75f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d760: b8 04 00 00 00 mov $0x4,%eax } 10d765: 8d 65 f8 lea -0x8(%ebp),%esp 10d768: 5b pop %ebx 10d769: 5e pop %esi 10d76a: c9 leave 10d76b: c3 ret =============================================================================== 0010fa24 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fa24: 55 push %ebp 10fa25: 89 e5 mov %esp,%ebp 10fa27: 56 push %esi 10fa28: 53 push %ebx 10fa29: 83 ec 10 sub $0x10,%esp 10fa2c: 8b 5d 0c mov 0xc(%ebp),%ebx 10fa2f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fa32: 85 db test %ebx,%ebx 10fa34: 74 0b je 10fa41 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 ) ); 10fa36: 0f b6 05 d4 62 12 00 movzbl 0x1262d4,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fa3d: 39 c3 cmp %eax,%ebx 10fa3f: 77 5f ja 10faa0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fa41: 85 f6 test %esi,%esi 10fa43: 74 67 je 10faac return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fa45: 83 ec 08 sub $0x8,%esp 10fa48: 8d 45 f4 lea -0xc(%ebp),%eax 10fa4b: 50 push %eax 10fa4c: ff 75 08 pushl 0x8(%ebp) 10fa4f: e8 80 1d 00 00 call 1117d4 <_Thread_Get> switch ( location ) { 10fa54: 83 c4 10 add $0x10,%esp 10fa57: 8b 55 f4 mov -0xc(%ebp),%edx 10fa5a: 85 d2 test %edx,%edx 10fa5c: 75 36 jne 10fa94 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fa5e: 8b 50 14 mov 0x14(%eax),%edx 10fa61: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fa63: 85 db test %ebx,%ebx 10fa65: 74 1c je 10fa83 the_thread->real_priority = new_priority; 10fa67: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fa6a: 8b 48 1c mov 0x1c(%eax),%ecx 10fa6d: 85 c9 test %ecx,%ecx 10fa6f: 74 05 je 10fa76 10fa71: 3b 58 14 cmp 0x14(%eax),%ebx 10fa74: 73 0d jae 10fa83 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10fa76: 52 push %edx 10fa77: 6a 00 push $0x0 10fa79: 53 push %ebx 10fa7a: 50 push %eax 10fa7b: e8 2c 18 00 00 call 1112ac <_Thread_Change_priority> 10fa80: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fa83: e8 28 1d 00 00 call 1117b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fa88: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa8a: 8d 65 f8 lea -0x8(%ebp),%esp 10fa8d: 5b pop %ebx 10fa8e: 5e pop %esi 10fa8f: c9 leave 10fa90: c3 ret 10fa91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fa94: b8 04 00 00 00 mov $0x4,%eax } 10fa99: 8d 65 f8 lea -0x8(%ebp),%esp 10fa9c: 5b pop %ebx 10fa9d: 5e pop %esi 10fa9e: c9 leave 10fa9f: 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; 10faa0: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10faa5: 8d 65 f8 lea -0x8(%ebp),%esp 10faa8: 5b pop %ebx 10faa9: 5e pop %esi 10faaa: c9 leave 10faab: 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; 10faac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fab1: 8d 65 f8 lea -0x8(%ebp),%esp 10fab4: 5b pop %ebx 10fab5: 5e pop %esi 10fab6: c9 leave 10fab7: c3 ret =============================================================================== 0010bb7c : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bb7c: 55 push %ebp 10bb7d: 89 e5 mov %esp,%ebp 10bb7f: 53 push %ebx 10bb80: 83 ec 14 sub $0x14,%esp 10bb83: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bb86: 85 db test %ebx,%ebx 10bb88: 74 4e je 10bbd8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bb8a: 83 ec 08 sub $0x8,%esp 10bb8d: 8d 45 f4 lea -0xc(%ebp),%eax 10bb90: 50 push %eax 10bb91: ff 75 08 pushl 0x8(%ebp) 10bb94: e8 c7 1a 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10bb99: 83 c4 10 add $0x10,%esp 10bb9c: 8b 55 f4 mov -0xc(%ebp),%edx 10bb9f: 85 d2 test %edx,%edx 10bba1: 75 29 jne 10bbcc case OBJECTS_LOCAL: if ( _Thread_Start( 10bba3: 83 ec 0c sub $0xc,%esp 10bba6: ff 75 10 pushl 0x10(%ebp) 10bba9: 6a 00 push $0x0 10bbab: 53 push %ebx 10bbac: 6a 00 push $0x0 10bbae: 50 push %eax 10bbaf: e8 84 25 00 00 call 10e138 <_Thread_Start> 10bbb4: 83 c4 20 add $0x20,%esp 10bbb7: 84 c0 test %al,%al 10bbb9: 75 29 jne 10bbe4 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bbbb: e8 7c 1a 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bbc0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc8: c9 leave 10bbc9: c3 ret 10bbca: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bbcc: b8 04 00 00 00 mov $0x4,%eax } 10bbd1: 8b 5d fc mov -0x4(%ebp),%ebx 10bbd4: c9 leave 10bbd5: c3 ret 10bbd6: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bbd8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbdd: 8b 5d fc mov -0x4(%ebp),%ebx 10bbe0: c9 leave 10bbe1: c3 ret 10bbe2: 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(); 10bbe4: e8 53 1a 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbe9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbeb: 8b 5d fc mov -0x4(%ebp),%ebx 10bbee: c9 leave 10bbef: c3 ret =============================================================================== 0011036c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 11036c: 55 push %ebp 11036d: 89 e5 mov %esp,%ebp 11036f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110372: 8d 45 f4 lea -0xc(%ebp),%eax 110375: 50 push %eax 110376: ff 75 08 pushl 0x8(%ebp) 110379: e8 e2 d2 ff ff call 10d660 <_Thread_Get> switch ( location ) { 11037e: 83 c4 10 add $0x10,%esp 110381: 8b 55 f4 mov -0xc(%ebp),%edx 110384: 85 d2 test %edx,%edx 110386: 74 08 je 110390 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110388: b8 04 00 00 00 mov $0x4,%eax } 11038d: c9 leave 11038e: c3 ret 11038f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110390: f6 40 10 02 testb $0x2,0x10(%eax) 110394: 74 0e je 1103a4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110396: e8 a1 d2 ff ff call 10d63c <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11039b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1103a0: c9 leave 1103a1: c3 ret 1103a2: 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 ); 1103a4: 83 ec 0c sub $0xc,%esp 1103a7: 50 push %eax 1103a8: e8 f7 08 00 00 call 110ca4 <_Thread_Suspend> _Thread_Enable_dispatch(); 1103ad: e8 8a d2 ff ff call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1103b2: 83 c4 10 add $0x10,%esp 1103b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1103b7: c9 leave 1103b8: c3 ret =============================================================================== 0010c4d4 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c4d4: 55 push %ebp 10c4d5: 89 e5 mov %esp,%ebp 10c4d7: 57 push %edi 10c4d8: 56 push %esi 10c4d9: 53 push %ebx 10c4da: 83 ec 1c sub $0x1c,%esp 10c4dd: 8b 5d 0c mov 0xc(%ebp),%ebx 10c4e0: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c4e3: 85 db test %ebx,%ebx 10c4e5: 0f 84 9d 00 00 00 je 10c588 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c4eb: 83 ec 08 sub $0x8,%esp 10c4ee: 8d 45 e4 lea -0x1c(%ebp),%eax 10c4f1: 50 push %eax 10c4f2: ff 75 08 pushl 0x8(%ebp) 10c4f5: e8 72 1c 00 00 call 10e16c <_Thread_Get> 10c4fa: 89 c6 mov %eax,%esi switch (location) { 10c4fc: 83 c4 10 add $0x10,%esp 10c4ff: 8b 45 e4 mov -0x1c(%ebp),%eax 10c502: 85 c0 test %eax,%eax 10c504: 74 0e je 10c514 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c506: b8 04 00 00 00 mov $0x4,%eax } 10c50b: 8d 65 f4 lea -0xc(%ebp),%esp 10c50e: 5b pop %ebx 10c50f: 5e pop %esi 10c510: 5f pop %edi 10c511: c9 leave 10c512: c3 ret 10c513: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c514: 8b 86 fc 00 00 00 mov 0xfc(%esi),%eax while (tvp) { 10c51a: 85 c0 test %eax,%eax 10c51c: 75 44 jne 10c562 10c51e: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c520: 83 ec 0c sub $0xc,%esp 10c523: 6a 14 push $0x14 10c525: e8 9a 2d 00 00 call 10f2c4 <_Workspace_Allocate> if (new == NULL) { 10c52a: 83 c4 10 add $0x10,%esp 10c52d: 85 c0 test %eax,%eax 10c52f: 74 4b je 10c57c _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c531: 8b 13 mov (%ebx),%edx 10c533: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c536: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c539: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c53c: 8b 96 fc 00 00 00 mov 0xfc(%esi),%edx 10c542: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c544: 89 86 fc 00 00 00 mov %eax,0xfc(%esi) _Thread_Enable_dispatch(); 10c54a: e8 f9 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c54f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c551: 8d 65 f4 lea -0xc(%ebp),%esp 10c554: 5b pop %ebx 10c555: 5e pop %esi 10c556: 5f pop %edi 10c557: c9 leave 10c558: c3 ret 10c559: 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; 10c55c: 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) { 10c55e: 85 c0 test %eax,%eax 10c560: 74 be je 10c520 if (tvp->ptr == ptr) { 10c562: 39 58 04 cmp %ebx,0x4(%eax) 10c565: 75 f5 jne 10c55c tvp->dtor = dtor; 10c567: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c56a: e8 d9 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c56f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c571: 8d 65 f4 lea -0xc(%ebp),%esp 10c574: 5b pop %ebx 10c575: 5e pop %esi 10c576: 5f pop %edi 10c577: c9 leave 10c578: c3 ret 10c579: 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(); 10c57c: e8 c7 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c581: b8 1a 00 00 00 mov $0x1a,%eax 10c586: eb 83 jmp 10c50b Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c588: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c58d: 8d 65 f4 lea -0xc(%ebp),%esp 10c590: 5b pop %ebx 10c591: 5e pop %esi 10c592: 5f pop %edi 10c593: c9 leave 10c594: c3 ret =============================================================================== 0010c598 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 76 je 10c61c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 b7 1b 00 00 call 10e16c <_Thread_Get> switch (location) { 10c5b5: 83 c4 10 add $0x10,%esp 10c5b8: 8b 55 f4 mov -0xc(%ebp),%edx 10c5bb: 85 d2 test %edx,%edx 10c5bd: 74 0d je 10c5cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5bf: b8 04 00 00 00 mov $0x4,%eax } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 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; 10c5cc: 8b 88 fc 00 00 00 mov 0xfc(%eax),%ecx while (tvp) { 10c5d2: 85 c9 test %ecx,%ecx 10c5d4: 74 17 je 10c5ed if (tvp->ptr == ptr) { 10c5d6: 39 59 04 cmp %ebx,0x4(%ecx) 10c5d9: 75 0c jne 10c5e7 10c5db: eb 49 jmp 10c626 10c5dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c5e0: 39 5a 04 cmp %ebx,0x4(%edx) 10c5e3: 74 17 je 10c5fc 10c5e5: 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; 10c5e7: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c5e9: 85 d2 test %edx,%edx 10c5eb: 75 f3 jne 10c5e0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c5ed: e8 56 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c5f2: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5f7: 8b 5d fc mov -0x4(%ebp),%ebx 10c5fa: c9 leave 10c5fb: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c5fc: 8b 1a mov (%edx),%ebx 10c5fe: 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 ); 10c600: 83 ec 08 sub $0x8,%esp 10c603: 52 push %edx 10c604: 50 push %eax 10c605: e8 b2 00 00 00 call 10c6bc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c60a: e8 39 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c60f: 83 c4 10 add $0x10,%esp 10c612: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c614: 8b 5d fc mov -0x4(%ebp),%ebx 10c617: c9 leave 10c618: c3 ret 10c619: 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; 10c61c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c621: 8b 5d fc mov -0x4(%ebp),%ebx 10c624: c9 leave 10c625: 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; 10c626: 8b 11 mov (%ecx),%edx 10c628: 89 90 fc 00 00 00 mov %edx,0xfc(%eax) 10c62e: 89 ca mov %ecx,%edx 10c630: eb ce jmp 10c600 =============================================================================== 0010c634 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c634: 55 push %ebp 10c635: 89 e5 mov %esp,%ebp 10c637: 56 push %esi 10c638: 53 push %ebx 10c639: 83 ec 10 sub $0x10,%esp 10c63c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c63f: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c642: 85 db test %ebx,%ebx 10c644: 74 56 je 10c69c return RTEMS_INVALID_ADDRESS; if ( !result ) 10c646: 85 f6 test %esi,%esi 10c648: 74 52 je 10c69c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c64a: 83 ec 08 sub $0x8,%esp 10c64d: 8d 45 f4 lea -0xc(%ebp),%eax 10c650: 50 push %eax 10c651: ff 75 08 pushl 0x8(%ebp) 10c654: e8 13 1b 00 00 call 10e16c <_Thread_Get> switch (location) { 10c659: 83 c4 10 add $0x10,%esp 10c65c: 8b 55 f4 mov -0xc(%ebp),%edx 10c65f: 85 d2 test %edx,%edx 10c661: 75 2d jne 10c690 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c663: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 10c669: 85 c0 test %eax,%eax 10c66b: 75 09 jne 10c676 10c66d: eb 39 jmp 10c6a8 10c66f: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c670: 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) { 10c672: 85 c0 test %eax,%eax 10c674: 74 32 je 10c6a8 <== NEVER TAKEN if (tvp->ptr == ptr) { 10c676: 39 58 04 cmp %ebx,0x4(%eax) 10c679: 75 f5 jne 10c670 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c67b: 8b 40 0c mov 0xc(%eax),%eax 10c67e: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c680: e8 c3 1a 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c685: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c687: 8d 65 f8 lea -0x8(%ebp),%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: c9 leave 10c68d: c3 ret 10c68e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c690: b8 04 00 00 00 mov $0x4,%eax } 10c695: 8d 65 f8 lea -0x8(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: c9 leave 10c69b: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c69c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6a1: 8d 65 f8 lea -0x8(%ebp),%esp 10c6a4: 5b pop %ebx 10c6a5: 5e pop %esi 10c6a6: c9 leave 10c6a7: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c6a8: e8 9b 1a 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c6ad: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6b5: 5b pop %ebx 10c6b6: 5e pop %esi 10c6b7: c9 leave 10c6b8: c3 ret =============================================================================== 0010bbf0 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bbf0: 55 push %ebp 10bbf1: 89 e5 mov %esp,%ebp 10bbf3: 53 push %ebx 10bbf4: 83 ec 04 sub $0x4,%esp 10bbf7: 8b 5d 08 mov 0x8(%ebp),%ebx 10bbfa: a1 d4 63 12 00 mov 0x1263d4,%eax 10bbff: 40 inc %eax 10bc00: a3 d4 63 12 00 mov %eax,0x1263d4 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bc05: 85 db test %ebx,%ebx 10bc07: 74 53 je 10bc5c _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bc09: 83 ec 08 sub $0x8,%esp 10bc0c: 6a 08 push $0x8 10bc0e: ff 35 78 66 12 00 pushl 0x126678 10bc14: e8 d7 22 00 00 call 10def0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bc19: a1 78 66 12 00 mov 0x126678,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bc1e: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bc21: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bc28: c7 40 64 88 d4 10 00 movl $0x10d488,0x64(%eax) the_watchdog->id = id; 10bc2f: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bc32: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bc39: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bc3c: 5a pop %edx 10bc3d: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bc3e: 83 c0 48 add $0x48,%eax 10bc41: 50 push %eax 10bc42: 68 a4 64 12 00 push $0x1264a4 10bc47: e8 0c 29 00 00 call 10e558 <_Watchdog_Insert> 10bc4c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bc4f: e8 e8 19 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc54: 31 c0 xor %eax,%eax 10bc56: 8b 5d fc mov -0x4(%ebp),%ebx 10bc59: c9 leave 10bc5a: c3 ret 10bc5b: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bc5c: e8 77 25 00 00 call 10e1d8 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bc61: e8 d6 19 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc66: 31 c0 xor %eax,%eax 10bc68: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6b: c9 leave 10bc6c: c3 ret =============================================================================== 0010ca38 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10ca38: 55 push %ebp 10ca39: 89 e5 mov %esp,%ebp 10ca3b: 53 push %ebx 10ca3c: 83 ec 14 sub $0x14,%esp 10ca3f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10ca42: 80 3d 08 84 12 00 00 cmpb $0x0,0x128408 10ca49: 0f 84 a9 00 00 00 je 10caf8 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10ca4f: 85 db test %ebx,%ebx 10ca51: 0f 84 ad 00 00 00 je 10cb04 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10ca57: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10ca5e: 83 ec 0c sub $0xc,%esp 10ca61: 53 push %ebx 10ca62: e8 d1 f3 ff ff call 10be38 <_TOD_Validate> 10ca67: 83 c4 10 add $0x10,%esp 10ca6a: 84 c0 test %al,%al 10ca6c: 75 0a jne 10ca78 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10ca6e: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca73: 8b 5d fc mov -0x4(%ebp),%ebx 10ca76: c9 leave 10ca77: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10ca78: 83 ec 0c sub $0xc,%esp 10ca7b: 53 push %ebx 10ca7c: e8 2b f3 ff ff call 10bdac <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10ca81: 83 c4 10 add $0x10,%esp 10ca84: 3b 05 88 84 12 00 cmp 0x128488,%eax 10ca8a: 76 e2 jbe 10ca6e 10ca8c: 8b 15 f4 83 12 00 mov 0x1283f4,%edx 10ca92: 42 inc %edx 10ca93: 89 15 f4 83 12 00 mov %edx,0x1283f4 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10ca99: 83 ec 08 sub $0x8,%esp 10ca9c: 6a 10 push $0x10 10ca9e: ff 35 98 86 12 00 pushl 0x128698 10caa4: 89 45 f4 mov %eax,-0xc(%ebp) 10caa7: e8 78 23 00 00 call 10ee24 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10caac: 8b 15 98 86 12 00 mov 0x128698,%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( 10cab2: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10cab5: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10cabc: c7 42 64 bc e3 10 00 movl $0x10e3bc,0x64(%edx) the_watchdog->id = id; 10cac3: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10cac6: 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( 10cacd: 8b 45 f4 mov -0xc(%ebp),%eax 10cad0: 2b 05 88 84 12 00 sub 0x128488,%eax 10cad6: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10cad9: 58 pop %eax 10cada: 59 pop %ecx 10cadb: 83 c2 48 add $0x48,%edx 10cade: 52 push %edx 10cadf: 68 b8 84 12 00 push $0x1284b8 10cae4: e8 1b 2a 00 00 call 10f504 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10cae9: e8 82 1a 00 00 call 10e570 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10caee: 83 c4 10 add $0x10,%esp 10caf1: 31 c0 xor %eax,%eax 10caf3: e9 7b ff ff ff jmp 10ca73 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10caf8: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cafd: 8b 5d fc mov -0x4(%ebp),%ebx 10cb00: c9 leave 10cb01: c3 ret 10cb02: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10cb04: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cb09: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0c: c9 leave 10cb0d: c3 ret =============================================================================== 0010a5dc : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a5dc: 55 push %ebp 10a5dd: 89 e5 mov %esp,%ebp 10a5df: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a5e2: 83 f8 09 cmp $0x9,%eax 10a5e5: 0f 84 f1 00 00 00 je 10a6dc 10a5eb: 7e 37 jle 10a624 10a5ed: 83 f8 0e cmp $0xe,%eax 10a5f0: 0f 84 f6 00 00 00 je 10a6ec 10a5f6: 7e 5c jle 10a654 10a5f8: 3d 02 10 00 00 cmp $0x1002,%eax 10a5fd: 0f 84 01 01 00 00 je 10a704 10a603: 0f 8e 97 00 00 00 jle 10a6a0 10a609: 3d 03 10 00 00 cmp $0x1003,%eax 10a60e: 0f 84 e0 00 00 00 je 10a6f4 10a614: 3d 04 10 00 00 cmp $0x1004,%eax 10a619: 75 51 jne 10a66c <== 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; 10a61b: b8 13 00 00 00 mov $0x13,%eax default: baud_index = -1; break; } return baud_index; } 10a620: c9 leave 10a621: c3 ret 10a622: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a624: 83 f8 04 cmp $0x4,%eax 10a627: 0f 84 b7 00 00 00 je 10a6e4 10a62d: 7f 45 jg 10a674 10a62f: 83 f8 01 cmp $0x1,%eax 10a632: 0f 84 8c 00 00 00 je 10a6c4 10a638: 0f 8e de 00 00 00 jle 10a71c 10a63e: 83 f8 02 cmp $0x2,%eax 10a641: 0f 84 c5 00 00 00 je 10a70c 10a647: 83 f8 03 cmp $0x3,%eax 10a64a: 75 20 jne 10a66c <== 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; 10a64c: b8 03 00 00 00 mov $0x3,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a651: c9 leave 10a652: c3 ret 10a653: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a654: 83 f8 0b cmp $0xb,%eax 10a657: 0f 84 9f 00 00 00 je 10a6fc 10a65d: 7c 39 jl 10a698 10a65f: 83 f8 0c cmp $0xc,%eax 10a662: 74 50 je 10a6b4 10a664: 83 f8 0d cmp $0xd,%eax 10a667: 74 62 je 10a6cb <== ALWAYS TAKEN 10a669: 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; 10a66c: b8 ff ff ff ff mov $0xffffffff,%eax } return baud_index; } 10a671: c9 leave 10a672: c3 ret 10a673: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a674: 83 f8 06 cmp $0x6,%eax 10a677: 74 43 je 10a6bc 10a679: 7c 15 jl 10a690 10a67b: 83 f8 07 cmp $0x7,%eax 10a67e: 0f 84 90 00 00 00 je 10a714 10a684: 83 f8 08 cmp $0x8,%eax 10a687: 75 e3 jne 10a66c <== 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; 10a689: b8 08 00 00 00 mov $0x8,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a68e: c9 leave 10a68f: 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; 10a690: b8 05 00 00 00 mov $0x5,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a695: c9 leave 10a696: c3 ret 10a697: 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; 10a698: b8 0a 00 00 00 mov $0xa,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a69d: c9 leave 10a69e: c3 ret 10a69f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a6a0: 83 f8 0f cmp $0xf,%eax 10a6a3: 74 2f je 10a6d4 10a6a5: 3d 01 10 00 00 cmp $0x1001,%eax 10a6aa: 75 c0 jne 10a66c <== 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; 10a6ac: b8 10 00 00 00 mov $0x10,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6b1: c9 leave 10a6b2: c3 ret 10a6b3: 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; 10a6b4: b8 0c 00 00 00 mov $0xc,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6b9: c9 leave 10a6ba: c3 ret 10a6bb: 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; 10a6bc: b8 06 00 00 00 mov $0x6,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6c1: c9 leave 10a6c2: c3 ret 10a6c3: 90 nop <== NOT EXECUTED { int baud_index; switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; 10a6c4: b8 01 00 00 00 mov $0x1,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6c9: c9 leave 10a6ca: 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; 10a6cb: b8 0d 00 00 00 mov $0xd,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6d0: c9 leave 10a6d1: c3 ret 10a6d2: 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; 10a6d4: b8 0f 00 00 00 mov $0xf,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6d9: c9 leave 10a6da: c3 ret 10a6db: 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; 10a6dc: b8 09 00 00 00 mov $0x9,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6e1: c9 leave 10a6e2: c3 ret 10a6e3: 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; 10a6e4: b8 04 00 00 00 mov $0x4,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6e9: c9 leave 10a6ea: c3 ret 10a6eb: 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; 10a6ec: b8 0e 00 00 00 mov $0xe,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6f1: c9 leave 10a6f2: c3 ret 10a6f3: 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; 10a6f4: b8 12 00 00 00 mov $0x12,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a6f9: c9 leave 10a6fa: c3 ret 10a6fb: 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; 10a6fc: b8 0b 00 00 00 mov $0xb,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a701: c9 leave 10a702: c3 ret 10a703: 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; 10a704: b8 11 00 00 00 mov $0x11,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a709: c9 leave 10a70a: c3 ret 10a70b: 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; 10a70c: b8 02 00 00 00 mov $0x2,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a711: c9 leave 10a712: c3 ret 10a713: 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; 10a714: b8 07 00 00 00 mov $0x7,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a719: c9 leave 10a71a: c3 ret 10a71b: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a71c: 85 c0 test %eax,%eax 10a71e: 0f 85 48 ff ff ff jne 10a66c case B0: baud_index = 0; break; 10a724: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a726: c9 leave 10a727: c3 ret =============================================================================== 00108ec4 : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 108ec4: 55 push %ebp 108ec5: 89 e5 mov %esp,%ebp 108ec7: 8b 45 08 mov 0x8(%ebp),%eax int32_t baud; switch (termios_baud) { 108eca: 83 f8 09 cmp $0x9,%eax 108ecd: 0f 84 f1 00 00 00 je 108fc4 108ed3: 7e 37 jle 108f0c 108ed5: 83 f8 0e cmp $0xe,%eax 108ed8: 0f 84 f6 00 00 00 je 108fd4 108ede: 7e 5c jle 108f3c 108ee0: 3d 02 10 00 00 cmp $0x1002,%eax 108ee5: 0f 84 01 01 00 00 je 108fec 108eeb: 0f 8e 97 00 00 00 jle 108f88 108ef1: 3d 03 10 00 00 cmp $0x1003,%eax 108ef6: 0f 84 e0 00 00 00 je 108fdc 108efc: 3d 04 10 00 00 cmp $0x1004,%eax 108f01: 75 51 jne 108f54 <== NEVER TAKEN case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 108f03: b8 00 08 07 00 mov $0x70800,%eax default: baud = -1; break; } return baud; } 108f08: c9 leave 108f09: c3 ret 108f0a: 66 90 xchg %ax,%ax <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108f0c: 83 f8 04 cmp $0x4,%eax 108f0f: 0f 84 b7 00 00 00 je 108fcc 108f15: 7f 45 jg 108f5c 108f17: 83 f8 01 cmp $0x1,%eax 108f1a: 0f 84 8c 00 00 00 je 108fac 108f20: 0f 8e de 00 00 00 jle 109004 108f26: 83 f8 02 cmp $0x2,%eax 108f29: 0f 84 c5 00 00 00 je 108ff4 108f2f: 83 f8 03 cmp $0x3,%eax 108f32: 75 20 jne 108f54 <== NEVER TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 108f34: b8 6e 00 00 00 mov $0x6e,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f39: c9 leave 108f3a: c3 ret 108f3b: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108f3c: 83 f8 0b cmp $0xb,%eax 108f3f: 0f 84 9f 00 00 00 je 108fe4 108f45: 7c 39 jl 108f80 108f47: 83 f8 0c cmp $0xc,%eax 108f4a: 74 50 je 108f9c 108f4c: 83 f8 0d cmp $0xd,%eax 108f4f: 74 62 je 108fb3 <== ALWAYS TAKEN 108f51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; default: baud = -1; break; 108f54: b8 ff ff ff ff mov $0xffffffff,%eax } return baud; } 108f59: c9 leave 108f5a: c3 ret 108f5b: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108f5c: 83 f8 06 cmp $0x6,%eax 108f5f: 74 43 je 108fa4 108f61: 7c 15 jl 108f78 108f63: 83 f8 07 cmp $0x7,%eax 108f66: 0f 84 90 00 00 00 je 108ffc 108f6c: 83 f8 08 cmp $0x8,%eax 108f6f: 75 e3 jne 108f54 <== NEVER TAKEN case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 108f71: b8 58 02 00 00 mov $0x258,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f76: c9 leave 108f77: c3 ret case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 108f78: b8 96 00 00 00 mov $0x96,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f7d: c9 leave 108f7e: c3 ret 108f7f: 90 nop <== NOT EXECUTED case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 108f80: b8 08 07 00 00 mov $0x708,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f85: c9 leave 108f86: c3 ret 108f87: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 108f88: 83 f8 0f cmp $0xf,%eax 108f8b: 74 2f je 108fbc 108f8d: 3d 01 10 00 00 cmp $0x1001,%eax 108f92: 75 c0 jne 108f54 <== NEVER TAKEN case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 108f94: b8 00 e1 00 00 mov $0xe100,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108f99: c9 leave 108f9a: c3 ret 108f9b: 90 nop <== NOT EXECUTED case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 108f9c: b8 c0 12 00 00 mov $0x12c0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fa1: c9 leave 108fa2: c3 ret 108fa3: 90 nop <== NOT EXECUTED case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 108fa4: b8 c8 00 00 00 mov $0xc8,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fa9: c9 leave 108faa: c3 ret 108fab: 90 nop <== NOT EXECUTED { int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; 108fac: b8 32 00 00 00 mov $0x32,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fb1: c9 leave 108fb2: c3 ret case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 108fb3: b8 80 25 00 00 mov $0x2580,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fb8: c9 leave 108fb9: c3 ret 108fba: 66 90 xchg %ax,%ax <== NOT EXECUTED case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 108fbc: b8 00 96 00 00 mov $0x9600,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fc1: c9 leave 108fc2: c3 ret 108fc3: 90 nop <== NOT EXECUTED case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 108fc4: b8 b0 04 00 00 mov $0x4b0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fc9: c9 leave 108fca: c3 ret 108fcb: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 108fcc: b8 86 00 00 00 mov $0x86,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fd1: c9 leave 108fd2: c3 ret 108fd3: 90 nop <== NOT EXECUTED case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 108fd4: b8 00 4b 00 00 mov $0x4b00,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fd9: c9 leave 108fda: c3 ret 108fdb: 90 nop <== NOT EXECUTED case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 108fdc: b8 00 84 03 00 mov $0x38400,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fe1: c9 leave 108fe2: c3 ret 108fe3: 90 nop <== NOT EXECUTED case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 108fe4: b8 60 09 00 00 mov $0x960,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108fe9: c9 leave 108fea: c3 ret 108feb: 90 nop <== NOT EXECUTED case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 108fec: b8 00 c2 01 00 mov $0x1c200,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ff1: c9 leave 108ff2: c3 ret 108ff3: 90 nop <== NOT EXECUTED int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 108ff4: b8 4b 00 00 00 mov $0x4b,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 108ff9: c9 leave 108ffa: c3 ret 108ffb: 90 nop <== NOT EXECUTED case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 108ffc: b8 2c 01 00 00 mov $0x12c,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109001: c9 leave 109002: c3 ret 109003: 90 nop <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 109004: 85 c0 test %eax,%eax 109006: 0f 85 48 ff ff ff jne 108f54 case B0: baud = 0; break; 10900c: 31 c0 xor %eax,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 10900e: c9 leave 10900f: c3 ret =============================================================================== 00109720 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 109720: 55 push %ebp <== NOT EXECUTED 109721: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 109723: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 109726: a3 b4 40 12 00 mov %eax,0x1240b4 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 10972b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10972e: a3 b8 40 12 00 mov %eax,0x1240b8 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 109733: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 109736: a3 bc 40 12 00 mov %eax,0x1240bc <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 10973b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10973d: c9 leave <== NOT EXECUTED 10973e: c3 ret <== NOT EXECUTED =============================================================================== 00109564 : } } rtems_status_code rtems_termios_close (void *arg) { 109564: 55 push %ebp 109565: 89 e5 mov %esp,%ebp 109567: 56 push %esi 109568: 53 push %ebx 109569: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10956c: 8b 06 mov (%esi),%eax 10956e: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain( 109571: 52 push %edx 109572: 6a 00 push $0x0 109574: 6a 00 push $0x0 109576: ff 35 ac 62 12 00 pushl 0x1262ac 10957c: e8 b7 21 00 00 call 10b738 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109581: 83 c4 10 add $0x10,%esp 109584: 85 c0 test %eax,%eax 109586: 0f 85 8a 01 00 00 jne 109716 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10958c: 8b 43 08 mov 0x8(%ebx),%eax 10958f: 48 dec %eax 109590: 89 43 08 mov %eax,0x8(%ebx) 109593: 85 c0 test %eax,%eax 109595: 0f 85 bf 00 00 00 jne 10965a if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10959b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1095a1: c1 e0 05 shl $0x5,%eax 1095a4: 8b 80 44 5f 12 00 mov 0x125f44(%eax),%eax 1095aa: 85 c0 test %eax,%eax 1095ac: 0f 84 0a 01 00 00 je 1096bc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1095b2: 83 ec 0c sub $0xc,%esp 1095b5: 53 push %ebx 1095b6: ff d0 call *%eax 1095b8: 83 c4 10 add $0x10,%esp rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1095bb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1095c2: 0f 84 1c 01 00 00 je 1096e4 <== 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) 1095c8: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 1095ce: 85 c0 test %eax,%eax 1095d0: 74 0d je 1095df (*tty->device.lastClose)(tty->major, tty->minor, arg); 1095d2: 51 push %ecx 1095d3: 56 push %esi 1095d4: ff 73 10 pushl 0x10(%ebx) 1095d7: ff 73 0c pushl 0xc(%ebx) 1095da: ff d0 call *%eax 1095dc: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 1095df: 8b 03 mov (%ebx),%eax 1095e1: 85 c0 test %eax,%eax 1095e3: 0f 84 b7 00 00 00 je 1096a0 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 1095e9: 8b 53 04 mov 0x4(%ebx),%edx 1095ec: 89 50 04 mov %edx,0x4(%eax) 1095ef: 8b 53 04 mov 0x4(%ebx),%edx } if (tty->back == NULL) { 1095f2: 85 d2 test %edx,%edx 1095f4: 0f 84 8a 00 00 00 je 109684 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 1095fa: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 1095fc: 83 ec 0c sub $0xc,%esp 1095ff: ff 73 14 pushl 0x14(%ebx) 109602: e8 8d 20 00 00 call 10b694 rtems_semaphore_delete (tty->osem); 109607: 5a pop %edx 109608: ff 73 18 pushl 0x18(%ebx) 10960b: e8 84 20 00 00 call 10b694 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 109610: 58 pop %eax 109611: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109617: e8 78 20 00 00 call 10b694 if ((tty->device.pollRead == NULL) || 10961c: 83 c4 10 add $0x10,%esp 10961f: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi 109625: 85 f6 test %esi,%esi 109627: 74 4b je 109674 109629: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109630: 74 42 je 109674 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 109632: 83 ec 0c sub $0xc,%esp 109635: ff 73 58 pushl 0x58(%ebx) 109638: e8 f3 e9 ff ff call 108030 free (tty->rawOutBuf.theBuf); 10963d: 59 pop %ecx 10963e: ff 73 7c pushl 0x7c(%ebx) 109641: e8 ea e9 ff ff call 108030 free (tty->cbuf); 109646: 5a pop %edx 109647: ff 73 1c pushl 0x1c(%ebx) 10964a: e8 e1 e9 ff ff call 108030 free (tty); 10964f: 89 1c 24 mov %ebx,(%esp) 109652: e8 d9 e9 ff ff call 108030 109657: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10965a: 83 ec 0c sub $0xc,%esp 10965d: ff 35 ac 62 12 00 pushl 0x1262ac 109663: e8 cc 21 00 00 call 10b834 return RTEMS_SUCCESSFUL; } 109668: 31 c0 xor %eax,%eax 10966a: 8d 65 f8 lea -0x8(%ebp),%esp 10966d: 5b pop %ebx 10966e: 5e pop %esi 10966f: c9 leave 109670: c3 ret 109671: 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); 109674: 83 ec 0c sub $0xc,%esp 109677: ff 73 68 pushl 0x68(%ebx) 10967a: e8 15 20 00 00 call 10b694 10967f: 83 c4 10 add $0x10,%esp 109682: eb ae jmp 109632 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 109684: a3 b4 62 12 00 mov %eax,0x1262b4 if ( rtems_termios_ttyHead != NULL ) { 109689: 85 c0 test %eax,%eax 10968b: 0f 84 6b ff ff ff je 1095fc rtems_termios_ttyHead->back = NULL; 109691: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 109698: e9 5f ff ff ff jmp 1095fc 10969d: 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; 1096a0: 8b 53 04 mov 0x4(%ebx),%edx 1096a3: 89 15 b0 62 12 00 mov %edx,0x1262b0 if ( rtems_termios_ttyTail != NULL ) { 1096a9: 85 d2 test %edx,%edx 1096ab: 74 d7 je 109684 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 1096ad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 1096b3: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 1096b5: e9 40 ff ff ff jmp 1095fa <== NOT EXECUTED 1096ba: 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); 1096bc: 50 push %eax 1096bd: 6a 00 push $0x0 1096bf: 6a 00 push $0x0 1096c1: ff 73 18 pushl 0x18(%ebx) 1096c4: e8 6f 20 00 00 call 10b738 if (sc != RTEMS_SUCCESSFUL) { 1096c9: 83 c4 10 add $0x10,%esp 1096cc: 85 c0 test %eax,%eax 1096ce: 75 46 jne 109716 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 1096d0: 89 d8 mov %ebx,%eax 1096d2: e8 75 f9 ff ff call 10904c } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1096d7: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1096de: 0f 85 e4 fe ff ff jne 1095c8 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 1096e4: 83 ec 08 sub $0x8,%esp 1096e7: 6a 01 push $0x1 1096e9: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 1096ef: e8 30 1b 00 00 call 10b224 if (sc != RTEMS_SUCCESSFUL) 1096f4: 83 c4 10 add $0x10,%esp 1096f7: 85 c0 test %eax,%eax 1096f9: 75 1b jne 109716 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 1096fb: 83 ec 08 sub $0x8,%esp 1096fe: 6a 01 push $0x1 109700: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 109706: e8 19 1b 00 00 call 10b224 if (sc != RTEMS_SUCCESSFUL) 10970b: 83 c4 10 add $0x10,%esp 10970e: 85 c0 test %eax,%eax 109710: 0f 84 b2 fe ff ff je 1095c8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 109716: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109719: 50 push %eax <== NOT EXECUTED 10971a: e8 55 26 00 00 call 10bd74 <== NOT EXECUTED =============================================================================== 0010abec : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 10abec: 55 push %ebp 10abed: 89 e5 mov %esp,%ebp 10abef: 83 ec 08 sub $0x8,%esp 10abf2: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 10abf5: 8b 55 0c mov 0xc(%ebp),%edx 10abf8: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10abfe: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10ac05: 74 2d je 10ac34 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 10ac07: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 10ac0e: 74 0c je 10ac1c rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ac10: 89 45 08 mov %eax,0x8(%ebp) } 10ac13: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 10ac14: e9 27 fd ff ff jmp 10a940 10ac19: 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) { 10ac1c: 8b 15 f4 5f 12 00 mov 0x125ff4,%edx 10ac22: 85 d2 test %edx,%edx 10ac24: 74 09 je 10ac2f <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10ac26: 83 ec 0c sub $0xc,%esp 10ac29: 50 push %eax 10ac2a: ff d2 call *%edx 10ac2c: 83 c4 10 add $0x10,%esp } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } 10ac2f: 31 c0 xor %eax,%eax 10ac31: c9 leave 10ac32: c3 ret 10ac33: 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); 10ac34: 83 ec 08 sub $0x8,%esp 10ac37: 6a 02 push $0x2 10ac39: ff b0 c8 00 00 00 pushl 0xc8(%eax) 10ac3f: e8 e0 05 00 00 call 10b224 if (sc != RTEMS_SUCCESSFUL) 10ac44: 83 c4 10 add $0x10,%esp 10ac47: 85 c0 test %eax,%eax 10ac49: 74 e4 je 10ac2f <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10ac4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ac4e: 50 push %eax <== NOT EXECUTED 10ac4f: e8 20 11 00 00 call 10bd74 <== NOT EXECUTED =============================================================================== 0010a5c8 : * 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) { 10a5c8: 55 push %ebp 10a5c9: 89 e5 mov %esp,%ebp 10a5cb: 57 push %edi 10a5cc: 56 push %esi 10a5cd: 53 push %ebx 10a5ce: 83 ec 3c sub $0x3c,%esp 10a5d1: 8b 5d 08 mov 0x8(%ebp),%ebx 10a5d4: 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) { 10a5d7: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a5dd: c1 e0 05 shl $0x5,%eax 10a5e0: 8b 80 50 5f 12 00 mov 0x125f50(%eax),%eax 10a5e6: 85 c0 test %eax,%eax 10a5e8: 0f 84 8a 00 00 00 je 10a678 while (len--) { 10a5ee: 8b 4d 10 mov 0x10(%ebp),%ecx 10a5f1: 85 c9 test %ecx,%ecx 10a5f3: 74 2a je 10a61f <== NEVER TAKEN 10a5f5: 31 ff xor %edi,%edi 10a5f7: eb 12 jmp 10a60b 10a5f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10a5fc: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a602: c1 e0 05 shl $0x5,%eax 10a605: 8b 80 50 5f 12 00 mov 0x125f50(%eax),%eax c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 10a60b: 83 ec 08 sub $0x8,%esp 10a60e: 53 push %ebx 10a60f: 0f be 14 3e movsbl (%esi,%edi,1),%edx 10a613: 52 push %edx 10a614: ff d0 call *%eax 10a616: 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--) { 10a617: 83 c4 10 add $0x10,%esp 10a61a: 3b 7d 10 cmp 0x10(%ebp),%edi 10a61d: 75 dd jne 10a5fc } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 10a61f: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx 10a625: 85 d2 test %edx,%edx 10a627: 75 3b jne 10a664 <== NEVER TAKEN 10a629: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a62f: 85 c0 test %eax,%eax 10a631: 74 31 je 10a664 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a633: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a636: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10a63c: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10a63f: 52 push %edx <== NOT EXECUTED 10a640: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10a642: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10a649: 00 00 00 10a64c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; 10a64f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a656: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a659: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a65c: 5b pop %ebx <== NOT EXECUTED 10a65d: 5e pop %esi <== NOT EXECUTED 10a65e: 5f pop %edi <== NOT EXECUTED 10a65f: c9 leave <== NOT EXECUTED 10a660: c3 ret <== NOT EXECUTED 10a661: 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; 10a664: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10a66b: 8b 45 e0 mov -0x20(%ebp),%eax 10a66e: 8d 65 f4 lea -0xc(%ebp),%esp 10a671: 5b pop %ebx 10a672: 5e pop %esi 10a673: 5f pop %edi 10a674: c9 leave 10a675: c3 ret 10a676: 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) { 10a678: 8b 7d 10 mov 0x10(%ebp),%edi 10a67b: c6 45 db 00 movb $0x0,-0x25(%ebp) 10a67f: 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); 10a686: 8d 43 30 lea 0x30(%ebx),%eax 10a689: 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, 10a68c: 8d 53 4a lea 0x4a(%ebx),%edx 10a68f: 89 55 cc mov %edx,-0x34(%ebp) tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a692: 85 ff test %edi,%edi 10a694: 0f 84 0b 01 00 00 je 10a7a5 <== NEVER TAKEN 10a69a: 66 90 xchg %ax,%ax c = *buf++; 10a69c: 8a 06 mov (%esi),%al 10a69e: 88 45 e7 mov %al,-0x19(%ebp) 10a6a1: 46 inc %esi /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10a6a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a6a8: f6 c4 02 test $0x2,%ah 10a6ab: 74 1c je 10a6c9 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10a6ad: 0f be 45 e7 movsbl -0x19(%ebp),%eax 10a6b1: 0f b6 53 4a movzbl 0x4a(%ebx),%edx 10a6b5: 39 d0 cmp %edx,%eax 10a6b7: 0f 84 07 01 00 00 je 10a7c4 <== NEVER TAKEN /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 10a6bd: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10a6c1: 39 d0 cmp %edx,%eax 10a6c3: 0f 84 4f 01 00 00 je 10a818 <== NEVER TAKEN /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 10a6c9: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 10a6cd: 0f 85 0c 01 00 00 jne 10a7df <== NEVER TAKEN } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 10a6d3: 8b 43 60 mov 0x60(%ebx),%eax 10a6d6: 8b 53 64 mov 0x64(%ebx),%edx 10a6d9: 89 55 dc mov %edx,-0x24(%ebp) 10a6dc: 40 inc %eax 10a6dd: 31 d2 xor %edx,%edx 10a6df: f7 75 dc divl -0x24(%ebp) 10a6e2: 89 d1 mov %edx,%ecx /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 10a6e4: 9c pushf 10a6e5: fa cli 10a6e6: 8f 45 d4 popl -0x2c(%ebp) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 10a6e9: 8b 43 5c mov 0x5c(%ebx),%eax 10a6ec: 89 45 c4 mov %eax,-0x3c(%ebp) 10a6ef: 8b 43 64 mov 0x64(%ebx),%eax % tty->rawInBuf.Size) > tty->highwater) && 10a6f2: 8b 53 64 mov 0x64(%ebx),%edx 10a6f5: 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) 10a6f8: 2b 45 c4 sub -0x3c(%ebp),%eax 10a6fb: 01 c8 add %ecx,%eax % tty->rawInBuf.Size) > tty->highwater) && 10a6fd: 31 d2 xor %edx,%edx 10a6ff: 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) 10a702: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx 10a708: 76 46 jbe 10a750 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 10a70a: 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) && 10a710: a8 01 test $0x1,%al <== NOT EXECUTED 10a712: 75 3c jne 10a750 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 10a714: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a71a: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 10a71d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 10a723: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a729: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 10a72e: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 10a733: 0f 84 22 01 00 00 je 10a85b <== 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) ) { 10a739: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a73f: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 10a744: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 10a749: 0f 84 50 01 00 00 je 10a89f <== NOT EXECUTED 10a74f: 90 nop <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 10a750: ff 75 d4 pushl -0x2c(%ebp) 10a753: 9d popf if (newTail == tty->rawInBuf.Head) { 10a754: 8b 43 5c mov 0x5c(%ebx),%eax 10a757: 39 c8 cmp %ecx,%eax 10a759: 0f 84 b1 00 00 00 je 10a810 <== NEVER TAKEN dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 10a75f: 8b 43 58 mov 0x58(%ebx),%eax 10a762: 8a 55 e7 mov -0x19(%ebp),%dl 10a765: 88 14 08 mov %dl,(%eax,%ecx,1) tty->rawInBuf.Tail = newTail; 10a768: 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 )) { 10a76b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax 10a771: 85 c0 test %eax,%eax 10a773: 75 27 jne 10a79c <== NEVER TAKEN 10a775: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10a77b: 85 c0 test %eax,%eax 10a77d: 74 1d je 10a79c <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 10a77f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a782: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 10a788: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 10a78b: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 10a78d: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10a794: 00 00 00 10a797: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a79a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10a79c: 4f dec %edi tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 10a79d: 85 ff test %edi,%edi 10a79f: 0f 85 f7 fe ff ff jne 10a69c <== NEVER TAKEN } } } } tty->rawInBufDropped += dropped; 10a7a5: 8b 45 e0 mov -0x20(%ebp),%eax 10a7a8: 01 43 78 add %eax,0x78(%ebx) rtems_semaphore_release (tty->rawInBuf.Semaphore); 10a7ab: 83 ec 0c sub $0xc,%esp 10a7ae: ff 73 68 pushl 0x68(%ebx) 10a7b1: e8 7e 10 00 00 call 10b834 return dropped; 10a7b6: 83 c4 10 add $0x10,%esp } 10a7b9: 8b 45 e0 mov -0x20(%ebp),%eax 10a7bc: 8d 65 f4 lea -0xc(%ebp),%esp 10a7bf: 5b pop %ebx 10a7c0: 5e pop %esi 10a7c1: 5f pop %edi 10a7c2: c9 leave 10a7c3: 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]) { 10a7c4: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 10a7c8: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a7ca: 74 7e je 10a84a <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 10a7cc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7d2: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 10a7d5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 10a7db: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 10a7df: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7e5: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 10a7e8: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 10a7eb: 75 af jne 10a79c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10a7ed: 9c pushf <== NOT EXECUTED 10a7ee: fa cli <== NOT EXECUTED 10a7ef: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a7f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a7f6: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a7f9: 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) { 10a7ff: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a805: 85 c0 test %eax,%eax <== NOT EXECUTED 10a807: 75 20 jne 10a829 <== 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); 10a809: 52 push %edx <== NOT EXECUTED 10a80a: 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; 10a80b: 4f dec %edi <== NOT EXECUTED 10a80c: eb 8f jmp 10a79d <== NOT EXECUTED 10a80e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 10a810: 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; 10a813: 4f dec %edi <== NOT EXECUTED 10a814: eb 87 jmp 10a79d <== NOT EXECUTED 10a816: 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; 10a818: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a81e: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10a821: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a827: eb b2 jmp 10a7db <== 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); 10a829: 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)( 10a82f: 51 push %ecx <== NOT EXECUTED 10a830: 6a 01 push $0x1 <== NOT EXECUTED 10a832: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 10a835: 50 push %eax <== NOT EXECUTED 10a836: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a839: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10a83c: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a842: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a845: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10a848: eb bf jmp 10a809 <== 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; 10a84a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a850: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 10a853: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 10a859: eb 80 jmp 10a7db <== 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) || 10a85b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a861: a8 20 test $0x20,%al <== NOT EXECUTED 10a863: 75 0e jne 10a873 <== NOT EXECUTED 10a865: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 10a86b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a86d: 0f 85 dd fe ff ff jne 10a750 <== 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; 10a873: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a879: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10a87c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 10a882: 52 push %edx <== NOT EXECUTED 10a883: 6a 01 push $0x1 <== NOT EXECUTED 10a885: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10a888: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a88b: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a88e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a894: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a897: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a89a: e9 b1 fe ff ff jmp 10a750 <== 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; 10a89f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a8a5: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 10a8a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 10a8ae: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 10a8b4: 85 c0 test %eax,%eax <== NOT EXECUTED 10a8b6: 0f 84 94 fe ff ff je 10a750 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 10a8bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a8bf: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a8c2: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 10a8c5: ff d0 call *%eax <== NOT EXECUTED 10a8c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a8ca: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 10a8cd: e9 7e fe ff ff jmp 10a750 <== NOT EXECUTED =============================================================================== 00109010 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 109010: 55 push %ebp 109011: 89 e5 mov %esp,%ebp 109013: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 109016: a1 ac 62 12 00 mov 0x1262ac,%eax 10901b: 85 c0 test %eax,%eax 10901d: 74 05 je 109024 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 10901f: c9 leave 109020: c3 ret 109021: 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 ( 109024: 83 ec 0c sub $0xc,%esp 109027: 68 ac 62 12 00 push $0x1262ac 10902c: 6a 00 push $0x0 10902e: 6a 54 push $0x54 109030: 6a 01 push $0x1 109032: 68 69 6d 52 54 push $0x54526d69 109037: e8 80 24 00 00 call 10b4bc 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) 10903c: 83 c4 20 add $0x20,%esp 10903f: 85 c0 test %eax,%eax 109041: 74 dc je 10901f rtems_fatal_error_occurred (sc); 109043: 83 ec 0c sub $0xc,%esp 109046: 50 push %eax 109047: e8 28 2d 00 00 call 10bd74 =============================================================================== 00109740 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 109740: 55 push %ebp 109741: 89 e5 mov %esp,%ebp 109743: 57 push %edi 109744: 56 push %esi 109745: 53 push %ebx 109746: 83 ec 20 sub $0x20,%esp 109749: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10974c: 8b 03 mov (%ebx),%eax 10974e: 8b 40 34 mov 0x34(%eax),%eax 109751: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 109754: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 109757: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10975e: 6a 00 push $0x0 109760: 6a 00 push $0x0 109762: ff 70 18 pushl 0x18(%eax) 109765: e8 ce 1f 00 00 call 10b738 10976a: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 10976d: 83 c4 10 add $0x10,%esp 109770: 85 c0 test %eax,%eax 109772: 75 24 jne 109798 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 109774: 8b 43 04 mov 0x4(%ebx),%eax 109777: 83 f8 04 cmp $0x4,%eax 10977a: 74 70 je 1097ec <== NEVER TAKEN 10977c: 77 2a ja 1097a8 10977e: 83 f8 02 cmp $0x2,%eax 109781: 0f 84 9d 00 00 00 je 109824 109787: 0f 86 3f 02 00 00 jbe 1099cc if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 10978d: 8b 45 e4 mov -0x1c(%ebp),%eax 109790: e8 b7 f8 ff ff call 10904c break; 109795: eb 69 jmp 109800 109797: 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; 109798: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 10979b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10979e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1097a1: 5b pop %ebx <== NOT EXECUTED 1097a2: 5e pop %esi <== NOT EXECUTED 1097a3: 5f pop %edi <== NOT EXECUTED 1097a4: c9 leave <== NOT EXECUTED 1097a5: c3 ret <== NOT EXECUTED 1097a6: 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) { 1097a8: 3d 7f 66 04 40 cmp $0x4004667f,%eax 1097ad: 0f 84 f1 01 00 00 je 1099a4 <== NEVER TAKEN 1097b3: 0f 87 33 02 00 00 ja 1099ec 1097b9: 83 f8 05 cmp $0x5,%eax 1097bc: 0f 84 ae 02 00 00 je 109a70 <== NEVER TAKEN default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 1097c2: 8b 55 e4 mov -0x1c(%ebp),%edx 1097c5: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 1097cb: c1 e0 05 shl $0x5,%eax 1097ce: 8b 80 58 5f 12 00 mov 0x125f58(%eax),%eax 1097d4: 85 c0 test %eax,%eax 1097d6: 0f 84 b8 02 00 00 je 109a94 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 1097dc: 83 ec 08 sub $0x8,%esp 1097df: 53 push %ebx 1097e0: 52 push %edx 1097e1: ff d0 call *%eax 1097e3: 89 45 e0 mov %eax,-0x20(%ebp) 1097e6: 83 c4 10 add $0x10,%esp 1097e9: eb 15 jmp 109800 1097eb: 90 nop <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 1097ec: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1097ee: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 1097f1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1097f4: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED 1097fa: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 109800: 83 ec 0c sub $0xc,%esp 109803: 8b 45 e4 mov -0x1c(%ebp),%eax 109806: ff 70 18 pushl 0x18(%eax) 109809: e8 26 20 00 00 call 10b834 args->ioctl_return = sc; 10980e: 8b 55 e0 mov -0x20(%ebp),%edx 109811: 89 53 0c mov %edx,0xc(%ebx) return sc; 109814: 83 c4 10 add $0x10,%esp } 109817: 8b 45 e0 mov -0x20(%ebp),%eax 10981a: 8d 65 f4 lea -0xc(%ebp),%esp 10981d: 5b pop %ebx 10981e: 5e pop %esi 10981f: 5f pop %edi 109820: c9 leave 109821: c3 ret 109822: 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; 109824: 8b 73 08 mov 0x8(%ebx),%esi 109827: 8b 4d e4 mov -0x1c(%ebp),%ecx 10982a: 83 c1 30 add $0x30,%ecx 10982d: 89 4d dc mov %ecx,-0x24(%ebp) 109830: b9 09 00 00 00 mov $0x9,%ecx 109835: 8b 7d dc mov -0x24(%ebp),%edi 109838: 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) && 10983a: 8b 55 e4 mov -0x1c(%ebp),%edx 10983d: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 109843: f6 c4 02 test $0x2,%ah 109846: 74 44 je 10988c 109848: f6 42 31 04 testb $0x4,0x31(%edx) 10984c: 75 3e jne 10988c <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 10984e: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109854: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 109859: 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) { 10985f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109865: a8 20 test $0x20,%al <== NOT EXECUTED 109867: 74 23 je 10988c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109869: 9c pushf <== NOT EXECUTED 10986a: fa cli <== NOT EXECUTED 10986b: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10986c: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109872: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 109875: 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) { 10987b: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 109881: 85 ff test %edi,%edi <== NOT EXECUTED 109883: 0f 85 bb 02 00 00 jne 109b44 <== 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); 109889: 56 push %esi <== NOT EXECUTED 10988a: 9d popf <== NOT EXECUTED 10988b: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 10988c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10988f: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 109895: f6 c4 04 test $0x4,%ah 109898: 74 24 je 1098be <== ALWAYS TAKEN 10989a: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED 10989e: 75 1e jne 1098be <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 1098a0: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1098a6: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 1098a9: 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); 1098af: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 1098b5: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1098b8: 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)) { 1098be: 8b 55 e4 mov -0x1c(%ebp),%edx 1098c1: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 1098c7: f6 c4 01 test $0x1,%ah 1098ca: 0f 84 bc 01 00 00 je 109a8c <== ALWAYS TAKEN 1098d0: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1098d3: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED 1098d6: 85 c0 test %eax,%eax <== NOT EXECUTED 1098d8: 0f 88 12 02 00 00 js 109af0 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 1098de: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 1098e4: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED 1098e7: 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)) { 1098ed: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 1098f3: 83 e2 04 and $0x4,%edx <== NOT EXECUTED 1098f6: 74 1b je 109913 <== NOT EXECUTED 1098f8: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED 1098fe: 85 d2 test %edx,%edx <== NOT EXECUTED 109900: 74 11 je 109913 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 109902: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109905: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED 109908: ff d2 call *%edx <== NOT EXECUTED 10990a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10990d: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED 109910: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 109913: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 109916: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10991c: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED 10991f: 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) { 109925: 85 c0 test %eax,%eax 109927: 0f 88 c3 01 00 00 js 109af0 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 10992d: 8b 4d e4 mov -0x1c(%ebp),%ecx 109930: 8b 41 30 mov 0x30(%ecx),%eax 109933: f6 c4 10 test $0x10,%ah 109936: 74 0f je 109947 tty->flow_ctrl |= FL_MDXOF; 109938: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx 10993e: 80 ce 04 or $0x4,%dh 109941: 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) { 109947: f6 c4 04 test $0x4,%ah 10994a: 74 12 je 10995e tty->flow_ctrl |= FL_MDXON; 10994c: 8b 55 e4 mov -0x1c(%ebp),%edx 10994f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 109955: 80 cc 02 or $0x2,%ah 109958: 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) { 10995e: 8b 4d e4 mov -0x1c(%ebp),%ecx 109961: f6 41 3c 02 testb $0x2,0x3c(%ecx) 109965: 0f 84 41 01 00 00 je 109aac tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10996b: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 109972: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109979: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 109980: 8b 55 e4 mov -0x1c(%ebp),%edx 109983: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 109989: 85 c0 test %eax,%eax 10998b: 0f 84 6f fe ff ff je 109800 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 109991: 83 ec 08 sub $0x8,%esp 109994: ff 75 dc pushl -0x24(%ebp) 109997: ff 72 10 pushl 0x10(%edx) 10999a: ff d0 call *%eax 10999c: 83 c4 10 add $0x10,%esp 10999f: e9 5c fe ff ff jmp 109800 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 1099a4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1099a7: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 1099aa: 89 d1 mov %edx,%ecx <== NOT EXECUTED 1099ac: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 1099af: 29 d0 sub %edx,%eax <== NOT EXECUTED 1099b1: 0f 88 e9 00 00 00 js 109aa0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 1099b7: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 1099ba: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1099bd: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 1099c0: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 1099c3: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; 1099c5: e9 36 fe ff ff jmp 109800 <== NOT EXECUTED 1099ca: 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) { 1099cc: 48 dec %eax 1099cd: 0f 85 ef fd ff ff jne 1097c2 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 1099d3: 8b 43 08 mov 0x8(%ebx),%eax 1099d6: 8b 75 e4 mov -0x1c(%ebp),%esi 1099d9: 83 c6 30 add $0x30,%esi 1099dc: b9 09 00 00 00 mov $0x9,%ecx 1099e1: 89 c7 mov %eax,%edi 1099e3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 1099e5: e9 16 fe ff ff jmp 109800 1099ea: 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) { 1099ec: 3d 1a 74 04 40 cmp $0x4004741a,%eax 1099f1: 74 69 je 109a5c 1099f3: 3d 1b 74 04 80 cmp $0x8004741b,%eax 1099f8: 0f 85 c4 fd ff ff jne 1097c2 <== NEVER TAKEN #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1099fe: 8b 55 e4 mov -0x1c(%ebp),%edx 109a01: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax 109a07: c1 e0 05 shl $0x5,%eax 109a0a: 8b 80 44 5f 12 00 mov 0x125f44(%eax),%eax 109a10: 85 c0 test %eax,%eax 109a12: 74 0c je 109a20 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 109a14: 83 ec 0c sub $0xc,%esp 109a17: 52 push %edx 109a18: ff d0 call *%eax 109a1a: 89 45 e0 mov %eax,-0x20(%ebp) 109a1d: 83 c4 10 add $0x10,%esp } tty->t_line=*(int*)(args->buffer); 109a20: 8b 43 08 mov 0x8(%ebx),%eax 109a23: 8b 00 mov (%eax),%eax 109a25: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a28: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) tty->t_sc = NULL; /* ensure that no more valid data */ 109a2e: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) 109a35: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 109a38: c1 e0 05 shl $0x5,%eax 109a3b: 8b 80 40 5f 12 00 mov 0x125f40(%eax),%eax 109a41: 85 c0 test %eax,%eax 109a43: 0f 84 b7 fd ff ff je 109800 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 109a49: 83 ec 0c sub $0xc,%esp 109a4c: 51 push %ecx 109a4d: ff d0 call *%eax 109a4f: 89 45 e0 mov %eax,-0x20(%ebp) 109a52: 83 c4 10 add $0x10,%esp 109a55: e9 a6 fd ff ff jmp 109800 109a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 109a5c: 8b 43 08 mov 0x8(%ebx),%eax 109a5f: 8b 4d e4 mov -0x1c(%ebp),%ecx 109a62: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx 109a68: 89 10 mov %edx,(%eax) break; 109a6a: e9 91 fd ff ff jmp 109800 109a6f: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 109a70: 8b 06 mov (%esi),%eax <== NOT EXECUTED 109a72: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 109a75: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 109a78: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED 109a7e: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED break; 109a84: e9 77 fd ff ff jmp 109800 <== NOT EXECUTED 109a89: 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)) { 109a8c: 8b 42 38 mov 0x38(%edx),%eax 109a8f: e9 91 fe ff ff jmp 109925 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; 109a94: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 109a9b: e9 60 fd ff ff jmp 109800 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 109aa0: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 109aa3: 01 d0 add %edx,%eax <== NOT EXECUTED 109aa5: e9 0d ff ff ff jmp 1099b7 <== NOT EXECUTED 109aaa: 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] * 109aac: 8b 45 e4 mov -0x1c(%ebp),%eax 109aaf: 0f b6 70 46 movzbl 0x46(%eax),%esi rtems_clock_get_ticks_per_second() / 10; 109ab3: e8 64 15 00 00 call 10b01c 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] * 109ab8: 0f af c6 imul %esi,%eax rtems_clock_get_ticks_per_second() / 10; 109abb: ba cd cc cc cc mov $0xcccccccd,%edx 109ac0: f7 e2 mul %edx 109ac2: 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] * 109ac5: 8b 4d e4 mov -0x1c(%ebp),%ecx 109ac8: 89 51 54 mov %edx,0x54(%ecx) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 109acb: 80 79 46 00 cmpb $0x0,0x46(%ecx) 109acf: 74 36 je 109b07 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109ad1: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 109ad8: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 109adb: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED 109adf: 74 49 je 109b2a <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109ae1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED 109ae8: e9 93 fe ff ff jmp 109980 <== NOT EXECUTED 109aed: 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; 109af0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109af3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 109af9: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 109afc: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 109b02: e9 26 fe ff ff jmp 10992d <== 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]) { 109b07: 8b 55 e4 mov -0x1c(%ebp),%edx 109b0a: 80 7a 47 00 cmpb $0x0,0x47(%edx) 109b0e: 74 25 je 109b35 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 109b10: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 109b17: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 109b1e: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 109b25: e9 56 fe ff ff jmp 109980 <== 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; 109b2a: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 109b2d: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED 109b30: e9 4b fe ff ff jmp 109980 <== NOT EXECUTED 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; 109b35: 8b 4d e4 mov -0x1c(%ebp),%ecx 109b38: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) 109b3f: e9 3c fe ff ff jmp 109980 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); 109b44: 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)( 109b4a: 51 push %ecx <== NOT EXECUTED 109b4b: 6a 01 push $0x1 <== NOT EXECUTED 109b4d: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 109b50: 50 push %eax <== NOT EXECUTED 109b51: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 109b54: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 109b5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b5d: e9 27 fd ff ff jmp 109889 <== NOT EXECUTED =============================================================================== 0010a8b0 : #include int rtems_termios_number_to_baud( int32_t baud ) { 10a8b0: 55 push %ebp 10a8b1: 89 e5 mov %esp,%ebp 10a8b3: 8b 45 08 mov 0x8(%ebp),%eax int termios_baud; switch (baud) { 10a8b6: 3d b0 04 00 00 cmp $0x4b0,%eax 10a8bb: 0f 84 47 01 00 00 je 10aa08 10a8c1: 7e 3d jle 10a900 10a8c3: 3d 00 4b 00 00 cmp $0x4b00,%eax 10a8c8: 0f 84 4a 01 00 00 je 10aa18 10a8ce: 7e 64 jle 10a934 10a8d0: 3d 00 c2 01 00 cmp $0x1c200,%eax 10a8d5: 0f 84 15 01 00 00 je 10a9f0 10a8db: 0f 8e af 00 00 00 jle 10a990 10a8e1: 3d 00 84 03 00 cmp $0x38400,%eax 10a8e6: 0f 84 fc 00 00 00 je 10a9e8 10a8ec: 3d 00 08 07 00 cmp $0x70800,%eax 10a8f1: 0f 85 89 00 00 00 jne 10a980 <== NEVER TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 10a8f7: b8 04 10 00 00 mov $0x1004,%eax default: termios_baud = -1; break; } return termios_baud; } 10a8fc: c9 leave 10a8fd: c3 ret 10a8fe: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a900: 3d 86 00 00 00 cmp $0x86,%eax 10a905: 0f 84 05 01 00 00 je 10aa10 10a90b: 7e 4f jle 10a95c 10a90d: 3d c8 00 00 00 cmp $0xc8,%eax 10a912: 0f 84 b8 00 00 00 je 10a9d0 10a918: 7e 5e jle 10a978 10a91a: 3d 2c 01 00 00 cmp $0x12c,%eax 10a91f: 0f 84 9b 00 00 00 je 10a9c0 10a925: 3d 58 02 00 00 cmp $0x258,%eax 10a92a: 75 54 jne 10a980 <== NEVER TAKEN case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 10a92c: b8 08 00 00 00 mov $0x8,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a931: c9 leave 10a932: c3 ret 10a933: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a934: 3d 60 09 00 00 cmp $0x960,%eax 10a939: 0f 84 c1 00 00 00 je 10aa00 10a93f: 7e 67 jle 10a9a8 10a941: 3d c0 12 00 00 cmp $0x12c0,%eax 10a946: 0f 84 8c 00 00 00 je 10a9d8 10a94c: 3d 80 25 00 00 cmp $0x2580,%eax 10a951: 75 2d jne 10a980 <== NEVER TAKEN case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 10a953: b8 0d 00 00 00 mov $0xd,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a958: c9 leave 10a959: c3 ret 10a95a: 66 90 xchg %ax,%ax <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a95c: 83 f8 32 cmp $0x32,%eax 10a95f: 74 7f je 10a9e0 10a961: 7e 25 jle 10a988 10a963: 83 f8 4b cmp $0x4b,%eax 10a966: 0f 84 8c 00 00 00 je 10a9f8 10a96c: 83 f8 6e cmp $0x6e,%eax 10a96f: 75 0f jne 10a980 <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 10a971: b8 03 00 00 00 mov $0x3,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a976: c9 leave 10a977: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a978: 3d 96 00 00 00 cmp $0x96,%eax 10a97d: 74 39 je 10a9b8 <== ALWAYS TAKEN 10a97f: 90 nop <== NOT EXECUTED case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; 10a980: b8 ff ff ff ff mov $0xffffffff,%eax } return termios_baud; } 10a985: c9 leave 10a986: c3 ret 10a987: 90 nop <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a988: 85 c0 test %eax,%eax 10a98a: 75 f4 jne 10a980 case 0: termios_baud = B0; break; 10a98c: 31 c0 xor %eax,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a98e: c9 leave 10a98f: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10a990: 3d 00 96 00 00 cmp $0x9600,%eax 10a995: 74 31 je 10a9c8 10a997: 3d 00 e1 00 00 cmp $0xe100,%eax 10a99c: 75 e2 jne 10a980 <== NEVER TAKEN case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 10a99e: b8 01 10 00 00 mov $0x1001,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9a3: c9 leave 10a9a4: c3 ret 10a9a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 10a9a8: 3d 08 07 00 00 cmp $0x708,%eax 10a9ad: 75 d1 jne 10a980 <== NEVER TAKEN case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 10a9af: b8 0a 00 00 00 mov $0xa,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9b4: c9 leave 10a9b5: c3 ret 10a9b6: 66 90 xchg %ax,%ax <== NOT EXECUTED case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 10a9b8: b8 05 00 00 00 mov $0x5,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9bd: c9 leave 10a9be: c3 ret 10a9bf: 90 nop <== NOT EXECUTED case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 10a9c0: b8 07 00 00 00 mov $0x7,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9c5: c9 leave 10a9c6: c3 ret 10a9c7: 90 nop <== NOT EXECUTED case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 10a9c8: b8 0f 00 00 00 mov $0xf,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9cd: c9 leave 10a9ce: c3 ret 10a9cf: 90 nop <== NOT EXECUTED case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 10a9d0: b8 06 00 00 00 mov $0x6,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9d5: c9 leave 10a9d6: c3 ret 10a9d7: 90 nop <== NOT EXECUTED case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 10a9d8: b8 0c 00 00 00 mov $0xc,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9dd: c9 leave 10a9de: c3 ret 10a9df: 90 nop <== NOT EXECUTED { int termios_baud; switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; 10a9e0: b8 01 00 00 00 mov $0x1,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9e5: c9 leave 10a9e6: c3 ret 10a9e7: 90 nop <== NOT EXECUTED case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 10a9e8: b8 03 10 00 00 mov $0x1003,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9ed: c9 leave 10a9ee: c3 ret 10a9ef: 90 nop <== NOT EXECUTED case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 10a9f0: b8 02 10 00 00 mov $0x1002,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9f5: c9 leave 10a9f6: c3 ret 10a9f7: 90 nop <== NOT EXECUTED int termios_baud; switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 10a9f8: b8 02 00 00 00 mov $0x2,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10a9fd: c9 leave 10a9fe: c3 ret 10a9ff: 90 nop <== NOT EXECUTED case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 10aa00: b8 0b 00 00 00 mov $0xb,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa05: c9 leave 10aa06: c3 ret 10aa07: 90 nop <== NOT EXECUTED case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 10aa08: b8 09 00 00 00 mov $0x9,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa0d: c9 leave 10aa0e: c3 ret 10aa0f: 90 nop <== NOT EXECUTED switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 10aa10: b8 04 00 00 00 mov $0x4,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa15: c9 leave 10aa16: c3 ret 10aa17: 90 nop <== NOT EXECUTED case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 10aa18: b8 0e 00 00 00 mov $0xe,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa1d: c9 leave 10aa1e: c3 ret =============================================================================== 001090bc : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 1090bc: 55 push %ebp 1090bd: 89 e5 mov %esp,%ebp 1090bf: 57 push %edi 1090c0: 56 push %esi 1090c1: 53 push %ebx 1090c2: 83 ec 40 sub $0x40,%esp 1090c5: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 1090c8: 6a 00 push $0x0 1090ca: 6a 00 push $0x0 1090cc: ff 35 ac 62 12 00 pushl 0x1262ac 1090d2: 89 55 dc mov %edx,-0x24(%ebp) 1090d5: e8 5e 26 00 00 call 10b738 1090da: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 1090dd: 83 c4 10 add $0x10,%esp 1090e0: 85 c0 test %eax,%eax 1090e2: 8b 55 dc mov -0x24(%ebp),%edx 1090e5: 75 6d jne 109154 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 1090e7: 8b 35 b4 62 12 00 mov 0x1262b4,%esi 1090ed: 85 f6 test %esi,%esi 1090ef: 0f 84 a7 00 00 00 je 10919c 1090f5: 89 f3 mov %esi,%ebx 1090f7: 8b 45 0c mov 0xc(%ebp),%eax 1090fa: eb 0a jmp 109106 1090fc: 8b 1b mov (%ebx),%ebx 1090fe: 85 db test %ebx,%ebx 109100: 0f 84 96 00 00 00 je 10919c <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 109106: 39 53 0c cmp %edx,0xc(%ebx) 109109: 75 f1 jne 1090fc 10910b: 39 43 10 cmp %eax,0x10(%ebx) 10910e: 75 ec jne 1090fc <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 109110: 8b 75 10 mov 0x10(%ebp),%esi 109113: 8b 06 mov (%esi),%eax 109115: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 109118: 8b 43 08 mov 0x8(%ebx),%eax 10911b: 8d 48 01 lea 0x1(%eax),%ecx 10911e: 89 4b 08 mov %ecx,0x8(%ebx) 109121: 85 c0 test %eax,%eax 109123: 75 1e jne 109143 if (tty->device.firstOpen) 109125: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10912b: 85 c0 test %eax,%eax 10912d: 74 0b je 10913a (*tty->device.firstOpen)(major, minor, arg); 10912f: 57 push %edi 109130: 56 push %esi 109131: ff 75 0c pushl 0xc(%ebp) 109134: 52 push %edx 109135: ff d0 call *%eax 109137: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10913a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 109141: 74 1c je 10915f tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 109143: 83 ec 0c sub $0xc,%esp 109146: ff 35 ac 62 12 00 pushl 0x1262ac 10914c: e8 e3 26 00 00 call 10b834 return RTEMS_SUCCESSFUL; 109151: 83 c4 10 add $0x10,%esp } 109154: 8b 45 e4 mov -0x1c(%ebp),%eax 109157: 8d 65 f4 lea -0xc(%ebp),%esp 10915a: 5b pop %ebx 10915b: 5e pop %esi 10915c: 5f pop %edi 10915d: c9 leave 10915e: c3 ret /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start( 10915f: 56 push %esi 109160: 53 push %ebx 109161: 68 d4 a8 10 00 push $0x10a8d4 109166: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 10916c: e8 0b 2a 00 00 call 10bb7c tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 109171: 83 c4 10 add $0x10,%esp 109174: 85 c0 test %eax,%eax 109176: 0f 85 3f 03 00 00 jne 1094bb <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 10917c: 51 push %ecx 10917d: 53 push %ebx 10917e: 68 84 ab 10 00 push $0x10ab84 109183: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 109189: e8 ee 29 00 00 call 10bb7c tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10918e: 83 c4 10 add $0x10,%esp 109191: 85 c0 test %eax,%eax 109193: 74 ae je 109143 <== ALWAYS TAKEN 109195: e9 21 03 00 00 jmp 1094bb <== NOT EXECUTED 10919a: 66 90 xchg %ax,%ax <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10919c: 83 ec 08 sub $0x8,%esp 10919f: 68 e8 00 00 00 push $0xe8 1091a4: 6a 01 push $0x1 1091a6: 89 55 dc mov %edx,-0x24(%ebp) 1091a9: e8 96 ec ff ff call 107e44 1091ae: 89 45 e0 mov %eax,-0x20(%ebp) 1091b1: 89 c3 mov %eax,%ebx if (tty == NULL) { 1091b3: 83 c4 10 add $0x10,%esp 1091b6: 85 c0 test %eax,%eax 1091b8: 8b 55 dc mov -0x24(%ebp),%edx 1091bb: 0f 84 75 02 00 00 je 109436 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1091c1: a1 b8 40 12 00 mov 0x1240b8,%eax 1091c6: 8b 4d e0 mov -0x20(%ebp),%ecx 1091c9: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 1091cc: 8b 41 64 mov 0x64(%ecx),%eax 1091cf: 83 ec 0c sub $0xc,%esp 1091d2: 50 push %eax 1091d3: 89 55 dc mov %edx,-0x24(%ebp) 1091d6: e8 29 f1 ff ff call 108304 1091db: 89 45 c4 mov %eax,-0x3c(%ebp) 1091de: 8b 7d e0 mov -0x20(%ebp),%edi 1091e1: 89 47 58 mov %eax,0x58(%edi) if (tty->rawInBuf.theBuf == NULL) { 1091e4: 83 c4 10 add $0x10,%esp 1091e7: 85 c0 test %eax,%eax 1091e9: 8b 55 dc mov -0x24(%ebp),%edx 1091ec: 0f 84 61 02 00 00 je 109453 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1091f2: a1 bc 40 12 00 mov 0x1240bc,%eax 1091f7: 8b 4d e0 mov -0x20(%ebp),%ecx 1091fa: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 109200: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 109206: 83 ec 0c sub $0xc,%esp 109209: 50 push %eax 10920a: 89 55 dc mov %edx,-0x24(%ebp) 10920d: e8 f2 f0 ff ff call 108304 109212: 89 c7 mov %eax,%edi 109214: 8b 45 e0 mov -0x20(%ebp),%eax 109217: 89 78 7c mov %edi,0x7c(%eax) if (tty->rawOutBuf.theBuf == NULL) { 10921a: 83 c4 10 add $0x10,%esp 10921d: 85 ff test %edi,%edi 10921f: 8b 55 dc mov -0x24(%ebp),%edx 109222: 0f 84 4f 02 00 00 je 109477 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 109228: 83 ec 0c sub $0xc,%esp 10922b: ff 35 b4 40 12 00 pushl 0x1240b4 109231: 89 55 dc mov %edx,-0x24(%ebp) 109234: e8 cb f0 ff ff call 108304 109239: 8b 4d e0 mov -0x20(%ebp),%ecx 10923c: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10923f: 83 c4 10 add $0x10,%esp 109242: 85 c0 test %eax,%eax 109244: 8b 55 dc mov -0x24(%ebp),%edx 109247: 0f 84 77 02 00 00 je 1094c4 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10924d: 8b 7d e0 mov -0x20(%ebp),%edi 109250: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi) 109257: 00 00 00 tty->tty_snd.sw_arg = NULL; 10925a: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi) 109261: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 109264: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi) 10926b: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10926e: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi) 109275: 00 00 00 tty->tty_rcvwakeup = 0; 109278: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi) 10927f: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 109282: 89 37 mov %esi,(%edi) tty->back = NULL; 109284: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) if (rtems_termios_ttyHead != NULL) 10928b: 85 f6 test %esi,%esi 10928d: 74 03 je 109292 rtems_termios_ttyHead->back = tty; 10928f: 89 7e 04 mov %edi,0x4(%esi) rtems_termios_ttyHead = tty; 109292: 8b 45 e0 mov -0x20(%ebp),%eax 109295: a3 b4 62 12 00 mov %eax,0x1262b4 if (rtems_termios_ttyTail == NULL) 10929a: 8b 0d b0 62 12 00 mov 0x1262b0,%ecx 1092a0: 85 c9 test %ecx,%ecx 1092a2: 0f 84 af 02 00 00 je 109557 rtems_termios_ttyTail = tty; tty->minor = minor; 1092a8: 8b 75 0c mov 0xc(%ebp),%esi 1092ab: 8b 4d e0 mov -0x20(%ebp),%ecx 1092ae: 89 71 10 mov %esi,0x10(%ecx) tty->major = major; 1092b1: 89 51 0c mov %edx,0xc(%ecx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1092b4: 83 ec 0c sub $0xc,%esp 1092b7: 89 c8 mov %ecx,%eax 1092b9: 83 c0 14 add $0x14,%eax 1092bc: 50 push %eax 1092bd: 6a 00 push $0x0 1092bf: 6a 54 push $0x54 1092c1: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'i', c), 1092c3: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%eax tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1092ca: 0d 00 69 52 54 or $0x54526900,%eax 1092cf: 50 push %eax 1092d0: 89 55 dc mov %edx,-0x24(%ebp) 1092d3: e8 e4 21 00 00 call 10b4bc 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) 1092d8: 83 c4 20 add $0x20,%esp 1092db: 85 c0 test %eax,%eax 1092dd: 8b 55 dc mov -0x24(%ebp),%edx 1092e0: 0f 85 d5 01 00 00 jne 1094bb rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1092e6: 83 ec 0c sub $0xc,%esp 1092e9: 8b 45 e0 mov -0x20(%ebp),%eax 1092ec: 83 c0 18 add $0x18,%eax 1092ef: 50 push %eax 1092f0: 6a 00 push $0x0 1092f2: 6a 54 push $0x54 1092f4: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'o', c), 1092f6: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%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 ( 1092fd: 0d 00 6f 52 54 or $0x54526f00,%eax 109302: 50 push %eax 109303: 89 55 dc mov %edx,-0x24(%ebp) 109306: e8 b1 21 00 00 call 10b4bc 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) 10930b: 83 c4 20 add $0x20,%esp 10930e: 85 c0 test %eax,%eax 109310: 8b 55 dc mov -0x24(%ebp),%edx 109313: 0f 85 a2 01 00 00 jne 1094bb rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 109319: 83 ec 0c sub $0xc,%esp 10931c: 8b 45 e0 mov -0x20(%ebp),%eax 10931f: 05 8c 00 00 00 add $0x8c,%eax 109324: 50 push %eax 109325: 6a 00 push $0x0 109327: 6a 20 push $0x20 109329: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'x', c), 10932b: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%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 ( 109332: 0d 00 78 52 54 or $0x54527800,%eax 109337: 50 push %eax 109338: 89 55 dc mov %edx,-0x24(%ebp) 10933b: e8 7c 21 00 00 call 10b4bc rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 109340: 83 c4 20 add $0x20,%esp 109343: 85 c0 test %eax,%eax 109345: 8b 55 dc mov -0x24(%ebp),%edx 109348: 0f 85 6d 01 00 00 jne 1094bb rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10934e: 8b 7d e0 mov -0x20(%ebp),%edi 109351: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi) 109358: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10935b: 81 c7 98 00 00 00 add $0x98,%edi 109361: b9 08 00 00 00 mov $0x8,%ecx 109366: 8b 75 14 mov 0x14(%ebp),%esi 109369: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10936b: 8b 7d e0 mov -0x20(%ebp),%edi 10936e: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi) 109375: 0f 84 64 01 00 00 je 1094df <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10937b: 8b 45 e0 mov -0x20(%ebp),%eax 10937e: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx 109384: 85 c9 test %ecx,%ecx 109386: 0f 84 fc 00 00 00 je 109488 10938c: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 109393: 0f 84 ef 00 00 00 je 109488 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 109399: 8b 4d e0 mov -0x20(%ebp),%ecx 10939c: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 1093a3: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 1093aa: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx) tty->termios.c_lflag = 1093b1: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 1093b8: c6 41 41 03 movb $0x3,0x41(%ecx) tty->termios.c_cc[VQUIT] = '\034'; 1093bc: c6 41 42 1c movb $0x1c,0x42(%ecx) tty->termios.c_cc[VERASE] = '\177'; 1093c0: c6 41 43 7f movb $0x7f,0x43(%ecx) tty->termios.c_cc[VKILL] = '\025'; 1093c4: c6 41 44 15 movb $0x15,0x44(%ecx) tty->termios.c_cc[VEOF] = '\004'; 1093c8: c6 41 45 04 movb $0x4,0x45(%ecx) tty->termios.c_cc[VEOL] = '\000'; 1093cc: c6 41 4c 00 movb $0x0,0x4c(%ecx) tty->termios.c_cc[VEOL2] = '\000'; 1093d0: c6 41 51 00 movb $0x0,0x51(%ecx) tty->termios.c_cc[VSTART] = '\021'; 1093d4: c6 41 49 11 movb $0x11,0x49(%ecx) tty->termios.c_cc[VSTOP] = '\023'; 1093d8: c6 41 4a 13 movb $0x13,0x4a(%ecx) tty->termios.c_cc[VSUSP] = '\032'; 1093dc: c6 41 4b 1a movb $0x1a,0x4b(%ecx) tty->termios.c_cc[VREPRINT] = '\022'; 1093e0: c6 41 4d 12 movb $0x12,0x4d(%ecx) tty->termios.c_cc[VDISCARD] = '\017'; 1093e4: c6 41 4e 0f movb $0xf,0x4e(%ecx) tty->termios.c_cc[VWERASE] = '\027'; 1093e8: c6 41 4f 17 movb $0x17,0x4f(%ecx) tty->termios.c_cc[VLNEXT] = '\026'; 1093ec: c6 41 50 16 movb $0x16,0x50(%ecx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 1093f0: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx) 1093f7: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 1093fa: 8b 41 64 mov 0x64(%ecx),%eax 1093fd: d1 e8 shr %eax 1093ff: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx) tty->highwater = tty->rawInBuf.Size * 3/4; 109405: 8b 41 64 mov 0x64(%ecx),%eax 109408: 8d 04 40 lea (%eax,%eax,2),%eax 10940b: c1 e8 02 shr $0x2,%eax 10940e: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx) /* * Bump name characer */ if (c++ == 'z') 109414: a0 c0 40 12 00 mov 0x1240c0,%al 109419: 8d 48 01 lea 0x1(%eax),%ecx 10941c: 88 0d c0 40 12 00 mov %cl,0x1240c0 109422: 3c 7a cmp $0x7a,%al 109424: 0f 85 e6 fc ff ff jne 109110 <== ALWAYS TAKEN c = 'a'; 10942a: c6 05 c0 40 12 00 61 movb $0x61,0x1240c0 <== NOT EXECUTED 109431: e9 da fc ff ff jmp 109110 <== NOT EXECUTED /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 109436: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109439: ff 35 ac 62 12 00 pushl 0x1262ac <== NOT EXECUTED 10943f: e8 f0 23 00 00 call 10b834 <== NOT EXECUTED return RTEMS_NO_MEMORY; 109444: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109447: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 10944e: e9 01 fd ff ff jmp 109154 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 109453: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109456: 57 push %edi <== NOT EXECUTED */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); free(tty); 109457: e8 d4 eb ff ff call 108030 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10945c: 5f pop %edi <== NOT EXECUTED 10945d: ff 35 ac 62 12 00 pushl 0x1262ac <== NOT EXECUTED 109463: e8 cc 23 00 00 call 10b834 <== NOT EXECUTED return RTEMS_NO_MEMORY; 109468: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10946b: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 109472: e9 dd fc ff ff jmp 109154 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 109477: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10947a: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 10947d: e8 ae eb ff ff call 108030 <== NOT EXECUTED free(tty); 109482: 58 pop %eax <== NOT EXECUTED 109483: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 109486: eb cf jmp 109457 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 109488: 83 ec 0c sub $0xc,%esp 10948b: 8b 45 e0 mov -0x20(%ebp),%eax 10948e: 83 c0 68 add $0x68,%eax 109491: 50 push %eax 109492: 6a 00 push $0x0 109494: 6a 24 push $0x24 109496: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'r', c), 109498: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%eax rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10949f: 0d 00 72 52 54 or $0x54527200,%eax 1094a4: 50 push %eax 1094a5: 89 55 dc mov %edx,-0x24(%ebp) 1094a8: e8 0f 20 00 00 call 10b4bc rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 1094ad: 83 c4 20 add $0x20,%esp 1094b0: 85 c0 test %eax,%eax 1094b2: 8b 55 dc mov -0x24(%ebp),%edx 1094b5: 0f 84 de fe ff ff je 109399 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); 1094bb: 83 ec 0c sub $0xc,%esp 1094be: 50 push %eax 1094bf: e8 b0 28 00 00 call 10bd74 /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 1094c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1094c7: 57 push %edi <== NOT EXECUTED 1094c8: e8 63 eb ff ff call 108030 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 1094cd: 5e pop %esi <== NOT EXECUTED 1094ce: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1094d1: e8 5a eb ff ff call 108030 <== NOT EXECUTED free(tty); 1094d6: 5b pop %ebx <== NOT EXECUTED 1094d7: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 1094da: e9 78 ff ff ff jmp 109457 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 1094df: 50 push %eax 1094e0: 50 push %eax 1094e1: 89 f8 mov %edi,%eax 1094e3: 05 c8 00 00 00 add $0xc8,%eax 1094e8: 50 push %eax 1094e9: 6a 00 push $0x0 1094eb: 68 00 05 00 00 push $0x500 1094f0: 68 00 04 00 00 push $0x400 1094f5: 6a 0a push $0xa rtems_build_name ('T', 'x', 'T', c), 1094f7: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%eax /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 1094fe: 0d 00 54 78 54 or $0x54785400,%eax 109503: 50 push %eax 109504: 89 55 dc mov %edx,-0x24(%ebp) 109507: e8 c8 23 00 00 call 10b8d4 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 10950c: 83 c4 20 add $0x20,%esp 10950f: 85 c0 test %eax,%eax 109511: 8b 55 dc mov -0x24(%ebp),%edx 109514: 75 a5 jne 1094bb <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 109516: 56 push %esi 109517: 56 push %esi 109518: 8b 45 e0 mov -0x20(%ebp),%eax 10951b: 05 c4 00 00 00 add $0xc4,%eax 109520: 50 push %eax 109521: 6a 00 push $0x0 109523: 68 00 05 00 00 push $0x500 109528: 68 00 04 00 00 push $0x400 10952d: 6a 09 push $0x9 rtems_build_name ('R', 'x', 'T', c), 10952f: 0f be 05 c0 40 12 00 movsbl 0x1240c0,%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 ( 109536: 0d 00 54 78 52 or $0x52785400,%eax 10953b: 50 push %eax 10953c: 89 55 dc mov %edx,-0x24(%ebp) 10953f: e8 90 23 00 00 call 10b8d4 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 109544: 83 c4 20 add $0x20,%esp 109547: 85 c0 test %eax,%eax 109549: 8b 55 dc mov -0x24(%ebp),%edx 10954c: 0f 84 29 fe ff ff je 10937b 109552: e9 64 ff ff ff jmp 1094bb <== 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; 109557: a3 b0 62 12 00 mov %eax,0x1262b0 10955c: e9 47 fd ff ff jmp 1092a8 =============================================================================== 00109b64 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109b64: 55 push %ebp 109b65: 89 e5 mov %esp,%ebp 109b67: 57 push %edi 109b68: 56 push %esi 109b69: 53 push %ebx 109b6a: 83 ec 1c sub $0x1c,%esp 109b6d: 8b 45 08 mov 0x8(%ebp),%eax 109b70: 8b 55 0c mov 0xc(%ebp),%edx 109b73: 89 55 e4 mov %edx,-0x1c(%ebp) 109b76: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109b79: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109b7b: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx 109b81: 85 c9 test %ecx,%ecx 109b83: 0f 84 eb 00 00 00 je 109c74 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109b89: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109b8f: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 109b92: 8b 55 e4 mov -0x1c(%ebp),%edx 109b95: 85 d2 test %edx,%edx 109b97: 0f 84 cf 00 00 00 je 109c6c <== NEVER TAKEN 109b9d: 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; 109ba0: 8b 45 e0 mov -0x20(%ebp),%eax 109ba3: 40 inc %eax 109ba4: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109baa: 31 d2 xor %edx,%edx 109bac: f7 f1 div %ecx 109bae: 89 55 dc mov %edx,-0x24(%ebp) 109bb1: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109bb4: 9c pushf 109bb5: fa cli 109bb6: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109bb7: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109bbd: 3b 55 e0 cmp -0x20(%ebp),%edx 109bc0: 75 3e jne 109c00 109bc2: 89 f8 mov %edi,%eax 109bc4: 89 f7 mov %esi,%edi 109bc6: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109bc8: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109bcf: 00 00 00 rtems_interrupt_enable (level); 109bd2: 50 push %eax 109bd3: 9d popf sc = rtems_semaphore_obtain( 109bd4: 50 push %eax 109bd5: 6a 00 push $0x0 109bd7: 6a 00 push $0x0 109bd9: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109bdf: e8 54 1b 00 00 call 10b738 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109be4: 83 c4 10 add $0x10,%esp 109be7: 85 c0 test %eax,%eax 109be9: 0f 85 a0 00 00 00 jne 109c8f <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109bef: 9c pushf 109bf0: fa cli 109bf1: 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) { 109bf2: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109bf8: 39 f2 cmp %esi,%edx 109bfa: 74 cc je 109bc8 <== NEVER TAKEN 109bfc: 89 fe mov %edi,%esi 109bfe: 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++; 109c00: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109c06: 8b 4b 7c mov 0x7c(%ebx),%ecx 109c09: 8a 16 mov (%esi),%dl 109c0b: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 109c0e: 8b 45 dc mov -0x24(%ebp),%eax 109c11: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109c17: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx 109c1d: 85 c9 test %ecx,%ecx 109c1f: 75 23 jne 109c44 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109c21: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109c27: a8 10 test $0x10,%al 109c29: 74 26 je 109c51 <== 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; 109c2b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109c31: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 109c34: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109c3a: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109c41: 00 00 00 } rtems_interrupt_enable (level); 109c44: 57 push %edi 109c45: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109c46: ff 4d e4 decl -0x1c(%ebp) 109c49: 74 21 je 109c6c 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++; 109c4b: 46 inc %esi 109c4c: e9 4f ff ff ff jmp 109ba0 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); 109c51: 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, 109c57: 52 push %edx 109c58: 6a 01 push $0x1 109c5a: 03 43 7c add 0x7c(%ebx),%eax 109c5d: 50 push %eax 109c5e: ff 73 10 pushl 0x10(%ebx) 109c61: ff 93 a4 00 00 00 call *0xa4(%ebx) 109c67: 83 c4 10 add $0x10,%esp 109c6a: eb ce jmp 109c3a tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109c6c: 8d 65 f4 lea -0xc(%ebp),%esp 109c6f: 5b pop %ebx 109c70: 5e pop %esi 109c71: 5f pop %edi 109c72: c9 leave 109c73: 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); 109c74: 89 55 10 mov %edx,0x10(%ebp) 109c77: 89 45 0c mov %eax,0xc(%ebp) 109c7a: 8b 43 10 mov 0x10(%ebx),%eax 109c7d: 89 45 08 mov %eax,0x8(%ebp) 109c80: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109c86: 8d 65 f4 lea -0xc(%ebp),%esp 109c89: 5b pop %ebx 109c8a: 5e pop %esi 109c8b: 5f pop %edi 109c8c: 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); 109c8d: 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); 109c8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109c92: 50 push %eax <== NOT EXECUTED 109c93: e8 dc 20 00 00 call 10bd74 <== NOT EXECUTED =============================================================================== 0010a270 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10a270: 55 push %ebp 10a271: 89 e5 mov %esp,%ebp 10a273: 57 push %edi 10a274: 56 push %esi 10a275: 53 push %ebx 10a276: 83 ec 30 sub $0x30,%esp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a279: 8b 55 08 mov 0x8(%ebp),%edx 10a27c: 8b 02 mov (%edx),%eax 10a27e: 8b 58 34 mov 0x34(%eax),%ebx uint32_t count = args->count; 10a281: 8b 4a 10 mov 0x10(%edx),%ecx 10a284: 89 4d dc mov %ecx,-0x24(%ebp) char *buffer = args->buffer; 10a287: 8b 42 0c mov 0xc(%edx),%eax 10a28a: 89 45 d8 mov %eax,-0x28(%ebp) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a28d: 6a 00 push $0x0 10a28f: 6a 00 push $0x0 10a291: ff 73 14 pushl 0x14(%ebx) 10a294: e8 9f 14 00 00 call 10b738 10a299: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a29c: 83 c4 10 add $0x10,%esp 10a29f: 85 c0 test %eax,%eax 10a2a1: 75 35 jne 10a2d8 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 10a2a3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10a2a9: c1 e0 05 shl $0x5,%eax 10a2ac: 8b 80 48 5f 12 00 mov 0x125f48(%eax),%eax 10a2b2: 85 c0 test %eax,%eax 10a2b4: 74 2e je 10a2e4 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 10a2b6: 83 ec 08 sub $0x8,%esp 10a2b9: ff 75 08 pushl 0x8(%ebp) 10a2bc: 53 push %ebx 10a2bd: ff d0 call *%eax 10a2bf: 89 45 e0 mov %eax,-0x20(%ebp) tty->tty_rcvwakeup = 0; 10a2c2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a2c9: 00 00 00 rtems_semaphore_release (tty->isem); 10a2cc: 59 pop %ecx 10a2cd: ff 73 14 pushl 0x14(%ebx) 10a2d0: e8 5f 15 00 00 call 10b834 return sc; 10a2d5: 83 c4 10 add $0x10,%esp } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 10a2d8: 8b 45 e0 mov -0x20(%ebp),%eax 10a2db: 8d 65 f4 lea -0xc(%ebp),%esp 10a2de: 5b pop %ebx 10a2df: 5e pop %esi 10a2e0: 5f pop %edi 10a2e1: c9 leave 10a2e2: c3 ret 10a2e3: 90 nop <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 10a2e4: 8b 53 20 mov 0x20(%ebx),%edx 10a2e7: 39 53 24 cmp %edx,0x24(%ebx) 10a2ea: 74 5f je 10a34b <== ALWAYS TAKEN sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a2ec: 8b 45 dc mov -0x24(%ebp),%eax 10a2ef: 85 c0 test %eax,%eax 10a2f1: 74 29 je 10a31c <== NEVER TAKEN 10a2f3: 8b 43 24 mov 0x24(%ebx),%eax 10a2f6: 3b 43 20 cmp 0x20(%ebx),%eax 10a2f9: 7d 21 jge 10a31c <== NEVER TAKEN 10a2fb: 8b 55 d8 mov -0x28(%ebp),%edx 10a2fe: 8b 7d dc mov -0x24(%ebp),%edi 10a301: eb 06 jmp 10a309 10a303: 90 nop <== NOT EXECUTED 10a304: 39 43 20 cmp %eax,0x20(%ebx) 10a307: 7e 10 jle 10a319 *buffer++ = tty->cbuf[tty->cindex++]; 10a309: 8b 73 1c mov 0x1c(%ebx),%esi 10a30c: 8a 0c 06 mov (%esi,%eax,1),%cl 10a30f: 88 0a mov %cl,(%edx) 10a311: 42 inc %edx 10a312: 40 inc %eax 10a313: 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)) { 10a316: 4f dec %edi 10a317: 75 eb jne 10a304 <== ALWAYS TAKEN 10a319: 89 7d dc mov %edi,-0x24(%ebp) *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10a31c: 8b 55 08 mov 0x8(%ebp),%edx 10a31f: 8b 42 10 mov 0x10(%edx),%eax 10a322: 2b 45 dc sub -0x24(%ebp),%eax 10a325: 89 42 18 mov %eax,0x18(%edx) tty->tty_rcvwakeup = 0; 10a328: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10a32f: 00 00 00 rtems_semaphore_release (tty->isem); 10a332: 83 ec 0c sub $0xc,%esp 10a335: ff 73 14 pushl 0x14(%ebx) 10a338: e8 f7 14 00 00 call 10b834 return sc; 10a33d: 83 c4 10 add $0x10,%esp } 10a340: 8b 45 e0 mov -0x20(%ebp),%eax 10a343: 8d 65 f4 lea -0xc(%ebp),%esp 10a346: 5b pop %ebx 10a347: 5e pop %esi 10a348: 5f pop %edi 10a349: c9 leave 10a34a: c3 ret rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10a34b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) 10a352: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) tty->read_start_column = tty->column; 10a359: 8b 43 28 mov 0x28(%ebx),%eax 10a35c: 89 43 2c mov %eax,0x2c(%ebx) if (tty->device.pollRead != NULL && 10a35f: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10a365: 85 c0 test %eax,%eax 10a367: 74 0e je 10a377 10a369: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx 10a36f: 85 d2 test %edx,%edx 10a371: 0f 84 72 01 00 00 je 10a4e9 <== NEVER TAKEN * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 10a377: 8b 73 74 mov 0x74(%ebx),%esi rtems_status_code sc; int wait = (int)1; 10a37a: 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)( 10a381: 8d 4b 49 lea 0x49(%ebx),%ecx 10a384: 89 4d d4 mov %ecx,-0x2c(%ebp) 10a387: 90 nop while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a388: 8b 53 5c mov 0x5c(%ebx),%edx 10a38b: 8b 43 60 mov 0x60(%ebx),%eax 10a38e: 39 c2 cmp %eax,%edx 10a390: 75 2c jne 10a3be 10a392: e9 f5 00 00 00 jmp 10a48c 10a397: 90 nop <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 10a398: 0f b6 c1 movzbl %cl,%eax 10a39b: 89 da mov %ebx,%edx 10a39d: e8 ae fd ff ff call 10a150 10a3a2: 85 c0 test %eax,%eax 10a3a4: 74 07 je 10a3ad wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; 10a3a6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } timeout = tty->rawInBufSemaphoreTimeout; 10a3ad: 8b 73 70 mov 0x70(%ebx),%esi while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a3b0: 8b 53 5c mov 0x5c(%ebx),%edx 10a3b3: 8b 43 60 mov 0x60(%ebx),%eax 10a3b6: 39 c2 cmp %eax,%edx 10a3b8: 0f 84 ce 00 00 00 je 10a48c (tty->ccount < (CBUFSIZE-1))) { 10a3be: a1 b4 40 12 00 mov 0x1240b4,%eax 10a3c3: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a3c4: 39 43 20 cmp %eax,0x20(%ebx) 10a3c7: 0f 8d bf 00 00 00 jge 10a48c <== NEVER TAKEN (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 10a3cd: 8b 43 5c mov 0x5c(%ebx),%eax 10a3d0: 8b 4b 64 mov 0x64(%ebx),%ecx 10a3d3: 40 inc %eax 10a3d4: 31 d2 xor %edx,%edx 10a3d6: f7 f1 div %ecx c = tty->rawInBuf.theBuf[newHead]; 10a3d8: 8b 43 58 mov 0x58(%ebx),%eax 10a3db: 8a 0c 10 mov (%eax,%edx,1),%cl tty->rawInBuf.Head = newHead; 10a3de: 89 53 5c mov %edx,0x5c(%ebx) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a3e1: 8b 43 60 mov 0x60(%ebx),%eax 10a3e4: 8b 7b 64 mov 0x64(%ebx),%edi % tty->rawInBuf.Size) 10a3e7: 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) 10a3ea: 8d 04 07 lea (%edi,%eax,1),%eax 10a3ed: 29 d0 sub %edx,%eax % tty->rawInBuf.Size) 10a3ef: 31 d2 xor %edx,%edx 10a3f1: 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) 10a3f3: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx 10a3f9: 73 5d jae 10a458 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10a3fb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a401: 83 e0 fe and $0xfffffffe,%eax 10a404: 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)) 10a40a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a410: 25 02 02 00 00 and $0x202,%eax 10a415: 3d 02 02 00 00 cmp $0x202,%eax 10a41a: 0f 84 94 00 00 00 je 10a4b4 <== 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) { 10a420: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a426: f6 c4 01 test $0x1,%ah 10a429: 74 2d je 10a458 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 10a42b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a431: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a434: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10a43a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10a440: 85 c0 test %eax,%eax <== NOT EXECUTED 10a442: 74 14 je 10a458 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10a444: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a447: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a44a: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a44d: ff d0 call *%eax <== NOT EXECUTED 10a44f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a452: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a455: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 10a458: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a45c: 0f 85 36 ff ff ff jne 10a398 <== ALWAYS TAKEN if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 10a462: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a465: 89 da mov %ebx,%edx <== NOT EXECUTED 10a467: e8 e4 fc ff ff call 10a150 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a46c: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 10a470: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a473: 0f 8d 2d ff ff ff jge 10a3a6 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a479: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a47c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a47f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a482: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a484: 0f 85 34 ff ff ff jne 10a3be <== NOT EXECUTED 10a48a: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 10a48c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a48f: 85 c9 test %ecx,%ecx 10a491: 0f 84 55 fe ff ff je 10a2ec <== NEVER TAKEN sc = rtems_semaphore_obtain( 10a497: 52 push %edx 10a498: 56 push %esi 10a499: ff 73 6c pushl 0x6c(%ebx) 10a49c: ff 73 68 pushl 0x68(%ebx) 10a49f: e8 94 12 00 00 call 10b738 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 10a4a4: 83 c4 10 add $0x10,%esp 10a4a7: 85 c0 test %eax,%eax 10a4a9: 0f 84 d9 fe ff ff je 10a388 10a4af: e9 38 fe ff ff jmp 10a2ec <== 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) 10a4b4: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED 10a4ba: 85 ff test %edi,%edi <== NOT EXECUTED 10a4bc: 74 0e je 10a4cc <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 10a4be: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4c4: a8 20 test $0x20,%al <== NOT EXECUTED 10a4c6: 0f 84 54 ff ff ff je 10a420 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 10a4cc: 56 push %esi <== NOT EXECUTED 10a4cd: 6a 01 push $0x1 <== NOT EXECUTED 10a4cf: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a4d2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a4d5: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a4d8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a4de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a4e1: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a4e4: e9 6f ff ff ff jmp 10a458 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a4e9: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10a4ed: 75 1d jne 10a50c <== ALWAYS TAKEN 10a4ef: eb 39 jmp 10a52a <== NOT EXECUTED 10a4f1: 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)) 10a4f4: 0f b6 c0 movzbl %al,%eax 10a4f7: 89 da mov %ebx,%edx 10a4f9: e8 52 fc ff ff call 10a150 10a4fe: 85 c0 test %eax,%eax 10a500: 0f 85 e6 fd ff ff jne 10a2ec <== NEVER TAKEN static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a506: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a50c: 83 ec 0c sub $0xc,%esp 10a50f: ff 73 10 pushl 0x10(%ebx) 10a512: ff d0 call *%eax if (n < 0) { 10a514: 83 c4 10 add $0x10,%esp 10a517: 85 c0 test %eax,%eax 10a519: 79 d9 jns 10a4f4 rtems_task_wake_after (1); 10a51b: 83 ec 0c sub $0xc,%esp 10a51e: 6a 01 push $0x1 10a520: e8 cb 16 00 00 call 10bbf0 10a525: 83 c4 10 add $0x10,%esp 10a528: eb dc jmp 10a506 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10a52a: e8 01 0b 00 00 call 10b030 <== NOT EXECUTED 10a52f: 89 c6 mov %eax,%esi <== NOT EXECUTED 10a531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a534: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a537: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a53a: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 10a540: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a543: 85 c0 test %eax,%eax <== NOT EXECUTED 10a545: 78 25 js 10a56c <== NOT EXECUTED break; } } rtems_task_wake_after (1); } else { siproc (n, tty); 10a547: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a54a: 89 da mov %ebx,%edx <== NOT EXECUTED 10a54c: e8 ff fb ff ff call 10a150 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a551: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 10a554: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 10a557: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 10a55a: 0f 8d 8c fd ff ff jge 10a2ec <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 10a560: 84 c0 test %al,%al <== NOT EXECUTED 10a562: 74 d0 je 10a534 <== NOT EXECUTED 10a564: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a568: 74 ca je 10a534 <== NOT EXECUTED 10a56a: eb be jmp 10a52a <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 10a56c: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10a570: 74 1d je 10a58f <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 10a572: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a576: 74 08 je 10a580 <== NOT EXECUTED 10a578: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 10a57b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a57d: 75 1a jne 10a599 <== NOT EXECUTED 10a57f: 90 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 10a580: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a583: 6a 01 push $0x1 <== NOT EXECUTED 10a585: e8 66 16 00 00 call 10bbf0 <== NOT EXECUTED 10a58a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a58d: eb a5 jmp 10a534 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 10a58f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a593: 0f 84 53 fd ff ff je 10a2ec <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10a599: e8 92 0a 00 00 call 10b030 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 10a59e: 29 f0 sub %esi,%eax <== NOT EXECUTED 10a5a0: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 10a5a3: 76 db jbe 10a580 <== NOT EXECUTED 10a5a5: e9 42 fd ff ff jmp 10a2ec <== NOT EXECUTED =============================================================================== 0010a940 : * 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) { 10a940: 55 push %ebp 10a941: 89 e5 mov %esp,%ebp 10a943: 57 push %edi 10a944: 56 push %esi 10a945: 53 push %ebx 10a946: 83 ec 0c sub $0xc,%esp 10a949: 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)) 10a94c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a952: 25 03 04 00 00 and $0x403,%eax 10a957: 3d 01 04 00 00 cmp $0x401,%eax 10a95c: 0f 84 62 01 00 00 je 10aac4 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 10a962: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a968: 83 e0 03 and $0x3,%eax 10a96b: 83 f8 02 cmp $0x2,%eax 10a96e: 0f 84 8c 01 00 00 je 10ab00 <== NEVER TAKEN tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 10a974: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a97a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a980: 39 c2 cmp %eax,%edx 10a982: 0f 84 a4 00 00 00 je 10aa2c rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 10a988: 9c pushf 10a989: fa cli 10a98a: 58 pop %eax len = tty->t_dqlen; 10a98b: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi tty->t_dqlen = 0; 10a991: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 10a998: 00 00 00 rtems_interrupt_enable(level); 10a99b: 50 push %eax 10a99c: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 10a99d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10a9a3: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 10a9a9: 8d 04 06 lea (%esi,%eax,1),%eax 10a9ac: 31 d2 xor %edx,%edx 10a9ae: f7 f1 div %ecx 10a9b0: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 10a9b2: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 10a9b8: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10a9bf: 0f 84 e7 00 00 00 je 10aaac * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 10a9c5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a9cb: 39 f0 cmp %esi,%eax 10a9cd: 74 79 je 10aa48 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)) 10a9cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10a9d5: 25 10 02 00 00 and $0x210,%eax 10a9da: 3d 10 02 00 00 cmp $0x210,%eax 10a9df: 0f 84 57 01 00 00 je 10ab3c <== NEVER TAKEN nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 10a9e5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 10a9eb: 39 c6 cmp %eax,%esi 10a9ed: 0f 87 91 00 00 00 ja 10aa84 nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 10a9f3: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 10a9f9: 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)) { 10a9fb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10aa01: f6 c4 06 test $0x6,%ah 10aa04: 0f 85 91 00 00 00 jne 10aa9b 10aa0a: 89 f8 mov %edi,%eax nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 10aa0c: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10aa13: 00 00 00 (*tty->device.write)( 10aa16: 52 push %edx 10aa17: 50 push %eax 10aa18: 8b 43 7c mov 0x7c(%ebx),%eax 10aa1b: 01 f0 add %esi,%eax 10aa1d: 50 push %eax 10aa1e: ff 73 10 pushl 0x10(%ebx) 10aa21: ff 93 a4 00 00 00 call *0xa4(%ebx) 10aa27: 83 c4 10 add $0x10,%esp 10aa2a: eb 48 jmp 10aa74 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 10aa2c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10aa33: 0f 84 2b 01 00 00 je 10ab64 <== NEVER TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 10aa39: 31 ff xor %edi,%edi tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aa3b: 89 f8 mov %edi,%eax 10aa3d: 8d 65 f4 lea -0xc(%ebp),%esp 10aa40: 5b pop %ebx 10aa41: 5e pop %esi 10aa42: 5f pop %edi 10aa43: c9 leave 10aa44: c3 ret 10aa45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10aa48: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10aa4f: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10aa52: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 10aa58: 85 c0 test %eax,%eax 10aa5a: 0f 84 1c 01 00 00 je 10ab7c <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 10aa60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10aa63: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 10aa69: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10aa6c: 52 push %edx <== NOT EXECUTED 10aa6d: ff d0 call *%eax <== NOT EXECUTED 10aa6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10aa72: 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*/ 10aa74: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 10aa7a: 89 f8 mov %edi,%eax 10aa7c: 8d 65 f4 lea -0xc(%ebp),%esp 10aa7f: 5b pop %ebx 10aa80: 5e pop %esi 10aa81: 5f pop %edi 10aa82: c9 leave 10aa83: c3 ret } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 10aa84: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 10aa8a: 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)) { 10aa8c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10aa92: f6 c4 06 test $0x6,%ah 10aa95: 0f 84 6f ff ff ff je 10aa0a <== ALWAYS TAKEN 10aa9b: b8 01 00 00 00 mov $0x1,%eax nToSend = 1; 10aaa0: bf 01 00 00 00 mov $0x1,%edi 10aaa5: e9 62 ff ff ff jmp 10aa0c 10aaaa: 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); 10aaac: 83 ec 0c sub $0xc,%esp 10aaaf: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10aab5: e8 7a 0d 00 00 call 10b834 10aaba: 83 c4 10 add $0x10,%esp 10aabd: e9 03 ff ff ff jmp 10a9c5 10aac2: 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); 10aac4: 56 push %esi <== NOT EXECUTED 10aac5: 6a 01 push $0x1 <== NOT EXECUTED 10aac7: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10aaca: 50 push %eax <== NOT EXECUTED 10aacb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10aace: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10aad4: 9c pushf <== NOT EXECUTED 10aad5: fa cli <== NOT EXECUTED 10aad6: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10aad7: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 10aadd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10aae3: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10aae6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10aaec: 52 push %edx <== NOT EXECUTED 10aaed: 9d popf <== NOT EXECUTED 10aaee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10aaf1: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10aaf6: 89 f8 mov %edi,%eax <== NOT EXECUTED 10aaf8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10aafb: 5b pop %ebx <== NOT EXECUTED 10aafc: 5e pop %esi <== NOT EXECUTED 10aafd: 5f pop %edi <== NOT EXECUTED 10aafe: c9 leave <== NOT EXECUTED 10aaff: 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); 10ab00: 51 push %ecx <== NOT EXECUTED 10ab01: 6a 01 push $0x1 <== NOT EXECUTED 10ab03: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 10ab06: 50 push %eax <== NOT EXECUTED 10ab07: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10ab0a: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 10ab10: 9c pushf <== NOT EXECUTED 10ab11: fa cli <== NOT EXECUTED 10ab12: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10ab13: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 10ab19: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10ab1f: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10ab22: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 10ab28: 52 push %edx <== NOT EXECUTED 10ab29: 9d popf <== NOT EXECUTED 10ab2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 10ab2d: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10ab32: 89 f8 mov %edi,%eax <== NOT EXECUTED 10ab34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10ab37: 5b pop %ebx <== NOT EXECUTED 10ab38: 5e pop %esi <== NOT EXECUTED 10ab39: 5f pop %edi <== NOT EXECUTED 10ab3a: c9 leave <== NOT EXECUTED 10ab3b: 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); 10ab3c: 9c pushf <== NOT EXECUTED 10ab3d: fa cli <== NOT EXECUTED 10ab3e: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10ab3f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10ab45: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 10ab48: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 10ab4e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 10ab55: 00 00 00 rtems_interrupt_enable(level); 10ab58: 52 push %edx <== NOT EXECUTED 10ab59: 9d popf <== NOT EXECUTED nToSend = 0; 10ab5a: 31 ff xor %edi,%edi <== NOT EXECUTED 10ab5c: e9 13 ff ff ff jmp 10aa74 <== NOT EXECUTED 10ab61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 10ab64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ab67: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10ab6d: e8 c2 0c 00 00 call 10b834 <== NOT EXECUTED 10ab72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; 10ab75: 31 ff xor %edi,%edi <== NOT EXECUTED 10ab77: e9 bf fe ff ff jmp 10aa3b <== NOT EXECUTED if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10ab7c: 31 ff xor %edi,%edi 10ab7e: e9 f1 fe ff ff jmp 10aa74 =============================================================================== 0010a8d4 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10a8d4: 55 push %ebp 10a8d5: 89 e5 mov %esp,%ebp 10a8d7: 57 push %edi 10a8d8: 56 push %esi 10a8d9: 53 push %ebx 10a8da: 83 ec 1c sub $0x1c,%esp 10a8dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10a8e0: 8d 75 e0 lea -0x20(%ebp),%esi 10a8e3: 8d 7d e7 lea -0x19(%ebp),%edi 10a8e6: eb 14 jmp 10a8fc } /* * do something */ c = tty->device.pollRead(tty->minor); 10a8e8: 83 ec 0c sub $0xc,%esp 10a8eb: ff 73 10 pushl 0x10(%ebx) 10a8ee: ff 93 a0 00 00 00 call *0xa0(%ebx) if (c != EOF) { 10a8f4: 83 c4 10 add $0x10,%esp 10a8f7: 83 f8 ff cmp $0xffffffff,%eax 10a8fa: 75 30 jne 10a92c while (1) { /* * wait for rtems event */ rtems_event_receive( 10a8fc: 56 push %esi 10a8fd: 6a 00 push $0x0 10a8ff: 6a 02 push $0x2 10a901: 6a 03 push $0x3 10a903: e8 94 07 00 00 call 10b09c (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) { 10a908: 83 c4 10 add $0x10,%esp 10a90b: f6 45 e0 01 testb $0x1,-0x20(%ebp) 10a90f: 74 d7 je 10a8e8 <== ALWAYS TAKEN tty->rxTaskId = 0; 10a911: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10a918: 00 00 00 rtems_task_delete(RTEMS_SELF); 10a91b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a91e: 6a 00 push $0x0 <== NOT EXECUTED 10a920: e8 0f 11 00 00 call 10ba34 <== NOT EXECUTED 10a925: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a928: eb be jmp 10a8e8 <== NOT EXECUTED 10a92a: 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; 10a92c: 88 45 e7 mov %al,-0x19(%ebp) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 10a92f: 50 push %eax 10a930: 6a 01 push $0x1 10a932: 57 push %edi 10a933: 53 push %ebx 10a934: e8 8f fc ff ff call 10a5c8 10a939: 83 c4 10 add $0x10,%esp 10a93c: eb be jmp 10a8fc =============================================================================== 0010c628 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 10c628: 55 push %ebp <== NOT EXECUTED 10c629: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c62b: 53 push %ebx <== NOT EXECUTED 10c62c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10c62f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 10c632: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10c635: e8 76 e2 ff ff call 10a8b0 <== NOT EXECUTED if ( cflags_baud == -1 ) 10c63a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c63d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10c640: 74 16 je 10c658 <== NOT EXECUTED return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 10c642: 8b 53 38 mov 0x38(%ebx),%edx <== NOT EXECUTED 10c645: 81 e2 f0 ef ff ff and $0xffffeff0,%edx <== NOT EXECUTED 10c64b: 09 c2 or %eax,%edx <== NOT EXECUTED 10c64d: 89 53 38 mov %edx,0x38(%ebx) <== NOT EXECUTED return 0; 10c650: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10c652: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10c655: c9 leave <== NOT EXECUTED 10c656: c3 ret <== NOT EXECUTED 10c657: 90 nop <== NOT EXECUTED { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) return -1; 10c658: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; return 0; } 10c65d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10c660: c9 leave <== NOT EXECUTED 10c661: c3 ret <== NOT EXECUTED =============================================================================== 0010ab84 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10ab84: 55 push %ebp 10ab85: 89 e5 mov %esp,%ebp 10ab87: 56 push %esi 10ab88: 53 push %ebx 10ab89: 83 ec 10 sub $0x10,%esp 10ab8c: 8b 5d 08 mov 0x8(%ebp),%ebx 10ab8f: 8d 75 f4 lea -0xc(%ebp),%esi 10ab92: eb 28 jmp 10abbc } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10ab94: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10ab9a: c1 e0 05 shl $0x5,%eax 10ab9d: 8b 80 54 5f 12 00 mov 0x125f54(%eax),%eax 10aba3: 85 c0 test %eax,%eax 10aba5: 74 09 je 10abb0 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10aba7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10abaa: 53 push %ebx <== NOT EXECUTED 10abab: ff d0 call *%eax <== NOT EXECUTED 10abad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10abb0: 83 ec 0c sub $0xc,%esp 10abb3: 53 push %ebx 10abb4: e8 87 fd ff ff call 10a940 } 10abb9: 83 c4 10 add $0x10,%esp while (1) { /* * wait for rtems event */ rtems_event_receive( 10abbc: 56 push %esi 10abbd: 6a 00 push $0x0 10abbf: 6a 02 push $0x2 10abc1: 6a 03 push $0x3 10abc3: e8 d4 04 00 00 call 10b09c (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) { 10abc8: 83 c4 10 add $0x10,%esp 10abcb: f6 45 f4 01 testb $0x1,-0xc(%ebp) 10abcf: 74 c3 je 10ab94 <== ALWAYS TAKEN tty->txTaskId = 0; 10abd1: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10abd8: 00 00 00 rtems_task_delete(RTEMS_SELF); 10abdb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10abde: 6a 00 push $0x0 <== NOT EXECUTED 10abe0: e8 4f 0e 00 00 call 10ba34 <== NOT EXECUTED 10abe5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10abe8: eb aa jmp 10ab94 <== NOT EXECUTED =============================================================================== 0010a1a4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10a1a4: 55 push %ebp 10a1a5: 89 e5 mov %esp,%ebp 10a1a7: 57 push %edi 10a1a8: 56 push %esi 10a1a9: 53 push %ebx 10a1aa: 83 ec 20 sub $0x20,%esp 10a1ad: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a1b0: 8b 07 mov (%edi),%eax 10a1b2: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a1b5: 6a 00 push $0x0 10a1b7: 6a 00 push $0x0 10a1b9: ff 76 18 pushl 0x18(%esi) 10a1bc: e8 77 15 00 00 call 10b738 10a1c1: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a1c4: 83 c4 10 add $0x10,%esp 10a1c7: 85 c0 test %eax,%eax 10a1c9: 75 29 jne 10a1f4 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 10a1cb: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10a1d1: c1 e0 05 shl $0x5,%eax 10a1d4: 8b 80 4c 5f 12 00 mov 0x125f4c(%eax),%eax 10a1da: 85 c0 test %eax,%eax 10a1dc: 74 22 je 10a200 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10a1de: 83 ec 08 sub $0x8,%esp 10a1e1: 57 push %edi 10a1e2: 56 push %esi 10a1e3: ff d0 call *%eax 10a1e5: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_semaphore_release (tty->osem); 10a1e8: 5f pop %edi 10a1e9: ff 76 18 pushl 0x18(%esi) 10a1ec: e8 43 16 00 00 call 10b834 return sc; 10a1f1: 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; } 10a1f4: 8b 45 e4 mov -0x1c(%ebp),%eax 10a1f7: 8d 65 f4 lea -0xc(%ebp),%esp 10a1fa: 5b pop %ebx 10a1fb: 5e pop %esi 10a1fc: 5f pop %edi 10a1fd: c9 leave 10a1fe: c3 ret 10a1ff: 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) { 10a200: f6 46 34 01 testb $0x1,0x34(%esi) 10a204: 74 4e je 10a254 <== NEVER TAKEN uint32_t count = args->count; 10a206: 8b 47 10 mov 0x10(%edi),%eax 10a209: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10a20c: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10a20f: 8b 5d e0 mov -0x20(%ebp),%ebx 10a212: 85 db test %ebx,%ebx 10a214: 74 56 je 10a26c <== NEVER TAKEN 10a216: 31 db xor %ebx,%ebx 10a218: 89 7d dc mov %edi,-0x24(%ebp) 10a21b: 89 c7 mov %eax,%edi 10a21d: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 10a220: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 10a224: 89 f2 mov %esi,%edx 10a226: e8 6d fa ff ff call 109c98 10a22b: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a22c: 39 5d e0 cmp %ebx,-0x20(%ebp) 10a22f: 75 ef jne 10a220 10a231: 8b 7d dc mov -0x24(%ebp),%edi 10a234: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 10a237: 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); 10a23a: 83 ec 0c sub $0xc,%esp 10a23d: ff 76 18 pushl 0x18(%esi) 10a240: e8 ef 15 00 00 call 10b834 return sc; 10a245: 83 c4 10 add $0x10,%esp } 10a248: 8b 45 e4 mov -0x1c(%ebp),%eax 10a24b: 8d 65 f4 lea -0xc(%ebp),%esp 10a24e: 5b pop %ebx 10a24f: 5e pop %esi 10a250: 5f pop %edi 10a251: c9 leave 10a252: c3 ret 10a253: 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); 10a254: 51 push %ecx <== NOT EXECUTED 10a255: 56 push %esi <== NOT EXECUTED 10a256: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 10a259: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10a25c: e8 03 f9 ff ff call 109b64 <== NOT EXECUTED args->bytes_moved = args->count; 10a261: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 10a264: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 10a267: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a26a: eb ce jmp 10a23a <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a26c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a26e: eb c7 jmp 10a237 <== NOT EXECUTED =============================================================================== 001187f4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1187f4: 55 push %ebp 1187f5: 89 e5 mov %esp,%ebp 1187f7: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187fa: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187fd: 50 push %eax 1187fe: ff 75 08 pushl 0x8(%ebp) 118801: 68 80 0a 14 00 push $0x140a80 118806: e8 51 2a 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11880b: 83 c4 10 add $0x10,%esp 11880e: 8b 55 f4 mov -0xc(%ebp),%edx 118811: 85 d2 test %edx,%edx 118813: 74 07 je 11881c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118815: b8 04 00 00 00 mov $0x4,%eax } 11881a: c9 leave 11881b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 11881c: 83 78 38 04 cmpl $0x4,0x38(%eax) 118820: 74 0f je 118831 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118822: 83 ec 0c sub $0xc,%esp 118825: 83 c0 10 add $0x10,%eax 118828: 50 push %eax 118829: e8 6e 46 00 00 call 11ce9c <_Watchdog_Remove> 11882e: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118831: e8 8a 32 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118836: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118838: c9 leave 118839: c3 ret =============================================================================== 0010c068 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 57 push %edi 10c06c: 56 push %esi 10c06d: 53 push %ebx 10c06e: 83 ec 0c sub $0xc,%esp 10c071: 8b 5d 08 mov 0x8(%ebp),%ebx 10c074: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c077: 85 db test %ebx,%ebx 10c079: 74 6d je 10c0e8 return RTEMS_INVALID_NAME; if ( !id ) 10c07b: 85 f6 test %esi,%esi 10c07d: 0f 84 89 00 00 00 je 10c10c 10c083: a1 94 79 12 00 mov 0x127994,%eax 10c088: 40 inc %eax 10c089: a3 94 79 12 00 mov %eax,0x127994 * 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 ); 10c08e: 83 ec 0c sub $0xc,%esp 10c091: 68 a0 7c 12 00 push $0x127ca0 10c096: e8 41 0e 00 00 call 10cedc <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c09b: 83 c4 10 add $0x10,%esp 10c09e: 85 c0 test %eax,%eax 10c0a0: 74 56 je 10c0f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c0a2: 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; 10c0a9: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c0b0: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c0b7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c0be: 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 ), 10c0c5: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c0c8: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c0cb: 8b 0d bc 7c 12 00 mov 0x127cbc,%ecx 10c0d1: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c0d4: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c0d7: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c0d9: e8 12 1b 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c0de: 31 c0 xor %eax,%eax } 10c0e0: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e3: 5b pop %ebx 10c0e4: 5e pop %esi 10c0e5: 5f pop %edi 10c0e6: c9 leave 10c0e7: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c0e8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c0f0: 5b pop %ebx 10c0f1: 5e pop %esi 10c0f2: 5f pop %edi 10c0f3: c9 leave 10c0f4: c3 ret 10c0f5: 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(); 10c0f8: e8 f3 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c0fd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c102: 8d 65 f4 lea -0xc(%ebp),%esp 10c105: 5b pop %ebx 10c106: 5e pop %esi 10c107: 5f pop %edi 10c108: c9 leave 10c109: c3 ret 10c10a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c10c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c111: 8d 65 f4 lea -0xc(%ebp),%esp 10c114: 5b pop %ebx 10c115: 5e pop %esi 10c116: 5f pop %edi 10c117: c9 leave 10c118: c3 ret =============================================================================== 001188f0 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1188f0: 55 push %ebp 1188f1: 89 e5 mov %esp,%ebp 1188f3: 53 push %ebx 1188f4: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1188f7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1188fa: 50 push %eax 1188fb: ff 75 08 pushl 0x8(%ebp) 1188fe: 68 80 0a 14 00 push $0x140a80 118903: e8 54 29 00 00 call 11b25c <_Objects_Get> 118908: 89 c3 mov %eax,%ebx switch ( location ) { 11890a: 83 c4 10 add $0x10,%esp 11890d: 8b 4d f4 mov -0xc(%ebp),%ecx 118910: 85 c9 test %ecx,%ecx 118912: 75 38 jne 11894c case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118914: 83 ec 08 sub $0x8,%esp 118917: 50 push %eax 118918: 68 80 0a 14 00 push $0x140a80 11891d: e8 ca 24 00 00 call 11adec <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118922: 8d 43 10 lea 0x10(%ebx),%eax 118925: 89 04 24 mov %eax,(%esp) 118928: e8 6f 45 00 00 call 11ce9c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 11892d: 58 pop %eax 11892e: 5a pop %edx 11892f: 53 push %ebx 118930: 68 80 0a 14 00 push $0x140a80 118935: e8 ae 27 00 00 call 11b0e8 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11893a: e8 81 31 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11893f: 83 c4 10 add $0x10,%esp 118942: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118944: 8b 5d fc mov -0x4(%ebp),%ebx 118947: c9 leave 118948: c3 ret 118949: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11894c: b8 04 00 00 00 mov $0x4,%eax } 118951: 8b 5d fc mov -0x4(%ebp),%ebx 118954: c9 leave 118955: c3 ret =============================================================================== 0010c11c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c11c: 55 push %ebp 10c11d: 89 e5 mov %esp,%ebp 10c11f: 57 push %edi 10c120: 56 push %esi 10c121: 53 push %ebx 10c122: 83 ec 2c sub $0x2c,%esp 10c125: 8b 5d 0c mov 0xc(%ebp),%ebx 10c128: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c12b: 85 db test %ebx,%ebx 10c12d: 0f 84 99 00 00 00 je 10c1cc return RTEMS_INVALID_NUMBER; if ( !routine ) 10c133: 85 f6 test %esi,%esi 10c135: 0f 84 b1 00 00 00 je 10c1ec Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c13b: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c13c: 8d 45 e4 lea -0x1c(%ebp),%eax 10c13f: 50 push %eax 10c140: ff 75 08 pushl 0x8(%ebp) 10c143: 68 a0 7c 12 00 push $0x127ca0 10c148: e8 3f 12 00 00 call 10d38c <_Objects_Get> 10c14d: 89 c7 mov %eax,%edi switch ( location ) { 10c14f: 83 c4 10 add $0x10,%esp 10c152: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c155: 85 c9 test %ecx,%ecx 10c157: 74 0f je 10c168 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c159: b8 04 00 00 00 mov $0x4,%eax } 10c15e: 8d 65 f4 lea -0xc(%ebp),%esp 10c161: 5b pop %ebx 10c162: 5e pop %esi 10c163: 5f pop %edi 10c164: c9 leave 10c165: c3 ret 10c166: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c168: 8d 50 10 lea 0x10(%eax),%edx 10c16b: 83 ec 0c sub $0xc,%esp 10c16e: 52 push %edx 10c16f: 89 55 d4 mov %edx,-0x2c(%ebp) 10c172: e8 cd 2a 00 00 call 10ec44 <_Watchdog_Remove> _ISR_Disable( level ); 10c177: 9c pushf 10c178: fa cli 10c179: 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 ) { 10c17a: 83 c4 10 add $0x10,%esp 10c17d: 8b 57 18 mov 0x18(%edi),%edx 10c180: 85 d2 test %edx,%edx 10c182: 8b 55 d4 mov -0x2c(%ebp),%edx 10c185: 75 55 jne 10c1dc /* * 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; 10c187: 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; 10c18e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c195: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c198: 8b 4d 08 mov 0x8(%ebp),%ecx 10c19b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c19e: 8b 4d 14 mov 0x14(%ebp),%ecx 10c1a1: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c1a4: 50 push %eax 10c1a5: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c1a6: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c1a9: 83 ec 08 sub $0x8,%esp 10c1ac: 52 push %edx 10c1ad: 68 64 7a 12 00 push $0x127a64 10c1b2: e8 55 29 00 00 call 10eb0c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c1b7: e8 34 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1bc: 83 c4 10 add $0x10,%esp 10c1bf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret 10c1c9: 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; 10c1cc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1d4: 5b pop %ebx 10c1d5: 5e pop %esi 10c1d6: 5f pop %edi 10c1d7: c9 leave 10c1d8: c3 ret 10c1d9: 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 ); 10c1dc: 50 push %eax 10c1dd: 9d popf _Thread_Enable_dispatch(); 10c1de: e8 0d 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1e3: 31 c0 xor %eax,%eax 10c1e5: e9 74 ff ff ff jmp 10c15e 10c1ea: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c1ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f4: 5b pop %ebx 10c1f5: 5e pop %esi 10c1f6: 5f pop %edi 10c1f7: c9 leave 10c1f8: c3 ret =============================================================================== 00118a38 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118a38: 55 push %ebp 118a39: 89 e5 mov %esp,%ebp 118a3b: 57 push %edi 118a3c: 56 push %esi 118a3d: 53 push %ebx 118a3e: 83 ec 2c sub $0x2c,%esp 118a41: 8b 75 08 mov 0x8(%ebp),%esi 118a44: 8b 7d 0c mov 0xc(%ebp),%edi 118a47: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118a4a: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 118a51: 75 0d jne 118a60 return RTEMS_NOT_DEFINED; 118a53: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a58: 8d 65 f4 lea -0xc(%ebp),%esp 118a5b: 5b pop %ebx 118a5c: 5e pop %esi 118a5d: 5f pop %edi 118a5e: c9 leave 118a5f: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118a60: 83 ec 0c sub $0xc,%esp 118a63: 57 push %edi 118a64: e8 7b d4 ff ff call 115ee4 <_TOD_Validate> 118a69: 83 c4 10 add $0x10,%esp 118a6c: 84 c0 test %al,%al 118a6e: 74 1e je 118a8e return RTEMS_INVALID_CLOCK; if ( !routine ) 118a70: 85 db test %ebx,%ebx 118a72: 0f 84 a4 00 00 00 je 118b1c return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118a78: 83 ec 0c sub $0xc,%esp 118a7b: 57 push %edi 118a7c: e8 d7 d3 ff ff call 115e58 <_TOD_To_seconds> 118a81: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118a83: 83 c4 10 add $0x10,%esp 118a86: 3b 05 08 08 14 00 cmp 0x140808,%eax 118a8c: 77 0e ja 118a9c return RTEMS_INVALID_CLOCK; 118a8e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: 8d 65 f4 lea -0xc(%ebp),%esp 118a96: 5b pop %ebx 118a97: 5e pop %esi 118a98: 5f pop %edi 118a99: c9 leave 118a9a: c3 ret 118a9b: 90 nop <== NOT EXECUTED 118a9c: 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 ); 118a9d: 8d 45 e4 lea -0x1c(%ebp),%eax 118aa0: 50 push %eax 118aa1: 56 push %esi 118aa2: 68 80 0a 14 00 push $0x140a80 118aa7: e8 b0 27 00 00 call 11b25c <_Objects_Get> switch ( location ) { 118aac: 83 c4 10 add $0x10,%esp 118aaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 118ab2: 85 c9 test %ecx,%ecx 118ab4: 75 5a jne 118b10 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118ab6: 8d 48 10 lea 0x10(%eax),%ecx 118ab9: 83 ec 0c sub $0xc,%esp 118abc: 51 push %ecx 118abd: 89 45 d0 mov %eax,-0x30(%ebp) 118ac0: 89 4d d4 mov %ecx,-0x2c(%ebp) 118ac3: e8 d4 43 00 00 call 11ce9c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118ac8: 8b 55 d0 mov -0x30(%ebp),%edx 118acb: 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; 118ad2: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ad9: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118adc: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118adf: 8b 45 14 mov 0x14(%ebp),%eax 118ae2: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 118ae5: 2b 3d 08 08 14 00 sub 0x140808,%edi 118aeb: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118aee: 58 pop %eax 118aef: 5a pop %edx 118af0: 8b 4d d4 mov -0x2c(%ebp),%ecx 118af3: 51 push %ecx 118af4: 68 38 08 14 00 push $0x140838 118af9: e8 66 42 00 00 call 11cd64 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118afe: e8 bd 2f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b03: 83 c4 10 add $0x10,%esp 118b06: 31 c0 xor %eax,%eax 118b08: e9 4b ff ff ff jmp 118a58 118b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b10: b8 04 00 00 00 mov $0x4,%eax 118b15: e9 3e ff ff ff jmp 118a58 118b1a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118b1c: b8 09 00 00 00 mov $0x9,%eax 118b21: e9 32 ff ff ff jmp 118a58 =============================================================================== 00118b28 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 118b28: 55 push %ebp 118b29: 89 e5 mov %esp,%ebp 118b2b: 53 push %ebx 118b2c: 83 ec 14 sub $0x14,%esp 118b2f: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118b32: 85 db test %ebx,%ebx 118b34: 74 4a je 118b80 118b36: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 118b37: 8d 45 f4 lea -0xc(%ebp),%eax 118b3a: 50 push %eax 118b3b: ff 75 08 pushl 0x8(%ebp) 118b3e: 68 80 0a 14 00 push $0x140a80 118b43: e8 14 27 00 00 call 11b25c <_Objects_Get> switch ( location ) { 118b48: 83 c4 10 add $0x10,%esp 118b4b: 8b 55 f4 mov -0xc(%ebp),%edx 118b4e: 85 d2 test %edx,%edx 118b50: 74 0a je 118b5c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b52: b8 04 00 00 00 mov $0x4,%eax } 118b57: 8b 5d fc mov -0x4(%ebp),%ebx 118b5a: c9 leave 118b5b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118b5c: 8b 50 38 mov 0x38(%eax),%edx 118b5f: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118b61: 8b 50 1c mov 0x1c(%eax),%edx 118b64: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118b67: 8b 50 24 mov 0x24(%eax),%edx 118b6a: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118b6d: 8b 40 28 mov 0x28(%eax),%eax 118b70: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118b73: e8 48 2f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b78: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b7a: 8b 5d fc mov -0x4(%ebp),%ebx 118b7d: c9 leave 118b7e: c3 ret 118b7f: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118b80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b85: 8b 5d fc mov -0x4(%ebp),%ebx 118b88: c9 leave 118b89: c3 ret =============================================================================== 001191b4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1191b4: 55 push %ebp 1191b5: 89 e5 mov %esp,%ebp 1191b7: 56 push %esi 1191b8: 53 push %ebx 1191b9: 83 ec 10 sub $0x10,%esp 1191bc: 8b 45 08 mov 0x8(%ebp),%eax 1191bf: 85 c0 test %eax,%eax 1191c1: 74 41 je 119204 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1191c3: 0f b6 15 14 82 13 00 movzbl 0x138214,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1191ca: 39 d0 cmp %edx,%eax 1191cc: 76 42 jbe 119210 * 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 ) 1191ce: 40 inc %eax 1191cf: 75 33 jne 119204 return RTEMS_INVALID_PRIORITY; _priority = 0; 1191d1: 31 f6 xor %esi,%esi 1191d3: 8b 15 74 07 14 00 mov 0x140774,%edx 1191d9: 42 inc %edx 1191da: 89 15 74 07 14 00 mov %edx,0x140774 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1191e0: 8a 1d a0 c0 13 00 mov 0x13c0a0,%bl initialized = true; 1191e6: c6 05 a0 c0 13 00 01 movb $0x1,0x13c0a0 _Thread_Enable_dispatch(); 1191ed: e8 ce 28 00 00 call 11bac0 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1191f2: 84 db test %bl,%bl 1191f4: 74 1e je 119214 return RTEMS_INCORRECT_STATE; 1191f6: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1191fb: 8d 65 f8 lea -0x8(%ebp),%esp 1191fe: 5b pop %ebx 1191ff: 5e pop %esi 119200: c9 leave 119201: c3 ret 119202: 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; 119204: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 119209: 8d 65 f8 lea -0x8(%ebp),%esp 11920c: 5b pop %ebx 11920d: 5e pop %esi 11920e: c9 leave 11920f: c3 ret 119210: 89 c6 mov %eax,%esi 119212: eb bf jmp 1191d3 * 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( 119214: 83 ec 08 sub $0x8,%esp 119217: 8d 45 f4 lea -0xc(%ebp),%eax 11921a: 50 push %eax 11921b: 8b 45 10 mov 0x10(%ebp),%eax 11921e: 80 cc 80 or $0x80,%ah 119221: 50 push %eax 119222: 68 00 01 00 00 push $0x100 119227: ff 75 0c pushl 0xc(%ebp) 11922a: 56 push %esi 11922b: 68 45 4d 49 54 push $0x54494d45 119230: e8 db ec ff ff call 117f10 /* 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) { 119235: 83 c4 20 add $0x20,%esp 119238: 85 c0 test %eax,%eax 11923a: 74 10 je 11924c initialized = false; 11923c: c6 05 a0 c0 13 00 00 movb $0x0,0x13c0a0 initialized = false; } #endif return status; } 119243: 8d 65 f8 lea -0x8(%ebp),%esp 119246: 5b pop %ebx 119247: 5e pop %esi 119248: c9 leave 119249: c3 ret 11924a: 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) 11924c: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11924f: 0f b7 c8 movzwl %ax,%ecx 119252: 8b 15 1c 07 14 00 mov 0x14071c,%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( 119258: 8b 14 8a mov (%edx,%ecx,4),%edx 11925b: 89 15 20 c0 13 00 mov %edx,0x13c020 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119261: c7 05 50 c0 13 00 54 movl $0x13c054,0x13c050 119268: c0 13 00 the_chain->permanent_null = NULL; 11926b: c7 05 54 c0 13 00 00 movl $0x0,0x13c054 119272: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119275: c7 05 58 c0 13 00 50 movl $0x13c050,0x13c058 11927c: c0 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11927f: c7 05 88 c0 13 00 8c movl $0x13c08c,0x13c088 119286: c0 13 00 the_chain->permanent_null = NULL; 119289: c7 05 8c c0 13 00 00 movl $0x0,0x13c08c 119290: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119293: c7 05 90 c0 13 00 88 movl $0x13c088,0x13c090 11929a: c0 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11929d: c7 05 30 c0 13 00 00 movl $0x0,0x13c030 1192a4: 00 00 00 the_watchdog->routine = routine; 1192a7: c7 05 44 c0 13 00 0c movl $0x11b90c,0x13c044 1192ae: b9 11 00 the_watchdog->id = id; 1192b1: a3 48 c0 13 00 mov %eax,0x13c048 the_watchdog->user_data = user_data; 1192b6: c7 05 4c c0 13 00 00 movl $0x0,0x13c04c 1192bd: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1192c0: c7 05 68 c0 13 00 00 movl $0x0,0x13c068 1192c7: 00 00 00 the_watchdog->routine = routine; 1192ca: c7 05 7c c0 13 00 0c movl $0x11b90c,0x13c07c 1192d1: b9 11 00 the_watchdog->id = id; 1192d4: a3 80 c0 13 00 mov %eax,0x13c080 the_watchdog->user_data = user_data; 1192d9: c7 05 84 c0 13 00 00 movl $0x0,0x13c084 1192e0: 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; 1192e3: c7 05 24 c0 13 00 84 movl $0x119084,0x13c024 1192ea: 90 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1192ed: 8b 15 c4 08 14 00 mov 0x1408c4,%edx 1192f3: 89 15 5c c0 13 00 mov %edx,0x13c05c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1192f9: 8b 15 08 08 14 00 mov 0x140808,%edx 1192ff: 89 15 94 c0 13 00 mov %edx,0x13c094 ts->insert_chain = NULL; 119305: c7 05 98 c0 13 00 00 movl $0x0,0x13c098 11930c: 00 00 00 ts->active = false; 11930f: c6 05 9c c0 13 00 00 movb $0x0,0x13c09c /* * The default timer server is now available. */ _Timer_server = ts; 119316: c7 05 c0 0a 14 00 20 movl $0x13c020,0x140ac0 11931d: c0 13 00 /* * Start the timer server */ status = rtems_task_start( 119320: 53 push %ebx 119321: 68 20 c0 13 00 push $0x13c020 119326: 68 d8 8e 11 00 push $0x118ed8 11932b: 50 push %eax 11932c: e8 a7 f2 ff ff call 1185d8 if (status) { initialized = false; } #endif return status; 119331: 83 c4 10 add $0x10,%esp 119334: e9 d0 fe ff ff jmp 119209 =============================================================================== 00118bb0 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118bb0: 55 push %ebp 118bb1: 89 e5 mov %esp,%ebp 118bb3: 56 push %esi 118bb4: 53 push %ebx 118bb5: 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 ); 118bb8: 8d 45 f4 lea -0xc(%ebp),%eax 118bbb: 50 push %eax 118bbc: ff 75 08 pushl 0x8(%ebp) 118bbf: 68 80 0a 14 00 push $0x140a80 118bc4: e8 93 26 00 00 call 11b25c <_Objects_Get> 118bc9: 89 c3 mov %eax,%ebx switch ( location ) { 118bcb: 83 c4 10 add $0x10,%esp 118bce: 8b 45 f4 mov -0xc(%ebp),%eax 118bd1: 85 c0 test %eax,%eax 118bd3: 74 0f je 118be4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bd5: b8 04 00 00 00 mov $0x4,%eax } 118bda: 8d 65 f8 lea -0x8(%ebp),%esp 118bdd: 5b pop %ebx 118bde: 5e pop %esi 118bdf: c9 leave 118be0: c3 ret 118be1: 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 ) { 118be4: 8b 43 38 mov 0x38(%ebx),%eax 118be7: 85 c0 test %eax,%eax 118be9: 74 1d je 118c08 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118beb: 48 dec %eax 118bec: 74 3a je 118c28 /* * 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; 118bee: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118bf3: 89 45 e4 mov %eax,-0x1c(%ebp) 118bf6: e8 c5 2e 00 00 call 11bac0 <_Thread_Enable_dispatch> return status; 118bfb: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118bfe: 8d 65 f8 lea -0x8(%ebp),%esp 118c01: 5b pop %ebx 118c02: 5e pop %esi 118c03: c9 leave 118c04: c3 ret 118c05: 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 ); 118c08: 83 c3 10 add $0x10,%ebx 118c0b: 83 ec 0c sub $0xc,%esp 118c0e: 53 push %ebx 118c0f: e8 88 42 00 00 call 11ce9c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118c14: 59 pop %ecx 118c15: 5e pop %esi 118c16: 53 push %ebx 118c17: 68 44 08 14 00 push $0x140844 118c1c: e8 43 41 00 00 call 11cd64 <_Watchdog_Insert> 118c21: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c24: 31 c0 xor %eax,%eax 118c26: eb cb jmp 118bf3 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; 118c28: 8b 35 c0 0a 14 00 mov 0x140ac0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118c2e: 83 ec 0c sub $0xc,%esp 118c31: 8d 43 10 lea 0x10(%ebx),%eax 118c34: 50 push %eax 118c35: e8 62 42 00 00 call 11ce9c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118c3a: 58 pop %eax 118c3b: 5a pop %edx 118c3c: 53 push %ebx 118c3d: 56 push %esi 118c3e: ff 56 04 call *0x4(%esi) 118c41: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c44: 31 c0 xor %eax,%eax 118c46: eb ab jmp 118bf3 =============================================================================== 00118c48 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118c48: 55 push %ebp 118c49: 89 e5 mov %esp,%ebp 118c4b: 57 push %edi 118c4c: 56 push %esi 118c4d: 53 push %ebx 118c4e: 83 ec 2c sub $0x2c,%esp 118c51: 8b 7d 0c mov 0xc(%ebp),%edi 118c54: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118c57: 8b 1d c0 0a 14 00 mov 0x140ac0,%ebx if ( !timer_server ) 118c5d: 85 db test %ebx,%ebx 118c5f: 0f 84 9f 00 00 00 je 118d04 return RTEMS_INCORRECT_STATE; if ( !routine ) 118c65: 85 f6 test %esi,%esi 118c67: 0f 84 a3 00 00 00 je 118d10 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118c6d: 85 ff test %edi,%edi 118c6f: 75 0f jne 118c80 return RTEMS_INVALID_NUMBER; 118c71: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c76: 8d 65 f4 lea -0xc(%ebp),%esp 118c79: 5b pop %ebx 118c7a: 5e pop %esi 118c7b: 5f pop %edi 118c7c: c9 leave 118c7d: c3 ret 118c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED 118c80: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118c81: 8d 45 e4 lea -0x1c(%ebp),%eax 118c84: 50 push %eax 118c85: ff 75 08 pushl 0x8(%ebp) 118c88: 68 80 0a 14 00 push $0x140a80 118c8d: e8 ca 25 00 00 call 11b25c <_Objects_Get> 118c92: 89 c2 mov %eax,%edx switch ( location ) { 118c94: 83 c4 10 add $0x10,%esp 118c97: 8b 45 e4 mov -0x1c(%ebp),%eax 118c9a: 85 c0 test %eax,%eax 118c9c: 75 56 jne 118cf4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c9e: 83 ec 0c sub $0xc,%esp 118ca1: 8d 42 10 lea 0x10(%edx),%eax 118ca4: 50 push %eax 118ca5: 89 55 d4 mov %edx,-0x2c(%ebp) 118ca8: e8 ef 41 00 00 call 11ce9c <_Watchdog_Remove> _ISR_Disable( level ); 118cad: 9c pushf 118cae: fa cli 118caf: 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 ) { 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 8b 55 d4 mov -0x2c(%ebp),%edx 118cb6: 8b 4a 18 mov 0x18(%edx),%ecx 118cb9: 85 c9 test %ecx,%ecx 118cbb: 75 5f jne 118d1c /* * 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; 118cbd: 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; 118cc4: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ccb: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118cce: 8b 4d 08 mov 0x8(%ebp),%ecx 118cd1: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118cd4: 8b 4d 14 mov 0x14(%ebp),%ecx 118cd7: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118cda: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118cdd: 50 push %eax 118cde: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118cdf: 83 ec 08 sub $0x8,%esp 118ce2: 52 push %edx 118ce3: 53 push %ebx 118ce4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ce7: e8 d4 2d 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cec: 83 c4 10 add $0x10,%esp 118cef: 31 c0 xor %eax,%eax 118cf1: eb 83 jmp 118c76 118cf3: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118cf4: b8 04 00 00 00 mov $0x4,%eax } 118cf9: 8d 65 f4 lea -0xc(%ebp),%esp 118cfc: 5b pop %ebx 118cfd: 5e pop %esi 118cfe: 5f pop %edi 118cff: c9 leave 118d00: c3 ret 118d01: 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; 118d04: b8 0e 00 00 00 mov $0xe,%eax 118d09: e9 68 ff ff ff jmp 118c76 118d0e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118d10: b8 09 00 00 00 mov $0x9,%eax 118d15: e9 5c ff ff ff jmp 118c76 118d1a: 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 ); 118d1c: 50 push %eax 118d1d: 9d popf _Thread_Enable_dispatch(); 118d1e: e8 9d 2d 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118d23: 31 c0 xor %eax,%eax 118d25: e9 4c ff ff ff jmp 118c76 =============================================================================== 00118d2c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118d2c: 55 push %ebp 118d2d: 89 e5 mov %esp,%ebp 118d2f: 57 push %edi 118d30: 56 push %esi 118d31: 53 push %ebx 118d32: 83 ec 2c sub $0x2c,%esp 118d35: 8b 7d 0c mov 0xc(%ebp),%edi 118d38: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118d3b: 8b 1d c0 0a 14 00 mov 0x140ac0,%ebx if ( !timer_server ) 118d41: 85 db test %ebx,%ebx 118d43: 0f 84 d7 00 00 00 je 118e20 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118d49: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 118d50: 0f 84 aa 00 00 00 je 118e00 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118d56: 85 f6 test %esi,%esi 118d58: 0f 84 b2 00 00 00 je 118e10 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118d5e: 83 ec 0c sub $0xc,%esp 118d61: 57 push %edi 118d62: e8 7d d1 ff ff call 115ee4 <_TOD_Validate> 118d67: 83 c4 10 add $0x10,%esp 118d6a: 84 c0 test %al,%al 118d6c: 75 0e jne 118d7c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118d6e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d73: 8d 65 f4 lea -0xc(%ebp),%esp 118d76: 5b pop %ebx 118d77: 5e pop %esi 118d78: 5f pop %edi 118d79: c9 leave 118d7a: c3 ret 118d7b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118d7c: 83 ec 0c sub $0xc,%esp 118d7f: 57 push %edi 118d80: e8 d3 d0 ff ff call 115e58 <_TOD_To_seconds> 118d85: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118d87: 83 c4 10 add $0x10,%esp 118d8a: 3b 05 08 08 14 00 cmp 0x140808,%eax 118d90: 76 dc jbe 118d6e 118d92: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118d93: 8d 45 e4 lea -0x1c(%ebp),%eax 118d96: 50 push %eax 118d97: ff 75 08 pushl 0x8(%ebp) 118d9a: 68 80 0a 14 00 push $0x140a80 118d9f: e8 b8 24 00 00 call 11b25c <_Objects_Get> 118da4: 89 c2 mov %eax,%edx switch ( location ) { 118da6: 83 c4 10 add $0x10,%esp 118da9: 8b 45 e4 mov -0x1c(%ebp),%eax 118dac: 85 c0 test %eax,%eax 118dae: 75 7c jne 118e2c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118db0: 83 ec 0c sub $0xc,%esp 118db3: 8d 42 10 lea 0x10(%edx),%eax 118db6: 50 push %eax 118db7: 89 55 d4 mov %edx,-0x2c(%ebp) 118dba: e8 dd 40 00 00 call 11ce9c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118dbf: 8b 55 d4 mov -0x2c(%ebp),%edx 118dc2: 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; 118dc9: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118dd0: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118dd3: 8b 45 08 mov 0x8(%ebp),%eax 118dd6: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118dd9: 8b 45 14 mov 0x14(%ebp),%eax 118ddc: 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(); 118ddf: 2b 3d 08 08 14 00 sub 0x140808,%edi 118de5: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118de8: 58 pop %eax 118de9: 59 pop %ecx 118dea: 52 push %edx 118deb: 53 push %ebx 118dec: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118def: e8 cc 2c 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118df4: 83 c4 10 add $0x10,%esp 118df7: 31 c0 xor %eax,%eax 118df9: e9 75 ff ff ff jmp 118d73 118dfe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118e00: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118e08: 5b pop %ebx <== NOT EXECUTED 118e09: 5e pop %esi <== NOT EXECUTED 118e0a: 5f pop %edi <== NOT EXECUTED 118e0b: c9 leave <== NOT EXECUTED 118e0c: c3 ret <== NOT EXECUTED 118e0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118e10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e15: 8d 65 f4 lea -0xc(%ebp),%esp 118e18: 5b pop %ebx 118e19: 5e pop %esi 118e1a: 5f pop %edi 118e1b: c9 leave 118e1c: c3 ret 118e1d: 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; 118e20: b8 0e 00 00 00 mov $0xe,%eax 118e25: e9 49 ff ff ff jmp 118d73 118e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118e2c: b8 04 00 00 00 mov $0x4,%eax 118e31: e9 3d ff ff ff jmp 118d73 =============================================================================== 0010c5e4 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10c5e4: 55 push %ebp 10c5e5: 89 e5 mov %esp,%ebp 10c5e7: 57 push %edi 10c5e8: 56 push %esi 10c5e9: 53 push %ebx 10c5ea: 83 ec 1c sub $0x1c,%esp 10c5ed: 89 c3 mov %eax,%ebx 10c5ef: 89 d6 mov %edx,%esi 10c5f1: 89 cf mov %ecx,%edi int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 10c5f3: a9 00 00 00 20 test $0x20000000,%eax 10c5f8: 74 2b je 10c625 if (rtems_panic_in_progress++) 10c5fa: 8b 15 80 c3 12 00 mov 0x12c380,%edx 10c600: 8d 42 01 lea 0x1(%edx),%eax 10c603: a3 80 c3 12 00 mov %eax,0x12c380 10c608: 85 d2 test %edx,%edx 10c60a: 74 10 je 10c61c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c60c: a1 f4 c4 12 00 mov 0x12c4f4,%eax <== NOT EXECUTED 10c611: 40 inc %eax <== NOT EXECUTED 10c612: a3 f4 c4 12 00 mov %eax,0x12c4f4 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10c617: a1 80 c3 12 00 mov 0x12c380,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10c61c: 83 f8 02 cmp $0x2,%eax 10c61f: 0f 8f af 00 00 00 jg 10c6d4 <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10c625: 83 ec 0c sub $0xc,%esp 10c628: a1 80 a1 12 00 mov 0x12a180,%eax 10c62d: ff 70 08 pushl 0x8(%eax) 10c630: e8 cb b2 00 00 call 117900 status = error_flag & ~RTEMS_ERROR_MASK; 10c635: 89 d8 mov %ebx,%eax 10c637: 25 ff ff ff 8f and $0x8fffffff,%eax 10c63c: 89 45 e4 mov %eax,-0x1c(%ebp) if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10c63f: 83 c4 10 add $0x10,%esp 10c642: 81 e3 00 00 00 40 and $0x40000000,%ebx 10c648: 0f 85 be 00 00 00 jne 10c70c rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 10c64e: 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); 10c650: 50 push %eax 10c651: 57 push %edi 10c652: 56 push %esi 10c653: a1 80 a1 12 00 mov 0x12a180,%eax 10c658: ff 70 0c pushl 0xc(%eax) 10c65b: e8 3c 0f 01 00 call 11d59c 10c660: 89 c6 mov %eax,%esi if (status) 10c662: 83 c4 10 add $0x10,%esp 10c665: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c668: 85 c9 test %ecx,%ecx 10c66a: 75 74 jne 10c6e0 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 10c66c: 83 fb 00 cmp $0x0,%ebx 10c66f: 74 30 je 10c6a1 if ((local_errno > 0) && *strerror(local_errno)) 10c671: 7e 15 jle 10c688 10c673: 83 ec 0c sub $0xc,%esp 10c676: 53 push %ebx 10c677: e8 c8 bd 00 00 call 118444 10c67c: 83 c4 10 add $0x10,%esp 10c67f: 80 38 00 cmpb $0x0,(%eax) 10c682: 0f 85 90 00 00 00 jne 10c718 <== ALWAYS TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10c688: 52 push %edx 10c689: 53 push %ebx 10c68a: 68 09 58 12 00 push $0x125809 10c68f: a1 80 a1 12 00 mov 0x12a180,%eax 10c694: ff 70 0c pushl 0xc(%eax) 10c697: e8 58 b6 00 00 call 117cf4 10c69c: 01 c6 add %eax,%esi 10c69e: 83 c4 10 add $0x10,%esp } chars_written += fprintf(stderr, "\n"); 10c6a1: 83 ec 08 sub $0x8,%esp 10c6a4: 68 c2 4a 12 00 push $0x124ac2 10c6a9: a1 80 a1 12 00 mov 0x12a180,%eax 10c6ae: ff 70 0c pushl 0xc(%eax) 10c6b1: e8 3e b6 00 00 call 117cf4 10c6b6: 8d 34 30 lea (%eax,%esi,1),%esi (void) fflush(stderr); 10c6b9: 58 pop %eax 10c6ba: a1 80 a1 12 00 mov 0x12a180,%eax 10c6bf: ff 70 0c pushl 0xc(%eax) 10c6c2: e8 39 b2 00 00 call 117900 return chars_written; 10c6c7: 83 c4 10 add $0x10,%esp } 10c6ca: 89 f0 mov %esi,%eax 10c6cc: 8d 65 f4 lea -0xc(%ebp),%esp 10c6cf: 5b pop %ebx 10c6d0: 5e pop %esi 10c6d1: 5f pop %edi 10c6d2: c9 leave 10c6d3: 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; 10c6d4: 31 f6 xor %esi,%esi <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); return chars_written; } 10c6d6: 89 f0 mov %esi,%eax <== NOT EXECUTED 10c6d8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c6db: 5b pop %ebx <== NOT EXECUTED 10c6dc: 5e pop %esi <== NOT EXECUTED 10c6dd: 5f pop %edi <== NOT EXECUTED 10c6de: c9 leave <== NOT EXECUTED 10c6df: c3 ret <== NOT EXECUTED chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10c6e0: 83 ec 0c sub $0xc,%esp 10c6e3: ff 75 e4 pushl -0x1c(%ebp) 10c6e6: e8 e1 fe ff ff call 10c5cc 10c6eb: 83 c4 0c add $0xc,%esp 10c6ee: 50 push %eax 10c6ef: 68 ee 57 12 00 push $0x1257ee 10c6f4: a1 80 a1 12 00 mov 0x12a180,%eax 10c6f9: ff 70 0c pushl 0xc(%eax) 10c6fc: e8 f3 b5 00 00 call 117cf4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 10c701: 01 c6 add %eax,%esi 10c703: 83 c4 10 add $0x10,%esp 10c706: e9 61 ff ff ff jmp 10c66c 10c70b: 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; 10c70c: e8 57 ae 00 00 call 117568 <__errno> 10c711: 8b 18 mov (%eax),%ebx 10c713: e9 38 ff ff ff jmp 10c650 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)); 10c718: 83 ec 0c sub $0xc,%esp 10c71b: 53 push %ebx 10c71c: e8 23 bd 00 00 call 118444 10c721: 83 c4 0c add $0xc,%esp 10c724: 50 push %eax 10c725: 68 fc 57 12 00 push $0x1257fc 10c72a: e9 60 ff ff ff jmp 10c68f =============================================================================== 00108634 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 108634: 55 push %ebp 108635: 89 e5 mov %esp,%ebp 108637: 57 push %edi 108638: 56 push %esi 108639: 53 push %ebx 10863a: 83 ec 1c sub $0x1c,%esp 10863d: 89 c6 mov %eax,%esi 10863f: 89 55 e0 mov %edx,-0x20(%ebp) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 108642: 31 ff xor %edi,%edi static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 108644: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 10864b: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 10864d: 8b 46 04 mov 0x4(%esi),%eax 108650: 48 dec %eax 108651: 89 46 04 mov %eax,0x4(%esi) 108654: 85 c0 test %eax,%eax 108656: 78 52 js 1086aa <== NEVER TAKEN 108658: 8b 06 mov (%esi),%eax 10865a: 0f b6 08 movzbl (%eax),%ecx 10865d: 40 inc %eax 10865e: 89 06 mov %eax,(%esi) if (c == ':') 108660: 83 f9 3a cmp $0x3a,%ecx 108663: 74 5f je 1086c4 break; if (sign == 0) { 108665: 85 ff test %edi,%edi 108667: 75 0e jne 108677 if (c == '-') { 108669: 83 f9 2d cmp $0x2d,%ecx 10866c: 0f 84 8a 00 00 00 je 1086fc sign = -1; limit++; continue; } sign = 1; 108672: bf 01 00 00 00 mov $0x1,%edi } if (!isdigit(c)) 108677: a1 b4 50 12 00 mov 0x1250b4,%eax 10867c: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 108681: 74 6d je 1086f0 return 0; d = c - '0'; if ((i > (limit / 10)) 108683: b8 cd cc cc cc mov $0xcccccccd,%eax 108688: f7 65 e4 mull -0x1c(%ebp) 10868b: c1 ea 03 shr $0x3,%edx 10868e: 39 d3 cmp %edx,%ebx 108690: 77 5e ja 1086f0 <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 108692: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 108695: 39 d3 cmp %edx,%ebx 108697: 74 47 je 1086e0 <== NEVER TAKEN return 0; i = i * 10 + d; 108699: 8d 04 9b lea (%ebx,%ebx,4),%eax 10869c: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 10869f: 8b 46 04 mov 0x4(%esi),%eax 1086a2: 48 dec %eax 1086a3: 89 46 04 mov %eax,0x4(%esi) 1086a6: 85 c0 test %eax,%eax 1086a8: 79 ae jns 108658 <== ALWAYS TAKEN 1086aa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1086ad: 56 push %esi <== NOT EXECUTED 1086ae: ff 35 c0 50 12 00 pushl 0x1250c0 <== NOT EXECUTED 1086b4: e8 7b bf 00 00 call 114634 <__srget_r> <== NOT EXECUTED 1086b9: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1086bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 1086be: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 1086c1: 75 a2 jne 108665 <== NOT EXECUTED 1086c3: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 1086c4: 85 ff test %edi,%edi 1086c6: 74 28 je 1086f0 <== NEVER TAKEN return 0; *val = i * sign; 1086c8: 0f af df imul %edi,%ebx 1086cb: 8b 45 e0 mov -0x20(%ebp),%eax 1086ce: 89 18 mov %ebx,(%eax) return 1; 1086d0: b8 01 00 00 00 mov $0x1,%eax } 1086d5: 8d 65 f4 lea -0xc(%ebp),%esp 1086d8: 5b pop %ebx 1086d9: 5e pop %esi 1086da: 5f pop %edi 1086db: c9 leave 1086dc: c3 ret 1086dd: 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)))) 1086e0: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED 1086e3: d1 e0 shl %eax <== NOT EXECUTED 1086e5: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1086e8: 29 c2 sub %eax,%edx <== NOT EXECUTED 1086ea: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1086ec: 76 ab jbe 108699 <== NOT EXECUTED 1086ee: 66 90 xchg %ax,%ax <== NOT EXECUTED return 0; i = i * 10 + d; } if (sign == 0) return 0; 1086f0: 31 c0 xor %eax,%eax *val = i * sign; return 1; } 1086f2: 8d 65 f4 lea -0xc(%ebp),%esp 1086f5: 5b pop %ebx 1086f6: 5e pop %esi 1086f7: 5f pop %edi 1086f8: c9 leave 1086f9: c3 ret 1086fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 1086fc: ff 45 e4 incl -0x1c(%ebp) c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 1086ff: bf ff ff ff ff mov $0xffffffff,%edi limit++; continue; 108704: e9 44 ff ff ff jmp 10864d =============================================================================== 0010870c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 10870c: 55 push %ebp 10870d: 89 e5 mov %esp,%ebp 10870f: 57 push %edi 108710: 56 push %esi 108711: 53 push %ebx 108712: 83 ec 0c sub $0xc,%esp 108715: 89 c3 mov %eax,%ebx 108717: 89 ce mov %ecx,%esi 108719: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 10871c: 8b 01 mov (%ecx),%eax 10871e: 89 02 mov %eax,(%edx) 108720: eb 26 jmp 108748 108722: 66 90 xchg %ax,%ax <== NOT EXECUTED for (;;) { c = getc(fp); 108724: 8b 13 mov (%ebx),%edx 108726: 0f b6 02 movzbl (%edx),%eax 108729: 42 inc %edx 10872a: 89 13 mov %edx,(%ebx) if (c == ':') { 10872c: 83 f8 3a cmp $0x3a,%eax 10872f: 74 3b je 10876c if (nlFlag) return 0; break; } if (c == '\n') { 108731: 83 f8 0a cmp $0xa,%eax 108734: 74 56 je 10878c if (!nlFlag) return 0; break; } if (c == EOF) 108736: 83 f8 ff cmp $0xffffffff,%eax 108739: 74 59 je 108794 return 0; if (*nleft < 2) 10873b: 83 3f 01 cmpl $0x1,(%edi) 10873e: 76 54 jbe 108794 <== NEVER TAKEN return 0; **bufp = c; 108740: 8b 16 mov (%esi),%edx 108742: 88 02 mov %al,(%edx) ++(*bufp); 108744: ff 06 incl (%esi) --(*nleft); 108746: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 108748: 8b 43 04 mov 0x4(%ebx),%eax 10874b: 48 dec %eax 10874c: 89 43 04 mov %eax,0x4(%ebx) 10874f: 85 c0 test %eax,%eax 108751: 79 d1 jns 108724 108753: 83 ec 08 sub $0x8,%esp 108756: 53 push %ebx 108757: ff 35 c0 50 12 00 pushl 0x1250c0 10875d: e8 d2 be 00 00 call 114634 <__srget_r> 108762: 83 c4 10 add $0x10,%esp if (c == ':') { 108765: 83 f8 3a cmp $0x3a,%eax 108768: 75 c7 jne 108731 <== ALWAYS TAKEN 10876a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (nlFlag) 10876c: 8b 55 0c mov 0xc(%ebp),%edx 10876f: 85 d2 test %edx,%edx 108771: 75 21 jne 108794 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 108773: 8b 06 mov (%esi),%eax 108775: c6 00 00 movb $0x0,(%eax) ++(*bufp); 108778: ff 06 incl (%esi) --(*nleft); 10877a: ff 0f decl (%edi) return 1; 10877c: b8 01 00 00 00 mov $0x1,%eax } 108781: 8d 65 f4 lea -0xc(%ebp),%esp 108784: 5b pop %ebx 108785: 5e pop %esi 108786: 5f pop %edi 108787: c9 leave 108788: c3 ret 108789: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 10878c: 8b 45 0c mov 0xc(%ebp),%eax 10878f: 85 c0 test %eax,%eax 108791: 75 e0 jne 108773 108793: 90 nop break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 108794: 31 c0 xor %eax,%eax } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 108796: 8d 65 f4 lea -0xc(%ebp),%esp 108799: 5b pop %ebx 10879a: 5e pop %esi 10879b: 5f pop %edi 10879c: c9 leave 10879d: c3 ret =============================================================================== 001087a0 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1087a0: 55 push %ebp 1087a1: 89 e5 mov %esp,%ebp 1087a3: 57 push %edi 1087a4: 56 push %esi 1087a5: 53 push %ebx 1087a6: 83 ec 34 sub $0x34,%esp 1087a9: 89 c6 mov %eax,%esi 1087ab: 89 d3 mov %edx,%ebx 1087ad: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1087b0: 8d 7d d4 lea -0x2c(%ebp),%edi 1087b3: 6a 00 push $0x0 1087b5: 8d 45 08 lea 0x8(%ebp),%eax 1087b8: 50 push %eax 1087b9: 89 f9 mov %edi,%ecx 1087bb: 89 f0 mov %esi,%eax 1087bd: e8 4a ff ff ff call 10870c 1087c2: 83 c4 10 add $0x10,%esp 1087c5: 85 c0 test %eax,%eax 1087c7: 75 0b jne 1087d4 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; 1087c9: 31 c0 xor %eax,%eax grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 1087cb: 8d 65 f4 lea -0xc(%ebp),%esp 1087ce: 5b pop %ebx 1087cf: 5e pop %esi 1087d0: 5f pop %edi 1087d1: c9 leave 1087d2: c3 ret 1087d3: 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) 1087d4: 83 ec 08 sub $0x8,%esp 1087d7: 8d 53 04 lea 0x4(%ebx),%edx 1087da: 6a 00 push $0x0 1087dc: 8d 45 08 lea 0x8(%ebp),%eax 1087df: 50 push %eax 1087e0: 89 f9 mov %edi,%ecx 1087e2: 89 f0 mov %esi,%eax 1087e4: e8 23 ff ff ff call 10870c 1087e9: 83 c4 10 add $0x10,%esp 1087ec: 85 c0 test %eax,%eax 1087ee: 74 d9 je 1087c9 <== NEVER TAKEN || !scanInt(fp, &grgid) 1087f0: 8d 55 e4 lea -0x1c(%ebp),%edx 1087f3: 89 f0 mov %esi,%eax 1087f5: e8 3a fe ff ff call 108634 1087fa: 85 c0 test %eax,%eax 1087fc: 74 cb je 1087c9 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 1087fe: 83 ec 08 sub $0x8,%esp 108801: 8d 55 e0 lea -0x20(%ebp),%edx 108804: 6a 01 push $0x1 108806: 8d 45 08 lea 0x8(%ebp),%eax 108809: 50 push %eax 10880a: 89 f9 mov %edi,%ecx 10880c: 89 f0 mov %esi,%eax 10880e: e8 f9 fe ff ff call 10870c 108813: 83 c4 10 add $0x10,%esp 108816: 85 c0 test %eax,%eax 108818: 74 af je 1087c9 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 10881a: 8b 45 e4 mov -0x1c(%ebp),%eax 10881d: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108821: 8b 7d e0 mov -0x20(%ebp),%edi 108824: 8a 07 mov (%edi),%al 108826: 84 c0 test %al,%al 108828: 74 7d je 1088a7 <== NEVER TAKEN 10882a: 89 fa mov %edi,%edx 10882c: b9 01 00 00 00 mov $0x1,%ecx 108831: eb 08 jmp 10883b 108833: 90 nop <== NOT EXECUTED 108834: 42 inc %edx 108835: 8a 02 mov (%edx),%al 108837: 84 c0 test %al,%al 108839: 74 09 je 108844 if(*cp == ',') 10883b: 3c 2c cmp $0x2c,%al 10883d: 75 f5 jne 108834 memcount++; 10883f: 41 inc %ecx 108840: eb f2 jmp 108834 108842: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108844: 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)) 10884b: 39 45 08 cmp %eax,0x8(%ebp) 10884e: 0f 82 75 ff ff ff jb 1087c9 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 108854: 8b 75 d4 mov -0x2c(%ebp),%esi 108857: 83 c6 0f add $0xf,%esi 10885a: 83 e6 f0 and $0xfffffff0,%esi 10885d: 89 73 0c mov %esi,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 108860: 89 3e mov %edi,(%esi) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108862: 8b 45 e0 mov -0x20(%ebp),%eax 108865: 8a 10 mov (%eax),%dl 108867: 84 d2 test %dl,%dl 108869: 74 43 je 1088ae <== NEVER TAKEN } /* * Extract a single group record from the database */ static int scangr( 10886b: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10886c: b9 01 00 00 00 mov $0x1,%ecx 108871: eb 08 jmp 10887b 108873: 90 nop <== NOT EXECUTED 108874: 8a 10 mov (%eax),%dl 108876: 40 inc %eax 108877: 84 d2 test %dl,%dl 108879: 74 15 je 108890 if(*cp == ',') { 10887b: 80 fa 2c cmp $0x2c,%dl 10887e: 75 f4 jne 108874 *cp = '\0'; 108880: c6 40 ff 00 movb $0x0,-0x1(%eax) grp->gr_mem[memcount++] = cp + 1; 108884: 8b 53 0c mov 0xc(%ebx),%edx 108887: 89 04 8a mov %eax,(%edx,%ecx,4) 10888a: 41 inc %ecx 10888b: eb e7 jmp 108874 10888d: 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++) { 108890: 8b 73 0c mov 0xc(%ebx),%esi 108893: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 108896: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1) return 1; 10889d: b8 01 00 00 00 mov $0x1,%eax 1088a2: e9 24 ff ff ff jmp 1087cb grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088a7: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 1088ac: eb 9d jmp 10884b <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1088ae: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 1088b3: eb e1 jmp 108896 <== NOT EXECUTED =============================================================================== 001088b8 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 1088b8: 55 push %ebp 1088b9: 89 e5 mov %esp,%ebp 1088bb: 57 push %edi 1088bc: 56 push %esi 1088bd: 53 push %ebx 1088be: 83 ec 34 sub $0x34,%esp 1088c1: 89 c6 mov %eax,%esi 1088c3: 89 d3 mov %edx,%ebx 1088c5: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 1088c8: 8d 7d d4 lea -0x2c(%ebp),%edi 1088cb: 6a 00 push $0x0 1088cd: 8d 45 08 lea 0x8(%ebp),%eax 1088d0: 50 push %eax 1088d1: 89 f9 mov %edi,%ecx 1088d3: 89 f0 mov %esi,%eax 1088d5: e8 32 fe ff ff call 10870c 1088da: 83 c4 10 add $0x10,%esp 1088dd: 85 c0 test %eax,%eax 1088df: 75 0b jne 1088ec || !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; 1088e1: 31 c0 xor %eax,%eax pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 1088e3: 8d 65 f4 lea -0xc(%ebp),%esp 1088e6: 5b pop %ebx 1088e7: 5e pop %esi 1088e8: 5f pop %edi 1088e9: c9 leave 1088ea: c3 ret 1088eb: 90 nop <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 1088ec: 83 ec 08 sub $0x8,%esp 1088ef: 8d 53 04 lea 0x4(%ebx),%edx 1088f2: 6a 00 push $0x0 1088f4: 8d 45 08 lea 0x8(%ebp),%eax 1088f7: 50 push %eax 1088f8: 89 f9 mov %edi,%ecx 1088fa: 89 f0 mov %esi,%eax 1088fc: e8 0b fe ff ff call 10870c 108901: 83 c4 10 add $0x10,%esp 108904: 85 c0 test %eax,%eax 108906: 74 d9 je 1088e1 <== NEVER TAKEN || !scanInt(fp, &pwuid) 108908: 8d 55 e4 lea -0x1c(%ebp),%edx 10890b: 89 f0 mov %esi,%eax 10890d: e8 22 fd ff ff call 108634 108912: 85 c0 test %eax,%eax 108914: 74 cb je 1088e1 <== NEVER TAKEN || !scanInt(fp, &pwgid) 108916: 8d 55 e0 lea -0x20(%ebp),%edx 108919: 89 f0 mov %esi,%eax 10891b: e8 14 fd ff ff call 108634 108920: 85 c0 test %eax,%eax 108922: 74 bd je 1088e1 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 108924: 83 ec 08 sub $0x8,%esp 108927: 8d 53 0c lea 0xc(%ebx),%edx 10892a: 6a 00 push $0x0 10892c: 8d 45 08 lea 0x8(%ebp),%eax 10892f: 50 push %eax 108930: 89 f9 mov %edi,%ecx 108932: 89 f0 mov %esi,%eax 108934: e8 d3 fd ff ff call 10870c 108939: 83 c4 10 add $0x10,%esp 10893c: 85 c0 test %eax,%eax 10893e: 74 a1 je 1088e1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 108940: 83 ec 08 sub $0x8,%esp 108943: 8d 53 10 lea 0x10(%ebx),%edx 108946: 6a 00 push $0x0 108948: 8d 45 08 lea 0x8(%ebp),%eax 10894b: 50 push %eax 10894c: 89 f9 mov %edi,%ecx 10894e: 89 f0 mov %esi,%eax 108950: e8 b7 fd ff ff call 10870c 108955: 83 c4 10 add $0x10,%esp 108958: 85 c0 test %eax,%eax 10895a: 74 85 je 1088e1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 10895c: 83 ec 08 sub $0x8,%esp 10895f: 8d 53 14 lea 0x14(%ebx),%edx 108962: 6a 00 push $0x0 108964: 8d 45 08 lea 0x8(%ebp),%eax 108967: 50 push %eax 108968: 89 f9 mov %edi,%ecx 10896a: 89 f0 mov %esi,%eax 10896c: e8 9b fd ff ff call 10870c 108971: 83 c4 10 add $0x10,%esp 108974: 85 c0 test %eax,%eax 108976: 0f 84 65 ff ff ff je 1088e1 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 10897c: 83 ec 08 sub $0x8,%esp 10897f: 8d 53 18 lea 0x18(%ebx),%edx 108982: 6a 01 push $0x1 108984: 8d 45 08 lea 0x8(%ebp),%eax 108987: 50 push %eax 108988: 89 f9 mov %edi,%ecx 10898a: 89 f0 mov %esi,%eax 10898c: e8 7b fd ff ff call 10870c 108991: 83 c4 10 add $0x10,%esp 108994: 85 c0 test %eax,%eax 108996: 0f 84 45 ff ff ff je 1088e1 return 0; pwd->pw_uid = pwuid; 10899c: 8b 45 e4 mov -0x1c(%ebp),%eax 10899f: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 1089a3: 8b 45 e0 mov -0x20(%ebp),%eax 1089a6: 66 89 43 0a mov %ax,0xa(%ebx) return 1; 1089aa: b8 01 00 00 00 mov $0x1,%eax 1089af: e9 2f ff ff ff jmp 1088e3 =============================================================================== 0010a150 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 10a150: 55 push %ebp 10a151: 89 e5 mov %esp,%ebp 10a153: 56 push %esi 10a154: 53 push %ebx 10a155: 89 d3 mov %edx,%ebx 10a157: 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)) { 10a159: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) 10a160: 75 12 jne 10a174 <== 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); 10a162: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a165: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 10a167: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a16a: 5b pop %ebx <== NOT EXECUTED 10a16b: 5e pop %esi <== NOT EXECUTED 10a16c: 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); 10a16d: e9 92 fe ff ff jmp 10a004 <== NOT EXECUTED 10a172: 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); 10a174: 52 push %edx 10a175: 6a 00 push $0x0 10a177: 6a 00 push $0x0 10a179: ff 73 18 pushl 0x18(%ebx) 10a17c: e8 b7 15 00 00 call 10b738 i = iproc (c, tty); 10a181: 89 f2 mov %esi,%edx 10a183: 0f b6 c2 movzbl %dl,%eax 10a186: 89 da mov %ebx,%edx 10a188: e8 77 fe ff ff call 10a004 10a18d: 89 c6 mov %eax,%esi rtems_semaphore_release (tty->osem); 10a18f: 58 pop %eax 10a190: ff 73 18 pushl 0x18(%ebx) 10a193: e8 9c 16 00 00 call 10b834 10a198: 83 c4 10 add $0x10,%esp } else { i = iproc (c, tty); } return i; } 10a19b: 89 f0 mov %esi,%eax 10a19d: 8d 65 f8 lea -0x8(%ebp),%esp 10a1a0: 5b pop %ebx 10a1a1: 5e pop %esi 10a1a2: c9 leave 10a1a3: c3 ret =============================================================================== 00109fac : int _STAT_NAME( const char *path, struct stat *buf ) { 109fac: 55 push %ebp 109fad: 89 e5 mov %esp,%ebp 109faf: 57 push %edi 109fb0: 56 push %esi 109fb1: 53 push %ebx 109fb2: 83 ec 3c sub $0x3c,%esp 109fb5: 8b 55 08 mov 0x8(%ebp),%edx 109fb8: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 109fbb: 85 f6 test %esi,%esi 109fbd: 74 65 je 10a024 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 109fbf: b9 ff ff ff ff mov $0xffffffff,%ecx 109fc4: 89 d7 mov %edx,%edi 109fc6: 31 c0 xor %eax,%eax 109fc8: f2 ae repnz scas %es:(%edi),%al 109fca: f7 d1 not %ecx 109fcc: 49 dec %ecx 109fcd: 83 ec 0c sub $0xc,%esp 109fd0: 6a 01 push $0x1 109fd2: 8d 5d d4 lea -0x2c(%ebp),%ebx 109fd5: 53 push %ebx 109fd6: 6a 00 push $0x0 109fd8: 51 push %ecx 109fd9: 52 push %edx 109fda: e8 f9 e8 ff ff call 1088d8 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 109fdf: 83 c4 20 add $0x20,%esp 109fe2: 85 c0 test %eax,%eax 109fe4: 74 0e je 109ff4 return -1; 109fe6: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 109feb: 8d 65 f4 lea -0xc(%ebp),%esp 109fee: 5b pop %ebx 109fef: 5e pop %esi 109ff0: 5f pop %edi 109ff1: c9 leave 109ff2: c3 ret 109ff3: 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) ); 109ff4: b9 48 00 00 00 mov $0x48,%ecx 109ff9: 89 f7 mov %esi,%edi 109ffb: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 109ffd: 83 ec 08 sub $0x8,%esp 10a000: 56 push %esi 10a001: 53 push %ebx 10a002: 8b 45 dc mov -0x24(%ebp),%eax 10a005: ff 50 18 call *0x18(%eax) rtems_filesystem_freenode( &loc ); 10a008: 89 1c 24 mov %ebx,(%esp) 10a00b: 89 45 c4 mov %eax,-0x3c(%ebp) 10a00e: e8 e1 ec ff ff call 108cf4 return status; 10a013: 83 c4 10 add $0x10,%esp 10a016: 8b 45 c4 mov -0x3c(%ebp),%eax } 10a019: 8d 65 f4 lea -0xc(%ebp),%esp 10a01c: 5b pop %ebx 10a01d: 5e pop %esi 10a01e: 5f pop %edi 10a01f: c9 leave 10a020: c3 ret 10a021: 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 ); 10a024: e8 9f 94 00 00 call 1134c8 <__errno> 10a029: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a02f: b8 ff ff ff ff mov $0xffffffff,%eax status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a034: 8d 65 f4 lea -0xc(%ebp),%esp 10a037: 5b pop %ebx 10a038: 5e pop %esi 10a039: 5f pop %edi 10a03a: c9 leave 10a03b: c3 ret =============================================================================== 0010b258 : #include int statvfs (const char *path, struct statvfs *sb) { 10b258: 55 push %ebp 10b259: 89 e5 mov %esp,%ebp 10b25b: 57 push %edi 10b25c: 56 push %esi 10b25d: 53 push %ebx 10b25e: 83 ec 48 sub $0x48,%esp 10b261: 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 ) ) 10b264: 31 f6 xor %esi,%esi 10b266: b9 ff ff ff ff mov $0xffffffff,%ecx 10b26b: 89 d7 mov %edx,%edi 10b26d: 89 f0 mov %esi,%eax 10b26f: f2 ae repnz scas %es:(%edi),%al 10b271: f7 d1 not %ecx 10b273: 49 dec %ecx 10b274: 6a 01 push $0x1 10b276: 8d 5d d4 lea -0x2c(%ebp),%ebx 10b279: 53 push %ebx 10b27a: 6a 00 push $0x0 10b27c: 51 push %ecx 10b27d: 52 push %edx 10b27e: e8 71 eb ff ff call 109df4 10b283: 83 c4 20 add $0x20,%esp 10b286: 85 c0 test %eax,%eax 10b288: 74 0e je 10b298 <== ALWAYS TAKEN return -1; 10b28a: 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; } 10b28f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b292: 5b pop %ebx <== NOT EXECUTED 10b293: 5e pop %esi <== NOT EXECUTED 10b294: 5f pop %edi <== NOT EXECUTED 10b295: c9 leave <== NOT EXECUTED 10b296: c3 ret <== NOT EXECUTED 10b297: 90 nop <== NOT EXECUTED */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; 10b298: 8b 55 e4 mov -0x1c(%ebp),%edx fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 10b29b: b9 38 00 00 00 mov $0x38,%ecx 10b2a0: 8b 7d 0c mov 0xc(%ebp),%edi 10b2a3: 89 f0 mov %esi,%eax 10b2a5: f3 aa rep stos %al,%es:(%edi) result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b2a7: 83 ec 08 sub $0x8,%esp 10b2aa: 8b 42 28 mov 0x28(%edx),%eax 10b2ad: 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; 10b2b0: 83 c2 1c add $0x1c,%edx memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10b2b3: 52 push %edx 10b2b4: ff 50 44 call *0x44(%eax) rtems_filesystem_freenode( &loc ); 10b2b7: 89 1c 24 mov %ebx,(%esp) 10b2ba: 89 45 c4 mov %eax,-0x3c(%ebp) 10b2bd: e8 36 ec ff ff call 109ef8 return result; 10b2c2: 83 c4 10 add $0x10,%esp 10b2c5: 8b 45 c4 mov -0x3c(%ebp),%eax } 10b2c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b2cb: 5b pop %ebx 10b2cc: 5e pop %esi 10b2cd: 5f pop %edi 10b2ce: c9 leave 10b2cf: c3 ret =============================================================================== 00109fc0 : int symlink( const char *actualpath, const char *sympath ) { 109fc0: 55 push %ebp 109fc1: 89 e5 mov %esp,%ebp 109fc3: 56 push %esi 109fc4: 53 push %ebx 109fc5: 83 ec 34 sub $0x34,%esp 109fc8: 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 ); 109fcb: 8d 5d dc lea -0x24(%ebp),%ebx 109fce: 53 push %ebx 109fcf: 8d 45 f4 lea -0xc(%ebp),%eax 109fd2: 50 push %eax 109fd3: 56 push %esi 109fd4: e8 63 ff ff ff call 109f3c result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 109fd9: 83 c4 0c add $0xc,%esp 109fdc: 8d 45 f0 lea -0x10(%ebp),%eax 109fdf: 50 push %eax 109fe0: 53 push %ebx 109fe1: 03 75 f4 add -0xc(%ebp),%esi 109fe4: 56 push %esi 109fe5: 8b 45 e8 mov -0x18(%ebp),%eax 109fe8: ff 50 04 call *0x4(%eax) if ( result != 0 ) 109feb: 83 c4 10 add $0x10,%esp 109fee: 85 c0 test %eax,%eax 109ff0: 74 0e je 10a000 return -1; 109ff2: b8 ff ff ff ff mov $0xffffffff,%eax result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 109ff7: 8d 65 f8 lea -0x8(%ebp),%esp 109ffa: 5b pop %ebx 109ffb: 5e pop %esi 109ffc: c9 leave 109ffd: c3 ret 109ffe: 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); 10a000: 50 push %eax 10a001: ff 75 f0 pushl -0x10(%ebp) 10a004: ff 75 08 pushl 0x8(%ebp) 10a007: 53 push %ebx 10a008: 8b 45 e8 mov -0x18(%ebp),%eax 10a00b: ff 50 38 call *0x38(%eax) rtems_filesystem_freenode( &loc ); 10a00e: 89 1c 24 mov %ebx,(%esp) 10a011: 89 45 d4 mov %eax,-0x2c(%ebp) 10a014: e8 1f ed ff ff call 108d38 return result; 10a019: 83 c4 10 add $0x10,%esp 10a01c: 8b 45 d4 mov -0x2c(%ebp),%eax } 10a01f: 8d 65 f8 lea -0x8(%ebp),%esp 10a022: 5b pop %ebx 10a023: 5e pop %esi 10a024: c9 leave 10a025: c3 ret =============================================================================== 0010a0d8 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a0d8: 55 push %ebp 10a0d9: 89 e5 mov %esp,%ebp 10a0db: 53 push %ebx 10a0dc: 83 ec 04 sub $0x4,%esp 10a0df: 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; 10a0e2: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx if ( this_reent ) { 10a0e8: 85 d2 test %edx,%edx 10a0ea: 74 33 je 10a11f <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 10a0ec: 8b 0d d8 75 12 00 mov 0x1275d8,%ecx 10a0f2: 8b 99 ec 00 00 00 mov 0xec(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a0f8: 89 91 ec 00 00 00 mov %edx,0xec(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a0fe: 83 ec 08 sub $0x8,%esp 10a101: 68 24 a1 10 00 push $0x10a124 10a106: ff b0 ec 00 00 00 pushl 0xec(%eax) 10a10c: e8 df a2 00 00 call 1143f0 <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a111: a1 d8 75 12 00 mov 0x1275d8,%eax 10a116: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 10a11c: 83 c4 10 add $0x10,%esp } } 10a11f: 8b 5d fc mov -0x4(%ebp),%ebx 10a122: c9 leave 10a123: c3 ret =============================================================================== 0010a584 : int tcsetattr( int fd, int opt, struct termios *tp ) { 10a584: 55 push %ebp 10a585: 89 e5 mov %esp,%ebp 10a587: 56 push %esi 10a588: 53 push %ebx 10a589: 8b 5d 08 mov 0x8(%ebp),%ebx 10a58c: 8b 45 0c mov 0xc(%ebp),%eax 10a58f: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10a592: 85 c0 test %eax,%eax 10a594: 74 2c je 10a5c2 10a596: 48 dec %eax 10a597: 74 17 je 10a5b0 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a599: e8 be 97 00 00 call 113d5c <__errno> 10a59e: c7 00 86 00 00 00 movl $0x86,(%eax) * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 10a5a4: b8 ff ff ff ff mov $0xffffffff,%eax 10a5a9: 8d 65 f8 lea -0x8(%ebp),%esp 10a5ac: 5b pop %ebx 10a5ad: 5e pop %esi 10a5ae: c9 leave 10a5af: c3 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 10a5b0: 50 push %eax 10a5b1: 6a 00 push $0x0 10a5b3: 6a 03 push $0x3 10a5b5: 53 push %ebx 10a5b6: e8 15 71 00 00 call 1116d0 10a5bb: 83 c4 10 add $0x10,%esp 10a5be: 85 c0 test %eax,%eax 10a5c0: 78 e2 js 10a5a4 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a5c2: 89 75 10 mov %esi,0x10(%ebp) 10a5c5: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 10a5cc: 89 5d 08 mov %ebx,0x8(%ebp) } } 10a5cf: 8d 65 f8 lea -0x8(%ebp),%esp 10a5d2: 5b pop %ebx 10a5d3: 5e pop %esi 10a5d4: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a5d5: e9 f6 70 00 00 jmp 1116d0 =============================================================================== 0010d554 : int truncate( const char *path, off_t length ) { 10d554: 55 push %ebp <== NOT EXECUTED 10d555: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d557: 57 push %edi <== NOT EXECUTED 10d558: 56 push %esi <== NOT EXECUTED 10d559: 53 push %ebx <== NOT EXECUTED 10d55a: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10d55d: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10d560: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 10d563: 6a 01 push $0x1 <== NOT EXECUTED 10d565: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10d568: e8 47 da ff ff call 10afb4 <== NOT EXECUTED 10d56d: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( fd == -1 ) 10d56f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d572: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10d575: 74 21 je 10d598 <== NOT EXECUTED return -1; status = ftruncate( fd, length ); 10d577: 50 push %eax <== NOT EXECUTED 10d578: 57 push %edi <== NOT EXECUTED 10d579: 56 push %esi <== NOT EXECUTED 10d57a: 53 push %ebx <== NOT EXECUTED 10d57b: e8 68 52 00 00 call 1127e8 <== NOT EXECUTED 10d580: 89 c6 mov %eax,%esi <== NOT EXECUTED (void) close( fd ); 10d582: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10d585: e8 3a c8 ff ff call 109dc4 <== NOT EXECUTED return status; 10d58a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10d58d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10d58f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d592: 5b pop %ebx <== NOT EXECUTED 10d593: 5e pop %esi <== NOT EXECUTED 10d594: 5f pop %edi <== NOT EXECUTED 10d595: c9 leave <== NOT EXECUTED 10d596: c3 ret <== NOT EXECUTED 10d597: 90 nop <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) return -1; 10d598: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED status = ftruncate( fd, length ); (void) close( fd ); return status; } 10d59d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10d59f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d5a2: 5b pop %ebx <== NOT EXECUTED 10d5a3: 5e pop %esi <== NOT EXECUTED 10d5a4: 5f pop %edi <== NOT EXECUTED 10d5a5: c9 leave <== NOT EXECUTED 10d5a6: c3 ret <== NOT EXECUTED =============================================================================== 0010bc00 : #include int unlink( const char *path ) { 10bc00: 55 push %ebp 10bc01: 89 e5 mov %esp,%ebp 10bc03: 57 push %edi 10bc04: 56 push %esi 10bc05: 53 push %ebx 10bc06: 83 ec 58 sub $0x58,%esp 10bc09: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10bc0c: 53 push %ebx 10bc0d: e8 32 d2 ff ff call 108e44 if ( parentpathlen == 0 ) 10bc12: 83 c4 10 add $0x10,%esp 10bc15: 85 c0 test %eax,%eax 10bc17: 0f 85 d3 00 00 00 jne 10bcf0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10bc1d: 50 push %eax 10bc1e: 8d 45 d0 lea -0x30(%ebp),%eax 10bc21: 89 45 b4 mov %eax,-0x4c(%ebp) 10bc24: 50 push %eax 10bc25: 8d 45 e4 lea -0x1c(%ebp),%eax 10bc28: 50 push %eax 10bc29: 53 push %ebx 10bc2a: e8 bd e1 ff ff call 109dec 10bc2f: 83 c4 10 add $0x10,%esp 10bc32: 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; 10bc34: c6 45 b3 00 movb $0x0,-0x4d(%ebp) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10bc38: 8d 7d bc lea -0x44(%ebp),%edi 10bc3b: b9 05 00 00 00 mov $0x5,%ecx 10bc40: 8b 75 b4 mov -0x4c(%ebp),%esi 10bc43: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 10bc45: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10bc47: be ff ff ff ff mov $0xffffffff,%esi 10bc4c: 89 f1 mov %esi,%ecx 10bc4e: 89 df mov %ebx,%edi 10bc50: 31 c0 xor %eax,%eax 10bc52: f2 ae repnz scas %es:(%edi),%al 10bc54: f7 d1 not %ecx 10bc56: 49 dec %ecx 10bc57: 83 ec 08 sub $0x8,%esp 10bc5a: 51 push %ecx 10bc5b: 53 push %ebx 10bc5c: e8 27 d2 ff ff call 108e88 10bc61: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10bc63: 89 f1 mov %esi,%ecx 10bc65: 89 df mov %ebx,%edi 10bc67: 31 c0 xor %eax,%eax 10bc69: f2 ae repnz scas %es:(%edi),%al 10bc6b: f7 d1 not %ecx 10bc6d: 49 dec %ecx 10bc6e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10bc75: 8d 75 bc lea -0x44(%ebp),%esi 10bc78: 56 push %esi 10bc79: 6a 00 push $0x0 10bc7b: 51 push %ecx 10bc7c: 53 push %ebx 10bc7d: e8 ba d0 ff ff call 108d3c 0, &loc, false ); if ( result != 0 ) { 10bc82: 83 c4 20 add $0x20,%esp 10bc85: 85 c0 test %eax,%eax 10bc87: 75 53 jne 10bcdc <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 10bc89: 83 ec 0c sub $0xc,%esp 10bc8c: 56 push %esi 10bc8d: 8b 45 c8 mov -0x38(%ebp),%eax 10bc90: ff 50 10 call *0x10(%eax) 10bc93: 83 c4 10 add $0x10,%esp 10bc96: 48 dec %eax 10bc97: 0f 84 83 00 00 00 je 10bd20 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 10bc9d: 83 ec 08 sub $0x8,%esp 10bca0: 56 push %esi 10bca1: ff 75 b4 pushl -0x4c(%ebp) 10bca4: 8b 45 c8 mov -0x38(%ebp),%eax 10bca7: ff 50 0c call *0xc(%eax) rtems_filesystem_freenode( &loc ); 10bcaa: 89 34 24 mov %esi,(%esp) 10bcad: 89 45 ac mov %eax,-0x54(%ebp) 10bcb0: e8 23 d2 ff ff call 108ed8 if ( free_parentloc ) 10bcb5: 83 c4 10 add $0x10,%esp 10bcb8: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bcbc: 8b 45 ac mov -0x54(%ebp),%eax 10bcbf: 74 11 je 10bcd2 rtems_filesystem_freenode( &parentloc ); 10bcc1: 83 ec 0c sub $0xc,%esp 10bcc4: ff 75 b4 pushl -0x4c(%ebp) 10bcc7: e8 0c d2 ff ff call 108ed8 10bccc: 83 c4 10 add $0x10,%esp 10bccf: 8b 45 ac mov -0x54(%ebp),%eax return result; } 10bcd2: 8d 65 f4 lea -0xc(%ebp),%esp 10bcd5: 5b pop %ebx 10bcd6: 5e pop %esi 10bcd7: 5f pop %edi 10bcd8: c9 leave 10bcd9: c3 ret 10bcda: 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 ) 10bcdc: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 10bce0: 75 70 jne 10bd52 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); return -1; 10bce2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 10bce7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10bcea: 5b pop %ebx <== NOT EXECUTED 10bceb: 5e pop %esi <== NOT EXECUTED 10bcec: 5f pop %edi <== NOT EXECUTED 10bced: c9 leave <== NOT EXECUTED 10bcee: c3 ret <== NOT EXECUTED 10bcef: 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, 10bcf0: 89 c2 mov %eax,%edx 10bcf2: 83 ec 0c sub $0xc,%esp 10bcf5: 6a 00 push $0x0 10bcf7: 8d 45 d0 lea -0x30(%ebp),%eax 10bcfa: 89 45 b4 mov %eax,-0x4c(%ebp) 10bcfd: 50 push %eax 10bcfe: 6a 02 push $0x2 10bd00: 52 push %edx 10bd01: 53 push %ebx 10bd02: 89 55 ac mov %edx,-0x54(%ebp) 10bd05: e8 ca d0 ff ff call 108dd4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10bd0a: 83 c4 20 add $0x20,%esp 10bd0d: 85 c0 test %eax,%eax 10bd0f: 8b 55 ac mov -0x54(%ebp),%edx 10bd12: 75 ce jne 10bce2 <== NEVER TAKEN return -1; free_parentloc = true; 10bd14: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10bd18: e9 1b ff ff ff jmp 10bc38 10bd1d: 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 ); 10bd20: 83 ec 0c sub $0xc,%esp 10bd23: 56 push %esi 10bd24: e8 af d1 ff ff call 108ed8 if ( free_parentloc ) 10bd29: 83 c4 10 add $0x10,%esp 10bd2c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10bd30: 74 0e je 10bd40 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10bd32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bd35: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10bd38: e8 9b d1 ff ff call 108ed8 <== NOT EXECUTED 10bd3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 10bd40: e8 53 a4 00 00 call 116198 <__errno> 10bd45: c7 00 15 00 00 00 movl $0x15,(%eax) 10bd4b: b8 ff ff ff ff mov $0xffffffff,%eax 10bd50: eb 80 jmp 10bcd2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 10bd52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bd55: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10bd58: e8 7b d1 ff ff call 108ed8 <== NOT EXECUTED 10bd5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 10bd60: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10bd65: e9 68 ff ff ff jmp 10bcd2 <== NOT EXECUTED =============================================================================== 0010bdcc : */ int unmount( const char *path ) { 10bdcc: 55 push %ebp 10bdcd: 89 e5 mov %esp,%ebp 10bdcf: 57 push %edi 10bdd0: 56 push %esi 10bdd1: 53 push %ebx 10bdd2: 83 ec 38 sub $0x38,%esp 10bdd5: 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 ) ) 10bdd8: 31 c0 xor %eax,%eax 10bdda: b9 ff ff ff ff mov $0xffffffff,%ecx 10bddf: 89 d7 mov %edx,%edi 10bde1: f2 ae repnz scas %es:(%edi),%al 10bde3: f7 d1 not %ecx 10bde5: 49 dec %ecx 10bde6: 6a 01 push $0x1 10bde8: 8d 75 d4 lea -0x2c(%ebp),%esi 10bdeb: 56 push %esi 10bdec: 6a 00 push $0x0 10bdee: 51 push %ecx 10bdef: 52 push %edx 10bdf0: e8 3f ce ff ff call 108c34 10bdf5: 83 c4 20 add $0x20,%esp 10bdf8: 85 c0 test %eax,%eax 10bdfa: 75 68 jne 10be64 return -1; mt_entry = loc.mt_entry; 10bdfc: 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 ){ 10bdff: 8b 45 d4 mov -0x2c(%ebp),%eax 10be02: 39 43 1c cmp %eax,0x1c(%ebx) 10be05: 0f 85 c5 00 00 00 jne 10bed0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10be0b: 83 ec 0c sub $0xc,%esp 10be0e: 56 push %esi 10be0f: e8 24 cf ff ff call 108d38 * 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 ) 10be14: 83 c4 10 add $0x10,%esp 10be17: a1 c4 60 12 00 mov 0x1260c4,%eax 10be1c: 39 58 14 cmp %ebx,0x14(%eax) 10be1f: 0f 84 cf 00 00 00 je 10bef4 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10be25: 83 ec 08 sub $0x8,%esp 10be28: ff 73 2c pushl 0x2c(%ebx) 10be2b: 68 b8 bd 10 00 push $0x10bdb8 10be30: e8 9f d6 ff ff call 1094d4 10be35: 83 c4 10 add $0x10,%esp 10be38: 84 c0 test %al,%al 10be3a: 0f 85 b4 00 00 00 jne 10bef4 * 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 ) 10be40: 83 ec 0c sub $0xc,%esp 10be43: 53 push %ebx 10be44: e8 1f d2 ff ff call 109068 10be49: 83 c4 10 add $0x10,%esp 10be4c: 48 dec %eax 10be4d: 0f 84 a1 00 00 00 je 10bef4 * 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 ) 10be53: 83 ec 0c sub $0xc,%esp 10be56: 8b 43 14 mov 0x14(%ebx),%eax 10be59: 53 push %ebx 10be5a: ff 50 28 call *0x28(%eax) 10be5d: 83 c4 10 add $0x10,%esp 10be60: 85 c0 test %eax,%eax 10be62: 74 10 je 10be74 <== 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; 10be64: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10be69: 8d 65 f4 lea -0xc(%ebp),%esp 10be6c: 5b pop %ebx 10be6d: 5e pop %esi 10be6e: 5f pop %edi 10be6f: c9 leave 10be70: c3 ret 10be71: 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){ 10be74: 83 ec 0c sub $0xc,%esp 10be77: 8b 43 28 mov 0x28(%ebx),%eax 10be7a: 53 push %ebx 10be7b: ff 50 2c call *0x2c(%eax) 10be7e: 83 c4 10 add $0x10,%esp 10be81: 85 c0 test %eax,%eax 10be83: 0f 85 83 00 00 00 jne 10bf0c <== 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 ); 10be89: 52 push %edx 10be8a: 6a 00 push $0x0 10be8c: 6a 00 push $0x0 10be8e: ff 35 08 83 12 00 pushl 0x128308 10be94: e8 77 0b 00 00 call 10ca10 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10be99: 89 1c 24 mov %ebx,(%esp) 10be9c: e8 1b 14 00 00 call 10d2bc <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10bea1: 58 pop %eax 10bea2: ff 35 08 83 12 00 pushl 0x128308 10bea8: e8 5f 0c 00 00 call 10cb0c 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; 10bead: 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 ); 10beb0: 89 04 24 mov %eax,(%esp) 10beb3: e8 80 ce ff ff call 108d38 free( mt_entry ); 10beb8: 89 1c 24 mov %ebx,(%esp) 10bebb: e8 8c ce ff ff call 108d4c return 0; 10bec0: 83 c4 10 add $0x10,%esp 10bec3: 31 c0 xor %eax,%eax } 10bec5: 8d 65 f4 lea -0xc(%ebp),%esp 10bec8: 5b pop %ebx 10bec9: 5e pop %esi 10beca: 5f pop %edi 10becb: c9 leave 10becc: c3 ret 10becd: 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 ); 10bed0: 83 ec 0c sub $0xc,%esp 10bed3: 56 push %esi 10bed4: e8 5f ce ff ff call 108d38 rtems_set_errno_and_return_minus_one( EACCES ); 10bed9: e8 3a 75 00 00 call 113418 <__errno> 10bede: c7 00 0d 00 00 00 movl $0xd,(%eax) 10bee4: 83 c4 10 add $0x10,%esp 10bee7: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10beec: 8d 65 f4 lea -0xc(%ebp),%esp 10beef: 5b pop %ebx 10bef0: 5e pop %esi 10bef1: 5f pop %edi 10bef2: c9 leave 10bef3: 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 ); 10bef4: e8 1f 75 00 00 call 113418 <__errno> 10bef9: c7 00 10 00 00 00 movl $0x10,(%eax) 10beff: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10bf04: 8d 65 f4 lea -0xc(%ebp),%esp 10bf07: 5b pop %ebx 10bf08: 5e pop %esi 10bf09: 5f pop %edi 10bf0a: c9 leave 10bf0b: 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 ) 10bf0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bf0f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10bf12: 53 push %ebx <== NOT EXECUTED 10bf13: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10bf16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bf19: 85 c0 test %eax,%eax <== NOT EXECUTED 10bf1b: 0f 84 43 ff ff ff je 10be64 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10bf21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bf24: 6a 00 push $0x0 <== NOT EXECUTED 10bf26: e8 d9 10 00 00 call 10d004 <== NOT EXECUTED =============================================================================== 0010bf18 : int utime( const char *path, const struct utimbuf *times ) { 10bf18: 55 push %ebp 10bf19: 89 e5 mov %esp,%ebp 10bf1b: 57 push %edi 10bf1c: 56 push %esi 10bf1d: 53 push %ebx 10bf1e: 83 ec 48 sub $0x48,%esp 10bf21: 8b 55 08 mov 0x8(%ebp),%edx 10bf24: 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 ) ) 10bf27: 31 c0 xor %eax,%eax 10bf29: b9 ff ff ff ff mov $0xffffffff,%ecx 10bf2e: 89 d7 mov %edx,%edi 10bf30: f2 ae repnz scas %es:(%edi),%al 10bf32: f7 d1 not %ecx 10bf34: 49 dec %ecx 10bf35: 6a 01 push $0x1 10bf37: 8d 75 d4 lea -0x2c(%ebp),%esi 10bf3a: 56 push %esi 10bf3b: 6a 00 push $0x0 10bf3d: 51 push %ecx 10bf3e: 52 push %edx 10bf3f: e8 94 c9 ff ff call 1088d8 10bf44: 83 c4 20 add $0x20,%esp 10bf47: 85 c0 test %eax,%eax 10bf49: 75 2d jne 10bf78 return -1; if ( times == NULL ) { 10bf4b: 85 db test %ebx,%ebx 10bf4d: 74 39 je 10bf88 <== NEVER TAKEN 10bf4f: 8b 43 04 mov 0x4(%ebx),%eax 10bf52: 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 ); 10bf54: 51 push %ecx 10bf55: 50 push %eax 10bf56: 52 push %edx 10bf57: 56 push %esi 10bf58: 8b 45 e0 mov -0x20(%ebp),%eax 10bf5b: ff 50 30 call *0x30(%eax) rtems_filesystem_freenode( &temp_loc ); 10bf5e: 89 34 24 mov %esi,(%esp) 10bf61: 89 45 c4 mov %eax,-0x3c(%ebp) 10bf64: e8 8b cd ff ff call 108cf4 return result; 10bf69: 83 c4 10 add $0x10,%esp 10bf6c: 8b 45 c4 mov -0x3c(%ebp),%eax } 10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bf72: 5b pop %ebx 10bf73: 5e pop %esi 10bf74: 5f pop %edi 10bf75: c9 leave 10bf76: c3 ret 10bf77: 90 nop <== 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; 10bf78: 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; } 10bf7d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf80: 5b pop %ebx 10bf81: 5e pop %esi 10bf82: 5f pop %edi 10bf83: c9 leave 10bf84: c3 ret 10bf85: 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 ); 10bf88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bf8b: 6a 00 push $0x0 <== NOT EXECUTED 10bf8d: e8 ba b8 00 00 call 11784c