=============================================================================== 0010d4a0 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10d4a0: 55 push %ebp 10d4a1: 89 e5 mov %esp,%ebp 10d4a3: 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; 10d4a6: 8b 50 10 mov 0x10(%eax),%edx 10d4a9: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10d4ac: 8b 08 mov (%eax),%ecx 10d4ae: 8b 49 4c mov 0x4c(%ecx),%ecx 10d4b1: 49 dec %ecx 10d4b2: 83 f9 06 cmp $0x6,%ecx 10d4b5: 77 29 ja 10d4e0 <== NEVER TAKEN 10d4b7: ff 24 8d 00 de 11 00 jmp *0x11de00(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10d4be: 8b 52 0c mov 0xc(%edx),%edx 10d4c1: eb 1a jmp 10d4dd break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10d4c3: c7 40 08 24 de 11 00 movl $0x11de24,0x8(%eax) break; 10d4ca: eb 14 jmp 10d4e0 case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10d4cc: c7 40 08 94 de 11 00 movl $0x11de94,0x8(%eax) break; 10d4d3: eb 0b jmp 10d4e0 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 10d4d5: 8b 52 08 mov 0x8(%edx),%edx 10d4d8: eb 03 jmp 10d4dd break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 10d4da: 8b 52 10 mov 0x10(%edx),%edx 10d4dd: 89 50 08 mov %edx,0x8(%eax) break; } return 0; } 10d4e0: 31 c0 xor %eax,%eax 10d4e2: c9 leave 10d4e3: c3 ret =============================================================================== 0010d36d : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10d36d: 55 push %ebp 10d36e: 89 e5 mov %esp,%ebp 10d370: 57 push %edi 10d371: 56 push %esi 10d372: 53 push %ebx 10d373: 83 ec 1c sub $0x1c,%esp 10d376: 8b 4d 08 mov 0x8(%ebp),%ecx 10d379: 8b 7d 0c mov 0xc(%ebp),%edi 10d37c: 8b 5d 18 mov 0x18(%ebp),%ebx /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; 10d37f: 31 c0 xor %eax,%eax IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10d381: 85 c9 test %ecx,%ecx 10d383: 0f 84 dc 00 00 00 je 10d465 <== NEVER TAKEN return NULL; parent = parent_loc->node_access; 10d389: 8b 11 mov (%ecx),%edx fs_info = parent_loc->mt_entry->fs_info; 10d38b: 8b 49 10 mov 0x10(%ecx),%ecx 10d38e: 8b 71 34 mov 0x34(%ecx),%esi /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 10d391: 83 ff 07 cmp $0x7,%edi 10d394: 75 0d jne 10d3a3 10d396: 81 7e 10 7c dd 11 00 cmpl $0x11dd7c,0x10(%esi) 10d39d: 0f 84 c2 00 00 00 je 10d465 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10d3a3: 50 push %eax 10d3a4: a1 54 0f 12 00 mov 0x120f54,%eax 10d3a9: 8b 40 2c mov 0x2c(%eax),%eax 10d3ac: f7 d0 not %eax 10d3ae: 23 45 14 and 0x14(%ebp),%eax 10d3b1: 50 push %eax 10d3b2: ff 75 10 pushl 0x10(%ebp) 10d3b5: 57 push %edi 10d3b6: 89 55 e4 mov %edx,-0x1c(%ebp) 10d3b9: e8 46 ff ff ff call 10d304 if ( !node ) 10d3be: 83 c4 10 add $0x10,%esp 10d3c1: 85 c0 test %eax,%eax 10d3c3: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3c6: 0f 84 99 00 00 00 je 10d465 return NULL; /* * Set the type specific information */ switch (type) { 10d3cc: 4f dec %edi 10d3cd: 83 ff 06 cmp $0x6,%edi 10d3d0: 77 71 ja 10d443 <== NEVER TAKEN 10d3d2: ff 24 bd e4 dd 11 00 jmp *0x11dde4(,%edi,4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d3d9: 8d 48 54 lea 0x54(%eax),%ecx 10d3dc: 89 48 50 mov %ecx,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; 10d3df: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 10d3e6: 8d 48 50 lea 0x50(%eax),%ecx 10d3e9: 89 48 58 mov %ecx,0x58(%eax) 10d3ec: eb 55 jmp 10d443 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; 10d3ee: 8b 0b mov (%ebx),%ecx 10d3f0: 89 48 50 mov %ecx,0x50(%eax) break; 10d3f3: eb 4e jmp 10d443 case IMFS_DEVICE: node->info.device.major = info->device.major; 10d3f5: 8b 0b mov (%ebx),%ecx 10d3f7: 89 48 50 mov %ecx,0x50(%eax) node->info.device.minor = info->device.minor; 10d3fa: 8b 4b 04 mov 0x4(%ebx),%ecx 10d3fd: 89 48 54 mov %ecx,0x54(%eax) break; 10d400: eb 41 jmp 10d443 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10d402: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10d409: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = 0; 10d410: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) case IMFS_MEMORY_FILE: node->info.file.size = 0; 10d417: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10d41e: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10d425: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10d42c: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10d433: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10d43a: eb 07 jmp 10d443 case IMFS_FIFO: node->info.fifo.pipe = NULL; 10d43c: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 10d443: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10d446: 8b 4e 04 mov 0x4(%esi),%ecx 10d449: 41 inc %ecx 10d44a: 89 4e 04 mov %ecx,0x4(%esi) 10d44d: 89 48 38 mov %ecx,0x38(%eax) 10d450: 53 push %ebx 10d451: 53 push %ebx 10d452: 50 push %eax rtems_chain_append( &parent->info.directory.Entries, &node->Node ); 10d453: 83 c2 50 add $0x50,%edx 10d456: 52 push %edx 10d457: 89 45 e4 mov %eax,-0x1c(%ebp) 10d45a: e8 85 d5 ff ff call 10a9e4 <_Chain_Append> return node; 10d45f: 83 c4 10 add $0x10,%esp 10d462: 8b 45 e4 mov -0x1c(%ebp),%eax } 10d465: 8d 65 f4 lea -0xc(%ebp),%esp 10d468: 5b pop %ebx 10d469: 5e pop %esi 10d46a: 5f pop %edi 10d46b: c9 leave 10d46c: c3 ret =============================================================================== 0010d46d : return node; } IMFS_jnode_t *IMFS_create_root_node(void) { 10d46d: 55 push %ebp 10d46e: 89 e5 mov %esp,%ebp 10d470: 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) ); 10d473: 68 ed 41 00 00 push $0x41ed 10d478: 68 65 da 11 00 push $0x11da65 10d47d: 6a 01 push $0x1 10d47f: e8 80 fe ff ff call 10d304 if ( !node ) 10d484: 83 c4 10 add $0x10,%esp 10d487: 85 c0 test %eax,%eax 10d489: 74 13 je 10d49e <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d48b: 8d 50 54 lea 0x54(%eax),%edx 10d48e: 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; 10d491: 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); 10d498: 8d 50 50 lea 0x50(%eax),%edx 10d49b: 89 50 58 mov %edx,0x58(%eax) return node; } 10d49e: c9 leave 10d49f: c3 ret =============================================================================== 0010d557 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10d557: 55 push %ebp 10d558: 89 e5 mov %esp,%ebp 10d55a: 57 push %edi 10d55b: 56 push %esi 10d55c: 53 push %ebx 10d55d: 83 ec 5c sub $0x5c,%esp 10d560: 8b 5d 14 mov 0x14(%ebp),%ebx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10d563: 8b 3b mov (%ebx),%edi rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 10d565: be 01 00 00 00 mov $0x1,%esi size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 10d56a: 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) ) { 10d571: e9 6a 01 00 00 jmp 10d6e0 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10d576: 8d 45 e4 lea -0x1c(%ebp),%eax 10d579: 50 push %eax 10d57a: 8d 4d af lea -0x51(%ebp),%ecx 10d57d: 51 push %ecx 10d57e: ff 75 0c pushl 0xc(%ebp) 10d581: 8b 45 08 mov 0x8(%ebp),%eax 10d584: 03 45 a4 add -0x5c(%ebp),%eax 10d587: 50 push %eax 10d588: e8 1f 06 00 00 call 10dbac 10d58d: 89 c6 mov %eax,%esi pathnamelen -= len; 10d58f: 8b 45 e4 mov -0x1c(%ebp),%eax 10d592: 89 45 a0 mov %eax,-0x60(%ebp) i += len; if ( !pathloc->node_access ) 10d595: 8b 13 mov (%ebx),%edx 10d597: 83 c4 10 add $0x10,%esp 10d59a: 85 d2 test %edx,%edx 10d59c: 0f 84 1a 01 00 00 je 10d6bc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10d5a2: 85 f6 test %esi,%esi 10d5a4: 74 30 je 10d5d6 if ( node->type == IMFS_DIRECTORY ) 10d5a6: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d5aa: 75 2a jne 10d5d6 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10d5ac: 57 push %edi 10d5ad: 57 push %edi 10d5ae: 6a 01 push $0x1 10d5b0: 53 push %ebx 10d5b1: 89 55 9c mov %edx,-0x64(%ebp) 10d5b4: e8 2b ff ff ff call 10d4e4 10d5b9: 83 c4 10 add $0x10,%esp 10d5bc: 85 c0 test %eax,%eax 10d5be: 8b 55 9c mov -0x64(%ebp),%edx 10d5c1: 75 13 jne 10d5d6 rtems_set_errno_and_return_minus_one( EACCES ); 10d5c3: e8 04 2d 00 00 call 1102cc <__errno> 10d5c8: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d5ce: 83 cf ff or $0xffffffff,%edi 10d5d1: e9 82 01 00 00 jmp 10d758 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10d5d6: 8b 4d a0 mov -0x60(%ebp),%ecx 10d5d9: 29 4d 0c sub %ecx,0xc(%ebp) i += len; 10d5dc: 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; 10d5df: 89 d7 mov %edx,%edi switch( type ) { 10d5e1: 83 fe 03 cmp $0x3,%esi 10d5e4: 74 62 je 10d648 10d5e6: 83 fe 04 cmp $0x4,%esi 10d5e9: 0f 84 e1 00 00 00 je 10d6d0 10d5ef: 83 fe 02 cmp $0x2,%esi 10d5f2: 0f 85 e8 00 00 00 jne 10d6e0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d5f8: a1 54 0f 12 00 mov 0x120f54,%eax 10d5fd: 3b 50 18 cmp 0x18(%eax),%edx 10d600: 0f 84 da 00 00 00 je 10d6e0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10d606: 8b 43 10 mov 0x10(%ebx),%eax /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10d609: 3b 50 1c cmp 0x1c(%eax),%edx 10d60c: 75 35 jne 10d643 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 10d60e: 8d 7d d0 lea -0x30(%ebp),%edi 10d611: 8d 70 08 lea 0x8(%eax),%esi 10d614: b9 05 00 00 00 mov $0x5,%ecx 10d619: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d61b: 8d 75 d0 lea -0x30(%ebp),%esi 10d61e: b1 05 mov $0x5,%cl 10d620: 89 df mov %ebx,%edi 10d622: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 10d624: 8b 43 0c mov 0xc(%ebx),%eax 10d627: 53 push %ebx 10d628: ff 75 10 pushl 0x10(%ebp) 10d62b: 8b 55 a0 mov -0x60(%ebp),%edx 10d62e: 03 55 0c add 0xc(%ebp),%edx 10d631: 52 push %edx 10d632: 8b 55 a4 mov -0x5c(%ebp),%edx 10d635: 2b 55 a0 sub -0x60(%ebp),%edx 10d638: 03 55 08 add 0x8(%ebp),%edx 10d63b: 52 push %edx 10d63c: ff 10 call *(%eax) 10d63e: e9 ea 00 00 00 jmp 10d72d pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10d643: 8b 7a 08 mov 0x8(%edx),%edi 10d646: eb 70 jmp 10d6b8 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10d648: 8b 42 4c mov 0x4c(%edx),%eax 10d64b: 83 f8 03 cmp $0x3,%eax 10d64e: 75 15 jne 10d665 IMFS_evaluate_hard_link( pathloc, 0 ); 10d650: 51 push %ecx 10d651: 51 push %ecx 10d652: 6a 00 push $0x0 10d654: 53 push %ebx 10d655: e8 a7 fe ff ff call 10d501 node = pathloc->node_access; 10d65a: 8b 3b mov (%ebx),%edi if ( !node ) 10d65c: 83 c4 10 add $0x10,%esp 10d65f: 85 ff test %edi,%edi 10d661: 75 1f jne 10d682 <== ALWAYS TAKEN 10d663: eb 23 jmp 10d688 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10d665: 83 f8 04 cmp $0x4,%eax 10d668: 75 18 jne 10d682 result = IMFS_evaluate_sym_link( pathloc, 0 ); 10d66a: 52 push %edx 10d66b: 52 push %edx 10d66c: 6a 00 push $0x0 10d66e: 53 push %ebx 10d66f: e8 ee 00 00 00 call 10d762 node = pathloc->node_access; 10d674: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10d676: 83 c4 10 add $0x10,%esp 10d679: 83 f8 ff cmp $0xffffffff,%eax 10d67c: 0f 84 d4 00 00 00 je 10d756 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d682: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d686: 74 10 je 10d698 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10d688: e8 3f 2c 00 00 call 1102cc <__errno> 10d68d: c7 00 14 00 00 00 movl $0x14,(%eax) 10d693: e9 36 ff ff ff jmp 10d5ce /* * 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 ) { 10d698: 8b 47 5c mov 0x5c(%edi),%eax 10d69b: 85 c0 test %eax,%eax 10d69d: 74 08 je 10d6a7 newloc = node->info.directory.mt_fs->mt_fs_root; 10d69f: 8d 7d d0 lea -0x30(%ebp),%edi 10d6a2: 8d 70 1c lea 0x1c(%eax),%esi 10d6a5: eb 59 jmp 10d700 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d6a7: 50 push %eax 10d6a8: 50 push %eax 10d6a9: 8d 45 af lea -0x51(%ebp),%eax 10d6ac: 50 push %eax 10d6ad: 57 push %edi 10d6ae: e8 81 04 00 00 call 10db34 10d6b3: 89 c7 mov %eax,%edi if ( !node ) 10d6b5: 83 c4 10 add $0x10,%esp 10d6b8: 85 ff test %edi,%edi 10d6ba: 75 10 jne 10d6cc rtems_set_errno_and_return_minus_one( ENOENT ); 10d6bc: e8 0b 2c 00 00 call 1102cc <__errno> 10d6c1: c7 00 02 00 00 00 movl $0x2,(%eax) 10d6c7: e9 02 ff ff ff jmp 10d5ce /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10d6cc: 89 3b mov %edi,(%ebx) 10d6ce: eb 10 jmp 10d6e0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10d6d0: e8 f7 2b 00 00 call 1102cc <__errno> 10d6d5: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10d6db: e9 ee fe ff ff jmp 10d5ce /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10d6e0: 83 fe 04 cmp $0x4,%esi 10d6e3: 74 08 je 10d6ed <== NEVER TAKEN 10d6e5: 85 f6 test %esi,%esi 10d6e7: 0f 85 89 fe ff ff jne 10d576 * 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 ) { 10d6ed: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10d6f1: 75 41 jne 10d734 if ( node->info.directory.mt_fs != NULL ) { 10d6f3: 8b 77 5c mov 0x5c(%edi),%esi 10d6f6: 85 f6 test %esi,%esi 10d6f8: 74 3a je 10d734 newloc = node->info.directory.mt_fs->mt_fs_root; 10d6fa: 8d 7d d0 lea -0x30(%ebp),%edi 10d6fd: 83 c6 1c add $0x1c,%esi 10d700: b9 05 00 00 00 mov $0x5,%ecx 10d705: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d707: 8d 75 d0 lea -0x30(%ebp),%esi 10d70a: b1 05 mov $0x5,%cl 10d70c: 89 df mov %ebx,%edi 10d70e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10d710: 8b 45 e4 mov -0x1c(%ebp),%eax 10d713: 8b 53 0c mov 0xc(%ebx),%edx 10d716: 53 push %ebx 10d717: ff 75 10 pushl 0x10(%ebp) 10d71a: 8b 4d 0c mov 0xc(%ebp),%ecx 10d71d: 01 c1 add %eax,%ecx 10d71f: 51 push %ecx 10d720: 8b 4d a4 mov -0x5c(%ebp),%ecx 10d723: 29 c1 sub %eax,%ecx 10d725: 8b 45 08 mov 0x8(%ebp),%eax 10d728: 01 c8 add %ecx,%eax 10d72a: 50 push %eax 10d72b: ff 12 call *(%edx) 10d72d: 89 c7 mov %eax,%edi 10d72f: 83 c4 10 add $0x10,%esp 10d732: eb 24 jmp 10d758 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10d734: 83 ec 0c sub $0xc,%esp 10d737: 53 push %ebx 10d738: e8 63 fd ff ff call 10d4a0 10d73d: 89 c7 mov %eax,%edi 10d73f: 59 pop %ecx 10d740: 5e pop %esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10d741: ff 75 10 pushl 0x10(%ebp) 10d744: 53 push %ebx 10d745: e8 9a fd ff ff call 10d4e4 10d74a: 83 c4 10 add $0x10,%esp 10d74d: 85 c0 test %eax,%eax 10d74f: 75 07 jne 10d758 10d751: e9 6d fe ff ff jmp 10d5c3 10d756: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10d758: 89 f8 mov %edi,%eax 10d75a: 8d 65 f4 lea -0xc(%ebp),%esp 10d75d: 5b pop %ebx 10d75e: 5e pop %esi 10d75f: 5f pop %edi 10d760: c9 leave 10d761: c3 ret =============================================================================== 0010d878 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10d878: 55 push %ebp 10d879: 89 e5 mov %esp,%ebp 10d87b: 57 push %edi 10d87c: 56 push %esi 10d87d: 53 push %ebx 10d87e: 83 ec 5c sub $0x5c,%esp 10d881: 8b 5d 0c mov 0xc(%ebp),%ebx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10d884: 8b 33 mov (%ebx),%esi /* * Get the path length. */ pathlen = strlen( path ); 10d886: 31 c0 xor %eax,%eax 10d888: 83 c9 ff or $0xffffffff,%ecx 10d88b: 8b 7d 08 mov 0x8(%ebp),%edi 10d88e: f2 ae repnz scas %es:(%edi),%al 10d890: f7 d1 not %ecx 10d892: 49 dec %ecx 10d893: 89 4d 9c mov %ecx,-0x64(%ebp) const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 10d896: 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 ); 10d89d: 8d 45 e4 lea -0x1c(%ebp),%eax 10d8a0: 50 push %eax 10d8a1: 8d 55 af lea -0x51(%ebp),%edx 10d8a4: 52 push %edx 10d8a5: ff 75 9c pushl -0x64(%ebp) 10d8a8: 8b 45 08 mov 0x8(%ebp),%eax 10d8ab: 03 45 a4 add -0x5c(%ebp),%eax 10d8ae: 50 push %eax 10d8af: e8 f8 02 00 00 call 10dbac 10d8b4: 89 c2 mov %eax,%edx pathlen -= len; 10d8b6: 8b 45 e4 mov -0x1c(%ebp),%eax 10d8b9: 89 45 a0 mov %eax,-0x60(%ebp) 10d8bc: 29 45 9c sub %eax,-0x64(%ebp) i += len; if ( !pathloc->node_access ) 10d8bf: 8b 3b mov (%ebx),%edi 10d8c1: 83 c4 10 add $0x10,%esp 10d8c4: 85 ff test %edi,%edi 10d8c6: 0f 84 85 01 00 00 je 10da51 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10d8cc: 85 d2 test %edx,%edx 10d8ce: 74 30 je 10d900 if ( node->type == IMFS_DIRECTORY ) 10d8d0: 83 7e 4c 01 cmpl $0x1,0x4c(%esi) 10d8d4: 75 2a jne 10d900 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10d8d6: 51 push %ecx 10d8d7: 51 push %ecx 10d8d8: 6a 01 push $0x1 10d8da: 53 push %ebx 10d8db: 89 55 98 mov %edx,-0x68(%ebp) 10d8de: e8 01 fc ff ff call 10d4e4 10d8e3: 83 c4 10 add $0x10,%esp 10d8e6: 85 c0 test %eax,%eax 10d8e8: 8b 55 98 mov -0x68(%ebp),%edx 10d8eb: 75 13 jne 10d900 rtems_set_errno_and_return_minus_one( EACCES ); 10d8ed: e8 da 29 00 00 call 1102cc <__errno> 10d8f2: c7 00 0d 00 00 00 movl $0xd,(%eax) 10d8f8: 83 ce ff or $0xffffffff,%esi 10d8fb: e9 a5 01 00 00 jmp 10daa5 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 10d900: 8b 45 a0 mov -0x60(%ebp),%eax 10d903: 01 45 a4 add %eax,-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; 10d906: 89 fe mov %edi,%esi switch( type ) { 10d908: 83 fa 02 cmp $0x2,%edx 10d90b: 74 1f je 10d92c 10d90d: 77 0a ja 10d919 10d90f: 85 d2 test %edx,%edx 10d911: 0f 84 f0 00 00 00 je 10da07 10d917: eb 84 jmp 10d89d 10d919: 83 fa 03 cmp $0x3,%edx 10d91c: 74 5a je 10d978 10d91e: 83 fa 04 cmp $0x4,%edx 10d921: 0f 85 76 ff ff ff jne 10d89d <== NEVER TAKEN 10d927: e9 eb 00 00 00 jmp 10da17 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10d92c: a1 54 0f 12 00 mov 0x120f54,%eax 10d931: 3b 78 18 cmp 0x18(%eax),%edi 10d934: 0f 84 63 ff ff ff je 10d89d /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10d93a: 8b 73 10 mov 0x10(%ebx),%esi 10d93d: 3b 7e 1c cmp 0x1c(%esi),%edi 10d940: 75 26 jne 10d968 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 10d942: 8d 7d d0 lea -0x30(%ebp),%edi 10d945: 83 c6 08 add $0x8,%esi 10d948: b9 05 00 00 00 mov $0x5,%ecx 10d94d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d94f: 8d 75 d0 lea -0x30(%ebp),%esi 10d952: b1 05 mov $0x5,%cl 10d954: 89 df mov %ebx,%edi 10d956: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d958: 52 push %edx 10d959: 8b 43 0c mov 0xc(%ebx),%eax 10d95c: ff 75 10 pushl 0x10(%ebp) 10d95f: 53 push %ebx 10d960: 8b 55 a4 mov -0x5c(%ebp),%edx 10d963: 2b 55 a0 sub -0x60(%ebp),%edx 10d966: eb 72 jmp 10d9da } } else { if ( !node->Parent ) 10d968: 8b 77 08 mov 0x8(%edi),%esi 10d96b: 85 f6 test %esi,%esi 10d96d: 0f 85 8d 00 00 00 jne 10da00 10d973: e9 d9 00 00 00 jmp 10da51 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 10d978: 8b 47 4c mov 0x4c(%edi),%eax 10d97b: 83 f8 03 cmp $0x3,%eax 10d97e: 74 05 je 10d985 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10d980: 83 f8 04 cmp $0x4,%eax 10d983: 75 16 jne 10d99b result = IMFS_evaluate_link( pathloc, 0 ); 10d985: 50 push %eax 10d986: 50 push %eax 10d987: 6a 00 push $0x0 10d989: 53 push %ebx 10d98a: e8 66 fe ff ff call 10d7f5 if ( result == -1 ) 10d98f: 83 c4 10 add $0x10,%esp 10d992: 83 f8 ff cmp $0xffffffff,%eax 10d995: 0f 84 08 01 00 00 je 10daa3 <== NEVER TAKEN return -1; } node = pathloc->node_access; 10d99b: 8b 03 mov (%ebx),%eax if ( !node ) 10d99d: 85 c0 test %eax,%eax 10d99f: 0f 84 d8 00 00 00 je 10da7d <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10d9a5: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10d9a9: 0f 85 ce 00 00 00 jne 10da7d /* * 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 ) { 10d9af: 8b 70 5c mov 0x5c(%eax),%esi 10d9b2: 85 f6 test %esi,%esi 10d9b4: 74 35 je 10d9eb newloc = node->info.directory.mt_fs->mt_fs_root; 10d9b6: 8d 7d d0 lea -0x30(%ebp),%edi 10d9b9: 83 c6 1c add $0x1c,%esi 10d9bc: b9 05 00 00 00 mov $0x5,%ecx 10d9c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 10d9c3: 8d 75 d0 lea -0x30(%ebp),%esi 10d9c6: b1 05 mov $0x5,%cl 10d9c8: 89 df mov %ebx,%edi 10d9ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10d9cc: 57 push %edi 10d9cd: 8b 43 0c mov 0xc(%ebx),%eax 10d9d0: ff 75 10 pushl 0x10(%ebp) 10d9d3: 53 push %ebx 10d9d4: 8b 55 a4 mov -0x5c(%ebp),%edx 10d9d7: 2b 55 e4 sub -0x1c(%ebp),%edx 10d9da: 03 55 08 add 0x8(%ebp),%edx 10d9dd: 52 push %edx 10d9de: ff 50 04 call *0x4(%eax) 10d9e1: 89 c6 mov %eax,%esi 10d9e3: 83 c4 10 add $0x10,%esp 10d9e6: e9 ba 00 00 00 jmp 10daa5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10d9eb: 56 push %esi 10d9ec: 56 push %esi 10d9ed: 8d 55 af lea -0x51(%ebp),%edx 10d9f0: 52 push %edx 10d9f1: 50 push %eax 10d9f2: e8 3d 01 00 00 call 10db34 10d9f7: 89 c6 mov %eax,%esi /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10d9f9: 83 c4 10 add $0x10,%esp 10d9fc: 85 c0 test %eax,%eax 10d9fe: 74 27 je 10da27 done = true; else pathloc->node_access = node; 10da00: 89 33 mov %esi,(%ebx) 10da02: e9 96 fe ff ff jmp 10d89d break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10da07: e8 c0 28 00 00 call 1102cc <__errno> 10da0c: c7 00 11 00 00 00 movl $0x11,(%eax) 10da12: e9 e1 fe ff ff jmp 10d8f8 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10da17: e8 b0 28 00 00 call 1102cc <__errno> 10da1c: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10da22: e9 d1 fe ff ff jmp 10d8f8 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10da27: 8b 45 a4 mov -0x5c(%ebp),%eax 10da2a: 2b 45 e4 sub -0x1c(%ebp),%eax 10da2d: 03 45 08 add 0x8(%ebp),%eax 10da30: 8b 55 10 mov 0x10(%ebp),%edx 10da33: 89 02 mov %eax,(%edx) * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( 10da35: 8b 75 08 mov 0x8(%ebp),%esi 10da38: 03 75 a4 add -0x5c(%ebp),%esi /* * 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++) { 10da3b: eb 24 jmp 10da61 if ( !IMFS_is_separator( path[ i ] ) ) 10da3d: 83 ec 0c sub $0xc,%esp 10da40: 0f be c0 movsbl %al,%eax 10da43: 50 push %eax 10da44: e8 67 a5 ff ff call 107fb0 10da49: 46 inc %esi 10da4a: 83 c4 10 add $0x10,%esp 10da4d: 85 c0 test %eax,%eax 10da4f: 75 10 jne 10da61 rtems_set_errno_and_return_minus_one( ENOENT ); 10da51: e8 76 28 00 00 call 1102cc <__errno> 10da56: c7 00 02 00 00 00 movl $0x2,(%eax) 10da5c: e9 97 fe ff ff jmp 10d8f8 /* * 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++) { 10da61: 8a 06 mov (%esi),%al 10da63: 84 c0 test %al,%al 10da65: 75 d6 jne 10da3d /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10da67: 83 ec 0c sub $0xc,%esp 10da6a: 53 push %ebx 10da6b: e8 30 fa ff ff call 10d4a0 10da70: 89 c6 mov %eax,%esi /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 10da72: 8b 03 mov (%ebx),%eax 10da74: 83 c4 10 add $0x10,%esp 10da77: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10da7b: 74 10 je 10da8d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10da7d: e8 4a 28 00 00 call 1102cc <__errno> 10da82: c7 00 14 00 00 00 movl $0x14,(%eax) 10da88: e9 6b fe ff ff jmp 10d8f8 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10da8d: 51 push %ecx 10da8e: 51 push %ecx 10da8f: 6a 03 push $0x3 10da91: 53 push %ebx 10da92: e8 4d fa ff ff call 10d4e4 10da97: 83 c4 10 add $0x10,%esp 10da9a: 85 c0 test %eax,%eax 10da9c: 75 07 jne 10daa5 10da9e: e9 4a fe ff ff jmp 10d8ed 10daa3: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10daa5: 89 f0 mov %esi,%eax 10daa7: 8d 65 f4 lea -0xc(%ebp),%esp 10daaa: 5b pop %ebx 10daab: 5e pop %esi 10daac: 5f pop %edi 10daad: c9 leave 10daae: c3 ret =============================================================================== 0010d501 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d501: 55 push %ebp 10d502: 89 e5 mov %esp,%ebp 10d504: 53 push %ebx 10d505: 83 ec 04 sub $0x4,%esp 10d508: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10d50b: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10d50d: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10d511: 74 0d je 10d520 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d513: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d516: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d51b: e8 68 d2 ff ff call 10a788 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10d520: 8b 40 50 mov 0x50(%eax),%eax 10d523: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10d525: 83 ec 0c sub $0xc,%esp 10d528: 53 push %ebx 10d529: e8 72 ff ff ff call 10d4a0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10d52e: 58 pop %eax 10d52f: 5a pop %edx 10d530: ff 75 0c pushl 0xc(%ebp) 10d533: 53 push %ebx 10d534: e8 ab ff ff ff call 10d4e4 10d539: 83 c4 10 add $0x10,%esp 10d53c: 89 c2 mov %eax,%edx rtems_set_errno_and_return_minus_one( EACCES ); return result; 10d53e: 31 c0 xor %eax,%eax /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10d540: 85 d2 test %edx,%edx 10d542: 75 0e jne 10d552 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10d544: e8 83 2d 00 00 call 1102cc <__errno> <== NOT EXECUTED 10d549: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d54f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10d552: 8b 5d fc mov -0x4(%ebp),%ebx 10d555: c9 leave 10d556: c3 ret =============================================================================== 0010d762 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10d762: 55 push %ebp 10d763: 89 e5 mov %esp,%ebp 10d765: 57 push %edi 10d766: 56 push %esi 10d767: 53 push %ebx 10d768: 83 ec 1c sub $0x1c,%esp 10d76b: 8b 5d 08 mov 0x8(%ebp),%ebx 10d76e: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10d771: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10d773: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10d777: 74 0a je 10d783 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10d779: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d77c: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10d781: eb 0f jmp 10d792 <== NOT EXECUTED if ( !jnode->Parent ) 10d783: 8b 47 08 mov 0x8(%edi),%eax 10d786: 85 c0 test %eax,%eax 10d788: 75 0d jne 10d797 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10d78a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d78d: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10d792: e8 f1 cf ff ff call 10a788 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10d797: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10d799: 51 push %ecx 10d79a: 53 push %ebx 10d79b: 8d 45 e4 lea -0x1c(%ebp),%eax 10d79e: 50 push %eax 10d79f: ff 77 50 pushl 0x50(%edi) 10d7a2: e8 4d 0b 00 00 call 10e2f4 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10d7a7: 8b 57 50 mov 0x50(%edi),%edx 10d7aa: 03 55 e4 add -0x1c(%ebp),%edx 10d7ad: 31 c0 xor %eax,%eax 10d7af: 83 c9 ff or $0xffffffff,%ecx 10d7b2: 89 d7 mov %edx,%edi 10d7b4: f2 ae repnz scas %es:(%edi),%al 10d7b6: f7 d1 not %ecx 10d7b8: 49 dec %ecx 10d7b9: 53 push %ebx 10d7ba: 56 push %esi 10d7bb: 51 push %ecx 10d7bc: 52 push %edx 10d7bd: e8 95 fd ff ff call 10d557 10d7c2: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10d7c4: 83 c4 14 add $0x14,%esp 10d7c7: 53 push %ebx 10d7c8: e8 d3 fc ff ff call 10d4a0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10d7cd: 58 pop %eax 10d7ce: 5a pop %edx 10d7cf: 56 push %esi 10d7d0: 53 push %ebx 10d7d1: e8 0e fd ff ff call 10d4e4 10d7d6: 83 c4 10 add $0x10,%esp 10d7d9: 85 c0 test %eax,%eax 10d7db: 75 0e jne 10d7eb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10d7dd: e8 ea 2a 00 00 call 1102cc <__errno> <== NOT EXECUTED 10d7e2: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10d7e8: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED return result; } 10d7eb: 89 f8 mov %edi,%eax 10d7ed: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f0: 5b pop %ebx 10d7f1: 5e pop %esi 10d7f2: 5f pop %edi 10d7f3: c9 leave 10d7f4: c3 ret =============================================================================== 001074eb : } int IMFS_fifo_close( rtems_libio_t *iop ) { 1074eb: 55 push %ebp 1074ec: 89 e5 mov %esp,%ebp 1074ee: 57 push %edi 1074ef: 56 push %esi 1074f0: 53 push %ebx 1074f1: 83 ec 14 sub $0x14,%esp 1074f4: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *jnode = iop->pathinfo.node_access; 1074f7: 8b 7e 18 mov 0x18(%esi),%edi int err = pipe_release(&JNODE2PIPE(jnode), iop); 1074fa: 56 push %esi 1074fb: 8d 47 50 lea 0x50(%edi),%eax 1074fe: 50 push %eax 1074ff: e8 31 7d 00 00 call 10f235 107504: 89 c3 mov %eax,%ebx if (err == 0) { 107506: 83 c4 10 add $0x10,%esp 107509: 83 f8 00 cmp $0x0,%eax 10750c: 75 15 jne 107523 <== NEVER TAKEN iop->flags &= ~LIBIO_FLAGS_OPEN; 10750e: 81 66 14 ff fe ff ff andl $0xfffffeff,0x14(%esi) IMFS_check_node_remove(jnode); 107515: 83 ec 0c sub $0xc,%esp 107518: 57 push %edi 107519: e8 4c 05 00 00 call 107a6a 10751e: 83 c4 10 add $0x10,%esp 107521: eb 0e jmp 107531 } IMFS_FIFO_RETURN(err); 107523: 7d 0c jge 107531 <== NOT EXECUTED 107525: e8 be a1 00 00 call 1116e8 <__errno> <== NOT EXECUTED 10752a: f7 db neg %ebx <== NOT EXECUTED 10752c: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10752e: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 107531: 89 d8 mov %ebx,%eax 107533: 8d 65 f4 lea -0xc(%ebp),%esp 107536: 5b pop %ebx 107537: 5e pop %esi 107538: 5f pop %edi 107539: c9 leave 10753a: c3 ret =============================================================================== 001073a0 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 1073a0: 55 push %ebp 1073a1: 89 e5 mov %esp,%ebp 1073a3: 53 push %ebx 1073a4: 83 ec 10 sub $0x10,%esp 1073a7: 8b 45 08 mov 0x8(%ebp),%eax off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 1073aa: 50 push %eax 1073ab: ff 75 14 pushl 0x14(%ebp) 1073ae: ff 75 10 pushl 0x10(%ebp) 1073b1: ff 75 0c pushl 0xc(%ebp) 1073b4: 8b 40 18 mov 0x18(%eax),%eax 1073b7: ff 70 50 pushl 0x50(%eax) 1073ba: e8 a4 85 00 00 call 10f963 1073bf: 89 c3 mov %eax,%ebx 1073c1: 99 cltd IMFS_FIFO_RETURN(err); 1073c2: 83 c4 20 add $0x20,%esp 1073c5: 85 d2 test %edx,%edx 1073c7: 79 0e jns 1073d7 <== NEVER TAKEN 1073c9: e8 1a a3 00 00 call 1116e8 <__errno> 1073ce: f7 db neg %ebx 1073d0: 89 18 mov %ebx,(%eax) 1073d2: 83 c8 ff or $0xffffffff,%eax 1073d5: 89 c2 mov %eax,%edx } 1073d7: 8b 5d fc mov -0x4(%ebp),%ebx 1073da: c9 leave 1073db: c3 ret =============================================================================== 0010743c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10743c: 55 push %ebp 10743d: 89 e5 mov %esp,%ebp 10743f: 56 push %esi 107440: 53 push %ebx 107441: 83 ec 10 sub $0x10,%esp 107444: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->pathinfo.node_access; 107447: 8b 70 18 mov 0x18(%eax),%esi int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10744a: 50 push %eax 10744b: ff 75 10 pushl 0x10(%ebp) 10744e: ff 75 0c pushl 0xc(%ebp) 107451: ff 76 50 pushl 0x50(%esi) 107454: e8 15 83 00 00 call 10f76e 107459: 89 c3 mov %eax,%ebx if (err > 0) { 10745b: 83 c4 10 add $0x10,%esp 10745e: 83 f8 00 cmp $0x0,%eax 107461: 7e 1b jle 10747e IMFS_mtime_ctime_update(jnode); 107463: 50 push %eax 107464: 50 push %eax 107465: 6a 00 push $0x0 107467: 8d 45 f0 lea -0x10(%ebp),%eax 10746a: 50 push %eax 10746b: e8 54 0d 00 00 call 1081c4 107470: 8b 45 f0 mov -0x10(%ebp),%eax 107473: 89 46 44 mov %eax,0x44(%esi) 107476: 89 46 48 mov %eax,0x48(%esi) 107479: 83 c4 10 add $0x10,%esp 10747c: eb 0e jmp 10748c } IMFS_FIFO_RETURN(err); 10747e: 74 0c je 10748c <== NEVER TAKEN 107480: e8 63 a2 00 00 call 1116e8 <__errno> 107485: f7 db neg %ebx 107487: 89 18 mov %ebx,(%eax) 107489: 83 cb ff or $0xffffffff,%ebx } 10748c: 89 d8 mov %ebx,%eax 10748e: 8d 65 f8 lea -0x8(%ebp),%esp 107491: 5b pop %ebx 107492: 5e pop %esi 107493: c9 leave 107494: c3 ret =============================================================================== 0010db34 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10db34: 55 push %ebp 10db35: 89 e5 mov %esp,%ebp 10db37: 57 push %edi 10db38: 56 push %esi 10db39: 53 push %ebx 10db3a: 83 ec 0c sub $0xc,%esp 10db3d: 8b 5d 08 mov 0x8(%ebp),%ebx 10db40: 8b 7d 0c mov 0xc(%ebp),%edi #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) 10db43: 85 ff test %edi,%edi 10db45: 74 52 je 10db99 <== NEVER TAKEN return 0; if ( !directory ) 10db47: 85 db test %ebx,%ebx 10db49: 74 54 je 10db9f <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10db4b: 56 push %esi 10db4c: 56 push %esi 10db4d: 68 1c de 11 00 push $0x11de1c 10db52: 57 push %edi 10db53: e8 38 33 00 00 call 110e90 10db58: 83 c4 10 add $0x10,%esp 10db5b: 85 c0 test %eax,%eax 10db5d: 74 40 je 10db9f <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10db5f: 51 push %ecx 10db60: 51 push %ecx 10db61: 68 1e de 11 00 push $0x11de1e 10db66: 57 push %edi 10db67: e8 24 33 00 00 call 110e90 10db6c: 83 c4 10 add $0x10,%esp 10db6f: 85 c0 test %eax,%eax 10db71: 75 05 jne 10db78 <== ALWAYS TAKEN return directory->Parent; 10db73: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10db76: eb 27 jmp 10db9f <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10db78: 8b 73 50 mov 0x50(%ebx),%esi 10db7b: 83 c3 54 add $0x54,%ebx 10db7e: eb 15 jmp 10db95 !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 ) ) 10db80: 8d 46 0c lea 0xc(%esi),%eax 10db83: 52 push %edx 10db84: 52 push %edx 10db85: 50 push %eax 10db86: 57 push %edi 10db87: e8 04 33 00 00 call 110e90 10db8c: 83 c4 10 add $0x10,%esp 10db8f: 85 c0 test %eax,%eax 10db91: 74 0a je 10db9d the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10db93: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10db95: 39 de cmp %ebx,%esi 10db97: 75 e7 jne 10db80 #if defined(RTEMS_DEBUG) assert( directory ); assert( name ); #endif if ( !name ) return 0; 10db99: 31 db xor %ebx,%ebx 10db9b: eb 02 jmp 10db9f 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; 10db9d: 89 f3 mov %esi,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10db9f: 89 d8 mov %ebx,%eax 10dba1: 8d 65 f4 lea -0xc(%ebp),%esp 10dba4: 5b pop %ebx 10dba5: 5e pop %esi 10dba6: 5f pop %edi 10dba7: c9 leave 10dba8: c3 ret =============================================================================== 0010dab0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10dab0: 55 push %ebp 10dab1: 89 e5 mov %esp,%ebp 10dab3: 57 push %edi 10dab4: 56 push %esi 10dab5: 53 push %ebx 10dab6: 83 ec 2c sub $0x2c,%esp 10dab9: 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; 10dabc: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10dabf: 8d 7d d4 lea -0x2c(%ebp),%edi 10dac2: 8d 70 1c lea 0x1c(%eax),%esi 10dac5: b9 05 00 00 00 mov $0x5,%ecx 10daca: 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; 10dacc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 10dad3: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 10dad6: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 10dad9: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10dadc: 83 ec 0c sub $0xc,%esp 10dadf: 56 push %esi 10dae0: e8 bb f9 ff ff call 10d4a0 if ( jnode->type != IMFS_DIRECTORY ) { 10dae5: 83 c4 10 add $0x10,%esp 10dae8: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10daec: 75 08 jne 10daf6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10daee: 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 ) ) { 10daf1: 39 43 50 cmp %eax,0x50(%ebx) 10daf4: 75 13 jne 10db09 result = IMFS_unlink( NULL, &loc ); 10daf6: 50 push %eax 10daf7: 50 push %eax 10daf8: 56 push %esi 10daf9: 6a 00 push $0x0 10dafb: e8 30 93 ff ff call 106e30 if (result != 0) 10db00: 83 c4 10 add $0x10,%esp 10db03: 85 c0 test %eax,%eax 10db05: 75 1d jne 10db24 <== NEVER TAKEN return -1; jnode = next; 10db07: 89 fb mov %edi,%ebx } if ( jnode != NULL ) { 10db09: 85 db test %ebx,%ebx 10db0b: 74 1c je 10db29 if ( jnode->type == IMFS_DIRECTORY ) { 10db0d: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10db11: 75 c3 jne 10dad6 <== NEVER TAKEN 10db13: 8d 43 54 lea 0x54(%ebx),%eax if ( jnode_has_children( jnode ) ) 10db16: 39 43 50 cmp %eax,0x50(%ebx) 10db19: 74 bb je 10dad6 jnode = jnode_get_first_child( jnode ); 10db1b: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10db1e: 85 db test %ebx,%ebx 10db20: 75 b4 jne 10dad6 <== ALWAYS TAKEN 10db22: eb 05 jmp 10db29 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 10db24: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10db27: eb 02 jmp 10db2b <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 10db29: 31 c0 xor %eax,%eax } 10db2b: 8d 65 f4 lea -0xc(%ebp),%esp 10db2e: 5b pop %ebx 10db2f: 5e pop %esi 10db30: 5f pop %edi 10db31: c9 leave 10db32: c3 ret =============================================================================== 0010dbac : const char *path, int pathlen, char *token, int *token_len ) { 10dbac: 55 push %ebp 10dbad: 89 e5 mov %esp,%ebp 10dbaf: 57 push %edi 10dbb0: 56 push %esi 10dbb1: 53 push %ebx 10dbb2: 83 ec 1c sub $0x1c,%esp 10dbb5: 8b 7d 08 mov 0x8(%ebp),%edi 10dbb8: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10dbbb: 8a 17 mov (%edi),%dl int pathlen, char *token, int *token_len ) { register int i = 0; 10dbbd: 31 db xor %ebx,%ebx /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10dbbf: eb 10 jmp 10dbd1 token[i] = c; 10dbc1: 88 14 1e mov %dl,(%esi,%ebx,1) if ( i == IMFS_NAME_MAX ) 10dbc4: 83 fb 20 cmp $0x20,%ebx 10dbc7: 0f 84 86 00 00 00 je 10dc53 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10dbcd: 43 inc %ebx 10dbce: 8a 14 1f mov (%edi,%ebx,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10dbd1: 83 ec 0c sub $0xc,%esp 10dbd4: 0f be c2 movsbl %dl,%eax 10dbd7: 50 push %eax 10dbd8: 88 55 e4 mov %dl,-0x1c(%ebp) 10dbdb: e8 d0 a3 ff ff call 107fb0 10dbe0: 83 c4 10 add $0x10,%esp 10dbe3: 85 c0 test %eax,%eax 10dbe5: 8a 55 e4 mov -0x1c(%ebp),%dl 10dbe8: 75 05 jne 10dbef 10dbea: 3b 5d 0c cmp 0xc(%ebp),%ebx 10dbed: 7c d2 jl 10dbc1 /* * Copy a seperator into token. */ if ( i == 0 ) { 10dbef: 85 db test %ebx,%ebx 10dbf1: 75 10 jne 10dc03 token[i] = c; 10dbf3: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10dbf5: 84 d2 test %dl,%dl 10dbf7: 74 06 je 10dbff 10dbf9: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10dbfd: 75 16 jne 10dc15 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 10dbff: 31 ff xor %edi,%edi 10dc01: eb 1c jmp 10dc1f char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 10dc03: bf 03 00 00 00 mov $0x3,%edi i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10dc08: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1) 10dc0d: 74 10 je 10dc1f <== NEVER TAKEN token[i] = '\0'; 10dc0f: c6 04 1e 00 movb $0x0,(%esi,%ebx,1) 10dc13: eb 0a jmp 10dc1f if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 10dc15: bf 01 00 00 00 mov $0x1,%edi if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 10dc1a: bb 01 00 00 00 mov $0x1,%ebx /* * Set token_len to the number of characters copied. */ *token_len = i; 10dc1f: 8b 45 14 mov 0x14(%ebp),%eax 10dc22: 89 18 mov %ebx,(%eax) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10dc24: 83 ff 03 cmp $0x3,%edi 10dc27: 75 3d jne 10dc66 if ( strcmp( token, "..") == 0 ) 10dc29: 52 push %edx 10dc2a: 52 push %edx 10dc2b: 68 21 de 11 00 push $0x11de21 10dc30: 56 push %esi 10dc31: e8 5a 32 00 00 call 110e90 10dc36: 83 c4 10 add $0x10,%esp 10dc39: 85 c0 test %eax,%eax 10dc3b: 74 1d je 10dc5a type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10dc3d: 50 push %eax 10dc3e: 50 push %eax 10dc3f: 68 22 de 11 00 push $0x11de22 10dc44: 56 push %esi 10dc45: e8 46 32 00 00 call 110e90 10dc4a: 83 c4 10 add $0x10,%esp 10dc4d: 85 c0 test %eax,%eax 10dc4f: 74 10 je 10dc61 10dc51: eb 13 jmp 10dc66 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 10dc53: bf 04 00 00 00 mov $0x4,%edi 10dc58: eb 0c jmp 10dc66 * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 10dc5a: bf 02 00 00 00 mov $0x2,%edi 10dc5f: eb 05 jmp 10dc66 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 10dc61: bf 01 00 00 00 mov $0x1,%edi } return type; } 10dc66: 89 f8 mov %edi,%eax 10dc68: 8d 65 f4 lea -0xc(%ebp),%esp 10dc6b: 5b pop %ebx 10dc6c: 5e pop %esi 10dc6d: 5f pop %edi 10dc6e: c9 leave 10dc6f: c3 ret =============================================================================== 00106aac : 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 ) { 106aac: 55 push %ebp 106aad: 89 e5 mov %esp,%ebp 106aaf: 57 push %edi 106ab0: 56 push %esi 106ab1: 53 push %ebx 106ab2: 83 ec 1c sub $0x1c,%esp 106ab5: 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, 106ab8: a1 48 f1 11 00 mov 0x11f148,%eax 106abd: b9 06 00 00 00 mov $0x6,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106ac2: ba 10 00 00 00 mov $0x10,%edx 106ac7: 39 c2 cmp %eax,%edx 106ac9: 74 0a je 106ad5 106acb: d1 e2 shl %edx 106acd: 49 dec %ecx 106ace: 75 f7 jne 106ac7 <== ALWAYS TAKEN is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 106ad0: b8 80 00 00 00 mov $0x80,%eax <== 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) 106ad5: a3 10 2d 12 00 mov %eax,0x122d10 /* * 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(); 106ada: e8 8e 69 00 00 call 10d46d 106adf: 89 c2 mov %eax,%edx 106ae1: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106ae4: 8b 45 14 mov 0x14(%ebp),%eax 106ae7: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106aea: 8b 45 0c mov 0xc(%ebp),%eax 106aed: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106af0: 8d 7b 38 lea 0x38(%ebx),%edi 106af3: be b4 dd 11 00 mov $0x11ddb4,%esi 106af8: b9 0c 00 00 00 mov $0xc,%ecx 106afd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106aff: 50 push %eax 106b00: 50 push %eax 106b01: 6a 14 push $0x14 106b03: 6a 01 push $0x1 106b05: 89 55 e4 mov %edx,-0x1c(%ebp) 106b08: e8 1b 06 00 00 call 107128 if ( !fs_info ) { 106b0d: 83 c4 10 add $0x10,%esp 106b10: 85 c0 test %eax,%eax 106b12: 8b 55 e4 mov -0x1c(%ebp),%edx 106b15: 75 1c jne 106b33 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 106b17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106b1a: 52 push %edx <== NOT EXECUTED 106b1b: e8 c4 07 00 00 call 1072e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106b20: e8 a7 97 00 00 call 1102cc <__errno> <== NOT EXECUTED 106b25: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106b2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106b2e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106b31: eb 34 jmp 106b67 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 106b33: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106b36: 8b 0d 14 2d 12 00 mov 0x122d14,%ecx 106b3c: 89 08 mov %ecx,(%eax) 106b3e: 41 inc %ecx 106b3f: 89 0d 14 2d 12 00 mov %ecx,0x122d14 fs_info->ino_count = 1; 106b45: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106b4c: 8b 4d 10 mov 0x10(%ebp),%ecx 106b4f: 89 48 08 mov %ecx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106b52: 8b 4d 14 mov 0x14(%ebp),%ecx 106b55: 89 48 0c mov %ecx,0xc(%eax) fs_info->fifo_handlers = fifo_handlers; 106b58: 8b 4d 18 mov 0x18(%ebp),%ecx 106b5b: 89 48 10 mov %ecx,0x10(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106b5e: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) return 0; 106b65: 31 c0 xor %eax,%eax } 106b67: 8d 65 f4 lea -0xc(%ebp),%esp 106b6a: 5b pop %ebx 106b6b: 5e pop %esi 106b6c: 5f pop %edi 106b6d: c9 leave 106b6e: c3 ret =============================================================================== 00106b70 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106b70: 55 push %ebp 106b71: 89 e5 mov %esp,%ebp 106b73: 57 push %edi 106b74: 53 push %ebx 106b75: 83 ec 50 sub $0x50,%esp 106b78: 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; 106b7b: 8b 45 08 mov 0x8(%ebp),%eax 106b7e: 8b 00 mov (%eax),%eax 106b80: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106b83: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106b88: 76 0d jbe 106b97 rtems_set_errno_and_return_minus_one( EMLINK ); 106b8a: e8 3d 97 00 00 call 1102cc <__errno> 106b8f: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106b95: eb 43 jmp 106bda /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 106b97: 31 c0 xor %eax,%eax 106b99: 83 c9 ff or $0xffffffff,%ecx 106b9c: 89 d7 mov %edx,%edi 106b9e: f2 ae repnz scas %es:(%edi),%al 106ba0: f7 d1 not %ecx 106ba2: 49 dec %ecx 106ba3: 8d 45 f4 lea -0xc(%ebp),%eax 106ba6: 50 push %eax 106ba7: 8d 5d b7 lea -0x49(%ebp),%ebx 106baa: 53 push %ebx 106bab: 51 push %ecx 106bac: 52 push %edx 106bad: e8 fa 6f 00 00 call 10dbac new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 106bb2: 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( 106bb5: 89 04 24 mov %eax,(%esp) 106bb8: 68 ff a1 00 00 push $0xa1ff 106bbd: 53 push %ebx 106bbe: 6a 03 push $0x3 106bc0: ff 75 0c pushl 0xc(%ebp) 106bc3: e8 a5 67 00 00 call 10d36d new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106bc8: 83 c4 20 add $0x20,%esp 106bcb: 85 c0 test %eax,%eax 106bcd: 75 10 jne 106bdf <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106bcf: e8 f8 96 00 00 call 1102cc <__errno> <== NOT EXECUTED 106bd4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106bda: 83 c8 ff or $0xffffffff,%eax 106bdd: eb 22 jmp 106c01 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 106bdf: 8b 45 d8 mov -0x28(%ebp),%eax 106be2: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106be6: 50 push %eax 106be7: 50 push %eax 106be8: 6a 00 push $0x0 106bea: 8d 45 ec lea -0x14(%ebp),%eax 106bed: 50 push %eax 106bee: e8 69 07 00 00 call 10735c 106bf3: 8b 55 ec mov -0x14(%ebp),%edx 106bf6: 8b 45 d8 mov -0x28(%ebp),%eax 106bf9: 89 50 48 mov %edx,0x48(%eax) return 0; 106bfc: 83 c4 10 add $0x10,%esp 106bff: 31 c0 xor %eax,%eax } 106c01: 8d 65 f8 lea -0x8(%ebp),%esp 106c04: 5b pop %ebx 106c05: 5f pop %edi 106c06: c9 leave 106c07: c3 ret =============================================================================== 0010f394 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 10f394: 55 push %ebp 10f395: 89 e5 mov %esp,%ebp 10f397: 53 push %ebx 10f398: 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 ); 10f39b: 6a 01 push $0x1 10f39d: ff 75 0c pushl 0xc(%ebp) 10f3a0: ff 75 08 pushl 0x8(%ebp) 10f3a3: e8 cc fc ff ff call 10f074 10f3a8: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 10f3aa: 83 c4 10 add $0x10,%esp return 0; 10f3ad: 31 c0 xor %eax,%eax assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) 10f3af: 83 3b 00 cmpl $0x0,(%ebx) 10f3b2: 75 14 jne 10f3c8 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 10f3b4: e8 99 fc ff ff call 10f052 10f3b9: 89 c2 mov %eax,%edx if ( !memory ) return 1; 10f3bb: b8 01 00 00 00 mov $0x1,%eax fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 10f3c0: 85 d2 test %edx,%edx 10f3c2: 74 04 je 10f3c8 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 10f3c4: 89 13 mov %edx,(%ebx) return 0; 10f3c6: 30 c0 xor %al,%al } 10f3c8: 8b 5d fc mov -0x4(%ebp),%ebx 10f3cb: c9 leave 10f3cc: c3 ret =============================================================================== 0010f562 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 10f562: 55 push %ebp 10f563: 89 e5 mov %esp,%ebp 10f565: 57 push %edi 10f566: 56 push %esi 10f567: 53 push %ebx 10f568: 83 ec 2c sub $0x2c,%esp 10f56b: 8b 7d 08 mov 0x8(%ebp),%edi 10f56e: 8b 5d 0c mov 0xc(%ebp),%ebx 10f571: 8b 75 10 mov 0x10(%ebp),%esi #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 10f574: a1 10 2d 12 00 mov 0x122d10,%eax 10f579: 89 c1 mov %eax,%ecx 10f57b: c1 e9 02 shr $0x2,%ecx 10f57e: 8d 51 01 lea 0x1(%ecx),%edx 10f581: 0f af d1 imul %ecx,%edx 10f584: 42 inc %edx 10f585: 0f af d1 imul %ecx,%edx 10f588: 4a dec %edx 10f589: 0f af d0 imul %eax,%edx 10f58c: 83 fe 00 cmp $0x0,%esi 10f58f: 7c 16 jl 10f5a7 <== NEVER TAKEN 10f591: 7f 04 jg 10f597 <== NEVER TAKEN 10f593: 39 d3 cmp %edx,%ebx 10f595: 72 10 jb 10f5a7 rtems_set_errno_and_return_minus_one( EINVAL ); 10f597: e8 30 0d 00 00 call 1102cc <__errno> 10f59c: c7 00 16 00 00 00 movl $0x16,(%eax) 10f5a2: e9 92 00 00 00 jmp 10f639 if ( new_length <= the_jnode->info.file.size ) 10f5a7: 8b 57 50 mov 0x50(%edi),%edx 10f5aa: 8b 4f 54 mov 0x54(%edi),%ecx 10f5ad: 89 55 e0 mov %edx,-0x20(%ebp) 10f5b0: 89 4d e4 mov %ecx,-0x1c(%ebp) 10f5b3: 39 ce cmp %ecx,%esi 10f5b5: 0f 8c 8f 00 00 00 jl 10f64a <== NEVER TAKEN 10f5bb: 7f 08 jg 10f5c5 <== NEVER TAKEN 10f5bd: 39 d3 cmp %edx,%ebx 10f5bf: 0f 86 85 00 00 00 jbe 10f64a /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 10f5c5: 89 45 d8 mov %eax,-0x28(%ebp) 10f5c8: 89 c1 mov %eax,%ecx 10f5ca: c1 f9 1f sar $0x1f,%ecx 10f5cd: 89 4d dc mov %ecx,-0x24(%ebp) 10f5d0: ff 75 dc pushl -0x24(%ebp) 10f5d3: ff 75 d8 pushl -0x28(%ebp) 10f5d6: 56 push %esi 10f5d7: 53 push %ebx 10f5d8: e8 9b be 00 00 call 11b478 <__divdi3> 10f5dd: 83 c4 10 add $0x10,%esp 10f5e0: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 10f5e3: ff 75 dc pushl -0x24(%ebp) 10f5e6: ff 75 d8 pushl -0x28(%ebp) 10f5e9: ff 75 e4 pushl -0x1c(%ebp) 10f5ec: ff 75 e0 pushl -0x20(%ebp) 10f5ef: e8 84 be 00 00 call 11b478 <__divdi3> 10f5f4: 83 c4 10 add $0x10,%esp 10f5f7: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10f5fa: 89 c2 mov %eax,%edx 10f5fc: eb 41 jmp 10f63f if ( IMFS_memfile_addblock( the_jnode, block ) ) { 10f5fe: 51 push %ecx 10f5ff: 51 push %ecx 10f600: 52 push %edx 10f601: 57 push %edi 10f602: 89 55 d0 mov %edx,-0x30(%ebp) 10f605: e8 8a fd ff ff call 10f394 10f60a: 83 c4 10 add $0x10,%esp 10f60d: 85 c0 test %eax,%eax 10f60f: 8b 55 d0 mov -0x30(%ebp),%edx 10f612: 74 2a je 10f63e <== ALWAYS TAKEN 10f614: eb 13 jmp 10f629 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 10f616: 50 push %eax <== NOT EXECUTED 10f617: 50 push %eax <== NOT EXECUTED 10f618: 52 push %edx <== NOT EXECUTED 10f619: 57 push %edi <== NOT EXECUTED 10f61a: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 10f61d: e8 0b ff ff ff call 10f52d <== 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-- ) { 10f622: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 10f625: 4a dec %edx <== NOT EXECUTED 10f626: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f629: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 10f62c: 73 e8 jae 10f616 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 10f62e: e8 99 0c 00 00 call 1102cc <__errno> <== NOT EXECUTED 10f633: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 10f639: 83 c8 ff or $0xffffffff,%eax 10f63c: eb 0e jmp 10f64c /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 10f63e: 42 inc %edx 10f63f: 3b 55 d4 cmp -0x2c(%ebp),%edx 10f642: 76 ba jbe 10f5fe /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 10f644: 89 5f 50 mov %ebx,0x50(%edi) 10f647: 89 77 54 mov %esi,0x54(%edi) if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) return 0; 10f64a: 31 c0 xor %eax,%eax * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 10f64c: 8d 65 f4 lea -0xc(%ebp),%esp 10f64f: 5b pop %ebx 10f650: 5e pop %esi 10f651: 5f pop %edi 10f652: c9 leave 10f653: c3 ret =============================================================================== 0010f074 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 10f074: 55 push %ebp 10f075: 89 e5 mov %esp,%ebp 10f077: 57 push %edi 10f078: 56 push %esi 10f079: 53 push %ebx 10f07a: 83 ec 1c sub $0x1c,%esp 10f07d: 8b 75 08 mov 0x8(%ebp),%esi 10f080: 8b 7d 0c mov 0xc(%ebp),%edi /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 10f083: 8b 0d 10 2d 12 00 mov 0x122d10,%ecx 10f089: c1 e9 02 shr $0x2,%ecx 10f08c: 8d 41 ff lea -0x1(%ecx),%eax 10f08f: 39 c7 cmp %eax,%edi 10f091: 77 40 ja 10f0d3 p = info->indirect; 10f093: 8b 46 58 mov 0x58(%esi),%eax if ( malloc_it ) { 10f096: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f09a: 74 25 je 10f0c1 if ( !p ) { 10f09c: 85 c0 test %eax,%eax 10f09e: 75 12 jne 10f0b2 p = memfile_alloc_block(); 10f0a0: e8 ad ff ff ff call 10f052 if ( !p ) return 0; 10f0a5: 31 db xor %ebx,%ebx if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 10f0a7: 85 c0 test %eax,%eax 10f0a9: 0f 84 04 01 00 00 je 10f1b3 <== NEVER TAKEN return 0; info->indirect = p; 10f0af: 89 46 58 mov %eax,0x58(%esi) } return &info->indirect[ my_block ]; 10f0b2: 8d 1c bd 00 00 00 00 lea 0x0(,%edi,4),%ebx 10f0b9: 03 5e 58 add 0x58(%esi),%ebx 10f0bc: e9 f2 00 00 00 jmp 10f1b3 } if ( !p ) return 0; 10f0c1: 31 db xor %ebx,%ebx info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 10f0c3: 85 c0 test %eax,%eax 10f0c5: 0f 84 e8 00 00 00 je 10f1b3 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; 10f0cb: 8d 1c b8 lea (%eax,%edi,4),%ebx 10f0ce: e9 e0 00 00 00 jmp 10f1b3 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 10f0d3: 8d 41 01 lea 0x1(%ecx),%eax 10f0d6: 0f af c1 imul %ecx,%eax 10f0d9: 8d 50 ff lea -0x1(%eax),%edx 10f0dc: 39 d7 cmp %edx,%edi 10f0de: 77 47 ja 10f127 #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 10f0e0: 29 cf sub %ecx,%edi singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 10f0e2: 89 f8 mov %edi,%eax 10f0e4: 31 d2 xor %edx,%edx 10f0e6: f7 f1 div %ecx 10f0e8: 89 55 e4 mov %edx,-0x1c(%ebp) 10f0eb: 89 c7 mov %eax,%edi doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 10f0ed: 8b 46 5c mov 0x5c(%esi),%eax if ( malloc_it ) { 10f0f0: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f0f4: 74 1b je 10f111 if ( !p ) { 10f0f6: 85 c0 test %eax,%eax 10f0f8: 75 12 jne 10f10c p = memfile_alloc_block(); 10f0fa: e8 53 ff ff ff call 10f052 if ( !p ) return 0; 10f0ff: 31 db xor %ebx,%ebx p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 10f101: 85 c0 test %eax,%eax 10f103: 0f 84 aa 00 00 00 je 10f1b3 <== NEVER TAKEN return 0; info->doubly_indirect = p; 10f109: 89 46 5c mov %eax,0x5c(%esi) } p1 = (block_p *)p[ doubly ]; 10f10c: 8d 34 b8 lea (%eax,%edi,4),%esi 10f10f: eb 6c jmp 10f17d return (block_p *)&p1[ singly ]; } if ( !p ) return 0; 10f111: 31 db xor %ebx,%ebx } return (block_p *)&p1[ singly ]; } if ( !p ) 10f113: 85 c0 test %eax,%eax 10f115: 0f 84 98 00 00 00 je 10f1b3 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 10f11b: 8b 04 b8 mov (%eax,%edi,4),%eax if ( !p ) 10f11e: 85 c0 test %eax,%eax 10f120: 75 6e jne 10f190 <== ALWAYS TAKEN 10f122: e9 8c 00 00 00 jmp 10f1b3 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 10f127: 8d 50 01 lea 0x1(%eax),%edx 10f12a: 0f af d1 imul %ecx,%edx 10f12d: 4a dec %edx /* * This means the requested block number is out of range. */ return 0; 10f12e: 31 db xor %ebx,%ebx #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 10f130: 39 d7 cmp %edx,%edi 10f132: 77 7f ja 10f1b3 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 10f134: 29 c7 sub %eax,%edi 10f136: 89 f8 mov %edi,%eax singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 10f138: 31 d2 xor %edx,%edx 10f13a: f7 f1 div %ecx 10f13c: 89 55 e4 mov %edx,-0x1c(%ebp) doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 10f13f: 31 d2 xor %edx,%edx 10f141: f7 f1 div %ecx 10f143: 89 55 e0 mov %edx,-0x20(%ebp) 10f146: 89 c7 mov %eax,%edi doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 10f148: 8b 46 60 mov 0x60(%esi),%eax if ( malloc_it ) { 10f14b: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f14f: 74 47 je 10f198 if ( !p ) { 10f151: 85 c0 test %eax,%eax 10f153: 75 0c jne 10f161 p = memfile_alloc_block(); 10f155: e8 f8 fe ff ff call 10f052 if ( !p ) 10f15a: 85 c0 test %eax,%eax 10f15c: 74 55 je 10f1b3 <== NEVER TAKEN return 0; info->triply_indirect = p; 10f15e: 89 46 60 mov %eax,0x60(%esi) } p1 = (block_p *) p[ triply ]; 10f161: 8d 34 b8 lea (%eax,%edi,4),%esi 10f164: 8b 06 mov (%esi),%eax if ( !p1 ) { 10f166: 85 c0 test %eax,%eax 10f168: 75 0d jne 10f177 p1 = memfile_alloc_block(); 10f16a: e8 e3 fe ff ff call 10f052 if ( !p1 ) return 0; 10f16f: 31 db xor %ebx,%ebx } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 10f171: 85 c0 test %eax,%eax 10f173: 74 3e je 10f1b3 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 10f175: 89 06 mov %eax,(%esi) } p2 = (block_p *)p1[ doubly ]; 10f177: 8b 55 e0 mov -0x20(%ebp),%edx 10f17a: 8d 34 90 lea (%eax,%edx,4),%esi 10f17d: 8b 06 mov (%esi),%eax if ( !p2 ) { 10f17f: 85 c0 test %eax,%eax 10f181: 75 0d jne 10f190 p2 = memfile_alloc_block(); 10f183: e8 ca fe ff ff call 10f052 if ( !p2 ) return 0; 10f188: 31 db xor %ebx,%ebx } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 10f18a: 85 c0 test %eax,%eax 10f18c: 74 25 je 10f1b3 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 10f18e: 89 06 mov %eax,(%esi) } return (block_p *)&p2[ singly ]; 10f190: 8b 55 e4 mov -0x1c(%ebp),%edx 10f193: 8d 1c 90 lea (%eax,%edx,4),%ebx 10f196: eb 1b jmp 10f1b3 } if ( !p ) 10f198: 85 c0 test %eax,%eax 10f19a: 74 17 je 10f1b3 <== 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 ]; 10f19c: 8b 04 b8 mov (%eax,%edi,4),%eax if ( !p1 ) 10f19f: 85 c0 test %eax,%eax 10f1a1: 74 10 je 10f1b3 <== NEVER TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 10f1a3: 8b 55 e4 mov -0x1c(%ebp),%edx 10f1a6: 8d 1c 95 00 00 00 00 lea 0x0(,%edx,4),%ebx 10f1ad: 8b 55 e0 mov -0x20(%ebp),%edx 10f1b0: 03 1c 90 add (%eax,%edx,4),%ebx /* * This means the requested block number is out of range. */ return 0; } 10f1b3: 89 d8 mov %ebx,%eax 10f1b5: 83 c4 1c add $0x1c,%esp 10f1b8: 5b pop %ebx 10f1b9: 5e pop %esi 10f1ba: 5f pop %edi 10f1bb: c9 leave 10f1bc: c3 ret =============================================================================== 0010f1bd : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 10f1bd: 55 push %ebp 10f1be: 89 e5 mov %esp,%ebp 10f1c0: 57 push %edi 10f1c1: 56 push %esi 10f1c2: 53 push %ebx 10f1c3: 83 ec 3c sub $0x3c,%esp 10f1c6: 8b 75 0c mov 0xc(%ebp),%esi 10f1c9: 8b 7d 10 mov 0x10(%ebp),%edi /* * Error checks on arguments */ if ( !dest ) 10f1cc: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f1d0: 74 06 je 10f1d8 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 10f1d2: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10f1d6: 75 13 jne 10f1eb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10f1d8: e8 ef 10 00 00 call 1102cc <__errno> <== NOT EXECUTED 10f1dd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f1e3: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10f1e6: e9 80 01 00 00 jmp 10f36b <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 10f1eb: 8b 45 08 mov 0x8(%ebp),%eax 10f1ee: 83 78 4c 06 cmpl $0x6,0x4c(%eax) 10f1f2: 75 42 jne 10f236 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 10f1f4: 8b 50 58 mov 0x58(%eax),%edx 10f1f7: 89 55 cc mov %edx,-0x34(%ebp) if (my_length > (the_jnode->info.linearfile.size - start)) 10f1fa: 8b 48 50 mov 0x50(%eax),%ecx 10f1fd: 8b 58 54 mov 0x54(%eax),%ebx 10f200: 89 c8 mov %ecx,%eax 10f202: 89 da mov %ebx,%edx 10f204: 29 f0 sub %esi,%eax 10f206: 19 fa sbb %edi,%edx 10f208: 89 45 d0 mov %eax,-0x30(%ebp) 10f20b: 89 55 d4 mov %edx,-0x2c(%ebp) 10f20e: 31 c0 xor %eax,%eax 10f210: 39 d0 cmp %edx,%eax 10f212: 7c 10 jl 10f224 <== NEVER TAKEN 10f214: 7f 08 jg 10f21e <== NEVER TAKEN 10f216: 8b 55 d0 mov -0x30(%ebp),%edx 10f219: 39 55 18 cmp %edx,0x18(%ebp) 10f21c: 76 06 jbe 10f224 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 10f21e: 89 ca mov %ecx,%edx 10f220: 29 f2 sub %esi,%edx 10f222: eb 03 jmp 10f227 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)) 10f224: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 10f227: 03 75 cc add -0x34(%ebp),%esi 10f22a: 8b 7d 14 mov 0x14(%ebp),%edi 10f22d: 89 d1 mov %edx,%ecx 10f22f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10f231: e9 16 01 00 00 jmp 10f34c /* * 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; 10f236: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 10f238: 8b 55 08 mov 0x8(%ebp),%edx 10f23b: 8b 5a 50 mov 0x50(%edx),%ebx /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 10f23e: 8b 4d 18 mov 0x18(%ebp),%ecx 10f241: 01 f1 add %esi,%ecx 10f243: 89 4d d0 mov %ecx,-0x30(%ebp) if ( last_byte > the_jnode->info.file.size ) 10f246: 31 c9 xor %ecx,%ecx 10f248: 3b 4a 54 cmp 0x54(%edx),%ecx 10f24b: 7c 0e jl 10f25b <== NEVER TAKEN 10f24d: 7f 05 jg 10f254 <== NEVER TAKEN 10f24f: 39 5d d0 cmp %ebx,-0x30(%ebp) 10f252: 76 07 jbe 10f25b my_length = the_jnode->info.file.size - start; 10f254: 29 c3 sub %eax,%ebx 10f256: 89 5d d0 mov %ebx,-0x30(%ebp) 10f259: eb 06 jmp 10f261 * 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 ) 10f25b: 8b 45 18 mov 0x18(%ebp),%eax 10f25e: 89 45 d0 mov %eax,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10f261: 8b 15 10 2d 12 00 mov 0x122d10,%edx 10f267: 89 55 c4 mov %edx,-0x3c(%ebp) 10f26a: 89 d0 mov %edx,%eax 10f26c: 99 cltd 10f26d: 89 d3 mov %edx,%ebx 10f26f: 52 push %edx 10f270: 50 push %eax 10f271: 57 push %edi 10f272: 56 push %esi 10f273: 89 45 c0 mov %eax,-0x40(%ebp) 10f276: e8 5d c3 00 00 call 11b5d8 <__moddi3> 10f27b: 83 c4 10 add $0x10,%esp 10f27e: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10f281: 8b 4d c0 mov -0x40(%ebp),%ecx 10f284: 53 push %ebx 10f285: 51 push %ecx 10f286: 57 push %edi 10f287: 56 push %esi 10f288: e8 eb c1 00 00 call 11b478 <__divdi3> 10f28d: 83 c4 10 add $0x10,%esp 10f290: 89 c3 mov %eax,%ebx if ( start_offset ) { 10f292: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10f296: 74 3d je 10f2d5 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 ); 10f298: 57 push %edi 10f299: 6a 00 push $0x0 10f29b: 50 push %eax 10f29c: ff 75 08 pushl 0x8(%ebp) 10f29f: e8 d0 fd ff ff call 10f074 if ( !block_ptr ) 10f2a4: 83 c4 10 add $0x10,%esp return copied; 10f2a7: 31 d2 xor %edx,%edx 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 ); if ( !block_ptr ) 10f2a9: 85 c0 test %eax,%eax 10f2ab: 0f 84 ba 00 00 00 je 10f36b <== 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; 10f2b1: 8b 4d c4 mov -0x3c(%ebp),%ecx 10f2b4: 2b 4d cc sub -0x34(%ebp),%ecx 10f2b7: 8b 55 d0 mov -0x30(%ebp),%edx 10f2ba: 39 ca cmp %ecx,%edx 10f2bc: 76 02 jbe 10f2c0 10f2be: 89 ca mov %ecx,%edx 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 ); 10f2c0: 8b 75 cc mov -0x34(%ebp),%esi 10f2c3: 03 30 add (%eax),%esi dest += to_copy; 10f2c5: 8b 7d 14 mov 0x14(%ebp),%edi 10f2c8: 89 d1 mov %edx,%ecx 10f2ca: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10f2cc: 89 7d cc mov %edi,-0x34(%ebp) block++; 10f2cf: 43 inc %ebx my_length -= to_copy; 10f2d0: 29 55 d0 sub %edx,-0x30(%ebp) 10f2d3: eb 08 jmp 10f2dd * 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 ) { 10f2d5: 8b 45 14 mov 0x14(%ebp),%eax 10f2d8: 89 45 cc mov %eax,-0x34(%ebp) last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 10f2db: 31 d2 xor %edx,%edx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10f2dd: 8b 0d 10 2d 12 00 mov 0x122d10,%ecx 10f2e3: 89 4d c8 mov %ecx,-0x38(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10f2e6: eb 2f jmp 10f317 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10f2e8: 56 push %esi 10f2e9: 6a 00 push $0x0 10f2eb: 53 push %ebx 10f2ec: ff 75 08 pushl 0x8(%ebp) 10f2ef: 89 55 c0 mov %edx,-0x40(%ebp) 10f2f2: e8 7d fd ff ff call 10f074 if ( !block_ptr ) 10f2f7: 83 c4 10 add $0x10,%esp 10f2fa: 85 c0 test %eax,%eax 10f2fc: 8b 55 c0 mov -0x40(%ebp),%edx 10f2ff: 74 6a je 10f36b <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 10f301: 8b 30 mov (%eax),%esi 10f303: 8b 7d cc mov -0x34(%ebp),%edi 10f306: 8b 4d c8 mov -0x38(%ebp),%ecx 10f309: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 10f30b: 89 7d cc mov %edi,-0x34(%ebp) block++; 10f30e: 43 inc %ebx my_length -= to_copy; 10f30f: 8b 7d c8 mov -0x38(%ebp),%edi 10f312: 29 7d d0 sub %edi,-0x30(%ebp) copied += to_copy; 10f315: 01 fa add %edi,%edx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10f317: 8b 45 d0 mov -0x30(%ebp),%eax 10f31a: 3b 05 10 2d 12 00 cmp 0x122d10,%eax 10f320: 73 c6 jae 10f2e8 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { 10f322: 85 c0 test %eax,%eax 10f324: 74 26 je 10f34c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10f326: 51 push %ecx 10f327: 6a 00 push $0x0 10f329: 53 push %ebx 10f32a: ff 75 08 pushl 0x8(%ebp) 10f32d: 89 55 c0 mov %edx,-0x40(%ebp) 10f330: e8 3f fd ff ff call 10f074 if ( !block_ptr ) 10f335: 83 c4 10 add $0x10,%esp 10f338: 85 c0 test %eax,%eax 10f33a: 8b 55 c0 mov -0x40(%ebp),%edx 10f33d: 74 2c je 10f36b <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 10f33f: 8b 30 mov (%eax),%esi 10f341: 8b 7d cc mov -0x34(%ebp),%edi 10f344: 8b 4d d0 mov -0x30(%ebp),%ecx 10f347: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 10f349: 03 55 d0 add -0x30(%ebp),%edx } IMFS_update_atime( the_jnode ); 10f34c: 50 push %eax 10f34d: 50 push %eax 10f34e: 6a 00 push $0x0 10f350: 8d 45 e0 lea -0x20(%ebp),%eax 10f353: 50 push %eax 10f354: 89 55 c0 mov %edx,-0x40(%ebp) 10f357: e8 00 80 ff ff call 10735c 10f35c: 8b 45 e0 mov -0x20(%ebp),%eax 10f35f: 8b 4d 08 mov 0x8(%ebp),%ecx 10f362: 89 41 40 mov %eax,0x40(%ecx) return copied; 10f365: 8b 55 c0 mov -0x40(%ebp),%edx 10f368: 83 c4 10 add $0x10,%esp } 10f36b: 89 d0 mov %edx,%eax 10f36d: 8d 65 f4 lea -0xc(%ebp),%esp 10f370: 5b pop %ebx 10f371: 5e pop %esi 10f372: 5f pop %edi 10f373: c9 leave 10f374: c3 ret =============================================================================== 0010f437 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 10f437: 55 push %ebp 10f438: 89 e5 mov %esp,%ebp 10f43a: 57 push %edi 10f43b: 56 push %esi 10f43c: 53 push %ebx 10f43d: 83 ec 1c sub $0x1c,%esp 10f440: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 10f443: 8b 35 10 2d 12 00 mov 0x122d10,%esi 10f449: c1 ee 02 shr $0x2,%esi * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 10f44c: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10f450: 74 0f je 10f461 memfile_free_blocks_in_table( &info->indirect, to_free ); 10f452: 57 push %edi 10f453: 57 push %edi 10f454: 56 push %esi 10f455: 8d 43 58 lea 0x58(%ebx),%eax 10f458: 50 push %eax 10f459: e8 88 ff ff ff call 10f3e6 10f45e: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 10f461: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 10f465: 74 3e je 10f4a5 <== ALWAYS TAKEN 10f467: 31 ff xor %edi,%edi <== NOT EXECUTED 10f469: eb 1f jmp 10f48a <== NOT EXECUTED for ( i=0 ; idoubly_indirect[i] ) { 10f46b: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 10f46e: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 10f475: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 10f479: 74 0e je 10f489 <== NOT EXECUTED memfile_free_blocks_in_table( 10f47b: 51 push %ecx <== NOT EXECUTED 10f47c: 51 push %ecx <== NOT EXECUTED 10f47d: 56 push %esi <== NOT EXECUTED 10f47e: 01 d0 add %edx,%eax <== NOT EXECUTED 10f480: 50 push %eax <== NOT EXECUTED 10f481: e8 60 ff ff ff call 10f3e6 <== NOT EXECUTED 10f486: 83 c4 10 add $0x10,%esp <== 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 ); 10f496: 57 push %edi <== NOT EXECUTED 10f497: 57 push %edi <== NOT EXECUTED 10f498: 56 push %esi <== NOT EXECUTED 10f499: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 10f49c: 50 push %eax <== NOT EXECUTED 10f49d: e8 44 ff ff ff call 10f3e6 <== NOT EXECUTED 10f4a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 10f4a5: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 10f4a9: 74 78 je 10f523 <== ALWAYS TAKEN 10f4ab: 31 ff xor %edi,%edi <== NOT EXECUTED 10f4ad: eb 59 jmp 10f508 <== NOT EXECUTED 10f4af: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 10f4b6: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 10f4b9: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10f4bc: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 10f4bf: 85 c0 test %eax,%eax <== NOT EXECUTED 10f4c1: 74 51 je 10f514 <== NOT EXECUTED 10f4c3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f4c5: eb 21 jmp 10f4e8 <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 10f4cc: 51 push %ecx <== NOT EXECUTED 10f4cd: 51 push %ecx <== NOT EXECUTED 10f4ce: 56 push %esi <== NOT EXECUTED 10f4cf: 50 push %eax <== NOT EXECUTED 10f4d0: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 10f4d3: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 10f4d6: e8 0b ff ff ff call 10f3e6 <== NOT EXECUTED 10f4db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f4de: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10f4e1: 8b 45 dc mov -0x24(%ebp),%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( 10f4f5: 52 push %edx <== NOT EXECUTED 10f4f6: 52 push %edx <== NOT EXECUTED 10f4f7: 56 push %esi <== NOT EXECUTED 10f4f8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10f4fb: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 10f4fe: 50 push %eax <== NOT EXECUTED 10f4ff: e8 e2 fe ff ff call 10f3e6 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 10f514: 50 push %eax <== NOT EXECUTED 10f515: 50 push %eax <== NOT EXECUTED 10f516: 56 push %esi <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); 10f517: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 10f51a: 53 push %ebx <== NOT EXECUTED 10f51b: e8 c6 fe ff ff call 10f3e6 <== NOT EXECUTED 10f520: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 10f523: 31 c0 xor %eax,%eax 10f525: 8d 65 f4 lea -0xc(%ebp),%esp 10f528: 5b pop %ebx 10f529: 5e pop %esi 10f52a: 5f pop %edi 10f52b: c9 leave 10f52c: c3 ret =============================================================================== 0010f52d : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 10f52d: 55 push %ebp <== NOT EXECUTED 10f52e: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f530: 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 ); 10f533: 6a 00 push $0x0 <== NOT EXECUTED 10f535: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10f538: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10f53b: e8 34 fb ff ff call 10f074 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { 10f540: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f543: 85 c0 test %eax,%eax <== NOT EXECUTED 10f545: 74 14 je 10f55b <== NOT EXECUTED ptr = *block_ptr; 10f547: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 10f549: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 10f54f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f552: 52 push %edx <== NOT EXECUTED 10f553: e8 75 fe ff ff call 10f3cd <== NOT EXECUTED 10f558: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 1; } 10f55b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10f560: c9 leave <== NOT EXECUTED 10f561: c3 ret <== NOT EXECUTED =============================================================================== 0010f654 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 10f654: 55 push %ebp 10f655: 89 e5 mov %esp,%ebp 10f657: 57 push %edi 10f658: 56 push %esi 10f659: 53 push %ebx 10f65a: 83 ec 3c sub $0x3c,%esp 10f65d: 8b 5d 0c mov 0xc(%ebp),%ebx 10f660: 8b 75 10 mov 0x10(%ebp),%esi /* * Error check arguments */ if ( !source ) 10f663: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f667: 74 06 je 10f66f <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 10f669: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10f66d: 75 0d jne 10f67c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10f66f: e8 58 0c 00 00 call 1102cc <__errno> <== NOT EXECUTED 10f674: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10f67a: eb 35 jmp 10f6b1 <== NOT EXECUTED /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 10f67c: 8b 4d 18 mov 0x18(%ebp),%ecx 10f67f: 01 d9 add %ebx,%ecx if ( last_byte > the_jnode->info.file.size ) { 10f681: 89 c8 mov %ecx,%eax 10f683: 31 d2 xor %edx,%edx 10f685: 8b 7d 08 mov 0x8(%ebp),%edi 10f688: 3b 57 54 cmp 0x54(%edi),%edx 10f68b: 7c 2c jl 10f6b9 <== NEVER TAKEN 10f68d: 7f 05 jg 10f694 <== NEVER TAKEN 10f68f: 3b 4f 50 cmp 0x50(%edi),%ecx 10f692: 76 25 jbe 10f6b9 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 10f694: 57 push %edi 10f695: 52 push %edx 10f696: 50 push %eax 10f697: ff 75 08 pushl 0x8(%ebp) 10f69a: e8 c3 fe ff ff call 10f562 if ( status ) 10f69f: 83 c4 10 add $0x10,%esp 10f6a2: 85 c0 test %eax,%eax 10f6a4: 74 13 je 10f6b9 rtems_set_errno_and_return_minus_one( ENOSPC ); 10f6a6: e8 21 0c 00 00 call 1102cc <__errno> 10f6ab: c7 00 1c 00 00 00 movl $0x1c,(%eax) 10f6b1: 83 cb ff or $0xffffffff,%ebx 10f6b4: e9 fe 00 00 00 jmp 10f7b7 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10f6b9: a1 10 2d 12 00 mov 0x122d10,%eax 10f6be: 89 45 cc mov %eax,-0x34(%ebp) 10f6c1: 99 cltd 10f6c2: 89 45 c0 mov %eax,-0x40(%ebp) 10f6c5: 89 55 c4 mov %edx,-0x3c(%ebp) 10f6c8: 52 push %edx 10f6c9: 50 push %eax 10f6ca: 56 push %esi 10f6cb: 53 push %ebx 10f6cc: e8 07 bf 00 00 call 11b5d8 <__moddi3> 10f6d1: 83 c4 10 add $0x10,%esp 10f6d4: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10f6d6: ff 75 c4 pushl -0x3c(%ebp) 10f6d9: ff 75 c0 pushl -0x40(%ebp) 10f6dc: 56 push %esi 10f6dd: 53 push %ebx 10f6de: e8 95 bd 00 00 call 11b478 <__divdi3> 10f6e3: 83 c4 10 add $0x10,%esp 10f6e6: 89 c2 mov %eax,%edx if ( start_offset ) { 10f6e8: 85 ff test %edi,%edi 10f6ea: 74 40 je 10f72c 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 ); 10f6ec: 51 push %ecx 10f6ed: 6a 00 push $0x0 10f6ef: 50 push %eax 10f6f0: ff 75 08 pushl 0x8(%ebp) 10f6f3: 89 45 bc mov %eax,-0x44(%ebp) 10f6f6: e8 79 f9 ff ff call 10f074 if ( !block_ptr ) 10f6fb: 83 c4 10 add $0x10,%esp return copied; 10f6fe: 31 db xor %ebx,%ebx 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 ); if ( !block_ptr ) 10f700: 85 c0 test %eax,%eax 10f702: 8b 55 bc mov -0x44(%ebp),%edx 10f705: 0f 84 ac 00 00 00 je 10f7b7 <== 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; 10f70b: 8b 5d cc mov -0x34(%ebp),%ebx 10f70e: 29 fb sub %edi,%ebx 10f710: 3b 5d 18 cmp 0x18(%ebp),%ebx 10f713: 76 03 jbe 10f718 <== ALWAYS TAKEN 10f715: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 10f718: 03 38 add (%eax),%edi src += to_copy; 10f71a: 8b 75 14 mov 0x14(%ebp),%esi 10f71d: 89 d9 mov %ebx,%ecx 10f71f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 10f721: 42 inc %edx my_length -= to_copy; 10f722: 8b 7d 18 mov 0x18(%ebp),%edi 10f725: 29 df sub %ebx,%edi 10f727: 89 7d d4 mov %edi,-0x2c(%ebp) 10f72a: eb 0b jmp 10f737 * 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 ) { 10f72c: 8b 75 14 mov 0x14(%ebp),%esi 10f72f: 8b 45 18 mov 0x18(%ebp),%eax 10f732: 89 45 d4 mov %eax,-0x2c(%ebp) status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 10f735: 31 db xor %ebx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10f737: 8b 3d 10 2d 12 00 mov 0x122d10,%edi 10f73d: 89 7d d0 mov %edi,-0x30(%ebp) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10f740: eb 2b jmp 10f76d block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10f742: 50 push %eax 10f743: 6a 00 push $0x0 10f745: 52 push %edx 10f746: ff 75 08 pushl 0x8(%ebp) 10f749: 89 55 bc mov %edx,-0x44(%ebp) 10f74c: e8 23 f9 ff ff call 10f074 if ( !block_ptr ) 10f751: 83 c4 10 add $0x10,%esp 10f754: 85 c0 test %eax,%eax 10f756: 8b 55 bc mov -0x44(%ebp),%edx 10f759: 74 5c je 10f7b7 <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 10f75b: 8b 00 mov (%eax),%eax src += to_copy; 10f75d: 89 c7 mov %eax,%edi 10f75f: 8b 4d d0 mov -0x30(%ebp),%ecx 10f762: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 10f764: 42 inc %edx my_length -= to_copy; 10f765: 8b 45 d0 mov -0x30(%ebp),%eax 10f768: 29 45 d4 sub %eax,-0x2c(%ebp) * * 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( 10f76b: 01 c3 add %eax,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10f76d: 8b 7d d4 mov -0x2c(%ebp),%edi 10f770: 3b 3d 10 2d 12 00 cmp 0x122d10,%edi 10f776: 73 ca jae 10f742 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { 10f778: 85 ff test %edi,%edi 10f77a: 74 1f je 10f79b block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10f77c: 57 push %edi 10f77d: 6a 00 push $0x0 10f77f: 52 push %edx 10f780: ff 75 08 pushl 0x8(%ebp) 10f783: e8 ec f8 ff ff call 10f074 if ( !block_ptr ) 10f788: 83 c4 10 add $0x10,%esp 10f78b: 85 c0 test %eax,%eax 10f78d: 74 28 je 10f7b7 <== 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 ); 10f78f: 8b 00 mov (%eax),%eax 10f791: 89 c7 mov %eax,%edi 10f793: 8b 4d d4 mov -0x2c(%ebp),%ecx 10f796: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 10f798: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 10f79b: 56 push %esi 10f79c: 56 push %esi 10f79d: 6a 00 push $0x0 10f79f: 8d 45 e0 lea -0x20(%ebp),%eax 10f7a2: 50 push %eax 10f7a3: e8 b4 7b ff ff call 10735c 10f7a8: 8b 45 e0 mov -0x20(%ebp),%eax 10f7ab: 8b 55 08 mov 0x8(%ebp),%edx 10f7ae: 89 42 44 mov %eax,0x44(%edx) 10f7b1: 89 42 48 mov %eax,0x48(%edx) return copied; 10f7b4: 83 c4 10 add $0x10,%esp } 10f7b7: 89 d8 mov %ebx,%eax 10f7b9: 8d 65 f4 lea -0xc(%ebp),%esp 10f7bc: 5b pop %ebx 10f7bd: 5e pop %esi 10f7be: 5f pop %edi 10f7bf: c9 leave 10f7c0: c3 ret =============================================================================== 00106c08 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106c08: 55 push %ebp 106c09: 89 e5 mov %esp,%ebp 106c0b: 57 push %edi 106c0c: 56 push %esi 106c0d: 53 push %ebx 106c0e: 83 ec 4c sub $0x4c,%esp 106c11: 8b 55 08 mov 0x8(%ebp),%edx 106c14: 8b 5d 10 mov 0x10(%ebp),%ebx 106c17: 8b 75 14 mov 0x14(%ebp),%esi 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 ); 106c1a: 31 c0 xor %eax,%eax 106c1c: 83 c9 ff or $0xffffffff,%ecx 106c1f: 89 d7 mov %edx,%edi 106c21: f2 ae repnz scas %es:(%edi),%al 106c23: f7 d1 not %ecx 106c25: 49 dec %ecx 106c26: 8d 45 e4 lea -0x1c(%ebp),%eax 106c29: 50 push %eax 106c2a: 8d 45 af lea -0x51(%ebp),%eax 106c2d: 50 push %eax 106c2e: 51 push %ecx 106c2f: 52 push %edx 106c30: e8 77 6f 00 00 call 10dbac /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106c35: 8b 45 0c mov 0xc(%ebp),%eax 106c38: 25 00 f0 00 00 and $0xf000,%eax 106c3d: 83 c4 10 add $0x10,%esp 106c40: 3d 00 40 00 00 cmp $0x4000,%eax 106c45: 74 3b je 106c82 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106c47: 3d 00 80 00 00 cmp $0x8000,%eax 106c4c: 74 3b je 106c89 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106c4e: 3d 00 20 00 00 cmp $0x2000,%eax 106c53: 74 07 je 106c5c 106c55: 3d 00 60 00 00 cmp $0x6000,%eax 106c5a: 75 0d jne 106c69 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 106c5c: 89 5d d0 mov %ebx,-0x30(%ebp) 106c5f: 89 75 d4 mov %esi,-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; 106c62: ba 02 00 00 00 mov $0x2,%edx 106c67: eb 25 jmp 106c8e rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; 106c69: ba 07 00 00 00 mov $0x7,%edx 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 ); } else if (S_ISFIFO(mode)) 106c6e: 3d 00 10 00 00 cmp $0x1000,%eax 106c73: 74 19 je 106c8e <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 106c75: e8 52 96 00 00 call 1102cc <__errno> <== NOT EXECUTED 106c7a: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106c80: eb 39 jmp 106cbb <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 106c82: ba 01 00 00 00 mov $0x1,%edx 106c87: eb 05 jmp 106c8e else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 106c89: ba 05 00 00 00 mov $0x5,%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( 106c8e: 83 ec 0c sub $0xc,%esp pathloc, type, new_name, mode, &info 106c91: 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( 106c94: 50 push %eax 106c95: ff 75 0c pushl 0xc(%ebp) 106c98: 8d 45 af lea -0x51(%ebp),%eax 106c9b: 50 push %eax 106c9c: 52 push %edx 106c9d: ff 75 18 pushl 0x18(%ebp) 106ca0: e8 c8 66 00 00 call 10d36d 106ca5: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 106ca7: 83 c4 20 add $0x20,%esp rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 106caa: 31 c0 xor %eax,%eax new_name, mode, &info ); if ( !new_node ) 106cac: 85 d2 test %edx,%edx 106cae: 75 0e jne 106cbe rtems_set_errno_and_return_minus_one( ENOMEM ); 106cb0: e8 17 96 00 00 call 1102cc <__errno> 106cb5: c7 00 0c 00 00 00 movl $0xc,(%eax) 106cbb: 83 c8 ff or $0xffffffff,%eax return 0; } 106cbe: 8d 65 f4 lea -0xc(%ebp),%esp 106cc1: 5b pop %ebx 106cc2: 5e pop %esi 106cc3: 5f pop %edi 106cc4: c9 leave 106cc5: c3 ret =============================================================================== 00106cc8 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 106cc8: 55 push %ebp 106cc9: 89 e5 mov %esp,%ebp 106ccb: 83 ec 08 sub $0x8,%esp 106cce: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 106cd1: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 106cd4: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 106cd8: 74 10 je 106cea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 106cda: e8 ed 95 00 00 call 1102cc <__errno> <== NOT EXECUTED 106cdf: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 106ce5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106ce8: eb 05 jmp 106cef <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 106cea: 89 50 5c mov %edx,0x5c(%eax) return 0; 106ced: 31 c0 xor %eax,%eax } 106cef: c9 leave 106cf0: c3 ret =============================================================================== 00108698 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108698: 55 push %ebp 108699: 89 e5 mov %esp,%ebp 10869b: 53 push %ebx 10869c: 83 ec 0c sub $0xc,%esp 10869f: 8b 5d 08 mov 0x8(%ebp),%ebx #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 1086a2: a1 e0 5f 12 00 mov 0x125fe0,%eax 1086a7: ff 70 08 pushl 0x8(%eax) 1086aa: 8d 43 0c lea 0xc(%ebx),%eax 1086ad: 50 push %eax 1086ae: e8 7d af 00 00 call 113630 switch( the_jnode->type ) { 1086b3: 8b 43 4c mov 0x4c(%ebx),%eax 1086b6: 83 c4 10 add $0x10,%esp 1086b9: 8d 50 ff lea -0x1(%eax),%edx 1086bc: 83 fa 06 cmp $0x6,%edx 1086bf: 77 75 ja 108736 <== NEVER TAKEN 1086c1: a1 e0 5f 12 00 mov 0x125fe0,%eax 1086c6: ff 24 95 14 23 12 00 jmp *0x122314(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 1086cd: 51 push %ecx 1086ce: 51 push %ecx 1086cf: ff 70 08 pushl 0x8(%eax) 1086d2: 6a 2f push $0x2f 1086d4: e8 ab ae 00 00 call 113584 1086d9: eb 2b jmp 108706 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 1086db: ff 73 54 pushl 0x54(%ebx) 1086de: ff 73 50 pushl 0x50(%ebx) 1086e1: 68 38 22 12 00 push $0x122238 1086e6: eb 16 jmp 1086fe the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 1086e8: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1086eb: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1086ee: 68 4b 22 12 00 push $0x12224b <== NOT EXECUTED 1086f3: eb 09 jmp 1086fe <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 1086f5: 52 push %edx <== NOT EXECUTED 1086f6: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1086f9: 68 5a 22 12 00 push $0x12225a <== NOT EXECUTED 1086fe: ff 70 08 pushl 0x8(%eax) 108701: e8 1e ae 00 00 call 113524 (uint32_t)the_jnode->info.file.size ); #endif break; 108706: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 108709: c7 45 08 a9 24 12 00 movl $0x1224a9,0x8(%ebp) } 108710: 8b 5d fc mov -0x4(%ebp),%ebx 108713: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 108714: e9 eb c6 00 00 jmp 114e04 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108719: 53 push %ebx <== NOT EXECUTED 10871a: 53 push %ebx <== NOT EXECUTED 10871b: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10871e: 68 66 22 12 00 push $0x122266 <== NOT EXECUTED 108723: eb 0a jmp 10872f <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108725: 51 push %ecx <== NOT EXECUTED 108726: 51 push %ecx <== NOT EXECUTED 108727: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10872a: 68 7a 22 12 00 push $0x12227a <== NOT EXECUTED 10872f: e8 fc ae 00 00 call 113630 <== NOT EXECUTED 108734: eb 14 jmp 10874a <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108736: 52 push %edx <== NOT EXECUTED 108737: 50 push %eax <== NOT EXECUTED 108738: 68 8d 22 12 00 push $0x12228d <== NOT EXECUTED 10873d: a1 e0 5f 12 00 mov 0x125fe0,%eax <== NOT EXECUTED 108742: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108745: e8 da ad 00 00 call 113524 <== NOT EXECUTED return; 10874a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } puts(""); } 10874d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108750: c9 leave <== NOT EXECUTED 108751: c3 ret <== NOT EXECUTED =============================================================================== 00106d04 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 106d04: 55 push %ebp 106d05: 89 e5 mov %esp,%ebp 106d07: 56 push %esi 106d08: 53 push %ebx 106d09: 8b 5d 0c mov 0xc(%ebp),%ebx 106d0c: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 106d0f: 8b 45 08 mov 0x8(%ebp),%eax 106d12: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 106d14: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 106d18: 75 04 jne 106d1e <== NEVER TAKEN 106d1a: 31 c0 xor %eax,%eax 106d1c: eb 14 jmp 106d32 rtems_set_errno_and_return_minus_one( EINVAL ); 106d1e: e8 a9 95 00 00 call 1102cc <__errno> <== NOT EXECUTED 106d23: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106d29: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106d2c: eb 12 jmp 106d40 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 106d2e: 88 0c 03 mov %cl,(%ebx,%eax,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++ ) 106d31: 40 inc %eax 106d32: 39 f0 cmp %esi,%eax 106d34: 73 0a jae 106d40 106d36: 8b 4a 50 mov 0x50(%edx),%ecx 106d39: 8a 0c 01 mov (%ecx,%eax,1),%cl 106d3c: 84 c9 test %cl,%cl 106d3e: 75 ee jne 106d2e buf[i] = node->info.sym_link.name[i]; return i; } 106d40: 5b pop %ebx 106d41: 5e pop %esi 106d42: c9 leave 106d43: c3 ret =============================================================================== 00106d44 : 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 */ ) { 106d44: 55 push %ebp <== NOT EXECUTED 106d45: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106d47: 53 push %ebx <== NOT EXECUTED 106d48: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 106d4b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 106d4e: 8b 18 mov (%eax),%ebx <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 106d50: 6a 20 push $0x20 <== NOT EXECUTED 106d52: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 106d55: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED 106d58: 50 push %eax <== NOT EXECUTED 106d59: e8 3e a3 00 00 call 11109c <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 106d5e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d61: 83 7b 08 00 cmpl $0x0,0x8(%ebx) <== NOT EXECUTED 106d65: 74 0c je 106d73 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 106d67: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106d6a: 53 push %ebx <== NOT EXECUTED 106d6b: e8 98 3c 00 00 call 10aa08 <_Chain_Extract> <== NOT EXECUTED 106d70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 106d73: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 106d76: 8b 00 mov (%eax),%eax <== NOT EXECUTED the_jnode->Parent = new_parent; 106d78: 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 ); 106d7b: 51 push %ecx <== NOT EXECUTED 106d7c: 51 push %ecx <== NOT EXECUTED 106d7d: 53 push %ebx <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); 106d7e: 83 c0 50 add $0x50,%eax <== NOT EXECUTED 106d81: 50 push %eax <== NOT EXECUTED 106d82: e8 5d 3c 00 00 call 10a9e4 <_Chain_Append> <== NOT EXECUTED /* * Update the time. */ IMFS_update_ctime( the_jnode ); 106d87: 58 pop %eax <== NOT EXECUTED 106d88: 5a pop %edx <== NOT EXECUTED 106d89: 6a 00 push $0x0 <== NOT EXECUTED 106d8b: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 106d8e: 50 push %eax <== NOT EXECUTED 106d8f: e8 c8 05 00 00 call 10735c <== NOT EXECUTED 106d94: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 106d97: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED return 0; } 106d9a: 31 c0 xor %eax,%eax <== NOT EXECUTED 106d9c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106d9f: c9 leave <== NOT EXECUTED 106da0: c3 ret <== NOT EXECUTED =============================================================================== 0010dd3c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10dd3c: 55 push %ebp 10dd3d: 89 e5 mov %esp,%ebp 10dd3f: 56 push %esi 10dd40: 53 push %ebx 10dd41: 8b 4d 08 mov 0x8(%ebp),%ecx 10dd44: 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; 10dd47: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10dd49: 8b 5a 4c mov 0x4c(%edx),%ebx 10dd4c: 83 eb 02 sub $0x2,%ebx 10dd4f: 83 fb 05 cmp $0x5,%ebx 10dd52: 77 33 ja 10dd87 <== NEVER TAKEN 10dd54: ff 24 9d 04 df 11 00 jmp *0x11df04(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10dd5b: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10dd5e: 8b 72 50 mov 0x50(%edx),%esi 10dd61: 89 70 18 mov %esi,0x18(%eax) 10dd64: 89 58 1c mov %ebx,0x1c(%eax) break; 10dd67: eb 2e jmp 10dd97 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10dd69: 8b 5a 50 mov 0x50(%edx),%ebx 10dd6c: 8b 72 54 mov 0x54(%edx),%esi 10dd6f: 89 58 20 mov %ebx,0x20(%eax) 10dd72: 89 70 24 mov %esi,0x24(%eax) break; 10dd75: eb 20 jmp 10dd97 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10dd77: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) 10dd7e: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) break; 10dd85: eb 10 jmp 10dd97 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10dd87: e8 40 25 00 00 call 1102cc <__errno> <== NOT EXECUTED 10dd8c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10dd92: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10dd95: eb 47 jmp 10ddde <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 10dd97: 8b 49 10 mov 0x10(%ecx),%ecx buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10dd9a: 8b 49 34 mov 0x34(%ecx),%ecx 10dd9d: 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 = 10dd9f: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10dda5: 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; 10dda8: 8b 4a 30 mov 0x30(%edx),%ecx 10ddab: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10ddae: 8b 4a 34 mov 0x34(%edx),%ecx 10ddb1: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10ddb5: 8b 4a 38 mov 0x38(%edx),%ecx 10ddb8: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10ddbb: 8b 4a 3c mov 0x3c(%edx),%ecx 10ddbe: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10ddc2: 66 8b 4a 3e mov 0x3e(%edx),%cx 10ddc6: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10ddca: 8b 4a 40 mov 0x40(%edx),%ecx 10ddcd: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10ddd0: 8b 4a 44 mov 0x44(%edx),%ecx 10ddd3: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10ddd6: 8b 52 48 mov 0x48(%edx),%edx 10ddd9: 89 50 38 mov %edx,0x38(%eax) return 0; 10dddc: 31 c0 xor %eax,%eax } 10ddde: 5b pop %ebx 10dddf: 5e pop %esi 10dde0: c9 leave 10dde1: c3 ret =============================================================================== 00106da4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 106da4: 55 push %ebp 106da5: 89 e5 mov %esp,%ebp 106da7: 57 push %edi 106da8: 53 push %ebx 106da9: 83 ec 40 sub $0x40,%esp 106dac: 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 ); 106daf: 31 c0 xor %eax,%eax 106db1: 83 c9 ff or $0xffffffff,%ecx 106db4: 89 d7 mov %edx,%edi 106db6: f2 ae repnz scas %es:(%edi),%al 106db8: f7 d1 not %ecx 106dba: 49 dec %ecx 106dbb: 8d 45 f4 lea -0xc(%ebp),%eax 106dbe: 50 push %eax 106dbf: 8d 5d bf lea -0x41(%ebp),%ebx 106dc2: 53 push %ebx 106dc3: 51 push %ecx 106dc4: 52 push %edx 106dc5: e8 e2 6d 00 00 call 10dbac /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 106dca: 58 pop %eax 106dcb: ff 75 0c pushl 0xc(%ebp) 106dce: e8 65 a1 00 00 call 110f38 106dd3: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 106dd6: 83 c4 10 add $0x10,%esp 106dd9: 85 c0 test %eax,%eax 106ddb: 75 0d jne 106dea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 106ddd: e8 ea 94 00 00 call 1102cc <__errno> <== NOT EXECUTED 106de2: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106de8: eb 3b jmp 106e25 <== NOT EXECUTED * 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( 106dea: 83 ec 0c sub $0xc,%esp parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 106ded: 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( 106df0: 50 push %eax 106df1: 68 ff a1 00 00 push $0xa1ff 106df6: 53 push %ebx 106df7: 6a 04 push $0x4 106df9: ff 75 08 pushl 0x8(%ebp) 106dfc: e8 6c 65 00 00 call 10d36d 106e01: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 106e03: 83 c4 20 add $0x20,%esp free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 106e06: 31 c0 xor %eax,%eax new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 106e08: 85 d2 test %edx,%edx 106e0a: 75 1c jne 106e28 <== ALWAYS TAKEN free(info.sym_link.name); 106e0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e0f: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 106e12: e8 cd 04 00 00 call 1072e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106e17: e8 b0 94 00 00 call 1102cc <__errno> <== NOT EXECUTED 106e1c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e25: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } return 0; } 106e28: 8d 65 f8 lea -0x8(%ebp),%esp 106e2b: 5b pop %ebx 106e2c: 5f pop %edi 106e2d: c9 leave 106e2e: c3 ret =============================================================================== 00106e30 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 106e30: 55 push %ebp 106e31: 89 e5 mov %esp,%ebp 106e33: 57 push %edi 106e34: 56 push %esi 106e35: 53 push %ebx 106e36: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 106e39: 8b 45 0c mov 0xc(%ebp),%eax 106e3c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 106e3e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 106e42: 75 7a jne 106ebe if ( !node->info.hard_link.link_node ) 106e44: 8b 43 50 mov 0x50(%ebx),%eax 106e47: 85 c0 test %eax,%eax 106e49: 75 10 jne 106e5b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 106e4b: e8 7c 94 00 00 call 1102cc <__errno> <== NOT EXECUTED 106e50: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106e56: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e59: eb 75 jmp 106ed0 <== NOT EXECUTED the_link = *loc; 106e5b: 8d 7d cc lea -0x34(%ebp),%edi 106e5e: b9 05 00 00 00 mov $0x5,%ecx 106e63: 8b 75 0c mov 0xc(%ebp),%esi 106e66: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 106e68: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 106e6b: 83 ec 0c sub $0xc,%esp 106e6e: 8d 75 cc lea -0x34(%ebp),%esi 106e71: 56 push %esi 106e72: e8 29 66 00 00 call 10d4a0 /* * 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) 106e77: 8b 43 50 mov 0x50(%ebx),%eax 106e7a: 8b 50 34 mov 0x34(%eax),%edx 106e7d: 83 c4 10 add $0x10,%esp 106e80: 66 83 fa 01 cmp $0x1,%dx 106e84: 75 1a jne 106ea0 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 106e86: 51 push %ecx 106e87: 51 push %ecx 106e88: 56 push %esi 106e89: ff 75 08 pushl 0x8(%ebp) 106e8c: 8b 45 d4 mov -0x2c(%ebp),%eax 106e8f: ff 50 34 call *0x34(%eax) 106e92: 89 c2 mov %eax,%edx if ( result != 0 ) 106e94: 83 c4 10 add $0x10,%esp return -1; 106e97: 83 c8 ff or $0xffffffff,%eax */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) 106e9a: 85 d2 test %edx,%edx 106e9c: 74 20 je 106ebe 106e9e: eb 30 jmp 106ed0 return -1; } else { node->info.hard_link.link_node->st_nlink --; 106ea0: 4a dec %edx 106ea1: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 106ea5: 52 push %edx 106ea6: 52 push %edx 106ea7: 6a 00 push $0x0 106ea9: 8d 45 e0 lea -0x20(%ebp),%eax 106eac: 50 push %eax 106ead: e8 aa 04 00 00 call 10735c 106eb2: 8b 43 50 mov 0x50(%ebx),%eax 106eb5: 8b 55 e0 mov -0x20(%ebp),%edx 106eb8: 89 50 48 mov %edx,0x48(%eax) 106ebb: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 106ebe: 50 push %eax 106ebf: 50 push %eax 106ec0: 8b 55 0c mov 0xc(%ebp),%edx 106ec3: 8b 42 08 mov 0x8(%edx),%eax 106ec6: 52 push %edx 106ec7: ff 75 08 pushl 0x8(%ebp) 106eca: ff 50 34 call *0x34(%eax) return result; 106ecd: 83 c4 10 add $0x10,%esp } 106ed0: 8d 65 f4 lea -0xc(%ebp),%esp 106ed3: 5b pop %ebx 106ed4: 5e pop %esi 106ed5: 5f pop %edi 106ed6: c9 leave 106ed7: c3 ret =============================================================================== 00106ed8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 106ed8: 55 push %ebp 106ed9: 89 e5 mov %esp,%ebp 106edb: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 106ede: 8b 45 08 mov 0x8(%ebp),%eax 106ee1: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 106ee4: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 106ee8: 74 0d je 106ef7 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 106eea: e8 dd 93 00 00 call 1102cc <__errno> <== NOT EXECUTED 106eef: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 106ef5: eb 11 jmp 106f08 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 106ef7: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 106efb: 75 10 jne 106f0d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 106efd: e8 ca 93 00 00 call 1102cc <__errno> <== NOT EXECUTED 106f02: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106f08: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106f0b: eb 09 jmp 106f16 <== NOT EXECUTED /* * 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; 106f0d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) return 0; 106f14: 31 c0 xor %eax,%eax } 106f16: c9 leave 106f17: c3 ret =============================================================================== 00106a68 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 106a68: 55 push %ebp <== NOT EXECUTED 106a69: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106a6b: 57 push %edi <== NOT EXECUTED 106a6c: 56 push %esi <== NOT EXECUTED 106a6d: 53 push %ebx <== NOT EXECUTED 106a6e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 106a71: 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) { 106a74: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 106a77: 75 0f jne 106a88 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 106a79: 83 3d f4 40 12 00 00 cmpl $0x0,0x1240f4 <== NOT EXECUTED 106a80: 0f 84 8b 00 00 00 je 106b11 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 106a86: 31 db xor %ebx,%ebx <== 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); 106a88: 8b 3d f0 40 12 00 mov 0x1240f0,%edi <== NOT EXECUTED 106a8e: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 106a91: 85 db test %ebx,%ebx <== NOT EXECUTED 106a93: 8b 35 d4 3d 12 00 mov 0x123dd4,%esi <== NOT EXECUTED 106a99: 74 25 je 106ac0 <== NOT EXECUTED (*print_handler)( 106a9b: 50 push %eax <== NOT EXECUTED 106a9c: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 106a9f: 50 push %eax <== NOT EXECUTED 106aa0: 6a 05 push $0x5 <== NOT EXECUTED 106aa2: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106aa5: e8 aa 37 00 00 call 10a254 <== NOT EXECUTED 106aaa: 50 push %eax <== NOT EXECUTED 106aab: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106aae: 68 5d dc 11 00 push $0x11dc5d <== NOT EXECUTED 106ab3: ff 35 d0 3d 12 00 pushl 0x123dd0 <== NOT EXECUTED 106ab9: ff d6 call *%esi <== NOT EXECUTED 106abb: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106abe: eb 13 jmp 106ad3 <== 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 ); 106ac0: 51 push %ecx <== NOT EXECUTED 106ac1: 6a ff push $0xffffffff <== NOT EXECUTED 106ac3: 68 6a dc 11 00 push $0x11dc6a <== NOT EXECUTED 106ac8: ff 35 d0 3d 12 00 pushl 0x123dd0 <== NOT EXECUTED 106ace: ff d6 call *%esi <== NOT EXECUTED 106ad0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 106ad3: a1 f4 40 12 00 mov 0x1240f4,%eax <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 106ad8: 52 push %edx <== NOT EXECUTED 106ad9: 52 push %edx <== NOT EXECUTED 106ada: 57 push %edi <== NOT EXECUTED 106adb: 6a 00 push $0x0 <== NOT EXECUTED 106add: 8b 15 f0 40 12 00 mov 0x1240f0,%edx <== NOT EXECUTED 106ae3: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 106ae7: 52 push %edx <== NOT EXECUTED 106ae8: 50 push %eax <== NOT EXECUTED 106ae9: 68 78 dc 11 00 push $0x11dc78 <== NOT EXECUTED 106aee: ff 35 d0 3d 12 00 pushl 0x123dd0 <== NOT EXECUTED 106af4: ff 15 d4 3d 12 00 call *0x123dd4 <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 106afa: 83 c4 18 add $0x18,%esp <== NOT EXECUTED 106afd: 68 96 dc 11 00 push $0x11dc96 <== NOT EXECUTED 106b02: ff 35 d0 3d 12 00 pushl 0x123dd0 <== NOT EXECUTED 106b08: ff 15 d4 3d 12 00 call *0x123dd4 <== NOT EXECUTED 106b0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 106b11: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 106b14: 5b pop %ebx <== NOT EXECUTED 106b15: 5e pop %esi <== NOT EXECUTED 106b16: 5f pop %edi <== NOT EXECUTED 106b17: c9 leave <== NOT EXECUTED 106b18: c3 ret <== NOT EXECUTED =============================================================================== 00106b19 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 106b19: 55 push %ebp <== NOT EXECUTED 106b1a: 89 e5 mov %esp,%ebp <== NOT EXECUTED Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 106b1c: c9 leave <== NOT EXECUTED 106b1d: c3 ret <== NOT EXECUTED =============================================================================== 00106b67 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 106b67: 55 push %ebp <== NOT EXECUTED 106b68: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106b6a: 56 push %esi <== NOT EXECUTED 106b6b: 53 push %ebx <== NOT EXECUTED 106b6c: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 106b6f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 106b72: 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); 106b75: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 106b7b: 68 a3 dc 11 00 push $0x11dca3 <== NOT EXECUTED 106b80: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 106b83: e8 54 16 00 00 call 1081dc <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 106b88: 5a pop %edx <== NOT EXECUTED 106b89: 59 pop %ecx <== NOT EXECUTED 106b8a: 53 push %ebx <== NOT EXECUTED 106b8b: 68 b3 dc 11 00 push $0x11dcb3 <== NOT EXECUTED 106b90: e8 47 16 00 00 call 1081dc <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 106b95: 59 pop %ecx <== NOT EXECUTED 106b96: 58 pop %eax <== NOT EXECUTED 106b97: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106b9a: 68 d0 dc 11 00 push $0x11dcd0 <== NOT EXECUTED 106b9f: e8 38 16 00 00 call 1081dc <== NOT EXECUTED printk( 106ba4: 58 pop %eax <== NOT EXECUTED 106ba5: 5a pop %edx <== NOT EXECUTED 106ba6: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 106ba9: 68 e2 dc 11 00 push $0x11dce2 <== NOT EXECUTED 106bae: e8 29 16 00 00 call 1081dc <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 106bb3: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 106bb6: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 106bb9: 50 push %eax <== NOT EXECUTED 106bba: 6a 20 push $0x20 <== NOT EXECUTED 106bbc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 106bbf: e8 90 36 00 00 call 10a254 <== NOT EXECUTED 106bc4: 5a pop %edx <== NOT EXECUTED 106bc5: 59 pop %ecx <== NOT EXECUTED 106bc6: 50 push %eax <== NOT EXECUTED 106bc7: 68 f6 dc 11 00 push $0x11dcf6 <== NOT EXECUTED 106bcc: e8 0b 16 00 00 call 1081dc <== 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) 106bd1: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 106bd7: 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( 106bdd: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 106be0: 53 push %ebx <== NOT EXECUTED 106be1: 51 push %ecx <== NOT EXECUTED 106be2: 50 push %eax <== NOT EXECUTED 106be3: 68 0c dd 11 00 push $0x11dd0c <== NOT EXECUTED 106be8: e8 ef 15 00 00 call 1081dc <== 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) { 106bed: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 106bf0: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 106bf3: 84 d2 test %dl,%dl <== NOT EXECUTED 106bf5: 75 17 jne 106c0e <== 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); 106bf7: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 106bfa: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 106bfd: 56 push %esi <== NOT EXECUTED 106bfe: 50 push %eax <== NOT EXECUTED 106bff: 6a 10 push $0x10 <== NOT EXECUTED 106c01: 68 3d dd 11 00 push $0x11dd3d <== NOT EXECUTED 106c06: e8 d1 15 00 00 call 1081dc <== NOT EXECUTED 106c0b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 106c0e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106c11: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 106c16: e8 e9 3d 00 00 call 10aa04 <== NOT EXECUTED =============================================================================== 00117408 <_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 ) { 117408: 55 push %ebp 117409: 89 e5 mov %esp,%ebp 11740b: 57 push %edi 11740c: 56 push %esi 11740d: 53 push %ebx 11740e: 83 ec 1c sub $0x1c,%esp 117411: 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 ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 117414: b8 01 00 00 00 mov $0x1,%eax { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 117419: 8b 55 10 mov 0x10(%ebp),%edx 11741c: 3b 53 4c cmp 0x4c(%ebx),%edx 11741f: 77 4e ja 11746f <_CORE_message_queue_Broadcast+0x67><== 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 ) { 117421: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117425: 75 09 jne 117430 <_CORE_message_queue_Broadcast+0x28> 117427: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11742e: eb 23 jmp 117453 <_CORE_message_queue_Broadcast+0x4b> *count = 0; 117430: 8b 45 1c mov 0x1c(%ebp),%eax 117433: c7 00 00 00 00 00 movl $0x0,(%eax) 117439: eb 32 jmp 11746d <_CORE_message_queue_Broadcast+0x65> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 11743b: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11743e: 8b 42 2c mov 0x2c(%edx),%eax 117441: 89 c7 mov %eax,%edi 117443: 8b 75 0c mov 0xc(%ebp),%esi 117446: 8b 4d 10 mov 0x10(%ebp),%ecx 117449: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11744b: 8b 42 28 mov 0x28(%edx),%eax 11744e: 8b 55 10 mov 0x10(%ebp),%edx 117451: 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 = 117453: 83 ec 0c sub $0xc,%esp 117456: 53 push %ebx 117457: e8 84 21 00 00 call 1195e0 <_Thread_queue_Dequeue> 11745c: 89 c2 mov %eax,%edx 11745e: 83 c4 10 add $0x10,%esp 117461: 85 c0 test %eax,%eax 117463: 75 d6 jne 11743b <_CORE_message_queue_Broadcast+0x33> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117465: 8b 55 e4 mov -0x1c(%ebp),%edx 117468: 8b 45 1c mov 0x1c(%ebp),%eax 11746b: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11746d: 31 c0 xor %eax,%eax } 11746f: 8d 65 f4 lea -0xc(%ebp),%esp 117472: 5b pop %ebx 117473: 5e pop %esi 117474: 5f pop %edi 117475: c9 leave 117476: c3 ret =============================================================================== 00112228 <_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 ) { 112228: 55 push %ebp 112229: 89 e5 mov %esp,%ebp 11222b: 57 push %edi 11222c: 56 push %esi 11222d: 53 push %ebx 11222e: 83 ec 1c sub $0x1c,%esp 112231: 8b 5d 08 mov 0x8(%ebp),%ebx 112234: 8b 7d 10 mov 0x10(%ebp),%edi 112237: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 11223a: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 11223d: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112244: 89 53 4c mov %edx,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)) { 112247: 89 d0 mov %edx,%eax 112249: f6 c2 03 test $0x3,%dl 11224c: 74 0c je 11225a <_CORE_message_queue_Initialize+0x32> allocated_message_size += sizeof(uint32_t); 11224e: 83 c0 04 add $0x4,%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 112251: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) return false; 112254: 31 f6 xor %esi,%esi if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) 112256: 39 d0 cmp %edx,%eax 112258: 72 68 jb 1122c2 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 11225a: 8d 50 10 lea 0x10(%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 * 11225d: 89 d1 mov %edx,%ecx 11225f: 0f af cf imul %edi,%ecx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; 112262: 31 f6 xor %esi,%esi * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112264: 39 c1 cmp %eax,%ecx 112266: 72 5a jb 1122c2 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 112268: 83 ec 0c sub $0xc,%esp 11226b: 51 push %ecx 11226c: 89 55 e4 mov %edx,-0x1c(%ebp) 11226f: e8 72 25 00 00 call 1147e6 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 112274: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112277: 83 c4 10 add $0x10,%esp 11227a: 85 c0 test %eax,%eax 11227c: 8b 55 e4 mov -0x1c(%ebp),%edx 11227f: 74 41 je 1122c2 <_CORE_message_queue_Initialize+0x9a> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112281: 52 push %edx 112282: 57 push %edi 112283: 50 push %eax 112284: 8d 43 60 lea 0x60(%ebx),%eax 112287: 50 push %eax 112288: e8 ef 3e 00 00 call 11617c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11228d: 8d 43 54 lea 0x54(%ebx),%eax 112290: 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; 112293: 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 ); 11229a: 8d 43 50 lea 0x50(%ebx),%eax 11229d: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 1122a0: 6a 06 push $0x6 1122a2: 68 80 00 00 00 push $0x80 1122a7: 8b 45 0c mov 0xc(%ebp),%eax 1122aa: 83 38 01 cmpl $0x1,(%eax) 1122ad: 0f 94 c0 sete %al 1122b0: 0f b6 c0 movzbl %al,%eax 1122b3: 50 push %eax 1122b4: 53 push %ebx 1122b5: e8 0a 1c 00 00 call 113ec4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1122ba: 83 c4 20 add $0x20,%esp 1122bd: be 01 00 00 00 mov $0x1,%esi } 1122c2: 89 f0 mov %esi,%eax 1122c4: 8d 65 f4 lea -0xc(%ebp),%esp 1122c7: 5b pop %ebx 1122c8: 5e pop %esi 1122c9: 5f pop %edi 1122ca: c9 leave 1122cb: c3 ret =============================================================================== 001122cc <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1122cc: 55 push %ebp 1122cd: 89 e5 mov %esp,%ebp 1122cf: 57 push %edi 1122d0: 56 push %esi 1122d1: 53 push %ebx 1122d2: 83 ec 2c sub $0x2c,%esp 1122d5: 8b 45 08 mov 0x8(%ebp),%eax 1122d8: 8b 55 0c mov 0xc(%ebp),%edx 1122db: 89 55 dc mov %edx,-0x24(%ebp) 1122de: 8b 55 10 mov 0x10(%ebp),%edx 1122e1: 89 55 e4 mov %edx,-0x1c(%ebp) 1122e4: 8b 7d 14 mov 0x14(%ebp),%edi 1122e7: 8b 55 1c mov 0x1c(%ebp),%edx 1122ea: 89 55 d4 mov %edx,-0x2c(%ebp) 1122ed: 8a 55 18 mov 0x18(%ebp),%dl 1122f0: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1122f3: 8b 0d 18 b5 12 00 mov 0x12b518,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1122f9: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112300: 9c pushf 112301: fa cli 112302: 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)); 112305: 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; 112308: 8d 58 54 lea 0x54(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11230b: 39 da cmp %ebx,%edx 11230d: 74 47 je 112356 <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 11230f: 8b 32 mov (%edx),%esi the_chain->first = new_first; 112311: 89 70 50 mov %esi,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 ); 112314: 8d 58 50 lea 0x50(%eax),%ebx 112317: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11231a: 85 d2 test %edx,%edx 11231c: 74 38 je 112356 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 11231e: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 112321: ff 75 e0 pushl -0x20(%ebp) 112324: 9d popf *size_p = the_message->Contents.size; 112325: 8b 4a 08 mov 0x8(%edx),%ecx 112328: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 11232a: 8b 0d 18 b5 12 00 mov 0x12b518,%ecx 112330: 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, 112337: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11233a: 8b 0f mov (%edi),%ecx 11233c: 8b 7d e4 mov -0x1c(%ebp),%edi 11233f: 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 ); 112341: 89 55 0c mov %edx,0xc(%ebp) 112344: 83 c0 60 add $0x60,%eax 112347: 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 ); } 11234a: 83 c4 2c add $0x2c,%esp 11234d: 5b pop %ebx 11234e: 5e pop %esi 11234f: 5f pop %edi 112350: c9 leave 112351: e9 52 fe ff ff jmp 1121a8 <_Chain_Append> return; } #endif } if ( !wait ) { 112356: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 11235a: 75 13 jne 11236f <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 11235c: ff 75 e0 pushl -0x20(%ebp) 11235f: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112360: 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 ); } 112367: 83 c4 2c add $0x2c,%esp 11236a: 5b pop %ebx 11236b: 5e pop %esi 11236c: 5f pop %edi 11236d: c9 leave 11236e: c3 ret 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; 11236f: 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; 112376: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 112379: 8b 55 dc mov -0x24(%ebp),%edx 11237c: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 11237f: 8b 55 e4 mov -0x1c(%ebp),%edx 112382: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112385: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112388: ff 75 e0 pushl -0x20(%ebp) 11238b: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 11238c: c7 45 10 74 3f 11 00 movl $0x113f74,0x10(%ebp) 112393: 8b 55 d4 mov -0x2c(%ebp),%edx 112396: 89 55 0c mov %edx,0xc(%ebp) 112399: 89 45 08 mov %eax,0x8(%ebp) } 11239c: 83 c4 2c add $0x2c,%esp 11239f: 5b pop %ebx 1123a0: 5e pop %esi 1123a1: 5f pop %edi 1123a2: 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 ); 1123a3: e9 f4 18 00 00 jmp 113c9c <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010abcd <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10abcd: 55 push %ebp 10abce: 89 e5 mov %esp,%ebp 10abd0: 53 push %ebx 10abd1: 83 ec 14 sub $0x14,%esp 10abd4: 8b 5d 08 mov 0x8(%ebp),%ebx 10abd7: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10abda: a1 64 31 12 00 mov 0x123164,%eax 10abdf: 85 c0 test %eax,%eax 10abe1: 74 19 je 10abfc <_CORE_mutex_Seize+0x2f> 10abe3: 84 d2 test %dl,%dl 10abe5: 74 15 je 10abfc <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10abe7: 83 3d e4 32 12 00 01 cmpl $0x1,0x1232e4 10abee: 76 0c jbe 10abfc <_CORE_mutex_Seize+0x2f> 10abf0: 53 push %ebx 10abf1: 6a 12 push $0x12 10abf3: 6a 00 push $0x0 10abf5: 6a 00 push $0x0 10abf7: e8 f0 05 00 00 call 10b1ec <_Internal_error_Occurred> 10abfc: 51 push %ecx 10abfd: 51 push %ecx 10abfe: 8d 45 18 lea 0x18(%ebp),%eax 10ac01: 50 push %eax 10ac02: 53 push %ebx 10ac03: 88 55 f4 mov %dl,-0xc(%ebp) 10ac06: e8 f9 3b 00 00 call 10e804 <_CORE_mutex_Seize_interrupt_trylock> 10ac0b: 83 c4 10 add $0x10,%esp 10ac0e: 85 c0 test %eax,%eax 10ac10: 8a 55 f4 mov -0xc(%ebp),%dl 10ac13: 74 48 je 10ac5d <_CORE_mutex_Seize+0x90> 10ac15: 84 d2 test %dl,%dl 10ac17: 75 12 jne 10ac2b <_CORE_mutex_Seize+0x5e> 10ac19: ff 75 18 pushl 0x18(%ebp) 10ac1c: 9d popf 10ac1d: a1 a8 33 12 00 mov 0x1233a8,%eax 10ac22: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10ac29: eb 32 jmp 10ac5d <_CORE_mutex_Seize+0x90> 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; 10ac2b: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10ac32: a1 a8 33 12 00 mov 0x1233a8,%eax 10ac37: 89 58 44 mov %ebx,0x44(%eax) 10ac3a: 8b 55 0c mov 0xc(%ebp),%edx 10ac3d: 89 50 20 mov %edx,0x20(%eax) 10ac40: a1 64 31 12 00 mov 0x123164,%eax 10ac45: 40 inc %eax 10ac46: a3 64 31 12 00 mov %eax,0x123164 10ac4b: ff 75 18 pushl 0x18(%ebp) 10ac4e: 9d popf 10ac4f: 50 push %eax 10ac50: 50 push %eax 10ac51: ff 75 14 pushl 0x14(%ebp) 10ac54: 53 push %ebx 10ac55: e8 26 ff ff ff call 10ab80 <_CORE_mutex_Seize_interrupt_blocking> 10ac5a: 83 c4 10 add $0x10,%esp } 10ac5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ac60: c9 leave 10ac61: c3 ret =============================================================================== 0010e804 <_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 ) { 10e804: 55 push %ebp 10e805: 89 e5 mov %esp,%ebp 10e807: 57 push %edi 10e808: 56 push %esi 10e809: 53 push %ebx 10e80a: 83 ec 0c sub $0xc,%esp 10e80d: 8b 55 08 mov 0x8(%ebp),%edx 10e810: 8b 5d 0c mov 0xc(%ebp),%ebx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10e813: 8b 0d a8 33 12 00 mov 0x1233a8,%ecx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10e819: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10e820: 83 7a 50 00 cmpl $0x0,0x50(%edx) 10e824: 0f 84 89 00 00 00 je 10e8b3 <_CORE_mutex_Seize_interrupt_trylock+0xaf> the_mutex->lock = CORE_MUTEX_LOCKED; 10e82a: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_mutex->holder = executing; 10e831: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = executing->Object.id; 10e834: 8b 41 08 mov 0x8(%ecx),%eax 10e837: 89 42 60 mov %eax,0x60(%edx) the_mutex->nest_count = 1; 10e83a: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10e841: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10e844: 83 f8 02 cmp $0x2,%eax 10e847: 74 05 je 10e84e <_CORE_mutex_Seize_interrupt_trylock+0x4a> 10e849: 83 f8 03 cmp $0x3,%eax 10e84c: 75 0e jne 10e85c <_CORE_mutex_Seize_interrupt_trylock+0x58> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10e84e: 8b 71 1c mov 0x1c(%ecx),%esi 10e851: 8d 7e 01 lea 0x1(%esi),%edi 10e854: 89 79 1c mov %edi,0x1c(%ecx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10e857: 83 f8 03 cmp $0x3,%eax 10e85a: 74 05 je 10e861 <_CORE_mutex_Seize_interrupt_trylock+0x5d> _ISR_Enable( *level_p ); 10e85c: ff 33 pushl (%ebx) 10e85e: 9d popf 10e85f: eb 7c jmp 10e8dd <_CORE_mutex_Seize_interrupt_trylock+0xd9> Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 10e861: 8b 42 4c mov 0x4c(%edx),%eax 10e864: 39 41 14 cmp %eax,0x14(%ecx) 10e867: 75 05 jne 10e86e <_CORE_mutex_Seize_interrupt_trylock+0x6a> _ISR_Enable( *level_p ); 10e869: ff 33 pushl (%ebx) 10e86b: 9d popf 10e86c: eb 6f jmp 10e8dd <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } if ( current > ceiling ) { 10e86e: 76 26 jbe 10e896 <_CORE_mutex_Seize_interrupt_trylock+0x92> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e870: a1 64 31 12 00 mov 0x123164,%eax 10e875: 40 inc %eax 10e876: a3 64 31 12 00 mov %eax,0x123164 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10e87b: ff 33 pushl (%ebx) 10e87d: 9d popf _Thread_Change_priority( 10e87e: 50 push %eax 10e87f: 6a 00 push $0x0 10e881: ff 72 4c pushl 0x4c(%edx) 10e884: ff 72 5c pushl 0x5c(%edx) 10e887: e8 38 d1 ff ff call 10b9c4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10e88c: e8 c5 d5 ff ff call 10be56 <_Thread_Enable_dispatch> 10e891: 83 c4 10 add $0x10,%esp 10e894: eb 47 jmp 10e8dd <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10e896: c7 41 34 06 00 00 00 movl $0x6,0x34(%ecx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10e89d: c7 42 50 01 00 00 00 movl $0x1,0x50(%edx) the_mutex->nest_count = 0; /* undo locking above */ 10e8a4: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) executing->resource_count--; /* undo locking above */ 10e8ab: 89 71 1c mov %esi,0x1c(%ecx) _ISR_Enable( *level_p ); 10e8ae: ff 33 pushl (%ebx) 10e8b0: 9d popf 10e8b1: eb 2a jmp 10e8dd <_CORE_mutex_Seize_interrupt_trylock+0xd9> /* * 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 ) ) { 10e8b3: 8b 72 5c mov 0x5c(%edx),%esi /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 10e8b6: b8 01 00 00 00 mov $0x1,%eax /* * 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 ) ) { 10e8bb: 39 ce cmp %ecx,%esi 10e8bd: 75 20 jne 10e8df <_CORE_mutex_Seize_interrupt_trylock+0xdb> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10e8bf: 8b 4a 40 mov 0x40(%edx),%ecx 10e8c2: 85 c9 test %ecx,%ecx 10e8c4: 74 05 je 10e8cb <_CORE_mutex_Seize_interrupt_trylock+0xc7> 10e8c6: 49 dec %ecx 10e8c7: 75 16 jne 10e8df <_CORE_mutex_Seize_interrupt_trylock+0xdb><== ALWAYS TAKEN 10e8c9: eb 08 jmp 10e8d3 <_CORE_mutex_Seize_interrupt_trylock+0xcf><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10e8cb: ff 42 54 incl 0x54(%edx) _ISR_Enable( *level_p ); 10e8ce: ff 33 pushl (%ebx) 10e8d0: 9d popf 10e8d1: eb 0a jmp 10e8dd <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10e8d3: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) <== NOT EXECUTED _ISR_Enable( *level_p ); 10e8da: ff 33 pushl (%ebx) <== NOT EXECUTED 10e8dc: 9d popf <== NOT EXECUTED return 0; 10e8dd: 31 c0 xor %eax,%eax 10e8df: 8d 65 f4 lea -0xc(%ebp),%esp 10e8e2: 5b pop %ebx 10e8e3: 5e pop %esi 10e8e4: 5f pop %edi 10e8e5: c9 leave 10e8e6: c3 ret =============================================================================== 0010ad88 <_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 ) { 10ad88: 55 push %ebp 10ad89: 89 e5 mov %esp,%ebp 10ad8b: 53 push %ebx 10ad8c: 83 ec 10 sub $0x10,%esp 10ad8f: 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)) ) { 10ad92: 53 push %ebx 10ad93: e8 18 14 00 00 call 10c1b0 <_Thread_queue_Dequeue> 10ad98: 89 c2 mov %eax,%edx 10ad9a: 83 c4 10 add $0x10,%esp { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10ad9d: 31 c0 xor %eax,%eax if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10ad9f: 85 d2 test %edx,%edx 10ada1: 75 15 jne 10adb8 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10ada3: 9c pushf 10ada4: fa cli 10ada5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10ada6: 8b 53 48 mov 0x48(%ebx),%edx the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10ada9: b0 04 mov $0x4,%al (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10adab: 3b 53 40 cmp 0x40(%ebx),%edx 10adae: 73 06 jae 10adb6 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10adb0: 42 inc %edx 10adb1: 89 53 48 mov %edx,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10adb4: 30 c0 xor %al,%al _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10adb6: 51 push %ecx 10adb7: 9d popf } return status; } 10adb8: 8b 5d fc mov -0x4(%ebp),%ebx 10adbb: c9 leave 10adbc: c3 ret =============================================================================== 00109c58 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109c58: 55 push %ebp 109c59: 89 e5 mov %esp,%ebp 109c5b: 57 push %edi 109c5c: 56 push %esi 109c5d: 53 push %ebx 109c5e: 83 ec 1c sub $0x1c,%esp 109c61: 8b 45 08 mov 0x8(%ebp),%eax 109c64: 8b 75 0c mov 0xc(%ebp),%esi 109c67: 8b 55 10 mov 0x10(%ebp),%edx 109c6a: 89 55 dc mov %edx,-0x24(%ebp) 109c6d: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 109c70: 8b 1d a8 33 12 00 mov 0x1233a8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 109c76: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 109c7d: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 109c83: 9c pushf 109c84: fa cli 109c85: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 109c88: 8b 17 mov (%edi),%edx 109c8a: 89 55 e4 mov %edx,-0x1c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 109c8d: 21 c2 and %eax,%edx 109c8f: 74 1b je 109cac <_Event_Seize+0x54> 109c91: 39 c2 cmp %eax,%edx 109c93: 74 08 je 109c9d <_Event_Seize+0x45> (seized_events == event_in || _Options_Is_any( option_set )) ) { 109c95: f7 c6 02 00 00 00 test $0x2,%esi 109c9b: 74 0f je 109cac <_Event_Seize+0x54> <== 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) ); 109c9d: 89 d0 mov %edx,%eax 109c9f: f7 d0 not %eax 109ca1: 23 45 e4 and -0x1c(%ebp),%eax 109ca4: 89 07 mov %eax,(%edi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109ca6: ff 75 e0 pushl -0x20(%ebp) 109ca9: 9d popf 109caa: eb 13 jmp 109cbf <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109cac: f7 c6 01 00 00 00 test $0x1,%esi 109cb2: 74 12 je 109cc6 <_Event_Seize+0x6e> _ISR_Enable( level ); 109cb4: ff 75 e0 pushl -0x20(%ebp) 109cb7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109cb8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109cbf: 89 11 mov %edx,(%ecx) return; 109cc1: e9 91 00 00 00 jmp 109d57 <_Event_Seize+0xff> * 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; 109cc6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109cc9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109ccc: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109ccf: c7 05 b8 33 12 00 01 movl $0x1,0x1233b8 109cd6: 00 00 00 _ISR_Enable( level ); 109cd9: ff 75 e0 pushl -0x20(%ebp) 109cdc: 9d popf if ( ticks ) { 109cdd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109ce1: 74 34 je 109d17 <_Event_Seize+0xbf> _Watchdog_Initialize( 109ce3: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109ce6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109ced: c7 43 64 94 9e 10 00 movl $0x109e94,0x64(%ebx) the_watchdog->id = id; 109cf4: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109cf7: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109cfe: 8b 45 dc mov -0x24(%ebp),%eax 109d01: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109d04: 52 push %edx 109d05: 52 push %edx &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 109d06: 8d 43 48 lea 0x48(%ebx),%eax 109d09: 50 push %eax 109d0a: 68 2c 32 12 00 push $0x12322c 109d0f: e8 bc 2e 00 00 call 10cbd0 <_Watchdog_Insert> 109d14: 83 c4 10 add $0x10,%esp } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109d17: 50 push %eax 109d18: 50 push %eax 109d19: 68 00 01 00 00 push $0x100 109d1e: 53 push %ebx 109d1f: e8 08 29 00 00 call 10c62c <_Thread_Set_state> _ISR_Disable( level ); 109d24: 9c pushf 109d25: fa cli 109d26: 5a pop %edx sync_state = _Event_Sync_state; 109d27: a1 b8 33 12 00 mov 0x1233b8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109d2c: c7 05 b8 33 12 00 00 movl $0x0,0x1233b8 109d33: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109d36: 83 c4 10 add $0x10,%esp 109d39: 83 f8 01 cmp $0x1,%eax 109d3c: 75 04 jne 109d42 <_Event_Seize+0xea> _ISR_Enable( level ); 109d3e: 52 push %edx 109d3f: 9d popf 109d40: eb 15 jmp 109d57 <_Event_Seize+0xff> * 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 ); 109d42: 89 55 10 mov %edx,0x10(%ebp) 109d45: 89 5d 0c mov %ebx,0xc(%ebp) 109d48: 89 45 08 mov %eax,0x8(%ebp) } 109d4b: 8d 65 f4 lea -0xc(%ebp),%esp 109d4e: 5b pop %ebx 109d4f: 5e pop %esi 109d50: 5f pop %edi 109d51: 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 ); 109d52: e9 21 1c 00 00 jmp 10b978 <_Thread_blocking_operation_Cancel> } 109d57: 8d 65 f4 lea -0xc(%ebp),%esp 109d5a: 5b pop %ebx 109d5b: 5e pop %esi 109d5c: 5f pop %edi 109d5d: c9 leave 109d5e: c3 ret =============================================================================== 00109dac <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109dac: 55 push %ebp 109dad: 89 e5 mov %esp,%ebp 109daf: 57 push %edi 109db0: 56 push %esi 109db1: 53 push %ebx 109db2: 83 ec 2c sub $0x2c,%esp 109db5: 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 ]; 109db8: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109dbe: 8b 43 30 mov 0x30(%ebx),%eax 109dc1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109dc4: 9c pushf 109dc5: fa cli 109dc6: 58 pop %eax pending_events = api->pending_events; 109dc7: 8b 17 mov (%edi),%edx 109dc9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109dcc: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109dcf: 21 f2 and %esi,%edx 109dd1: 75 07 jne 109dda <_Event_Surrender+0x2e> _ISR_Enable( level ); 109dd3: 50 push %eax 109dd4: 9d popf return; 109dd5: e9 af 00 00 00 jmp 109e89 <_Event_Surrender+0xdd> /* * 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() && 109dda: 83 3d a4 33 12 00 00 cmpl $0x0,0x1233a4 109de1: 74 49 je 109e2c <_Event_Surrender+0x80> 109de3: 3b 1d a8 33 12 00 cmp 0x1233a8,%ebx 109de9: 75 41 jne 109e2c <_Event_Surrender+0x80> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109deb: 8b 0d b8 33 12 00 mov 0x1233b8,%ecx /* * 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 ) && 109df1: 83 f9 02 cmp $0x2,%ecx 109df4: 74 09 je 109dff <_Event_Surrender+0x53> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109df6: 8b 0d b8 33 12 00 mov 0x1233b8,%ecx * 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) || 109dfc: 49 dec %ecx 109dfd: 75 2d jne 109e2c <_Event_Surrender+0x80> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109dff: 39 f2 cmp %esi,%edx 109e01: 74 06 je 109e09 <_Event_Surrender+0x5d> 109e03: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109e07: 74 1f je 109e28 <_Event_Surrender+0x7c> <== 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) ); 109e09: 89 d6 mov %edx,%esi 109e0b: f7 d6 not %esi 109e0d: 23 75 d4 and -0x2c(%ebp),%esi 109e10: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 109e12: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109e19: 8b 4b 28 mov 0x28(%ebx),%ecx 109e1c: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109e1e: c7 05 b8 33 12 00 03 movl $0x3,0x1233b8 109e25: 00 00 00 } _ISR_Enable( level ); 109e28: 50 push %eax 109e29: 9d popf return; 109e2a: eb 5d jmp 109e89 <_Event_Surrender+0xdd> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109e2c: f6 43 11 01 testb $0x1,0x11(%ebx) 109e30: 74 55 je 109e87 <_Event_Surrender+0xdb> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109e32: 39 f2 cmp %esi,%edx 109e34: 74 06 je 109e3c <_Event_Surrender+0x90> 109e36: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109e3a: 74 4b je 109e87 <_Event_Surrender+0xdb> <== NEVER TAKEN 109e3c: 89 d6 mov %edx,%esi 109e3e: f7 d6 not %esi 109e40: 23 75 d4 and -0x2c(%ebp),%esi 109e43: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 109e45: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109e4c: 8b 4b 28 mov 0x28(%ebx),%ecx 109e4f: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109e51: 50 push %eax 109e52: 9d popf 109e53: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109e54: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109e58: 74 06 je 109e60 <_Event_Surrender+0xb4> _ISR_Enable( level ); 109e5a: 50 push %eax 109e5b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109e5c: 51 push %ecx 109e5d: 51 push %ecx 109e5e: eb 17 jmp 109e77 <_Event_Surrender+0xcb> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109e60: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109e67: 50 push %eax 109e68: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109e69: 83 ec 0c sub $0xc,%esp 109e6c: 8d 43 48 lea 0x48(%ebx),%eax 109e6f: 50 push %eax 109e70: e8 73 2e 00 00 call 10cce8 <_Watchdog_Remove> 109e75: 58 pop %eax 109e76: 5a pop %edx 109e77: 68 f8 ff 03 10 push $0x1003fff8 109e7c: 53 push %ebx 109e7d: e8 62 1c 00 00 call 10bae4 <_Thread_Clear_state> 109e82: 83 c4 10 add $0x10,%esp 109e85: eb 02 jmp 109e89 <_Event_Surrender+0xdd> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109e87: 50 push %eax 109e88: 9d popf } 109e89: 8d 65 f4 lea -0xc(%ebp),%esp 109e8c: 5b pop %ebx 109e8d: 5e pop %esi 109e8e: 5f pop %edi 109e8f: c9 leave 109e90: c3 ret =============================================================================== 00109e94 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109e94: 55 push %ebp 109e95: 89 e5 mov %esp,%ebp 109e97: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109e9a: 8d 45 f4 lea -0xc(%ebp),%eax 109e9d: 50 push %eax 109e9e: ff 75 08 pushl 0x8(%ebp) 109ea1: e8 d2 1f 00 00 call 10be78 <_Thread_Get> switch ( location ) { 109ea6: 83 c4 10 add $0x10,%esp 109ea9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ead: 75 49 jne 109ef8 <_Event_Timeout+0x64> <== 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 ); 109eaf: 9c pushf 109eb0: fa cli 109eb1: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109eb2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109eb9: 3b 05 a8 33 12 00 cmp 0x1233a8,%eax 109ebf: 75 13 jne 109ed4 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109ec1: 8b 0d b8 33 12 00 mov 0x1233b8,%ecx 109ec7: 49 dec %ecx 109ec8: 75 0a jne 109ed4 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109eca: c7 05 b8 33 12 00 02 movl $0x2,0x1233b8 109ed1: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109ed4: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109edb: 52 push %edx 109edc: 9d popf 109edd: 52 push %edx 109ede: 52 push %edx 109edf: 68 f8 ff 03 10 push $0x1003fff8 109ee4: 50 push %eax 109ee5: e8 fa 1b 00 00 call 10bae4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109eea: a1 64 31 12 00 mov 0x123164,%eax 109eef: 48 dec %eax 109ef0: a3 64 31 12 00 mov %eax,0x123164 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 109ef5: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109ef8: c9 leave 109ef9: c3 ret =============================================================================== 0010e944 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10e944: 55 push %ebp 10e945: 89 e5 mov %esp,%ebp 10e947: 57 push %edi 10e948: 56 push %esi 10e949: 53 push %ebx 10e94a: 83 ec 3c sub $0x3c,%esp 10e94d: 8b 75 08 mov 0x8(%ebp),%esi 10e950: 8b 7d 0c mov 0xc(%ebp),%edi if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 10e953: 8b 4e 08 mov 0x8(%esi),%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 10e956: 8d 47 04 lea 0x4(%edi),%eax 10e959: 89 45 d0 mov %eax,-0x30(%ebp) - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10e95c: 8b 46 10 mov 0x10(%esi),%eax 10e95f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; 10e962: 31 c0 xor %eax,%eax - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10e964: 39 7d d0 cmp %edi,-0x30(%ebp) 10e967: 0f 82 22 01 00 00 jb 10ea8f <_Heap_Allocate_aligned_with_boundary+0x14b> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10e96d: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e971: 74 15 je 10e988 <_Heap_Allocate_aligned_with_boundary+0x44> if ( boundary < alloc_size ) { 10e973: 39 7d 14 cmp %edi,0x14(%ebp) 10e976: 0f 82 13 01 00 00 jb 10ea8f <_Heap_Allocate_aligned_with_boundary+0x14b> return NULL; } if ( alignment == 0 ) { 10e97c: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e980: 75 06 jne 10e988 <_Heap_Allocate_aligned_with_boundary+0x44> alignment = page_size; 10e982: 8b 45 e0 mov -0x20(%ebp),%eax 10e985: 89 45 10 mov %eax,0x10(%ebp) 10e988: 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 10e98f: 8b 45 e0 mov -0x20(%ebp),%eax 10e992: 83 c0 07 add $0x7,%eax 10e995: 89 45 c4 mov %eax,-0x3c(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 10e998: c7 45 d4 04 00 00 00 movl $0x4,-0x2c(%ebp) 10e99f: 29 7d d4 sub %edi,-0x2c(%ebp) 10e9a2: 89 75 dc mov %esi,-0x24(%ebp) 10e9a5: e9 ca 00 00 00 jmp 10ea74 <_Heap_Allocate_aligned_with_boundary+0x130> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10e9aa: 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 ) { 10e9ad: 8b 59 04 mov 0x4(%ecx),%ebx 10e9b0: 3b 5d d0 cmp -0x30(%ebp),%ebx 10e9b3: 0f 86 b8 00 00 00 jbe 10ea71 <_Heap_Allocate_aligned_with_boundary+0x12d> if ( alignment == 0 ) { 10e9b9: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e9bd: 8d 41 08 lea 0x8(%ecx),%eax 10e9c0: 89 45 d8 mov %eax,-0x28(%ebp) 10e9c3: 75 07 jne 10e9cc <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10e9c5: 89 c3 mov %eax,%ebx 10e9c7: e9 8a 00 00 00 jmp 10ea56 <_Heap_Allocate_aligned_with_boundary+0x112> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10e9cc: 8b 45 dc mov -0x24(%ebp),%eax 10e9cf: 8b 40 14 mov 0x14(%eax),%eax 10e9d2: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10e9d5: 83 e3 fe and $0xfffffffe,%ebx 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; 10e9d8: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 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; 10e9db: 8b 75 c4 mov -0x3c(%ebp),%esi 10e9de: 29 c6 sub %eax,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 10e9e0: 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; 10e9e2: 03 5d d4 add -0x2c(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10e9e5: 89 d8 mov %ebx,%eax 10e9e7: 31 d2 xor %edx,%edx 10e9e9: f7 75 10 divl 0x10(%ebp) 10e9ec: 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 ) { 10e9ee: 39 f3 cmp %esi,%ebx 10e9f0: 76 0b jbe 10e9fd <_Heap_Allocate_aligned_with_boundary+0xb9> 10e9f2: 89 f0 mov %esi,%eax 10e9f4: 31 d2 xor %edx,%edx 10e9f6: f7 75 10 divl 0x10(%ebp) 10e9f9: 89 f3 mov %esi,%ebx 10e9fb: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10e9fd: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10ea01: 74 35 je 10ea38 <_Heap_Allocate_aligned_with_boundary+0xf4> /* 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; 10ea03: 8d 34 3b lea (%ebx,%edi,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10ea06: 8b 45 d8 mov -0x28(%ebp),%eax 10ea09: 01 f8 add %edi,%eax 10ea0b: 89 45 c8 mov %eax,-0x38(%ebp) 10ea0e: eb 15 jmp 10ea25 <_Heap_Allocate_aligned_with_boundary+0xe1> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10ea10: 3b 45 c8 cmp -0x38(%ebp),%eax 10ea13: 72 5c jb 10ea71 <_Heap_Allocate_aligned_with_boundary+0x12d> return 0; } alloc_begin = boundary_line - alloc_size; 10ea15: 89 c3 mov %eax,%ebx 10ea17: 29 fb sub %edi,%ebx 10ea19: 89 d8 mov %ebx,%eax 10ea1b: 31 d2 xor %edx,%edx 10ea1d: f7 75 10 divl 0x10(%ebp) 10ea20: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10ea22: 8d 34 3b lea (%ebx,%edi,1),%esi 10ea25: 89 f0 mov %esi,%eax 10ea27: 31 d2 xor %edx,%edx 10ea29: f7 75 14 divl 0x14(%ebp) 10ea2c: 89 f0 mov %esi,%eax 10ea2e: 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 ) { 10ea30: 39 f0 cmp %esi,%eax 10ea32: 73 04 jae 10ea38 <_Heap_Allocate_aligned_with_boundary+0xf4> 10ea34: 39 c3 cmp %eax,%ebx 10ea36: 72 d8 jb 10ea10 <_Heap_Allocate_aligned_with_boundary+0xcc> 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 ) { 10ea38: 3b 5d d8 cmp -0x28(%ebp),%ebx 10ea3b: 72 34 jb 10ea71 <_Heap_Allocate_aligned_with_boundary+0x12d> 10ea3d: be f8 ff ff ff mov $0xfffffff8,%esi 10ea42: 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); 10ea44: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ea46: 89 d8 mov %ebx,%eax 10ea48: 31 d2 xor %edx,%edx 10ea4a: f7 75 e0 divl -0x20(%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; if ( free_size >= min_block_size || free_size == 0 ) { 10ea4d: 29 d6 sub %edx,%esi 10ea4f: 74 05 je 10ea56 <_Heap_Allocate_aligned_with_boundary+0x112> 10ea51: 3b 75 cc cmp -0x34(%ebp),%esi 10ea54: 72 1b jb 10ea71 <_Heap_Allocate_aligned_with_boundary+0x12d> boundary ); } } if ( alloc_begin != 0 ) { 10ea56: 85 db test %ebx,%ebx 10ea58: 74 17 je 10ea71 <_Heap_Allocate_aligned_with_boundary+0x12d><== NEVER TAKEN 10ea5a: 8b 75 dc mov -0x24(%ebp),%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10ea5d: 8b 45 e4 mov -0x1c(%ebp),%eax 10ea60: 01 46 4c add %eax,0x4c(%esi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10ea63: 57 push %edi 10ea64: 53 push %ebx 10ea65: 51 push %ecx 10ea66: 56 push %esi 10ea67: e8 a1 c6 ff ff call 10b10d <_Heap_Block_allocate> 10ea6c: 83 c4 10 add $0x10,%esp 10ea6f: eb 11 jmp 10ea82 <_Heap_Allocate_aligned_with_boundary+0x13e> if ( alloc_begin != 0 ) { break; } block = block->next; 10ea71: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10ea74: 3b 4d dc cmp -0x24(%ebp),%ecx 10ea77: 0f 85 2d ff ff ff jne 10e9aa <_Heap_Allocate_aligned_with_boundary+0x66> 10ea7d: 8b 75 dc mov -0x24(%ebp),%esi 10ea80: 31 db xor %ebx,%ebx boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 10ea82: 8b 45 e4 mov -0x1c(%ebp),%eax 10ea85: 39 46 44 cmp %eax,0x44(%esi) 10ea88: 73 03 jae 10ea8d <_Heap_Allocate_aligned_with_boundary+0x149> stats->max_search = search_count; 10ea8a: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10ea8d: 89 d8 mov %ebx,%eax } 10ea8f: 8d 65 f4 lea -0xc(%ebp),%esp 10ea92: 5b pop %ebx 10ea93: 5e pop %esi 10ea94: 5f pop %edi 10ea95: c9 leave 10ea96: c3 ret =============================================================================== 0010ee33 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 10ee33: 55 push %ebp 10ee34: 89 e5 mov %esp,%ebp 10ee36: 57 push %edi 10ee37: 56 push %esi 10ee38: 53 push %ebx 10ee39: 83 ec 4c sub $0x4c,%esp 10ee3c: 8b 5d 08 mov 0x8(%ebp),%ebx 10ee3f: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 10ee42: 8b 43 20 mov 0x20(%ebx),%eax 10ee45: 89 45 c0 mov %eax,-0x40(%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; 10ee48: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 10ee4f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 10ee56: 8b 53 10 mov 0x10(%ebx),%edx 10ee59: 89 55 c4 mov %edx,-0x3c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10ee5c: 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; 10ee5f: 8b 7b 30 mov 0x30(%ebx),%edi 10ee62: 89 7d bc mov %edi,-0x44(%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 ) { return false; 10ee65: 31 f6 xor %esi,%esi uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 10ee67: 8b 7d 0c mov 0xc(%ebp),%edi 10ee6a: 01 cf add %ecx,%edi 10ee6c: 0f 82 d4 01 00 00 jb 10f046 <_Heap_Extend+0x213> <== NEVER TAKEN return false; } extend_area_ok = _Heap_Get_first_and_last_block( 10ee72: 52 push %edx 10ee73: 52 push %edx 10ee74: 8d 55 e0 lea -0x20(%ebp),%edx 10ee77: 52 push %edx 10ee78: 8d 55 e4 lea -0x1c(%ebp),%edx 10ee7b: 52 push %edx 10ee7c: 50 push %eax 10ee7d: ff 75 c4 pushl -0x3c(%ebp) 10ee80: 51 push %ecx 10ee81: ff 75 0c pushl 0xc(%ebp) 10ee84: e8 7b c3 ff ff call 10b204 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 10ee89: 83 c4 20 add $0x20,%esp 10ee8c: 84 c0 test %al,%al 10ee8e: 0f 84 b2 01 00 00 je 10f046 <_Heap_Extend+0x213> 10ee94: 8b 4d c0 mov -0x40(%ebp),%ecx 10ee97: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10ee9e: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10eea5: 31 f6 xor %esi,%esi 10eea7: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 10eeae: 8b 43 18 mov 0x18(%ebx),%eax 10eeb1: 89 5d b8 mov %ebx,-0x48(%ebp) 10eeb4: eb 02 jmp 10eeb8 <_Heap_Extend+0x85> 10eeb6: 89 c8 mov %ecx,%eax uintptr_t const sub_area_end = start_block->prev_size; 10eeb8: 8b 19 mov (%ecx),%ebx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 10eeba: 39 c7 cmp %eax,%edi 10eebc: 76 09 jbe 10eec7 <_Heap_Extend+0x94> 10eebe: 39 5d 0c cmp %ebx,0xc(%ebp) 10eec1: 0f 82 7d 01 00 00 jb 10f044 <_Heap_Extend+0x211> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10eec7: 39 c7 cmp %eax,%edi 10eec9: 74 06 je 10eed1 <_Heap_Extend+0x9e> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10eecb: 39 df cmp %ebx,%edi 10eecd: 72 07 jb 10eed6 <_Heap_Extend+0xa3> 10eecf: eb 08 jmp 10eed9 <_Heap_Extend+0xa6> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10eed1: 89 4d d0 mov %ecx,-0x30(%ebp) 10eed4: eb 03 jmp 10eed9 <_Heap_Extend+0xa6> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10eed6: 89 4d c8 mov %ecx,-0x38(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10eed9: 8d 43 f8 lea -0x8(%ebx),%eax 10eedc: 89 45 d4 mov %eax,-0x2c(%ebp) 10eedf: 89 d8 mov %ebx,%eax 10eee1: 31 d2 xor %edx,%edx 10eee3: f7 75 c4 divl -0x3c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10eee6: 29 55 d4 sub %edx,-0x2c(%ebp) link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 10eee9: 3b 5d 0c cmp 0xc(%ebp),%ebx 10eeec: 75 07 jne 10eef5 <_Heap_Extend+0xc2> start_block->prev_size = extend_area_end; 10eeee: 89 39 mov %edi,(%ecx) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10eef0: 8b 75 d4 mov -0x2c(%ebp),%esi 10eef3: eb 08 jmp 10eefd <_Heap_Extend+0xca> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 10eef5: 73 06 jae 10eefd <_Heap_Extend+0xca> 10eef7: 8b 55 d4 mov -0x2c(%ebp),%edx 10eefa: 89 55 cc mov %edx,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10eefd: 8b 45 d4 mov -0x2c(%ebp),%eax 10ef00: 8b 48 04 mov 0x4(%eax),%ecx 10ef03: 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); 10ef06: 01 c1 add %eax,%ecx link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 10ef08: 3b 4d c0 cmp -0x40(%ebp),%ecx 10ef0b: 75 a9 jne 10eeb6 <_Heap_Extend+0x83> 10ef0d: 8b 5d b8 mov -0x48(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 10ef10: 8b 55 0c mov 0xc(%ebp),%edx 10ef13: 3b 53 18 cmp 0x18(%ebx),%edx 10ef16: 73 05 jae 10ef1d <_Heap_Extend+0xea> heap->area_begin = extend_area_begin; 10ef18: 89 53 18 mov %edx,0x18(%ebx) 10ef1b: eb 08 jmp 10ef25 <_Heap_Extend+0xf2> } else if ( heap->area_end < extend_area_end ) { 10ef1d: 39 7b 1c cmp %edi,0x1c(%ebx) 10ef20: 73 03 jae 10ef25 <_Heap_Extend+0xf2> heap->area_end = extend_area_end; 10ef22: 89 7b 1c mov %edi,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 10ef25: 8b 45 e0 mov -0x20(%ebp),%eax 10ef28: 8b 55 e4 mov -0x1c(%ebp),%edx heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 10ef2b: 89 c1 mov %eax,%ecx 10ef2d: 29 d1 sub %edx,%ecx 10ef2f: 89 4d d4 mov %ecx,-0x2c(%ebp) (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 10ef32: 89 3a mov %edi,(%edx) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 10ef34: 83 c9 01 or $0x1,%ecx 10ef37: 89 4a 04 mov %ecx,0x4(%edx) extend_last_block->prev_size = extend_first_block_size; 10ef3a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10ef3d: 89 08 mov %ecx,(%eax) extend_last_block->size_and_flag = 0; 10ef3f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 10ef46: 39 53 20 cmp %edx,0x20(%ebx) 10ef49: 76 05 jbe 10ef50 <_Heap_Extend+0x11d> heap->first_block = extend_first_block; 10ef4b: 89 53 20 mov %edx,0x20(%ebx) 10ef4e: eb 08 jmp 10ef58 <_Heap_Extend+0x125> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 10ef50: 39 43 24 cmp %eax,0x24(%ebx) 10ef53: 73 03 jae 10ef58 <_Heap_Extend+0x125> heap->last_block = extend_last_block; 10ef55: 89 43 24 mov %eax,0x24(%ebx) } if ( merge_below_block != NULL ) { 10ef58: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10ef5c: 74 3b je 10ef99 <_Heap_Extend+0x166> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 10ef5e: 8b 43 10 mov 0x10(%ebx),%eax 10ef61: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10ef64: 8b 4d 0c mov 0xc(%ebp),%ecx 10ef67: 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; 10ef6a: 89 c8 mov %ecx,%eax 10ef6c: 31 d2 xor %edx,%edx 10ef6e: f7 75 d4 divl -0x2c(%ebp) if ( remainder != 0 ) { 10ef71: 85 d2 test %edx,%edx 10ef73: 74 05 je 10ef7a <_Heap_Extend+0x147> <== ALWAYS TAKEN return value - remainder + alignment; 10ef75: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED 10ef78: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 10ef7a: 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; 10ef7d: 8b 45 d0 mov -0x30(%ebp),%eax 10ef80: 8b 00 mov (%eax),%eax 10ef82: 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 = 10ef85: 8b 45 d0 mov -0x30(%ebp),%eax 10ef88: 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; 10ef8a: 83 c8 01 or $0x1,%eax 10ef8d: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 10ef90: 89 d8 mov %ebx,%eax 10ef92: e8 81 fe ff ff call 10ee18 <_Heap_Free_block> 10ef97: eb 14 jmp 10efad <_Heap_Extend+0x17a> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 10ef99: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10ef9d: 74 0e je 10efad <_Heap_Extend+0x17a> _Heap_Link_below( 10ef9f: 8b 55 e0 mov -0x20(%ebp),%edx { 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; 10efa2: 8b 45 c8 mov -0x38(%ebp),%eax 10efa5: 29 d0 sub %edx,%eax 10efa7: 83 c8 01 or $0x1,%eax 10efaa: 89 42 04 mov %eax,0x4(%edx) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 10efad: 85 f6 test %esi,%esi 10efaf: 74 30 je 10efe1 <_Heap_Extend+0x1ae> ) { 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, 10efb1: 83 ef 08 sub $0x8,%edi 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( 10efb4: 29 f7 sub %esi,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10efb6: 89 f8 mov %edi,%eax 10efb8: 31 d2 xor %edx,%edx 10efba: f7 73 10 divl 0x10(%ebx) 10efbd: 29 d7 sub %edx,%edi ); 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) 10efbf: 8b 46 04 mov 0x4(%esi),%eax 10efc2: 29 f8 sub %edi,%eax | HEAP_PREV_BLOCK_USED; 10efc4: 83 c8 01 or $0x1,%eax 10efc7: 89 44 37 04 mov %eax,0x4(%edi,%esi,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; 10efcb: 8b 46 04 mov 0x4(%esi),%eax 10efce: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 10efd1: 09 f8 or %edi,%eax 10efd3: 89 46 04 mov %eax,0x4(%esi) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 10efd6: 89 f2 mov %esi,%edx 10efd8: 89 d8 mov %ebx,%eax 10efda: e8 39 fe ff ff call 10ee18 <_Heap_Free_block> 10efdf: eb 21 jmp 10f002 <_Heap_Extend+0x1cf> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 10efe1: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10efe5: 74 1b je 10f002 <_Heap_Extend+0x1cf> _Heap_Link_above( 10efe7: 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 ); 10efea: 8b 45 e4 mov -0x1c(%ebp),%eax 10efed: 2b 45 cc sub -0x34(%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; 10eff0: 8b 7d cc mov -0x34(%ebp),%edi 10eff3: 8b 57 04 mov 0x4(%edi),%edx 10eff6: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 10eff9: 09 d0 or %edx,%eax 10effb: 89 47 04 mov %eax,0x4(%edi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10effe: 83 49 04 01 orl $0x1,0x4(%ecx) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 10f002: 85 f6 test %esi,%esi 10f004: 75 10 jne 10f016 <_Heap_Extend+0x1e3> 10f006: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10f00a: 75 0a jne 10f016 <_Heap_Extend+0x1e3> _Heap_Free_block( heap, extend_first_block ); 10f00c: 8b 55 e4 mov -0x1c(%ebp),%edx 10f00f: 89 d8 mov %ebx,%eax 10f011: e8 02 fe ff ff call 10ee18 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 10f016: 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( 10f019: 8b 43 20 mov 0x20(%ebx),%eax 10f01c: 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; 10f01e: 8b 4a 04 mov 0x4(%edx),%ecx 10f021: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 10f024: 09 c8 or %ecx,%eax 10f026: 89 42 04 mov %eax,0x4(%edx) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 10f029: 8b 43 30 mov 0x30(%ebx),%eax 10f02c: 2b 45 bc sub -0x44(%ebp),%eax /* Statistics */ stats->size += extended_size; 10f02f: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 10f032: be 01 00 00 00 mov $0x1,%esi extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) 10f037: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f03b: 74 09 je 10f046 <_Heap_Extend+0x213> <== NEVER TAKEN *extended_size_ptr = extended_size; 10f03d: 8b 55 14 mov 0x14(%ebp),%edx 10f040: 89 02 mov %eax,(%edx) 10f042: eb 02 jmp 10f046 <_Heap_Extend+0x213> _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; 10f044: 31 f6 xor %esi,%esi if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 10f046: 89 f0 mov %esi,%eax 10f048: 8d 65 f4 lea -0xc(%ebp),%esp 10f04b: 5b pop %ebx 10f04c: 5e pop %esi 10f04d: 5f pop %edi 10f04e: c9 leave 10f04f: c3 ret =============================================================================== 0010ea98 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10ea98: 55 push %ebp 10ea99: 89 e5 mov %esp,%ebp 10ea9b: 57 push %edi 10ea9c: 56 push %esi 10ea9d: 53 push %ebx 10ea9e: 83 ec 14 sub $0x14,%esp 10eaa1: 8b 4d 08 mov 0x8(%ebp),%ecx 10eaa4: 8b 45 0c mov 0xc(%ebp),%eax 10eaa7: 8d 58 f8 lea -0x8(%eax),%ebx 10eaaa: 31 d2 xor %edx,%edx 10eaac: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10eaaf: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10eab1: 8b 41 20 mov 0x20(%ecx),%eax 10eab4: 89 45 ec mov %eax,-0x14(%ebp) && (uintptr_t) block <= (uintptr_t) heap->last_block; 10eab7: 31 d2 xor %edx,%edx 10eab9: 39 c3 cmp %eax,%ebx 10eabb: 72 08 jb 10eac5 <_Heap_Free+0x2d> 10eabd: 31 d2 xor %edx,%edx 10eabf: 39 59 24 cmp %ebx,0x24(%ecx) 10eac2: 0f 93 c2 setae %dl uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10eac5: 31 c0 xor %eax,%eax Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10eac7: 85 d2 test %edx,%edx 10eac9: 0f 84 21 01 00 00 je 10ebf0 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10eacf: 8b 43 04 mov 0x4(%ebx),%eax 10ead2: 89 45 f0 mov %eax,-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; 10ead5: 89 c6 mov %eax,%esi 10ead7: 83 e6 fe and $0xfffffffe,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10eada: 8d 14 33 lea (%ebx,%esi,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; 10eadd: 31 ff xor %edi,%edi 10eadf: 3b 55 ec cmp -0x14(%ebp),%edx 10eae2: 72 0a jb 10eaee <_Heap_Free+0x56> <== NEVER TAKEN 10eae4: 31 c0 xor %eax,%eax 10eae6: 39 51 24 cmp %edx,0x24(%ecx) 10eae9: 0f 93 c0 setae %al 10eaec: 89 c7 mov %eax,%edi block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; 10eaee: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10eaf0: 85 ff test %edi,%edi 10eaf2: 0f 84 f8 00 00 00 je 10ebf0 <_Heap_Free+0x158> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10eaf8: 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 ) ) { 10eafb: f7 c7 01 00 00 00 test $0x1,%edi 10eb01: 0f 84 e9 00 00 00 je 10ebf0 <_Heap_Free+0x158> <== 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; 10eb07: 83 e7 fe and $0xfffffffe,%edi 10eb0a: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10eb0d: 8b 41 24 mov 0x24(%ecx),%eax 10eb10: 89 45 e4 mov %eax,-0x1c(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10eb13: 31 c0 xor %eax,%eax 10eb15: 3b 55 e4 cmp -0x1c(%ebp),%edx 10eb18: 74 0a je 10eb24 <_Heap_Free+0x8c> 10eb1a: 31 c0 xor %eax,%eax 10eb1c: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 10eb21: 0f 94 c0 sete %al _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10eb24: 88 45 e3 mov %al,-0x1d(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10eb27: f6 45 f0 01 testb $0x1,-0x10(%ebp) 10eb2b: 75 62 jne 10eb8f <_Heap_Free+0xf7> uintptr_t const prev_size = block->prev_size; 10eb2d: 8b 03 mov (%ebx),%eax 10eb2f: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10eb32: 29 c3 sub %eax,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10eb34: 31 ff xor %edi,%edi 10eb36: 3b 5d ec cmp -0x14(%ebp),%ebx 10eb39: 72 0a jb 10eb45 <_Heap_Free+0xad> <== NEVER TAKEN 10eb3b: 31 c0 xor %eax,%eax 10eb3d: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10eb40: 0f 93 c0 setae %al 10eb43: 89 c7 mov %eax,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); 10eb45: 31 c0 xor %eax,%eax if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10eb47: 85 ff test %edi,%edi 10eb49: 0f 84 a1 00 00 00 je 10ebf0 <_Heap_Free+0x158> <== 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) ) { 10eb4f: f6 43 04 01 testb $0x1,0x4(%ebx) 10eb53: 0f 84 97 00 00 00 je 10ebf0 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10eb59: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10eb5d: 74 1a je 10eb79 <_Heap_Free+0xe1> uintptr_t const size = block_size + prev_size + next_block_size; 10eb5f: 8b 45 e8 mov -0x18(%ebp),%eax 10eb62: 8d 04 06 lea (%esi,%eax,1),%eax 10eb65: 03 45 f0 add -0x10(%ebp),%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10eb68: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = block->prev; 10eb6b: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 10eb6e: 89 7a 08 mov %edi,0x8(%edx) next->prev = prev; 10eb71: 89 57 0c mov %edx,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10eb74: ff 49 38 decl 0x38(%ecx) 10eb77: eb 33 jmp 10ebac <_Heap_Free+0x114> 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; 10eb79: 8b 45 f0 mov -0x10(%ebp),%eax 10eb7c: 8d 04 06 lea (%esi,%eax,1),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10eb7f: 89 c7 mov %eax,%edi 10eb81: 83 cf 01 or $0x1,%edi 10eb84: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10eb87: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 10eb8b: 89 02 mov %eax,(%edx) 10eb8d: eb 56 jmp 10ebe5 <_Heap_Free+0x14d> } } else if ( next_is_free ) { /* coalesce next */ 10eb8f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10eb93: 74 24 je 10ebb9 <_Heap_Free+0x121> uintptr_t const size = block_size + next_block_size; 10eb95: 8b 45 e8 mov -0x18(%ebp),%eax 10eb98: 01 f0 add %esi,%eax RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10eb9a: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = old_block->prev; 10eb9d: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10eba0: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10eba3: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 10eba6: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10eba9: 89 5a 08 mov %ebx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10ebac: 89 c2 mov %eax,%edx 10ebae: 83 ca 01 or $0x1,%edx 10ebb1: 89 53 04 mov %edx,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10ebb4: 89 04 03 mov %eax,(%ebx,%eax,1) 10ebb7: eb 2c jmp 10ebe5 <_Heap_Free+0x14d> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ebb9: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 10ebbc: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 10ebbf: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10ebc2: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10ebc5: 89 58 0c mov %ebx,0xc(%eax) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ebc8: 89 f0 mov %esi,%eax 10ebca: 83 c8 01 or $0x1,%eax 10ebcd: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ebd0: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 10ebd4: 89 32 mov %esi,(%edx) /* Statistics */ ++stats->free_blocks; 10ebd6: 8b 41 38 mov 0x38(%ecx),%eax 10ebd9: 40 inc %eax 10ebda: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 10ebdd: 39 41 3c cmp %eax,0x3c(%ecx) 10ebe0: 73 03 jae 10ebe5 <_Heap_Free+0x14d> stats->max_free_blocks = stats->free_blocks; 10ebe2: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10ebe5: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10ebe8: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10ebeb: 01 71 30 add %esi,0x30(%ecx) return( true ); 10ebee: b0 01 mov $0x1,%al } 10ebf0: 83 c4 14 add $0x14,%esp 10ebf3: 5b pop %ebx 10ebf4: 5e pop %esi 10ebf5: 5f pop %edi 10ebf6: c9 leave 10ebf7: c3 ret =============================================================================== 0011bfbc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11bfbc: 55 push %ebp 11bfbd: 89 e5 mov %esp,%ebp 11bfbf: 57 push %edi 11bfc0: 56 push %esi 11bfc1: 53 push %ebx 11bfc2: 8b 5d 08 mov 0x8(%ebp),%ebx 11bfc5: 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); 11bfc8: 8d 4e f8 lea -0x8(%esi),%ecx 11bfcb: 89 f0 mov %esi,%eax 11bfcd: 31 d2 xor %edx,%edx 11bfcf: 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); 11bfd2: 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 11bfd4: 8b 53 20 mov 0x20(%ebx),%edx && (uintptr_t) block <= (uintptr_t) heap->last_block; 11bfd7: 31 ff xor %edi,%edi 11bfd9: 39 d1 cmp %edx,%ecx 11bfdb: 72 0a jb 11bfe7 <_Heap_Size_of_alloc_area+0x2b> 11bfdd: 31 c0 xor %eax,%eax 11bfdf: 39 4b 24 cmp %ecx,0x24(%ebx) 11bfe2: 0f 93 c0 setae %al 11bfe5: 89 c7 mov %eax,%edi Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 11bfe7: 31 c0 xor %eax,%eax uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11bfe9: 85 ff test %edi,%edi 11bfeb: 74 30 je 11c01d <_Heap_Size_of_alloc_area+0x61> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11bfed: 8b 41 04 mov 0x4(%ecx),%eax 11bff0: 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); 11bff3: 01 c1 add %eax,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11bff5: 31 ff xor %edi,%edi 11bff7: 39 d1 cmp %edx,%ecx 11bff9: 72 0a jb 11c005 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN 11bffb: 31 c0 xor %eax,%eax 11bffd: 39 4b 24 cmp %ecx,0x24(%ebx) 11c000: 0f 93 c0 setae %al 11c003: 89 c7 mov %eax,%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11c005: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11c007: 85 ff test %edi,%edi 11c009: 74 12 je 11c01d <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11c00b: f6 41 04 01 testb $0x1,0x4(%ecx) 11c00f: 74 0c je 11c01d <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11c011: 29 f1 sub %esi,%ecx 11c013: 8d 51 04 lea 0x4(%ecx),%edx 11c016: 8b 45 10 mov 0x10(%ebp),%eax 11c019: 89 10 mov %edx,(%eax) return true; 11c01b: b0 01 mov $0x1,%al } 11c01d: 5b pop %ebx 11c01e: 5e pop %esi 11c01f: 5f pop %edi 11c020: c9 leave 11c021: c3 ret =============================================================================== 0010bbba <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bbba: 55 push %ebp 10bbbb: 89 e5 mov %esp,%ebp 10bbbd: 57 push %edi 10bbbe: 56 push %esi 10bbbf: 53 push %ebx 10bbc0: 83 ec 4c sub $0x4c,%esp 10bbc3: 8b 75 08 mov 0x8(%ebp),%esi 10bbc6: 8b 5d 0c mov 0xc(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10bbc9: 8b 46 10 mov 0x10(%esi),%eax 10bbcc: 89 45 d8 mov %eax,-0x28(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10bbcf: 8b 4e 14 mov 0x14(%esi),%ecx 10bbd2: 89 4d d4 mov %ecx,-0x2c(%ebp) Heap_Block *const first_block = heap->first_block; 10bbd5: 8b 46 20 mov 0x20(%esi),%eax 10bbd8: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_block = heap->last_block; 10bbdb: 8b 4e 24 mov 0x24(%esi),%ecx 10bbde: 89 4d c8 mov %ecx,-0x38(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10bbe1: c7 45 e4 7c bb 10 00 movl $0x10bb7c,-0x1c(%ebp) 10bbe8: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10bbec: 74 07 je 10bbf5 <_Heap_Walk+0x3b> 10bbee: c7 45 e4 81 bb 10 00 movl $0x10bb81,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 10bbf5: b0 01 mov $0x1,%al 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; if ( !_System_state_Is_up( _System_state_Get() ) ) { 10bbf7: 83 3d 6c 53 12 00 03 cmpl $0x3,0x12536c 10bbfe: 0f 85 e8 02 00 00 jne 10beec <_Heap_Walk+0x332> 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)( 10bc04: 52 push %edx 10bc05: ff 76 0c pushl 0xc(%esi) 10bc08: ff 76 08 pushl 0x8(%esi) 10bc0b: ff 75 c8 pushl -0x38(%ebp) 10bc0e: ff 75 d0 pushl -0x30(%ebp) 10bc11: ff 76 1c pushl 0x1c(%esi) 10bc14: ff 76 18 pushl 0x18(%esi) 10bc17: ff 75 d4 pushl -0x2c(%ebp) 10bc1a: ff 75 d8 pushl -0x28(%ebp) 10bc1d: 68 b1 ea 11 00 push $0x11eab1 10bc22: 6a 00 push $0x0 10bc24: 53 push %ebx 10bc25: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10bc28: 83 c4 30 add $0x30,%esp 10bc2b: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10bc2f: 75 0b jne 10bc3c <_Heap_Walk+0x82> (*printer)( source, true, "page size is zero\n" ); 10bc31: 50 push %eax 10bc32: 68 42 eb 11 00 push $0x11eb42 10bc37: e9 6b 02 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10bc3c: f6 45 d8 03 testb $0x3,-0x28(%ebp) 10bc40: 74 0d je 10bc4f <_Heap_Walk+0x95> (*printer)( 10bc42: ff 75 d8 pushl -0x28(%ebp) 10bc45: 68 55 eb 11 00 push $0x11eb55 10bc4a: e9 58 02 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bc4f: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc52: 31 d2 xor %edx,%edx 10bc54: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10bc57: 85 d2 test %edx,%edx 10bc59: 74 0d je 10bc68 <_Heap_Walk+0xae> (*printer)( 10bc5b: ff 75 d4 pushl -0x2c(%ebp) 10bc5e: 68 73 eb 11 00 push $0x11eb73 10bc63: e9 3f 02 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10bc68: 8b 45 d0 mov -0x30(%ebp),%eax 10bc6b: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bc6e: 31 d2 xor %edx,%edx 10bc70: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( 10bc73: 85 d2 test %edx,%edx 10bc75: 74 0d je 10bc84 <_Heap_Walk+0xca> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10bc77: ff 75 d0 pushl -0x30(%ebp) 10bc7a: 68 97 eb 11 00 push $0x11eb97 10bc7f: e9 23 02 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10bc84: 8b 45 d0 mov -0x30(%ebp),%eax 10bc87: f6 40 04 01 testb $0x1,0x4(%eax) 10bc8b: 75 0b jne 10bc98 <_Heap_Walk+0xde> (*printer)( 10bc8d: 57 push %edi 10bc8e: 68 c8 eb 11 00 push $0x11ebc8 10bc93: e9 0f 02 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> - 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; 10bc98: 8b 4d c8 mov -0x38(%ebp),%ecx 10bc9b: 8b 79 04 mov 0x4(%ecx),%edi 10bc9e: 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); 10bca1: 01 cf add %ecx,%edi ); return false; } if ( _Heap_Is_free( last_block ) ) { 10bca3: f6 47 04 01 testb $0x1,0x4(%edi) 10bca7: 75 0b jne 10bcb4 <_Heap_Walk+0xfa> (*printer)( 10bca9: 56 push %esi 10bcaa: 68 f6 eb 11 00 push $0x11ebf6 10bcaf: e9 f3 01 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> ); return false; } if ( 10bcb4: 3b 7d d0 cmp -0x30(%ebp),%edi 10bcb7: 74 0b je 10bcc4 <_Heap_Walk+0x10a> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10bcb9: 51 push %ecx <== NOT EXECUTED 10bcba: 68 0b ec 11 00 push $0x11ec0b <== NOT EXECUTED 10bcbf: e9 e3 01 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10bcc4: 8b 46 10 mov 0x10(%esi),%eax 10bcc7: 89 45 e0 mov %eax,-0x20(%ebp) block = next_block; } while ( block != first_block ); return true; } 10bcca: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 10bccd: 89 75 dc mov %esi,-0x24(%ebp) 10bcd0: eb 75 jmp 10bd47 <_Heap_Walk+0x18d> 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; 10bcd2: 31 c0 xor %eax,%eax 10bcd4: 39 4e 20 cmp %ecx,0x20(%esi) 10bcd7: 77 08 ja 10bce1 <_Heap_Walk+0x127> 10bcd9: 31 c0 xor %eax,%eax 10bcdb: 39 4e 24 cmp %ecx,0x24(%esi) 10bcde: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10bce1: 85 c0 test %eax,%eax 10bce3: 75 0b jne 10bcf0 <_Heap_Walk+0x136> (*printer)( 10bce5: 51 push %ecx 10bce6: 68 3a ec 11 00 push $0x11ec3a 10bceb: e9 b7 01 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10bcf0: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bcf3: 31 d2 xor %edx,%edx 10bcf5: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10bcf8: 85 d2 test %edx,%edx 10bcfa: 74 0b je 10bd07 <_Heap_Walk+0x14d> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10bcfc: 51 push %ecx 10bcfd: 68 5a ec 11 00 push $0x11ec5a 10bd02: e9 a0 01 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> - 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; 10bd07: 8b 41 04 mov 0x4(%ecx),%eax 10bd0a: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10bd0d: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10bd12: 74 0b je 10bd1f <_Heap_Walk+0x165> (*printer)( 10bd14: 51 push %ecx 10bd15: 68 8a ec 11 00 push $0x11ec8a 10bd1a: e9 88 01 00 00 jmp 10bea7 <_Heap_Walk+0x2ed> ); return false; } if ( free_block->prev != prev_block ) { 10bd1f: 8b 41 0c mov 0xc(%ecx),%eax 10bd22: 3b 45 dc cmp -0x24(%ebp),%eax 10bd25: 74 1a je 10bd41 <_Heap_Walk+0x187> (*printer)( 10bd27: 83 ec 0c sub $0xc,%esp 10bd2a: 50 push %eax 10bd2b: 51 push %ecx 10bd2c: 68 a6 ec 11 00 push $0x11eca6 10bd31: 6a 01 push $0x1 10bd33: 53 push %ebx 10bd34: ff 55 e4 call *-0x1c(%ebp) 10bd37: 83 c4 20 add $0x20,%esp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 10bd3a: 31 c0 xor %eax,%eax 10bd3c: e9 ab 01 00 00 jmp 10beec <_Heap_Walk+0x332> return false; } prev_block = free_block; free_block = free_block->next; 10bd41: 89 4d dc mov %ecx,-0x24(%ebp) 10bd44: 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 ) { 10bd47: 39 f1 cmp %esi,%ecx 10bd49: 75 87 jne 10bcd2 <_Heap_Walk+0x118> 10bd4b: 89 5d dc mov %ebx,-0x24(%ebp) 10bd4e: eb 02 jmp 10bd52 <_Heap_Walk+0x198> block->prev_size ); } block = next_block; } while ( block != first_block ); 10bd50: 89 df mov %ebx,%edi return true; } 10bd52: 8b 4f 04 mov 0x4(%edi),%ecx 10bd55: 89 4d cc mov %ecx,-0x34(%ebp) 10bd58: 83 e1 fe and $0xfffffffe,%ecx 10bd5b: 89 4d e0 mov %ecx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10bd5e: 8d 1c 0f lea (%edi,%ecx,1),%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10bd61: 31 c0 xor %eax,%eax 10bd63: 39 5e 20 cmp %ebx,0x20(%esi) 10bd66: 77 08 ja 10bd70 <_Heap_Walk+0x1b6> <== NEVER TAKEN 10bd68: 31 c0 xor %eax,%eax 10bd6a: 39 5e 24 cmp %ebx,0x24(%esi) 10bd6d: 0f 93 c0 setae %al 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bd70: 85 c0 test %eax,%eax 10bd72: 75 11 jne 10bd85 <_Heap_Walk+0x1cb> 10bd74: 89 d9 mov %ebx,%ecx 10bd76: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bd79: 83 ec 0c sub $0xc,%esp 10bd7c: 51 push %ecx 10bd7d: 57 push %edi 10bd7e: 68 d8 ec 11 00 push $0x11ecd8 10bd83: eb ac jmp 10bd31 <_Heap_Walk+0x177> 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; 10bd85: 3b 7d c8 cmp -0x38(%ebp),%edi 10bd88: 0f 95 c1 setne %cl RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bd8b: 8b 45 e0 mov -0x20(%ebp),%eax 10bd8e: 31 d2 xor %edx,%edx 10bd90: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10bd93: 85 d2 test %edx,%edx 10bd95: 74 15 je 10bdac <_Heap_Walk+0x1f2> 10bd97: 84 c9 test %cl,%cl 10bd99: 74 11 je 10bdac <_Heap_Walk+0x1f2> 10bd9b: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bd9e: 83 ec 0c sub $0xc,%esp 10bda1: ff 75 e0 pushl -0x20(%ebp) 10bda4: 57 push %edi 10bda5: 68 05 ed 11 00 push $0x11ed05 10bdaa: eb 85 jmp 10bd31 <_Heap_Walk+0x177> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10bdac: 8b 45 d4 mov -0x2c(%ebp),%eax 10bdaf: 39 45 e0 cmp %eax,-0x20(%ebp) 10bdb2: 73 18 jae 10bdcc <_Heap_Walk+0x212> 10bdb4: 84 c9 test %cl,%cl 10bdb6: 74 14 je 10bdcc <_Heap_Walk+0x212> <== NEVER TAKEN 10bdb8: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdbb: 52 push %edx 10bdbc: 52 push %edx 10bdbd: 50 push %eax 10bdbe: ff 75 e0 pushl -0x20(%ebp) 10bdc1: 57 push %edi 10bdc2: 68 33 ed 11 00 push $0x11ed33 10bdc7: e9 65 ff ff ff jmp 10bd31 <_Heap_Walk+0x177> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10bdcc: 39 fb cmp %edi,%ebx 10bdce: 77 18 ja 10bde8 <_Heap_Walk+0x22e> 10bdd0: 84 c9 test %cl,%cl 10bdd2: 74 14 je 10bde8 <_Heap_Walk+0x22e> 10bdd4: 89 d9 mov %ebx,%ecx 10bdd6: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdd9: 83 ec 0c sub $0xc,%esp 10bddc: 51 push %ecx 10bddd: 57 push %edi 10bdde: 68 5e ed 11 00 push $0x11ed5e 10bde3: e9 49 ff ff ff jmp 10bd31 <_Heap_Walk+0x177> 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; 10bde8: 8b 4d cc mov -0x34(%ebp),%ecx 10bdeb: 83 e1 01 and $0x1,%ecx 10bdee: 89 4d c4 mov %ecx,-0x3c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10bdf1: f6 43 04 01 testb $0x1,0x4(%ebx) 10bdf5: 0f 85 ba 00 00 00 jne 10beb5 <_Heap_Walk+0x2fb> block = next_block; } while ( block != first_block ); return true; } 10bdfb: 8b 46 08 mov 0x8(%esi),%eax 10bdfe: 89 45 c0 mov %eax,-0x40(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10be01: 8b 4f 08 mov 0x8(%edi),%ecx 10be04: 89 4d b4 mov %ecx,-0x4c(%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)( 10be07: ba 7e ea 11 00 mov $0x11ea7e,%edx 10be0c: 3b 4e 0c cmp 0xc(%esi),%ecx 10be0f: 74 0e je 10be1f <_Heap_Walk+0x265> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10be11: ba b5 e9 11 00 mov $0x11e9b5,%edx 10be16: 39 f1 cmp %esi,%ecx 10be18: 75 05 jne 10be1f <_Heap_Walk+0x265> 10be1a: ba 8d ea 11 00 mov $0x11ea8d,%edx 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 ? 10be1f: 8b 47 0c mov 0xc(%edi),%eax 10be22: 89 45 cc mov %eax,-0x34(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10be25: b8 97 ea 11 00 mov $0x11ea97,%eax 10be2a: 8b 4d c0 mov -0x40(%ebp),%ecx 10be2d: 39 4d cc cmp %ecx,-0x34(%ebp) 10be30: 74 0f je 10be41 <_Heap_Walk+0x287> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10be32: b8 b5 e9 11 00 mov $0x11e9b5,%eax 10be37: 39 75 cc cmp %esi,-0x34(%ebp) 10be3a: 75 05 jne 10be41 <_Heap_Walk+0x287> 10be3c: b8 a7 ea 11 00 mov $0x11eaa7,%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)( 10be41: 83 ec 0c sub $0xc,%esp 10be44: 52 push %edx 10be45: ff 75 b4 pushl -0x4c(%ebp) 10be48: 50 push %eax 10be49: ff 75 cc pushl -0x34(%ebp) 10be4c: ff 75 e0 pushl -0x20(%ebp) 10be4f: 57 push %edi 10be50: 68 92 ed 11 00 push $0x11ed92 10be55: 6a 00 push $0x0 10be57: ff 75 dc pushl -0x24(%ebp) 10be5a: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10be5d: 8b 03 mov (%ebx),%eax 10be5f: 83 c4 30 add $0x30,%esp 10be62: 39 45 e0 cmp %eax,-0x20(%ebp) 10be65: 74 16 je 10be7d <_Heap_Walk+0x2c3> 10be67: 89 d9 mov %ebx,%ecx 10be69: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be6c: 56 push %esi 10be6d: 51 push %ecx 10be6e: 50 push %eax 10be6f: ff 75 e0 pushl -0x20(%ebp) 10be72: 57 push %edi 10be73: 68 c7 ed 11 00 push $0x11edc7 10be78: e9 b4 fe ff ff jmp 10bd31 <_Heap_Walk+0x177> ); return false; } if ( !prev_used ) { 10be7d: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10be81: 75 0b jne 10be8e <_Heap_Walk+0x2d4> 10be83: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be86: 57 push %edi 10be87: 68 00 ee 11 00 push $0x11ee00 10be8c: eb 19 jmp 10bea7 <_Heap_Walk+0x2ed> block = next_block; } while ( block != first_block ); return true; } 10be8e: 8b 46 08 mov 0x8(%esi),%eax 10be91: eb 07 jmp 10be9a <_Heap_Walk+0x2e0> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10be93: 39 f8 cmp %edi,%eax 10be95: 74 4a je 10bee1 <_Heap_Walk+0x327> return true; } free_block = free_block->next; 10be97: 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 ) { 10be9a: 39 f0 cmp %esi,%eax 10be9c: 75 f5 jne 10be93 <_Heap_Walk+0x2d9> 10be9e: 8b 5d dc mov -0x24(%ebp),%ebx return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bea1: 57 push %edi 10bea2: 68 6b ee 11 00 push $0x11ee6b 10bea7: 6a 01 push $0x1 10bea9: 53 push %ebx 10beaa: ff 55 e4 call *-0x1c(%ebp) 10bead: 83 c4 10 add $0x10,%esp 10beb0: e9 85 fe ff ff jmp 10bd3a <_Heap_Walk+0x180> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10beb5: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10beb9: 74 0e je 10bec9 <_Heap_Walk+0x30f> (*printer)( 10bebb: 83 ec 0c sub $0xc,%esp 10bebe: ff 75 e0 pushl -0x20(%ebp) 10bec1: 57 push %edi 10bec2: 68 2f ee 11 00 push $0x11ee2f 10bec7: eb 0d jmp 10bed6 <_Heap_Walk+0x31c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bec9: 51 push %ecx 10beca: 51 push %ecx 10becb: ff 37 pushl (%edi) 10becd: ff 75 e0 pushl -0x20(%ebp) 10bed0: 57 push %edi 10bed1: 68 46 ee 11 00 push $0x11ee46 10bed6: 6a 00 push $0x0 10bed8: ff 75 dc pushl -0x24(%ebp) 10bedb: ff 55 e4 call *-0x1c(%ebp) 10bede: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10bee1: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bee4: 0f 85 66 fe ff ff jne 10bd50 <_Heap_Walk+0x196> return true; 10beea: b0 01 mov $0x1,%al } 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 =============================================================================== 0010b1ec <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b1ec: 55 push %ebp 10b1ed: 89 e5 mov %esp,%ebp 10b1ef: 53 push %ebx 10b1f0: 83 ec 08 sub $0x8,%esp 10b1f3: 8b 45 08 mov 0x8(%ebp),%eax 10b1f6: 8b 55 0c mov 0xc(%ebp),%edx 10b1f9: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b1fc: a3 fc 31 12 00 mov %eax,0x1231fc _Internal_errors_What_happened.is_internal = is_internal; 10b201: 88 15 00 32 12 00 mov %dl,0x123200 _Internal_errors_What_happened.the_error = the_error; 10b207: 89 1d 04 32 12 00 mov %ebx,0x123204 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b20d: 53 push %ebx 10b20e: 0f b6 d2 movzbl %dl,%edx 10b211: 52 push %edx 10b212: 50 push %eax 10b213: e8 97 18 00 00 call 10caaf <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b218: c7 05 e4 32 12 00 05 movl $0x5,0x1232e4 <== NOT EXECUTED 10b21f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b222: fa cli <== NOT EXECUTED 10b223: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b225: f4 hlt <== NOT EXECUTED 10b226: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b229: eb fe jmp 10b229 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b27c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b27c: 55 push %ebp 10b27d: 89 e5 mov %esp,%ebp 10b27f: 56 push %esi 10b280: 53 push %ebx 10b281: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) return NULL; 10b284: 31 c9 xor %ecx,%ecx * 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 ) 10b286: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b28a: 74 53 je 10b2df <_Objects_Allocate+0x63><== NEVER TAKEN /* * 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 ); 10b28c: 8d 73 20 lea 0x20(%ebx),%esi 10b28f: 83 ec 0c sub $0xc,%esp 10b292: 56 push %esi 10b293: e8 88 f7 ff ff call 10aa20 <_Chain_Get> 10b298: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b29a: 83 c4 10 add $0x10,%esp 10b29d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b2a1: 74 3c je 10b2df <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b2a3: 85 c0 test %eax,%eax 10b2a5: 75 1a jne 10b2c1 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b2a7: 83 ec 0c sub $0xc,%esp 10b2aa: 53 push %ebx 10b2ab: e8 60 00 00 00 call 10b310 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b2b0: 89 34 24 mov %esi,(%esp) 10b2b3: e8 68 f7 ff ff call 10aa20 <_Chain_Get> 10b2b8: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b2ba: 83 c4 10 add $0x10,%esp 10b2bd: 85 c0 test %eax,%eax 10b2bf: 74 1e je 10b2df <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b2c1: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b2c5: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b2c9: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10b2cb: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b2cf: 31 d2 xor %edx,%edx 10b2d1: f7 f6 div %esi information->inactive_per_block[ block ]--; 10b2d3: c1 e0 02 shl $0x2,%eax 10b2d6: 03 43 30 add 0x30(%ebx),%eax 10b2d9: ff 08 decl (%eax) information->inactive--; 10b2db: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10b2df: 89 c8 mov %ecx,%eax 10b2e1: 8d 65 f8 lea -0x8(%ebp),%esp 10b2e4: 5b pop %ebx 10b2e5: 5e pop %esi 10b2e6: c9 leave 10b2e7: c3 ret =============================================================================== 0010b604 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b604: 55 push %ebp 10b605: 89 e5 mov %esp,%ebp 10b607: 57 push %edi 10b608: 56 push %esi 10b609: 53 push %ebx 10b60a: 83 ec 0c sub $0xc,%esp 10b60d: 8b 7d 08 mov 0x8(%ebp),%edi 10b610: 8b 75 0c mov 0xc(%ebp),%esi Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 10b613: 31 db xor %ebx,%ebx ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b615: 85 f6 test %esi,%esi 10b617: 74 34 je 10b64d <_Objects_Get_information+0x49> /* * 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 ); 10b619: 83 ec 0c sub $0xc,%esp 10b61c: 57 push %edi 10b61d: e8 d6 35 00 00 call 10ebf8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b622: 83 c4 10 add $0x10,%esp 10b625: 85 c0 test %eax,%eax 10b627: 74 24 je 10b64d <_Objects_Get_information+0x49> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b629: 39 c6 cmp %eax,%esi 10b62b: 77 20 ja 10b64d <_Objects_Get_information+0x49> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b62d: 8b 04 bd 3c 31 12 00 mov 0x12313c(,%edi,4),%eax 10b634: 85 c0 test %eax,%eax 10b636: 74 15 je 10b64d <_Objects_Get_information+0x49><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b638: 8b 1c b0 mov (%eax,%esi,4),%ebx if ( !info ) 10b63b: 85 db test %ebx,%ebx 10b63d: 74 0e je 10b64d <_Objects_Get_information+0x49><== 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; 10b63f: 31 c0 xor %eax,%eax 10b641: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx) 10b646: 0f 95 c0 setne %al 10b649: f7 d8 neg %eax 10b64b: 21 c3 and %eax,%ebx #endif return info; } 10b64d: 89 d8 mov %ebx,%eax 10b64f: 8d 65 f4 lea -0xc(%ebp),%esp 10b652: 5b pop %ebx 10b653: 5e pop %esi 10b654: 5f pop %edi 10b655: c9 leave 10b656: c3 ret =============================================================================== 00118a9c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118a9c: 55 push %ebp 118a9d: 89 e5 mov %esp,%ebp 118a9f: 53 push %ebx 118aa0: 8b 55 08 mov 0x8(%ebp),%edx 118aa3: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 118aa6: b8 01 00 00 00 mov $0x1,%eax 118aab: 2b 42 08 sub 0x8(%edx),%eax 118aae: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118ab1: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118ab5: 39 c3 cmp %eax,%ebx 118ab7: 72 12 jb 118acb <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118ab9: 8b 52 1c mov 0x1c(%edx),%edx 118abc: 8b 04 82 mov (%edx,%eax,4),%eax 118abf: 85 c0 test %eax,%eax 118ac1: 74 08 je 118acb <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118ac3: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118ac9: eb 08 jmp 118ad3 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118acb: c7 01 01 00 00 00 movl $0x1,(%ecx) return NULL; 118ad1: 31 c0 xor %eax,%eax } 118ad3: 5b pop %ebx 118ad4: c9 leave 118ad5: c3 ret =============================================================================== 0010c814 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10c814: 55 push %ebp 10c815: 89 e5 mov %esp,%ebp 10c817: 53 push %ebx 10c818: 83 ec 14 sub $0x14,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c81b: 8b 45 08 mov 0x8(%ebp),%eax 10c81e: 85 c0 test %eax,%eax 10c820: 75 08 jne 10c82a <_Objects_Id_to_name+0x16> 10c822: a1 34 66 12 00 mov 0x126634,%eax 10c827: 8b 40 08 mov 0x8(%eax),%eax 10c82a: 89 c2 mov %eax,%edx 10c82c: c1 ea 18 shr $0x18,%edx 10c82f: 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 ) 10c832: 8d 4a ff lea -0x1(%edx),%ecx the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 10c835: bb 03 00 00 00 mov $0x3,%ebx 10c83a: 83 f9 02 cmp $0x2,%ecx 10c83d: 77 30 ja 10c86f <_Objects_Id_to_name+0x5b> 10c83f: eb 35 jmp 10c876 <_Objects_Id_to_name+0x62> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10c841: 89 c1 mov %eax,%ecx 10c843: c1 e9 1b shr $0x1b,%ecx if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10c846: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10c849: 85 d2 test %edx,%edx 10c84b: 74 22 je 10c86f <_Objects_Id_to_name+0x5b><== 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 ); 10c84d: 51 push %ecx 10c84e: 8d 4d f4 lea -0xc(%ebp),%ecx 10c851: 51 push %ecx 10c852: 50 push %eax 10c853: 52 push %edx 10c854: e8 63 ff ff ff call 10c7bc <_Objects_Get> if ( !the_object ) 10c859: 83 c4 10 add $0x10,%esp 10c85c: 85 c0 test %eax,%eax 10c85e: 74 0f je 10c86f <_Objects_Id_to_name+0x5b> return OBJECTS_INVALID_ID; *name = the_object->name; 10c860: 8b 50 0c mov 0xc(%eax),%edx 10c863: 8b 45 0c mov 0xc(%ebp),%eax 10c866: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c868: e8 6d 07 00 00 call 10cfda <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c86d: 31 db xor %ebx,%ebx } 10c86f: 89 d8 mov %ebx,%eax 10c871: 8b 5d fc mov -0x4(%ebp),%ebx 10c874: c9 leave 10c875: 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 ] ) 10c876: 8b 14 95 c8 63 12 00 mov 0x1263c8(,%edx,4),%edx 10c87d: 85 d2 test %edx,%edx 10c87f: 75 c0 jne 10c841 <_Objects_Id_to_name+0x2d><== ALWAYS TAKEN 10c881: eb ec jmp 10c86f <_Objects_Id_to_name+0x5b><== NOT EXECUTED =============================================================================== 0010b700 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b700: 55 push %ebp 10b701: 89 e5 mov %esp,%ebp 10b703: 57 push %edi 10b704: 56 push %esi 10b705: 53 push %ebx 10b706: 83 ec 0c sub $0xc,%esp 10b709: 8b 45 08 mov 0x8(%ebp),%eax 10b70c: 8b 75 0c mov 0xc(%ebp),%esi 10b70f: 8b 5d 10 mov 0x10(%ebp),%ebx 10b712: 8b 4d 14 mov 0x14(%ebp),%ecx 10b715: 8b 7d 20 mov 0x20(%ebp),%edi 10b718: 0f b7 55 18 movzwl 0x18(%ebp),%edx uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10b71c: 89 30 mov %esi,(%eax) information->the_class = the_class; 10b71e: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10b722: 89 50 18 mov %edx,0x18(%eax) information->local_table = 0; 10b725: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b72c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b733: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b73a: 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; 10b740: 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; 10b746: 8b 14 b5 3c 31 12 00 mov 0x12313c(,%esi,4),%edx 10b74d: 89 04 9a mov %eax,(%edx,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10b750: 89 ca mov %ecx,%edx 10b752: c1 ea 1f shr $0x1f,%edx _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10b755: 88 50 12 mov %dl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b758: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b75e: 85 d2 test %edx,%edx 10b760: 74 10 je 10b772 <_Objects_Initialize_information+0x72> 10b762: 85 c9 test %ecx,%ecx 10b764: 75 0c jne 10b772 <_Objects_Initialize_information+0x72> _Internal_error_Occurred( 10b766: 50 push %eax 10b767: 6a 13 push $0x13 10b769: 6a 01 push $0x1 10b76b: 6a 00 push $0x0 10b76d: e8 7a fa ff ff call 10b1ec <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b772: 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; 10b776: c7 40 1c 1c 2e 12 00 movl $0x122e1c,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10b77d: 89 f2 mov %esi,%edx 10b77f: c1 e2 18 shl $0x18,%edx 10b782: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10b788: c1 e3 1b shl $0x1b,%ebx 10b78b: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10b78d: 31 db xor %ebx,%ebx 10b78f: 85 c9 test %ecx,%ecx 10b791: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10b794: 09 da or %ebx,%edx 10b796: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b799: 89 fa mov %edi,%edx 10b79b: f6 c2 03 test $0x3,%dl 10b79e: 74 06 je 10b7a6 <_Objects_Initialize_information+0xa6><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b7a0: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10b7a3: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b7a6: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10b7aa: 8d 50 24 lea 0x24(%eax),%edx 10b7ad: 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; 10b7b0: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10b7b7: 8d 50 20 lea 0x20(%eax),%edx 10b7ba: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b7bd: 85 c9 test %ecx,%ecx 10b7bf: 74 0f je 10b7d0 <_Objects_Initialize_information+0xd0> /* * 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 ); 10b7c1: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b7c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7c7: 5b pop %ebx 10b7c8: 5e pop %esi 10b7c9: 5f pop %edi 10b7ca: 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 ); 10b7cb: e9 40 fb ff ff jmp 10b310 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b7d0: 8d 65 f4 lea -0xc(%ebp),%esp 10b7d3: 5b pop %ebx 10b7d4: 5e pop %esi 10b7d5: 5f pop %edi 10b7d6: c9 leave 10b7d7: c3 ret =============================================================================== 0010e6d8 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10e6d8: 55 push %ebp 10e6d9: 89 e5 mov %esp,%ebp 10e6db: 56 push %esi 10e6dc: 53 push %ebx 10e6dd: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10e6e0: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10e6e3: 8b 15 a8 33 12 00 mov 0x1233a8,%edx 10e6e9: 39 55 08 cmp %edx,0x8(%ebp) 10e6ec: 75 0c jne 10e6fa <_RTEMS_Tasks_Invoke_task_variable_dtor+0x22><== NEVER TAKEN value = *tvp->ptr; 10e6ee: 8b 4b 04 mov 0x4(%ebx),%ecx 10e6f1: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10e6f3: 8b 73 08 mov 0x8(%ebx),%esi 10e6f6: 89 31 mov %esi,(%ecx) 10e6f8: eb 03 jmp 10e6fd <_RTEMS_Tasks_Invoke_task_variable_dtor+0x25> } else { value = tvp->tval; 10e6fa: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10e6fd: 85 c0 test %eax,%eax 10e6ff: 74 09 je 10e70a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x32> (*dtor)(value); 10e701: 83 ec 0c sub $0xc,%esp 10e704: 52 push %edx 10e705: ff d0 call *%eax 10e707: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10e70a: 89 5d 08 mov %ebx,0x8(%ebp) } 10e70d: 8d 65 f8 lea -0x8(%ebp),%esp 10e710: 5b pop %ebx 10e711: 5e pop %esi 10e712: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10e713: e9 03 e7 ff ff jmp 10ce1b <_Workspace_Free> =============================================================================== 0010e505 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e505: 55 push %ebp 10e506: 89 e5 mov %esp,%ebp 10e508: 57 push %edi 10e509: 56 push %esi 10e50a: 53 push %ebx 10e50b: 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 ]; 10e50e: 8b 45 08 mov 0x8(%ebp),%eax 10e511: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10e517: 85 db test %ebx,%ebx 10e519: 74 45 je 10e560 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e51b: 9c pushf 10e51c: fa cli 10e51d: 58 pop %eax signal_set = asr->signals_posted; 10e51e: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e521: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e528: 50 push %eax 10e529: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e52a: 85 ff test %edi,%edi 10e52c: 74 32 je 10e560 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e52e: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e531: 50 push %eax 10e532: 8d 75 e4 lea -0x1c(%ebp),%esi 10e535: 56 push %esi 10e536: 68 ff ff 00 00 push $0xffff 10e53b: ff 73 10 pushl 0x10(%ebx) 10e53e: e8 09 1a 00 00 call 10ff4c (*asr->handler)( signal_set ); 10e543: 89 3c 24 mov %edi,(%esp) 10e546: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e549: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e54c: 83 c4 0c add $0xc,%esp 10e54f: 56 push %esi 10e550: 68 ff ff 00 00 push $0xffff 10e555: ff 75 e4 pushl -0x1c(%ebp) 10e558: e8 ef 19 00 00 call 10ff4c 10e55d: 83 c4 10 add $0x10,%esp } 10e560: 8d 65 f4 lea -0xc(%ebp),%esp 10e563: 5b pop %ebx 10e564: 5e pop %esi 10e565: 5f pop %edi 10e566: c9 leave 10e567: c3 ret =============================================================================== 0010b410 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b410: 55 push %ebp 10b411: 89 e5 mov %esp,%ebp 10b413: 53 push %ebx 10b414: 83 ec 18 sub $0x18,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 10b417: 8d 45 f4 lea -0xc(%ebp),%eax 10b41a: 50 push %eax 10b41b: ff 75 08 pushl 0x8(%ebp) 10b41e: 68 54 69 12 00 push $0x126954 10b423: e8 fc 19 00 00 call 10ce24 <_Objects_Get> 10b428: 89 c3 mov %eax,%ebx switch ( location ) { 10b42a: 83 c4 10 add $0x10,%esp 10b42d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b431: 75 64 jne 10b497 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b433: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b436: f6 40 11 40 testb $0x40,0x11(%eax) 10b43a: 74 18 je 10b454 <_Rate_monotonic_Timeout+0x44> 10b43c: 8b 53 08 mov 0x8(%ebx),%edx 10b43f: 39 50 20 cmp %edx,0x20(%eax) 10b442: 75 10 jne 10b454 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b444: 52 push %edx 10b445: 52 push %edx 10b446: 68 f8 ff 03 10 push $0x1003fff8 10b44b: 50 push %eax 10b44c: e8 0f 1e 00 00 call 10d260 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b451: 59 pop %ecx 10b452: eb 10 jmp 10b464 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b454: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b458: 75 2b jne 10b485 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b45a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b461: 83 ec 0c sub $0xc,%esp 10b464: 53 push %ebx 10b465: e8 e8 fa ff ff call 10af52 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b46a: 8b 43 3c mov 0x3c(%ebx),%eax 10b46d: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b470: 58 pop %eax 10b471: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10b472: 83 c3 10 add $0x10,%ebx 10b475: 53 push %ebx 10b476: 68 10 6b 12 00 push $0x126b10 10b47b: e8 60 30 00 00 call 10e4e0 <_Watchdog_Insert> 10b480: 83 c4 10 add $0x10,%esp 10b483: eb 07 jmp 10b48c <_Rate_monotonic_Timeout+0x7c> } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b485: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b48c: a1 48 6a 12 00 mov 0x126a48,%eax 10b491: 48 dec %eax 10b492: a3 48 6a 12 00 mov %eax,0x126a48 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b497: 8b 5d fc mov -0x4(%ebp),%ebx 10b49a: c9 leave 10b49b: c3 ret =============================================================================== 0010ad18 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10ad18: 55 push %ebp 10ad19: 89 e5 mov %esp,%ebp 10ad1b: 56 push %esi 10ad1c: 53 push %ebx 10ad1d: 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(); 10ad20: 8b 35 04 22 12 00 mov 0x122204,%esi (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; 10ad26: 31 db xor %ebx,%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ad28: 85 c9 test %ecx,%ecx 10ad2a: 74 57 je 10ad83 <_TOD_Validate+0x6b> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10ad2c: b8 40 42 0f 00 mov $0xf4240,%eax 10ad31: 31 d2 xor %edx,%edx 10ad33: f7 f6 div %esi rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ad35: 39 41 18 cmp %eax,0x18(%ecx) 10ad38: 73 49 jae 10ad83 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10ad3a: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10ad3e: 77 43 ja 10ad83 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10ad40: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10ad44: 77 3d ja 10ad83 <_TOD_Validate+0x6b> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10ad46: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10ad4a: 77 37 ja 10ad83 <_TOD_Validate+0x6b> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10ad4c: 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) || 10ad4f: 85 c0 test %eax,%eax 10ad51: 74 30 je 10ad83 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->month == 0) || 10ad53: 83 f8 0c cmp $0xc,%eax 10ad56: 77 2b ja 10ad83 <_TOD_Validate+0x6b> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10ad58: 8b 31 mov (%ecx),%esi (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) || 10ad5a: 81 fe c3 07 00 00 cmp $0x7c3,%esi 10ad60: 76 21 jbe 10ad83 <_TOD_Validate+0x6b> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10ad62: 8b 51 08 mov 0x8(%ecx),%edx (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) || 10ad65: 85 d2 test %edx,%edx 10ad67: 74 1a je 10ad83 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10ad69: 83 e6 03 and $0x3,%esi 10ad6c: 75 09 jne 10ad77 <_TOD_Validate+0x5f> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ad6e: 8b 04 85 a8 03 12 00 mov 0x1203a8(,%eax,4),%eax 10ad75: eb 07 jmp 10ad7e <_TOD_Validate+0x66> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ad77: 8b 04 85 74 03 12 00 mov 0x120374(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10ad7e: 39 c2 cmp %eax,%edx 10ad80: 0f 96 c3 setbe %bl if ( the_tod->day > days_in_month ) return false; return true; } 10ad83: 88 d8 mov %bl,%al 10ad85: 5b pop %ebx 10ad86: 5e pop %esi 10ad87: c9 leave 10ad88: c3 ret =============================================================================== 0010b9c4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b9c4: 55 push %ebp 10b9c5: 89 e5 mov %esp,%ebp 10b9c7: 57 push %edi 10b9c8: 56 push %esi 10b9c9: 53 push %ebx 10b9ca: 83 ec 28 sub $0x28,%esp 10b9cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b9d0: 8b 7d 0c mov 0xc(%ebp),%edi 10b9d3: 8a 45 10 mov 0x10(%ebp),%al 10b9d6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b9d9: 8b 73 10 mov 0x10(%ebx),%esi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10b9dc: 53 push %ebx 10b9dd: e8 1a 0d 00 00 call 10c6fc <_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 ) 10b9e2: 83 c4 10 add $0x10,%esp 10b9e5: 39 7b 14 cmp %edi,0x14(%ebx) 10b9e8: 74 0c je 10b9f6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b9ea: 50 push %eax 10b9eb: 50 push %eax 10b9ec: 57 push %edi 10b9ed: 53 push %ebx 10b9ee: e8 d1 0b 00 00 call 10c5c4 <_Thread_Set_priority> 10b9f3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b9f6: 9c pushf 10b9f7: fa cli 10b9f8: 59 pop %ecx /* * 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; 10b9f9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b9fc: 83 f8 04 cmp $0x4,%eax 10b9ff: 74 2f je 10ba30 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10ba01: 83 e6 04 and $0x4,%esi 10ba04: 75 08 jne 10ba0e <_Thread_Change_priority+0x4a><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10ba06: 89 c2 mov %eax,%edx 10ba08: 83 e2 fb and $0xfffffffb,%edx 10ba0b: 89 53 10 mov %edx,0x10(%ebx) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10ba0e: 51 push %ecx 10ba0f: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10ba10: a9 e0 be 03 00 test $0x3bee0,%eax 10ba15: 0f 84 c0 00 00 00 je 10badb <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10ba1b: 89 5d 0c mov %ebx,0xc(%ebp) 10ba1e: 8b 43 44 mov 0x44(%ebx),%eax 10ba21: 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 ); } 10ba24: 8d 65 f4 lea -0xc(%ebp),%esp 10ba27: 5b pop %ebx 10ba28: 5e pop %esi 10ba29: 5f pop %edi 10ba2a: 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 ); 10ba2b: e9 0c 0b 00 00 jmp 10c53c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10ba30: 83 e6 04 and $0x4,%esi 10ba33: 75 53 jne 10ba88 <_Thread_Change_priority+0xc4><== 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 ); 10ba35: 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; 10ba3c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10ba42: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10ba49: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10ba4c: 66 a1 08 32 12 00 mov 0x123208,%ax 10ba52: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10ba58: 66 a3 08 32 12 00 mov %ax,0x123208 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10ba5e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10ba62: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10ba68: 74 0e je 10ba78 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ba6a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10ba6d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10ba6f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10ba71: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10ba73: 89 5a 04 mov %ebx,0x4(%edx) 10ba76: eb 10 jmp 10ba88 <_Thread_Change_priority+0xc4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ba78: 8d 50 04 lea 0x4(%eax),%edx 10ba7b: 89 13 mov %edx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10ba7d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10ba80: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10ba83: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10ba85: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10ba88: 51 push %ecx 10ba89: 9d popf 10ba8a: 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 ); 10ba8b: 66 8b 1d 08 32 12 00 mov 0x123208,%bx 10ba92: 31 c0 xor %eax,%eax 10ba94: 89 c2 mov %eax,%edx 10ba96: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10ba9a: 0f b7 d2 movzwl %dx,%edx 10ba9d: 66 8b 9c 12 78 32 12 mov 0x123278(%edx,%edx,1),%bx 10baa4: 00 10baa5: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10baa9: c1 e2 04 shl $0x4,%edx 10baac: 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; 10baaf: 8d 04 02 lea (%edx,%eax,1),%eax 10bab2: 6b c0 0c imul $0xc,%eax,%eax 10bab5: 03 05 30 31 12 00 add 0x123130,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10babb: 8b 10 mov (%eax),%edx 10babd: 89 15 ac 33 12 00 mov %edx,0x1233ac * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bac3: a1 a8 33 12 00 mov 0x1233a8,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10bac8: 39 d0 cmp %edx,%eax 10baca: 74 0d je 10bad9 <_Thread_Change_priority+0x115> 10bacc: 80 78 74 00 cmpb $0x0,0x74(%eax) 10bad0: 74 07 je 10bad9 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 10bad2: c6 05 b4 33 12 00 01 movb $0x1,0x1233b4 _ISR_Enable( level ); 10bad9: 51 push %ecx 10bada: 9d popf } 10badb: 8d 65 f4 lea -0xc(%ebp),%esp 10bade: 5b pop %ebx 10badf: 5e pop %esi 10bae0: 5f pop %edi 10bae1: c9 leave 10bae2: c3 ret =============================================================================== 0010bae4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bae4: 55 push %ebp 10bae5: 89 e5 mov %esp,%ebp 10bae7: 53 push %ebx 10bae8: 8b 45 08 mov 0x8(%ebp),%eax 10baeb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10baee: 9c pushf 10baef: fa cli 10baf0: 59 pop %ecx current_state = the_thread->current_state; 10baf1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10baf4: 85 da test %ebx,%edx 10baf6: 74 71 je 10bb69 <_Thread_Clear_state+0x85> 10baf8: f7 d2 not %edx 10bafa: 21 da and %ebx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10bafc: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10baff: 85 d2 test %edx,%edx 10bb01: 75 66 jne 10bb69 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bb03: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bb09: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bb10: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bb13: 66 8b 15 08 32 12 00 mov 0x123208,%dx 10bb1a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bb20: 66 89 15 08 32 12 00 mov %dx,0x123208 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bb27: 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; 10bb2d: 8d 5a 04 lea 0x4(%edx),%ebx 10bb30: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10bb32: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bb35: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bb38: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bb3a: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bb3d: 51 push %ecx 10bb3e: 9d popf 10bb3f: 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 ) { 10bb40: 8b 50 14 mov 0x14(%eax),%edx 10bb43: 8b 1d ac 33 12 00 mov 0x1233ac,%ebx 10bb49: 3b 53 14 cmp 0x14(%ebx),%edx 10bb4c: 73 1b jae 10bb69 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bb4e: a3 ac 33 12 00 mov %eax,0x1233ac if ( _Thread_Executing->is_preemptible || 10bb53: a1 a8 33 12 00 mov 0x1233a8,%eax 10bb58: 80 78 74 00 cmpb $0x0,0x74(%eax) 10bb5c: 75 04 jne 10bb62 <_Thread_Clear_state+0x7e> 10bb5e: 85 d2 test %edx,%edx 10bb60: 75 07 jne 10bb69 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10bb62: c6 05 b4 33 12 00 01 movb $0x1,0x1233b4 } } } _ISR_Enable( level ); 10bb69: 51 push %ecx 10bb6a: 9d popf } 10bb6b: 5b pop %ebx 10bb6c: c9 leave 10bb6d: c3 ret =============================================================================== 0010bce4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10bce4: 55 push %ebp 10bce5: 89 e5 mov %esp,%ebp 10bce7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10bcea: 8d 45 f4 lea -0xc(%ebp),%eax 10bced: 50 push %eax 10bcee: ff 75 08 pushl 0x8(%ebp) 10bcf1: e8 82 01 00 00 call 10be78 <_Thread_Get> switch ( location ) { 10bcf6: 83 c4 10 add $0x10,%esp 10bcf9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bcfd: 75 1b jne 10bd1a <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10bcff: 52 push %edx 10bd00: 52 push %edx 10bd01: 68 18 00 00 10 push $0x10000018 10bd06: 50 push %eax 10bd07: e8 d8 fd ff ff call 10bae4 <_Thread_Clear_state> 10bd0c: a1 64 31 12 00 mov 0x123164,%eax 10bd11: 48 dec %eax 10bd12: a3 64 31 12 00 mov %eax,0x123164 10bd17: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10bd1a: c9 leave 10bd1b: c3 ret =============================================================================== 0010bd1c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10bd1c: 55 push %ebp 10bd1d: 89 e5 mov %esp,%ebp 10bd1f: 57 push %edi 10bd20: 56 push %esi 10bd21: 53 push %ebx 10bd22: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10bd25: 8b 1d a8 33 12 00 mov 0x1233a8,%ebx _ISR_Disable( level ); 10bd2b: 9c pushf 10bd2c: fa cli 10bd2d: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10bd2e: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10bd31: e9 f9 00 00 00 jmp 10be2f <_Thread_Dispatch+0x113> heir = _Thread_Heir; 10bd36: 8b 35 ac 33 12 00 mov 0x1233ac,%esi _Thread_Dispatch_disable_level = 1; 10bd3c: c7 05 64 31 12 00 01 movl $0x1,0x123164 10bd43: 00 00 00 _Context_Switch_necessary = false; 10bd46: c6 05 b4 33 12 00 00 movb $0x0,0x1233b4 _Thread_Executing = heir; 10bd4d: 89 35 a8 33 12 00 mov %esi,0x1233a8 /* * 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 ) 10bd53: 39 de cmp %ebx,%esi 10bd55: 0f 84 e2 00 00 00 je 10be3d <_Thread_Dispatch+0x121> */ #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 ) 10bd5b: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10bd5f: 75 09 jne 10bd6a <_Thread_Dispatch+0x4e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10bd61: 8b 15 34 31 12 00 mov 0x123134,%edx 10bd67: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10bd6a: 50 push %eax 10bd6b: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10bd6c: 83 ec 0c sub $0xc,%esp 10bd6f: 8d 45 e0 lea -0x20(%ebp),%eax 10bd72: 50 push %eax 10bd73: e8 70 2b 00 00 call 10e8e8 <_TOD_Get_uptime> _Timestamp_Subtract( 10bd78: 83 c4 0c add $0xc,%esp 10bd7b: 57 push %edi 10bd7c: 8d 45 e0 lea -0x20(%ebp),%eax 10bd7f: 50 push %eax 10bd80: 68 18 32 12 00 push $0x123218 10bd85: e8 da 0b 00 00 call 10c964 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10bd8a: 58 pop %eax 10bd8b: 5a pop %edx 10bd8c: 57 push %edi 10bd8d: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bd93: 50 push %eax 10bd94: e8 9b 0b 00 00 call 10c934 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10bd99: 8b 45 e0 mov -0x20(%ebp),%eax 10bd9c: 8b 55 e4 mov -0x1c(%ebp),%edx 10bd9f: a3 18 32 12 00 mov %eax,0x123218 10bda4: 89 15 1c 32 12 00 mov %edx,0x12321c #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10bdaa: a1 ec 31 12 00 mov 0x1231ec,%eax 10bdaf: 83 c4 10 add $0x10,%esp 10bdb2: 85 c0 test %eax,%eax 10bdb4: 74 10 je 10bdc6 <_Thread_Dispatch+0xaa> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10bdb6: 8b 10 mov (%eax),%edx 10bdb8: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10bdbe: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10bdc4: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10bdc6: 51 push %ecx 10bdc7: 51 push %ecx 10bdc8: 56 push %esi 10bdc9: 53 push %ebx 10bdca: e8 cd 0d 00 00 call 10cb9c <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10bdcf: 58 pop %eax 10bdd0: 5a pop %edx 10bdd1: 81 c6 d0 00 00 00 add $0xd0,%esi 10bdd7: 56 push %esi 10bdd8: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10bdde: 50 push %eax 10bddf: e8 7c 10 00 00 call 10ce60 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10bde4: 83 c4 10 add $0x10,%esp 10bde7: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10bdee: 74 36 je 10be26 <_Thread_Dispatch+0x10a> #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 ); 10bdf0: a1 e8 31 12 00 mov 0x1231e8,%eax 10bdf5: 39 c3 cmp %eax,%ebx 10bdf7: 74 2d je 10be26 <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10bdf9: 85 c0 test %eax,%eax 10bdfb: 74 11 je 10be0e <_Thread_Dispatch+0xf2> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10bdfd: 83 ec 0c sub $0xc,%esp 10be00: 05 e8 00 00 00 add $0xe8,%eax 10be05: 50 push %eax 10be06: e8 89 10 00 00 call 10ce94 <_CPU_Context_save_fp> 10be0b: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10be0e: 83 ec 0c sub $0xc,%esp 10be11: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10be17: 50 push %eax 10be18: e8 81 10 00 00 call 10ce9e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10be1d: 89 1d e8 31 12 00 mov %ebx,0x1231e8 10be23: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10be26: 8b 1d a8 33 12 00 mov 0x1233a8,%ebx _ISR_Disable( level ); 10be2c: 9c pushf 10be2d: fa cli 10be2e: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10be2f: 8a 15 b4 33 12 00 mov 0x1233b4,%dl 10be35: 84 d2 test %dl,%dl 10be37: 0f 85 f9 fe ff ff jne 10bd36 <_Thread_Dispatch+0x1a> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10be3d: c7 05 64 31 12 00 00 movl $0x0,0x123164 10be44: 00 00 00 _ISR_Enable( level ); 10be47: 50 push %eax 10be48: 9d popf _API_extensions_Run_postswitch(); 10be49: e8 99 ea ff ff call 10a8e7 <_API_extensions_Run_postswitch> } 10be4e: 8d 65 f4 lea -0xc(%ebp),%esp 10be51: 5b pop %ebx 10be52: 5e pop %esi 10be53: 5f pop %edi 10be54: c9 leave 10be55: c3 ret =============================================================================== 0010be78 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10be78: 55 push %ebp 10be79: 89 e5 mov %esp,%ebp 10be7b: 53 push %ebx 10be7c: 83 ec 04 sub $0x4,%esp 10be7f: 8b 55 08 mov 0x8(%ebp),%edx 10be82: 8b 45 0c mov 0xc(%ebp),%eax 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 ) ) { 10be85: 85 d2 test %edx,%edx 10be87: 75 1a jne 10bea3 <_Thread_Get+0x2b> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10be89: 8b 15 64 31 12 00 mov 0x123164,%edx 10be8f: 42 inc %edx 10be90: 89 15 64 31 12 00 mov %edx,0x123164 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10be96: c7 00 00 00 00 00 movl $0x0,(%eax) tp = _Thread_Executing; 10be9c: a1 a8 33 12 00 mov 0x1233a8,%eax goto done; 10bea1: eb 3a jmp 10bedd <_Thread_Get+0x65> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10bea3: 89 d1 mov %edx,%ecx 10bea5: c1 e9 18 shr $0x18,%ecx 10bea8: 83 e1 07 and $0x7,%ecx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10beab: 8d 59 ff lea -0x1(%ecx),%ebx 10beae: 83 fb 02 cmp $0x2,%ebx 10beb1: 76 2f jbe 10bee2 <_Thread_Get+0x6a> 10beb3: eb 12 jmp 10bec7 <_Thread_Get+0x4f> if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10beb5: 8b 0c 8d 3c 31 12 00 mov 0x12313c(,%ecx,4),%ecx if ( !api_information ) { 10bebc: 85 c9 test %ecx,%ecx 10bebe: 74 07 je 10bec7 <_Thread_Get+0x4f> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10bec0: 8b 49 04 mov 0x4(%ecx),%ecx if ( !information ) { 10bec3: 85 c9 test %ecx,%ecx 10bec5: 75 0a jne 10bed1 <_Thread_Get+0x59> *location = OBJECTS_ERROR; 10bec7: c7 00 01 00 00 00 movl $0x1,(%eax) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10becd: 31 c0 xor %eax,%eax } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; goto done; 10becf: eb 0c jmp 10bedd <_Thread_Get+0x65> } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10bed1: 53 push %ebx 10bed2: 50 push %eax 10bed3: 52 push %edx 10bed4: 51 push %ecx 10bed5: e8 ce f7 ff ff call 10b6a8 <_Objects_Get> 10beda: 83 c4 10 add $0x10,%esp done: return tp; } 10bedd: 8b 5d fc mov -0x4(%ebp),%ebx 10bee0: c9 leave 10bee1: c3 ret */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10bee2: 89 d3 mov %edx,%ebx 10bee4: 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 :) */ 10bee7: 4b dec %ebx 10bee8: 74 cb je 10beb5 <_Thread_Get+0x3d> 10beea: eb db jmp 10bec7 <_Thread_Get+0x4f> =============================================================================== 00110178 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110178: 55 push %ebp 110179: 89 e5 mov %esp,%ebp 11017b: 53 push %ebx 11017c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 11017f: 8b 1d a8 33 12 00 mov 0x1233a8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110185: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 11018b: 85 c0 test %eax,%eax 11018d: 74 03 je 110192 <_Thread_Handler+0x1a> 11018f: fa cli 110190: eb 01 jmp 110193 <_Thread_Handler+0x1b> 110192: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 110193: a0 24 2e 12 00 mov 0x122e24,%al 110198: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 11019b: c6 05 24 2e 12 00 01 movb $0x1,0x122e24 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1101a2: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 1101a9: 74 24 je 1101cf <_Thread_Handler+0x57> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 1101ab: a1 e8 31 12 00 mov 0x1231e8,%eax 1101b0: 39 c3 cmp %eax,%ebx 1101b2: 74 1b je 1101cf <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1101b4: 85 c0 test %eax,%eax 1101b6: 74 11 je 1101c9 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 1101b8: 83 ec 0c sub $0xc,%esp 1101bb: 05 e8 00 00 00 add $0xe8,%eax 1101c0: 50 push %eax 1101c1: e8 ce cc ff ff call 10ce94 <_CPU_Context_save_fp> 1101c6: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1101c9: 89 1d e8 31 12 00 mov %ebx,0x1231e8 /* * 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 ); 1101cf: 83 ec 0c sub $0xc,%esp 1101d2: 53 push %ebx 1101d3: e8 74 c8 ff ff call 10ca4c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 1101d8: e8 79 bc ff ff call 10be56 <_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) */ { 1101dd: 83 c4 10 add $0x10,%esp 1101e0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1101e4: 75 05 jne 1101eb <_Thread_Handler+0x73> INIT_NAME (); 1101e6: e8 35 c0 00 00 call 11c220 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1101eb: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1101f2: 75 15 jne 110209 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1101f4: 83 ec 0c sub $0xc,%esp 1101f7: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 1101fd: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 110203: 89 43 28 mov %eax,0x28(%ebx) 110206: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 110209: 83 ec 0c sub $0xc,%esp 11020c: 53 push %ebx 11020d: e8 6b c8 ff ff call 10ca7d <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110212: 83 c4 0c add $0xc,%esp 110215: 6a 05 push $0x5 110217: 6a 01 push $0x1 110219: 6a 00 push $0x0 11021b: e8 cc af ff ff call 10b1ec <_Internal_error_Occurred> =============================================================================== 0010beec <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10beec: 55 push %ebp 10beed: 89 e5 mov %esp,%ebp 10beef: 57 push %edi 10bef0: 56 push %esi 10bef1: 53 push %ebx 10bef2: 83 ec 24 sub $0x24,%esp 10bef5: 8b 5d 0c mov 0xc(%ebp),%ebx 10bef8: 8b 75 14 mov 0x14(%ebp),%esi 10befb: 8a 55 18 mov 0x18(%ebp),%dl 10befe: 8a 45 20 mov 0x20(%ebp),%al 10bf01: 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; 10bf04: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bf0b: 00 00 00 10bf0e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bf15: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bf18: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10bf1f: 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 ); 10bf22: 56 push %esi 10bf23: 53 push %ebx 10bf24: 88 55 e0 mov %dl,-0x20(%ebp) 10bf27: e8 44 08 00 00 call 10c770 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10bf2c: 83 c4 10 add $0x10,%esp 10bf2f: 39 f0 cmp %esi,%eax 10bf31: 8a 55 e0 mov -0x20(%ebp),%dl 10bf34: 0f 82 a1 01 00 00 jb 10c0db <_Thread_Initialize+0x1ef> 10bf3a: 85 c0 test %eax,%eax 10bf3c: 0f 84 99 01 00 00 je 10c0db <_Thread_Initialize+0x1ef><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bf42: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10bf48: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10bf4e: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10bf54: 31 ff xor %edi,%edi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bf56: 84 d2 test %dl,%dl 10bf58: 74 17 je 10bf71 <_Thread_Initialize+0x85> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bf5a: 83 ec 0c sub $0xc,%esp 10bf5d: 6a 6c push $0x6c 10bf5f: e8 9e 0e 00 00 call 10ce02 <_Workspace_Allocate> 10bf64: 89 c7 mov %eax,%edi if ( !fp_area ) 10bf66: 83 c4 10 add $0x10,%esp 10bf69: 85 c0 test %eax,%eax 10bf6b: 0f 84 fa 00 00 00 je 10c06b <_Thread_Initialize+0x17f> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bf71: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10bf77: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bf7d: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bf84: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bf8b: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bf92: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bf99: a1 f8 31 12 00 mov 0x1231f8,%eax * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10bf9e: 31 f6 xor %esi,%esi #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bfa0: 85 c0 test %eax,%eax 10bfa2: 74 1d je 10bfc1 <_Thread_Initialize+0xd5> extensions_area = _Workspace_Allocate( 10bfa4: 83 ec 0c sub $0xc,%esp 10bfa7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bfae: 50 push %eax 10bfaf: e8 4e 0e 00 00 call 10ce02 <_Workspace_Allocate> 10bfb4: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bfb6: 83 c4 10 add $0x10,%esp 10bfb9: 85 c0 test %eax,%eax 10bfbb: 0f 84 ac 00 00 00 je 10c06d <_Thread_Initialize+0x181> goto failed; } the_thread->extensions = (void **) extensions_area; 10bfc1: 89 b3 f8 00 00 00 mov %esi,0xf8(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10bfc7: 85 f6 test %esi,%esi 10bfc9: 74 16 je 10bfe1 <_Thread_Initialize+0xf5> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bfcb: 8b 15 f8 31 12 00 mov 0x1231f8,%edx 10bfd1: 31 c0 xor %eax,%eax 10bfd3: eb 08 jmp 10bfdd <_Thread_Initialize+0xf1> the_thread->extensions[i] = NULL; 10bfd5: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bfdc: 40 inc %eax 10bfdd: 39 d0 cmp %edx,%eax 10bfdf: 76 f4 jbe 10bfd5 <_Thread_Initialize+0xe9> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bfe1: 8a 45 e7 mov -0x19(%ebp),%al 10bfe4: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bfea: 8b 45 24 mov 0x24(%ebp),%eax 10bfed: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bff3: 8b 45 28 mov 0x28(%ebp),%eax 10bff6: 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; 10bffc: 8b 45 2c mov 0x2c(%ebp),%eax 10bfff: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c005: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c00c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c013: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10c01a: 8b 45 1c mov 0x1c(%ebp),%eax 10c01d: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c020: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c026: 52 push %edx 10c027: 52 push %edx 10c028: 50 push %eax 10c029: 53 push %ebx 10c02a: e8 95 05 00 00 call 10c5c4 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c02f: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c036: 00 00 00 10c039: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c040: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10c043: 8b 45 08 mov 0x8(%ebp),%eax 10c046: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c049: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c04d: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c050: 8b 45 30 mov 0x30(%ebp),%eax 10c053: 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 ); 10c056: 89 1c 24 mov %ebx,(%esp) 10c059: e8 8e 0a 00 00 call 10caec <_User_extensions_Thread_create> 10c05e: 88 c2 mov %al,%dl if ( extension_status ) 10c060: 83 c4 10 add $0x10,%esp return true; 10c063: b0 01 mov $0x1,%al * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10c065: 84 d2 test %dl,%dl 10c067: 74 04 je 10c06d <_Thread_Initialize+0x181> 10c069: eb 72 jmp 10c0dd <_Thread_Initialize+0x1f1> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10c06b: 31 f6 xor %esi,%esi extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 10c06d: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10c073: 85 c0 test %eax,%eax 10c075: 74 0c je 10c083 <_Thread_Initialize+0x197> _Workspace_Free( the_thread->libc_reent ); 10c077: 83 ec 0c sub $0xc,%esp 10c07a: 50 push %eax 10c07b: e8 9b 0d 00 00 call 10ce1b <_Workspace_Free> 10c080: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c083: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c089: 85 c0 test %eax,%eax 10c08b: 74 0c je 10c099 <_Thread_Initialize+0x1ad> _Workspace_Free( the_thread->API_Extensions[i] ); 10c08d: 83 ec 0c sub $0xc,%esp 10c090: 50 push %eax 10c091: e8 85 0d 00 00 call 10ce1b <_Workspace_Free> 10c096: 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] ) 10c099: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c09f: 85 c0 test %eax,%eax 10c0a1: 74 0c je 10c0af <_Thread_Initialize+0x1c3><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c0a3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c0a6: 50 push %eax <== NOT EXECUTED 10c0a7: e8 6f 0d 00 00 call 10ce1b <_Workspace_Free> <== NOT EXECUTED 10c0ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c0af: 85 f6 test %esi,%esi 10c0b1: 74 0c je 10c0bf <_Thread_Initialize+0x1d3> (void) _Workspace_Free( extensions_area ); 10c0b3: 83 ec 0c sub $0xc,%esp 10c0b6: 56 push %esi 10c0b7: e8 5f 0d 00 00 call 10ce1b <_Workspace_Free> 10c0bc: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c0bf: 85 ff test %edi,%edi 10c0c1: 74 0c je 10c0cf <_Thread_Initialize+0x1e3> (void) _Workspace_Free( fp_area ); 10c0c3: 83 ec 0c sub $0xc,%esp 10c0c6: 57 push %edi 10c0c7: e8 4f 0d 00 00 call 10ce1b <_Workspace_Free> 10c0cc: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c0cf: 83 ec 0c sub $0xc,%esp 10c0d2: 53 push %ebx 10c0d3: e8 e8 06 00 00 call 10c7c0 <_Thread_Stack_Free> return false; 10c0d8: 83 c4 10 add $0x10,%esp * 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 */ 10c0db: 31 c0 xor %eax,%eax _Thread_Stack_Free( the_thread ); return false; } 10c0dd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e0: 5b pop %ebx 10c0e1: 5e pop %esi 10c0e2: 5f pop %edi 10c0e3: c9 leave 10c0e4: c3 ret =============================================================================== 0010f360 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f360: 55 push %ebp 10f361: 89 e5 mov %esp,%ebp 10f363: 53 push %ebx 10f364: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f367: 9c pushf 10f368: fa cli 10f369: 59 pop %ecx current_state = the_thread->current_state; 10f36a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f36d: f6 c2 02 test $0x2,%dl 10f370: 74 70 je 10f3e2 <_Thread_Resume+0x82> <== NEVER TAKEN 10f372: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 10f375: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10f378: 85 d2 test %edx,%edx 10f37a: 75 66 jne 10f3e2 <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f37c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f382: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f389: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f38c: 66 8b 15 d8 62 12 00 mov 0x1262d8,%dx 10f393: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f399: 66 89 15 d8 62 12 00 mov %dx,0x1262d8 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f3a0: 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; 10f3a6: 8d 5a 04 lea 0x4(%edx),%ebx 10f3a9: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10f3ab: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f3ae: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f3b1: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f3b3: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f3b6: 51 push %ecx 10f3b7: 9d popf 10f3b8: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f3b9: 8b 50 14 mov 0x14(%eax),%edx 10f3bc: 8b 1d 7c 64 12 00 mov 0x12647c,%ebx 10f3c2: 3b 53 14 cmp 0x14(%ebx),%edx 10f3c5: 73 1b jae 10f3e2 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f3c7: a3 7c 64 12 00 mov %eax,0x12647c if ( _Thread_Executing->is_preemptible || 10f3cc: a1 78 64 12 00 mov 0x126478,%eax 10f3d1: 80 78 74 00 cmpb $0x0,0x74(%eax) 10f3d5: 75 04 jne 10f3db <_Thread_Resume+0x7b> 10f3d7: 85 d2 test %edx,%edx 10f3d9: 75 07 jne 10f3e2 <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f3db: c6 05 84 64 12 00 01 movb $0x1,0x126484 } } } _ISR_Enable( level ); 10f3e2: 51 push %ecx 10f3e3: 9d popf } 10f3e4: 5b pop %ebx 10f3e5: c9 leave 10f3e6: c3 ret =============================================================================== 0010c8d8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c8d8: 55 push %ebp 10c8d9: 89 e5 mov %esp,%ebp 10c8db: 57 push %edi 10c8dc: 56 push %esi 10c8dd: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c8de: a1 a8 33 12 00 mov 0x1233a8,%eax ready = executing->ready; 10c8e3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c8e9: 9c pushf 10c8ea: fa cli 10c8eb: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Has_only_one_node( const Chain_Control *the_chain ) { return (the_chain->first == the_chain->last); 10c8ec: 8b 4a 08 mov 0x8(%edx),%ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c8ef: 39 0a cmp %ecx,(%edx) 10c8f1: 74 2b je 10c91e <_Thread_Yield_processor+0x46> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c8f3: 8b 38 mov (%eax),%edi previous = the_node->previous; 10c8f5: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10c8f8: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10c8fb: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c8fd: 8d 72 04 lea 0x4(%edx),%esi 10c900: 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; 10c902: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c905: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10c907: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c90a: 53 push %ebx 10c90b: 9d popf 10c90c: fa cli if ( _Thread_Is_heir( executing ) ) 10c90d: 3b 05 ac 33 12 00 cmp 0x1233ac,%eax 10c913: 75 11 jne 10c926 <_Thread_Yield_processor+0x4e><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c915: 8b 02 mov (%edx),%eax 10c917: a3 ac 33 12 00 mov %eax,0x1233ac 10c91c: eb 08 jmp 10c926 <_Thread_Yield_processor+0x4e> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c91e: 3b 05 ac 33 12 00 cmp 0x1233ac,%eax 10c924: 74 07 je 10c92d <_Thread_Yield_processor+0x55><== ALWAYS TAKEN _Context_Switch_necessary = true; 10c926: c6 05 b4 33 12 00 01 movb $0x1,0x1233b4 _ISR_Enable( level ); 10c92d: 53 push %ebx 10c92e: 9d popf } 10c92f: 5b pop %ebx 10c930: 5e pop %esi 10c931: 5f pop %edi 10c932: c9 leave 10c933: c3 ret =============================================================================== 0010ed70 <_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 ) { 10ed70: 55 push %ebp 10ed71: 89 e5 mov %esp,%ebp 10ed73: 57 push %edi 10ed74: 56 push %esi 10ed75: 53 push %ebx 10ed76: 83 ec 1c sub $0x1c,%esp 10ed79: 8b 5d 0c mov 0xc(%ebp),%ebx 10ed7c: 8a 45 10 mov 0x10(%ebp),%al 10ed7f: 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 ); 10ed82: 9c pushf 10ed83: fa cli 10ed84: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10ed87: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10ed8e: 75 09 jne 10ed99 <_Thread_queue_Extract_priority_helper+0x29> _ISR_Enable( level ); 10ed90: ff 75 e4 pushl -0x1c(%ebp) 10ed93: 9d popf return; 10ed94: e9 82 00 00 00 jmp 10ee1b <_Thread_queue_Extract_priority_helper+0xab> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10ed99: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 10ed9b: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ed9e: 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; 10eda1: 8d 73 3c lea 0x3c(%ebx),%esi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10eda4: 39 f0 cmp %esi,%eax 10eda6: 74 26 je 10edce <_Thread_queue_Extract_priority_helper+0x5e> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10eda8: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10edab: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10edad: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10edaf: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10edb2: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10edb4: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10edb7: 39 f0 cmp %esi,%eax 10edb9: 74 18 je 10edd3 <_Thread_queue_Extract_priority_helper+0x63> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10edbb: 8d 50 38 lea 0x38(%eax),%edx 10edbe: 89 57 04 mov %edx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10edc1: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10edc4: 89 70 40 mov %esi,0x40(%eax) 10edc7: 83 c0 3c add $0x3c,%eax 10edca: 89 06 mov %eax,(%esi) 10edcc: eb 05 jmp 10edd3 <_Thread_queue_Extract_priority_helper+0x63> last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10edce: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10edd0: 89 4a 04 mov %ecx,0x4(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10edd3: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10edd7: 74 06 je 10eddf <_Thread_queue_Extract_priority_helper+0x6f> _ISR_Enable( level ); 10edd9: ff 75 e4 pushl -0x1c(%ebp) 10eddc: 9d popf 10eddd: eb 3c jmp 10ee1b <_Thread_queue_Extract_priority_helper+0xab> return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10eddf: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10ede3: 74 06 je 10edeb <_Thread_queue_Extract_priority_helper+0x7b><== NEVER TAKEN _ISR_Enable( level ); 10ede5: ff 75 e4 pushl -0x1c(%ebp) 10ede8: 9d popf 10ede9: eb 1a jmp 10ee05 <_Thread_queue_Extract_priority_helper+0x95> 10edeb: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10edf2: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10edf5: 9d popf <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 10edf6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10edf9: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 10edfc: 50 push %eax <== NOT EXECUTED 10edfd: e8 e6 de ff ff call 10cce8 <_Watchdog_Remove> <== NOT EXECUTED 10ee02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ee05: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10ee0c: 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 } 10ee0f: 8d 65 f4 lea -0xc(%ebp),%esp 10ee12: 5b pop %ebx 10ee13: 5e pop %esi 10ee14: 5f pop %edi 10ee15: c9 leave 10ee16: e9 c9 cc ff ff jmp 10bae4 <_Thread_Clear_state> 10ee1b: 8d 65 f4 lea -0xc(%ebp),%esp 10ee1e: 5b pop %ebx 10ee1f: 5e pop %esi 10ee20: 5f pop %edi 10ee21: c9 leave 10ee22: c3 ret =============================================================================== 0010c53c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c53c: 55 push %ebp 10c53d: 89 e5 mov %esp,%ebp 10c53f: 57 push %edi 10c540: 56 push %esi 10c541: 53 push %ebx 10c542: 83 ec 1c sub $0x1c,%esp 10c545: 8b 75 08 mov 0x8(%ebp),%esi 10c548: 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 ) 10c54b: 85 f6 test %esi,%esi 10c54d: 74 36 je 10c585 <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c54f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c553: 75 30 jne 10c585 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c555: 9c pushf 10c556: fa cli 10c557: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c558: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c55f: 74 22 je 10c583 <_Thread_queue_Requeue+0x47><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c561: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c568: 50 push %eax 10c569: 6a 01 push $0x1 10c56b: 57 push %edi 10c56c: 56 push %esi 10c56d: e8 fe 27 00 00 call 10ed70 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c572: 83 c4 0c add $0xc,%esp 10c575: 8d 45 e4 lea -0x1c(%ebp),%eax 10c578: 50 push %eax 10c579: 57 push %edi 10c57a: 56 push %esi 10c57b: e8 c4 fd ff ff call 10c344 <_Thread_queue_Enqueue_priority> 10c580: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c583: 53 push %ebx 10c584: 9d popf } } 10c585: 8d 65 f4 lea -0xc(%ebp),%esp 10c588: 5b pop %ebx 10c589: 5e pop %esi 10c58a: 5f pop %edi 10c58b: c9 leave 10c58c: c3 ret =============================================================================== 0010c590 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c590: 55 push %ebp 10c591: 89 e5 mov %esp,%ebp 10c593: 83 ec 20 sub $0x20,%esp 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 d6 f8 ff ff call 10be78 <_Thread_Get> switch ( location ) { 10c5a2: 83 c4 10 add $0x10,%esp 10c5a5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c5a9: 75 17 jne 10c5c2 <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c5ab: 83 ec 0c sub $0xc,%esp 10c5ae: 50 push %eax 10c5af: e8 70 28 00 00 call 10ee24 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c5b4: a1 64 31 12 00 mov 0x123164,%eax 10c5b9: 48 dec %eax 10c5ba: a3 64 31 12 00 mov %eax,0x123164 10c5bf: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c5c2: c9 leave 10c5c3: c3 ret =============================================================================== 00116a70 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116a70: 55 push %ebp 116a71: 89 e5 mov %esp,%ebp 116a73: 57 push %edi 116a74: 56 push %esi 116a75: 53 push %ebx 116a76: 83 ec 4c sub $0x4c,%esp 116a79: 8b 5d 08 mov 0x8(%ebp),%ebx 116a7c: 8d 45 dc lea -0x24(%ebp),%eax 116a7f: 8d 55 e0 lea -0x20(%ebp),%edx 116a82: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116a85: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116a88: 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 ); 116a8f: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116a92: 8d 7d d0 lea -0x30(%ebp),%edi 116a95: 8d 55 d4 lea -0x2c(%ebp),%edx 116a98: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116a9b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 116a9e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 116aa5: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116aa8: 8d 43 30 lea 0x30(%ebx),%eax 116aab: 89 45 c0 mov %eax,-0x40(%ebp) /* * 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 ); 116aae: 8d 73 68 lea 0x68(%ebx),%esi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 116ab1: 8d 53 08 lea 0x8(%ebx),%edx 116ab4: 89 55 bc mov %edx,-0x44(%ebp) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 116ab7: 8d 4d dc lea -0x24(%ebp),%ecx 116aba: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 116abd: a1 70 c6 13 00 mov 0x13c670,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116ac2: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 116ac5: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116ac8: 51 push %ecx 116ac9: 8d 4d d0 lea -0x30(%ebp),%ecx 116acc: 51 push %ecx Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116acd: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116acf: 50 push %eax 116ad0: ff 75 c0 pushl -0x40(%ebp) 116ad3: e8 f4 37 00 00 call 11a2cc <_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(); 116ad8: a1 c4 c5 13 00 mov 0x13c5c4,%eax 116add: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 116ae0: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 116ae3: 83 c4 10 add $0x10,%esp 116ae6: 39 45 c4 cmp %eax,-0x3c(%ebp) 116ae9: 76 13 jbe 116afe <_Timer_server_Body+0x8e> /* * 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 ); 116aeb: 52 push %edx 116aec: 8d 55 d0 lea -0x30(%ebp),%edx 116aef: 52 push %edx if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 116af0: 8b 4d c4 mov -0x3c(%ebp),%ecx 116af3: 29 c1 sub %eax,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116af5: 51 push %ecx 116af6: 56 push %esi 116af7: e8 d0 37 00 00 call 11a2cc <_Watchdog_Adjust_to_chain> 116afc: eb 0f jmp 116b0d <_Timer_server_Body+0x9d> } else if ( snapshot < last_snapshot ) { 116afe: 73 10 jae 116b10 <_Timer_server_Body+0xa0> /* * 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 ); 116b00: 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; 116b01: 2b 45 c4 sub -0x3c(%ebp),%eax _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 116b04: 50 push %eax 116b05: 6a 01 push $0x1 116b07: 56 push %esi 116b08: e8 53 37 00 00 call 11a260 <_Watchdog_Adjust> 116b0d: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116b10: 8b 45 c4 mov -0x3c(%ebp),%eax 116b13: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 116b16: 8b 43 78 mov 0x78(%ebx),%eax 116b19: 83 ec 0c sub $0xc,%esp 116b1c: 50 push %eax 116b1d: e8 8a 08 00 00 call 1173ac <_Chain_Get> if ( timer == NULL ) { 116b22: 83 c4 10 add $0x10,%esp 116b25: 85 c0 test %eax,%eax 116b27: 74 29 je 116b52 <_Timer_server_Body+0xe2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116b29: 8b 50 38 mov 0x38(%eax),%edx 116b2c: 83 fa 01 cmp $0x1,%edx 116b2f: 75 0b jne 116b3c <_Timer_server_Body+0xcc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116b31: 52 push %edx 116b32: 52 push %edx 116b33: 83 c0 10 add $0x10,%eax 116b36: 50 push %eax 116b37: ff 75 c0 pushl -0x40(%ebp) 116b3a: eb 0c jmp 116b48 <_Timer_server_Body+0xd8> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116b3c: 83 fa 03 cmp $0x3,%edx 116b3f: 75 d5 jne 116b16 <_Timer_server_Body+0xa6><== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116b41: 51 push %ecx 116b42: 51 push %ecx 116b43: 83 c0 10 add $0x10,%eax 116b46: 50 push %eax 116b47: 56 push %esi 116b48: e8 07 38 00 00 call 11a354 <_Watchdog_Insert> 116b4d: 83 c4 10 add $0x10,%esp 116b50: eb c4 jmp 116b16 <_Timer_server_Body+0xa6> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116b52: 9c pushf 116b53: fa cli 116b54: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 116b55: 8b 55 b4 mov -0x4c(%ebp),%edx 116b58: 39 55 dc cmp %edx,-0x24(%ebp) 116b5b: 75 13 jne 116b70 <_Timer_server_Body+0x100><== NEVER TAKEN ts->insert_chain = NULL; 116b5d: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 116b64: 50 push %eax 116b65: 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 ) ) { 116b66: 8b 4d b0 mov -0x50(%ebp),%ecx 116b69: 39 4d d0 cmp %ecx,-0x30(%ebp) 116b6c: 75 09 jne 116b77 <_Timer_server_Body+0x107> 116b6e: eb 3e jmp 116bae <_Timer_server_Body+0x13e> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116b70: 50 push %eax <== NOT EXECUTED 116b71: 9d popf <== NOT EXECUTED 116b72: e9 46 ff ff ff jmp 116abd <_Timer_server_Body+0x4d><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 116b77: 9c pushf 116b78: fa cli 116b79: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116b7a: 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)) 116b7d: 3b 45 b0 cmp -0x50(%ebp),%eax 116b80: 74 25 je 116ba7 <_Timer_server_Body+0x137> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116b82: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 116b84: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 116b87: 89 79 04 mov %edi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116b8a: 85 c0 test %eax,%eax 116b8c: 74 19 je 116ba7 <_Timer_server_Body+0x137><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 116b8e: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116b95: 52 push %edx 116b96: 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 ); 116b97: 52 push %edx 116b98: 52 push %edx 116b99: ff 70 24 pushl 0x24(%eax) 116b9c: ff 70 20 pushl 0x20(%eax) 116b9f: ff 50 1c call *0x1c(%eax) } 116ba2: 83 c4 10 add $0x10,%esp 116ba5: eb d0 jmp 116b77 <_Timer_server_Body+0x107> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 116ba7: 52 push %edx 116ba8: 9d popf 116ba9: e9 09 ff ff ff jmp 116ab7 <_Timer_server_Body+0x47> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116bae: c6 43 7c 00 movb $0x0,0x7c(%ebx) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 116bb2: e8 1d fe ff ff call 1169d4 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 116bb7: 50 push %eax 116bb8: 50 push %eax 116bb9: 6a 08 push $0x8 116bbb: ff 33 pushl (%ebx) 116bbd: e8 a6 2f 00 00 call 119b68 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116bc2: 89 d8 mov %ebx,%eax 116bc4: e8 1b fe ff ff call 1169e4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 116bc9: 89 d8 mov %ebx,%eax 116bcb: e8 5a fe ff ff call 116a2a <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116bd0: e8 b1 26 00 00 call 119286 <_Thread_Enable_dispatch> ts->active = true; 116bd5: 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 ); 116bd9: 59 pop %ecx 116bda: ff 75 bc pushl -0x44(%ebp) 116bdd: e8 8a 38 00 00 call 11a46c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116be2: 8d 43 40 lea 0x40(%ebx),%eax 116be5: 89 04 24 mov %eax,(%esp) 116be8: e8 7f 38 00 00 call 11a46c <_Watchdog_Remove> 116bed: 83 c4 10 add $0x10,%esp 116bf0: e9 c2 fe ff ff jmp 116ab7 <_Timer_server_Body+0x47> =============================================================================== 00116bf5 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116bf5: 55 push %ebp 116bf6: 89 e5 mov %esp,%ebp 116bf8: 57 push %edi 116bf9: 56 push %esi 116bfa: 53 push %ebx 116bfb: 83 ec 2c sub $0x2c,%esp 116bfe: 8b 5d 08 mov 0x8(%ebp),%ebx 116c01: 8b 75 0c mov 0xc(%ebp),%esi if ( ts->insert_chain == NULL ) { 116c04: 8b 43 78 mov 0x78(%ebx),%eax 116c07: 85 c0 test %eax,%eax 116c09: 0f 85 de 00 00 00 jne 116ced <_Timer_server_Schedule_operation_method+0xf8> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 116c0f: e8 c0 fd ff ff call 1169d4 <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116c14: 8b 46 38 mov 0x38(%esi),%eax 116c17: 83 f8 01 cmp $0x1,%eax 116c1a: 75 5a jne 116c76 <_Timer_server_Schedule_operation_method+0x81> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116c1c: 9c pushf 116c1d: fa cli 116c1e: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116c21: 8b 15 70 c6 13 00 mov 0x13c670,%edx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116c27: 8b 4b 3c mov 0x3c(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116c2a: 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; 116c2d: 8d 7b 34 lea 0x34(%ebx),%edi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 116c30: 39 f8 cmp %edi,%eax 116c32: 74 19 je 116c4d <_Timer_server_Schedule_operation_method+0x58> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116c34: 89 d7 mov %edx,%edi 116c36: 29 cf sub %ecx,%edi 116c38: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116c3b: 8b 78 10 mov 0x10(%eax),%edi if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116c3e: 31 c9 xor %ecx,%ecx * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 116c40: 3b 7d e4 cmp -0x1c(%ebp),%edi 116c43: 76 05 jbe 116c4a <_Timer_server_Schedule_operation_method+0x55> delta_interval -= delta; 116c45: 89 f9 mov %edi,%ecx 116c47: 2b 4d e4 sub -0x1c(%ebp),%ecx } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116c4a: 89 48 10 mov %ecx,0x10(%eax) } ts->Interval_watchdogs.last_snapshot = snapshot; 116c4d: 89 53 3c mov %edx,0x3c(%ebx) _ISR_Enable( level ); 116c50: ff 75 e0 pushl -0x20(%ebp) 116c53: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116c54: 50 push %eax 116c55: 50 push %eax 116c56: 83 c6 10 add $0x10,%esi 116c59: 56 push %esi 116c5a: 8d 43 30 lea 0x30(%ebx),%eax 116c5d: 50 push %eax 116c5e: e8 f1 36 00 00 call 11a354 <_Watchdog_Insert> if ( !ts->active ) { 116c63: 8a 43 7c mov 0x7c(%ebx),%al 116c66: 83 c4 10 add $0x10,%esp 116c69: 84 c0 test %al,%al 116c6b: 75 74 jne 116ce1 <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_interval_system_watchdog( ts ); 116c6d: 89 d8 mov %ebx,%eax 116c6f: e8 70 fd ff ff call 1169e4 <_Timer_server_Reset_interval_system_watchdog> 116c74: eb 6b jmp 116ce1 <_Timer_server_Schedule_operation_method+0xec> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116c76: 83 f8 03 cmp $0x3,%eax 116c79: 75 66 jne 116ce1 <_Timer_server_Schedule_operation_method+0xec> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116c7b: 9c pushf 116c7c: fa cli 116c7d: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116c80: 8b 15 c4 c5 13 00 mov 0x13c5c4,%edx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116c86: 8b 43 74 mov 0x74(%ebx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116c89: 8b 4b 68 mov 0x68(%ebx),%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116c8c: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 116c8f: 39 f9 cmp %edi,%ecx 116c91: 74 27 je 116cba <_Timer_server_Schedule_operation_method+0xc5> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 116c93: 8b 79 10 mov 0x10(%ecx),%edi 116c96: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 116c99: 39 c2 cmp %eax,%edx 116c9b: 76 15 jbe 116cb2 <_Timer_server_Schedule_operation_method+0xbd> /* * We advanced in time. */ delta = snapshot - last_snapshot; 116c9d: 89 d7 mov %edx,%edi 116c9f: 29 c7 sub %eax,%edi 116ca1: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116ca4: 31 c0 xor %eax,%eax if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 116ca6: 39 7d d4 cmp %edi,-0x2c(%ebp) 116ca9: 76 0c jbe 116cb7 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN delta_interval -= delta; 116cab: 8b 45 d4 mov -0x2c(%ebp),%eax 116cae: 29 f8 sub %edi,%eax 116cb0: eb 05 jmp 116cb7 <_Timer_server_Schedule_operation_method+0xc2> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 116cb2: 03 45 d4 add -0x2c(%ebp),%eax delta_interval += delta; 116cb5: 29 d0 sub %edx,%eax } first_watchdog->delta_interval = delta_interval; 116cb7: 89 41 10 mov %eax,0x10(%ecx) } ts->TOD_watchdogs.last_snapshot = snapshot; 116cba: 89 53 74 mov %edx,0x74(%ebx) _ISR_Enable( level ); 116cbd: ff 75 e0 pushl -0x20(%ebp) 116cc0: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116cc1: 57 push %edi 116cc2: 57 push %edi 116cc3: 83 c6 10 add $0x10,%esi 116cc6: 56 push %esi 116cc7: 8d 43 68 lea 0x68(%ebx),%eax 116cca: 50 push %eax 116ccb: e8 84 36 00 00 call 11a354 <_Watchdog_Insert> if ( !ts->active ) { 116cd0: 8a 43 7c mov 0x7c(%ebx),%al 116cd3: 83 c4 10 add $0x10,%esp 116cd6: 84 c0 test %al,%al 116cd8: 75 07 jne 116ce1 <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_tod_system_watchdog( ts ); 116cda: 89 d8 mov %ebx,%eax 116cdc: e8 49 fd ff ff call 116a2a <_Timer_server_Reset_tod_system_watchdog> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 116ce1: 8d 65 f4 lea -0xc(%ebp),%esp 116ce4: 5b pop %ebx 116ce5: 5e pop %esi 116ce6: 5f pop %edi 116ce7: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116ce8: e9 99 25 00 00 jmp 119286 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116ced: 8b 43 78 mov 0x78(%ebx),%eax 116cf0: 89 75 0c mov %esi,0xc(%ebp) 116cf3: 89 45 08 mov %eax,0x8(%ebp) } } 116cf6: 8d 65 f4 lea -0xc(%ebp),%esp 116cf9: 5b pop %ebx 116cfa: 5e pop %esi 116cfb: 5f pop %edi 116cfc: c9 leave * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116cfd: e9 6e 06 00 00 jmp 117370 <_Chain_Append> =============================================================================== 0010e22c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10e22c: 55 push %ebp 10e22d: 89 e5 mov %esp,%ebp 10e22f: 53 push %ebx 10e230: 8b 4d 08 mov 0x8(%ebp),%ecx 10e233: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) return true; 10e236: b0 01 mov $0x1,%al bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 10e238: 8b 1a mov (%edx),%ebx 10e23a: 39 19 cmp %ebx,(%ecx) 10e23c: 7f 0d jg 10e24b <_Timespec_Greater_than+0x1f> return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 10e23e: b0 00 mov $0x0,%al ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 10e240: 7c 09 jl 10e24b <_Timespec_Greater_than+0x1f><== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 10e242: 8b 42 04 mov 0x4(%edx),%eax 10e245: 39 41 04 cmp %eax,0x4(%ecx) 10e248: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10e24b: 5b pop %ebx 10e24c: c9 leave 10e24d: c3 ret =============================================================================== 0010caaf <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10caaf: 55 push %ebp 10cab0: 89 e5 mov %esp,%ebp 10cab2: 57 push %edi 10cab3: 56 push %esi 10cab4: 53 push %ebx 10cab5: 83 ec 0c sub $0xc,%esp 10cab8: 8b 7d 10 mov 0x10(%ebp),%edi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10cabb: 8b 1d 60 33 12 00 mov 0x123360,%ebx 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 ); 10cac1: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10cac5: eb 15 jmp 10cadc <_User_extensions_Fatal+0x2d> !_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 ) 10cac7: 8b 43 30 mov 0x30(%ebx),%eax 10caca: 85 c0 test %eax,%eax 10cacc: 74 0b je 10cad9 <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10cace: 52 push %edx 10cacf: 57 push %edi 10cad0: 56 push %esi 10cad1: ff 75 08 pushl 0x8(%ebp) 10cad4: ff d0 call *%eax 10cad6: 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 ) { 10cad9: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10cadc: 81 fb 58 33 12 00 cmp $0x123358,%ebx 10cae2: 75 e3 jne 10cac7 <_User_extensions_Fatal+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10cae4: 8d 65 f4 lea -0xc(%ebp),%esp 10cae7: 5b pop %ebx 10cae8: 5e pop %esi 10cae9: 5f pop %edi 10caea: c9 leave 10caeb: c3 ret =============================================================================== 0010c998 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c998: 55 push %ebp 10c999: 89 e5 mov %esp,%ebp 10c99b: 57 push %edi 10c99c: 56 push %esi 10c99d: 53 push %ebx 10c99e: 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; 10c9a1: a1 30 f2 11 00 mov 0x11f230,%eax 10c9a6: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c9a9: 8b 35 34 f2 11 00 mov 0x11f234,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c9af: c7 05 58 33 12 00 5c movl $0x12335c,0x123358 10c9b6: 33 12 00 the_chain->permanent_null = NULL; 10c9b9: c7 05 5c 33 12 00 00 movl $0x0,0x12335c 10c9c0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c9c3: c7 05 60 33 12 00 58 movl $0x123358,0x123360 10c9ca: 33 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c9cd: c7 05 68 31 12 00 6c movl $0x12316c,0x123168 10c9d4: 31 12 00 the_chain->permanent_null = NULL; 10c9d7: c7 05 6c 31 12 00 00 movl $0x0,0x12316c 10c9de: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c9e1: c7 05 70 31 12 00 68 movl $0x123168,0x123170 10c9e8: 31 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c9eb: 85 f6 test %esi,%esi 10c9ed: 74 53 je 10ca42 <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10c9ef: 6b c8 34 imul $0x34,%eax,%ecx 10c9f2: 83 ec 0c sub $0xc,%esp 10c9f5: 51 push %ecx 10c9f6: 89 4d e0 mov %ecx,-0x20(%ebp) 10c9f9: e8 32 04 00 00 call 10ce30 <_Workspace_Allocate_or_fatal_error> 10c9fe: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10ca00: 31 c0 xor %eax,%eax 10ca02: 8b 4d e0 mov -0x20(%ebp),%ecx 10ca05: 89 df mov %ebx,%edi 10ca07: f3 aa rep stos %al,%es:(%edi) 10ca09: 89 f0 mov %esi,%eax extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10ca0b: 83 c4 10 add $0x10,%esp 10ca0e: 31 d2 xor %edx,%edx 10ca10: eb 2b jmp 10ca3d <_User_extensions_Handler_initialization+0xa5> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10ca12: 8d 7b 14 lea 0x14(%ebx),%edi 10ca15: 89 c6 mov %eax,%esi 10ca17: b9 08 00 00 00 mov $0x8,%ecx 10ca1c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10ca1e: 83 ec 0c sub $0xc,%esp 10ca21: 53 push %ebx 10ca22: 89 45 dc mov %eax,-0x24(%ebp) 10ca25: 89 55 e0 mov %edx,-0x20(%ebp) 10ca28: e8 b3 25 00 00 call 10efe0 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10ca2d: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10ca30: 8b 55 e0 mov -0x20(%ebp),%edx 10ca33: 42 inc %edx 10ca34: 8b 45 dc mov -0x24(%ebp),%eax 10ca37: 83 c0 20 add $0x20,%eax 10ca3a: 83 c4 10 add $0x10,%esp 10ca3d: 3b 55 e4 cmp -0x1c(%ebp),%edx 10ca40: 72 d0 jb 10ca12 <_User_extensions_Handler_initialization+0x7a> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10ca42: 8d 65 f4 lea -0xc(%ebp),%esp 10ca45: 5b pop %ebx 10ca46: 5e pop %esi 10ca47: 5f pop %edi 10ca48: c9 leave 10ca49: c3 ret =============================================================================== 0010ca7d <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ca7d: 55 push %ebp 10ca7e: 89 e5 mov %esp,%ebp 10ca80: 56 push %esi 10ca81: 53 push %ebx 10ca82: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ca85: 8b 1d 60 33 12 00 mov 0x123360,%ebx 10ca8b: eb 13 jmp 10caa0 <_User_extensions_Thread_exitted+0x23> !_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 ) 10ca8d: 8b 43 2c mov 0x2c(%ebx),%eax 10ca90: 85 c0 test %eax,%eax 10ca92: 74 09 je 10ca9d <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10ca94: 83 ec 0c sub $0xc,%esp 10ca97: 56 push %esi 10ca98: ff d0 call *%eax 10ca9a: 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 ) { 10ca9d: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10caa0: 81 fb 58 33 12 00 cmp $0x123358,%ebx 10caa6: 75 e5 jne 10ca8d <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10caa8: 8d 65 f8 lea -0x8(%ebp),%esp 10caab: 5b pop %ebx 10caac: 5e pop %esi 10caad: c9 leave 10caae: c3 ret =============================================================================== 0010e3c0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e3c0: 55 push %ebp 10e3c1: 89 e5 mov %esp,%ebp 10e3c3: 57 push %edi 10e3c4: 56 push %esi 10e3c5: 53 push %ebx 10e3c6: 83 ec 1c sub $0x1c,%esp 10e3c9: 8b 75 08 mov 0x8(%ebp),%esi 10e3cc: 8b 7d 0c mov 0xc(%ebp),%edi 10e3cf: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e3d2: 9c pushf 10e3d3: fa cli 10e3d4: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e3d5: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e3d7: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e3da: 39 ca cmp %ecx,%edx 10e3dc: 74 44 je 10e422 <_Watchdog_Adjust+0x62> switch ( direction ) { 10e3de: 85 ff test %edi,%edi 10e3e0: 74 3c je 10e41e <_Watchdog_Adjust+0x5e> 10e3e2: 4f dec %edi 10e3e3: 75 3d jne 10e422 <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e3e5: 01 5a 10 add %ebx,0x10(%edx) break; 10e3e8: eb 38 jmp 10e422 <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e3ea: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e3ec: 8b 7a 10 mov 0x10(%edx),%edi 10e3ef: 39 fb cmp %edi,%ebx 10e3f1: 73 07 jae 10e3fa <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e3f3: 29 df sub %ebx,%edi 10e3f5: 89 7a 10 mov %edi,0x10(%edx) break; 10e3f8: eb 28 jmp 10e422 <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e3fa: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e401: 50 push %eax 10e402: 9d popf _Watchdog_Tickle( header ); 10e403: 83 ec 0c sub $0xc,%esp 10e406: 56 push %esi 10e407: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e40a: e8 9d 01 00 00 call 10e5ac <_Watchdog_Tickle> _ISR_Disable( level ); 10e40f: 9c pushf 10e410: fa cli 10e411: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e412: 83 c4 10 add $0x10,%esp 10e415: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e418: 39 0e cmp %ecx,(%esi) 10e41a: 74 06 je 10e422 <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e41c: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e41e: 85 db test %ebx,%ebx 10e420: 75 c8 jne 10e3ea <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e422: 50 push %eax 10e423: 9d popf } 10e424: 8d 65 f4 lea -0xc(%ebp),%esp 10e427: 5b pop %ebx 10e428: 5e pop %esi 10e429: 5f pop %edi 10e42a: c9 leave 10e42b: c3 ret =============================================================================== 0010cce8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cce8: 55 push %ebp 10cce9: 89 e5 mov %esp,%ebp 10cceb: 56 push %esi 10ccec: 53 push %ebx 10cced: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ccf0: 9c pushf 10ccf1: fa cli 10ccf2: 5e pop %esi previous_state = the_watchdog->state; 10ccf3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ccf6: 83 f8 01 cmp $0x1,%eax 10ccf9: 74 09 je 10cd04 <_Watchdog_Remove+0x1c> 10ccfb: 72 42 jb 10cd3f <_Watchdog_Remove+0x57> 10ccfd: 83 f8 03 cmp $0x3,%eax 10cd00: 77 3d ja 10cd3f <_Watchdog_Remove+0x57> <== NEVER TAKEN 10cd02: eb 09 jmp 10cd0d <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10cd04: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10cd0b: eb 32 jmp 10cd3f <_Watchdog_Remove+0x57> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10cd0d: 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 ); } 10cd14: 8b 0a mov (%edx),%ecx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10cd16: 83 39 00 cmpl $0x0,(%ecx) 10cd19: 74 06 je 10cd21 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10cd1b: 8b 5a 10 mov 0x10(%edx),%ebx 10cd1e: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10cd21: 8b 1d 98 32 12 00 mov 0x123298,%ebx 10cd27: 85 db test %ebx,%ebx 10cd29: 74 0c je 10cd37 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cd2b: 8b 1d a4 33 12 00 mov 0x1233a4,%ebx 10cd31: 89 1d 10 32 12 00 mov %ebx,0x123210 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10cd37: 8b 5a 04 mov 0x4(%edx),%ebx next->previous = previous; 10cd3a: 89 59 04 mov %ebx,0x4(%ecx) previous->next = next; 10cd3d: 89 0b mov %ecx,(%ebx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cd3f: 8b 0d 9c 32 12 00 mov 0x12329c,%ecx 10cd45: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cd48: 56 push %esi 10cd49: 9d popf return( previous_state ); } 10cd4a: 5b pop %ebx 10cd4b: 5e pop %esi 10cd4c: c9 leave 10cd4d: c3 ret =============================================================================== 0010df58 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10df58: 55 push %ebp 10df59: 89 e5 mov %esp,%ebp 10df5b: 57 push %edi 10df5c: 56 push %esi 10df5d: 53 push %ebx 10df5e: 83 ec 20 sub $0x20,%esp 10df61: 8b 7d 08 mov 0x8(%ebp),%edi 10df64: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10df67: 9c pushf 10df68: fa cli 10df69: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10df6c: 56 push %esi 10df6d: 57 push %edi 10df6e: 68 04 ff 11 00 push $0x11ff04 10df73: e8 14 ab ff ff call 108a8c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10df78: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10df7a: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10df7d: 83 c4 10 add $0x10,%esp 10df80: 39 f3 cmp %esi,%ebx 10df82: 74 1d je 10dfa1 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10df84: 52 push %edx 10df85: 52 push %edx 10df86: 53 push %ebx 10df87: 6a 00 push $0x0 10df89: e8 32 00 00 00 call 10dfc0 <_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 ) 10df8e: 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 ; 10df90: 83 c4 10 add $0x10,%esp 10df93: 39 f3 cmp %esi,%ebx 10df95: 75 ed jne 10df84 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10df97: 50 push %eax 10df98: 50 push %eax 10df99: 57 push %edi 10df9a: 68 1b ff 11 00 push $0x11ff1b 10df9f: eb 08 jmp 10dfa9 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10dfa1: 83 ec 0c sub $0xc,%esp 10dfa4: 68 2a ff 11 00 push $0x11ff2a 10dfa9: e8 de aa ff ff call 108a8c 10dfae: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dfb1: ff 75 e4 pushl -0x1c(%ebp) 10dfb4: 9d popf } 10dfb5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfb8: 5b pop %ebx 10dfb9: 5e pop %esi 10dfba: 5f pop %edi 10dfbb: c9 leave 10dfbc: c3 ret =============================================================================== 0010cd50 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10cd50: 55 push %ebp 10cd51: 89 e5 mov %esp,%ebp 10cd53: 57 push %edi 10cd54: 56 push %esi 10cd55: 53 push %ebx 10cd56: 83 ec 1c sub $0x1c,%esp 10cd59: 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 ); 10cd5c: 9c pushf 10cd5d: fa cli 10cd5e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10cd5f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10cd61: 8d 47 04 lea 0x4(%edi),%eax 10cd64: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10cd67: 39 c3 cmp %eax,%ebx 10cd69: 74 40 je 10cdab <_Watchdog_Tickle+0x5b> * 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) { 10cd6b: 8b 43 10 mov 0x10(%ebx),%eax 10cd6e: 85 c0 test %eax,%eax 10cd70: 74 08 je 10cd7a <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10cd72: 48 dec %eax 10cd73: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10cd76: 85 c0 test %eax,%eax 10cd78: 75 31 jne 10cdab <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10cd7a: 83 ec 0c sub $0xc,%esp 10cd7d: 53 push %ebx 10cd7e: e8 65 ff ff ff call 10cce8 <_Watchdog_Remove> _ISR_Enable( level ); 10cd83: 56 push %esi 10cd84: 9d popf switch( watchdog_state ) { 10cd85: 83 c4 10 add $0x10,%esp 10cd88: 83 f8 02 cmp $0x2,%eax 10cd8b: 75 0e jne 10cd9b <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10cd8d: 50 push %eax 10cd8e: 50 push %eax 10cd8f: ff 73 24 pushl 0x24(%ebx) 10cd92: ff 73 20 pushl 0x20(%ebx) 10cd95: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10cd98: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10cd9b: 9c pushf 10cd9c: fa cli 10cd9d: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10cd9e: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cda0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cda3: 74 06 je 10cdab <_Watchdog_Tickle+0x5b> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10cda5: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cda9: eb cd jmp 10cd78 <_Watchdog_Tickle+0x28> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10cdab: 56 push %esi 10cdac: 9d popf } 10cdad: 8d 65 f4 lea -0xc(%ebp),%esp 10cdb0: 5b pop %ebx 10cdb1: 5e pop %esi 10cdb2: 5f pop %edi 10cdb3: c9 leave 10cdb4: c3 ret =============================================================================== 001207f2 <__kill>: #endif int __kill( pid_t pid, int sig ) { 1207f2: 55 push %ebp <== NOT EXECUTED 1207f3: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1207f5: 31 c0 xor %eax,%eax <== NOT EXECUTED 1207f7: c9 leave <== NOT EXECUTED 1207f8: c3 ret <== NOT EXECUTED =============================================================================== 0011bbdc <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 11bbdc: 55 push %ebp 11bbdd: 89 e5 mov %esp,%ebp 11bbdf: 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(); 11bbe2: e8 46 06 00 00 call 11c22d <_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(); 11bbe7: e8 8c ff ff ff call 11bb78 rtems_shutdown_executive(status); 11bbec: 83 ec 0c sub $0xc,%esp 11bbef: ff 75 08 pushl 0x8(%ebp) 11bbf2: e8 d5 00 00 00 call 11bccc 11bbf7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11bbfa: eb fe jmp 11bbfa <_exit+0x1e> <== NOT EXECUTED =============================================================================== 001073c3 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 1073c3: 55 push %ebp <== NOT EXECUTED 1073c4: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1073c6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 1073c9: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1073ca: e9 8d ff ff ff jmp 10735c <== NOT EXECUTED =============================================================================== 0010a268 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10a268: 55 push %ebp <== NOT EXECUTED 10a269: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a26b: 57 push %edi <== NOT EXECUTED 10a26c: 56 push %esi <== NOT EXECUTED 10a26d: 53 push %ebx <== NOT EXECUTED 10a26e: 83 ec 78 sub $0x78,%esp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 10a271: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10a274: e8 99 ee ff ff call 109112 <== NOT EXECUTED 10a279: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 10a27c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a27f: 85 c0 test %eax,%eax <== NOT EXECUTED 10a281: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10a284: 75 15 jne 10a29b <_rename_r+0x33> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10a286: 51 push %ecx <== NOT EXECUTED 10a287: 50 push %eax <== NOT EXECUTED 10a288: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10a28b: 50 push %eax <== NOT EXECUTED 10a28c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10a28f: e8 48 03 00 00 call 10a5dc <== NOT EXECUTED 10a294: 83 c4 10 add $0x10,%esp <== 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; 10a297: 31 db xor %ebx,%ebx <== NOT EXECUTED 10a299: eb 23 jmp 10a2be <_rename_r+0x56> <== 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, 10a29b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a29e: 6a 00 push $0x0 <== NOT EXECUTED 10a2a0: 50 push %eax <== NOT EXECUTED 10a2a1: 6a 02 push $0x2 <== NOT EXECUTED 10a2a3: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 10a2a6: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10a2a9: e8 fb ed ff ff call 1090a9 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10a2ae: 83 c4 20 add $0x20,%esp <== NOT EXECUTED return -1; 10a2b1: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10a2b4: 85 c0 test %eax,%eax <== NOT EXECUTED 10a2b6: 0f 85 50 01 00 00 jne 10a40c <_rename_r+0x1a4> <== NOT EXECUTED return -1; free_old_parentloc = true; 10a2bc: b3 01 mov $0x1,%bl <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10a2be: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED 10a2c1: 8d 75 b8 lea -0x48(%ebp),%esi <== NOT EXECUTED 10a2c4: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 10a2c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED name = old + old_parent_pathlen; 10a2cb: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10a2ce: 03 75 94 add -0x6c(%ebp),%esi <== NOT EXECUTED 10a2d1: 89 75 e0 mov %esi,-0x20(%ebp) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10a2d4: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 10a2d7: 89 f7 mov %esi,%edi <== NOT EXECUTED 10a2d9: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a2db: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10a2dd: f7 d1 not %ecx <== NOT EXECUTED 10a2df: 49 dec %ecx <== NOT EXECUTED 10a2e0: 52 push %edx <== NOT EXECUTED 10a2e1: 52 push %edx <== NOT EXECUTED 10a2e2: 51 push %ecx <== NOT EXECUTED 10a2e3: 56 push %esi <== NOT EXECUTED 10a2e4: e8 68 ee ff ff call 109151 <== NOT EXECUTED 10a2e9: 01 c6 add %eax,%esi <== NOT EXECUTED 10a2eb: 89 75 e0 mov %esi,-0x20(%ebp) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10a2ee: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 10a2f1: 89 f7 mov %esi,%edi <== NOT EXECUTED 10a2f3: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a2f5: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10a2f7: f7 d1 not %ecx <== NOT EXECUTED 10a2f9: 49 dec %ecx <== NOT EXECUTED 10a2fa: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 10a301: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED 10a304: 57 push %edi <== NOT EXECUTED 10a305: 6a 00 push $0x0 <== NOT EXECUTED 10a307: 51 push %ecx <== NOT EXECUTED 10a308: 56 push %esi <== NOT EXECUTED 10a309: e8 16 ed ff ff call 109024 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 10a30e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10a311: 85 c0 test %eax,%eax <== NOT EXECUTED 10a313: 74 16 je 10a32b <_rename_r+0xc3> <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); return -1; 10a315: 83 cf ff or $0xffffffff,%edi <== 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 ) 10a318: 84 db test %bl,%bl <== NOT EXECUTED 10a31a: 0f 84 ec 00 00 00 je 10a40c <_rename_r+0x1a4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10a320: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a323: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10a326: e9 d8 00 00 00 jmp 10a403 <_rename_r+0x19b> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10a32b: 50 push %eax <== NOT EXECUTED 10a32c: 8d 75 a4 lea -0x5c(%ebp),%esi <== NOT EXECUTED 10a32f: 56 push %esi <== NOT EXECUTED 10a330: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10a333: 50 push %eax <== NOT EXECUTED 10a334: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10a337: e8 a0 02 00 00 call 10a5dc <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10a33c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10a33f: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 10a342: 50 push %eax <== NOT EXECUTED 10a343: 56 push %esi <== NOT EXECUTED 10a344: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10a347: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED 10a34a: 50 push %eax <== NOT EXECUTED 10a34b: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 10a34e: ff 50 04 call *0x4(%eax) <== NOT EXECUTED if ( result != 0 ) { 10a351: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a354: 85 c0 test %eax,%eax <== NOT EXECUTED 10a356: 74 2d je 10a385 <_rename_r+0x11d> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 10a358: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a35b: 56 push %esi <== NOT EXECUTED 10a35c: e8 2f ee ff ff call 109190 <== NOT EXECUTED if ( free_old_parentloc ) 10a361: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a364: 84 db test %bl,%bl <== NOT EXECUTED 10a366: 74 0f je 10a377 <_rename_r+0x10f> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10a368: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a36b: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10a36e: 50 push %eax <== NOT EXECUTED 10a36f: e8 1c ee ff ff call 109190 <== NOT EXECUTED 10a374: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 10a377: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a37a: 8d 45 cc lea -0x34(%ebp),%eax <== NOT EXECUTED 10a37d: 50 push %eax <== NOT EXECUTED 10a37e: e8 0d ee ff ff call 109190 <== NOT EXECUTED 10a383: eb 3e jmp 10a3c3 <_rename_r+0x15b> <== 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 ) { 10a385: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED 10a388: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED 10a38b: 74 3e je 10a3cb <_rename_r+0x163> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 10a38d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a390: 56 push %esi <== NOT EXECUTED 10a391: e8 fa ed ff ff call 109190 <== NOT EXECUTED if ( free_old_parentloc ) 10a396: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a399: 84 db test %bl,%bl <== NOT EXECUTED 10a39b: 74 0f je 10a3ac <_rename_r+0x144> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10a39d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3a0: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED 10a3a3: 50 push %eax <== NOT EXECUTED 10a3a4: e8 e7 ed ff ff call 109190 <== NOT EXECUTED 10a3a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 10a3ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3af: 8d 45 cc lea -0x34(%ebp),%eax <== NOT EXECUTED 10a3b2: 50 push %eax <== NOT EXECUTED 10a3b3: e8 d8 ed ff ff call 109190 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 10a3b8: e8 97 87 00 00 call 112b54 <__errno> <== NOT EXECUTED 10a3bd: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED 10a3c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a3c6: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 10a3c9: eb 41 jmp 10a40c <_rename_r+0x1a4> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10a3cb: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10a3ce: 56 push %esi <== NOT EXECUTED 10a3cf: 57 push %edi <== NOT EXECUTED 10a3d0: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED 10a3d3: 52 push %edx <== NOT EXECUTED 10a3d4: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED 10a3d7: 89 55 90 mov %edx,-0x70(%ebp) <== NOT EXECUTED 10a3da: ff 50 40 call *0x40(%eax) <== NOT EXECUTED 10a3dd: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 10a3df: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 10a3e2: e8 a9 ed ff ff call 109190 <== NOT EXECUTED if ( free_old_parentloc ) 10a3e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a3ea: 84 db test %bl,%bl <== NOT EXECUTED 10a3ec: 8b 55 90 mov -0x70(%ebp),%edx <== NOT EXECUTED 10a3ef: 74 0c je 10a3fd <_rename_r+0x195> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 10a3f1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3f4: 52 push %edx <== NOT EXECUTED 10a3f5: e8 96 ed ff ff call 109190 <== NOT EXECUTED 10a3fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 10a3fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a400: 8d 45 cc lea -0x34(%ebp),%eax <== NOT EXECUTED 10a403: 50 push %eax <== NOT EXECUTED 10a404: e8 87 ed ff ff call 109190 <== NOT EXECUTED return result; 10a409: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a40c: 89 f8 mov %edi,%eax <== NOT EXECUTED 10a40e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a411: 5b pop %ebx <== NOT EXECUTED 10a412: 5e pop %esi <== NOT EXECUTED 10a413: 5f pop %edi <== NOT EXECUTED 10a414: c9 leave <== NOT EXECUTED 10a415: c3 ret <== NOT EXECUTED =============================================================================== 0010a85c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 10a85c: 55 push %ebp <== NOT EXECUTED 10a85d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a85f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 10a862: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10a865: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10a868: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 10a869: e9 ba fe ff ff jmp 10a728 <== NOT EXECUTED =============================================================================== 001081c4 : #include speed_t cfgetispeed( const struct termios *tp ) { 1081c4: 55 push %ebp <== NOT EXECUTED 1081c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 1081c7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1081ca: 0f b7 40 0a movzwl 0xa(%eax),%eax <== NOT EXECUTED 1081ce: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED } 1081d3: c9 leave <== NOT EXECUTED 1081d4: c3 ret <== NOT EXECUTED =============================================================================== 001081d8 : #include speed_t cfgetospeed( const struct termios *tp ) { 1081d8: 55 push %ebp <== NOT EXECUTED 1081d9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return tp->c_cflag & CBAUD; 1081db: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1081de: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED 1081e1: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED } 1081e6: c9 leave <== NOT EXECUTED 1081e7: c3 ret <== NOT EXECUTED =============================================================================== 001081e8 : int cfsetispeed( struct termios *tp, speed_t speed ) { 1081e8: 55 push %ebp <== NOT EXECUTED 1081e9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1081eb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1081ee: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1081f1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED if ( speed & ~CBAUD ) 1081f4: a9 f0 ef ff ff test $0xffffeff0,%eax <== NOT EXECUTED 1081f9: 74 10 je 10820b <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 1081fb: e8 8c 98 00 00 call 111a8c <__errno> <== NOT EXECUTED 108200: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108206: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108209: eb 13 jmp 10821e <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 10820b: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED 10820e: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 108211: 81 e2 ff ff f0 ef and $0xeff0ffff,%edx <== NOT EXECUTED 108217: 09 d0 or %edx,%eax <== NOT EXECUTED 108219: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED return 0; 10821c: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10821e: c9 leave <== NOT EXECUTED 10821f: c3 ret <== NOT EXECUTED =============================================================================== 00108220 : int cfsetospeed( struct termios *tp, speed_t speed ) { 108220: 55 push %ebp <== NOT EXECUTED 108221: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108223: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108226: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 108229: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED if ( speed & ~CBAUD ) 10822c: f7 c1 f0 ef ff ff test $0xffffeff0,%ecx <== NOT EXECUTED 108232: 74 10 je 108244 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 108234: e8 53 98 00 00 call 111a8c <__errno> <== NOT EXECUTED 108239: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10823f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108242: eb 0f jmp 108253 <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 108244: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED 108247: 25 f0 ef ff ff and $0xffffeff0,%eax <== NOT EXECUTED 10824c: 09 c8 or %ecx,%eax <== NOT EXECUTED 10824e: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED return 0; 108251: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108253: c9 leave <== NOT EXECUTED 108254: c3 ret <== NOT EXECUTED =============================================================================== 00107364 : #include int chroot( const char *pathname ) { 107364: 55 push %ebp 107365: 89 e5 mov %esp,%ebp 107367: 57 push %edi 107368: 56 push %esi 107369: 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) { 10736c: 81 3d a0 22 12 00 a8 cmpl $0x1243a8,0x1222a0 107373: 43 12 00 107376: 75 1e jne 107396 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 107378: e8 14 11 00 00 call 108491 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 10737d: 81 3d a0 22 12 00 a8 cmpl $0x1243a8,0x1222a0 107384: 43 12 00 107387: 75 0d jne 107396 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107389: e8 56 96 00 00 call 1109e4 <__errno> <== NOT EXECUTED 10738e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107394: eb 22 jmp 1073b8 <== NOT EXECUTED } result = chdir(pathname); 107396: 83 ec 0c sub $0xc,%esp 107399: ff 75 08 pushl 0x8(%ebp) 10739c: e8 ff 73 00 00 call 10e7a0 if (result) { 1073a1: 83 c4 10 add $0x10,%esp 1073a4: 85 c0 test %eax,%eax 1073a6: 74 15 je 1073bd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 1073a8: e8 37 96 00 00 call 1109e4 <__errno> <== NOT EXECUTED 1073ad: 89 c6 mov %eax,%esi <== NOT EXECUTED 1073af: e8 30 96 00 00 call 1109e4 <__errno> <== NOT EXECUTED 1073b4: 8b 00 mov (%eax),%eax <== NOT EXECUTED 1073b6: 89 06 mov %eax,(%esi) <== NOT EXECUTED 1073b8: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1073bb: eb 44 jmp 107401 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1073bd: 83 ec 0c sub $0xc,%esp 1073c0: 6a 00 push $0x0 1073c2: 8d 75 e4 lea -0x1c(%ebp),%esi 1073c5: 56 push %esi 1073c6: 6a 00 push $0x0 1073c8: 6a 01 push $0x1 1073ca: 68 ae e5 11 00 push $0x11e5ae 1073cf: e8 29 01 00 00 call 1074fd 1073d4: 83 c4 20 add $0x20,%esp 1073d7: 85 c0 test %eax,%eax 1073d9: 75 cd jne 1073a8 <== 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); 1073db: 83 ec 0c sub $0xc,%esp 1073de: a1 a0 22 12 00 mov 0x1222a0,%eax 1073e3: 83 c0 18 add $0x18,%eax 1073e6: 50 push %eax 1073e7: e8 f8 01 00 00 call 1075e4 rtems_filesystem_root = loc; 1073ec: 8b 3d a0 22 12 00 mov 0x1222a0,%edi 1073f2: 83 c7 18 add $0x18,%edi 1073f5: b9 05 00 00 00 mov $0x5,%ecx 1073fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return 0; 1073fc: 83 c4 10 add $0x10,%esp 1073ff: 31 c0 xor %eax,%eax } 107401: 8d 65 f8 lea -0x8(%ebp),%esp 107404: 5e pop %esi 107405: 5f pop %edi 107406: c9 leave 107407: c3 ret =============================================================================== 0010d280 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d280: 55 push %ebp 10d281: 89 e5 mov %esp,%ebp 10d283: 57 push %edi 10d284: 56 push %esi 10d285: 53 push %ebx 10d286: 83 ec 1c sub $0x1c,%esp 10d289: 8b 4d 0c mov 0xc(%ebp),%ecx 10d28c: 8b 5d 14 mov 0x14(%ebp),%ebx 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; 10d28f: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d291: 85 f6 test %esi,%esi 10d293: 74 04 je 10d299 <== NEVER TAKEN 10d295: 31 ff xor %edi,%edi 10d297: eb 5a jmp 10d2f3 rtems_set_errno_and_return_minus_one( EFAULT ); 10d299: e8 22 16 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 10d29e: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d2a4: eb 60 jmp 10d306 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d2a6: 8b 16 mov (%esi),%edx 10d2a8: 85 d2 test %edx,%edx 10d2aa: 74 43 je 10d2ef continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d2ac: 50 push %eax 10d2ad: 51 push %ecx 10d2ae: 52 push %edx 10d2af: ff 75 08 pushl 0x8(%ebp) 10d2b2: 89 55 e4 mov %edx,-0x1c(%ebp) 10d2b5: 89 4d e0 mov %ecx,-0x20(%ebp) 10d2b8: e8 db 21 00 00 call 10f498 10d2bd: 83 c4 10 add $0x10,%esp 10d2c0: 85 c0 test %eax,%eax 10d2c2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d2c5: 8b 4d e0 mov -0x20(%ebp),%ecx 10d2c8: 75 25 jne 10d2ef <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d2ca: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d2ce: 75 1f jne 10d2ef <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d2d0: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d2d2: c7 43 08 7c ef 11 00 movl $0x11ef7c,0x8(%ebx) pathloc->ops = &devFS_ops; 10d2d9: c7 43 0c 34 ef 11 00 movl $0x11ef34,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d2e0: a1 d4 ef 11 00 mov 0x11efd4,%eax 10d2e5: 8b 40 28 mov 0x28(%eax),%eax 10d2e8: 89 43 10 mov %eax,0x10(%ebx) return 0; 10d2eb: 31 c0 xor %eax,%eax 10d2ed: eb 1a jmp 10d309 /* 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++) { 10d2ef: 47 inc %edi 10d2f0: 83 c6 14 add $0x14,%esi 10d2f3: 3b 3d 48 d1 11 00 cmp 0x11d148,%edi 10d2f9: 72 ab jb 10d2a6 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d2fb: e8 c0 15 00 00 call 10e8c0 <__errno> 10d300: c7 00 02 00 00 00 movl $0x2,(%eax) 10d306: 83 c8 ff or $0xffffffff,%eax } 10d309: 8d 65 f4 lea -0xc(%ebp),%esp 10d30c: 5b pop %ebx 10d30d: 5e pop %esi 10d30e: 5f pop %edi 10d30f: c9 leave 10d310: c3 ret =============================================================================== 00106b18 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 106b18: 55 push %ebp 106b19: 89 e5 mov %esp,%ebp 106b1b: 57 push %edi 106b1c: 53 push %ebx 106b1d: 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( 106b20: 83 ec 0c sub $0xc,%esp 106b23: 6b 05 48 d1 11 00 14 imul $0x14,0x11d148,%eax 106b2a: 50 push %eax 106b2b: e8 42 61 00 00 call 10cc72 <_Workspace_Allocate> 106b30: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 106b32: 83 c4 10 add $0x10,%esp 106b35: 85 c0 test %eax,%eax 106b37: 75 10 jne 106b49 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106b39: e8 82 7d 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106b3e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106b44: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106b47: eb 20 jmp 106b69 <== NOT EXECUTED memset( 106b49: 6b 0d 48 d1 11 00 14 imul $0x14,0x11d148,%ecx 106b50: 31 c0 xor %eax,%eax 106b52: 89 d7 mov %edx,%edi 106b54: 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; 106b56: c7 43 24 7c ef 11 00 movl $0x11ef7c,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106b5d: c7 43 28 34 ef 11 00 movl $0x11ef34,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 106b64: 89 53 1c mov %edx,0x1c(%ebx) return 0; 106b67: 31 c0 xor %eax,%eax } 106b69: 8d 65 f8 lea -0x8(%ebp),%esp 106b6c: 5b pop %ebx 106b6d: 5f pop %edi 106b6e: c9 leave 106b6f: c3 ret =============================================================================== 00106cd0 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 106cd0: 55 push %ebp 106cd1: 89 e5 mov %esp,%ebp 106cd3: 83 ec 1c sub $0x1c,%esp 106cd6: 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; 106cd9: 8b 42 18 mov 0x18(%edx),%eax args.iop = iop; 106cdc: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 106cdf: 8b 55 0c mov 0xc(%ebp),%edx 106ce2: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 106ce5: 8b 55 10 mov 0x10(%ebp),%edx 106ce8: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( np->major, np->minor, (void *) &args 106ceb: 8d 55 e8 lea -0x18(%ebp),%edx args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 106cee: 52 push %edx 106cef: ff 70 0c pushl 0xc(%eax) 106cf2: ff 70 08 pushl 0x8(%eax) 106cf5: e8 b6 38 00 00 call 10a5b0 np->major, np->minor, (void *) &args ); if ( status ) 106cfa: 83 c4 10 add $0x10,%esp 106cfd: 85 c0 test %eax,%eax 106cff: 74 0e je 106d0f <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106d01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106d04: 50 push %eax <== NOT EXECUTED 106d05: e8 16 66 00 00 call 10d320 <== NOT EXECUTED 106d0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d0d: eb 03 jmp 106d12 <== NOT EXECUTED return args.ioctl_return; 106d0f: 8b 45 f4 mov -0xc(%ebp),%eax } 106d12: c9 leave 106d13: c3 ret =============================================================================== 00106b70 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 106b70: 55 push %ebp 106b71: 89 e5 mov %esp,%ebp 106b73: 57 push %edi 106b74: 56 push %esi 106b75: 53 push %ebx 106b76: 83 ec 1c sub $0x1c,%esp 106b79: 8b 7d 08 mov 0x8(%ebp),%edi 106b7c: 8b 4d 10 mov 0x10(%ebp),%ecx 106b7f: 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') && 106b82: 80 3f 64 cmpb $0x64,(%edi) 106b85: 75 18 jne 106b9f <== NEVER TAKEN 106b87: 80 7f 01 65 cmpb $0x65,0x1(%edi) 106b8b: 75 12 jne 106b9f <== NEVER TAKEN 106b8d: 80 7f 02 76 cmpb $0x76,0x2(%edi) 106b91: 75 0c jne 106b9f <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; 106b93: 31 c0 xor %eax,%eax * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) 106b95: 80 7f 03 00 cmpb $0x0,0x3(%edi) 106b99: 0f 84 c9 00 00 00 je 106c68 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 106b9f: 8b 45 0c mov 0xc(%ebp),%eax 106ba2: 25 00 f0 00 00 and $0xf000,%eax 106ba7: 3d 00 20 00 00 cmp $0x2000,%eax 106bac: 74 14 je 106bc2 <== ALWAYS TAKEN 106bae: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 106bb3: 74 0d je 106bc2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 106bb5: e8 06 7d 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106bba: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106bc0: eb 23 jmp 106be5 <== NOT EXECUTED dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106bc2: 89 4d e4 mov %ecx,-0x1c(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106bc5: 89 55 e0 mov %edx,-0x20(%ebp) 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; 106bc8: 8b 45 18 mov 0x18(%ebp),%eax 106bcb: 8b 08 mov (%eax),%ecx if (!device_name_table) 106bcd: 85 c9 test %ecx,%ecx 106bcf: 74 09 je 106bda <== NEVER TAKEN 106bd1: 89 ca mov %ecx,%edx 106bd3: 83 ce ff or $0xffffffff,%esi 106bd6: 31 db xor %ebx,%ebx 106bd8: eb 46 jmp 106c20 rtems_set_errno_and_return_minus_one( EFAULT ); 106bda: e8 e1 7c 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106bdf: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106be5: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106be8: eb 7e jmp 106c68 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 106bea: 8b 02 mov (%edx),%eax 106bec: 85 c0 test %eax,%eax 106bee: 74 2a je 106c1a <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 106bf0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 106bf3: 50 push %eax <== NOT EXECUTED 106bf4: 57 push %edi <== NOT EXECUTED 106bf5: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED 106bf8: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 106bfb: e8 f0 87 00 00 call 10f3f0 <== NOT EXECUTED 106c00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106c03: 85 c0 test %eax,%eax <== NOT EXECUTED 106c05: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 106c08: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 106c0b: 75 0f jne 106c1c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 106c0d: e8 ae 7c 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106c12: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106c18: eb cb jmp 106be5 <== NOT EXECUTED if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; 106c1a: 89 de mov %ebx,%esi /* 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++){ 106c1c: 43 inc %ebx 106c1d: 83 c2 14 add $0x14,%edx 106c20: 3b 1d 48 d1 11 00 cmp 0x11d148,%ebx 106c26: 72 c2 jb 106bea else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 106c28: 83 fe ff cmp $0xffffffff,%esi 106c2b: 75 0d jne 106c3a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106c2d: e8 8e 7c 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106c32: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106c38: eb ab jmp 106be5 <== NOT EXECUTED _ISR_Disable(level); 106c3a: 9c pushf 106c3b: fa cli 106c3c: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 106c3d: 6b d6 14 imul $0x14,%esi,%edx 106c40: 8d 14 11 lea (%ecx,%edx,1),%edx 106c43: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 106c45: 31 c0 xor %eax,%eax 106c47: 83 c9 ff or $0xffffffff,%ecx 106c4a: f2 ae repnz scas %es:(%edi),%al 106c4c: f7 d1 not %ecx 106c4e: 49 dec %ecx 106c4f: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 106c52: 8b 45 e4 mov -0x1c(%ebp),%eax 106c55: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 106c58: 8b 45 e0 mov -0x20(%ebp),%eax 106c5b: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 106c5e: 8b 45 0c mov 0xc(%ebp),%eax 106c61: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 106c64: 53 push %ebx 106c65: 9d popf return 0; 106c66: 31 c0 xor %eax,%eax } 106c68: 8d 65 f4 lea -0xc(%ebp),%esp 106c6b: 5b pop %ebx 106c6c: 5e pop %esi 106c6d: 5f pop %edi 106c6e: c9 leave 106c6f: c3 ret =============================================================================== 00106d48 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 106d48: 55 push %ebp <== NOT EXECUTED 106d49: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106d4b: 53 push %ebx <== NOT EXECUTED 106d4c: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 106d4f: 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; 106d52: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED args.iop = iop; 106d55: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 106d58: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 106d5b: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 106d5e: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 106d61: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 106d64: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 106d67: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 106d6a: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 106d6d: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 106d70: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 106d73: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 106d76: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( np->major, np->minor, (void *) &args 106d7d: 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( 106d80: 50 push %eax <== NOT EXECUTED 106d81: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 106d84: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 106d87: e8 34 39 00 00 call 10a6c0 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 106d8c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d8f: 85 c0 test %eax,%eax <== NOT EXECUTED 106d91: 74 0e je 106da1 <== NOT EXECUTED return rtems_deviceio_errno(status); 106d93: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106d96: 50 push %eax <== NOT EXECUTED 106d97: e8 84 65 00 00 call 10d320 <== NOT EXECUTED 106d9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106d9f: eb 03 jmp 106da4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106da1: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 106da4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106da7: c9 leave <== NOT EXECUTED 106da8: c3 ret <== NOT EXECUTED =============================================================================== 00106dac : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 106dac: 55 push %ebp 106dad: 89 e5 mov %esp,%ebp 106daf: 53 push %ebx 106db0: 83 ec 04 sub $0x4,%esp 106db3: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 106db6: 8b 45 08 mov 0x8(%ebp),%eax 106db9: 8b 00 mov (%eax),%eax if (!the_dev) 106dbb: 85 c0 test %eax,%eax 106dbd: 75 10 jne 106dcf <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106dbf: e8 fc 7a 00 00 call 10e8c0 <__errno> <== NOT EXECUTED 106dc4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106dca: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106dcd: eb 14 jmp 106de3 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 106dcf: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106dd2: 8b 58 08 mov 0x8(%eax),%ebx 106dd5: 89 5a 18 mov %ebx,0x18(%edx) 106dd8: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 106ddb: 8b 40 10 mov 0x10(%eax),%eax 106dde: 89 42 0c mov %eax,0xc(%edx) return 0; 106de1: 31 c0 xor %eax,%eax } 106de3: 5a pop %edx 106de4: 5b pop %ebx 106de5: c9 leave 106de6: c3 ret =============================================================================== 00106de8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 106de8: 55 push %ebp 106de9: 89 e5 mov %esp,%ebp 106deb: 53 push %ebx 106dec: 83 ec 28 sub $0x28,%esp 106def: 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; 106df2: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 106df5: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 106df8: 8b 48 0c mov 0xc(%eax),%ecx 106dfb: 8b 58 10 mov 0x10(%eax),%ebx 106dfe: 89 4d e0 mov %ecx,-0x20(%ebp) 106e01: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 106e04: 8b 4d 0c mov 0xc(%ebp),%ecx 106e07: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 106e0a: 8b 4d 10 mov 0x10(%ebp),%ecx 106e0d: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 106e10: 8b 40 14 mov 0x14(%eax),%eax 106e13: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 106e16: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( np->major, np->minor, (void *) &args 106e1d: 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( 106e20: 50 push %eax 106e21: ff 72 0c pushl 0xc(%edx) 106e24: ff 72 08 pushl 0x8(%edx) 106e27: e8 c8 38 00 00 call 10a6f4 np->major, np->minor, (void *) &args ); if ( status ) 106e2c: 83 c4 10 add $0x10,%esp 106e2f: 85 c0 test %eax,%eax 106e31: 74 0e je 106e41 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106e33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e36: 50 push %eax <== NOT EXECUTED 106e37: e8 e4 64 00 00 call 10d320 <== NOT EXECUTED 106e3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e3f: eb 03 jmp 106e44 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106e41: 8b 45 f4 mov -0xc(%ebp),%eax } 106e44: 8b 5d fc mov -0x4(%ebp),%ebx 106e47: c9 leave 106e48: c3 ret =============================================================================== 0010fb90 : int device_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10fb90: 55 push %ebp <== NOT EXECUTED 10fb91: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 10fb93: 31 c0 xor %eax,%eax <== NOT EXECUTED 10fb95: c9 leave <== NOT EXECUTED 10fb96: c3 ret <== NOT EXECUTED =============================================================================== 0010fb41 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10fb41: 55 push %ebp 10fb42: 89 e5 mov %esp,%ebp 10fb44: 83 ec 1c sub $0x1c,%esp 10fb47: 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; 10fb4a: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 10fb4d: 8b 55 0c mov 0xc(%ebp),%edx 10fb50: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 10fb53: 8b 55 10 mov 0x10(%ebp),%edx 10fb56: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->pathinfo.node_access; 10fb59: 8b 40 18 mov 0x18(%eax),%eax status = rtems_io_control( the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args 10fb5c: 8d 55 e8 lea -0x18(%ebp),%edx args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( 10fb5f: 52 push %edx 10fb60: ff 70 54 pushl 0x54(%eax) 10fb63: ff 70 50 pushl 0x50(%eax) 10fb66: e8 3d 05 00 00 call 1100a8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10fb6b: 83 c4 10 add $0x10,%esp 10fb6e: 85 c0 test %eax,%eax 10fb70: 74 0e je 10fb80 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10fb72: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb75: 50 push %eax <== NOT EXECUTED 10fb76: e8 09 07 00 00 call 110284 <== NOT EXECUTED 10fb7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb7e: eb 03 jmp 10fb83 <== NOT EXECUTED return args.ioctl_return; 10fb80: 8b 45 f4 mov -0xc(%ebp),%eax } 10fb83: c9 leave 10fb84: c3 ret =============================================================================== 0010fa7f : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10fa7f: 55 push %ebp 10fa80: 89 e5 mov %esp,%ebp 10fa82: 53 push %ebx 10fa83: 83 ec 28 sub $0x28,%esp 10fa86: 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; 10fa89: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 10fa8c: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10fa8f: 8b 48 0c mov 0xc(%eax),%ecx 10fa92: 8b 58 10 mov 0x10(%eax),%ebx 10fa95: 89 4d e0 mov %ecx,-0x20(%ebp) 10fa98: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 10fa9b: 8b 4d 0c mov 0xc(%ebp),%ecx 10fa9e: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10faa1: 8b 4d 10 mov 0x10(%ebp),%ecx 10faa4: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 10faa7: 8b 40 14 mov 0x14(%eax),%eax 10faaa: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10faad: 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 10fab4: 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( 10fab7: 50 push %eax 10fab8: ff 72 54 pushl 0x54(%edx) 10fabb: ff 72 50 pushl 0x50(%edx) 10fabe: e8 4d 06 00 00 call 110110 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10fac3: 83 c4 10 add $0x10,%esp 10fac6: 85 c0 test %eax,%eax 10fac8: 74 0e je 10fad8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10faca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10facd: 50 push %eax <== NOT EXECUTED 10face: e8 b1 07 00 00 call 110284 <== NOT EXECUTED 10fad3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fad6: eb 03 jmp 10fadb <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10fad8: 8b 45 f4 mov -0xc(%ebp),%eax } 10fadb: 8b 5d fc mov -0x4(%ebp),%ebx 10fade: c9 leave 10fadf: c3 ret =============================================================================== 0010fae0 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10fae0: 55 push %ebp 10fae1: 89 e5 mov %esp,%ebp 10fae3: 53 push %ebx 10fae4: 83 ec 28 sub $0x28,%esp 10fae7: 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; 10faea: 8b 50 18 mov 0x18(%eax),%edx args.iop = iop; 10faed: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10faf0: 8b 48 0c mov 0xc(%eax),%ecx 10faf3: 8b 58 10 mov 0x10(%eax),%ebx 10faf6: 89 4d e0 mov %ecx,-0x20(%ebp) 10faf9: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 10fafc: 8b 4d 0c mov 0xc(%ebp),%ecx 10faff: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10fb02: 8b 4d 10 mov 0x10(%ebp),%ecx 10fb05: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 10fb08: 8b 40 14 mov 0x14(%eax),%eax 10fb0b: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10fb0e: 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 10fb15: 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( 10fb18: 50 push %eax 10fb19: ff 72 54 pushl 0x54(%edx) 10fb1c: ff 72 50 pushl 0x50(%edx) 10fb1f: e8 20 06 00 00 call 110144 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 10fb24: 83 c4 10 add $0x10,%esp 10fb27: 85 c0 test %eax,%eax 10fb29: 74 0e je 10fb39 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10fb2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb2e: 50 push %eax <== NOT EXECUTED 10fb2f: e8 50 07 00 00 call 110284 <== NOT EXECUTED 10fb34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb37: eb 03 jmp 10fb3c <== NOT EXECUTED return (ssize_t) args.bytes_moved; 10fb39: 8b 45 f4 mov -0xc(%ebp),%eax } 10fb3c: 8b 5d fc mov -0x4(%ebp),%ebx 10fb3f: c9 leave 10fb40: c3 ret =============================================================================== 001080f8 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 1080f8: 55 push %ebp 1080f9: 89 e5 mov %esp,%ebp 1080fb: 53 push %ebx 1080fc: 83 ec 04 sub $0x4,%esp 1080ff: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 108101: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 108108: 74 46 je 108150 rtems_interrupt_disable (level); 10810a: 9c pushf 10810b: fa cli 10810c: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10810d: eb 2f jmp 10813e tty->rawOutBufState = rob_wait; 10810f: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108116: 00 00 00 rtems_interrupt_enable (level); 108119: 50 push %eax 10811a: 9d popf sc = rtems_semaphore_obtain( 10811b: 50 push %eax 10811c: 6a 00 push $0x0 10811e: 6a 00 push $0x0 108120: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108126: e8 9d 20 00 00 call 10a1c8 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10812b: 83 c4 10 add $0x10,%esp 10812e: 85 c0 test %eax,%eax 108130: 74 09 je 10813b <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108132: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108135: 50 push %eax <== NOT EXECUTED 108136: e8 4d 26 00 00 call 10a788 <== NOT EXECUTED rtems_interrupt_disable (level); 10813b: 9c pushf 10813c: fa cli 10813d: 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) { 10813e: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 108144: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10814a: 39 d1 cmp %edx,%ecx 10814c: 75 c1 jne 10810f 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); 10814e: 50 push %eax 10814f: 9d popf } } 108150: 8b 5d fc mov -0x4(%ebp),%ebx 108153: c9 leave 108154: c3 ret =============================================================================== 00107934 : int dup2( int fildes, int fildes2 ) { 107934: 55 push %ebp 107935: 89 e5 mov %esp,%ebp 107937: 57 push %edi 107938: 56 push %esi 107939: 53 push %ebx 10793a: 83 ec 74 sub $0x74,%esp 10793d: 8b 75 08 mov 0x8(%ebp),%esi 107940: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107943: 8d 55 a0 lea -0x60(%ebp),%edx 107946: 52 push %edx 107947: 56 push %esi 107948: 89 55 94 mov %edx,-0x6c(%ebp) 10794b: e8 78 04 00 00 call 107dc8 if ( status == -1 ) 107950: 83 c4 10 add $0x10,%esp return -1; 107953: 83 cb ff or $0xffffffff,%ebx /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); if ( status == -1 ) 107956: 40 inc %eax 107957: 8b 55 94 mov -0x6c(%ebp),%edx 10795a: 74 1e je 10797a <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 10795c: 51 push %ecx 10795d: 51 push %ecx 10795e: 52 push %edx 10795f: 57 push %edi 107960: e8 63 04 00 00 call 107dc8 if ( status == -1 ) 107965: 83 c4 10 add $0x10,%esp 107968: 40 inc %eax 107969: 74 0f je 10797a <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 10796b: 50 push %eax <== NOT EXECUTED 10796c: 57 push %edi <== NOT EXECUTED 10796d: 6a 00 push $0x0 <== NOT EXECUTED 10796f: 56 push %esi <== NOT EXECUTED 107970: e8 8f 01 00 00 call 107b04 <== NOT EXECUTED 107975: 89 c3 mov %eax,%ebx <== NOT EXECUTED 107977: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10797a: 89 d8 mov %ebx,%eax 10797c: 8d 65 f4 lea -0xc(%ebp),%esp 10797f: 5b pop %ebx 107980: 5e pop %esi 107981: 5f pop %edi 107982: c9 leave 107983: c3 ret =============================================================================== 00108ca0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108ca0: 55 push %ebp 108ca1: 89 e5 mov %esp,%ebp 108ca3: 53 push %ebx 108ca4: 83 ec 24 sub $0x24,%esp if ((tty->termios.c_lflag & ECHOCTL) && 108ca7: f6 42 3d 02 testb $0x2,0x3d(%edx) 108cab: 74 3e je 108ceb <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 108cad: 0f b6 c8 movzbl %al,%ecx 108cb0: 8b 1d c8 0f 12 00 mov 0x120fc8,%ebx 108cb6: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) 108cbb: 74 2e je 108ceb 108cbd: 3c 09 cmp $0x9,%al 108cbf: 74 2a je 108ceb 108cc1: 3c 0a cmp $0xa,%al 108cc3: 74 26 je 108ceb char echobuf[2]; echobuf[0] = '^'; 108cc5: c6 45 f6 5e movb $0x5e,-0xa(%ebp) echobuf[1] = c ^ 0x40; 108cc9: 83 f0 40 xor $0x40,%eax 108ccc: 88 45 f7 mov %al,-0x9(%ebp) rtems_termios_puts (echobuf, 2, tty); 108ccf: 50 push %eax 108cd0: 52 push %edx 108cd1: 6a 02 push $0x2 108cd3: 8d 45 f6 lea -0xa(%ebp),%eax 108cd6: 50 push %eax 108cd7: 89 55 e4 mov %edx,-0x1c(%ebp) 108cda: e8 84 fd ff ff call 108a63 tty->column += 2; 108cdf: 8b 55 e4 mov -0x1c(%ebp),%edx 108ce2: 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')) { 108ce6: 83 c4 10 add $0x10,%esp 108ce9: eb 08 jmp 108cf3 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 108ceb: 0f b6 c0 movzbl %al,%eax 108cee: e8 90 fe ff ff call 108b83 } } 108cf3: 8b 5d fc mov -0x4(%ebp),%ebx 108cf6: c9 leave 108cf7: c3 ret =============================================================================== 001080d2 : void endgrent(void) { 1080d2: 55 push %ebp 1080d3: 89 e5 mov %esp,%ebp 1080d5: 83 ec 08 sub $0x8,%esp if (group_fp != NULL) 1080d8: a1 bc 52 12 00 mov 0x1252bc,%eax 1080dd: 85 c0 test %eax,%eax 1080df: 74 0c je 1080ed <== NEVER TAKEN fclose(group_fp); 1080e1: 83 ec 0c sub $0xc,%esp 1080e4: 50 push %eax 1080e5: e8 ea 90 00 00 call 1111d4 1080ea: 83 c4 10 add $0x10,%esp } 1080ed: c9 leave 1080ee: c3 ret =============================================================================== 00107f85 : void endpwent(void) { 107f85: 55 push %ebp 107f86: 89 e5 mov %esp,%ebp 107f88: 83 ec 08 sub $0x8,%esp if (passwd_fp != NULL) 107f8b: a1 98 53 12 00 mov 0x125398,%eax 107f90: 85 c0 test %eax,%eax 107f92: 74 0c je 107fa0 <== NEVER TAKEN fclose(passwd_fp); 107f94: 83 ec 0c sub $0xc,%esp 107f97: 50 push %eax 107f98: e8 37 92 00 00 call 1111d4 107f9d: 83 c4 10 add $0x10,%esp } 107fa0: c9 leave 107fa1: c3 ret =============================================================================== 00108cf8 : * 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) { 108cf8: 55 push %ebp 108cf9: 89 e5 mov %esp,%ebp 108cfb: 57 push %edi 108cfc: 56 push %esi 108cfd: 53 push %ebx 108cfe: 83 ec 2c sub $0x2c,%esp 108d01: 89 c3 mov %eax,%ebx 108d03: 89 55 e4 mov %edx,-0x1c(%ebp) if (tty->ccount == 0) 108d06: 83 78 20 00 cmpl $0x0,0x20(%eax) 108d0a: 0f 84 59 01 00 00 je 108e69 return; if (lineFlag) { 108d10: 85 d2 test %edx,%edx 108d12: 0f 84 46 01 00 00 je 108e5e if (!(tty->termios.c_lflag & ECHO)) { 108d18: 8b 40 3c mov 0x3c(%eax),%eax 108d1b: a8 08 test $0x8,%al 108d1d: 75 0c jne 108d2b <== ALWAYS TAKEN tty->ccount = 0; 108d1f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108d26: e9 3e 01 00 00 jmp 108e69 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 108d2b: a8 10 test $0x10,%al 108d2d: 0f 85 2b 01 00 00 jne 108e5e <== ALWAYS TAKEN tty->ccount = 0; 108d33: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108d3a: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 108d3e: 89 da mov %ebx,%edx <== NOT EXECUTED 108d40: e8 5b ff ff ff call 108ca0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108d45: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d49: 0f 84 1a 01 00 00 je 108e69 <== NOT EXECUTED echo ('\n', tty); 108d4f: 89 da mov %ebx,%edx <== NOT EXECUTED 108d51: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d56: eb 2a jmp 108d82 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108d58: 8b 7b 1c mov 0x1c(%ebx),%edi 108d5b: 8d 50 ff lea -0x1(%eax),%edx 108d5e: 89 53 20 mov %edx,0x20(%ebx) 108d61: 8a 4c 07 ff mov -0x1(%edi,%eax,1),%cl if (tty->termios.c_lflag & ECHO) { 108d65: 8b 53 3c mov 0x3c(%ebx),%edx 108d68: f6 c2 08 test $0x8,%dl 108d6b: 0f 84 e7 00 00 00 je 108e58 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108d71: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 108d75: 75 17 jne 108d8e 108d77: f6 c2 10 test $0x10,%dl 108d7a: 75 12 jne 108d8e <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 108d7c: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108d80: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108d82: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d85: 5b pop %ebx <== NOT EXECUTED 108d86: 5e pop %esi <== NOT EXECUTED 108d87: 5f pop %edi <== NOT EXECUTED 108d88: 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); 108d89: e9 12 ff ff ff jmp 108ca0 <== NOT EXECUTED } else if (c == '\t') { 108d8e: 80 f9 09 cmp $0x9,%cl 108d91: 8b 35 c8 0f 12 00 mov 0x120fc8,%esi 108d97: 89 75 e0 mov %esi,-0x20(%ebp) 108d9a: 75 60 jne 108dfc int col = tty->read_start_column; 108d9c: 8b 73 2c mov 0x2c(%ebx),%esi int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d9f: b9 01 00 00 00 mov $0x1,%ecx c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108da4: 81 e2 00 02 00 00 and $0x200,%edx 108daa: 89 55 dc mov %edx,-0x24(%ebp) 108dad: 89 45 d4 mov %eax,-0x2c(%ebp) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108db0: eb 28 jmp 108dda c = tty->cbuf[i++]; 108db2: 8a 54 0f ff mov -0x1(%edi,%ecx,1),%dl if (c == '\t') { 108db6: 80 fa 09 cmp $0x9,%dl 108db9: 75 05 jne 108dc0 col = (col | 7) + 1; 108dbb: 83 ce 07 or $0x7,%esi 108dbe: eb 18 jmp 108dd8 } else if (iscntrl (c)) { 108dc0: 0f b6 d2 movzbl %dl,%edx 108dc3: 8b 45 e0 mov -0x20(%ebp),%eax 108dc6: f6 44 10 01 20 testb $0x20,0x1(%eax,%edx,1) 108dcb: 74 0b je 108dd8 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 108dcd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED 108dd1: 74 06 je 108dd9 <== NOT EXECUTED col += 2; 108dd3: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108dd6: eb 01 jmp 108dd9 <== NOT EXECUTED } else { col++; 108dd8: 46 inc %esi 108dd9: 41 inc %ecx int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108dda: 3b 4d d4 cmp -0x2c(%ebp),%ecx 108ddd: 75 d3 jne 108db2 108ddf: eb 14 jmp 108df5 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108de1: 57 push %edi 108de2: 53 push %ebx 108de3: 6a 01 push $0x1 108de5: 68 64 da 11 00 push $0x11da64 108dea: e8 74 fc ff ff call 108a63 tty->column--; 108def: ff 4b 28 decl 0x28(%ebx) 108df2: 83 c4 10 add $0x10,%esp } /* * Back up over the tab */ while (tty->column > col) { 108df5: 39 73 28 cmp %esi,0x28(%ebx) 108df8: 7f e7 jg 108de1 108dfa: eb 5c jmp 108e58 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108dfc: 0f b6 f1 movzbl %cl,%esi 108dff: 8b 45 e0 mov -0x20(%ebp),%eax 108e02: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) 108e07: 74 21 je 108e2a <== ALWAYS TAKEN 108e09: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 108e0c: 74 1c je 108e2a <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108e0e: 51 push %ecx <== NOT EXECUTED 108e0f: 53 push %ebx <== NOT EXECUTED 108e10: 6a 03 push $0x3 <== NOT EXECUTED 108e12: 68 62 da 11 00 push $0x11da62 <== NOT EXECUTED 108e17: e8 47 fc ff ff call 108a63 <== NOT EXECUTED if (tty->column) 108e1c: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108e1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e22: 85 c0 test %eax,%eax <== NOT EXECUTED 108e24: 74 04 je 108e2a <== NOT EXECUTED tty->column--; 108e26: 48 dec %eax <== NOT EXECUTED 108e27: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108e2a: a1 c8 0f 12 00 mov 0x120fc8,%eax 108e2f: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) 108e34: 74 06 je 108e3c <== ALWAYS TAKEN 108e36: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108e3a: 74 1c je 108e58 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108e3c: 52 push %edx 108e3d: 53 push %ebx 108e3e: 6a 03 push $0x3 108e40: 68 62 da 11 00 push $0x11da62 108e45: e8 19 fc ff ff call 108a63 if (tty->column) 108e4a: 8b 43 28 mov 0x28(%ebx),%eax 108e4d: 83 c4 10 add $0x10,%esp 108e50: 85 c0 test %eax,%eax 108e52: 74 04 je 108e58 <== NEVER TAKEN tty->column--; 108e54: 48 dec %eax 108e55: 89 43 28 mov %eax,0x28(%ebx) } } } if (!lineFlag) 108e58: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 108e5c: 74 0b je 108e69 echo ('\n', tty); return; } } while (tty->ccount) { 108e5e: 8b 43 20 mov 0x20(%ebx),%eax 108e61: 85 c0 test %eax,%eax 108e63: 0f 85 ef fe ff ff jne 108d58 } } if (!lineFlag) break; } } 108e69: 8d 65 f4 lea -0xc(%ebp),%esp 108e6c: 5b pop %ebx 108e6d: 5e pop %esi 108e6e: 5f pop %edi 108e6f: c9 leave 108e70: c3 ret =============================================================================== 00107b04 : int fcntl( int fd, int cmd, ... ) { 107b04: 55 push %ebp 107b05: 89 e5 mov %esp,%ebp 107b07: 57 push %edi 107b08: 56 push %esi 107b09: 53 push %ebx 107b0a: 83 ec 0c sub $0xc,%esp 107b0d: 8b 5d 08 mov 0x8(%ebp),%ebx int ret; va_list ap; va_start( ap, cmd ); 107b10: 8d 75 10 lea 0x10(%ebp),%esi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 107b13: 8b 0d c4 16 12 00 mov 0x1216c4,%ecx 107b19: 39 cb cmp %ecx,%ebx 107b1b: 73 14 jae 107b31 iop = rtems_libio_iop( fd ); 107b1d: 8b 15 98 55 12 00 mov 0x125598,%edx 107b23: 6b db 38 imul $0x38,%ebx,%ebx 107b26: 8d 1c 1a lea (%edx,%ebx,1),%ebx rtems_libio_check_is_open(iop); 107b29: 8b 43 14 mov 0x14(%ebx),%eax 107b2c: f6 c4 01 test $0x1,%ah 107b2f: 75 10 jne 107b41 107b31: e8 8e 95 00 00 call 1110c4 <__errno> 107b36: c7 00 09 00 00 00 movl $0x9,(%eax) 107b3c: e9 e6 00 00 00 jmp 107c27 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 107b41: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 107b45: 0f 87 af 00 00 00 ja 107bfa 107b4b: 8b 7d 0c mov 0xc(%ebp),%edi 107b4e: ff 24 bd c4 f2 11 00 jmp *0x11f2c4(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 107b55: 8b 36 mov (%esi),%esi if ( fd2 ) 107b57: 85 f6 test %esi,%esi 107b59: 74 0e je 107b69 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 107b5b: 31 c0 xor %eax,%eax <== NOT EXECUTED 107b5d: 39 ce cmp %ecx,%esi <== NOT EXECUTED 107b5f: 73 15 jae 107b76 <== NOT EXECUTED 107b61: 6b c6 38 imul $0x38,%esi,%eax <== NOT EXECUTED 107b64: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 107b67: eb 0d jmp 107b76 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 107b69: e8 d1 04 00 00 call 10803f if ( diop == 0 ) { 107b6e: 85 c0 test %eax,%eax 107b70: 0f 84 b1 00 00 00 je 107c27 <== NEVER TAKEN ret = -1; break; } } diop->flags = iop->flags; 107b76: 8b 53 14 mov 0x14(%ebx),%edx 107b79: 89 50 14 mov %edx,0x14(%eax) diop->pathinfo = iop->pathinfo; 107b7c: 8d 78 18 lea 0x18(%eax),%edi 107b7f: 8d 73 18 lea 0x18(%ebx),%esi 107b82: b9 05 00 00 00 mov $0x5,%ecx 107b87: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 107b89: 2b 05 98 55 12 00 sub 0x125598,%eax 107b8f: c1 f8 03 sar $0x3,%eax 107b92: 69 f0 b7 6d db b6 imul $0xb6db6db7,%eax,%esi 107b98: eb 6d jmp 107c07 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 107b9a: f6 c4 08 test $0x8,%ah 107b9d: 0f 95 c0 setne %al 107ba0: 0f b6 c0 movzbl %al,%eax 107ba3: 89 c6 mov %eax,%esi 107ba5: eb 64 jmp 107c0b * 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 ) ) 107ba7: 83 3e 00 cmpl $0x0,(%esi) 107baa: 74 05 je 107bb1 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 107bac: 80 cc 08 or $0x8,%ah 107baf: eb 03 jmp 107bb4 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 107bb1: 80 e4 f7 and $0xf7,%ah <== NOT EXECUTED 107bb4: 89 43 14 mov %eax,0x14(%ebx) 107bb7: eb 30 jmp 107be9 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 107bb9: 83 ec 0c sub $0xc,%esp 107bbc: 50 push %eax 107bbd: e8 3f 04 00 00 call 108001 107bc2: 89 c6 mov %eax,%esi 107bc4: 83 c4 10 add $0x10,%esp 107bc7: eb 3e jmp 107c07 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 107bc9: 83 ec 0c sub $0xc,%esp 107bcc: ff 36 pushl (%esi) 107bce: e8 f9 03 00 00 call 107fcc /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 107bd3: 25 01 02 00 00 and $0x201,%eax 107bd8: 8b 53 14 mov 0x14(%ebx),%edx 107bdb: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 107be1: 09 d0 or %edx,%eax 107be3: 89 43 14 mov %eax,0x14(%ebx) 107be6: 83 c4 10 add $0x10,%esp rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 107be9: 31 f6 xor %esi,%esi 107beb: eb 1e jmp 107c0b errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 107bed: e8 d2 94 00 00 call 1110c4 <__errno> 107bf2: c7 00 86 00 00 00 movl $0x86,(%eax) 107bf8: eb 2d jmp 107c27 ret = -1; break; default: errno = EINVAL; 107bfa: e8 c5 94 00 00 call 1110c4 <__errno> 107bff: c7 00 16 00 00 00 movl $0x16,(%eax) 107c05: eb 20 jmp 107c27 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 107c07: 85 f6 test %esi,%esi 107c09: 78 1f js 107c2a <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 107c0b: 50 push %eax 107c0c: 50 push %eax 107c0d: 8b 43 20 mov 0x20(%ebx),%eax 107c10: 53 push %ebx 107c11: ff 75 0c pushl 0xc(%ebp) 107c14: ff 50 30 call *0x30(%eax) 107c17: 89 c3 mov %eax,%ebx if (err) { 107c19: 83 c4 10 add $0x10,%esp 107c1c: 85 c0 test %eax,%eax 107c1e: 74 0a je 107c2a <== ALWAYS TAKEN errno = err; 107c20: e8 9f 94 00 00 call 1110c4 <__errno> <== NOT EXECUTED 107c25: 89 18 mov %ebx,(%eax) <== NOT EXECUTED ret = -1; 107c27: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 107c2a: 89 f0 mov %esi,%eax 107c2c: 8d 65 f4 lea -0xc(%ebp),%esp 107c2f: 5b pop %ebx 107c30: 5e pop %esi 107c31: 5f pop %edi 107c32: c9 leave 107c33: c3 ret =============================================================================== 0010f2f3 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f2f3: 55 push %ebp 10f2f4: 89 e5 mov %esp,%ebp 10f2f6: 57 push %edi 10f2f7: 56 push %esi 10f2f8: 53 push %ebx 10f2f9: 83 ec 2c sub $0x2c,%esp ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 10f2fc: e8 4b fe ff ff call 10f14c 10f301: 89 c6 mov %eax,%esi if (err) 10f303: 85 c0 test %eax,%eax 10f305: 0f 85 f5 02 00 00 jne 10f600 return err; pipe = *pipep; 10f30b: 8b 45 08 mov 0x8(%ebp),%eax 10f30e: 8b 18 mov (%eax),%ebx if (pipe == NULL) { 10f310: 85 db test %ebx,%ebx 10f312: 0f 85 14 01 00 00 jne 10f42c { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f318: 83 ec 0c sub $0xc,%esp 10f31b: 6a 34 push $0x34 10f31d: e8 ae 92 ff ff call 1085d0 10f322: 89 c3 mov %eax,%ebx 10f324: 89 45 d4 mov %eax,-0x2c(%ebp) if (pipe == NULL) 10f327: 83 c4 10 add $0x10,%esp 10f32a: 85 c0 test %eax,%eax 10f32c: 0f 84 f3 00 00 00 je 10f425 return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f332: b9 0d 00 00 00 mov $0xd,%ecx 10f337: 89 c7 mov %eax,%edi 10f339: 89 f0 mov %esi,%eax 10f33b: f3 ab rep stos %eax,%es:(%edi) pipe->Size = PIPE_BUF; 10f33d: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 10f344: 83 ec 0c sub $0xc,%esp 10f347: 68 00 02 00 00 push $0x200 10f34c: e8 7f 92 ff ff call 1085d0 10f351: 89 03 mov %eax,(%ebx) if (! pipe->Buffer) 10f353: 83 c4 10 add $0x10,%esp 10f356: 85 c0 test %eax,%eax 10f358: 0f 84 b9 00 00 00 je 10f417 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f35e: 8d 43 2c lea 0x2c(%ebx),%eax 10f361: 50 push %eax 10f362: 6a 00 push $0x0 10f364: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'r', c), 10f366: 0f be 05 b8 30 12 00 movsbl 0x1230b8,%eax if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f36d: 0d 00 72 49 50 or $0x50497200,%eax 10f372: 50 push %eax 10f373: e8 18 10 00 00 call 110390 10f378: 83 c4 10 add $0x10,%esp 10f37b: 85 c0 test %eax,%eax 10f37d: 0f 85 84 00 00 00 jne 10f407 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10f383: 8d 43 30 lea 0x30(%ebx),%eax 10f386: 50 push %eax 10f387: 6a 00 push $0x0 10f389: 6a 00 push $0x0 rtems_build_name ('P', 'I', 'w', c), 10f38b: 0f be 05 b8 30 12 00 movsbl 0x1230b8,%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( 10f392: 0d 00 77 49 50 or $0x50497700,%eax 10f397: 50 push %eax 10f398: e8 f3 0f 00 00 call 110390 10f39d: 83 c4 10 add $0x10,%esp 10f3a0: 85 c0 test %eax,%eax 10f3a2: 75 52 jne 10f3f6 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10f3a4: 83 ec 0c sub $0xc,%esp 10f3a7: 8d 43 28 lea 0x28(%ebx),%eax 10f3aa: 50 push %eax 10f3ab: 6a 00 push $0x0 10f3ad: 6a 10 push $0x10 10f3af: 6a 01 push $0x1 rtems_build_name ('P', 'I', 's', c), 1, 10f3b1: 0f be 05 b8 30 12 00 movsbl 0x1230b8,%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( 10f3b8: 0d 00 73 49 50 or $0x50497300,%eax 10f3bd: 50 push %eax 10f3be: e8 e5 bd ff ff call 10b1a8 10f3c3: 83 c4 20 add $0x20,%esp 10f3c6: 85 c0 test %eax,%eax 10f3c8: 75 1b jne 10f3e5 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f3ca: a0 b8 30 12 00 mov 0x1230b8,%al 10f3cf: 8d 50 01 lea 0x1(%eax),%edx 10f3d2: 88 15 b8 30 12 00 mov %dl,0x1230b8 10f3d8: 3c 7a cmp $0x7a,%al 10f3da: 75 50 jne 10f42c c = 'a'; 10f3dc: c6 05 b8 30 12 00 61 movb $0x61,0x1230b8 10f3e3: eb 47 jmp 10f42c return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10f3e5: 83 ec 0c sub $0xc,%esp 10f3e8: 8b 55 d4 mov -0x2c(%ebp),%edx 10f3eb: ff 72 30 pushl 0x30(%edx) 10f3ee: e8 55 10 00 00 call 110448 10f3f3: 83 c4 10 add $0x10,%esp err_wbar: rtems_barrier_delete(pipe->readBarrier); 10f3f6: 83 ec 0c sub $0xc,%esp 10f3f9: 8b 45 d4 mov -0x2c(%ebp),%eax 10f3fc: ff 70 2c pushl 0x2c(%eax) 10f3ff: e8 44 10 00 00 call 110448 10f404: 83 c4 10 add $0x10,%esp err_rbar: free(pipe->Buffer); 10f407: 83 ec 0c sub $0xc,%esp 10f40a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f40d: ff 32 pushl (%edx) 10f40f: e8 38 8d ff ff call 10814c 10f414: 83 c4 10 add $0x10,%esp err_buf: free(pipe); 10f417: 83 ec 0c sub $0xc,%esp 10f41a: ff 75 d4 pushl -0x2c(%ebp) 10f41d: e8 2a 8d ff ff call 10814c 10f422: 83 c4 10 add $0x10,%esp if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 10f425: be f4 ff ff ff mov $0xfffffff4,%esi 10f42a: eb 33 jmp 10f45f err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f42c: 50 push %eax 10f42d: 6a 00 push $0x0 10f42f: 6a 00 push $0x0 10f431: ff 73 28 pushl 0x28(%ebx) 10f434: e8 97 bf ff ff call 10b3d0 10f439: 83 c4 10 add $0x10,%esp 10f43c: 85 c0 test %eax,%eax 10f43e: 74 05 je 10f445 <== ALWAYS TAKEN err = -EINTR; 10f440: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED if (*pipep == NULL) { 10f445: 8b 45 08 mov 0x8(%ebp),%eax 10f448: 83 38 00 cmpl $0x0,(%eax) 10f44b: 75 12 jne 10f45f if (err) 10f44d: 85 f6 test %esi,%esi 10f44f: 74 09 je 10f45a <== ALWAYS TAKEN pipe_free(pipe); 10f451: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f453: e8 7b fd ff ff call 10f1d3 <== NOT EXECUTED 10f458: eb 05 jmp 10f45f <== NOT EXECUTED else *pipep = pipe; 10f45a: 8b 55 08 mov 0x8(%ebp),%edx 10f45d: 89 1a mov %ebx,(%edx) } out: pipe_unlock(); 10f45f: e8 aa fd ff ff call 10f20e pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f464: 85 f6 test %esi,%esi 10f466: 0f 85 94 01 00 00 jne 10f600 return err; pipe = *pipep; 10f46c: 8b 45 08 mov 0x8(%ebp),%eax 10f46f: 8b 18 mov (%eax),%ebx switch (LIBIO_ACCMODE(iop)) { 10f471: 8b 55 0c mov 0xc(%ebp),%edx 10f474: 8b 42 14 mov 0x14(%edx),%eax 10f477: 83 e0 06 and $0x6,%eax 10f47a: 83 f8 04 cmp $0x4,%eax 10f47d: 0f 84 91 00 00 00 je 10f514 10f483: 83 f8 06 cmp $0x6,%eax 10f486: 0f 84 10 01 00 00 je 10f59c 10f48c: 83 f8 02 cmp $0x2,%eax 10f48f: 0f 85 49 01 00 00 jne 10f5de <== NEVER TAKEN case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10f495: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 10f498: 8b 43 10 mov 0x10(%ebx),%eax 10f49b: 8d 50 01 lea 0x1(%eax),%edx 10f49e: 89 53 10 mov %edx,0x10(%ebx) 10f4a1: 85 c0 test %eax,%eax 10f4a3: 75 11 jne 10f4b6 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 10f4a5: 57 push %edi 10f4a6: 57 push %edi 10f4a7: 8d 45 e4 lea -0x1c(%ebp),%eax 10f4aa: 50 push %eax 10f4ab: ff 73 30 pushl 0x30(%ebx) 10f4ae: e8 1d 10 00 00 call 1104d0 10f4b3: 83 c4 10 add $0x10,%esp if (pipe->Writers == 0) { 10f4b6: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f4ba: 0f 85 1e 01 00 00 jne 10f5de /* Not an error */ if (LIBIO_NODELAY(iop)) 10f4c0: 8b 45 0c mov 0xc(%ebp),%eax 10f4c3: f6 40 14 01 testb $0x1,0x14(%eax) 10f4c7: 0f 85 11 01 00 00 jne 10f5de break; prevCounter = pipe->writerCounter; 10f4cd: 8b 7b 24 mov 0x24(%ebx),%edi err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10f4d0: 83 ec 0c sub $0xc,%esp 10f4d3: ff 73 28 pushl 0x28(%ebx) 10f4d6: e8 e1 bf ff ff call 10b4bc if (! PIPE_READWAIT(pipe)) 10f4db: 5a pop %edx 10f4dc: 59 pop %ecx 10f4dd: 6a 00 push $0x0 10f4df: ff 73 2c pushl 0x2c(%ebx) 10f4e2: e8 41 10 00 00 call 110528 10f4e7: 83 c4 10 add $0x10,%esp 10f4ea: 85 c0 test %eax,%eax 10f4ec: 0f 85 f9 00 00 00 jne 10f5eb <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 10f4f2: 50 push %eax 10f4f3: 6a 00 push $0x0 10f4f5: 6a 00 push $0x0 10f4f7: ff 73 28 pushl 0x28(%ebx) 10f4fa: e8 d1 be ff ff call 10b3d0 10f4ff: 83 c4 10 add $0x10,%esp 10f502: 85 c0 test %eax,%eax 10f504: 0f 85 e1 00 00 00 jne 10f5eb <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); 10f50a: 3b 7b 24 cmp 0x24(%ebx),%edi 10f50d: 74 c1 je 10f4d0 <== NEVER TAKEN 10f50f: e9 ca 00 00 00 jmp 10f5de } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10f514: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 10f517: 8b 43 14 mov 0x14(%ebx),%eax 10f51a: 8d 50 01 lea 0x1(%eax),%edx 10f51d: 89 53 14 mov %edx,0x14(%ebx) 10f520: 85 c0 test %eax,%eax 10f522: 75 11 jne 10f535 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 10f524: 57 push %edi 10f525: 57 push %edi 10f526: 8d 45 e4 lea -0x1c(%ebp),%eax 10f529: 50 push %eax 10f52a: ff 73 2c pushl 0x2c(%ebx) 10f52d: e8 9e 0f 00 00 call 1104d0 10f532: 83 c4 10 add $0x10,%esp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10f535: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f539: 0f 85 9f 00 00 00 jne 10f5de 10f53f: 8b 55 0c mov 0xc(%ebp),%edx 10f542: f6 42 14 01 testb $0x1,0x14(%edx) 10f546: 74 18 je 10f560 PIPE_UNLOCK(pipe); 10f548: 83 ec 0c sub $0xc,%esp 10f54b: ff 73 28 pushl 0x28(%ebx) 10f54e: e8 69 bf ff ff call 10b4bc err = -ENXIO; goto out_error; 10f553: 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; 10f556: be fa ff ff ff mov $0xfffffffa,%esi goto out_error; 10f55b: e9 90 00 00 00 jmp 10f5f0 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10f560: 8b 7b 20 mov 0x20(%ebx),%edi err = -EINTR; do { PIPE_UNLOCK(pipe); 10f563: 83 ec 0c sub $0xc,%esp 10f566: ff 73 28 pushl 0x28(%ebx) 10f569: e8 4e bf ff ff call 10b4bc if (! PIPE_WRITEWAIT(pipe)) 10f56e: 5a pop %edx 10f56f: 59 pop %ecx 10f570: 6a 00 push $0x0 10f572: ff 73 30 pushl 0x30(%ebx) 10f575: e8 ae 0f 00 00 call 110528 10f57a: 83 c4 10 add $0x10,%esp 10f57d: 85 c0 test %eax,%eax 10f57f: 75 6a jne 10f5eb <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 10f581: 50 push %eax 10f582: 6a 00 push $0x0 10f584: 6a 00 push $0x0 10f586: ff 73 28 pushl 0x28(%ebx) 10f589: e8 42 be ff ff call 10b3d0 10f58e: 83 c4 10 add $0x10,%esp 10f591: 85 c0 test %eax,%eax 10f593: 75 56 jne 10f5eb <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 10f595: 3b 7b 20 cmp 0x20(%ebx),%edi 10f598: 74 c9 je 10f563 <== NEVER TAKEN 10f59a: eb 42 jmp 10f5de } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10f59c: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 10f59f: 8b 43 10 mov 0x10(%ebx),%eax 10f5a2: 8d 50 01 lea 0x1(%eax),%edx 10f5a5: 89 53 10 mov %edx,0x10(%ebx) 10f5a8: 85 c0 test %eax,%eax 10f5aa: 75 11 jne 10f5bd <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 10f5ac: 57 push %edi 10f5ad: 57 push %edi 10f5ae: 8d 45 e4 lea -0x1c(%ebp),%eax 10f5b1: 50 push %eax 10f5b2: ff 73 30 pushl 0x30(%ebx) 10f5b5: e8 16 0f 00 00 call 1104d0 10f5ba: 83 c4 10 add $0x10,%esp pipe->writerCounter ++; 10f5bd: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 10f5c0: 8b 43 14 mov 0x14(%ebx),%eax 10f5c3: 8d 50 01 lea 0x1(%eax),%edx 10f5c6: 89 53 14 mov %edx,0x14(%ebx) 10f5c9: 85 c0 test %eax,%eax 10f5cb: 75 11 jne 10f5de <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 10f5cd: 51 push %ecx 10f5ce: 51 push %ecx 10f5cf: 8d 45 e4 lea -0x1c(%ebp),%eax 10f5d2: 50 push %eax 10f5d3: ff 73 2c pushl 0x2c(%ebx) 10f5d6: e8 f5 0e 00 00 call 1104d0 10f5db: 83 c4 10 add $0x10,%esp break; } PIPE_UNLOCK(pipe); 10f5de: 83 ec 0c sub $0xc,%esp 10f5e1: ff 73 28 pushl 0x28(%ebx) 10f5e4: e8 d3 be ff ff call 10b4bc 10f5e9: eb 12 jmp 10f5fd goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 10f5eb: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 10f5f0: 52 push %edx 10f5f1: 52 push %edx 10f5f2: ff 75 0c pushl 0xc(%ebp) 10f5f5: ff 75 08 pushl 0x8(%ebp) 10f5f8: e8 38 fc ff ff call 10f235 return err; 10f5fd: 83 c4 10 add $0x10,%esp } 10f600: 89 f0 mov %esi,%eax 10f602: 8d 65 f4 lea -0xc(%ebp),%esp 10f605: 5b pop %ebx 10f606: 5e pop %esi 10f607: 5f pop %edi 10f608: c9 leave 10f609: c3 ret =============================================================================== 00107ca8 : long fpathconf( int fd, int name ) { 107ca8: 55 push %ebp 107ca9: 89 e5 mov %esp,%ebp 107cab: 83 ec 08 sub $0x8,%esp 107cae: 8b 45 08 mov 0x8(%ebp),%eax 107cb1: 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); 107cb4: 3b 05 c4 16 12 00 cmp 0x1216c4,%eax 107cba: 73 11 jae 107ccd iop = rtems_libio_iop(fd); 107cbc: 6b c0 38 imul $0x38,%eax,%eax 107cbf: 03 05 98 55 12 00 add 0x125598,%eax rtems_libio_check_is_open(iop); 107cc5: 8b 48 14 mov 0x14(%eax),%ecx 107cc8: f6 c5 01 test $0x1,%ch 107ccb: 75 0d jne 107cda <== ALWAYS TAKEN 107ccd: e8 f2 93 00 00 call 1110c4 <__errno> 107cd2: c7 00 09 00 00 00 movl $0x9,(%eax) 107cd8: eb 5b jmp 107d35 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 107cda: 80 e1 02 and $0x2,%cl 107cdd: 74 4b je 107d2a <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 107cdf: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 107ce2: 83 fa 0b cmp $0xb,%edx 107ce5: 77 43 ja 107d2a 107ce7: ff 24 95 ec f2 11 00 jmp *0x11f2ec(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 107cee: 8b 40 38 mov 0x38(%eax),%eax break; 107cf1: eb 45 jmp 107d38 case _PC_MAX_CANON: return_value = the_limits->max_canon; 107cf3: 8b 40 3c mov 0x3c(%eax),%eax break; 107cf6: eb 40 jmp 107d38 case _PC_MAX_INPUT: return_value = the_limits->max_input; 107cf8: 8b 40 40 mov 0x40(%eax),%eax break; 107cfb: eb 3b jmp 107d38 case _PC_NAME_MAX: return_value = the_limits->name_max; 107cfd: 8b 40 44 mov 0x44(%eax),%eax break; 107d00: eb 36 jmp 107d38 case _PC_PATH_MAX: return_value = the_limits->path_max; 107d02: 8b 40 48 mov 0x48(%eax),%eax break; 107d05: eb 31 jmp 107d38 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 107d07: 8b 40 4c mov 0x4c(%eax),%eax break; 107d0a: eb 2c jmp 107d38 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 107d0c: 8b 40 54 mov 0x54(%eax),%eax break; 107d0f: eb 27 jmp 107d38 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 107d11: 8b 40 58 mov 0x58(%eax),%eax break; 107d14: eb 22 jmp 107d38 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 107d16: 8b 40 64 mov 0x64(%eax),%eax break; 107d19: eb 1d jmp 107d38 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 107d1b: 8b 40 50 mov 0x50(%eax),%eax break; 107d1e: eb 18 jmp 107d38 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 107d20: 8b 40 5c mov 0x5c(%eax),%eax break; 107d23: eb 13 jmp 107d38 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 107d25: 8b 40 60 mov 0x60(%eax),%eax break; 107d28: eb 0e jmp 107d38 default: rtems_set_errno_and_return_minus_one( EINVAL ); 107d2a: e8 95 93 00 00 call 1110c4 <__errno> 107d2f: c7 00 16 00 00 00 movl $0x16,(%eax) 107d35: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 107d38: c9 leave 107d39: c3 ret =============================================================================== 001072e4 : #include void free( void *ptr ) { 1072e4: 55 push %ebp 1072e5: 89 e5 mov %esp,%ebp 1072e7: 53 push %ebx 1072e8: 83 ec 04 sub $0x4,%esp 1072eb: 8b 5d 08 mov 0x8(%ebp),%ebx MSBUMP(free_calls, 1); 1072ee: ff 05 3c 30 12 00 incl 0x12303c if ( !ptr ) 1072f4: 85 db test %ebx,%ebx 1072f6: 74 5f je 107357 #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1072f8: 83 3d e4 32 12 00 03 cmpl $0x3,0x1232e4 1072ff: 75 15 jne 107316 <== NEVER TAKEN !malloc_is_system_state_OK() ) { 107301: e8 56 01 00 00 call 10745c #endif /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 107306: 84 c0 test %al,%al 107308: 75 0c jne 107316 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 10730a: 89 5d 08 mov %ebx,0x8(%ebp) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10730d: 8b 5d fc mov -0x4(%ebp),%ebx 107310: 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); 107311: e9 ae 01 00 00 jmp 1074c4 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 107316: a1 d0 14 12 00 mov 0x1214d0,%eax 10731b: 85 c0 test %eax,%eax 10731d: 74 0a je 107329 (*rtems_malloc_statistics_helpers->at_free)(ptr); 10731f: 83 ec 0c sub $0xc,%esp 107322: 53 push %ebx 107323: ff 50 08 call *0x8(%eax) 107326: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 107329: 50 push %eax 10732a: 50 push %eax 10732b: 53 push %ebx 10732c: ff 35 50 f1 11 00 pushl 0x11f150 107332: e8 01 46 00 00 call 10b938 <_Protected_heap_Free> 107337: 83 c4 10 add $0x10,%esp 10733a: 84 c0 test %al,%al 10733c: 75 19 jne 107357 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 10733e: a1 50 f1 11 00 mov 0x11f150,%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", 107343: ff 70 1c pushl 0x1c(%eax) 107346: ff 70 18 pushl 0x18(%eax) 107349: 53 push %ebx 10734a: 68 f7 d9 11 00 push $0x11d9f7 10734f: e8 ec 0b 00 00 call 107f40 107354: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 107357: 8b 5d fc mov -0x4(%ebp),%ebx 10735a: c9 leave 10735b: c3 ret =============================================================================== 00108454 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 108454: 55 push %ebp <== NOT EXECUTED 108455: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108457: 53 push %ebx <== NOT EXECUTED 108458: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10845b: 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 10845e: 81 fb a8 43 12 00 cmp $0x1243a8,%ebx <== NOT EXECUTED 108464: 74 26 je 10848c <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 108466: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108469: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED 10846c: 50 push %eax <== NOT EXECUTED 10846d: e8 72 f1 ff ff call 1075e4 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 108472: 8d 43 18 lea 0x18(%ebx),%eax <== NOT EXECUTED 108475: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED 108478: e8 67 f1 ff ff call 1075e4 <== NOT EXECUTED free(env); 10847d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108480: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 108483: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108486: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 108487: e9 6c f1 ff ff jmp 1075f8 <== NOT EXECUTED } } 10848c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10848f: c9 leave <== NOT EXECUTED 108490: c3 ret <== NOT EXECUTED =============================================================================== 0010de54 : int ftruncate( int fd, off_t length ) { 10de54: 55 push %ebp 10de55: 89 e5 mov %esp,%ebp 10de57: 57 push %edi 10de58: 56 push %esi 10de59: 53 push %ebx 10de5a: 83 ec 3c sub $0x3c,%esp 10de5d: 8b 5d 08 mov 0x8(%ebp),%ebx 10de60: 8b 45 0c mov 0xc(%ebp),%eax 10de63: 8b 55 10 mov 0x10(%ebp),%edx 10de66: 89 45 c0 mov %eax,-0x40(%ebp) 10de69: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10de6c: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx 10de72: 73 0f jae 10de83 iop = rtems_libio_iop( fd ); 10de74: 6b db 38 imul $0x38,%ebx,%ebx 10de77: 03 1d 18 30 12 00 add 0x123018,%ebx rtems_libio_check_is_open(iop); 10de7d: f6 43 15 01 testb $0x1,0x15(%ebx) 10de81: 75 0d jne 10de90 10de83: e8 44 24 00 00 call 1102cc <__errno> 10de88: c7 00 09 00 00 00 movl $0x9,(%eax) 10de8e: eb 3e jmp 10dece /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10de90: 8d 7d d4 lea -0x2c(%ebp),%edi 10de93: 8d 73 18 lea 0x18(%ebx),%esi 10de96: b9 05 00 00 00 mov $0x5,%ecx 10de9b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10de9d: 83 ec 0c sub $0xc,%esp 10dea0: 8d 45 d4 lea -0x2c(%ebp),%eax 10dea3: 50 push %eax 10dea4: 8b 45 e0 mov -0x20(%ebp),%eax 10dea7: ff 50 10 call *0x10(%eax) 10deaa: 83 c4 10 add $0x10,%esp 10dead: 48 dec %eax 10deae: 75 0d jne 10debd <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EISDIR ); 10deb0: e8 17 24 00 00 call 1102cc <__errno> <== NOT EXECUTED 10deb5: c7 00 15 00 00 00 movl $0x15,(%eax) <== NOT EXECUTED 10debb: eb 11 jmp 10dece <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10debd: f6 43 14 04 testb $0x4,0x14(%ebx) 10dec1: 75 10 jne 10ded3 10dec3: e8 04 24 00 00 call 1102cc <__errno> 10dec8: c7 00 16 00 00 00 movl $0x16,(%eax) 10dece: 83 c8 ff or $0xffffffff,%eax 10ded1: eb 11 jmp 10dee4 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 10ded3: 50 push %eax 10ded4: 8b 43 20 mov 0x20(%ebx),%eax 10ded7: ff 75 c4 pushl -0x3c(%ebp) 10deda: ff 75 c0 pushl -0x40(%ebp) 10dedd: 53 push %ebx 10dede: ff 50 20 call *0x20(%eax) 10dee1: 83 c4 10 add $0x10,%esp } 10dee4: 8d 65 f4 lea -0xc(%ebp),%esp 10dee7: 5b pop %ebx 10dee8: 5e pop %esi 10dee9: 5f pop %edi 10deea: c9 leave 10deeb: c3 ret =============================================================================== 0011d270 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 11d270: 55 push %ebp 11d271: 89 e5 mov %esp,%ebp 11d273: 57 push %edi 11d274: 56 push %esi 11d275: 53 push %ebx 11d276: 83 ec 2c sub $0x2c,%esp 11d279: 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 ); 11d27c: 31 db xor %ebx,%ebx 11d27e: 3b 05 04 27 12 00 cmp 0x122704,%eax 11d284: 73 09 jae 11d28f <== NEVER TAKEN 11d286: 6b d8 38 imul $0x38,%eax,%ebx 11d289: 03 1d 00 67 12 00 add 0x126700,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 11d28f: 8d 7d d4 lea -0x2c(%ebp),%edi 11d292: 8d 73 18 lea 0x18(%ebx),%esi 11d295: b9 05 00 00 00 mov $0x5,%ecx 11d29a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 11d29c: 83 ec 0c sub $0xc,%esp 11d29f: 8d 45 d4 lea -0x2c(%ebp),%eax 11d2a2: 50 push %eax 11d2a3: 8b 45 e0 mov -0x20(%ebp),%eax 11d2a6: ff 50 10 call *0x10(%eax) 11d2a9: 83 c4 10 add $0x10,%esp 11d2ac: 48 dec %eax 11d2ad: 74 10 je 11d2bf rtems_set_errno_and_return_minus_one( ENOTDIR ); 11d2af: e8 a0 3f ff ff call 111254 <__errno> 11d2b4: c7 00 14 00 00 00 movl $0x14,(%eax) 11d2ba: 83 c8 ff or $0xffffffff,%eax 11d2bd: eb 11 jmp 11d2d0 /* * 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 ); 11d2bf: 50 push %eax 11d2c0: 8b 43 20 mov 0x20(%ebx),%eax 11d2c3: ff 75 10 pushl 0x10(%ebp) 11d2c6: ff 75 0c pushl 0xc(%ebp) 11d2c9: 53 push %ebx 11d2ca: ff 50 08 call *0x8(%eax) 11d2cd: 83 c4 10 add $0x10,%esp } 11d2d0: 8d 65 f4 lea -0xc(%ebp),%esp 11d2d3: 5b pop %ebx 11d2d4: 5e pop %esi 11d2d5: 5f pop %edi 11d2d6: c9 leave 11d2d7: c3 ret =============================================================================== 0010735c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 10735c: 55 push %ebp 10735d: 89 e5 mov %esp,%ebp 10735f: 56 push %esi 107360: 53 push %ebx 107361: 83 ec 10 sub $0x10,%esp 107364: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 107367: 85 db test %ebx,%ebx 107369: 75 10 jne 10737b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 10736b: e8 5c 8f 00 00 call 1102cc <__errno> <== NOT EXECUTED 107370: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107376: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107379: eb 29 jmp 1073a4 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10737b: 9c pushf 10737c: fa cli 10737d: 5e pop %esi _TOD_Get( &now ); 10737e: 83 ec 0c sub $0xc,%esp 107381: 8d 45 f0 lea -0x10(%ebp),%eax 107384: 50 push %eax 107385: e8 36 3a 00 00 call 10adc0 <_TOD_Get> _ISR_Enable(level); 10738a: 56 push %esi 10738b: 9d popf useconds = (suseconds_t)now.tv_nsec; 10738c: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10738f: 8b 55 f0 mov -0x10(%ebp),%edx 107392: 89 13 mov %edx,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 107394: b9 e8 03 00 00 mov $0x3e8,%ecx 107399: 99 cltd 10739a: f7 f9 idiv %ecx time->tv_sec = now.tv_sec; time->tv_usec = useconds; 10739c: 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; 10739f: 83 c4 10 add $0x10,%esp 1073a2: 31 c0 xor %eax,%eax } 1073a4: 8d 65 f8 lea -0x8(%ebp),%esp 1073a7: 5b pop %ebx 1073a8: 5e pop %esi 1073a9: c9 leave 1073aa: c3 ret =============================================================================== 0010fb98 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10fb98: 55 push %ebp 10fb99: 89 e5 mov %esp,%ebp 10fb9b: 8b 55 08 mov 0x8(%ebp),%edx 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 ) 10fb9e: 8b 4a 18 mov 0x18(%edx),%ecx return -1; /* It wasn't a directory --> return error */ 10fba1: 83 c8 ff or $0xffffffff,%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 ) 10fba4: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 10fba8: 75 10 jne 10fbba <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 10fbaa: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 10fbb1: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) return 0; 10fbb8: 31 c0 xor %eax,%eax } 10fbba: c9 leave 10fbbb: c3 ret =============================================================================== 0010fbbc : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10fbbc: 55 push %ebp 10fbbd: 89 e5 mov %esp,%ebp 10fbbf: 57 push %edi 10fbc0: 56 push %esi 10fbc1: 53 push %ebx 10fbc2: 81 ec 4c 01 00 00 sub $0x14c,%esp 10fbc8: 8b 45 10 mov 0x10(%ebp),%eax int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 10fbcb: 8b 4d 08 mov 0x8(%ebp),%ecx 10fbce: 8b 51 18 mov 0x18(%ecx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fbd1: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fbd4: 83 c2 54 add $0x54,%edx 10fbd7: 89 95 c8 fe ff ff mov %edx,-0x138(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; 10fbdd: c7 85 d0 fe ff ff 00 movl $0x0,-0x130(%ebp) 10fbe4: 00 00 00 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 10fbe7: 39 d3 cmp %edx,%ebx 10fbe9: 0f 84 fc 00 00 00 je 10fceb <== NEVER TAKEN /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 10fbef: 8b 51 0c mov 0xc(%ecx),%edx 10fbf2: 89 95 cc fe ff ff mov %edx,-0x134(%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); 10fbf8: b9 10 01 00 00 mov $0x110,%ecx 10fbfd: 31 d2 xor %edx,%edx 10fbff: f7 f1 div %ecx 10fc01: 69 c0 10 01 00 00 imul $0x110,%eax,%eax 10fc07: 03 85 cc fe ff ff add -0x134(%ebp),%eax 10fc0d: 89 85 c4 fe ff ff mov %eax,-0x13c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; 10fc13: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp) 10fc1a: 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 ); 10fc1d: 8d 8d d8 fe ff ff lea -0x128(%ebp),%ecx 10fc23: 89 8d b4 fe ff ff mov %ecx,-0x14c(%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); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 10fc29: e9 ab 00 00 00 jmp 10fcd9 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 10fc2e: 3b 9d c8 fe ff ff cmp -0x138(%ebp),%ebx 10fc34: 0f 84 b1 00 00 00 je 10fceb <== NEVER TAKEN /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 10fc3a: 8b 85 cc fe ff ff mov -0x134(%ebp),%eax 10fc40: 39 85 d4 fe ff ff cmp %eax,-0x12c(%ebp) 10fc46: 0f 8c 81 00 00 00 jl 10fccd <== NEVER TAKEN /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 10fc4c: 8b 95 d4 fe ff ff mov -0x12c(%ebp),%edx 10fc52: 89 d1 mov %edx,%ecx 10fc54: c1 f9 1f sar $0x1f,%ecx 10fc57: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 10fc5d: 89 8d e0 fe ff ff mov %ecx,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 10fc63: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 10fc6a: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 10fc6c: 8b 43 38 mov 0x38(%ebx),%eax 10fc6f: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 10fc75: 8d 53 0c lea 0xc(%ebx),%edx 10fc78: 31 c0 xor %eax,%eax 10fc7a: 83 c9 ff or $0xffffffff,%ecx 10fc7d: 89 d7 mov %edx,%edi 10fc7f: f2 ae repnz scas %es:(%edi),%al 10fc81: f7 d1 not %ecx 10fc83: 49 dec %ecx 10fc84: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 10fc8b: 50 push %eax 10fc8c: 50 push %eax 10fc8d: 52 push %edx 10fc8e: 8d 8d e8 fe ff ff lea -0x118(%ebp),%ecx 10fc94: 51 push %ecx 10fc95: e8 4e 12 00 00 call 110ee8 memcpy( 10fc9a: 8b 45 0c mov 0xc(%ebp),%eax 10fc9d: 03 85 d0 fe ff ff add -0x130(%ebp),%eax 10fca3: b9 44 00 00 00 mov $0x44,%ecx 10fca8: 89 c7 mov %eax,%edi 10fcaa: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 10fcb0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 10fcb2: 8b 45 08 mov 0x8(%ebp),%eax 10fcb5: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 10fcbc: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 10fcc0: 81 85 d0 fe ff ff 10 addl $0x110,-0x130(%ebp) 10fcc7: 01 00 00 10fcca: 83 c4 10 add $0x10,%esp } the_node = the_node->next; 10fccd: 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( 10fccf: 81 85 d4 fe ff ff 10 addl $0x110,-0x12c(%ebp) 10fcd6: 01 00 00 /* 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 ( 10fcd9: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx 10fcdf: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp) 10fce5: 0f 8c 43 ff ff ff jl 10fc2e <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } 10fceb: 8b 85 d0 fe ff ff mov -0x130(%ebp),%eax 10fcf1: 8d 65 f4 lea -0xc(%ebp),%esp 10fcf4: 5b pop %ebx 10fcf5: 5e pop %esi 10fcf6: 5f pop %edi 10fcf7: c9 leave 10fcf8: c3 ret =============================================================================== 0010fdf9 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10fdf9: 55 push %ebp 10fdfa: 89 e5 mov %esp,%ebp 10fdfc: 53 push %ebx 10fdfd: 83 ec 04 sub $0x4,%esp 10fe00: 8b 45 0c mov 0xc(%ebp),%eax IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10fe03: 8b 18 mov (%eax),%ebx 10fe05: 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 ) ) 10fe08: 39 53 50 cmp %edx,0x50(%ebx) 10fe0b: 74 0d je 10fe1a rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 10fe0d: e8 ba 04 00 00 call 1102cc <__errno> 10fe12: c7 00 5a 00 00 00 movl $0x5a,(%eax) 10fe18: eb 13 jmp 10fe2d /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 10fe1a: 8b 40 10 mov 0x10(%eax),%eax 10fe1d: 39 58 1c cmp %ebx,0x1c(%eax) 10fe20: 75 10 jne 10fe32 rtems_set_errno_and_return_minus_one( EBUSY ); 10fe22: e8 a5 04 00 00 call 1102cc <__errno> 10fe27: c7 00 10 00 00 00 movl $0x10,(%eax) 10fe2d: 83 c8 ff or $0xffffffff,%eax 10fe30: eb 1c jmp 10fe4e /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 10fe32: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 10fe36: 75 ea jne 10fe22 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 10fe38: 83 ec 0c sub $0xc,%esp 10fe3b: 53 push %ebx 10fe3c: e8 2f de ff ff call 10dc70 IMFS_check_node_remove( the_jnode ); 10fe41: 89 1c 24 mov %ebx,(%esp) 10fe44: e8 69 de ff ff call 10dcb2 return 0; 10fe49: 83 c4 10 add $0x10,%esp 10fe4c: 31 c0 xor %eax,%eax } 10fe4e: 8b 5d fc mov -0x4(%ebp),%ebx 10fe51: c9 leave 10fe52: c3 ret =============================================================================== 00107c20 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 107c20: 55 push %ebp 107c21: 89 e5 mov %esp,%ebp 107c23: 53 push %ebx 107c24: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 107c27: 80 3d 80 54 12 00 00 cmpb $0x0,0x125480 107c2e: 0f 85 b8 00 00 00 jne 107cec return; etc_passwd_initted = 1; 107c34: c6 05 80 54 12 00 01 movb $0x1,0x125480 mkdir("/etc", 0777); 107c3b: 50 push %eax 107c3c: 50 push %eax 107c3d: 68 ff 01 00 00 push $0x1ff 107c42: 68 c3 f2 11 00 push $0x11f2c3 107c47: e8 90 07 00 00 call 1083dc /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 107c4c: 59 pop %ecx 107c4d: 5b pop %ebx 107c4e: 68 0a e0 11 00 push $0x11e00a 107c53: 68 c8 f2 11 00 push $0x11f2c8 107c58: e8 7b 9c 00 00 call 1118d8 107c5d: 83 c4 10 add $0x10,%esp 107c60: 85 c0 test %eax,%eax 107c62: 74 06 je 107c6a fclose(fp); 107c64: 83 ec 0c sub $0xc,%esp 107c67: 50 push %eax 107c68: eb 2a jmp 107c94 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 107c6a: 52 push %edx 107c6b: 52 push %edx 107c6c: 68 24 df 11 00 push $0x11df24 107c71: 68 c8 f2 11 00 push $0x11f2c8 107c76: e8 5d 9c 00 00 call 1118d8 107c7b: 89 c3 mov %eax,%ebx 107c7d: 83 c4 10 add $0x10,%esp 107c80: 85 c0 test %eax,%eax 107c82: 74 18 je 107c9c <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 107c84: 50 push %eax 107c85: 50 push %eax 107c86: 53 push %ebx 107c87: 68 d4 f2 11 00 push $0x11f2d4 107c8c: e8 13 9d 00 00 call 1119a4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 107c91: 89 1c 24 mov %ebx,(%esp) 107c94: e8 3b 95 00 00 call 1111d4 107c99: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 107c9c: 51 push %ecx 107c9d: 51 push %ecx 107c9e: 68 0a e0 11 00 push $0x11e00a 107ca3: 68 3b f3 11 00 push $0x11f33b 107ca8: e8 2b 9c 00 00 call 1118d8 107cad: 83 c4 10 add $0x10,%esp 107cb0: 85 c0 test %eax,%eax 107cb2: 74 06 je 107cba fclose(fp); 107cb4: 83 ec 0c sub $0xc,%esp 107cb7: 50 push %eax 107cb8: eb 2a jmp 107ce4 } else if ((fp = fopen("/etc/group", "w")) != NULL) { 107cba: 52 push %edx 107cbb: 52 push %edx 107cbc: 68 24 df 11 00 push $0x11df24 107cc1: 68 3b f3 11 00 push $0x11f33b 107cc6: e8 0d 9c 00 00 call 1118d8 107ccb: 89 c3 mov %eax,%ebx 107ccd: 83 c4 10 add $0x10,%esp 107cd0: 85 c0 test %eax,%eax 107cd2: 74 18 je 107cec <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 107cd4: 50 push %eax 107cd5: 50 push %eax 107cd6: 53 push %ebx 107cd7: 68 46 f3 11 00 push $0x11f346 107cdc: e8 c3 9c 00 00 call 1119a4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 107ce1: 89 1c 24 mov %ebx,(%esp) 107ce4: e8 eb 94 00 00 call 1111d4 107ce9: 83 c4 10 add $0x10,%esp } } 107cec: 8b 5d fc mov -0x4(%ebp),%ebx 107cef: c9 leave 107cf0: c3 ret =============================================================================== 00108e71 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108e71: 55 push %ebp 108e72: 89 e5 mov %esp,%ebp 108e74: 53 push %ebx 108e75: 83 ec 14 sub $0x14,%esp 108e78: 89 d3 mov %edx,%ebx 108e7a: 88 c1 mov %al,%cl if (tty->termios.c_iflag & ISTRIP) 108e7c: 8b 52 30 mov 0x30(%edx),%edx 108e7f: f6 c2 20 test $0x20,%dl 108e82: 74 03 je 108e87 <== ALWAYS TAKEN c &= 0x7f; 108e84: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108e87: f6 c6 02 test $0x2,%dh 108e8a: 74 16 je 108ea2 c = tolower (c); 108e8c: 0f b6 c9 movzbl %cl,%ecx 108e8f: a1 c8 0f 12 00 mov 0x120fc8,%eax 108e94: 0f be 44 08 01 movsbl 0x1(%eax,%ecx,1),%eax 108e99: 83 e0 03 and $0x3,%eax 108e9c: 48 dec %eax 108e9d: 75 03 jne 108ea2 108e9f: 83 c1 20 add $0x20,%ecx if (c == '\r') { 108ea2: 80 f9 0d cmp $0xd,%cl 108ea5: 75 14 jne 108ebb if (tty->termios.c_iflag & IGNCR) return 0; 108ea7: 31 c0 xor %eax,%eax if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 108ea9: f6 c2 80 test $0x80,%dl 108eac: 0f 85 d9 00 00 00 jne 108f8b <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) 108eb2: 80 e6 01 and $0x1,%dh 108eb5: 74 1a je 108ed1 <== NEVER TAKEN c = '\n'; 108eb7: b1 0a mov $0xa,%cl 108eb9: eb 16 jmp 108ed1 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108ebb: 80 f9 0a cmp $0xa,%cl 108ebe: 75 09 jne 108ec9 108ec0: 80 e2 40 and $0x40,%dl 108ec3: 74 0c je 108ed1 <== ALWAYS TAKEN c = '\r'; 108ec5: b1 0d mov $0xd,%cl <== NOT EXECUTED 108ec7: eb 08 jmp 108ed1 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108ec9: 84 c9 test %cl,%cl 108ecb: 0f 84 87 00 00 00 je 108f58 <== NEVER TAKEN 108ed1: 8b 53 3c mov 0x3c(%ebx),%edx 108ed4: f6 c2 02 test $0x2,%dl 108ed7: 74 7f je 108f58 <== NEVER TAKEN if (c == tty->termios.c_cc[VERASE]) { 108ed9: 3a 4b 43 cmp 0x43(%ebx),%cl 108edc: 75 04 jne 108ee2 erase (tty, 0); 108ede: 31 d2 xor %edx,%edx 108ee0: eb 0a jmp 108eec return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108ee2: 3a 4b 44 cmp 0x44(%ebx),%cl 108ee5: 75 11 jne 108ef8 erase (tty, 1); 108ee7: ba 01 00 00 00 mov $0x1,%edx 108eec: 89 d8 mov %ebx,%eax 108eee: e8 05 fe ff ff call 108cf8 108ef3: e9 91 00 00 00 jmp 108f89 return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 108ef8: b8 01 00 00 00 mov $0x1,%eax } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108efd: 3a 4b 45 cmp 0x45(%ebx),%cl 108f00: 0f 84 85 00 00 00 je 108f8b <== NEVER TAKEN return 1; } else if (c == '\n') { 108f06: 80 f9 0a cmp $0xa,%cl 108f09: 75 1a jne 108f25 if (tty->termios.c_lflag & (ECHO | ECHONL)) 108f0b: 80 e2 48 and $0x48,%dl 108f0e: 74 09 je 108f19 <== NEVER TAKEN echo (c, tty); 108f10: 89 da mov %ebx,%edx 108f12: b0 0a mov $0xa,%al 108f14: e8 87 fd ff ff call 108ca0 tty->cbuf[tty->ccount++] = c; 108f19: 8b 43 20 mov 0x20(%ebx),%eax 108f1c: 8b 53 1c mov 0x1c(%ebx),%edx 108f1f: c6 04 02 0a movb $0xa,(%edx,%eax,1) 108f23: eb 28 jmp 108f4d return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 108f25: 3a 4b 4c cmp 0x4c(%ebx),%cl 108f28: 74 05 je 108f2f <== NEVER TAKEN 108f2a: 3a 4b 51 cmp 0x51(%ebx),%cl 108f2d: 75 29 jne 108f58 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 108f2f: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 108f32: 74 10 je 108f44 <== NOT EXECUTED echo (c, tty); 108f34: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f37: 89 da mov %ebx,%edx <== NOT EXECUTED 108f39: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f3c: e8 5f fd ff ff call 108ca0 <== NOT EXECUTED 108f41: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f44: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f47: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f4a: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f4d: 40 inc %eax 108f4e: 89 43 20 mov %eax,0x20(%ebx) return 1; 108f51: b8 01 00 00 00 mov $0x1,%eax 108f56: eb 33 jmp 108f8b } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f58: 8b 15 44 0f 12 00 mov 0x120f44,%edx 108f5e: 4a dec %edx if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 108f5f: 31 c0 xor %eax,%eax } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f61: 39 53 20 cmp %edx,0x20(%ebx) 108f64: 7d 25 jge 108f8b <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 108f66: f6 43 3c 08 testb $0x8,0x3c(%ebx) 108f6a: 74 10 je 108f7c <== NEVER TAKEN echo (c, tty); 108f6c: 0f b6 c1 movzbl %cl,%eax 108f6f: 89 da mov %ebx,%edx 108f71: 88 4d f4 mov %cl,-0xc(%ebp) 108f74: e8 27 fd ff ff call 108ca0 108f79: 8a 4d f4 mov -0xc(%ebp),%cl tty->cbuf[tty->ccount++] = c; 108f7c: 8b 43 20 mov 0x20(%ebx),%eax 108f7f: 8b 53 1c mov 0x1c(%ebx),%edx 108f82: 88 0c 02 mov %cl,(%edx,%eax,1) 108f85: 40 inc %eax 108f86: 89 43 20 mov %eax,0x20(%ebx) } return 0; 108f89: 31 c0 xor %eax,%eax } 108f8b: 83 c4 14 add $0x14,%esp 108f8e: 5b pop %ebx 108f8f: c9 leave 108f90: c3 ret =============================================================================== 001207e4 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 1207e4: 55 push %ebp <== NOT EXECUTED 1207e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 1207e7: 31 c0 xor %eax,%eax <== NOT EXECUTED 1207e9: c9 leave <== NOT EXECUTED 1207ea: c3 ret <== NOT EXECUTED =============================================================================== 0011bb78 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 11bb78: 55 push %ebp 11bb79: 89 e5 mov %esp,%ebp 11bb7b: 53 push %ebx 11bb7c: 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())) 11bb7f: 83 3d e4 32 12 00 03 cmpl $0x3,0x1232e4 11bb86: 75 4f jne 11bbd7 <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 11bb88: 8b 1d e0 e2 11 00 mov 0x11e2e0,%ebx 11bb8e: 39 1d e0 0f 12 00 cmp %ebx,0x120fe0 11bb94: 74 12 je 11bba8 _wrapup_reent(_global_impure_ptr); 11bb96: 83 ec 0c sub $0xc,%esp 11bb99: 53 push %ebx 11bb9a: e8 ad 05 00 00 call 11c14c <_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; 11bb9f: 89 1d e0 0f 12 00 mov %ebx,0x120fe0 11bba5: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 11bba8: 83 ec 0c sub $0xc,%esp 11bbab: a1 e0 0f 12 00 mov 0x120fe0,%eax 11bbb0: ff 70 04 pushl 0x4(%eax) 11bbb3: e8 6c 48 ff ff call 110424 fclose (stdout); 11bbb8: 5a pop %edx 11bbb9: a1 e0 0f 12 00 mov 0x120fe0,%eax 11bbbe: ff 70 08 pushl 0x8(%eax) 11bbc1: e8 5e 48 ff ff call 110424 fclose (stderr); 11bbc6: 58 pop %eax 11bbc7: a1 e0 0f 12 00 mov 0x120fe0,%eax 11bbcc: ff 70 0c pushl 0xc(%eax) 11bbcf: e8 50 48 ff ff call 110424 11bbd4: 83 c4 10 add $0x10,%esp } 11bbd7: 8b 5d fc mov -0x4(%ebp),%ebx 11bbda: c9 leave 11bbdb: c3 ret =============================================================================== 0011ba84 : off_t lseek( int fd, off_t offset, int whence ) { 11ba84: 55 push %ebp 11ba85: 89 e5 mov %esp,%ebp 11ba87: 57 push %edi 11ba88: 56 push %esi 11ba89: 53 push %ebx 11ba8a: 83 ec 1c sub $0x1c,%esp 11ba8d: 8b 5d 08 mov 0x8(%ebp),%ebx 11ba90: 8b 45 0c mov 0xc(%ebp),%eax 11ba93: 8b 55 10 mov 0x10(%ebp),%edx 11ba96: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11ba99: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx 11ba9f: 73 0f jae 11bab0 iop = rtems_libio_iop( fd ); 11baa1: 6b db 38 imul $0x38,%ebx,%ebx 11baa4: 03 1d 18 30 12 00 add 0x123018,%ebx rtems_libio_check_is_open(iop); 11baaa: f6 43 15 01 testb $0x1,0x15(%ebx) 11baae: 75 0d jne 11babd 11bab0: e8 17 48 ff ff call 1102cc <__errno> 11bab5: c7 00 09 00 00 00 movl $0x9,(%eax) 11babb: eb 4b jmp 11bb08 /* * Now process the lseek(). */ old_offset = iop->offset; 11babd: 8b 73 0c mov 0xc(%ebx),%esi 11bac0: 8b 7b 10 mov 0x10(%ebx),%edi 11bac3: 89 75 e0 mov %esi,-0x20(%ebp) 11bac6: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11bac9: 83 f9 01 cmp $0x1,%ecx 11bacc: 74 11 je 11badf 11bace: 83 f9 02 cmp $0x2,%ecx 11bad1: 74 18 je 11baeb 11bad3: 85 c9 test %ecx,%ecx 11bad5: 75 26 jne 11bafd case SEEK_SET: iop->offset = offset; 11bad7: 89 43 0c mov %eax,0xc(%ebx) 11bada: 89 53 10 mov %edx,0x10(%ebx) break; 11badd: eb 30 jmp 11bb0f case SEEK_CUR: iop->offset += offset; 11badf: 8b 75 e0 mov -0x20(%ebp),%esi 11bae2: 8b 7d e4 mov -0x1c(%ebp),%edi 11bae5: 01 c6 add %eax,%esi 11bae7: 11 d7 adc %edx,%edi 11bae9: eb 0a jmp 11baf5 break; case SEEK_END: iop->offset = iop->size + offset; 11baeb: 89 c6 mov %eax,%esi 11baed: 89 d7 mov %edx,%edi 11baef: 03 73 04 add 0x4(%ebx),%esi 11baf2: 13 7b 08 adc 0x8(%ebx),%edi 11baf5: 89 73 0c mov %esi,0xc(%ebx) 11baf8: 89 7b 10 mov %edi,0x10(%ebx) break; 11bafb: eb 12 jmp 11bb0f default: rtems_set_errno_and_return_minus_one( EINVAL ); 11bafd: e8 ca 47 ff ff call 1102cc <__errno> 11bb02: c7 00 16 00 00 00 movl $0x16,(%eax) 11bb08: 83 c8 ff or $0xffffffff,%eax 11bb0b: 89 c2 mov %eax,%edx 11bb0d: eb 23 jmp 11bb32 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 11bb0f: 8b 73 20 mov 0x20(%ebx),%esi 11bb12: 51 push %ecx 11bb13: 52 push %edx 11bb14: 50 push %eax 11bb15: 53 push %ebx 11bb16: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11bb19: 83 c4 10 add $0x10,%esp 11bb1c: 83 fa ff cmp $0xffffffff,%edx 11bb1f: 75 11 jne 11bb32 11bb21: 83 f8 ff cmp $0xffffffff,%eax 11bb24: 75 0c jne 11bb32 <== NEVER TAKEN iop->offset = old_offset; 11bb26: 8b 75 e0 mov -0x20(%ebp),%esi 11bb29: 8b 7d e4 mov -0x1c(%ebp),%edi 11bb2c: 89 73 0c mov %esi,0xc(%ebx) 11bb2f: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11bb32: 8d 65 f4 lea -0xc(%ebp),%esp 11bb35: 5b pop %ebx 11bb36: 5e pop %esi 11bb37: 5f pop %edi 11bb38: c9 leave 11bb39: c3 ret =============================================================================== 00107580 : #include "malloc_p.h" void *malloc( size_t size ) { 107580: 55 push %ebp 107581: 89 e5 mov %esp,%ebp 107583: 56 push %esi 107584: 53 push %ebx 107585: 8b 75 08 mov 0x8(%ebp),%esi void *return_this; MSBUMP(malloc_calls, 1); 107588: ff 05 34 30 12 00 incl 0x123034 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10758e: e8 07 ff ff ff call 10749a /* * Validate the parameters */ if ( !size ) return (void *) 0; 107593: 31 db xor %ebx,%ebx malloc_deferred_frees_process(); /* * Validate the parameters */ if ( !size ) 107595: 85 f6 test %esi,%esi 107597: 74 78 je 107611 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107599: 83 3d e4 32 12 00 03 cmpl $0x3,0x1232e4 1075a0: 75 09 jne 1075ab !malloc_is_system_state_OK() ) 1075a2: e8 b5 fe ff ff call 10745c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1075a7: 84 c0 test %al,%al 1075a9: 74 66 je 107611 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1075ab: 6a 00 push $0x0 1075ad: 6a 00 push $0x0 1075af: 56 push %esi 1075b0: ff 35 50 f1 11 00 pushl 0x11f150 1075b6: e8 45 43 00 00 call 10b900 <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1075bb: 83 c4 10 add $0x10,%esp 1075be: 89 c3 mov %eax,%ebx 1075c0: 85 c0 test %eax,%eax 1075c2: 75 28 jne 1075ec if (rtems_malloc_sbrk_helpers) 1075c4: a1 d4 14 12 00 mov 0x1214d4,%eax 1075c9: 85 c0 test %eax,%eax 1075cb: 74 10 je 1075dd return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1075cd: 83 ec 0c sub $0xc,%esp 1075d0: 56 push %esi 1075d1: ff 50 04 call *0x4(%eax) 1075d4: 89 c3 mov %eax,%ebx if ( !return_this ) { 1075d6: 83 c4 10 add $0x10,%esp 1075d9: 85 c0 test %eax,%eax 1075db: 75 0f jne 1075ec errno = ENOMEM; 1075dd: e8 ea 8c 00 00 call 1102cc <__errno> 1075e2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1075e8: 31 db xor %ebx,%ebx 1075ea: eb 25 jmp 107611 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1075ec: a1 d8 14 12 00 mov 0x1214d8,%eax 1075f1: 85 c0 test %eax,%eax 1075f3: 74 09 je 1075fe (*rtems_malloc_dirty_helper)( return_this, size ); 1075f5: 52 push %edx 1075f6: 52 push %edx 1075f7: 56 push %esi 1075f8: 53 push %ebx 1075f9: ff d0 call *%eax 1075fb: 83 c4 10 add $0x10,%esp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1075fe: a1 d0 14 12 00 mov 0x1214d0,%eax 107603: 85 c0 test %eax,%eax 107605: 74 0a je 107611 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 107607: 83 ec 0c sub $0xc,%esp 10760a: 53 push %ebx 10760b: ff 50 04 call *0x4(%eax) 10760e: 83 c4 10 add $0x10,%esp return return_this; } 107611: 89 d8 mov %ebx,%eax 107613: 8d 65 f8 lea -0x8(%ebp),%esp 107616: 5b pop %ebx 107617: 5e pop %esi 107618: c9 leave 107619: c3 ret =============================================================================== 001078dc : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 1078dc: 55 push %ebp 1078dd: 89 e5 mov %esp,%ebp 1078df: 57 push %edi 1078e0: 56 push %esi 1078e1: 53 push %ebx 1078e2: 83 ec 0c sub $0xc,%esp 1078e5: 8b 7d 08 mov 0x8(%ebp),%edi * 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; 1078e8: 8b 0d 9c 43 12 00 mov 0x12439c,%ecx if ( sbrk_amount == 0 ) return (void *) 0; 1078ee: 31 f6 xor %esi,%esi * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 1078f0: 85 c9 test %ecx,%ecx 1078f2: 74 67 je 10795b <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 1078f4: 8d 1c 0f lea (%edi,%ecx,1),%ebx 1078f7: 89 d8 mov %ebx,%eax 1078f9: 31 d2 xor %edx,%edx 1078fb: f7 f1 div %ecx 1078fd: 89 c3 mov %eax,%ebx 1078ff: 0f af d9 imul %ecx,%ebx starting_address = (void *) sbrk(the_size); 107902: 83 ec 0c sub $0xc,%esp 107905: 53 push %ebx 107906: e8 51 8b ff ff call 10045c if ( starting_address == (void*) -1 ) 10790b: 83 c4 10 add $0x10,%esp 10790e: 83 f8 ff cmp $0xffffffff,%eax 107911: 74 48 je 10795b return (void *) 0; if ( !_Protected_heap_Extend( 107913: 52 push %edx 107914: 53 push %ebx 107915: 50 push %eax 107916: ff 35 b0 03 12 00 pushl 0x1203b0 10791c: e8 5b 43 00 00 call 10bc7c <_Protected_heap_Extend> 107921: 83 c4 10 add $0x10,%esp 107924: 84 c0 test %al,%al 107926: 75 18 jne 107940 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 107928: 83 ec 0c sub $0xc,%esp 10792b: f7 db neg %ebx 10792d: 53 push %ebx 10792e: e8 29 8b ff ff call 10045c errno = ENOMEM; 107933: e8 4c 8f 00 00 call 110884 <__errno> 107938: c7 00 0c 00 00 00 movl $0xc,(%eax) 10793e: eb 18 jmp 107958 return (void *) 0; } MSBUMP(space_available, the_size); 107940: 01 1d 70 43 12 00 add %ebx,0x124370 107946: 6a 00 push $0x0 107948: 6a 00 push $0x0 10794a: 57 push %edi 10794b: ff 35 b0 03 12 00 pushl 0x1203b0 107951: e8 ee 42 00 00 call 10bc44 <_Protected_heap_Allocate_aligned_with_boundary> 107956: 89 c6 mov %eax,%esi return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 107958: 83 c4 10 add $0x10,%esp } 10795b: 89 f0 mov %esi,%eax 10795d: 8d 65 f4 lea -0xc(%ebp),%esp 107960: 5b pop %ebx 107961: 5e pop %esi 107962: 5f pop %edi 107963: c9 leave 107964: c3 ret =============================================================================== 0010f052 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 10f052: 55 push %ebp 10f053: 89 e5 mov %esp,%ebp 10f055: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 10f058: ff 35 10 2d 12 00 pushl 0x122d10 10f05e: 6a 01 push $0x1 10f060: e8 c3 80 ff ff call 107128 if ( memory ) 10f065: 83 c4 10 add $0x10,%esp 10f068: 85 c0 test %eax,%eax 10f06a: 74 06 je 10f072 <== NEVER TAKEN memfile_blocks_allocated++; 10f06c: ff 05 20 2e 12 00 incl 0x122e20 return memory; } 10f072: c9 leave 10f073: c3 ret =============================================================================== 0010f3e6 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 10f3e6: 55 push %ebp 10f3e7: 89 e5 mov %esp,%ebp 10f3e9: 57 push %edi 10f3ea: 56 push %esi 10f3eb: 53 push %ebx 10f3ec: 83 ec 0c sub $0xc,%esp 10f3ef: 8b 75 08 mov 0x8(%ebp),%esi */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) 10f3f2: 85 f6 test %esi,%esi 10f3f4: 74 39 je 10f42f <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 10f3f6: 8b 3e mov (%esi),%edi for ( i=0 ; i if ( b[i] ) { 10f3fc: 8b 04 9f mov (%edi,%ebx,4),%eax 10f3ff: 85 c0 test %eax,%eax 10f401: 74 13 je 10f416 memfile_free_block( b[i] ); 10f403: 83 ec 0c sub $0xc,%esp 10f406: 50 push %eax 10f407: e8 c1 ff ff ff call 10f3cd b[i] = 0; 10f40c: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 10f413: 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 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 10f41c: 83 ec 0c sub $0xc,%esp 10f41f: ff 36 pushl (%esi) 10f421: e8 a7 ff ff ff call 10f3cd *block_table = 0; 10f426: c7 06 00 00 00 00 movl $0x0,(%esi) 10f42c: 83 c4 10 add $0x10,%esp } 10f42f: 8d 65 f4 lea -0xc(%ebp),%esp 10f432: 5b pop %ebx 10f433: 5e pop %esi 10f434: 5f pop %edi 10f435: c9 leave 10f436: c3 ret =============================================================================== 0010f883 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 10f883: 55 push %ebp 10f884: 89 e5 mov %esp,%ebp 10f886: 53 push %ebx 10f887: 83 ec 14 sub $0x14,%esp 10f88a: 8b 4d 08 mov 0x8(%ebp),%ecx 10f88d: 8b 45 0c mov 0xc(%ebp),%eax 10f890: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 10f893: 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 ) 10f896: 3b 53 54 cmp 0x54(%ebx),%edx 10f899: 7c 15 jl 10f8b0 <== NEVER TAKEN 10f89b: 7f 05 jg 10f8a2 <== NEVER TAKEN 10f89d: 3b 43 50 cmp 0x50(%ebx),%eax 10f8a0: 76 0e jbe 10f8b0 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 10f8a2: 51 push %ecx <== NOT EXECUTED 10f8a3: 52 push %edx <== NOT EXECUTED 10f8a4: 50 push %eax <== NOT EXECUTED 10f8a5: 53 push %ebx <== NOT EXECUTED 10f8a6: e8 b7 fc ff ff call 10f562 <== NOT EXECUTED 10f8ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8ae: eb 24 jmp 10f8d4 <== NOT EXECUTED * 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; 10f8b0: 89 43 50 mov %eax,0x50(%ebx) 10f8b3: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 10f8b6: 89 41 04 mov %eax,0x4(%ecx) 10f8b9: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 10f8bc: 50 push %eax 10f8bd: 50 push %eax 10f8be: 6a 00 push $0x0 10f8c0: 8d 45 f0 lea -0x10(%ebp),%eax 10f8c3: 50 push %eax 10f8c4: e8 93 7a ff ff call 10735c 10f8c9: 8b 45 f0 mov -0x10(%ebp),%eax 10f8cc: 89 43 40 mov %eax,0x40(%ebx) return 0; 10f8cf: 83 c4 10 add $0x10,%esp 10f8d2: 31 c0 xor %eax,%eax } 10f8d4: 8b 5d fc mov -0x4(%ebp),%ebx 10f8d7: c9 leave 10f8d8: c3 ret =============================================================================== 0010f8d9 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10f8d9: 55 push %ebp 10f8da: 89 e5 mov %esp,%ebp 10f8dc: 56 push %esi 10f8dd: 53 push %ebx 10f8de: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 10f8e1: 8b 73 18 mov 0x18(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 10f8e4: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 10f8e8: 75 1a jne 10f904 if (iop->offset > the_jnode->info.linearfile.size) 10f8ea: 8b 56 50 mov 0x50(%esi),%edx 10f8ed: 8b 46 54 mov 0x54(%esi),%eax 10f8f0: 39 43 10 cmp %eax,0x10(%ebx) 10f8f3: 7c 41 jl 10f936 <== NEVER TAKEN 10f8f5: 7f 05 jg 10f8fc <== NEVER TAKEN 10f8f7: 39 53 0c cmp %edx,0xc(%ebx) 10f8fa: 76 3a jbe 10f936 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 10f8fc: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 10f8ff: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 10f902: eb 32 jmp 10f936 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 10f904: 50 push %eax 10f905: ff 73 10 pushl 0x10(%ebx) 10f908: ff 73 0c pushl 0xc(%ebx) 10f90b: 56 push %esi 10f90c: e8 51 fc ff ff call 10f562 10f911: 83 c4 10 add $0x10,%esp 10f914: 85 c0 test %eax,%eax 10f916: 74 12 je 10f92a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 10f918: e8 af 09 00 00 call 1102cc <__errno> <== NOT EXECUTED 10f91d: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 10f923: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f926: 89 c2 mov %eax,%edx <== NOT EXECUTED 10f928: eb 12 jmp 10f93c <== NOT EXECUTED iop->size = the_jnode->info.file.size; 10f92a: 8b 46 50 mov 0x50(%esi),%eax 10f92d: 8b 56 54 mov 0x54(%esi),%edx 10f930: 89 43 04 mov %eax,0x4(%ebx) 10f933: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 10f936: 8b 43 0c mov 0xc(%ebx),%eax 10f939: 8b 53 10 mov 0x10(%ebx),%edx } 10f93c: 8d 65 f8 lea -0x8(%ebp),%esp 10f93f: 5b pop %ebx 10f940: 5e pop %esi 10f941: c9 leave 10f942: c3 ret =============================================================================== 0010f7f4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10f7f4: 55 push %ebp 10f7f5: 89 e5 mov %esp,%ebp 10f7f7: 56 push %esi 10f7f8: 53 push %ebx 10f7f9: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 10f7fc: 8b 5e 18 mov 0x18(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10f7ff: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 10f806: 74 54 je 10f85c && (the_jnode->type == IMFS_LINEAR_FILE)) { 10f808: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 10f80c: 75 4e jne 10f85c <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 10f80e: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 10f811: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 10f814: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 10f81b: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 10f822: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 10f829: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 10f830: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 10f837: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 10f83e: 85 c0 test %eax,%eax <== NOT EXECUTED 10f840: 74 1a je 10f85c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 10f842: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f845: 50 push %eax <== NOT EXECUTED 10f846: 52 push %edx <== NOT EXECUTED 10f847: 6a 00 push $0x0 <== NOT EXECUTED 10f849: 6a 00 push $0x0 <== NOT EXECUTED 10f84b: 53 push %ebx <== NOT EXECUTED 10f84c: e8 03 fe ff ff call 10f654 <== NOT EXECUTED 10f851: 89 c2 mov %eax,%edx <== NOT EXECUTED 10f853: 83 c4 20 add $0x20,%esp <== NOT EXECUTED return -1; 10f856: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 10f859: 42 inc %edx <== NOT EXECUTED 10f85a: 74 20 je 10f87c <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 10f85c: f6 46 15 02 testb $0x2,0x15(%esi) 10f860: 74 0c je 10f86e iop->offset = the_jnode->info.file.size; 10f862: 8b 43 50 mov 0x50(%ebx),%eax 10f865: 8b 53 54 mov 0x54(%ebx),%edx 10f868: 89 46 0c mov %eax,0xc(%esi) 10f86b: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 10f86e: 8b 43 50 mov 0x50(%ebx),%eax 10f871: 8b 53 54 mov 0x54(%ebx),%edx 10f874: 89 46 04 mov %eax,0x4(%esi) 10f877: 89 56 08 mov %edx,0x8(%esi) return 0; 10f87a: 31 c0 xor %eax,%eax } 10f87c: 8d 65 f8 lea -0x8(%ebp),%esp 10f87f: 5b pop %ebx 10f880: 5e pop %esi 10f881: c9 leave 10f882: c3 ret =============================================================================== 00107638 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 107638: 55 push %ebp 107639: 89 e5 mov %esp,%ebp 10763b: 57 push %edi 10763c: 56 push %esi 10763d: 53 push %ebx 10763e: 83 ec 3c sub $0x3c,%esp 107641: 8b 7d 08 mov 0x8(%ebp),%edi 107644: 8b 75 0c mov 0xc(%ebp),%esi 107647: 8b 55 10 mov 0x10(%ebp),%edx 10764a: 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) ) ) 10764d: f7 c6 00 f0 00 00 test $0xf000,%esi 107653: 75 10 jne 107665 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107655: e8 72 8c 00 00 call 1102cc <__errno> <== NOT EXECUTED 10765a: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107660: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107663: eb 5b jmp 1076c0 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107665: 50 push %eax 107666: 8d 5d cc lea -0x34(%ebp),%ebx 107669: 53 push %ebx 10766a: 8d 45 e4 lea -0x1c(%ebp),%eax 10766d: 50 push %eax 10766e: 57 push %edi 10766f: 89 55 c4 mov %edx,-0x3c(%ebp) 107672: 89 4d c0 mov %ecx,-0x40(%ebp) 107675: e8 de 08 00 00 call 107f58 result = (*temp_loc.ops->evalformake_h)( 10767a: 83 c4 0c add $0xc,%esp 10767d: 8d 45 e0 lea -0x20(%ebp),%eax 107680: 50 push %eax 107681: 53 push %ebx 107682: 03 7d e4 add -0x1c(%ebp),%edi 107685: 57 push %edi 107686: 8b 45 d8 mov -0x28(%ebp),%eax 107689: ff 50 04 call *0x4(%eax) 10768c: 89 c7 mov %eax,%edi &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 10768e: 83 c4 10 add $0x10,%esp return -1; 107691: 83 c8 ff or $0xffffffff,%eax result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107694: 85 ff test %edi,%edi 107696: 8b 55 c4 mov -0x3c(%ebp),%edx 107699: 8b 4d c0 mov -0x40(%ebp),%ecx 10769c: 75 22 jne 1076c0 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 10769e: 83 ec 0c sub $0xc,%esp 1076a1: 53 push %ebx 1076a2: 51 push %ecx 1076a3: 52 push %edx 1076a4: 56 push %esi 1076a5: ff 75 e0 pushl -0x20(%ebp) 1076a8: 8b 45 d8 mov -0x28(%ebp),%eax 1076ab: ff 50 14 call *0x14(%eax) rtems_filesystem_freenode( &temp_loc ); 1076ae: 83 c4 14 add $0x14,%esp 1076b1: 53 push %ebx 1076b2: 89 45 c4 mov %eax,-0x3c(%ebp) 1076b5: e8 16 fc ff ff call 1072d0 return result; 1076ba: 83 c4 10 add $0x10,%esp 1076bd: 8b 45 c4 mov -0x3c(%ebp),%eax } 1076c0: 8d 65 f4 lea -0xc(%ebp),%esp 1076c3: 5b pop %ebx 1076c4: 5e pop %esi 1076c5: 5f pop %edi 1076c6: c9 leave 1076c7: c3 ret =============================================================================== 00107751 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107751: 55 push %ebp 107752: 89 e5 mov %esp,%ebp 107754: 57 push %edi 107755: 56 push %esi 107756: 53 push %ebx 107757: 83 ec 4c sub $0x4c,%esp 10775a: 8b 75 08 mov 0x8(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 10775d: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107761: 77 15 ja 107778 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107763: 83 ec 0c sub $0xc,%esp 107766: ff 75 10 pushl 0x10(%ebp) 107769: e8 3d 6a 00 00 call 10e1ab 10776e: 89 45 b4 mov %eax,-0x4c(%ebp) if ( !mount_h ) 107771: 83 c4 10 add $0x10,%esp 107774: 85 c0 test %eax,%eax 107776: 75 10 jne 107788 rtems_set_errno_and_return_minus_one( EINVAL ); 107778: e8 4f 8b 00 00 call 1102cc <__errno> 10777d: c7 00 16 00 00 00 movl $0x16,(%eax) 107783: e9 dc 00 00 00 jmp 107864 { 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; 107788: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10778c: 0f 95 45 bf setne -0x41(%ebp) const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 107790: 8b 45 0c mov 0xc(%ebp),%eax 107793: 89 45 b8 mov %eax,-0x48(%ebp) 107796: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 10779a: 75 07 jne 1077a3 10779c: c7 45 b8 f0 d9 11 00 movl $0x11d9f0,-0x48(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 1077a3: 83 ca ff or $0xffffffff,%edx 1077a6: 31 c0 xor %eax,%eax 1077a8: 89 d1 mov %edx,%ecx 1077aa: 8b 7d 10 mov 0x10(%ebp),%edi 1077ad: f2 ae repnz scas %es:(%edi),%al 1077af: f7 d1 not %ecx 1077b1: 89 4d c0 mov %ecx,-0x40(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 1077b4: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1077bb: 85 f6 test %esi,%esi 1077bd: 74 0b je 1077ca 1077bf: 89 d1 mov %edx,%ecx 1077c1: 89 f7 mov %esi,%edi 1077c3: f2 ae repnz scas %es:(%edi),%al 1077c5: f7 d1 not %ecx 1077c7: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t target_length = strlen( target ); 1077ca: 31 c0 xor %eax,%eax 1077cc: 83 c9 ff or $0xffffffff,%ecx 1077cf: 8b 7d b8 mov -0x48(%ebp),%edi 1077d2: f2 ae repnz scas %es:(%edi),%al 1077d4: f7 d1 not %ecx 1077d6: 49 dec %ecx 1077d7: 89 4d b0 mov %ecx,-0x50(%ebp) 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 ); 1077da: 53 push %ebx 1077db: 53 push %ebx 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; 1077dc: 8b 55 c0 mov -0x40(%ebp),%edx 1077df: 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 ) 1077e3: 03 45 c4 add -0x3c(%ebp),%eax + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 1077e6: 50 push %eax 1077e7: 6a 01 push $0x1 1077e9: e8 3a f9 ff ff call 107128 1077ee: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 1077f0: 83 c4 10 add $0x10,%esp 1077f3: 85 c0 test %eax,%eax 1077f5: 74 62 je 107859 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 1077f7: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 1077fa: 51 push %ecx 1077fb: 51 push %ecx 1077fc: ff 75 10 pushl 0x10(%ebp) 1077ff: 57 push %edi 107800: e8 e3 96 00 00 call 110ee8 mt_entry->type = str; 107805: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 107808: 03 7d c0 add -0x40(%ebp),%edi if ( source_or_null != NULL ) { 10780b: 83 c4 10 add $0x10,%esp 10780e: 85 f6 test %esi,%esi 107810: 74 12 je 107824 strcpy( str, source_or_null ); 107812: 52 push %edx 107813: 52 push %edx 107814: 56 push %esi 107815: 57 push %edi 107816: e8 cd 96 00 00 call 110ee8 mt_entry->dev = str; 10781b: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 10781e: 03 7d c4 add -0x3c(%ebp),%edi 107821: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 107824: 50 push %eax 107825: 50 push %eax 107826: ff 75 b8 pushl -0x48(%ebp) 107829: 57 push %edi 10782a: e8 b9 96 00 00 call 110ee8 mt_entry->target = str; 10782f: 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; 107832: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107835: 8b 4d 14 mov 0x14(%ebp),%ecx 107838: 89 4b 30 mov %ecx,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 10783b: 8d 7b 38 lea 0x38(%ebx),%edi 10783e: be 30 da 11 00 mov $0x11da30,%esi 107843: b9 0c 00 00 00 mov $0xc,%ecx 107848: 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 ) { 10784a: 83 c4 10 add $0x10,%esp 10784d: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 107851: 0f 84 a3 00 00 00 je 1078fa 107857: eb 13 jmp 10786c target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107859: e8 6e 8a 00 00 call 1102cc <__errno> <== NOT EXECUTED 10785e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107864: 83 c8 ff or $0xffffffff,%eax 107867: e9 26 01 00 00 jmp 107992 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 10786c: 83 ec 0c sub $0xc,%esp 10786f: 6a 01 push $0x1 107871: 8d 75 d4 lea -0x2c(%ebp),%esi 107874: 56 push %esi 107875: 6a 07 push $0x7 107877: ff 75 b0 pushl -0x50(%ebp) 10787a: ff 75 0c pushl 0xc(%ebp) 10787d: e8 67 f9 ff ff call 1071e9 107882: 83 c4 20 add $0x20,%esp 107885: 40 inc %eax 107886: 0f 84 df 00 00 00 je 10796b <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 10788c: 83 ec 0c sub $0xc,%esp 10788f: 56 push %esi 107890: 8b 45 e0 mov -0x20(%ebp),%eax 107893: ff 50 10 call *0x10(%eax) 107896: 83 c4 10 add $0x10,%esp 107899: 48 dec %eax 10789a: 74 10 je 1078ac errno = ENOTDIR; 10789c: e8 2b 8a 00 00 call 1102cc <__errno> 1078a1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 1078a7: e9 c1 00 00 00 jmp 10796d /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 1078ac: 57 push %edi 1078ad: 57 push %edi 1078ae: ff 75 d4 pushl -0x2c(%ebp) 1078b1: 68 c8 76 10 00 push $0x1076c8 1078b6: e8 4e fe ff ff call 107709 1078bb: 83 c4 10 add $0x10,%esp 1078be: 84 c0 test %al,%al 1078c0: 74 10 je 1078d2 errno = EBUSY; 1078c2: e8 05 8a 00 00 call 1102cc <__errno> 1078c7: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 1078cd: e9 9b 00 00 00 jmp 10796d * 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; 1078d2: 8b 45 d4 mov -0x2c(%ebp),%eax 1078d5: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 1078d8: 8b 45 dc mov -0x24(%ebp),%eax 1078db: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 1078de: 8b 45 e0 mov -0x20(%ebp),%eax 1078e1: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 1078e4: 8b 55 e4 mov -0x1c(%ebp),%edx 1078e7: 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 ) ) { 1078ea: 83 ec 0c sub $0xc,%esp 1078ed: 53 push %ebx 1078ee: ff 50 20 call *0x20(%eax) 1078f1: 83 c4 10 add $0x10,%esp 1078f4: 85 c0 test %eax,%eax 1078f6: 74 1d je 107915 <== ALWAYS TAKEN 1078f8: eb 73 jmp 10796d <== NOT EXECUTED ) { 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; 1078fa: 31 f6 xor %esi,%esi } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 1078fc: 81 3d 34 0f 12 00 38 cmpl $0x120f38,0x120f34 107903: 0f 12 00 107906: 74 0d je 107915 <== ALWAYS TAKEN errno = EINVAL; 107908: e8 bf 89 00 00 call 1102cc <__errno> <== NOT EXECUTED 10790d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107913: eb 58 jmp 10796d <== NOT EXECUTED * 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 ) ) { 107915: 51 push %ecx 107916: 51 push %ecx 107917: ff 75 18 pushl 0x18(%ebp) 10791a: 53 push %ebx 10791b: ff 55 b4 call *-0x4c(%ebp) 10791e: 83 c4 10 add $0x10,%esp 107921: 85 c0 test %eax,%eax 107923: 74 0f je 107934 <== ALWAYS TAKEN /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 107925: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107928: 53 push %ebx <== NOT EXECUTED 107929: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10792c: ff 50 28 call *0x28(%eax) <== NOT EXECUTED goto cleanup_and_bail; 10792f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107932: eb 39 jmp 10796d <== NOT EXECUTED } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 107934: e8 a0 fd ff ff call 1076d9 107939: 52 push %edx 10793a: 52 push %edx 10793b: 53 push %ebx 10793c: 68 34 0f 12 00 push $0x120f34 107941: e8 9e 30 00 00 call 10a9e4 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 107946: e8 a8 fd ff ff call 1076f3 if ( !has_target ) 10794b: 83 c4 10 add $0x10,%esp rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 10794e: 31 c0 xor %eax,%eax */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107950: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 107954: 75 3c jne 107992 rtems_filesystem_root = mt_entry->mt_fs_root; 107956: 8b 3d 54 0f 12 00 mov 0x120f54,%edi 10795c: 83 c7 18 add $0x18,%edi 10795f: 8d 73 1c lea 0x1c(%ebx),%esi 107962: b9 05 00 00 00 mov $0x5,%ecx 107967: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107969: eb 27 jmp 107992 ) { 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; 10796b: 31 f6 xor %esi,%esi <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 10796d: 83 ec 0c sub $0xc,%esp 107970: 53 push %ebx 107971: e8 6e f9 ff ff call 1072e4 if ( loc_to_free ) 107976: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( loc_to_free ); return -1; 107979: 83 c8 ff or $0xffffffff,%eax cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) 10797c: 85 f6 test %esi,%esi 10797e: 74 12 je 107992 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 107980: 83 ec 0c sub $0xc,%esp 107983: 56 push %esi 107984: 89 45 ac mov %eax,-0x54(%ebp) 107987: e8 44 f9 ff ff call 1072d0 10798c: 83 c4 10 add $0x10,%esp 10798f: 8b 45 ac mov -0x54(%ebp),%eax return -1; } 107992: 8d 65 f4 lea -0xc(%ebp),%esp 107995: 5b pop %ebx 107996: 5e pop %esi 107997: 5f pop %edi 107998: c9 leave 107999: c3 ret =============================================================================== 00107cc8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107cc8: 55 push %ebp 107cc9: 89 e5 mov %esp,%ebp 107ccb: 57 push %edi 107ccc: 56 push %esi 107ccd: 53 push %ebx 107cce: 83 ec 1c sub $0x1c,%esp 107cd1: 8b 4d 08 mov 0x8(%ebp),%ecx 107cd4: 8b 5d 0c mov 0xc(%ebp),%ebx 107cd7: 8b 75 10 mov 0x10(%ebp),%esi 107cda: 8b 7d 14 mov 0x14(%ebp),%edi 107cdd: 8b 55 18 mov 0x18(%ebp),%edx int rv = -1; if (target != NULL) { 107ce0: 85 db test %ebx,%ebx 107ce2: 74 3b je 107d1f rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 107ce4: 50 push %eax 107ce5: 50 push %eax 107ce6: 68 ff 01 00 00 push $0x1ff 107ceb: 53 push %ebx 107cec: 89 55 e0 mov %edx,-0x20(%ebp) 107cef: 89 4d e4 mov %ecx,-0x1c(%ebp) 107cf2: e8 d1 08 00 00 call 1085c8 if (rv == 0) { 107cf7: 83 c4 10 add $0x10,%esp 107cfa: 85 c0 test %eax,%eax 107cfc: 8b 55 e0 mov -0x20(%ebp),%edx 107cff: 8b 4d e4 mov -0x1c(%ebp),%ecx 107d02: 75 29 jne 107d2d <== NEVER TAKEN rv = mount( 107d04: 89 55 18 mov %edx,0x18(%ebp) 107d07: 89 7d 14 mov %edi,0x14(%ebp) 107d0a: 89 75 10 mov %esi,0x10(%ebp) 107d0d: 89 5d 0c mov %ebx,0xc(%ebp) 107d10: 89 4d 08 mov %ecx,0x8(%ebp) } else { errno = EINVAL; } return rv; } 107d13: 8d 65 f4 lea -0xc(%ebp),%esp 107d16: 5b pop %ebx 107d17: 5e pop %esi 107d18: 5f pop %edi 107d19: c9 leave int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 107d1a: e9 a2 00 00 00 jmp 107dc1 options, data ); } } else { errno = EINVAL; 107d1f: e8 f8 8b 00 00 call 11091c <__errno> 107d24: c7 00 16 00 00 00 movl $0x16,(%eax) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 107d2a: 83 c8 ff or $0xffffffff,%eax } else { errno = EINVAL; } return rv; } 107d2d: 8d 65 f4 lea -0xc(%ebp),%esp 107d30: 5b pop %ebx 107d31: 5e pop %esi 107d32: 5f pop %edi 107d33: c9 leave 107d34: c3 ret =============================================================================== 001079f5 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 1079f5: 55 push %ebp 1079f6: 89 e5 mov %esp,%ebp 1079f8: 57 push %edi 1079f9: 56 push %esi 1079fa: 53 push %ebx 1079fb: 83 ec 1c sub $0x1c,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 1079fe: 83 3d ec 31 12 00 00 cmpl $0x0,0x1231ec 107a05: 75 14 jne 107a1b { _REENT = _global_impure_ptr; 107a07: a1 e0 e2 11 00 mov 0x11e2e0,%eax 107a0c: a3 e0 0f 12 00 mov %eax,0x120fe0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 107a11: c7 05 ec 31 12 00 e0 movl $0x120fe0,0x1231ec 107a18: 0f 12 00 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)); 107a1b: 83 ec 0c sub $0xc,%esp 107a1e: 68 24 04 00 00 push $0x424 107a23: e8 da 53 00 00 call 10ce02 <_Workspace_Allocate> 107a28: 89 c2 mov %eax,%edx #endif if (ptr) { 107a2a: 83 c4 10 add $0x10,%esp _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; return TRUE; } return FALSE; 107a2d: 31 c0 xor %eax,%eax * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 107a2f: 85 d2 test %edx,%edx 107a31: 0f 84 28 02 00 00 je 107c5f <== NEVER TAKEN _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 107a37: c7 02 00 00 00 00 movl $0x0,(%edx) 107a3d: 8d b2 ec 02 00 00 lea 0x2ec(%edx),%esi 107a43: 89 72 04 mov %esi,0x4(%edx) 107a46: 8d 8a 54 03 00 00 lea 0x354(%edx),%ecx 107a4c: 89 4a 08 mov %ecx,0x8(%edx) 107a4f: 8d 8a bc 03 00 00 lea 0x3bc(%edx),%ecx 107a55: 89 4a 0c mov %ecx,0xc(%edx) 107a58: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 107a5f: 8d 4a 14 lea 0x14(%edx),%ecx 107a62: bb 19 00 00 00 mov $0x19,%ebx 107a67: 89 cf mov %ecx,%edi 107a69: 89 d9 mov %ebx,%ecx 107a6b: f3 aa rep stos %al,%es:(%edi) 107a6d: 89 cb mov %ecx,%ebx 107a6f: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 107a76: c7 42 34 7e d7 11 00 movl $0x11d77e,0x34(%edx) 107a7d: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 107a84: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 107a8b: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 107a92: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 107a99: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 107aa0: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 107aa7: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 107aae: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 107ab5: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 107abc: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 107ac3: c6 42 60 00 movb $0x0,0x60(%edx) 107ac7: 8d 42 7c lea 0x7c(%edx),%eax 107aca: 89 45 e4 mov %eax,-0x1c(%ebp) 107acd: b1 09 mov $0x9,%cl 107acf: 89 c7 mov %eax,%edi 107ad1: 89 d8 mov %ebx,%eax 107ad3: f3 ab rep stos %eax,%es:(%edi) 107ad5: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 107adc: 00 00 00 107adf: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 107ae6: 00 00 00 107ae9: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 107af0: 00 00 00 107af3: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 107afa: 0e 33 107afc: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 107b03: cd ab 107b05: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 107b0c: 34 12 107b0e: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 107b15: 6d e6 107b17: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 107b1e: ec de 107b20: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 107b27: 05 00 107b29: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 107b30: 0b 00 107b32: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 107b39: 00 00 00 107b3c: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 107b43: 00 00 00 107b46: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 107b4d: 00 00 00 107b50: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 107b57: 00 00 00 107b5a: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 107b61: 00 00 00 107b64: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 107b6b: 00 00 00 107b6e: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 107b75: 00 00 00 107b78: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 107b7f: 00 00 00 107b82: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 107b89: 00 00 00 107b8c: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 107b93: 00 00 00 107b96: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 107b9d: 00 00 00 107ba0: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 107ba7: 00 00 00 107baa: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 107bb1: 00 00 00 107bb4: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 107bbb: 00 00 00 107bbe: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 107bc5: 00 00 00 107bc8: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 107bcf: 00 00 00 107bd2: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 107bd9: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 107be0: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 107be7: 00 00 00 107bea: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 107bf1: 00 00 00 107bf4: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 107bfb: 00 00 00 107bfe: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 107c05: 00 00 00 107c08: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 107c0f: 00 00 00 107c12: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 107c19: 00 00 00 107c1c: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 107c23: 00 00 00 107c26: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 107c2d: 00 00 00 107c30: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 107c37: 00 00 00 107c3a: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 107c41: 00 00 00 107c44: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 107c4b: 00 00 00 107c4e: b1 4e mov $0x4e,%cl 107c50: 89 f7 mov %esi,%edi 107c52: f3 ab rep stos %eax,%es:(%edi) creating_task->libc_reent = ptr; 107c54: 8b 45 0c mov 0xc(%ebp),%eax 107c57: 89 90 ec 00 00 00 mov %edx,0xec(%eax) return TRUE; 107c5d: b0 01 mov $0x1,%al } return FALSE; } 107c5f: 8d 65 f4 lea -0xc(%ebp),%esp 107c62: 5b pop %ebx 107c63: 5e pop %esi 107c64: 5f pop %edi 107c65: c9 leave 107c66: c3 ret =============================================================================== 00107c67 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 107c67: 55 push %ebp 107c68: 89 e5 mov %esp,%ebp 107c6a: 57 push %edi 107c6b: 56 push %esi 107c6c: 53 push %ebx 107c6d: 83 ec 0c sub $0xc,%esp 107c70: 8b 7d 08 mov 0x8(%ebp),%edi 107c73: 8b 75 0c mov 0xc(%ebp),%esi /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 107c76: 39 f7 cmp %esi,%edi 107c78: 75 08 jne 107c82 ptr = _REENT; 107c7a: 8b 1d e0 0f 12 00 mov 0x120fe0,%ebx 107c80: eb 06 jmp 107c88 } else { ptr = deleted_task->libc_reent; 107c82: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx } if (ptr && ptr != _global_impure_ptr) { 107c88: 85 db test %ebx,%ebx 107c8a: 74 20 je 107cac <== NEVER TAKEN 107c8c: 3b 1d e0 e2 11 00 cmp 0x11e2e0,%ebx 107c92: 74 18 je 107cac _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 107c94: 50 push %eax 107c95: 50 push %eax 107c96: 68 a4 79 10 00 push $0x1079a4 107c9b: 53 push %ebx 107c9c: e8 13 8e 00 00 call 110ab4 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 107ca1: 89 1c 24 mov %ebx,(%esp) 107ca4: e8 72 51 00 00 call 10ce1b <_Workspace_Free> 107ca9: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 107cac: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi) 107cb3: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 107cb6: 39 f7 cmp %esi,%edi 107cb8: 75 0a jne 107cc4 _REENT = 0; 107cba: c7 05 e0 0f 12 00 00 movl $0x0,0x120fe0 107cc1: 00 00 00 } } 107cc4: 8d 65 f4 lea -0xc(%ebp),%esp 107cc7: 5b pop %ebx 107cc8: 5e pop %esi 107cc9: 5f pop %edi 107cca: c9 leave 107ccb: c3 ret =============================================================================== 001079a4 : */ int newlib_free_buffers( FILE *fp ) { 1079a4: 55 push %ebp 1079a5: 89 e5 mov %esp,%ebp 1079a7: 53 push %ebx 1079a8: 83 ec 10 sub $0x10,%esp 1079ab: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 1079ae: 53 push %ebx 1079af: e8 ec 8c 00 00 call 1106a0 1079b4: 83 c4 10 add $0x10,%esp 1079b7: 83 f8 02 cmp $0x2,%eax 1079ba: 77 26 ja 1079e2 <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1079bc: f6 43 0c 80 testb $0x80,0xc(%ebx) 1079c0: 74 2c je 1079ee <== ALWAYS TAKEN free( fp->_bf._base ); 1079c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1079c5: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1079c8: e8 17 f9 ff ff call 1072e4 <== NOT EXECUTED fp->_flags &= ~__SMBF; 1079cd: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1079d3: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 1079d9: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 1079e0: eb 09 jmp 1079eb <== NOT EXECUTED } break; default: fclose(fp); 1079e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1079e5: 53 push %ebx <== NOT EXECUTED 1079e6: e8 39 8a 00 00 call 110424 <== NOT EXECUTED 1079eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 1079ee: 31 c0 xor %eax,%eax 1079f0: 8b 5d fc mov -0x4(%ebp),%ebx 1079f3: c9 leave 1079f4: c3 ret =============================================================================== 00107598 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 107598: 55 push %ebp 107599: 89 e5 mov %esp,%ebp 10759b: 53 push %ebx 10759c: 83 ec 04 sub $0x4,%esp 10759f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 1075a2: 80 3d c8 5e 12 00 00 cmpb $0x0,0x125ec8 1075a9: 75 2b jne 1075d6 initialized = 1; 1075ab: c6 05 c8 5e 12 00 01 movb $0x1,0x125ec8 status = rtems_io_register_name( 1075b2: 50 push %eax 1075b3: 6a 00 push $0x0 1075b5: 53 push %ebx 1075b6: 68 1c db 11 00 push $0x11db1c 1075bb: e8 0c 05 00 00 call 107acc "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1075c0: 83 c4 10 add $0x10,%esp 1075c3: 85 c0 test %eax,%eax 1075c5: 74 09 je 1075d0 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); 1075c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1075ca: 50 push %eax <== NOT EXECUTED 1075cb: e8 70 3f 00 00 call 10b540 <== NOT EXECUTED NULL_major = major; 1075d0: 89 1d d8 61 12 00 mov %ebx,0x1261d8 } return RTEMS_SUCCESSFUL; } 1075d6: 31 c0 xor %eax,%eax 1075d8: 8b 5d fc mov -0x4(%ebp),%ebx 1075db: c9 leave 1075dc: c3 ret =============================================================================== 001075f2 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 1075f2: 55 push %ebp 1075f3: 89 e5 mov %esp,%ebp 1075f5: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 1075f8: 85 c0 test %eax,%eax 1075fa: 74 06 je 107602 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 1075fc: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED 1075ff: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED return NULL_SUCCESSFUL; } 107602: 31 c0 xor %eax,%eax 107604: c9 leave 107605: c3 ret =============================================================================== 00107d2c : int open( const char *pathname, int flags, ... ) { 107d2c: 55 push %ebp 107d2d: 89 e5 mov %esp,%ebp 107d2f: 57 push %edi 107d30: 56 push %esi 107d31: 53 push %ebx 107d32: 83 ec 3c sub $0x3c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 107d35: 8b 45 0c mov 0xc(%ebp),%eax 107d38: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 107d39: 89 c6 mov %eax,%esi 107d3b: 83 e6 01 and $0x1,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; 107d3e: f7 de neg %esi 107d40: 83 e6 04 and $0x4,%esi if ( ( status & _FWRITE ) == _FWRITE ) 107d43: a8 02 test $0x2,%al 107d45: 74 03 je 107d4a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 107d47: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 107d4a: 8b 45 10 mov 0x10(%ebp),%eax 107d4d: 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(); 107d50: e8 3a 62 00 00 call 10df8f 107d55: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 107d57: 85 c0 test %eax,%eax 107d59: 0f 84 56 01 00 00 je 107eb5 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 107d5f: 83 c9 ff or $0xffffffff,%ecx 107d62: 8b 7d 08 mov 0x8(%ebp),%edi 107d65: 31 c0 xor %eax,%eax 107d67: f2 ae repnz scas %es:(%edi),%al 107d69: f7 d1 not %ecx 107d6b: 49 dec %ecx 107d6c: 83 ec 0c sub $0xc,%esp 107d6f: 6a 01 push $0x1 107d71: 8d 45 d4 lea -0x2c(%ebp),%eax 107d74: 50 push %eax 107d75: 56 push %esi 107d76: 51 push %ecx 107d77: ff 75 08 pushl 0x8(%ebp) 107d7a: e8 6a f4 ff ff call 1071e9 107d7f: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 107d81: 83 c4 20 add $0x20,%esp 107d84: 83 f8 ff cmp $0xffffffff,%eax 107d87: 75 6c jne 107df5 if ( errno != ENOENT ) { 107d89: e8 3e 85 00 00 call 1102cc <__errno> 107d8e: 83 38 02 cmpl $0x2,(%eax) 107d91: 75 27 jne 107dba rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 107d93: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 107d9a: 0f 84 1c 01 00 00 je 107ebc rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 107da0: 6a 00 push $0x0 107da2: 6a 00 push $0x0 107da4: 8b 45 c4 mov -0x3c(%ebp),%eax 107da7: 80 cc 80 or $0x80,%ah 107daa: 50 push %eax 107dab: ff 75 08 pushl 0x8(%ebp) 107dae: e8 85 f8 ff ff call 107638 if ( rc ) { 107db3: 83 c4 10 add $0x10,%esp 107db6: 85 c0 test %eax,%eax 107db8: 74 0e je 107dc8 <== ALWAYS TAKEN rc = errno; 107dba: e8 0d 85 00 00 call 1102cc <__errno> 107dbf: 8b 30 mov (%eax),%esi 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; 107dc1: 31 ff xor %edi,%edi /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; goto done; 107dc3: e9 10 01 00 00 jmp 107ed8 /* * 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( 107dc8: 89 f1 mov %esi,%ecx 107dca: 8b 7d 08 mov 0x8(%ebp),%edi 107dcd: 31 c0 xor %eax,%eax 107dcf: f2 ae repnz scas %es:(%edi),%al 107dd1: f7 d1 not %ecx 107dd3: 49 dec %ecx 107dd4: 83 ec 0c sub $0xc,%esp 107dd7: 6a 01 push $0x1 107dd9: 8d 45 d4 lea -0x2c(%ebp),%eax 107ddc: 50 push %eax 107ddd: 6a 00 push $0x0 107ddf: 51 push %ecx 107de0: ff 75 08 pushl 0x8(%ebp) 107de3: e8 01 f4 ff ff call 1071e9 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ 107de8: 83 c4 20 add $0x20,%esp 107deb: 85 c0 test %eax,%eax 107ded: 0f 85 d2 00 00 00 jne 107ec5 <== NEVER TAKEN 107df3: eb 13 jmp 107e08 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 107df5: 8b 45 0c mov 0xc(%ebp),%eax 107df8: 25 00 0a 00 00 and $0xa00,%eax 107dfd: 3d 00 0a 00 00 cmp $0xa00,%eax 107e02: 0f 84 c6 00 00 00 je 107ece /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); 107e08: 8b 73 14 mov 0x14(%ebx),%esi 107e0b: 83 ec 0c sub $0xc,%esp 107e0e: ff 75 0c pushl 0xc(%ebp) 107e11: e8 06 61 00 00 call 10df1c 107e16: 09 f0 or %esi,%eax 107e18: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 107e1b: 8d 7b 18 lea 0x18(%ebx),%edi 107e1e: 8d 75 d4 lea -0x2c(%ebp),%esi 107e21: b9 05 00 00 00 mov $0x5,%ecx 107e26: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); 107e28: 8b 43 20 mov 0x20(%ebx),%eax 107e2b: ff 75 c4 pushl -0x3c(%ebp) 107e2e: ff 75 0c pushl 0xc(%ebp) 107e31: ff 75 08 pushl 0x8(%ebp) 107e34: 53 push %ebx 107e35: ff 10 call *(%eax) if ( rc ) { 107e37: 83 c4 20 add $0x20,%esp 107e3a: 85 c0 test %eax,%eax 107e3c: 74 0f je 107e4d rc = errno; 107e3e: e8 89 84 00 00 call 1102cc <__errno> 107e43: 8b 30 mov (%eax),%esi rc = EEXIST; loc_to_free = &loc; goto done; } loc_to_free = &loc; 107e45: 8d 7d d4 lea -0x2c(%ebp),%edi iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; goto done; 107e48: e9 8b 00 00 00 jmp 107ed8 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 107e4d: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 107e54: 0f 84 ae 00 00 00 je 107f08 rc = ftruncate( iop - rtems_libio_iops, 0 ); 107e5a: 50 push %eax 107e5b: 6a 00 push $0x0 107e5d: 6a 00 push $0x0 107e5f: 89 d8 mov %ebx,%eax 107e61: 2b 05 18 30 12 00 sub 0x123018,%eax 107e67: c1 f8 03 sar $0x3,%eax 107e6a: 69 c0 b7 6d db b6 imul $0xb6db6db7,%eax,%eax 107e70: 50 push %eax 107e71: e8 de 5f 00 00 call 10de54 107e76: 89 c6 mov %eax,%esi if ( rc ) { 107e78: 83 c4 10 add $0x10,%esp 107e7b: 85 c0 test %eax,%eax 107e7d: 0f 84 85 00 00 00 je 107f08 if(errno) rc = errno; 107e83: e8 44 84 00 00 call 1102cc <__errno> 107e88: 83 38 00 cmpl $0x0,(%eax) 107e8b: 74 07 je 107e94 <== NEVER TAKEN 107e8d: e8 3a 84 00 00 call 1102cc <__errno> 107e92: 8b 30 mov (%eax),%esi close( iop - rtems_libio_iops ); 107e94: 83 ec 0c sub $0xc,%esp 107e97: 2b 1d 18 30 12 00 sub 0x123018,%ebx 107e9d: c1 fb 03 sar $0x3,%ebx 107ea0: 69 db b7 6d db b6 imul $0xb6db6db7,%ebx,%ebx 107ea6: 53 push %ebx 107ea7: e8 38 5f 00 00 call 10dde4 107eac: 83 c4 10 add $0x10,%esp /* those are released by close(): */ iop = 0; loc_to_free = NULL; 107eaf: 31 ff xor %edi,%edi 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; 107eb1: 31 db xor %ebx,%ebx 107eb3: eb 23 jmp 107ed8 */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; 107eb5: be 17 00 00 00 mov $0x17,%esi 107eba: eb 40 jmp 107efc 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; 107ebc: 31 ff xor %edi,%edi goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; 107ebe: be 02 00 00 00 mov $0x2,%esi 107ec3: eb 17 jmp 107edc 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; 107ec5: 31 ff xor %edi,%edi <== 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; 107ec7: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED 107ecc: eb 0e jmp 107edc <== 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; 107ece: 8d 7d d4 lea -0x2c(%ebp),%edi 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; 107ed1: be 11 00 00 00 mov $0x11,%esi 107ed6: eb 04 jmp 107edc * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { 107ed8: 85 f6 test %esi,%esi 107eda: 74 2c je 107f08 <== NEVER TAKEN if ( iop ) 107edc: 85 db test %ebx,%ebx 107ede: 74 0c je 107eec rtems_libio_free( iop ); 107ee0: 83 ec 0c sub $0xc,%esp 107ee3: 53 push %ebx 107ee4: e8 1f 61 00 00 call 10e008 107ee9: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 107eec: 85 ff test %edi,%edi 107eee: 74 0c je 107efc rtems_filesystem_freenode( loc_to_free ); 107ef0: 83 ec 0c sub $0xc,%esp 107ef3: 57 push %edi 107ef4: e8 d7 f3 ff ff call 1072d0 107ef9: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( rc ); 107efc: e8 cb 83 00 00 call 1102cc <__errno> 107f01: 89 30 mov %esi,(%eax) 107f03: 83 c8 ff or $0xffffffff,%eax 107f06: eb 0f jmp 107f17 } return iop - rtems_libio_iops; 107f08: 2b 1d 18 30 12 00 sub 0x123018,%ebx 107f0e: c1 fb 03 sar $0x3,%ebx 107f11: 69 c3 b7 6d db b6 imul $0xb6db6db7,%ebx,%eax } 107f17: 8d 65 f4 lea -0xc(%ebp),%esp 107f1a: 5b pop %ebx 107f1b: 5e pop %esi 107f1c: 5f pop %edi 107f1d: c9 leave 107f1e: c3 ret =============================================================================== 00108b83 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 108b83: 55 push %ebp 108b84: 89 e5 mov %esp,%ebp 108b86: 56 push %esi 108b87: 53 push %ebx 108b88: 83 ec 10 sub $0x10,%esp 108b8b: 89 d3 mov %edx,%ebx 108b8d: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 108b90: 8b 52 34 mov 0x34(%edx),%edx 108b93: f6 c2 01 test $0x1,%dl 108b96: 0f 84 ed 00 00 00 je 108c89 <== NEVER TAKEN switch (c) { 108b9c: 3c 09 cmp $0x9,%al 108b9e: 74 75 je 108c15 108ba0: 77 0d ja 108baf <== ALWAYS TAKEN 108ba2: 3c 08 cmp $0x8,%al <== NOT EXECUTED 108ba4: 0f 85 aa 00 00 00 jne 108c54 <== NOT EXECUTED 108baa: e9 98 00 00 00 jmp 108c47 <== NOT EXECUTED 108baf: 3c 0a cmp $0xa,%al 108bb1: 74 0a je 108bbd 108bb3: 3c 0d cmp $0xd,%al 108bb5: 0f 85 99 00 00 00 jne 108c54 <== ALWAYS TAKEN 108bbb: eb 32 jmp 108bef <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 108bbd: f6 c2 20 test $0x20,%dl 108bc0: 74 07 je 108bc9 <== ALWAYS TAKEN tty->column = 0; 108bc2: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 108bc9: 80 e2 04 and $0x4,%dl 108bcc: 0f 84 b7 00 00 00 je 108c89 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 108bd2: 56 push %esi 108bd3: 53 push %ebx 108bd4: 6a 01 push $0x1 108bd6: 68 60 da 11 00 push $0x11da60 108bdb: e8 83 fe ff ff call 108a63 tty->column = 0; 108be0: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) 108be7: 83 c4 10 add $0x10,%esp 108bea: e9 9a 00 00 00 jmp 108c89 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 108bef: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 108bf2: 74 0a je 108bfe <== NOT EXECUTED 108bf4: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED 108bf8: 0f 84 9b 00 00 00 je 108c99 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 108bfe: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 108c01: 74 09 je 108c0c <== NOT EXECUTED c = '\n'; 108c03: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 108c07: 80 e2 20 and $0x20,%dl <== NOT EXECUTED 108c0a: 74 7d je 108c89 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 108c0c: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED break; 108c13: eb 74 jmp 108c89 <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 108c15: 8b 4b 28 mov 0x28(%ebx),%ecx 108c18: 89 ce mov %ecx,%esi 108c1a: 83 e6 07 and $0x7,%esi 108c1d: b8 08 00 00 00 mov $0x8,%eax 108c22: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 108c24: 81 e2 00 18 00 00 and $0x1800,%edx 108c2a: 81 fa 00 18 00 00 cmp $0x1800,%edx 108c30: 8d 14 08 lea (%eax,%ecx,1),%edx 108c33: 75 0d jne 108c42 <== NEVER TAKEN tty->column += i; 108c35: 89 53 28 mov %edx,0x28(%ebx) rtems_termios_puts ( " ", i, tty); 108c38: 51 push %ecx 108c39: 53 push %ebx 108c3a: 50 push %eax 108c3b: 68 90 d6 11 00 push $0x11d690 108c40: eb 4f jmp 108c91 return; } tty->column += i; 108c42: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED break; 108c45: eb 42 jmp 108c89 <== NOT EXECUTED case '\b': if (tty->column > 0) 108c47: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108c4a: 85 c0 test %eax,%eax <== NOT EXECUTED 108c4c: 7e 3b jle 108c89 <== NOT EXECUTED tty->column--; 108c4e: 48 dec %eax <== NOT EXECUTED 108c4f: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED 108c52: eb 35 jmp 108c89 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 108c54: 80 e2 02 and $0x2,%dl 108c57: 74 1c je 108c75 <== ALWAYS TAKEN c = toupper(c); 108c59: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108c5c: 8b 15 c8 0f 12 00 mov 0x120fc8,%edx <== NOT EXECUTED 108c62: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED 108c67: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108c6a: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED 108c6d: 75 03 jne 108c72 <== NOT EXECUTED 108c6f: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED 108c72: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED if (!iscntrl(c)) 108c75: 0f b6 45 f4 movzbl -0xc(%ebp),%eax 108c79: 8b 15 c8 0f 12 00 mov 0x120fc8,%edx 108c7f: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1) 108c84: 75 03 jne 108c89 <== NEVER TAKEN tty->column++; 108c86: ff 43 28 incl 0x28(%ebx) break; } } rtems_termios_puts (&c, 1, tty); 108c89: 52 push %edx 108c8a: 53 push %ebx 108c8b: 6a 01 push $0x1 108c8d: 8d 45 f4 lea -0xc(%ebp),%eax 108c90: 50 push %eax 108c91: e8 cd fd ff ff call 108a63 108c96: 83 c4 10 add $0x10,%esp } 108c99: 8d 65 f8 lea -0x8(%ebp),%esp 108c9c: 5b pop %ebx 108c9d: 5e pop %esi 108c9e: c9 leave 108c9f: c3 ret =============================================================================== 0010ed58 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 10ed58: 55 push %ebp 10ed59: 89 e5 mov %esp,%ebp 10ed5b: 57 push %edi 10ed5c: 56 push %esi 10ed5d: 53 push %ebx 10ed5e: 83 ec 34 sub $0x34,%esp rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 10ed61: 68 ff 01 00 00 push $0x1ff 10ed66: 68 e8 f3 11 00 push $0x11f3e8 10ed6b: e8 24 14 00 00 call 110194 10ed70: 83 c4 10 add $0x10,%esp return -1; 10ed73: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp) ) { rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 10ed7a: 85 c0 test %eax,%eax 10ed7c: 0f 85 e8 00 00 00 jne 10ee6a <== NEVER TAKEN return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 10ed82: 8d 5d d9 lea -0x27(%ebp),%ebx 10ed85: be ed f3 11 00 mov $0x11f3ed,%esi 10ed8a: b9 0a 00 00 00 mov $0xa,%ecx 10ed8f: 89 df mov %ebx,%edi 10ed91: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 10ed93: 0f b7 05 64 4f 12 00 movzwl 0x124f64,%eax 10ed9a: 8d 50 01 lea 0x1(%eax),%edx 10ed9d: 66 89 15 64 4f 12 00 mov %dx,0x124f64 10eda4: 57 push %edi 10eda5: 50 push %eax 10eda6: 68 f8 f3 11 00 push $0x11f3f8 10edab: 8d 45 e3 lea -0x1d(%ebp),%eax 10edae: 50 push %eax 10edaf: e8 20 33 00 00 call 1120d4 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 10edb4: 59 pop %ecx 10edb5: 5e pop %esi 10edb6: 68 80 01 00 00 push $0x180 10edbb: 53 push %ebx 10edbc: e8 97 11 00 00 call 10ff58 10edc1: 83 c4 10 add $0x10,%esp 10edc4: 85 c0 test %eax,%eax 10edc6: 74 0a je 10edd2 if (errno != EEXIST){ 10edc8: e8 1b 29 00 00 call 1116e8 <__errno> 10edcd: e9 98 00 00 00 jmp 10ee6a 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); 10edd2: 52 push %edx 10edd3: 52 push %edx 10edd4: 68 00 40 00 00 push $0x4000 10edd9: 53 push %ebx 10edda: e8 9d 9f ff ff call 108d7c 10eddf: 8b 55 08 mov 0x8(%ebp),%edx 10ede2: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 10ede4: 83 c4 10 add $0x10,%esp 10ede7: 85 c0 test %eax,%eax 10ede9: 79 0d jns 10edf8 err = errno; 10edeb: e8 f8 28 00 00 call 1116e8 <__errno> 10edf0: 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); 10edf2: 83 ec 0c sub $0xc,%esp 10edf5: 53 push %ebx 10edf6: eb 51 jmp 10ee49 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 10edf8: 31 d2 xor %edx,%edx 10edfa: 3b 05 84 12 12 00 cmp 0x121284,%eax 10ee00: 73 09 jae 10ee0b <== NEVER TAKEN 10ee02: 6b d0 38 imul $0x38,%eax,%edx 10ee05: 03 15 60 51 12 00 add 0x125160,%edx iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10ee0b: 83 62 14 fe andl $0xfffffffe,0x14(%edx) filsdes[1] = open(fifopath, O_WRONLY); 10ee0f: 50 push %eax 10ee10: 50 push %eax 10ee11: 6a 01 push $0x1 10ee13: 8d 45 d9 lea -0x27(%ebp),%eax 10ee16: 50 push %eax 10ee17: e8 60 9f ff ff call 108d7c 10ee1c: 8b 55 08 mov 0x8(%ebp),%edx 10ee1f: 89 42 04 mov %eax,0x4(%edx) if (filsdes[1] < 0) { 10ee22: 83 c4 10 add $0x10,%esp int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; 10ee25: 31 f6 xor %esi,%esi iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { 10ee27: 85 c0 test %eax,%eax 10ee29: 79 17 jns 10ee42 err = errno; 10ee2b: e8 b8 28 00 00 call 1116e8 <__errno> 10ee30: 8b 30 mov (%eax),%esi close(filsdes[0]); 10ee32: 83 ec 0c sub $0xc,%esp 10ee35: 8b 45 08 mov 0x8(%ebp),%eax 10ee38: ff 30 pushl (%eax) 10ee3a: e8 1d 91 ff ff call 107f5c 10ee3f: 83 c4 10 add $0x10,%esp } unlink(fifopath); 10ee42: 83 ec 0c sub $0xc,%esp 10ee45: 8d 45 d9 lea -0x27(%ebp),%eax 10ee48: 50 push %eax 10ee49: e8 7e bb ff ff call 10a9cc 10ee4e: 83 c4 10 add $0x10,%esp } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; 10ee51: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) err = errno; close(filsdes[0]); } unlink(fifopath); } if(err != 0) 10ee58: 85 f6 test %esi,%esi 10ee5a: 74 0e je 10ee6a rtems_set_errno_and_return_minus_one(err); 10ee5c: e8 87 28 00 00 call 1116e8 <__errno> 10ee61: 89 30 mov %esi,(%eax) 10ee63: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp) return 0; } 10ee6a: 8b 45 d4 mov -0x2c(%ebp),%eax 10ee6d: 8d 65 f4 lea -0xc(%ebp),%esp 10ee70: 5b pop %ebx 10ee71: 5e pop %esi 10ee72: 5f pop %edi 10ee73: c9 leave 10ee74: c3 ret =============================================================================== 0010f90d : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10f90d: 55 push %ebp 10f90e: 89 e5 mov %esp,%ebp 10f910: 56 push %esi 10f911: 53 push %ebx 10f912: 8b 5d 08 mov 0x8(%ebp),%ebx 10f915: 8b 75 10 mov 0x10(%ebp),%esi *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 10f918: b8 ea ff ff ff mov $0xffffffea,%eax uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 10f91d: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) 10f924: 75 36 jne 10f95c if (buffer == NULL) return -EFAULT; 10f926: b0 f2 mov $0xf2,%al void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 10f928: 85 f6 test %esi,%esi 10f92a: 74 30 je 10f95c return -EFAULT; if (! PIPE_LOCK(pipe)) 10f92c: 50 push %eax 10f92d: 6a 00 push $0x0 10f92f: 6a 00 push $0x0 10f931: ff 73 28 pushl 0x28(%ebx) 10f934: e8 97 ba ff ff call 10b3d0 10f939: 89 c2 mov %eax,%edx 10f93b: 83 c4 10 add $0x10,%esp return -EINTR; 10f93e: b8 fc ff ff ff mov $0xfffffffc,%eax { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 10f943: 85 d2 test %edx,%edx 10f945: 75 15 jne 10f95c <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 10f947: 8b 43 0c mov 0xc(%ebx),%eax 10f94a: 89 06 mov %eax,(%esi) PIPE_UNLOCK(pipe); 10f94c: 83 ec 0c sub $0xc,%esp 10f94f: ff 73 28 pushl 0x28(%ebx) 10f952: e8 65 bb ff ff call 10b4bc return 0; 10f957: 83 c4 10 add $0x10,%esp 10f95a: 31 c0 xor %eax,%eax } return -EINVAL; } 10f95c: 8d 65 f8 lea -0x8(%ebp),%esp 10f95f: 5b pop %ebx 10f960: 5e pop %esi 10f961: c9 leave 10f962: c3 ret =============================================================================== 0010f14c : free(pipe->Buffer); free(pipe); } static rtems_status_code pipe_lock(void) { 10f14c: 55 push %ebp 10f14d: 89 e5 mov %esp,%ebp 10f14f: 53 push %ebx 10f150: 83 ec 04 sub $0x4,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 10f153: 83 3d 68 4f 12 00 00 cmpl $0x0,0x124f68 10f15a: 75 55 jne 10f1b1 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 ); 10f15c: 52 push %edx 10f15d: 6a 00 push $0x0 10f15f: 6a 00 push $0x0 10f161: ff 35 68 51 12 00 pushl 0x125168 10f167: e8 64 c2 ff ff call 10b3d0 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 10f16c: 83 c4 10 add $0x10,%esp free(pipe); } static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 10f16f: 31 db xor %ebx,%ebx if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 10f171: 83 3d 68 4f 12 00 00 cmpl $0x0,0x124f68 10f178: 75 1d jne 10f197 <== NEVER TAKEN sc = rtems_semaphore_create( 10f17a: 83 ec 0c sub $0xc,%esp 10f17d: 68 68 4f 12 00 push $0x124f68 10f182: 6a 00 push $0x0 10f184: 6a 54 push $0x54 10f186: 6a 01 push $0x1 10f188: 68 45 50 49 50 push $0x50495045 10f18d: e8 16 c0 ff ff call 10b1a8 10f192: 89 c3 mov %eax,%ebx 10f194: 83 c4 20 add $0x20,%esp } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10f197: 83 ec 0c sub $0xc,%esp 10f19a: ff 35 68 51 12 00 pushl 0x125168 10f1a0: e8 17 c3 ff ff call 10b4bc } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 10f1a5: 83 c4 10 add $0x10,%esp } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 10f1a8: b8 f4 ff ff ff mov $0xfffffff4,%eax } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 10f1ad: 85 db test %ebx,%ebx 10f1af: 75 1d jne 10f1ce sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10f1b1: 50 push %eax 10f1b2: 6a 00 push $0x0 10f1b4: 6a 00 push $0x0 10f1b6: ff 35 68 4f 12 00 pushl 0x124f68 10f1bc: e8 0f c2 ff ff call 10b3d0 } if (sc == RTEMS_SUCCESSFUL) { 10f1c1: 83 c4 10 add $0x10,%esp return 0; } else { return -ENOMEM; 10f1c4: 83 f8 01 cmp $0x1,%eax 10f1c7: 19 c0 sbb %eax,%eax 10f1c9: f7 d0 not %eax 10f1cb: 83 e0 f4 and $0xfffffff4,%eax } } 10f1ce: 8b 5d fc mov -0x4(%ebp),%ebx 10f1d1: c9 leave 10f1d2: c3 ret =============================================================================== 0010f60a : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f60a: 55 push %ebp 10f60b: 89 e5 mov %esp,%ebp 10f60d: 57 push %edi 10f60e: 56 push %esi 10f60f: 53 push %ebx 10f610: 83 ec 30 sub $0x30,%esp 10f613: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f616: 6a 00 push $0x0 10f618: 6a 00 push $0x0 10f61a: ff 73 28 pushl 0x28(%ebx) 10f61d: e8 ae bd ff ff call 10b3d0 10f622: 83 c4 10 add $0x10,%esp return -EINTR; 10f625: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f62c: 85 c0 test %eax,%eax 10f62e: 0f 85 2f 01 00 00 jne 10f763 <== NEVER TAKEN 10f634: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 10f63b: e9 f0 00 00 00 jmp 10f730 return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10f640: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f644: 0f 84 f2 00 00 00 je 10f73c goto out_locked; if (LIBIO_NODELAY(iop)) { 10f64a: 8b 45 14 mov 0x14(%ebp),%eax 10f64d: f6 40 14 01 testb $0x1,0x14(%eax) 10f651: 0f 85 e9 00 00 00 jne 10f740 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f657: ff 43 18 incl 0x18(%ebx) PIPE_UNLOCK(pipe); 10f65a: 83 ec 0c sub $0xc,%esp 10f65d: ff 73 28 pushl 0x28(%ebx) 10f660: e8 57 be ff ff call 10b4bc if (! PIPE_READWAIT(pipe)) 10f665: 59 pop %ecx 10f666: 5e pop %esi 10f667: 6a 00 push $0x0 10f669: ff 73 2c pushl 0x2c(%ebx) 10f66c: e8 b7 0e 00 00 call 110528 10f671: 83 c4 0c add $0xc,%esp 10f674: 83 f8 01 cmp $0x1,%eax 10f677: 19 f6 sbb %esi,%esi 10f679: f7 d6 not %esi 10f67b: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f67e: 6a 00 push $0x0 10f680: 6a 00 push $0x0 10f682: ff 73 28 pushl 0x28(%ebx) 10f685: e8 46 bd ff ff call 10b3d0 10f68a: 83 c4 10 add $0x10,%esp 10f68d: 85 c0 test %eax,%eax 10f68f: 0f 85 c0 00 00 00 jne 10f755 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f695: ff 4b 18 decl 0x18(%ebx) if (ret != 0) 10f698: 85 f6 test %esi,%esi 10f69a: 0f 85 a5 00 00 00 jne 10f745 <== NEVER TAKEN if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f6a0: 8b 53 0c mov 0xc(%ebx),%edx 10f6a3: 85 d2 test %edx,%edx 10f6a5: 74 99 je 10f640 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f6a7: 8b 45 10 mov 0x10(%ebp),%eax 10f6aa: 2b 45 d4 sub -0x2c(%ebp),%eax 10f6ad: 89 55 d0 mov %edx,-0x30(%ebp) 10f6b0: 39 c2 cmp %eax,%edx 10f6b2: 76 03 jbe 10f6b7 10f6b4: 89 45 d0 mov %eax,-0x30(%ebp) chunk1 = pipe->Size - pipe->Start; 10f6b7: 8b 73 08 mov 0x8(%ebx),%esi 10f6ba: 8b 43 04 mov 0x4(%ebx),%eax 10f6bd: 29 f0 sub %esi,%eax if (chunk > chunk1) { 10f6bf: 39 45 d0 cmp %eax,-0x30(%ebp) 10f6c2: 8b 7d 0c mov 0xc(%ebp),%edi 10f6c5: 8b 4d d4 mov -0x2c(%ebp),%ecx 10f6c8: 8d 14 0f lea (%edi,%ecx,1),%edx 10f6cb: 7e 1b jle 10f6e8 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10f6cd: 03 33 add (%ebx),%esi 10f6cf: 89 d7 mov %edx,%edi 10f6d1: 89 c1 mov %eax,%ecx 10f6d3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f6d5: 8b 55 d4 mov -0x2c(%ebp),%edx 10f6d8: 01 c2 add %eax,%edx 10f6da: 03 55 0c add 0xc(%ebp),%edx 10f6dd: 8b 4d d0 mov -0x30(%ebp),%ecx 10f6e0: 29 c1 sub %eax,%ecx 10f6e2: 8b 33 mov (%ebx),%esi 10f6e4: 89 d7 mov %edx,%edi 10f6e6: eb 07 jmp 10f6ef } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f6e8: 03 33 add (%ebx),%esi 10f6ea: 89 d7 mov %edx,%edi 10f6ec: 8b 4d d0 mov -0x30(%ebp),%ecx 10f6ef: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start += chunk; 10f6f1: 8b 45 d0 mov -0x30(%ebp),%eax 10f6f4: 03 43 08 add 0x8(%ebx),%eax pipe->Start %= pipe->Size; 10f6f7: 31 d2 xor %edx,%edx 10f6f9: f7 73 04 divl 0x4(%ebx) 10f6fc: 89 53 08 mov %edx,0x8(%ebx) pipe->Length -= chunk; 10f6ff: 8b 43 0c mov 0xc(%ebx),%eax 10f702: 2b 45 d0 sub -0x30(%ebp),%eax 10f705: 89 43 0c mov %eax,0xc(%ebx) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f708: 85 c0 test %eax,%eax 10f70a: 75 07 jne 10f713 pipe->Start = 0; 10f70c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 10f713: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10f717: 74 11 je 10f72a PIPE_WAKEUPWRITERS(pipe); 10f719: 52 push %edx 10f71a: 52 push %edx 10f71b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f71e: 50 push %eax 10f71f: ff 73 30 pushl 0x30(%ebx) 10f722: e8 a9 0d 00 00 call 1104d0 10f727: 83 c4 10 add $0x10,%esp read += chunk; 10f72a: 8b 4d d0 mov -0x30(%ebp),%ecx 10f72d: 01 4d d4 add %ecx,-0x2c(%ebp) int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f730: 8b 7d 10 mov 0x10(%ebp),%edi 10f733: 39 7d d4 cmp %edi,-0x2c(%ebp) 10f736: 0f 82 64 ff ff ff jb 10f6a0 while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 10f73c: 31 f6 xor %esi,%esi 10f73e: eb 05 jmp 10f745 goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 10f740: be f5 ff ff ff mov $0xfffffff5,%esi PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f745: 83 ec 0c sub $0xc,%esp 10f748: ff 73 28 pushl 0x28(%ebx) 10f74b: e8 6c bd ff ff call 10b4bc 10f750: 83 c4 10 add $0x10,%esp 10f753: eb 05 jmp 10f75a PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 10f755: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 10f75a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10f75e: 7f 03 jg 10f763 return read; return ret; 10f760: 89 75 d4 mov %esi,-0x2c(%ebp) } 10f763: 8b 45 d4 mov -0x2c(%ebp),%eax 10f766: 8d 65 f4 lea -0xc(%ebp),%esp 10f769: 5b pop %ebx 10f76a: 5e pop %esi 10f76b: 5f pop %edi 10f76c: c9 leave 10f76d: c3 ret =============================================================================== 0010f235 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f235: 55 push %ebp 10f236: 89 e5 mov %esp,%ebp 10f238: 57 push %edi 10f239: 56 push %esi 10f23a: 53 push %ebx 10f23b: 83 ec 1c sub $0x1c,%esp 10f23e: 8b 7d 08 mov 0x8(%ebp),%edi pipe_control_t *pipe = *pipep; 10f241: 8b 1f mov (%edi),%ebx uint32_t mode; if (pipe_lock()) 10f243: e8 04 ff ff ff call 10f14c 10f248: 85 c0 test %eax,%eax 10f24a: 75 14 jne 10f260 <== NEVER TAKEN /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) 10f24c: 50 push %eax 10f24d: 6a 00 push $0x0 10f24f: 6a 00 push $0x0 10f251: ff 73 28 pushl 0x28(%ebx) 10f254: e8 77 c1 ff ff call 10b3d0 10f259: 83 c4 10 add $0x10,%esp 10f25c: 85 c0 test %eax,%eax 10f25e: 74 0d je 10f26d <== ALWAYS TAKEN /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 10f260: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f263: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 10f268: e8 df c6 ff ff call 10b94c <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); 10f26d: 8b 45 0c mov 0xc(%ebp),%eax 10f270: 8b 40 14 mov 0x14(%eax),%eax 10f273: 89 c6 mov %eax,%esi 10f275: 83 e6 06 and $0x6,%esi if (mode & LIBIO_FLAGS_READ) 10f278: a8 02 test $0x2,%al 10f27a: 74 03 je 10f27f pipe->Readers --; 10f27c: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 10f27f: f7 c6 04 00 00 00 test $0x4,%esi 10f285: 74 03 je 10f28a pipe->Writers --; 10f287: ff 4b 14 decl 0x14(%ebx) PIPE_UNLOCK(pipe); 10f28a: 83 ec 0c sub $0xc,%esp 10f28d: ff 73 28 pushl 0x28(%ebx) 10f290: e8 27 c2 ff ff call 10b4bc if (pipe->Readers == 0 && pipe->Writers == 0) { 10f295: 8b 43 10 mov 0x10(%ebx),%eax 10f298: 83 c4 10 add $0x10,%esp 10f29b: 85 c0 test %eax,%eax 10f29d: 75 15 jne 10f2b4 10f29f: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f2a3: 75 0f jne 10f2b4 #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 10f2a5: 89 d8 mov %ebx,%eax 10f2a7: e8 27 ff ff ff call 10f1d3 *pipep = NULL; 10f2ac: c7 07 00 00 00 00 movl $0x0,(%edi) 10f2b2: eb 30 jmp 10f2e4 } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f2b4: 83 fe 04 cmp $0x4,%esi 10f2b7: 74 0f je 10f2c8 10f2b9: 85 c0 test %eax,%eax 10f2bb: 75 0b jne 10f2c8 <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10f2bd: 56 push %esi 10f2be: 56 push %esi 10f2bf: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2c2: 50 push %eax 10f2c3: ff 73 30 pushl 0x30(%ebx) 10f2c6: eb 14 jmp 10f2dc else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10f2c8: 83 fe 02 cmp $0x2,%esi 10f2cb: 74 17 je 10f2e4 <== NEVER TAKEN 10f2cd: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10f2d1: 75 11 jne 10f2e4 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 10f2d3: 51 push %ecx 10f2d4: 51 push %ecx 10f2d5: 8d 45 e4 lea -0x1c(%ebp),%eax 10f2d8: 50 push %eax 10f2d9: ff 73 2c pushl 0x2c(%ebx) 10f2dc: e8 ef 11 00 00 call 1104d0 10f2e1: 83 c4 10 add $0x10,%esp pipe_unlock(); 10f2e4: e8 25 ff ff ff call 10f20e if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10f2e9: 31 c0 xor %eax,%eax 10f2eb: 8d 65 f4 lea -0xc(%ebp),%esp 10f2ee: 5b pop %ebx 10f2ef: 5e pop %esi 10f2f0: 5f pop %edi 10f2f1: c9 leave 10f2f2: c3 ret =============================================================================== 0010f20e : return -ENOMEM; } } static void pipe_unlock(void) { 10f20e: 55 push %ebp 10f20f: 89 e5 mov %esp,%ebp 10f211: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 10f214: ff 35 68 4f 12 00 pushl 0x124f68 10f21a: e8 9d c2 ff ff call 10b4bc if (sc != RTEMS_SUCCESSFUL) { 10f21f: 83 c4 10 add $0x10,%esp 10f222: 85 c0 test %eax,%eax 10f224: 74 0d je 10f233 <== ALWAYS TAKEN /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 10f226: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f229: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 10f22e: e8 19 c7 ff ff call 10b94c <== NOT EXECUTED } } 10f233: c9 leave 10f234: c3 ret =============================================================================== 0010f76e : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10f76e: 55 push %ebp 10f76f: 89 e5 mov %esp,%ebp 10f771: 57 push %edi 10f772: 56 push %esi 10f773: 53 push %ebx 10f774: 83 ec 2c sub $0x2c,%esp 10f777: 8b 5d 08 mov 0x8(%ebp),%ebx int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 10f77a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10f781: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f785: 0f 84 77 01 00 00 je 10f902 <== NEVER TAKEN return 0; if (! PIPE_LOCK(pipe)) 10f78b: 51 push %ecx 10f78c: 6a 00 push $0x0 10f78e: 6a 00 push $0x0 10f790: ff 73 28 pushl 0x28(%ebx) 10f793: e8 38 bc ff ff call 10b3d0 10f798: 83 c4 10 add $0x10,%esp return -EINTR; 10f79b: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 10f7a2: 85 c0 test %eax,%eax 10f7a4: 0f 85 58 01 00 00 jne 10f902 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { 10f7aa: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f7ae: 0f 84 16 01 00 00 je 10f8ca ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10f7b4: bf 01 00 00 00 mov $0x1,%edi 10f7b9: 8b 45 10 mov 0x10(%ebp),%eax 10f7bc: 3b 43 04 cmp 0x4(%ebx),%eax 10f7bf: 77 02 ja 10f7c3 <== NEVER TAKEN 10f7c1: 89 c7 mov %eax,%edi /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; 10f7c3: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 10f7ca: e9 eb 00 00 00 jmp 10f8ba /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10f7cf: 8b 4d 14 mov 0x14(%ebp),%ecx 10f7d2: f6 41 14 01 testb $0x1,0x14(%ecx) 10f7d6: 0f 85 fc 00 00 00 jne 10f8d8 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10f7dc: ff 43 1c incl 0x1c(%ebx) PIPE_UNLOCK(pipe); 10f7df: 83 ec 0c sub $0xc,%esp 10f7e2: ff 73 28 pushl 0x28(%ebx) 10f7e5: e8 d2 bc ff ff call 10b4bc if (! PIPE_WRITEWAIT(pipe)) 10f7ea: 58 pop %eax 10f7eb: 5a pop %edx 10f7ec: 6a 00 push $0x0 10f7ee: ff 73 30 pushl 0x30(%ebx) 10f7f1: e8 32 0d 00 00 call 110528 10f7f6: 83 c4 0c add $0xc,%esp 10f7f9: 83 f8 01 cmp $0x1,%eax 10f7fc: 19 f6 sbb %esi,%esi 10f7fe: f7 d6 not %esi 10f800: 83 e6 fc and $0xfffffffc,%esi ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f803: 6a 00 push $0x0 10f805: 6a 00 push $0x0 10f807: ff 73 28 pushl 0x28(%ebx) 10f80a: e8 c1 bb ff ff call 10b3d0 10f80f: 83 c4 10 add $0x10,%esp 10f812: 85 c0 test %eax,%eax 10f814: 0f 85 da 00 00 00 jne 10f8f4 <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10f81a: ff 4b 1c decl 0x1c(%ebx) if (ret != 0) 10f81d: 85 f6 test %esi,%esi 10f81f: 0f 85 bf 00 00 00 jne 10f8e4 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { 10f825: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10f829: 0f 84 b0 00 00 00 je 10f8df <== NEVER TAKEN /* 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) { 10f82f: 8b 73 04 mov 0x4(%ebx),%esi 10f832: 8b 43 0c mov 0xc(%ebx),%eax 10f835: 89 f1 mov %esi,%ecx 10f837: 29 c1 sub %eax,%ecx 10f839: 39 f9 cmp %edi,%ecx 10f83b: 72 92 jb 10f7cf ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10f83d: 8b 55 10 mov 0x10(%ebp),%edx 10f840: 2b 55 d4 sub -0x2c(%ebp),%edx 10f843: 89 4d d0 mov %ecx,-0x30(%ebp) 10f846: 39 d1 cmp %edx,%ecx 10f848: 76 03 jbe 10f84d 10f84a: 89 55 d0 mov %edx,-0x30(%ebp) chunk1 = pipe->Size - PIPE_WSTART(pipe); 10f84d: 03 43 08 add 0x8(%ebx),%eax 10f850: 31 d2 xor %edx,%edx 10f852: f7 f6 div %esi 10f854: 29 d6 sub %edx,%esi 10f856: 89 75 cc mov %esi,-0x34(%ebp) if (chunk > chunk1) { 10f859: 39 75 d0 cmp %esi,-0x30(%ebp) 10f85c: 8b 4d 0c mov 0xc(%ebp),%ecx 10f85f: 8b 45 d4 mov -0x2c(%ebp),%eax 10f862: 8d 34 01 lea (%ecx,%eax,1),%esi 10f865: 7e 20 jle 10f887 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10f867: 8b 03 mov (%ebx),%eax 10f869: 01 d0 add %edx,%eax 10f86b: 89 c7 mov %eax,%edi 10f86d: 8b 4d cc mov -0x34(%ebp),%ecx 10f870: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10f872: 8b 03 mov (%ebx),%eax 10f874: 8b 4d d0 mov -0x30(%ebp),%ecx 10f877: 2b 4d cc sub -0x34(%ebp),%ecx 10f87a: 8b 75 cc mov -0x34(%ebp),%esi 10f87d: 03 75 d4 add -0x2c(%ebp),%esi 10f880: 03 75 0c add 0xc(%ebp),%esi 10f883: 89 c7 mov %eax,%edi 10f885: eb 09 jmp 10f890 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10f887: 8b 03 mov (%ebx),%eax 10f889: 01 d0 add %edx,%eax 10f88b: 89 c7 mov %eax,%edi 10f88d: 8b 4d d0 mov -0x30(%ebp),%ecx 10f890: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Length += chunk; 10f892: 8b 45 d0 mov -0x30(%ebp),%eax 10f895: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 10f898: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10f89c: 74 11 je 10f8af PIPE_WAKEUPREADERS(pipe); 10f89e: 57 push %edi 10f89f: 57 push %edi 10f8a0: 8d 4d e4 lea -0x1c(%ebp),%ecx 10f8a3: 51 push %ecx 10f8a4: ff 73 2c pushl 0x2c(%ebx) 10f8a7: e8 24 0c 00 00 call 1104d0 10f8ac: 83 c4 10 add $0x10,%esp written += chunk; 10f8af: 8b 45 d0 mov -0x30(%ebp),%eax 10f8b2: 01 45 d4 add %eax,-0x2c(%ebp) /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 10f8b5: bf 01 00 00 00 mov $0x1,%edi } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f8ba: 8b 4d 10 mov 0x10(%ebp),%ecx 10f8bd: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10f8c0: 0f 82 69 ff ff ff jb 10f82f 10f8c6: 31 f6 xor %esi,%esi 10f8c8: eb 1a jmp 10f8e4 if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; 10f8ca: 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; 10f8cf: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 10f8d6: eb 0c jmp 10f8e4 chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 10f8d8: be f5 ff ff ff mov $0xfffffff5,%esi 10f8dd: eb 05 jmp 10f8e4 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 10f8df: 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); 10f8e4: 83 ec 0c sub $0xc,%esp 10f8e7: ff 73 28 pushl 0x28(%ebx) 10f8ea: e8 cd bb ff ff call 10b4bc 10f8ef: 83 c4 10 add $0x10,%esp 10f8f2: eb 05 jmp 10f8f9 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 10f8f4: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 10f8f9: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10f8fd: 7f 03 jg 10f902 return written; return ret; 10f8ff: 89 75 d4 mov %esi,-0x2c(%ebp) } 10f902: 8b 45 d4 mov -0x2c(%ebp),%eax 10f905: 8d 65 f4 lea -0xc(%ebp),%esp 10f908: 5b pop %ebx 10f909: 5e pop %esi 10f90a: 5f pop %edi 10f90b: c9 leave 10f90c: c3 ret =============================================================================== 0010a788 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10a788: 55 push %ebp 10a789: 89 e5 mov %esp,%ebp 10a78b: 53 push %ebx 10a78c: 83 ec 04 sub $0x4,%esp 10a78f: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10a792: ff 05 2c 99 12 00 incl 0x12992c if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10a798: 8d 58 ff lea -0x1(%eax),%ebx 10a79b: 85 c3 test %eax,%ebx 10a79d: 75 0d jne 10a7ac <== NEVER TAKEN 10a79f: 83 f8 03 cmp $0x3,%eax 10a7a2: 76 08 jbe 10a7ac /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10a7a4: 59 pop %ecx 10a7a5: 5b pop %ebx 10a7a6: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10a7a7: e9 74 01 00 00 jmp 10a920 } 10a7ac: b8 16 00 00 00 mov $0x16,%eax 10a7b1: 5a pop %edx 10a7b2: 5b pop %ebx 10a7b3: c9 leave 10a7b4: c3 ret =============================================================================== 0011bbfc : ssize_t read( int fd, void *buffer, size_t count ) { 11bbfc: 55 push %ebp 11bbfd: 89 e5 mov %esp,%ebp 11bbff: 56 push %esi 11bc00: 53 push %ebx 11bc01: 8b 5d 08 mov 0x8(%ebp),%ebx 11bc04: 8b 55 0c mov 0xc(%ebp),%edx 11bc07: 8b 4d 10 mov 0x10(%ebp),%ecx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 11bc0a: 3b 1d 44 f1 11 00 cmp 0x11f144,%ebx 11bc10: 73 14 jae 11bc26 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11bc12: 6b db 38 imul $0x38,%ebx,%ebx 11bc15: 03 1d 18 30 12 00 add 0x123018,%ebx rtems_libio_check_is_open( iop ); 11bc1b: 8b 73 14 mov 0x14(%ebx),%esi 11bc1e: f7 c6 00 01 00 00 test $0x100,%esi 11bc24: 75 0d jne 11bc33 11bc26: e8 a1 46 ff ff call 1102cc <__errno> 11bc2b: c7 00 09 00 00 00 movl $0x9,(%eax) 11bc31: eb 1a jmp 11bc4d rtems_libio_check_buffer( buffer ); 11bc33: 85 d2 test %edx,%edx 11bc35: 74 0b je 11bc42 <== NEVER TAKEN rtems_libio_check_count( count ); 11bc37: 31 c0 xor %eax,%eax 11bc39: 85 c9 test %ecx,%ecx 11bc3b: 74 31 je 11bc6e <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 11bc3d: 83 e6 02 and $0x2,%esi 11bc40: 75 10 jne 11bc52 <== ALWAYS TAKEN 11bc42: e8 85 46 ff ff call 1102cc <__errno> <== NOT EXECUTED 11bc47: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11bc4d: 83 c8 ff or $0xffffffff,%eax 11bc50: eb 1c jmp 11bc6e return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 11bc52: 50 push %eax 11bc53: 8b 43 20 mov 0x20(%ebx),%eax 11bc56: 51 push %ecx 11bc57: 52 push %edx 11bc58: 53 push %ebx 11bc59: ff 50 08 call *0x8(%eax) if ( rc > 0 ) 11bc5c: 83 c4 10 add $0x10,%esp 11bc5f: 85 c0 test %eax,%eax 11bc61: 7e 0b jle 11bc6e iop->offset += rc; 11bc63: 89 c1 mov %eax,%ecx 11bc65: c1 f9 1f sar $0x1f,%ecx 11bc68: 01 43 0c add %eax,0xc(%ebx) 11bc6b: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 11bc6e: 8d 65 f8 lea -0x8(%ebp),%esp 11bc71: 5b pop %ebx 11bc72: 5e pop %esi 11bc73: c9 leave 11bc74: c3 ret =============================================================================== 00109df4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 109df4: 55 push %ebp 109df5: 89 e5 mov %esp,%ebp 109df7: 57 push %edi 109df8: 56 push %esi 109df9: 53 push %ebx 109dfa: 83 ec 2c sub $0x2c,%esp 109dfd: 8b 55 08 mov 0x8(%ebp),%edx 109e00: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 109e03: 85 db test %ebx,%ebx 109e05: 75 10 jne 109e17 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 109e07: e8 8c 8b 00 00 call 112998 <__errno> <== NOT EXECUTED 109e0c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 109e12: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 109e15: eb 69 jmp 109e80 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 109e17: 31 c0 xor %eax,%eax 109e19: 83 c9 ff or $0xffffffff,%ecx 109e1c: 89 d7 mov %edx,%edi 109e1e: f2 ae repnz scas %es:(%edi),%al 109e20: f7 d1 not %ecx 109e22: 49 dec %ecx 109e23: 83 ec 0c sub $0xc,%esp 109e26: 6a 00 push $0x0 109e28: 8d 75 d4 lea -0x2c(%ebp),%esi 109e2b: 56 push %esi 109e2c: 6a 00 push $0x0 109e2e: 51 push %ecx 109e2f: 52 push %edx 109e30: e8 30 f0 ff ff call 108e65 0, &loc, false ); if ( result != 0 ) 109e35: 83 c4 20 add $0x20,%esp return -1; 109e38: 83 cf ff or $0xffffffff,%edi if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) 109e3b: 85 c0 test %eax,%eax 109e3d: 75 41 jne 109e80 <== NEVER TAKEN return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 109e3f: 83 ec 0c sub $0xc,%esp 109e42: 56 push %esi 109e43: 8b 45 e0 mov -0x20(%ebp),%eax 109e46: ff 50 10 call *0x10(%eax) 109e49: 83 c4 10 add $0x10,%esp 109e4c: 83 f8 04 cmp $0x4,%eax 109e4f: 74 16 je 109e67 rtems_filesystem_freenode( &loc ); 109e51: 83 ec 0c sub $0xc,%esp 109e54: 56 push %esi 109e55: e8 f2 f0 ff ff call 108f4c rtems_set_errno_and_return_minus_one( EINVAL ); 109e5a: e8 39 8b 00 00 call 112998 <__errno> 109e5f: c7 00 16 00 00 00 movl $0x16,(%eax) 109e65: eb 16 jmp 109e7d } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 109e67: 50 push %eax 109e68: ff 75 10 pushl 0x10(%ebp) 109e6b: 53 push %ebx 109e6c: 56 push %esi 109e6d: 8b 45 e0 mov -0x20(%ebp),%eax 109e70: ff 50 3c call *0x3c(%eax) 109e73: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 109e75: 89 34 24 mov %esi,(%esp) 109e78: e8 cf f0 ff ff call 108f4c return result; 109e7d: 83 c4 10 add $0x10,%esp } 109e80: 89 f8 mov %edi,%eax 109e82: 8d 65 f4 lea -0xc(%ebp),%esp 109e85: 5b pop %ebx 109e86: 5e pop %esi 109e87: 5f pop %edi 109e88: c9 leave 109e89: c3 ret =============================================================================== 00108c04 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 108c04: 55 push %ebp 108c05: 89 e5 mov %esp,%ebp 108c07: 57 push %edi 108c08: 56 push %esi 108c09: 53 push %ebx 108c0a: 83 ec 2c sub $0x2c,%esp 108c0d: 8b 75 08 mov 0x8(%ebp),%esi 108c10: 8b 7d 0c mov 0xc(%ebp),%edi int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 108c13: 3b 35 84 12 12 00 cmp 0x121284,%esi 108c19: 73 11 jae 108c2c iop = rtems_libio_iop( fd ); 108c1b: 6b f6 38 imul $0x38,%esi,%esi 108c1e: 03 35 58 51 12 00 add 0x125158,%esi rtems_libio_check_is_open( iop ); 108c24: 8b 46 14 mov 0x14(%esi),%eax 108c27: f6 c4 01 test $0x1,%ah 108c2a: 75 10 jne 108c3c 108c2c: e8 6b 82 00 00 call 110e9c <__errno> 108c31: c7 00 09 00 00 00 movl $0x9,(%eax) 108c37: e9 a4 00 00 00 jmp 108ce0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 108c3c: a8 02 test $0x2,%al 108c3e: 74 35 je 108c75 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 108c40: 85 ff test %edi,%edi 108c42: 74 31 je 108c75 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 108c44: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 108c48: 7e 2b jle 108c75 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 108c4a: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 108c51: 7f 22 jg 108c75 <== NEVER TAKEN 108c53: b2 01 mov $0x1,%dl 108c55: 31 c0 xor %eax,%eax 108c57: 31 c9 xor %ecx,%ecx 108c59: 89 75 d4 mov %esi,-0x2c(%ebp) 108c5c: eb 03 jmp 108c61 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108c5e: 8b 4d e4 mov -0x1c(%ebp),%ecx all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 108c61: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8) 108c65: 74 0e je 108c75 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 108c67: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx 108c6b: 8d 34 19 lea (%ecx,%ebx,1),%esi 108c6e: 89 75 e4 mov %esi,-0x1c(%ebp) if ( total < old ) 108c71: 39 ce cmp %ecx,%esi 108c73: 7d 0d jge 108c82 rtems_set_errno_and_return_minus_one( EINVAL ); 108c75: e8 22 82 00 00 call 110e9c <__errno> 108c7a: c7 00 16 00 00 00 movl $0x16,(%eax) 108c80: eb 5e jmp 108ce0 if ( iov[v].iov_len ) all_zeros = false; 108c82: 85 db test %ebx,%ebx 108c84: 0f 94 c1 sete %cl 108c87: f7 d9 neg %ecx 108c89: 21 ca and %ecx,%edx * 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++ ) { 108c8b: 40 inc %eax 108c8c: 3b 45 10 cmp 0x10(%ebp),%eax 108c8f: 7c cd jl 108c5e 108c91: 8b 75 d4 mov -0x2c(%ebp),%esi * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { return 0; 108c94: 31 db xor %ebx,%ebx /* * 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 ) { 108c96: 84 d2 test %dl,%dl 108c98: 75 49 jne 108ce3 108c9a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( 108ca1: 50 push %eax 108ca2: 8b 46 20 mov 0x20(%esi),%eax 108ca5: 8b 55 e4 mov -0x1c(%ebp),%edx 108ca8: ff 74 d7 04 pushl 0x4(%edi,%edx,8) 108cac: ff 34 d7 pushl (%edi,%edx,8) 108caf: 56 push %esi 108cb0: ff 50 08 call *0x8(%eax) iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 108cb3: 83 c4 10 add $0x10,%esp 108cb6: 83 f8 00 cmp $0x0,%eax 108cb9: 7c 25 jl 108ce0 <== NEVER TAKEN return -1; if ( bytes > 0 ) { 108cbb: 74 0d je 108cca <== NEVER TAKEN iop->offset += bytes; 108cbd: 89 c1 mov %eax,%ecx 108cbf: c1 f9 1f sar $0x1f,%ecx 108cc2: 01 46 0c add %eax,0xc(%esi) 108cc5: 11 4e 10 adc %ecx,0x10(%esi) total += bytes; 108cc8: 01 c3 add %eax,%ebx } if (bytes != iov[ v ].iov_len) 108cca: 8b 55 e4 mov -0x1c(%ebp),%edx 108ccd: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax 108cd1: 75 10 jne 108ce3 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 108cd3: 42 inc %edx 108cd4: 89 55 e4 mov %edx,-0x1c(%ebp) 108cd7: 8b 45 10 mov 0x10(%ebp),%eax 108cda: 39 c2 cmp %eax,%edx 108cdc: 7c c3 jl 108ca1 108cde: eb 03 jmp 108ce3 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; 108ce0: 83 cb ff or $0xffffffff,%ebx if (bytes != iov[ v ].iov_len) break; } return total; } 108ce3: 89 d8 mov %ebx,%eax 108ce5: 8d 65 f4 lea -0xc(%ebp),%esp 108ce8: 5b pop %ebx 108ce9: 5e pop %esi 108cea: 5f pop %edi 108ceb: c9 leave 108cec: c3 ret =============================================================================== 0011bcf4 : void *realloc( void *ptr, size_t size ) { 11bcf4: 55 push %ebp 11bcf5: 89 e5 mov %esp,%ebp 11bcf7: 57 push %edi 11bcf8: 56 push %esi 11bcf9: 53 push %ebx 11bcfa: 83 ec 2c sub $0x2c,%esp 11bcfd: 8b 5d 08 mov 0x8(%ebp),%ebx 11bd00: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11bd03: ff 05 40 30 12 00 incl 0x123040 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11bd09: 83 3d e4 32 12 00 03 cmpl $0x3,0x1232e4 11bd10: 75 1a jne 11bd2c <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) 11bd12: a1 64 31 12 00 mov 0x123164,%eax 11bd17: 85 c0 test %eax,%eax 11bd19: 0f 85 ad 00 00 00 jne 11bdcc <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 11bd1f: 83 3d a4 33 12 00 00 cmpl $0x0,0x1233a4 11bd26: 0f 85 a0 00 00 00 jne 11bdcc <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 11bd2c: 85 db test %ebx,%ebx 11bd2e: 75 13 jne 11bd43 return malloc( size ); 11bd30: 83 ec 0c sub $0xc,%esp 11bd33: 56 push %esi 11bd34: e8 47 b8 fe ff call 107580 11bd39: 89 c3 mov %eax,%ebx 11bd3b: 83 c4 10 add $0x10,%esp 11bd3e: e9 8b 00 00 00 jmp 11bdce if ( !size ) { 11bd43: 85 f6 test %esi,%esi 11bd45: 75 0e jne 11bd55 <== ALWAYS TAKEN free( ptr ); 11bd47: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11bd4a: 53 push %ebx <== NOT EXECUTED 11bd4b: e8 94 b5 fe ff call 1072e4 <== NOT EXECUTED return (void *) 0; 11bd50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11bd53: eb 77 jmp 11bdcc <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 11bd55: 52 push %edx 11bd56: 8d 45 e4 lea -0x1c(%ebp),%eax 11bd59: 50 push %eax 11bd5a: 53 push %ebx 11bd5b: ff 35 50 f1 11 00 pushl 0x11f150 11bd61: e8 ee 00 00 00 call 11be54 <_Protected_heap_Get_block_size> 11bd66: 83 c4 10 add $0x10,%esp 11bd69: 84 c0 test %al,%al 11bd6b: 75 0d jne 11bd7a errno = EINVAL; 11bd6d: e8 5a 45 ff ff call 1102cc <__errno> 11bd72: c7 00 16 00 00 00 movl $0x16,(%eax) 11bd78: eb 52 jmp 11bdcc } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11bd7a: 50 push %eax 11bd7b: 56 push %esi 11bd7c: 53 push %ebx 11bd7d: ff 35 50 f1 11 00 pushl 0x11f150 11bd83: e8 04 01 00 00 call 11be8c <_Protected_heap_Resize_block> 11bd88: 83 c4 10 add $0x10,%esp 11bd8b: 84 c0 test %al,%al 11bd8d: 75 3f jne 11bdce * 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 ); 11bd8f: 83 ec 0c sub $0xc,%esp 11bd92: 56 push %esi 11bd93: e8 e8 b7 fe ff call 107580 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11bd98: ff 0d 34 30 12 00 decl 0x123034 if ( !new_area ) { 11bd9e: 83 c4 10 add $0x10,%esp 11bda1: 85 c0 test %eax,%eax 11bda3: 74 27 je 11bdcc return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11bda5: 8b 55 e4 mov -0x1c(%ebp),%edx 11bda8: 89 f1 mov %esi,%ecx 11bdaa: 39 d6 cmp %edx,%esi 11bdac: 76 02 jbe 11bdb0 <== NEVER TAKEN 11bdae: 89 d1 mov %edx,%ecx 11bdb0: 89 c7 mov %eax,%edi 11bdb2: 89 de mov %ebx,%esi 11bdb4: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 11bdb6: 83 ec 0c sub $0xc,%esp 11bdb9: 53 push %ebx 11bdba: 89 45 d4 mov %eax,-0x2c(%ebp) 11bdbd: e8 22 b5 fe ff call 1072e4 return new_area; 11bdc2: 83 c4 10 add $0x10,%esp 11bdc5: 8b 45 d4 mov -0x2c(%ebp),%eax 11bdc8: 89 c3 mov %eax,%ebx 11bdca: eb 02 jmp 11bdce new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 11bdcc: 31 db xor %ebx,%ebx memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11bdce: 89 d8 mov %ebx,%eax 11bdd0: 8d 65 f4 lea -0xc(%ebp),%esp 11bdd3: 5b pop %ebx 11bdd4: 5e pop %esi 11bdd5: 5f pop %edi 11bdd6: c9 leave 11bdd7: c3 ret =============================================================================== 00108d84 : #include int rmdir( const char *pathname ) { 108d84: 55 push %ebp 108d85: 89 e5 mov %esp,%ebp 108d87: 57 push %edi 108d88: 56 push %esi 108d89: 53 push %ebx 108d8a: 83 ec 58 sub $0x58,%esp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 108d8d: ff 75 08 pushl 0x8(%ebp) 108d90: e8 5d ef ff ff call 107cf2 108d95: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 108d98: 83 c4 10 add $0x10,%esp 108d9b: 85 c0 test %eax,%eax 108d9d: 8d 45 d0 lea -0x30(%ebp),%eax 108da0: 75 15 jne 108db7 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 108da2: 51 push %ecx 108da3: 50 push %eax 108da4: 8d 45 e4 lea -0x1c(%ebp),%eax 108da7: 50 push %eax 108da8: ff 75 08 pushl 0x8(%ebp) 108dab: e8 08 01 00 00 call 108eb8 108db0: 83 c4 10 add $0x10,%esp const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 108db3: 31 db xor %ebx,%ebx 108db5: eb 25 jmp 108ddc parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 108db7: 83 ec 0c sub $0xc,%esp 108dba: 6a 00 push $0x0 108dbc: 50 push %eax 108dbd: 6a 02 push $0x2 108dbf: ff 75 b4 pushl -0x4c(%ebp) 108dc2: ff 75 08 pushl 0x8(%ebp) 108dc5: e8 bf ee ff ff call 107c89 108dca: 89 c2 mov %eax,%edx RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 108dcc: 83 c4 20 add $0x20,%esp return -1; 108dcf: 83 c8 ff or $0xffffffff,%eax else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 108dd2: 85 d2 test %edx,%edx 108dd4: 0f 85 d6 00 00 00 jne 108eb0 <== NEVER TAKEN return -1; free_parentloc = true; 108dda: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 108ddc: 8d 7d bc lea -0x44(%ebp),%edi 108ddf: 8d 75 d0 lea -0x30(%ebp),%esi 108de2: b9 05 00 00 00 mov $0x5,%ecx 108de7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 108de9: 8b 75 08 mov 0x8(%ebp),%esi 108dec: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 108def: 83 c9 ff or $0xffffffff,%ecx 108df2: 89 f7 mov %esi,%edi 108df4: 31 c0 xor %eax,%eax 108df6: f2 ae repnz scas %es:(%edi),%al 108df8: f7 d1 not %ecx 108dfa: 49 dec %ecx 108dfb: 52 push %edx 108dfc: 52 push %edx 108dfd: 51 push %ecx 108dfe: 56 push %esi 108dff: e8 2d ef ff ff call 107d31 108e04: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 108e06: 83 c9 ff or $0xffffffff,%ecx 108e09: 89 f7 mov %esi,%edi 108e0b: 31 c0 xor %eax,%eax 108e0d: f2 ae repnz scas %es:(%edi),%al 108e0f: f7 d1 not %ecx 108e11: 49 dec %ecx 108e12: c7 04 24 00 00 00 00 movl $0x0,(%esp) 108e19: 8d 7d bc lea -0x44(%ebp),%edi 108e1c: 57 push %edi 108e1d: 6a 00 push $0x0 108e1f: 51 push %ecx 108e20: 56 push %esi 108e21: e8 de ed ff ff call 107c04 0, &loc, false ); if ( result != 0 ) { 108e26: 83 c4 20 add $0x20,%esp 108e29: 85 c0 test %eax,%eax 108e2b: 74 13 je 108e40 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 108e2d: 83 c8 ff or $0xffffffff,%eax 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 ) 108e30: 84 db test %bl,%bl 108e32: 74 7c je 108eb0 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 108e34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e37: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 108e3a: 52 push %edx <== NOT EXECUTED 108e3b: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED 108e3e: eb 65 jmp 108ea5 <== NOT EXECUTED } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 108e40: 83 ec 0c sub $0xc,%esp 108e43: 57 push %edi 108e44: 8b 45 c8 mov -0x38(%ebp),%eax 108e47: ff 50 10 call *0x10(%eax) 108e4a: 83 c4 10 add $0x10,%esp 108e4d: 48 dec %eax 108e4e: 74 2f je 108e7f rtems_filesystem_freenode( &loc ); 108e50: 83 ec 0c sub $0xc,%esp 108e53: 57 push %edi 108e54: e8 bb f0 ff ff call 107f14 if ( free_parentloc ) 108e59: 83 c4 10 add $0x10,%esp 108e5c: 84 db test %bl,%bl 108e5e: 74 0f je 108e6f <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 108e60: 83 ec 0c sub $0xc,%esp 108e63: 8d 45 d0 lea -0x30(%ebp),%eax 108e66: 50 push %eax 108e67: e8 a8 f0 ff ff call 107f14 108e6c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 108e6f: e8 60 82 00 00 call 1110d4 <__errno> 108e74: c7 00 14 00 00 00 movl $0x14,(%eax) 108e7a: 83 c8 ff or $0xffffffff,%eax 108e7d: eb 31 jmp 108eb0 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 108e7f: 50 push %eax 108e80: 50 push %eax 108e81: 57 push %edi 108e82: 8d 75 d0 lea -0x30(%ebp),%esi 108e85: 56 push %esi 108e86: 8b 45 c4 mov -0x3c(%ebp),%eax 108e89: ff 50 34 call *0x34(%eax) rtems_filesystem_freenode( &loc ); 108e8c: 89 3c 24 mov %edi,(%esp) 108e8f: 89 45 b0 mov %eax,-0x50(%ebp) 108e92: e8 7d f0 ff ff call 107f14 if ( free_parentloc ) 108e97: 83 c4 10 add $0x10,%esp 108e9a: 84 db test %bl,%bl 108e9c: 8b 45 b0 mov -0x50(%ebp),%eax 108e9f: 74 0f je 108eb0 rtems_filesystem_freenode( &parentloc ); 108ea1: 83 ec 0c sub $0xc,%esp 108ea4: 56 push %esi 108ea5: e8 6a f0 ff ff call 107f14 108eaa: 83 c4 10 add $0x10,%esp 108ead: 8b 45 b0 mov -0x50(%ebp),%eax return result; } 108eb0: 8d 65 f4 lea -0xc(%ebp),%esp 108eb3: 5b pop %ebx 108eb4: 5e pop %esi 108eb5: 5f pop %edi 108eb6: c9 leave 108eb7: c3 ret =============================================================================== 00106e94 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 106e94: 55 push %ebp 106e95: 89 e5 mov %esp,%ebp 106e97: 57 push %edi 106e98: 56 push %esi 106e99: 53 push %ebx 106e9a: 83 ec 0c sub $0xc,%esp 106e9d: 8b 45 08 mov 0x8(%ebp),%eax 106ea0: 8b 5d 0c mov 0xc(%ebp),%ebx 106ea3: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 106ea6: 85 c0 test %eax,%eax 106ea8: 74 4c je 106ef6 return NULL; if ( !value ) 106eaa: 85 db test %ebx,%ebx 106eac: 74 4a je 106ef8 return NULL; if ( !length ) 106eae: 85 f6 test %esi,%esi 106eb0: 74 44 je 106ef6 return NULL; value[0] = '\0'; 106eb2: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 106eb5: 83 ec 0c sub $0xc,%esp 106eb8: 50 push %eax 106eb9: e8 46 00 00 00 call 106f04 if ( !p ) 106ebe: 83 c4 10 add $0x10,%esp 106ec1: 85 c0 test %eax,%eax 106ec3: 74 31 je 106ef6 106ec5: 31 ff xor %edi,%edi 106ec7: 31 d2 xor %edx,%edx int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i if ( *p == '\"' ) { 106ecc: 80 f9 22 cmp $0x22,%cl 106ecf: 75 03 jne 106ed4 quotes++; 106ed1: 47 inc %edi 106ed2: eb 0d jmp 106ee1 } else if ( ((quotes % 2) == 0) && *p == ' ' ) 106ed4: f7 c7 01 00 00 00 test $0x1,%edi 106eda: 75 05 jne 106ee1 106edc: 80 f9 20 cmp $0x20,%cl 106edf: 74 17 je 106ef8 break; value[i++] = *p++; 106ee1: 88 0c 13 mov %cl,(%ebx,%edx,1) 106ee4: 42 inc %edx value[i] = '\0'; 106ee5: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 106ef0: 39 f2 cmp %esi,%edx 106ef2: 72 d8 jb 106ecc <== ALWAYS TAKEN 106ef4: eb 02 jmp 106ef8 <== NOT EXECUTED value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) return NULL; 106ef6: 31 db xor %ebx,%ebx copy_string( p, value, length ); return value; } 106ef8: 89 d8 mov %ebx,%eax 106efa: 8d 65 f4 lea -0xc(%ebp),%esp 106efd: 5b pop %ebx 106efe: 5e pop %esi 106eff: 5f pop %edi 106f00: c9 leave 106f01: c3 ret =============================================================================== 00106f2c : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 106f2c: 55 push %ebp 106f2d: 89 e5 mov %esp,%ebp 106f2f: 57 push %edi 106f30: 53 push %ebx 106f31: 8b 7d 08 mov 0x8(%ebp),%edi 106f34: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 106f37: 50 push %eax 106f38: ff 75 10 pushl 0x10(%ebp) 106f3b: 53 push %ebx 106f3c: 57 push %edi 106f3d: e8 52 ff ff ff call 106e94 106f42: 89 c2 mov %eax,%edx if ( !p ) 106f44: 83 c4 10 add $0x10,%esp 106f47: 85 c0 test %eax,%eax 106f49: 74 3c je 106f87 return NULL; rhs = &p[strlen(name)]; 106f4b: 31 c0 xor %eax,%eax 106f4d: 83 c9 ff or $0xffffffff,%ecx 106f50: f2 ae repnz scas %es:(%edi),%al 106f52: f7 d1 not %ecx 106f54: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 106f58: 80 38 3d cmpb $0x3d,(%eax) 106f5b: 75 2a jne 106f87 <== NEVER TAKEN return NULL; rhs++; 106f5d: 8d 50 01 lea 0x1(%eax),%edx if ( *rhs == '\"' ) 106f60: 80 78 01 22 cmpb $0x22,0x1(%eax) 106f64: 75 03 jne 106f69 rhs++; 106f66: 8d 50 02 lea 0x2(%eax),%edx const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 106f69: 89 d8 mov %ebx,%eax 106f6b: eb 04 jmp 106f71 rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; 106f6d: 88 08 mov %cl,(%eax) 106f6f: 40 inc %eax 106f70: 42 inc %edx return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 106f71: 8a 0a mov (%edx),%cl 106f73: 84 c9 test %cl,%cl 106f75: 75 f6 jne 106f6d *d++ = *rhs++; if ( *(d-1) == '\"' ) 106f77: 8d 50 ff lea -0x1(%eax),%edx 106f7a: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 106f7e: 74 02 je 106f82 106f80: 89 c2 mov %eax,%edx d--; *d = '\0'; 106f82: c6 02 00 movb $0x0,(%edx) return value; 106f85: eb 02 jmp 106f89 if ( !p ) return NULL; rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; 106f87: 31 db xor %ebx,%ebx if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } 106f89: 89 d8 mov %ebx,%eax 106f8b: 8d 65 f8 lea -0x8(%ebp),%esp 106f8e: 5b pop %ebx 106f8f: 5f pop %edi 106f90: c9 leave 106f91: c3 ret =============================================================================== 001075c8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1075c8: 55 push %ebp 1075c9: 89 e5 mov %esp,%ebp 1075cb: 57 push %edi 1075cc: 56 push %esi 1075cd: 53 push %ebx 1075ce: 83 ec 6c sub $0x6c,%esp 1075d1: 8b 5d 08 mov 0x8(%ebp),%ebx Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1075d4: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 1075d8: 0f 84 53 01 00 00 je 107731 <== 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 ); 1075de: 83 ec 0c sub $0xc,%esp 1075e1: 8d 7d d8 lea -0x28(%ebp),%edi 1075e4: 57 push %edi 1075e5: e8 fe 4b 00 00 call 10c1e8 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1075ea: 83 c4 0c add $0xc,%esp 1075ed: 8d 75 d0 lea -0x30(%ebp),%esi 1075f0: 56 push %esi 1075f1: 57 push %edi 1075f2: 68 dc e1 12 00 push $0x12e1dc 1075f7: e8 1c 6b 00 00 call 10e118 <_Timespec_Subtract> } } } #endif (*print)( 1075fc: 5e pop %esi 1075fd: 5f pop %edi 1075fe: 68 2c fb 11 00 push $0x11fb2c 107603: 53 push %ebx 107604: ff 55 0c call *0xc(%ebp) 107607: 83 c4 10 add $0x10,%esp " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10760a: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 107611: 8b 55 a4 mov -0x5c(%ebp),%edx 107614: 8b 04 95 20 df 12 00 mov 0x12df20(,%edx,4),%eax 10761b: 85 c0 test %eax,%eax 10761d: 0f 84 e5 00 00 00 je 107708 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 107623: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 107626: 85 f6 test %esi,%esi 107628: 0f 84 da 00 00 00 je 107708 <== NEVER TAKEN 10762e: bf 01 00 00 00 mov $0x1,%edi 107633: 89 5d 94 mov %ebx,-0x6c(%ebp) 107636: e9 be 00 00 00 jmp 1076f9 for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10763b: 8b 46 1c mov 0x1c(%esi),%eax 10763e: 8b 14 b8 mov (%eax,%edi,4),%edx if ( !the_thread ) 107641: 85 d2 test %edx,%edx 107643: 0f 84 af 00 00 00 je 1076f8 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 107649: 51 push %ecx 10764a: 8d 4d b3 lea -0x4d(%ebp),%ecx 10764d: 51 push %ecx 10764e: 6a 0d push $0xd 107650: ff 72 08 pushl 0x8(%edx) 107653: 89 55 a0 mov %edx,-0x60(%ebp) 107656: e8 d1 3a 00 00 call 10b12c (*print)( 10765b: 8d 5d b3 lea -0x4d(%ebp),%ebx 10765e: 53 push %ebx 10765f: 8b 55 a0 mov -0x60(%ebp),%edx 107662: ff 72 08 pushl 0x8(%edx) 107665: 68 9e fc 11 00 push $0x11fc9e 10766a: ff 75 94 pushl -0x6c(%ebp) 10766d: 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; 107670: 8b 55 a0 mov -0x60(%ebp),%edx 107673: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 107679: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 10767f: 89 4d c8 mov %ecx,-0x38(%ebp) 107682: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 107685: 83 c4 20 add $0x20,%esp 107688: a1 cc e1 12 00 mov 0x12e1cc,%eax 10768d: 8b 5a 08 mov 0x8(%edx),%ebx 107690: 39 58 08 cmp %ebx,0x8(%eax) 107693: 75 28 jne 1076bd Timestamp_Control used; _Timestamp_Subtract( 107695: 50 push %eax 107696: 8d 45 c0 lea -0x40(%ebp),%eax 107699: 50 push %eax 10769a: 8d 55 d8 lea -0x28(%ebp),%edx 10769d: 52 push %edx 10769e: 68 fc df 12 00 push $0x12dffc 1076a3: 89 45 a0 mov %eax,-0x60(%ebp) 1076a6: e8 6d 6a 00 00 call 10e118 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1076ab: 59 pop %ecx 1076ac: 5b pop %ebx 1076ad: 8b 45 a0 mov -0x60(%ebp),%eax 1076b0: 50 push %eax 1076b1: 8d 45 c8 lea -0x38(%ebp),%eax 1076b4: 50 push %eax 1076b5: e8 72 69 00 00 call 10e02c <_Timespec_Add_to> 1076ba: 83 c4 10 add $0x10,%esp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1076bd: 8d 55 e0 lea -0x20(%ebp),%edx 1076c0: 52 push %edx 1076c1: 8d 4d e4 lea -0x1c(%ebp),%ecx 1076c4: 51 push %ecx 1076c5: 8d 5d d0 lea -0x30(%ebp),%ebx 1076c8: 53 push %ebx 1076c9: 8d 45 c8 lea -0x38(%ebp),%eax 1076cc: 50 push %eax 1076cd: e8 8a 69 00 00 call 10e05c <_Timespec_Divide> /* * Print the information */ (*print)( context, 1076d2: 58 pop %eax 1076d3: 5a pop %edx 1076d4: ff 75 e0 pushl -0x20(%ebp) 1076d7: ff 75 e4 pushl -0x1c(%ebp) 1076da: 8b 45 cc mov -0x34(%ebp),%eax 1076dd: b9 e8 03 00 00 mov $0x3e8,%ecx 1076e2: 31 d2 xor %edx,%edx 1076e4: f7 f1 div %ecx 1076e6: 50 push %eax 1076e7: ff 75 c8 pushl -0x38(%ebp) 1076ea: 68 b1 fc 11 00 push $0x11fcb1 1076ef: ff 75 94 pushl -0x6c(%ebp) 1076f2: ff 55 0c call *0xc(%ebp) 1076f5: 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++ ) { 1076f8: 47 inc %edi 1076f9: 0f b7 46 10 movzwl 0x10(%esi),%eax 1076fd: 39 c7 cmp %eax,%edi 1076ff: 0f 86 36 ff ff ff jbe 10763b 107705: 8b 5d 94 mov -0x6c(%ebp),%ebx "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 107708: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10770b: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp) 10770f: 0f 85 fc fe ff ff jne 107611 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 107715: 8b 45 d4 mov -0x2c(%ebp),%eax 107718: b9 e8 03 00 00 mov $0x3e8,%ecx 10771d: 31 d2 xor %edx,%edx 10771f: f7 f1 div %ecx 107721: 50 push %eax 107722: ff 75 d0 pushl -0x30(%ebp) 107725: 68 c9 fc 11 00 push $0x11fcc9 10772a: 53 push %ebx 10772b: ff 55 0c call *0xc(%ebp) 10772e: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 107731: 8d 65 f4 lea -0xc(%ebp),%esp 107734: 5b pop %ebx 107735: 5e pop %esi 107736: 5f pop %edi 107737: c9 leave 107738: c3 ret =============================================================================== 00110284 : [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 110284: 55 push %ebp 110285: 89 e5 mov %esp,%ebp 110287: 53 push %ebx 110288: 83 ec 04 sub $0x4,%esp 11028b: 8b 55 08 mov 0x8(%ebp),%edx if (sc == RTEMS_SUCCESSFUL) { return 0; 11028e: 31 c0 xor %eax,%eax [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { 110290: 85 d2 test %edx,%edx 110292: 74 1b je 1102af <== ALWAYS TAKEN return 0; } else { int eno = EINVAL; 110294: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 110299: 83 fa 1c cmp $0x1c,%edx <== NOT EXECUTED 11029c: 77 07 ja 1102a5 <== NOT EXECUTED eno = status_code_to_errno [sc]; 11029e: 8b 1c 95 bc df 11 00 mov 0x11dfbc(,%edx,4),%ebx <== NOT EXECUTED } errno = eno; 1102a5: e8 22 00 00 00 call 1102cc <__errno> <== NOT EXECUTED 1102aa: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; 1102ac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } } 1102af: 5a pop %edx 1102b0: 5b pop %ebx 1102b1: c9 leave 1102b2: c3 ret =============================================================================== 001071e9 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1071e9: 55 push %ebp 1071ea: 89 e5 mov %esp,%ebp 1071ec: 56 push %esi 1071ed: 53 push %ebx 1071ee: 83 ec 10 sub $0x10,%esp 1071f1: 8b 5d 08 mov 0x8(%ebp),%ebx 1071f4: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 1071f7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 1071fe: 85 db test %ebx,%ebx 107200: 75 0d jne 10720f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 107202: e8 c5 90 00 00 call 1102cc <__errno> <== NOT EXECUTED 107207: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10720d: eb 0f jmp 10721e <== NOT EXECUTED if ( !pathloc ) 10720f: 85 f6 test %esi,%esi 107211: 75 10 jne 107223 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107213: e8 b4 90 00 00 call 1102cc <__errno> <== NOT EXECUTED 107218: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10721e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107221: eb 28 jmp 10724b <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 107223: 51 push %ecx 107224: 56 push %esi 107225: 8d 45 f4 lea -0xc(%ebp),%eax 107228: 50 push %eax 107229: 53 push %ebx 10722a: e8 29 0d 00 00 call 107f58 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 10722f: 8b 45 f4 mov -0xc(%ebp),%eax 107232: 5a pop %edx 107233: ff 75 18 pushl 0x18(%ebp) 107236: 56 push %esi 107237: ff 75 10 pushl 0x10(%ebp) 10723a: 8b 55 0c mov 0xc(%ebp),%edx 10723d: 29 c2 sub %eax,%edx 10723f: 52 push %edx 107240: 01 c3 add %eax,%ebx 107242: 53 push %ebx 107243: e8 1c ff ff ff call 107164 107248: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 10724b: 8d 65 f8 lea -0x8(%ebp),%esp 10724e: 5b pop %ebx 10724f: 5e pop %esi 107250: c9 leave 107251: c3 ret =============================================================================== 00107164 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 107164: 55 push %ebp 107165: 89 e5 mov %esp,%ebp 107167: 57 push %edi 107168: 56 push %esi 107169: 53 push %ebx 10716a: 83 ec 0c sub $0xc,%esp 10716d: 8b 45 08 mov 0x8(%ebp),%eax 107170: 8b 4d 0c mov 0xc(%ebp),%ecx 107173: 8b 75 10 mov 0x10(%ebp),%esi 107176: 8b 5d 14 mov 0x14(%ebp),%ebx 107179: 8b 7d 18 mov 0x18(%ebp),%edi /* * Verify Input parameters. */ if ( !pathname ) 10717c: 85 c0 test %eax,%eax 10717e: 75 0d jne 10718d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 107180: e8 47 91 00 00 call 1102cc <__errno> <== NOT EXECUTED 107185: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10718b: eb 0f jmp 10719c <== NOT EXECUTED if ( !pathloc ) 10718d: 85 db test %ebx,%ebx 10718f: 75 10 jne 1071a1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 107191: e8 36 91 00 00 call 1102cc <__errno> <== NOT EXECUTED 107196: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10719c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10719f: eb 40 jmp 1071e1 <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1071a1: 8b 53 0c mov 0xc(%ebx),%edx 1071a4: 53 push %ebx 1071a5: 56 push %esi 1071a6: 51 push %ecx 1071a7: 50 push %eax 1071a8: ff 12 call *(%edx) /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1071aa: 83 c4 10 add $0x10,%esp 1071ad: 85 c0 test %eax,%eax 1071af: 75 30 jne 1071e1 1071b1: 85 ff test %edi,%edi 1071b3: 74 2c je 1071e1 type = (*pathloc->ops->node_type_h)( pathloc ); 1071b5: 83 ec 0c sub $0xc,%esp 1071b8: 8b 43 0c mov 0xc(%ebx),%eax 1071bb: 53 push %ebx 1071bc: ff 50 10 call *0x10(%eax) if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1071bf: 8d 50 fd lea -0x3(%eax),%edx 1071c2: 83 c4 10 add $0x10,%esp 1071c5: 31 c0 xor %eax,%eax 1071c7: 83 fa 01 cmp $0x1,%edx 1071ca: 77 15 ja 1071e1 * 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 ); 1071cc: 8b 43 0c mov 0xc(%ebx),%eax 1071cf: 89 75 0c mov %esi,0xc(%ebp) 1071d2: 89 5d 08 mov %ebx,0x8(%ebp) 1071d5: 8b 40 34 mov 0x34(%eax),%eax } } return result; } 1071d8: 8d 65 f4 lea -0xc(%ebp),%esp 1071db: 5b pop %ebx 1071dc: 5e pop %esi 1071dd: 5f pop %edi 1071de: 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 ); 1071df: ff e0 jmp *%eax } } return result; } 1071e1: 8d 65 f4 lea -0xc(%ebp),%esp 1071e4: 5b pop %ebx 1071e5: 5e pop %esi 1071e6: 5f pop %edi 1071e7: c9 leave 1071e8: c3 ret =============================================================================== 0010e1ab : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 10e1ab: 55 push %ebp 10e1ac: 89 e5 mov %esp,%ebp 10e1ae: 83 ec 18 sub $0x18,%esp 10e1b1: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { 10e1b4: 89 45 f0 mov %eax,-0x10(%ebp) 10e1b7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) .type = type, .mount_h = NULL }; if ( type != NULL ) { 10e1be: 85 c0 test %eax,%eax 10e1c0: 74 13 je 10e1d5 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 10e1c2: 50 push %eax 10e1c3: 50 push %eax 10e1c4: 8d 45 f0 lea -0x10(%ebp),%eax 10e1c7: 50 push %eax 10e1c8: 68 d4 e0 10 00 push $0x10e0d4 10e1cd: e8 62 ff ff ff call 10e134 10e1d2: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 10e1d5: 8b 45 f4 mov -0xc(%ebp),%eax 10e1d8: c9 leave 10e1d9: c3 ret =============================================================================== 00107048 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 107048: 55 push %ebp 107049: 89 e5 mov %esp,%ebp 10704b: 57 push %edi 10704c: 56 push %esi 10704d: 53 push %ebx 10704e: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 107051: a1 54 0f 12 00 mov 0x120f54,%eax 107056: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 10705d: 83 3d c0 c2 11 00 00 cmpl $0x0,0x11c2c0 107064: 75 0a jne 107070 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 107066: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107069: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 10706e: eb 28 jmp 107098 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 107070: a1 4c f1 11 00 mov 0x11f14c,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 107075: 83 ec 0c sub $0xc,%esp 107078: 6a 00 push $0x0 10707a: ff 70 04 pushl 0x4(%eax) 10707d: ff 30 pushl (%eax) 10707f: ff 70 0c pushl 0xc(%eax) 107082: ff 70 08 pushl 0x8(%eax) 107085: e8 c7 06 00 00 call 107751 if ( status == -1 ) 10708a: 83 c4 20 add $0x20,%esp 10708d: 40 inc %eax 10708e: 75 0d jne 10709d <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 107090: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107093: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 107098: e8 eb 36 00 00 call 10a788 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 10709d: a1 54 0f 12 00 mov 0x120f54,%eax 1070a2: 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); 1070a8: 83 ec 0c sub $0xc,%esp 1070ab: 6a 00 push $0x0 1070ad: 8d 5d d4 lea -0x2c(%ebp),%ebx 1070b0: 53 push %ebx 1070b1: 6a 00 push $0x0 1070b3: 6a 01 push $0x1 1070b5: 68 f0 d9 11 00 push $0x11d9f0 1070ba: e8 2a 01 00 00 call 1071e9 rtems_filesystem_root = loc; 1070bf: 8b 3d 54 0f 12 00 mov 0x120f54,%edi 1070c5: 83 c7 18 add $0x18,%edi 1070c8: b9 05 00 00 00 mov $0x5,%ecx 1070cd: 89 de mov %ebx,%esi 1070cf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1070d1: 83 c4 14 add $0x14,%esp 1070d4: 6a 00 push $0x0 1070d6: 53 push %ebx 1070d7: 6a 00 push $0x0 1070d9: 6a 01 push $0x1 1070db: 68 f0 d9 11 00 push $0x11d9f0 1070e0: e8 04 01 00 00 call 1071e9 rtems_filesystem_current = loc; 1070e5: 8b 3d 54 0f 12 00 mov 0x120f54,%edi 1070eb: 83 c7 04 add $0x4,%edi 1070ee: b9 05 00 00 00 mov $0x5,%ecx 1070f3: 89 de mov %ebx,%esi 1070f5: 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); 1070f7: 83 c4 18 add $0x18,%esp 1070fa: 68 ff 01 00 00 push $0x1ff 1070ff: 68 f2 d9 11 00 push $0x11d9f2 107104: e8 13 05 00 00 call 10761c if ( status != 0 ) 107109: 83 c4 10 add $0x10,%esp 10710c: 85 c0 test %eax,%eax 10710e: 74 0d je 10711d <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 107110: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107113: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 107118: e9 7b ff ff ff jmp 107098 <== NOT EXECUTED * 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. */ } 10711d: 8d 65 f4 lea -0xc(%ebp),%esp 107120: 5b pop %ebx 107121: 5e pop %esi 107122: 5f pop %edi 107123: c9 leave 107124: c3 ret =============================================================================== 0010e134 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 10e134: 55 push %ebp 10e135: 89 e5 mov %esp,%ebp 10e137: 57 push %edi 10e138: 56 push %esi 10e139: 53 push %ebx 10e13a: 83 ec 1c sub $0x1c,%esp 10e13d: 8b 75 08 mov 0x8(%ebp),%esi 10e140: 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; 10e143: 31 c0 xor %eax,%eax bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; 10e145: bb a0 c2 11 00 mov $0x11c2a0,%ebx rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10e14a: eb 0c jmp 10e158 stop = (*routine)( table_entry, routine_arg ); 10e14c: 51 push %ecx 10e14d: 51 push %ecx 10e14e: 57 push %edi 10e14f: 53 push %ebx 10e150: ff d6 call *%esi ++table_entry; 10e152: 83 c3 08 add $0x8,%ebx 10e155: 83 c4 10 add $0x10,%esp { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 10e158: 83 3b 00 cmpl $0x0,(%ebx) 10e15b: 74 06 je 10e163 10e15d: 84 c0 test %al,%al 10e15f: 74 eb je 10e14c <== ALWAYS TAKEN 10e161: eb 40 jmp 10e1a3 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 10e163: 84 c0 test %al,%al 10e165: 75 3c jne 10e1a3 rtems_libio_lock(); 10e167: 88 45 e4 mov %al,-0x1c(%ebp) 10e16a: e8 95 ff ff ff call 10e104 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10e16f: 8b 1d 78 0f 12 00 mov 0x120f78,%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10e175: 8a 55 e4 mov -0x1c(%ebp),%dl 10e178: eb 10 jmp 10e18a !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 10e17a: 52 push %edx 10e17b: 52 push %edx 10e17c: 57 push %edi 10e17d: 8d 43 08 lea 0x8(%ebx),%eax 10e180: 50 push %eax 10e181: ff d6 call *%esi 10e183: 88 c2 mov %al,%dl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 10e185: 8b 1b mov (%ebx),%ebx 10e187: 83 c4 10 add $0x10,%esp ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 10e18a: 81 fb 7c 0f 12 00 cmp $0x120f7c,%ebx 10e190: 74 04 je 10e196 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 10e192: 84 d2 test %dl,%dl 10e194: 74 e4 je 10e17a <== ALWAYS TAKEN ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); 10e196: 88 55 e4 mov %dl,-0x1c(%ebp) 10e199: e8 80 ff ff ff call 10e11e 10e19e: 8a 55 e4 mov -0x1c(%ebp),%dl 10e1a1: 88 d0 mov %dl,%al } return stop; } 10e1a3: 8d 65 f4 lea -0xc(%ebp),%esp 10e1a6: 5b pop %ebx 10e1a7: 5e pop %esi 10e1a8: 5f pop %edi 10e1a9: c9 leave 10e1aa: c3 ret =============================================================================== 00107709 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 107709: 55 push %ebp 10770a: 89 e5 mov %esp,%ebp 10770c: 57 push %edi 10770d: 56 push %esi 10770e: 53 push %ebx 10770f: 83 ec 1c sub $0x1c,%esp 107712: 8b 7d 08 mov 0x8(%ebp),%edi 107715: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); 107718: e8 bc ff ff ff call 1076d9 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 10771d: 8b 1d 34 0f 12 00 mov 0x120f34,%ebx rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; 107723: 31 c0 xor %eax,%eax rtems_libio_lock(); for ( 107725: eb 0b jmp 107732 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 ); 107727: 50 push %eax 107728: 50 push %eax 107729: 56 push %esi 10772a: 53 push %ebx 10772b: ff d7 call *%edi } rtems_libio_unlock(); return stop; } 10772d: 8b 1b mov (%ebx),%ebx 10772f: 83 c4 10 add $0x10,%esp { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 107732: 81 fb 38 0f 12 00 cmp $0x120f38,%ebx 107738: 74 04 je 10773e node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; 10773a: 84 c0 test %al,%al 10773c: 74 e9 je 107727 <== ALWAYS TAKEN const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); 10773e: 88 45 e4 mov %al,-0x1c(%ebp) 107741: e8 ad ff ff ff call 1076f3 return stop; } 107746: 8a 45 e4 mov -0x1c(%ebp),%al 107749: 8d 65 f4 lea -0xc(%ebp),%esp 10774c: 5b pop %ebx 10774d: 5e pop %esi 10774e: 5f pop %edi 10774f: c9 leave 107750: c3 ret =============================================================================== 00107291 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 107291: 55 push %ebp 107292: 89 e5 mov %esp,%ebp 107294: 57 push %edi 107295: 56 push %esi 107296: 53 push %ebx 107297: 83 ec 0c sub $0xc,%esp 10729a: 8b 7d 08 mov 0x8(%ebp),%edi 10729d: 8b 75 0c mov 0xc(%ebp),%esi /* * Eat any separators at start of the path. */ int stripped = 0; 1072a0: 31 db xor %ebx,%ebx while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1072a2: eb 01 jmp 1072a5 { pathname++; pathnamelen--; stripped++; 1072a4: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1072a5: 8a 04 1f mov (%edi,%ebx,1),%al 1072a8: 39 de cmp %ebx,%esi 1072aa: 74 17 je 1072c3 <== NEVER TAKEN 1072ac: 84 c0 test %al,%al 1072ae: 74 13 je 1072c3 <== NEVER TAKEN 1072b0: 83 ec 0c sub $0xc,%esp 1072b3: 0f be c0 movsbl %al,%eax 1072b6: 50 push %eax 1072b7: e8 f4 0c 00 00 call 107fb0 1072bc: 83 c4 10 add $0x10,%esp 1072bf: 85 c0 test %eax,%eax 1072c1: 75 e1 jne 1072a4 pathname++; pathnamelen--; stripped++; } return stripped; } 1072c3: 89 d8 mov %ebx,%eax 1072c5: 8d 65 f4 lea -0xc(%ebp),%esp 1072c8: 5b pop %ebx 1072c9: 5e pop %esi 1072ca: 5f pop %edi 1072cb: c9 leave 1072cc: c3 ret =============================================================================== 00107a13 : void *rtems_gxx_getspecific(__gthread_key_t key) { 107a13: 55 push %ebp 107a14: 89 e5 mov %esp,%ebp 107a16: 53 push %ebx 107a17: 83 ec 18 sub $0x18,%esp 107a1a: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_status_code status; void *p= 0; 107a1d: 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 ); 107a24: 8d 45 f4 lea -0xc(%ebp),%eax 107a27: 50 push %eax 107a28: 53 push %ebx 107a29: 6a 00 push $0x0 107a2b: e8 80 35 00 00 call 10afb0 if ( status == RTEMS_SUCCESSFUL ) { 107a30: 83 c4 10 add $0x10,%esp 107a33: 85 c0 test %eax,%eax 107a35: 75 07 jne 107a3e <== NEVER TAKEN /* We do not have to do this, but what the heck ! */ p= key->val; 107a37: 8b 03 mov (%ebx),%eax 107a39: 89 45 f4 mov %eax,-0xc(%ebp) 107a3c: eb 26 jmp 107a64 } 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 ); 107a3e: 51 push %ecx <== NOT EXECUTED 107a3f: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED 107a42: 53 push %ebx <== NOT EXECUTED 107a43: 6a 00 push $0x0 <== NOT EXECUTED 107a45: e8 56 34 00 00 call 10aea0 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 107a4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107a4d: 85 c0 test %eax,%eax <== NOT EXECUTED 107a4f: 74 0d je 107a5e <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); 107a51: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107a54: 68 df e9 11 00 push $0x11e9df <== NOT EXECUTED 107a59: e8 cd 6f 00 00 call 10ea2b <== NOT EXECUTED } key->val = (void *)0; 107a5e: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 107a64: 8b 45 f4 mov -0xc(%ebp),%eax 107a67: 8b 5d fc mov -0x4(%ebp),%ebx 107a6a: c9 leave 107a6b: c3 ret =============================================================================== 001079e3 : int rtems_gxx_key_delete (__gthread_key_t key) { 1079e3: 55 push %ebp 1079e4: 89 e5 mov %esp,%ebp 1079e6: 53 push %ebx 1079e7: 83 ec 0c sub $0xc,%esp 1079ea: 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 ); 1079ed: 53 push %ebx 1079ee: 6a 00 push $0x0 1079f0: e8 3f 35 00 00 call 10af34 if ( status == RTEMS_SUCCESSFUL ) { 1079f5: 83 c4 10 add $0x10,%esp 1079f8: 85 c0 test %eax,%eax 1079fa: 75 10 jne 107a0c <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( (void *)key ); 1079fc: 85 db test %ebx,%ebx 1079fe: 74 0c je 107a0c <== NEVER TAKEN 107a00: 83 ec 0c sub $0xc,%esp 107a03: 53 push %ebx 107a04: e8 4b fe ff ff call 107854 107a09: 83 c4 10 add $0x10,%esp return 0; } return 0; } 107a0c: 31 c0 xor %eax,%eax 107a0e: 8b 5d fc mov -0x4(%ebp),%ebx 107a11: c9 leave 107a12: c3 ret =============================================================================== 001079d3 : int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr) { 1079d3: 55 push %ebp <== NOT EXECUTED 1079d4: 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; 1079d6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1079d9: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED return 0; } 1079df: 31 c0 xor %eax,%eax <== NOT EXECUTED 1079e1: c9 leave <== NOT EXECUTED 1079e2: c3 ret <== NOT EXECUTED =============================================================================== 00107ae8 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 107ae8: 55 push %ebp <== NOT EXECUTED 107ae9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107aeb: 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); 107aee: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 107af1: ff 30 pushl (%eax) <== NOT EXECUTED 107af3: e8 e0 2d 00 00 call 10a8d8 <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) 107af8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; 107afb: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 107afe: 19 c0 sbb %eax,%eax <== NOT EXECUTED 107b00: f7 d0 not %eax <== NOT EXECUTED return -1; } 107b02: c9 leave <== NOT EXECUTED 107b03: c3 ret <== NOT EXECUTED =============================================================================== 00107a99 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 107a99: 55 push %ebp 107a9a: 89 e5 mov %esp,%ebp 107a9c: 83 ec 14 sub $0x14,%esp #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 107a9f: ff 75 08 pushl 0x8(%ebp) 107aa2: 6a 00 push $0x0 107aa4: 6a 54 push $0x54 107aa6: 6a 01 push $0x1 107aa8: 68 32 43 43 47 push $0x47434332 107aad: e8 8e 2c 00 00 call 10a740 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { 107ab2: 83 c4 20 add $0x20,%esp 107ab5: 85 c0 test %eax,%eax 107ab7: 74 0d je 107ac6 <== ALWAYS TAKEN "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(status), status ); #endif rtems_panic ("rtems_gxx_mutex_init"); 107ab9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107abc: 68 f5 e9 11 00 push $0x11e9f5 <== NOT EXECUTED 107ac1: e8 65 6f 00 00 call 10ea2b <== NOT EXECUTED } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } 107ac6: c9 leave 107ac7: c3 ret =============================================================================== 00107940 : 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)) { 107940: 55 push %ebp 107941: 89 e5 mov %esp,%ebp 107943: 56 push %esi 107944: 53 push %ebx 107945: 83 ec 10 sub $0x10,%esp 107948: 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 ) { 10794b: 8b 03 mov (%ebx),%eax 10794d: 85 c0 test %eax,%eax 10794f: 75 3f jne 107990 rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 107951: 52 push %edx 107952: 8d 45 f4 lea -0xc(%ebp),%eax 107955: 50 push %eax 107956: 68 00 01 00 00 push $0x100 10795b: 68 00 01 00 00 push $0x100 107960: e8 af 33 00 00 call 10ad14 if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { 107965: 8b 33 mov (%ebx),%esi 107967: 83 c4 10 add $0x10,%esp 10796a: 85 f6 test %esi,%esi 10796c: 75 06 jne 107974 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; 10796e: c7 03 01 00 00 00 movl $0x1,(%ebx) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 107974: 50 push %eax 107975: 8d 45 f4 lea -0xc(%ebp),%eax 107978: 50 push %eax 107979: 68 00 01 00 00 push $0x100 10797e: ff 75 f4 pushl -0xc(%ebp) 107981: e8 8e 33 00 00 call 10ad14 if ( o == 0 ) 107986: 83 c4 10 add $0x10,%esp 107989: 85 f6 test %esi,%esi 10798b: 75 03 jne 107990 <== NEVER TAKEN (*func)(); 10798d: ff 55 0c call *0xc(%ebp) } return 0; } 107990: 31 c0 xor %eax,%eax 107992: 8d 65 f8 lea -0x8(%ebp),%esp 107995: 5b pop %ebx 107996: 5e pop %esi 107997: c9 leave 107998: c3 ret =============================================================================== 00107a6c : int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 107a6c: 55 push %ebp 107a6d: 89 e5 mov %esp,%ebp 107a6f: 53 push %ebx 107a70: 83 ec 08 sub $0x8,%esp 107a73: 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 ); 107a76: ff 73 04 pushl 0x4(%ebx) 107a79: 53 push %ebx 107a7a: 6a 00 push $0x0 107a7c: e8 1f 34 00 00 call 10aea0 107a81: 89 c2 mov %eax,%edx if ( status == RTEMS_SUCCESSFUL ) { 107a83: 83 c4 10 add $0x10,%esp /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; 107a86: 83 c8 ff or $0xffffffff,%eax ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status == RTEMS_SUCCESSFUL ) { 107a89: 85 d2 test %edx,%edx 107a8b: 75 07 jne 107a94 <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; 107a8d: 8b 45 0c mov 0xc(%ebp),%eax 107a90: 89 03 mov %eax,(%ebx) return 0; 107a92: 31 c0 xor %eax,%eax } return -1; } 107a94: 8b 5d fc mov -0x4(%ebp),%ebx 107a97: c9 leave 107a98: c3 ret =============================================================================== 0010a8e4 : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 10a8e4: 55 push %ebp 10a8e5: 89 e5 mov %esp,%ebp 10a8e7: 83 ec 08 sub $0x8,%esp if ( 10a8ea: 83 3d d8 9b 12 00 03 cmpl $0x3,0x129bd8 10a8f1: 75 0d jne 10a900 <== NEVER TAKEN _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 10a8f3: e8 1c f1 ff ff call 109a14 10a8f8: 88 c2 mov %al,%dl ) { return NULL; 10a8fa: 31 c0 xor %eax,%eax uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() 10a8fc: 84 d2 test %dl,%dl 10a8fe: 74 1c je 10a91c ) { return NULL; } malloc_deferred_frees_process(); 10a900: e8 4d f1 ff ff call 109a52 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( 10a905: ff 75 10 pushl 0x10(%ebp) 10a908: ff 75 0c pushl 0xc(%ebp) 10a90b: ff 75 08 pushl 0x8(%ebp) 10a90e: ff 35 50 51 12 00 pushl 0x125150 10a914: e8 9f 43 00 00 call 10ecb8 <_Protected_heap_Allocate_aligned_with_boundary> 10a919: 83 c4 10 add $0x10,%esp RTEMS_Malloc_Heap, size, alignment, boundary ); } 10a91c: c9 leave 10a91d: c3 ret =============================================================================== 00106f6e : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 106f6e: 55 push %ebp 106f6f: 89 e5 mov %esp,%ebp 106f71: 57 push %edi 106f72: 56 push %esi 106f73: 53 push %ebx 106f74: 83 ec 48 sub $0x48,%esp 106f77: 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( 106f7a: 31 c0 xor %eax,%eax 106f7c: 83 c9 ff or $0xffffffff,%ecx 106f7f: 89 f7 mov %esi,%edi 106f81: f2 ae repnz scas %es:(%edi),%al 106f83: f7 d1 not %ecx 106f85: 49 dec %ecx 106f86: 6a 01 push $0x1 106f88: 8d 55 d4 lea -0x2c(%ebp),%edx 106f8b: 52 push %edx 106f8c: 6a 00 push $0x0 106f8e: 51 push %ecx 106f8f: 56 push %esi 106f90: 89 55 c4 mov %edx,-0x3c(%ebp) 106f93: e8 51 02 00 00 call 1071e9 106f98: 89 c7 mov %eax,%edi name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 106f9a: 8b 5d d4 mov -0x2c(%ebp),%ebx node_type = (*loc.ops->node_type_h)( &loc ); 106f9d: 83 c4 14 add $0x14,%esp 106fa0: 8b 55 c4 mov -0x3c(%ebp),%edx 106fa3: 52 push %edx 106fa4: 8b 45 e0 mov -0x20(%ebp),%eax 106fa7: ff 50 10 call *0x10(%eax) if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 106faa: 83 c4 10 add $0x10,%esp 106fad: 83 f8 02 cmp $0x2,%eax 106fb0: 8b 55 c4 mov -0x3c(%ebp),%edx 106fb3: 75 07 jne 106fbc 106fb5: 85 ff test %edi,%edi 106fb7: 0f 95 c0 setne %al 106fba: 74 16 je 106fd2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 106fbc: 83 ec 0c sub $0xc,%esp 106fbf: 8d 45 d4 lea -0x2c(%ebp),%eax 106fc2: 50 push %eax 106fc3: e8 08 03 00 00 call 1072d0 return RTEMS_UNSATISFIED; 106fc8: 83 c4 10 add $0x10,%esp 106fcb: b8 0d 00 00 00 mov $0xd,%eax 106fd0: eb 32 jmp 107004 } device_info->device_name = (char *) name; 106fd2: 8b 4d 0c mov 0xc(%ebp),%ecx 106fd5: 89 31 mov %esi,(%ecx) device_info->device_name_length = strlen( name ); 106fd7: 83 c9 ff or $0xffffffff,%ecx 106fda: 89 f7 mov %esi,%edi 106fdc: f2 ae repnz scas %es:(%edi),%al 106fde: f7 d1 not %ecx 106fe0: 49 dec %ecx 106fe1: 8b 45 0c mov 0xc(%ebp),%eax 106fe4: 89 48 04 mov %ecx,0x4(%eax) device_info->major = the_jnode->info.device.major; 106fe7: 8b 43 50 mov 0x50(%ebx),%eax 106fea: 8b 4d 0c mov 0xc(%ebp),%ecx 106fed: 89 41 08 mov %eax,0x8(%ecx) device_info->minor = the_jnode->info.device.minor; 106ff0: 8b 43 54 mov 0x54(%ebx),%eax 106ff3: 89 41 0c mov %eax,0xc(%ecx) rtems_filesystem_freenode( &loc ); 106ff6: 83 ec 0c sub $0xc,%esp 106ff9: 52 push %edx 106ffa: e8 d1 02 00 00 call 1072d0 return RTEMS_SUCCESSFUL; 106fff: 83 c4 10 add $0x10,%esp 107002: 31 c0 xor %eax,%eax } 107004: 8d 65 f4 lea -0xc(%ebp),%esp 107007: 5b pop %ebx 107008: 5e pop %esi 107009: 5f pop %edi 10700a: c9 leave 10700b: c3 ret =============================================================================== 0010c700 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c700: 55 push %ebp 10c701: 89 e5 mov %esp,%ebp 10c703: 57 push %edi 10c704: 56 push %esi 10c705: 53 push %ebx 10c706: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c709: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c70d: 74 41 je 10c750 <== NEVER TAKEN 10c70f: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10c714: 8b 04 9d 20 df 12 00 mov 0x12df20(,%ebx,4),%eax 10c71b: 85 c0 test %eax,%eax 10c71d: 74 2b je 10c74a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c71f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c722: be 01 00 00 00 mov $0x1,%esi 10c727: 85 ff test %edi,%edi 10c729: 75 17 jne 10c742 10c72b: eb 1d jmp 10c74a continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c72d: 8b 47 1c mov 0x1c(%edi),%eax 10c730: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c733: 85 c0 test %eax,%eax 10c735: 74 0a je 10c741 <== NEVER TAKEN continue; (*routine)(the_thread); 10c737: 83 ec 0c sub $0xc,%esp 10c73a: 50 push %eax 10c73b: ff 55 08 call *0x8(%ebp) 10c73e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c741: 46 inc %esi 10c742: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c746: 39 c6 cmp %eax,%esi 10c748: 76 e3 jbe 10c72d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c74a: 43 inc %ebx 10c74b: 83 fb 04 cmp $0x4,%ebx 10c74e: 75 c4 jne 10c714 (*routine)(the_thread); } } } 10c750: 8d 65 f4 lea -0xc(%ebp),%esp 10c753: 5b pop %ebx 10c754: 5e pop %esi 10c755: 5f pop %edi 10c756: c9 leave 10c757: c3 ret =============================================================================== 0010e008 : */ void rtems_libio_free( rtems_libio_t *iop ) { 10e008: 55 push %ebp 10e009: 89 e5 mov %esp,%ebp 10e00b: 53 push %ebx 10e00c: 83 ec 04 sub $0x4,%esp 10e00f: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_lock(); 10e012: e8 d5 fe ff ff call 10deec if (iop->sem) 10e017: 8b 43 2c mov 0x2c(%ebx),%eax 10e01a: 85 c0 test %eax,%eax 10e01c: 74 0c je 10e02a <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 10e01e: 83 ec 0c sub $0xc,%esp 10e021: 50 push %eax 10e022: e8 11 c1 ff ff call 10a138 10e027: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 10e02a: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 10e031: a1 1c 30 12 00 mov 0x12301c,%eax 10e036: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 10e039: 89 1d 1c 30 12 00 mov %ebx,0x12301c rtems_libio_unlock(); } 10e03f: 8b 5d fc mov -0x4(%ebp),%ebx 10e042: c9 leave iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_libio_unlock(); 10e043: e9 be fe ff ff jmp 10df06 =============================================================================== 001073d0 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1073d0: 55 push %ebp 1073d1: 89 e5 mov %esp,%ebp 1073d3: 53 push %ebx 1073d4: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1073d7: 8b 1d 44 f1 11 00 mov 0x11f144,%ebx 1073dd: 85 db test %ebx,%ebx 1073df: 74 3e je 10741f <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1073e1: 50 push %eax 1073e2: 50 push %eax 1073e3: 6a 38 push $0x38 1073e5: 53 push %ebx 1073e6: e8 3d fd ff ff call 107128 1073eb: a3 18 30 12 00 mov %eax,0x123018 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1073f0: 83 c4 10 add $0x10,%esp 1073f3: 85 c0 test %eax,%eax 1073f5: 75 07 jne 1073fe rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1073f7: 83 ec 0c sub $0xc,%esp 1073fa: 6a 1a push $0x1a 1073fc: eb 44 jmp 107442 iop = rtems_libio_iop_freelist = rtems_libio_iops; 1073fe: a3 1c 30 12 00 mov %eax,0x12301c 107403: 89 c2 mov %eax,%edx for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 107405: 31 c9 xor %ecx,%ecx 107407: eb 03 jmp 10740c iop->data1 = iop + 1; 107409: 89 52 fc mov %edx,-0x4(%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++) 10740c: 41 inc %ecx 10740d: 83 c2 38 add $0x38,%edx 107410: 39 d9 cmp %ebx,%ecx 107412: 72 f5 jb 107409 iop->data1 = iop + 1; iop->data1 = NULL; 107414: 6b db 38 imul $0x38,%ebx,%ebx 107417: c7 44 18 fc 00 00 00 movl $0x0,-0x4(%eax,%ebx,1) 10741e: 00 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 10741f: 83 ec 0c sub $0xc,%esp 107422: 68 20 30 12 00 push $0x123020 107427: 6a 00 push $0x0 107429: 6a 54 push $0x54 10742b: 6a 01 push $0x1 10742d: 68 4f 49 42 4c push $0x4c42494f 107432: e8 69 2b 00 00 call 109fa0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 107437: 83 c4 20 add $0x20,%esp 10743a: 85 c0 test %eax,%eax 10743c: 74 09 je 107447 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); 10743e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107441: 50 push %eax <== NOT EXECUTED 107442: e8 41 33 00 00 call 10a788 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 107447: a1 40 f1 11 00 mov 0x11f140,%eax 10744c: 85 c0 test %eax,%eax 10744e: 74 06 je 107456 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 107450: 8b 5d fc mov -0x4(%ebp),%ebx 107453: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 107454: ff e0 jmp *%eax } 107456: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107459: c9 leave <== NOT EXECUTED 10745a: c3 ret <== NOT EXECUTED =============================================================================== 00108491 : rtems_status_code rtems_libio_set_private_env(void) { 108491: 55 push %ebp 108492: 89 e5 mov %esp,%ebp 108494: 57 push %edi 108495: 56 push %esi 108496: 53 push %ebx 108497: 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); 10849a: 8d 45 e4 lea -0x1c(%ebp),%eax 10849d: 50 push %eax 10849e: 6a 00 push $0x0 1084a0: 6a 00 push $0x0 1084a2: e8 b1 27 00 00 call 10ac58 1084a7: 89 45 c4 mov %eax,-0x3c(%ebp) if (sc != RTEMS_SUCCESSFUL) return sc; 1084aa: 83 c4 10 add $0x10,%esp 1084ad: 85 c0 test %eax,%eax 1084af: 0f 85 c8 00 00 00 jne 10857d <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 1084b5: 81 3d a0 22 12 00 a8 cmpl $0x1243a8,0x1222a0 1084bc: 43 12 00 1084bf: 75 49 jne 10850a rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 1084c1: 83 ec 0c sub $0xc,%esp 1084c4: 6a 48 push $0x48 1084c6: e8 b1 f5 ff ff call 107a7c 1084cb: 89 c3 mov %eax,%ebx if (!tmp) 1084cd: 83 c4 10 add $0x10,%esp 1084d0: 85 c0 test %eax,%eax 1084d2: 0f 84 9e 00 00 00 je 108576 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 1084d8: 50 push %eax 1084d9: 68 54 84 10 00 push $0x108454 1084de: 68 a0 22 12 00 push $0x1222a0 1084e3: 6a 00 push $0x0 1084e5: e8 8a 28 00 00 call 10ad74 1084ea: 89 c6 mov %eax,%esi RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 1084ec: 83 c4 10 add $0x10,%esp 1084ef: 85 c0 test %eax,%eax 1084f1: 74 11 je 108504 <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 1084f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1084f6: 53 push %ebx <== NOT EXECUTED 1084f7: e8 fc f0 ff ff call 1075f8 <== NOT EXECUTED return sc; 1084fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1084ff: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED 108502: eb 79 jmp 10857d <== NOT EXECUTED } rtems_current_user_env = tmp; 108504: 89 1d a0 22 12 00 mov %ebx,0x1222a0 } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 10850a: a1 a0 22 12 00 mov 0x1222a0,%eax 10850f: be a8 43 12 00 mov $0x1243a8,%esi 108514: b9 12 00 00 00 mov $0x12,%ecx 108519: 89 c7 mov %eax,%edi 10851b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 10851d: 8b 55 e4 mov -0x1c(%ebp),%edx 108520: 89 10 mov %edx,(%eax) * 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); 108522: 83 ec 0c sub $0xc,%esp 108525: 6a 00 push $0x0 108527: 8d 5d d0 lea -0x30(%ebp),%ebx 10852a: 53 push %ebx 10852b: 6a 00 push $0x0 10852d: 6a 01 push $0x1 10852f: 68 f4 e0 11 00 push $0x11e0f4 108534: e8 c4 ef ff ff call 1074fd rtems_filesystem_root = loc; 108539: 8b 3d a0 22 12 00 mov 0x1222a0,%edi 10853f: 83 c7 18 add $0x18,%edi 108542: b9 05 00 00 00 mov $0x5,%ecx 108547: 89 de mov %ebx,%esi 108549: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10854b: 83 c4 14 add $0x14,%esp 10854e: 6a 00 push $0x0 108550: 53 push %ebx 108551: 6a 00 push $0x0 108553: 6a 01 push $0x1 108555: 68 f4 e0 11 00 push $0x11e0f4 10855a: e8 9e ef ff ff call 1074fd rtems_filesystem_current = loc; 10855f: 8b 3d a0 22 12 00 mov 0x1222a0,%edi 108565: 83 c7 04 add $0x4,%edi 108568: b9 05 00 00 00 mov $0x5,%ecx 10856d: 89 de mov %ebx,%esi 10856f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return RTEMS_SUCCESSFUL; 108571: 83 c4 20 add $0x20,%esp 108574: eb 07 jmp 10857d /* 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; 108576: c7 45 c4 1a 00 00 00 movl $0x1a,-0x3c(%ebp) <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 10857d: 8b 45 c4 mov -0x3c(%ebp),%eax 108580: 8d 65 f4 lea -0xc(%ebp),%esp 108583: 5b pop %ebx 108584: 5e pop %esi 108585: 5f pop %edi 108586: c9 leave 108587: c3 ret =============================================================================== 00108588 : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 108588: 55 push %ebp <== NOT EXECUTED 108589: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10858b: 53 push %ebx <== NOT EXECUTED 10858c: 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); 10858f: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 108592: 50 push %eax <== NOT EXECUTED 108593: 6a 00 push $0x0 <== NOT EXECUTED 108595: 6a 00 push $0x0 <== NOT EXECUTED 108597: e8 bc 26 00 00 call 10ac58 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 10859c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10859f: 85 c0 test %eax,%eax <== NOT EXECUTED 1085a1: 75 77 jne 10861a <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1085a3: 8b 1d a0 22 12 00 mov 0x1222a0,%ebx <== NOT EXECUTED 1085a9: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 1085ac: 39 03 cmp %eax,(%ebx) <== NOT EXECUTED 1085ae: 75 23 jne 1085d3 <== NOT EXECUTED /* 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); 1085b0: 50 push %eax <== NOT EXECUTED 1085b1: 50 push %eax <== NOT EXECUTED 1085b2: 68 a0 22 12 00 push $0x1222a0 <== NOT EXECUTED 1085b7: 6a 00 push $0x0 <== NOT EXECUTED 1085b9: e8 4a 28 00 00 call 10ae08 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1085be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085c1: 85 c0 test %eax,%eax <== NOT EXECUTED 1085c3: 75 55 jne 10861a <== NOT EXECUTED free_user_env(tmp); 1085c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1085c8: 53 push %ebx <== NOT EXECUTED 1085c9: e8 86 fe ff ff call 108454 <== NOT EXECUTED 1085ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085d1: eb 19 jmp 1085ec <== NOT EXECUTED } else { sc = rtems_task_variable_get( 1085d3: 51 push %ecx <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); 1085d4: 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( 1085d7: 50 push %eax <== NOT EXECUTED 1085d8: 68 a0 22 12 00 push $0x1222a0 <== NOT EXECUTED 1085dd: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1085e0: e8 9f 28 00 00 call 10ae84 <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 1085e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1085e8: 85 c0 test %eax,%eax <== NOT EXECUTED 1085ea: 75 24 jne 108610 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 1085ec: 52 push %edx <== NOT EXECUTED 1085ed: 68 54 84 10 00 push $0x108454 <== NOT EXECUTED 1085f2: 68 a0 22 12 00 push $0x1222a0 <== NOT EXECUTED 1085f7: 6a 00 push $0x0 <== NOT EXECUTED 1085f9: e8 76 27 00 00 call 10ad74 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 1085fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108601: 85 c0 test %eax,%eax <== NOT EXECUTED 108603: 75 0b jne 108610 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 108605: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 108608: 89 15 a0 22 12 00 mov %edx,0x1222a0 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 10860e: eb 0a jmp 10861a <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 108610: c7 05 a0 22 12 00 a8 movl $0x1243a8,0x1222a0 <== NOT EXECUTED 108617: 43 12 00 return sc; } 10861a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10861d: c9 leave <== NOT EXECUTED 10861e: c3 ret <== NOT EXECUTED =============================================================================== 0010df51 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 10df51: 55 push %ebp 10df52: 89 e5 mov %esp,%ebp 10df54: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10df57: 89 d1 mov %edx,%ecx 10df59: 83 e1 06 and $0x6,%ecx fcntl_flags |= O_RDWR; 10df5c: b8 02 00 00 00 mov $0x2,%eax uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 10df61: 83 f9 06 cmp $0x6,%ecx 10df64: 74 0f je 10df75 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { fcntl_flags |= O_RDONLY; 10df66: 30 c0 xor %al,%al { 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) { 10df68: f6 c2 02 test $0x2,%dl 10df6b: 75 08 jne 10df75 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 10df6d: 31 c0 xor %eax,%eax <== NOT EXECUTED 10df6f: f6 c2 04 test $0x4,%dl <== NOT EXECUTED 10df72: 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 ) { 10df75: f6 c2 01 test $0x1,%dl 10df78: 74 03 je 10df7d fcntl_flags |= O_NONBLOCK; 10df7a: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 10df7d: f6 c6 02 test $0x2,%dh 10df80: 74 03 je 10df85 fcntl_flags |= O_APPEND; 10df82: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 10df85: 80 e6 04 and $0x4,%dh 10df88: 74 03 je 10df8d fcntl_flags |= O_CREAT; 10df8a: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 10df8d: c9 leave 10df8e: c3 ret =============================================================================== 00109d18 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 109d18: 55 push %ebp 109d19: 89 e5 mov %esp,%ebp 109d1b: 83 ec 1c sub $0x1c,%esp uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 109d1e: 8d 45 f4 lea -0xc(%ebp),%eax 109d21: 50 push %eax 109d22: ff 75 08 pushl 0x8(%ebp) 109d25: ff 35 50 51 12 00 pushl 0x125150 109d2b: e8 30 50 00 00 call 10ed60 <_Protected_heap_Get_block_size> 109d30: 83 c4 10 add $0x10,%esp 109d33: 84 c0 test %al,%al 109d35: 74 11 je 109d48 <== NEVER TAKEN MSBUMP(lifetime_freed, size); 109d37: 8b 45 f4 mov -0xc(%ebp),%eax 109d3a: 31 d2 xor %edx,%edx 109d3c: 01 05 48 99 12 00 add %eax,0x129948 109d42: 11 15 4c 99 12 00 adc %edx,0x12994c } } 109d48: c9 leave 109d49: c3 ret =============================================================================== 00109d4a : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 109d4a: 55 push %ebp 109d4b: 89 e5 mov %esp,%ebp 109d4d: 83 ec 18 sub $0x18,%esp 109d50: 8b 45 08 mov 0x8(%ebp),%eax uintptr_t actual_size = 0; 109d53: 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 ) 109d5a: 85 c0 test %eax,%eax 109d5c: 74 43 je 109da1 <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 109d5e: 52 push %edx 109d5f: 8d 55 f4 lea -0xc(%ebp),%edx 109d62: 52 push %edx 109d63: 50 push %eax 109d64: ff 35 50 51 12 00 pushl 0x125150 109d6a: e8 f1 4f 00 00 call 10ed60 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); 109d6f: 8b 45 f4 mov -0xc(%ebp),%eax 109d72: 31 d2 xor %edx,%edx 109d74: 03 05 40 99 12 00 add 0x129940,%eax 109d7a: 13 15 44 99 12 00 adc 0x129944,%edx 109d80: a3 40 99 12 00 mov %eax,0x129940 109d85: 89 15 44 99 12 00 mov %edx,0x129944 current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 109d8b: 2b 05 48 99 12 00 sub 0x129948,%eax if (current_depth > s->max_depth) 109d91: 83 c4 10 add $0x10,%esp 109d94: 3b 05 3c 99 12 00 cmp 0x12993c,%eax 109d9a: 76 05 jbe 109da1 s->max_depth = current_depth; 109d9c: a3 3c 99 12 00 mov %eax,0x12993c } 109da1: c9 leave 109da2: c3 ret =============================================================================== 001117b8 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 1117b8: 55 push %ebp 1117b9: 89 e5 mov %esp,%ebp 1117bb: 57 push %edi 1117bc: 56 push %esi 1117bd: 53 push %ebx 1117be: 83 ec 0c sub $0xc,%esp 1117c1: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Parameter error checks */ if ( !pointer ) return EINVAL; 1117c4: be 16 00 00 00 mov $0x16,%esi void *return_this; /* * Parameter error checks */ if ( !pointer ) 1117c9: 85 db test %ebx,%ebx 1117cb: 74 55 je 111822 return EINVAL; *pointer = NULL; 1117cd: 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()) && 1117d3: 83 3d 84 75 12 00 03 cmpl $0x3,0x127584 1117da: 75 09 jne 1117e5 <== NEVER TAKEN !malloc_is_system_state_OK() ) 1117dc: e8 b3 69 ff ff call 108194 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1117e1: 84 c0 test %al,%al 1117e3: 74 3d je 111822 <== NEVER TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 1117e5: e8 e8 69 ff ff call 1081d2 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return 1117ea: 6a 00 push $0x0 1117ec: ff 75 0c pushl 0xc(%ebp) 1117ef: ff 75 10 pushl 0x10(%ebp) 1117f2: ff 35 30 33 12 00 pushl 0x123330 1117f8: e8 9b b1 ff ff call 10c998 <_Protected_heap_Allocate_aligned_with_boundary> 1117fd: 89 c7 mov %eax,%edi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 1117ff: 83 c4 10 add $0x10,%esp return ENOMEM; 111802: be 0c 00 00 00 mov $0xc,%esi return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 111807: 85 c0 test %eax,%eax 111809: 74 17 je 111822 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 11180b: a1 d0 56 12 00 mov 0x1256d0,%eax 111810: 85 c0 test %eax,%eax 111812: 74 0a je 11181e (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 111814: 83 ec 0c sub $0xc,%esp 111817: 53 push %ebx 111818: ff 50 04 call *0x4(%eax) 11181b: 83 c4 10 add $0x10,%esp *pointer = return_this; 11181e: 89 3b mov %edi,(%ebx) return 0; 111820: 31 f6 xor %esi,%esi } 111822: 89 f0 mov %esi,%eax 111824: 8d 65 f4 lea -0xc(%ebp),%esp 111827: 5b pop %ebx 111828: 5e pop %esi 111829: 5f pop %edi 11182a: c9 leave 11182b: c3 ret =============================================================================== 00110194 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 110194: 55 push %ebp 110195: 89 e5 mov %esp,%ebp 110197: 57 push %edi 110198: 56 push %esi 110199: 53 push %ebx 11019a: 83 ec 78 sub $0x78,%esp int success = 0; char *dup_path = strdup(path); 11019d: ff 75 08 pushl 0x8(%ebp) 1101a0: e8 1b 21 00 00 call 1122c0 1101a5: 89 c3 mov %eax,%ebx if (dup_path != NULL) { 1101a7: 83 c4 10 add $0x10,%esp success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 1101aa: 83 c8 ff or $0xffffffff,%eax rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { 1101ad: 85 db test %ebx,%ebx 1101af: 0f 84 1e 01 00 00 je 1102d3 <== NEVER TAKEN p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; 1101b5: 31 c0 xor %eax,%eax 1101b7: 80 3b 2f cmpb $0x2f,(%ebx) 1101ba: 0f 94 c0 sete %al 1101bd: 8d 3c 03 lea (%ebx,%eax,1),%edi char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 1101c0: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp) 1101c7: b8 01 00 00 00 mov $0x1,%eax ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 1101cc: 8a 0f mov (%edi),%cl last = 1; 1101ce: ba 01 00 00 00 mov $0x1,%edx oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 1101d3: 84 c9 test %cl,%cl 1101d5: 74 0b je 1101e2 last = 1; else if (p[0] != '/') 1101d7: 80 f9 2f cmp $0x2f,%cl 1101da: 0f 85 c8 00 00 00 jne 1102a8 1101e0: 30 d2 xor %dl,%dl continue; *p = '\0'; 1101e2: c6 07 00 movb $0x0,(%edi) if (!last && p[1] == '\0') 1101e5: be 01 00 00 00 mov $0x1,%esi 1101ea: 85 d2 test %edx,%edx 1101ec: 75 0b jne 1101f9 1101ee: 31 d2 xor %edx,%edx 1101f0: 80 7f 01 00 cmpb $0x0,0x1(%edi) 1101f4: 0f 94 c2 sete %dl 1101f7: 89 d6 mov %edx,%esi last = 1; if (first) { 1101f9: 85 c0 test %eax,%eax 1101fb: 74 1a je 110217 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 1101fd: 83 ec 0c sub $0xc,%esp 110200: 6a 00 push $0x0 110202: e8 75 01 00 00 call 11037c 110207: 89 45 94 mov %eax,-0x6c(%ebp) numask = oumask & ~(S_IWUSR | S_IXUSR); 11020a: 24 3f and $0x3f,%al (void)umask(numask); 11020c: 89 04 24 mov %eax,(%esp) 11020f: e8 68 01 00 00 call 11037c 110214: 83 c4 10 add $0x10,%esp first = 0; } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 110217: b8 ff 01 00 00 mov $0x1ff,%eax oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 11021c: 85 f6 test %esi,%esi 11021e: 74 11 je 110231 (void)umask(oumask); 110220: 83 ec 0c sub $0xc,%esp 110223: ff 75 94 pushl -0x6c(%ebp) 110226: e8 51 01 00 00 call 11037c 11022b: 83 c4 10 add $0x10,%esp if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 11022e: 8b 45 0c mov 0xc(%ebp),%eax 110231: 52 push %edx 110232: 52 push %edx 110233: 50 push %eax 110234: 53 push %ebx 110235: e8 32 84 ff ff call 10866c 11023a: 83 c4 10 add $0x10,%esp 11023d: 85 c0 test %eax,%eax 11023f: 79 5e jns 11029f if (errno == EEXIST || errno == EISDIR) { 110241: e8 a2 14 00 00 call 1116e8 <__errno> 110246: 83 38 11 cmpl $0x11,(%eax) 110249: 74 0a je 110255 <== ALWAYS TAKEN 11024b: e8 98 14 00 00 call 1116e8 <__errno> <== NOT EXECUTED 110250: 83 38 15 cmpl $0x15,(%eax) <== NOT EXECUTED 110253: 75 59 jne 1102ae <== NOT EXECUTED if (stat(path, &sb) < 0) { 110255: 50 push %eax 110256: 50 push %eax 110257: 8d 45 a0 lea -0x60(%ebp),%eax 11025a: 50 push %eax 11025b: 53 push %ebx 11025c: e8 8b 00 00 00 call 1102ec 110261: 83 c4 10 add $0x10,%esp 110264: 85 c0 test %eax,%eax 110266: 78 46 js 1102ae <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 110268: 8b 45 ac mov -0x54(%ebp),%eax 11026b: 25 00 f0 00 00 and $0xf000,%eax 110270: 3d 00 40 00 00 cmp $0x4000,%eax 110275: 74 22 je 110299 if (last) 110277: 85 f6 test %esi,%esi 110279: 74 0f je 11028a <== NEVER TAKEN errno = EEXIST; 11027b: e8 68 14 00 00 call 1116e8 <__errno> 110280: c7 00 11 00 00 00 movl $0x11,(%eax) else errno = ENOTDIR; retval = 0; 110286: 31 ff xor %edi,%edi 110288: eb 38 jmp 1102c2 break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 11028a: e8 59 14 00 00 call 1116e8 <__errno> <== NOT EXECUTED 11028f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED retval = 0; 110295: 31 ff xor %edi,%edi <== NOT EXECUTED 110297: eb 1b jmp 1102b4 <== NOT EXECUTED break; } if (last) 110299: 85 f6 test %esi,%esi 11029b: 75 3e jne 1102db 11029d: eb 04 jmp 1102a3 } else { retval = 0; break; } } if (!last) 11029f: 85 f6 test %esi,%esi 1102a1: 75 3f jne 1102e2 *p = '/'; 1102a3: c6 07 2f movb $0x2f,(%edi) 1102a6: 31 c0 xor %eax,%eax p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { 1102a8: 47 inc %edi 1102a9: e9 1e ff ff ff jmp 1101cc if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; 1102ae: 31 ff xor %edi,%edi <== NOT EXECUTED } } if (!last) *p = '/'; } if (!first && !last) 1102b0: 85 f6 test %esi,%esi <== NOT EXECUTED 1102b2: 75 0e jne 1102c2 <== NOT EXECUTED (void)umask(oumask); 1102b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1102b7: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED 1102ba: e8 bd 00 00 00 call 11037c <== NOT EXECUTED 1102bf: 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); 1102c2: 83 ec 0c sub $0xc,%esp 1102c5: 53 push %ebx 1102c6: e8 81 7e ff ff call 10814c } return success != 0 ? 0 : -1; 1102cb: 83 c4 10 add $0x10,%esp 1102ce: 83 ff 01 cmp $0x1,%edi 1102d1: 19 c0 sbb %eax,%eax } 1102d3: 8d 65 f4 lea -0xc(%ebp),%esp 1102d6: 5b pop %ebx 1102d7: 5e pop %esi 1102d8: 5f pop %edi 1102d9: c9 leave 1102da: c3 ret errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; 1102db: bf 02 00 00 00 mov $0x2,%edi 1102e0: eb e0 jmp 1102c2 } else { retval = 0; break; } } if (!last) 1102e2: bf 01 00 00 00 mov $0x1,%edi 1102e7: eb d9 jmp 1102c2 =============================================================================== 001148d0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1148d0: 55 push %ebp 1148d1: 89 e5 mov %esp,%ebp 1148d3: 57 push %edi 1148d4: 56 push %esi 1148d5: 53 push %ebx 1148d6: 83 ec 1c sub $0x1c,%esp 1148d9: 8b 75 0c mov 0xc(%ebp),%esi 1148dc: 8b 55 10 mov 0x10(%ebp),%edx 1148df: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1148e2: b8 03 00 00 00 mov $0x3,%eax rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1148e7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1148eb: 0f 84 ce 00 00 00 je 1149bf return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 1148f1: b0 09 mov $0x9,%al register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 1148f3: 85 f6 test %esi,%esi 1148f5: 0f 84 c4 00 00 00 je 1149bf return RTEMS_INVALID_ADDRESS; if ( !id ) 1148fb: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 1148ff: 0f 84 ba 00 00 00 je 1149bf <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114905: 85 ff test %edi,%edi 114907: 0f 84 ad 00 00 00 je 1149ba 11490d: 85 d2 test %edx,%edx 11490f: 0f 84 a5 00 00 00 je 1149ba !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 114915: b0 08 mov $0x8,%al return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114917: 39 fa cmp %edi,%edx 114919: 0f 82 a0 00 00 00 jb 1149bf 11491f: f7 c7 03 00 00 00 test $0x3,%edi 114925: 0f 85 94 00 00 00 jne 1149bf !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 11492b: b0 09 mov $0x9,%al if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11492d: f7 c6 03 00 00 00 test $0x3,%esi 114933: 0f 85 86 00 00 00 jne 1149bf 114939: a1 38 c5 13 00 mov 0x13c538,%eax 11493e: 40 inc %eax 11493f: a3 38 c5 13 00 mov %eax,0x13c538 * 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 ); 114944: 83 ec 0c sub $0xc,%esp 114947: 68 c4 c3 13 00 push $0x13c3c4 11494c: 89 55 e4 mov %edx,-0x1c(%ebp) 11494f: e8 1c 3d 00 00 call 118670 <_Objects_Allocate> 114954: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114956: 83 c4 10 add $0x10,%esp 114959: 85 c0 test %eax,%eax 11495b: 8b 55 e4 mov -0x1c(%ebp),%edx 11495e: 75 0c jne 11496c _Thread_Enable_dispatch(); 114960: e8 21 49 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 114965: b8 05 00 00 00 mov $0x5,%eax 11496a: eb 53 jmp 1149bf _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 11496c: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11496f: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 114972: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114975: 8b 45 18 mov 0x18(%ebp),%eax 114978: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 11497b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 114982: 57 push %edi 114983: 89 d0 mov %edx,%eax 114985: 31 d2 xor %edx,%edx 114987: f7 f7 div %edi 114989: 50 push %eax 11498a: 56 push %esi 11498b: 8d 43 24 lea 0x24(%ebx),%eax 11498e: 50 push %eax 11498f: e8 3c 2a 00 00 call 1173d0 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 114994: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 114997: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11499a: 8b 15 e0 c3 13 00 mov 0x13c3e0,%edx 1149a0: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1149a3: 8b 55 08 mov 0x8(%ebp),%edx 1149a6: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1149a9: 8b 55 1c mov 0x1c(%ebp),%edx 1149ac: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1149ae: e8 d3 48 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1149b3: 83 c4 10 add $0x10,%esp 1149b6: 31 c0 xor %eax,%eax 1149b8: eb 05 jmp 1149bf 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; 1149ba: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1149bf: 8d 65 f4 lea -0xc(%ebp),%esp 1149c2: 5b pop %ebx 1149c3: 5e pop %esi 1149c4: 5f pop %edi 1149c5: c9 leave 1149c6: c3 ret =============================================================================== 0010b095 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b095: 55 push %ebp 10b096: 89 e5 mov %esp,%ebp 10b098: 57 push %edi 10b099: 56 push %esi 10b09a: 53 push %ebx 10b09b: 83 ec 30 sub $0x30,%esp 10b09e: 8b 75 08 mov 0x8(%ebp),%esi 10b0a1: 8b 5d 0c mov 0xc(%ebp),%ebx 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 ); 10b0a4: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10b0a7: 50 push %eax 10b0a8: 56 push %esi 10b0a9: 68 54 69 12 00 push $0x126954 10b0ae: e8 71 1d 00 00 call 10ce24 <_Objects_Get> 10b0b3: 89 c7 mov %eax,%edi switch ( location ) { 10b0b5: 83 c4 10 add $0x10,%esp 10b0b8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b0bc: 0f 85 3d 01 00 00 jne 10b1ff case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b0c2: a1 8c 6c 12 00 mov 0x126c8c,%eax 10b0c7: 39 47 40 cmp %eax,0x40(%edi) 10b0ca: 74 0f je 10b0db _Thread_Enable_dispatch(); 10b0cc: e8 01 25 00 00 call 10d5d2 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10b0d1: bb 17 00 00 00 mov $0x17,%ebx 10b0d6: e9 29 01 00 00 jmp 10b204 } if ( length == RTEMS_PERIOD_STATUS ) { 10b0db: 85 db test %ebx,%ebx 10b0dd: 75 19 jne 10b0f8 switch ( the_period->state ) { 10b0df: 8b 47 38 mov 0x38(%edi),%eax 10b0e2: 83 f8 04 cmp $0x4,%eax 10b0e5: 77 07 ja 10b0ee <== NEVER TAKEN 10b0e7: 8b 1c 85 64 fc 11 00 mov 0x11fc64(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b0ee: e8 df 24 00 00 call 10d5d2 <_Thread_Enable_dispatch> return( return_value ); 10b0f3: e9 0c 01 00 00 jmp 10b204 } _ISR_Disable( level ); 10b0f8: 9c pushf 10b0f9: fa cli 10b0fa: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10b0fd: 8b 47 38 mov 0x38(%edi),%eax 10b100: 83 f8 02 cmp $0x2,%eax 10b103: 74 5d je 10b162 10b105: 83 f8 04 cmp $0x4,%eax 10b108: 0f 84 b8 00 00 00 je 10b1c6 10b10e: 85 c0 test %eax,%eax 10b110: 0f 85 e9 00 00 00 jne 10b1ff <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10b116: ff 75 d4 pushl -0x2c(%ebp) 10b119: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b11a: 83 ec 0c sub $0xc,%esp 10b11d: 57 push %edi 10b11e: e8 2f fe ff ff call 10af52 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b123: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b12a: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b131: c7 47 2c 10 b4 10 00 movl $0x10b410,0x2c(%edi) the_watchdog->id = id; 10b138: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b13b: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b142: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b145: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b148: 58 pop %eax 10b149: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b14a: 83 c7 10 add $0x10,%edi 10b14d: 57 push %edi 10b14e: 68 10 6b 12 00 push $0x126b10 10b153: e8 88 33 00 00 call 10e4e0 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b158: e8 75 24 00 00 call 10d5d2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b15d: 83 c4 10 add $0x10,%esp 10b160: eb 60 jmp 10b1c2 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b162: 83 ec 0c sub $0xc,%esp 10b165: 57 push %edi 10b166: e8 4f fe ff ff call 10afba <_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; 10b16b: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b172: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b175: ff 75 d4 pushl -0x2c(%ebp) 10b178: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b179: a1 8c 6c 12 00 mov 0x126c8c,%eax 10b17e: 8b 57 08 mov 0x8(%edi),%edx 10b181: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b184: 5b pop %ebx 10b185: 5e pop %esi 10b186: 68 00 40 00 00 push $0x4000 10b18b: 50 push %eax 10b18c: e8 17 2c 00 00 call 10dda8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b191: 9c pushf 10b192: fa cli 10b193: 5a pop %edx local_state = the_period->state; 10b194: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b197: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b19e: 52 push %edx 10b19f: 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 ) 10b1a0: 83 c4 10 add $0x10,%esp 10b1a3: 83 f8 03 cmp $0x3,%eax 10b1a6: 75 15 jne 10b1bd _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b1a8: 51 push %ecx 10b1a9: 51 push %ecx 10b1aa: 68 00 40 00 00 push $0x4000 10b1af: ff 35 8c 6c 12 00 pushl 0x126c8c 10b1b5: e8 a6 20 00 00 call 10d260 <_Thread_Clear_state> 10b1ba: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b1bd: e8 10 24 00 00 call 10d5d2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1c2: 31 db xor %ebx,%ebx 10b1c4: eb 3e jmp 10b204 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b1c6: 83 ec 0c sub $0xc,%esp 10b1c9: 57 push %edi 10b1ca: e8 eb fd ff ff call 10afba <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b1cf: ff 75 d4 pushl -0x2c(%ebp) 10b1d2: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b1d3: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b1da: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b1dd: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b1e0: 58 pop %eax 10b1e1: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b1e2: 83 c7 10 add $0x10,%edi 10b1e5: 57 push %edi 10b1e6: 68 10 6b 12 00 push $0x126b10 10b1eb: e8 f0 32 00 00 call 10e4e0 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b1f0: e8 dd 23 00 00 call 10d5d2 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10b1f5: 83 c4 10 add $0x10,%esp 10b1f8: bb 06 00 00 00 mov $0x6,%ebx 10b1fd: eb 05 jmp 10b204 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1ff: bb 04 00 00 00 mov $0x4,%ebx } 10b204: 89 d8 mov %ebx,%eax 10b206: 8d 65 f4 lea -0xc(%ebp),%esp 10b209: 5b pop %ebx 10b20a: 5e pop %esi 10b20b: 5f pop %edi 10b20c: c9 leave 10b20d: c3 ret =============================================================================== 0010b210 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b210: 55 push %ebp 10b211: 89 e5 mov %esp,%ebp 10b213: 57 push %edi 10b214: 56 push %esi 10b215: 53 push %ebx 10b216: 83 ec 7c sub $0x7c,%esp 10b219: 8b 5d 08 mov 0x8(%ebp),%ebx 10b21c: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10b21f: 85 ff test %edi,%edi 10b221: 0f 84 2b 01 00 00 je 10b352 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b227: 52 push %edx 10b228: 52 push %edx 10b229: 68 78 fc 11 00 push $0x11fc78 10b22e: 53 push %ebx 10b22f: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b231: 5e pop %esi 10b232: 58 pop %eax 10b233: 68 96 fc 11 00 push $0x11fc96 10b238: 53 push %ebx 10b239: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b23b: 5a pop %edx 10b23c: 59 pop %ecx 10b23d: 68 b8 fc 11 00 push $0x11fcb8 10b242: 53 push %ebx 10b243: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b245: 5e pop %esi 10b246: 58 pop %eax 10b247: 68 db fc 11 00 push $0x11fcdb 10b24c: 53 push %ebx 10b24d: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b24f: 5a pop %edx 10b250: 59 pop %ecx 10b251: 68 26 fd 11 00 push $0x11fd26 10b256: 53 push %ebx 10b257: ff d7 call *%edi /* * 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 ; 10b259: 8b 35 5c 69 12 00 mov 0x12695c,%esi 10b25f: 83 c4 10 add $0x10,%esp 10b262: e9 df 00 00 00 jmp 10b346 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b267: 50 push %eax 10b268: 50 push %eax 10b269: 8d 45 88 lea -0x78(%ebp),%eax 10b26c: 50 push %eax 10b26d: 56 push %esi 10b26e: e8 1d 4b 00 00 call 10fd90 if ( status != RTEMS_SUCCESSFUL ) 10b273: 83 c4 10 add $0x10,%esp 10b276: 85 c0 test %eax,%eax 10b278: 0f 85 c7 00 00 00 jne 10b345 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b27e: 51 push %ecx 10b27f: 51 push %ecx 10b280: 8d 55 c0 lea -0x40(%ebp),%edx 10b283: 52 push %edx 10b284: 56 push %esi 10b285: e8 aa 4b 00 00 call 10fe34 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b28a: 83 c4 0c add $0xc,%esp 10b28d: 8d 45 e3 lea -0x1d(%ebp),%eax 10b290: 50 push %eax 10b291: 6a 05 push $0x5 10b293: ff 75 c0 pushl -0x40(%ebp) 10b296: e8 01 02 00 00 call 10b49c /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b29b: 58 pop %eax 10b29c: 5a pop %edx 10b29d: ff 75 8c pushl -0x74(%ebp) 10b2a0: ff 75 88 pushl -0x78(%ebp) 10b2a3: 8d 55 e3 lea -0x1d(%ebp),%edx 10b2a6: 52 push %edx 10b2a7: 56 push %esi 10b2a8: 68 72 fd 11 00 push $0x11fd72 10b2ad: 53 push %ebx 10b2ae: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b2b0: 8b 45 88 mov -0x78(%ebp),%eax 10b2b3: 83 c4 20 add $0x20,%esp 10b2b6: 85 c0 test %eax,%eax 10b2b8: 75 0f jne 10b2c9 (*print)( context, "\n" ); 10b2ba: 51 push %ecx 10b2bb: 51 push %ecx 10b2bc: 68 ec ff 11 00 push $0x11ffec 10b2c1: 53 push %ebx 10b2c2: ff d7 call *%edi continue; 10b2c4: 83 c4 10 add $0x10,%esp 10b2c7: eb 7c jmp 10b345 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 ); 10b2c9: 52 push %edx 10b2ca: 8d 55 d8 lea -0x28(%ebp),%edx 10b2cd: 52 push %edx 10b2ce: 50 push %eax 10b2cf: 8d 45 a0 lea -0x60(%ebp),%eax 10b2d2: 50 push %eax 10b2d3: e8 dc 2e 00 00 call 10e1b4 <_Timespec_Divide_by_integer> (*print)( context, 10b2d8: 8b 45 dc mov -0x24(%ebp),%eax 10b2db: b9 e8 03 00 00 mov $0x3e8,%ecx 10b2e0: 99 cltd 10b2e1: f7 f9 idiv %ecx 10b2e3: 50 push %eax 10b2e4: ff 75 d8 pushl -0x28(%ebp) 10b2e7: 8b 45 9c mov -0x64(%ebp),%eax 10b2ea: 99 cltd 10b2eb: f7 f9 idiv %ecx 10b2ed: 50 push %eax 10b2ee: ff 75 98 pushl -0x68(%ebp) 10b2f1: 8b 45 94 mov -0x6c(%ebp),%eax 10b2f4: 99 cltd 10b2f5: f7 f9 idiv %ecx 10b2f7: 50 push %eax 10b2f8: ff 75 90 pushl -0x70(%ebp) 10b2fb: 68 89 fd 11 00 push $0x11fd89 10b300: 53 push %ebx 10b301: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b304: ff d7 call *%edi 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); 10b306: 83 c4 2c add $0x2c,%esp 10b309: 8d 55 d8 lea -0x28(%ebp),%edx 10b30c: 52 push %edx 10b30d: ff 75 88 pushl -0x78(%ebp) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; 10b310: 8d 45 b8 lea -0x48(%ebp),%eax _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b313: 50 push %eax 10b314: e8 9b 2e 00 00 call 10e1b4 <_Timespec_Divide_by_integer> (*print)( context, 10b319: 8b 45 dc mov -0x24(%ebp),%eax 10b31c: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b31f: 99 cltd 10b320: f7 f9 idiv %ecx 10b322: 50 push %eax 10b323: ff 75 d8 pushl -0x28(%ebp) 10b326: 8b 45 b4 mov -0x4c(%ebp),%eax 10b329: 99 cltd 10b32a: f7 f9 idiv %ecx 10b32c: 50 push %eax 10b32d: ff 75 b0 pushl -0x50(%ebp) 10b330: 8b 45 ac mov -0x54(%ebp),%eax 10b333: 99 cltd 10b334: f7 f9 idiv %ecx 10b336: 50 push %eax 10b337: ff 75 a8 pushl -0x58(%ebp) 10b33a: 68 a8 fd 11 00 push $0x11fda8 10b33f: 53 push %ebx 10b340: ff d7 call *%edi 10b342: 83 c4 30 add $0x30,%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++ ) { 10b345: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b346: 3b 35 60 69 12 00 cmp 0x126960,%esi 10b34c: 0f 86 15 ff ff ff jbe 10b267 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b352: 8d 65 f4 lea -0xc(%ebp),%esp 10b355: 5b pop %ebx 10b356: 5e pop %esi 10b357: 5f pop %edi 10b358: c9 leave 10b359: c3 ret =============================================================================== 00115c40 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 115c40: 55 push %ebp 115c41: 89 e5 mov %esp,%ebp 115c43: 53 push %ebx 115c44: 83 ec 14 sub $0x14,%esp 115c47: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 115c4a: b8 0a 00 00 00 mov $0xa,%eax register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 115c4f: 85 db test %ebx,%ebx 115c51: 74 6d je 115cc0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 115c53: 50 push %eax 115c54: 50 push %eax 115c55: 8d 45 f4 lea -0xc(%ebp),%eax 115c58: 50 push %eax 115c59: ff 75 08 pushl 0x8(%ebp) 115c5c: e8 47 36 00 00 call 1192a8 <_Thread_Get> switch ( location ) { 115c61: 83 c4 10 add $0x10,%esp 115c64: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115c68: 75 51 jne 115cbb case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115c6a: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 115c70: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115c74: 74 39 je 115caf if ( asr->is_enabled ) { 115c76: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115c7a: 74 22 je 115c9e rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115c7c: 9c pushf 115c7d: fa cli 115c7e: 59 pop %ecx *signal_set |= signals; 115c7f: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115c82: 51 push %ecx 115c83: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115c84: 83 3d 80 c7 13 00 00 cmpl $0x0,0x13c780 115c8b: 74 19 je 115ca6 115c8d: 3b 05 84 c7 13 00 cmp 0x13c784,%eax 115c93: 75 11 jne 115ca6 <== NEVER TAKEN _Context_Switch_necessary = true; 115c95: c6 05 90 c7 13 00 01 movb $0x1,0x13c790 115c9c: eb 08 jmp 115ca6 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115c9e: 9c pushf 115c9f: fa cli 115ca0: 58 pop %eax *signal_set |= signals; 115ca1: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115ca4: 50 push %eax 115ca5: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115ca6: e8 db 35 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115cab: 31 c0 xor %eax,%eax 115cad: eb 11 jmp 115cc0 } _Thread_Enable_dispatch(); 115caf: e8 d2 35 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 115cb4: b8 0b 00 00 00 mov $0xb,%eax 115cb9: eb 05 jmp 115cc0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115cbb: b8 04 00 00 00 mov $0x4,%eax } 115cc0: 8b 5d fc mov -0x4(%ebp),%ebx 115cc3: c9 leave 115cc4: c3 ret =============================================================================== 00106b40 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 106b40: 55 push %ebp 106b41: 89 e5 mov %esp,%ebp 106b43: 57 push %edi 106b44: 56 push %esi 106b45: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 106b48: 83 78 08 00 cmpl $0x0,0x8(%eax) 106b4c: 74 15 je 106b63 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 106b4e: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 106b54: 83 c7 08 add $0x8,%edi 106b57: be e0 40 12 00 mov $0x1240e0,%esi 106b5c: b9 04 00 00 00 mov $0x4,%ecx 106b61: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 106b63: 5e pop %esi 106b64: 5f pop %edi 106b65: c9 leave 106b66: c3 ret =============================================================================== 00106b1e : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 106b1e: 55 push %ebp 106b1f: 89 e5 mov %esp,%ebp 106b21: 57 push %edi 106b22: 8b 45 0c mov 0xc(%ebp),%eax Stack_check_Initialize(); if (the_thread) 106b25: 85 c0 test %eax,%eax 106b27: 74 12 je 106b3b <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 106b29: 8b 88 c0 00 00 00 mov 0xc0(%eax),%ecx 106b2f: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 106b35: b0 a5 mov $0xa5,%al 106b37: 89 d7 mov %edx,%edi 106b39: f3 aa rep stos %al,%es:(%edi) return true; } 106b3b: b0 01 mov $0x1,%al 106b3d: 5f pop %edi 106b3e: c9 leave 106b3f: c3 ret =============================================================================== 00106c74 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 106c74: 55 push %ebp 106c75: 89 e5 mov %esp,%ebp 106c77: 83 ec 08 sub $0x8,%esp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 106c7a: a1 88 44 12 00 mov 0x124488,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 106c7f: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 106c85: 39 d5 cmp %edx,%ebp 106c87: 72 0a jb 106c93 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 106c89: 03 90 c0 00 00 00 add 0xc0(%eax),%edx 106c8f: 39 d5 cmp %edx,%ebp 106c91: 76 0f jbe 106ca2 <== ALWAYS TAKEN /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 106c93: 52 push %edx <== NOT EXECUTED 106c94: 52 push %edx <== NOT EXECUTED 106c95: 6a 01 push $0x1 <== NOT EXECUTED 106c97: ff 35 88 44 12 00 pushl 0x124488 <== NOT EXECUTED 106c9d: e8 c5 fe ff ff call 106b67 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 106ca2: 31 c0 xor %eax,%eax 106ca4: c9 leave 106ca5: c3 ret =============================================================================== 00106d0b : void rtems_stack_checker_report_usage( void ) { 106d0b: 55 push %ebp <== NOT EXECUTED 106d0c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106d0e: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 106d11: 68 f4 81 10 00 push $0x1081f4 <== NOT EXECUTED 106d16: 6a 00 push $0x0 <== NOT EXECUTED 106d18: e8 89 ff ff ff call 106ca6 <== NOT EXECUTED 106d1d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 106d20: c9 leave <== NOT EXECUTED 106d21: c3 ret <== NOT EXECUTED =============================================================================== 00106ca6 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 106ca6: 55 push %ebp <== NOT EXECUTED 106ca7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106ca9: 56 push %esi <== NOT EXECUTED 106caa: 53 push %ebx <== NOT EXECUTED 106cab: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 106cae: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED if ( !print ) 106cb1: 85 db test %ebx,%ebx <== NOT EXECUTED 106cb3: 74 4f je 106d04 <== NOT EXECUTED return; print_context = context; 106cb5: 89 35 d0 3d 12 00 mov %esi,0x123dd0 <== NOT EXECUTED print_handler = print; 106cbb: 89 1d d4 3d 12 00 mov %ebx,0x123dd4 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 106cc1: 52 push %edx <== NOT EXECUTED 106cc2: 52 push %edx <== NOT EXECUTED 106cc3: 68 73 dd 11 00 push $0x11dd73 <== NOT EXECUTED 106cc8: 56 push %esi <== NOT EXECUTED 106cc9: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 106ccb: 59 pop %ecx <== NOT EXECUTED 106ccc: 58 pop %eax <== NOT EXECUTED 106ccd: 68 8a dd 11 00 push $0x11dd8a <== NOT EXECUTED 106cd2: 56 push %esi <== NOT EXECUTED 106cd3: 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 ); 106cd5: c7 04 24 68 6a 10 00 movl $0x106a68,(%esp) <== NOT EXECUTED 106cdc: e8 17 48 00 00 call 10b4f8 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 106ce1: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 106ce8: e8 7b fd ff ff call 106a68 <== NOT EXECUTED #endif print_context = NULL; 106ced: c7 05 d0 3d 12 00 00 movl $0x0,0x123dd0 <== NOT EXECUTED 106cf4: 00 00 00 print_handler = NULL; 106cf7: c7 05 d4 3d 12 00 00 movl $0x0,0x123dd4 <== NOT EXECUTED 106cfe: 00 00 00 106d01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 106d04: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 106d07: 5b pop %ebx <== NOT EXECUTED 106d08: 5e pop %esi <== NOT EXECUTED 106d09: c9 leave <== NOT EXECUTED 106d0a: c3 ret <== NOT EXECUTED =============================================================================== 00106c1b : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 106c1b: 55 push %ebp 106c1c: 89 e5 mov %esp,%ebp 106c1e: 53 push %ebx 106c1f: 83 ec 14 sub $0x14,%esp 106c22: 8b 5d 08 mov 0x8(%ebp),%ebx 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; 106c25: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax 106c2b: 8d 48 08 lea 0x8(%eax),%ecx { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 106c2e: 31 d2 xor %edx,%edx ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 106c30: 39 c5 cmp %eax,%ebp 106c32: 72 0b jb 106c3f <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { 106c34: 03 83 c0 00 00 00 add 0xc0(%ebx),%eax } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 106c3a: 39 c5 cmp %eax,%ebp 106c3c: 0f 96 c2 setbe %dl /* * 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, 106c3f: 50 push %eax 106c40: 6a 10 push $0x10 106c42: 68 e0 40 12 00 push $0x1240e0 106c47: 51 push %ecx 106c48: 88 55 f4 mov %dl,-0xc(%ebp) 106c4b: e8 d8 a2 00 00 call 110f28 106c50: 83 c4 10 add $0x10,%esp 106c53: 85 c0 test %eax,%eax 106c55: 0f 94 c0 sete %al (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 106c58: 8a 55 f4 mov -0xc(%ebp),%dl 106c5b: 84 d2 test %dl,%dl 106c5d: 74 04 je 106c63 <== NEVER TAKEN 106c5f: 84 c0 test %al,%al 106c61: 75 0c jne 106c6f <== ALWAYS TAKEN Stack_check_report_blown_task( running, pattern_ok ); 106c63: 52 push %edx <== NOT EXECUTED 106c64: 52 push %edx <== NOT EXECUTED 106c65: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 106c68: 50 push %eax <== NOT EXECUTED 106c69: 53 push %ebx <== NOT EXECUTED 106c6a: e8 f8 fe ff ff call 106b67 <== NOT EXECUTED } } 106c6f: 8b 5d fc mov -0x4(%ebp),%ebx 106c72: c9 leave 106c73: c3 ret =============================================================================== 0010ec90 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10ec90: 55 push %ebp 10ec91: 89 e5 mov %esp,%ebp 10ec93: 57 push %edi 10ec94: 56 push %esi 10ec95: 53 push %ebx 10ec96: 83 ec 2c sub $0x2c,%esp 10ec99: 8b 75 08 mov 0x8(%ebp),%esi 10ec9c: 8b 5d 0c mov 0xc(%ebp),%ebx 10ec9f: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10eca2: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10eca7: 85 db test %ebx,%ebx 10eca9: 74 6e je 10ed19 return RTEMS_INVALID_ADDRESS; errno = 0; 10ecab: e8 d0 1d 00 00 call 110a80 <__errno> 10ecb0: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ecb6: c7 03 00 00 00 00 movl $0x0,(%ebx) 10ecbc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10ecc3: 50 push %eax 10ecc4: 50 push %eax 10ecc5: 8d 45 e4 lea -0x1c(%ebp),%eax 10ecc8: 50 push %eax 10ecc9: 56 push %esi 10ecca: e8 2d 49 00 00 call 1135fc #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 ) 10eccf: 83 c4 10 add $0x10,%esp 10ecd2: 85 ff test %edi,%edi 10ecd4: 74 05 je 10ecdb *endptr = end; 10ecd6: 8b 45 e4 mov -0x1c(%ebp),%eax 10ecd9: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10ecdb: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10ece0: 39 75 e4 cmp %esi,-0x1c(%ebp) 10ece3: 74 2e je 10ed13 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ece5: dd 05 40 22 12 00 fldl 0x122240 10eceb: d9 c9 fxch %st(1) 10eced: dd e1 fucom %st(1) 10ecef: df e0 fnstsw %ax 10ecf1: dd d9 fstp %st(1) 10ecf3: 9e sahf 10ecf4: 76 17 jbe 10ed0d 10ecf6: dd 5d c8 fstpl -0x38(%ebp) 10ecf9: e8 82 1d 00 00 call 110a80 <__errno> 10ecfe: 89 c2 mov %eax,%edx return RTEMS_INVALID_NUMBER; 10ed00: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ed05: 83 3a 22 cmpl $0x22,(%edx) 10ed08: dd 45 c8 fldl -0x38(%ebp) 10ed0b: 74 0a je 10ed17 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10ed0d: dd 1b fstpl (%ebx) #endif return RTEMS_SUCCESSFUL; 10ed0f: 31 c0 xor %eax,%eax 10ed11: eb 06 jmp 10ed19 10ed13: dd d8 fstp %st(0) 10ed15: eb 02 jmp 10ed19 10ed17: dd d8 fstp %st(0) } 10ed19: 8d 65 f4 lea -0xc(%ebp),%esp 10ed1c: 5b pop %ebx 10ed1d: 5e pop %esi 10ed1e: 5f pop %edi 10ed1f: c9 leave 10ed20: c3 ret =============================================================================== 0010ed24 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10ed24: 55 push %ebp 10ed25: 89 e5 mov %esp,%ebp 10ed27: 57 push %edi 10ed28: 56 push %esi 10ed29: 53 push %ebx 10ed2a: 83 ec 2c sub $0x2c,%esp 10ed2d: 8b 75 08 mov 0x8(%ebp),%esi 10ed30: 8b 5d 0c mov 0xc(%ebp),%ebx 10ed33: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10ed36: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10ed3b: 85 db test %ebx,%ebx 10ed3d: 74 67 je 10eda6 return RTEMS_INVALID_ADDRESS; errno = 0; 10ed3f: e8 3c 1d 00 00 call 110a80 <__errno> 10ed44: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ed4a: c7 03 00 00 00 00 movl $0x0,(%ebx) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 10ed50: 50 push %eax 10ed51: 50 push %eax 10ed52: 8d 45 e4 lea -0x1c(%ebp),%eax 10ed55: 50 push %eax 10ed56: 56 push %esi 10ed57: e8 bc 48 00 00 call 113618 #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 ) 10ed5c: 83 c4 10 add $0x10,%esp 10ed5f: 85 ff test %edi,%edi 10ed61: 74 05 je 10ed68 *endptr = end; 10ed63: 8b 45 e4 mov -0x1c(%ebp),%eax 10ed66: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10ed68: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10ed6d: 39 75 e4 cmp %esi,-0x1c(%ebp) 10ed70: 74 2e je 10eda0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ed72: d9 05 48 22 12 00 flds 0x122248 10ed78: d9 c9 fxch %st(1) 10ed7a: dd e1 fucom %st(1) 10ed7c: df e0 fnstsw %ax 10ed7e: dd d9 fstp %st(1) 10ed80: 9e sahf 10ed81: 76 17 jbe 10ed9a 10ed83: d9 5d c8 fstps -0x38(%ebp) 10ed86: e8 f5 1c 00 00 call 110a80 <__errno> 10ed8b: 89 c2 mov %eax,%edx return RTEMS_INVALID_NUMBER; 10ed8d: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ed92: 83 3a 22 cmpl $0x22,(%edx) 10ed95: d9 45 c8 flds -0x38(%ebp) 10ed98: 74 0a je 10eda4 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10ed9a: d9 1b fstps (%ebx) #endif return RTEMS_SUCCESSFUL; 10ed9c: 31 c0 xor %eax,%eax 10ed9e: eb 06 jmp 10eda6 10eda0: dd d8 fstp %st(0) 10eda2: eb 02 jmp 10eda6 10eda4: dd d8 fstp %st(0) } 10eda6: 8d 65 f4 lea -0xc(%ebp),%esp 10eda9: 5b pop %ebx 10edaa: 5e pop %esi 10edab: 5f pop %edi 10edac: c9 leave 10edad: c3 ret =============================================================================== 0010edb0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10edb0: 55 push %ebp 10edb1: 89 e5 mov %esp,%ebp 10edb3: 57 push %edi 10edb4: 56 push %esi 10edb5: 53 push %ebx 10edb6: 83 ec 2c sub $0x2c,%esp 10edb9: 8b 7d 08 mov 0x8(%ebp),%edi 10edbc: 8b 5d 0c mov 0xc(%ebp),%ebx 10edbf: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10edc2: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10edc7: 85 db test %ebx,%ebx 10edc9: 74 5a je 10ee25 return RTEMS_INVALID_ADDRESS; errno = 0; 10edcb: 89 55 d4 mov %edx,-0x2c(%ebp) 10edce: e8 ad 1c 00 00 call 110a80 <__errno> 10edd3: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10edd9: 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 ); 10eddf: 50 push %eax 10ede0: ff 75 14 pushl 0x14(%ebp) 10ede3: 8d 45 e4 lea -0x1c(%ebp),%eax 10ede6: 50 push %eax 10ede7: 57 push %edi 10ede8: e8 ef 49 00 00 call 1137dc 10eded: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10edef: 83 c4 10 add $0x10,%esp 10edf2: 8b 55 d4 mov -0x2c(%ebp),%edx 10edf5: 85 d2 test %edx,%edx 10edf7: 74 05 je 10edfe *endptr = end; 10edf9: 8b 45 e4 mov -0x1c(%ebp),%eax 10edfc: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10edfe: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10ee03: 39 7d e4 cmp %edi,-0x1c(%ebp) 10ee06: 74 1d je 10ee25 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ee08: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10ee0e: 75 11 jne 10ee21 10ee10: e8 6b 1c 00 00 call 110a80 <__errno> 10ee15: 89 c2 mov %eax,%edx return RTEMS_INVALID_NUMBER; 10ee17: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ee1c: 83 3a 22 cmpl $0x22,(%edx) 10ee1f: 74 04 je 10ee25 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10ee21: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 10ee23: 31 c0 xor %eax,%eax } 10ee25: 8d 65 f4 lea -0xc(%ebp),%esp 10ee28: 5b pop %ebx 10ee29: 5e pop %esi 10ee2a: 5f pop %edi 10ee2b: c9 leave 10ee2c: c3 ret =============================================================================== 0010eec8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10eec8: 55 push %ebp 10eec9: 89 e5 mov %esp,%ebp 10eecb: 57 push %edi 10eecc: 56 push %esi 10eecd: 53 push %ebx 10eece: 83 ec 2c sub $0x2c,%esp 10eed1: 8b 7d 08 mov 0x8(%ebp),%edi 10eed4: 8b 5d 0c mov 0xc(%ebp),%ebx 10eed7: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10eeda: b9 09 00 00 00 mov $0x9,%ecx ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10eedf: 85 db test %ebx,%ebx 10eee1: 74 60 je 10ef43 return RTEMS_INVALID_ADDRESS; errno = 0; 10eee3: 89 55 d4 mov %edx,-0x2c(%ebp) 10eee6: e8 95 1b 00 00 call 110a80 <__errno> 10eeeb: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10eef1: 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 ); 10eef7: 50 push %eax 10eef8: ff 75 14 pushl 0x14(%ebp) 10eefb: 8d 45 e4 lea -0x1c(%ebp),%eax 10eefe: 50 push %eax 10eeff: 57 push %edi 10ef00: e8 d7 48 00 00 call 1137dc 10ef05: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10ef07: 83 c4 10 add $0x10,%esp 10ef0a: 8b 55 d4 mov -0x2c(%ebp),%edx 10ef0d: 85 d2 test %edx,%edx 10ef0f: 74 05 je 10ef16 *endptr = end; 10ef11: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef14: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10ef16: b9 0b 00 00 00 mov $0xb,%ecx /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10ef1b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10ef1e: 74 23 je 10ef43 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ef20: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi 10ef26: 74 08 je 10ef30 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10ef28: 81 fe 00 00 00 80 cmp $0x80000000,%esi 10ef2e: 75 0f jne 10ef3f 10ef30: e8 4b 1b 00 00 call 110a80 <__errno> return RTEMS_INVALID_NUMBER; 10ef35: b9 0a 00 00 00 mov $0xa,%ecx return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10ef3a: 83 38 22 cmpl $0x22,(%eax) 10ef3d: 74 04 je 10ef43 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10ef3f: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 10ef41: 31 c9 xor %ecx,%ecx } 10ef43: 89 c8 mov %ecx,%eax 10ef45: 8d 65 f4 lea -0xc(%ebp),%esp 10ef48: 5b pop %ebx 10ef49: 5e pop %esi 10ef4a: 5f pop %edi 10ef4b: c9 leave 10ef4c: c3 ret =============================================================================== 0010ee30 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10ee30: 55 push %ebp 10ee31: 89 e5 mov %esp,%ebp 10ee33: 57 push %edi 10ee34: 56 push %esi 10ee35: 53 push %ebx 10ee36: 83 ec 2c sub $0x2c,%esp 10ee39: 8b 5d 0c mov 0xc(%ebp),%ebx 10ee3c: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10ee3f: b9 09 00 00 00 mov $0x9,%ecx ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10ee44: 85 db test %ebx,%ebx 10ee46: 74 76 je 10eebe return RTEMS_INVALID_ADDRESS; errno = 0; 10ee48: e8 33 1c 00 00 call 110a80 <__errno> 10ee4d: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ee53: c7 03 00 00 00 00 movl $0x0,(%ebx) 10ee59: 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 ); 10ee60: 50 push %eax 10ee61: ff 75 14 pushl 0x14(%ebp) 10ee64: 8d 45 e4 lea -0x1c(%ebp),%eax 10ee67: 50 push %eax 10ee68: ff 75 08 pushl 0x8(%ebp) 10ee6b: e8 88 49 00 00 call 1137f8 10ee70: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10ee72: 83 c4 10 add $0x10,%esp 10ee75: 85 ff test %edi,%edi 10ee77: 74 05 je 10ee7e *endptr = end; 10ee79: 8b 45 e4 mov -0x1c(%ebp),%eax 10ee7c: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10ee7e: b9 0b 00 00 00 mov $0xb,%ecx /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10ee83: 8b 45 08 mov 0x8(%ebp),%eax 10ee86: 39 45 e4 cmp %eax,-0x1c(%ebp) 10ee89: 74 33 je 10eebe return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10ee8b: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10ee91: 75 05 jne 10ee98 10ee93: 83 fe ff cmp $0xffffffff,%esi 10ee96: 74 0a je 10eea2 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10ee98: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 10ee9e: 09 f0 or %esi,%eax 10eea0: 75 15 jne 10eeb7 10eea2: 89 55 d4 mov %edx,-0x2c(%ebp) 10eea5: e8 d6 1b 00 00 call 110a80 <__errno> return RTEMS_INVALID_NUMBER; 10eeaa: b9 0a 00 00 00 mov $0xa,%ecx return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 10eeaf: 83 38 22 cmpl $0x22,(%eax) 10eeb2: 8b 55 d4 mov -0x2c(%ebp),%edx 10eeb5: 74 07 je 10eebe <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10eeb7: 89 33 mov %esi,(%ebx) 10eeb9: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 10eebc: 31 c9 xor %ecx,%ecx } 10eebe: 89 c8 mov %ecx,%eax 10eec0: 8d 65 f4 lea -0xc(%ebp),%esp 10eec3: 5b pop %ebx 10eec4: 5e pop %esi 10eec5: 5f pop %edi 10eec6: c9 leave 10eec7: c3 ret =============================================================================== 0010ef50 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10ef50: 55 push %ebp 10ef51: 89 e5 mov %esp,%ebp 10ef53: 57 push %edi 10ef54: 56 push %esi 10ef55: 53 push %ebx 10ef56: 83 ec 2c sub $0x2c,%esp 10ef59: 8b 7d 08 mov 0x8(%ebp),%edi 10ef5c: 8b 5d 0c mov 0xc(%ebp),%ebx 10ef5f: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10ef62: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10ef67: 85 db test %ebx,%ebx 10ef69: 74 56 je 10efc1 return RTEMS_INVALID_ADDRESS; errno = 0; 10ef6b: 89 55 d4 mov %edx,-0x2c(%ebp) 10ef6e: e8 0d 1b 00 00 call 110a80 <__errno> 10ef73: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10ef79: 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 ); 10ef7f: 50 push %eax 10ef80: 6a 10 push $0x10 10ef82: 8d 45 e4 lea -0x1c(%ebp),%eax 10ef85: 50 push %eax 10ef86: 57 push %edi 10ef87: e8 18 4d 00 00 call 113ca4 10ef8c: 89 c6 mov %eax,%esi #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 ) 10ef8e: 83 c4 10 add $0x10,%esp 10ef91: 8b 55 d4 mov -0x2c(%ebp),%edx 10ef94: 85 d2 test %edx,%edx 10ef96: 74 05 je 10ef9d *endptr = end; 10ef98: 8b 45 e4 mov -0x1c(%ebp),%eax 10ef9b: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10ef9d: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10efa2: 39 7d e4 cmp %edi,-0x1c(%ebp) 10efa5: 74 1a je 10efc1 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10efa7: 83 fe ff cmp $0xffffffff,%esi 10efaa: 75 11 jne 10efbd <== ALWAYS TAKEN 10efac: e8 cf 1a 00 00 call 110a80 <__errno> <== NOT EXECUTED 10efb1: 89 c2 mov %eax,%edx <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 10efb3: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10efb8: 83 3a 22 cmpl $0x22,(%edx) <== NOT EXECUTED 10efbb: 74 04 je 10efc1 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 10efbd: 89 33 mov %esi,(%ebx) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 10efbf: 31 c0 xor %eax,%eax } 10efc1: 8d 65 f4 lea -0xc(%ebp),%esp 10efc4: 5b pop %ebx 10efc5: 5e pop %esi 10efc6: 5f pop %edi 10efc7: c9 leave 10efc8: c3 ret =============================================================================== 0010efcc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10efcc: 55 push %ebp 10efcd: 89 e5 mov %esp,%ebp 10efcf: 57 push %edi 10efd0: 56 push %esi 10efd1: 53 push %ebx 10efd2: 83 ec 1c sub $0x1c,%esp 10efd5: 8b 75 08 mov 0x8(%ebp),%esi 10efd8: 8b 5d 0c mov 0xc(%ebp),%ebx 10efdb: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10efde: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10efe3: 85 db test %ebx,%ebx 10efe5: 74 38 je 10f01f <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 10efe7: e8 94 1a 00 00 call 110a80 <__errno> 10efec: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10eff2: 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 ); 10eff5: 50 push %eax 10eff6: ff 75 14 pushl 0x14(%ebp) 10eff9: 8d 45 e4 lea -0x1c(%ebp),%eax 10effc: 50 push %eax 10effd: 56 push %esi 10effe: e8 a1 4c 00 00 call 113ca4 10f003: 89 c2 mov %eax,%edx #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f005: 83 c4 10 add $0x10,%esp 10f008: 85 ff test %edi,%edi 10f00a: 74 05 je 10f011 *endptr = end; 10f00c: 8b 45 e4 mov -0x1c(%ebp),%eax 10f00f: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10f011: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10f016: 39 75 e4 cmp %esi,-0x1c(%ebp) 10f019: 74 04 je 10f01f #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 ); 10f01b: 88 13 mov %dl,(%ebx) #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 10f01d: 30 c0 xor %al,%al } 10f01f: 8d 65 f4 lea -0xc(%ebp),%esp 10f022: 5b pop %ebx 10f023: 5e pop %esi 10f024: 5f pop %edi 10f025: c9 leave 10f026: c3 ret =============================================================================== 0010f028 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f028: 55 push %ebp 10f029: 89 e5 mov %esp,%ebp 10f02b: 57 push %edi 10f02c: 56 push %esi 10f02d: 53 push %ebx 10f02e: 83 ec 2c sub $0x2c,%esp 10f031: 8b 7d 08 mov 0x8(%ebp),%edi 10f034: 8b 5d 0c mov 0xc(%ebp),%ebx 10f037: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10f03a: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f03f: 85 db test %ebx,%ebx 10f041: 74 57 je 10f09a return RTEMS_INVALID_ADDRESS; errno = 0; 10f043: 89 55 d4 mov %edx,-0x2c(%ebp) 10f046: e8 35 1a 00 00 call 110a80 <__errno> 10f04b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f051: 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 ); 10f057: 50 push %eax 10f058: ff 75 14 pushl 0x14(%ebp) 10f05b: 8d 45 e4 lea -0x1c(%ebp),%eax 10f05e: 50 push %eax 10f05f: 57 push %edi 10f060: e8 3f 4c 00 00 call 113ca4 10f065: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f067: 83 c4 10 add $0x10,%esp 10f06a: 8b 55 d4 mov -0x2c(%ebp),%edx 10f06d: 85 d2 test %edx,%edx 10f06f: 74 05 je 10f076 *endptr = end; 10f071: 8b 45 e4 mov -0x1c(%ebp),%eax 10f074: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10f076: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10f07b: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f07e: 74 1a je 10f09a return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f080: 83 fe ff cmp $0xffffffff,%esi 10f083: 75 11 jne 10f096 10f085: e8 f6 19 00 00 call 110a80 <__errno> 10f08a: 89 c2 mov %eax,%edx return RTEMS_INVALID_NUMBER; 10f08c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f091: 83 3a 22 cmpl $0x22,(%edx) 10f094: 74 04 je 10f09a <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f096: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 10f098: 31 c0 xor %eax,%eax } 10f09a: 8d 65 f4 lea -0xc(%ebp),%esp 10f09d: 5b pop %ebx 10f09e: 5e pop %esi 10f09f: 5f pop %edi 10f0a0: c9 leave 10f0a1: c3 ret =============================================================================== 0010f130 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f130: 55 push %ebp 10f131: 89 e5 mov %esp,%ebp 10f133: 57 push %edi 10f134: 56 push %esi 10f135: 53 push %ebx 10f136: 83 ec 2c sub $0x2c,%esp 10f139: 8b 7d 08 mov 0x8(%ebp),%edi 10f13c: 8b 5d 0c mov 0xc(%ebp),%ebx 10f13f: 8b 55 10 mov 0x10(%ebp),%edx STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10f142: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f147: 85 db test %ebx,%ebx 10f149: 74 57 je 10f1a2 return RTEMS_INVALID_ADDRESS; errno = 0; 10f14b: 89 55 d4 mov %edx,-0x2c(%ebp) 10f14e: e8 2d 19 00 00 call 110a80 <__errno> 10f153: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f159: 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 ); 10f15f: 50 push %eax 10f160: ff 75 14 pushl 0x14(%ebp) 10f163: 8d 45 e4 lea -0x1c(%ebp),%eax 10f166: 50 push %eax 10f167: 57 push %edi 10f168: e8 37 4b 00 00 call 113ca4 10f16d: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f16f: 83 c4 10 add $0x10,%esp 10f172: 8b 55 d4 mov -0x2c(%ebp),%edx 10f175: 85 d2 test %edx,%edx 10f177: 74 05 je 10f17e *endptr = end; 10f179: 8b 45 e4 mov -0x1c(%ebp),%eax 10f17c: 89 02 mov %eax,(%edx) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10f17e: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10f183: 39 7d e4 cmp %edi,-0x1c(%ebp) 10f186: 74 1a je 10f1a2 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f188: 83 fe ff cmp $0xffffffff,%esi 10f18b: 75 11 jne 10f19e 10f18d: e8 ee 18 00 00 call 110a80 <__errno> 10f192: 89 c2 mov %eax,%edx return RTEMS_INVALID_NUMBER; 10f194: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f199: 83 3a 22 cmpl $0x22,(%edx) 10f19c: 74 04 je 10f1a2 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f19e: 89 33 mov %esi,(%ebx) #endif return RTEMS_SUCCESSFUL; 10f1a0: 31 c0 xor %eax,%eax } 10f1a2: 8d 65 f4 lea -0xc(%ebp),%esp 10f1a5: 5b pop %ebx 10f1a6: 5e pop %esi 10f1a7: 5f pop %edi 10f1a8: c9 leave 10f1a9: c3 ret =============================================================================== 0010f0a4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 10f0a4: 55 push %ebp 10f0a5: 89 e5 mov %esp,%ebp 10f0a7: 57 push %edi 10f0a8: 56 push %esi 10f0a9: 53 push %ebx 10f0aa: 83 ec 2c sub $0x2c,%esp 10f0ad: 8b 5d 0c mov 0xc(%ebp),%ebx 10f0b0: 8b 7d 10 mov 0x10(%ebp),%edi STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 10f0b3: b8 09 00 00 00 mov $0x9,%eax ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 10f0b8: 85 db test %ebx,%ebx 10f0ba: 74 6b je 10f127 return RTEMS_INVALID_ADDRESS; errno = 0; 10f0bc: e8 bf 19 00 00 call 110a80 <__errno> 10f0c1: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 10f0c7: c7 03 00 00 00 00 movl $0x0,(%ebx) 10f0cd: 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 ); 10f0d4: 50 push %eax 10f0d5: ff 75 14 pushl 0x14(%ebp) 10f0d8: 8d 45 e4 lea -0x1c(%ebp),%eax 10f0db: 50 push %eax 10f0dc: ff 75 08 pushl 0x8(%ebp) 10f0df: e8 dc 4b 00 00 call 113cc0 10f0e4: 89 c6 mov %eax,%esi #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 10f0e6: 83 c4 10 add $0x10,%esp 10f0e9: 85 ff test %edi,%edi 10f0eb: 74 05 je 10f0f2 *endptr = end; 10f0ed: 8b 45 e4 mov -0x1c(%ebp),%eax 10f0f0: 89 07 mov %eax,(%edi) /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; 10f0f2: b8 0b 00 00 00 mov $0xb,%eax /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 10f0f7: 8b 4d 08 mov 0x8(%ebp),%ecx 10f0fa: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10f0fd: 74 28 je 10f127 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f0ff: 83 fa ff cmp $0xffffffff,%edx 10f102: 75 1c jne 10f120 10f104: 83 fe ff cmp $0xffffffff,%esi 10f107: 75 17 jne 10f120 <== NEVER TAKEN 10f109: 89 55 d4 mov %edx,-0x2c(%ebp) 10f10c: e8 6f 19 00 00 call 110a80 <__errno> 10f111: 89 c1 mov %eax,%ecx return RTEMS_INVALID_NUMBER; 10f113: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 10f118: 83 39 22 cmpl $0x22,(%ecx) 10f11b: 8b 55 d4 mov -0x2c(%ebp),%edx 10f11e: 74 07 je 10f127 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 10f120: 89 33 mov %esi,(%ebx) 10f122: 89 53 04 mov %edx,0x4(%ebx) #endif return RTEMS_SUCCESSFUL; 10f125: 31 c0 xor %eax,%eax } 10f127: 8d 65 f4 lea -0xc(%ebp),%esp 10f12a: 5b pop %ebx 10f12b: 5e pop %esi 10f12c: 5f pop %edi 10f12d: c9 leave 10f12e: c3 ret =============================================================================== 00106e08 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 106e08: 55 push %ebp 106e09: 89 e5 mov %esp,%ebp 106e0b: 57 push %edi 106e0c: 56 push %esi 106e0d: 53 push %ebx 106e0e: 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( 106e14: 31 c0 xor %eax,%eax 106e16: 83 c9 ff or $0xffffffff,%ecx 106e19: 8b 7d 08 mov 0x8(%ebp),%edi 106e1c: f2 ae repnz scas %es:(%edi),%al 106e1e: f7 d1 not %ecx 106e20: 49 dec %ecx 106e21: 6a 00 push $0x0 106e23: 8d 45 d0 lea -0x30(%ebp),%eax 106e26: 50 push %eax 106e27: 6a 00 push $0x0 106e29: 51 push %ecx 106e2a: ff 75 08 pushl 0x8(%ebp) 106e2d: e8 1b 0a 00 00 call 10784d 106e32: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp) strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 106e38: 83 c4 20 add $0x20,%esp 106e3b: 85 c0 test %eax,%eax 106e3d: 0f 85 d9 01 00 00 jne 10701c <== NEVER TAKEN return -1; if (root_loc.ops != &IMFS_ops 106e43: 8b 45 dc mov -0x24(%ebp),%eax 106e46: 31 f6 xor %esi,%esi 106e48: 3d ac 26 12 00 cmp $0x1226ac,%eax 106e4d: 74 1b je 106e6a <== ALWAYS TAKEN && root_loc.ops != &fifoIMFS_ops) 106e4f: 3d 34 30 12 00 cmp $0x123034,%eax <== NOT EXECUTED 106e54: 0f 85 c2 01 00 00 jne 10701c <== NOT EXECUTED 106e5a: 8b b5 54 fe ff ff mov -0x1ac(%ebp),%esi <== NOT EXECUTED 106e60: eb 08 jmp 106e6a <== NOT EXECUTED 106e62: 8b b5 50 fe ff ff mov -0x1b0(%ebp),%esi 106e68: eb 18 jmp 106e82 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 106e6a: 8d 45 bc lea -0x44(%ebp),%eax 106e6d: 89 85 34 fe ff ff mov %eax,-0x1cc(%ebp) 106e73: 8d 55 d0 lea -0x30(%ebp),%edx 106e76: 89 95 30 fe ff ff mov %edx,-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); 106e7c: 8d 9d 58 fe ff ff lea -0x1a8(%ebp),%ebx /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 106e82: 8d 86 00 02 00 00 lea 0x200(%esi),%eax 106e88: 89 85 50 fe ff ff mov %eax,-0x1b0(%ebp) 106e8e: 8b 55 10 mov 0x10(%ebp),%edx 106e91: 39 d0 cmp %edx,%eax 106e93: 0f 87 8d 01 00 00 ja 107026 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 106e99: 03 75 0c add 0xc(%ebp),%esi offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 106e9c: 8d 86 01 01 00 00 lea 0x101(%esi),%eax 106ea2: 52 push %edx 106ea3: 6a 07 push $0x7 106ea5: 68 f4 26 12 00 push $0x1226f4 106eaa: 50 push %eax 106eab: e8 4c ca 00 00 call 1138fc 106eb0: 83 c4 10 add $0x10,%esp 106eb3: 85 c0 test %eax,%eax 106eb5: 0f 85 6b 01 00 00 jne 107026 <== NEVER TAKEN break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 106ebb: 50 push %eax 106ebc: 6a 63 push $0x63 106ebe: 56 push %esi 106ebf: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 106ec5: 50 push %eax 106ec6: e8 c1 ca 00 00 call 11398c filename[MAX_NAME_FIELD_SIZE] = '\0'; 106ecb: c6 45 bb 00 movb $0x0,-0x45(%ebp) linkflag = hdr_ptr[156]; 106ecf: 8a 96 9c 00 00 00 mov 0x9c(%esi),%dl file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 106ed5: 59 pop %ecx 106ed6: 5f pop %edi 106ed7: 6a 08 push $0x8 106ed9: 8d 46 64 lea 0x64(%esi),%eax 106edc: 50 push %eax 106edd: 88 95 44 fe ff ff mov %dl,-0x1bc(%ebp) 106ee3: e8 68 6d 00 00 call 10dc50 <_rtems_octal2ulong> 106ee8: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp) file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 106eee: 5f pop %edi 106eef: 58 pop %eax 106ef0: 6a 0c push $0xc 106ef2: 8d 46 7c lea 0x7c(%esi),%eax 106ef5: 50 push %eax 106ef6: e8 55 6d 00 00 call 10dc50 <_rtems_octal2ulong> 106efb: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp) hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 106f01: 5a pop %edx 106f02: 59 pop %ecx 106f03: 6a 08 push $0x8 106f05: 8d 86 94 00 00 00 lea 0x94(%esi),%eax 106f0b: 50 push %eax 106f0c: e8 3f 6d 00 00 call 10dc50 <_rtems_octal2ulong> 106f11: 89 c7 mov %eax,%edi if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 106f13: 89 34 24 mov %esi,(%esp) 106f16: e8 63 6d 00 00 call 10dc7e <_rtems_tar_header_checksum> 106f1b: 83 c4 10 add $0x10,%esp 106f1e: 39 f8 cmp %edi,%eax 106f20: 8a 95 44 fe ff ff mov -0x1bc(%ebp),%dl 106f26: 0f 85 fa 00 00 00 jne 107026 <== 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) { 106f2c: 80 fa 35 cmp $0x35,%dl 106f2f: 75 57 jne 106f88 strcpy(full_filename, mountpoint); 106f31: 50 push %eax 106f32: 50 push %eax 106f33: ff 75 08 pushl 0x8(%ebp) 106f36: 53 push %ebx 106f37: e8 64 c6 00 00 call 1135a0 if (full_filename[strlen(full_filename)-1] != '/') 106f3c: 31 c0 xor %eax,%eax 106f3e: 83 c9 ff or $0xffffffff,%ecx 106f41: 89 df mov %ebx,%edi 106f43: f2 ae repnz scas %es:(%edi),%al 106f45: f7 d1 not %ecx 106f47: 83 c4 10 add $0x10,%esp 106f4a: 80 bc 0d 56 fe ff ff cmpb $0x2f,-0x1aa(%ebp,%ecx,1) 106f51: 2f 106f52: 74 10 je 106f64 <== ALWAYS TAKEN strcat(full_filename, "/"); 106f54: 57 push %edi <== NOT EXECUTED 106f55: 57 push %edi <== NOT EXECUTED 106f56: 68 b9 e6 11 00 push $0x11e6b9 <== NOT EXECUTED 106f5b: 53 push %ebx <== NOT EXECUTED 106f5c: e8 93 c5 00 00 call 1134f4 <== NOT EXECUTED 106f61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED strcat(full_filename, filename); 106f64: 56 push %esi 106f65: 56 push %esi 106f66: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx 106f6c: 52 push %edx 106f6d: 53 push %ebx 106f6e: e8 81 c5 00 00 call 1134f4 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 106f73: 5a pop %edx 106f74: 59 pop %ecx 106f75: 68 ff 01 00 00 push $0x1ff 106f7a: 53 push %ebx 106f7b: e8 c8 0f 00 00 call 107f48 106f80: 83 c4 10 add $0x10,%esp 106f83: e9 da fe ff ff jmp 106e62 * 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) { 106f88: 80 fa 30 cmp $0x30,%dl 106f8b: 0f 85 d1 fe ff ff jne 106e62 const char *name; loc = root_loc; 106f91: b9 05 00 00 00 mov $0x5,%ecx 106f96: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi 106f9c: 8b b5 30 fe ff ff mov -0x1d0(%ebp),%esi 106fa2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 106fa4: 50 push %eax 106fa5: 8d 45 e4 lea -0x1c(%ebp),%eax 106fa8: 50 push %eax 106fa9: 8d 55 bc lea -0x44(%ebp),%edx 106fac: 52 push %edx 106fad: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax 106fb3: 50 push %eax 106fb4: e8 87 77 00 00 call 10e740 106fb9: 83 c4 10 add $0x10,%esp 106fbc: 85 c0 test %eax,%eax 106fbe: 75 41 jne 107001 <== NEVER TAKEN node = IMFS_create_node( 106fc0: 83 ec 0c sub $0xc,%esp 106fc3: 6a 00 push $0x0 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 106fc5: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax 106fcb: 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( 106fd0: 80 cc 80 or $0x80,%ah 106fd3: 50 push %eax 106fd4: ff 75 e4 pushl -0x1c(%ebp) 106fd7: 6a 06 push $0x6 106fd9: 8d 55 bc lea -0x44(%ebp),%edx 106fdc: 52 push %edx 106fdd: e8 53 72 00 00 call 10e235 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 106fe2: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx 106fe8: 89 50 50 mov %edx,0x50(%eax) 106feb: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.linearfile.direct = &tar_image[offset]; 106ff2: 8b 55 0c mov 0xc(%ebp),%edx 106ff5: 03 95 50 fe ff ff add -0x1b0(%ebp),%edx 106ffb: 89 50 58 mov %edx,0x58(%eax) 106ffe: 83 c4 20 add $0x20,%esp } nblocks = (((file_size) + 511) & ~511) / 512; 107001: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax 107007: 05 ff 01 00 00 add $0x1ff,%eax offset += 512 * nblocks; 10700c: 25 00 fe ff ff and $0xfffffe00,%eax 107011: 01 85 50 fe ff ff add %eax,-0x1b0(%ebp) 107017: e9 46 fe ff ff jmp 106e62 if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 10701c: c7 85 54 fe ff ff ff movl $0xffffffff,-0x1ac(%ebp) <== NOT EXECUTED 107023: ff ff ff nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 107026: 8b 85 54 fe ff ff mov -0x1ac(%ebp),%eax 10702c: 8d 65 f4 lea -0xc(%ebp),%esp 10702f: 5b pop %ebx 107030: 5e pop %esi 107031: 5f pop %edi 107032: c9 leave 107033: c3 ret =============================================================================== 0010ff4c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10ff4c: 55 push %ebp 10ff4d: 89 e5 mov %esp,%ebp 10ff4f: 57 push %edi 10ff50: 56 push %esi 10ff51: 53 push %ebx 10ff52: 83 ec 1c sub $0x1c,%esp 10ff55: 8b 4d 10 mov 0x10(%ebp),%ecx bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 10ff58: b8 09 00 00 00 mov $0x9,%eax ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 10ff5d: 85 c9 test %ecx,%ecx 10ff5f: 0f 84 04 01 00 00 je 110069 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10ff65: 8b 35 a8 33 12 00 mov 0x1233a8,%esi api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10ff6b: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10ff71: 80 7e 74 01 cmpb $0x1,0x74(%esi) 10ff75: 19 ff sbb %edi,%edi 10ff77: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10ff7d: 83 7e 7c 00 cmpl $0x0,0x7c(%esi) 10ff81: 74 06 je 10ff89 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10ff83: 81 cf 00 02 00 00 or $0x200,%edi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10ff89: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 10ff8d: 19 d2 sbb %edx,%edx 10ff8f: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 10ff95: 89 55 e4 mov %edx,-0x1c(%ebp) 10ff98: 89 4d e0 mov %ecx,-0x20(%ebp) 10ff9b: e8 25 d2 ff ff call 10d1c5 <_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; 10ffa0: 8b 55 e4 mov -0x1c(%ebp),%edx 10ffa3: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 10ffa5: 09 f8 or %edi,%eax 10ffa7: 8b 4d e0 mov -0x20(%ebp),%ecx 10ffaa: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10ffac: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10ffb3: 74 0b je 10ffc0 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10ffb5: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 10ffbc: 0f 94 46 74 sete 0x74(%esi) if ( mask & RTEMS_TIMESLICE_MASK ) { 10ffc0: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10ffc7: 74 21 je 10ffea if ( _Modes_Is_timeslice(mode_set) ) { 10ffc9: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10ffd0: 74 11 je 10ffe3 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10ffd2: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ffd9: a1 34 31 12 00 mov 0x123134,%eax 10ffde: 89 46 78 mov %eax,0x78(%esi) 10ffe1: eb 07 jmp 10ffea } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10ffe3: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10ffea: f6 45 0c 01 testb $0x1,0xc(%ebp) 10ffee: 74 0a je 10fffa */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10fff0: f6 45 08 01 testb $0x1,0x8(%ebp) 10fff4: 74 03 je 10fff9 10fff6: fa cli 10fff7: eb 01 jmp 10fffa 10fff9: fb sti /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 10fffa: 31 d2 xor %edx,%edx if ( mask & RTEMS_ASR_MASK ) { 10fffc: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 110003: 74 2a je 11002f * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 110005: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 11000c: 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 ) { 11000f: 3a 43 08 cmp 0x8(%ebx),%al 110012: 74 1b je 11002f asr->is_enabled = is_asr_enabled; 110014: 88 43 08 mov %al,0x8(%ebx) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 110017: 9c pushf 110018: fa cli 110019: 58 pop %eax _signals = information->signals_pending; 11001a: 8b 53 18 mov 0x18(%ebx),%edx information->signals_pending = information->signals_posted; 11001d: 8b 4b 14 mov 0x14(%ebx),%ecx 110020: 89 4b 18 mov %ecx,0x18(%ebx) information->signals_posted = _signals; 110023: 89 53 14 mov %edx,0x14(%ebx) _ISR_Enable( _level ); 110026: 50 push %eax 110027: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 110028: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 11002c: 0f 95 c2 setne %dl if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 11002f: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 110031: 83 3d e4 32 12 00 03 cmpl $0x3,0x1232e4 110038: 75 2f jne 110069 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 11003a: a1 a8 33 12 00 mov 0x1233a8,%eax if ( !_States_Is_ready( executing->current_state ) || 11003f: 83 78 10 00 cmpl $0x0,0x10(%eax) 110043: 75 0e jne 110053 <== NEVER TAKEN 110045: 3b 05 ac 33 12 00 cmp 0x1233ac,%eax 11004b: 74 0f je 11005c ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 11004d: 80 78 74 00 cmpb $0x0,0x74(%eax) 110051: 74 09 je 11005c <== NEVER TAKEN _Context_Switch_necessary = true; 110053: c6 05 b4 33 12 00 01 movb $0x1,0x1233b4 11005a: eb 06 jmp 110062 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 11005c: 31 c0 xor %eax,%eax } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 11005e: 84 d2 test %dl,%dl 110060: 74 07 je 110069 _Thread_Dispatch(); 110062: e8 b5 bc ff ff call 10bd1c <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 110067: 31 c0 xor %eax,%eax } 110069: 83 c4 1c add $0x1c,%esp 11006c: 5b pop %ebx 11006d: 5e pop %esi 11006e: 5f pop %edi 11006f: c9 leave 110070: c3 ret =============================================================================== 0010dda4 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dda4: 55 push %ebp 10dda5: 89 e5 mov %esp,%ebp 10dda7: 56 push %esi 10dda8: 53 push %ebx 10dda9: 83 ec 10 sub $0x10,%esp 10ddac: 8b 5d 0c mov 0xc(%ebp),%ebx 10ddaf: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ddb2: 85 db test %ebx,%ebx 10ddb4: 74 10 je 10ddc6 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 ) ); 10ddb6: 0f b6 15 b4 37 12 00 movzbl 0x1237b4,%edx !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10ddbd: b8 13 00 00 00 mov $0x13,%eax ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ddc2: 39 d3 cmp %edx,%ebx 10ddc4: 77 52 ja 10de18 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10ddc6: b8 09 00 00 00 mov $0x9,%eax if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10ddcb: 85 f6 test %esi,%esi 10ddcd: 74 49 je 10de18 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ddcf: 51 push %ecx 10ddd0: 51 push %ecx 10ddd1: 8d 45 f4 lea -0xc(%ebp),%eax 10ddd4: 50 push %eax 10ddd5: ff 75 08 pushl 0x8(%ebp) 10ddd8: e8 1b 1b 00 00 call 10f8f8 <_Thread_Get> switch ( location ) { 10dddd: 83 c4 10 add $0x10,%esp 10dde0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dde4: 75 2d jne 10de13 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10dde6: 8b 50 14 mov 0x14(%eax),%edx 10dde9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10ddeb: 85 db test %ebx,%ebx 10dded: 74 1b je 10de0a the_thread->real_priority = new_priority; 10ddef: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10ddf2: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10ddf6: 74 05 je 10ddfd 10ddf8: 39 58 14 cmp %ebx,0x14(%eax) 10ddfb: 76 0d jbe 10de0a <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10ddfd: 52 push %edx 10ddfe: 6a 00 push $0x0 10de00: 53 push %ebx 10de01: 50 push %eax 10de02: e8 3d 16 00 00 call 10f444 <_Thread_Change_priority> 10de07: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10de0a: e8 c7 1a 00 00 call 10f8d6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10de0f: 31 c0 xor %eax,%eax 10de11: eb 05 jmp 10de18 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10de13: b8 04 00 00 00 mov $0x4,%eax } 10de18: 8d 65 f8 lea -0x8(%ebp),%esp 10de1b: 5b pop %ebx 10de1c: 5e pop %esi 10de1d: c9 leave 10de1e: c3 ret =============================================================================== 001086f8 : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 1086f8: 55 push %ebp <== NOT EXECUTED 1086f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 1086fb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1086fe: a3 44 0f 12 00 mov %eax,0x120f44 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 108703: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 108706: a3 48 0f 12 00 mov %eax,0x120f48 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 10870b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10870e: a3 4c 0f 12 00 mov %eax,0x120f4c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108713: 31 c0 xor %eax,%eax <== NOT EXECUTED 108715: c9 leave <== NOT EXECUTED 108716: c3 ret <== NOT EXECUTED =============================================================================== 0010857b : } } rtems_status_code rtems_termios_close (void *arg) { 10857b: 55 push %ebp 10857c: 89 e5 mov %esp,%ebp 10857e: 56 push %esi 10857f: 53 push %ebx 108580: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108583: 8b 06 mov (%esi),%eax 108585: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain( 108588: 51 push %ecx 108589: 6a 00 push $0x0 10858b: 6a 00 push $0x0 10858d: ff 35 5c 30 12 00 pushl 0x12305c 108593: e8 30 1c 00 00 call 10a1c8 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108598: 83 c4 10 add $0x10,%esp 10859b: 85 c0 test %eax,%eax 10859d: 75 7d jne 10861c <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10859f: 8b 43 08 mov 0x8(%ebx),%eax 1085a2: 48 dec %eax 1085a3: 89 43 08 mov %eax,0x8(%ebx) 1085a6: 85 c0 test %eax,%eax 1085a8: 0f 85 33 01 00 00 jne 1086e1 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1085ae: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1085b4: c1 e0 05 shl $0x5,%eax 1085b7: 8b 80 1c 2d 12 00 mov 0x122d1c(%eax),%eax 1085bd: 85 c0 test %eax,%eax 1085bf: 74 0b je 1085cc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1085c1: 83 ec 0c sub $0xc,%esp 1085c4: 53 push %ebx 1085c5: ff d0 call *%eax 1085c7: 83 c4 10 add $0x10,%esp 1085ca: eb 1b jmp 1085e7 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1085cc: 52 push %edx 1085cd: 6a 00 push $0x0 1085cf: 6a 00 push $0x0 1085d1: ff 73 18 pushl 0x18(%ebx) 1085d4: e8 ef 1b 00 00 call 10a1c8 if (sc != RTEMS_SUCCESSFUL) { 1085d9: 83 c4 10 add $0x10,%esp 1085dc: 85 c0 test %eax,%eax 1085de: 75 3c jne 10861c <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 1085e0: 89 d8 mov %ebx,%eax 1085e2: e8 11 fb ff ff call 1080f8 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1085e7: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1085ee: 75 35 jne 108625 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 1085f0: 50 push %eax 1085f1: 50 push %eax 1085f2: 6a 01 push $0x1 1085f4: ff b3 c4 00 00 00 pushl 0xc4(%ebx) 1085fa: e8 61 17 00 00 call 109d60 if (sc != RTEMS_SUCCESSFUL) 1085ff: 83 c4 10 add $0x10,%esp 108602: 85 c0 test %eax,%eax 108604: 75 16 jne 10861c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 108606: 51 push %ecx 108607: 51 push %ecx 108608: 6a 01 push $0x1 10860a: ff b3 c8 00 00 00 pushl 0xc8(%ebx) 108610: e8 4b 17 00 00 call 109d60 if (sc != RTEMS_SUCCESSFUL) 108615: 83 c4 10 add $0x10,%esp 108618: 85 c0 test %eax,%eax 10861a: 74 09 je 108625 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10861c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10861f: 50 push %eax <== NOT EXECUTED 108620: e8 63 21 00 00 call 10a788 <== NOT EXECUTED } if (tty->device.lastClose) 108625: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10862b: 85 c0 test %eax,%eax 10862d: 74 0d je 10863c (*tty->device.lastClose)(tty->major, tty->minor, arg); 10862f: 52 push %edx 108630: 56 push %esi 108631: ff 73 10 pushl 0x10(%ebx) 108634: ff 73 0c pushl 0xc(%ebx) 108637: ff d0 call *%eax 108639: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10863c: 8b 13 mov (%ebx),%edx 10863e: 85 d2 test %edx,%edx 108640: 8b 43 04 mov 0x4(%ebx),%eax 108643: 75 11 jne 108656 rtems_termios_ttyTail = tty->back; 108645: a3 60 30 12 00 mov %eax,0x123060 if ( rtems_termios_ttyTail != NULL ) { 10864a: 85 c0 test %eax,%eax 10864c: 74 0b je 108659 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 10864e: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 108654: eb 03 jmp 108659 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 108656: 89 42 04 mov %eax,0x4(%edx) } if (tty->back == NULL) { 108659: 8b 53 04 mov 0x4(%ebx),%edx 10865c: 85 d2 test %edx,%edx 10865e: 8b 03 mov (%ebx),%eax 108660: 75 12 jne 108674 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; 108662: a3 64 30 12 00 mov %eax,0x123064 if ( rtems_termios_ttyHead != NULL ) { 108667: 85 c0 test %eax,%eax 108669: 74 0b je 108676 rtems_termios_ttyHead->back = NULL; 10866b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 108672: eb 02 jmp 108676 } } else { tty->back->forw = tty->forw; 108674: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 108676: 83 ec 0c sub $0xc,%esp 108679: ff 73 14 pushl 0x14(%ebx) 10867c: e8 b7 1a 00 00 call 10a138 rtems_semaphore_delete (tty->osem); 108681: 59 pop %ecx 108682: ff 73 18 pushl 0x18(%ebx) 108685: e8 ae 1a 00 00 call 10a138 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10868a: 5a pop %edx 10868b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108691: e8 a2 1a 00 00 call 10a138 if ((tty->device.pollRead == NULL) || 108696: 83 c4 10 add $0x10,%esp 108699: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1086a0: 74 09 je 1086ab 1086a2: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1086a9: 75 0e jne 1086b9 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 1086ab: 83 ec 0c sub $0xc,%esp 1086ae: ff 73 68 pushl 0x68(%ebx) 1086b1: e8 82 1a 00 00 call 10a138 1086b6: 83 c4 10 add $0x10,%esp free (tty->rawInBuf.theBuf); 1086b9: 83 ec 0c sub $0xc,%esp 1086bc: ff 73 58 pushl 0x58(%ebx) 1086bf: e8 20 ec ff ff call 1072e4 free (tty->rawOutBuf.theBuf); 1086c4: 58 pop %eax 1086c5: ff 73 7c pushl 0x7c(%ebx) 1086c8: e8 17 ec ff ff call 1072e4 free (tty->cbuf); 1086cd: 5e pop %esi 1086ce: ff 73 1c pushl 0x1c(%ebx) 1086d1: e8 0e ec ff ff call 1072e4 free (tty); 1086d6: 89 1c 24 mov %ebx,(%esp) 1086d9: e8 06 ec ff ff call 1072e4 1086de: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 1086e1: 83 ec 0c sub $0xc,%esp 1086e4: ff 35 5c 30 12 00 pushl 0x12305c 1086ea: e8 c5 1b 00 00 call 10a2b4 return RTEMS_SUCCESSFUL; } 1086ef: 31 c0 xor %eax,%eax 1086f1: 8d 65 f8 lea -0x8(%ebp),%esp 1086f4: 5b pop %ebx 1086f5: 5e pop %esi 1086f6: c9 leave 1086f7: c3 ret =============================================================================== 001098a5 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 1098a5: 55 push %ebp 1098a6: 89 e5 mov %esp,%ebp 1098a8: 83 ec 08 sub $0x8,%esp 1098ab: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 1098ae: 8b 55 0c mov 0xc(%ebp),%edx 1098b1: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1098b7: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 1098be: 75 1f jne 1098df /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 1098c0: 52 push %edx 1098c1: 52 push %edx 1098c2: 6a 02 push $0x2 1098c4: ff b0 c8 00 00 00 pushl 0xc8(%eax) 1098ca: e8 91 04 00 00 call 109d60 if (sc != RTEMS_SUCCESSFUL) 1098cf: 83 c4 10 add $0x10,%esp 1098d2: 85 c0 test %eax,%eax 1098d4: 74 30 je 109906 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 1098d6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098d9: 50 push %eax <== NOT EXECUTED 1098da: e8 a9 0e 00 00 call 10a788 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 1098df: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 1098e6: 75 15 jne 1098fd /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 1098e8: 8b 15 cc 2d 12 00 mov 0x122dcc,%edx 1098ee: 85 d2 test %edx,%edx 1098f0: 74 14 je 109906 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 1098f2: 83 ec 0c sub $0xc,%esp 1098f5: 50 push %eax 1098f6: ff d2 call *%edx 1098f8: 83 c4 10 add $0x10,%esp 1098fb: eb 09 jmp 109906 } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 1098fd: 89 45 08 mov %eax,0x8(%ebp) } 109900: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 109901: e9 6d fd ff ff jmp 109673 } 109906: 31 c0 xor %eax,%eax 109908: c9 leave 109909: c3 ret =============================================================================== 00109384 : * 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) { 109384: 55 push %ebp 109385: 89 e5 mov %esp,%ebp 109387: 57 push %edi 109388: 56 push %esi 109389: 53 push %ebx 10938a: 83 ec 2c sub $0x2c,%esp 10938d: 8b 5d 08 mov 0x8(%ebp),%ebx 109390: 8b 7d 0c mov 0xc(%ebp),%edi 109393: 8b 4d 10 mov 0x10(%ebp),%ecx 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) { 109396: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10939c: c1 e0 05 shl $0x5,%eax 10939f: 89 ca mov %ecx,%edx 1093a1: 83 b8 28 2d 12 00 00 cmpl $0x0,0x122d28(%eax) 1093a8: 75 3b jne 1093e5 1093aa: 89 4d e0 mov %ecx,-0x20(%ebp) 1093ad: c6 45 df 00 movb $0x0,-0x21(%ebp) 1093b1: 31 f6 xor %esi,%esi /* * 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); 1093b3: 8d 43 30 lea 0x30(%ebx),%eax 1093b6: 89 45 d4 mov %eax,-0x2c(%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, 1093b9: 8d 53 4a lea 0x4a(%ebx),%edx 1093bc: 89 55 d0 mov %edx,-0x30(%ebp) 1093bf: e9 26 02 00 00 jmp 1095ea 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--) { c = *buf++; 1093c4: 0f be 0f movsbl (%edi),%ecx 1093c7: 47 inc %edi rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1093c8: 56 push %esi 1093c9: 56 push %esi 1093ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1093d0: c1 e0 05 shl $0x5,%eax 1093d3: 53 push %ebx 1093d4: 51 push %ecx 1093d5: 89 55 cc mov %edx,-0x34(%ebp) 1093d8: ff 90 28 2d 12 00 call *0x122d28(%eax) 1093de: 8b 55 cc mov -0x34(%ebp),%edx 1093e1: 4a dec %edx 1093e2: 83 c4 10 add $0x10,%esp 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--) { 1093e5: 85 d2 test %edx,%edx 1093e7: 75 db jne 1093c4 */ 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; 1093e9: 31 f6 xor %esi,%esi } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1093eb: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) 1093f2: 0f 85 0d 02 00 00 jne 109605 <== NEVER TAKEN 1093f8: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; 1093fe: 89 d6 mov %edx,%esi } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109400: 85 c0 test %eax,%eax 109402: 0f 84 fd 01 00 00 je 109605 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109408: 51 push %ecx <== NOT EXECUTED 109409: 51 push %ecx <== NOT EXECUTED 10940a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109410: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109413: 52 push %edx <== NOT EXECUTED 109414: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109416: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10941d: 00 00 00 109420: e9 dd 01 00 00 jmp 109602 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109425: 8a 0f mov (%edi),%cl 109427: 88 4d de mov %cl,-0x22(%ebp) 10942a: 47 inc %edi /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 10942b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109431: f6 c4 02 test $0x2,%ah 109434: 74 46 je 10947c /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 109436: 0f be c1 movsbl %cl,%eax 109439: 0f b6 53 4a movzbl 0x4a(%ebx),%edx 10943d: 39 d0 cmp %edx,%eax 10943f: 75 28 jne 109469 <== ALWAYS TAKEN if (c == tty->termios.c_cc[VSTART]) { 109441: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109445: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109447: 75 0b jne 109454 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 109449: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10944f: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 109452: eb 09 jmp 10945d <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109454: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10945a: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 10945d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED * 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) { 109463: c6 45 df 01 movb $0x1,-0x21(%ebp) <== NOT EXECUTED 109467: eb 19 jmp 109482 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 109469: 0f b6 53 49 movzbl 0x49(%ebx),%edx 10946d: 39 d0 cmp %edx,%eax 10946f: 75 0b jne 10947c <== ALWAYS TAKEN /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 109471: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109477: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 10947a: eb e1 jmp 10945d <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 10947c: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 109480: 74 51 je 1094d3 <== ALWAYS TAKEN /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 109482: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109488: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 10948b: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 10948e: 0f 85 53 01 00 00 jne 1095e7 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109494: 9c pushf <== NOT EXECUTED 109495: fa cli <== NOT EXECUTED 109496: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109499: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10949f: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 1094a2: 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) { 1094a8: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 1094af: 74 19 je 1094ca <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 1094b1: 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)( 1094b7: 52 push %edx <== NOT EXECUTED 1094b8: 6a 01 push $0x1 <== NOT EXECUTED 1094ba: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1094bd: 50 push %eax <== NOT EXECUTED 1094be: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1094c1: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 1094c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 1094ca: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1094cd: 9d popf <== NOT EXECUTED 1094ce: e9 14 01 00 00 jmp 1095e7 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1094d3: 8b 43 60 mov 0x60(%ebx),%eax 1094d6: 8b 4b 64 mov 0x64(%ebx),%ecx 1094d9: 40 inc %eax 1094da: 31 d2 xor %edx,%edx 1094dc: f7 f1 div %ecx 1094de: 89 55 e4 mov %edx,-0x1c(%ebp) /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1094e1: 9c pushf 1094e2: fa cli 1094e3: 8f 45 d8 popl -0x28(%ebp) if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1094e6: 8b 53 5c mov 0x5c(%ebx),%edx 1094e9: 8b 43 64 mov 0x64(%ebx),%eax % tty->rawInBuf.Size) > tty->highwater) && 1094ec: 8b 4b 64 mov 0x64(%ebx),%ecx } } 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) 1094ef: 29 d0 sub %edx,%eax 1094f1: 03 45 e4 add -0x1c(%ebp),%eax % tty->rawInBuf.Size) > tty->highwater) && 1094f4: 31 d2 xor %edx,%edx 1094f6: f7 f1 div %ecx } } 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) 1094f8: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx 1094fe: 0f 86 98 00 00 00 jbe 10959c <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 109504: 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) && 10950a: a8 01 test $0x1,%al <== NOT EXECUTED 10950c: 0f 85 8a 00 00 00 jne 10959c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 109512: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109518: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 10951b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 109521: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109527: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 10952c: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 109531: 75 33 jne 109566 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 109533: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109539: a8 20 test $0x20,%al <== NOT EXECUTED 10953b: 75 09 jne 109546 <== NOT EXECUTED 10953d: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109544: 75 56 jne 10959c <== 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; 109546: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10954c: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 10954f: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 109555: 51 push %ecx <== NOT EXECUTED 109556: 6a 01 push $0x1 <== NOT EXECUTED 109558: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 10955b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10955e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109564: eb 33 jmp 109599 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 109566: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10956c: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 109571: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 109576: 75 24 jne 10959c <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 109578: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10957e: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109581: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 109587: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 10958d: 85 c0 test %eax,%eax <== NOT EXECUTED 10958f: 74 0b je 10959c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109591: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109594: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109597: ff d0 call *%eax <== NOT EXECUTED 109599: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 10959c: ff 75 d8 pushl -0x28(%ebp) 10959f: 9d popf if (newTail == tty->rawInBuf.Head) { 1095a0: 8b 43 5c mov 0x5c(%ebx),%eax 1095a3: 39 45 e4 cmp %eax,-0x1c(%ebp) 1095a6: 75 03 jne 1095ab <== ALWAYS TAKEN dropped++; 1095a8: 46 inc %esi <== NOT EXECUTED 1095a9: eb 3c jmp 1095e7 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 1095ab: 8b 43 58 mov 0x58(%ebx),%eax 1095ae: 8a 4d de mov -0x22(%ebp),%cl 1095b1: 8b 55 e4 mov -0x1c(%ebp),%edx 1095b4: 88 0c 10 mov %cl,(%eax,%edx,1) tty->rawInBuf.Tail = newTail; 1095b7: 89 53 60 mov %edx,0x60(%ebx) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 1095ba: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx) 1095c1: 75 24 jne 1095e7 <== NEVER TAKEN 1095c3: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 1095c9: 85 c0 test %eax,%eax 1095cb: 74 1a je 1095e7 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 1095cd: 52 push %edx <== NOT EXECUTED 1095ce: 52 push %edx <== NOT EXECUTED 1095cf: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 1095d5: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 1095d8: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 1095da: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 1095e1: 00 00 00 1095e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1095e7: ff 4d e0 decl -0x20(%ebp) tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 1095ea: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 1095ee: 0f 85 31 fe ff ff jne 109425 } } } } tty->rawInBufDropped += dropped; 1095f4: 01 73 78 add %esi,0x78(%ebx) rtems_semaphore_release (tty->rawInBuf.Semaphore); 1095f7: 83 ec 0c sub $0xc,%esp 1095fa: ff 73 68 pushl 0x68(%ebx) 1095fd: e8 b2 0c 00 00 call 10a2b4 return dropped; 109602: 83 c4 10 add $0x10,%esp } 109605: 89 f0 mov %esi,%eax 109607: 8d 65 f4 lea -0xc(%ebp),%esp 10960a: 5b pop %ebx 10960b: 5e pop %esi 10960c: 5f pop %edi 10960d: c9 leave 10960e: c3 ret =============================================================================== 00108717 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 108717: 55 push %ebp 108718: 89 e5 mov %esp,%ebp 10871a: 57 push %edi 10871b: 56 push %esi 10871c: 53 push %ebx 10871d: 83 ec 20 sub $0x20,%esp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108720: 8b 55 08 mov 0x8(%ebp),%edx 108723: 8b 02 mov (%edx),%eax 108725: 8b 58 34 mov 0x34(%eax),%ebx struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 108728: 8b 72 08 mov 0x8(%edx),%esi rtems_status_code sc; args->ioctl_return = 0; 10872b: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108732: 6a 00 push $0x0 108734: 6a 00 push $0x0 108736: ff 73 18 pushl 0x18(%ebx) 108739: e8 8a 1a 00 00 call 10a1c8 10873e: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) { 108741: 83 c4 10 add $0x10,%esp 108744: 85 c0 test %eax,%eax 108746: 74 0b je 108753 <== ALWAYS TAKEN args->ioctl_return = sc; 108748: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 10874b: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED return sc; 10874e: e9 05 03 00 00 jmp 108a58 <== NOT EXECUTED } switch (args->command) { 108753: 8b 55 08 mov 0x8(%ebp),%edx 108756: 8b 42 04 mov 0x4(%edx),%eax 108759: 83 f8 04 cmp $0x4,%eax 10875c: 0f 84 4d 02 00 00 je 1089af <== NEVER TAKEN 108762: 77 10 ja 108774 108764: 83 f8 02 cmp $0x2,%eax 108767: 74 77 je 1087e0 108769: 0f 87 1e 02 00 00 ja 10898d 10876f: 48 dec %eax 108770: 75 2f jne 1087a1 <== NEVER TAKEN 108772: eb 55 jmp 1087c9 108774: 3d 7f 66 04 40 cmp $0x4004667f,%eax 108779: 0f 84 a5 02 00 00 je 108a24 <== NEVER TAKEN 10877f: 77 0a ja 10878b 108781: 83 f8 05 cmp $0x5,%eax 108784: 75 1b jne 1087a1 <== ALWAYS TAKEN 108786: e9 0e 02 00 00 jmp 108999 <== NOT EXECUTED 10878b: 3d 1a 74 04 40 cmp $0x4004741a,%eax 108790: 0f 84 7e 02 00 00 je 108a14 108796: 3d 1b 74 04 80 cmp $0x8004741b,%eax 10879b: 0f 84 21 02 00 00 je 1089c2 <== ALWAYS TAKEN default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 1087a1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1087a7: c1 e0 05 shl $0x5,%eax 1087aa: 8b 80 30 2d 12 00 mov 0x122d30(%eax),%eax sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 1087b0: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp) args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 1087b7: 85 c0 test %eax,%eax 1087b9: 0f 84 82 02 00 00 je 108a41 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 1087bf: 52 push %edx 1087c0: 52 push %edx 1087c1: ff 75 08 pushl 0x8(%ebp) 1087c4: e9 40 02 00 00 jmp 108a09 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 1087c9: 8b 4d 08 mov 0x8(%ebp),%ecx 1087cc: 8b 41 08 mov 0x8(%ecx),%eax 1087cf: 8d 73 30 lea 0x30(%ebx),%esi 1087d2: b9 09 00 00 00 mov $0x9,%ecx 1087d7: 89 c7 mov %eax,%edi 1087d9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 1087db: e9 61 02 00 00 jmp 108a41 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 1087e0: 8b 45 08 mov 0x8(%ebp),%eax 1087e3: 8b 70 08 mov 0x8(%eax),%esi 1087e6: 8d 7b 30 lea 0x30(%ebx),%edi 1087e9: b9 09 00 00 00 mov $0x9,%ecx 1087ee: 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) && 1087f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1087f6: f6 c4 02 test $0x2,%ah 1087f9: 74 57 je 108852 1087fb: f6 43 31 04 testb $0x4,0x31(%ebx) 1087ff: 75 51 jne 108852 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 108801: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108807: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 10880c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 108812: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108818: a8 20 test $0x20,%al <== NOT EXECUTED 10881a: 74 36 je 108852 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10881c: 9c pushf <== NOT EXECUTED 10881d: fa cli <== NOT EXECUTED 10881e: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10881f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108825: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 108828: 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) { 10882e: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 108835: 74 19 je 108850 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108837: 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)( 10883d: 57 push %edi <== NOT EXECUTED 10883e: 6a 01 push $0x1 <== NOT EXECUTED 108840: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 108843: 50 push %eax <== NOT EXECUTED 108844: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108847: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10884d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 108850: 56 push %esi <== NOT EXECUTED 108851: 9d popf <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 108852: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108858: f6 c4 04 test $0x4,%ah 10885b: 74 24 je 108881 <== ALWAYS TAKEN 10885d: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED 108861: 75 1e jne 108881 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 108863: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108869: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 10886c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 108872: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108878: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10887b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 108881: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108887: f6 c4 01 test $0x1,%ah 10888a: 74 43 je 1088cf <== ALWAYS TAKEN 10888c: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED 108890: 78 3d js 1088cf <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 108892: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108898: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 10889b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 1088a1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088a7: a8 04 test $0x4,%al <== NOT EXECUTED 1088a9: 74 15 je 1088c0 <== NOT EXECUTED 1088ab: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 1088b1: 85 c0 test %eax,%eax <== NOT EXECUTED 1088b3: 74 0b je 1088c0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 1088b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088b8: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1088bb: ff d0 call *%eax <== NOT EXECUTED 1088bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 1088c0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088c6: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 1088c9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== 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) { 1088cf: 83 7b 38 00 cmpl $0x0,0x38(%ebx) 1088d3: 79 0f jns 1088e4 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; 1088d5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088db: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 1088de: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 1088e4: 8b 53 30 mov 0x30(%ebx),%edx 1088e7: f6 c6 10 test $0x10,%dh 1088ea: 74 0f je 1088fb <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 1088ec: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1088f2: 80 cc 04 or $0x4,%ah <== NOT EXECUTED 1088f5: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 1088fb: 80 e6 04 and $0x4,%dh 1088fe: 74 0f je 10890f <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 108900: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108906: 80 cc 02 or $0x2,%ah 108909: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) 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) { 10890f: f6 43 3c 02 testb $0x2,0x3c(%ebx) 108913: 75 39 jne 10894e tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 108915: 0f b6 73 46 movzbl 0x46(%ebx),%esi rtems_clock_get_ticks_per_second() / 10; 108919: e8 6a 12 00 00 call 109b88 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] * 10891e: 0f af c6 imul %esi,%eax rtems_clock_get_ticks_per_second() / 10; 108921: b9 0a 00 00 00 mov $0xa,%ecx 108926: 31 d2 xor %edx,%edx 108928: f7 f1 div %ecx 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] * 10892a: 89 43 54 mov %eax,0x54(%ebx) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 10892d: 80 7b 46 00 cmpb $0x0,0x46(%ebx) 108931: 74 15 je 108948 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 108933: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10893a: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 10893d: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 108941: 75 19 jne 10895c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 108943: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 108946: eb 24 jmp 10896c <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 108948: 80 7b 47 00 cmpb $0x0,0x47(%ebx) 10894c: 74 17 je 108965 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10894e: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 108955: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10895c: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) 108963: eb 07 jmp 10896c } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 108965: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) } } } if (tty->device.setAttributes) 10896c: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 108972: 85 c0 test %eax,%eax 108974: 0f 84 c7 00 00 00 je 108a41 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 10897a: 56 push %esi 10897b: 56 push %esi 10897c: 8d 53 30 lea 0x30(%ebx),%edx 10897f: 52 push %edx 108980: ff 73 10 pushl 0x10(%ebx) 108983: ff d0 call *%eax 108985: 83 c4 10 add $0x10,%esp 108988: e9 b4 00 00 00 jmp 108a41 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 10898d: 89 d8 mov %ebx,%eax 10898f: e8 64 f7 ff ff call 1080f8 break; 108994: e9 a8 00 00 00 jmp 108a41 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 108999: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10899b: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10899e: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx) <== NOT EXECUTED 1089a4: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx) <== NOT EXECUTED break; 1089aa: e9 92 00 00 00 jmp 108a41 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 1089af: 8b 06 mov (%esi),%eax <== NOT EXECUTED 1089b1: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 1089b4: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) <== NOT EXECUTED 1089ba: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) <== NOT EXECUTED break; 1089c0: eb 7f jmp 108a41 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 1089c2: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1089c8: c1 e0 05 shl $0x5,%eax 1089cb: 8b 80 1c 2d 12 00 mov 0x122d1c(%eax),%eax 1089d1: 85 c0 test %eax,%eax 1089d3: 74 0c je 1089e1 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 1089d5: 83 ec 0c sub $0xc,%esp 1089d8: 53 push %ebx 1089d9: ff d0 call *%eax 1089db: 89 45 e4 mov %eax,-0x1c(%ebp) 1089de: 83 c4 10 add $0x10,%esp } tty->t_line=*(int*)(args->buffer); 1089e1: 8b 55 08 mov 0x8(%ebp),%edx 1089e4: 8b 42 08 mov 0x8(%edx),%eax 1089e7: 8b 00 mov (%eax),%eax 1089e9: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) tty->t_sc = NULL; /* ensure that no more valid data */ 1089ef: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 1089f6: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 1089f9: c1 e0 05 shl $0x5,%eax 1089fc: 8b 80 18 2d 12 00 mov 0x122d18(%eax),%eax 108a02: 85 c0 test %eax,%eax 108a04: 74 3b je 108a41 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); 108a06: 83 ec 0c sub $0xc,%esp 108a09: 53 push %ebx 108a0a: ff d0 call *%eax 108a0c: 89 45 e4 mov %eax,-0x1c(%ebp) 108a0f: e9 71 ff ff ff jmp 108985 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 108a14: 8b 4d 08 mov 0x8(%ebp),%ecx 108a17: 8b 41 08 mov 0x8(%ecx),%eax 108a1a: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 108a20: 89 10 mov %edx,(%eax) break; 108a22: eb 1d jmp 108a41 #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 108a24: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 108a27: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 108a2a: 29 d0 sub %edx,%eax <== NOT EXECUTED 108a2c: 79 05 jns 108a33 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 108a2e: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 108a31: 01 d0 add %edx,%eax <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 108a33: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 108a36: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED 108a39: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED 108a3c: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED 108a3f: 89 02 mov %eax,(%edx) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 108a41: 83 ec 0c sub $0xc,%esp 108a44: ff 73 18 pushl 0x18(%ebx) 108a47: e8 68 18 00 00 call 10a2b4 args->ioctl_return = sc; 108a4c: 8b 55 e4 mov -0x1c(%ebp),%edx 108a4f: 8b 45 08 mov 0x8(%ebp),%eax 108a52: 89 50 0c mov %edx,0xc(%eax) return sc; 108a55: 83 c4 10 add $0x10,%esp } 108a58: 8b 45 e4 mov -0x1c(%ebp),%eax 108a5b: 8d 65 f4 lea -0xc(%ebp),%esp 108a5e: 5b pop %ebx 108a5f: 5e pop %esi 108a60: 5f pop %edi 108a61: c9 leave 108a62: c3 ret =============================================================================== 00108155 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 108155: 55 push %ebp 108156: 89 e5 mov %esp,%ebp 108158: 57 push %edi 108159: 56 push %esi 10815a: 53 push %ebx 10815b: 83 ec 20 sub $0x20,%esp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 10815e: 6a 00 push $0x0 108160: 6a 00 push $0x0 108162: ff 35 5c 30 12 00 pushl 0x12305c 108168: e8 5b 20 00 00 call 10a1c8 10816d: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108170: 83 c4 10 add $0x10,%esp 108173: 85 c0 test %eax,%eax 108175: 0f 85 d3 03 00 00 jne 10854e <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10817b: 8b 35 64 30 12 00 mov 0x123064,%esi 108181: 89 f2 mov %esi,%edx 108183: eb 16 jmp 10819b if ((tty->major == major) && (tty->minor == minor)) 108185: 8b 45 08 mov 0x8(%ebp),%eax 108188: 39 42 0c cmp %eax,0xc(%edx) 10818b: 75 0c jne 108199 10818d: 8b 4d 0c mov 0xc(%ebp),%ecx 108190: 39 4a 10 cmp %ecx,0x10(%edx) 108193: 0f 84 26 03 00 00 je 1084bf <== ALWAYS TAKEN sc = rtems_semaphore_obtain( rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 108199: 8b 12 mov (%edx),%edx 10819b: 85 d2 test %edx,%edx 10819d: 75 e6 jne 108185 10819f: e9 b5 03 00 00 jmp 108559 /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 1081a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081a7: eb 30 jmp 1081d9 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 1081a9: a1 48 0f 12 00 mov 0x120f48,%eax 1081ae: 89 42 64 mov %eax,0x64(%edx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 1081b1: 8b 42 64 mov 0x64(%edx),%eax 1081b4: 83 ec 0c sub $0xc,%esp 1081b7: 50 push %eax 1081b8: 89 55 e0 mov %edx,-0x20(%ebp) 1081bb: e8 c0 f3 ff ff call 107580 1081c0: 89 c7 mov %eax,%edi 1081c2: 8b 55 e0 mov -0x20(%ebp),%edx 1081c5: 89 42 58 mov %eax,0x58(%edx) if (tty->rawInBuf.theBuf == NULL) { 1081c8: 83 c4 10 add $0x10,%esp 1081cb: 85 c0 test %eax,%eax 1081cd: 75 24 jne 1081f3 <== ALWAYS TAKEN free(tty); 1081cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081d2: 52 push %edx <== NOT EXECUTED 1081d3: e8 0c f1 ff ff call 1072e4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 1081d8: 5b pop %ebx <== NOT EXECUTED 1081d9: ff 35 5c 30 12 00 pushl 0x12305c <== NOT EXECUTED 1081df: e8 d0 20 00 00 call 10a2b4 <== NOT EXECUTED return RTEMS_NO_MEMORY; 1081e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1081e7: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED 1081ee: e9 5b 03 00 00 jmp 10854e <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 1081f3: a1 4c 0f 12 00 mov 0x120f4c,%eax 1081f8: 89 82 88 00 00 00 mov %eax,0x88(%edx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 1081fe: 8b 82 88 00 00 00 mov 0x88(%edx),%eax 108204: 83 ec 0c sub $0xc,%esp 108207: 50 push %eax 108208: 89 55 e0 mov %edx,-0x20(%ebp) 10820b: e8 70 f3 ff ff call 107580 108210: 8b 55 e0 mov -0x20(%ebp),%edx 108213: 89 42 7c mov %eax,0x7c(%edx) if (tty->rawOutBuf.theBuf == NULL) { 108216: 83 c4 10 add $0x10,%esp 108219: 85 c0 test %eax,%eax 10821b: 75 05 jne 108222 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); 10821d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108220: eb 2e jmp 108250 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 108222: 83 ec 0c sub $0xc,%esp 108225: ff 35 44 0f 12 00 pushl 0x120f44 10822b: 89 55 e0 mov %edx,-0x20(%ebp) 10822e: 89 45 dc mov %eax,-0x24(%ebp) 108231: e8 4a f3 ff ff call 107580 108236: 8b 55 e0 mov -0x20(%ebp),%edx 108239: 89 42 1c mov %eax,0x1c(%edx) if (tty->cbuf == NULL) { 10823c: 83 c4 10 add $0x10,%esp 10823f: 85 c0 test %eax,%eax 108241: 8b 4d dc mov -0x24(%ebp),%ecx 108244: 75 19 jne 10825f <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); 108246: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108249: 51 push %ecx <== NOT EXECUTED 10824a: e8 95 f0 ff ff call 1072e4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10824f: 59 pop %ecx <== NOT EXECUTED 108250: 57 push %edi <== NOT EXECUTED 108251: e8 8e f0 ff ff call 1072e4 <== NOT EXECUTED free(tty); 108256: 5a pop %edx <== NOT EXECUTED 108257: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 10825a: e9 73 ff ff ff jmp 1081d2 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10825f: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx) 108266: 00 00 00 tty->tty_snd.sw_arg = NULL; 108269: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx) 108270: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 108273: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx) 10827a: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10827d: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx) 108284: 00 00 00 tty->tty_rcvwakeup = 0; 108287: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx) 10828e: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 108291: 89 32 mov %esi,(%edx) tty->back = NULL; 108293: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if (rtems_termios_ttyHead != NULL) 10829a: 85 f6 test %esi,%esi 10829c: 74 03 je 1082a1 rtems_termios_ttyHead->back = tty; 10829e: 89 56 04 mov %edx,0x4(%esi) rtems_termios_ttyHead = tty; 1082a1: 89 1d 64 30 12 00 mov %ebx,0x123064 if (rtems_termios_ttyTail == NULL) 1082a7: 83 3d 60 30 12 00 00 cmpl $0x0,0x123060 1082ae: 75 06 jne 1082b6 rtems_termios_ttyTail = tty; 1082b0: 89 1d 60 30 12 00 mov %ebx,0x123060 tty->minor = minor; 1082b6: 8b 45 0c mov 0xc(%ebp),%eax 1082b9: 89 43 10 mov %eax,0x10(%ebx) tty->major = major; 1082bc: 8b 4d 08 mov 0x8(%ebp),%ecx 1082bf: 89 4b 0c mov %ecx,0xc(%ebx) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1082c2: 83 ec 0c sub $0xc,%esp 1082c5: 8d 43 14 lea 0x14(%ebx),%eax 1082c8: 50 push %eax 1082c9: 6a 00 push $0x0 1082cb: 6a 54 push $0x54 1082cd: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'i', c), 1082cf: 0f be 05 50 0f 12 00 movsbl 0x120f50,%eax tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 1082d6: 0d 00 69 52 54 or $0x54526900,%eax 1082db: 50 push %eax 1082dc: 89 55 e0 mov %edx,-0x20(%ebp) 1082df: e8 bc 1c 00 00 call 109fa0 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) 1082e4: 83 c4 20 add $0x20,%esp 1082e7: 85 c0 test %eax,%eax 1082e9: 8b 55 e0 mov -0x20(%ebp),%edx 1082ec: 0f 85 42 02 00 00 jne 108534 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 1082f2: 83 ec 0c sub $0xc,%esp 1082f5: 8d 43 18 lea 0x18(%ebx),%eax 1082f8: 50 push %eax 1082f9: 6a 00 push $0x0 1082fb: 6a 54 push $0x54 1082fd: 6a 01 push $0x1 rtems_build_name ('T', 'R', 'o', c), 1082ff: 0f be 05 50 0f 12 00 movsbl 0x120f50,%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 ( 108306: 0d 00 6f 52 54 or $0x54526f00,%eax 10830b: 50 push %eax 10830c: 89 55 e0 mov %edx,-0x20(%ebp) 10830f: e8 8c 1c 00 00 call 109fa0 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) 108314: 83 c4 20 add $0x20,%esp 108317: 85 c0 test %eax,%eax 108319: 8b 55 e0 mov -0x20(%ebp),%edx 10831c: 0f 85 12 02 00 00 jne 108534 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 108322: 83 ec 0c sub $0xc,%esp 108325: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 10832b: 50 push %eax 10832c: 6a 00 push $0x0 10832e: 6a 20 push $0x20 108330: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'x', c), 108332: 0f be 05 50 0f 12 00 movsbl 0x120f50,%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 ( 108339: 0d 00 78 52 54 or $0x54527800,%eax 10833e: 50 push %eax 10833f: 89 55 e0 mov %edx,-0x20(%ebp) 108342: e8 59 1c 00 00 call 109fa0 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 108347: 83 c4 20 add $0x20,%esp 10834a: 85 c0 test %eax,%eax 10834c: 8b 55 e0 mov -0x20(%ebp),%edx 10834f: 0f 85 df 01 00 00 jne 108534 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 108355: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 10835c: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10835f: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi 108365: b9 08 00 00 00 mov $0x8,%ecx 10836a: 8b 75 14 mov 0x14(%ebp),%esi 10836d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10836f: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 108376: 75 74 jne 1083ec sc = rtems_task_create ( 108378: 50 push %eax 108379: 50 push %eax 10837a: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax 108380: 50 push %eax 108381: 6a 00 push $0x0 108383: 68 00 05 00 00 push $0x500 108388: 68 00 04 00 00 push $0x400 10838d: 6a 0a push $0xa rtems_build_name ('T', 'x', 'T', c), 10838f: 0f be 05 50 0f 12 00 movsbl 0x120f50,%eax /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 108396: 0d 00 54 78 54 or $0x54785400,%eax 10839b: 50 push %eax 10839c: 89 55 e0 mov %edx,-0x20(%ebp) 10839f: e8 a0 1f 00 00 call 10a344 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 1083a4: 83 c4 20 add $0x20,%esp 1083a7: 85 c0 test %eax,%eax 1083a9: 8b 55 e0 mov -0x20(%ebp),%edx 1083ac: 0f 85 82 01 00 00 jne 108534 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 1083b2: 57 push %edi 1083b3: 57 push %edi 1083b4: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 1083ba: 50 push %eax 1083bb: 6a 00 push $0x0 1083bd: 68 00 05 00 00 push $0x500 1083c2: 68 00 04 00 00 push $0x400 1083c7: 6a 09 push $0x9 rtems_build_name ('R', 'x', 'T', c), 1083c9: 0f be 05 50 0f 12 00 movsbl 0x120f50,%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 ( 1083d0: 0d 00 54 78 52 or $0x52785400,%eax 1083d5: 50 push %eax 1083d6: 89 55 e0 mov %edx,-0x20(%ebp) 1083d9: e8 66 1f 00 00 call 10a344 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 1083de: 83 c4 20 add $0x20,%esp 1083e1: 85 c0 test %eax,%eax 1083e3: 8b 55 e0 mov -0x20(%ebp),%edx 1083e6: 0f 85 48 01 00 00 jne 108534 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 1083ec: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 1083f3: 74 09 je 1083fe 1083f5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 1083fc: 75 30 jne 10842e (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 1083fe: 83 ec 0c sub $0xc,%esp 108401: 8d 43 68 lea 0x68(%ebx),%eax 108404: 50 push %eax 108405: 6a 00 push $0x0 108407: 6a 24 push $0x24 108409: 6a 00 push $0x0 rtems_build_name ('T', 'R', 'r', c), 10840b: 0f be 05 50 0f 12 00 movsbl 0x120f50,%eax rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 108412: 0d 00 72 52 54 or $0x54527200,%eax 108417: 50 push %eax 108418: 89 55 e0 mov %edx,-0x20(%ebp) 10841b: e8 80 1b 00 00 call 109fa0 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 108420: 83 c4 20 add $0x20,%esp 108423: 85 c0 test %eax,%eax 108425: 8b 55 e0 mov -0x20(%ebp),%edx 108428: 0f 85 06 01 00 00 jne 108534 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 10842e: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 108435: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 10843c: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx) tty->termios.c_lflag = 108443: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 10844a: c6 43 41 03 movb $0x3,0x41(%ebx) tty->termios.c_cc[VQUIT] = '\034'; 10844e: c6 43 42 1c movb $0x1c,0x42(%ebx) tty->termios.c_cc[VERASE] = '\177'; 108452: c6 43 43 7f movb $0x7f,0x43(%ebx) tty->termios.c_cc[VKILL] = '\025'; 108456: c6 43 44 15 movb $0x15,0x44(%ebx) tty->termios.c_cc[VEOF] = '\004'; 10845a: c6 43 45 04 movb $0x4,0x45(%ebx) tty->termios.c_cc[VEOL] = '\000'; 10845e: c6 43 4c 00 movb $0x0,0x4c(%ebx) tty->termios.c_cc[VEOL2] = '\000'; 108462: c6 43 51 00 movb $0x0,0x51(%ebx) tty->termios.c_cc[VSTART] = '\021'; 108466: c6 43 49 11 movb $0x11,0x49(%ebx) tty->termios.c_cc[VSTOP] = '\023'; 10846a: c6 43 4a 13 movb $0x13,0x4a(%ebx) tty->termios.c_cc[VSUSP] = '\032'; 10846e: c6 43 4b 1a movb $0x1a,0x4b(%ebx) tty->termios.c_cc[VREPRINT] = '\022'; 108472: c6 43 4d 12 movb $0x12,0x4d(%ebx) tty->termios.c_cc[VDISCARD] = '\017'; 108476: c6 43 4e 0f movb $0xf,0x4e(%ebx) tty->termios.c_cc[VWERASE] = '\027'; 10847a: c6 43 4f 17 movb $0x17,0x4f(%ebx) tty->termios.c_cc[VLNEXT] = '\026'; 10847e: c6 43 50 16 movb $0x16,0x50(%ebx) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 108482: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx) 108489: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 10848c: 8b 43 64 mov 0x64(%ebx),%eax 10848f: d1 e8 shr %eax 108491: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) tty->highwater = tty->rawInBuf.Size * 3/4; 108497: 8b 43 64 mov 0x64(%ebx),%eax 10849a: 8d 04 40 lea (%eax,%eax,2),%eax 10849d: c1 e8 02 shr $0x2,%eax 1084a0: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Bump name characer */ if (c++ == 'z') 1084a6: a0 50 0f 12 00 mov 0x120f50,%al 1084ab: 8d 48 01 lea 0x1(%eax),%ecx 1084ae: 88 0d 50 0f 12 00 mov %cl,0x120f50 1084b4: 3c 7a cmp $0x7a,%al 1084b6: 75 07 jne 1084bf <== ALWAYS TAKEN c = 'a'; 1084b8: c6 05 50 0f 12 00 61 movb $0x61,0x120f50 <== NOT EXECUTED } args->iop->data1 = tty; 1084bf: 8b 4d 10 mov 0x10(%ebp),%ecx 1084c2: 8b 01 mov (%ecx),%eax 1084c4: 89 50 34 mov %edx,0x34(%eax) if (!tty->refcount++) { 1084c7: 8b 42 08 mov 0x8(%edx),%eax 1084ca: 8d 48 01 lea 0x1(%eax),%ecx 1084cd: 89 4a 08 mov %ecx,0x8(%edx) 1084d0: 85 c0 test %eax,%eax 1084d2: 75 69 jne 10853d if (tty->device.firstOpen) 1084d4: 8b 82 98 00 00 00 mov 0x98(%edx),%eax 1084da: 85 c0 test %eax,%eax 1084dc: 74 15 je 1084f3 (*tty->device.firstOpen)(major, minor, arg); 1084de: 56 push %esi 1084df: ff 75 10 pushl 0x10(%ebp) 1084e2: ff 75 0c pushl 0xc(%ebp) 1084e5: ff 75 08 pushl 0x8(%ebp) 1084e8: 89 55 e0 mov %edx,-0x20(%ebp) 1084eb: ff d0 call *%eax 1084ed: 83 c4 10 add $0x10,%esp 1084f0: 8b 55 e0 mov -0x20(%ebp),%edx /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 1084f3: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) 1084fa: 75 41 jne 10853d sc = rtems_task_start( 1084fc: 53 push %ebx 1084fd: 52 push %edx 1084fe: 68 0f 96 10 00 push $0x10960f 108503: ff b2 c4 00 00 00 pushl 0xc4(%edx) 108509: 89 55 e0 mov %edx,-0x20(%ebp) 10850c: e8 a7 20 00 00 call 10a5b8 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 108511: 83 c4 10 add $0x10,%esp 108514: 85 c0 test %eax,%eax 108516: 8b 55 e0 mov -0x20(%ebp),%edx 108519: 75 19 jne 108534 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( 10851b: 51 push %ecx 10851c: 52 push %edx 10851d: 68 41 98 10 00 push $0x109841 108522: ff b2 c8 00 00 00 pushl 0xc8(%edx) 108528: e8 8b 20 00 00 call 10a5b8 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10852d: 83 c4 10 add $0x10,%esp 108530: 85 c0 test %eax,%eax 108532: 74 09 je 10853d <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108534: 83 ec 0c sub $0xc,%esp 108537: 50 push %eax 108538: e8 4b 22 00 00 call 10a788 } } rtems_semaphore_release (rtems_termios_ttyMutex); 10853d: 83 ec 0c sub $0xc,%esp 108540: ff 35 5c 30 12 00 pushl 0x12305c 108546: e8 69 1d 00 00 call 10a2b4 return RTEMS_SUCCESSFUL; 10854b: 83 c4 10 add $0x10,%esp } 10854e: 8b 45 e4 mov -0x1c(%ebp),%eax 108551: 8d 65 f4 lea -0xc(%ebp),%esp 108554: 5b pop %ebx 108555: 5e pop %esi 108556: 5f pop %edi 108557: c9 leave 108558: c3 ret static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 108559: 52 push %edx 10855a: 52 push %edx 10855b: 68 e8 00 00 00 push $0xe8 108560: 6a 01 push $0x1 108562: e8 c1 eb ff ff call 107128 108567: 89 c2 mov %eax,%edx 108569: 89 c3 mov %eax,%ebx if (tty == NULL) { 10856b: 83 c4 10 add $0x10,%esp 10856e: 85 c0 test %eax,%eax 108570: 0f 85 33 fc ff ff jne 1081a9 <== ALWAYS TAKEN 108576: e9 29 fc ff ff jmp 1081a4 <== NOT EXECUTED =============================================================================== 00108a63 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 108a63: 55 push %ebp 108a64: 89 e5 mov %esp,%ebp 108a66: 57 push %edi 108a67: 56 push %esi 108a68: 53 push %ebx 108a69: 83 ec 3c sub $0x3c,%esp 108a6c: 8b 45 08 mov 0x8(%ebp),%eax 108a6f: 8b 75 0c mov 0xc(%ebp),%esi 108a72: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 108a75: 89 c7 mov %eax,%edi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 108a77: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 108a7e: 75 1b jne 108a9b (*tty->device.write)(tty->minor, (void *)buf, len); 108a80: 89 75 10 mov %esi,0x10(%ebp) 108a83: 89 45 0c mov %eax,0xc(%ebp) 108a86: 8b 43 10 mov 0x10(%ebx),%eax 108a89: 89 45 08 mov %eax,0x8(%ebp) 108a8c: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108a92: 8d 65 f4 lea -0xc(%ebp),%esp 108a95: 5b pop %ebx 108a96: 5e pop %esi 108a97: 5f pop %edi 108a98: 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); 108a99: ff e0 jmp *%eax return; } newHead = tty->rawOutBuf.Head; 108a9b: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 108aa1: 89 45 e4 mov %eax,-0x1c(%ebp) while (len) { 108aa4: e9 ca 00 00 00 jmp 108b73 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 108aa9: 8b 45 e4 mov -0x1c(%ebp),%eax 108aac: 40 inc %eax 108aad: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 108ab3: 31 d2 xor %edx,%edx 108ab5: f7 f1 div %ecx 108ab7: 89 55 c4 mov %edx,-0x3c(%ebp) 108aba: 89 55 e4 mov %edx,-0x1c(%ebp) rtems_interrupt_disable (level); 108abd: 9c pushf 108abe: fa cli 108abf: 8f 45 d4 popl -0x2c(%ebp) 108ac2: 8b 55 d4 mov -0x2c(%ebp),%edx 108ac5: 8b 4d c4 mov -0x3c(%ebp),%ecx while (newHead == tty->rawOutBuf.Tail) { 108ac8: eb 35 jmp 108aff tty->rawOutBufState = rob_wait; 108aca: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 108ad1: 00 00 00 rtems_interrupt_enable (level); 108ad4: 52 push %edx 108ad5: 9d popf sc = rtems_semaphore_obtain( 108ad6: 50 push %eax 108ad7: 6a 00 push $0x0 108ad9: 6a 00 push $0x0 108adb: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 108ae1: 89 4d e0 mov %ecx,-0x20(%ebp) 108ae4: e8 df 16 00 00 call 10a1c8 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 108ae9: 83 c4 10 add $0x10,%esp 108aec: 85 c0 test %eax,%eax 108aee: 8b 4d e0 mov -0x20(%ebp),%ecx 108af1: 74 09 je 108afc <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 108af3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108af6: 50 push %eax <== NOT EXECUTED 108af7: e8 8c 1c 00 00 call 10a788 <== NOT EXECUTED rtems_interrupt_disable (level); 108afc: 9c pushf 108afd: fa cli 108afe: 5a pop %edx * 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) { 108aff: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 108b05: 39 c1 cmp %eax,%ecx 108b07: 74 c1 je 108aca 108b09: 89 55 d4 mov %edx,-0x2c(%ebp) 108b0c: 89 4d c4 mov %ecx,-0x3c(%ebp) 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++; 108b0f: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx 108b15: 8a 07 mov (%edi),%al 108b17: 8b 53 7c mov 0x7c(%ebx),%edx 108b1a: 88 04 0a mov %al,(%edx,%ecx,1) 108b1d: 47 inc %edi tty->rawOutBuf.Head = newHead; 108b1e: 8b 4d c4 mov -0x3c(%ebp),%ecx 108b21: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 108b27: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 108b2e: 75 3e jne 108b6e /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 108b30: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 108b36: a8 10 test $0x10,%al 108b38: 75 1b jne 108b55 <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 108b3a: 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, 108b40: 51 push %ecx 108b41: 6a 01 push $0x1 108b43: 03 43 7c add 0x7c(%ebx),%eax 108b46: 50 push %eax 108b47: ff 73 10 pushl 0x10(%ebx) 108b4a: ff 93 a4 00 00 00 call *0xa4(%ebx) 108b50: 83 c4 10 add $0x10,%esp 108b53: eb 0f jmp 108b64 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 108b55: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 108b5b: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 108b5e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 108b64: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 108b6b: 00 00 00 } rtems_interrupt_enable (level); 108b6e: ff 75 d4 pushl -0x2c(%ebp) 108b71: 9d popf len--; 108b72: 4e dec %esi if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 108b73: 85 f6 test %esi,%esi 108b75: 0f 85 2e ff ff ff jne 108aa9 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 108b7b: 8d 65 f4 lea -0xc(%ebp),%esp 108b7e: 5b pop %ebx 108b7f: 5e pop %esi 108b80: 5f pop %edi 108b81: c9 leave 108b82: c3 ret =============================================================================== 0010908a : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10908a: 55 push %ebp 10908b: 89 e5 mov %esp,%ebp 10908d: 57 push %edi 10908e: 56 push %esi 10908f: 53 push %ebx 109090: 83 ec 40 sub $0x40,%esp 109093: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 109096: 8b 06 mov (%esi),%eax 109098: 8b 58 34 mov 0x34(%eax),%ebx uint32_t count = args->count; 10909b: 8b 46 10 mov 0x10(%esi),%eax 10909e: 89 45 e4 mov %eax,-0x1c(%ebp) char *buffer = args->buffer; 1090a1: 8b 46 0c mov 0xc(%esi),%eax 1090a4: 89 45 e0 mov %eax,-0x20(%ebp) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1090a7: 6a 00 push $0x0 1090a9: 6a 00 push $0x0 1090ab: ff 73 14 pushl 0x14(%ebx) 1090ae: e8 15 11 00 00 call 10a1c8 1090b3: 89 45 dc mov %eax,-0x24(%ebp) if (sc != RTEMS_SUCCESSFUL) 1090b6: 83 c4 10 add $0x10,%esp 1090b9: 85 c0 test %eax,%eax 1090bb: 0f 85 9d 02 00 00 jne 10935e <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 1090c1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 1090c7: c1 e0 05 shl $0x5,%eax 1090ca: 8b 80 20 2d 12 00 mov 0x122d20(%eax),%eax 1090d0: 85 c0 test %eax,%eax 1090d2: 74 19 je 1090ed sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 1090d4: 57 push %edi 1090d5: 57 push %edi 1090d6: 56 push %esi 1090d7: 53 push %ebx 1090d8: ff d0 call *%eax 1090da: 89 45 dc mov %eax,-0x24(%ebp) tty->tty_rcvwakeup = 0; 1090dd: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 1090e4: 00 00 00 rtems_semaphore_release (tty->isem); 1090e7: 59 pop %ecx 1090e8: e9 66 02 00 00 jmp 109353 return sc; } if (tty->cindex == tty->ccount) { 1090ed: 8b 43 20 mov 0x20(%ebx),%eax 1090f0: 39 43 24 cmp %eax,0x24(%ebx) 1090f3: 0f 85 2d 02 00 00 jne 109326 <== NEVER TAKEN tty->cindex = tty->ccount = 0; 1090f9: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) 109100: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) tty->read_start_column = tty->column; 109107: 8b 43 28 mov 0x28(%ebx),%eax 10910a: 89 43 2c mov %eax,0x2c(%ebx) if (tty->device.pollRead != NULL && 10910d: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 109114: 0f 84 c4 00 00 00 je 1091de 10911a: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx) 109121: 0f 85 b7 00 00 00 jne 1091de static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 109127: f6 43 3c 02 testb $0x2,0x3c(%ebx) 10912b: 74 35 je 109162 <== NEVER TAKEN for (;;) { n = (*tty->device.pollRead)(tty->minor); 10912d: 83 ec 0c sub $0xc,%esp 109130: ff 73 10 pushl 0x10(%ebx) 109133: ff 93 a0 00 00 00 call *0xa0(%ebx) if (n < 0) { 109139: 83 c4 10 add $0x10,%esp 10913c: 85 c0 test %eax,%eax 10913e: 79 0f jns 10914f rtems_task_wake_after (1); 109140: 83 ec 0c sub $0xc,%esp 109143: 6a 01 push $0x1 109145: e8 d2 14 00 00 call 10a61c 10914a: 83 c4 10 add $0x10,%esp 10914d: eb de jmp 10912d } else { if (siproc (n, tty)) 10914f: 0f b6 c0 movzbl %al,%eax 109152: 89 da mov %ebx,%edx 109154: e8 38 fe ff ff call 108f91 109159: 85 c0 test %eax,%eax 10915b: 74 d0 je 10912d 10915d: e9 c4 01 00 00 jmp 109326 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 109162: e8 35 0a 00 00 call 109b9c <== NOT EXECUTED 109167: 89 c7 mov %eax,%edi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 109169: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10916c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10916f: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 109175: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109178: 85 c0 test %eax,%eax <== NOT EXECUTED 10917a: 79 3d jns 1091b9 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 10917c: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 109180: 74 0e je 109190 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 109182: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109186: 74 22 je 1091aa <== NOT EXECUTED 109188: 83 7b 20 00 cmpl $0x0,0x20(%ebx) <== NOT EXECUTED 10918c: 74 1c je 1091aa <== NOT EXECUTED 10918e: eb 0a jmp 10919a <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 109190: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 109194: 0f 84 8c 01 00 00 je 109326 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10919a: e8 fd 09 00 00 call 109b9c <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 10919f: 29 f8 sub %edi,%eax <== NOT EXECUTED 1091a1: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 1091a4: 0f 87 7c 01 00 00 ja 109326 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 1091aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1091ad: 6a 01 push $0x1 <== NOT EXECUTED 1091af: e8 68 14 00 00 call 10a61c <== NOT EXECUTED 1091b4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1091b7: eb b0 jmp 109169 <== NOT EXECUTED } else { siproc (n, tty); 1091b9: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 1091bc: 89 da mov %ebx,%edx <== NOT EXECUTED 1091be: e8 ce fd ff ff call 108f91 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1091c3: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 1091c6: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 1091c9: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 1091cc: 0f 8d 54 01 00 00 jge 109326 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 1091d2: 84 c0 test %al,%al <== NOT EXECUTED 1091d4: 74 93 je 109169 <== NOT EXECUTED 1091d6: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 1091da: 74 8d je 109169 <== NOT EXECUTED 1091dc: eb 84 jmp 109162 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 1091de: 8b 53 74 mov 0x74(%ebx),%edx rtems_status_code sc; int wait = (int)1; 1091e1: bf 01 00 00 00 mov $0x1,%edi 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)( 1091e6: 8d 43 49 lea 0x49(%ebx),%eax 1091e9: 89 45 d0 mov %eax,-0x30(%ebp) 1091ec: e9 e6 00 00 00 jmp 1092d7 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 1091f1: 8b 43 5c mov 0x5c(%ebx),%eax 1091f4: 8b 4b 64 mov 0x64(%ebx),%ecx 1091f7: 40 inc %eax 1091f8: 31 d2 xor %edx,%edx 1091fa: f7 f1 div %ecx c = tty->rawInBuf.theBuf[newHead]; 1091fc: 8b 43 58 mov 0x58(%ebx),%eax 1091ff: 8a 04 10 mov (%eax,%edx,1),%al 109202: 88 45 db mov %al,-0x25(%ebp) tty->rawInBuf.Head = newHead; 109205: 89 53 5c mov %edx,0x5c(%ebx) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 109208: 8b 43 60 mov 0x60(%ebx),%eax 10920b: 89 45 c4 mov %eax,-0x3c(%ebp) 10920e: 8b 4b 64 mov 0x64(%ebx),%ecx % tty->rawInBuf.Size) 109211: 8b 43 64 mov 0x64(%ebx),%eax 109214: 89 45 d4 mov %eax,-0x2c(%ebp) 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) 109217: 8b 45 c4 mov -0x3c(%ebp),%eax 10921a: 8d 04 01 lea (%ecx,%eax,1),%eax 10921d: 29 d0 sub %edx,%eax % tty->rawInBuf.Size) 10921f: 31 d2 xor %edx,%edx 109221: f7 75 d4 divl -0x2c(%ebp) 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) 109224: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx 10922a: 73 74 jae 1092a0 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10922c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109232: 83 e0 fe and $0xfffffffe,%eax 109235: 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)) 10923b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109241: 25 02 02 00 00 and $0x202,%eax 109246: 3d 02 02 00 00 cmp $0x202,%eax 10924b: 75 24 jne 109271 <== ALWAYS TAKEN == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 10924d: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED 109254: 74 0a je 109260 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 109256: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10925c: a8 20 test $0x20,%al <== NOT EXECUTED 10925e: 74 11 je 109271 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 109260: 52 push %edx <== NOT EXECUTED 109261: 6a 01 push $0x1 <== NOT EXECUTED 109263: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109266: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109269: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10926f: eb 2c jmp 10929d <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 109271: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109277: f6 c4 01 test $0x1,%ah 10927a: 74 24 je 1092a0 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; 10927c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109282: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 109285: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10928b: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 109291: 85 c0 test %eax,%eax <== NOT EXECUTED 109293: 74 0b je 1092a0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 109295: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109298: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10929b: ff d0 call *%eax <== NOT EXECUTED 10929d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 1092a0: f6 43 3c 02 testb $0x2,0x3c(%ebx) 1092a4: 74 12 je 1092b8 <== NEVER TAKEN if (siproc (c, tty)) 1092a6: 0f b6 45 db movzbl -0x25(%ebp),%eax 1092aa: 89 da mov %ebx,%edx 1092ac: e8 e0 fc ff ff call 108f91 wait = 0; 1092b1: 85 c0 test %eax,%eax 1092b3: 0f 94 c0 sete %al 1092b6: eb 15 jmp 1092cd } else { siproc (c, tty); 1092b8: 0f b6 45 db movzbl -0x25(%ebp),%eax <== NOT EXECUTED 1092bc: 89 da mov %ebx,%edx <== NOT EXECUTED 1092be: e8 ce fc ff ff call 108f91 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 1092c3: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED wait = 0; 1092c7: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 1092ca: 0f 9c c0 setl %al <== NOT EXECUTED 1092cd: 0f b6 c0 movzbl %al,%eax 1092d0: f7 d8 neg %eax 1092d2: 21 c7 and %eax,%edi } timeout = tty->rawInBufSemaphoreTimeout; 1092d4: 8b 53 70 mov 0x70(%ebx),%edx while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1092d7: 8b 4b 5c mov 0x5c(%ebx),%ecx 1092da: 8b 43 60 mov 0x60(%ebx),%eax 1092dd: 39 c1 cmp %eax,%ecx 1092df: 74 0f je 1092f0 (tty->ccount < (CBUFSIZE-1))) { 1092e1: a1 44 0f 12 00 mov 0x120f44,%eax 1092e6: 48 dec %eax while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 1092e7: 39 43 20 cmp %eax,0x20(%ebx) 1092ea: 0f 8c 01 ff ff ff jl 1091f1 <== ALWAYS TAKEN } /* * Wait for characters */ if ( wait ) { 1092f0: 85 ff test %edi,%edi 1092f2: 74 32 je 109326 sc = rtems_semaphore_obtain( 1092f4: 50 push %eax 1092f5: 52 push %edx 1092f6: ff 73 6c pushl 0x6c(%ebx) 1092f9: ff 73 68 pushl 0x68(%ebx) 1092fc: 89 55 cc mov %edx,-0x34(%ebp) 1092ff: e8 c4 0e 00 00 call 10a1c8 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 109304: 83 c4 10 add $0x10,%esp 109307: 85 c0 test %eax,%eax 109309: 8b 55 cc mov -0x34(%ebp),%edx 10930c: 74 c9 je 1092d7 <== ALWAYS TAKEN 10930e: eb 16 jmp 109326 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 109310: 8b 7b 1c mov 0x1c(%ebx),%edi 109313: 8b 45 e4 mov -0x1c(%ebp),%eax 109316: 8a 04 07 mov (%edi,%eax,1),%al 109319: 88 01 mov %al,(%ecx) 10931b: 41 inc %ecx 10931c: 8b 45 e4 mov -0x1c(%ebp),%eax 10931f: 40 inc %eax 109320: 89 43 24 mov %eax,0x24(%ebx) count--; 109323: 4a dec %edx 109324: eb 06 jmp 10932c 109326: 8b 55 e4 mov -0x1c(%ebp),%edx 109329: 8b 4d e0 mov -0x20(%ebp),%ecx sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10932c: 85 d2 test %edx,%edx 10932e: 74 0b je 10933b <== NEVER TAKEN 109330: 8b 43 24 mov 0x24(%ebx),%eax 109333: 89 45 e4 mov %eax,-0x1c(%ebp) 109336: 3b 43 20 cmp 0x20(%ebx),%eax 109339: 7c d5 jl 109310 10933b: 89 55 e4 mov %edx,-0x1c(%ebp) *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10933e: 8b 46 10 mov 0x10(%esi),%eax 109341: 29 d0 sub %edx,%eax 109343: 89 46 18 mov %eax,0x18(%esi) tty->tty_rcvwakeup = 0; 109346: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10934d: 00 00 00 rtems_semaphore_release (tty->isem); 109350: 83 ec 0c sub $0xc,%esp 109353: ff 73 14 pushl 0x14(%ebx) 109356: e8 59 0f 00 00 call 10a2b4 return sc; 10935b: 83 c4 10 add $0x10,%esp } 10935e: 8b 45 dc mov -0x24(%ebp),%eax 109361: 8d 65 f4 lea -0xc(%ebp),%esp 109364: 5b pop %ebx 109365: 5e pop %esi 109366: 5f pop %edi 109367: c9 leave 109368: c3 ret =============================================================================== 00109673 : * 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) { 109673: 55 push %ebp 109674: 89 e5 mov %esp,%ebp 109676: 57 push %edi 109677: 56 push %esi 109678: 53 push %ebx 109679: 83 ec 0c sub $0xc,%esp 10967c: 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)) 10967f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109685: 25 03 04 00 00 and $0x403,%eax 10968a: 3d 01 04 00 00 cmp $0x401,%eax 10968f: 75 2c jne 1096bd <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 109691: 57 push %edi <== NOT EXECUTED 109692: 6a 01 push $0x1 <== NOT EXECUTED 109694: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 109697: 50 push %eax <== NOT EXECUTED 109698: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10969b: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 1096a1: 9c pushf <== NOT EXECUTED 1096a2: fa cli <== NOT EXECUTED 1096a3: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1096a4: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1096aa: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1096b0: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1096b3: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1096b9: 52 push %edx <== NOT EXECUTED 1096ba: 9d popf <== NOT EXECUTED 1096bb: eb 38 jmp 1096f5 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 1096bd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1096c3: 83 e0 03 and $0x3,%eax 1096c6: 83 f8 02 cmp $0x2,%eax 1096c9: 75 37 jne 109702 <== ALWAYS TAKEN * 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); 1096cb: 56 push %esi <== NOT EXECUTED 1096cc: 6a 01 push $0x1 <== NOT EXECUTED 1096ce: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 1096d1: 50 push %eax <== NOT EXECUTED 1096d2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1096d5: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED rtems_interrupt_disable(level); 1096db: 9c pushf <== NOT EXECUTED 1096dc: fa cli <== NOT EXECUTED 1096dd: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1096de: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1096e4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1096ea: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 1096ed: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1096f3: 52 push %edx <== NOT EXECUTED 1096f4: 9d popf <== NOT EXECUTED 1096f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend = 1; 1096f8: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 1096fd: e9 35 01 00 00 jmp 109837 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 109702: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109708: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10970e: 39 c2 cmp %eax,%edx 109710: 75 25 jne 109737 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 109712: 31 f6 xor %esi,%esi } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 109714: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10971b: 0f 85 16 01 00 00 jne 109837 <== ALWAYS TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109721: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109724: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 10972a: e8 85 0b 00 00 call 10a2b4 <== NOT EXECUTED 10972f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109732: e9 00 01 00 00 jmp 109837 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 109737: 9c pushf 109738: fa cli 109739: 58 pop %eax len = tty->t_dqlen; 10973a: 8b bb 90 00 00 00 mov 0x90(%ebx),%edi tty->t_dqlen = 0; 109740: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 109747: 00 00 00 rtems_interrupt_enable(level); 10974a: 50 push %eax 10974b: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 10974c: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 109752: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109758: 8d 04 07 lea (%edi,%eax,1),%eax 10975b: 31 d2 xor %edx,%edx 10975d: f7 f1 div %ecx 10975f: 89 d7 mov %edx,%edi tty->rawOutBuf.Tail = newTail; 109761: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 109767: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 10976e: 75 11 jne 109781 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109770: 83 ec 0c sub $0xc,%esp 109773: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109779: e8 36 0b 00 00 call 10a2b4 10977e: 83 c4 10 add $0x10,%esp } if (newTail == tty->rawOutBuf.Head) { 109781: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109787: 39 c7 cmp %eax,%edi 109789: 75 2a jne 1097b5 /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10978b: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109792: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 109795: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; 10979b: 31 f6 xor %esi,%esi /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 10979d: 85 c0 test %eax,%eax 10979f: 0f 84 8c 00 00 00 je 109831 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 1097a5: 51 push %ecx <== NOT EXECUTED 1097a6: 51 push %ecx <== NOT EXECUTED 1097a7: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 1097ad: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 1097b0: 52 push %edx <== NOT EXECUTED 1097b1: ff d0 call *%eax <== NOT EXECUTED 1097b3: eb 79 jmp 10982e <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 1097b5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1097bb: 25 10 02 00 00 and $0x210,%eax 1097c0: 3d 10 02 00 00 cmp $0x210,%eax 1097c5: 75 22 jne 1097e9 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 1097c7: 9c pushf <== NOT EXECUTED 1097c8: fa cli <== NOT EXECUTED 1097c9: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 1097ca: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1097d0: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1097d3: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1097d9: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1097e0: 00 00 00 rtems_interrupt_enable(level); 1097e3: 52 push %edx <== NOT EXECUTED 1097e4: 9d popf <== NOT EXECUTED nToSend = 0; 1097e5: 31 f6 xor %esi,%esi <== NOT EXECUTED 1097e7: eb 48 jmp 109831 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1097e9: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1097ef: 39 c7 cmp %eax,%edi 1097f1: 76 08 jbe 1097fb nToSend = tty->rawOutBuf.Size - newTail; 1097f3: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi 1097f9: eb 06 jmp 109801 else nToSend = tty->rawOutBuf.Head - newTail; 1097fb: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi 109801: 29 fe sub %edi,%esi /* 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)) { 109803: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109809: f6 c4 06 test $0x6,%ah 10980c: 74 05 je 109813 nToSend = 1; 10980e: be 01 00 00 00 mov $0x1,%esi } tty->rawOutBufState = rob_busy; /*apm*/ 109813: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 10981a: 00 00 00 (*tty->device.write)( 10981d: 52 push %edx 10981e: 56 push %esi 10981f: 8b 43 7c mov 0x7c(%ebx),%eax 109822: 01 f8 add %edi,%eax 109824: 50 push %eax 109825: ff 73 10 pushl 0x10(%ebx) 109828: ff 93 a4 00 00 00 call *0xa4(%ebx) 10982e: 83 c4 10 add $0x10,%esp tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 109831: 89 bb 84 00 00 00 mov %edi,0x84(%ebx) } return nToSend; } 109837: 89 f0 mov %esi,%eax 109839: 8d 65 f4 lea -0xc(%ebp),%esp 10983c: 5b pop %ebx 10983d: 5e pop %esi 10983e: 5f pop %edi 10983f: c9 leave 109840: c3 ret =============================================================================== 0010960f : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10960f: 55 push %ebp 109610: 89 e5 mov %esp,%ebp 109612: 57 push %edi 109613: 56 push %esi 109614: 53 push %ebx 109615: 83 ec 1c sub $0x1c,%esp 109618: 8b 5d 08 mov 0x8(%ebp),%ebx while (1) { /* * wait for rtems event */ rtems_event_receive( 10961b: 8d 7d e0 lea -0x20(%ebp),%edi if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 10961e: 8d 75 e7 lea -0x19(%ebp),%esi while (1) { /* * wait for rtems event */ rtems_event_receive( 109621: 57 push %edi 109622: 6a 00 push $0x0 109624: 6a 02 push $0x2 109626: 6a 03 push $0x3 109628: e8 d3 05 00 00 call 109c00 (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) { 10962d: 83 c4 10 add $0x10,%esp 109630: f6 45 e0 01 testb $0x1,-0x20(%ebp) 109634: 74 17 je 10964d <== ALWAYS TAKEN tty->rxTaskId = 0; 109636: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10963d: 00 00 00 rtems_task_delete(RTEMS_SELF); 109640: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109643: 6a 00 push $0x0 <== NOT EXECUTED 109645: e8 32 0e 00 00 call 10a47c <== NOT EXECUTED 10964a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); 10964d: 83 ec 0c sub $0xc,%esp 109650: ff 73 10 pushl 0x10(%ebx) 109653: ff 93 a0 00 00 00 call *0xa0(%ebx) if (c != EOF) { 109659: 83 c4 10 add $0x10,%esp 10965c: 83 f8 ff cmp $0xffffffff,%eax 10965f: 74 c0 je 109621 /* * pollRead did call enqueue on its own */ c_buf = c; 109661: 88 45 e7 mov %al,-0x19(%ebp) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); 109664: 50 push %eax 109665: 6a 01 push $0x1 109667: 56 push %esi 109668: 53 push %ebx 109669: e8 16 fd ff ff call 109384 10966e: 83 c4 10 add $0x10,%esp 109671: eb ae jmp 109621 =============================================================================== 0010b0f4 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 10b0f4: 55 push %ebp <== NOT EXECUTED 10b0f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b0f7: 53 push %ebx <== NOT EXECUTED 10b0f8: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10b0fb: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 10b0fe: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10b101: e8 c6 e6 ff ff call 1097cc <== NOT EXECUTED 10b106: 89 c1 mov %eax,%ecx <== NOT EXECUTED if ( cflags_baud == -1 ) 10b108: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 10b10b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED ) { int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); if ( cflags_baud == -1 ) 10b10e: 83 f9 ff cmp $0xffffffff,%ecx <== NOT EXECUTED 10b111: 74 10 je 10b123 <== NOT EXECUTED return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 10b113: 8b 53 38 mov 0x38(%ebx),%edx <== NOT EXECUTED 10b116: 81 e2 f0 ef ff ff and $0xffffeff0,%edx <== NOT EXECUTED 10b11c: 09 ca or %ecx,%edx <== NOT EXECUTED 10b11e: 89 53 38 mov %edx,0x38(%ebx) <== NOT EXECUTED return 0; 10b121: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10b123: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10b126: c9 leave <== NOT EXECUTED 10b127: c3 ret <== NOT EXECUTED =============================================================================== 00109841 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 109841: 55 push %ebp 109842: 89 e5 mov %esp,%ebp 109844: 56 push %esi 109845: 53 push %ebx 109846: 83 ec 10 sub $0x10,%esp 109849: 8b 5d 08 mov 0x8(%ebp),%ebx while (1) { /* * wait for rtems event */ rtems_event_receive( 10984c: 8d 75 f4 lea -0xc(%ebp),%esi 10984f: 56 push %esi 109850: 6a 00 push $0x0 109852: 6a 02 push $0x2 109854: 6a 03 push $0x3 109856: e8 a5 03 00 00 call 109c00 (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) { 10985b: 83 c4 10 add $0x10,%esp 10985e: f6 45 f4 01 testb $0x1,-0xc(%ebp) 109862: 74 17 je 10987b <== ALWAYS TAKEN tty->txTaskId = 0; 109864: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10986b: 00 00 00 rtems_task_delete(RTEMS_SELF); 10986e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109871: 6a 00 push $0x0 <== NOT EXECUTED 109873: e8 04 0c 00 00 call 10a47c <== NOT EXECUTED 109878: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10987b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 109881: c1 e0 05 shl $0x5,%eax 109884: 8b 80 2c 2d 12 00 mov 0x122d2c(%eax),%eax 10988a: 85 c0 test %eax,%eax 10988c: 74 09 je 109897 <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); 10988e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109891: 53 push %ebx <== NOT EXECUTED 109892: ff d0 call *%eax <== NOT EXECUTED 109894: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 109897: 83 ec 0c sub $0xc,%esp 10989a: 53 push %ebx 10989b: e8 d3 fd ff ff call 109673 } 1098a0: 83 c4 10 add $0x10,%esp 1098a3: eb aa jmp 10984f =============================================================================== 00108fe3 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 108fe3: 55 push %ebp 108fe4: 89 e5 mov %esp,%ebp 108fe6: 57 push %edi 108fe7: 56 push %esi 108fe8: 53 push %ebx 108fe9: 83 ec 20 sub $0x20,%esp 108fec: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 108fef: 8b 03 mov (%ebx),%eax 108ff1: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108ff4: 6a 00 push $0x0 108ff6: 6a 00 push $0x0 108ff8: ff 76 18 pushl 0x18(%esi) 108ffb: e8 c8 11 00 00 call 10a1c8 109000: 89 c7 mov %eax,%edi if (sc != RTEMS_SUCCESSFUL) 109002: 83 c4 10 add $0x10,%esp 109005: 85 c0 test %eax,%eax 109007: 75 77 jne 109080 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 109009: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10900f: c1 e0 05 shl $0x5,%eax 109012: 8b 80 24 2d 12 00 mov 0x122d24(%eax),%eax 109018: 85 c0 test %eax,%eax 10901a: 74 0b je 109027 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10901c: 57 push %edi 10901d: 57 push %edi 10901e: 53 push %ebx 10901f: 56 push %esi 109020: ff d0 call *%eax 109022: 89 c7 mov %eax,%edi rtems_semaphore_release (tty->osem); 109024: 5b pop %ebx 109025: eb 4e jmp 109075 return sc; } if (tty->termios.c_oflag & OPOST) { 109027: f6 46 34 01 testb $0x1,0x34(%esi) 10902b: 74 2f je 10905c <== NEVER TAKEN uint32_t count = args->count; 10902d: 8b 4b 10 mov 0x10(%ebx),%ecx char *buffer = args->buffer; 109030: 8b 43 0c mov 0xc(%ebx),%eax 109033: 89 45 e4 mov %eax,-0x1c(%ebp) while (count--) 109036: eb 18 jmp 109050 oproc (*buffer++, tty); 109038: 8b 55 e4 mov -0x1c(%ebp),%edx 10903b: 0f b6 02 movzbl (%edx),%eax 10903e: 42 inc %edx 10903f: 89 55 e4 mov %edx,-0x1c(%ebp) 109042: 89 f2 mov %esi,%edx 109044: 89 4d e0 mov %ecx,-0x20(%ebp) 109047: e8 37 fb ff ff call 108b83 10904c: 8b 4d e0 mov -0x20(%ebp),%ecx 10904f: 49 dec %ecx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 109050: 85 c9 test %ecx,%ecx 109052: 75 e4 jne 109038 oproc (*buffer++, tty); args->bytes_moved = args->count; 109054: 8b 43 10 mov 0x10(%ebx),%eax 109057: 89 43 18 mov %eax,0x18(%ebx) 10905a: eb 16 jmp 109072 } else { rtems_termios_puts (args->buffer, args->count, tty); 10905c: 51 push %ecx <== NOT EXECUTED 10905d: 56 push %esi <== NOT EXECUTED 10905e: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109061: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 109064: e8 fa f9 ff ff call 108a63 <== NOT EXECUTED args->bytes_moved = args->count; 109069: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10906c: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 10906f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 109072: 83 ec 0c sub $0xc,%esp 109075: ff 76 18 pushl 0x18(%esi) 109078: e8 37 12 00 00 call 10a2b4 return sc; 10907d: 83 c4 10 add $0x10,%esp } 109080: 89 f8 mov %edi,%eax 109082: 8d 65 f4 lea -0xc(%ebp),%esp 109085: 5b pop %ebx 109086: 5e pop %esi 109087: 5f pop %edi 109088: c9 leave 109089: c3 ret =============================================================================== 00116498 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116498: 55 push %ebp 116499: 89 e5 mov %esp,%ebp 11649b: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 11649e: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1164a1: 50 push %eax 1164a2: ff 75 08 pushl 0x8(%ebp) 1164a5: 68 d8 c7 13 00 push $0x13c7d8 1164aa: e8 29 26 00 00 call 118ad8 <_Objects_Get> switch ( location ) { 1164af: 83 c4 10 add $0x10,%esp 1164b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1164b6: 75 1e jne 1164d6 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1164b8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1164bc: 74 0f je 1164cd <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1164be: 83 ec 0c sub $0xc,%esp 1164c1: 83 c0 10 add $0x10,%eax 1164c4: 50 push %eax 1164c5: e8 a2 3f 00 00 call 11a46c <_Watchdog_Remove> 1164ca: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1164cd: e8 b4 2d 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1164d2: 31 c0 xor %eax,%eax 1164d4: eb 05 jmp 1164db #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1164d6: b8 04 00 00 00 mov $0x4,%eax } 1164db: c9 leave 1164dc: c3 ret =============================================================================== 001168f8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1168f8: 55 push %ebp 1168f9: 89 e5 mov %esp,%ebp 1168fb: 57 push %edi 1168fc: 56 push %esi 1168fd: 53 push %ebx 1168fe: 83 ec 1c sub $0x1c,%esp 116901: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116904: 8b 35 18 c8 13 00 mov 0x13c818,%esi if ( !timer_server ) return RTEMS_INCORRECT_STATE; 11690a: bb 0e 00 00 00 mov $0xe,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 11690f: 85 f6 test %esi,%esi 116911: 0f 84 b1 00 00 00 je 1169c8 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 116917: b3 0b mov $0xb,%bl Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116919: 80 3d 4c c5 13 00 00 cmpb $0x0,0x13c54c 116920: 0f 84 a2 00 00 00 je 1169c8 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 116926: b3 09 mov $0x9,%bl return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 116928: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11692c: 0f 84 96 00 00 00 je 1169c8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116932: 83 ec 0c sub $0xc,%esp 116935: 57 push %edi 116936: e8 99 d6 ff ff call 113fd4 <_TOD_Validate> 11693b: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_CLOCK; 11693e: b3 14 mov $0x14,%bl return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116940: 84 c0 test %al,%al 116942: 0f 84 80 00 00 00 je 1169c8 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116948: 83 ec 0c sub $0xc,%esp 11694b: 57 push %edi 11694c: e8 1b d6 ff ff call 113f6c <_TOD_To_seconds> 116951: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116953: 83 c4 10 add $0x10,%esp 116956: 3b 05 c4 c5 13 00 cmp 0x13c5c4,%eax 11695c: 76 6a jbe 1169c8 11695e: 51 push %ecx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 11695f: 8d 45 e4 lea -0x1c(%ebp),%eax 116962: 50 push %eax 116963: ff 75 08 pushl 0x8(%ebp) 116966: 68 d8 c7 13 00 push $0x13c7d8 11696b: e8 68 21 00 00 call 118ad8 <_Objects_Get> 116970: 89 c3 mov %eax,%ebx switch ( location ) { 116972: 83 c4 10 add $0x10,%esp 116975: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116979: 75 48 jne 1169c3 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11697b: 83 ec 0c sub $0xc,%esp 11697e: 8d 40 10 lea 0x10(%eax),%eax 116981: 50 push %eax 116982: e8 e5 3a 00 00 call 11a46c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116987: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11698e: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116995: 8b 45 10 mov 0x10(%ebp),%eax 116998: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 11699b: 8b 45 08 mov 0x8(%ebp),%eax 11699e: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 1169a1: 8b 45 14 mov 0x14(%ebp),%eax 1169a4: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 1169a7: 2b 3d c4 c5 13 00 sub 0x13c5c4,%edi 1169ad: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1169b0: 58 pop %eax 1169b1: 5a pop %edx 1169b2: 53 push %ebx 1169b3: 56 push %esi 1169b4: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 1169b7: e8 ca 28 00 00 call 119286 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1169bc: 83 c4 10 add $0x10,%esp 1169bf: 31 db xor %ebx,%ebx 1169c1: eb 05 jmp 1169c8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169c3: bb 04 00 00 00 mov $0x4,%ebx } 1169c8: 89 d8 mov %ebx,%eax 1169ca: 8d 65 f4 lea -0xc(%ebp),%esp 1169cd: 5b pop %ebx 1169ce: 5e pop %esi 1169cf: 5f pop %edi 1169d0: c9 leave 1169d1: c3 ret =============================================================================== 0010b0a1 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10b0a1: 55 push %ebp 10b0a2: 89 e5 mov %esp,%ebp 10b0a4: 57 push %edi 10b0a5: 56 push %esi 10b0a6: 53 push %ebx 10b0a7: 83 ec 1c sub $0x1c,%esp 10b0aa: 89 c3 mov %eax,%ebx 10b0ac: 89 55 e4 mov %edx,-0x1c(%ebp) 10b0af: 89 4d e0 mov %ecx,-0x20(%ebp) int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 10b0b2: a9 00 00 00 20 test $0x20000000,%eax 10b0b7: 74 2c je 10b0e5 if (rtems_panic_in_progress++) 10b0b9: a1 90 91 12 00 mov 0x129190,%eax 10b0be: 8d 50 01 lea 0x1(%eax),%edx 10b0c1: 89 15 90 91 12 00 mov %edx,0x129190 10b0c7: 85 c0 test %eax,%eax 10b0c9: 74 0b je 10b0d6 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b0cb: a1 e0 92 12 00 mov 0x1292e0,%eax <== NOT EXECUTED 10b0d0: 40 inc %eax <== NOT EXECUTED 10b0d1: a3 e0 92 12 00 mov %eax,0x1292e0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; 10b0d6: 31 f6 xor %esi,%esi if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10b0d8: 83 3d 90 91 12 00 02 cmpl $0x2,0x129190 10b0df: 0f 8f da 00 00 00 jg 10b1bf <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10b0e5: 83 ec 0c sub $0xc,%esp 10b0e8: a1 60 70 12 00 mov 0x127060,%eax 10b0ed: ff 70 08 pushl 0x8(%eax) 10b0f0: e8 0b 9e 00 00 call 114f00 status = error_flag & ~RTEMS_ERROR_MASK; 10b0f5: 89 df mov %ebx,%edi 10b0f7: 81 e7 ff ff ff 8f and $0x8fffffff,%edi if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b0fd: 83 c4 10 add $0x10,%esp rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; 10b100: 31 f6 xor %esi,%esi } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10b102: 81 e3 00 00 00 40 and $0x40000000,%ebx 10b108: 74 07 je 10b111 local_errno = errno; 10b10a: e8 59 9a 00 00 call 114b68 <__errno> 10b10f: 8b 30 mov (%eax),%esi #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10b111: 53 push %ebx 10b112: ff 75 e0 pushl -0x20(%ebp) 10b115: ff 75 e4 pushl -0x1c(%ebp) 10b118: a1 60 70 12 00 mov 0x127060,%eax 10b11d: ff 70 0c pushl 0xc(%eax) 10b120: e8 57 fb 00 00 call 11ac7c 10b125: 89 c3 mov %eax,%ebx if (status) 10b127: 83 c4 10 add $0x10,%esp 10b12a: 85 ff test %edi,%edi 10b12c: 74 24 je 10b152 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10b12e: 83 ec 0c sub $0xc,%esp 10b131: 57 push %edi 10b132: e8 55 ff ff ff call 10b08c 10b137: 83 c4 0c add $0xc,%esp 10b13a: 50 push %eax 10b13b: 68 ff 2a 12 00 push $0x122aff 10b140: a1 60 70 12 00 mov 0x127060,%eax 10b145: ff 70 0c pushl 0xc(%eax) 10b148: e8 a7 a1 00 00 call 1152f4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 10b14d: 01 c3 add %eax,%ebx 10b14f: 83 c4 10 add $0x10,%esp fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 10b152: 83 fe 00 cmp $0x0,%esi 10b155: 74 40 je 10b197 if ((local_errno > 0) && *strerror(local_errno)) 10b157: 7e 25 jle 10b17e 10b159: 83 ec 0c sub $0xc,%esp 10b15c: 56 push %esi 10b15d: e8 36 a9 00 00 call 115a98 10b162: 83 c4 10 add $0x10,%esp 10b165: 80 38 00 cmpb $0x0,(%eax) 10b168: 74 14 je 10b17e <== NEVER TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10b16a: 83 ec 0c sub $0xc,%esp 10b16d: 56 push %esi 10b16e: e8 25 a9 00 00 call 115a98 10b173: 83 c4 0c add $0xc,%esp 10b176: 50 push %eax 10b177: 68 0d 2b 12 00 push $0x122b0d 10b17c: eb 07 jmp 10b185 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10b17e: 51 push %ecx 10b17f: 56 push %esi 10b180: 68 1a 2b 12 00 push $0x122b1a 10b185: a1 60 70 12 00 mov 0x127060,%eax 10b18a: ff 70 0c pushl 0xc(%eax) 10b18d: e8 62 a1 00 00 call 1152f4 10b192: 01 c3 add %eax,%ebx 10b194: 83 c4 10 add $0x10,%esp } chars_written += fprintf(stderr, "\n"); 10b197: 52 push %edx 10b198: 52 push %edx 10b199: 68 18 32 12 00 push $0x123218 10b19e: a1 60 70 12 00 mov 0x127060,%eax 10b1a3: ff 70 0c pushl 0xc(%eax) 10b1a6: e8 49 a1 00 00 call 1152f4 10b1ab: 8d 34 18 lea (%eax,%ebx,1),%esi (void) fflush(stderr); 10b1ae: 58 pop %eax 10b1af: a1 60 70 12 00 mov 0x127060,%eax 10b1b4: ff 70 0c pushl 0xc(%eax) 10b1b7: e8 44 9d 00 00 call 114f00 return chars_written; 10b1bc: 83 c4 10 add $0x10,%esp } 10b1bf: 89 f0 mov %esi,%eax 10b1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10b1c4: 5b pop %ebx 10b1c5: 5e pop %esi 10b1c6: 5f pop %edi 10b1c7: c9 leave 10b1c8: c3 ret =============================================================================== 001078e4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 1078e4: 55 push %ebp 1078e5: 89 e5 mov %esp,%ebp 1078e7: 57 push %edi 1078e8: 56 push %esi 1078e9: 53 push %ebx 1078ea: 83 ec 3c sub $0x3c,%esp 1078ed: 89 c3 mov %eax,%ebx 1078ef: 89 55 e0 mov %edx,-0x20(%ebp) int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 1078f2: 31 f6 xor %esi,%esi static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; 1078f4: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 1078fb: 31 ff xor %edi,%edi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 1078fd: 89 7d c4 mov %edi,-0x3c(%ebp) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 107900: 8b 43 04 mov 0x4(%ebx),%eax 107903: 48 dec %eax 107904: 89 43 04 mov %eax,0x4(%ebx) 107907: 85 c0 test %eax,%eax 107909: 79 15 jns 107920 <== ALWAYS TAKEN 10790b: 50 push %eax <== NOT EXECUTED 10790c: 50 push %eax <== NOT EXECUTED 10790d: 53 push %ebx <== NOT EXECUTED 10790e: ff 35 80 35 12 00 pushl 0x123580 <== NOT EXECUTED 107914: e8 6b b1 00 00 call 112a84 <__srget_r> <== NOT EXECUTED 107919: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10791b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10791e: eb 08 jmp 107928 <== NOT EXECUTED 107920: 8b 03 mov (%ebx),%eax 107922: 0f b6 08 movzbl (%eax),%ecx 107925: 40 inc %eax 107926: 89 03 mov %eax,(%ebx) if (c == ':') 107928: 83 f9 3a cmp $0x3a,%ecx 10792b: 74 4a je 107977 break; if (sign == 0) { 10792d: 85 f6 test %esi,%esi 10792f: 75 11 jne 107942 if (c == '-') { sign = -1; limit++; continue; } sign = 1; 107931: 66 be 01 00 mov $0x1,%si for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 107935: 83 f9 2d cmp $0x2d,%ecx 107938: 75 08 jne 107942 sign = -1; limit++; 10793a: ff 45 e4 incl -0x1c(%ebp) c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 10793d: 83 ce ff or $0xffffffff,%esi limit++; continue; 107940: eb be jmp 107900 } sign = 1; } if (!isdigit(c)) 107942: a1 68 35 12 00 mov 0x123568,%eax 107947: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 10794c: 74 41 je 10798f return 0; d = c - '0'; if ((i > (limit / 10)) 10794e: 8b 45 e4 mov -0x1c(%ebp),%eax 107951: bf 0a 00 00 00 mov $0xa,%edi 107956: 31 d2 xor %edx,%edx 107958: f7 f7 div %edi 10795a: 89 55 d4 mov %edx,-0x2c(%ebp) 10795d: 39 45 c4 cmp %eax,-0x3c(%ebp) 107960: 77 2d ja 10798f <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 107962: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 107965: 39 45 c4 cmp %eax,-0x3c(%ebp) 107968: 75 04 jne 10796e <== ALWAYS TAKEN 10796a: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 10796c: 77 21 ja 10798f <== NOT EXECUTED return 0; i = i * 10 + d; 10796e: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi 107972: 8d 3c 39 lea (%ecx,%edi,1),%edi 107975: eb 86 jmp 1078fd 107977: 8b 7d c4 mov -0x3c(%ebp),%edi } if (sign == 0) return 0; 10797a: 31 c0 xor %eax,%eax if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 10797c: 85 f6 test %esi,%esi 10797e: 74 11 je 107991 <== NEVER TAKEN return 0; *val = i * sign; 107980: 0f af f7 imul %edi,%esi 107983: 8b 45 e0 mov -0x20(%ebp),%eax 107986: 89 30 mov %esi,(%eax) return 1; 107988: b8 01 00 00 00 mov $0x1,%eax 10798d: eb 02 jmp 107991 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 10798f: 31 c0 xor %eax,%eax } if (sign == 0) return 0; *val = i * sign; return 1; } 107991: 8d 65 f4 lea -0xc(%ebp),%esp 107994: 5b pop %ebx 107995: 5e pop %esi 107996: 5f pop %edi 107997: c9 leave 107998: c3 ret =============================================================================== 00107999 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 107999: 55 push %ebp 10799a: 89 e5 mov %esp,%ebp 10799c: 57 push %edi 10799d: 56 push %esi 10799e: 53 push %ebx 10799f: 83 ec 1c sub $0x1c,%esp 1079a2: 89 c3 mov %eax,%ebx 1079a4: 89 ce mov %ecx,%esi 1079a6: 8b 7d 08 mov 0x8(%ebp),%edi 1079a9: 8b 4d 0c mov 0xc(%ebp),%ecx int c; *name = *bufp; 1079ac: 8b 06 mov (%esi),%eax 1079ae: 89 02 mov %eax,(%edx) for (;;) { c = getc(fp); 1079b0: 8b 43 04 mov 0x4(%ebx),%eax 1079b3: 48 dec %eax 1079b4: 89 43 04 mov %eax,0x4(%ebx) 1079b7: 85 c0 test %eax,%eax 1079b9: 79 19 jns 1079d4 1079bb: 52 push %edx 1079bc: 52 push %edx 1079bd: 53 push %ebx 1079be: ff 35 80 35 12 00 pushl 0x123580 1079c4: 89 4d e4 mov %ecx,-0x1c(%ebp) 1079c7: e8 b8 b0 00 00 call 112a84 <__srget_r> 1079cc: 83 c4 10 add $0x10,%esp 1079cf: 8b 4d e4 mov -0x1c(%ebp),%ecx 1079d2: eb 08 jmp 1079dc 1079d4: 8b 13 mov (%ebx),%edx 1079d6: 0f b6 02 movzbl (%edx),%eax 1079d9: 42 inc %edx 1079da: 89 13 mov %edx,(%ebx) if (c == ':') { 1079dc: 83 f8 3a cmp $0x3a,%eax 1079df: 75 08 jne 1079e9 if (nlFlag) return 0; 1079e1: 30 c0 xor %al,%al *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { if (nlFlag) 1079e3: 85 c9 test %ecx,%ecx 1079e5: 74 23 je 107a0a 1079e7: eb 33 jmp 107a1c return 0; break; } if (c == '\n') { 1079e9: 83 f8 0a cmp $0xa,%eax 1079ec: 75 08 jne 1079f6 if (!nlFlag) return 0; 1079ee: 30 c0 xor %al,%al if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1079f0: 85 c9 test %ecx,%ecx 1079f2: 75 16 jne 107a0a 1079f4: eb 26 jmp 107a1c return 0; break; } if (c == EOF) 1079f6: 83 f8 ff cmp $0xffffffff,%eax 1079f9: 74 1f je 107a1a return 0; if (*nleft < 2) 1079fb: 83 3f 01 cmpl $0x1,(%edi) 1079fe: 76 1a jbe 107a1a <== NEVER TAKEN return 0; **bufp = c; 107a00: 8b 16 mov (%esi),%edx 107a02: 88 02 mov %al,(%edx) ++(*bufp); 107a04: ff 06 incl (%esi) --(*nleft); 107a06: ff 0f decl (%edi) } 107a08: eb a6 jmp 1079b0 **bufp = '\0'; 107a0a: 8b 06 mov (%esi),%eax 107a0c: c6 00 00 movb $0x0,(%eax) ++(*bufp); 107a0f: ff 06 incl (%esi) --(*nleft); 107a11: ff 0f decl (%edi) return 1; 107a13: b8 01 00 00 00 mov $0x1,%eax 107a18: eb 02 jmp 107a1c break; } if (c == EOF) return 0; if (*nleft < 2) return 0; 107a1a: 31 c0 xor %eax,%eax } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 107a1c: 8d 65 f4 lea -0xc(%ebp),%esp 107a1f: 5b pop %ebx 107a20: 5e pop %esi 107a21: 5f pop %edi 107a22: c9 leave 107a23: c3 ret =============================================================================== 00107a24 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 107a24: 55 push %ebp 107a25: 89 e5 mov %esp,%ebp 107a27: 57 push %edi 107a28: 56 push %esi 107a29: 53 push %ebx 107a2a: 83 ec 34 sub $0x34,%esp 107a2d: 89 c7 mov %eax,%edi 107a2f: 89 d3 mov %edx,%ebx 107a31: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a34: 6a 00 push $0x0 107a36: 8d 45 08 lea 0x8(%ebp),%eax 107a39: 50 push %eax 107a3a: 8d 4d d4 lea -0x2c(%ebp),%ecx 107a3d: 89 f8 mov %edi,%eax 107a3f: e8 55 ff ff ff call 107999 107a44: 83 c4 10 add $0x10,%esp || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; 107a47: 31 f6 xor %esi,%esi { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 107a49: 85 c0 test %eax,%eax 107a4b: 0f 84 c2 00 00 00 je 107b13 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 107a51: 50 push %eax 107a52: 50 push %eax 107a53: 8d 53 04 lea 0x4(%ebx),%edx 107a56: 6a 00 push $0x0 107a58: 8d 45 08 lea 0x8(%ebp),%eax 107a5b: 50 push %eax 107a5c: 8d 4d d4 lea -0x2c(%ebp),%ecx 107a5f: 89 f8 mov %edi,%eax 107a61: e8 33 ff ff ff call 107999 107a66: 83 c4 10 add $0x10,%esp 107a69: 85 c0 test %eax,%eax 107a6b: 0f 84 a2 00 00 00 je 107b13 <== NEVER TAKEN || !scanInt(fp, &grgid) 107a71: 8d 55 e4 lea -0x1c(%ebp),%edx 107a74: 89 f8 mov %edi,%eax 107a76: e8 69 fe ff ff call 1078e4 107a7b: 85 c0 test %eax,%eax 107a7d: 0f 84 90 00 00 00 je 107b13 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 107a83: 51 push %ecx 107a84: 51 push %ecx 107a85: 8d 55 e0 lea -0x20(%ebp),%edx 107a88: 6a 01 push $0x1 107a8a: 8d 45 08 lea 0x8(%ebp),%eax 107a8d: 50 push %eax 107a8e: 8d 4d d4 lea -0x2c(%ebp),%ecx 107a91: 89 f8 mov %edi,%eax 107a93: e8 01 ff ff ff call 107999 107a98: 83 c4 10 add $0x10,%esp 107a9b: 85 c0 test %eax,%eax 107a9d: 74 74 je 107b13 <== NEVER TAKEN return 0; grp->gr_gid = grgid; 107a9f: 8b 45 e4 mov -0x1c(%ebp),%eax 107aa2: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107aa6: 8b 4d e0 mov -0x20(%ebp),%ecx 107aa9: 89 ca mov %ecx,%edx 107aab: b8 01 00 00 00 mov $0x1,%eax 107ab0: 89 c6 mov %eax,%esi 107ab2: eb 0b jmp 107abf if(*cp == ',') memcount++; 107ab4: 3c 2c cmp $0x2c,%al 107ab6: 0f 94 c0 sete %al 107ab9: 0f b6 c0 movzbl %al,%eax 107abc: 01 c6 add %eax,%esi grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107abe: 42 inc %edx 107abf: 8a 02 mov (%edx),%al 107ac1: 84 c0 test %al,%al 107ac3: 75 ef jne 107ab4 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 107ac5: 8d 04 b5 13 00 00 00 lea 0x13(,%esi,4),%eax return 0; 107acc: 31 f6 xor %esi,%esi } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 107ace: 39 45 08 cmp %eax,0x8(%ebp) 107ad1: 72 40 jb 107b13 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 107ad3: 8b 45 d4 mov -0x2c(%ebp),%eax 107ad6: 83 c0 0f add $0xf,%eax 107ad9: 83 e0 f0 and $0xfffffff0,%eax 107adc: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 107adf: 89 08 mov %ecx,(%eax) } /* * Extract a single group record from the database */ static int scangr( 107ae1: 8b 45 e0 mov -0x20(%ebp),%eax 107ae4: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107ae5: ba 01 00 00 00 mov $0x1,%edx 107aea: eb 11 jmp 107afd if(*cp == ',') { 107aec: 80 f9 2c cmp $0x2c,%cl 107aef: 75 0b jne 107afc *cp = '\0'; 107af1: c6 40 ff 00 movb $0x0,-0x1(%eax) grp->gr_mem[memcount++] = cp + 1; 107af5: 8b 4b 0c mov 0xc(%ebx),%ecx 107af8: 89 04 91 mov %eax,(%ecx,%edx,4) 107afb: 42 inc %edx 107afc: 40 inc %eax /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 107afd: 8a 48 ff mov -0x1(%eax),%cl 107b00: 84 c9 test %cl,%cl 107b02: 75 e8 jne 107aec if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 107b04: 8b 43 0c mov 0xc(%ebx),%eax 107b07: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) return 1; 107b0e: be 01 00 00 00 mov $0x1,%esi } 107b13: 89 f0 mov %esi,%eax 107b15: 8d 65 f4 lea -0xc(%ebp),%esp 107b18: 5b pop %ebx 107b19: 5e pop %esi 107b1a: 5f pop %edi 107b1b: c9 leave 107b1c: c3 ret =============================================================================== 00107b1d : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 107b1d: 55 push %ebp 107b1e: 89 e5 mov %esp,%ebp 107b20: 57 push %edi 107b21: 56 push %esi 107b22: 53 push %ebx 107b23: 83 ec 34 sub $0x34,%esp 107b26: 89 c6 mov %eax,%esi 107b28: 89 d3 mov %edx,%ebx 107b2a: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b2d: 8d 7d d4 lea -0x2c(%ebp),%edi 107b30: 6a 00 push $0x0 107b32: 8d 45 08 lea 0x8(%ebp),%eax 107b35: 50 push %eax 107b36: 89 f9 mov %edi,%ecx 107b38: 89 f0 mov %esi,%eax 107b3a: e8 5a fe ff ff call 107999 107b3f: 83 c4 10 add $0x10,%esp || !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; 107b42: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 107b49: 85 c0 test %eax,%eax 107b4b: 0f 84 c4 00 00 00 je 107c15 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 107b51: 51 push %ecx 107b52: 51 push %ecx 107b53: 8d 53 04 lea 0x4(%ebx),%edx 107b56: 6a 00 push $0x0 107b58: 8d 45 08 lea 0x8(%ebp),%eax 107b5b: 50 push %eax 107b5c: 89 f9 mov %edi,%ecx 107b5e: 89 f0 mov %esi,%eax 107b60: e8 34 fe ff ff call 107999 107b65: 83 c4 10 add $0x10,%esp 107b68: 85 c0 test %eax,%eax 107b6a: 0f 84 a5 00 00 00 je 107c15 <== NEVER TAKEN || !scanInt(fp, &pwuid) 107b70: 8d 55 e4 lea -0x1c(%ebp),%edx 107b73: 89 f0 mov %esi,%eax 107b75: e8 6a fd ff ff call 1078e4 107b7a: 85 c0 test %eax,%eax 107b7c: 0f 84 93 00 00 00 je 107c15 <== NEVER TAKEN || !scanInt(fp, &pwgid) 107b82: 8d 55 e0 lea -0x20(%ebp),%edx 107b85: 89 f0 mov %esi,%eax 107b87: e8 58 fd ff ff call 1078e4 107b8c: 85 c0 test %eax,%eax 107b8e: 0f 84 81 00 00 00 je 107c15 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 107b94: 52 push %edx 107b95: 52 push %edx 107b96: 8d 53 0c lea 0xc(%ebx),%edx 107b99: 6a 00 push $0x0 107b9b: 8d 45 08 lea 0x8(%ebp),%eax 107b9e: 50 push %eax 107b9f: 89 f9 mov %edi,%ecx 107ba1: 89 f0 mov %esi,%eax 107ba3: e8 f1 fd ff ff call 107999 107ba8: 83 c4 10 add $0x10,%esp 107bab: 85 c0 test %eax,%eax 107bad: 74 66 je 107c15 <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 107baf: 50 push %eax 107bb0: 50 push %eax 107bb1: 8d 53 10 lea 0x10(%ebx),%edx 107bb4: 6a 00 push $0x0 107bb6: 8d 45 08 lea 0x8(%ebp),%eax 107bb9: 50 push %eax 107bba: 89 f9 mov %edi,%ecx 107bbc: 89 f0 mov %esi,%eax 107bbe: e8 d6 fd ff ff call 107999 107bc3: 83 c4 10 add $0x10,%esp 107bc6: 85 c0 test %eax,%eax 107bc8: 74 4b je 107c15 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 107bca: 51 push %ecx 107bcb: 51 push %ecx 107bcc: 8d 53 14 lea 0x14(%ebx),%edx 107bcf: 6a 00 push $0x0 107bd1: 8d 45 08 lea 0x8(%ebp),%eax 107bd4: 50 push %eax 107bd5: 89 f9 mov %edi,%ecx 107bd7: 89 f0 mov %esi,%eax 107bd9: e8 bb fd ff ff call 107999 107bde: 83 c4 10 add $0x10,%esp 107be1: 85 c0 test %eax,%eax 107be3: 74 30 je 107c15 <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 107be5: 52 push %edx 107be6: 52 push %edx 107be7: 8d 53 18 lea 0x18(%ebx),%edx 107bea: 6a 01 push $0x1 107bec: 8d 45 08 lea 0x8(%ebp),%eax 107bef: 50 push %eax 107bf0: 89 f9 mov %edi,%ecx 107bf2: 89 f0 mov %esi,%eax 107bf4: e8 a0 fd ff ff call 107999 107bf9: 83 c4 10 add $0x10,%esp 107bfc: 85 c0 test %eax,%eax 107bfe: 74 15 je 107c15 return 0; pwd->pw_uid = pwuid; 107c00: 8b 45 e4 mov -0x1c(%ebp),%eax 107c03: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 107c07: 8b 45 e0 mov -0x20(%ebp),%eax 107c0a: 66 89 43 0a mov %ax,0xa(%ebx) return 1; 107c0e: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) } 107c15: 8b 45 d0 mov -0x30(%ebp),%eax 107c18: 8d 65 f4 lea -0xc(%ebp),%esp 107c1b: 5b pop %ebx 107c1c: 5e pop %esi 107c1d: 5f pop %edi 107c1e: c9 leave 107c1f: c3 ret =============================================================================== 00108f91 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 108f91: 55 push %ebp 108f92: 89 e5 mov %esp,%ebp 108f94: 56 push %esi 108f95: 53 push %ebx 108f96: 89 d3 mov %edx,%ebx 108f98: 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)) { 108f9a: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) 108fa1: 74 30 je 108fd3 <== NEVER TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 108fa3: 52 push %edx 108fa4: 6a 00 push $0x0 108fa6: 6a 00 push $0x0 108fa8: ff 73 18 pushl 0x18(%ebx) 108fab: e8 18 12 00 00 call 10a1c8 i = iproc (c, tty); 108fb0: 89 f2 mov %esi,%edx 108fb2: 0f b6 c2 movzbl %dl,%eax 108fb5: 89 da mov %ebx,%edx 108fb7: e8 b5 fe ff ff call 108e71 108fbc: 89 c6 mov %eax,%esi rtems_semaphore_release (tty->osem); 108fbe: 58 pop %eax 108fbf: ff 73 18 pushl 0x18(%ebx) 108fc2: e8 ed 12 00 00 call 10a2b4 108fc7: 83 c4 10 add $0x10,%esp } else { i = iproc (c, tty); } return i; } 108fca: 89 f0 mov %esi,%eax 108fcc: 8d 65 f8 lea -0x8(%ebp),%esp 108fcf: 5b pop %ebx 108fd0: 5e pop %esi 108fd1: c9 leave 108fd2: c3 ret rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 108fd3: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108fd6: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 108fd8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 108fdb: 5b pop %ebx <== NOT EXECUTED 108fdc: 5e pop %esi <== NOT EXECUTED 108fdd: 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); 108fde: e9 8e fe ff ff jmp 108e71 <== NOT EXECUTED =============================================================================== 0010a050 : #include int statvfs (const char *path, struct statvfs *sb) { 10a050: 55 push %ebp 10a051: 89 e5 mov %esp,%ebp 10a053: 57 push %edi 10a054: 56 push %esi 10a055: 53 push %ebx 10a056: 83 ec 38 sub $0x38,%esp 10a059: 8b 55 08 mov 0x8(%ebp),%edx 10a05c: 8b 75 0c mov 0xc(%ebp),%esi * 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 ) ) 10a05f: 31 c0 xor %eax,%eax 10a061: 83 c9 ff or $0xffffffff,%ecx 10a064: 89 d7 mov %edx,%edi 10a066: f2 ae repnz scas %es:(%edi),%al 10a068: f7 d1 not %ecx 10a06a: 49 dec %ecx 10a06b: 6a 01 push $0x1 10a06d: 8d 5d d4 lea -0x2c(%ebp),%ebx 10a070: 53 push %ebx 10a071: 6a 00 push $0x0 10a073: 51 push %ecx 10a074: 52 push %edx 10a075: e8 eb ed ff ff call 108e65 10a07a: 83 c4 20 add $0x20,%esp return -1; 10a07d: 83 cf ff or $0xffffffff,%edi * 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 ) ) 10a080: 85 c0 test %eax,%eax 10a082: 75 26 jne 10a0aa <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; 10a084: 8b 55 e4 mov -0x1c(%ebp),%edx fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); 10a087: b9 0e 00 00 00 mov $0xe,%ecx 10a08c: 89 f7 mov %esi,%edi 10a08e: f3 ab rep stos %eax,%es:(%edi) result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10a090: 50 push %eax 10a091: 50 push %eax 10a092: 8b 42 28 mov 0x28(%edx),%eax 10a095: 56 push %esi 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; 10a096: 83 c2 1c add $0x1c,%edx memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 10a099: 52 push %edx 10a09a: ff 50 44 call *0x44(%eax) 10a09d: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &loc ); 10a09f: 89 1c 24 mov %ebx,(%esp) 10a0a2: e8 a5 ee ff ff call 108f4c return result; 10a0a7: 83 c4 10 add $0x10,%esp } 10a0aa: 89 f8 mov %edi,%eax 10a0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10a0af: 5b pop %ebx 10a0b0: 5e pop %esi 10a0b1: 5f pop %edi 10a0b2: c9 leave 10a0b3: c3 ret =============================================================================== 00108ea8 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 108ea8: 55 push %ebp 108ea9: 89 e5 mov %esp,%ebp 108eab: 53 push %ebx 108eac: 83 ec 04 sub $0x4,%esp 108eaf: 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; 108eb2: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx if ( this_reent ) { 108eb8: 85 c9 test %ecx,%ecx 108eba: 74 32 je 108eee <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 108ebc: 8b 15 28 59 12 00 mov 0x125928,%edx 108ec2: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx _Thread_Executing->libc_reent = this_reent; 108ec8: 89 8a ec 00 00 00 mov %ecx,0xec(%edx) _fwalk (t->libc_reent, sync_wrapper); 108ece: 52 push %edx 108ecf: 52 push %edx 108ed0: 68 f3 8e 10 00 push $0x108ef3 108ed5: ff b0 ec 00 00 00 pushl 0xec(%eax) 108edb: e8 0c 91 00 00 call 111fec <_fwalk> _Thread_Executing->libc_reent = current_reent; 108ee0: a1 28 59 12 00 mov 0x125928,%eax 108ee5: 89 98 ec 00 00 00 mov %ebx,0xec(%eax) 108eeb: 83 c4 10 add $0x10,%esp } } 108eee: 8b 5d fc mov -0x4(%ebp),%ebx 108ef1: c9 leave 108ef2: c3 ret =============================================================================== 00109580 : int tcsetattr( int fd, int opt, struct termios *tp ) { 109580: 55 push %ebp 109581: 89 e5 mov %esp,%ebp 109583: 56 push %esi 109584: 53 push %ebx 109585: 8b 5d 08 mov 0x8(%ebp),%ebx 109588: 8b 45 0c mov 0xc(%ebp),%eax 10958b: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10958e: 85 c0 test %eax,%eax 109590: 74 22 je 1095b4 109592: 48 dec %eax 109593: 74 0d je 1095a2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 109595: e8 f2 84 00 00 call 111a8c <__errno> 10959a: c7 00 86 00 00 00 movl $0x86,(%eax) 1095a0: eb 2a jmp 1095cc case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 1095a2: 50 push %eax 1095a3: 6a 00 push $0x0 1095a5: 6a 03 push $0x3 1095a7: 53 push %ebx 1095a8: e8 27 63 00 00 call 10f8d4 1095ad: 83 c4 10 add $0x10,%esp 1095b0: 85 c0 test %eax,%eax 1095b2: 78 18 js 1095cc <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095b4: 89 75 10 mov %esi,0x10(%ebp) 1095b7: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 1095be: 89 5d 08 mov %ebx,0x8(%ebp) } } 1095c1: 8d 65 f8 lea -0x8(%ebp),%esp 1095c4: 5b pop %ebx 1095c5: 5e pop %esi 1095c6: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 1095c7: e9 08 63 00 00 jmp 10f8d4 } } 1095cc: 83 c8 ff or $0xffffffff,%eax 1095cf: 8d 65 f8 lea -0x8(%ebp),%esp 1095d2: 5b pop %ebx 1095d3: 5e pop %esi 1095d4: c9 leave 1095d5: c3 ret =============================================================================== 0010bfa4 : int truncate( const char *path, off_t length ) { 10bfa4: 55 push %ebp <== NOT EXECUTED 10bfa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10bfa7: 56 push %esi <== NOT EXECUTED 10bfa8: 53 push %ebx <== NOT EXECUTED 10bfa9: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED 10bfac: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10bfaf: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 10bfb2: 6a 01 push $0x1 <== NOT EXECUTED 10bfb4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10bfb7: 89 55 f4 mov %edx,-0xc(%ebp) <== NOT EXECUTED 10bfba: 89 4d f0 mov %ecx,-0x10(%ebp) <== NOT EXECUTED 10bfbd: e8 e2 df ff ff call 109fa4 <== NOT EXECUTED 10bfc2: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( fd == -1 ) 10bfc4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return -1; 10bfc7: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) 10bfca: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10bfcd: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 10bfd0: 8b 4d f0 mov -0x10(%ebp),%ecx <== NOT EXECUTED 10bfd3: 74 16 je 10bfeb <== NOT EXECUTED return -1; status = ftruncate( fd, length ); 10bfd5: 50 push %eax <== NOT EXECUTED 10bfd6: 51 push %ecx <== NOT EXECUTED 10bfd7: 52 push %edx <== NOT EXECUTED 10bfd8: 53 push %ebx <== NOT EXECUTED 10bfd9: e8 32 49 00 00 call 110910 <== NOT EXECUTED 10bfde: 89 c6 mov %eax,%esi <== NOT EXECUTED (void) close( fd ); 10bfe0: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10bfe3: e8 cc cf ff ff call 108fb4 <== NOT EXECUTED return status; 10bfe8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bfeb: 89 f0 mov %esi,%eax <== NOT EXECUTED 10bfed: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10bff0: 5b pop %ebx <== NOT EXECUTED 10bff1: 5e pop %esi <== NOT EXECUTED 10bff2: c9 leave <== NOT EXECUTED 10bff3: c3 ret <== NOT EXECUTED =============================================================================== 0010a728 : #include int unlink( const char *path ) { 10a728: 55 push %ebp 10a729: 89 e5 mov %esp,%ebp 10a72b: 57 push %edi 10a72c: 56 push %esi 10a72d: 53 push %ebx 10a72e: 83 ec 58 sub $0x58,%esp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 10a731: ff 75 08 pushl 0x8(%ebp) 10a734: e8 51 d8 ff ff call 107f8a 10a739: 89 45 b4 mov %eax,-0x4c(%ebp) if ( parentpathlen == 0 ) 10a73c: 83 c4 10 add $0x10,%esp 10a73f: 85 c0 test %eax,%eax 10a741: 8d 45 d0 lea -0x30(%ebp),%eax 10a744: 75 15 jne 10a75b rtems_filesystem_get_start_loc( path, &i, &parentloc ); 10a746: 51 push %ecx 10a747: 50 push %eax 10a748: 8d 45 e4 lea -0x1c(%ebp),%eax 10a74b: 50 push %eax 10a74c: ff 75 08 pushl 0x8(%ebp) 10a74f: e8 20 e6 ff ff call 108d74 10a754: 83 c4 10 add $0x10,%esp const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 10a757: 31 db xor %ebx,%ebx 10a759: eb 25 jmp 10a780 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 10a75b: 83 ec 0c sub $0xc,%esp 10a75e: 6a 00 push $0x0 10a760: 50 push %eax 10a761: 6a 02 push $0x2 10a763: ff 75 b4 pushl -0x4c(%ebp) 10a766: ff 75 08 pushl 0x8(%ebp) 10a769: e8 b3 d7 ff ff call 107f21 10a76e: 89 c2 mov %eax,%edx RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10a770: 83 c4 20 add $0x20,%esp return -1; 10a773: 83 c8 ff or $0xffffffff,%eax else { result = rtems_filesystem_evaluate_path( path, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10a776: 85 d2 test %edx,%edx 10a778: 0f 85 d6 00 00 00 jne 10a854 <== NEVER TAKEN return -1; free_parentloc = true; 10a77e: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10a780: 8d 7d bc lea -0x44(%ebp),%edi 10a783: 8d 75 d0 lea -0x30(%ebp),%esi 10a786: b9 05 00 00 00 mov $0x5,%ecx 10a78b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 10a78d: 8b 75 08 mov 0x8(%ebp),%esi 10a790: 03 75 b4 add -0x4c(%ebp),%esi name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10a793: 83 c9 ff or $0xffffffff,%ecx 10a796: 89 f7 mov %esi,%edi 10a798: 31 c0 xor %eax,%eax 10a79a: f2 ae repnz scas %es:(%edi),%al 10a79c: f7 d1 not %ecx 10a79e: 49 dec %ecx 10a79f: 52 push %edx 10a7a0: 52 push %edx 10a7a1: 51 push %ecx 10a7a2: 56 push %esi 10a7a3: e8 21 d8 ff ff call 107fc9 10a7a8: 01 c6 add %eax,%esi result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10a7aa: 83 c9 ff or $0xffffffff,%ecx 10a7ad: 89 f7 mov %esi,%edi 10a7af: 31 c0 xor %eax,%eax 10a7b1: f2 ae repnz scas %es:(%edi),%al 10a7b3: f7 d1 not %ecx 10a7b5: 49 dec %ecx 10a7b6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10a7bd: 8d 7d bc lea -0x44(%ebp),%edi 10a7c0: 57 push %edi 10a7c1: 6a 00 push $0x0 10a7c3: 51 push %ecx 10a7c4: 56 push %esi 10a7c5: e8 d2 d6 ff ff call 107e9c 0, &loc, false ); if ( result != 0 ) { 10a7ca: 83 c4 20 add $0x20,%esp 10a7cd: 85 c0 test %eax,%eax 10a7cf: 74 13 je 10a7e4 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 10a7d1: 83 c8 ff or $0xffffffff,%eax <== 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 ) 10a7d4: 84 db test %bl,%bl <== NOT EXECUTED 10a7d6: 74 7c je 10a854 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10a7d8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a7db: 8d 55 d0 lea -0x30(%ebp),%edx <== NOT EXECUTED 10a7de: 52 push %edx <== NOT EXECUTED 10a7df: 89 45 b0 mov %eax,-0x50(%ebp) <== NOT EXECUTED 10a7e2: eb 65 jmp 10a849 <== NOT EXECUTED return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 10a7e4: 83 ec 0c sub $0xc,%esp 10a7e7: 57 push %edi 10a7e8: 8b 45 c8 mov -0x38(%ebp),%eax 10a7eb: ff 50 10 call *0x10(%eax) 10a7ee: 83 c4 10 add $0x10,%esp 10a7f1: 48 dec %eax 10a7f2: 75 2f jne 10a823 rtems_filesystem_freenode( &loc ); 10a7f4: 83 ec 0c sub $0xc,%esp 10a7f7: 57 push %edi 10a7f8: e8 0b d8 ff ff call 108008 if ( free_parentloc ) 10a7fd: 83 c4 10 add $0x10,%esp 10a800: 84 db test %bl,%bl 10a802: 74 0f je 10a813 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10a804: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a807: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED 10a80a: 50 push %eax <== NOT EXECUTED 10a80b: e8 f8 d7 ff ff call 108008 <== NOT EXECUTED 10a810: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 10a813: e8 c0 91 00 00 call 1139d8 <__errno> 10a818: c7 00 15 00 00 00 movl $0x15,(%eax) 10a81e: 83 c8 ff or $0xffffffff,%eax 10a821: eb 31 jmp 10a854 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 10a823: 50 push %eax 10a824: 50 push %eax 10a825: 57 push %edi 10a826: 8d 75 d0 lea -0x30(%ebp),%esi 10a829: 56 push %esi 10a82a: 8b 45 c8 mov -0x38(%ebp),%eax 10a82d: ff 50 0c call *0xc(%eax) rtems_filesystem_freenode( &loc ); 10a830: 89 3c 24 mov %edi,(%esp) 10a833: 89 45 b0 mov %eax,-0x50(%ebp) 10a836: e8 cd d7 ff ff call 108008 if ( free_parentloc ) 10a83b: 83 c4 10 add $0x10,%esp 10a83e: 84 db test %bl,%bl 10a840: 8b 45 b0 mov -0x50(%ebp),%eax 10a843: 74 0f je 10a854 rtems_filesystem_freenode( &parentloc ); 10a845: 83 ec 0c sub $0xc,%esp 10a848: 56 push %esi 10a849: e8 ba d7 ff ff call 108008 10a84e: 83 c4 10 add $0x10,%esp 10a851: 8b 45 b0 mov -0x50(%ebp),%eax return result; } 10a854: 8d 65 f4 lea -0xc(%ebp),%esp 10a857: 5b pop %ebx 10a858: 5e pop %esi 10a859: 5f pop %edi 10a85a: c9 leave 10a85b: c3 ret =============================================================================== 0010a999 : */ int unmount( const char *path ) { 10a999: 55 push %ebp 10a99a: 89 e5 mov %esp,%ebp 10a99c: 57 push %edi 10a99d: 56 push %esi 10a99e: 53 push %ebx 10a99f: 83 ec 38 sub $0x38,%esp 10a9a2: 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 ) ) 10a9a5: 83 cb ff or $0xffffffff,%ebx 10a9a8: 31 c0 xor %eax,%eax 10a9aa: 89 d9 mov %ebx,%ecx 10a9ac: 89 d7 mov %edx,%edi 10a9ae: f2 ae repnz scas %es:(%edi),%al 10a9b0: f7 d1 not %ecx 10a9b2: 49 dec %ecx 10a9b3: 6a 01 push $0x1 10a9b5: 8d 7d d4 lea -0x2c(%ebp),%edi 10a9b8: 57 push %edi 10a9b9: 6a 00 push $0x0 10a9bb: 51 push %ecx 10a9bc: 52 push %edx 10a9bd: e8 f7 d4 ff ff call 107eb9 10a9c2: 83 c4 20 add $0x20,%esp 10a9c5: 85 c0 test %eax,%eax 10a9c7: 0f 85 f2 00 00 00 jne 10aabf return -1; mt_entry = loc.mt_entry; 10a9cd: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 10a9d0: 8b 45 d4 mov -0x2c(%ebp),%eax 10a9d3: 39 46 1c cmp %eax,0x1c(%esi) 10a9d6: 74 1c je 10a9f4 rtems_filesystem_freenode( &loc ); 10a9d8: 83 ec 0c sub $0xc,%esp 10a9db: 57 push %edi 10a9dc: e8 bf d5 ff ff call 107fa0 rtems_set_errno_and_return_minus_one( EACCES ); 10a9e1: e8 6e 68 00 00 call 111254 <__errno> 10a9e6: c7 00 0d 00 00 00 movl $0xd,(%eax) 10a9ec: 83 c4 10 add $0x10,%esp 10a9ef: e9 cb 00 00 00 jmp 10aabf /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10a9f4: 83 ec 0c sub $0xc,%esp 10a9f7: 57 push %edi 10a9f8: e8 a3 d5 ff ff call 107fa0 * 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 ) 10a9fd: 83 c4 10 add $0x10,%esp 10aa00: a1 a0 45 12 00 mov 0x1245a0,%eax 10aa05: 39 70 14 cmp %esi,0x14(%eax) 10aa08: 74 25 je 10aa2f /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10aa0a: 51 push %ecx 10aa0b: 51 push %ecx 10aa0c: ff 76 2c pushl 0x2c(%esi) 10aa0f: 68 88 a9 10 00 push $0x10a988 10aa14: e8 7c dc ff ff call 108695 10aa19: 83 c4 10 add $0x10,%esp 10aa1c: 84 c0 test %al,%al 10aa1e: 75 0f jne 10aa2f * 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 ) 10aa20: 83 ec 0c sub $0xc,%esp 10aa23: 56 push %esi 10aa24: e8 5f d8 ff ff call 108288 10aa29: 83 c4 10 add $0x10,%esp 10aa2c: 48 dec %eax 10aa2d: 75 10 jne 10aa3f rtems_set_errno_and_return_minus_one( EBUSY ); 10aa2f: e8 20 68 00 00 call 111254 <__errno> 10aa34: c7 00 10 00 00 00 movl $0x10,(%eax) 10aa3a: e9 80 00 00 00 jmp 10aabf * 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 ) 10aa3f: 83 ec 0c sub $0xc,%esp 10aa42: 8b 46 14 mov 0x14(%esi),%eax 10aa45: 56 push %esi 10aa46: ff 50 28 call *0x28(%eax) 10aa49: 83 c4 10 add $0x10,%esp return -1; 10aa4c: 83 ca ff or $0xffffffff,%edx * 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 ) 10aa4f: 85 c0 test %eax,%eax 10aa51: 75 6f jne 10aac2 <== NEVER TAKEN * 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){ 10aa53: 83 ec 0c sub $0xc,%esp 10aa56: 8b 46 28 mov 0x28(%esi),%eax 10aa59: 56 push %esi 10aa5a: ff 50 2c call *0x2c(%eax) 10aa5d: 83 c4 10 add $0x10,%esp 10aa60: 85 c0 test %eax,%eax 10aa62: 74 1d je 10aa81 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 10aa64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa67: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED 10aa6a: 56 push %esi <== NOT EXECUTED 10aa6b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10aa6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); return -1; 10aa71: 89 da mov %ebx,%edx <== NOT EXECUTED * 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 ) 10aa73: 85 c0 test %eax,%eax <== NOT EXECUTED 10aa75: 74 4b je 10aac2 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10aa77: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa7a: 6a 00 push $0x0 <== NOT EXECUTED 10aa7c: e8 83 0e 00 00 call 10b904 <== 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 ); 10aa81: 52 push %edx 10aa82: 6a 00 push $0x0 10aa84: 6a 00 push $0x0 10aa86: ff 35 08 67 12 00 pushl 0x126708 10aa8c: e8 f7 08 00 00 call 10b388 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10aa91: 89 34 24 mov %esi,(%esp) 10aa94: e8 eb 10 00 00 call 10bb84 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10aa99: 58 pop %eax 10aa9a: ff 35 08 67 12 00 pushl 0x126708 10aaa0: e8 cf 09 00 00 call 10b474 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; 10aaa5: 8d 46 08 lea 0x8(%esi),%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 ); 10aaa8: 89 04 24 mov %eax,(%esp) 10aaab: e8 f0 d4 ff ff call 107fa0 free( mt_entry ); 10aab0: 89 34 24 mov %esi,(%esp) 10aab3: e8 fc d4 ff ff call 107fb4 return 0; 10aab8: 83 c4 10 add $0x10,%esp 10aabb: 31 d2 xor %edx,%edx 10aabd: eb 03 jmp 10aac2 * 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 ) ) return -1; 10aabf: 83 ca ff or $0xffffffff,%edx rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10aac2: 89 d0 mov %edx,%eax 10aac4: 8d 65 f4 lea -0xc(%ebp),%esp 10aac7: 5b pop %ebx 10aac8: 5e pop %esi 10aac9: 5f pop %edi 10aaca: c9 leave 10aacb: c3 ret =============================================================================== 0010a894 : int utime( const char *path, const struct utimbuf *times ) { 10a894: 55 push %ebp 10a895: 89 e5 mov %esp,%ebp 10a897: 57 push %edi 10a898: 53 push %ebx 10a899: 83 ec 3c sub $0x3c,%esp 10a89c: 8b 55 08 mov 0x8(%ebp),%edx 10a89f: 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 ) ) 10a8a2: 31 c0 xor %eax,%eax 10a8a4: 83 c9 ff or $0xffffffff,%ecx 10a8a7: 89 d7 mov %edx,%edi 10a8a9: f2 ae repnz scas %es:(%edi),%al 10a8ab: f7 d1 not %ecx 10a8ad: 49 dec %ecx 10a8ae: 6a 01 push $0x1 10a8b0: 8d 45 dc lea -0x24(%ebp),%eax 10a8b3: 50 push %eax 10a8b4: 6a 00 push $0x0 10a8b6: 51 push %ecx 10a8b7: 52 push %edx 10a8b8: e8 60 d1 ff ff call 107a1d 10a8bd: 89 c2 mov %eax,%edx 10a8bf: 83 c4 20 add $0x20,%esp return -1; 10a8c2: 83 c8 ff or $0xffffffff,%eax { rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10a8c5: 85 d2 test %edx,%edx 10a8c7: 75 3b jne 10a904 return -1; if ( times == NULL ) { 10a8c9: 85 db test %ebx,%ebx 10a8cb: 75 16 jne 10a8e3 <== ALWAYS TAKEN now.actime = now.modtime = time( NULL ); 10a8cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a8d0: 6a 00 push $0x0 <== NOT EXECUTED 10a8d2: e8 55 ac 00 00 call 11552c